pb-sxp-ui 1.10.11 → 1.10.12
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 +24 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- 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 +24 -8
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +1 -1
- package/es/materials/sxp/popup/Iframe/index.d.ts +4 -0
- package/es/materials/sxp/popup/Iframe/index.js +5 -4
- package/es/materials/sxp/popup/Iframe/settingRender.js +15 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +1 -1
- package/lib/materials/sxp/popup/Iframe/index.d.ts +4 -0
- package/lib/materials/sxp/popup/Iframe/index.js +5 -4
- package/lib/materials/sxp/popup/Iframe/settingRender.js +15 -0
- package/package.json +1 -1
@@ -56,7 +56,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
56
56
|
}, [isOpen, popup]);
|
57
57
|
const child = useCallback(() => {
|
58
58
|
return children;
|
59
|
-
}, [_popup, openState, globalConfig]);
|
59
|
+
}, [_popup, openState, globalConfig, schema]);
|
60
60
|
useEffect(() => {
|
61
61
|
const trapFocus = (element) => {
|
62
62
|
var focusableEls = element === null || element === void 0 ? void 0 : element.querySelectorAll('[role="button"],a, a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');
|
@@ -12,6 +12,10 @@ export interface IIframeProps {
|
|
12
12
|
submitButtonStyle?: CSSProperties;
|
13
13
|
contentStyle?: CSSProperties;
|
14
14
|
isTel?: boolean;
|
15
|
+
iframe?: {
|
16
|
+
src?: string;
|
17
|
+
allow?: string;
|
18
|
+
};
|
15
19
|
}
|
16
20
|
declare const _default: React.NamedExoticComponent<IIframeProps>;
|
17
21
|
export default _default;
|
@@ -5,11 +5,12 @@ import './index.less';
|
|
5
5
|
import { useSxpDataSource } from '../../../../core/hooks';
|
6
6
|
const Iframe = (_a) => {
|
7
7
|
var _b, _c;
|
8
|
-
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel"]);
|
8
|
+
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel, iframe } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel", "iframe"]);
|
9
9
|
const { popupDetailData } = useSxpDataSource();
|
10
|
-
const
|
11
|
-
|
12
|
-
|
10
|
+
const { src, allow } = iframe || {};
|
11
|
+
const iframeUrl = src || ((_c = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindCta) === null || _c === void 0 ? void 0 : _c.remark);
|
12
|
+
return (React.createElement("div", Object.assign({ className: `${css(Object.assign(Object.assign({}, style), { overflow: 'hidden' }))}` }, props),
|
13
|
+
React.createElement("iframe", { src: iframeUrl, allow: allow, scrolling: 'no', style: {
|
13
14
|
width: '100%',
|
14
15
|
height: 'calc(100% - 50px)',
|
15
16
|
marginTop: '50px',
|
@@ -8,5 +8,20 @@ export default [
|
|
8
8
|
name: ['style', 'backgroundColor']
|
9
9
|
}
|
10
10
|
]
|
11
|
+
},
|
12
|
+
{
|
13
|
+
title: 'iframe',
|
14
|
+
child: [
|
15
|
+
{
|
16
|
+
type: 'TextArea',
|
17
|
+
label: 'url',
|
18
|
+
name: ['props', 'iframe', 'src']
|
19
|
+
},
|
20
|
+
{
|
21
|
+
type: 'TextArea',
|
22
|
+
label: 'allow',
|
23
|
+
name: ['props', 'iframe', 'allow']
|
24
|
+
}
|
25
|
+
]
|
11
26
|
}
|
12
27
|
];
|
@@ -59,7 +59,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
59
59
|
}, [isOpen, popup]);
|
60
60
|
const child = (0, react_1.useCallback)(() => {
|
61
61
|
return children;
|
62
|
-
}, [_popup, openState, globalConfig]);
|
62
|
+
}, [_popup, openState, globalConfig, schema]);
|
63
63
|
(0, react_1.useEffect)(() => {
|
64
64
|
const trapFocus = (element) => {
|
65
65
|
var focusableEls = element === null || element === void 0 ? void 0 : element.querySelectorAll('[role="button"],a, a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');
|
@@ -12,6 +12,10 @@ export interface IIframeProps {
|
|
12
12
|
submitButtonStyle?: CSSProperties;
|
13
13
|
contentStyle?: CSSProperties;
|
14
14
|
isTel?: boolean;
|
15
|
+
iframe?: {
|
16
|
+
src?: string;
|
17
|
+
allow?: string;
|
18
|
+
};
|
15
19
|
}
|
16
20
|
declare const _default: React.NamedExoticComponent<IIframeProps>;
|
17
21
|
export default _default;
|
@@ -7,11 +7,12 @@ require("./index.less");
|
|
7
7
|
const hooks_1 = require("../../../../core/hooks");
|
8
8
|
const Iframe = (_a) => {
|
9
9
|
var _b, _c;
|
10
|
-
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel"]);
|
10
|
+
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel, iframe } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel", "iframe"]);
|
11
11
|
const { popupDetailData } = (0, hooks_1.useSxpDataSource)();
|
12
|
-
const
|
13
|
-
|
14
|
-
|
12
|
+
const { src, allow } = iframe || {};
|
13
|
+
const iframeUrl = src || ((_c = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindCta) === null || _c === void 0 ? void 0 : _c.remark);
|
14
|
+
return (react_1.default.createElement("div", Object.assign({ className: `${(0, css_1.css)(Object.assign(Object.assign({}, style), { overflow: 'hidden' }))}` }, props),
|
15
|
+
react_1.default.createElement("iframe", { src: iframeUrl, allow: allow, scrolling: 'no', style: {
|
15
16
|
width: '100%',
|
16
17
|
height: 'calc(100% - 50px)',
|
17
18
|
marginTop: '50px',
|
@@ -10,5 +10,20 @@ exports.default = [
|
|
10
10
|
name: ['style', 'backgroundColor']
|
11
11
|
}
|
12
12
|
]
|
13
|
+
},
|
14
|
+
{
|
15
|
+
title: 'iframe',
|
16
|
+
child: [
|
17
|
+
{
|
18
|
+
type: 'TextArea',
|
19
|
+
label: 'url',
|
20
|
+
name: ['props', 'iframe', 'src']
|
21
|
+
},
|
22
|
+
{
|
23
|
+
type: 'TextArea',
|
24
|
+
label: 'allow',
|
25
|
+
name: ['props', 'iframe', 'allow']
|
26
|
+
}
|
27
|
+
]
|
13
28
|
}
|
14
29
|
];
|