@olasearch/react-frame-portal
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -16,3 +16,4 @@ 'use strict'; | ||
document: undefined, | ||
window: undefined | ||
window: undefined, | ||
iframe: undefined | ||
}); | ||
@@ -19,0 +20,0 @@ var DocumentProvider = DocumentContext.Provider; |
@@ -117,3 +117,3 @@ 'use strict'; | ||
var initialRender = !this._setInitialContent; | ||
var contextValue = { document: doc, window: win }; | ||
var contextValue = { document: doc, window: win, iframe: this.node }; | ||
var contents = _react2.default.createElement( | ||
@@ -120,0 +120,0 @@ _Content2.default, |
@@ -24,9 +24,4 @@ 'use strict'; | ||
null, | ||
function (_ref) { | ||
var document = _ref.document, | ||
window = _ref.window; | ||
return _react2.default.createElement(WrappedComponent, _extends({}, props, { | ||
window: window, | ||
document: document | ||
})); | ||
function (values) { | ||
return _react2.default.createElement(WrappedComponent, _extends({}, props, values)); | ||
} | ||
@@ -33,0 +28,0 @@ ); |
{ | ||
"name": "@olasearch/react-frame-portal", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "React component to wrap your application or component in an iFrame for encapsulation purposes", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,3 +5,4 @@ import React from 'react'; | ||
document: undefined, | ||
window: undefined | ||
window: undefined, | ||
iframe: undefined | ||
}); | ||
@@ -8,0 +9,0 @@ const DocumentProvider = DocumentContext.Provider; |
@@ -97,3 +97,3 @@ import React, { Component } from 'react'; | ||
const initialRender = !this._setInitialContent; | ||
const contextValue = { document: doc, window: win }; | ||
const contextValue = { document: doc, window: win, iframe: this.node }; | ||
const contents = ( | ||
@@ -100,0 +100,0 @@ <Content contentDidMount={contentDidMount} contentDidUpdate={contentDidUpdate}> |
@@ -7,7 +7,6 @@ import React from 'react'; | ||
<DocumentConsumer> | ||
{({ document, window }) => ( | ||
{values => ( | ||
<WrappedComponent | ||
{...props} | ||
window={window} | ||
document={document} | ||
{...values} | ||
/>) | ||
@@ -14,0 +13,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2231913
19686