@micromag/element-webview 0.3.420 → 0.3.429
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 +1 -2
- package/lib/index.js +14 -23
- package/package.json +10 -4
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-webview-container .micromag-element-webview-close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;padding:0;position:relative}.micromag-element-webview-container{background-color:#343434;height:100%;position:relative;width:100%}.micromag-element-webview-container .micromag-element-webview-iframe{display:block;height:100%;width:100%}.micromag-element-webview-container .micromag-element-webview-top{-ms-flex-align:center;-ms-flex-pack:end;align-items:center;display:-ms-flexbox;display:flex;justify-content:flex-end;left:0;padding:5px;position:absolute;right:0;top:0;width:100%}.micromag-element-webview-container .micromag-element-webview-close{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;color:#222;display:-ms-flexbox;display:flex;-webkit-filter:invert(100%);filter:invert(100%);height:32px;justify-content:center;width:32px}.micromag-element-webview-container .micromag-element-webview-icon{line-height:1;margin:0;padding:0;width:1em}
|
|
1
|
+
.micromag-element-webview-container .micromag-element-webview-close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;padding:0;position:relative}.micromag-element-webview-container{background-color:#343434;height:100%;position:relative;width:100%}.micromag-element-webview-container .micromag-element-webview-iframe{display:block;height:100%;width:100%}.micromag-element-webview-container .micromag-element-webview-top{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:end;-ms-flex-pack:end;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;left:0;padding:5px;position:absolute;right:0;top:0;width:100%}.micromag-element-webview-container .micromag-element-webview-close{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:#222;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-filter:invert(100%);filter:invert(100%);height:32px;justify-content:center;width:32px}.micromag-element-webview-container .micromag-element-webview-icon{line-height:1;margin:0;padding:0;width:1em}
|
package/es/index.js
CHANGED
|
@@ -29,7 +29,6 @@ var defaultProps = {
|
|
|
29
29
|
className: null
|
|
30
30
|
};
|
|
31
31
|
function WebView(_ref) {
|
|
32
|
-
var _ref2;
|
|
33
32
|
var iframeRef = _ref.iframeRef,
|
|
34
33
|
url = _ref.url,
|
|
35
34
|
width = _ref.width,
|
|
@@ -38,7 +37,7 @@ function WebView(_ref) {
|
|
|
38
37
|
onClose = _ref.onClose,
|
|
39
38
|
className = _ref.className;
|
|
40
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
-
className: classNames([styles.container, (
|
|
40
|
+
className: classNames([styles.container, _defineProperty(_defineProperty({}, styles.closeable, closeable), className, className !== null)]),
|
|
42
41
|
style: {
|
|
43
42
|
width: width,
|
|
44
43
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -7,27 +7,19 @@ var React = require('react');
|
|
|
7
7
|
var components = require('@micromag/core/components');
|
|
8
8
|
var Button = require('@micromag/element-button');
|
|
9
9
|
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
13
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
14
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
-
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
17
|
-
|
|
18
10
|
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"};
|
|
19
11
|
|
|
20
12
|
var propTypes = {
|
|
21
|
-
iframeRef:
|
|
22
|
-
current:
|
|
13
|
+
iframeRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
14
|
+
current: PropTypes.any // eslint-disable-line
|
|
23
15
|
})]),
|
|
24
16
|
|
|
25
|
-
url:
|
|
26
|
-
width:
|
|
27
|
-
height:
|
|
28
|
-
closeable:
|
|
29
|
-
onClose:
|
|
30
|
-
className:
|
|
17
|
+
url: PropTypes.string,
|
|
18
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
19
|
+
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
20
|
+
closeable: PropTypes.bool,
|
|
21
|
+
onClose: PropTypes.func,
|
|
22
|
+
className: PropTypes.string
|
|
31
23
|
};
|
|
32
24
|
var defaultProps = {
|
|
33
25
|
iframeRef: null,
|
|
@@ -39,7 +31,6 @@ var defaultProps = {
|
|
|
39
31
|
className: null
|
|
40
32
|
};
|
|
41
33
|
function WebView(_ref) {
|
|
42
|
-
var _ref2;
|
|
43
34
|
var iframeRef = _ref.iframeRef,
|
|
44
35
|
url = _ref.url,
|
|
45
36
|
width = _ref.width,
|
|
@@ -47,20 +38,20 @@ function WebView(_ref) {
|
|
|
47
38
|
closeable = _ref.closeable,
|
|
48
39
|
onClose = _ref.onClose,
|
|
49
40
|
className = _ref.className;
|
|
50
|
-
return /*#__PURE__*/
|
|
51
|
-
className:
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: classNames([styles.container, _defineProperty(_defineProperty({}, styles.closeable, closeable), className, className !== null)]),
|
|
52
43
|
style: {
|
|
53
44
|
width: width,
|
|
54
45
|
height: height
|
|
55
46
|
}
|
|
56
|
-
}, closeable ? /*#__PURE__*/
|
|
47
|
+
}, closeable ? /*#__PURE__*/React.createElement("div", {
|
|
57
48
|
className: styles.top
|
|
58
|
-
}, /*#__PURE__*/
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
59
50
|
className: styles.close,
|
|
60
51
|
onClick: onClose
|
|
61
|
-
}, /*#__PURE__*/
|
|
52
|
+
}, /*#__PURE__*/React.createElement(components.Close, {
|
|
62
53
|
className: styles.closeIcon
|
|
63
|
-
}))) : null, /*#__PURE__*/
|
|
54
|
+
}))) : null, /*#__PURE__*/React.createElement("iframe", {
|
|
64
55
|
className: styles.iframe,
|
|
65
56
|
ref: iframeRef,
|
|
66
57
|
title: "Popup",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-webview",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.429",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"main": "lib/index.js",
|
|
34
34
|
"module": "es/index.js",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"require": "./lib/index.js",
|
|
38
|
+
"import": "./es/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
35
41
|
"files": [
|
|
36
42
|
"lib",
|
|
37
43
|
"es",
|
|
@@ -53,8 +59,8 @@
|
|
|
53
59
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
54
60
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
55
61
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
56
|
-
"@micromag/core": "^0.3.
|
|
57
|
-
"@micromag/element-button": "^0.3.
|
|
62
|
+
"@micromag/core": "^0.3.429",
|
|
63
|
+
"@micromag/element-button": "^0.3.429",
|
|
58
64
|
"classnames": "^2.2.6",
|
|
59
65
|
"lodash": "^4.17.21",
|
|
60
66
|
"prop-types": "^15.7.2",
|
|
@@ -65,5 +71,5 @@
|
|
|
65
71
|
"access": "public",
|
|
66
72
|
"registry": "https://registry.npmjs.org/"
|
|
67
73
|
},
|
|
68
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "f15e72b88ecfda4c54b87626513149b58572c52b"
|
|
69
75
|
}
|