pb-sxp-ui 1.10.0 → 1.10.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.
@@ -528,8 +528,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
528
528
  React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
529
529
  top: minusHeight
530
530
  } }),
531
- ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && (React.createElement(NavBack, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
532
- ((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel && (React.createElement(NavBack, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
531
+ ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && !openMultiPosts && (React.createElement(NavBack, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
532
+ ((((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel) || openMultiPosts) && (React.createElement(NavBack, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
533
533
  var _a, _b, _c;
534
534
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
535
535
  eventInfo: {
@@ -369,7 +369,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
369
369
  h5EnterLink();
370
370
  }, [isShowConsent]);
371
371
  useEffect(() => {
372
- if (isShowConsent)
372
+ if (isShowConsent || isPreview)
373
373
  return;
374
374
  setLoading(true);
375
375
  let layId;
@@ -10,7 +10,7 @@ const MultiPosts = (_a) => {
10
10
  var { bgImgUrl, style, recData } = _a, props = __rest(_a, ["bgImgUrl", "style", "recData"]);
11
11
  const { setChannel } = useEditor();
12
12
  const { bffEventReport, curTime } = useSxpDataSource();
13
- const { isActive } = useSwiperSlide();
13
+ const { isActive } = useSwiperSlide() || {};
14
14
  const initRef = useRef(false);
15
15
  const viewTime = useRef();
16
16
  const traceinfo = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : '';
@@ -531,8 +531,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
531
531
  react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
532
532
  top: minusHeight
533
533
  } }),
534
- ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && (react_1.default.createElement(NavBack_1.default, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
535
- ((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel && (react_1.default.createElement(NavBack_1.default, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
534
+ ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && !openMultiPosts && (react_1.default.createElement(NavBack_1.default, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
535
+ ((((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel) || openMultiPosts) && (react_1.default.createElement(NavBack_1.default, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
536
536
  var _a, _b, _c;
537
537
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
538
538
  eventInfo: {
@@ -372,7 +372,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
372
372
  h5EnterLink();
373
373
  }, [isShowConsent]);
374
374
  (0, react_1.useEffect)(() => {
375
- if (isShowConsent)
375
+ if (isShowConsent || isPreview)
376
376
  return;
377
377
  setLoading(true);
378
378
  let layId;
@@ -12,7 +12,7 @@ const MultiPosts = (_a) => {
12
12
  var { bgImgUrl, style, recData } = _a, props = tslib_1.__rest(_a, ["bgImgUrl", "style", "recData"]);
13
13
  const { setChannel } = (0, hooks_1.useEditor)();
14
14
  const { bffEventReport, curTime } = (0, hooks_1.useSxpDataSource)();
15
- const { isActive } = (0, react_2.useSwiperSlide)();
15
+ const { isActive } = (0, react_2.useSwiperSlide)() || {};
16
16
  const initRef = (0, react_1.useRef)(false);
17
17
  const viewTime = (0, react_1.useRef)();
18
18
  const traceinfo = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",