pb-sxp-ui 1.10.3 → 1.10.5

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 (43) hide show
  1. package/dist/index.cjs +122 -67
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +122 -67
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +4 -4
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +4 -4
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +122 -67
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +4 -4
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -1
  14. package/es/core/components/SxpPageRender/FormatImage.js +9 -7
  15. package/es/core/components/SxpPageRender/LikeButton/index.js +2 -1
  16. package/es/core/components/SxpPageRender/Modal/index.js +2 -1
  17. package/es/core/components/SxpPageRender/NavBack.js +2 -1
  18. package/es/core/components/SxpPageRender/Nudge/index.js +2 -2
  19. package/es/core/components/SxpPageRender/ToggleButton/index.js +2 -1
  20. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -1
  21. package/es/core/components/SxpPageRender/index.js +28 -19
  22. package/es/core/context/EditorDataProvider.d.ts +2 -3
  23. package/es/core/context/SxpDataSourceProvider.js +44 -15
  24. package/es/core/utils/tool.d.ts +2 -1
  25. package/es/core/utils/tool.js +14 -1
  26. package/es/materials/sxp/MultiPosts/index.js +9 -13
  27. package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  28. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -1
  29. package/lib/core/components/SxpPageRender/FormatImage.js +9 -7
  30. package/lib/core/components/SxpPageRender/LikeButton/index.js +2 -1
  31. package/lib/core/components/SxpPageRender/Modal/index.js +2 -1
  32. package/lib/core/components/SxpPageRender/NavBack.js +2 -1
  33. package/lib/core/components/SxpPageRender/Nudge/index.js +1 -1
  34. package/lib/core/components/SxpPageRender/ToggleButton/index.js +2 -1
  35. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -1
  36. package/lib/core/components/SxpPageRender/index.js +28 -19
  37. package/lib/core/context/EditorDataProvider.d.ts +2 -3
  38. package/lib/core/context/SxpDataSourceProvider.js +44 -15
  39. package/lib/core/utils/tool.d.ts +2 -1
  40. package/lib/core/utils/tool.js +15 -1
  41. package/lib/materials/sxp/MultiPosts/index.js +9 -13
  42. package/lib/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  43. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -309,6 +309,19 @@ function getScreenReader() {
309
309
  /JAWS/i.test(userAgent) ||
310
310
  /ChromeVox/i.test(userAgent));
311
311
  }
312
+ const getSpliceQueryUrl = (url) => {
313
+ if (!url)
314
+ return '';
315
+ if ((url === null || url === void 0 ? void 0 : url.indexOf('http')) === -1)
316
+ return url;
317
+ let query = 'x-im-piez=on';
318
+ if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
319
+ return url + ('&' + query );
320
+ }
321
+ else {
322
+ return url + ('?' + query );
323
+ }
324
+ };
312
325
 
313
326
  function unzip(b64Data) {
314
327
  const strData = atob(b64Data);
@@ -655,11 +668,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
655
668
  const popupCurTimeRef = useRef(null);
656
669
  const [isNoMoreData, setIsNoMoreData] = useState(false);
657
670
  const [globalConfig, setGlobalConfig] = useState((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig);
658
- const [pageData, setPageData] = useState(data);
671
+ const [pageData, setPageData] = useState();
659
672
  const [showConsent, setShowConsent] = useState(false);
660
673
  const [layoutVariantId, setLayoutVariantId] = useState();
661
674
  const [channel, setChannel] = useState();
662
675
  const [eventTimeList, setEventTimeList] = useState([]);
676
+ const [playbookType, setPlaybookType] = useState();
677
+ const finalPageData = useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
663
678
  const isShowConsent = useMemo(() => {
664
679
  var _a, _b, _c, _d;
665
680
  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) &&
@@ -846,7 +861,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
846
861
  };
847
862
  }
848
863
  const sessionID = storeAndLoadFeSessionId();
849
- const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), { playbookType: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu' ? 'organicMenu' : 'paidMedia' }), (layoutVariantId && reportLayId && { layoutVariantId }));
864
+ const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), (layoutVariantId && reportLayId && { layoutVariantId })), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' }));
850
865
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
851
866
  const realEventInfo = Object.entries(ef)
852
867
  .map(([k, v]) => v && { name: k, value: v })
@@ -860,7 +875,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
860
875
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
861
876
  type: 'beacon'
862
877
  });
863
- }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId]);
878
+ }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId, globalConfig, playbookType]);
864
879
  const bffFbReport = useCallback(({ eventName, product }) => {
865
880
  var _a, _b, _c, _d, _e;
866
881
  if (!enableReportEvent ||
@@ -1021,17 +1036,14 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1021
1036
  return;
1022
1037
  setLoading(true);
1023
1038
  let layId;
1039
+ let pbType;
1024
1040
  getRecommendVideos()
1025
1041
  .then((data) => {
1026
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1042
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1027
1043
  if (data) {
1028
1044
  const list = getFilterRecList(data);
1029
- if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu' && !channel) {
1030
- list.unshift('organic menu');
1031
- }
1032
- setRtcList(list);
1033
- setCacheRtcList(list);
1034
1045
  let curData;
1046
+ let gldata;
1035
1047
  if (data === null || data === void 0 ? void 0 : data.layoutVariantId) {
1036
1048
  const id = (_b = (_a = data === null || data === void 0 ? void 0 : data.layoutVariantId) === null || _a === void 0 ? void 0 : _a.split('-')) === null || _b === void 0 ? void 0 : _b[1];
1037
1049
  if (id) {
@@ -1041,19 +1053,49 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1041
1053
  if (curData) {
1042
1054
  setPageData(curData);
1043
1055
  document.title = (_c = curData === null || curData === void 0 ? void 0 : curData.name) !== null && _c !== void 0 ? _c : 'home';
1044
- setGlobalConfig((_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.globalConfig);
1056
+ gldata = (_e = (_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.sxpPageConf) === null || _e === void 0 ? void 0 : _e.globalConfig;
1057
+ setGlobalConfig(gldata);
1045
1058
  onUpdateSchema === null || onUpdateSchema === void 0 ? void 0 : onUpdateSchema(curData === null || curData === void 0 ? void 0 : curData.data);
1046
- if ((_k = (_j = (_h = (_g = (_f = (_e = curData === null || curData === void 0 ? void 0 : curData.data) === null || _e === void 0 ? void 0 : _e.globalConfig) === null || _f === void 0 ? void 0 : _f.consent) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.privacy_necessity)
1059
+ if ((_j = (_h = (_g = (_f = gldata === null || gldata === void 0 ? void 0 : gldata.consent) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.item) === null || _h === void 0 ? void 0 : _h.props) === null || _j === void 0 ? void 0 : _j.privacy_necessity)
1047
1060
  setShowConsent(true);
1048
1061
  }
1062
+ else {
1063
+ setShowConsent(true);
1064
+ }
1049
1065
  }
1050
1066
  }
1051
- bffGetTagList(curData !== null && curData !== void 0 ? curData : pageData);
1067
+ else {
1068
+ setShowConsent(true);
1069
+ }
1070
+ if (!channel) {
1071
+ if ((gldata === null || gldata === void 0 ? void 0 : gldata.playbook) === 'organic menu' || (!gldata && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu')) {
1072
+ setPlaybookType('organicMenu');
1073
+ list.unshift('organic menu');
1074
+ pbType = 'organicMenu';
1075
+ }
1076
+ else {
1077
+ setPlaybookType('paidMedia');
1078
+ pbType = 'paidMedia';
1079
+ }
1080
+ }
1081
+ setRtcList(list);
1082
+ setCacheRtcList(list);
1083
+ bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1084
+ if (channel) {
1085
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1086
+ eventInfo: {
1087
+ eventSubject: 'multiPostClick',
1088
+ eventDescription: 'multiPostClick',
1089
+ traceInfo: (_m = (_l = (_k = list === null || list === void 0 ? void 0 : list[0]) === null || _k === void 0 ? void 0 : _k.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : '',
1090
+ branchfeed: channel
1091
+ }
1092
+ });
1093
+ }
1052
1094
  }
1053
1095
  })
1054
1096
  .finally(() => {
1055
1097
  bffEventReport({
1056
- eventInfo: Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId }))
1098
+ eventInfo: Object.assign(Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId })), (pbType && { playbookType: pbType }))
1057
1099
  });
1058
1100
  setLoading(false);
1059
1101
  });
@@ -1063,7 +1105,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1063
1105
  if (!isPreview)
1064
1106
  return;
1065
1107
  setLoading(true);
1066
- bffGetTagList(pageData);
1108
+ bffGetTagList(data);
1067
1109
  getRecommendVideos()
1068
1110
  .then((data) => {
1069
1111
  if (data) {
@@ -1138,7 +1180,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1138
1180
  mutateUnlike: bffMutateUnlike,
1139
1181
  submitForm: bffSubmitForm,
1140
1182
  tagList,
1141
- pageData
1183
+ pageData: finalPageData
1142
1184
  }))));
1143
1185
  };
1144
1186
  var SxpDataSourceProvider$1 = memo(SxpDataSourceProvider);
@@ -9736,7 +9778,7 @@ SwiperSlide.displayName = 'SwiperSlide';
9736
9778
  * @Author: binruan@chatlabs.com
9737
9779
  * @Date: 2023-11-02 18:34:34
9738
9780
  * @LastEditors: binruan@chatlabs.com
9739
- * @LastEditTime: 2024-11-20 18:37:10
9781
+ * @LastEditTime: 2024-12-04 11:34:20
9740
9782
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
9741
9783
  *
9742
9784
  */
@@ -9920,7 +9962,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
9920
9962
  }
9921
9963
  })), child()),
9922
9964
  React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
9923
- React.createElement("img", { src: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) || closeIcon$1, alt: 'close button', className: 'modal-icon' }))))))), modalEleRef.current);
9965
+ React.createElement("img", { src: getSpliceQueryUrl((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) || closeIcon$1), alt: 'close button', className: 'modal-icon' }))))))), modalEleRef.current);
9924
9966
  };
9925
9967
  var Modal$1 = memo(Modal);
9926
9968
 
@@ -9993,19 +10035,20 @@ var ExpandableText$1 = memo(ExpandableText);
9993
10035
 
9994
10036
  const FormatImage = forwardRef((props, ref) => {
9995
10037
  const { src, onLoad, style, className, loading, alt = 'image' } = props;
9996
- const [imgSrc, setImgSrc] = useState(src);
10038
+ const querySrc = src ? getSpliceQueryUrl(src) : '';
10039
+ const [imgSrc, setImgSrc] = useState(querySrc);
9997
10040
  const imgRef = useRef(null);
9998
10041
  const [visible, setVisible] = useState(false);
9999
10042
  useImperativeHandle(ref, () => ({
10000
10043
  setSrc: (v) => {
10001
10044
  if (v)
10002
- setImgSrc(v);
10045
+ setImgSrc(getSpliceQueryUrl(v));
10003
10046
  }
10004
10047
  }));
10005
10048
  useEffect(() => {
10006
- if (src)
10007
- setImgSrc(src);
10008
- }, [src]);
10049
+ if (querySrc)
10050
+ setImgSrc(querySrc);
10051
+ }, [querySrc]);
10009
10052
  useEffect(() => {
10010
10053
  const onShow = () => {
10011
10054
  if (src && !visible && imgRef.current) {
@@ -10022,8 +10065,8 @@ const FormatImage = forwardRef((props, ref) => {
10022
10065
  !visible && !imgSrc && React.createElement("div", { style: { width: '100%', height: '100%', zIndex: 1, backgroundColor: '#fff' } }),
10023
10066
  (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
10024
10067
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
10025
- React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
10026
- React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
10068
+ React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}&imageMogr2/format/webp` }),
10069
+ React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}&imageMogr2/format/jpg` }),
10027
10070
  React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign({}, style), loading: loading, onLoad: (e) => {
10028
10071
  setVisible(true);
10029
10072
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
@@ -16258,7 +16301,7 @@ const AniLinkPopup$1 = (_a) => {
16258
16301
  paddingLeft: '6px'
16259
16302
  } }, "Cta Title")) : (React.createElement("div", Object.assign({}, props, { className: `${css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css(aniTimStyle)}`, onClick: handleTo }),
16260
16303
  React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
16261
- React.createElement("img", { src: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) || closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
16304
+ React.createElement("img", { src: getSpliceQueryUrl((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) || closeIcon), alt: 'close', className: styles['modal-icon-wrapper-img'] })),
16262
16305
  React.createElement(Img$1, { src: src, rec: recData, item: (_x = (_v = (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) !== null && _v !== void 0 ? _v : (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.bindProduct) !== null && _x !== void 0 ? _x : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
16263
16306
  (!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['one-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
16264
16307
  __html: setFontForText((_y = product === null || product === void 0 ? void 0 : product.title) !== null && _y !== void 0 ? _y : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
@@ -16569,7 +16612,7 @@ var settingRender$1 = [
16569
16612
  * @Author: binruan@chatlabs.com
16570
16613
  * @Date: 2023-12-26 10:38:53
16571
16614
  * @LastEditors: binruan@chatlabs.com
16572
- * @LastEditTime: 2024-10-29 18:04:27
16615
+ * @LastEditTime: 2024-12-03 16:43:47
16573
16616
  * @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
16574
16617
  *
16575
16618
  */
@@ -16828,7 +16871,7 @@ const MultiPosts$1 = (_a) => {
16828
16871
  const { isActive } = useSwiperSlide() || {};
16829
16872
  const initRef = useRef(false);
16830
16873
  const viewTime = useRef();
16831
- const traceinfo = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : '';
16874
+ const traceInfo = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : '';
16832
16875
  const getPropsVal = useCallback((index, str) => {
16833
16876
  try {
16834
16877
  return new Function('props', 'str', `if (str) {
@@ -16844,14 +16887,6 @@ const MultiPosts$1 = (_a) => {
16844
16887
  const value = v === null || v === void 0 ? void 0 : v.value;
16845
16888
  if (!value)
16846
16889
  return;
16847
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16848
- eventInfo: {
16849
- eventSubject: 'multiPostClick',
16850
- eventDescription: 'multiPostClick',
16851
- traceinfo,
16852
- branchfeed: (v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow' && value ? value : ''
16853
- }
16854
- });
16855
16890
  if ((v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow') {
16856
16891
  endMultiPost('multipostClick');
16857
16892
  updateChannel === null || updateChannel === void 0 ? void 0 : updateChannel(value);
@@ -16869,18 +16904,19 @@ const MultiPosts$1 = (_a) => {
16869
16904
  eventDescription: 'startMultiPost',
16870
16905
  contentFormat: 'IMAGE',
16871
16906
  position: '0',
16872
- traceinfo
16907
+ traceInfo
16873
16908
  }
16874
16909
  });
16875
16910
  }, []);
16876
16911
  const endMultiPost = useCallback((nextStep) => {
16912
+ curTime.current = new Date();
16877
16913
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16878
16914
  eventInfo: {
16879
16915
  eventSubject: 'endMultiPost',
16880
16916
  eventDescription: 'endMultiPost',
16881
16917
  contentFormat: 'IMAGE',
16882
16918
  position: '0',
16883
- traceinfo,
16919
+ traceInfo,
16884
16920
  nextStep: nextStep || 'others',
16885
16921
  timeOnSite: Math.floor((new Date() - (viewTime === null || viewTime === void 0 ? void 0 : viewTime.current)) / 1000) + ''
16886
16922
  }
@@ -16896,6 +16932,8 @@ const MultiPosts$1 = (_a) => {
16896
16932
  }
16897
16933
  }, [isActive]);
16898
16934
  useEffect(() => {
16935
+ if (!isActive)
16936
+ return;
16899
16937
  const onShow = () => startMultiPost();
16900
16938
  const onHide = () => endMultiPost();
16901
16939
  SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
@@ -16906,8 +16944,8 @@ const MultiPosts$1 = (_a) => {
16906
16944
  };
16907
16945
  }, [isActive]);
16908
16946
  return (React.createElement("div", { className: 'multiposts', style: Object.assign(Object.assign({}, style), getBgStyle(bgImgUrl)) }, Array.from({ length: 4 }, (_, index) => {
16909
- return (React.createElement("button", { className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
16910
- React.createElement("img", { className: 'multiposts-btn-img', src: getPropsVal(index, 'Url'), alt: `multiposts-img-${index + 1}` })));
16947
+ return (React.createElement("button", { hidden: !getPropsVal(index, 'Url'), className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
16948
+ React.createElement("img", { className: 'multiposts-btn-img', src: getSpliceQueryUrl(getPropsVal(index, 'Url')), alt: `multiposts-img-${index + 1}` })));
16911
16949
  })));
16912
16950
  };
16913
16951
  var MultiPosts$2 = memo(MultiPosts$1);
@@ -17094,7 +17132,7 @@ const LikeButton = (_a) => {
17094
17132
  }
17095
17133
  }), 200);
17096
17134
  return (React.createElement("button", Object.assign({}, props, { "aria-label": 'like', onClick: handleClick }),
17097
- React.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon, alt: 'icon' })));
17135
+ React.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: getSpliceQueryUrl(state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon), alt: 'icon' })));
17098
17136
  };
17099
17137
  var LikeButton$1 = memo(LikeButton);
17100
17138
 
@@ -17308,9 +17346,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
17308
17346
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
17309
17347
  if (!isActive)
17310
17348
  return;
17311
- const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
17349
+ let videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
17312
17350
  if (!videoSrc)
17313
17351
  return;
17352
+ videoSrc = getSpliceQueryUrl(videoSrc);
17314
17353
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
17315
17354
  if (!videoPlayerWrapperNode)
17316
17355
  return;
@@ -17494,7 +17533,7 @@ const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style
17494
17533
  setIsTure(defaultValue);
17495
17534
  }, [defaultValue]);
17496
17535
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
17497
- React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
17536
+ React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: getSpliceQueryUrl(isTrue ? activeIcon : unactiveIcon) })));
17498
17537
  };
17499
17538
  var ToggleButton$1 = memo(ToggleButton);
17500
17539
 
@@ -17502,7 +17541,7 @@ var ToggleButton$1 = memo(ToggleButton);
17502
17541
  * @Author: binruan@chatlabs.com
17503
17542
  * @Date: 2024-01-15 19:03:09
17504
17543
  * @LastEditors: binruan@chatlabs.com
17505
- * @LastEditTime: 2024-07-11 18:19:29
17544
+ * @LastEditTime: 2024-12-04 11:24:16
17506
17545
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
17507
17546
  *
17508
17547
  */
@@ -17519,7 +17558,7 @@ const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
17519
17558
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
17520
17559
  }, [show]);
17521
17560
  return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
17522
- React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
17561
+ React.createElement("img", { src: getSpliceQueryUrl(imageUrl || FINGER_SWIPE_ICON), alt: 'finger swiper' })));
17523
17562
  };
17524
17563
 
17525
17564
  /*
@@ -17826,7 +17865,7 @@ var RenderCard$1 = memo(RenderCard);
17826
17865
  * @Author: binruan@chatlabs.com
17827
17866
  * @Date: 2024-03-26 10:07:41
17828
17867
  * @LastEditors: binruan@chatlabs.com
17829
- * @LastEditTime: 2024-07-03 10:07:29
17868
+ * @LastEditTime: 2024-12-04 11:29:23
17830
17869
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
17831
17870
  *
17832
17871
  */
@@ -17839,7 +17878,7 @@ const Nudge = ({ nudge }) => {
17839
17878
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
17840
17879
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
17841
17880
  } },
17842
- (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,
17881
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? (React.createElement("img", { src: getSpliceQueryUrl(nudge.icon), alt: 'nudge icon', style: { height: '100%', objectFit: 'cover', flexShrink: 0 } })) : null,
17843
17882
  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, marginTop: 0 }), dangerouslySetInnerHTML: {
17844
17883
  __html: setFontForText(nudge === null || nudge === void 0 ? void 0 : nudge.content, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle)
17845
17884
  } })))));
@@ -17932,7 +17971,7 @@ const NavBack = ({ data, minusHeight, tagHeight, onClick }) => {
17932
17971
  padding: 0,
17933
17972
  background: 'transparent'
17934
17973
  }, role: 'button', "aria-label": 'back button', onClick: onClick },
17935
- React.createElement("img", { src: (data === null || data === void 0 ? void 0 : data.icon) || img, alt: 'back button', width: 100, style: { objectFit: 'cover' } })));
17974
+ React.createElement("img", { src: getSpliceQueryUrl((data === null || data === void 0 ? void 0 : data.icon) || img), alt: 'back button', width: 100, style: { objectFit: 'cover' } })));
17936
17975
  };
17937
17976
  var NavBack$1 = memo(NavBack);
17938
17977
 
@@ -17940,7 +17979,15 @@ var NavBack$1 = memo(NavBack);
17940
17979
  * @Author: binruan@chatlabs.com
17941
17980
  * @Date: 2024-03-20 10:27:31
17942
17981
  * @LastEditors: binruan@chatlabs.com
17943
- * @LastEditTime: 2024-11-27 17:08:59
17982
+ * @LastEditTime: 2024-12-04 11:30:35
17983
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
17984
+ *
17985
+ */
17986
+ /*
17987
+ * @Author: binruan@chatlabs.com
17988
+ * @Date: 2024-03-20 10:27:31
17989
+ * @LastEditors: binruan@chatlabs.com
17990
+ * @LastEditTime: 2024-12-03 15:27:20
17944
17991
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
17945
17992
  *
17946
17993
  */
@@ -18032,20 +18079,22 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18032
18079
  else if (item === null || item === void 0 ? void 0 : item.product) {
18033
18080
  fromKName = 'productPage';
18034
18081
  }
18035
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18036
- eventInfo: {
18037
- sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
18038
- eventSubject: 'sessionCompleted',
18039
- eventDescription: 'Session completed',
18040
- contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18041
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
18042
- position: activeIndex + '',
18043
- fromKName,
18044
- fromKPage: location === null || location === void 0 ? void 0 : location.href,
18045
- ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
18046
- traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
18047
- }
18048
- });
18082
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0) {
18083
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18084
+ eventInfo: {
18085
+ sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
18086
+ eventSubject: 'sessionCompleted',
18087
+ eventDescription: 'Session completed',
18088
+ contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18089
+ productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
18090
+ position: activeIndex + '',
18091
+ fromKName,
18092
+ fromKPage: location === null || location === void 0 ? void 0 : location.href,
18093
+ ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
18094
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
18095
+ }
18096
+ });
18097
+ }
18049
18098
  }
18050
18099
  else if (document.visibilityState === 'visible') {
18051
18100
  if (skipLinkRef.current === true) {
@@ -18129,7 +18178,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18129
18178
  new Function(link)();
18130
18179
  }
18131
18180
  })),
18132
- React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
18181
+ React.createElement("img", { src: getSpliceQueryUrl(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl), alt: 'logo' })));
18133
18182
  }
18134
18183
  return null;
18135
18184
  }, [globalConfig, activeIndex, visList]);
@@ -18227,9 +18276,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18227
18276
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
18228
18277
  return;
18229
18278
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
18230
- if (waterFallData && top < 40 && globalConfig.likeIconYPosit === 'top') {
18279
+ if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
18231
18280
  top += 40;
18232
18281
  }
18282
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
18283
+ top += minusHeight;
18284
+ }
18233
18285
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
18234
18286
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
18235
18287
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
@@ -18401,6 +18453,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18401
18453
  if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
18402
18454
  top += 40;
18403
18455
  }
18456
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
18457
+ top += minusHeight;
18458
+ }
18404
18459
  return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
18405
18460
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
18406
18461
  visibility: ((_c = (_b = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
@@ -18413,7 +18468,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18413
18468
  const renderView = useMemo(() => {
18414
18469
  if (loading) {
18415
18470
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
18416
- React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
18471
+ React.createElement("img", { width: 64, height: 64, src: getSpliceQueryUrl(loadingImage), alt: 'loading...', style: { objectFit: 'contain' } })));
18417
18472
  }
18418
18473
  return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
18419
18474
  return (React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden' } }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (React.createElement("div", { style: {
@@ -18423,7 +18478,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18423
18478
  justifyContent: 'center',
18424
18479
  alignItems: 'center'
18425
18480
  } },
18426
- React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
18481
+ React.createElement("img", { width: 64, height: 64, src: getSpliceQueryUrl(loadingImage), alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
18427
18482
  renderBottom(rec, index),
18428
18483
  renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
18429
18484
  renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
@@ -18460,7 +18515,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18460
18515
  eventInfo: {
18461
18516
  eventSubject: 'backMultiPostClick',
18462
18517
  eventDescription: 'backMultiPostClick',
18463
- traceinfo: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : ''
18518
+ traceInfo: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : ''
18464
18519
  }
18465
18520
  });
18466
18521
  location === null || location === void 0 ? void 0 : location.reload();