pb-sxp-ui 1.15.15-alpha.1 → 1.15.16-alpha.1
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 +135 -824
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +134 -822
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +135 -824
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageCore/index.d.ts +0 -1
- package/es/core/components/SxpPageCore/index.js +7 -7
- package/es/core/components/SxpPageRender/ExpandableText.js +2 -10
- package/es/core/components/SxpPageRender/RenderCard.js +4 -4
- package/es/core/context/EditorContext.js +1 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -1
- package/es/core/context/SxpDataSourceProvider.js +47 -28
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -2
- package/es/materials/sxp/template/components/EventProvider.js +2 -2
- package/lib/core/components/SxpPageCore/index.d.ts +0 -1
- package/lib/core/components/SxpPageCore/index.js +7 -7
- package/lib/core/components/SxpPageRender/ExpandableText.js +2 -10
- package/lib/core/components/SxpPageRender/RenderCard.js +4 -4
- package/lib/core/context/EditorContext.js +1 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -1
- package/lib/core/context/SxpDataSourceProvider.js +47 -28
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -3
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -2
- package/lib/materials/sxp/template/components/EventProvider.js +2 -2
- package/package.json +1 -1
- package/es/core/components/DiyStoryPreview/PictureGroup.d.ts +0 -16
- package/es/core/components/DiyStoryPreview/PictureGroup.js +0 -34
- package/es/core/components/DiyStoryPreview/VideoWidget.d.ts +0 -27
- package/es/core/components/DiyStoryPreview/VideoWidget.js +0 -239
- package/es/core/components/DiyStoryPreview/index.d.ts +0 -51
- package/es/core/components/DiyStoryPreview/index.js +0 -411
- package/lib/core/components/DiyStoryPreview/PictureGroup.d.ts +0 -16
- package/lib/core/components/DiyStoryPreview/PictureGroup.js +0 -37
- package/lib/core/components/DiyStoryPreview/VideoWidget.d.ts +0 -27
- package/lib/core/components/DiyStoryPreview/VideoWidget.js +0 -242
- package/lib/core/components/DiyStoryPreview/index.d.ts +0 -51
- package/lib/core/components/DiyStoryPreview/index.js +0 -414
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { memo, useMemo, useState } from 'react';
|
2
|
+
import SxpPageRender from '../SxpPageRender';
|
2
3
|
import Popup from '../SxpPageRender/Popup';
|
3
|
-
import DiyStoryPreview from '../DiyStoryPreview';
|
4
4
|
import * as _materials_ from '../../../materials';
|
5
5
|
import { EditorCore } from '../../../core';
|
6
6
|
import SxpDataSourceProvider from '../../../core/context/SxpDataSourceProvider';
|
@@ -8,20 +8,20 @@ const RESOLVER = {};
|
|
8
8
|
Object.values(_materials_).forEach((v) => {
|
9
9
|
RESOLVER[v.extend.type] = v;
|
10
10
|
});
|
11
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList
|
12
|
-
var _a, _b, _c, _d, _e, _f
|
11
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
12
|
+
var _a, _b, _c, _d, _e, _f;
|
13
13
|
const utmVal = useMemo(() => {
|
14
14
|
var _a;
|
15
15
|
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('?', '') : '';
|
16
16
|
return searchParams;
|
17
17
|
}, []);
|
18
|
-
const [_schema, setSchema] = useState(
|
18
|
+
const [_schema, setSchema] = useState(data === null || data === void 0 ? void 0 : data.data);
|
19
19
|
const [channel, setChannel] = useState();
|
20
20
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: _schema, utmVal: channel || utmVal },
|
21
|
-
React.createElement(SxpDataSourceProvider, { 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: (
|
22
|
-
var _a
|
21
|
+
React.createElement(SxpDataSourceProvider, { 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, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
22
|
+
var _a;
|
23
23
|
return (React.createElement(React.Fragment, null,
|
24
|
-
React.createElement(
|
24
|
+
React.createElement(SxpPageRender, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
25
25
|
React.createElement(Popup, null)));
|
26
26
|
} })));
|
27
27
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import React, { memo, useMemo, useState, useCallback, useRef, useEffect } from 'react';
|
2
1
|
import { setFontForText } from '../../../core/utils/tool';
|
2
|
+
import React, { memo, useMemo, useState, useCallback, useRef, useEffect } from 'react';
|
3
3
|
const limitTextLastWholeWord = (originalText = '', limit) => {
|
4
4
|
const chineseRegex = /[\u4e00-\u9fa5]+/;
|
5
5
|
if (chineseRegex.test(originalText)) {
|
@@ -50,15 +50,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
50
50
|
wordBreak: 'break-word'
|
51
51
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
52
52
|
React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
53
|
-
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
54
|
-
textDecoration: 'underline',
|
55
|
-
cursor: 'pointer',
|
56
|
-
outline: 'none',
|
57
|
-
border: 'none',
|
58
|
-
boxSizing: 'content-box',
|
59
|
-
padding: 0,
|
60
|
-
background: 'transparent'
|
61
|
-
}, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
53
|
+
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
62
54
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
|
63
55
|
} }))));
|
64
56
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { memo, useMemo } from 'react';
|
2
2
|
import './index.less';
|
3
|
-
import { cloneDeep } from 'lodash';
|
4
3
|
import withBindDataSource from '../../../core/hoc/withBindDataSource';
|
5
4
|
import { useEditor } from '../../../core/hooks';
|
5
|
+
import { cloneDeep } from 'lodash';
|
6
6
|
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value }) => {
|
7
7
|
const { schema } = useEditor();
|
8
8
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
@@ -26,10 +26,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
26
26
|
const Component = withBindDataSource(t);
|
27
27
|
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
28
28
|
const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
|
29
|
-
|
29
|
+
let style = cloneDeep((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
|
30
30
|
if (style.hasOwnProperty('backdropFilter')) {
|
31
|
-
|
32
|
-
style
|
31
|
+
let sbf = style['backdropFilter'];
|
32
|
+
style['backdropFilter'] = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
33
33
|
}
|
34
34
|
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
35
35
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useState, useMemo } from 'react';
|
2
2
|
import { cloneDeep } from 'lodash';
|
3
|
-
import { setSlideSkipState } from '../utils/localStore';
|
4
3
|
import DataSourceProvider from './DataSourceProvider';
|
5
4
|
import { uuid } from '../../core/utils/tool';
|
5
|
+
import { setSlideSkipState } from '../utils/localStore';
|
6
6
|
const item = {
|
7
7
|
id: uuid(6, 10),
|
8
8
|
item: {
|
@@ -131,7 +131,7 @@ export interface SxpDataSourceProviderProps {
|
|
131
131
|
isEditor?: boolean;
|
132
132
|
utmParameter?: PageData['utm_parameter'];
|
133
133
|
channelQueryList?: any[];
|
134
|
-
data?:
|
134
|
+
data?: PageData;
|
135
135
|
dataList?: PageData[];
|
136
136
|
onUpdateSchema?: (d: PageData['data']) => void;
|
137
137
|
onUpdateChannel?: (d: string) => void;
|
@@ -114,8 +114,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
114
114
|
}
|
115
115
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
116
116
|
return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
|
117
|
-
JSON.stringify(
|
118
|
-
|
117
|
+
JSON.stringify({
|
118
|
+
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
119
|
+
})
|
120
|
+
], {
|
121
|
+
type: 'application/json;charset=UTF-8'
|
122
|
+
}));
|
119
123
|
}
|
120
124
|
return window
|
121
125
|
.fetch(`${url}/api/${path}`, {
|
@@ -144,16 +148,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
144
148
|
.catch((err) => Promise.reject(err));
|
145
149
|
}, [bffDataSource]);
|
146
150
|
const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
147
|
-
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
148
|
-
query = Object.assign({ maxSize:
|
151
|
+
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
152
|
+
query = Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId }));
|
149
153
|
if (channel) {
|
150
154
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
|
151
155
|
}
|
152
156
|
else if (utmVal) {
|
153
|
-
const val = (
|
157
|
+
const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
158
|
+
var _a, _b;
|
154
159
|
const key = val.split('=')[0];
|
155
|
-
return key;
|
156
|
-
})) === null ||
|
160
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
161
|
+
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
157
162
|
if (val)
|
158
163
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
159
164
|
}
|
@@ -167,19 +172,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
167
172
|
let list = [];
|
168
173
|
let result = null;
|
169
174
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
170
|
-
var
|
175
|
+
var _v, _w, _x, _y, _z, _0;
|
171
176
|
query.pageNum = pageNum;
|
172
177
|
result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
|
173
178
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
174
179
|
return undefined;
|
175
180
|
}
|
176
181
|
setLoading(false);
|
177
|
-
list = list.concat((
|
182
|
+
list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
|
178
183
|
if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
|
179
184
|
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
180
185
|
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
181
186
|
}
|
182
|
-
const isNotNullList = (
|
187
|
+
const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
183
188
|
if (isNotNullList) {
|
184
189
|
pageNum = pageNum + 1;
|
185
190
|
yield recurveRecList(query);
|
@@ -187,13 +192,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
187
192
|
});
|
188
193
|
yield recurveRecList(query);
|
189
194
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
190
|
-
setCurReqInfo({ rtc: (
|
195
|
+
setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
|
191
196
|
return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
|
192
197
|
}
|
193
198
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
194
|
-
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (
|
199
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
195
200
|
}
|
196
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('
|
201
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
|
197
202
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
198
203
|
return undefined;
|
199
204
|
}
|
@@ -201,8 +206,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
201
206
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
202
207
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
203
208
|
let list = [];
|
204
|
-
list = list.concat((
|
205
|
-
const isNotNullList = (
|
209
|
+
list = list.concat((_s = (_r = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.filter) === null || _r === void 0 ? void 0 : _r.call(_q, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _s !== void 0 ? _s : []);
|
210
|
+
const isNotNullList = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
206
211
|
if (!isNotNullList) {
|
207
212
|
setIsNoMoreData(true);
|
208
213
|
}
|
@@ -211,12 +216,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
211
216
|
return result === null || result === void 0 ? void 0 : result.data;
|
212
217
|
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
|
213
218
|
const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
214
|
-
var
|
219
|
+
var _1, _2, _3, _4;
|
215
220
|
if (rtcList.length <= 0) {
|
216
221
|
return;
|
217
222
|
}
|
218
223
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
219
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
224
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
220
225
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
221
226
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
222
227
|
return data;
|
@@ -268,7 +273,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
268
273
|
console.log('userInfo:', userInfo);
|
269
274
|
console.log('eventInfo:', ef);
|
270
275
|
console.log('========= 结束 =========');
|
271
|
-
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/
|
276
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/cld/${(_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id']}/${eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.eventSubject}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
272
277
|
method: 'POST',
|
273
278
|
body: { userInfo: realUserInfo, eventInfo: realEventInfo },
|
274
279
|
type: 'beacon'
|
@@ -284,7 +289,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
284
289
|
bffDataSource
|
285
290
|
]);
|
286
291
|
const bffFbReport = useCallback(({ eventName, product }) => {
|
287
|
-
var _a, _b, _c, _d, _e, _f;
|
292
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
293
|
+
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
294
|
+
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view', {
|
295
|
+
page_location: window.location.href,
|
296
|
+
page_title: document.title
|
297
|
+
});
|
298
|
+
}
|
288
299
|
if (!enableReportEvent ||
|
289
300
|
!enabledMetaConversionApi ||
|
290
301
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
|
@@ -348,7 +359,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
348
359
|
}
|
349
360
|
};
|
350
361
|
getEventParams(jsonParams);
|
351
|
-
|
362
|
+
const params = {};
|
363
|
+
const queryString = location.search.slice(1);
|
364
|
+
(_f = splitUrlParams(queryString)) === null || _f === void 0 ? void 0 : _f.map((val) => {
|
365
|
+
const key = val.split('=')[0];
|
366
|
+
const value = val.split('=')[1];
|
367
|
+
params[key] = value;
|
368
|
+
});
|
369
|
+
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
370
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_g = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _g === void 0 ? void 0 : _g['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
352
371
|
method: 'POST',
|
353
372
|
body: jsonParams,
|
354
373
|
type: 'beacon'
|
@@ -375,18 +394,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
375
394
|
return res === null || res === void 0 ? void 0 : res.success;
|
376
395
|
}), [bffFetch]);
|
377
396
|
const bffGetTagList = useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
|
378
|
-
var
|
379
|
-
const isShowTag = !!((
|
397
|
+
var _5, _6, _7, _8, _9, _10, _11, _12;
|
398
|
+
const isShowTag = !!((_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.data) === null || _5 === void 0 ? void 0 : _5.sxpPageConf) === null || _6 === void 0 ? void 0 : _6.globalConfig) === null || _7 === void 0 ? void 0 : _7.isShowTag);
|
380
399
|
if (!utmVal || !isShowTag)
|
381
400
|
return;
|
382
401
|
try {
|
383
|
-
const val = (
|
402
|
+
const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
|
384
403
|
var _a, _b;
|
385
404
|
const key = val.split('=')[0];
|
386
405
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
387
|
-
})) === null ||
|
406
|
+
})) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
|
388
407
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
389
|
-
setTagList((
|
408
|
+
setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
|
390
409
|
}
|
391
410
|
catch (e) {
|
392
411
|
console.log('e', e);
|
@@ -446,10 +465,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
446
465
|
});
|
447
466
|
}, [bffEventReport]);
|
448
467
|
const getAccount = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
449
|
-
var
|
468
|
+
var _13, _14;
|
450
469
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
|
451
|
-
setChatlabsId((
|
452
|
-
return ((
|
470
|
+
setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
|
471
|
+
return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
|
453
472
|
}), [bffFetch]);
|
454
473
|
const accountSonsent = useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
|
455
474
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
|
package/es/index.d.ts
CHANGED
@@ -4,7 +4,6 @@ export * as core from './core';
|
|
4
4
|
export * as materials from './materials';
|
5
5
|
export { default as SxpPageRender } from './core/components/SxpPageRender';
|
6
6
|
export { default as DiyPortalPreview } from './core/components/DiyPortalPreview';
|
7
|
-
export { default as DiyStoryPreview } from './core/components/DiyStoryPreview';
|
8
7
|
export { default as Modal } from './core/components/SxpPageRender/Modal';
|
9
8
|
export { default as SxpDataSourceProvider } from './core/context/SxpDataSourceProvider';
|
10
9
|
export { default as SxpPageCore } from './core/components/SxpPageCore';
|
package/es/index.js
CHANGED
@@ -6,7 +6,6 @@ import * as materials_1 from './materials';
|
|
6
6
|
export { materials_1 as materials };
|
7
7
|
export { default as SxpPageRender } from './core/components/SxpPageRender';
|
8
8
|
export { default as DiyPortalPreview } from './core/components/DiyPortalPreview';
|
9
|
-
export { default as DiyStoryPreview } from './core/components/DiyStoryPreview';
|
10
9
|
export { default as Modal } from './core/components/SxpPageRender/Modal';
|
11
10
|
export { default as SxpDataSourceProvider } from './core/context/SxpDataSourceProvider';
|
12
11
|
export { default as SxpPageCore } from './core/components/SxpPageCore';
|
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
5
5
|
import Img from '../components/Img';
|
6
6
|
import Scroll from '../components/Scroll';
|
7
|
-
import EventProvider from '../components/EventProvider';
|
8
7
|
import styles from './index.module.less';
|
9
8
|
import { useSxpDataSource } from '../../../../core/hooks';
|
10
9
|
import { setFontForText } from '../../../../core/utils/tool';
|
10
|
+
import EventProvider from '../components/EventProvider';
|
11
11
|
const MultiCommodity = (_a) => {
|
12
12
|
var _b, _c;
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
@@ -4,16 +4,15 @@ import React, { memo, useState } from 'react';
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
5
5
|
import Scroll from '../components/Scroll';
|
6
6
|
import Img from '../components/Img';
|
7
|
-
import EventProvider from '../components/EventProvider';
|
8
7
|
import styles from './index.module.less';
|
9
8
|
import { useSxpDataSource } from '../../../../core/hooks';
|
10
9
|
import { setFontForText } from '../../../../core/utils/tool';
|
10
|
+
import EventProvider from '../components/EventProvider';
|
11
11
|
const MultiCommodityDiro = (_a) => {
|
12
12
|
var _b, _c;
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
14
14
|
const { sxpParameter } = useSxpDataSource();
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
16
|
-
console.log(recData, '222');
|
17
16
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
18
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
19
18
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -4,16 +4,15 @@ import React, { memo, useState } from 'react';
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
5
5
|
import Scroll from '../components/Scroll';
|
6
6
|
import Img from '../components/Img';
|
7
|
-
import EventProvider from '../components/EventProvider';
|
8
7
|
import styles from './index.module.less';
|
9
8
|
import { useSxpDataSource } from '../../../../core/hooks';
|
10
9
|
import { setFontForText } from '../../../../core/utils/tool';
|
10
|
+
import EventProvider from '../components/EventProvider';
|
11
11
|
const MultiCommodityDiroNew = (_a) => {
|
12
12
|
var _b, _c;
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
14
14
|
const { sxpParameter } = useSxpDataSource();
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
16
|
-
console.log(recData, '333');
|
17
16
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
18
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
19
18
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -13,7 +13,7 @@ const EventProvider = (_a) => {
|
|
13
13
|
const handleClick = throttle((e) => {
|
14
14
|
var _a, _b, _c, _d, _e, _f;
|
15
15
|
e.preventDefault();
|
16
|
-
const item = multItem
|
16
|
+
const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
|
17
17
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
18
18
|
eventSubject: 'clickCta',
|
19
19
|
eventDescription: 'User clicked the CTA'
|
@@ -40,6 +40,6 @@ const EventProvider = (_a) => {
|
|
40
40
|
setElement(null);
|
41
41
|
}
|
42
42
|
}, [element, popup]);
|
43
|
-
return (React.createElement("button", { ref: ref, className: className, style: Object.assign({
|
43
|
+
return (React.createElement("button", { ref: ref, className: className, style: Object.assign({ display: 'flex', alignItems: 'normal' }, style), onClick: handleClick, role: 'button', "aria-label": 'CTA', tabIndex: 0 }, children));
|
44
44
|
};
|
45
45
|
export default memo(EventProvider);
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
|
+
const SxpPageRender_1 = tslib_1.__importDefault(require("../SxpPageRender"));
|
5
6
|
const Popup_1 = tslib_1.__importDefault(require("../SxpPageRender/Popup"));
|
6
|
-
const DiyStoryPreview_1 = tslib_1.__importDefault(require("../DiyStoryPreview"));
|
7
7
|
const _materials_ = tslib_1.__importStar(require("../../../materials"));
|
8
8
|
const core_1 = require("../../../core");
|
9
9
|
const SxpDataSourceProvider_1 = tslib_1.__importDefault(require("../../../core/context/SxpDataSourceProvider"));
|
@@ -11,20 +11,20 @@ const RESOLVER = {};
|
|
11
11
|
Object.values(_materials_).forEach((v) => {
|
12
12
|
RESOLVER[v.extend.type] = v;
|
13
13
|
});
|
14
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList
|
15
|
-
var _a, _b, _c, _d, _e, _f
|
14
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
15
|
+
var _a, _b, _c, _d, _e, _f;
|
16
16
|
const utmVal = (0, react_1.useMemo)(() => {
|
17
17
|
var _a;
|
18
18
|
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('?', '') : '';
|
19
19
|
return searchParams;
|
20
20
|
}, []);
|
21
|
-
const [_schema, setSchema] = (0, react_1.useState)(
|
21
|
+
const [_schema, setSchema] = (0, react_1.useState)(data === null || data === void 0 ? void 0 : data.data);
|
22
22
|
const [channel, setChannel] = (0, react_1.useState)();
|
23
23
|
return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: _schema, utmVal: channel || utmVal },
|
24
|
-
react_1.default.createElement(SxpDataSourceProvider_1.default, { 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: (
|
25
|
-
var _a
|
24
|
+
react_1.default.createElement(SxpDataSourceProvider_1.default, { 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, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
25
|
+
var _a;
|
26
26
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
27
|
-
react_1.default.createElement(
|
27
|
+
react_1.default.createElement(SxpPageRender_1.default, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
28
28
|
react_1.default.createElement(Popup_1.default, null)));
|
29
29
|
} })));
|
30
30
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
5
4
|
const tool_1 = require("../../../core/utils/tool");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const limitTextLastWholeWord = (originalText = '', limit) => {
|
7
7
|
const chineseRegex = /[\u4e00-\u9fa5]+/;
|
8
8
|
if (chineseRegex.test(originalText)) {
|
@@ -53,15 +53,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
53
53
|
wordBreak: 'break-word'
|
54
54
|
}, dangerouslySetInnerHTML: { __html: (0, tool_1.setFontForText)(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
55
55
|
react_1.default.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: (0, tool_1.setFontForText)(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
56
|
-
text && isPost && isShow && (react_1.default.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
57
|
-
textDecoration: 'underline',
|
58
|
-
cursor: 'pointer',
|
59
|
-
outline: 'none',
|
60
|
-
border: 'none',
|
61
|
-
boxSizing: 'content-box',
|
62
|
-
padding: 0,
|
63
|
-
background: 'transparent'
|
64
|
-
}, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
56
|
+
text && isPost && isShow && (react_1.default.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
65
57
|
__html: (0, tool_1.setFontForText)(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
|
66
58
|
} }))));
|
67
59
|
};
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
require("./index.less");
|
6
|
-
const lodash_1 = require("lodash");
|
7
6
|
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../core/hoc/withBindDataSource"));
|
8
7
|
const hooks_1 = require("../../../core/hooks");
|
8
|
+
const lodash_1 = require("lodash");
|
9
9
|
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value }) => {
|
10
10
|
const { schema } = (0, hooks_1.useEditor)();
|
11
11
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
@@ -29,10 +29,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
29
29
|
const Component = (0, withBindDataSource_1.default)(t);
|
30
30
|
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
31
31
|
const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
|
32
|
-
|
32
|
+
let style = (0, lodash_1.cloneDeep)((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
|
33
33
|
if (style.hasOwnProperty('backdropFilter')) {
|
34
|
-
|
35
|
-
style
|
34
|
+
let sbf = style['backdropFilter'];
|
35
|
+
style['backdropFilter'] = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
36
36
|
}
|
37
37
|
return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
38
38
|
}
|
@@ -4,9 +4,9 @@ exports.EditorCore = exports.EditorContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const lodash_1 = require("lodash");
|
7
|
-
const localStore_1 = require("../utils/localStore");
|
8
7
|
const DataSourceProvider_1 = tslib_1.__importDefault(require("./DataSourceProvider"));
|
9
8
|
const tool_1 = require("../../core/utils/tool");
|
9
|
+
const localStore_1 = require("../utils/localStore");
|
10
10
|
const item = {
|
11
11
|
id: (0, tool_1.uuid)(6, 10),
|
12
12
|
item: {
|
@@ -131,7 +131,7 @@ export interface SxpDataSourceProviderProps {
|
|
131
131
|
isEditor?: boolean;
|
132
132
|
utmParameter?: PageData['utm_parameter'];
|
133
133
|
channelQueryList?: any[];
|
134
|
-
data?:
|
134
|
+
data?: PageData;
|
135
135
|
dataList?: PageData[];
|
136
136
|
onUpdateSchema?: (d: PageData['data']) => void;
|
137
137
|
onUpdateChannel?: (d: string) => void;
|