react-email-editor
Advanced tools
Comparing version 1.7.9 to 1.7.10
@@ -26,3 +26,3 @@ 'use strict'; | ||
var name = "react-email-editor"; | ||
var version = "1.7.9"; | ||
var version = "1.7.10"; | ||
var description = "Unlayer's Email Editor Component for React.js"; | ||
@@ -29,0 +29,0 @@ var main = "dist/index.js"; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e;function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var r=[],i=!1,l=function(){if(i)for(var e;e=r.shift();)e()};window.__unlayer_lastEditorId=window.__unlayer_lastEditorId||0;var a=n.forwardRef((function(e,a){var d,u,c,s,f,p,v,y,E,m=e.onLoad,h=e.onReady,j=e.scriptUrl,_=e.minHeight,b=void 0===_?500:_,I=e.style,w=void 0===I?{}:I,O=t.useState(null),g=O[0],x=O[1],M=t.useState(!1),L=M[0],S=M[1],H=t.useMemo((function(){return e.editorId||"editor-"+ ++window.__unlayer_lastEditorId}),[e.editorId]),R=o({},e.options||{},{appearance:null!=(d=e.appearance)?d:null==(u=e.options)?void 0:u.appearance,displayMode:(null==e?void 0:e.displayMode)||(null==(c=e.options)?void 0:c.displayMode)||"email",locale:null!=(s=e.locale)?s:null==(f=e.options)?void 0:f.locale,projectId:null!=(p=e.projectId)?p:null==(v=e.options)?void 0:v.projectId,tools:null!=(y=e.tools)?y:null==(E=e.options)?void 0:E.tools,id:H,source:{name:"react-email-editor",version:"1.7.9"}});t.useImperativeHandle(a,(function(){return{editor:g}}),[g]),t.useEffect((function(){return function(){null==g||g.destroy()}}),[]),t.useEffect((function(){S(!1),function(e,t){if(void 0===t&&(t="https://editor.unlayer.com/embed.js?2"),r.push((function(){return S(!0)})),function(e){var t=document.querySelectorAll("script"),n=!1;return t.forEach((function(t){t.src.includes(e)&&(n=!0)})),n}(t))l();else{var n=document.createElement("script");n.setAttribute("src",t),n.onload=function(){i=!0,l()},document.head.appendChild(n)}}(0,j)}),[j]),t.useEffect((function(){L&&(null==g||g.destroy(),x(unlayer.createEditor(R)))}),[JSON.stringify(R),L]);var k=Object.keys(e).filter((function(e){return/^on/.test(e)}));return t.useEffect((function(){g&&(null==m||m(g),k.forEach((function(t){/^on/.test(t)&&"onLoad"!==t&&"onReady"!==t&&"function"==typeof e[t]&&g.addEventListener(t,e[t])})),h&&g.addEventListener("editor:ready",(function(){h(g)})))}),[g,Object.keys(k).join(",")]),n.createElement("div",{style:{flex:1,display:"flex",minHeight:b}},n.createElement("div",{id:H,style:o({},w,{flex:1})}))}));exports.EmailEditor=a,exports.default=a; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e;function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var r=[],i=!1,l=function(){if(i)for(var e;e=r.shift();)e()};window.__unlayer_lastEditorId=window.__unlayer_lastEditorId||0;var a=n.forwardRef((function(e,a){var d,u,c,s,f,p,v,y,E,m=e.onLoad,h=e.onReady,j=e.scriptUrl,_=e.minHeight,b=void 0===_?500:_,I=e.style,w=void 0===I?{}:I,O=t.useState(null),g=O[0],x=O[1],M=t.useState(!1),L=M[0],S=M[1],H=t.useMemo((function(){return e.editorId||"editor-"+ ++window.__unlayer_lastEditorId}),[e.editorId]),R=o({},e.options||{},{appearance:null!=(d=e.appearance)?d:null==(u=e.options)?void 0:u.appearance,displayMode:(null==e?void 0:e.displayMode)||(null==(c=e.options)?void 0:c.displayMode)||"email",locale:null!=(s=e.locale)?s:null==(f=e.options)?void 0:f.locale,projectId:null!=(p=e.projectId)?p:null==(v=e.options)?void 0:v.projectId,tools:null!=(y=e.tools)?y:null==(E=e.options)?void 0:E.tools,id:H,source:{name:"react-email-editor",version:"1.7.10"}});t.useImperativeHandle(a,(function(){return{editor:g}}),[g]),t.useEffect((function(){return function(){null==g||g.destroy()}}),[]),t.useEffect((function(){S(!1),function(e,t){if(void 0===t&&(t="https://editor.unlayer.com/embed.js?2"),r.push((function(){return S(!0)})),function(e){var t=document.querySelectorAll("script"),n=!1;return t.forEach((function(t){t.src.includes(e)&&(n=!0)})),n}(t))l();else{var n=document.createElement("script");n.setAttribute("src",t),n.onload=function(){i=!0,l()},document.head.appendChild(n)}}(0,j)}),[j]),t.useEffect((function(){L&&(null==g||g.destroy(),x(unlayer.createEditor(R)))}),[JSON.stringify(R),L]);var k=Object.keys(e).filter((function(e){return/^on/.test(e)}));return t.useEffect((function(){g&&(null==m||m(g),k.forEach((function(t){/^on/.test(t)&&"onLoad"!==t&&"onReady"!==t&&"function"==typeof e[t]&&g.addEventListener(t,e[t])})),h&&g.addEventListener("editor:ready",(function(){h(g)})))}),[g,Object.keys(k).join(",")]),n.createElement("div",{style:{flex:1,display:"flex",minHeight:b}},n.createElement("div",{id:H,style:o({},w,{flex:1})}))}));exports.EmailEditor=a,exports.default=a; | ||
//# sourceMappingURL=react-email-editor.cjs.production.min.js.map |
@@ -19,3 +19,3 @@ import React, { useState, useMemo, useImperativeHandle, useEffect } from 'react'; | ||
var name = "react-email-editor"; | ||
var version = "1.7.9"; | ||
var version = "1.7.10"; | ||
var description = "Unlayer's Email Editor Component for React.js"; | ||
@@ -22,0 +22,0 @@ var main = "dist/index.js"; |
{ | ||
"name": "react-email-editor", | ||
"version": "1.7.9", | ||
"version": "1.7.10", | ||
"description": "Unlayer's Email Editor Component for React.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
49133
0