pb-sxp-ui 1.3.5 → 1.3.6

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.
@@ -24,6 +24,20 @@ const Popup = () => {
24
24
  setVisible(popup);
25
25
  }
26
26
  }, [popup]);
27
+ const isFullScreen = useMemo(() => {
28
+ var _a, _b, _c, _d;
29
+ const valueItem = (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.find((value, index) => {
30
+ if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
31
+ return value;
32
+ }
33
+ });
34
+ if (valueItem !== -1 && ((_d = valueItem === null || valueItem === void 0 ? void 0 : valueItem.item) === null || _d === void 0 ? void 0 : _d.type) === 'Iframe') {
35
+ return true;
36
+ }
37
+ else {
38
+ return false;
39
+ }
40
+ }, [popup, schema]);
27
41
  const handleClose = () => {
28
42
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
29
43
  if (!popup ||
@@ -72,6 +86,6 @@ const Popup = () => {
72
86
  }
73
87
  });
74
88
  }, [schema, popup, resolver, handleClose]);
75
- return (React.createElement(Modal, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
89
+ return (React.createElement(Modal, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' }, isFullScreen: isFullScreen }, renderPopupDetail));
76
90
  };
77
91
  export default Popup;
@@ -179,7 +179,7 @@ const CommodityDetail = (_a) => {
179
179
  background: '#fff',
180
180
  borderRadius: '3px'
181
181
  }, onClick: () => setShow3DModal(true) },
182
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '60px' })))),
182
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
183
183
  renderCommodityGroup(),
184
184
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
185
185
  renderBtn(),
@@ -318,7 +318,7 @@ export default [
318
318
  label: '弹窗按钮',
319
319
  type: 'Upload',
320
320
  name: ['props', 'iframeIcon'],
321
- text: '建议尺寸:106 * 41'
321
+ text: '建议尺寸:72 * 41'
322
322
  }
323
323
  ]
324
324
  }
@@ -162,7 +162,7 @@ Made in Italy` })));
162
162
  background: '#fff',
163
163
  borderRadius: '3px'
164
164
  }, onClick: () => setShow3DModal(true) },
165
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '60px' })))),
165
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
166
166
  renderCommodityGroup(),
167
167
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
168
168
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
@@ -301,7 +301,7 @@ export default [
301
301
  label: '弹窗按钮',
302
302
  type: 'Upload',
303
303
  name: ['props', 'iframeIcon'],
304
- text: '建议尺寸:106 * 41'
304
+ text: '建议尺寸:72 * 41'
305
305
  }
306
306
  ]
307
307
  }
@@ -8,11 +8,11 @@ const Iframe = (_a) => {
8
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"]);
9
9
  const { popupDetailData } = useSxpDataSource();
10
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(Object.assign({}, style), { height: isTel ? 664 : window === null || window === void 0 ? void 0 : window.innerHeight }))}` }, props),
11
+ return (React.createElement("div", Object.assign({ className: `${css(Object.assign({}, style))}` }, props),
12
12
  React.createElement("iframe", { src: iframeUrl, style: {
13
13
  width: '100%',
14
14
  height: 'calc(100% - 50px)',
15
- marginTop: '40px',
15
+ marginTop: '50px',
16
16
  border: 'none'
17
17
  } })));
18
18
  };
@@ -27,6 +27,20 @@ const Popup = () => {
27
27
  setVisible(popup);
28
28
  }
29
29
  }, [popup]);
30
+ const isFullScreen = (0, react_1.useMemo)(() => {
31
+ var _a, _b, _c, _d;
32
+ const valueItem = (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.find((value, index) => {
33
+ if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
34
+ return value;
35
+ }
36
+ });
37
+ if (valueItem !== -1 && ((_d = valueItem === null || valueItem === void 0 ? void 0 : valueItem.item) === null || _d === void 0 ? void 0 : _d.type) === 'Iframe') {
38
+ return true;
39
+ }
40
+ else {
41
+ return false;
42
+ }
43
+ }, [popup, schema]);
30
44
  const handleClose = () => {
31
45
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
32
46
  if (!popup ||
@@ -75,6 +89,6 @@ const Popup = () => {
75
89
  }
76
90
  });
77
91
  }, [schema, popup, resolver, handleClose]);
78
- return (react_1.default.createElement(Modal_1.default, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
92
+ return (react_1.default.createElement(Modal_1.default, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' }, isFullScreen: isFullScreen }, renderPopupDetail));
79
93
  };
80
94
  exports.default = Popup;
@@ -181,7 +181,7 @@ const CommodityDetail = (_a) => {
181
181
  background: '#fff',
182
182
  borderRadius: '3px'
183
183
  }, onClick: () => setShow3DModal(true) },
184
- react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '60px' })))),
184
+ react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
185
185
  renderCommodityGroup(),
186
186
  react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
187
187
  renderBtn(),
@@ -320,7 +320,7 @@ exports.default = [
320
320
  label: '弹窗按钮',
321
321
  type: 'Upload',
322
322
  name: ['props', 'iframeIcon'],
323
- text: '建议尺寸:106 * 41'
323
+ text: '建议尺寸:72 * 41'
324
324
  }
325
325
  ]
326
326
  }
@@ -164,7 +164,7 @@ Made in Italy` })));
164
164
  background: '#fff',
165
165
  borderRadius: '3px'
166
166
  }, onClick: () => setShow3DModal(true) },
167
- react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '60px' })))),
167
+ react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
168
168
  renderCommodityGroup(),
169
169
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
170
170
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
@@ -303,7 +303,7 @@ exports.default = [
303
303
  label: '弹窗按钮',
304
304
  type: 'Upload',
305
305
  name: ['props', 'iframeIcon'],
306
- text: '建议尺寸:106 * 41'
306
+ text: '建议尺寸:72 * 41'
307
307
  }
308
308
  ]
309
309
  }
@@ -10,11 +10,11 @@ const Iframe = (_a) => {
10
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"]);
11
11
  const { popupDetailData } = (0, hooks_1.useSxpDataSource)();
12
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(Object.assign({}, style), { height: isTel ? 664 : window === null || window === void 0 ? void 0 : window.innerHeight }))}` }, props),
13
+ return (react_1.default.createElement("div", Object.assign({ className: `${(0, css_1.css)(Object.assign({}, style))}` }, props),
14
14
  react_1.default.createElement("iframe", { src: iframeUrl, style: {
15
15
  width: '100%',
16
16
  height: 'calc(100% - 50px)',
17
- marginTop: '40px',
17
+ marginTop: '50px',
18
18
  border: 'none'
19
19
  } })));
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",