@qualityunit/liveagent-components-editor 0.0.34 → 0.0.36
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-Cmy8uY5q.cjs");
|
package/dist/ckeditor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./ckeditor5-
|
|
1
|
+
import "./ckeditor5-BAtbpyOD.js";
|
|
@@ -310,7 +310,7 @@ typeof HTMLElement == "function" && (Oh = class extends HTMLElement {
|
|
|
310
310
|
};
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
|
-
if (await Promise.resolve(), !this.$$cn)
|
|
313
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
314
314
|
return;
|
|
315
315
|
const t = {}, i = x1(this);
|
|
316
316
|
for (const o of this.$$s)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var I1=Object.defineProperty;var P1=(n,e,t)=>e in n?I1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ge=(n,e,t)=>(P1(n,typeof e!="symbol"?e+"":e,t),t);function R1(n,e){for(var t=0;t<e.length;t++){const i=e[t];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function ei(){}function Lh(n){return n()}function Fl(){return Object.create(null)}function tn(n){n.forEach(Lh)}function Fa(n){return typeof n=="function"}function Oh(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function V1(n){return Object.keys(n).length===0}function B1(n,e){n.appendChild(e)}function Da(n,e,t){n.insertBefore(e,t||null)}function Ro(n){n.parentNode&&n.parentNode.removeChild(n)}function M1(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function Na(n){return document.createElement(n)}function Fh(n){return document.createTextNode(n)}function L1(){return Fh(" ")}function O1(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Dh(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function F1(n){return Array.from(n.childNodes)}function D1(n,e){e=""+e,n.data!==e&&(n.data=e)}function N1(n,e){n.value=e??""}function $1(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}function H1(n){const e={};return n.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}let Dn;function In(n){Dn=n}function z1(){if(!Dn)throw new Error("Function called outside component initialization");return Dn}function U1(){const n=z1();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const o=$1(e,t,{cancelable:i});return s.slice().forEach(r=>{r.call(n,o)}),!o.defaultPrevented}return!0}}const Li=[],no=[];let Ui=[];const Nr=[],W1=Promise.resolve();let $r=!1;function q1(){$r||($r=!0,W1.then(Le))}function Hr(n){Ui.push(n)}function j1(n){Nr.push(n)}const ir=new Set;let Ti=0;function Le(){if(Ti!==0)return;const n=Dn;do{try{for(;Ti<Li.length;){const e=Li[Ti];Ti++,In(e),G1(e.$$)}}catch(e){throw Li.length=0,Ti=0,e}for(In(null),Li.length=0,Ti=0;no.length;)no.pop()();for(let e=0;e<Ui.length;e+=1){const t=Ui[e];ir.has(t)||(ir.add(t),t())}Ui.length=0}while(Li.length);for(;Nr.length;)Nr.pop()();$r=!1,ir.clear(),In(n)}function G1(n){if(n.fragment!==null){n.update(),tn(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Hr)}}function K1(n){const e=[],t=[];Ui.forEach(i=>n.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ui=e}const Zs=new Set;let Qt;function Z1(){Qt={r:0,c:[],p:Qt}}function J1(){Qt.r||tn(Qt.c),Qt=Qt.p}function Nh(n,e){n&&n.i&&(Zs.delete(n),n.i(e))}function Y1(n,e,t,i){if(n&&n.o){if(Zs.has(n))return;Zs.add(n),Qt.c.push(()=>{Zs.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}function Q1(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function X1(n){n&&n.c()}function $h(n,e,t){const{fragment:i,after_update:s}=n.$$;i&&i.m(e,t),Hr(()=>{const o=n.$$.on_mount.map(Lh).filter(Fa);n.$$.on_destroy?n.$$.on_destroy.push(...o):tn(o),n.$$.on_mount=[]}),s.forEach(Hr)}function Hh(n,e){const t=n.$$;t.fragment!==null&&(K1(t.after_update),tn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function ew(n,e){n.$$.dirty[0]===-1&&(Li.push(n),q1(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function zh(n,e,t,i,s,o,r=null,a=[-1]){const l=Dn;In(n);const c=n.$$={fragment:null,ctx:[],props:o,update:ei,not_equal:s,bound:Fl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Fl(),dirty:a,skip_bound:!1,root:e.target||l.$$.root};r&&r(c.root);let u=!1;if(c.ctx=t?t(n,e.props||{},(d,h,...f)=>{const m=f.length?f[0]:h;return c.ctx&&s(c.ctx[d],c.ctx[d]=m)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](m),u&&ew(n,d)),h}):[],c.update(),u=!0,tn(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){const d=F1(e.target);c.fragment&&c.fragment.l(d),d.forEach(Ro)}else c.fragment&&c.fragment.c();e.intro&&Nh(n.$$.fragment),$h(n,e.target,e.anchor),Le()}In(l)}let Uh;typeof HTMLElement=="function"&&(Uh=class extends HTMLElement{constructor(e,t,i){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const s=this.$$c.$on(e,t);this.$$l_u.set(t,s)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){const s=this.$$l_u.get(t);s&&(s(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return()=>{let r;return{c:function(){r=Na("slot"),o!=="default"&&Dh(r,"name",o)},m:function(c,u){Da(c,r,u)},d:function(c){c&&Ro(r)}}}};if(await Promise.resolve(),!this.$$cn)return;const t={},i=H1(this);for(const o of this.$$s)o in i&&(t[o]=[e(o)]);for(const o of this.attributes){const r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=Js(r,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const r=Js(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const r of this.$$l[o]){const a=this.$$c.$on(o,r);this.$$l_u.set(r,a)}this.$$l={}}}attributeChangedCallback(e,t,i){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Js(e,i,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Js(n,e,t,i){var o;const s=(o=t[n])==null?void 0:o.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!i||!t[n])return e;if(i==="toAttribute")switch(s){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Wh(n,e,t,i,s,o){let r=class extends Uh{constructor(){super(n,t,s),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(r.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){var c;l=Js(a,l,e),this.$$d[a]=l,(c=this.$$c)==null||c.$set({[a]:l})}})}),i.forEach(a=>{Object.defineProperty(r.prototype,a,{get(){var l;return(l=this.$$c)==null?void 0:l[a]}})}),o&&(r=o(r)),n.element=r,r}class qh{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){Hh(this,1),this.$destroy=ei}$on(e,t){if(!Fa(t))return ei;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!V1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const tw="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(tw);/**
|
|
1
|
+
"use strict";var I1=Object.defineProperty;var P1=(n,e,t)=>e in n?I1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ge=(n,e,t)=>(P1(n,typeof e!="symbol"?e+"":e,t),t);function R1(n,e){for(var t=0;t<e.length;t++){const i=e[t];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function ei(){}function Lh(n){return n()}function Fl(){return Object.create(null)}function tn(n){n.forEach(Lh)}function Fa(n){return typeof n=="function"}function Oh(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function V1(n){return Object.keys(n).length===0}function B1(n,e){n.appendChild(e)}function Da(n,e,t){n.insertBefore(e,t||null)}function Ro(n){n.parentNode&&n.parentNode.removeChild(n)}function M1(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function Na(n){return document.createElement(n)}function Fh(n){return document.createTextNode(n)}function L1(){return Fh(" ")}function O1(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Dh(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function F1(n){return Array.from(n.childNodes)}function D1(n,e){e=""+e,n.data!==e&&(n.data=e)}function N1(n,e){n.value=e??""}function $1(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}function H1(n){const e={};return n.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}let Dn;function In(n){Dn=n}function z1(){if(!Dn)throw new Error("Function called outside component initialization");return Dn}function U1(){const n=z1();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const o=$1(e,t,{cancelable:i});return s.slice().forEach(r=>{r.call(n,o)}),!o.defaultPrevented}return!0}}const Li=[],no=[];let Ui=[];const Nr=[],W1=Promise.resolve();let $r=!1;function q1(){$r||($r=!0,W1.then(Le))}function Hr(n){Ui.push(n)}function j1(n){Nr.push(n)}const ir=new Set;let Ti=0;function Le(){if(Ti!==0)return;const n=Dn;do{try{for(;Ti<Li.length;){const e=Li[Ti];Ti++,In(e),G1(e.$$)}}catch(e){throw Li.length=0,Ti=0,e}for(In(null),Li.length=0,Ti=0;no.length;)no.pop()();for(let e=0;e<Ui.length;e+=1){const t=Ui[e];ir.has(t)||(ir.add(t),t())}Ui.length=0}while(Li.length);for(;Nr.length;)Nr.pop()();$r=!1,ir.clear(),In(n)}function G1(n){if(n.fragment!==null){n.update(),tn(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Hr)}}function K1(n){const e=[],t=[];Ui.forEach(i=>n.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ui=e}const Zs=new Set;let Qt;function Z1(){Qt={r:0,c:[],p:Qt}}function J1(){Qt.r||tn(Qt.c),Qt=Qt.p}function Nh(n,e){n&&n.i&&(Zs.delete(n),n.i(e))}function Y1(n,e,t,i){if(n&&n.o){if(Zs.has(n))return;Zs.add(n),Qt.c.push(()=>{Zs.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}function Q1(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function X1(n){n&&n.c()}function $h(n,e,t){const{fragment:i,after_update:s}=n.$$;i&&i.m(e,t),Hr(()=>{const o=n.$$.on_mount.map(Lh).filter(Fa);n.$$.on_destroy?n.$$.on_destroy.push(...o):tn(o),n.$$.on_mount=[]}),s.forEach(Hr)}function Hh(n,e){const t=n.$$;t.fragment!==null&&(K1(t.after_update),tn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function ew(n,e){n.$$.dirty[0]===-1&&(Li.push(n),q1(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function zh(n,e,t,i,s,o,r=null,a=[-1]){const l=Dn;In(n);const c=n.$$={fragment:null,ctx:[],props:o,update:ei,not_equal:s,bound:Fl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Fl(),dirty:a,skip_bound:!1,root:e.target||l.$$.root};r&&r(c.root);let u=!1;if(c.ctx=t?t(n,e.props||{},(d,h,...f)=>{const m=f.length?f[0]:h;return c.ctx&&s(c.ctx[d],c.ctx[d]=m)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](m),u&&ew(n,d)),h}):[],c.update(),u=!0,tn(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){const d=F1(e.target);c.fragment&&c.fragment.l(d),d.forEach(Ro)}else c.fragment&&c.fragment.c();e.intro&&Nh(n.$$.fragment),$h(n,e.target,e.anchor),Le()}In(l)}let Uh;typeof HTMLElement=="function"&&(Uh=class extends HTMLElement{constructor(e,t,i){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const s=this.$$c.$on(e,t);this.$$l_u.set(t,s)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){const s=this.$$l_u.get(t);s&&(s(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return()=>{let r;return{c:function(){r=Na("slot"),o!=="default"&&Dh(r,"name",o)},m:function(c,u){Da(c,r,u)},d:function(c){c&&Ro(r)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},i=H1(this);for(const o of this.$$s)o in i&&(t[o]=[e(o)]);for(const o of this.attributes){const r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=Js(r,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const r=Js(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const r of this.$$l[o]){const a=this.$$c.$on(o,r);this.$$l_u.set(r,a)}this.$$l={}}}attributeChangedCallback(e,t,i){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Js(e,i,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Js(n,e,t,i){var o;const s=(o=t[n])==null?void 0:o.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!i||!t[n])return e;if(i==="toAttribute")switch(s){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Wh(n,e,t,i,s,o){let r=class extends Uh{constructor(){super(n,t,s),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(r.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){var c;l=Js(a,l,e),this.$$d[a]=l,(c=this.$$c)==null||c.$set({[a]:l})}})}),i.forEach(a=>{Object.defineProperty(r.prototype,a,{get(){var l;return(l=this.$$c)==null?void 0:l[a]}})}),o&&(r=o(r)),n.element=r,r}class qh{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){Hh(this,1),this.$destroy=ei}$on(e,t){if(!Fa(t))return ei;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!V1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const tw="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(tw);/**
|
|
2
2
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/function Vo({emitter:n,activator:e,callback:t,contextElements:i}){n.listenTo(document,"mousedown",(s,o)=>{if(!e())return;const r=typeof o.composedPath=="function"?o.composedPath():[],a=typeof i=="function"?i():i;for(const l of a)if(l.contains(o.target)||r.includes(l))return;t()})}/**
|
package/dist/editor-lib.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./ckeditor5-
|
|
1
|
+
"use strict";const t=require("./ckeditor5-Cmy8uY5q.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-BAtbpyOD.js";
|
|
2
2
|
function A(e) {
|
|
3
3
|
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
|
|
4
4
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Editor component for LiveAgent",
|
|
4
4
|
"author": "QualityUnit",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.36",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/*"
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
|
33
33
|
"@tsconfig/svelte": "^5.0.4",
|
|
34
|
-
"svelte": "^4.2.
|
|
34
|
+
"svelte": "^4.2.13",
|
|
35
35
|
"svelte-check": "^3.6.9",
|
|
36
36
|
"tslib": "^2.6.2",
|
|
37
|
-
"typescript": "^5.4.
|
|
37
|
+
"typescript": "^5.4.5",
|
|
38
38
|
"vite": "^5.2.8"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|