angular-email-editor
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"EmailEditorService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UnlayerOptions":{"__symbolic":"interface"},"EmailEditorComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":28,"character":1},"arguments":[{"selector":"email-editor","template":"<div [id]=\"editorId\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>","styles":[":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"]}]}],"members":{"editorId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"projectId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"tools":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"locale":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"minHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":3}}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"loadEditor":[{"__symbolic":"method"}],"loadDesign":[{"__symbolic":"method"}],"saveDesign":[{"__symbolic":"method"}],"exportHtml":[{"__symbolic":"method"}]}},"EmailEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"EmailEditorComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"EmailEditorComponent"}]}]}],"members":{}}},"origins":{"EmailEditorService":"./lib/email-editor.service","UnlayerOptions":"./lib/email-editor.component","EmailEditorComponent":"./lib/email-editor.component","EmailEditorModule":"./lib/email-editor.module"},"importAs":"angular-email-editor"} | ||
{"__symbolic":"module","version":4,"metadata":{"EmailEditorService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UnlayerOptions":{"__symbolic":"interface"},"EmailEditorComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":28,"character":1},"arguments":[{"selector":"email-editor","template":"<div [id]=\"id\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>\n","styles":[":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"]}]}],"members":{"editorId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"projectId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"tools":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"locale":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"minHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":45,"character":3}}]}],"ready":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":46,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"loadEditor":[{"__symbolic":"method"}],"loadDesign":[{"__symbolic":"method"}],"saveDesign":[{"__symbolic":"method"}],"exportHtml":[{"__symbolic":"method"}]}},"EmailEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"EmailEditorComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"EmailEditorComponent"}]}]}],"members":{}}},"origins":{"EmailEditorService":"./lib/email-editor.service","UnlayerOptions":"./lib/email-editor.component","EmailEditorComponent":"./lib/email-editor.component","EmailEditorModule":"./lib/email-editor.module"},"importAs":"angular-email-editor"} |
@@ -89,3 +89,3 @@ (function (global, factory) { | ||
var name = "angular-email-editor"; | ||
var version = "0.8.0"; | ||
var version = "0.9.0"; | ||
var peerDependencies = { | ||
@@ -107,2 +107,4 @@ "@angular/common": "^7.0.0", | ||
this.loaded = new i0.EventEmitter(); | ||
this.ready = new i0.EventEmitter(); | ||
this.id = this.editorId || "editor-" + ++lastEditorId; | ||
} | ||
@@ -114,2 +116,3 @@ EmailEditorComponent.prototype.ngOnInit = function () { }; | ||
EmailEditorComponent.prototype.loadEditor = function () { | ||
var _this = this; | ||
var options = this.options || {}; | ||
@@ -128,3 +131,3 @@ if (this.projectId) { | ||
} | ||
this.editor = unlayer.createEditor(__assign({}, options, { id: this.editorId || "editor-" + ++lastEditorId, displayMode: 'email', source: { | ||
this.editor = unlayer.createEditor(__assign({}, options, { id: this.id, displayMode: 'email', source: { | ||
name: pkg.name, | ||
@@ -134,2 +137,5 @@ version: pkg.version, | ||
this.loaded.emit({}); | ||
this.editor.addEventListener('editor:ready', function () { | ||
_this.ready.emit({}); | ||
}); | ||
}; | ||
@@ -149,6 +155,8 @@ EmailEditorComponent.prototype.loadDesign = function (data) { | ||
selector: 'email-editor', | ||
template: "<div [id]=\"editorId\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>", | ||
template: "<div [id]=\"id\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>\n", | ||
styles: [":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"] | ||
}] } | ||
]; | ||
/** @nocollapse */ | ||
EmailEditorComponent.ctorParameters = function () { return []; }; | ||
EmailEditorComponent.propDecorators = { | ||
@@ -161,4 +169,6 @@ editorId: [{ type: i0.Input }], | ||
locale: [{ type: i0.Input }], | ||
id: [{ type: i0.Input }], | ||
minHeight: [{ type: i0.Input }], | ||
loaded: [{ type: i0.Output }] | ||
loaded: [{ type: i0.Output }], | ||
ready: [{ type: i0.Output }] | ||
}; | ||
@@ -197,2 +207,2 @@ return EmailEditorComponent; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci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ByZXR1cm4gZXh0ZW5kU3RhdGljcyhkLCBiKTtcclxufTtcclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBfX2V4dGVuZHMoZCwgYikge1xyXG4gICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcclxuICAgIGZ1bmN0aW9uIF9fKCkgeyB0aGlzLmNvbnN0cnVjdG9yID0gZDsgfVxyXG4gICAgZC5wcm90b3R5cGUgPSBiID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShiKSA6IChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSwgbmV3IF9fKCkpO1xyXG59XHJcblxyXG5leHBvcnQgdmFyIF9fYXNzaWduID0gZnVuY3Rpb24oKSB7XHJcbiAgICBfX2Fzc2lnbiA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gX19hc3NpZ24odCkge1xyXG4gICAgICAgIGZvciAodmFyIHMsIGkgPSAxLCBuID0gYXJndW1lbnRzLmxlbmd0aDsgaSA8IG47IGkrKykge1xyXG4gICAgICAgICAgICBzID0gYXJndW1lbnRzW2ldO1xyXG4gICAgICAgICAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkpIHRbcF0gPSBzW3BdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXR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5kb25lKSByZXR1cm4gdDtcclxuICAgICAgICAgICAgaWYgKHkgPSAwLCB0KSBvcCA9IFtvcFswXSAmIDIsIHQudmFsdWVdO1xyXG4gICAgICAgICAgICBzd2l0Y2ggKG9wWzBdKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDA6IGNhc2UgMTogdCA9IG9wOyBicmVhaztcclxuICAgICAgICAgICAgICAgIGNhc2UgNDogXy5sYWJlbCsrOyByZXR1cm4geyB2YWx1ZTogb3BbMV0sIGRvbmU6IGZhbHNlIH07XHJcbiAgICAgICAgICAgICAgICBjYXNlIDU6IF8ubGFiZWwrKzsgeSA9IG9wWzFdOyBvcCA9IFswXTsgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDc6IG9wID0gXy5vcHMucG9wKCk7IF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghKHQgPSBfLnRyeXMsIHQgPSB0Lmxlbmd0aCA+IDAgJiYgdFt0Lmxlbmd0aCAtIDFdKSAmJiAob3BbMF0gPT09IDYgfHwgb3BbMF0gPT09IDIpKSB7IF8gPSAwOyBjb250aW51ZTsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gMyAmJiAoIXQgfHwgKG9wWzFdID4gdFswXSAmJiBvcFsxXSA8IHRbM10pKSkgeyBfLmxhYmVsID0gb3BbMV07IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSA2ICYmIF8ubGFiZWwgPCB0WzFdKSB7IF8ubGFiZWwgPSB0WzFdOyB0ID0gb3A7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHQgJiYgXy5sYWJlbCA8IHRbMl0pIHsgXy5sYWJlbCA9IHRbMl07IF8ub3BzLnB1c2gob3ApOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIG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BQ0xBLFFBQUs7eUJBQ0xBLFFBQUs7Z0NBRUxBLFFBQUs7NkJBRUxDLFNBQU07NEJBQ05BLFNBQU07O1FBNkRULDJCQUFDO0tBL0VEOzs7UUN6QkE7U0FNa0M7O29CQU5qQ0MsV0FBUSxTQUFDO3dCQUNSLFlBQVksRUFBRSxDQUFDLG9CQUFvQixDQUFDO3dCQUNwQyxPQUFPLEVBQUUsRUFDUjt3QkFDRCxPQUFPLEVBQUUsQ0FBQyxvQkFBb0IsQ0FBQztxQkFDaEM7O1FBQ2dDLHdCQUFDO0tBTmxDOztJQ0hBOztPQUVHOztJQ0ZIOztPQUVHOzs7Ozs7Ozs7Ozs7OzsifQ== |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("angular-email-editor",["exports","@angular/core"],e):e(t["angular-email-editor"]={},t.ng.core)}(this,function(t,e){"use strict";var o=function(){function t(){}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),i=function(){return(i=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},r="//editor.unlayer.com/embed.js?2",a=[],p=!1,d=function(){if(p)for(var t=void 0;t=a.shift();)t()},n=function(t){var e,o,i;if(e=t,a.push(e),o=document.querySelectorAll("script"),i=!1,o.forEach(function(t){t.src.includes(r)&&(i=!0)}),i)d();else{var n=document.createElement("script");n.setAttribute("src",r),n.onload=function(){p=!0,d()},document.head.appendChild(n)}},s="angular-email-editor",c="0.8.0",l=0,u=function(){function t(){this.options={},this.minHeight="500px",this.loaded=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){n(this.loadEditor.bind(this))},t.prototype.loadEditor=function(){var t=this.options||{};this.projectId&&(t.projectId=this.projectId),this.tools&&(t.tools=this.tools),this.appearance&&(t.appearance=this.appearance),this.locale&&(t.locale=this.locale),this.editor=unlayer.createEditor(i({},t,{id:this.editorId||"editor-"+ ++l,displayMode:"email",source:{name:s,version:c}})),this.loaded.emit({})},t.prototype.loadDesign=function(t){this.editor.loadDesign(t)},t.prototype.saveDesign=function(t){this.editor.saveDesign(t)},t.prototype.exportHtml=function(t){this.editor.exportHtml(t)},t.decorators=[{type:e.Component,args:[{selector:"email-editor",template:'<div [id]="editorId" class="unlayer-editor" [style.min-height]="minHeight"></div>',styles:[":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"]}]}],t.propDecorators={editorId:[{type:e.Input}],options:[{type:e.Input}],projectId:[{type:e.Input}],tools:[{type:e.Input}],appearance:[{type:e.Input}],locale:[{type:e.Input}],minHeight:[{type:e.Input}],loaded:[{type:e.Output}]},t}(),f=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[u],imports:[],exports:[u]}]}],t}();t.EmailEditorService=o,t.EmailEditorComponent=u,t.EmailEditorModule=f,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("angular-email-editor",["exports","@angular/core"],e):e(t["angular-email-editor"]={},t.ng.core)}(this,function(t,e){"use strict";var o=function(){function t(){}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),i=function(){return(i=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},r="//editor.unlayer.com/embed.js?2",a=[],d=!1,s=function(){if(d)for(var t=void 0;t=a.shift();)t()},n=function(t){var e,o,i;if(e=t,a.push(e),o=document.querySelectorAll("script"),i=!1,o.forEach(function(t){t.src.includes(r)&&(i=!0)}),i)s();else{var n=document.createElement("script");n.setAttribute("src",r),n.onload=function(){d=!0,s()},document.head.appendChild(n)}},p="angular-email-editor",c="0.9.0",l=0,u=function(){function t(){this.options={},this.minHeight="500px",this.loaded=new e.EventEmitter,this.ready=new e.EventEmitter,this.id=this.editorId||"editor-"+ ++l}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){n(this.loadEditor.bind(this))},t.prototype.loadEditor=function(){var t=this,e=this.options||{};this.projectId&&(e.projectId=this.projectId),this.tools&&(e.tools=this.tools),this.appearance&&(e.appearance=this.appearance),this.locale&&(e.locale=this.locale),this.editor=unlayer.createEditor(i({},e,{id:this.id,displayMode:"email",source:{name:p,version:c}})),this.loaded.emit({}),this.editor.addEventListener("editor:ready",function(){t.ready.emit({})})},t.prototype.loadDesign=function(t){this.editor.loadDesign(t)},t.prototype.saveDesign=function(t){this.editor.saveDesign(t)},t.prototype.exportHtml=function(t){this.editor.exportHtml(t)},t.decorators=[{type:e.Component,args:[{selector:"email-editor",template:'<div [id]="id" class="unlayer-editor" [style.min-height]="minHeight"></div>\n',styles:[":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={editorId:[{type:e.Input}],options:[{type:e.Input}],projectId:[{type:e.Input}],tools:[{type:e.Input}],appearance:[{type:e.Input}],locale:[{type:e.Input}],id:[{type:e.Input}],minHeight:[{type:e.Input}],loaded:[{type:e.Output}],ready:[{type:e.Output}]},t}(),f=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[u],imports:[],exports:[u]}]}],t}();t.EmailEditorService=o,t.EmailEditorComponent=u,t.EmailEditorModule=f,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=angular-email-editor.umd.min.js.map |
@@ -10,2 +10,4 @@ import { Component, Input, Output, EventEmitter, } from '@angular/core'; | ||
this.loaded = new EventEmitter(); | ||
this.ready = new EventEmitter(); | ||
this.id = this.editorId || `editor-${++lastEditorId}`; | ||
} | ||
@@ -30,3 +32,3 @@ ngOnInit() { } | ||
} | ||
this.editor = unlayer.createEditor(Object.assign({}, options, { id: this.editorId || `editor-${++lastEditorId}`, displayMode: 'email', source: { | ||
this.editor = unlayer.createEditor(Object.assign({}, options, { id: this.id, displayMode: 'email', source: { | ||
name: pkg.name, | ||
@@ -36,2 +38,5 @@ version: pkg.version, | ||
this.loaded.emit({}); | ||
this.editor.addEventListener('editor:ready', () => { | ||
this.ready.emit({}); | ||
}); | ||
} | ||
@@ -52,6 +57,8 @@ loadDesign(data) { | ||
selector: 'email-editor', | ||
template: "<div [id]=\"editorId\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>", | ||
template: "<div [id]=\"id\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>\n", | ||
styles: [":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"] | ||
}] } | ||
]; | ||
/** @nocollapse */ | ||
EmailEditorComponent.ctorParameters = () => []; | ||
EmailEditorComponent.propDecorators = { | ||
@@ -64,5 +71,7 @@ editorId: [{ type: Input }], | ||
locale: [{ type: Input }], | ||
id: [{ type: Input }], | ||
minHeight: [{ type: Input }], | ||
loaded: [{ type: Output }] | ||
loaded: [{ type: Output }], | ||
ready: [{ type: Output }] | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1haWwtZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItZW1haWwtZWRpdG9yLyIsInNvdXJjZXMiOlsibGliL2VtYWlsLWVkaXRvci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFHVCxLQUFLLEVBQ0wsTUFBTSxFQUNOLFlBQVksR0FDYixNQUFNLGVBQWUsQ0FBQztB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XIuY3JlYXRlRWRpdG9yKHtcbiAgICAgIC4uLm9wdGlvbnMsXG4gICAgICBpZDogdGhpcy5pZCxcbiAgICAgIGRpc3BsYXlNb2RlOiAnZW1haWwnLFxuICAgICAgc291cmNlOiB7XG4gICAgICAgIG5hbWU6IHBrZy5uYW1lLFxuICAgICAgICB2ZXJzaW9uOiBwa2cudmVyc2lvbixcbiAgICAgIH0sXG4gICAgfSk7XG5cbiAgICB0aGlzLmxvYWRlZC5lbWl0KHt9KTtcblxuICAgIHRoaXMuZWRpdG9yLmFkZEV2ZW50TGlzdGVuZXIoJ2VkaXRvcjpyZWFkeScsICgpID0+IHtcbiAgICAgIHRoaXMucmVhZHkuZW1pdCh7fSk7XG4gICAgfSk7XG4gIH1cblxuICBwdWJsaWMgbG9hZERlc2lnbihkYXRhOiBvYmplY3QpIHtcbiAgICB0aGlzLmVkaXRvci5sb2FkRGVzaWduKGRhdGEpO1xuICB9XG5cbiAgcHVibGljIHNhdmVEZXNpZ24oY2I6IChkYXRhOiBvYmplY3QpID0+IHZvaWQpIHtcbiAgICB0aGlzLmVkaXRvci5zYXZlRGVzaWduKGNiKTtcbiAgfVxuXG4gIHB1YmxpYyBleHBvcnRIdG1sKGNiOiAoZGF0YTogb2JqZWN0KSA9PiB2b2lkKSB7XG4gICAgdGhpcy5lZGl0b3IuZXhwb3J0SHRtbChjYik7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "angular-email-editor", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^7.0.0", |
@@ -11,2 +11,4 @@ import * as tslib_1 from "tslib"; | ||
this.loaded = new EventEmitter(); | ||
this.ready = new EventEmitter(); | ||
this.id = this.editorId || "editor-" + ++lastEditorId; | ||
} | ||
@@ -18,2 +20,3 @@ EmailEditorComponent.prototype.ngOnInit = function () { }; | ||
EmailEditorComponent.prototype.loadEditor = function () { | ||
var _this = this; | ||
var options = this.options || {}; | ||
@@ -32,3 +35,3 @@ if (this.projectId) { | ||
} | ||
this.editor = unlayer.createEditor(tslib_1.__assign({}, options, { id: this.editorId || "editor-" + ++lastEditorId, displayMode: 'email', source: { | ||
this.editor = unlayer.createEditor(tslib_1.__assign({}, options, { id: this.id, displayMode: 'email', source: { | ||
name: pkg.name, | ||
@@ -38,2 +41,5 @@ version: pkg.version, | ||
this.loaded.emit({}); | ||
this.editor.addEventListener('editor:ready', function () { | ||
_this.ready.emit({}); | ||
}); | ||
}; | ||
@@ -53,6 +59,8 @@ EmailEditorComponent.prototype.loadDesign = function (data) { | ||
selector: 'email-editor', | ||
template: "<div [id]=\"editorId\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>", | ||
template: "<div [id]=\"id\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>\n", | ||
styles: [":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"] | ||
}] } | ||
]; | ||
/** @nocollapse */ | ||
EmailEditorComponent.ctorParameters = function () { return []; }; | ||
EmailEditorComponent.propDecorators = { | ||
@@ -65,4 +73,6 @@ editorId: [{ type: Input }], | ||
locale: [{ type: Input }], | ||
id: [{ type: Input }], | ||
minHeight: [{ type: Input }], | ||
loaded: [{ type: Output }] | ||
loaded: [{ type: Output }], | ||
ready: [{ type: Output }] | ||
}; | ||
@@ -72,2 +82,2 @@ return EmailEditorComponent; | ||
export { EmailEditorComponent }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1haWwtZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItZW1haWwtZWRpdG9yLyIsInNvdXJjZXMiOlsibGliL2VtYWlsLWVkaXRvci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFDTCxTQUFTLEVBR1QsS0FBSyxFQUNMLE1BQU0sRUFDTixZQUFZLEdBQ2IsT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iAgICAgIG9wdGlvbnMuYXBwZWFyYW5jZSA9IHRoaXMuYXBwZWFyYW5jZTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5sb2NhbGUpIHtcbiAgICAgIG9wdGlvbnMubG9jYWxlID0gdGhpcy5sb2NhbGU7XG4gICAgfVxuXG4gICAgdGhpcy5lZGl0b3IgPSB1bmxheWVyLmNyZWF0ZUVkaXRvcih7XG4gICAgICAuLi5vcHRpb25zLFxuICAgICAgaWQ6IHRoaXMuaWQsXG4gICAgICBkaXNwbGF5TW9kZTogJ2VtYWlsJyxcbiAgICAgIHNvdXJjZToge1xuICAgICAgICBuYW1lOiBwa2cubmFtZSxcbiAgICAgICAgdmVyc2lvbjogcGtnLnZlcnNpb24sXG4gICAgICB9LFxuICAgIH0pO1xuXG4gICAgdGhpcy5sb2FkZWQuZW1pdCh7fSk7XG5cbiAgICB0aGlzLmVkaXRvci5hZGRFdmVudExpc3RlbmVyKCdlZGl0b3I6cmVhZHknLCAoKSA9PiB7XG4gICAgICB0aGlzLnJlYWR5LmVtaXQoe30pO1xuICAgIH0pO1xuICB9XG5cbiAgcHVibGljIGxvYWREZXNpZ24oZGF0YTogb2JqZWN0KSB7XG4gICAgdGhpcy5lZGl0b3IubG9hZERlc2lnbihkYXRhKTtcbiAgfVxuXG4gIHB1YmxpYyBzYXZlRGVzaWduKGNiOiAoZGF0YTogb2JqZWN0KSA9PiB2b2lkKSB7XG4gICAgdGhpcy5lZGl0b3Iuc2F2ZURlc2lnbihjYik7XG4gIH1cblxuICBwdWJsaWMgZXhwb3J0SHRtbChjYjogKGRhdGE6IG9iamVjdCkgPT4gdm9pZCkge1xuICAgIHRoaXMuZWRpdG9yLmV4cG9ydEh0bWwoY2IpO1xuICB9XG59XG4iXX0= |
{ | ||
"name": "angular-email-editor", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^7.0.0", |
@@ -56,3 +56,3 @@ import { Injectable, Component, Input, Output, EventEmitter, NgModule, defineInjectable } from '@angular/core'; | ||
var name = "angular-email-editor"; | ||
var version = "0.8.0"; | ||
var version = "0.9.0"; | ||
var peerDependencies = { | ||
@@ -74,2 +74,4 @@ "@angular/common": "^7.0.0", | ||
this.loaded = new EventEmitter(); | ||
this.ready = new EventEmitter(); | ||
this.id = this.editorId || `editor-${++lastEditorId}`; | ||
} | ||
@@ -94,3 +96,3 @@ ngOnInit() { } | ||
} | ||
this.editor = unlayer.createEditor(Object.assign({}, options, { id: this.editorId || `editor-${++lastEditorId}`, displayMode: 'email', source: { | ||
this.editor = unlayer.createEditor(Object.assign({}, options, { id: this.id, displayMode: 'email', source: { | ||
name: pkg.name, | ||
@@ -100,2 +102,5 @@ version: pkg.version, | ||
this.loaded.emit({}); | ||
this.editor.addEventListener('editor:ready', () => { | ||
this.ready.emit({}); | ||
}); | ||
} | ||
@@ -116,6 +121,8 @@ loadDesign(data) { | ||
selector: 'email-editor', | ||
template: "<div [id]=\"editorId\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>", | ||
template: "<div [id]=\"id\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>\n", | ||
styles: [":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"] | ||
}] } | ||
]; | ||
/** @nocollapse */ | ||
EmailEditorComponent.ctorParameters = () => []; | ||
EmailEditorComponent.propDecorators = { | ||
@@ -128,4 +135,6 @@ editorId: [{ type: Input }], | ||
locale: [{ type: Input }], | ||
id: [{ type: Input }], | ||
minHeight: [{ type: Input }], | ||
loaded: [{ type: Output }] | ||
loaded: [{ type: Output }], | ||
ready: [{ type: Output }] | ||
}; | ||
@@ -153,2 +162,2 @@ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1lbWFpbC1lZGl0b3IuanMubWFwIiwic291cmNlcyI6WyJuZzovL2FuZ3VsYXItZW1haWwtZWRpdG9yL2xpY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EtBQUs7cUJBRUwsTUFBTTtvQkFDTixNQUFNOzs7TUNyQ0ksaUJBQWlCOzs7WUFON0IsUUFBUSxTQUFDO2dCQUNSLFlBQVksRUFBRSxDQUFDLG9CQUFvQixDQUFDO2dCQUNwQyxPQUFPLEVBQUUsRUFDUjtnQkFDRCxPQUFPLEVBQUUsQ0FBQyxvQkFBb0IsQ0FBQzthQUNoQzs7O0FDUkQ7O0dBRUc7O0FDRkg7O0dBRUc7Ozs7In0= |
@@ -59,3 +59,3 @@ import { Injectable, NgModule, defineInjectable, EventEmitter, Component, Input, Output } from '@angular/core'; | ||
var name = "angular-email-editor"; | ||
var version = "0.8.0"; | ||
var version = "0.9.0"; | ||
var peerDependencies = { | ||
@@ -77,2 +77,4 @@ "@angular/common": "^7.0.0", | ||
this.loaded = new EventEmitter(); | ||
this.ready = new EventEmitter(); | ||
this.id = this.editorId || "editor-" + ++lastEditorId; | ||
} | ||
@@ -84,2 +86,3 @@ EmailEditorComponent.prototype.ngOnInit = function () { }; | ||
EmailEditorComponent.prototype.loadEditor = function () { | ||
var _this = this; | ||
var options = this.options || {}; | ||
@@ -98,3 +101,3 @@ if (this.projectId) { | ||
} | ||
this.editor = unlayer.createEditor(__assign({}, options, { id: this.editorId || "editor-" + ++lastEditorId, displayMode: 'email', source: { | ||
this.editor = unlayer.createEditor(__assign({}, options, { id: this.id, displayMode: 'email', source: { | ||
name: pkg.name, | ||
@@ -104,2 +107,5 @@ version: pkg.version, | ||
this.loaded.emit({}); | ||
this.editor.addEventListener('editor:ready', function () { | ||
_this.ready.emit({}); | ||
}); | ||
}; | ||
@@ -119,6 +125,8 @@ EmailEditorComponent.prototype.loadDesign = function (data) { | ||
selector: 'email-editor', | ||
template: "<div [id]=\"editorId\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>", | ||
template: "<div [id]=\"id\" class=\"unlayer-editor\" [style.min-height]=\"minHeight\"></div>\n", | ||
styles: [":host{flex:1;display:flex}.unlayer-editor{flex:1;display:flex}"] | ||
}] } | ||
]; | ||
/** @nocollapse */ | ||
EmailEditorComponent.ctorParameters = function () { return []; }; | ||
EmailEditorComponent.propDecorators = { | ||
@@ -131,4 +139,6 @@ editorId: [{ type: Input }], | ||
locale: [{ type: Input }], | ||
id: [{ type: Input }], | ||
minHeight: [{ type: Input }], | ||
loaded: [{ type: Output }] | ||
loaded: [{ type: Output }], | ||
ready: [{ type: Output }] | ||
}; | ||
@@ -161,2 +171,2 @@ return EmailEditorComponent; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1lbWFpbC1lZGl0b3IuanMubWFwIiwic291cmNlcyI6WyJuZzovL2FuZ3VsYXItZW1haWwtZWRpdG9yL2xpYi9lbWFpbC1lZGl0b3Iuc2VydmljZS50cyIsIm5nOi8vYW5ndWxhci1lbWFpbC1lZGl0b3IvbGliL2xvYWRTY3JpcHQudHMiLCJuZzovL2FuZ3VsYXItZW1haWwtZWRpdG9yL2xpYi9lbWFpbC1lZGl0b3IuY29tcG9uZW50LnRzIiwibmc6Ly9hbmd1bGFyLWVtYWlsLWVkaXRvci9saWIvZW1haWwtZWRpdG9yLm1vZHVsZS50cyIsIm5nOi8vYW5ndWxhci1lbWFpbC1lZGl0b3IvcHVibGljX2FwaS50cyIsIm5nOi8vYW5ndWxhci1lbWFpbC1lZGl0b3IvYW5ndWxhci1lbWFpbC1lZGl0b3IudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBFbWFpbEVkaXRvclNlcnZpY2Uge1xuXG4gIGNvbnN0cnVjdG9yKCkgeyB9XG59XG4iLCJjb25zdCBzY3JpcHRVcmwgPSAnLy9lZGl0b3IudW5sYXllci5jb20vZW1iZWQ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FBQyxDQUFDO0tBQ0o7SUFFTSx5Q0FBVSxHQUFqQixVQUFrQixJQUFZO1FBQzVCLElBQUksQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzlCO0lBRU0seUNBQVUsR0FBakIsVUFBa0IsRUFBMEI7UUFDMUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxVQUFVLENBQUMsRUFBRSxDQUFDLENBQUM7S0FDNUI7SUFFTSx5Q0FBVSxHQUFqQixVQUFrQixFQUEwQjtRQUMxQyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxFQUFFLENBQUMsQ0FBQztLQUM1Qjs7Z0JBOUVGLFNBQVMsU0FBQzs7b0JBRVQsUUFBUSxFQUFFLGNBQWM7b0JBQ3hCLCtGQUE0Qzs7aUJBRTdDOzs7OzsyQkFFRSxLQUFLOzBCQUNMLEtBQUs7NEJBQ0wsS0FBSzt3QkFDTCxLQUFLOzZCQUNMLEtBQUs7eUJBQ0wsS0FBSztxQkFDTCxLQUFLOzRCQUVMLEtBQUs7eUJBRUwsTUFBTTt3QkFDTixNQUFNOztJQTZEVCwyQkFBQztDQS9FRDs7O0lDekJBO0tBTWtDOztnQkFOakMsUUFBUSxTQUFDO29CQUNSLFlBQVksRUFBRSxDQUFDLG9CQUFvQixDQUFDO29CQUNwQyxPQUFPLEVBQUUsRUFDUjtvQkFDRCxPQUFPLEVBQUUsQ0FBQyxvQkFBb0IsQ0FBQztpQkFDaEM7O0lBQ2dDLHdCQUFDO0NBTmxDOztBQ0hBOztHQUVHOztBQ0ZIOztHQUVHOzs7OyJ9 |
@@ -15,5 +15,8 @@ import { OnInit, AfterViewInit, EventEmitter } from '@angular/core'; | ||
locale: string; | ||
id: string; | ||
minHeight: string; | ||
loaded: EventEmitter<{}>; | ||
ready: EventEmitter<{}>; | ||
editor: any; | ||
constructor(); | ||
ngOnInit(): void; | ||
@@ -20,0 +23,0 @@ ngAfterViewInit(): void; |
{ | ||
"name": "angular-email-editor", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^7.0.0", |
@@ -57,3 +57,5 @@ # Angular Email Editor | ||
// called when the editor is created | ||
editorLoaded() { | ||
console.log('editorLoaded'); | ||
// load the design json here | ||
@@ -63,2 +65,7 @@ // this.emailEditor.editor.loadDesign({}); | ||
// called when the editor has finished loading | ||
editorReady() { | ||
console.log('editorReady'); | ||
} | ||
exportHtml() { | ||
@@ -77,3 +84,6 @@ this.emailEditor.editor.exportHtml((data) => | ||
<button (click)="exportHtml()">Export</button> | ||
<email-editor (loaded)="editorLoaded($event)"></email-editor> | ||
<email-editor | ||
(loaded)="editorLoaded($event)" | ||
(ready)="editorReady($event)" | ||
></email-editor> | ||
</div> | ||
@@ -100,3 +110,4 @@ ``` | ||
- `projectId` `Integer` Unlayer project ID (optional) | ||
- `loaded` `Function` called when the editor has finished loading | ||
- `loaded` `Function` called when the editor instance is created | ||
- `ready` `Function` called when the editor has finished loading | ||
@@ -103,0 +114,0 @@ See the [Unlayer Docs](https://docs.unlayer.com/) for all available options. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
185826
859
125