pb-sxp-ui 1.15.15-alpha.2 → 1.15.16-alpha.2

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.
Files changed (51) hide show
  1. package/dist/index.cjs +146 -785
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +145 -783
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +6 -6
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +6 -6
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +146 -785
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageCore/index.d.ts +0 -1
  14. package/es/core/components/SxpPageCore/index.js +7 -7
  15. package/es/core/components/SxpPageRender/ExpandableText.js +2 -10
  16. package/es/core/components/SxpPageRender/RenderCard.js +4 -4
  17. package/es/core/context/EditorContext.js +1 -1
  18. package/es/core/context/SxpDataSourceProvider.d.ts +1 -1
  19. package/es/core/context/SxpDataSourceProvider.js +58 -32
  20. package/es/index.d.ts +0 -1
  21. package/es/index.js +0 -1
  22. package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
  23. package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -2
  24. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -2
  25. package/es/materials/sxp/template/components/EventProvider.js +2 -2
  26. package/lib/core/components/SxpPageCore/index.d.ts +0 -1
  27. package/lib/core/components/SxpPageCore/index.js +7 -7
  28. package/lib/core/components/SxpPageRender/ExpandableText.js +2 -10
  29. package/lib/core/components/SxpPageRender/RenderCard.js +4 -4
  30. package/lib/core/context/EditorContext.js +1 -1
  31. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -1
  32. package/lib/core/context/SxpDataSourceProvider.js +58 -32
  33. package/lib/index.d.ts +0 -1
  34. package/lib/index.js +1 -3
  35. package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
  36. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -2
  37. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -2
  38. package/lib/materials/sxp/template/components/EventProvider.js +2 -2
  39. package/package.json +1 -1
  40. package/es/core/components/DiyStoryPreview/PictureGroup.d.ts +0 -16
  41. package/es/core/components/DiyStoryPreview/PictureGroup.js +0 -34
  42. package/es/core/components/DiyStoryPreview/VideoWidget.d.ts +0 -27
  43. package/es/core/components/DiyStoryPreview/VideoWidget.js +0 -195
  44. package/es/core/components/DiyStoryPreview/index.d.ts +0 -51
  45. package/es/core/components/DiyStoryPreview/index.js +0 -411
  46. package/lib/core/components/DiyStoryPreview/PictureGroup.d.ts +0 -16
  47. package/lib/core/components/DiyStoryPreview/PictureGroup.js +0 -37
  48. package/lib/core/components/DiyStoryPreview/VideoWidget.d.ts +0 -27
  49. package/lib/core/components/DiyStoryPreview/VideoWidget.js +0 -198
  50. package/lib/core/components/DiyStoryPreview/index.d.ts +0 -51
  51. package/lib/core/components/DiyStoryPreview/index.js +0 -414
@@ -9,7 +9,6 @@ export interface ISxpPageCoreProps {
9
9
  appDomain?: string;
10
10
  enabledMetaConversionApi?: boolean;
11
11
  dataList?: PageData[];
12
- pointerEvents?: string;
13
12
  }
14
13
  declare const _default: React.NamedExoticComponent<ISxpPageCoreProps>;
15
14
  export default _default;
@@ -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, pointerEvents }) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h;
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((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.data);
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: (_c = (_b = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _b === void 0 ? void 0 : _b.personalized_recommend) !== null && _c !== void 0 ? _c : maxSize, defaultSize: (_e = (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.default_recommend) !== null && _e !== void 0 ? _e : defaultSize, hashTagSize: (_g = (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.hash_tag_size) !== null && _g !== void 0 ? _g : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: Object.assign(Object.assign({}, data), { data: (_h = data === null || data === void 0 ? void 0 : data.data) === null || _h === void 0 ? void 0 : _h.data }), dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
22
- var _a, _b;
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(DiyStoryPreview, Object.assign({ defaultData: Object.assign(Object.assign({}, data), { data: (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.data }) }, (_b = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _b === void 0 ? void 0 : _b.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents, loopPlay: true })),
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
- const style = cloneDeep((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
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
- const sbf = style.backdropFilter;
32
- style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
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?: any;
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(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))
118
- ], { type: 'application/json;charset=UTF-8' }));
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: 50, defaultSize: 50, 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 }));
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 = (_h = (_g = (_f = splitUrlParams(utmVal)) === null || _f === void 0 ? void 0 : _f.filter((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 || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
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 _t, _u, _v, _w, _x, _y;
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((_w = (_v = (_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.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
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 = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
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: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
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: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
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('v3/recommend/direct', { method: 'POST', body: query }));
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((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
205
- const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
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 _z, _0, _1, _2;
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 }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: [(_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId] })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
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/event/report/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}`, {
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,20 +289,33 @@ 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, _h, _j, _k;
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: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href,
296
+ page_title: document === null || document === void 0 ? void 0 : document.title
297
+ });
298
+ }
299
+ if (eventName && typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
300
+ window === null || window === void 0 ? void 0 : window.fbq('track', eventName, {
301
+ page_path: (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.pathname,
302
+ page_location: (_c = window === null || window === void 0 ? void 0 : window.location) === null || _c === void 0 ? void 0 : _c.href,
303
+ page_title: document === null || document === void 0 ? void 0 : document.title
304
+ });
305
+ }
288
306
  if (!enableReportEvent ||
289
307
  !enabledMetaConversionApi ||
290
308
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
291
- !((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
309
+ !((_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName])) {
292
310
  return;
293
311
  }
294
- const jsonParams = cloneDeep((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
312
+ const jsonParams = cloneDeep((_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _e === void 0 ? void 0 : _e[eventName]);
295
313
  const urlParams = new URLSearchParams(window.location.search);
296
314
  const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
297
315
  const fix_par = {
298
- event_source_url: (_c = window === null || window === void 0 ? void 0 : window.location) === null || _c === void 0 ? void 0 : _c.href,
316
+ event_source_url: (_f = window === null || window === void 0 ? void 0 : window.location) === null || _f === void 0 ? void 0 : _f.href,
299
317
  external_id: fakeUserId,
300
- client_user_agent: (_e = (_d = window === null || window === void 0 ? void 0 : window.navigator) === null || _d === void 0 ? void 0 : _d.userAgent) !== null && _e !== void 0 ? _e : '',
318
+ client_user_agent: (_h = (_g = window === null || window === void 0 ? void 0 : window.navigator) === null || _g === void 0 ? void 0 : _g.userAgent) !== null && _h !== void 0 ? _h : '',
301
319
  fbc: fbclid ? `fb.2.${new Date().getTime()}.${fbclid}` : '',
302
320
  fbp: getCookie('_fbp') ? `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` : '',
303
321
  time: Math.floor(Date.now() / 1000)
@@ -348,7 +366,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
348
366
  }
349
367
  };
350
368
  getEventParams(jsonParams);
351
- return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/event/report/FB/${(_f = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _f === void 0 ? void 0 : _f['x-app-id']}/${eventName}`, {
369
+ const params = {};
370
+ const queryString = location.search.slice(1);
371
+ (_j = splitUrlParams(queryString)) === null || _j === void 0 ? void 0 : _j.map((val) => {
372
+ const key = val.split('=')[0];
373
+ const value = val.split('=')[1];
374
+ params[key] = value;
375
+ });
376
+ const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
377
+ return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_k = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _k === void 0 ? void 0 : _k['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
352
378
  method: 'POST',
353
379
  body: jsonParams,
354
380
  type: 'beacon'
@@ -375,18 +401,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
375
401
  return res === null || res === void 0 ? void 0 : res.success;
376
402
  }), [bffFetch]);
377
403
  const bffGetTagList = useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
378
- var _3, _4, _5, _6, _7, _8, _9, _10;
379
- const isShowTag = !!((_5 = (_4 = (_3 = data === null || data === void 0 ? void 0 : data.data) === null || _3 === void 0 ? void 0 : _3.sxpPageConf) === null || _4 === void 0 ? void 0 : _4.globalConfig) === null || _5 === void 0 ? void 0 : _5.isShowTag);
404
+ var _5, _6, _7, _8, _9, _10, _11, _12;
405
+ 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
406
  if (!utmVal || !isShowTag)
381
407
  return;
382
408
  try {
383
- const val = (_8 = (_7 = (_6 = splitUrlParams(utmVal)) === null || _6 === void 0 ? void 0 : _6.filter((val) => {
409
+ const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
384
410
  var _a, _b;
385
411
  const key = val.split('=')[0];
386
412
  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 || _7 === void 0 ? void 0 : _7.join('&')) !== null && _8 !== void 0 ? _8 : '';
413
+ })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
388
414
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
389
- setTagList((_10 = (_9 = result === null || result === void 0 ? void 0 : result.data) === null || _9 === void 0 ? void 0 : _9.tags) !== null && _10 !== void 0 ? _10 : []);
415
+ 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
416
  }
391
417
  catch (e) {
392
418
  console.log('e', e);
@@ -446,10 +472,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
446
472
  });
447
473
  }, [bffEventReport]);
448
474
  const getAccount = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
449
- var _11, _12;
475
+ var _13, _14;
450
476
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
451
- setChatlabsId((_11 = res === null || res === void 0 ? void 0 : res.data) === null || _11 === void 0 ? void 0 : _11.chatLabsId);
452
- return ((_12 = res === null || res === void 0 ? void 0 : res.data) === null || _12 === void 0 ? void 0 : _12.consentResult) === 'true';
477
+ setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
478
+ return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
453
479
  }), [bffFetch]);
454
480
  const accountSonsent = useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
455
481
  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 || ((_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);
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({ outline: 'none', border: 'none', boxSizing: 'content-box', padding: 0, background: 'transparent', display: 'flex', alignItems: 'normal' }, style), onClick: handleClick, role: 'button', "aria-label": 'CTA', tabIndex: 0 }, children));
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);
@@ -9,7 +9,6 @@ export interface ISxpPageCoreProps {
9
9
  appDomain?: string;
10
10
  enabledMetaConversionApi?: boolean;
11
11
  dataList?: PageData[];
12
- pointerEvents?: string;
13
12
  }
14
13
  declare const _default: React.NamedExoticComponent<ISxpPageCoreProps>;
15
14
  export default _default;
@@ -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, pointerEvents }) => {
15
- var _a, _b, _c, _d, _e, _f, _g, _h;
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)((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.data);
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: (_c = (_b = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _b === void 0 ? void 0 : _b.personalized_recommend) !== null && _c !== void 0 ? _c : maxSize, defaultSize: (_e = (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.default_recommend) !== null && _e !== void 0 ? _e : defaultSize, hashTagSize: (_g = (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.hash_tag_size) !== null && _g !== void 0 ? _g : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: Object.assign(Object.assign({}, data), { data: (_h = data === null || data === void 0 ? void 0 : data.data) === null || _h === void 0 ? void 0 : _h.data }), dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
25
- var _a, _b;
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(DiyStoryPreview_1.default, Object.assign({ defaultData: Object.assign(Object.assign({}, data), { data: (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.data }) }, (_b = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _b === void 0 ? void 0 : _b.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents, loopPlay: true })),
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
- const style = (0, lodash_1.cloneDeep)((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
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
- const sbf = style.backdropFilter;
35
- style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
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?: any;
134
+ data?: PageData;
135
135
  dataList?: PageData[];
136
136
  onUpdateSchema?: (d: PageData['data']) => void;
137
137
  onUpdateChannel?: (d: string) => void;