@micromag/element-webview 0.3.42 → 0.3.47
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/assets/css/styles.css +1 -1
- package/es/index.js +9 -9
- package/lib/index.js +9 -10
- package/package.json +3 -3
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-webview-container{position:relative;background-color:#343434}.micromag-element-webview-container
|
|
1
|
+
.micromag-element-webview-container{position:relative;width:100%;height:100%;background-color:#343434}.micromag-element-webview-container .micromag-element-webview-iframe{display:block;width:100%;height:100%}.micromag-element-webview-container .micromag-element-webview-top{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;top:0;right:0;left:0;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;width:100%;padding:5px}.micromag-element-webview-container .micromag-element-webview-close{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:40px;height:40px;border:2px solid #fff;border-radius:50%;background-color:#343434}.micromag-element-webview-container .micromag-element-webview-icon{margin:0;padding:0;line-height:1}
|
package/es/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
2
|
import { faTimes } from '@fortawesome/free-solid-svg-icons';
|
|
4
3
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
@@ -41,13 +40,13 @@ function WebView(_ref) {
|
|
|
41
40
|
closeable = _ref.closeable,
|
|
42
41
|
onClose = _ref.onClose,
|
|
43
42
|
className = _ref.className;
|
|
44
|
-
|
|
45
|
-
width: width,
|
|
46
|
-
height: height
|
|
47
|
-
};
|
|
43
|
+
console.log(src, width, height);
|
|
48
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
45
|
className: classNames([styles.container, (_ref2 = {}, _defineProperty(_ref2, styles.closeable, closeable), _defineProperty(_ref2, className, className !== null), _ref2)]),
|
|
50
|
-
style:
|
|
46
|
+
style: {
|
|
47
|
+
width: width,
|
|
48
|
+
height: height
|
|
49
|
+
}
|
|
51
50
|
}, closeable ? /*#__PURE__*/React.createElement("div", {
|
|
52
51
|
className: styles.top
|
|
53
52
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -55,13 +54,14 @@ function WebView(_ref) {
|
|
|
55
54
|
onClick: onClose
|
|
56
55
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
57
56
|
className: styles.icon,
|
|
58
|
-
icon: faTimes
|
|
59
|
-
|
|
57
|
+
icon: faTimes,
|
|
58
|
+
size: "lg"
|
|
59
|
+
}))) : null, /*#__PURE__*/React.createElement("iframe", {
|
|
60
60
|
className: styles.iframe,
|
|
61
61
|
ref: iframeRef,
|
|
62
62
|
title: "Popup",
|
|
63
63
|
src: src
|
|
64
|
-
}
|
|
64
|
+
}));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
WebView.propTypes = propTypes;
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
4
|
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
6
5
|
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
@@ -11,7 +10,6 @@ var Button = require('@micromag/element-button');
|
|
|
11
10
|
|
|
12
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
12
|
|
|
14
|
-
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
15
13
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
16
14
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
17
15
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
@@ -52,13 +50,13 @@ function WebView(_ref) {
|
|
|
52
50
|
closeable = _ref.closeable,
|
|
53
51
|
onClose = _ref.onClose,
|
|
54
52
|
className = _ref.className;
|
|
55
|
-
|
|
56
|
-
width: width,
|
|
57
|
-
height: height
|
|
58
|
-
};
|
|
53
|
+
console.log(src, width, height);
|
|
59
54
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
60
55
|
className: classNames__default["default"]([styles.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles.closeable, closeable), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
|
|
61
|
-
style:
|
|
56
|
+
style: {
|
|
57
|
+
width: width,
|
|
58
|
+
height: height
|
|
59
|
+
}
|
|
62
60
|
}, closeable ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
63
61
|
className: styles.top
|
|
64
62
|
}, /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
|
|
@@ -66,13 +64,14 @@ function WebView(_ref) {
|
|
|
66
64
|
onClick: onClose
|
|
67
65
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
68
66
|
className: styles.icon,
|
|
69
|
-
icon: freeSolidSvgIcons.faTimes
|
|
70
|
-
|
|
67
|
+
icon: freeSolidSvgIcons.faTimes,
|
|
68
|
+
size: "lg"
|
|
69
|
+
}))) : null, /*#__PURE__*/React__default["default"].createElement("iframe", {
|
|
71
70
|
className: styles.iframe,
|
|
72
71
|
ref: iframeRef,
|
|
73
72
|
title: "Popup",
|
|
74
73
|
src: src
|
|
75
|
-
}
|
|
74
|
+
}));
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
WebView.propTypes = propTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-webview",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.47",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
55
|
"@micromag/core": "^0.3.42",
|
|
56
|
-
"@micromag/element-button": "^0.3.
|
|
56
|
+
"@micromag/element-button": "^0.3.45",
|
|
57
57
|
"classnames": "^2.2.6",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
59
59
|
"prop-types": "^15.7.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "b44bcdb32bc47ab435846f53d3a518f54ee57b32"
|
|
67
67
|
}
|