mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
3 lines
21 KiB
JavaScript
Vendored
3 lines
21 KiB
JavaScript
Vendored
import{Q as p}from"./quill-hi.b7c37d93.js";function _(i,t,e){return t=v(t),j(i,P()?Reflect.construct(t,e||[],v(i).constructor):t.apply(i,e))}function P(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P=function(){return!!i})()}function k(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function T(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?k(Object(e),!0).forEach(function(n){w(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):k(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}function A(i,t){if(typeof i!="object"||!i)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var n=e.call(i,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function S(i){var t=A(i,"string");return typeof t=="symbol"?t:t+""}function C(i){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(i)}function N(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function O(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,S(n.key),n)}}function H(i,t,e){return t&&O(i.prototype,t),e&&O(i,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function w(i,t,e){return t=S(t),t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function x(){return x=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},x.apply(this,arguments)}function B(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),t&&E(i,t)}function v(i){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(i)}function E(i,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},E(i,t)}function D(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function j(i,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(i)}function R(i,t){for(;!Object.prototype.hasOwnProperty.call(i,t)&&(i=v(i),i!==null););return i}function b(){return typeof Reflect!="undefined"&&Reflect.get?b=Reflect.get.bind():b=function(t,e,n){var o=R(t,e);if(!!o){var s=Object.getOwnPropertyDescriptor(o,e);return s.get?s.get.call(arguments.length<3?t:n):s.value}},b.apply(this,arguments)}function q(i,t){if(!!i){if(typeof i=="string")return L(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return L(i,t)}}function L(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=i[e];return n}function V(i,t){var e=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(!e){if(Array.isArray(i)||(e=q(i))||t&&i&&typeof i.length=="number"){e&&(i=e);var n=0,o=function(){};return{s:o,n:function(){return n>=i.length?{done:!0}:{done:!1,value:i[n++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,r=!1,a;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return s=l.done,l},e:function(l){r=!0,a=l},f:function(){try{!s&&e.return!=null&&e.return()}finally{if(r)throw a}}}}var c={TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",UP:"ArrowUp",DOWN:"ArrowDown"};function Q(i,t,e){var n=i;return Object.keys(t).forEach(function(o){e.indexOf(o)>-1?n.dataset[o]=t[o]:delete n.dataset[o]}),n}function M(i,t){t!==null&&(C(t)==="object"?i.appendChild(t):i.innerHTML=t)}function W(i,t,e,n){return t.reduce(function(o,s){var r;if(e&&n){var a=new RegExp("^".concat(s,"|\\s").concat(s),"g"),l=(i.match(a)||[]).pop();if(!l)return{mentionChar:o.mentionChar,mentionCharIndex:o.mentionCharIndex};r=l!==s?i.lastIndexOf(l)+l.length-s.length:0}else r=i.lastIndexOf(s);return r>o.mentionCharIndex?{mentionChar:s,mentionCharIndex:r}:{mentionChar:o.mentionChar,mentionCharIndex:o.mentionCharIndex}},{mentionChar:null,mentionCharIndex:-1})}function U(i,t){return t.test(i)}function K(i,t,e,n){if(i===-1)return!1;if(!e)return!0;var o=i?t[i-1]:n;return!o||!!o.match(/\s/)}function J(i){return C(i)!=="object"||i===null?i:JSON.parse(JSON.stringify(i))}var z=p.import("blots/embed"),I=function(i){function t(e,n){var o;return N(this,t),o=_(this,t,[e,n]),w(o,"hoverHandler",void 0),w(o,"hoverHandler",void 0),o.clickHandler=null,o.hoverHandler=null,o.mounted=!1,o}return B(t,i),H(t,[{key:"update",value:function(n,o){var s=this;if(t.isAndroid()){var r=V(n),a;try{for(r.s();!(a=r.n()).done;){var l=a.value;if(!(l.type==="attributes"&&l.attributeName==="contenteditable")){setTimeout(function(){return s.remove()},0);return}}}catch(h){r.e(h)}finally{r.f()}}else n.forEach(function(h){if(h.type==="characterData"&&(h.target===s.leftGuard||h.target===s.rightGuard)){var f=s.restore(h.target);f&&(o.range=f)}})}},{key:"attach",value:function(){b(v(t.prototype),"attach",this).call(this),this.mounted||(this.mounted=!0,this.clickHandler=this.getClickHandler(),this.hoverHandler=this.getHoverHandler(),this.domNode.addEventListener("click",this.clickHandler,!1),this.domNode.addEventListener("mouseenter",this.hoverHandler,!1))}},{key:"detach",value:function(){b(v(t.prototype),"detach",this).call(this),this.mounted=!1,this.clickHandler&&(this.domNode.removeEventListener("click",this.clickHandler),this.clickHandler=null)}},{key:"getClickHandler",value:function(){var n=this;return function(o){var s=n.buildEvent("mention-clicked",o);window.dispatchEvent(s),o.preventDefault()}}},{key:"getHoverHandler",value:function(){var n=this;return function(o){var s=n.buildEvent("mention-hovered",o);window.dispatchEvent(s),o.preventDefault()}}},{key:"buildEvent",value:function(n,o){var s=new Event(n,{bubbles:!0,cancelable:!0});return s.value=x({},this.domNode.dataset),s.event=o,s}}],[{key:"create",value:function(n){var o=b(v(t),"create",this).call(this),s=document.createElement("span");if(s.className="ql-mention-denotation-char",s.innerHTML=n.denotationChar,o.appendChild(s),o.innerHTML+=n.value,t.isAndroid()){var r=document.createElement("span");r.innerHTML=" ",r.setAttribute("style","display: inline-block; height: 1px; width: 1px; overflow: hidden; "),o.appendChild(r)}return t.setDataValues(o,n)}},{key:"setDataValues",value:function(n,o){setTimeout(function(){t.isAndroid()?n.getElementsByTagName("span")[0].setAttribute("contenteditable","inherit"):t.isChrome()&&n.getElementsByTagName("span")[0].parentNode.setAttribute("contenteditable","false")},0);var s=n;return Object.keys(o).forEach(function(r){s.dataset[r]=o[r]}),s}},{key:"value",value:function(n){return n.dataset}},{key:"isAndroid",value:function(){var n=typeof window!="undefined"&&window.navigator.userAgent.toLowerCase();return n&&n.indexOf("android")>0}},{key:"isChrome",value:function(){var n=typeof window!="undefined"&&window.navigator.userAgent.toLowerCase();return n.match(/Chrome/i)+""=="chrome"}}])}(z);I.blotName="mention";I.tagName="span";I.className="mention";p.register("blots/mention",I);var G=function(){function i(t,e){var n=this;N(this,i),this.isOpen=!1,this.itemIndex=0,this.mentionCharPos=null,this.cursorPos=null,this.values=[],this.suspendMouseEnter=!1,this.existingSourceExecutionToken=null,this.quill=t,this.options={source:null,renderItem:function(r){var a=r.value;return"".concat(a)},renderLoading:function(){return null},onSelect:function(r,a){a(r)},mentionDenotationChars:["@"],showDenotationChar:!0,allowedChars:/^[a-zA-Z0-9_]*$/,minChars:0,maxChars:31,offsetTop:2,offsetLeft:0,isolateCharacter:!1,allowInlineMentionChar:!1,fixMentionsToQuill:!1,positioningStrategy:"normal",defaultMenuOrientation:"bottom",blotName:"mention",dataAttributes:["id","value","denotationChar","link","target","disabled"],linkTarget:"_blank",onOpen:function(){return!0},onBeforeClose:function(){return!0},onClose:function(){return!0},listItemClass:"ql-mention-list-item",mentionContainerClass:"ql-mention-list-container",mentionListClass:"ql-mention-list",spaceAfterInsert:!0,selectKeys:[c.ENTER]},x(this.options,e,{dataAttributes:Array.isArray(e.dataAttributes)?this.options.dataAttributes.concat(e.dataAttributes):this.options.dataAttributes});for(var o in this.options)typeof this.options[o]=="function"&&(this.options[o]=this.options[o].bind(this));this.mentionContainer=document.createElement("div"),this.mentionContainer.className=this.options.mentionContainerClass?this.options.mentionContainerClass:"",this.mentionContainer.style.cssText="display: none; position: absolute;",this.mentionContainer.onmousemove=this.onContainerMouseMove.bind(this),this.options.fixMentionsToQuill&&(this.mentionContainer.style.width="auto"),this.mentionList=document.createElement("ul"),this.mentionList.id="quill-mention-list",t.root.setAttribute("aria-owns","quill-mention-list"),this.mentionList.className=this.options.mentionListClass?this.options.mentionListClass:"",this.mentionContainer.appendChild(this.mentionList),t.on("text-change",this.onTextChange.bind(this)),t.on("selection-change",this.onSelectionChange.bind(this)),t.container.addEventListener("paste",function(){setTimeout(function(){var s=t.getSelection();n.onSelectionChange(s)})}),t.keyboard.addBinding({key:c.TAB},this.selectHandler.bind(this)),t.keyboard.bindings[c.TAB].unshift(t.keyboard.bindings[c.TAB].pop()),t.keyboard.addBinding({key:c.ENTER},this.selectHandler.bind(this)),t.keyboard.bindings[c.ENTER].unshift(t.keyboard.bindings[c.ENTER].pop()),t.keyboard.addBinding({key:c.ESCAPE},this.escapeHandler.bind(this)),t.keyboard.addBinding({key:c.UP},this.upHandler.bind(this)),t.keyboard.addBinding({key:c.DOWN},this.downHandler.bind(this))}return H(i,[{key:"selectHandler",value:function(){return this.isOpen&&!this.existingSourceExecutionToken?(this.selectItem(),!1):!0}},{key:"escapeHandler",value:function(){return this.isOpen?(this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList(),!1):!0}},{key:"upHandler",value:function(){return this.isOpen&&!this.existingSourceExecutionToken?(this.prevItem(),!1):!0}},{key:"downHandler",value:function(){return this.isOpen&&!this.existingSourceExecutionToken?(this.nextItem(),!1):!0}},{key:"showMentionList",value:function(){this.options.positioningStrategy==="fixed"?document.body.appendChild(this.mentionContainer):this.quill.container.appendChild(this.mentionContainer),this.mentionContainer.style.visibility="hidden",this.mentionContainer.style.display="",this.mentionContainer.scrollTop=0,this.setMentionContainerPosition(),this.setIsOpen(!0)}},{key:"hideMentionList",value:function(){this.options.onBeforeClose(),this.mentionContainer.style.display="none",this.mentionContainer.remove(),this.setIsOpen(!1),this.quill.root.removeAttribute("aria-activedescendant")}},{key:"highlightItem",value:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,n=0;n<this.mentionList.childNodes.length;n+=1)this.mentionList.childNodes[n].classList.remove("selected");if(!(this.itemIndex===-1||this.mentionList.childNodes[this.itemIndex].dataset.disabled==="true")&&(this.mentionList.childNodes[this.itemIndex].classList.add("selected"),this.quill.root.setAttribute("aria-activedescendant",this.mentionList.childNodes[this.itemIndex].id),e)){var o=this.mentionList.childNodes[this.itemIndex].offsetHeight,s=this.mentionList.childNodes[this.itemIndex].offsetTop,r=this.mentionContainer.scrollTop,a=r+this.mentionContainer.offsetHeight;s<r?this.mentionContainer.scrollTop=s:s>a-o&&(this.mentionContainer.scrollTop+=s-a+o)}}},{key:"onContainerMouseMove",value:function(){this.suspendMouseEnter=!1}},{key:"selectItem",value:function(){var e=this;if(this.itemIndex!==-1){var n=this.mentionList.childNodes[this.itemIndex].dataset;n.disabled||(this.options.onSelect(n,function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.insertItem(o,s,r)}),this.hideMentionList())}}},{key:"insertItem",value:function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=e;if(s!==null){var r=T(T({},this.options),o);r.showDenotationChar||(s.denotationChar="");var a;n?a=this.cursorPos:(a=this.mentionCharPos,this.quill.deleteText(this.mentionCharPos,this.cursorPos-this.mentionCharPos,p.sources.USER));var l=this.quill.insertEmbed(a,r.blotName,s,p.sources.USER);return r.spaceAfterInsert?(this.quill.insertText(a+1," ",p.sources.USER),this.quill.setSelection(a+2,p.sources.USER)):this.quill.setSelection(a+1,p.sources.USER),this.hideMentionList(),l}}},{key:"onItemMouseEnter",value:function(e){if(!this.suspendMouseEnter){var n=Number(e.target.dataset.index);!Number.isNaN(n)&&n!==this.itemIndex&&(this.itemIndex=n,this.highlightItem(!1))}}},{key:"onDisabledItemMouseEnter",value:function(e){this.suspendMouseEnter||(this.itemIndex=-1,this.highlightItem(!1))}},{key:"onItemClick",value:function(e){e.button===0&&(e.preventDefault(),e.stopImmediatePropagation(),this.itemIndex=e.currentTarget.dataset.index,this.highlightItem(),this.selectItem())}},{key:"onItemMouseDown",value:function(e){e.preventDefault(),e.stopImmediatePropagation()}},{key:"renderLoading",value:function(){var e=this.options.renderLoading();if(!!e){if(this.mentionContainer.getElementsByClassName("ql-mention-loading").length>0){this.showMentionList();return}this.mentionList.innerHTML="";var n=document.createElement("div");n.className="ql-mention-loading",M(n,this.options.renderLoading()),this.mentionContainer.append(n),this.showMentionList()}}},{key:"removeLoading",value:function(){var e=this.mentionContainer.getElementsByClassName("ql-mention-loading");e.length>0&&e[0].remove()}},{key:"renderList",value:function(e,n,o){if(n&&n.length>0){this.removeLoading(),this.values=n,this.mentionList.innerHTML="";for(var s=-1,r=0;r<n.length;r+=1){var a=document.createElement("li");a.id="quill-mention-item-"+r,a.className=this.options.listItemClass?this.options.listItemClass:"",n[r].disabled?(a.className+=" disabled",a.setAttribute("aria-hidden","true")):s===-1&&(s=r),a.dataset.index=r;var l=this.options.renderItem(n[r],o);M(a,l),n[r].disabled?a.onmouseenter=this.onDisabledItemMouseEnter.bind(this):(a.onmouseenter=this.onItemMouseEnter.bind(this),a.onmouseup=this.onItemClick.bind(this),a.onmousedown=this.onItemMouseDown.bind(this)),a.dataset.denotationChar=e,this.mentionList.appendChild(Q(a,n[r],this.options.dataAttributes))}this.itemIndex=s,this.highlightItem(),this.showMentionList()}else this.hideMentionList()}},{key:"nextItem",value:function(){var e=0,n;do{e++,n=(this.itemIndex+e)%this.values.length;var o=this.mentionList.childNodes[n].dataset.disabled==="true";if(e===this.values.length+1){n=-1;break}}while(o);this.itemIndex=n,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"prevItem",value:function(){var e=0,n;do{e++,n=(this.itemIndex+this.values.length-e)%this.values.length;var o=this.mentionList.childNodes[n].dataset.disabled==="true";if(e===this.values.length+1){n=-1;break}}while(o);this.itemIndex=n,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"containerBottomIsNotVisible",value:function(e,n){var o=e+this.mentionContainer.offsetHeight+n.top;return o>window.pageYOffset+window.innerHeight}},{key:"containerRightIsNotVisible",value:function(e,n){if(this.options.fixMentionsToQuill)return!1;var o=e+this.mentionContainer.offsetWidth+n.left,s=window.pageXOffset+document.documentElement.clientWidth;return o>s}},{key:"setIsOpen",value:function(e){this.isOpen!==e&&(e?this.options.onOpen():this.options.onClose(),this.isOpen=e)}},{key:"setMentionContainerPosition",value:function(){this.options.positioningStrategy==="fixed"?this.setMentionContainerPosition_Fixed():this.setMentionContainerPosition_Normal()}},{key:"setMentionContainerPosition_Normal",value:function(){var e=this,n=this.quill.container.getBoundingClientRect(),o=this.quill.getBounds(this.mentionCharPos),s=this.mentionContainer.offsetHeight,r=this.options.offsetTop,a=this.options.offsetLeft;if(this.options.fixMentionsToQuill){var l=0;this.mentionContainer.style.right="".concat(l,"px")}else a+=o.left;if(this.containerRightIsNotVisible(a,n)){var h=this.mentionContainer.offsetWidth+this.options.offsetLeft,f=n.width;a=f-h}if(this.options.defaultMenuOrientation==="top"){if(this.options.fixMentionsToQuill?r=-1*(s+this.options.offsetTop):r=o.top-(s+this.options.offsetTop),r+n.top<=0){var u=this.options.offsetTop;this.options.fixMentionsToQuill?u+=n.height:u+=o.bottom,r=u}}else if(this.options.fixMentionsToQuill?r+=n.height:r+=o.bottom,this.containerBottomIsNotVisible(r,n)){var m=this.options.offsetTop*-1;this.options.fixMentionsToQuill||(m+=o.top),r=m-s}r>=0?this.options.mentionContainerClass.split(" ").forEach(function(d){e.mentionContainer.classList.add("".concat(d,"-bottom")),e.mentionContainer.classList.remove("".concat(d,"-top"))}):this.options.mentionContainerClass.split(" ").forEach(function(d){e.mentionContainer.classList.add("".concat(d,"-top")),e.mentionContainer.classList.remove("".concat(d,"-bottom"))}),this.mentionContainer.style.top="".concat(r,"px"),this.mentionContainer.style.left="".concat(a,"px"),this.mentionContainer.style.visibility="visible"}},{key:"setMentionContainerPosition_Fixed",value:function(){var e=this;this.mentionContainer.style.position="fixed",this.mentionContainer.style.height=null;var n=J(this.quill.container.getBoundingClientRect());n.top+=window.scrollY;var o=this.quill.getBounds(this.mentionCharPos),s={left:n.left+o.left,top:n.top+o.top,width:0,height:o.height},r=this.options.fixMentionsToQuill?n:s,a=this.options.offsetTop,l=this.options.offsetLeft;if(this.options.fixMentionsToQuill){var h=r.right;this.mentionContainer.style.right="".concat(h,"px")}else l+=r.left,l+this.mentionContainer.offsetWidth>document.documentElement.clientWidth&&(l-=l+this.mentionContainer.offsetWidth-document.documentElement.clientWidth);var f=r.top,u=document.documentElement.clientHeight-(r.top+r.height),m=this.mentionContainer.offsetHeight<=u,d=this.mentionContainer.offsetHeight<=f,g;this.options.defaultMenuOrientation==="top"&&d?g="top":this.options.defaultMenuOrientation==="bottom"&&m?g="bottom":g=u>f?"bottom":"top",g==="bottom"?(a=r.top+r.height,m||(this.mentionContainer.style.height=u-3+"px"),this.options.mentionContainerClass.split(" ").forEach(function(y){e.mentionContainer.classList.add("".concat(y,"-bottom")),e.mentionContainer.classList.remove("".concat(y,"-top"))})):(a=r.top-this.mentionContainer.offsetHeight,d||(this.mentionContainer.style.height=f-3+"px",a=3),this.options.mentionContainerClass.split(" ").forEach(function(y){e.mentionContainer.classList.add("".concat(y,"-top")),e.mentionContainer.classList.remove("".concat(y,"-bottom"))})),this.mentionContainer.style.top="".concat(a,"px"),this.mentionContainer.style.left="".concat(l,"px"),this.mentionContainer.style.visibility="visible"}},{key:"getTextBeforeCursor",value:function(){var e=Math.max(0,this.cursorPos-this.options.maxChars),n=this.quill.getText(e,this.cursorPos-e);return n}},{key:"onSomethingChange",value:function(){var e=this,n=this.quill.getSelection();if(n!=null){this.cursorPos=n.index;var o=this.getTextBeforeCursor(),s=Math.max(0,this.cursorPos-this.options.maxChars),r=s?this.quill.getText(s-1,s):"",a=W(o,this.options.mentionDenotationChars,this.options.isolateCharacter,this.options.allowInlineMentionChar),l=a.mentionChar,h=a.mentionCharIndex;if(K(h,o,this.options.isolateCharacter,r)){var f=this.cursorPos-(o.length-h);this.mentionCharPos=f;var u=o.substring(h+l.length);if(u.length>=this.options.minChars&&U(u,this.getAllowedCharsRegex(l))){this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.renderLoading();var m={abandoned:!1};this.existingSourceExecutionToken=m,this.options.source(u,function(d,g){m.abandoned||(e.existingSourceExecutionToken=null,e.renderList(l,d,g))},l)}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}}},{key:"getAllowedCharsRegex",value:function(e){return this.options.allowedChars instanceof RegExp?this.options.allowedChars:this.options.allowedChars(e)}},{key:"onTextChange",value:function(e,n,o){o==="user"&&setTimeout(this.onSomethingChange.bind(this),50)}},{key:"onSelectionChange",value:function(e){e&&e.length===0?this.onSomethingChange():this.hideMentionList()}},{key:"openMenu",value:function(e){var n=this.quill.getSelection(!0);this.quill.insertText(n.index,e),this.quill.blur(),this.quill.focus()}}])}();p.register("modules/mention",G);
|