pb-sxp-ui 1.15.14 → 1.15.15-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 +781 -129
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +779 -128
  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 +781 -129
  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/DiyStoryPreview/PictureGroup.d.ts +16 -0
  14. package/es/core/components/DiyStoryPreview/PictureGroup.js +34 -0
  15. package/es/core/components/DiyStoryPreview/VideoWidget.d.ts +27 -0
  16. package/es/core/components/DiyStoryPreview/VideoWidget.js +195 -0
  17. package/es/core/components/DiyStoryPreview/index.d.ts +51 -0
  18. package/es/core/components/DiyStoryPreview/index.js +411 -0
  19. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  20. package/es/core/components/SxpPageCore/index.js +7 -7
  21. package/es/core/components/SxpPageRender/ExpandableText.js +10 -2
  22. package/es/core/components/SxpPageRender/RenderCard.js +4 -4
  23. package/es/core/context/EditorContext.js +1 -1
  24. package/es/core/context/SxpDataSourceProvider.d.ts +1 -1
  25. package/es/core/context/SxpDataSourceProvider.js +28 -41
  26. package/es/index.d.ts +1 -0
  27. package/es/index.js +1 -0
  28. package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
  29. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -1
  30. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -1
  31. package/es/materials/sxp/template/components/EventProvider.js +2 -2
  32. package/lib/core/components/DiyStoryPreview/PictureGroup.d.ts +16 -0
  33. package/lib/core/components/DiyStoryPreview/PictureGroup.js +37 -0
  34. package/lib/core/components/DiyStoryPreview/VideoWidget.d.ts +27 -0
  35. package/lib/core/components/DiyStoryPreview/VideoWidget.js +198 -0
  36. package/lib/core/components/DiyStoryPreview/index.d.ts +51 -0
  37. package/lib/core/components/DiyStoryPreview/index.js +414 -0
  38. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  39. package/lib/core/components/SxpPageCore/index.js +7 -7
  40. package/lib/core/components/SxpPageRender/ExpandableText.js +10 -2
  41. package/lib/core/components/SxpPageRender/RenderCard.js +4 -4
  42. package/lib/core/context/EditorContext.js +1 -1
  43. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -1
  44. package/lib/core/context/SxpDataSourceProvider.js +28 -41
  45. package/lib/index.d.ts +1 -0
  46. package/lib/index.js +3 -1
  47. package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
  48. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -1
  49. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -1
  50. package/lib/materials/sxp/template/components/EventProvider.js +2 -2
  51. package/package.json +1 -1
@@ -117,12 +117,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
117
117
  }
118
118
  if (options.type === 'beacon' && navigator.sendBeacon) {
119
119
  return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
120
- JSON.stringify({
121
- body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
122
- })
123
- ], {
124
- type: 'application/json;charset=UTF-8'
125
- }));
120
+ JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))
121
+ ], { type: 'application/json;charset=UTF-8' }));
126
122
  }
127
123
  return window
128
124
  .fetch(`${url}/api/${path}`, {
@@ -151,17 +147,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
151
147
  .catch((err) => Promise.reject(err));
152
148
  }, [bffDataSource]);
153
149
  const getRecommendVideos = (0, react_1.useCallback)((query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
154
- var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
155
- 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 }));
150
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
151
+ 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 }));
156
152
  if (channel) {
157
153
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
158
154
  }
159
155
  else if (utmVal) {
160
- const val = (_k = (_j = (_h = (0, tool_1.splitUrlParams)(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
161
- var _a, _b;
156
+ const val = (_h = (_g = (_f = (0, tool_1.splitUrlParams)(utmVal)) === null || _f === void 0 ? void 0 : _f.filter((val) => {
162
157
  const key = val.split('=')[0];
163
- 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);
164
- })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
158
+ return key;
159
+ })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
165
160
  if (val)
166
161
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
167
162
  }
@@ -175,19 +170,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
175
170
  let list = [];
176
171
  let result = null;
177
172
  const recurveRecList = (query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
178
- var _v, _w, _x, _y, _z, _0;
173
+ var _t, _u, _v, _w, _x, _y;
179
174
  query.pageNum = pageNum;
180
175
  result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
181
176
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
182
177
  return undefined;
183
178
  }
184
179
  setLoading(false);
185
- 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 : []);
180
+ 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 : []);
186
181
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
187
182
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
188
183
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
189
184
  }
190
- 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));
185
+ 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));
191
186
  if (isNotNullList) {
192
187
  pageNum = pageNum + 1;
193
188
  yield recurveRecList(query);
@@ -195,13 +190,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
195
190
  });
196
191
  yield recurveRecList(query);
197
192
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
198
- 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 });
193
+ 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 });
199
194
  return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
200
195
  }
201
196
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
202
- 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 });
197
+ 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 });
203
198
  }
204
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
199
+ const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
205
200
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
206
201
  return undefined;
207
202
  }
@@ -209,8 +204,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
209
204
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
210
205
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
211
206
  let list = [];
212
- 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 : []);
213
- 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));
207
+ 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 : []);
208
+ 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));
214
209
  if (!isNotNullList) {
215
210
  setIsNoMoreData(true);
216
211
  }
@@ -219,12 +214,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
219
214
  return result === null || result === void 0 ? void 0 : result.data;
220
215
  }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
221
216
  const loadVideos = (0, react_1.useCallback)((pageNum) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
222
- var _1, _2, _3, _4;
217
+ var _z, _0, _1, _2;
223
218
  if (rtcList.length <= 0) {
224
219
  return;
225
220
  }
226
221
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
227
- 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 })));
222
+ 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 })));
228
223
  setRtcList(rtcList.concat(getFilterRecList(data)));
229
224
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
230
225
  return data;
@@ -276,7 +271,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
276
271
  console.log('userInfo:', userInfo);
277
272
  console.log('eventInfo:', ef);
278
273
  console.log('========= 结束 =========');
279
- 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)}` : ''}`, {
274
+ 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}`, {
280
275
  method: 'POST',
281
276
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
282
277
  type: 'beacon'
@@ -292,7 +287,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
292
287
  bffDataSource
293
288
  ]);
294
289
  const bffFbReport = (0, react_1.useCallback)(({ eventName, product }) => {
295
- var _a, _b, _c, _d, _e, _f, _g;
290
+ var _a, _b, _c, _d, _e, _f;
296
291
  if (!enableReportEvent ||
297
292
  !enabledMetaConversionApi ||
298
293
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
@@ -356,15 +351,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
356
351
  }
357
352
  };
358
353
  getEventParams(jsonParams);
359
- const params = {};
360
- const queryString = location.search.slice(1);
361
- (_f = (0, tool_1.splitUrlParams)(queryString)) === null || _f === void 0 ? void 0 : _f.map((val) => {
362
- const key = val.split('=')[0];
363
- const value = val.split('=')[1];
364
- params[key] = value;
365
- });
366
- const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
367
- 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)}` : ''}`, {
354
+ 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}`, {
368
355
  method: 'POST',
369
356
  body: jsonParams,
370
357
  type: 'beacon'
@@ -391,18 +378,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
391
378
  return res === null || res === void 0 ? void 0 : res.success;
392
379
  }), [bffFetch]);
393
380
  const bffGetTagList = (0, react_1.useCallback)((data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
394
- var _5, _6, _7, _8, _9, _10, _11, _12;
395
- 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);
381
+ var _3, _4, _5, _6, _7, _8, _9, _10;
382
+ 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);
396
383
  if (!utmVal || !isShowTag)
397
384
  return;
398
385
  try {
399
- const val = (_10 = (_9 = (_8 = (0, tool_1.splitUrlParams)(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
386
+ const val = (_8 = (_7 = (_6 = (0, tool_1.splitUrlParams)(utmVal)) === null || _6 === void 0 ? void 0 : _6.filter((val) => {
400
387
  var _a, _b;
401
388
  const key = val.split('=')[0];
402
389
  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);
403
- })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
390
+ })) === null || _7 === void 0 ? void 0 : _7.join('&')) !== null && _8 !== void 0 ? _8 : '';
404
391
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
405
- 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 : []);
392
+ 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 : []);
406
393
  }
407
394
  catch (e) {
408
395
  console.log('e', e);
@@ -462,10 +449,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
462
449
  });
463
450
  }, [bffEventReport]);
464
451
  const getAccount = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
465
- var _13, _14;
452
+ var _11, _12;
466
453
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
467
- setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
468
- return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
454
+ setChatlabsId((_11 = res === null || res === void 0 ? void 0 : res.data) === null || _11 === void 0 ? void 0 : _11.chatLabsId);
455
+ return ((_12 = res === null || res === void 0 ? void 0 : res.data) === null || _12 === void 0 ? void 0 : _12.consentResult) === 'true';
469
456
  }), [bffFetch]);
470
457
  const accountSonsent = (0, react_1.useCallback)((consentResult) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
471
458
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
package/lib/index.d.ts CHANGED
@@ -4,6 +4,7 @@ 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';
7
8
  export { default as Modal } from './core/components/SxpPageRender/Modal';
8
9
  export { default as SxpDataSourceProvider } from './core/context/SxpDataSourceProvider';
9
10
  export { default as SxpPageCore } from './core/components/SxpPageCore';
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.DiyPortalPreview = exports.SxpPageRender = exports.materials = exports.core = void 0;
3
+ exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.DiyStoryPreview = exports.DiyPortalPreview = exports.SxpPageRender = exports.materials = exports.core = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Pagebuilder_1 = require("./core/Pagebuilder");
6
6
  require("./index.css");
@@ -10,6 +10,8 @@ var SxpPageRender_1 = require("./core/components/SxpPageRender");
10
10
  Object.defineProperty(exports, "SxpPageRender", { enumerable: true, get: function () { return tslib_1.__importDefault(SxpPageRender_1).default; } });
11
11
  var DiyPortalPreview_1 = require("./core/components/DiyPortalPreview");
12
12
  Object.defineProperty(exports, "DiyPortalPreview", { enumerable: true, get: function () { return tslib_1.__importDefault(DiyPortalPreview_1).default; } });
13
+ var DiyStoryPreview_1 = require("./core/components/DiyStoryPreview");
14
+ Object.defineProperty(exports, "DiyStoryPreview", { enumerable: true, get: function () { return tslib_1.__importDefault(DiyStoryPreview_1).default; } });
13
15
  var Modal_1 = require("./core/components/SxpPageRender/Modal");
14
16
  Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return tslib_1.__importDefault(Modal_1).default; } });
15
17
  var SxpDataSourceProvider_1 = require("./core/context/SxpDataSourceProvider");
@@ -6,10 +6,10 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_2 = require("swiper/react");
7
7
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
8
8
  const Scroll_1 = tslib_1.__importDefault(require("../components/Scroll"));
9
+ const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
9
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
11
  const hooks_1 = require("../../../../core/hooks");
11
12
  const tool_1 = require("../../../../core/utils/tool");
12
- const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
13
13
  const MultiCommodity = (_a) => {
14
14
  var _b, _c;
15
15
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -6,15 +6,16 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_2 = require("swiper/react");
7
7
  const Scroll_1 = tslib_1.__importDefault(require("../components/Scroll"));
8
8
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
9
+ const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
9
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
11
  const hooks_1 = require("../../../../core/hooks");
11
12
  const tool_1 = require("../../../../core/utils/tool");
12
- const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
13
13
  const MultiCommodityDiro = (_a) => {
14
14
  var _b, _c;
15
15
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
16
16
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
17
17
  const [products] = (0, react_1.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]);
18
+ console.log(recData, '222');
18
19
  return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
19
20
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
20
21
  return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
@@ -6,15 +6,16 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_2 = require("swiper/react");
7
7
  const Scroll_1 = tslib_1.__importDefault(require("../components/Scroll"));
8
8
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
9
+ const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
9
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
11
  const hooks_1 = require("../../../../core/hooks");
11
12
  const tool_1 = require("../../../../core/utils/tool");
12
- const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
13
13
  const MultiCommodityDiroNew = (_a) => {
14
14
  var _b, _c;
15
15
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
16
16
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
17
17
  const [products] = (0, react_1.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]);
18
+ console.log(recData, '333');
18
19
  return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
19
20
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
20
21
  return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
@@ -15,7 +15,7 @@ const EventProvider = (_a) => {
15
15
  const handleClick = (0, lodash_1.throttle)((e) => {
16
16
  var _a, _b, _c, _d, _e, _f;
17
17
  e.preventDefault();
18
- 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;
18
+ 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);
19
19
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
20
20
  eventSubject: 'clickCta',
21
21
  eventDescription: 'User clicked the CTA'
@@ -42,6 +42,6 @@ const EventProvider = (_a) => {
42
42
  setElement(null);
43
43
  }
44
44
  }, [element, popup]);
45
- return (react_1.default.createElement("button", { ref: ref, className: className, style: Object.assign({ display: 'flex', alignItems: 'normal' }, style), onClick: handleClick, role: 'button', "aria-label": 'CTA', tabIndex: 0 }, children));
45
+ return (react_1.default.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));
46
46
  };
47
47
  exports.default = (0, react_1.memo)(EventProvider);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.14",
3
+ "version": "1.15.15-alpha.2",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",