@micromag/element-webview 0.3.147 → 0.3.152
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 +10 -10
- package/lib/index.js +10 -10
- package/package.json +4 -4
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-webview-container .micromag-element-webview-close{display:inline-block;position:relative;padding:0;border:0;background:rgba(0,0,0,0);color:inherit;font-family:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.micromag-element-webview-container{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:32px;height:32px;color:#222;-webkit-filter:invert(100%);filter:invert(100%)}.micromag-element-webview-container .micromag-element-webview-icon{width:1em;margin:0;padding:0;line-height:1}
|
|
1
|
+
.micromag-element-webview-container .micromag-element-webview-close{display:inline-block;position:relative;padding:0;border:0;background:rgba(0,0,0,0);color:inherit;font-family:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.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:32px;height:32px;color:#222;-webkit-filter:invert(100%);filter:invert(100%)}.micromag-element-webview-container .micromag-element-webview-icon{width:1em;margin:0;padding:0;line-height:1}
|
package/es/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import Button from '@micromag/element-button';
|
|
6
5
|
import { Close } from '@micromag/core/components';
|
|
6
|
+
import Button from '@micromag/element-button';
|
|
7
7
|
|
|
8
8
|
var styles = {"container":"micromag-element-webview-container","close":"micromag-element-webview-close","iframe":"micromag-element-webview-iframe","top":"micromag-element-webview-top","icon":"micromag-element-webview-icon"};
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ var propTypes = {
|
|
|
12
12
|
current: PropTypes.any // eslint-disable-line
|
|
13
13
|
|
|
14
14
|
})]),
|
|
15
|
-
|
|
15
|
+
url: PropTypes.string,
|
|
16
16
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
17
17
|
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
18
18
|
closeable: PropTypes.bool,
|
|
@@ -22,7 +22,7 @@ var propTypes = {
|
|
|
22
22
|
};
|
|
23
23
|
var defaultProps = {
|
|
24
24
|
iframeRef: null,
|
|
25
|
-
|
|
25
|
+
url: null,
|
|
26
26
|
width: null,
|
|
27
27
|
height: null,
|
|
28
28
|
closeable: false,
|
|
@@ -35,13 +35,13 @@ function WebView(_ref) {
|
|
|
35
35
|
var _ref2;
|
|
36
36
|
|
|
37
37
|
var iframeRef = _ref.iframeRef,
|
|
38
|
-
|
|
38
|
+
url = _ref.url,
|
|
39
39
|
width = _ref.width,
|
|
40
40
|
height = _ref.height,
|
|
41
41
|
closeable = _ref.closeable,
|
|
42
|
-
onClose = _ref.onClose
|
|
43
|
-
|
|
44
|
-
className = _ref.className;
|
|
42
|
+
onClose = _ref.onClose;
|
|
43
|
+
_ref.hidden;
|
|
44
|
+
var className = _ref.className;
|
|
45
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
46
|
className: classNames([styles.container, (_ref2 = {}, _defineProperty(_ref2, styles.closeable, closeable), _defineProperty(_ref2, className, className !== null), _ref2)]),
|
|
47
47
|
style: {
|
|
@@ -55,12 +55,12 @@ function WebView(_ref) {
|
|
|
55
55
|
onClick: onClose
|
|
56
56
|
}, /*#__PURE__*/React.createElement(Close, {
|
|
57
57
|
className: styles.closeIcon
|
|
58
|
-
}))) : null,
|
|
58
|
+
}))) : null, /*#__PURE__*/React.createElement("iframe", {
|
|
59
59
|
className: styles.iframe,
|
|
60
60
|
ref: iframeRef,
|
|
61
61
|
title: "Popup",
|
|
62
|
-
src:
|
|
63
|
-
})
|
|
62
|
+
src: url || 'about:blank'
|
|
63
|
+
}));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
WebView.propTypes = propTypes;
|
package/lib/index.js
CHANGED
|
@@ -4,8 +4,8 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
4
4
|
var classNames = require('classnames');
|
|
5
5
|
var PropTypes = require('prop-types');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var Button = require('@micromag/element-button');
|
|
8
7
|
var components = require('@micromag/core/components');
|
|
8
|
+
var Button = require('@micromag/element-button');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@ var propTypes = {
|
|
|
22
22
|
current: PropTypes__default["default"].any // eslint-disable-line
|
|
23
23
|
|
|
24
24
|
})]),
|
|
25
|
-
|
|
25
|
+
url: PropTypes__default["default"].string,
|
|
26
26
|
width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
27
27
|
height: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
28
28
|
closeable: PropTypes__default["default"].bool,
|
|
@@ -32,7 +32,7 @@ var propTypes = {
|
|
|
32
32
|
};
|
|
33
33
|
var defaultProps = {
|
|
34
34
|
iframeRef: null,
|
|
35
|
-
|
|
35
|
+
url: null,
|
|
36
36
|
width: null,
|
|
37
37
|
height: null,
|
|
38
38
|
closeable: false,
|
|
@@ -45,13 +45,13 @@ function WebView(_ref) {
|
|
|
45
45
|
var _ref2;
|
|
46
46
|
|
|
47
47
|
var iframeRef = _ref.iframeRef,
|
|
48
|
-
|
|
48
|
+
url = _ref.url,
|
|
49
49
|
width = _ref.width,
|
|
50
50
|
height = _ref.height,
|
|
51
51
|
closeable = _ref.closeable,
|
|
52
|
-
onClose = _ref.onClose
|
|
53
|
-
|
|
54
|
-
className = _ref.className;
|
|
52
|
+
onClose = _ref.onClose;
|
|
53
|
+
_ref.hidden;
|
|
54
|
+
var className = _ref.className;
|
|
55
55
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
56
56
|
className: classNames__default["default"]([styles.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles.closeable, closeable), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
|
|
57
57
|
style: {
|
|
@@ -65,12 +65,12 @@ function WebView(_ref) {
|
|
|
65
65
|
onClick: onClose
|
|
66
66
|
}, /*#__PURE__*/React__default["default"].createElement(components.Close, {
|
|
67
67
|
className: styles.closeIcon
|
|
68
|
-
}))) : null,
|
|
68
|
+
}))) : null, /*#__PURE__*/React__default["default"].createElement("iframe", {
|
|
69
69
|
className: styles.iframe,
|
|
70
70
|
ref: iframeRef,
|
|
71
71
|
title: "Popup",
|
|
72
|
-
src:
|
|
73
|
-
})
|
|
72
|
+
src: url || 'about:blank'
|
|
73
|
+
}));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
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.152",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.3.
|
|
56
|
-
"@micromag/element-button": "^0.3.
|
|
55
|
+
"@micromag/core": "^0.3.152",
|
|
56
|
+
"@micromag/element-button": "^0.3.152",
|
|
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": "23db6c104c10cc70a73366c8b04576a312a36206"
|
|
67
67
|
}
|