pb-sxp-ui 1.0.64 → 1.0.66

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.js CHANGED
@@ -5,7 +5,6 @@ import React, { useContext, useMemo, createContext, memo, useState, useRef, useE
5
5
  import qs from 'qs';
6
6
  import EventEmitter from 'eventemitter3';
7
7
  import { css } from '@emotion/css';
8
- import { BetaSchemaForm } from '@ant-design/pro-components';
9
8
  import * as ReactDOM from 'react-dom';
10
9
 
11
10
  /******************************************************************************
@@ -423,7 +422,7 @@ var DataSourceType;
423
422
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
424
423
  })(DataSourceType || (DataSourceType = {}));
425
424
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
426
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
425
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
427
426
  const [rtcList, setRtcList] = useState([]);
428
427
  const [tagList, setTagList] = useState([]);
429
428
  const [loading, setLoading] = useState(false);
@@ -577,7 +576,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
577
576
  // 获取 Tag
578
577
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
579
578
  var _h, _j, _k, _l, _m;
580
- if (!utmVal)
579
+ if (!utmVal || !isShowTag)
581
580
  return;
582
581
  try {
583
582
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -590,7 +589,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
590
589
  catch (e) {
591
590
  console.log('e', e);
592
591
  }
593
- }), [bffFetch, utmVal]);
592
+ }), [bffFetch, utmVal, isShowTag]);
594
593
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
595
594
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
596
595
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -1160,7 +1159,7 @@ const AppointForm$1 = (_a) => {
1160
1159
  key: '4'
1161
1160
  }
1162
1161
  ], []);
1163
- const columnsData = useMemo(() => {
1162
+ useMemo(() => {
1164
1163
  if (layoutType === undefined) {
1165
1164
  const list = cloneDeep(columns) || defaultColumns;
1166
1165
  return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
@@ -1203,8 +1202,7 @@ const AppointForm$1 = (_a) => {
1203
1202
  return (React.createElement("div", { className: 'pb-appoint-form' },
1204
1203
  React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
1205
1204
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
1206
- React.createElement("div", { className: 'pb-appoint-form-container' },
1207
- React.createElement(BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
1205
+ React.createElement("div", { className: 'pb-appoint-form-container' })),
1208
1206
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
1209
1207
  React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
1210
1208
  color: submitColor,
@@ -12775,7 +12773,7 @@ var Tagbar$1 = memo(Tagbar);
12775
12773
  * @Author: binruan@chatlabs.com
12776
12774
  * @Date: 2024-01-15 19:03:09
12777
12775
  * @LastEditors: binruan@chatlabs.com
12778
- * @LastEditTime: 2024-05-09 16:23:59
12776
+ * @LastEditTime: 2024-05-20 10:04:39
12779
12777
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12780
12778
  *
12781
12779
  */
@@ -12835,7 +12833,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12835
12833
  };
12836
12834
  const firstRef = useRef();
12837
12835
  useEffect(() => {
12838
- if (!firstRef.current && !videoRef) {
12836
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
12839
12837
  firstRef.current = true;
12840
12838
  const player = TCPlayer('player-container-id', {
12841
12839
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
@@ -13679,7 +13677,7 @@ const Popup = () => {
13679
13677
  * @Author: binruan@chatlabs.com
13680
13678
  * @Date: 2024-01-15 19:03:09
13681
13679
  * @LastEditors: binruan@chatlabs.com
13682
- * @LastEditTime: 2024-05-06 17:26:37
13680
+ * @LastEditTime: 2024-05-17 18:41:05
13683
13681
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13684
13682
  *
13685
13683
  */
@@ -13696,14 +13694,14 @@ Object.values(_materials_).forEach((v) => {
13696
13694
  RESOLVER[v.extend.type] = v;
13697
13695
  });
13698
13696
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13699
- var _a, _b, _c, _d, _e, _f;
13697
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13700
13698
  const utmVal = useMemo(() => {
13701
13699
  var _a;
13702
13700
  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('?', '') : '';
13703
13701
  return searchParams;
13704
13702
  }, []);
13705
13703
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13706
- 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 }) => {
13704
+ 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 }) => {
13707
13705
  var _a;
13708
13706
  return (React.createElement(React.Fragment, null,
13709
13707
  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 })),