react-instagram-embed
Advanced tools
Comparing version 1.3.4 to 1.4.0
205
es/index.js
@@ -15,8 +15,14 @@ function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import React, { Component } from 'react'; | ||
@@ -32,3 +38,3 @@ import jsonp from 'jsonp-p'; | ||
function InstagramEmbed() { | ||
var _ref; | ||
var _getPrototypeOf2; | ||
@@ -39,7 +45,27 @@ var _temp, _this2; | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
_args[_key] = arguments[_key]; | ||
} | ||
return _possibleConstructorReturn(_this2, (_temp = _this2 = _possibleConstructorReturn(this, (_ref = InstagramEmbed.__proto__ || Object.getPrototypeOf(InstagramEmbed)).call.apply(_ref, [this].concat(args))), _initialiseProps.call(_assertThisInitialized(_this2)), _temp)); | ||
return _possibleConstructorReturn(_this2, (_temp = _this2 = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(InstagramEmbed)).call.apply(_getPrototypeOf2, [this].concat(_args))), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "jsonp", void 0), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "_timer", void 0), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "state", { | ||
__html: null | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "handleFetchSuccess", function (response) { | ||
_this2.props.onSuccess && _this2.props.onSuccess(response); | ||
_this2.setState({ | ||
__html: response.html | ||
}, function () { | ||
window.instgrm.Embeds.process(); | ||
_this2.props.onAfterRender && _this2.props.onAfterRender(); | ||
}); | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "handleFetchFailure", function () { | ||
var _this2$props; | ||
clearTimeout(_this2._timer); | ||
_this2.props.onFailure && (_this2$props = _this2.props).onFailure.apply(_this2$props, arguments); | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "cancel", function () { | ||
if (_this2.jsonp) { | ||
_this2.jsonp.cancel(); | ||
} | ||
}), _temp)); | ||
} | ||
@@ -55,11 +81,4 @@ | ||
} else { | ||
var protocolToUse = window.location.protocol.indexOf('file') === 0 ? this.props.protocol : ''; | ||
var s = document.createElement('script'); | ||
s.async = s.defer = true; | ||
s.src = "".concat(protocolToUse, "//platform.instagram.com/en_US/embeds.js"); | ||
s.id = 'react-instagram-embed-script'; | ||
var body = document.body; | ||
if (body) { | ||
body.appendChild(s); | ||
if (this.props.injectScript) { | ||
this.injectScript(); | ||
} | ||
@@ -73,13 +92,13 @@ | ||
}, { | ||
key: "componentWillReceiveProps", | ||
value: function componentWillReceiveProps(nextProps) { | ||
var _props = this.props, | ||
url = _props.url, | ||
hideCaption = _props.hideCaption, | ||
maxWidth = _props.maxWidth, | ||
containerTagName = _props.containerTagName; | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate(prevProps) { | ||
var _this$props = this.props, | ||
url = _this$props.url, | ||
hideCaption = _this$props.hideCaption, | ||
maxWidth = _this$props.maxWidth, | ||
containerTagName = _this$props.containerTagName; | ||
if (nextProps.url !== url || nextProps.hideCaption !== hideCaption || nextProps.maxWidth !== maxWidth || nextProps.containerTagName !== containerTagName) { | ||
if (prevProps.url !== url || prevProps.hideCaption !== hideCaption || prevProps.maxWidth !== maxWidth || prevProps.containerTagName !== containerTagName) { | ||
this.jsonp.cancel(); | ||
this.fetchEmbed(this.getQueryParams(nextProps)); | ||
this.fetchEmbed(this.getQueryParams(this.props)); | ||
} | ||
@@ -90,11 +109,11 @@ } | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
var _props2 = this.props, | ||
url = _props2.url, | ||
hideCaption = _props2.hideCaption, | ||
maxWidth = _props2.maxWidth, | ||
containerTagName = _props2.containerTagName, | ||
onLoading = _props2.onLoading, | ||
onSuccess = _props2.onSuccess, | ||
onAfterRender = _props2.onAfterRender, | ||
onFailure = _props2.onFailure; | ||
var _this$props2 = this.props, | ||
url = _this$props2.url, | ||
hideCaption = _this$props2.hideCaption, | ||
maxWidth = _this$props2.maxWidth, | ||
containerTagName = _this$props2.containerTagName, | ||
onLoading = _this$props2.onLoading, | ||
onSuccess = _this$props2.onSuccess, | ||
onAfterRender = _this$props2.onAfterRender, | ||
onFailure = _this$props2.onFailure; | ||
var __html = this.state.__html; | ||
@@ -127,13 +146,14 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
var _props3 = this.props, | ||
url = _props3.url, | ||
hideCaption = _props3.hideCaption, | ||
maxWidth = _props3.maxWidth, | ||
containerTagName = _props3.containerTagName, | ||
onLoading = _props3.onLoading, | ||
onSuccess = _props3.onSuccess, | ||
onAfterRender = _props3.onAfterRender, | ||
onFailure = _props3.onFailure, | ||
protocol = _props3.protocol, | ||
rest = _objectWithoutProperties(_props3, ["url", "hideCaption", "maxWidth", "containerTagName", "onLoading", "onSuccess", "onAfterRender", "onFailure", "protocol"]); | ||
var _this$props3 = this.props, | ||
url = _this$props3.url, | ||
hideCaption = _this$props3.hideCaption, | ||
maxWidth = _this$props3.maxWidth, | ||
containerTagName = _this$props3.containerTagName, | ||
onLoading = _this$props3.onLoading, | ||
onSuccess = _this$props3.onSuccess, | ||
onAfterRender = _this$props3.onAfterRender, | ||
onFailure = _this$props3.onFailure, | ||
protocol = _this$props3.protocol, | ||
injectScript = _this$props3.injectScript, | ||
rest = _objectWithoutProperties(_this$props3, ["url", "hideCaption", "maxWidth", "containerTagName", "onLoading", "onSuccess", "onAfterRender", "onFailure", "protocol", "injectScript"]); | ||
@@ -143,2 +163,16 @@ return rest; | ||
}, { | ||
key: "injectScript", | ||
value: function injectScript() { | ||
var protocolToUse = window.location.protocol.indexOf('file') === 0 ? this.props.protocol : ''; | ||
var s = document.createElement('script'); | ||
s.async = s.defer = true; | ||
s.src = "".concat(protocolToUse, "//platform.instagram.com/en_US/embeds.js"); | ||
s.id = 'react-instagram-embed-script'; | ||
var body = document.body; | ||
if (body) { | ||
body.appendChild(s); | ||
} | ||
} | ||
}, { | ||
key: "checkAPI", | ||
@@ -170,6 +204,6 @@ value: function checkAPI() { | ||
key: "getQueryParams", | ||
value: function getQueryParams(_ref2) { | ||
var url = _ref2.url, | ||
hideCaption = _ref2.hideCaption, | ||
maxWidth = _ref2.maxWidth; | ||
value: function getQueryParams(_ref) { | ||
var url = _ref.url, | ||
hideCaption = _ref.hideCaption, | ||
maxWidth = _ref.maxWidth; | ||
return qs.stringify({ | ||
@@ -187,74 +221,9 @@ url: url, | ||
Object.defineProperty(InstagramEmbed, "defaultProps", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: { | ||
hideCaption: false, | ||
containerTagName: 'div', | ||
protocol: 'https:' | ||
} | ||
_defineProperty(InstagramEmbed, "defaultProps", { | ||
hideCaption: false, | ||
containerTagName: 'div', | ||
protocol: 'https:', | ||
injectScript: true | ||
}); | ||
var _initialiseProps = function _initialiseProps() { | ||
var _this5 = this; | ||
Object.defineProperty(this, "jsonp", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, "_timer", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, "state", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: { | ||
__html: null | ||
} | ||
}); | ||
Object.defineProperty(this, "handleFetchSuccess", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value(response) { | ||
_this5.props.onSuccess && _this5.props.onSuccess(response); | ||
_this5.setState({ | ||
__html: response.html | ||
}, function () { | ||
window.instgrm.Embeds.process(); | ||
_this5.props.onAfterRender && _this5.props.onAfterRender(); | ||
}); | ||
} | ||
}); | ||
Object.defineProperty(this, "handleFetchFailure", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value() { | ||
var _this5$props; | ||
clearTimeout(_this5._timer); | ||
_this5.props.onFailure && (_this5$props = _this5.props).onFailure.apply(_this5$props, arguments); | ||
} | ||
}); | ||
Object.defineProperty(this, "cancel", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value() { | ||
if (_this5.jsonp) { | ||
_this5.jsonp.cancel(); | ||
} | ||
} | ||
}); | ||
}; | ||
export { InstagramEmbed as default }; |
206
lib/index.js
@@ -32,8 +32,14 @@ "use strict"; | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var InstagramEmbed = | ||
@@ -45,3 +51,3 @@ /*#__PURE__*/ | ||
function InstagramEmbed() { | ||
var _ref; | ||
var _getPrototypeOf2; | ||
@@ -52,7 +58,27 @@ var _temp, _this2; | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
_args[_key] = arguments[_key]; | ||
} | ||
return _possibleConstructorReturn(_this2, (_temp = _this2 = _possibleConstructorReturn(this, (_ref = InstagramEmbed.__proto__ || Object.getPrototypeOf(InstagramEmbed)).call.apply(_ref, [this].concat(args))), _initialiseProps.call(_assertThisInitialized(_this2)), _temp)); | ||
return _possibleConstructorReturn(_this2, (_temp = _this2 = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(InstagramEmbed)).call.apply(_getPrototypeOf2, [this].concat(_args))), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "jsonp", void 0), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "_timer", void 0), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "state", { | ||
__html: null | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "handleFetchSuccess", function (response) { | ||
_this2.props.onSuccess && _this2.props.onSuccess(response); | ||
_this2.setState({ | ||
__html: response.html | ||
}, function () { | ||
window.instgrm.Embeds.process(); | ||
_this2.props.onAfterRender && _this2.props.onAfterRender(); | ||
}); | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "handleFetchFailure", function () { | ||
var _this2$props; | ||
clearTimeout(_this2._timer); | ||
_this2.props.onFailure && (_this2$props = _this2.props).onFailure.apply(_this2$props, arguments); | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "cancel", function () { | ||
if (_this2.jsonp) { | ||
_this2.jsonp.cancel(); | ||
} | ||
}), _temp)); | ||
} | ||
@@ -68,11 +94,4 @@ | ||
} else { | ||
var protocolToUse = window.location.protocol.indexOf('file') === 0 ? this.props.protocol : ''; | ||
var s = document.createElement('script'); | ||
s.async = s.defer = true; | ||
s.src = "".concat(protocolToUse, "//platform.instagram.com/en_US/embeds.js"); | ||
s.id = 'react-instagram-embed-script'; | ||
var body = document.body; | ||
if (body) { | ||
body.appendChild(s); | ||
if (this.props.injectScript) { | ||
this.injectScript(); | ||
} | ||
@@ -86,13 +105,13 @@ | ||
}, { | ||
key: "componentWillReceiveProps", | ||
value: function componentWillReceiveProps(nextProps) { | ||
var _props = this.props, | ||
url = _props.url, | ||
hideCaption = _props.hideCaption, | ||
maxWidth = _props.maxWidth, | ||
containerTagName = _props.containerTagName; | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate(prevProps) { | ||
var _this$props = this.props, | ||
url = _this$props.url, | ||
hideCaption = _this$props.hideCaption, | ||
maxWidth = _this$props.maxWidth, | ||
containerTagName = _this$props.containerTagName; | ||
if (nextProps.url !== url || nextProps.hideCaption !== hideCaption || nextProps.maxWidth !== maxWidth || nextProps.containerTagName !== containerTagName) { | ||
if (prevProps.url !== url || prevProps.hideCaption !== hideCaption || prevProps.maxWidth !== maxWidth || prevProps.containerTagName !== containerTagName) { | ||
this.jsonp.cancel(); | ||
this.fetchEmbed(this.getQueryParams(nextProps)); | ||
this.fetchEmbed(this.getQueryParams(this.props)); | ||
} | ||
@@ -103,11 +122,11 @@ } | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
var _props2 = this.props, | ||
url = _props2.url, | ||
hideCaption = _props2.hideCaption, | ||
maxWidth = _props2.maxWidth, | ||
containerTagName = _props2.containerTagName, | ||
onLoading = _props2.onLoading, | ||
onSuccess = _props2.onSuccess, | ||
onAfterRender = _props2.onAfterRender, | ||
onFailure = _props2.onFailure; | ||
var _this$props2 = this.props, | ||
url = _this$props2.url, | ||
hideCaption = _this$props2.hideCaption, | ||
maxWidth = _this$props2.maxWidth, | ||
containerTagName = _this$props2.containerTagName, | ||
onLoading = _this$props2.onLoading, | ||
onSuccess = _this$props2.onSuccess, | ||
onAfterRender = _this$props2.onAfterRender, | ||
onFailure = _this$props2.onFailure; | ||
var __html = this.state.__html; | ||
@@ -140,13 +159,14 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
var _props3 = this.props, | ||
url = _props3.url, | ||
hideCaption = _props3.hideCaption, | ||
maxWidth = _props3.maxWidth, | ||
containerTagName = _props3.containerTagName, | ||
onLoading = _props3.onLoading, | ||
onSuccess = _props3.onSuccess, | ||
onAfterRender = _props3.onAfterRender, | ||
onFailure = _props3.onFailure, | ||
protocol = _props3.protocol, | ||
rest = _objectWithoutProperties(_props3, ["url", "hideCaption", "maxWidth", "containerTagName", "onLoading", "onSuccess", "onAfterRender", "onFailure", "protocol"]); | ||
var _this$props3 = this.props, | ||
url = _this$props3.url, | ||
hideCaption = _this$props3.hideCaption, | ||
maxWidth = _this$props3.maxWidth, | ||
containerTagName = _this$props3.containerTagName, | ||
onLoading = _this$props3.onLoading, | ||
onSuccess = _this$props3.onSuccess, | ||
onAfterRender = _this$props3.onAfterRender, | ||
onFailure = _this$props3.onFailure, | ||
protocol = _this$props3.protocol, | ||
injectScript = _this$props3.injectScript, | ||
rest = _objectWithoutProperties(_this$props3, ["url", "hideCaption", "maxWidth", "containerTagName", "onLoading", "onSuccess", "onAfterRender", "onFailure", "protocol", "injectScript"]); | ||
@@ -156,2 +176,16 @@ return rest; | ||
}, { | ||
key: "injectScript", | ||
value: function injectScript() { | ||
var protocolToUse = window.location.protocol.indexOf('file') === 0 ? this.props.protocol : ''; | ||
var s = document.createElement('script'); | ||
s.async = s.defer = true; | ||
s.src = "".concat(protocolToUse, "//platform.instagram.com/en_US/embeds.js"); | ||
s.id = 'react-instagram-embed-script'; | ||
var body = document.body; | ||
if (body) { | ||
body.appendChild(s); | ||
} | ||
} | ||
}, { | ||
key: "checkAPI", | ||
@@ -183,6 +217,6 @@ value: function checkAPI() { | ||
key: "getQueryParams", | ||
value: function getQueryParams(_ref2) { | ||
var url = _ref2.url, | ||
hideCaption = _ref2.hideCaption, | ||
maxWidth = _ref2.maxWidth; | ||
value: function getQueryParams(_ref) { | ||
var url = _ref.url, | ||
hideCaption = _ref.hideCaption, | ||
maxWidth = _ref.maxWidth; | ||
return _queryString.default.stringify({ | ||
@@ -201,72 +235,8 @@ url: url, | ||
exports.default = InstagramEmbed; | ||
Object.defineProperty(InstagramEmbed, "defaultProps", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: { | ||
hideCaption: false, | ||
containerTagName: 'div', | ||
protocol: 'https:' | ||
} | ||
}); | ||
var _initialiseProps = function _initialiseProps() { | ||
var _this5 = this; | ||
Object.defineProperty(this, "jsonp", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, "_timer", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, "state", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: { | ||
__html: null | ||
} | ||
}); | ||
Object.defineProperty(this, "handleFetchSuccess", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value(response) { | ||
_this5.props.onSuccess && _this5.props.onSuccess(response); | ||
_this5.setState({ | ||
__html: response.html | ||
}, function () { | ||
window.instgrm.Embeds.process(); | ||
_this5.props.onAfterRender && _this5.props.onAfterRender(); | ||
}); | ||
} | ||
}); | ||
Object.defineProperty(this, "handleFetchFailure", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value() { | ||
var _this5$props; | ||
clearTimeout(_this5._timer); | ||
_this5.props.onFailure && (_this5$props = _this5.props).onFailure.apply(_this5$props, arguments); | ||
} | ||
}); | ||
Object.defineProperty(this, "cancel", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value() { | ||
if (_this5.jsonp) { | ||
_this5.jsonp.cancel(); | ||
} | ||
} | ||
}); | ||
}; | ||
_defineProperty(InstagramEmbed, "defaultProps", { | ||
hideCaption: false, | ||
containerTagName: 'div', | ||
protocol: 'https:', | ||
injectScript: true | ||
}); |
{ | ||
"name": "react-instagram-embed", | ||
"version": "1.3.4", | ||
"version": "1.4.0", | ||
"description": "React embedding Instagram posts component", | ||
@@ -65,42 +65,42 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.40", | ||
"@babel/core": "^7.0.0-beta.40", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.40", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.40", | ||
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.40", | ||
"@babel/polyfill": "^7.0.0-beta.40", | ||
"@babel/preset-es2015": "^7.0.0-beta.40", | ||
"@babel/preset-es2016": "^7.0.0-beta.40", | ||
"@babel/preset-es2017": "^7.0.0-beta.40", | ||
"@babel/preset-react": "^7.0.0-beta.40", | ||
"@babel/register": "^7.0.0-beta.40", | ||
"ava": "^1.0.0-beta.3", | ||
"babel-eslint": "^8.2.2", | ||
"babel-loader": "^8.0.0-beta.2", | ||
"@babel/cli": "^7.0.0-beta.49", | ||
"@babel/core": "^7.0.0-beta.49", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.49", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.49", | ||
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.49", | ||
"@babel/polyfill": "^7.0.0-beta.49", | ||
"@babel/preset-es2015": "^7.0.0-beta.49", | ||
"@babel/preset-es2016": "^7.0.0-beta.49", | ||
"@babel/preset-es2017": "^7.0.0-beta.49", | ||
"@babel/preset-react": "^7.0.0-beta.49", | ||
"@babel/register": "^7.0.0-beta.49", | ||
"ava": "^1.0.0-beta.5.1", | ||
"babel-eslint": "^8.2.3", | ||
"babel-loader": "^8.0.0-beta.3", | ||
"browser-env": "^3.2.5", | ||
"css-loader": "^0.28.10", | ||
"eslint": "^4.18.2", | ||
"css-loader": "^0.28.11", | ||
"eslint": "^4.19.1", | ||
"eslint-plugin-ava": "^4.5.1", | ||
"eslint-plugin-babel": "^4.1.2", | ||
"eslint-plugin-flowtype": "^2.46.1", | ||
"eslint-plugin-react": "^7.7.0", | ||
"eslint-plugin-babel": "^5.1.0", | ||
"eslint-plugin-flowtype": "^2.49.3", | ||
"eslint-plugin-react": "^7.8.2", | ||
"flow-bin": "^0.66.0", | ||
"gh-pages": "^1.1.0", | ||
"gh-pages": "^1.2.0", | ||
"highlight.js": "^9.12.0", | ||
"html-webpack-plugin": "webpack-contrib/html-webpack-plugin", | ||
"html-webpack-plugin": "^3.2.0", | ||
"normalize.css": "^8.0.0", | ||
"nyc": "^11.4.1", | ||
"nyc": "^12.0.1", | ||
"raf": "^3.4.0", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"react": "^16.4.0", | ||
"react-dom": "^16.4.0", | ||
"react-ghfork": "^0.5.1", | ||
"react-hot-loader": "^4.0.0", | ||
"react-test-renderer": "^16.2.0", | ||
"style-loader": "^0.20.2", | ||
"uglifyjs-webpack-plugin": "^1.2.2", | ||
"webpack": "^4.0.1", | ||
"webpack-cli": "^2.0.10", | ||
"webpack-dev-server": "^3.1.0", | ||
"webpack-stylish": "^0.1.6" | ||
"react-hot-loader": "^4.2.0", | ||
"react-test-renderer": "^16.4.0", | ||
"style-loader": "^0.21.0", | ||
"uglifyjs-webpack-plugin": "^1.2.5", | ||
"webpack": "^4.10.2", | ||
"webpack-cli": "^3.0.1", | ||
"webpack-dev-server": "^3.1.4", | ||
"webpack-stylish": "^0.1.8" | ||
} | ||
} |
@@ -32,2 +32,3 @@ # react-instagram-embed | ||
protocol='' | ||
injectScript | ||
onLoading={() => {}} | ||
@@ -45,5 +46,6 @@ onSuccess={() => {}} | ||
- `hideCaption` {Boolean} Default `false` | ||
- `containerTagName` {String} Default `div` | ||
- `containerTagName` {String} Default `'div'` | ||
- `protocol` {String} Instagram API script protocol. Default `''` same as current protocol | ||
- This property needed if you use device's file system, for example, Electron, Cordova apps | ||
- `injectScript` {Boolean} Default `true` | ||
- `onLoading` {Function} | ||
@@ -50,0 +52,0 @@ - `onSuccess` {Function} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27213
70
394
1