pb-sxp-ui 1.9.8 → 1.10.0

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 (66) hide show
  1. package/dist/index.cjs +520 -162
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +35 -0
  4. package/dist/index.js +520 -162
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +7 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +7 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +520 -162
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +7 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/Pagebuilder/index.js +3 -4
  15. package/es/core/components/SxpPageCore/index.d.ts +1 -1
  16. package/es/core/components/SxpPageCore/index.js +7 -6
  17. package/es/core/components/SxpPageRender/NavBack.d.ts +9 -0
  18. package/es/core/components/SxpPageRender/NavBack.js +16 -0
  19. package/es/core/components/SxpPageRender/PictureGroup/index.js +3 -1
  20. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  21. package/es/core/components/SxpPageRender/index.js +30 -22
  22. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  23. package/es/core/context/EditorContext.d.ts +2 -0
  24. package/es/core/context/EditorContext.js +9 -3
  25. package/es/core/context/EditorDataProvider.d.ts +2 -0
  26. package/es/core/context/EditorDataProvider.js +4 -1
  27. package/es/core/context/SxpDataSourceProvider.d.ts +4 -2
  28. package/es/core/context/SxpDataSourceProvider.js +83 -52
  29. package/es/core/utils/materials.d.ts +1 -1
  30. package/es/materials/sxp/MultiPosts/index.d.ts +26 -0
  31. package/es/materials/sxp/MultiPosts/index.js +98 -0
  32. package/es/materials/sxp/MultiPosts/interactionRender.d.ts +9 -0
  33. package/es/materials/sxp/MultiPosts/interactionRender.js +42 -0
  34. package/es/materials/sxp/MultiPosts/material.d.ts +2 -0
  35. package/es/materials/sxp/MultiPosts/material.js +22 -0
  36. package/es/materials/sxp/MultiPosts/settingRender.d.ts +73 -0
  37. package/es/materials/sxp/MultiPosts/settingRender.js +115 -0
  38. package/es/materials/sxp/index.d.ts +1 -0
  39. package/es/materials/sxp/index.js +1 -0
  40. package/lib/core/Pagebuilder/index.js +3 -4
  41. package/lib/core/components/SxpPageCore/index.d.ts +1 -1
  42. package/lib/core/components/SxpPageCore/index.js +6 -5
  43. package/lib/core/components/SxpPageRender/NavBack.d.ts +9 -0
  44. package/lib/core/components/SxpPageRender/NavBack.js +19 -0
  45. package/lib/core/components/SxpPageRender/PictureGroup/index.js +3 -1
  46. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  47. package/lib/core/components/SxpPageRender/index.js +30 -22
  48. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  49. package/lib/core/context/EditorContext.d.ts +2 -0
  50. package/lib/core/context/EditorContext.js +9 -3
  51. package/lib/core/context/EditorDataProvider.d.ts +2 -0
  52. package/lib/core/context/EditorDataProvider.js +4 -1
  53. package/lib/core/context/SxpDataSourceProvider.d.ts +4 -2
  54. package/lib/core/context/SxpDataSourceProvider.js +83 -52
  55. package/lib/core/utils/materials.d.ts +1 -1
  56. package/lib/materials/sxp/MultiPosts/index.d.ts +26 -0
  57. package/lib/materials/sxp/MultiPosts/index.js +100 -0
  58. package/lib/materials/sxp/MultiPosts/interactionRender.d.ts +9 -0
  59. package/lib/materials/sxp/MultiPosts/interactionRender.js +44 -0
  60. package/lib/materials/sxp/MultiPosts/material.d.ts +2 -0
  61. package/lib/materials/sxp/MultiPosts/material.js +26 -0
  62. package/lib/materials/sxp/MultiPosts/settingRender.d.ts +73 -0
  63. package/lib/materials/sxp/MultiPosts/settingRender.js +117 -0
  64. package/lib/materials/sxp/index.d.ts +1 -0
  65. package/lib/materials/sxp/index.js +1 -0
  66. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -429,7 +429,7 @@
429
429
  const tenantId = builder.getTenantId();
430
430
  const appId = builder.getAppId();
431
431
  const apiUrl = builder.getApiUrl();
432
- return fetch(`${apiUrl}/storefront/v1/page?id=` + id, {
432
+ return fetch(`${apiUrl}/storefront/v1/page/build?id=` + id, {
433
433
  method: 'get',
434
434
  headers: {
435
435
  'x-tenant-id': tenantId || '',
@@ -441,9 +441,8 @@
441
441
  if (!result.success) {
442
442
  return undefined;
443
443
  }
444
- const decodeData = unzip((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data);
445
- result.data.data = decodeData;
446
- return result.data;
444
+ const dataList = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { data: unzip(item === null || item === void 0 ? void 0 : item.data) })));
445
+ return dataList;
447
446
  }));
448
447
  }),
449
448
  getSxpRecommendVideoData: (dataId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -647,8 +646,9 @@
647
646
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
648
647
  })(DataSourceType || (DataSourceType = {}));
649
648
  const DEFAULT_TAG = 'FOR U';
650
- 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, utmParameter, channelQueryList }) => {
651
- var _a, _b, _c;
649
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, onUpdateSchema }) => {
650
+ var _a, _b, _c, _d, _e;
651
+ const { channel } = useEditor();
652
652
  const [rtcList, setRtcList] = React.useState([]);
653
653
  const [tagList, setTagList] = React.useState([]);
654
654
  const [loading, setLoading] = React.useState(false);
@@ -670,10 +670,15 @@
670
670
  const checkCommodityIndexRef = React.useRef(-1);
671
671
  const popupCurTimeRef = React.useRef(null);
672
672
  const [isNoMoreData, setIsNoMoreData] = React.useState(false);
673
+ const [globalConfig, setGlobalConfig] = React.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);
674
+ const [pageData, setPageData] = React.useState(data);
675
+ const [showConsent, setShowConsent] = React.useState(false);
676
+ const [layoutVariantId, setLayoutVariantId] = React.useState();
673
677
  const isShowConsent = React.useMemo(() => {
674
678
  var _a, _b, _c, _d;
675
- 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;
676
- }, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
679
+ 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) &&
680
+ showConsent);
681
+ }, [isAgreePolicy, globalConfig, isOpenConsent, isEditor, showConsent]);
677
682
  const getFilterRecList = React.useCallback((data) => {
678
683
  var _a;
679
684
  const recList = data === null || data === void 0 ? void 0 : data.recList;
@@ -735,10 +740,10 @@
735
740
  }, [bffDataSource]);
736
741
  // 获取推荐视频数据
737
742
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
738
- var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
743
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
739
744
  query = {
740
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
741
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
745
+ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize,
746
+ defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize,
742
747
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
743
748
  traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
744
749
  themeTag: query === null || query === void 0 ? void 0 : query.themeTag,
@@ -746,13 +751,17 @@
746
751
  contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter,
747
752
  productFilter: query === null || query === void 0 ? void 0 : query.productFilter
748
753
  };
749
- if (utmVal) {
750
- const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
754
+ if (channel) {
755
+ query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
756
+ }
757
+ else if (utmVal) {
758
+ const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
751
759
  var _a, _b;
752
760
  const key = val.split('=')[0];
753
761
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
754
- })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
755
- query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
762
+ })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
763
+ if (val)
764
+ query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
756
765
  }
757
766
  if (isEditor) {
758
767
  let pageNum = 1;
@@ -764,17 +773,17 @@
764
773
  let list = [];
765
774
  let result = null;
766
775
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
767
- var _t, _u, _v, _w, _x, _y;
776
+ var _v, _w, _x, _y, _z, _0;
768
777
  query.pageNum = pageNum;
769
778
  result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'POST', body: query }));
770
779
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
771
780
  return undefined;
772
781
  }
773
782
  setLoading(false);
774
- list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
783
+ list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
775
784
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
776
785
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
777
- const isNotNullList = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
786
+ const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
778
787
  if (isNotNullList) {
779
788
  pageNum = pageNum + 1;
780
789
  yield recurveRecList(query);
@@ -782,11 +791,11 @@
782
791
  });
783
792
  yield recurveRecList(query);
784
793
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
785
- setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
794
+ setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
786
795
  return Object.assign(Object.assign({}, result.data), { recList: list });
787
796
  }
788
797
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
789
- query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
798
+ query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
790
799
  }
791
800
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'POST', body: query }));
792
801
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
@@ -796,27 +805,27 @@
796
805
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
797
806
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
798
807
  let list = [];
799
- list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
800
- const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
808
+ list = list.concat((_s = (_r = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.filter) === null || _r === void 0 ? void 0 : _r.call(_q, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _s !== void 0 ? _s : []);
809
+ const isNotNullList = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
801
810
  if (!isNotNullList) {
802
811
  setIsNoMoreData(true);
803
812
  }
804
813
  return Object.assign(Object.assign({}, result.data), { recList: list });
805
814
  }
806
815
  return result === null || result === void 0 ? void 0 : result.data;
807
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
816
+ }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel]);
808
817
  const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
809
- var _z, _0, _1, _2;
818
+ var _1, _2, _3, _4;
810
819
  if (rtcList.length <= 0) {
811
820
  return;
812
821
  }
813
822
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
814
- const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: [(_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId] })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
823
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
815
824
  setRtcList(rtcList.concat(getFilterRecList(data)));
816
825
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
817
826
  return data;
818
827
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
819
- const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
828
+ const bffEventReport = React.useCallback(({ userInfo, eventInfo, reportLayId = true }) => {
820
829
  // 关闭 BFF 事件上报
821
830
  if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
822
831
  return;
@@ -829,7 +838,7 @@
829
838
  };
830
839
  }
831
840
  const sessionID = storeAndLoadFeSessionId();
832
- const ef = 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() }));
841
+ 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 }));
833
842
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
834
843
  const realEventInfo = Object.entries(ef)
835
844
  .map(([k, v]) => v && { name: k, value: v })
@@ -843,7 +852,7 @@
843
852
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
844
853
  type: 'beacon'
845
854
  });
846
- }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
855
+ }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId]);
847
856
  const bffFbReport = React.useCallback(({ eventName, product }) => {
848
857
  var _a, _b, _c, _d, _e;
849
858
  if (!enableReportEvent ||
@@ -928,23 +937,24 @@
928
937
  return res === null || res === void 0 ? void 0 : res.success;
929
938
  }), [bffFetch]);
930
939
  // 获取 Tag
931
- const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
932
- var _3, _4, _5, _6, _7;
940
+ const bffGetTagList = React.useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
941
+ var _5, _6, _7, _8, _9, _10, _11, _12;
942
+ const isShowTag = !!((_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.data) === null || _5 === void 0 ? void 0 : _5.sxpPageConf) === null || _6 === void 0 ? void 0 : _6.globalConfig) === null || _7 === void 0 ? void 0 : _7.isShowTag);
933
943
  if (!utmVal || !isShowTag)
934
944
  return;
935
945
  try {
936
- const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
946
+ const val = (_10 = (_9 = (_8 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
937
947
  var _a, _b;
938
948
  const key = val.split('=')[0];
939
949
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
940
- })) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
950
+ })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
941
951
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
942
- setTagList((_7 = (_6 = result === null || result === void 0 ? void 0 : result.data) === null || _6 === void 0 ? void 0 : _6.tags) !== null && _7 !== void 0 ? _7 : []);
952
+ setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
943
953
  }
944
954
  catch (e) {
945
955
  console.log('e', e);
946
956
  }
947
- }), [bffFetch, utmVal, isShowTag]);
957
+ }), [bffFetch, utmVal]);
948
958
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
949
959
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
950
960
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -990,7 +1000,8 @@
990
1000
  requestId: null,
991
1001
  enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
992
1002
  clSource: getVal('cl_source')
993
- }
1003
+ },
1004
+ reportLayId: false
994
1005
  });
995
1006
  }, [bffEventReport]);
996
1007
  React.useEffect(() => {
@@ -1001,46 +1012,65 @@
1001
1012
  if (isShowConsent)
1002
1013
  return;
1003
1014
  setLoading(true);
1004
- bffGetTagList();
1015
+ let layId;
1005
1016
  getRecommendVideos()
1006
1017
  .then((data) => {
1018
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1007
1019
  if (data) {
1008
- setRtcList(getFilterRecList(data));
1009
- setCacheRtcList(getFilterRecList(data));
1020
+ const list = getFilterRecList(data);
1021
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu' && !channel) {
1022
+ list.unshift('organic menu');
1023
+ }
1024
+ setRtcList(list);
1025
+ setCacheRtcList(list);
1026
+ let curData;
1027
+ if (data === null || data === void 0 ? void 0 : data.layoutVariantId) {
1028
+ 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];
1029
+ if (id) {
1030
+ layId = id;
1031
+ setLayoutVariantId(id);
1032
+ curData = dataList === null || dataList === void 0 ? void 0 : dataList.find((item) => (item === null || item === void 0 ? void 0 : item.id) === id);
1033
+ if (curData) {
1034
+ setPageData(curData);
1035
+ document.title = (_c = curData === null || curData === void 0 ? void 0 : curData.name) !== null && _c !== void 0 ? _c : 'home';
1036
+ setGlobalConfig((_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.globalConfig);
1037
+ onUpdateSchema === null || onUpdateSchema === void 0 ? void 0 : onUpdateSchema(curData === null || curData === void 0 ? void 0 : curData.data);
1038
+ 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)
1039
+ setShowConsent(true);
1040
+ }
1041
+ }
1042
+ }
1043
+ bffGetTagList(curData !== null && curData !== void 0 ? curData : pageData);
1010
1044
  }
1011
1045
  })
1012
1046
  .finally(() => {
1013
1047
  bffEventReport({
1014
- eventInfo: {
1015
- eventSubject: 'apiRequest',
1016
- eventDescription: 'api request succeed'
1017
- }
1048
+ eventInfo: Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId }))
1018
1049
  });
1019
1050
  setLoading(false);
1020
1051
  });
1021
- }, [isShowConsent]);
1052
+ }, [isShowConsent, channel]);
1053
+ // cms预览
1022
1054
  React.useEffect(() => {
1023
1055
  if (!isPreview)
1024
1056
  return;
1025
1057
  setLoading(true);
1026
- bffGetTagList();
1058
+ bffGetTagList(pageData);
1027
1059
  getRecommendVideos()
1028
1060
  .then((data) => {
1029
1061
  if (data) {
1030
- setRtcList(getFilterRecList(data));
1031
- setCacheRtcList(getFilterRecList(data));
1062
+ const list = getFilterRecList(data);
1063
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu' && !channel) {
1064
+ list.unshift('organic menu');
1065
+ }
1066
+ setRtcList(list);
1067
+ setCacheRtcList(list);
1032
1068
  }
1033
1069
  })
1034
1070
  .finally(() => {
1035
- bffEventReport({
1036
- eventInfo: {
1037
- eventSubject: 'apiRequest',
1038
- eventDescription: 'api request succeed'
1039
- }
1040
- });
1041
1071
  setLoading(false);
1042
1072
  });
1043
- }, [getRecommendVideos, bffGetTagList]);
1073
+ }, [getRecommendVideos, bffGetTagList, channel]);
1044
1074
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
1045
1075
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
1046
1076
  rtcList,
@@ -1053,7 +1083,6 @@
1053
1083
  setPopupDetailData,
1054
1084
  getRecommendVideos,
1055
1085
  bffEventReport,
1056
- utmVal,
1057
1086
  isPreview,
1058
1087
  loading,
1059
1088
  sxpParameter,
@@ -1091,12 +1120,13 @@
1091
1120
  checkCommodityIndexRef,
1092
1121
  isEditor,
1093
1122
  isNoMoreData
1094
- } }, isShowConsent ? (React.createElement(Consent$4, 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({
1123
+ } }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
1095
1124
  rtcList,
1096
1125
  mutateLike: bffMutateLike,
1097
1126
  mutateUnlike: bffMutateUnlike,
1098
1127
  submitForm: bffSubmitForm,
1099
- tagList
1128
+ tagList,
1129
+ pageData
1100
1130
  }))));
1101
1131
  };
1102
1132
  var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
@@ -1219,6 +1249,7 @@
1219
1249
  });
1220
1250
  const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
1221
1251
  const [currentNode, setCurrentNode] = React.useState(null);
1252
+ const [channel, setChannel] = React.useState();
1222
1253
  const [_schema, setSchema] = React.useState(schema || {
1223
1254
  pointData: [item],
1224
1255
  dataSource: [],
@@ -1239,6 +1270,9 @@
1239
1270
  const [undoStack, setUndoStack] = React.useState([[item]]);
1240
1271
  const [redoStack, setRedoStack] = React.useState([]);
1241
1272
  const [popup, setPopup] = React.useState(popupInit);
1273
+ const channelParams = React.useMemo(() => {
1274
+ return channel || utmVal;
1275
+ }, [channel, utmVal]);
1242
1276
  typeof window !== 'undefined' &&
1243
1277
  (window.sxpPopup = (type, aniType) => {
1244
1278
  setPopup(Object.assign(Object.assign(Object.assign({}, popupInit), { id: type }), aniType));
@@ -1247,10 +1281,10 @@
1247
1281
  (window.getJointUtmLink = (url) => {
1248
1282
  setSlideSkipState();
1249
1283
  if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
1250
- return url + (utmVal ? '&' + utmVal : '');
1284
+ return url + (channelParams ? '&' + channelParams : '');
1251
1285
  }
1252
1286
  else {
1253
- return url + (utmVal ? '?' + utmVal : '');
1287
+ return url + (channelParams ? '?' + channelParams : '');
1254
1288
  }
1255
1289
  });
1256
1290
  // 切换页面类型,清空操作栈
@@ -1318,7 +1352,9 @@
1318
1352
  setUndoStack,
1319
1353
  getCurPageConf,
1320
1354
  popup,
1321
- setPopup
1355
+ setPopup,
1356
+ channel,
1357
+ setChannel
1322
1358
  } },
1323
1359
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
1324
1360
  });
@@ -1328,7 +1364,7 @@
1328
1364
  EditorCore: EditorCore
1329
1365
  });
1330
1366
 
1331
- var interactionRender$f = [
1367
+ var interactionRender$g = [
1332
1368
  {
1333
1369
  title: '点击事件',
1334
1370
  child: [
@@ -1348,7 +1384,7 @@
1348
1384
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1349
1385
  *
1350
1386
  */
1351
- var settingRender$c = [
1387
+ var settingRender$d = [
1352
1388
  {
1353
1389
  title: '弹窗背景',
1354
1390
  child: [
@@ -1777,9 +1813,9 @@
1777
1813
  category: 'popup',
1778
1814
  type: 'AppointForm',
1779
1815
  related: {
1780
- settingRender: settingRender$c,
1816
+ settingRender: settingRender$d,
1781
1817
  bindableProps: [],
1782
- interactionRender: interactionRender$f
1818
+ interactionRender: interactionRender$g
1783
1819
  },
1784
1820
  defaulSetting: {
1785
1821
  name: '表单',
@@ -1802,7 +1838,7 @@
1802
1838
  sort: 2
1803
1839
  });
1804
1840
 
1805
- var settingRender$b = [
1841
+ var settingRender$c = [
1806
1842
  {
1807
1843
  title: '弹窗背景',
1808
1844
  child: [
@@ -10069,6 +10105,15 @@
10069
10105
  return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
10070
10106
  }
10071
10107
  };
10108
+ const getBgStyle = (imgSrc) => {
10109
+ return imgSrc
10110
+ ? {
10111
+ backgroundImage: `url(${imgSrc})`,
10112
+ backgroundRepeat: 'no-repeat',
10113
+ backgroundSize: 'cover'
10114
+ }
10115
+ : '';
10116
+ };
10072
10117
  const getPriceText = ({ product, enableFormattedPrice, globalConfig, isHiddenDef, style }) => {
10073
10118
  var _a, _b, _c, _d, _e, _f, _g, _h;
10074
10119
  if ((!(product === null || product === void 0 ? void 0 : product.currency) || !(product === null || product === void 0 ? void 0 : product.price)) && isHiddenDef)
@@ -10363,7 +10408,7 @@
10363
10408
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10364
10409
  *
10365
10410
  */
10366
- var interactionRender$e = [
10411
+ var interactionRender$f = [
10367
10412
  {
10368
10413
  title: '滑动事件',
10369
10414
  child: [
@@ -10390,8 +10435,8 @@
10390
10435
  category: 'popup',
10391
10436
  type: 'CommodityDetail',
10392
10437
  related: {
10393
- settingRender: settingRender$b,
10394
- interactionRender: interactionRender$e
10438
+ settingRender: settingRender$c,
10439
+ interactionRender: interactionRender$f
10395
10440
  },
10396
10441
  defaulSetting: {
10397
10442
  props: {
@@ -10446,7 +10491,7 @@
10446
10491
  sort: 1
10447
10492
  });
10448
10493
 
10449
- var interactionRender$d = [
10494
+ var interactionRender$e = [
10450
10495
  {
10451
10496
  title: '点击事件',
10452
10497
  child: [
@@ -10466,7 +10511,7 @@
10466
10511
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
10467
10512
  *
10468
10513
  */
10469
- var settingRender$a = [
10514
+ var settingRender$b = [
10470
10515
  {
10471
10516
  title: '弹窗背景',
10472
10517
  child: [
@@ -10646,9 +10691,9 @@
10646
10691
  category: 'popup',
10647
10692
  type: 'Prompt',
10648
10693
  related: {
10649
- settingRender: settingRender$a,
10694
+ settingRender: settingRender$b,
10650
10695
  bindableProps: [],
10651
- interactionRender: interactionRender$d
10696
+ interactionRender: interactionRender$e
10652
10697
  },
10653
10698
  defaulSetting: {
10654
10699
  props: {
@@ -10671,7 +10716,7 @@
10671
10716
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
10672
10717
  *
10673
10718
  */
10674
- var settingRender$9 = [
10719
+ var settingRender$a = [
10675
10720
  {
10676
10721
  title: '弹窗背景',
10677
10722
  child: [
@@ -11323,7 +11368,7 @@ Made in Italy` })));
11323
11368
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
11324
11369
  *
11325
11370
  */
11326
- var interactionRender$c = [
11371
+ var interactionRender$d = [
11327
11372
  {
11328
11373
  title: '滑动事件',
11329
11374
  child: [
@@ -11350,8 +11395,8 @@ Made in Italy` })));
11350
11395
  category: 'popup',
11351
11396
  type: 'CommodityDetailDiroNew',
11352
11397
  related: {
11353
- settingRender: settingRender$9,
11354
- interactionRender: interactionRender$c
11398
+ settingRender: settingRender$a,
11399
+ interactionRender: interactionRender$d
11355
11400
  },
11356
11401
  defaulSetting: {
11357
11402
  props: {
@@ -11414,7 +11459,7 @@ Made in Italy` })));
11414
11459
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
11415
11460
  *
11416
11461
  */
11417
- var settingRender$8 = [
11462
+ var settingRender$9 = [
11418
11463
  {
11419
11464
  title: '弹窗背景',
11420
11465
  child: [
@@ -11824,7 +11869,7 @@ Made in Italy` })));
11824
11869
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
11825
11870
  *
11826
11871
  */
11827
- var interactionRender$b = [
11872
+ var interactionRender$c = [
11828
11873
  {
11829
11874
  title: '点击事件',
11830
11875
  child: [
@@ -11851,8 +11896,8 @@ Made in Italy` })));
11851
11896
  category: 'popup',
11852
11897
  type: 'CommodityList',
11853
11898
  related: {
11854
- settingRender: settingRender$8,
11855
- interactionRender: interactionRender$b
11899
+ settingRender: settingRender$9,
11900
+ interactionRender: interactionRender$c
11856
11901
  },
11857
11902
  defaulSetting: {
11858
11903
  props: {
@@ -11900,7 +11945,7 @@ Made in Italy` })));
11900
11945
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Iframe\settingRender.tsx
11901
11946
  *
11902
11947
  */
11903
- var settingRender$7 = [
11948
+ var settingRender$8 = [
11904
11949
  {
11905
11950
  title: '背景样式',
11906
11951
  child: [
@@ -11934,7 +11979,7 @@ Made in Italy` })));
11934
11979
  category: 'popup',
11935
11980
  type: 'Iframe',
11936
11981
  related: {
11937
- settingRender: settingRender$7,
11982
+ settingRender: settingRender$8,
11938
11983
  bindableProps: []
11939
11984
  },
11940
11985
  defaulSetting: {
@@ -11954,7 +11999,7 @@ Made in Italy` })));
11954
11999
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\ConsentDetail\settingRender.tsx
11955
12000
  *
11956
12001
  */
11957
- var settingRender$6 = [
12002
+ var settingRender$7 = [
11958
12003
  {
11959
12004
  title: '弹窗文本',
11960
12005
  child: [
@@ -11982,7 +12027,7 @@ Made in Italy` })));
11982
12027
  category: 'popup',
11983
12028
  type: 'ConsentDetail',
11984
12029
  related: {
11985
- settingRender: settingRender$6,
12030
+ settingRender: settingRender$7,
11986
12031
  bindableProps: []
11987
12032
  },
11988
12033
  defaulSetting: {
@@ -12002,7 +12047,7 @@ Made in Italy` })));
12002
12047
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
12003
12048
  *
12004
12049
  */
12005
- var settingRender$5 = [
12050
+ var settingRender$6 = [
12006
12051
  {
12007
12052
  title: '主题样式',
12008
12053
  child: [
@@ -12259,7 +12304,7 @@ Made in Italy` })));
12259
12304
  }
12260
12305
  ];
12261
12306
 
12262
- var interactionRender$a = [
12307
+ var interactionRender$b = [
12263
12308
  {
12264
12309
  title: '点击事件',
12265
12310
  child: [
@@ -12354,9 +12399,9 @@ Made in Italy` })));
12354
12399
  category: 'template',
12355
12400
  type: 'Commodity',
12356
12401
  related: {
12357
- interactionRender: interactionRender$a,
12402
+ interactionRender: interactionRender$b,
12358
12403
  bindableProps: [],
12359
- settingRender: settingRender$5
12404
+ settingRender: settingRender$6
12360
12405
  },
12361
12406
  defaulSetting: {
12362
12407
  props: {
@@ -12396,7 +12441,7 @@ Made in Italy` })));
12396
12441
  sort: 1
12397
12442
  });
12398
12443
 
12399
- var interactionRender$9 = [
12444
+ var interactionRender$a = [
12400
12445
  {
12401
12446
  title: '点击事件',
12402
12447
  child: [
@@ -12437,8 +12482,8 @@ Made in Italy` })));
12437
12482
  category: 'template',
12438
12483
  type: 'Appoint',
12439
12484
  related: {
12440
- interactionRender: interactionRender$9,
12441
- settingRender: settingRender$5 === null || settingRender$5 === void 0 ? void 0 : settingRender$5.filter((i) => i.type !== 'commodityTitle'),
12485
+ interactionRender: interactionRender$a,
12486
+ settingRender: settingRender$6 === null || settingRender$6 === void 0 ? void 0 : settingRender$6.filter((i) => i.type !== 'commodityTitle'),
12442
12487
  bindableProps: []
12443
12488
  },
12444
12489
  defaulSetting: {
@@ -12625,7 +12670,7 @@ Made in Italy` })));
12625
12670
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
12626
12671
  *
12627
12672
  */
12628
- var interactionRender$8 = [
12673
+ var interactionRender$9 = [
12629
12674
  {
12630
12675
  title: '点击事件',
12631
12676
  child: [
@@ -12645,9 +12690,9 @@ Made in Italy` })));
12645
12690
  category: 'template',
12646
12691
  type: 'Link',
12647
12692
  related: {
12648
- settingRender: (_a = settingRender$5 === null || settingRender$5 === void 0 ? void 0 : settingRender$5.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
12693
+ settingRender: (_a = settingRender$6 === null || settingRender$6 === void 0 ? void 0 : settingRender$6.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
12649
12694
  bindableProps: [],
12650
- interactionRender: interactionRender$8
12695
+ interactionRender: interactionRender$9
12651
12696
  },
12652
12697
  defaulSetting: {
12653
12698
  props: {
@@ -12693,7 +12738,7 @@ Made in Italy` })));
12693
12738
  sort: 5
12694
12739
  });
12695
12740
 
12696
- var interactionRender$7 = [
12741
+ var interactionRender$8 = [
12697
12742
  {
12698
12743
  title: '点击事件',
12699
12744
  child: [
@@ -12747,8 +12792,8 @@ Made in Italy` })));
12747
12792
  category: 'template',
12748
12793
  type: 'CommodityDiro',
12749
12794
  related: {
12750
- interactionRender: interactionRender$7,
12751
- settingRender: settingRender$5,
12795
+ interactionRender: interactionRender$8,
12796
+ settingRender: settingRender$6,
12752
12797
  bindableProps: []
12753
12798
  },
12754
12799
  defaulSetting: {
@@ -12789,7 +12834,7 @@ Made in Italy` })));
12789
12834
  sort: 2
12790
12835
  });
12791
12836
 
12792
- var interactionRender$6 = [
12837
+ var interactionRender$7 = [
12793
12838
  {
12794
12839
  title: '点击事件',
12795
12840
  child: [
@@ -12843,9 +12888,9 @@ Made in Italy` })));
12843
12888
  category: 'template',
12844
12889
  type: 'CommodityDiroNew',
12845
12890
  related: {
12846
- interactionRender: interactionRender$6,
12891
+ interactionRender: interactionRender$7,
12847
12892
  bindableProps: [],
12848
- settingRender: settingRender$5
12893
+ settingRender: settingRender$6
12849
12894
  },
12850
12895
  defaulSetting: {
12851
12896
  props: {
@@ -12886,7 +12931,7 @@ Made in Italy` })));
12886
12931
  sort: 2
12887
12932
  });
12888
12933
 
12889
- var interactionRender$5 = [
12934
+ var interactionRender$6 = [
12890
12935
  {
12891
12936
  title: '点击事件',
12892
12937
  child: [
@@ -12943,9 +12988,9 @@ Made in Italy` })));
12943
12988
  category: 'template',
12944
12989
  type: 'MultiCommodityDiro',
12945
12990
  related: {
12946
- interactionRender: interactionRender$5,
12991
+ interactionRender: interactionRender$6,
12947
12992
  bindableProps: [],
12948
- settingRender: settingRender$5
12993
+ settingRender: settingRender$6
12949
12994
  },
12950
12995
  defaulSetting: {
12951
12996
  props: {
@@ -12985,7 +13030,7 @@ Made in Italy` })));
12985
13030
  sort: 4
12986
13031
  });
12987
13032
 
12988
- var interactionRender$4 = [
13033
+ var interactionRender$5 = [
12989
13034
  {
12990
13035
  title: '点击事件',
12991
13036
  child: [
@@ -13042,8 +13087,8 @@ Made in Italy` })));
13042
13087
  category: 'template',
13043
13088
  type: 'MultiCommodity',
13044
13089
  related: {
13045
- interactionRender: interactionRender$4,
13046
- settingRender: settingRender$5,
13090
+ interactionRender: interactionRender$5,
13091
+ settingRender: settingRender$6,
13047
13092
  bindableProps: []
13048
13093
  },
13049
13094
  defaulSetting: {
@@ -13092,7 +13137,7 @@ Made in Italy` })));
13092
13137
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
13093
13138
  *
13094
13139
  */
13095
- var interactionRender$3 = [
13140
+ var interactionRender$4 = [
13096
13141
  {
13097
13142
  title: '点击事件',
13098
13143
  child: [
@@ -13150,9 +13195,9 @@ Made in Italy` })));
13150
13195
  category: 'template',
13151
13196
  type: 'MultiCommodityDiroNew',
13152
13197
  related: {
13153
- interactionRender: interactionRender$3,
13198
+ interactionRender: interactionRender$4,
13154
13199
  bindableProps: [],
13155
- settingRender: settingRender$5
13200
+ settingRender: settingRender$6
13156
13201
  },
13157
13202
  defaulSetting: {
13158
13203
  props: {
@@ -13201,7 +13246,7 @@ Made in Italy` })));
13201
13246
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
13202
13247
  *
13203
13248
  */
13204
- var settingRender$4 = [
13249
+ var settingRender$5 = [
13205
13250
  {
13206
13251
  title: 'Banner',
13207
13252
  child: [
@@ -15436,7 +15481,7 @@ Made in Italy` })));
15436
15481
  category: 'base',
15437
15482
  type: 'HashTag',
15438
15483
  related: {
15439
- settingRender: settingRender$4,
15484
+ settingRender: settingRender$5,
15440
15485
  bindableProps: []
15441
15486
  },
15442
15487
  defaulSetting: {
@@ -15501,7 +15546,7 @@ Made in Italy` })));
15501
15546
  * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
15502
15547
  *
15503
15548
  */
15504
- var settingRender$3 = [
15549
+ var settingRender$4 = [
15505
15550
  {
15506
15551
  title: '协议详情',
15507
15552
  child: [
@@ -15560,7 +15605,7 @@ Made in Italy` })));
15560
15605
  category: 'base',
15561
15606
  type: 'Consent',
15562
15607
  related: {
15563
- settingRender: settingRender$3
15608
+ settingRender: settingRender$4
15564
15609
  },
15565
15610
  defaulSetting: {
15566
15611
  props: {},
@@ -15579,7 +15624,7 @@ Made in Italy` })));
15579
15624
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
15580
15625
  *
15581
15626
  */
15582
- var settingRender$2 = [
15627
+ var settingRender$3 = [
15583
15628
  {
15584
15629
  title: '主题样式',
15585
15630
  child: [
@@ -15775,7 +15820,7 @@ Made in Italy` })));
15775
15820
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
15776
15821
  *
15777
15822
  */
15778
- var interactionRender$2 = [
15823
+ var interactionRender$3 = [
15779
15824
  {
15780
15825
  title: '点击事件',
15781
15826
  child: [
@@ -15840,9 +15885,9 @@ Made in Italy` })));
15840
15885
  category: 'cta',
15841
15886
  type: 'AniLink',
15842
15887
  related: {
15843
- settingRender: settingRender$2,
15888
+ settingRender: settingRender$3,
15844
15889
  bindableProps: [],
15845
- interactionRender: interactionRender$2
15890
+ interactionRender: interactionRender$3
15846
15891
  },
15847
15892
  defaulSetting: {
15848
15893
  props: {
@@ -15884,7 +15929,7 @@ Made in Italy` })));
15884
15929
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\settingRender.tsx
15885
15930
  *
15886
15931
  */
15887
- var settingRender$1 = [
15932
+ var settingRender$2 = [
15888
15933
  {
15889
15934
  title: '主题样式',
15890
15935
  child: [
@@ -16220,7 +16265,7 @@ Made in Italy` })));
16220
16265
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
16221
16266
  *
16222
16267
  */
16223
- var interactionRender$1 = [
16268
+ var interactionRender$2 = [
16224
16269
  {
16225
16270
  title: '点击事件',
16226
16271
  child: [
@@ -16288,9 +16333,9 @@ Made in Italy` })));
16288
16333
  category: 'cta',
16289
16334
  type: 'AniLinkPopup',
16290
16335
  related: {
16291
- settingRender: settingRender$1,
16336
+ settingRender: settingRender$2,
16292
16337
  bindableProps: [],
16293
- interactionRender: interactionRender$1
16338
+ interactionRender: interactionRender$2
16294
16339
  },
16295
16340
  defaulSetting: {
16296
16341
  props: {
@@ -16346,7 +16391,7 @@ Made in Italy` })));
16346
16391
  * @FilePath: \pb-sxp-ui\src\materials\sxp\consentPopup\Display\interactionRender.tsx
16347
16392
  *
16348
16393
  */
16349
- var interactionRender = [
16394
+ var interactionRender$1 = [
16350
16395
  {
16351
16396
  title: '点击详情按钮',
16352
16397
  child: [
@@ -16367,7 +16412,7 @@ Made in Italy` })));
16367
16412
  * @FilePath: \pb-sxp-ui\src\materials\sxp\consentPopup\Display\settingRender.tsx
16368
16413
  *
16369
16414
  */
16370
- var settingRender = [
16415
+ var settingRender$1 = [
16371
16416
  {
16372
16417
  title: '全局设置',
16373
16418
  child: [
@@ -16522,6 +16567,7 @@ Made in Italy` })));
16522
16567
  const [openHashtag, setOpenHashtag] = React.useState(false);
16523
16568
  const [openConsent, setOpenConsent] = React.useState(false);
16524
16569
  const [consentPopupCate, setConsentPopupCate] = React.useState('');
16570
+ const [openMultiPosts, setOpenMultiPosts] = React.useState(false);
16525
16571
  return (React.createElement(EditorDataContext.Provider, { value: {
16526
16572
  sxpPrameter: {
16527
16573
  bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
@@ -16546,7 +16592,9 @@ Made in Italy` })));
16546
16592
  sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
16547
16593
  utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter,
16548
16594
  consentPopupCate,
16549
- setConsentPopupCate
16595
+ setConsentPopupCate,
16596
+ openMultiPosts,
16597
+ setOpenMultiPosts
16550
16598
  } }, children));
16551
16599
  };
16552
16600
  function useEditorDataProvider() {
@@ -16606,9 +16654,9 @@ Made in Italy` })));
16606
16654
  category: 'consentPopup',
16607
16655
  type: 'Display',
16608
16656
  related: {
16609
- settingRender,
16657
+ settingRender: settingRender$1,
16610
16658
  bindableProps: [],
16611
- interactionRender
16659
+ interactionRender: interactionRender$1
16612
16660
  },
16613
16661
  defaulSetting: {
16614
16662
  props: {
@@ -16637,6 +16685,299 @@ Made in Italy` })));
16637
16685
  sort: 1
16638
16686
  });
16639
16687
 
16688
+ /*
16689
+ * @Author: binruan@chatlabs.com
16690
+ * @Date: 2024-06-13 10:08:32
16691
+ * @LastEditors: binruan@chatlabs.com
16692
+ * @LastEditTime: 2024-11-26 11:42:08
16693
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\MultiPosts\settingRender.tsx
16694
+ *
16695
+ */
16696
+ var settingRender = [
16697
+ {
16698
+ title: '背景设置',
16699
+ child: [
16700
+ {
16701
+ label: '背景图',
16702
+ type: 'Upload',
16703
+ name: ['props', 'bgImgUrl']
16704
+ },
16705
+ {
16706
+ type: 'Group',
16707
+ label: '返回按钮',
16708
+ child: [
16709
+ {
16710
+ type: 'Switch',
16711
+ name: ['props', 'backButton', 'enable']
16712
+ },
16713
+ {
16714
+ type: 'Upload',
16715
+ name: ['props', 'backButton', 'icon'],
16716
+ text: '建议尺寸:100 * 76'
16717
+ }
16718
+ ]
16719
+ },
16720
+ {
16721
+ type: 'Group',
16722
+ label: '',
16723
+ child: [
16724
+ {
16725
+ type: 'Select',
16726
+ name: ['props', 'backButton', 'xPosit'],
16727
+ options: [
16728
+ {
16729
+ label: '相对左侧',
16730
+ value: 'left'
16731
+ },
16732
+ {
16733
+ label: '相对右侧',
16734
+ value: 'right'
16735
+ }
16736
+ ],
16737
+ initialValue: 'left'
16738
+ },
16739
+ {
16740
+ type: 'Number',
16741
+ name: ['props', 'backButton', 'x'],
16742
+ addonAfter: 'X'
16743
+ }
16744
+ ]
16745
+ },
16746
+ {
16747
+ type: 'Group',
16748
+ label: '',
16749
+ child: [
16750
+ {
16751
+ type: 'Select',
16752
+ name: ['props', 'backButton', 'yPosit'],
16753
+ options: [
16754
+ {
16755
+ label: '相对底部',
16756
+ value: 'bottom'
16757
+ },
16758
+ {
16759
+ label: '相对顶部',
16760
+ value: 'top'
16761
+ }
16762
+ ],
16763
+ initialValue: 'top'
16764
+ },
16765
+ {
16766
+ type: 'Number',
16767
+ name: ['props', 'backButton', 'y'],
16768
+ addonAfter: 'Y',
16769
+ initialValue: 0
16770
+ }
16771
+ ]
16772
+ }
16773
+ ]
16774
+ },
16775
+ {
16776
+ title: '按钮设置',
16777
+ child: [
16778
+ {
16779
+ type: 'Group',
16780
+ child: [
16781
+ {
16782
+ type: 'Upload',
16783
+ name: ['props', 'button1Url'],
16784
+ text: '按钮1'
16785
+ },
16786
+ {
16787
+ type: 'Upload',
16788
+ name: ['props', 'button2Url'],
16789
+ text: '按钮2'
16790
+ }
16791
+ ]
16792
+ },
16793
+ {
16794
+ type: 'Group',
16795
+ child: [
16796
+ {
16797
+ type: 'Upload',
16798
+ name: ['props', 'button3Url'],
16799
+ text: '按钮3'
16800
+ },
16801
+ {
16802
+ type: 'Upload',
16803
+ name: ['props', 'button4Url'],
16804
+ text: '按钮4'
16805
+ }
16806
+ ]
16807
+ }
16808
+ ]
16809
+ }
16810
+ ];
16811
+
16812
+ const MultiPosts$1 = (_a) => {
16813
+ var _b, _c;
16814
+ var { bgImgUrl, style, recData } = _a, props = __rest(_a, ["bgImgUrl", "style", "recData"]);
16815
+ const { setChannel } = useEditor();
16816
+ const { bffEventReport, curTime } = useSxpDataSource();
16817
+ const { isActive } = useSwiperSlide();
16818
+ const initRef = React.useRef(false);
16819
+ const viewTime = React.useRef();
16820
+ 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 : '';
16821
+ const getPropsVal = React.useCallback((index, str) => {
16822
+ try {
16823
+ return new Function('props', 'str', `if (str) {
16824
+ return props?.button${index + 1}${str}
16825
+ } else {
16826
+ return props?.button${index + 1}
16827
+ }`)(props, str);
16828
+ }
16829
+ catch (_a) { }
16830
+ }, [props]);
16831
+ const handleClick = React.useCallback((index) => {
16832
+ const v = getPropsVal(index);
16833
+ const value = v === null || v === void 0 ? void 0 : v.value;
16834
+ if (!value)
16835
+ return;
16836
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16837
+ eventInfo: {
16838
+ eventSubject: 'multiPostClick',
16839
+ eventDescription: 'multiPostClick',
16840
+ traceinfo,
16841
+ branchfeed: (v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow' && value ? value : ''
16842
+ }
16843
+ });
16844
+ if ((v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow') {
16845
+ endMultiPost('multipostClick');
16846
+ setChannel === null || setChannel === void 0 ? void 0 : setChannel(value);
16847
+ curTime.current = new Date();
16848
+ }
16849
+ else {
16850
+ new Function(value)();
16851
+ }
16852
+ }, [props]);
16853
+ const startMultiPost = React.useCallback(() => {
16854
+ viewTime.current = new Date();
16855
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16856
+ eventInfo: {
16857
+ eventSubject: 'startMultiPost',
16858
+ eventDescription: 'startMultiPost',
16859
+ contentFormat: 'IMAGE',
16860
+ position: '0',
16861
+ traceinfo
16862
+ }
16863
+ });
16864
+ }, []);
16865
+ const endMultiPost = React.useCallback((nextStep) => {
16866
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16867
+ eventInfo: {
16868
+ eventSubject: 'endMultiPost',
16869
+ eventDescription: 'endMultiPost',
16870
+ contentFormat: 'IMAGE',
16871
+ position: '0',
16872
+ traceinfo,
16873
+ nextStep: nextStep || 'others',
16874
+ timeOnSite: Math.floor((new Date() - (viewTime === null || viewTime === void 0 ? void 0 : viewTime.current)) / 1000) + ''
16875
+ }
16876
+ });
16877
+ }, []);
16878
+ React.useEffect(() => {
16879
+ if (isActive) {
16880
+ startMultiPost();
16881
+ initRef.current = true;
16882
+ }
16883
+ else if (initRef.current) {
16884
+ endMultiPost();
16885
+ }
16886
+ }, [isActive]);
16887
+ React.useEffect(() => {
16888
+ const onShow = () => startMultiPost();
16889
+ const onHide = () => endMultiPost();
16890
+ SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
16891
+ SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_HIDE, onHide);
16892
+ return () => {
16893
+ SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
16894
+ SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_HIDE, onHide);
16895
+ };
16896
+ }, [isActive]);
16897
+ return (React.createElement("div", { className: 'multiposts', style: Object.assign(Object.assign({}, style), getBgStyle(bgImgUrl)) }, Array.from({ length: 4 }, (_, index) => {
16898
+ return (React.createElement("button", { className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
16899
+ React.createElement("img", { className: 'multiposts-btn-img', src: getPropsVal(index, 'Url'), alt: `multiposts-img-${index + 1}` })));
16900
+ })));
16901
+ };
16902
+ var MultiPosts$2 = React.memo(MultiPosts$1);
16903
+
16904
+ /*
16905
+ * @Author: binruan@chatlabs.com
16906
+ * @Date: 2024-11-22 13:58:29
16907
+ * @LastEditors: binruan@chatlabs.com
16908
+ * @LastEditTime: 2024-11-22 17:21:09
16909
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\MultiPosts\interactionRender.tsx
16910
+ *
16911
+ */
16912
+ var interactionRender = [
16913
+ {
16914
+ title: '按钮1点击事件',
16915
+ child: [
16916
+ {
16917
+ type: 'link',
16918
+ name: 'button1',
16919
+ isMultiPosts: true
16920
+ }
16921
+ ]
16922
+ },
16923
+ {
16924
+ title: '按钮2点击事件',
16925
+ child: [
16926
+ {
16927
+ type: 'link',
16928
+ name: 'button2',
16929
+ isMultiPosts: true
16930
+ }
16931
+ ]
16932
+ },
16933
+ {
16934
+ title: '按钮3点击事件',
16935
+ child: [
16936
+ {
16937
+ type: 'link',
16938
+ name: 'button3',
16939
+ isMultiPosts: true
16940
+ }
16941
+ ]
16942
+ },
16943
+ {
16944
+ title: '按钮4点击事件',
16945
+ child: [
16946
+ {
16947
+ type: 'link',
16948
+ name: 'button4',
16949
+ isMultiPosts: true
16950
+ }
16951
+ ]
16952
+ }
16953
+ ];
16954
+
16955
+ /*
16956
+ * @Author: binruan@chatlabs.com
16957
+ * @Date: 2023-07-28 18:29:57
16958
+ * @LastEditors: binruan@chatlabs.com
16959
+ * @LastEditTime: 2024-11-22 13:58:46
16960
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\MultiPosts\material.tsx
16961
+ *
16962
+ */
16963
+ const MultiPosts = createMaterial(MultiPosts$2, {
16964
+ displayName: 'MultiPosts',
16965
+ icon: '',
16966
+ category: 'base',
16967
+ type: 'MultiPosts',
16968
+ related: {
16969
+ settingRender,
16970
+ interactionRender
16971
+ },
16972
+ defaulSetting: {
16973
+ props: {},
16974
+ style: {}
16975
+ },
16976
+ w: 100,
16977
+ h: 40,
16978
+ sort: 1
16979
+ });
16980
+
16640
16981
  /*
16641
16982
  * @Author: binruan@chatlabs.com
16642
16983
  * @Date: 2023-07-25 14:56:49
@@ -16667,6 +17008,7 @@ Made in Italy` })));
16667
17008
  MultiCommodity: MultiCommodity,
16668
17009
  MultiCommodityDiro: MultiCommodityDiro,
16669
17010
  MultiCommodityDiroNew: MultiCommodityDiroNew,
17011
+ MultiPosts: MultiPosts,
16670
17012
  Prompt: Prompt
16671
17013
  });
16672
17014
 
@@ -17251,6 +17593,8 @@ Made in Italy` })));
17251
17593
  // return <img src={sxpParameter?.placeholder_image} style={{ width, height, objectFit: 'cover' }} />;
17252
17594
  // }
17253
17595
  React.useEffect(() => {
17596
+ if (!isActive)
17597
+ return;
17254
17598
  const onShow = () => onViewImageStartEvent(index, imgInfo);
17255
17599
  const onHide = () => onViewImageEndEvent(rec);
17256
17600
  SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
@@ -17259,7 +17603,7 @@ Made in Italy` })));
17259
17603
  SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
17260
17604
  SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_HIDE, onHide);
17261
17605
  };
17262
- }, [imgInfo]);
17606
+ }, [isActive, imgInfo]);
17263
17607
  const handleMouseEnter = React.useCallback(() => {
17264
17608
  if (swiperRef.current && swiperRef.current.swiper && isAlly) {
17265
17609
  swiperRef.current.swiper.autoplay.stop();
@@ -17566,27 +17910,35 @@ Made in Italy` })));
17566
17910
  };
17567
17911
  var ConsentPopup = React.memo(Consent);
17568
17912
 
17913
+ const NavBack = ({ data, minusHeight, tagHeight, onClick }) => {
17914
+ var _a, _b, _c, _d, _e;
17915
+ return (React.createElement("button", { style: {
17916
+ position: 'absolute',
17917
+ [(_a = data === null || data === void 0 ? void 0 : data.xPosit) !== null && _a !== void 0 ? _a : 'left']: (_c = (_b = data === null || data === void 0 ? void 0 : data.backButton) === null || _b === void 0 ? void 0 : _b.x) !== null && _c !== void 0 ? _c : 0,
17918
+ [(_d = data === null || data === void 0 ? void 0 : data.yPosit) !== null && _d !== void 0 ? _d : 'top']: ((data === null || data === void 0 ? void 0 : data.yPosit) == 'top' ? minusHeight + tagHeight : 0) + ((_e = data === null || data === void 0 ? void 0 : data.y) !== null && _e !== void 0 ? _e : 0),
17919
+ zIndex: 8,
17920
+ border: 'none',
17921
+ padding: 0,
17922
+ background: 'transparent'
17923
+ }, role: 'button', "aria-label": 'back button', onClick: onClick },
17924
+ React.createElement("img", { src: (data === null || data === void 0 ? void 0 : data.icon) || img, alt: 'back button', width: 100, style: { objectFit: 'cover' } })));
17925
+ };
17926
+ var NavBack$1 = React.memo(NavBack);
17927
+
17569
17928
  /*
17570
17929
  * @Author: binruan@chatlabs.com
17571
17930
  * @Date: 2024-03-20 10:27:31
17572
17931
  * @LastEditors: binruan@chatlabs.com
17573
- * @LastEditTime: 2024-11-21 11:01:19
17574
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
17575
- *
17576
- */
17577
- /*
17578
- * @Author: binruan@chatlabs.com
17579
- * @Date: 2024-01-15 19:03:09
17580
- * @LastEditors: binruan@chatlabs.com
17581
- * @LastEditTime: 2024-11-04 14:55:23
17932
+ * @LastEditTime: 2024-11-27 11:52:24
17582
17933
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
17583
17934
  *
17584
17935
  */
17585
17936
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, hashTagRightMargin, tagList = [], licenseUrl }) => {
17586
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
17937
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
17587
17938
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
17588
17939
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
17589
- const { schema } = useEditor();
17940
+ const { schema, channel } = useEditor();
17941
+ const { openMultiPosts } = useEditorDataProvider();
17590
17942
  const [activeIndex, setActiveIndex] = React.useState(0);
17591
17943
  const viewImageStartTime = React.useRef(0);
17592
17944
  const [isMuted, setIsMuted] = React.useState(true);
@@ -17771,15 +18123,18 @@ Made in Italy` })));
17771
18123
  return null;
17772
18124
  }, [globalConfig, activeIndex, visList]);
17773
18125
  const renderContent = React.useCallback((rec, index) => {
17774
- var _a, _b, _c, _d;
17775
- if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
18126
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18127
+ if (rec === 'organic menu') {
18128
+ return (React.createElement(MultiPosts$2, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
18129
+ }
18130
+ if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
17776
18131
  return (React.createElement(VideoWidget$3, { key: isReload, rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
17777
18132
  }
17778
- if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
18133
+ if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
17779
18134
  return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
17780
18135
  }
17781
- if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
17782
- return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
18136
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
18137
+ return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
17783
18138
  var _a, _b, _c, _d, _e, _f, _g, _h;
17784
18139
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
17785
18140
  const Component = withBindDataSource(t);
@@ -18087,18 +18442,19 @@ Made in Italy` })));
18087
18442
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
18088
18443
  top: minusHeight
18089
18444
  } }),
18090
- ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
18091
- position: 'absolute',
18092
- [(_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _g === void 0 ? void 0 : _g.xPosit) !== null && _h !== void 0 ? _h : 'left']: (_k = (_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _j === void 0 ? void 0 : _j.x) !== null && _k !== void 0 ? _k : 0,
18093
- [(_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _l === void 0 ? void 0 : _l.yPosit) !== null && _m !== void 0 ? _m : 'top']: (((_o = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _o === void 0 ? void 0 : _o.yPosit) == 'top' ? minusHeight + tagHeight : 0) +
18094
- ((_q = (_p = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _p === void 0 ? void 0 : _p.y) !== null && _q !== void 0 ? _q : 0),
18095
- zIndex: 8,
18096
- border: 'none',
18097
- padding: 0,
18098
- background: 'transparent'
18099
- }, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
18100
- React.createElement("img", { src: ((_r = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _r === void 0 ? void 0 : _r.icon) || img, alt: 'back button', width: 100, style: { objectFit: 'cover' } }))),
18101
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _s !== void 0 ? _s : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
18445
+ ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && (React.createElement(NavBack$1, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
18446
+ ((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === 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.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel && (React.createElement(NavBack$1, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
18447
+ var _a, _b, _c;
18448
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18449
+ eventInfo: {
18450
+ eventSubject: 'backMultiPostClick',
18451
+ eventDescription: 'backMultiPostClick',
18452
+ 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 : ''
18453
+ }
18454
+ });
18455
+ location === null || location === void 0 ? void 0 : location.reload();
18456
+ } })),
18457
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_r = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _r !== void 0 ? _r : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
18102
18458
  React.createElement(Swiper, { style: {
18103
18459
  marginTop: tagHeight
18104
18460
  }, ref: swiperRef, onSlideChange: () => {
@@ -18130,8 +18486,9 @@ Made in Italy` })));
18130
18486
  renderView,
18131
18487
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
18132
18488
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
18133
- React.createElement(WaterFall$1, Object.assign({}, (_v = (_u = (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.item) === null || _v === void 0 ? void 0 : _v.props)),
18134
- React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig })));
18489
+ React.createElement(WaterFall$1, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
18490
+ React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
18491
+ openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } })))));
18135
18492
  };
18136
18493
 
18137
18494
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
@@ -18596,7 +18953,7 @@ Made in Italy` })));
18596
18953
  * @Author: binruan@chatlabs.com
18597
18954
  * @Date: 2024-01-15 19:03:09
18598
18955
  * @LastEditors: binruan@chatlabs.com
18599
- * @LastEditTime: 2024-07-24 16:35:44
18956
+ * @LastEditTime: 2024-09-30 14:37:13
18600
18957
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
18601
18958
  *
18602
18959
  */
@@ -18612,18 +18969,19 @@ Made in Italy` })));
18612
18969
  Object.values(_materials_).forEach((v) => {
18613
18970
  RESOLVER[v.extend.type] = v;
18614
18971
  });
18615
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
18616
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18972
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
18973
+ var _a, _b, _c, _d, _e, _f;
18617
18974
  const utmVal = React.useMemo(() => {
18618
18975
  var _a;
18619
18976
  const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
18620
18977
  return searchParams;
18621
18978
  }, []);
18622
- return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
18623
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, render: ({ rtcList, tagList }) => {
18979
+ const [_schema, setSchema] = React.useState(data === null || data === void 0 ? void 0 : data.data);
18980
+ return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: _schema, utmVal: utmVal },
18981
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), render: ({ rtcList, tagList, pageData }) => {
18624
18982
  var _a;
18625
18983
  return (React.createElement(React.Fragment, null,
18626
- React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
18984
+ React.createElement(SxpPageRender, Object.assign({}, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
18627
18985
  React.createElement(Popup, null)));
18628
18986
  } })));
18629
18987
  };