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.
Files changed (61) hide show
  1. package/dist/index.cjs +218 -270
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +219 -271
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +218 -270
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/Consent/index.js +3 -3
  14. package/es/core/components/DiyPortalPreview/VideoWidget.js +3 -3
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
  16. package/es/core/components/SxpPageRender/FormatImage.js +2 -2
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +1 -1
  18. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  19. package/es/core/components/SxpPageRender/Nudge/index.js +1 -1
  20. package/es/core/components/SxpPageRender/Tagbar.js +6 -7
  21. package/es/core/components/SxpPageRender/ToggleButton/index.js +2 -2
  22. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  23. package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
  24. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -53
  25. package/es/core/components/SxpPageRender/WaterFall/index.js +2 -4
  26. package/es/core/components/SxpPageRender/index.js +56 -55
  27. package/es/core/context/SxpDataSourceProvider.d.ts +4 -0
  28. package/es/core/context/SxpDataSourceProvider.js +20 -17
  29. package/es/core/hooks/useEventReport.d.ts +1 -1
  30. package/es/core/hooks/useEventReport.js +13 -10
  31. package/es/materials/sxp/popup/AppointForm/index.js +1 -1
  32. package/es/materials/sxp/popup/CommodityDetail/index.js +3 -3
  33. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
  34. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  35. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  36. package/es/materials/sxp/template/Appoint/index.js +1 -1
  37. package/lib/core/components/Consent/index.js +3 -3
  38. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -3
  39. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
  40. package/lib/core/components/SxpPageRender/FormatImage.js +2 -2
  41. package/lib/core/components/SxpPageRender/LikeButton/index.js +1 -1
  42. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  43. package/lib/core/components/SxpPageRender/Nudge/index.js +1 -1
  44. package/lib/core/components/SxpPageRender/Tagbar.js +7 -8
  45. package/lib/core/components/SxpPageRender/ToggleButton/index.js +2 -2
  46. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  47. package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
  48. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -53
  49. package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -4
  50. package/lib/core/components/SxpPageRender/index.js +56 -55
  51. package/lib/core/context/SxpDataSourceProvider.d.ts +4 -0
  52. package/lib/core/context/SxpDataSourceProvider.js +21 -18
  53. package/lib/core/hooks/useEventReport.d.ts +1 -1
  54. package/lib/core/hooks/useEventReport.js +13 -10
  55. package/lib/materials/sxp/popup/AppointForm/index.js +1 -1
  56. package/lib/materials/sxp/popup/CommodityDetail/index.js +3 -3
  57. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
  58. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  59. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  60. package/lib/materials/sxp/template/Appoint/index.js +1 -1
  61. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -438,70 +438,6 @@ var SXP_EVENT_TYPE;
438
438
  SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
439
439
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
440
440
 
441
- /*
442
- * @Author: binruan@chatlabs.com
443
- * @Date: 2024-06-13 15:16:53
444
- * @LastEditors: binruan@chatlabs.com
445
- * @LastEditTime: 2024-06-17 14:25:01
446
- * @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
447
- *
448
- */
449
- const Consent$2 = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
450
- const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
451
- const channelObj = React.useMemo(() => {
452
- const queryString = location.search.slice(1);
453
- const params = qs.parse(queryString.replace(/\+/g, '%2B'));
454
- for (const key in params) {
455
- params[key] = params[key].replace(/%2B/g, '+');
456
- }
457
- return params;
458
- }, []);
459
- const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
460
- React.useEffect(() => {
461
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
462
- eventInfo: {
463
- eventSubject: 'privacyEnter',
464
- eventDescription: 'User enter privacy page',
465
- utmSource: getUtmValue('utm_source'),
466
- utmMedium: getUtmValue('utm_medium'),
467
- utmCampaign: getUtmValue('utm_campaign'),
468
- utmId: getUtmValue('utm_id'),
469
- utmContent: getUtmValue('utm_content'),
470
- clSource: getUtmValue('cl_source'),
471
- enterTime: `${Date.now()}`,
472
- enterUrl: window.location.href,
473
- rtc: null,
474
- requestId: null,
475
- sessionID: null
476
- }
477
- });
478
- }, []);
479
- const handleAgree = () => {
480
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
481
- eventInfo: {
482
- eventSubject: 'userConsent',
483
- eventDescription: '用户授权【操作结果】',
484
- consentResult: '0',
485
- consentTags: '[]',
486
- rtc: null,
487
- requestId: null,
488
- sessionID: null
489
- }
490
- });
491
- setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
492
- window.localStorage.setItem(AGREE_POLICY, 'yes');
493
- };
494
- return (React.createElement("div", { className: 'consent-bg' },
495
- React.createElement("div", { className: 'consent' },
496
- React.createElement("div", { className: 'consent-col' },
497
- React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
498
- React.createElement("div", { className: 'consent-content' }, privacy_context !== null && privacy_context !== void 0 ? privacy_context : 'This site uses cookies to improve your online experience. By continuing to use the site please agree the policy first.')),
499
- React.createElement("div", { className: 'consent-col' },
500
- React.createElement("button", { className: 'consent-btn', onClick: handleAgree }, "Agree"),
501
- React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
502
- };
503
- var Consent$3 = React.memo(Consent$2);
504
-
505
441
  const SxpDataSourceContext = React.createContext({
506
442
  rtcList: [],
507
443
  tagList: []
@@ -511,8 +447,8 @@ var DataSourceType;
511
447
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
512
448
  })(DataSourceType || (DataSourceType = {}));
513
449
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
450
+ const DEFAULT_TAG = 'FOR U';
514
451
  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 }) => {
515
- var _a, _b, _c;
516
452
  const [rtcList, setRtcList] = React.useState([]);
517
453
  const [tagList, setTagList] = React.useState([]);
518
454
  const [loading, setLoading] = React.useState(false);
@@ -530,6 +466,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
530
466
  const [videoRef, setVideoRef] = React.useState(null);
531
467
  const themeTag = React.useRef();
532
468
  const curTime = React.useRef();
469
+ const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
533
470
  const isShowConsent = React.useMemo(() => {
534
471
  var _a, _b, _c, _d;
535
472
  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;
@@ -578,10 +515,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
578
515
  }, [bffDataSource]);
579
516
  // 获取推荐视频数据
580
517
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
581
- var _d, _e, _f, _g, _h;
518
+ var _a, _b, _c, _d, _e;
582
519
  query = {
583
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
584
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
520
+ maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
521
+ defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
585
522
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
586
523
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
587
524
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
@@ -589,10 +526,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
589
526
  themeTag: query === null || query === void 0 ? void 0 : query.themeTag
590
527
  };
591
528
  if (utmVal) {
592
- const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
529
+ const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
593
530
  const key = val.split('=')[0];
594
531
  return UTM_KEYS.includes(key);
595
- })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
532
+ })) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
596
533
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
597
534
  }
598
535
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -604,7 +541,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
604
541
  return result === null || result === void 0 ? void 0 : result.data;
605
542
  }), [bffFetch, utmVal, maxSize, defaultSize]);
606
543
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
607
- var _j, _k;
544
+ var _f, _g;
608
545
  if (rtcList.length <= 0) {
609
546
  return;
610
547
  }
@@ -614,8 +551,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
614
551
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
615
552
  themeTag: themeTag.current
616
553
  });
617
- setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
618
- setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
554
+ setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
555
+ setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
619
556
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
620
557
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
621
558
  // 关闭 BFF 事件上报
@@ -679,16 +616,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
679
616
  }), [bffFetch]);
680
617
  // 获取 Tag
681
618
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
682
- var _l, _m, _o, _p, _q;
619
+ var _h, _j, _k, _l, _m;
683
620
  if (!utmVal || !isShowTag)
684
621
  return;
685
622
  try {
686
- const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
623
+ const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
687
624
  const key = val.split('=')[0];
688
625
  return UTM_KEYS.includes(key);
689
- })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
626
+ })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
690
627
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
691
- setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
628
+ 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 : []);
692
629
  }
693
630
  catch (e) {
694
631
  console.log('e', e);
@@ -819,14 +756,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
819
756
  setIsAgreePolicy,
820
757
  curTime,
821
758
  h5EnterLink,
822
- themeTag
823
- } }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
759
+ themeTag,
760
+ isShowConsent,
761
+ selectTag,
762
+ setSelectTag
763
+ } }, render({
824
764
  rtcList,
825
765
  mutateLike: bffMutateLike,
826
766
  mutateUnlike: bffMutateUnlike,
827
767
  submitForm: bffSubmitForm,
828
768
  tagList
829
- }))));
769
+ })));
830
770
  };
831
771
  var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
832
772
 
@@ -1230,7 +1170,7 @@ var settingRender$6 = [
1230
1170
  * @Author: binruan@chatlabs.com
1231
1171
  * @Date: 2024-03-12 10:59:06
1232
1172
  * @LastEditors: binruan@chatlabs.com
1233
- * @LastEditTime: 2024-06-12 10:53:57
1173
+ * @LastEditTime: 2024-06-20 13:39:07
1234
1174
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1235
1175
  *
1236
1176
  */
@@ -1300,16 +1240,18 @@ function useEventReport() {
1300
1240
  }
1301
1241
  });
1302
1242
  }, [bffEventReport, popupDetailData]);
1303
- const backMainFeed = React.useCallback((lastFeed, themeTag, hashTag) => {
1304
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1305
- eventInfo: {
1306
- lastFeed,
1307
- themeTags: themeTag ? `[${themeTag}]` : '',
1308
- hashTags: hashTag ? `[${hashTag}]` : '',
1309
- eventSubject: 'backMainFeed',
1310
- eventDescription: 'back Main Feed'
1311
- }
1312
- });
1243
+ const backMainFeed = React.useCallback((lastFeed, selectTag, themeTag, hashTag) => {
1244
+ if (selectTag && selectTag === DEFAULT_TAG) {
1245
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1246
+ eventInfo: {
1247
+ lastFeed,
1248
+ themeTags: themeTag ? `['${themeTag}']` : '',
1249
+ hashTags: hashTag ? `['${hashTag}']` : '',
1250
+ eventSubject: 'backMainFeed',
1251
+ eventDescription: 'back Main Feed'
1252
+ }
1253
+ });
1254
+ }
1313
1255
  }, [bffEventReport]);
1314
1256
  return {
1315
1257
  jumpToWeb,
@@ -1396,7 +1338,7 @@ const AppointForm$1 = (_a) => {
1396
1338
  React.createElement("div", { className: 'pb-appoint-form-container' },
1397
1339
  React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
1398
1340
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
1399
- 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))));
1341
+ 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))));
1400
1342
  };
1401
1343
  var AppointFormComponent = React.memo(AppointForm$1);
1402
1344
 
@@ -8588,7 +8530,7 @@ var ExpandableText$1 = React.memo(ExpandableText);
8588
8530
  * @Author: binruan@chatlabs.com
8589
8531
  * @Date: 2024-03-20 10:27:31
8590
8532
  * @LastEditors: binruan@chatlabs.com
8591
- * @LastEditTime: 2024-05-27 09:47:19
8533
+ * @LastEditTime: 2024-06-19 16:25:46
8592
8534
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8593
8535
  *
8594
8536
  */
@@ -8638,9 +8580,9 @@ const FormatImage = React.forwardRef((props, ref) => {
8638
8580
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8639
8581
  React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8640
8582
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8641
- } }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8583
+ }, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8642
8584
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8643
- } }))));
8585
+ }, alt: 'image' }))));
8644
8586
  });
8645
8587
  var FormatImage$1 = React.memo(FormatImage);
8646
8588
 
@@ -8708,8 +8650,8 @@ const CommodityDetail$1 = (_a) => {
8708
8650
  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 }))));
8709
8651
  };
8710
8652
  const renderBtn = () => {
8711
- var _a;
8712
- 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 }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
8653
+ var _a, _b;
8654
+ 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'))));
8713
8655
  };
8714
8656
  const getStyle = React.useCallback((style) => {
8715
8657
  if (style === null || style === void 0 ? void 0 : style.lineClamp) {
@@ -8755,7 +8697,7 @@ const CommodityDetail$1 = (_a) => {
8755
8697
  top: 0,
8756
8698
  objectFit: 'cover',
8757
8699
  width: '100%'
8758
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8700
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
8759
8701
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8760
8702
  renderBtn(),
8761
8703
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
@@ -8959,9 +8901,9 @@ const Prompt$1 = (_a) => {
8959
8901
  };
8960
8902
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css.css(Object.assign({}, style))}` }, props),
8961
8903
  React.createElement("div", { className: 'pb-prompt-icon' },
8962
- React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
8904
+ React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2, alt: 'success image' })),
8963
8905
  React.createElement("div", { className: 'pb-prompt-content' }, content),
8964
- React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
8906
+ React.createElement("button", { "aria-label": btnText, className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
8965
8907
  };
8966
8908
  var PromptComponent = React.memo(Prompt$1);
8967
8909
 
@@ -9185,7 +9127,7 @@ var settingRender$3 = [
9185
9127
  ];
9186
9128
 
9187
9129
  const CommodityDetailDiroNew$1 = (_a) => {
9188
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
9130
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
9189
9131
  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"]);
9190
9132
  React.useState(true);
9191
9133
  const { sxpParameter } = useSxpDataSource();
@@ -9291,7 +9233,7 @@ Made in Italy` })));
9291
9233
  top: 0,
9292
9234
  objectFit: 'cover',
9293
9235
  width: '100%'
9294
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
9236
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
9295
9237
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9296
9238
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9297
9239
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
@@ -9300,7 +9242,7 @@ Made in Italy` })));
9300
9242
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
9301
9243
  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),
9302
9244
  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 : '税费'))),
9303
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
9245
+ (!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')),
9304
9246
  productInfoText({ isPost }))),
9305
9247
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
9306
9248
  };
@@ -9792,7 +9734,7 @@ const Appoint$1 = (_a) => {
9792
9734
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9793
9735
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9794
9736
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9795
- 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: '' })),
9737
+ 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' })),
9796
9738
  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')));
9797
9739
  };
9798
9740
  var AppointComponent = React.memo(Appoint$1);
@@ -10710,7 +10652,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
10710
10652
  var _a;
10711
10653
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
10712
10654
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
10713
- React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
10655
+ React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
10714
10656
  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 : '标题'}`)));
10715
10657
  };
10716
10658
  var Navbar$1 = React.memo(Navbar);
@@ -12002,15 +11944,15 @@ const WaterfallFlowItem$1 = (props) => {
12002
11944
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
12003
11945
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
12004
11946
  const [showVideo, setShowVideo] = React.useState(false);
12005
- const [isLoading, setIsLoading] = React.useState(false);
12006
- const [imgInfo, setImgInfo] = React.useState({
11947
+ React.useState(false);
11948
+ React.useState({
12007
11949
  height: 1,
12008
11950
  width: 1
12009
11951
  });
12010
11952
  const imgDom = React.useRef(null);
12011
11953
  const ref = React.useRef(null);
12012
- const videoDom = React.useRef(null);
12013
- const canvasRef = React.useRef(null);
11954
+ React.useRef(null);
11955
+ React.useRef(null);
12014
11956
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
12015
11957
  const src = React.useMemo(() => {
12016
11958
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
@@ -12040,7 +11982,7 @@ const WaterfallFlowItem$1 = (props) => {
12040
11982
  return y;
12041
11983
  }, [style]);
12042
11984
  /** 是否加载图片 */
12043
- const isImgShow = React.useMemo(() => {
11985
+ React.useMemo(() => {
12044
11986
  if (top === undefined) {
12045
11987
  return false;
12046
11988
  }
@@ -12066,58 +12008,25 @@ const WaterfallFlowItem$1 = (props) => {
12066
12008
  if (imgDom.current === null || src === '') {
12067
12009
  return;
12068
12010
  }
12069
- const img = new Image();
12011
+ let imgSrc = null;
12070
12012
  if (showVideo && firstFrameSrc) {
12071
- img.src = firstFrameSrc;
12013
+ imgSrc = firstFrameSrc;
12072
12014
  }
12073
12015
  else {
12074
- img.src = src;
12016
+ imgSrc = src;
12075
12017
  }
12076
- img.onload = () => {
12077
- setImgInfo({
12078
- height: img.height,
12079
- width: img.width
12080
- });
12081
- setIsLoading(true);
12082
- };
12083
- imgDom.current.setSrc(img.src);
12084
- }, [src, showVideo, firstFrameSrc, isImgShow]);
12085
- React.useEffect(() => {
12086
- // 通过宽度比例获取图片高度
12087
- const height = imgInfo.height * (unitWidth / imgInfo.width);
12088
- if (isLoading) {
12089
- // 加40是因为下方文字部分高度为40,可以自己设置
12090
- sizeChange(height + 76 + space, index);
12091
- }
12092
- }, [imgInfo, index, unitWidth, isLoading, space]); /* 增加sizeChange依赖项会导致在admin预览编辑时无限刷新 */
12093
- const calculateHeightForWidth = (videoWidth, videoHeight, targetWidth) => {
12094
- const aspectRatio = videoWidth / videoHeight;
12095
- const targetHeight = targetWidth / aspectRatio;
12096
- return targetHeight;
12097
- };
12098
- React.useEffect(() => {
12099
- const video = videoDom === null || videoDom === void 0 ? void 0 : videoDom.current;
12100
- if (video === null || src === '' || !showVideo) {
12101
- return;
12102
- }
12103
- video.src = src;
12104
- video.currentTime = 1;
12105
- video.crossOrigin = 'anonymous';
12106
- video.onloadeddata = () => {
12107
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12108
- if (!canvas)
12109
- return;
12110
- const ctx = canvas.getContext('2d');
12111
- const targetWidth = (window === null || window === void 0 ? void 0 : window.innerWidth) / 2;
12112
- const targetHeight = calculateHeightForWidth(video.videoWidth, video.videoHeight, targetWidth);
12113
- canvas.height = targetHeight;
12114
- canvas.width = targetWidth;
12115
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12116
- setFirstFrameSrc(canvas.toDataURL());
12117
- video.remove();
12118
- canvas.remove();
12119
- };
12120
- }, [src, showVideo]);
12018
+ if (imgSrc)
12019
+ imgDom.current.setSrc(imgSrc);
12020
+ }, [src, showVideo, firstFrameSrc]);
12021
+ const pictRef = React.useRef();
12022
+ const imgLoad = React.useCallback((img) => {
12023
+ setTimeout(() => {
12024
+ var _a;
12025
+ const height = (_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
12026
+ // 加56是因为下方文字部分高度为56,可以自己设置
12027
+ sizeChange(height + 56 + space, index);
12028
+ }, 0);
12029
+ }, [space, sizeChange, index, unitWidth, pictRef]);
12121
12030
  const handleClickToDetail = () => {
12122
12031
  reportTagsView();
12123
12032
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
@@ -12128,17 +12037,14 @@ const WaterfallFlowItem$1 = (props) => {
12128
12037
  }, 0);
12129
12038
  };
12130
12039
  return (React.createElement("div", { ref: ref, style: Object.assign({}, style), className: 'waterFallList-content-listItem', key: index, onClick: handleClickToDetail },
12131
- React.createElement("div", { className: 'waterFallList-content-listItem-picture' },
12132
- showVideo && (React.createElement("div", { style: { display: 'none' } },
12133
- React.createElement("video", { ref: videoDom, src: src, crossOrigin: 'anonymous', className: 'waterFallList-content-listItem-picture-img' }),
12134
- React.createElement("canvas", { ref: canvasRef }))),
12135
- React.createElement(FormatImage$1, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', ref: imgDom })),
12040
+ React.createElement("div", { className: 'waterFallList-content-listItem-picture', ref: pictRef },
12041
+ React.createElement(FormatImage$1, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', onLoad: imgLoad, ref: imgDom })),
12136
12042
  React.createElement("div", { className: 'waterFallList-content-listItem-info' },
12137
12043
  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),
12138
12044
  React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
12139
12045
  };
12140
12046
  function WaterfallList$1(_a) {
12141
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
12047
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
12142
12048
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
12143
12049
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
12144
12050
  /** 滚动的父元素 */
@@ -12190,7 +12096,6 @@ function WaterfallList$1(_a) {
12190
12096
  for (let i = 0; i < (list === null || list === void 0 ? void 0 : list.length); i++) {
12191
12097
  // 原本应对应的行数
12192
12098
  const currentRow = Math.floor(i / rowsNum);
12193
- //
12194
12099
  const remainder = (i % rowsNum) + 1;
12195
12100
  // 最低item下标
12196
12101
  let minHeightInd = 0;
@@ -12367,7 +12272,7 @@ function WaterfallList$1(_a) {
12367
12272
  } }))),
12368
12273
  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 }),
12369
12274
  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' }) },
12370
- 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'))))));
12275
+ 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'))))));
12371
12276
  }
12372
12277
 
12373
12278
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -12496,7 +12401,7 @@ const WaterfallFlowItem = (props) => {
12496
12401
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
12497
12402
  };
12498
12403
  function WaterfallList(_a) {
12499
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
12404
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
12500
12405
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
12501
12406
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
12502
12407
  const [list, setList] = React.useState();
@@ -12585,20 +12490,20 @@ function WaterfallList(_a) {
12585
12490
  } })),
12586
12491
  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 }),
12587
12492
  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' }) },
12588
- 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'))))));
12493
+ 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'))))));
12589
12494
  }
12590
12495
 
12591
12496
  /*
12592
12497
  * @Author: binruan@chatlabs.com
12593
12498
  * @Date: 2024-01-10 10:58:24
12594
12499
  * @LastEditors: binruan@chatlabs.com
12595
- * @LastEditTime: 2024-06-12 14:18:56
12500
+ * @LastEditTime: 2024-06-20 12:45:26
12596
12501
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
12597
12502
  *
12598
12503
  */
12599
12504
  const WaterFall = (props) => {
12600
12505
  var _a;
12601
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
12506
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag } = useSxpDataSource();
12602
12507
  const { backMainFeed } = useEventReport();
12603
12508
  React.useRef(null);
12604
12509
  const modalEleRef = React.useRef(null);
@@ -12620,9 +12525,7 @@ const WaterFall = (props) => {
12620
12525
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
12621
12526
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
12622
12527
  }
12623
- if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
12624
- backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
12625
- }
12528
+ backMainFeed('branch', selectTag, undefined, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
12626
12529
  reportTagsView();
12627
12530
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
12628
12531
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
@@ -12826,10 +12729,10 @@ var settingRender = [
12826
12729
  }
12827
12730
  ];
12828
12731
 
12829
- const Consent$1 = (props) => {
12830
- return React.createElement(Consent$1, Object.assign({}, props));
12732
+ const Consent$3 = (props) => {
12733
+ return React.createElement(Consent$3, Object.assign({}, props));
12831
12734
  };
12832
- var ConsentComponent = React.memo(Consent$1);
12735
+ var ConsentComponent = React.memo(Consent$3);
12833
12736
 
12834
12737
  /*
12835
12738
  * @Author: binruan@chatlabs.com
@@ -12839,7 +12742,7 @@ var ConsentComponent = React.memo(Consent$1);
12839
12742
  * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
12840
12743
  *
12841
12744
  */
12842
- const Consent = createMaterial(ConsentComponent, {
12745
+ const Consent$2 = createMaterial(ConsentComponent, {
12843
12746
  displayName: 'Consent',
12844
12747
  icon: '',
12845
12748
  category: 'base',
@@ -12874,7 +12777,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
12874
12777
  CommodityDetailDiroNew: CommodityDetailDiroNew,
12875
12778
  CommodityDiro: CommodityDiro,
12876
12779
  CommodityDiroNew: CommodityDiroNew,
12877
- Consent: Consent,
12780
+ Consent: Consent$2,
12878
12781
  HashTag: HashTag,
12879
12782
  Link: Link,
12880
12783
  MultiCommodity: MultiCommodity,
@@ -12934,7 +12837,7 @@ const LikeButton = (_a) => {
12934
12837
  }
12935
12838
  }
12936
12839
  }), 200);
12937
- return (React.createElement("button", Object.assign({}, props, { onClick: handleClick }),
12840
+ return (React.createElement("button", Object.assign({}, props, { "aria-label": 'like', onClick: handleClick }),
12938
12841
  React.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon, alt: 'icon' })));
12939
12842
  };
12940
12843
  var LikeButton$1 = React.memo(LikeButton);
@@ -13193,7 +13096,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13193
13096
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13194
13097
  return null;
13195
13098
  }
13196
- 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 }));
13099
+ 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' }));
13197
13100
  }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
13198
13101
  React.useEffect(() => {
13199
13102
  if (!videoRef)
@@ -13226,7 +13129,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13226
13129
  } },
13227
13130
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
13228
13131
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
13229
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13132
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', alt: 'pause', src: PAUSE_ICON }))),
13230
13133
  renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
13231
13134
  position: 'relative',
13232
13135
  width: '100%',
@@ -13235,7 +13138,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13235
13138
  }, onClick: handleClickVideo() },
13236
13139
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
13237
13140
  renderPoster,
13238
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13141
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'pause' })))));
13239
13142
  };
13240
13143
  var VideoWidget$3 = React.memo(VideoWidget$2);
13241
13144
 
@@ -13255,8 +13158,8 @@ const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style
13255
13158
  setIsTure(result);
13256
13159
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
13257
13160
  };
13258
- return (React.createElement("button", { style: style, className: 'pb-toggle-button', onClick: handleClick },
13259
- React.createElement("img", { className: 'pb-toggle-button-icon', src: isTrue ? activeIcon : unactiveIcon })));
13161
+ return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
13162
+ React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
13260
13163
  };
13261
13164
  var ToggleButton$1 = React.memo(ToggleButton);
13262
13165
 
@@ -13281,7 +13184,7 @@ const FingerSwipeTip = ({ imageUrl, style }) => {
13281
13184
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
13282
13185
  }, [show]);
13283
13186
  return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
13284
- React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
13187
+ React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
13285
13188
  };
13286
13189
 
13287
13190
  /*
@@ -13543,7 +13446,7 @@ const Nudge = ({ nudge }) => {
13543
13446
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
13544
13447
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
13545
13448
  } },
13546
- (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
13449
+ (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,
13547
13450
  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 : '')))));
13548
13451
  };
13549
13452
 
@@ -13551,14 +13454,12 @@ const Nudge = ({ nudge }) => {
13551
13454
  * @Author: binruan@chatlabs.com
13552
13455
  * @Date: 2024-04-29 16:32:21
13553
13456
  * @LastEditors: binruan@chatlabs.com
13554
- * @LastEditTime: 2024-06-12 11:01:48
13457
+ * @LastEditTime: 2024-06-20 10:53:08
13555
13458
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
13556
13459
  *
13557
13460
  */
13558
- const DEFAULT_TAG = 'FOR U';
13559
13461
  const Tagbar = ({ tagList = [], setActiveIndex }) => {
13560
- const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
13561
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
13462
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport, selectTag, setSelectTag } = useSxpDataSource();
13562
13463
  const { backMainFeed } = useEventReport();
13563
13464
  const realTagList = React.useMemo(() => {
13564
13465
  return [DEFAULT_TAG, ...tagList];
@@ -13571,12 +13472,12 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
13571
13472
  eventInfo: {
13572
13473
  eventSubject: 'clickThemeTagsViewContents',
13573
13474
  eventDescription: 'click Theme Tags View Contents',
13574
- themeTags: `[${tag}]`
13475
+ themeTags: `['${tag}']`
13575
13476
  }
13576
13477
  });
13577
13478
  }
13578
13479
  else {
13579
- backMainFeed('theme', selectTag);
13480
+ backMainFeed('theme', tag, selectTag);
13580
13481
  }
13581
13482
  let themeTag;
13582
13483
  if (tag !== DEFAULT_TAG) {
@@ -13594,7 +13495,7 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
13594
13495
  }).finally(() => {
13595
13496
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
13596
13497
  });
13597
- setSelectTag(tag);
13498
+ setSelectTag === null || setSelectTag === void 0 ? void 0 : setSelectTag(tag);
13598
13499
  };
13599
13500
  if (waterFallData || tagList.length <= 0)
13600
13501
  return null;
@@ -13605,16 +13506,80 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
13605
13506
  };
13606
13507
  var Tagbar$1 = React.memo(Tagbar);
13607
13508
 
13509
+ /*
13510
+ * @Author: binruan@chatlabs.com
13511
+ * @Date: 2024-06-13 15:16:53
13512
+ * @LastEditors: binruan@chatlabs.com
13513
+ * @LastEditTime: 2024-06-19 14:13:50
13514
+ * @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
13515
+ *
13516
+ */
13517
+ const Consent = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
13518
+ const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
13519
+ const channelObj = React.useMemo(() => {
13520
+ const queryString = location.search.slice(1);
13521
+ const params = qs.parse(queryString.replace(/\+/g, '%2B'));
13522
+ for (const key in params) {
13523
+ params[key] = params[key].replace(/%2B/g, '+');
13524
+ }
13525
+ return params;
13526
+ }, []);
13527
+ const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
13528
+ React.useEffect(() => {
13529
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13530
+ eventInfo: {
13531
+ eventSubject: 'privacyEnter',
13532
+ eventDescription: 'User enter privacy page',
13533
+ utmSource: getUtmValue('utm_source'),
13534
+ utmMedium: getUtmValue('utm_medium'),
13535
+ utmCampaign: getUtmValue('utm_campaign'),
13536
+ utmId: getUtmValue('utm_id'),
13537
+ utmContent: getUtmValue('utm_content'),
13538
+ clSource: getUtmValue('cl_source'),
13539
+ enterTime: `${Date.now()}`,
13540
+ enterUrl: window.location.href,
13541
+ rtc: null,
13542
+ requestId: null,
13543
+ sessionID: null
13544
+ }
13545
+ });
13546
+ }, []);
13547
+ const handleAgree = () => {
13548
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13549
+ eventInfo: {
13550
+ eventSubject: 'userConsent',
13551
+ eventDescription: '用户授权【操作结果】',
13552
+ consentResult: '0',
13553
+ consentTags: '["系统运营"]',
13554
+ rtc: null,
13555
+ requestId: null,
13556
+ sessionID: null
13557
+ }
13558
+ });
13559
+ setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
13560
+ window.localStorage.setItem(AGREE_POLICY, 'yes');
13561
+ };
13562
+ return (React.createElement("div", { className: 'consent-bg' },
13563
+ React.createElement("div", { className: 'consent' },
13564
+ React.createElement("div", { className: 'consent-col' },
13565
+ React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
13566
+ 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.')),
13567
+ React.createElement("div", { className: 'consent-col' },
13568
+ React.createElement("button", { "aria-label": 'agree', className: 'consent-btn', onClick: handleAgree }, "Agree"),
13569
+ 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')))));
13570
+ };
13571
+ var Consent$1 = React.memo(Consent);
13572
+
13608
13573
  /*
13609
13574
  * @Author: binruan@chatlabs.com
13610
13575
  * @Date: 2024-01-15 19:03:09
13611
13576
  * @LastEditors: binruan@chatlabs.com
13612
- * @LastEditTime: 2024-06-13 18:09:16
13577
+ * @LastEditTime: 2024-06-20 10:37:06
13613
13578
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13614
13579
  *
13615
13580
  */
13616
13581
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
13617
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
13582
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13618
13583
  const { schema } = useEditor();
13619
13584
  const [activeIndex, setActiveIndex] = React.useState(0);
13620
13585
  const viewImageStartTime = React.useRef(0);
@@ -13623,7 +13588,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13623
13588
  const viewTime = React.useRef();
13624
13589
  const [isLoadMore, setIsLoadMore] = React.useState(false);
13625
13590
  const [isShowMore, setIsShowMore] = React.useState(false);
13626
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
13591
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag } = useSxpDataSource();
13627
13592
  const { backMainFeed } = useEventReport();
13628
13593
  const [videoRef, setVideoRef] = React.useState(null);
13629
13594
  const playerRef = React.useRef();
@@ -13697,12 +13662,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13697
13662
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
13698
13663
  const visibleChange = () => {
13699
13664
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
13665
+ const repCond = !openHashtag && !isShowConsent;
13700
13666
  if (document.visibilityState === 'hidden') {
13701
13667
  // 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
13702
13668
  // 移动端h5直接杀掉浏览器或宿主app时不会触发,pc端直接杀掉标签页时能触发
13703
- SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_HIDE, item);
13704
- handleReportViewImageEnd(item);
13705
- handleReportProductView(item);
13669
+ if (repCond) {
13670
+ SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_HIDE, item);
13671
+ handleReportViewImageEnd(item);
13672
+ handleReportProductView(item);
13673
+ }
13706
13674
  let fromKName = '';
13707
13675
  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))) {
13708
13676
  fromKName = 'pdpPage';
@@ -13739,9 +13707,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13739
13707
  else if (document.visibilityState === 'visible') {
13740
13708
  // 页面可见时触发,注意页面初始化时不会触发
13741
13709
  handleH5EnterLink();
13742
- handleViewImageStartEvent(activeIndex);
13743
- SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
13744
- backMainFeed('external');
13710
+ if (repCond) {
13711
+ handleViewImageStartEvent(activeIndex);
13712
+ SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
13713
+ backMainFeed('external', selectTag);
13714
+ }
13745
13715
  }
13746
13716
  };
13747
13717
  document.addEventListener('visibilitychange', visibleChange);
@@ -13757,17 +13727,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13757
13727
  isFromHashtag,
13758
13728
  tempMap,
13759
13729
  curTime,
13760
- backMainFeed
13730
+ backMainFeed,
13731
+ openHashtag,
13732
+ isShowConsent,
13733
+ selectTag
13761
13734
  ]);
13762
- React.useEffect(() => {
13763
- const initTime = () => {
13764
- backMainFeed('external');
13765
- };
13766
- window.addEventListener('pageshow', initTime);
13767
- return () => {
13768
- window.removeEventListener('pageshow', initTime);
13769
- };
13770
- }, []);
13771
13735
  const tagHeight = React.useMemo(() => {
13772
13736
  let h = 0;
13773
13737
  if (tagList.length > 0) {
@@ -14011,62 +13975,46 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14011
13975
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
14012
13976
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
14013
13977
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
14014
- waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
14015
- setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
14016
- } })),
14017
- renderLogo,
14018
- React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
14019
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
14020
- React.createElement(Swiper, { style: {
14021
- marginTop: tagHeight
14022
- }, ref: swiperRef, onSlideChange: () => {
14023
- swiperRef.current.swiper.allowTouchMove = false;
14024
- setTimeout(() => {
14025
- swiperRef.current.swiper.allowTouchMove = true;
14026
- }, 500);
14027
- }, onActiveIndexChange: (swiper) => {
14028
- setActiveIndex(swiper.activeIndex);
14029
- if (openHashtag)
14030
- return;
14031
- // 处理上滑下滑事件
14032
- handleScrollEvent(swiper);
14033
- if (waterFallData)
14034
- return;
14035
- if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
14036
- if (!isLoadMore) {
14037
- setIsLoadMore(true);
14038
- loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
14039
- setIsLoadMore(false);
14040
- });
13978
+ 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,
13979
+ waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
13980
+ setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
13981
+ } })),
13982
+ renderLogo,
13983
+ React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13984
+ 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,
13985
+ React.createElement(Swiper, { style: {
13986
+ marginTop: tagHeight
13987
+ }, ref: swiperRef, onSlideChange: () => {
13988
+ swiperRef.current.swiper.allowTouchMove = false;
13989
+ setTimeout(() => {
13990
+ swiperRef.current.swiper.allowTouchMove = true;
13991
+ }, 500);
13992
+ }, onActiveIndexChange: (swiper) => {
13993
+ setActiveIndex(swiper.activeIndex);
13994
+ if (openHashtag)
13995
+ return;
13996
+ // 处理上滑下滑事件
13997
+ handleScrollEvent(swiper);
13998
+ if (waterFallData)
13999
+ return;
14000
+ if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
14001
+ if (!isLoadMore) {
14002
+ setIsLoadMore(true);
14003
+ loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
14004
+ setIsLoadMore(false);
14005
+ });
14006
+ }
14041
14007
  }
14042
- }
14043
- },
14044
- // style={{
14045
- // pointerEvents: canSwiper ? 'auto' : 'none'
14046
- // }}
14047
- // onReachEnd={() => {
14048
- // // 由hashtaglist跳转过来时不执行下面的方法
14049
- // if (waterFallData) return;
14050
- // if (!isLoadMore) {
14051
- // console.log('trigger load 2');
14052
- // setIsLoadMore(true);
14053
- // loadVideos?.(Math.ceil(activeIndex / 10) + 1).then(() => {
14054
- // setIsLoadMore(false);
14055
- // });
14056
- // }
14057
- // }}
14058
- // modules={[Virtual]}
14059
- // virtual={{ enabled: true, cache: true }}
14060
- direction: 'vertical', height: height },
14061
- React.createElement(ToggleButton$1, { style: {
14062
- position: 'fixed',
14063
- 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',
14064
- zIndex: 999,
14065
- [(_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,
14066
- [(_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
14067
- }, 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 }),
14068
- renderView),
14069
- 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)),
14008
+ }, direction: 'vertical', height: height },
14009
+ React.createElement(ToggleButton$1, { style: {
14010
+ position: 'fixed',
14011
+ 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',
14012
+ zIndex: 999,
14013
+ [(_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,
14014
+ [(_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
14015
+ }, 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 }),
14016
+ renderView))),
14017
+ 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)),
14070
14018
  React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
14071
14019
  React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
14072
14020
  backgroundColor: 'transparent',
@@ -14256,7 +14204,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
14256
14204
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
14257
14205
  return null;
14258
14206
  }
14259
- 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 }));
14207
+ 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' }));
14260
14208
  }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
14261
14209
  React.useEffect(() => {
14262
14210
  const handleBeforeUnload = () => {
@@ -14305,7 +14253,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
14305
14253
  height,
14306
14254
  objectFit: 'contain'
14307
14255
  } }),
14308
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
14256
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'video pause image' }))),
14309
14257
  renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
14310
14258
  position: 'relative',
14311
14259
  width,
@@ -14314,7 +14262,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
14314
14262
  } },
14315
14263
  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 }),
14316
14264
  renderPoster,
14317
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
14265
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'video pause image' })))));
14318
14266
  };
14319
14267
  var VideoWidget$1 = React.memo(VideoWidget);
14320
14268