pb-sxp-ui 1.15.6 → 1.15.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +2 -2
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +8 -6
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +3 -3
- package/es/core/components/SxpPageRender/index.js +4 -4
- package/es/materials/sxp/consentPopup/Click/index.d.ts +5 -1
- package/es/materials/sxp/consentPopup/Swipe/index.d.ts +5 -1
- package/es/materials/sxp/popup/ConsentDetail/index.d.ts +5 -1
- package/es/materials/sxp/popup/ConsentDetail/index.js +2 -1
- package/lib/core/components/SxpPageRender/index.d.ts +3 -3
- package/lib/core/components/SxpPageRender/index.js +3 -3
- package/lib/materials/sxp/consentPopup/Click/index.d.ts +5 -1
- package/lib/materials/sxp/consentPopup/Swipe/index.d.ts +5 -1
- package/lib/materials/sxp/popup/ConsentDetail/index.d.ts +5 -1
- package/lib/materials/sxp/popup/ConsentDetail/index.js +2 -1
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CSSProperties
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { RecItemType } from './typing';
|
3
3
|
import './index.less';
|
4
4
|
export type postConfigType = {
|
@@ -112,5 +112,5 @@ export interface ISxpPageRenderProps {
|
|
112
112
|
hashTagRightMargin: number;
|
113
113
|
defaultData?: any;
|
114
114
|
}
|
115
|
-
declare const
|
116
|
-
export default
|
115
|
+
declare const _default: React.NamedExoticComponent<ISxpPageRenderProps>;
|
116
|
+
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useMemo, useEffect, useState, useRef, useCallback } from 'react';
|
1
|
+
import React, { useMemo, useEffect, useState, useRef, useCallback, memo } from 'react';
|
2
2
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
3
3
|
import ExpandableText from './ExpandableText';
|
4
4
|
import LikeButton from './LikeButton';
|
@@ -554,8 +554,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
554
554
|
isReload,
|
555
555
|
renderToggleButton
|
556
556
|
]);
|
557
|
-
return (React.createElement(
|
558
|
-
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", {
|
557
|
+
return (React.createElement("div", { id: 'sxp-render' }, (data === null || data === void 0 ? void 0 : data.length) < 1 && loading ? (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
558
|
+
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'clc-sxp-container', style: Object.assign({}, ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) && { textUnderlineOffset: `${globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset}px` })) },
|
559
559
|
waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff', top: `${minusHeight}px` }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
|
560
560
|
const isEq = isEqual(rtcList, cacheRtcList);
|
561
561
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
@@ -616,4 +616,4 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
616
616
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
617
617
|
openMultiPosts && (React.createElement(MultiPosts, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } })))))));
|
618
618
|
};
|
619
|
-
export default SxpPageRender;
|
619
|
+
export default memo(SxpPageRender);
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
2
2
|
import './index.less';
|
3
|
+
interface richText {
|
4
|
+
html: any;
|
5
|
+
raw: any;
|
6
|
+
}
|
3
7
|
export interface IClickProps {
|
4
8
|
open?: boolean;
|
5
|
-
content?:
|
9
|
+
content?: richText | any;
|
6
10
|
style?: Record<string, any>;
|
7
11
|
isTel?: boolean;
|
8
12
|
acceptButton?: {
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './index.less';
|
3
|
+
interface richText {
|
4
|
+
html: any;
|
5
|
+
raw: any;
|
6
|
+
}
|
3
7
|
export interface ISwipeProps {
|
4
8
|
open?: boolean;
|
5
|
-
content?:
|
9
|
+
content?: richText | any;
|
6
10
|
style?: Record<string, any>;
|
7
11
|
isTel?: boolean;
|
8
12
|
consentPopupCate?: string;
|
@@ -1,7 +1,11 @@
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
2
2
|
import './index.less';
|
3
|
+
interface richText {
|
4
|
+
html: any;
|
5
|
+
raw: any;
|
6
|
+
}
|
3
7
|
export interface IConsentDetailProps {
|
4
|
-
content?:
|
8
|
+
content?: richText | any;
|
5
9
|
isTel?: boolean;
|
6
10
|
style?: CSSProperties;
|
7
11
|
}
|
@@ -2,9 +2,10 @@ import { __rest } from "tslib";
|
|
2
2
|
import React, { memo } from 'react';
|
3
3
|
import './index.less';
|
4
4
|
const ConsentDetail = (_a) => {
|
5
|
+
var _b;
|
5
6
|
var { content, isTel, style } = _a, props = __rest(_a, ["content", "isTel", "style"]);
|
6
7
|
return (React.createElement("article", { className: 'consentDetail-article', dangerouslySetInnerHTML: {
|
7
|
-
__html:
|
8
|
+
__html: (_b = content === null || content === void 0 ? void 0 : content.html) !== null && _b !== void 0 ? _b : content
|
8
9
|
}, onClick: (e) => {
|
9
10
|
e.stopPropagation();
|
10
11
|
}, style: style }));
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CSSProperties
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { RecItemType } from './typing';
|
3
3
|
import './index.less';
|
4
4
|
export type postConfigType = {
|
@@ -112,5 +112,5 @@ export interface ISxpPageRenderProps {
|
|
112
112
|
hashTagRightMargin: number;
|
113
113
|
defaultData?: any;
|
114
114
|
}
|
115
|
-
declare const
|
116
|
-
export default
|
115
|
+
declare const _default: React.NamedExoticComponent<ISxpPageRenderProps>;
|
116
|
+
export default _default;
|
@@ -557,8 +557,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
557
557
|
isReload,
|
558
558
|
renderToggleButton
|
559
559
|
]);
|
560
|
-
return (react_1.default.createElement(
|
561
|
-
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", {
|
560
|
+
return (react_1.default.createElement("div", { id: 'sxp-render' }, (data === null || data === void 0 ? void 0 : data.length) < 1 && loading ? (react_1.default.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
561
|
+
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'clc-sxp-container', style: Object.assign({}, ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) && { textUnderlineOffset: `${globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset}px` })) },
|
562
562
|
waterFallData && (react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { background: 'rgba(0,0,0,.3)', color: '#fff', top: `${minusHeight}px` }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
|
563
563
|
const isEq = (0, lodash_1.isEqual)(rtcList, cacheRtcList);
|
564
564
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
@@ -619,4 +619,4 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
619
619
|
react_1.default.createElement(ConsentPopup_1.default, { resolver: resolver, globalConfig: globalConfig }),
|
620
620
|
openMultiPosts && (react_1.default.createElement(MultiPosts_1.default, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } })))))));
|
621
621
|
};
|
622
|
-
exports.default = SxpPageRender;
|
622
|
+
exports.default = (0, react_1.memo)(SxpPageRender);
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
2
2
|
import './index.less';
|
3
|
+
interface richText {
|
4
|
+
html: any;
|
5
|
+
raw: any;
|
6
|
+
}
|
3
7
|
export interface IClickProps {
|
4
8
|
open?: boolean;
|
5
|
-
content?:
|
9
|
+
content?: richText | any;
|
6
10
|
style?: Record<string, any>;
|
7
11
|
isTel?: boolean;
|
8
12
|
acceptButton?: {
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './index.less';
|
3
|
+
interface richText {
|
4
|
+
html: any;
|
5
|
+
raw: any;
|
6
|
+
}
|
3
7
|
export interface ISwipeProps {
|
4
8
|
open?: boolean;
|
5
|
-
content?:
|
9
|
+
content?: richText | any;
|
6
10
|
style?: Record<string, any>;
|
7
11
|
isTel?: boolean;
|
8
12
|
consentPopupCate?: string;
|
@@ -1,7 +1,11 @@
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
2
2
|
import './index.less';
|
3
|
+
interface richText {
|
4
|
+
html: any;
|
5
|
+
raw: any;
|
6
|
+
}
|
3
7
|
export interface IConsentDetailProps {
|
4
|
-
content?:
|
8
|
+
content?: richText | any;
|
5
9
|
isTel?: boolean;
|
6
10
|
style?: CSSProperties;
|
7
11
|
}
|
@@ -4,9 +4,10 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
require("./index.less");
|
6
6
|
const ConsentDetail = (_a) => {
|
7
|
+
var _b;
|
7
8
|
var { content, isTel, style } = _a, props = tslib_1.__rest(_a, ["content", "isTel", "style"]);
|
8
9
|
return (react_1.default.createElement("article", { className: 'consentDetail-article', dangerouslySetInnerHTML: {
|
9
|
-
__html:
|
10
|
+
__html: (_b = content === null || content === void 0 ? void 0 : content.html) !== null && _b !== void 0 ? _b : content
|
10
11
|
}, onClick: (e) => {
|
11
12
|
e.stopPropagation();
|
12
13
|
}, style: style }));
|