pb-sxp-ui 1.0.64 → 1.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -446,7 +446,7 @@ var DataSourceType;
446
446
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
447
447
  })(DataSourceType || (DataSourceType = {}));
448
448
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
449
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
449
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
450
450
  const [rtcList, setRtcList] = React.useState([]);
451
451
  const [tagList, setTagList] = React.useState([]);
452
452
  const [loading, setLoading] = React.useState(false);
@@ -600,7 +600,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
600
600
  // 获取 Tag
601
601
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
602
602
  var _h, _j, _k, _l, _m;
603
- if (!utmVal)
603
+ if (!utmVal || !isShowTag)
604
604
  return;
605
605
  try {
606
606
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -613,7 +613,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
613
613
  catch (e) {
614
614
  console.log('e', e);
615
615
  }
616
- }), [bffFetch, utmVal]);
616
+ }), [bffFetch, utmVal, isShowTag]);
617
617
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
618
618
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
619
619
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -12798,7 +12798,7 @@ var Tagbar$1 = React.memo(Tagbar);
12798
12798
  * @Author: binruan@chatlabs.com
12799
12799
  * @Date: 2024-01-15 19:03:09
12800
12800
  * @LastEditors: binruan@chatlabs.com
12801
- * @LastEditTime: 2024-05-09 16:23:59
12801
+ * @LastEditTime: 2024-05-20 10:04:39
12802
12802
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12803
12803
  *
12804
12804
  */
@@ -12858,7 +12858,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12858
12858
  };
12859
12859
  const firstRef = React.useRef();
12860
12860
  React.useEffect(() => {
12861
- if (!firstRef.current && !videoRef) {
12861
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
12862
12862
  firstRef.current = true;
12863
12863
  const player = TCPlayer('player-container-id', {
12864
12864
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
@@ -13702,7 +13702,7 @@ const Popup = () => {
13702
13702
  * @Author: binruan@chatlabs.com
13703
13703
  * @Date: 2024-01-15 19:03:09
13704
13704
  * @LastEditors: binruan@chatlabs.com
13705
- * @LastEditTime: 2024-05-06 17:26:37
13705
+ * @LastEditTime: 2024-05-17 18:41:05
13706
13706
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13707
13707
  *
13708
13708
  */
@@ -13719,14 +13719,14 @@ Object.values(_materials_).forEach((v) => {
13719
13719
  RESOLVER[v.extend.type] = v;
13720
13720
  });
13721
13721
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13722
- var _a, _b, _c, _d, _e, _f;
13722
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13723
13723
  const utmVal = React.useMemo(() => {
13724
13724
  var _a;
13725
13725
  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('?', '') : '';
13726
13726
  return searchParams;
13727
13727
  }, []);
13728
13728
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13729
- 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, render: ({ rtcList, tagList }) => {
13729
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
13730
13730
  var _a;
13731
13731
  return (React.createElement(React.Fragment, null,
13732
13732
  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 })),