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/pb-ui.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', '
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.
|
5
|
-
})(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css,
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('react-dom')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', 'react-dom'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.ReactDOM));
|
5
|
+
})(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, ReactDOM) { 'use strict';
|
6
6
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
8
8
|
var n = Object.create(null);
|
@@ -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;
|
@@ -1175,7 +1175,7 @@
|
|
1175
1175
|
key: '4'
|
1176
1176
|
}
|
1177
1177
|
], []);
|
1178
|
-
|
1178
|
+
React.useMemo(() => {
|
1179
1179
|
if (layoutType === undefined) {
|
1180
1180
|
const list = lodash.cloneDeep(columns) || defaultColumns;
|
1181
1181
|
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 } })));
|
@@ -1218,8 +1218,7 @@
|
|
1218
1218
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1219
1219
|
React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
|
1220
1220
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
1221
|
-
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1222
|
-
React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1221
|
+
React.createElement("div", { className: 'pb-appoint-form-container' })),
|
1223
1222
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1224
1223
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
1225
1224
|
color: submitColor,
|
@@ -12790,7 +12789,7 @@ Made in Italy` })));
|
|
12790
12789
|
* @Author: binruan@chatlabs.com
|
12791
12790
|
* @Date: 2024-01-15 19:03:09
|
12792
12791
|
* @LastEditors: binruan@chatlabs.com
|
12793
|
-
* @LastEditTime: 2024-05-
|
12792
|
+
* @LastEditTime: 2024-05-20 10:04:39
|
12794
12793
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12795
12794
|
*
|
12796
12795
|
*/
|
@@ -12850,7 +12849,7 @@ Made in Italy` })));
|
|
12850
12849
|
};
|
12851
12850
|
const firstRef = React.useRef();
|
12852
12851
|
React.useEffect(() => {
|
12853
|
-
if (!firstRef.current && !videoRef) {
|
12852
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
|
12854
12853
|
firstRef.current = true;
|
12855
12854
|
const player = TCPlayer('player-container-id', {
|
12856
12855
|
licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
|
@@ -13694,7 +13693,7 @@ Made in Italy` })));
|
|
13694
13693
|
* @Author: binruan@chatlabs.com
|
13695
13694
|
* @Date: 2024-01-15 19:03:09
|
13696
13695
|
* @LastEditors: binruan@chatlabs.com
|
13697
|
-
* @LastEditTime: 2024-05-
|
13696
|
+
* @LastEditTime: 2024-05-17 18:41:05
|
13698
13697
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
13699
13698
|
*
|
13700
13699
|
*/
|
@@ -13711,14 +13710,14 @@ Made in Italy` })));
|
|
13711
13710
|
RESOLVER[v.extend.type] = v;
|
13712
13711
|
});
|
13713
13712
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
13714
|
-
var _a, _b, _c, _d, _e, _f;
|
13713
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13715
13714
|
const utmVal = React.useMemo(() => {
|
13716
13715
|
var _a;
|
13717
13716
|
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
13717
|
return searchParams;
|
13719
13718
|
}, []);
|
13720
13719
|
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 }) => {
|
13720
|
+
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
13721
|
var _a;
|
13723
13722
|
return (React.createElement(React.Fragment, null,
|
13724
13723
|
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 })),
|