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.cjs +10 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -12
- 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 +14 -15
- 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/es/materials/sxp/popup/AppointForm/index.js +1 -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/lib/materials/sxp/popup/AppointForm/index.js +1 -3
- package/package.json +1 -3
package/dist/index.cjs
CHANGED
@@ -9,7 +9,6 @@ var React = require('react');
|
|
9
9
|
var qs = require('qs');
|
10
10
|
var EventEmitter = require('eventemitter3');
|
11
11
|
var css = require('@emotion/css');
|
12
|
-
var proComponents = require('@ant-design/pro-components');
|
13
12
|
var ReactDOM = require('react-dom');
|
14
13
|
|
15
14
|
function _interopNamespaceDefault(e) {
|
@@ -446,7 +445,7 @@ var DataSourceType;
|
|
446
445
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
447
446
|
})(DataSourceType || (DataSourceType = {}));
|
448
447
|
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 }) => {
|
448
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
450
449
|
const [rtcList, setRtcList] = React.useState([]);
|
451
450
|
const [tagList, setTagList] = React.useState([]);
|
452
451
|
const [loading, setLoading] = React.useState(false);
|
@@ -600,7 +599,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
600
599
|
// 获取 Tag
|
601
600
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
602
601
|
var _h, _j, _k, _l, _m;
|
603
|
-
if (!utmVal)
|
602
|
+
if (!utmVal || !isShowTag)
|
604
603
|
return;
|
605
604
|
try {
|
606
605
|
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 +612,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
613
612
|
catch (e) {
|
614
613
|
console.log('e', e);
|
615
614
|
}
|
616
|
-
}), [bffFetch, utmVal]);
|
615
|
+
}), [bffFetch, utmVal, isShowTag]);
|
617
616
|
const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
|
618
617
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
619
618
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -1183,7 +1182,7 @@ const AppointForm$1 = (_a) => {
|
|
1183
1182
|
key: '4'
|
1184
1183
|
}
|
1185
1184
|
], []);
|
1186
|
-
|
1185
|
+
React.useMemo(() => {
|
1187
1186
|
if (layoutType === undefined) {
|
1188
1187
|
const list = lodash.cloneDeep(columns) || defaultColumns;
|
1189
1188
|
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 } })));
|
@@ -1226,8 +1225,7 @@ const AppointForm$1 = (_a) => {
|
|
1226
1225
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1227
1226
|
React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
|
1228
1227
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
1229
|
-
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1230
|
-
React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1228
|
+
React.createElement("div", { className: 'pb-appoint-form-container' })),
|
1231
1229
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1232
1230
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
1233
1231
|
color: submitColor,
|
@@ -12798,7 +12796,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
12798
12796
|
* @Author: binruan@chatlabs.com
|
12799
12797
|
* @Date: 2024-01-15 19:03:09
|
12800
12798
|
* @LastEditors: binruan@chatlabs.com
|
12801
|
-
* @LastEditTime: 2024-05-
|
12799
|
+
* @LastEditTime: 2024-05-20 10:04:39
|
12802
12800
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12803
12801
|
*
|
12804
12802
|
*/
|
@@ -12858,7 +12856,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12858
12856
|
};
|
12859
12857
|
const firstRef = React.useRef();
|
12860
12858
|
React.useEffect(() => {
|
12861
|
-
if (!firstRef.current && !videoRef) {
|
12859
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
|
12862
12860
|
firstRef.current = true;
|
12863
12861
|
const player = TCPlayer('player-container-id', {
|
12864
12862
|
licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
|
@@ -13702,7 +13700,7 @@ const Popup = () => {
|
|
13702
13700
|
* @Author: binruan@chatlabs.com
|
13703
13701
|
* @Date: 2024-01-15 19:03:09
|
13704
13702
|
* @LastEditors: binruan@chatlabs.com
|
13705
|
-
* @LastEditTime: 2024-05-
|
13703
|
+
* @LastEditTime: 2024-05-17 18:41:05
|
13706
13704
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
13707
13705
|
*
|
13708
13706
|
*/
|
@@ -13719,14 +13717,14 @@ Object.values(_materials_).forEach((v) => {
|
|
13719
13717
|
RESOLVER[v.extend.type] = v;
|
13720
13718
|
});
|
13721
13719
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
13722
|
-
var _a, _b, _c, _d, _e, _f;
|
13720
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13723
13721
|
const utmVal = React.useMemo(() => {
|
13724
13722
|
var _a;
|
13725
13723
|
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
13724
|
return searchParams;
|
13727
13725
|
}, []);
|
13728
13726
|
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 }) => {
|
13727
|
+
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
13728
|
var _a;
|
13731
13729
|
return (React.createElement(React.Fragment, null,
|
13732
13730
|
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 })),
|