UNPKG

@syncfusion/ej2-vue-image-editor

Version:
12 lines (11 loc) 7.25 kB
/*! * filename: ej2-vue-image-editor.umd.min.js * version : 31.1.21 * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-image-editor"),require("@syncfusion/ej2-vue-base"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-image-editor","@syncfusion/ej2-vue-base","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2ImageEditor,e.ej2VueBase,e.ej2Base)}(this,function(t,n,s,i){"use strict";var e=["isLazyUpdate","plugins","allowUndoRedo","cssClass","disabled","enablePersistence","enableRtl","finetuneSettings","fontFamily","height","imageSmoothingEnabled","isReadOnly","locale","quickAccessToolbarTemplate","selectionSettings","showQuickAccessToolbar","theme","toolbar","toolbarTemplate","uploadSettings","width","zoomSettings","beforeSave","click","created","cropping","destroyed","editComplete","fileOpened","finetuneValueChanging","flipping","frameChange","imageFiltering","panning","quickAccessToolbarItemClick","quickAccessToolbarOpen","resizing","rotating","saved","selectionChanging","shapeChange","shapeChanging","toolbarCreated","toolbarItemClicked","toolbarUpdating","zooming"],a=[],r=s.getProps({props:e}),c=r[0],r=r[1],o=Object.keys(r);o.push("modelchanged","update:modelValue");for(var u=0,d=a;u<d.length;u++)o.push("update:"+d[u]);var l=s.vueDefineComponent({name:"ImageEditorComponent",mixins:[s.ComponentBase],props:c,watch:r,emits:o,provide:function(){return{custom:this.custom}},data:function(){return{ej2Instances:new n.ImageEditor({}),propKeys:e,models:a,hasChildDirective:!1,hasInjectedModules:!1,tagMapper:{},tagNameMapper:{},isVue3:!s.isExecute,templateCollection:{}}},created:function(){this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(s.isExecute?e:s.gh)("div",t=i.isNullOrUndefined(this.$slots.default)?t:s.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,n=e;t<n.length;t++){var s=n[t],i=this.templateCollection[s];if(i&&i.length){for(var a=0,r=i;a<r.length;a++){var c=r[a];this.destroyPortals(c)}delete this.templateCollection[s]}}},setProperties:function(n,e){var s=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(n,e),n&&this.models&&this.models.length&&Object.keys(n).map(function(t){s.models.map(function(e){t!==e||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,n[t]):(s.$emit("update:"+t,n[t]),s.$emit("modelchanged",n[t])))})})},custom:function(){this.updated()},apply:function(){return this.ej2Instances.apply()},applyImageFilter:function(e){return this.ej2Instances.applyImageFilter(e)},bringForward:function(e){return this.ej2Instances.bringForward(e)},bringToFront:function(e){return this.ej2Instances.bringToFront(e)},canRedo:function(){return this.ej2Instances.canRedo()},canUndo:function(){return this.ej2Instances.canUndo()},clearImage:function(){return this.ej2Instances.clearImage()},clearSelection:function(e){return this.ej2Instances.clearSelection(e)},cloneShape:function(e){return this.ej2Instances.cloneShape(e)},crop:function(){return this.ej2Instances.crop()},deleteRedact:function(e){return this.ej2Instances.deleteRedact(e)},deleteShape:function(e){return this.ej2Instances.deleteShape(e)},destroy:function(){return this.ej2Instances.destroy()},discard:function(){return this.ej2Instances.discard()},drawArrow:function(e,t,n,s,i,a,r,c,o){return this.ej2Instances.drawArrow(e,t,n,s,i,a,r,c,o)},drawEllipse:function(e,t,n,s,i,a,r,c,o){return this.ej2Instances.drawEllipse(e,t,n,s,i,a,r,c,o)},drawFrame:function(e,t,n,s,i,a,r,c,o){return this.ej2Instances.drawFrame(e,t,n,s,i,a,r,c,o)},drawImage:function(e,t,n,s,i,a,r,c,o){return this.ej2Instances.drawImage(e,t,n,s,i,a,r,c,o)},drawLine:function(e,t,n,s,i,a,r){return this.ej2Instances.drawLine(e,t,n,s,i,a,r)},drawPath:function(e,t,n,s){return this.ej2Instances.drawPath(e,t,n,s)},drawRectangle:function(e,t,n,s,i,a,r,c,o,u){return this.ej2Instances.drawRectangle(e,t,n,s,i,a,r,c,o,u)},drawRedact:function(e,t,n,s,i,a){return this.ej2Instances.drawRedact(e,t,n,s,i,a)},drawText:function(e,t,n,s,i,a,r,c,o,u,d,l,h,f,p,g){return this.ej2Instances.drawText(e,t,n,s,i,a,r,c,o,u,d,l,h,f,p,g)},enableShapeDrawing:function(e,t){return this.ej2Instances.enableShapeDrawing(e,t)},enableTextEditing:function(){return this.ej2Instances.enableTextEditing()},export:function(e,t,n){return this.ej2Instances.export(e,t,n)},finetuneImage:function(e,t){return this.ej2Instances.finetuneImage(e,t)},flip:function(e){return this.ej2Instances.flip(e)},freehandDraw:function(e){return this.ej2Instances.freehandDraw(e)},getImageData:function(e){return this.ej2Instances.getImageData(e)},getImageDimension:function(){return this.ej2Instances.getImageDimension()},getImageFilter:function(e){return this.ej2Instances.getImageFilter(e)},getRedacts:function(){return this.ej2Instances.getRedacts()},getShapeSetting:function(e){return this.ej2Instances.getShapeSetting(e)},getShapeSettings:function(){return this.ej2Instances.getShapeSettings()},initialize:function(){return this.ej2Instances.initialize()},open:function(e,t,n){return this.ej2Instances.open(e,t,n)},pan:function(e,t,n){return this.ej2Instances.pan(e,t,n)},redo:function(){return this.ej2Instances.redo()},reset:function(){return this.ej2Instances.reset()},resize:function(e,t,n){return this.ej2Instances.resize(e,t,n)},rotate:function(e){return this.ej2Instances.rotate(e)},select:function(e,t,n,s,i){return this.ej2Instances.select(e,t,n,s,i)},selectRedact:function(e){return this.ej2Instances.selectRedact(e)},selectShape:function(e){return this.ej2Instances.selectShape(e)},sendBackward:function(e){return this.ej2Instances.sendBackward(e)},sendToBack:function(e){return this.ej2Instances.sendToBack(e)},straightenImage:function(e){return this.ej2Instances.straightenImage(e)},triggerEditCompleteEvent:function(e){return this.ej2Instances.triggerEditCompleteEvent(e)},undo:function(){return this.ej2Instances.undo()},update:function(){return this.ej2Instances.update()},updateRedact:function(e,t){return this.ej2Instances.updateRedact(e,t)},updateShape:function(e,t){return this.ej2Instances.updateShape(e,t)},zoom:function(e,t){return this.ej2Instances.zoom(e,t)}}}),h={name:"ejs-imageeditor",install:function(e){e.component(h.name,l)}};Object.keys(n).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),t.ImageEditorComponent=l,t.ImageEditorPlugin=h,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=ej2-vue-image-editor.umd.min.js.map