pb-sxp-ui 1.3.4 → 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;
@@ -170,7 +170,6 @@ const CommodityDetail = (_a) => {
170
170
  height: '100%'
171
171
  }), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
172
172
  (iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
173
- padding: '5px 10px',
174
173
  display: 'flex',
175
174
  alignItems: 'center',
176
175
  position: 'absolute',
@@ -180,7 +179,7 @@ const CommodityDetail = (_a) => {
180
179
  background: '#fff',
181
180
  borderRadius: '3px'
182
181
  }, onClick: () => setShow3DModal(true) },
183
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
182
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
184
183
  renderCommodityGroup(),
185
184
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
186
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
  }
@@ -153,7 +153,6 @@ Made in Italy` })));
153
153
  height: '100%'
154
154
  }), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
155
155
  (iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
156
- padding: '5px 10px',
157
156
  display: 'flex',
158
157
  alignItems: 'center',
159
158
  position: 'absolute',
@@ -163,7 +162,7 @@ Made in Italy` })));
163
162
  background: '#fff',
164
163
  borderRadius: '3px'
165
164
  }, onClick: () => setShow3DModal(true) },
166
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
165
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
167
166
  renderCommodityGroup(),
168
167
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
169
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;
@@ -172,7 +172,6 @@ const CommodityDetail = (_a) => {
172
172
  height: '100%'
173
173
  }), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
174
174
  (iframeUrl || !product) && iframeIcon && (react_1.default.createElement("div", { style: {
175
- padding: '5px 10px',
176
175
  display: 'flex',
177
176
  alignItems: 'center',
178
177
  position: 'absolute',
@@ -182,7 +181,7 @@ const CommodityDetail = (_a) => {
182
181
  background: '#fff',
183
182
  borderRadius: '3px'
184
183
  }, onClick: () => setShow3DModal(true) },
185
- react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
184
+ react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
186
185
  renderCommodityGroup(),
187
186
  react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
188
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
  }
@@ -155,7 +155,6 @@ Made in Italy` })));
155
155
  height: '100%'
156
156
  }), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
157
157
  (iframeUrl || !product) && iframeIcon && (react_1.default.createElement("div", { style: {
158
- padding: '5px 10px',
159
158
  display: 'flex',
160
159
  alignItems: 'center',
161
160
  position: 'absolute',
@@ -165,7 +164,7 @@ Made in Italy` })));
165
164
  background: '#fff',
166
165
  borderRadius: '3px'
167
166
  }, onClick: () => setShow3DModal(true) },
168
- react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
167
+ react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
169
168
  renderCommodityGroup(),
170
169
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
171
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.4",
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",