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/pb-ui.js
CHANGED
@@ -438,7 +438,7 @@
|
|
438
438
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
439
439
|
})(DataSourceType || (DataSourceType = {}));
|
440
440
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
441
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
|
441
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
442
442
|
const [rtcList, setRtcList] = React.useState([]);
|
443
443
|
const [tagList, setTagList] = React.useState([]);
|
444
444
|
const [loading, setLoading] = React.useState(false);
|
@@ -592,7 +592,7 @@
|
|
592
592
|
// 获取 Tag
|
593
593
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
594
594
|
var _h, _j, _k, _l, _m;
|
595
|
-
if (!utmVal)
|
595
|
+
if (!utmVal || !isShowTag)
|
596
596
|
return;
|
597
597
|
try {
|
598
598
|
const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
@@ -605,7 +605,7 @@
|
|
605
605
|
catch (e) {
|
606
606
|
console.log('e', e);
|
607
607
|
}
|
608
|
-
}), [bffFetch, utmVal]);
|
608
|
+
}), [bffFetch, utmVal, isShowTag]);
|
609
609
|
const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
|
610
610
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
611
611
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -12790,7 +12790,7 @@ Made in Italy` })));
|
|
12790
12790
|
* @Author: binruan@chatlabs.com
|
12791
12791
|
* @Date: 2024-01-15 19:03:09
|
12792
12792
|
* @LastEditors: binruan@chatlabs.com
|
12793
|
-
* @LastEditTime: 2024-05-
|
12793
|
+
* @LastEditTime: 2024-05-20 10:04:39
|
12794
12794
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12795
12795
|
*
|
12796
12796
|
*/
|
@@ -12850,7 +12850,7 @@ Made in Italy` })));
|
|
12850
12850
|
};
|
12851
12851
|
const firstRef = React.useRef();
|
12852
12852
|
React.useEffect(() => {
|
12853
|
-
if (!firstRef.current && !videoRef) {
|
12853
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
|
12854
12854
|
firstRef.current = true;
|
12855
12855
|
const player = TCPlayer('player-container-id', {
|
12856
12856
|
licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
|
@@ -13694,7 +13694,7 @@ Made in Italy` })));
|
|
13694
13694
|
* @Author: binruan@chatlabs.com
|
13695
13695
|
* @Date: 2024-01-15 19:03:09
|
13696
13696
|
* @LastEditors: binruan@chatlabs.com
|
13697
|
-
* @LastEditTime: 2024-05-
|
13697
|
+
* @LastEditTime: 2024-05-17 18:41:05
|
13698
13698
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
13699
13699
|
*
|
13700
13700
|
*/
|
@@ -13711,14 +13711,14 @@ Made in Italy` })));
|
|
13711
13711
|
RESOLVER[v.extend.type] = v;
|
13712
13712
|
});
|
13713
13713
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
13714
|
-
var _a, _b, _c, _d, _e, _f;
|
13714
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13715
13715
|
const utmVal = React.useMemo(() => {
|
13716
13716
|
var _a;
|
13717
13717
|
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('?', '') : '';
|
13718
13718
|
return searchParams;
|
13719
13719
|
}, []);
|
13720
13720
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
13721
|
-
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 }) => {
|
13721
|
+
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 }) => {
|
13722
13722
|
var _a;
|
13723
13723
|
return (React.createElement(React.Fragment, null,
|
13724
13724
|
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 })),
|