react-email-editor
Advanced tools
Comparing version 0.9.9 to 1.0.0
@@ -104,3 +104,3 @@ var _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; }; | ||
React.createElement(Script, { | ||
url: 'https://editor.unlayer.com/embed.js', | ||
url: 'https://editor.unlayer.com/embed.js?1', | ||
onLoad: this.unlayerReady | ||
@@ -107,0 +107,0 @@ }), |
@@ -116,3 +116,3 @@ 'use strict'; | ||
_react2.default.createElement(_reactLoadScript2.default, { | ||
url: 'https://editor.unlayer.com/embed.js', | ||
url: 'https://editor.unlayer.com/embed.js?1', | ||
onLoad: this.unlayerReady | ||
@@ -119,0 +119,0 @@ }), |
{ | ||
"name": "react-email-editor", | ||
"version": "0.9.9", | ||
"version": "1.0.0", | ||
"description": "Unlayer's Email Editor Component for React.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
/*! | ||
* react-email-editor v0.9.9 - https://github.com/unlayer/react-email-editor#readme | ||
* react-email-editor v1.0.0 - https://github.com/unlayer/react-email-editor#readme | ||
* MIT Licensed | ||
@@ -586,3 +586,3 @@ */ | ||
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_load_script__WEBPACK_IMPORTED_MODULE_1___default.a, { | ||
url: 'https://editor.unlayer.com/embed.js', | ||
url: 'https://editor.unlayer.com/embed.js?1', | ||
onLoad: this.unlayerReady | ||
@@ -589,0 +589,0 @@ }), |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.EmailEditor=t(require("react")):e.EmailEditor=t(e.React)}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),s=(n=i)&&n.__esModule?n:{default:n},c=r(6);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.scriptLoaderId="id"+r.constructor.idCount++,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Component),o(t,[{key:"componentDidMount",value:function(){var e,t,r,n=this.props,o=n.onError,i=n.onLoad,s=n.url;this.constructor.loadedScripts[s]?i():this.constructor.erroredScripts[s]?o():this.constructor.scriptObservers[s]?this.constructor.scriptObservers[s][this.scriptLoaderId]=this.props:(this.constructor.scriptObservers[s]=(e={},t=this.scriptLoaderId,r=this.props,t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e),this.createScript())}},{key:"componentWillUnmount",value:function(){var e=this.props.url,t=this.constructor.scriptObservers[e];t&&delete t[this.scriptLoaderId]}},{key:"createScript",value:function(){var e=this,t=this.props,r=t.onCreate,n=t.url,o=t.attributes,i=document.createElement("script");r(),o&&Object.keys(o).forEach(function(e){return i.setAttribute(e,o[e])}),i.src=n,i.hasAttribute("async")||(i.async=1);var s=function(t){var r=e.constructor.scriptObservers[n];Object.keys(r).forEach(function(o){t(r[o])&&delete e.constructor.scriptObservers[n][e.scriptLoaderId]})};i.onload=function(){e.constructor.loadedScripts[n]=!0,s(function(e){return e.onLoad(),!0})},i.onerror=function(){e.constructor.erroredScripts[n]=!0,s(function(e){return e.onError(),!0})},document.body.appendChild(i)}},{key:"render",value:function(){return null}}]),t}();a.propTypes={attributes:c.PropTypes.object,onCreate:c.PropTypes.func,onError:c.PropTypes.func.isRequired,onLoad:c.PropTypes.func.isRequired,url:c.PropTypes.string.isRequired},a.defaultProps={attributes:{},onCreate:function(){},onError:function(){},onLoad:function(){}},a.scriptObservers={},a.loadedScripts={},a.erroredScripts={},a.idCount=0,t.default=a,e.exports=t.default},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";var n=function(e){};e.exports=function(e,t,r,o,i,s,c,a){if(n(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,o,i,s,c,a],l=0;(u=new Error(t.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,r){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,r){"use strict";var n=r(4),o=r(3),i=r(2);e.exports=function(){function e(e,t,r,n,s,c){c!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){e.exports=r(5)()},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return u});var n=r(0),o=r.n(n),i=r(1),s=r.n(i),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=n=a(this,e.call.apply(e,[this].concat(i))),n.unlayerReady=function(){var e=n.props.options||{};n.props.projectId&&(e.projectId=n.props.projectId),n.props.tools&&(e.tools=n.props.tools),n.props.appearance&&(e.appearance=n.props.appearance),n.props.locale&&(e.locale=n.props.locale),unlayer.init(c({},e,{id:"editor",displayMode:"email"}));var t=Object.entries(n.props),r=Array.isArray(t),o=0;for(t=r?t:t[Symbol.iterator]();;){var i;if(r){if(o>=t.length)break;i=t[o++]}else{if((o=t.next()).done)break;i=o.value}var s=i,a=s[0],u=s[1];/^on/.test(a)&&"onLoad"!=a&&n.addEventListener(a,u)}var p=n.props.onLoad;p&&p()},n.registerCallback=function(e,t){unlayer.registerCallback(e,t)},n.addEventListener=function(e,t){unlayer.addEventListener(e,t)},n.loadDesign=function(e){unlayer.loadDesign(e)},n.saveDesign=function(e){unlayer.saveDesign(e)},n.exportHtml=function(e){unlayer.exportHtml(e)},n.setMergeTags=function(e){unlayer.setMergeTags(e)},a(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.minHeight,r=void 0===t?500:t,n=e.style,i=void 0===n?{}:n;return o.a.createElement("div",{style:{flex:1,display:"flex",minHeight:r}},o.a.createElement(s.a,{url:"https://editor.unlayer.com/embed.js",onLoad:this.unlayerReady}),o.a.createElement("div",{id:"editor",style:c({},i,{flex:1})}))},t}(n.Component)},function(e,t,r){e.exports=r(7)}]).default}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.EmailEditor=t(require("react")):e.EmailEditor=t(e.React)}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),s=(n=i)&&n.__esModule?n:{default:n},c=r(6);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.scriptLoaderId="id"+r.constructor.idCount++,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Component),o(t,[{key:"componentDidMount",value:function(){var e,t,r,n=this.props,o=n.onError,i=n.onLoad,s=n.url;this.constructor.loadedScripts[s]?i():this.constructor.erroredScripts[s]?o():this.constructor.scriptObservers[s]?this.constructor.scriptObservers[s][this.scriptLoaderId]=this.props:(this.constructor.scriptObservers[s]=(e={},t=this.scriptLoaderId,r=this.props,t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e),this.createScript())}},{key:"componentWillUnmount",value:function(){var e=this.props.url,t=this.constructor.scriptObservers[e];t&&delete t[this.scriptLoaderId]}},{key:"createScript",value:function(){var e=this,t=this.props,r=t.onCreate,n=t.url,o=t.attributes,i=document.createElement("script");r(),o&&Object.keys(o).forEach(function(e){return i.setAttribute(e,o[e])}),i.src=n,i.hasAttribute("async")||(i.async=1);var s=function(t){var r=e.constructor.scriptObservers[n];Object.keys(r).forEach(function(o){t(r[o])&&delete e.constructor.scriptObservers[n][e.scriptLoaderId]})};i.onload=function(){e.constructor.loadedScripts[n]=!0,s(function(e){return e.onLoad(),!0})},i.onerror=function(){e.constructor.erroredScripts[n]=!0,s(function(e){return e.onError(),!0})},document.body.appendChild(i)}},{key:"render",value:function(){return null}}]),t}();a.propTypes={attributes:c.PropTypes.object,onCreate:c.PropTypes.func,onError:c.PropTypes.func.isRequired,onLoad:c.PropTypes.func.isRequired,url:c.PropTypes.string.isRequired},a.defaultProps={attributes:{},onCreate:function(){},onError:function(){},onLoad:function(){}},a.scriptObservers={},a.loadedScripts={},a.erroredScripts={},a.idCount=0,t.default=a,e.exports=t.default},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";var n=function(e){};e.exports=function(e,t,r,o,i,s,c,a){if(n(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,o,i,s,c,a],l=0;(u=new Error(t.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,r){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,r){"use strict";var n=r(4),o=r(3),i=r(2);e.exports=function(){function e(e,t,r,n,s,c){c!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){e.exports=r(5)()},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return u});var n=r(0),o=r.n(n),i=r(1),s=r.n(i),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=n=a(this,e.call.apply(e,[this].concat(i))),n.unlayerReady=function(){var e=n.props.options||{};n.props.projectId&&(e.projectId=n.props.projectId),n.props.tools&&(e.tools=n.props.tools),n.props.appearance&&(e.appearance=n.props.appearance),n.props.locale&&(e.locale=n.props.locale),unlayer.init(c({},e,{id:"editor",displayMode:"email"}));var t=Object.entries(n.props),r=Array.isArray(t),o=0;for(t=r?t:t[Symbol.iterator]();;){var i;if(r){if(o>=t.length)break;i=t[o++]}else{if((o=t.next()).done)break;i=o.value}var s=i,a=s[0],u=s[1];/^on/.test(a)&&"onLoad"!=a&&n.addEventListener(a,u)}var p=n.props.onLoad;p&&p()},n.registerCallback=function(e,t){unlayer.registerCallback(e,t)},n.addEventListener=function(e,t){unlayer.addEventListener(e,t)},n.loadDesign=function(e){unlayer.loadDesign(e)},n.saveDesign=function(e){unlayer.saveDesign(e)},n.exportHtml=function(e){unlayer.exportHtml(e)},n.setMergeTags=function(e){unlayer.setMergeTags(e)},a(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.minHeight,r=void 0===t?500:t,n=e.style,i=void 0===n?{}:n;return o.a.createElement("div",{style:{flex:1,display:"flex",minHeight:r}},o.a.createElement(s.a,{url:"https://editor.unlayer.com/embed.js?1",onLoad:this.unlayerReady}),o.a.createElement("div",{id:"editor",style:c({},i,{flex:1})}))},t}(n.Component)},function(e,t,r){e.exports=r(7)}]).default}); | ||
//# sourceMappingURL=react-email-editor.min.js.map |
Sorry, the diff of this file is not supported yet
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
67888
1
0