@avakhula/ui 0.0.505-alpha-spa.21 → 0.0.505-alpha-spa.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20901,7 +20901,8 @@ const v0 = {
20901
20901
  },
20902
20902
  mounted() {
20903
20903
  this.$nextTick(() => {
20904
- this.$refs.toolbar.classList.remove("ql-toolbar");
20904
+ var t;
20905
+ (t = this.$refs.toolbar) == null || t.classList.remove("ql-toolbar");
20905
20906
  });
20906
20907
  },
20907
20908
  methods: {
@@ -141,7 +141,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
141
141
  * Date: 2023-05-12T08:44:03.742Z
142
142
  */const Ia={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},W1=r.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:t=>["delta","html","text"].includes(t)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:t=>["snow","bubble",""].includes(t)},toolbar:{type:[String,Array,Object],required:!1,validator:t=>typeof t=="string"&&t!==""?t.charAt(0)==="#"?!0:Object.keys(Ia).indexOf(t)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(t,n)=>{r.onMounted(()=>{i()}),r.onBeforeUnmount(()=>{e=null});let e,o;const a=r.ref(),i=()=>{var C;if(a.value){if(o=l(),t.modules)if(Array.isArray(t.modules))for(const O of t.modules)Ee.register(`modules/${O.name}`,O.module);else Ee.register(`modules/${t.modules.name}`,t.modules.module);e=new Ee(a.value,o),w(t.content),e.on("text-change",f),e.on("selection-change",h),e.on("editor-change",v),t.theme!=="bubble"&&a.value.classList.remove("ql-bubble"),t.theme!=="snow"&&a.value.classList.remove("ql-snow"),(C=e.getModule("toolbar"))===null||C===void 0||C.container.addEventListener("mousedown",O=>{O.preventDefault()}),n.emit("ready",e)}},l=()=>{const C={};if(t.theme!==""&&(C.theme=t.theme),t.readOnly&&(C.readOnly=t.readOnly),t.placeholder&&(C.placeholder=t.placeholder),t.toolbar&&t.toolbar!==""&&(C.modules={toolbar:(()=>{if(typeof t.toolbar=="object")return t.toolbar;if(typeof t.toolbar=="string")return t.toolbar.charAt(0)==="#"?t.toolbar:Ia[t.toolbar]})()}),t.modules){const O=(()=>{var N,R;const q={};if(Array.isArray(t.modules))for(const W of t.modules)q[W.name]=(N=W.options)!==null&&N!==void 0?N:{};else q[t.modules.name]=(R=t.modules.options)!==null&&R!==void 0?R:{};return q})();C.modules=Object.assign({},C.modules,O)}return Object.assign({},t.globalOptions,t.options,C)},s=C=>typeof C=="object"&&C?C.slice():C,u=C=>Object.values(C.ops).some(O=>!O.retain||Object.keys(O).length!==1);let d;const p=C=>{if(typeof d==typeof C){if(C===d)return!0;if(typeof C=="object"&&C&&typeof d=="object"&&d)return!u(d.diff(C))}return!1},f=(C,O,N)=>{d=s(g()),p(t.content)||n.emit("update:content",d),n.emit("textChange",{delta:C,oldContents:O,source:N})},c=r.ref(),h=(C,O,N)=>{c.value=!!(e!=null&&e.hasFocus()),n.emit("selectionChange",{range:C,oldRange:O,source:N})};r.watch(c,C=>{C?n.emit("focus",a):n.emit("blur",a)});const v=(...C)=>{C[0]==="text-change"&&n.emit("editorChange",{name:C[0],delta:C[1],oldContents:C[2],source:C[3]}),C[0]==="selection-change"&&n.emit("editorChange",{name:C[0],range:C[1],oldRange:C[2],source:C[3]})},m=()=>a.value,_=()=>{var C;return(C=e==null?void 0:e.getModule("toolbar"))===null||C===void 0?void 0:C.container},y=()=>{if(e)return e;throw`The quill editor hasn't been instantiated yet,
143
143
  make sure to call this method when the editor ready
144
- or use v-on:ready="onReady(quill)" event instead.`},g=(C,O)=>t.contentType==="html"?T():t.contentType==="text"?b(C,O):e==null?void 0:e.getContents(C,O),w=(C,O="api")=>{const N=C||(t.contentType==="delta"?new G1:"");t.contentType==="html"?S(N):t.contentType==="text"?k(N,O):e==null||e.setContents(N,O),d=s(N)},b=(C,O)=>{var N;return(N=e==null?void 0:e.getText(C,O))!==null&&N!==void 0?N:""},k=(C,O="api")=>{e==null||e.setText(C,O)},T=()=>{var C;return(C=e==null?void 0:e.root.innerHTML)!==null&&C!==void 0?C:""},S=C=>{e&&(e.root.innerHTML=C)},x=(C,O="api")=>{const N=e==null?void 0:e.clipboard.convert(C);N&&(e==null||e.setContents(N,O))},M=()=>{e==null||e.focus()},E=()=>{r.nextTick(()=>{var C;!n.slots.toolbar&&e&&((C=e.getModule("toolbar"))===null||C===void 0||C.container.remove()),i()})};return r.watch(()=>t.content,C=>{if(!e||!C||p(C))return;const O=e.getSelection();O&&r.nextTick(()=>e==null?void 0:e.setSelection(O)),w(C)},{deep:!0}),r.watch(()=>t.enable,C=>{e&&e.enable(C)}),{editor:a,getEditor:m,getToolbar:_,getQuill:y,getContents:g,setContents:w,getHTML:T,setHTML:S,pasteHTML:x,focus:M,getText:b,setText:k,reinit:E}},render(){var t,n;return[(n=(t=this.$slots).toolbar)===null||n===void 0?void 0:n.call(t),r.h("div",{ref:"editor",...this.$attrs})]}}),sm="",Y1={props:{placeholders:{type:Array,default:[]},uid:{type:String,default:""},hiddenElements:{type:Array,default:()=>[]}},mounted(){this.$nextTick(()=>{this.$refs.toolbar.classList.remove("ql-toolbar")})},methods:{isElementHidden(t){return this.hiddenElements.includes(t)}},components:{IbIconButton:at,IbIcon:Le,IbDropdownList:wn}},Z1={class:"ib-toolbar toolbar",ref:"toolbar"},J1={class:"toolbar-group header-toolbar-group"},X1=r.createElementVNode("label",{class:"toolbar-group__label",for:"placeholders"},"Placeholder Selector",-1),Q1={id:"placeholders",class:"ql-placeholder"},e0=r.createElementVNode("option",{selected:"",value:"default",class:"disabled"},null,-1),t0=["value"],n0={key:0,class:"toolbar-group header-toolbar-group"},r0=["for"],i0=["id"],o0=[r.createStaticVNode('<option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option selected></option>',7)],a0={key:1,class:"toolbar-group header-toolbar-group"},l0=["for"],s0=["id"],c0=[r.createStaticVNode('<option value="12px">12 px</option><option value="14px">14 px</option><option value="16px">16 px</option><option value="20px">20 px</option><option value="24px">24 px</option><option value="36px">36 px</option><option value="48px">48 px</option>',7)],d0={class:"toolbar-group"},u0={class:"toolbar-group"},f0=["for"],h0=["id"],p0=["for"],m0=["id"],g0={class:"toolbar-group"},y0={class:"toolbar-group"},b0={class:"toolbar-group"},v0={key:2,class:"toolbar-group"};function _0(t,n,e,o,a,i){const l=r.resolveComponent("ib-icon-button"),s=r.resolveComponent("ib-icon"),u=r.resolveComponent("ib-dropdown-list");return r.openBlock(),r.createElementBlock("div",Z1,[r.withDirectives(r.createElementVNode("div",J1,[X1,r.createElementVNode("select",Q1,[e0,(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.placeholders,d=>(r.openBlock(),r.createElementBlock("option",{key:d.id,value:d.id},r.toDisplayString(d.label),9,t0))),128))])],512),[[r.vShow,e.placeholders.length]]),i.isElementHidden("header")?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",n0,[r.createElementVNode("label",{class:"toolbar-group__label",for:"header-selector"+e.uid},"Header Selector",8,r0),r.createElementVNode("select",{id:"header-selector"+e.uid,class:"ql-header"},o0,8,i0)])),i.isElementHidden("font-size")?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",a0,[r.createElementVNode("label",{class:"toolbar-group__label",for:"font-size-selector"+e.uid},"Font Size Selector",8,l0),r.createElementVNode("select",{id:"font-size-selector"+e.uid,class:"ql-size ql-header"},c0,8,s0)])),r.createElementVNode("div",d0,[i.isElementHidden("bold")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-bold",class:"toolbar-item ql-bold",kind:"ghost"})),i.isElementHidden("italic")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-italic",class:"toolbar-item ql-italic",kind:"ghost"})),i.isElementHidden("underline")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-underline",class:"toolbar-item ql-underline",kind:"ghost"})),i.isElementHidden("strike")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:3,"aria-label":"button-strike",class:"toolbar-item ql-strike",kind:"ghost"}))]),r.createElementVNode("div",u0,[r.createElementVNode("label",{class:"toolbar-group__label",for:"background-selector"+e.uid},"Background Selector",8,f0),r.createElementVNode("select",{id:"background-selector"+e.uid,class:"ql-background"},null,8,h0),r.createElementVNode("label",{class:"toolbar-group__label",for:"color-selector"+e.uid},"Background Color Selector",8,p0),r.createElementVNode("select",{id:"color-selector"+e.uid,class:"ql-color"},null,8,m0)]),r.createElementVNode("div",g0,[i.isElementHidden("code")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-code-block",class:"toolbar-item ql-code-block",kind:"ghost"})),i.isElementHidden("image")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-image",class:"toolbar-item ql-image",kind:"ghost"})),i.isElementHidden("link")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-link",class:"toolbar-item ql-link",kind:"ghost"}))]),r.createElementVNode("div",y0,[i.isElementHidden("align")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-align",class:"toolbar-item ql-align",kind:"ghost"})),i.isElementHidden("align-center")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-align-center",class:"ql-align toolbar-item",value:"center",kind:"ghost"})),i.isElementHidden("align-right")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-align-right",class:"ql-align toolbar-item",value:"right",kind:"ghost"})),i.isElementHidden("align-justify")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:3,"aria-label":"button-align-justify",class:"ql-align toolbar-item",value:"justify",kind:"ghost"}))]),r.createElementVNode("div",b0,[i.isElementHidden("ordered-list")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-ordered-list",class:"ql-list toolbar-item",value:"ordered",kind:"ghost"})),i.isElementHidden("bullet-list")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-bullet-list",class:"ql-list toolbar-item",value:"bullet",kind:"ghost"})),i.isElementHidden("alphabet-list")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-alphabet-list",class:"ql-alphabet-list alphabet-list toolbar-item",kind:"ghost"}))]),t.$slots.actions?(r.openBlock(),r.createElementBlock("div",v0,[r.createVNode(u,null,{trigger:r.withCtx(()=>[r.createVNode(l,{kind:"ghost"},{default:r.withCtx(()=>[r.createVNode(s,{name:"ellipsis-horizontal-sharp"})]),_:1})]),body:r.withCtx(()=>[r.renderSlot(t.$slots,"actions")]),_:3})])):r.createCommentVNode("",!0)],512)}const Pa=be(Y1,[["render",_0]]);function $0(t){return new DOMParser().parseFromString(t,"text/html").body.textContent||""}var Ma={exports:{}};(function(t,n){(function(o,a){t.exports=a()})(typeof self<"u"?self:je,function(){return function(e){var o={};function a(i){if(o[i])return o[i].exports;var l=o[i]={i,l:!1,exports:{}};return e[i].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=e,a.c=o,a.d=function(i,l,s){a.o(i,l)||Object.defineProperty(i,l,{configurable:!1,enumerable:!0,get:s})},a.n=function(i){var l=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(l,"a",l),l},a.o=function(i,l){return Object.prototype.hasOwnProperty.call(i,l)},a.p="",a(a.s=0)}([function(e,o,a){function i(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var l=a(1);function s(u,d){var p=u.import("parchment"),f=l.default(u);f.className=d&&d.className||"ql-placeholder-content",u.register(f);var c=function h(v,m){var _=this;i(this,h),this.quill=v,this.onTextChange=function(y,g,w){if(w===u.sources.USER){var b=_.quill.getContents(),k=b.diff(g),T=k.ops.filter(function(S){return S.insert&&S.insert.placeholder&&S.insert.placeholder.required}).length;T&&_.quill.updateContents(k,u.sources.SILENT)}},this.onClick=function(y){var g=p.find(y.target.parentNode);if(g instanceof f){var w=_.quill.getIndex(g);_.quill.setSelection(w,g.length(),u.sources.USER)}},this.toolbarHandler=function(y){var g=_.quill.getSelection(),w=_.placeholders.filter(function(b){return b.id===y})[0];if(!w)throw new Error("Missing placeholder for "+y);_.quill.deleteText(g.index,g.length),_.quill.insertEmbed(g.index,"placeholder",w,u.sources.USER),_.quill.setSelection(g.index+1,0)},this.placeholders=m.placeholders,f.delimiters=m.delimiters||["{","}"],this.quill.getModule("toolbar").addHandler("placeholder",this.toolbarHandler),this.quill.root.addEventListener("click",this.onClick),this.quill.on("text-change",this.onTextChange)};return c}o.default=s},function(e,o,a){var i=function(){function f(c,h){for(var v=0;v<h.length;v++){var m=h[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,m.key,m)}}return function(c,h,v){return h&&f(c.prototype,h),v&&f(c,v),c}}(),l=function f(c,h,v){c===null&&(c=Function.prototype);var m=Object.getOwnPropertyDescriptor(c,h);if(m===void 0){var _=Object.getPrototypeOf(c);return _===null?void 0:f(_,h,v)}else{if("value"in m)return m.value;var y=m.get;return y===void 0?void 0:y.call(v)}};function s(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}function u(f,c){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:f}function d(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(f,c):f.__proto__=c)}Object.defineProperty(o,"__esModule",{value:!0});function p(f){var c=f.import("blots/embed"),h=function(v){d(m,v);function m(){return s(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return i(m,[{key:"length",value:function(){return 1}},{key:"deleteAt",value:function(y,g){this.domNode.dataset.required||l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"deleteAt",this).call(this,y,g)}}],[{key:"create",value:function(y){var g=l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,y);y.required&&g.setAttribute("data-required","true"),g.setAttribute("data-id",y.id),g.setAttribute("data-label",y.label),g.setAttribute("spellcheck","false");var w=m.delimiters,b=typeof w=="string"?""+w+y.label+w:""+w[0]+y.label+(w[1]||w[0]),k=document.createTextNode(b);if(f.version<"1.3"){var T=document.createElement("span");T.setAttribute("contenteditable","false"),T.appendChild(k),g.appendChild(T)}else g.appendChild(k);return g}},{key:"value",value:function(y){return y.dataset}}]),m}(c);return h.blotName="placeholder",h.tagName="span",h}o.default=p}])})})(Ma);var w0=Ma.exports;const k0=Cn(w0),um="",C0=Ee.import("formats/list"),O0=Ee.import("formats/list/item"),E0=Ee.import("parchment");class _r extends O0{format(n,e){n===Yt.blotName&&!e?this.replaceWith(E0.create(this.statics.scope)):super.format(n,e)}clone(){const n=super.clone();return n.domNode.classList.remove("checked"),n}}_r.blotName="alphabet-list-item",_r.tagName="LI";class Yt extends C0{static create(){const n=super.create("bullet");return n.setAttribute("type","a"),n}static formats(){return"bullet"}}Yt.blotName="alphabet-list",Yt.tagName="OL",Yt.className="alphabet-list",Yt.defaultChild="alphabet-list-item",Yt.allowedChildren=[_r];const S0=Ee.import("formats/image");class bi extends S0{static create(n){const e=super.create(n);return e.setAttribute("data-supernova-id",n),e.setAttribute("src","#"),e}static value(n){return n.getAttribute("data-supernova-id")}}bi.blotName="custom-image",bi.tagName="img";const x0=`
144
+ or use v-on:ready="onReady(quill)" event instead.`},g=(C,O)=>t.contentType==="html"?T():t.contentType==="text"?b(C,O):e==null?void 0:e.getContents(C,O),w=(C,O="api")=>{const N=C||(t.contentType==="delta"?new G1:"");t.contentType==="html"?S(N):t.contentType==="text"?k(N,O):e==null||e.setContents(N,O),d=s(N)},b=(C,O)=>{var N;return(N=e==null?void 0:e.getText(C,O))!==null&&N!==void 0?N:""},k=(C,O="api")=>{e==null||e.setText(C,O)},T=()=>{var C;return(C=e==null?void 0:e.root.innerHTML)!==null&&C!==void 0?C:""},S=C=>{e&&(e.root.innerHTML=C)},x=(C,O="api")=>{const N=e==null?void 0:e.clipboard.convert(C);N&&(e==null||e.setContents(N,O))},M=()=>{e==null||e.focus()},E=()=>{r.nextTick(()=>{var C;!n.slots.toolbar&&e&&((C=e.getModule("toolbar"))===null||C===void 0||C.container.remove()),i()})};return r.watch(()=>t.content,C=>{if(!e||!C||p(C))return;const O=e.getSelection();O&&r.nextTick(()=>e==null?void 0:e.setSelection(O)),w(C)},{deep:!0}),r.watch(()=>t.enable,C=>{e&&e.enable(C)}),{editor:a,getEditor:m,getToolbar:_,getQuill:y,getContents:g,setContents:w,getHTML:T,setHTML:S,pasteHTML:x,focus:M,getText:b,setText:k,reinit:E}},render(){var t,n;return[(n=(t=this.$slots).toolbar)===null||n===void 0?void 0:n.call(t),r.h("div",{ref:"editor",...this.$attrs})]}}),sm="",Y1={props:{placeholders:{type:Array,default:[]},uid:{type:String,default:""},hiddenElements:{type:Array,default:()=>[]}},mounted(){this.$nextTick(()=>{var t;(t=this.$refs.toolbar)==null||t.classList.remove("ql-toolbar")})},methods:{isElementHidden(t){return this.hiddenElements.includes(t)}},components:{IbIconButton:at,IbIcon:Le,IbDropdownList:wn}},Z1={class:"ib-toolbar toolbar",ref:"toolbar"},J1={class:"toolbar-group header-toolbar-group"},X1=r.createElementVNode("label",{class:"toolbar-group__label",for:"placeholders"},"Placeholder Selector",-1),Q1={id:"placeholders",class:"ql-placeholder"},e0=r.createElementVNode("option",{selected:"",value:"default",class:"disabled"},null,-1),t0=["value"],n0={key:0,class:"toolbar-group header-toolbar-group"},r0=["for"],i0=["id"],o0=[r.createStaticVNode('<option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option selected></option>',7)],a0={key:1,class:"toolbar-group header-toolbar-group"},l0=["for"],s0=["id"],c0=[r.createStaticVNode('<option value="12px">12 px</option><option value="14px">14 px</option><option value="16px">16 px</option><option value="20px">20 px</option><option value="24px">24 px</option><option value="36px">36 px</option><option value="48px">48 px</option>',7)],d0={class:"toolbar-group"},u0={class:"toolbar-group"},f0=["for"],h0=["id"],p0=["for"],m0=["id"],g0={class:"toolbar-group"},y0={class:"toolbar-group"},b0={class:"toolbar-group"},v0={key:2,class:"toolbar-group"};function _0(t,n,e,o,a,i){const l=r.resolveComponent("ib-icon-button"),s=r.resolveComponent("ib-icon"),u=r.resolveComponent("ib-dropdown-list");return r.openBlock(),r.createElementBlock("div",Z1,[r.withDirectives(r.createElementVNode("div",J1,[X1,r.createElementVNode("select",Q1,[e0,(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.placeholders,d=>(r.openBlock(),r.createElementBlock("option",{key:d.id,value:d.id},r.toDisplayString(d.label),9,t0))),128))])],512),[[r.vShow,e.placeholders.length]]),i.isElementHidden("header")?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",n0,[r.createElementVNode("label",{class:"toolbar-group__label",for:"header-selector"+e.uid},"Header Selector",8,r0),r.createElementVNode("select",{id:"header-selector"+e.uid,class:"ql-header"},o0,8,i0)])),i.isElementHidden("font-size")?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",a0,[r.createElementVNode("label",{class:"toolbar-group__label",for:"font-size-selector"+e.uid},"Font Size Selector",8,l0),r.createElementVNode("select",{id:"font-size-selector"+e.uid,class:"ql-size ql-header"},c0,8,s0)])),r.createElementVNode("div",d0,[i.isElementHidden("bold")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-bold",class:"toolbar-item ql-bold",kind:"ghost"})),i.isElementHidden("italic")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-italic",class:"toolbar-item ql-italic",kind:"ghost"})),i.isElementHidden("underline")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-underline",class:"toolbar-item ql-underline",kind:"ghost"})),i.isElementHidden("strike")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:3,"aria-label":"button-strike",class:"toolbar-item ql-strike",kind:"ghost"}))]),r.createElementVNode("div",u0,[r.createElementVNode("label",{class:"toolbar-group__label",for:"background-selector"+e.uid},"Background Selector",8,f0),r.createElementVNode("select",{id:"background-selector"+e.uid,class:"ql-background"},null,8,h0),r.createElementVNode("label",{class:"toolbar-group__label",for:"color-selector"+e.uid},"Background Color Selector",8,p0),r.createElementVNode("select",{id:"color-selector"+e.uid,class:"ql-color"},null,8,m0)]),r.createElementVNode("div",g0,[i.isElementHidden("code")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-code-block",class:"toolbar-item ql-code-block",kind:"ghost"})),i.isElementHidden("image")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-image",class:"toolbar-item ql-image",kind:"ghost"})),i.isElementHidden("link")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-link",class:"toolbar-item ql-link",kind:"ghost"}))]),r.createElementVNode("div",y0,[i.isElementHidden("align")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-align",class:"toolbar-item ql-align",kind:"ghost"})),i.isElementHidden("align-center")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-align-center",class:"ql-align toolbar-item",value:"center",kind:"ghost"})),i.isElementHidden("align-right")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-align-right",class:"ql-align toolbar-item",value:"right",kind:"ghost"})),i.isElementHidden("align-justify")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:3,"aria-label":"button-align-justify",class:"ql-align toolbar-item",value:"justify",kind:"ghost"}))]),r.createElementVNode("div",b0,[i.isElementHidden("ordered-list")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:0,"aria-label":"button-ordered-list",class:"ql-list toolbar-item",value:"ordered",kind:"ghost"})),i.isElementHidden("bullet-list")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:1,"aria-label":"button-bullet-list",class:"ql-list toolbar-item",value:"bullet",kind:"ghost"})),i.isElementHidden("alphabet-list")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,"aria-label":"button-alphabet-list",class:"ql-alphabet-list alphabet-list toolbar-item",kind:"ghost"}))]),t.$slots.actions?(r.openBlock(),r.createElementBlock("div",v0,[r.createVNode(u,null,{trigger:r.withCtx(()=>[r.createVNode(l,{kind:"ghost"},{default:r.withCtx(()=>[r.createVNode(s,{name:"ellipsis-horizontal-sharp"})]),_:1})]),body:r.withCtx(()=>[r.renderSlot(t.$slots,"actions")]),_:3})])):r.createCommentVNode("",!0)],512)}const Pa=be(Y1,[["render",_0]]);function $0(t){return new DOMParser().parseFromString(t,"text/html").body.textContent||""}var Ma={exports:{}};(function(t,n){(function(o,a){t.exports=a()})(typeof self<"u"?self:je,function(){return function(e){var o={};function a(i){if(o[i])return o[i].exports;var l=o[i]={i,l:!1,exports:{}};return e[i].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=e,a.c=o,a.d=function(i,l,s){a.o(i,l)||Object.defineProperty(i,l,{configurable:!1,enumerable:!0,get:s})},a.n=function(i){var l=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(l,"a",l),l},a.o=function(i,l){return Object.prototype.hasOwnProperty.call(i,l)},a.p="",a(a.s=0)}([function(e,o,a){function i(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var l=a(1);function s(u,d){var p=u.import("parchment"),f=l.default(u);f.className=d&&d.className||"ql-placeholder-content",u.register(f);var c=function h(v,m){var _=this;i(this,h),this.quill=v,this.onTextChange=function(y,g,w){if(w===u.sources.USER){var b=_.quill.getContents(),k=b.diff(g),T=k.ops.filter(function(S){return S.insert&&S.insert.placeholder&&S.insert.placeholder.required}).length;T&&_.quill.updateContents(k,u.sources.SILENT)}},this.onClick=function(y){var g=p.find(y.target.parentNode);if(g instanceof f){var w=_.quill.getIndex(g);_.quill.setSelection(w,g.length(),u.sources.USER)}},this.toolbarHandler=function(y){var g=_.quill.getSelection(),w=_.placeholders.filter(function(b){return b.id===y})[0];if(!w)throw new Error("Missing placeholder for "+y);_.quill.deleteText(g.index,g.length),_.quill.insertEmbed(g.index,"placeholder",w,u.sources.USER),_.quill.setSelection(g.index+1,0)},this.placeholders=m.placeholders,f.delimiters=m.delimiters||["{","}"],this.quill.getModule("toolbar").addHandler("placeholder",this.toolbarHandler),this.quill.root.addEventListener("click",this.onClick),this.quill.on("text-change",this.onTextChange)};return c}o.default=s},function(e,o,a){var i=function(){function f(c,h){for(var v=0;v<h.length;v++){var m=h[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,m.key,m)}}return function(c,h,v){return h&&f(c.prototype,h),v&&f(c,v),c}}(),l=function f(c,h,v){c===null&&(c=Function.prototype);var m=Object.getOwnPropertyDescriptor(c,h);if(m===void 0){var _=Object.getPrototypeOf(c);return _===null?void 0:f(_,h,v)}else{if("value"in m)return m.value;var y=m.get;return y===void 0?void 0:y.call(v)}};function s(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}function u(f,c){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:f}function d(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(f,c):f.__proto__=c)}Object.defineProperty(o,"__esModule",{value:!0});function p(f){var c=f.import("blots/embed"),h=function(v){d(m,v);function m(){return s(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return i(m,[{key:"length",value:function(){return 1}},{key:"deleteAt",value:function(y,g){this.domNode.dataset.required||l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"deleteAt",this).call(this,y,g)}}],[{key:"create",value:function(y){var g=l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,y);y.required&&g.setAttribute("data-required","true"),g.setAttribute("data-id",y.id),g.setAttribute("data-label",y.label),g.setAttribute("spellcheck","false");var w=m.delimiters,b=typeof w=="string"?""+w+y.label+w:""+w[0]+y.label+(w[1]||w[0]),k=document.createTextNode(b);if(f.version<"1.3"){var T=document.createElement("span");T.setAttribute("contenteditable","false"),T.appendChild(k),g.appendChild(T)}else g.appendChild(k);return g}},{key:"value",value:function(y){return y.dataset}}]),m}(c);return h.blotName="placeholder",h.tagName="span",h}o.default=p}])})})(Ma);var w0=Ma.exports;const k0=Cn(w0),um="",C0=Ee.import("formats/list"),O0=Ee.import("formats/list/item"),E0=Ee.import("parchment");class _r extends O0{format(n,e){n===Yt.blotName&&!e?this.replaceWith(E0.create(this.statics.scope)):super.format(n,e)}clone(){const n=super.clone();return n.domNode.classList.remove("checked"),n}}_r.blotName="alphabet-list-item",_r.tagName="LI";class Yt extends C0{static create(){const n=super.create("bullet");return n.setAttribute("type","a"),n}static formats(){return"bullet"}}Yt.blotName="alphabet-list",Yt.tagName="OL",Yt.className="alphabet-list",Yt.defaultChild="alphabet-list-item",Yt.allowedChildren=[_r];const S0=Ee.import("formats/image");class bi extends S0{static create(n){const e=super.create(n);return e.setAttribute("data-supernova-id",n),e.setAttribute("src","#"),e}static value(n){return n.getAttribute("data-supernova-id")}}bi.blotName="custom-image",bi.tagName="img";const x0=`
145
145
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
146
146
  <path d="M6.31836 14.9023V5.09961H9.88672C10.9805 5.09961 11.8213 5.30013 12.4092 5.70117C12.9971 6.10221 13.291 6.66732 13.291 7.39648C13.291 7.92513 13.111 8.3877 12.751 8.78418C12.3955 9.18066 11.9398 9.45638 11.3838 9.61133V9.63867C12.0811 9.72526 12.637 9.98275 13.0518 10.4111C13.471 10.8395 13.6807 11.3613 13.6807 11.9766C13.6807 12.8743 13.3594 13.5876 12.7168 14.1162C12.0742 14.6403 11.1969 14.9023 10.085 14.9023H6.31836ZM8.52637 6.72656V9.05078H9.49707C9.9528 9.05078 10.3105 8.94141 10.5703 8.72266C10.8346 8.49935 10.9668 8.19401 10.9668 7.80664C10.9668 7.08659 10.429 6.72656 9.35352 6.72656H8.52637ZM8.52637 10.6914V13.2754H9.72266C10.2331 13.2754 10.6318 13.1569 10.9189 12.9199C11.2106 12.6829 11.3564 12.3594 11.3564 11.9492C11.3564 11.5573 11.2129 11.2497 10.9258 11.0264C10.6432 10.8031 10.2467 10.6914 9.73633 10.6914H8.52637Z" class="fill" fill="#1A1A1A"/>
147
147
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.505-alpha-spa.21",
3
+ "version": "0.0.505-alpha-spa.22",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -206,7 +206,7 @@ export default {
206
206
  },
207
207
  mounted() {
208
208
  this.$nextTick(() => {
209
- this.$refs.toolbar.classList.remove("ql-toolbar");
209
+ this.$refs.toolbar?.classList.remove("ql-toolbar");
210
210
  });
211
211
  },
212
212
  methods: {
@@ -1,5 +1,5 @@
1
1
  import { Quill } from "@vueup/vue-quill";
2
- import {AlphabetList, AlphabetListItem} from "./plugins/alphabetList";
2
+ import { AlphabetList, AlphabetListItem } from "./plugins/alphabetList";
3
3
  import CustomImageBlot from "./plugins/imageBlot";
4
4
  import {
5
5
  ALIGN_CENTER,