pb-sxp-ui 1.0.85 → 1.0.87
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 +218 -270
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +219 -271
- 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 +218 -270
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/Consent/index.js +3 -3
- package/es/core/components/DiyPortalPreview/VideoWidget.js +3 -3
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
- package/es/core/components/SxpPageRender/FormatImage.js +2 -2
- package/es/core/components/SxpPageRender/LikeButton/index.js +1 -1
- package/es/core/components/SxpPageRender/Navbar.js +1 -1
- package/es/core/components/SxpPageRender/Nudge/index.js +1 -1
- package/es/core/components/SxpPageRender/Tagbar.js +6 -7
- package/es/core/components/SxpPageRender/ToggleButton/index.js +2 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -53
- package/es/core/components/SxpPageRender/WaterFall/index.js +2 -4
- package/es/core/components/SxpPageRender/index.js +56 -55
- package/es/core/context/SxpDataSourceProvider.d.ts +4 -0
- package/es/core/context/SxpDataSourceProvider.js +20 -17
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +13 -10
- package/es/materials/sxp/popup/AppointForm/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +3 -3
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
- package/es/materials/sxp/popup/Prompt/index.js +2 -2
- package/es/materials/sxp/template/Appoint/index.js +1 -1
- package/lib/core/components/Consent/index.js +3 -3
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -3
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
- package/lib/core/components/SxpPageRender/FormatImage.js +2 -2
- package/lib/core/components/SxpPageRender/LikeButton/index.js +1 -1
- package/lib/core/components/SxpPageRender/Navbar.js +1 -1
- package/lib/core/components/SxpPageRender/Nudge/index.js +1 -1
- package/lib/core/components/SxpPageRender/Tagbar.js +7 -8
- package/lib/core/components/SxpPageRender/ToggleButton/index.js +2 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -53
- package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -4
- package/lib/core/components/SxpPageRender/index.js +56 -55
- package/lib/core/context/SxpDataSourceProvider.d.ts +4 -0
- package/lib/core/context/SxpDataSourceProvider.js +21 -18
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +13 -10
- package/lib/materials/sxp/popup/AppointForm/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +3 -3
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
- package/lib/materials/sxp/popup/Prompt/index.js +2 -2
- package/lib/materials/sxp/template/Appoint/index.js +1 -1
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -430,70 +430,6 @@
|
|
430
430
|
SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
|
431
431
|
})(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
|
432
432
|
|
433
|
-
/*
|
434
|
-
* @Author: binruan@chatlabs.com
|
435
|
-
* @Date: 2024-06-13 15:16:53
|
436
|
-
* @LastEditors: binruan@chatlabs.com
|
437
|
-
* @LastEditTime: 2024-06-17 14:25:01
|
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
|
-
|
497
433
|
const SxpDataSourceContext = React.createContext({
|
498
434
|
rtcList: [],
|
499
435
|
tagList: []
|
@@ -503,8 +439,8 @@
|
|
503
439
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
504
440
|
})(DataSourceType || (DataSourceType = {}));
|
505
441
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
442
|
+
const DEFAULT_TAG = 'FOR U';
|
506
443
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false }) => {
|
507
|
-
var _a, _b, _c;
|
508
444
|
const [rtcList, setRtcList] = React.useState([]);
|
509
445
|
const [tagList, setTagList] = React.useState([]);
|
510
446
|
const [loading, setLoading] = React.useState(false);
|
@@ -522,6 +458,7 @@
|
|
522
458
|
const [videoRef, setVideoRef] = React.useState(null);
|
523
459
|
const themeTag = React.useRef();
|
524
460
|
const curTime = React.useRef();
|
461
|
+
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
525
462
|
const isShowConsent = React.useMemo(() => {
|
526
463
|
var _a, _b, _c, _d;
|
527
464
|
return (((_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 && !isEditor) || isOpenConsent;
|
@@ -570,10 +507,10 @@
|
|
570
507
|
}, [bffDataSource]);
|
571
508
|
// 获取推荐视频数据
|
572
509
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
573
|
-
var
|
510
|
+
var _a, _b, _c, _d, _e;
|
574
511
|
query = {
|
575
|
-
maxSize: (
|
576
|
-
defaultSize: (
|
512
|
+
maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
|
513
|
+
defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
|
577
514
|
'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
|
578
515
|
'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
|
579
516
|
hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
|
@@ -581,10 +518,10 @@
|
|
581
518
|
themeTag: query === null || query === void 0 ? void 0 : query.themeTag
|
582
519
|
};
|
583
520
|
if (utmVal) {
|
584
|
-
const val = (
|
521
|
+
const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
|
585
522
|
const key = val.split('=')[0];
|
586
523
|
return UTM_KEYS.includes(key);
|
587
|
-
})) === null ||
|
524
|
+
})) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
|
588
525
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
589
526
|
}
|
590
527
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -596,7 +533,7 @@
|
|
596
533
|
return result === null || result === void 0 ? void 0 : result.data;
|
597
534
|
}), [bffFetch, utmVal, maxSize, defaultSize]);
|
598
535
|
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
599
|
-
var
|
536
|
+
var _f, _g;
|
600
537
|
if (rtcList.length <= 0) {
|
601
538
|
return;
|
602
539
|
}
|
@@ -606,8 +543,8 @@
|
|
606
543
|
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
|
607
544
|
themeTag: themeTag.current
|
608
545
|
});
|
609
|
-
setRtcList(rtcList.concat((
|
610
|
-
setCacheRtcList(cacheRtcList.concat((
|
546
|
+
setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
|
547
|
+
setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
|
611
548
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
612
549
|
const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
|
613
550
|
// 关闭 BFF 事件上报
|
@@ -671,16 +608,16 @@
|
|
671
608
|
}), [bffFetch]);
|
672
609
|
// 获取 Tag
|
673
610
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
674
|
-
var
|
611
|
+
var _h, _j, _k, _l, _m;
|
675
612
|
if (!utmVal || !isShowTag)
|
676
613
|
return;
|
677
614
|
try {
|
678
|
-
const val = (
|
615
|
+
const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
679
616
|
const key = val.split('=')[0];
|
680
617
|
return UTM_KEYS.includes(key);
|
681
|
-
})) === null ||
|
618
|
+
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
682
619
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
683
|
-
setTagList((
|
620
|
+
setTagList((_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []);
|
684
621
|
}
|
685
622
|
catch (e) {
|
686
623
|
console.log('e', e);
|
@@ -811,14 +748,17 @@
|
|
811
748
|
setIsAgreePolicy,
|
812
749
|
curTime,
|
813
750
|
h5EnterLink,
|
814
|
-
themeTag
|
815
|
-
|
751
|
+
themeTag,
|
752
|
+
isShowConsent,
|
753
|
+
selectTag,
|
754
|
+
setSelectTag
|
755
|
+
} }, render({
|
816
756
|
rtcList,
|
817
757
|
mutateLike: bffMutateLike,
|
818
758
|
mutateUnlike: bffMutateUnlike,
|
819
759
|
submitForm: bffSubmitForm,
|
820
760
|
tagList
|
821
|
-
})))
|
761
|
+
})));
|
822
762
|
};
|
823
763
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
824
764
|
|
@@ -1222,7 +1162,7 @@
|
|
1222
1162
|
* @Author: binruan@chatlabs.com
|
1223
1163
|
* @Date: 2024-03-12 10:59:06
|
1224
1164
|
* @LastEditors: binruan@chatlabs.com
|
1225
|
-
* @LastEditTime: 2024-06-
|
1165
|
+
* @LastEditTime: 2024-06-20 13:39:07
|
1226
1166
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1227
1167
|
*
|
1228
1168
|
*/
|
@@ -1292,16 +1232,18 @@
|
|
1292
1232
|
}
|
1293
1233
|
});
|
1294
1234
|
}, [bffEventReport, popupDetailData]);
|
1295
|
-
const backMainFeed = React.useCallback((lastFeed, themeTag, hashTag) => {
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1235
|
+
const backMainFeed = React.useCallback((lastFeed, selectTag, themeTag, hashTag) => {
|
1236
|
+
if (selectTag && selectTag === DEFAULT_TAG) {
|
1237
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1238
|
+
eventInfo: {
|
1239
|
+
lastFeed,
|
1240
|
+
themeTags: themeTag ? `['${themeTag}']` : '',
|
1241
|
+
hashTags: hashTag ? `['${hashTag}']` : '',
|
1242
|
+
eventSubject: 'backMainFeed',
|
1243
|
+
eventDescription: 'back Main Feed'
|
1244
|
+
}
|
1245
|
+
});
|
1246
|
+
}
|
1305
1247
|
}, [bffEventReport]);
|
1306
1248
|
return {
|
1307
1249
|
jumpToWeb,
|
@@ -1388,7 +1330,7 @@
|
|
1388
1330
|
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1389
1331
|
React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1390
1332
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1391
|
-
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
|
1333
|
+
React.createElement("button", { "aria-label": submitText, onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
|
1392
1334
|
};
|
1393
1335
|
var AppointFormComponent = React.memo(AppointForm$1);
|
1394
1336
|
|
@@ -8580,7 +8522,7 @@
|
|
8580
8522
|
* @Author: binruan@chatlabs.com
|
8581
8523
|
* @Date: 2024-03-20 10:27:31
|
8582
8524
|
* @LastEditors: binruan@chatlabs.com
|
8583
|
-
* @LastEditTime: 2024-
|
8525
|
+
* @LastEditTime: 2024-06-19 16:25:46
|
8584
8526
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8585
8527
|
*
|
8586
8528
|
*/
|
@@ -8630,9 +8572,9 @@
|
|
8630
8572
|
React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|
8631
8573
|
React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
|
8632
8574
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
|
8633
|
-
} }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
|
8575
|
+
}, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
|
8634
8576
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
|
8635
|
-
} }))));
|
8577
|
+
}, alt: 'image' }))));
|
8636
8578
|
});
|
8637
8579
|
var FormatImage$1 = React.memo(FormatImage);
|
8638
8580
|
|
@@ -8700,8 +8642,8 @@
|
|
8700
8642
|
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
|
8701
8643
|
};
|
8702
8644
|
const renderBtn = () => {
|
8703
|
-
var _a;
|
8704
|
-
return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (
|
8645
|
+
var _a, _b;
|
8646
|
+
return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website'))));
|
8705
8647
|
};
|
8706
8648
|
const getStyle = React.useCallback((style) => {
|
8707
8649
|
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
@@ -8747,7 +8689,7 @@
|
|
8747
8689
|
top: 0,
|
8748
8690
|
objectFit: 'cover',
|
8749
8691
|
width: '100%'
|
8750
|
-
}), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
|
8692
|
+
}), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
|
8751
8693
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
8752
8694
|
renderBtn(),
|
8753
8695
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
|
@@ -8951,9 +8893,9 @@
|
|
8951
8893
|
};
|
8952
8894
|
return (React.createElement("div", Object.assign({ className: `pb-prompt ${css.css(Object.assign({}, style))}` }, props),
|
8953
8895
|
React.createElement("div", { className: 'pb-prompt-icon' },
|
8954
|
-
React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
|
8896
|
+
React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2, alt: 'success image' })),
|
8955
8897
|
React.createElement("div", { className: 'pb-prompt-content' }, content),
|
8956
|
-
React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
|
8898
|
+
React.createElement("button", { "aria-label": btnText, className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
|
8957
8899
|
};
|
8958
8900
|
var PromptComponent = React.memo(Prompt$1);
|
8959
8901
|
|
@@ -9177,7 +9119,7 @@
|
|
9177
9119
|
];
|
9178
9120
|
|
9179
9121
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9180
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
9122
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
9181
9123
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
9182
9124
|
React.useState(true);
|
9183
9125
|
const { sxpParameter } = useSxpDataSource();
|
@@ -9283,7 +9225,7 @@ Made in Italy` })));
|
|
9283
9225
|
top: 0,
|
9284
9226
|
objectFit: 'cover',
|
9285
9227
|
width: '100%'
|
9286
|
-
}), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
|
9228
|
+
}), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
|
9287
9229
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
9288
9230
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
9289
9231
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
@@ -9292,7 +9234,7 @@ Made in Italy` })));
|
|
9292
9234
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
9293
9235
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) }, priceText),
|
9294
9236
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo) }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
|
9295
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (
|
9237
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now')),
|
9296
9238
|
productInfoText({ isPost }))),
|
9297
9239
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|
9298
9240
|
};
|
@@ -9784,7 +9726,7 @@ Made in Italy` })));
|
|
9784
9726
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
9785
9727
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
|
9786
9728
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9787
|
-
React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
|
9729
|
+
React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: 'cta image' })),
|
9788
9730
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
|
9789
9731
|
};
|
9790
9732
|
var AppointComponent = React.memo(Appoint$1);
|
@@ -10702,7 +10644,7 @@ Made in Italy` })));
|
|
10702
10644
|
var _a;
|
10703
10645
|
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
10704
10646
|
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
10705
|
-
React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
|
10647
|
+
React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
|
10706
10648
|
React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle }, `#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`)));
|
10707
10649
|
};
|
10708
10650
|
var Navbar$1 = React.memo(Navbar);
|
@@ -11994,15 +11936,15 @@ Made in Italy` })));
|
|
11994
11936
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
11995
11937
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
11996
11938
|
const [showVideo, setShowVideo] = React.useState(false);
|
11997
|
-
|
11998
|
-
|
11939
|
+
React.useState(false);
|
11940
|
+
React.useState({
|
11999
11941
|
height: 1,
|
12000
11942
|
width: 1
|
12001
11943
|
});
|
12002
11944
|
const imgDom = React.useRef(null);
|
12003
11945
|
const ref = React.useRef(null);
|
12004
|
-
|
12005
|
-
|
11946
|
+
React.useRef(null);
|
11947
|
+
React.useRef(null);
|
12006
11948
|
const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
|
12007
11949
|
const src = React.useMemo(() => {
|
12008
11950
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
@@ -12032,7 +11974,7 @@ Made in Italy` })));
|
|
12032
11974
|
return y;
|
12033
11975
|
}, [style]);
|
12034
11976
|
/** 是否加载图片 */
|
12035
|
-
|
11977
|
+
React.useMemo(() => {
|
12036
11978
|
if (top === undefined) {
|
12037
11979
|
return false;
|
12038
11980
|
}
|
@@ -12058,58 +12000,25 @@ Made in Italy` })));
|
|
12058
12000
|
if (imgDom.current === null || src === '') {
|
12059
12001
|
return;
|
12060
12002
|
}
|
12061
|
-
|
12003
|
+
let imgSrc = null;
|
12062
12004
|
if (showVideo && firstFrameSrc) {
|
12063
|
-
|
12005
|
+
imgSrc = firstFrameSrc;
|
12064
12006
|
}
|
12065
12007
|
else {
|
12066
|
-
|
12008
|
+
imgSrc = src;
|
12067
12009
|
}
|
12068
|
-
|
12069
|
-
|
12070
|
-
|
12071
|
-
|
12072
|
-
|
12073
|
-
|
12074
|
-
|
12075
|
-
|
12076
|
-
|
12077
|
-
|
12078
|
-
|
12079
|
-
|
12080
|
-
if (isLoading) {
|
12081
|
-
// 加40是因为下方文字部分高度为40,可以自己设置
|
12082
|
-
sizeChange(height + 76 + space, index);
|
12083
|
-
}
|
12084
|
-
}, [imgInfo, index, unitWidth, isLoading, space]); /* 增加sizeChange依赖项会导致在admin预览编辑时无限刷新 */
|
12085
|
-
const calculateHeightForWidth = (videoWidth, videoHeight, targetWidth) => {
|
12086
|
-
const aspectRatio = videoWidth / videoHeight;
|
12087
|
-
const targetHeight = targetWidth / aspectRatio;
|
12088
|
-
return targetHeight;
|
12089
|
-
};
|
12090
|
-
React.useEffect(() => {
|
12091
|
-
const video = videoDom === null || videoDom === void 0 ? void 0 : videoDom.current;
|
12092
|
-
if (video === null || src === '' || !showVideo) {
|
12093
|
-
return;
|
12094
|
-
}
|
12095
|
-
video.src = src;
|
12096
|
-
video.currentTime = 1;
|
12097
|
-
video.crossOrigin = 'anonymous';
|
12098
|
-
video.onloadeddata = () => {
|
12099
|
-
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
12100
|
-
if (!canvas)
|
12101
|
-
return;
|
12102
|
-
const ctx = canvas.getContext('2d');
|
12103
|
-
const targetWidth = (window === null || window === void 0 ? void 0 : window.innerWidth) / 2;
|
12104
|
-
const targetHeight = calculateHeightForWidth(video.videoWidth, video.videoHeight, targetWidth);
|
12105
|
-
canvas.height = targetHeight;
|
12106
|
-
canvas.width = targetWidth;
|
12107
|
-
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
12108
|
-
setFirstFrameSrc(canvas.toDataURL());
|
12109
|
-
video.remove();
|
12110
|
-
canvas.remove();
|
12111
|
-
};
|
12112
|
-
}, [src, showVideo]);
|
12010
|
+
if (imgSrc)
|
12011
|
+
imgDom.current.setSrc(imgSrc);
|
12012
|
+
}, [src, showVideo, firstFrameSrc]);
|
12013
|
+
const pictRef = React.useRef();
|
12014
|
+
const imgLoad = React.useCallback((img) => {
|
12015
|
+
setTimeout(() => {
|
12016
|
+
var _a;
|
12017
|
+
const height = (_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
12018
|
+
// 加56是因为下方文字部分高度为56,可以自己设置
|
12019
|
+
sizeChange(height + 56 + space, index);
|
12020
|
+
}, 0);
|
12021
|
+
}, [space, sizeChange, index, unitWidth, pictRef]);
|
12113
12022
|
const handleClickToDetail = () => {
|
12114
12023
|
reportTagsView();
|
12115
12024
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
|
@@ -12120,17 +12029,14 @@ Made in Italy` })));
|
|
12120
12029
|
}, 0);
|
12121
12030
|
};
|
12122
12031
|
return (React.createElement("div", { ref: ref, style: Object.assign({}, style), className: 'waterFallList-content-listItem', key: index, onClick: handleClickToDetail },
|
12123
|
-
React.createElement("div", { className: 'waterFallList-content-listItem-picture' },
|
12124
|
-
|
12125
|
-
React.createElement("video", { ref: videoDom, src: src, crossOrigin: 'anonymous', className: 'waterFallList-content-listItem-picture-img' }),
|
12126
|
-
React.createElement("canvas", { ref: canvasRef }))),
|
12127
|
-
React.createElement(FormatImage$1, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', ref: imgDom })),
|
12032
|
+
React.createElement("div", { className: 'waterFallList-content-listItem-picture', ref: pictRef },
|
12033
|
+
React.createElement(FormatImage$1, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', onLoad: imgLoad, ref: imgDom })),
|
12128
12034
|
React.createElement("div", { className: 'waterFallList-content-listItem-info' },
|
12129
12035
|
React.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}`, style: Object.assign({}, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title) }, title && title),
|
12130
12036
|
React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
|
12131
12037
|
};
|
12132
12038
|
function WaterfallList$1(_a) {
|
12133
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
12039
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
12134
12040
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12135
12041
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12136
12042
|
/** 滚动的父元素 */
|
@@ -12182,7 +12088,6 @@ Made in Italy` })));
|
|
12182
12088
|
for (let i = 0; i < (list === null || list === void 0 ? void 0 : list.length); i++) {
|
12183
12089
|
// 原本应对应的行数
|
12184
12090
|
const currentRow = Math.floor(i / rowsNum);
|
12185
|
-
//
|
12186
12091
|
const remainder = (i % rowsNum) + 1;
|
12187
12092
|
// 最低item下标
|
12188
12093
|
let minHeightInd = 0;
|
@@ -12359,7 +12264,7 @@ Made in Italy` })));
|
|
12359
12264
|
} }))),
|
12360
12265
|
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 }),
|
12361
12266
|
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' }) },
|
12362
|
-
React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12267
|
+
React.createElement("button", { "aria-label": ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection', className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_w = data === null || data === void 0 ? void 0 : data.tag) === null || _w === void 0 ? void 0 : _w.linkTitle) || 'Shop the collection'))))));
|
12363
12268
|
}
|
12364
12269
|
|
12365
12270
|
var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
@@ -12488,7 +12393,7 @@ Made in Italy` })));
|
|
12488
12393
|
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
12489
12394
|
};
|
12490
12395
|
function WaterfallList(_a) {
|
12491
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
12396
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
12492
12397
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12493
12398
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12494
12399
|
const [list, setList] = React.useState();
|
@@ -12577,20 +12482,20 @@ Made in Italy` })));
|
|
12577
12482
|
} })),
|
12578
12483
|
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 }),
|
12579
12484
|
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' }) },
|
12580
|
-
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12485
|
+
React.createElement("button", { "aria-label": ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.linkTitle) || 'Shop the collection', className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_r = data === null || data === void 0 ? void 0 : data.tag) === null || _r === void 0 ? void 0 : _r.linkTitle) || 'Shop the collection'))))));
|
12581
12486
|
}
|
12582
12487
|
|
12583
12488
|
/*
|
12584
12489
|
* @Author: binruan@chatlabs.com
|
12585
12490
|
* @Date: 2024-01-10 10:58:24
|
12586
12491
|
* @LastEditors: binruan@chatlabs.com
|
12587
|
-
* @LastEditTime: 2024-06-12
|
12492
|
+
* @LastEditTime: 2024-06-20 12:45:26
|
12588
12493
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
12589
12494
|
*
|
12590
12495
|
*/
|
12591
12496
|
const WaterFall = (props) => {
|
12592
12497
|
var _a;
|
12593
|
-
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
|
12498
|
+
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag } = useSxpDataSource();
|
12594
12499
|
const { backMainFeed } = useEventReport();
|
12595
12500
|
React.useRef(null);
|
12596
12501
|
const modalEleRef = React.useRef(null);
|
@@ -12612,9 +12517,7 @@ Made in Italy` })));
|
|
12612
12517
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
12613
12518
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
12614
12519
|
}
|
12615
|
-
|
12616
|
-
backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
|
12617
|
-
}
|
12520
|
+
backMainFeed('branch', selectTag, undefined, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
|
12618
12521
|
reportTagsView();
|
12619
12522
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
12620
12523
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
@@ -12818,10 +12721,10 @@ Made in Italy` })));
|
|
12818
12721
|
}
|
12819
12722
|
];
|
12820
12723
|
|
12821
|
-
const Consent$
|
12822
|
-
return React.createElement(Consent$
|
12724
|
+
const Consent$3 = (props) => {
|
12725
|
+
return React.createElement(Consent$3, Object.assign({}, props));
|
12823
12726
|
};
|
12824
|
-
var ConsentComponent = React.memo(Consent$
|
12727
|
+
var ConsentComponent = React.memo(Consent$3);
|
12825
12728
|
|
12826
12729
|
/*
|
12827
12730
|
* @Author: binruan@chatlabs.com
|
@@ -12831,7 +12734,7 @@ Made in Italy` })));
|
|
12831
12734
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
|
12832
12735
|
*
|
12833
12736
|
*/
|
12834
|
-
const Consent = createMaterial(ConsentComponent, {
|
12737
|
+
const Consent$2 = createMaterial(ConsentComponent, {
|
12835
12738
|
displayName: 'Consent',
|
12836
12739
|
icon: '',
|
12837
12740
|
category: 'base',
|
@@ -12866,7 +12769,7 @@ Made in Italy` })));
|
|
12866
12769
|
CommodityDetailDiroNew: CommodityDetailDiroNew,
|
12867
12770
|
CommodityDiro: CommodityDiro,
|
12868
12771
|
CommodityDiroNew: CommodityDiroNew,
|
12869
|
-
Consent: Consent,
|
12772
|
+
Consent: Consent$2,
|
12870
12773
|
HashTag: HashTag,
|
12871
12774
|
Link: Link,
|
12872
12775
|
MultiCommodity: MultiCommodity,
|
@@ -12926,7 +12829,7 @@ Made in Italy` })));
|
|
12926
12829
|
}
|
12927
12830
|
}
|
12928
12831
|
}), 200);
|
12929
|
-
return (React.createElement("button", Object.assign({}, props, { onClick: handleClick }),
|
12832
|
+
return (React.createElement("button", Object.assign({}, props, { "aria-label": 'like', onClick: handleClick }),
|
12930
12833
|
React.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon, alt: 'icon' })));
|
12931
12834
|
};
|
12932
12835
|
var LikeButton$1 = React.memo(LikeButton);
|
@@ -13185,7 +13088,7 @@ Made in Italy` })));
|
|
13185
13088
|
if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
|
13186
13089
|
return null;
|
13187
13090
|
}
|
13188
|
-
return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
|
13091
|
+
return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'placeholder image' }));
|
13189
13092
|
}, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
13190
13093
|
React.useEffect(() => {
|
13191
13094
|
if (!videoRef)
|
@@ -13218,7 +13121,7 @@ Made in Italy` })));
|
|
13218
13121
|
} },
|
13219
13122
|
React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
|
13220
13123
|
React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
|
13221
|
-
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
|
13124
|
+
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', alt: 'pause', src: PAUSE_ICON }))),
|
13222
13125
|
renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
|
13223
13126
|
position: 'relative',
|
13224
13127
|
width: '100%',
|
@@ -13227,7 +13130,7 @@ Made in Italy` })));
|
|
13227
13130
|
}, onClick: handleClickVideo() },
|
13228
13131
|
React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
|
13229
13132
|
renderPoster,
|
13230
|
-
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
|
13133
|
+
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'pause' })))));
|
13231
13134
|
};
|
13232
13135
|
var VideoWidget$3 = React.memo(VideoWidget$2);
|
13233
13136
|
|
@@ -13247,8 +13150,8 @@ Made in Italy` })));
|
|
13247
13150
|
setIsTure(result);
|
13248
13151
|
onChange === null || onChange === void 0 ? void 0 : onChange(result);
|
13249
13152
|
};
|
13250
|
-
return (React.createElement("button", { style: style, className: 'pb-toggle-button', onClick: handleClick },
|
13251
|
-
React.createElement("img", { className: 'pb-toggle-button-icon', src: isTrue ? activeIcon : unactiveIcon })));
|
13153
|
+
return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
|
13154
|
+
React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
|
13252
13155
|
};
|
13253
13156
|
var ToggleButton$1 = React.memo(ToggleButton);
|
13254
13157
|
|
@@ -13273,7 +13176,7 @@ Made in Italy` })));
|
|
13273
13176
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
13274
13177
|
}, [show]);
|
13275
13178
|
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
13276
|
-
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
|
13179
|
+
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
|
13277
13180
|
};
|
13278
13181
|
|
13279
13182
|
/*
|
@@ -13535,7 +13438,7 @@ Made in Italy` })));
|
|
13535
13438
|
backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
|
13536
13439
|
borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
|
13537
13440
|
} },
|
13538
|
-
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
|
13441
|
+
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? (React.createElement("img", { src: nudge.icon, alt: 'nudge icon', style: { height: '100%', objectFit: 'cover', flexShrink: 0 } })) : null,
|
13539
13442
|
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 : '')))));
|
13540
13443
|
};
|
13541
13444
|
|
@@ -13543,14 +13446,12 @@ Made in Italy` })));
|
|
13543
13446
|
* @Author: binruan@chatlabs.com
|
13544
13447
|
* @Date: 2024-04-29 16:32:21
|
13545
13448
|
* @LastEditors: binruan@chatlabs.com
|
13546
|
-
* @LastEditTime: 2024-06-
|
13449
|
+
* @LastEditTime: 2024-06-20 10:53:08
|
13547
13450
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
13548
13451
|
*
|
13549
13452
|
*/
|
13550
|
-
const DEFAULT_TAG = 'FOR U';
|
13551
13453
|
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
13552
|
-
const
|
13553
|
-
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
|
13454
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport, selectTag, setSelectTag } = useSxpDataSource();
|
13554
13455
|
const { backMainFeed } = useEventReport();
|
13555
13456
|
const realTagList = React.useMemo(() => {
|
13556
13457
|
return [DEFAULT_TAG, ...tagList];
|
@@ -13563,12 +13464,12 @@ Made in Italy` })));
|
|
13563
13464
|
eventInfo: {
|
13564
13465
|
eventSubject: 'clickThemeTagsViewContents',
|
13565
13466
|
eventDescription: 'click Theme Tags View Contents',
|
13566
|
-
themeTags: `[${tag}]`
|
13467
|
+
themeTags: `['${tag}']`
|
13567
13468
|
}
|
13568
13469
|
});
|
13569
13470
|
}
|
13570
13471
|
else {
|
13571
|
-
backMainFeed('theme', selectTag);
|
13472
|
+
backMainFeed('theme', tag, selectTag);
|
13572
13473
|
}
|
13573
13474
|
let themeTag;
|
13574
13475
|
if (tag !== DEFAULT_TAG) {
|
@@ -13586,7 +13487,7 @@ Made in Italy` })));
|
|
13586
13487
|
}).finally(() => {
|
13587
13488
|
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
13588
13489
|
});
|
13589
|
-
setSelectTag(tag);
|
13490
|
+
setSelectTag === null || setSelectTag === void 0 ? void 0 : setSelectTag(tag);
|
13590
13491
|
};
|
13591
13492
|
if (waterFallData || tagList.length <= 0)
|
13592
13493
|
return null;
|
@@ -13597,16 +13498,80 @@ Made in Italy` })));
|
|
13597
13498
|
};
|
13598
13499
|
var Tagbar$1 = React.memo(Tagbar);
|
13599
13500
|
|
13501
|
+
/*
|
13502
|
+
* @Author: binruan@chatlabs.com
|
13503
|
+
* @Date: 2024-06-13 15:16:53
|
13504
|
+
* @LastEditors: binruan@chatlabs.com
|
13505
|
+
* @LastEditTime: 2024-06-19 14:13:50
|
13506
|
+
* @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
|
13507
|
+
*
|
13508
|
+
*/
|
13509
|
+
const Consent = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
|
13510
|
+
const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
|
13511
|
+
const channelObj = React.useMemo(() => {
|
13512
|
+
const queryString = location.search.slice(1);
|
13513
|
+
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
13514
|
+
for (const key in params) {
|
13515
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
13516
|
+
}
|
13517
|
+
return params;
|
13518
|
+
}, []);
|
13519
|
+
const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
|
13520
|
+
React.useEffect(() => {
|
13521
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13522
|
+
eventInfo: {
|
13523
|
+
eventSubject: 'privacyEnter',
|
13524
|
+
eventDescription: 'User enter privacy page',
|
13525
|
+
utmSource: getUtmValue('utm_source'),
|
13526
|
+
utmMedium: getUtmValue('utm_medium'),
|
13527
|
+
utmCampaign: getUtmValue('utm_campaign'),
|
13528
|
+
utmId: getUtmValue('utm_id'),
|
13529
|
+
utmContent: getUtmValue('utm_content'),
|
13530
|
+
clSource: getUtmValue('cl_source'),
|
13531
|
+
enterTime: `${Date.now()}`,
|
13532
|
+
enterUrl: window.location.href,
|
13533
|
+
rtc: null,
|
13534
|
+
requestId: null,
|
13535
|
+
sessionID: null
|
13536
|
+
}
|
13537
|
+
});
|
13538
|
+
}, []);
|
13539
|
+
const handleAgree = () => {
|
13540
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13541
|
+
eventInfo: {
|
13542
|
+
eventSubject: 'userConsent',
|
13543
|
+
eventDescription: '用户授权【操作结果】',
|
13544
|
+
consentResult: '0',
|
13545
|
+
consentTags: '["系统运营"]',
|
13546
|
+
rtc: null,
|
13547
|
+
requestId: null,
|
13548
|
+
sessionID: null
|
13549
|
+
}
|
13550
|
+
});
|
13551
|
+
setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
|
13552
|
+
window.localStorage.setItem(AGREE_POLICY, 'yes');
|
13553
|
+
};
|
13554
|
+
return (React.createElement("div", { className: 'consent-bg' },
|
13555
|
+
React.createElement("div", { className: 'consent' },
|
13556
|
+
React.createElement("div", { className: 'consent-col' },
|
13557
|
+
React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
|
13558
|
+
React.createElement("div", { className: 'consent-content' }, privacy_context !== null && privacy_context !== void 0 ? privacy_context : 'This site uses cookies to improve your online experience. By continuing to use the site please agree the policy first.')),
|
13559
|
+
React.createElement("div", { className: 'consent-col' },
|
13560
|
+
React.createElement("button", { "aria-label": 'agree', className: 'consent-btn', onClick: handleAgree }, "Agree"),
|
13561
|
+
React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url ? `https://${privacy_policy_url}` : undefined }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
|
13562
|
+
};
|
13563
|
+
var Consent$1 = React.memo(Consent);
|
13564
|
+
|
13600
13565
|
/*
|
13601
13566
|
* @Author: binruan@chatlabs.com
|
13602
13567
|
* @Date: 2024-01-15 19:03:09
|
13603
13568
|
* @LastEditors: binruan@chatlabs.com
|
13604
|
-
* @LastEditTime: 2024-06-
|
13569
|
+
* @LastEditTime: 2024-06-20 10:37:06
|
13605
13570
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13606
13571
|
*
|
13607
13572
|
*/
|
13608
13573
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
13609
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13574
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
13610
13575
|
const { schema } = useEditor();
|
13611
13576
|
const [activeIndex, setActiveIndex] = React.useState(0);
|
13612
13577
|
const viewImageStartTime = React.useRef(0);
|
@@ -13615,7 +13580,7 @@ Made in Italy` })));
|
|
13615
13580
|
const viewTime = React.useRef();
|
13616
13581
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
13617
13582
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
13618
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
|
13583
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag } = useSxpDataSource();
|
13619
13584
|
const { backMainFeed } = useEventReport();
|
13620
13585
|
const [videoRef, setVideoRef] = React.useState(null);
|
13621
13586
|
const playerRef = React.useRef();
|
@@ -13689,12 +13654,15 @@ Made in Italy` })));
|
|
13689
13654
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
13690
13655
|
const visibleChange = () => {
|
13691
13656
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
13657
|
+
const repCond = !openHashtag && !isShowConsent;
|
13692
13658
|
if (document.visibilityState === 'hidden') {
|
13693
13659
|
// 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
|
13694
13660
|
// 移动端h5直接杀掉浏览器或宿主app时不会触发,pc端直接杀掉标签页时能触发
|
13695
|
-
|
13696
|
-
|
13697
|
-
|
13661
|
+
if (repCond) {
|
13662
|
+
SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_HIDE, item);
|
13663
|
+
handleReportViewImageEnd(item);
|
13664
|
+
handleReportProductView(item);
|
13665
|
+
}
|
13698
13666
|
let fromKName = '';
|
13699
13667
|
if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
13700
13668
|
fromKName = 'pdpPage';
|
@@ -13731,9 +13699,11 @@ Made in Italy` })));
|
|
13731
13699
|
else if (document.visibilityState === 'visible') {
|
13732
13700
|
// 页面可见时触发,注意页面初始化时不会触发
|
13733
13701
|
handleH5EnterLink();
|
13734
|
-
|
13735
|
-
|
13736
|
-
|
13702
|
+
if (repCond) {
|
13703
|
+
handleViewImageStartEvent(activeIndex);
|
13704
|
+
SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
|
13705
|
+
backMainFeed('external', selectTag);
|
13706
|
+
}
|
13737
13707
|
}
|
13738
13708
|
};
|
13739
13709
|
document.addEventListener('visibilitychange', visibleChange);
|
@@ -13749,17 +13719,11 @@ Made in Italy` })));
|
|
13749
13719
|
isFromHashtag,
|
13750
13720
|
tempMap,
|
13751
13721
|
curTime,
|
13752
|
-
backMainFeed
|
13722
|
+
backMainFeed,
|
13723
|
+
openHashtag,
|
13724
|
+
isShowConsent,
|
13725
|
+
selectTag
|
13753
13726
|
]);
|
13754
|
-
React.useEffect(() => {
|
13755
|
-
const initTime = () => {
|
13756
|
-
backMainFeed('external');
|
13757
|
-
};
|
13758
|
-
window.addEventListener('pageshow', initTime);
|
13759
|
-
return () => {
|
13760
|
-
window.removeEventListener('pageshow', initTime);
|
13761
|
-
};
|
13762
|
-
}, []);
|
13763
13727
|
const tagHeight = React.useMemo(() => {
|
13764
13728
|
let h = 0;
|
13765
13729
|
if (tagList.length > 0) {
|
@@ -14003,62 +13967,46 @@ Made in Italy` })));
|
|
14003
13967
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
14004
13968
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
14005
13969
|
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
14006
|
-
|
14007
|
-
|
14008
|
-
|
14009
|
-
|
14010
|
-
|
14011
|
-
|
14012
|
-
|
14013
|
-
|
14014
|
-
|
14015
|
-
swiperRef
|
14016
|
-
|
14017
|
-
|
14018
|
-
|
14019
|
-
|
14020
|
-
|
14021
|
-
|
14022
|
-
|
14023
|
-
|
14024
|
-
|
14025
|
-
|
14026
|
-
|
14027
|
-
|
14028
|
-
if (
|
14029
|
-
|
14030
|
-
|
14031
|
-
|
14032
|
-
|
13970
|
+
isShowConsent ? (React.createElement(Consent$1, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (React.createElement(React.Fragment, null,
|
13971
|
+
waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
|
13972
|
+
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
13973
|
+
} })),
|
13974
|
+
renderLogo,
|
13975
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13976
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _d !== void 0 ? _d : 0)}%` } })) : null,
|
13977
|
+
React.createElement(Swiper, { style: {
|
13978
|
+
marginTop: tagHeight
|
13979
|
+
}, ref: swiperRef, onSlideChange: () => {
|
13980
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
13981
|
+
setTimeout(() => {
|
13982
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
13983
|
+
}, 500);
|
13984
|
+
}, onActiveIndexChange: (swiper) => {
|
13985
|
+
setActiveIndex(swiper.activeIndex);
|
13986
|
+
if (openHashtag)
|
13987
|
+
return;
|
13988
|
+
// 处理上滑下滑事件
|
13989
|
+
handleScrollEvent(swiper);
|
13990
|
+
if (waterFallData)
|
13991
|
+
return;
|
13992
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
13993
|
+
if (!isLoadMore) {
|
13994
|
+
setIsLoadMore(true);
|
13995
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
13996
|
+
setIsLoadMore(false);
|
13997
|
+
});
|
13998
|
+
}
|
14033
13999
|
}
|
14034
|
-
}
|
14035
|
-
|
14036
|
-
|
14037
|
-
|
14038
|
-
|
14039
|
-
|
14040
|
-
|
14041
|
-
|
14042
|
-
|
14043
|
-
|
14044
|
-
// setIsLoadMore(true);
|
14045
|
-
// loadVideos?.(Math.ceil(activeIndex / 10) + 1).then(() => {
|
14046
|
-
// setIsLoadMore(false);
|
14047
|
-
// });
|
14048
|
-
// }
|
14049
|
-
// }}
|
14050
|
-
// modules={[Virtual]}
|
14051
|
-
// virtual={{ enabled: true, cache: true }}
|
14052
|
-
direction: 'vertical', height: height },
|
14053
|
-
React.createElement(ToggleButton$1, { style: {
|
14054
|
-
position: 'fixed',
|
14055
|
-
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
14056
|
-
zIndex: 999,
|
14057
|
-
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
|
14058
|
-
[(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
|
14059
|
-
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
|
14060
|
-
renderView),
|
14061
|
-
React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props)),
|
14000
|
+
}, direction: 'vertical', height: height },
|
14001
|
+
React.createElement(ToggleButton$1, { style: {
|
14002
|
+
position: 'fixed',
|
14003
|
+
visibility: ((_f = (_e = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.url) ? 'visible' : 'hidden',
|
14004
|
+
zIndex: 999,
|
14005
|
+
[(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _g !== void 0 ? _g : 'right']: (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _h !== void 0 ? _h : 0,
|
14006
|
+
[(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _j !== void 0 ? _j : 'bottom']: (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _k !== void 0 ? _k : 23
|
14007
|
+
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
|
14008
|
+
renderView))),
|
14009
|
+
React.createElement(WaterFall$1, Object.assign({}, (_o = (_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.item) === null || _o === void 0 ? void 0 : _o.props)),
|
14062
14010
|
React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
|
14063
14011
|
React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
|
14064
14012
|
backgroundColor: 'transparent',
|
@@ -14248,7 +14196,7 @@ Made in Italy` })));
|
|
14248
14196
|
if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
|
14249
14197
|
return null;
|
14250
14198
|
}
|
14251
|
-
return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
|
14199
|
+
return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'video poster' }));
|
14252
14200
|
}, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
14253
14201
|
React.useEffect(() => {
|
14254
14202
|
const handleBeforeUnload = () => {
|
@@ -14297,7 +14245,7 @@ Made in Italy` })));
|
|
14297
14245
|
height,
|
14298
14246
|
objectFit: 'contain'
|
14299
14247
|
} }),
|
14300
|
-
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
|
14248
|
+
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'video pause image' }))),
|
14301
14249
|
renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
|
14302
14250
|
position: 'relative',
|
14303
14251
|
width,
|
@@ -14306,7 +14254,7 @@ Made in Italy` })));
|
|
14306
14254
|
} },
|
14307
14255
|
React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', style: { width: '100%' }, ref: videoRef, crossOrigin: 'anonymous', muted: true, autoPlay: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
|
14308
14256
|
renderPoster,
|
14309
|
-
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
|
14257
|
+
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'video pause image' })))));
|
14310
14258
|
};
|
14311
14259
|
var VideoWidget$1 = React.memo(VideoWidget);
|
14312
14260
|
|