UNPKG

@progress/kendo-vue-editor

Version:
9 lines (8 loc) 1.39 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-vue-inputs"),c=require("@progress/kendo-editor-common"),s=require("@progress/kendo-vue-intl"),p=require("../messages/main.js"),l=require("vue"),u=l.defineComponent({name:"KendoApplyColor",props:{view:Object,color:String,colorPickerProps:Object,commandName:String,dir:String,ariaLabel:String},inject:{kendoLocalizationService:{default:null}},render(){const{colorPickerProps:t,dir:e,ariaLabel:n}=this.$props,o=t.title,r=s.provideLocalizationService(this),i={...t,dir:e,showButtons:!1,showClearButton:!1,showPreview:!1,title:o&&r.toLanguageString(o,p.messages[o]),ariaLabel:n};return l.h(a.ColorPicker,{onChange:this.onChange,onActivecolorclick:this.onChange,...i})},methods:{onChange(t){const{view:e,color:n,colorPickerProps:o,commandName:r}=this.$props;if(e){c.applyInlineStyle({style:n,value:t.value},r)(e.state,e.dispatch);const{view:i="palette"}=o;i==="palette"&&e.focus()}}}});exports.ApplyColor=u;