pb-sxp-ui 1.12.1 → 1.12.3

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.
@@ -134,7 +134,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
134
134
  handleReportProductView(item);
135
135
  }
136
136
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0 || channel) {
137
- const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(true, handleSessionCompleted);
137
+ const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
138
138
  if (!isExpire)
139
139
  handleSessionCompleted();
140
140
  }
@@ -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 iframeUrl = (_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;
11
- return (React.createElement("div", Object.assign({ className: `${css(Object.assign({}, style))}` }, props),
12
- React.createElement("iframe", { src: iframeUrl, style: {
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
  ];
@@ -137,7 +137,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
137
137
  handleReportProductView(item);
138
138
  }
139
139
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0 || channel) {
140
- const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(true, handleSessionCompleted);
140
+ const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
141
141
  if (!isExpire)
142
142
  handleSessionCompleted();
143
143
  }
@@ -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 iframeUrl = (_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;
13
- return (react_1.default.createElement("div", Object.assign({ className: `${(0, css_1.css)(Object.assign({}, style))}` }, props),
14
- react_1.default.createElement("iframe", { src: iframeUrl, style: {
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
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",