@qualityunit/liveagent-components-editor 0.0.24 → 0.0.25
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/ckeditor.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./ckeditor5-
|
|
1
|
+
"use strict";require("./ckeditor5-BUQGFsAL.cjs");
|
package/dist/ckeditor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./ckeditor5-
|
|
1
|
+
import "./ckeditor5-CvJKMYGf.js";
|
|
@@ -1702,4 +1702,4 @@ $&
|
|
|
1702
1702
|
*/const dh="ckCsrfToken",hh=40,fh="abcdefghijklmnopqrstuvwxyz0123456789";function HV(){let n=UV(dh);return(!n||n.length!=hh)&&(n=qV(hh),WV(dh,n)),n}function UV(n){n=n.toLowerCase();const e=document.cookie.split(";");for(const t of e){const i=t.split("=");if(decodeURIComponent(i[0].trim().toLowerCase())===n)return decodeURIComponent(i[1])}return null}function WV(n,e){document.cookie=encodeURIComponent(n)+"="+encodeURIComponent(e)+";path=/"}function qV(n){let e="";const t=new Uint8Array(n);window.crypto.getRandomValues(t);for(let i=0;i<t.length;i++){const s=fh.charAt(t[i]%fh.length);e+=Math.random()>.5?s.toUpperCase():s}return e}/**
|
|
1703
1703
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
1704
1704
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1705
|
-
*/class jV extends w{static get requires(){return[ei]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(ei).createUploadAdapter=t=>new GV(t,e,this.editor.t))}}class GV{constructor(e,t,i){this.loader=e,this.url=t,this.t=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,i){const s=this.xhr,o=this.loader,r=this.t,a=r("Cannot upload file:")+` ${i.name}.`;s.addEventListener("error",()=>t(a)),s.addEventListener("abort",()=>t()),s.addEventListener("load",()=>{const l=s.response;if(!l||!l.uploaded)return t(l&&l.error&&l.error.message?l.error.message:a);e({default:l.url})});/* istanbul ignore else -- @preserve */s.upload&&s.upload.addEventListener("progress",l=>{l.lengthComputable&&(o.uploadTotal=l.total,o.uploaded=l.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",HV()),this.xhr.send(t)}}class _a extends Io{}me(_a,"builtinPlugins",[rP,oI,gI,WI,bI,X3,TP,IP,t4,f4,m4,JP,b4,v4,SI,J4,_p,_7,N7,cs,Y6,eR,rR,UR,C8,RI,OI,CI,$8,iV,cV,mV,yV,SV,zV,jV]),me(_a,"defaultConfig",{toolbar:{items:["undo","redo","|","heading","bold","italic","strikethrough","underline","fontColor","fontBackgroundColor","fontFamily","fontSize","|","numberedList","bulletedList","|","outdent","indent","blockQuote","|","alignment","|","link","imageUpload","mediaEmbed","horizontalLine","specialCharacters","code","codeBlock","insertTable","|","style","|","removeFormat","selectAll","|","sourceEditing"]},style:{definitions:[{name:"Source code",element:"pre",classes:["SourceCode"]},{name:"Error",element:"p",classes:["Error"]},{name:"Path",element:"p",classes:["Path"]}]},codeBlock:{languages:[{language:"plaintext",label:"Plain text"},{language:"html",label:"HTML"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"css",label:"CSS"}]},headingConfig:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h1",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"}]},image:{resizeOptions:[{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"},{name:"resizeImage:original",value:null,icon:"original"}],toolbar:["toggleImageCaption","imageTextAlternative","|","imageStyle:inline","imageStyle:block","imageStyle:side","|","imageStyle:wrapText","imageStyle:breakText","|","resizeImage:25","resizeImage:50","resizeImage:75","resizeImage:original"]},language:"en"});class KV{constructor(e,t,i){me(this,"loader");me(this,"xhr");me(this,"insertImageServiceUrl");me(this,"getImageServiceUrl");this.loader=e,this.insertImageServiceUrl=t,this.getImageServiceUrl=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(e),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(e){const t=this.xhr=new XMLHttpRequest;let i=this.insertImageServiceUrl;i+="&dADFileUpload=Y",i+="&max_file_size=0",i+="&name="+window.btoa(encodeURIComponent(e.name)),i+="&size="+e.size,i+="&type="+(e.type?e.type:"n/a"),t.open("POST",i,!0),t.responseType="json"}_initListeners(e,t,i){const s=this.xhr,o=this.loader,r=`Couldn't upload file: ${i.name}.`;s.addEventListener("error",()=>t(r)),s.addEventListener("abort",()=>t()),s.addEventListener("load",()=>{const a=s.response;if(a&&a.S){if(a.S==="Y"){const l=this._getFileIdFromResponse(a);if(l){e({default:this.getImageServiceUrl+"?view=Y&file="+l});return}}else if(a.M){t(a.M);return}}t(r)}),s.upload&&s.upload.addEventListener("progress",a=>{a.lengthComputable&&(o.uploadTotal=a.total,o.uploaded=a.loaded)})}_sendRequest(e){this.xhr.send(e.slice())}_getFileIdFromResponse(e){if(e.F&&Array.isArray(e.F)){for(const t of e.F)if(Array.isArray(t)&&t.length>1&&t[0]==="id")return t[1]}return null}}function ZV(n){let e;return{c(){e=ka("div")},m(t,i){ya(t,e,i),n[14](e)},p:Jt,i:Jt,o:Jt,d(t){t&&fo(e),n[14](null)}}}function JV(n,e,t){const i=e.createRangeIn(t);for(const s of i.getWalker()){const o=s.item;if(o.is("$textProxy")&&o.data!=""&&o.data.includes(n))return o}return null}function
|
|
1705
|
+
*/class jV extends w{static get requires(){return[ei]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(ei).createUploadAdapter=t=>new GV(t,e,this.editor.t))}}class GV{constructor(e,t,i){this.loader=e,this.url=t,this.t=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,i){const s=this.xhr,o=this.loader,r=this.t,a=r("Cannot upload file:")+` ${i.name}.`;s.addEventListener("error",()=>t(a)),s.addEventListener("abort",()=>t()),s.addEventListener("load",()=>{const l=s.response;if(!l||!l.uploaded)return t(l&&l.error&&l.error.message?l.error.message:a);e({default:l.url})});/* istanbul ignore else -- @preserve */s.upload&&s.upload.addEventListener("progress",l=>{l.lengthComputable&&(o.uploadTotal=l.total,o.uploaded=l.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",HV()),this.xhr.send(t)}}class _a extends Io{}me(_a,"builtinPlugins",[rP,oI,gI,WI,bI,X3,TP,IP,t4,f4,m4,JP,b4,v4,SI,J4,_p,_7,N7,cs,Y6,eR,rR,UR,C8,RI,OI,CI,$8,iV,cV,mV,yV,SV,zV,jV]),me(_a,"defaultConfig",{toolbar:{items:["undo","redo","|","heading","bold","italic","strikethrough","underline","fontColor","fontBackgroundColor","fontFamily","fontSize","|","numberedList","bulletedList","|","outdent","indent","blockQuote","|","alignment","|","link","imageUpload","mediaEmbed","horizontalLine","specialCharacters","code","codeBlock","insertTable","|","style","|","removeFormat","selectAll","|","sourceEditing"]},style:{definitions:[{name:"Source code",element:"pre",classes:["SourceCode"]},{name:"Error",element:"p",classes:["Error"]},{name:"Path",element:"p",classes:["Path"]}]},codeBlock:{languages:[{language:"plaintext",label:"Plain text"},{language:"html",label:"HTML"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"css",label:"CSS"}]},headingConfig:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h1",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"}]},image:{resizeOptions:[{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"},{name:"resizeImage:original",value:null,icon:"original"}],toolbar:["toggleImageCaption","imageTextAlternative","|","imageStyle:inline","imageStyle:block","imageStyle:side","|","imageStyle:wrapText","imageStyle:breakText","|","resizeImage:25","resizeImage:50","resizeImage:75","resizeImage:original"]},language:"en"});class KV{constructor(e,t,i){me(this,"loader");me(this,"xhr");me(this,"insertImageServiceUrl");me(this,"getImageServiceUrl");this.loader=e,this.insertImageServiceUrl=t,this.getImageServiceUrl=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(e),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(e){const t=this.xhr=new XMLHttpRequest;let i=this.insertImageServiceUrl;i+="&dADFileUpload=Y",i+="&max_file_size=0",i+="&name="+window.btoa(encodeURIComponent(e.name)),i+="&size="+e.size,i+="&type="+(e.type?e.type:"n/a"),t.open("POST",i,!0),t.responseType="json"}_initListeners(e,t,i){const s=this.xhr,o=this.loader,r=`Couldn't upload file: ${i.name}.`;s.addEventListener("error",()=>t(r)),s.addEventListener("abort",()=>t()),s.addEventListener("load",()=>{const a=s.response;if(a&&a.S){if(a.S==="Y"){const l=this._getFileIdFromResponse(a);if(l){e({default:this.getImageServiceUrl+"?view=Y&file="+l});return}}else if(a.M){t(a.M);return}}t(r)}),s.upload&&s.upload.addEventListener("progress",a=>{a.lengthComputable&&(o.uploadTotal=a.total,o.uploaded=a.loaded)})}_sendRequest(e){this.xhr.send(e.slice())}_getFileIdFromResponse(e){if(e.F&&Array.isArray(e.F)){for(const t of e.F)if(Array.isArray(t)&&t.length>1&&t[0]==="id")return t[1]}return null}}function ZV(n){let e;return{c(){e=ka("div")},m(t,i){ya(t,e,i),n[14](e)},p:Jt,i:Jt,o:Jt,d(t){t&&fo(e),n[14](null)}}}function JV(n){const e=n.editing.view.domConverter.unsafeElements,t=e.indexOf("style");t>-1&&e.splice(t,1)}function YV(n,e,t){const i=e.createRangeIn(t);for(const s of i.getWalker()){const o=s.item;if(o.is("$textProxy")&&o.data!=""&&o.data.includes(n))return o}return null}function QV(n,e,t){let{insertImageServiceUrl:i=""}=e,{getImageServiceUrl:s=""}=e,{items:o=["undo","redo","|","heading","bold","italic","strikethrough","underline","fontColor","fontBackgroundColor","fontFamily","fontSize","|","numberedList","bulletedList","|","outdent","indent","blockQuote","|","alignment","|","link","imageUpload","mediaEmbed","horizontalLine","specialCharacters","code","codeBlock","insertTable","|","style","|","removeFormat","selectAll","|","sourceEditing"]}=e,{allowHtmlSupport:r=!1}=e,{value:a=""}=e,{placeHolder:l=""}=e,{lang:c="en"}=e,{valueChange:u=(k,M)=>{}}=e,{stateChange:d=(k,M)=>{}}=e;const h=()=>f;let f=null,m=null;function p(k){k.plugins.get("FileRepository").createUploadAdapter=M=>new KV(M,i,s)}const _=k=>{f!=null&&(f.focus(),f.model.change(M=>{if(f==null)return;let D=f.model.document.getRoot();if(D==null)return;const E=YV(k,M,D);if(E!=null){M.setSelection(M.createPositionBefore(E)),M.remove(E);const R=E.data.split(k);M.insertText(R[0],f.model.document.selection.getFirstPosition()??void 0);const I=f.model.document.selection.getFirstPosition();M.insertText(R[1],f.model.document.selection.getFirstPosition()??void 0),M.setSelection(I)}}))},y=k=>{f!=null&&(f.focus(),f.model.change(M=>{if(f==null)return;let D=JSON.parse(k);if(D.root==null||D.path==null||D.stickiness==null)return;let E=f.model.document.getRoot(D.root);E!=null&&M.setSelection(M.createPositionFromPath(E,D.path,D.stickiness))}))};_a.create(a,{placeholder:l,toolbar:o,extraPlugins:[p,JV],htmlSupport:{allow:r?[{name:/.*/,attributes:!0,classes:!0,styles:!0}]:[{name:"style"}]},language:{ui:c}}).then(k=>{t(13,f=k),m!=null&&k.ui.view.element!=null&&m.appendChild(k.ui.view.element),k.model.document.on("change:data",(M,D)=>{t(1,a=k.getData()),u(M,D)}),k.on("change:state",(M,D,E,R)=>{d(M,E)}),d(null,"ready")}).catch(k=>{console.error(k.stack)});function T(k){Ns[k?"unshift":"push"](()=>{m=k,t(0,m)})}return n.$$set=k=>{"insertImageServiceUrl"in k&&t(2,i=k.insertImageServiceUrl),"getImageServiceUrl"in k&&t(3,s=k.getImageServiceUrl),"items"in k&&t(4,o=k.items),"allowHtmlSupport"in k&&t(5,r=k.allowHtmlSupport),"value"in k&&t(1,a=k.value),"placeHolder"in k&&t(6,l=k.placeHolder),"lang"in k&&t(7,c=k.lang),"valueChange"in k&&t(8,u=k.valueChange),"stateChange"in k&&t(9,d=k.stateChange)},n.$$.update=()=>{if(n.$$.dirty&8256){let k;f!=null&&(k=f.editing.view.document.getRoot("main"))!=null&&k.placeholder!=l&&(k.placeholder=l)}},[m,a,i,s,o,r,l,c,u,d,h,_,y,f,T]}class Yp extends Eh{constructor(e){super(),yh(this,e,QV,ZV,gh,{insertImageServiceUrl:2,getImageServiceUrl:3,items:4,allowHtmlSupport:5,value:1,placeHolder:6,lang:7,valueChange:8,stateChange:9,getEditor:10,setCursorPositionAtPlaceholder:11,setCursorPositionFromJSONString:12})}get insertImageServiceUrl(){return this.$$.ctx[2]}set insertImageServiceUrl(e){this.$$set({insertImageServiceUrl:e}),Ue()}get getImageServiceUrl(){return this.$$.ctx[3]}set getImageServiceUrl(e){this.$$set({getImageServiceUrl:e}),Ue()}get items(){return this.$$.ctx[4]}set items(e){this.$$set({items:e}),Ue()}get allowHtmlSupport(){return this.$$.ctx[5]}set allowHtmlSupport(e){this.$$set({allowHtmlSupport:e}),Ue()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),Ue()}get placeHolder(){return this.$$.ctx[6]}set placeHolder(e){this.$$set({placeHolder:e}),Ue()}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),Ue()}get valueChange(){return this.$$.ctx[8]}set valueChange(e){this.$$set({valueChange:e}),Ue()}get stateChange(){return this.$$.ctx[9]}set stateChange(e){this.$$set({stateChange:e}),Ue()}get getEditor(){return this.$$.ctx[10]}get setCursorPositionAtPlaceholder(){return this.$$.ctx[11]}get setCursorPositionFromJSONString(){return this.$$.ctx[12]}}customElements.define("ckeditor5-classic",Ch(Yp,{insertImageServiceUrl:{},getImageServiceUrl:{},items:{},allowHtmlSupport:{type:"Boolean"},value:{},placeHolder:{},lang:{},valueChange:{},stateChange:{}},[],["getEditor","setCursorPositionAtPlaceholder","setCursorPositionFromJSONString"],!1));exports.CKEditor5Classic_1=Yp;exports.SvelteComponent=Eh;exports.add_flush_callback=g1;exports.append=i1;exports.attr=wh;exports.bind=y1;exports.binding_callbacks=Ns;exports.check_outros=_1;exports.createEventDispatcher=h1;exports.create_component=k1;exports.create_custom_element=Ch;exports.destroy_component=vh;exports.destroy_each=n1;exports.detach=fo;exports.element=ka;exports.flush=Ue;exports.group_outros=b1;exports.init=yh;exports.insert=ya;exports.is_function=va;exports.listen=o1;exports.mount_component=_h;exports.noop=Jt;exports.run_all=Zi;exports.safe_not_equal=gh;exports.set_data=a1;exports.set_input_value=l1;exports.space=s1;exports.text=ph;exports.transition_in=bh;exports.transition_out=v1;
|
|
@@ -37,7 +37,7 @@ function qp(n, e) {
|
|
|
37
37
|
function jp(n) {
|
|
38
38
|
return Object.keys(n).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function zV(n, e) {
|
|
41
41
|
n.appendChild(e);
|
|
42
42
|
}
|
|
43
43
|
function fh(n, e, t) {
|
|
@@ -46,7 +46,7 @@ function fh(n, e, t) {
|
|
|
46
46
|
function _a(n) {
|
|
47
47
|
n.parentNode && n.parentNode.removeChild(n);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function HV(n, e) {
|
|
50
50
|
for (let t = 0; t < n.length; t += 1)
|
|
51
51
|
n[t] && n[t].d(e);
|
|
52
52
|
}
|
|
@@ -56,10 +56,10 @@ function mh(n) {
|
|
|
56
56
|
function Gp(n) {
|
|
57
57
|
return document.createTextNode(n);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function UV() {
|
|
60
60
|
return Gp(" ");
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function WV(n, e, t, i) {
|
|
63
63
|
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
64
64
|
}
|
|
65
65
|
function Kp(n, e, t) {
|
|
@@ -68,11 +68,11 @@ function Kp(n, e, t) {
|
|
|
68
68
|
function Zp(n) {
|
|
69
69
|
return Array.from(n.childNodes);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function qV(n, e) {
|
|
72
72
|
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
73
73
|
e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function jV(n, e) {
|
|
76
76
|
n.value = e ?? "";
|
|
77
77
|
}
|
|
78
78
|
function Jp(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
@@ -96,7 +96,7 @@ function Qp() {
|
|
|
96
96
|
throw new Error("Function called outside component initialization");
|
|
97
97
|
return Sn;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function GV() {
|
|
100
100
|
const n = Qp();
|
|
101
101
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
102
102
|
const s = n.$$.callbacks[e];
|
|
@@ -124,7 +124,7 @@ function e1() {
|
|
|
124
124
|
function Cr(n) {
|
|
125
125
|
Fi.push(n);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function KV(n) {
|
|
128
128
|
yr.push(n);
|
|
129
129
|
}
|
|
130
130
|
const Vo = /* @__PURE__ */ new Set();
|
|
@@ -167,7 +167,7 @@ function i1(n) {
|
|
|
167
167
|
}
|
|
168
168
|
const Rs = /* @__PURE__ */ new Set();
|
|
169
169
|
let Kt;
|
|
170
|
-
function
|
|
170
|
+
function ZV() {
|
|
171
171
|
Kt = {
|
|
172
172
|
r: 0,
|
|
173
173
|
c: [],
|
|
@@ -175,13 +175,13 @@ function KV() {
|
|
|
175
175
|
// parent group
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function JV() {
|
|
179
179
|
Kt.r || Zn(Kt.c), Kt = Kt.p;
|
|
180
180
|
}
|
|
181
181
|
function n1(n, e) {
|
|
182
182
|
n && n.i && (Rs.delete(n), n.i(e));
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function YV(n, e, t, i) {
|
|
185
185
|
if (n && n.o) {
|
|
186
186
|
if (Rs.has(n))
|
|
187
187
|
return;
|
|
@@ -191,11 +191,11 @@ function JV(n, e, t, i) {
|
|
|
191
191
|
} else
|
|
192
192
|
i && i();
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function QV(n, e, t) {
|
|
195
195
|
const i = n.$$.props[e];
|
|
196
196
|
i !== void 0 && (n.$$.bound[i] = t, t(n.$$.ctx[i]));
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function XV(n) {
|
|
199
199
|
n && n.c();
|
|
200
200
|
}
|
|
201
201
|
function s1(n, e, t) {
|
|
@@ -59383,7 +59383,11 @@ function OV(n) {
|
|
|
59383
59383
|
}
|
|
59384
59384
|
};
|
|
59385
59385
|
}
|
|
59386
|
-
function BV(n
|
|
59386
|
+
function BV(n) {
|
|
59387
|
+
const e = n.editing.view.domConverter.unsafeElements, t = e.indexOf("style");
|
|
59388
|
+
t > -1 && e.splice(t, 1);
|
|
59389
|
+
}
|
|
59390
|
+
function FV(n, e, t) {
|
|
59387
59391
|
const i = e.createRangeIn(t);
|
|
59388
59392
|
for (const s of i.getWalker()) {
|
|
59389
59393
|
const o = s.item;
|
|
@@ -59392,7 +59396,7 @@ function BV(n, e, t) {
|
|
|
59392
59396
|
}
|
|
59393
59397
|
return null;
|
|
59394
59398
|
}
|
|
59395
|
-
function
|
|
59399
|
+
function DV(n, e, t) {
|
|
59396
59400
|
let { insertImageServiceUrl: i = "" } = e, { getImageServiceUrl: s = "" } = e, { items: o = [
|
|
59397
59401
|
"undo",
|
|
59398
59402
|
"redo",
|
|
@@ -59446,7 +59450,7 @@ function FV(n, e, t) {
|
|
|
59446
59450
|
let D = f.model.document.getRoot();
|
|
59447
59451
|
if (D == null)
|
|
59448
59452
|
return;
|
|
59449
|
-
const E =
|
|
59453
|
+
const E = FV(k, M, D);
|
|
59450
59454
|
if (E != null) {
|
|
59451
59455
|
M.setSelection(M.createPositionBefore(E)), M.remove(E);
|
|
59452
59456
|
const R = E.data.split(k);
|
|
@@ -59469,7 +59473,7 @@ function FV(n, e, t) {
|
|
|
59469
59473
|
ba.create(a, {
|
|
59470
59474
|
placeholder: l,
|
|
59471
59475
|
toolbar: o,
|
|
59472
|
-
extraPlugins: [p],
|
|
59476
|
+
extraPlugins: [p, BV],
|
|
59473
59477
|
htmlSupport: {
|
|
59474
59478
|
allow: r ? [
|
|
59475
59479
|
{
|
|
@@ -59478,7 +59482,7 @@ function FV(n, e, t) {
|
|
|
59478
59482
|
classes: !0,
|
|
59479
59483
|
styles: !0
|
|
59480
59484
|
}
|
|
59481
|
-
] : []
|
|
59485
|
+
] : [{ name: "style" }]
|
|
59482
59486
|
},
|
|
59483
59487
|
language: { ui: c }
|
|
59484
59488
|
}).then((k) => {
|
|
@@ -59521,9 +59525,9 @@ function FV(n, e, t) {
|
|
|
59521
59525
|
T
|
|
59522
59526
|
];
|
|
59523
59527
|
}
|
|
59524
|
-
class
|
|
59528
|
+
class NV extends c1 {
|
|
59525
59529
|
constructor(e) {
|
|
59526
|
-
super(), a1(this, e,
|
|
59530
|
+
super(), a1(this, e, DV, OV, qp, {
|
|
59527
59531
|
insertImageServiceUrl: 2,
|
|
59528
59532
|
getImageServiceUrl: 3,
|
|
59529
59533
|
items: 4,
|
|
@@ -59602,37 +59606,37 @@ class DV extends c1 {
|
|
|
59602
59606
|
return this.$$.ctx[12];
|
|
59603
59607
|
}
|
|
59604
59608
|
}
|
|
59605
|
-
customElements.define("ckeditor5-classic", l1(
|
|
59609
|
+
customElements.define("ckeditor5-classic", l1(NV, { insertImageServiceUrl: {}, getImageServiceUrl: {}, items: {}, allowHtmlSupport: { type: "Boolean" }, value: {}, placeHolder: {}, lang: {}, valueChange: {}, stateChange: {} }, [], ["getEditor", "setCursorPositionAtPlaceholder", "setCursorPositionFromJSONString"], !1));
|
|
59606
59610
|
export {
|
|
59607
59611
|
o1 as A,
|
|
59608
|
-
|
|
59609
|
-
|
|
59610
|
-
|
|
59612
|
+
ZV as B,
|
|
59613
|
+
jV as C,
|
|
59614
|
+
NV as D,
|
|
59611
59615
|
c1 as S,
|
|
59612
|
-
|
|
59616
|
+
UV as a,
|
|
59613
59617
|
Kp as b,
|
|
59614
59618
|
l1 as c,
|
|
59615
59619
|
fh as d,
|
|
59616
59620
|
mh as e,
|
|
59617
59621
|
Ke as f,
|
|
59618
|
-
|
|
59622
|
+
zV as g,
|
|
59619
59623
|
_a as h,
|
|
59620
59624
|
a1 as i,
|
|
59621
|
-
|
|
59622
|
-
|
|
59623
|
-
|
|
59625
|
+
HV as j,
|
|
59626
|
+
GV as k,
|
|
59627
|
+
WV as l,
|
|
59624
59628
|
hh as m,
|
|
59625
59629
|
Bi as n,
|
|
59626
|
-
|
|
59630
|
+
qV as o,
|
|
59627
59631
|
vr as p,
|
|
59628
|
-
|
|
59632
|
+
QV as q,
|
|
59629
59633
|
Zn as r,
|
|
59630
59634
|
qp as s,
|
|
59631
59635
|
Gp as t,
|
|
59632
|
-
|
|
59636
|
+
XV as u,
|
|
59633
59637
|
s1 as v,
|
|
59634
|
-
|
|
59635
|
-
|
|
59638
|
+
YV as w,
|
|
59639
|
+
JV as x,
|
|
59636
59640
|
n1 as y,
|
|
59637
|
-
|
|
59641
|
+
KV as z
|
|
59638
59642
|
};
|
package/dist/editor-lib.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./ckeditor5-
|
|
1
|
+
"use strict";const t=require("./ckeditor5-BUQGFsAL.cjs");function v(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function k(n,e,s){const l=n.slice();return l[4]=e[s],l}function E(n){let e,s=n[4].text+"",l,u,c,o,_;return{c(){e=t.element("button"),l=t.text(s),t.attr(e,"class",u=n[4].style),t.attr(e,"title",c=n[4].text)},m(r,a){t.insert(r,e,a),t.append(e,l),o||(_=t.listen(e,"click",function(){t.is_function(n[4].handler)&&n[4].handler.apply(this,arguments)}),o=!0)},p(r,a){n=r,a&1&&s!==(s=n[4].text+"")&&t.set_data(l,s),a&1&&u!==(u=n[4].style)&&t.attr(e,"class",u),a&1&&c!==(c=n[4].text)&&t.attr(e,"title",c)},d(r){r&&t.detach(e),o=!1,_()}}}function C(n){let e,s,l,u,c,o,_,r=v(n[0]),a=[];for(let i=0;i<r.length;i+=1)a[i]=E(k(n,r,i));return{c(){e=t.element("div"),s=t.element("button"),s.textContent="HTML",l=t.space(),u=t.element("button"),u.textContent="Plain",c=t.space();for(let i=0;i<a.length;i+=1)a[i].c();t.attr(s,"class","HTMLEditor"),t.attr(u,"class","PlainEditor")},m(i,d){t.insert(i,e,d),t.append(e,s),t.append(e,l),t.append(e,u),t.append(e,c);for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(e,null);o||(_=[t.listen(s,"click",n[1]),t.listen(u,"click",n[2])],o=!0)},p(i,[d]){if(d&1){r=v(i[0]);let f;for(f=0;f<r.length;f+=1){const b=k(i,r,f);a[f]?a[f].p(b,d):(a[f]=E(b),a[f].c(),a[f].m(e,null))}for(;f<a.length;f+=1)a[f].d(1);a.length=r.length}},i:t.noop,o:t.noop,d(i){i&&t.detach(e),t.destroy_each(a,i),o=!1,t.run_all(_)}}}function w(n,e,s){const l=t.createEventDispatcher();let{buttons:u=[]}=e;function c(){l("html",{})}function o(){l("plain",{})}return n.$$set=_=>{"buttons"in _&&s(0,u=_.buttons)},[u,c,o]}class $ extends t.SvelteComponent{constructor(e){super(),t.init(this,e,w,C,t.safe_not_equal,{buttons:0})}get buttons(){return this.$$.ctx[0]}set buttons(e){this.$$set({buttons:e}),t.flush()}}t.create_custom_element($,{buttons:{}},[],[],!0);function H(n){let e,s,l;return{c(){e=t.element("textarea")},m(u,c){t.insert(u,e,c),t.set_input_value(e,n[0]),s||(l=t.listen(e,"input",n[6]),s=!0)},p(u,c){c&1&&t.set_input_value(e,u[0])},i:t.noop,o:t.noop,d(u){u&&t.detach(e),s=!1,l()}}}function P(n){let e,s,l;function u(o){n[5](o)}let c={};return n[0]!==void 0&&(c.value=n[0]),e=new t.CKEditor5Classic_1({props:c}),t.binding_callbacks.push(()=>t.bind(e,"value",u)),{c(){t.create_component(e.$$.fragment)},m(o,_){t.mount_component(e,o,_),l=!0},p(o,_){const r={};!s&&_&1&&(s=!0,r.value=o[0],t.add_flush_callback(()=>s=!1)),e.$set(r)},i(o){l||(t.transition_in(e.$$.fragment,o),l=!0)},o(o){t.transition_out(e.$$.fragment,o),l=!1},d(o){t.destroy_component(e,o)}}}function q(n){let e,s,l,u,c,o,_,r;const a=[P,H],i=[];function d(h,m){return h[2]?0:1}l=d(n),u=i[l]=a[l](n);function f(h){n[7](h)}let b={};return n[1]!==void 0&&(b.buttons=n[1]),o=new $({props:b}),t.binding_callbacks.push(()=>t.bind(o,"buttons",f)),o.$on("html",n[3]),o.$on("plain",n[4]),{c(){e=t.element("main"),s=t.element("div"),u.c(),c=t.space(),t.create_component(o.$$.fragment),t.attr(s,"class","Editor")},m(h,m){t.insert(h,e,m),t.append(e,s),i[l].m(s,null),t.append(e,c),t.mount_component(o,e,null),r=!0},p(h,[m]){let p=l;l=d(h),l===p?i[l].p(h,m):(t.group_outros(),t.transition_out(i[p],1,1,()=>{i[p]=null}),t.check_outros(),u=i[l],u?u.p(h,m):(u=i[l]=a[l](h),u.c()),t.transition_in(u,1),u.m(s,null));const g={};!_&&m&2&&(_=!0,g.buttons=h[1],t.add_flush_callback(()=>_=!1)),o.$set(g)},i(h){r||(t.transition_in(u),t.transition_in(o.$$.fragment,h),r=!0)},o(h){t.transition_out(u),t.transition_out(o.$$.fragment,h),r=!1},d(h){h&&t.detach(e),i[l].d(),t.destroy_component(o)}}}function S(n,e,s){let{value:l=""}=e,{buttons:u=[]}=e,{html:c=!0}=e;function o(){c||s(2,c=!0)}function _(){c&&(s(0,l=l.replace(/<[^>]*>?/gm,"")),s(2,c=!1))}function r(d){l=d,s(0,l)}function a(){l=this.value,s(0,l)}function i(d){u=d,s(1,u)}return n.$$set=d=>{"value"in d&&s(0,l=d.value),"buttons"in d&&s(1,u=d.buttons),"html"in d&&s(2,c=d.html)},[l,u,c,o,_,r,a,i]}class B extends t.SvelteComponent{constructor(e){super(),t.init(this,e,S,q,t.safe_not_equal,{value:0,buttons:1,html:2})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),t.flush()}get buttons(){return this.$$.ctx[1]}set buttons(e){this.$$set({buttons:e}),t.flush()}get html(){return this.$$.ctx[2]}set html(e){this.$$set({html:e}),t.flush()}}customElements.define("switchable-editor",t.create_custom_element(B,{value:{},buttons:{},html:{type:"Boolean"}},[],[],!1));
|
package/dist/editor-lib.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as M, S as T, i as j, f as v, s as y, e as d, a as B, b as h, d as w, g as m, l as C, n as $, h as H, j as O, r as Q, k as R, t as U, m as V, o as W, p as z, q as K, u as F, v as G, w as k, x as X, y as E, z as I, A as J, B as Y, C as q, D as Z } from "./ckeditor5-
|
|
1
|
+
import { c as M, S as T, i as j, f as v, s as y, e as d, a as B, b as h, d as w, g as m, l as C, n as $, h as H, j as O, r as Q, k as R, t as U, m as V, o as W, p as z, q as K, u as F, v as G, w as k, x as X, y as E, z as I, A as J, B as Y, C as q, D as Z } from "./ckeditor5-CvJKMYGf.js";
|
|
2
2
|
function A(e) {
|
|
3
3
|
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
|
|
4
4
|
}
|