@qualityunit/liveagent-components-editor 0.0.30 → 0.0.32

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.
@@ -1 +1 @@
1
- "use strict";const t=require("./ckeditor5-jifeVsuD.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));
1
+ "use strict";const t=require("./ckeditor5-BK2AiGze.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));
@@ -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-JntJCb_D.js";
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-SUnDm-Bp.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.30",
6
+ "version": "0.0.32",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/*"