@invisionag/iris-react-animation
Advanced tools
Comparing version 1.0.8 to 1.0.10
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(require("@invisionag/iris-react-image-container"), require("dist/index.js"), require("lottie-web"), require("react")); | ||
module.exports = factory(require("@invisionag/iris-react-image-container"), require("lottie-web"), require("react")); | ||
else if(typeof define === 'function' && define.amd) | ||
define(["@invisionag/iris-react-image-container", "dist/index.js", "lottie-web", "react"], factory); | ||
define(["@invisionag/iris-react-image-container", "lottie-web", "react"], factory); | ||
else { | ||
var a = typeof exports === 'object' ? factory(require("@invisionag/iris-react-image-container"), require("dist/index.js"), require("lottie-web"), require("react")) : factory(root["@invisionag/iris-react-image-container"], root["dist/index.js"], root["lottie-web"], root["react"]); | ||
var a = typeof exports === 'object' ? factory(require("@invisionag/iris-react-image-container"), require("lottie-web"), require("react")) : factory(root["@invisionag/iris-react-image-container"], root["lottie-web"], root["react"]); | ||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; | ||
} | ||
})(global, function(__WEBPACK_EXTERNAL_MODULE__invisionag_iris_react_image_container__, __WEBPACK_EXTERNAL_MODULE_dist_index_js__, __WEBPACK_EXTERNAL_MODULE_lottie_web__, __WEBPACK_EXTERNAL_MODULE_react__) { | ||
})(global, function(__WEBPACK_EXTERNAL_MODULE__invisionag_iris_react_image_container__, __WEBPACK_EXTERNAL_MODULE_lottie_web__, __WEBPACK_EXTERNAL_MODULE_react__) { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
@@ -79,3 +79,3 @@ /******/ // The module cache | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); | ||
/******/ }) | ||
@@ -93,17 +93,6 @@ /************************************************************************/ | ||
"use strict"; | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultLottieOptions\", function() { return defaultLottieOptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Animation\", function() { return Animation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lottie_web__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lottie-web */ \"lottie-web\");\n/* harmony import */ var lottie_web__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lottie_web__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @invisionag/iris-react-image-container */ \"@invisionag/iris-react-image-container\");\n/* harmony import */ var _invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } 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; }\n\n\n\n\n\n\nvar defaultLottieOptions = {\n renderer: 'svg',\n loop: true,\n autoplay: true,\n rendererSettings: { viewBoxOnly: true }\n};\n\nvar Animation = function (_React$PureComponent) {\n _inherits(Animation, _React$PureComponent);\n\n function Animation() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Animation);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Animation.__proto__ || Object.getPrototypeOf(Animation)).call.apply(_ref, [this].concat(args))), _this), _this.loadAnimation = function () {\n if (typeof _this.ref === 'undefined') return;\n\n _this.animation = lottie_web__WEBPACK_IMPORTED_MODULE_1___default.a.loadAnimation(_extends({\n container: _this.ref,\n animationData: _this.props.data\n }, defaultLottieOptions, _this.props.lottieOptions));\n }, _this.destroyAnimation = function () {\n if (typeof _this.animation === 'undefined') return;\n\n _this.animation.destroy();\n }, _this.handleRef = function (ref) {\n _this.ref = ref;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Animation, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.loadAnimation();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (prevProps.data !== this.props.data || prevProps.lottieOptions !== this.props.lottieOptions) {\n this.destroyAnimation();\n this.loadAnimation();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.destroyAnimation();\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n data = _props.data,\n lottieOptions = _props.lottieOptions,\n props = _objectWithoutProperties(_props, ['children', 'data', 'lottieOptions']);\n\n if (typeof children !== 'function') return null;\n\n return children(_extends({}, props, {\n onRef: this.handleRef,\n animation: this.animation\n }));\n }\n }]);\n\n return Animation;\n}(react__WEBPACK_IMPORTED_MODULE_0___default.a.PureComponent);\n\nAnimation.defaultProps = {\n lottieOptions: {},\n children: function children(_ref2) {\n var onRef = _ref2.onRef,\n rest = _objectWithoutProperties(_ref2, ['onRef']);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2___default.a, _extends({ innerRef: onRef }, rest));\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Animation);\n\n//# sourceURL=Users/tobiaslengsholz/projects/iris/packages/react-animation/src/index.js"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultLottieOptions\", function() { return defaultLottieOptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Animation\", function() { return Animation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lottie_web__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lottie-web */ \"lottie-web\");\n/* harmony import */ var lottie_web__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lottie_web__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @invisionag/iris-react-image-container */ \"@invisionag/iris-react-image-container\");\n/* harmony import */ var _invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } 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; }\n\n\n\n\n\n\nvar defaultLottieOptions = {\n renderer: 'svg',\n loop: true,\n autoplay: true,\n rendererSettings: { viewBoxOnly: true }\n};\n\nvar Animation = function (_React$PureComponent) {\n _inherits(Animation, _React$PureComponent);\n\n function Animation() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Animation);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Animation.__proto__ || Object.getPrototypeOf(Animation)).call.apply(_ref, [this].concat(args))), _this), _this.loadAnimation = function () {\n if (typeof _this.ref === 'undefined') return;\n\n _this.animation = lottie_web__WEBPACK_IMPORTED_MODULE_1___default.a.loadAnimation(_extends({\n container: _this.ref,\n animationData: _this.props.data\n }, defaultLottieOptions, _this.props.lottieOptions));\n }, _this.destroyAnimation = function () {\n if (typeof _this.animation === 'undefined') return;\n\n _this.animation.destroy();\n }, _this.handleRef = function (ref) {\n _this.ref = ref;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Animation, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.loadAnimation();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (prevProps.data !== this.props.data || prevProps.lottieOptions !== this.props.lottieOptions) {\n this.destroyAnimation();\n this.loadAnimation();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.destroyAnimation();\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n data = _props.data,\n lottieOptions = _props.lottieOptions,\n props = _objectWithoutProperties(_props, ['children', 'data', 'lottieOptions']);\n\n if (typeof children !== 'function') return null;\n\n return children(_extends({}, props, {\n onRef: this.handleRef,\n animation: this.animation\n }));\n }\n }]);\n\n return Animation;\n}(react__WEBPACK_IMPORTED_MODULE_0___default.a.PureComponent);\n\nAnimation.defaultProps = {\n lottieOptions: {},\n children: function children(_ref2) {\n var onRef = _ref2.onRef,\n rest = _objectWithoutProperties(_ref2, ['onRef']);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_invisionag_iris_react_image_container__WEBPACK_IMPORTED_MODULE_2___default.a, _extends({ innerRef: onRef }, rest));\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Animation);\n\n//# sourceURL=webpack:///./src/index.js?"); | ||
/***/ }), | ||
/***/ 0: | ||
/*!******************************************!*\ | ||
!*** multi ./src/index.js dist/index.js ***! | ||
\******************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
eval("__webpack_require__(/*! /Users/tobiaslengsholz/projects/iris/packages/react-animation/src/index.js */\"./src/index.js\");\nmodule.exports = __webpack_require__(/*! dist/index.js */\"dist/index.js\");\n\n\n//# sourceURL=Users/tobiaslengsholz/projects/iris/packages/react-animation/multi_/Users/tobiaslengsholz/projects/iris/packages/react-animation/src/index.js_dist/index.js"); | ||
/***/ }), | ||
/***/ "@invisionag/iris-react-image-container": | ||
@@ -116,17 +105,6 @@ /*!*********************************************************!*\ | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE__invisionag_iris_react_image_container__;\n\n//# sourceURL=Users/tobiaslengsholz/projects/iris/packages/react-animation/external_%22@invisionag/iris-react-image-container%22"); | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE__invisionag_iris_react_image_container__;\n\n//# sourceURL=webpack:///external_%22@invisionag/iris-react-image-container%22?"); | ||
/***/ }), | ||
/***/ "dist/index.js": | ||
/*!********************************!*\ | ||
!*** external "dist/index.js" ***! | ||
\********************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports) { | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_dist_index_js__;\n\n//# sourceURL=Users/tobiaslengsholz/projects/iris/packages/react-animation/external_%22dist/index.js%22"); | ||
/***/ }), | ||
/***/ "lottie-web": | ||
@@ -139,3 +117,3 @@ /*!*****************************!*\ | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_lottie_web__;\n\n//# sourceURL=Users/tobiaslengsholz/projects/iris/packages/react-animation/external_%22lottie-web%22"); | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_lottie_web__;\n\n//# sourceURL=webpack:///external_%22lottie-web%22?"); | ||
@@ -151,3 +129,3 @@ /***/ }), | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_react__;\n\n//# sourceURL=Users/tobiaslengsholz/projects/iris/packages/react-animation/external_%22react%22"); | ||
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_react__;\n\n//# sourceURL=webpack:///external_%22react%22?"); | ||
@@ -154,0 +132,0 @@ /***/ }) |
{ | ||
"name": "@invisionag/iris-react-animation", | ||
"version": "1.0.8", | ||
"version": "1.0.10", | ||
"main": "dist/index.js", | ||
@@ -8,4 +8,4 @@ "license": "MIT", | ||
"scripts": { | ||
"watch": " webpack -w --progress --config ../../script/package.webpack.config.js src/index.js dist/index.js", | ||
"build:dist": "cross-env NODE_ENV=production webpack --config ../../script/package.webpack.config.js src/index.js dist/index.js", | ||
"watch": " webpack -w --progress --config ../../script/package.webpack.config.js src/index.js --o dist/index.js", | ||
"build:dist": "cross-env NODE_ENV=production webpack --config ../../script/package.webpack.config.js src/index.js --o dist/index.js", | ||
"build:flow": "flow-copy-source src -i '^!index**' dist", | ||
@@ -17,5 +17,5 @@ "build:clean": "rimraf dist", | ||
"dependencies": { | ||
"@invisionag/iris-react-image-container": "^1.0.8", | ||
"@invisionag/iris-settings": "^4.2.5", | ||
"@invisionag/iris-tools": "^3.0.15", | ||
"@invisionag/iris-react-image-container": "^1.0.10", | ||
"@invisionag/iris-settings": "^4.2.7", | ||
"@invisionag/iris-tools": "^3.0.17", | ||
"classnames": "^2.2.5", | ||
@@ -25,3 +25,3 @@ "lottie-web": "^5.1.15" | ||
"devDependencies": { | ||
"@invisionag/iris-colors": "^3.0.7", | ||
"@invisionag/iris-colors": "^3.0.9", | ||
"webpack": "^4.8.3" | ||
@@ -28,0 +28,0 @@ }, |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
4
18260
223