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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +8 -8
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/index.js +1 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/index.js +1 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -423,7 +423,7 @@ var DataSourceType;
|
|
423
423
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
424
424
|
})(DataSourceType || (DataSourceType = {}));
|
425
425
|
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 }) => {
|
426
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
427
427
|
const [rtcList, setRtcList] = useState([]);
|
428
428
|
const [tagList, setTagList] = useState([]);
|
429
429
|
const [loading, setLoading] = useState(false);
|
@@ -577,7 +577,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
577
577
|
// 获取 Tag
|
578
578
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
579
579
|
var _h, _j, _k, _l, _m;
|
580
|
-
if (!utmVal)
|
580
|
+
if (!utmVal || !isShowTag)
|
581
581
|
return;
|
582
582
|
try {
|
583
583
|
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 +590,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
590
590
|
catch (e) {
|
591
591
|
console.log('e', e);
|
592
592
|
}
|
593
|
-
}), [bffFetch, utmVal]);
|
593
|
+
}), [bffFetch, utmVal, isShowTag]);
|
594
594
|
const ctaEvent = useCallback((eventInfo, rec, product, position) => {
|
595
595
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
596
596
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -12775,7 +12775,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
12775
12775
|
* @Author: binruan@chatlabs.com
|
12776
12776
|
* @Date: 2024-01-15 19:03:09
|
12777
12777
|
* @LastEditors: binruan@chatlabs.com
|
12778
|
-
* @LastEditTime: 2024-05-
|
12778
|
+
* @LastEditTime: 2024-05-20 10:04:39
|
12779
12779
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12780
12780
|
*
|
12781
12781
|
*/
|
@@ -12835,7 +12835,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12835
12835
|
};
|
12836
12836
|
const firstRef = useRef();
|
12837
12837
|
useEffect(() => {
|
12838
|
-
if (!firstRef.current && !videoRef) {
|
12838
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
|
12839
12839
|
firstRef.current = true;
|
12840
12840
|
const player = TCPlayer('player-container-id', {
|
12841
12841
|
licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
|
@@ -13679,7 +13679,7 @@ const Popup = () => {
|
|
13679
13679
|
* @Author: binruan@chatlabs.com
|
13680
13680
|
* @Date: 2024-01-15 19:03:09
|
13681
13681
|
* @LastEditors: binruan@chatlabs.com
|
13682
|
-
* @LastEditTime: 2024-05-
|
13682
|
+
* @LastEditTime: 2024-05-17 18:41:05
|
13683
13683
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
13684
13684
|
*
|
13685
13685
|
*/
|
@@ -13696,14 +13696,14 @@ Object.values(_materials_).forEach((v) => {
|
|
13696
13696
|
RESOLVER[v.extend.type] = v;
|
13697
13697
|
});
|
13698
13698
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
13699
|
-
var _a, _b, _c, _d, _e, _f;
|
13699
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13700
13700
|
const utmVal = useMemo(() => {
|
13701
13701
|
var _a;
|
13702
13702
|
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
13703
|
return searchParams;
|
13704
13704
|
}, []);
|
13705
13705
|
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 }) => {
|
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, 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
13707
|
var _a;
|
13708
13708
|
return (React.createElement(React.Fragment, null,
|
13709
13709
|
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 })),
|