@ckeditor/ckeditor5-word-count 43.2.0 → 43.3.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/build/translations/af.js +1 -0
- package/build/translations/ast.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/eo.js +1 -0
- package/build/translations/eu.js +1 -0
- package/build/translations/gu.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/kk.js +1 -0
- package/build/translations/km.js +1 -0
- package/build/translations/kn.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/oc.js +1 -0
- package/build/translations/si.js +1 -0
- package/build/translations/sl.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/word-count.js +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +5 -0
- package/dist/translations/af.umd.js +11 -0
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.umd.js +11 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.umd.js +11 -0
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gu.d.ts +8 -0
- package/dist/translations/gu.js +5 -0
- package/dist/translations/gu.umd.js +11 -0
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/kk.d.ts +8 -0
- package/dist/translations/kk.js +5 -0
- package/dist/translations/kk.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.umd.js +11 -0
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/oc.d.ts +8 -0
- package/dist/translations/oc.js +5 -0
- package/dist/translations/oc.umd.js +11 -0
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.d.ts +8 -0
- package/dist/translations/si.js +5 -0
- package/dist/translations/si.umd.js +11 -0
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.d.ts +8 -0
- package/dist/translations/sl.js +5 -0
- package/dist/translations/sl.umd.js +11 -0
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/wordcount.d.ts +4 -0
- package/lang/translations/af.po +20 -0
- package/lang/translations/ar.po +4 -10
- package/lang/translations/ast.po +20 -0
- package/lang/translations/az.po +3 -9
- package/lang/translations/bg.po +3 -9
- package/lang/translations/bn.po +3 -9
- package/lang/translations/bs.po +20 -0
- package/lang/translations/ca.po +3 -9
- package/lang/translations/cs.po +4 -10
- package/lang/translations/da.po +3 -9
- package/lang/translations/de-ch.po +3 -9
- package/lang/translations/de.po +3 -9
- package/lang/translations/el.po +3 -9
- package/lang/translations/en-au.po +3 -9
- package/lang/translations/en-gb.po +3 -9
- package/lang/translations/en.po +5 -11
- package/lang/translations/eo.po +20 -0
- package/lang/translations/es-co.po +4 -10
- package/lang/translations/es.po +4 -10
- package/lang/translations/et.po +3 -9
- package/lang/translations/eu.po +20 -0
- package/lang/translations/fa.po +4 -10
- package/lang/translations/fi.po +3 -9
- package/lang/translations/fr.po +4 -10
- package/lang/translations/gl.po +3 -9
- package/lang/translations/gu.po +20 -0
- package/lang/translations/he.po +4 -10
- package/lang/translations/hi.po +3 -9
- package/lang/translations/hr.po +4 -10
- package/lang/translations/hu.po +3 -9
- package/lang/translations/hy.po +3 -9
- package/lang/translations/id.po +3 -9
- package/lang/translations/it.po +4 -10
- package/lang/translations/ja.po +3 -9
- package/lang/translations/jv.po +20 -0
- package/lang/translations/kk.po +20 -0
- package/lang/translations/km.po +20 -0
- package/lang/translations/kn.po +20 -0
- package/lang/translations/ko.po +3 -9
- package/lang/translations/ku.po +3 -9
- package/lang/translations/lt.po +4 -10
- package/lang/translations/lv.po +4 -10
- package/lang/translations/ms.po +3 -9
- package/lang/translations/nb.po +20 -0
- package/lang/translations/ne.po +3 -9
- package/lang/translations/nl.po +3 -9
- package/lang/translations/no.po +3 -9
- package/lang/translations/oc.po +20 -0
- package/lang/translations/pl.po +4 -10
- package/lang/translations/pt-br.po +4 -10
- package/lang/translations/pt.po +4 -10
- package/lang/translations/ro.po +4 -10
- package/lang/translations/ru.po +4 -10
- package/lang/translations/si.po +20 -0
- package/lang/translations/sk.po +4 -10
- package/lang/translations/sl.po +20 -0
- package/lang/translations/sq.po +3 -9
- package/lang/translations/sr-latn.po +4 -10
- package/lang/translations/sr.po +4 -10
- package/lang/translations/sv.po +3 -9
- package/lang/translations/th.po +3 -9
- package/lang/translations/ti.po +20 -0
- package/lang/translations/tk.po +3 -9
- package/lang/translations/tr.po +3 -9
- package/lang/translations/tt.po +20 -0
- package/lang/translations/ug.po +4 -10
- package/lang/translations/uk.po +4 -10
- package/lang/translations/ur.po +3 -9
- package/lang/translations/uz.po +20 -0
- package/lang/translations/vi.po +3 -9
- package/lang/translations/zh-cn.po +3 -9
- package/lang/translations/zh.po +3 -9
- package/package.json +5 -5
- package/src/wordcount.d.ts +4 -0
- package/src/wordcount.js +6 -0
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.af=i.af||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.ast=i.ast||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.bs=i.bs||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.eo=o.eo||{};i.dictionary=Object.assign(i.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.eu=i.eu||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.gu=i.gu||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.jv=i.jv||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.kk=i.kk||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.km=i.km||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const i=n.kn=n.kn||{};i.dictionary=Object.assign(i.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const i=n.nb=n.nb||{};i.dictionary=Object.assign(i.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const c=o.oc=o.oc||{};c.dictionary=Object.assign(c.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.si=i.si||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.sl=i.sl||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.ti=i.ti||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(t){const i=t.tt=t.tt||{};i.dictionary=Object.assign(i.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.uz=i.uz||{};n.dictionary=Object.assign(n.dictionary||{},{"Characters: %0":"","Words: %0":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/word-count.js
CHANGED
@@ -2,4 +2,4 @@
|
|
2
2
|
/*!
|
3
3
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
4
4
|
* For licensing, see LICENSE.md.
|
5
|
-
*/(()=>{var t={782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{WordCount:()=>z});var t=r(782),e=r(311),n=r(584);function i(t){if(t.is("$text")||t.is("$textProxy"))return t.data;const e=t;let r="",o=null;for(const t of e.getChildren()){const e=i(t);o&&o.is("element")&&(r+="\n"),r+=e,o=t}return r}const s=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const c="object"==typeof global&&global&&global.Object===Object&&global;var a="object"==typeof self&&self&&self.Object===Object&&self;const u=c||a||Function("return this")();const d=function(){return u.Date.now()};var l=/\s/;const f=function(t){for(var e=t.length;e--&&l.test(t.charAt(e)););return e};var h=/^\s+/;const p=function(t){return t?t.slice(0,f(t)+1).replace(h,""):t};const g=u.Symbol;var v=Object.prototype,b=v.hasOwnProperty,w=v.toString,y=g?g.toStringTag:void 0;const _=function(t){var e=b.call(t,y),r=t[y];try{t[y]=void 0;var o=!0}catch(t){}var n=w.call(t);return o&&(e?t[y]=r:delete t[y]),n};var m=Object.prototype.toString;const j=function(t){return m.call(t)};var x=g?g.toStringTag:void 0;const O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?_(t):j(t)};const T=function(t){return null!=t&&"object"==typeof t};const C=function(t){return"symbol"==typeof t||T(t)&&"[object Symbol]"==O(t)};var S=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,
|
5
|
+
*/(()=>{var t={782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{WordCount:()=>z});var t=r(782),e=r(311),n=r(584);function i(t){if(t.is("$text")||t.is("$textProxy"))return t.data;const e=t;let r="",o=null;for(const t of e.getChildren()){const e=i(t);o&&o.is("element")&&(r+="\n"),r+=e,o=t}return r}const s=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const c="object"==typeof global&&global&&global.Object===Object&&global;var a="object"==typeof self&&self&&self.Object===Object&&self;const u=c||a||Function("return this")();const d=function(){return u.Date.now()};var l=/\s/;const f=function(t){for(var e=t.length;e--&&l.test(t.charAt(e)););return e};var h=/^\s+/;const p=function(t){return t?t.slice(0,f(t)+1).replace(h,""):t};const g=u.Symbol;var v=Object.prototype,b=v.hasOwnProperty,w=v.toString,y=g?g.toStringTag:void 0;const _=function(t){var e=b.call(t,y),r=t[y];try{t[y]=void 0;var o=!0}catch(t){}var n=w.call(t);return o&&(e?t[y]=r:delete t[y]),n};var m=Object.prototype.toString;const j=function(t){return m.call(t)};var x=g?g.toStringTag:void 0;const O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?_(t):j(t)};const T=function(t){return null!=t&&"object"==typeof t};const C=function(t){return"symbol"==typeof t||T(t)&&"[object Symbol]"==O(t)};var S=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,P=/^0o[0-7]+$/i,W=parseInt;const N=function(t){if("number"==typeof t)return t;if(C(t))return NaN;if(s(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=s(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=p(t);var r=E.test(t);return r||P.test(t)?W(t.slice(2),r?2:8):S.test(t)?NaN:+t};var V=Math.max,L=Math.min;const R=function(t,e,r){var o,n,i,c,a,u,l=0,f=!1,h=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var r=o,i=n;return o=n=void 0,l=e,c=t.apply(i,r)}function v(t){var r=t-u;return void 0===u||r>=e||r<0||h&&t-l>=i}function b(){var t=d();if(v(t))return w(t);a=setTimeout(b,function(t){var r=e-(t-u);return h?L(r,i-(t-l)):r}(t))}function w(t){return a=void 0,p&&o?g(t):(o=n=void 0,c)}function y(){var t=d(),r=v(t);if(o=arguments,n=this,u=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(b,e),f?g(t):c}(u);if(h)return clearTimeout(a),a=setTimeout(b,e),g(u)}return void 0===a&&(a=setTimeout(b,e)),c}return e=N(e)||0,s(r)&&(f=!!r.leading,i=(h="maxWait"in r)?V(N(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,o=u=n=a=void 0},y.flush=function(){return void 0===a?c:w(d())},y};const A=function(t,e,r){var o=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return s(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),R(t,e,{leading:o,maxWait:e,trailing:n})};const M=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object);var I=Function.prototype,K=Object.prototype,$=I.toString,k=K.hasOwnProperty,U=$.call(Object);const D=function(t){if(!T(t)||"[object Object]"!=O(t))return!1;var e=M(t);if(null===e)return!0;var r=k.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&$.call(r)==U};const F=function(t){return T(t)&&1===t.nodeType&&!D(t)};class z extends t.Plugin{constructor(t){super(t),this.set("characters",0),this.set("words",0),Object.defineProperties(this,{characters:{get(){return this.characters=this._getCharacters(this._getText())}},words:{get(){return this.words=this._getWords(this._getText())}}}),this.set("_wordsLabel",void 0),this.set("_charactersLabel",void 0),this._config=t.config.get("wordCount")||{},this._outputView=void 0,this._wordsMatchRegExp=n.env.features.isRegExpUnicodePropertySupported?new RegExp("([\\p{L}\\p{N}]+\\S?)+","gu"):/([a-zA-Z0-9À-ž]+\S?)+/gu}static get pluginName(){return"WordCount"}static get isOfficialPlugin(){return!0}init(){this.editor.model.document.on("change:data",A(this._refreshStats.bind(this),250)),"function"==typeof this._config.onUpdate&&this.on("update",((t,e)=>{this._config.onUpdate(e)})),F(this._config.container)&&this._config.container.appendChild(this.wordCountContainer)}destroy(){this._outputView&&(this._outputView.element.remove(),this._outputView.destroy()),super.destroy()}get wordCountContainer(){const t=this.editor,r=t.t,o=t.config.get("wordCount.displayWords"),n=t.config.get("wordCount.displayCharacters"),i=e.Template.bind(this,this),s=[];return this._outputView||(this._outputView=new e.View,(o||void 0===o)&&(this.bind("_wordsLabel").to(this,"words",(t=>r("Words: %0",t))),s.push({tag:"div",children:[{text:[i.to("_wordsLabel")]}],attributes:{class:"ck-word-count__words"}})),(n||void 0===n)&&(this.bind("_charactersLabel").to(this,"characters",(t=>r("Characters: %0",t))),s.push({tag:"div",children:[{text:[i.to("_charactersLabel")]}],attributes:{class:"ck-word-count__characters"}})),this._outputView.setTemplate({tag:"div",attributes:{class:["ck","ck-word-count"]},children:s}),this._outputView.render()),this._outputView.element}_getText(){let t="";for(const e of this.editor.model.document.getRoots())""!==t&&(t+="\n"),t+=i(e);return t}_getCharacters(t){return t.replace(/\n/g,"").length}_getWords(t){return(t.match(this._wordsMatchRegExp)||[]).length}_refreshStats(){const t=this._getText(),e=this.words=this._getWords(t),r=this.characters=this._getCharacters(t);this.fire("update",{words:e,characters:r})}}})(),(window.CKEditor5=window.CKEditor5||{}).wordCount=o})();
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js","../src/utils.ts","../src/wordcount.ts"],"names":["modelElementToPlainText","item","is","data","element","text","prev","child","getChildren","childText","WordCount","Plugin","constructor","editor","set","Object","defineProperties","characters","get","_getCharacters","_getText","words","_getWords","undefined","_config","config","_outputView","_wordsMatchRegExp","env","features","isRegExpUnicodePropertySupported","RegExp","pluginName","model","document","on","throttle","_refreshStats","bind","onUpdate","evt","isElement","container","appendChild","wordCountContainer","remove","destroy","t","displayWords","displayCharacters","Template","children","View","to","push","tag","attributes","class","setTemplate","render","txt","root","getRoots","replace","length","detectedWords","match","fire"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC9D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAA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A,CAAU,CAAA,CAAA,CAAA;AAC1C9C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,CAAAA;AACAJ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,UAAAA;AACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACD,CAAA,CAAA,CAAA,CAAA,CAAA;AACD,CAAA;AF/DA;AACA,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Template, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { env } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module word-count/utils\n */ /**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */ function modelElementToPlainText(item) {\n if (item.is('$text') || item.is('$textProxy')) {\n return item.data;\n }\n const element = item;\n let text = '';\n let prev = null;\n for (const child of element.getChildren()){\n const childText = modelElementToPlainText(child);\n // If last block was finish, start from new line.\n if (prev && prev.is('element')) {\n text += '\\n';\n }\n text += childText;\n prev = child;\n }\n return text;\n}\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */ class WordCount extends Plugin {\n /**\n\t * The configuration of this plugin.\n\t */ _config;\n /**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */ _outputView;\n /**\n\t * A regular expression used to recognize words in the editor's content.\n\t */ _wordsMatchRegExp;\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n this.set('characters', 0);\n this.set('words', 0);\n // Don't wait for the #update event to set the value of the properties but obtain it right away.\n // This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n // If not accessed directly, the properties will be refreshed upon #update anyway.\n Object.defineProperties(this, {\n characters: {\n get () {\n return this.characters = this._getCharacters(this._getText());\n }\n },\n words: {\n get () {\n return this.words = this._getWords(this._getText());\n }\n }\n });\n this.set('_wordsLabel', undefined);\n this.set('_charactersLabel', undefined);\n this._config = editor.config.get('wordCount') || {};\n this._outputView = undefined;\n this._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n // Groups:\n // {L} - Any kind of letter from any language.\n // {N} - Any kind of numeric character in any script.\n new RegExp('([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu') : /([a-zA-Z0-9À-ž]+\\S?)+/gu;\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'WordCount';\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.model.document.on('change:data', throttle(this._refreshStats.bind(this), 250));\n if (typeof this._config.onUpdate == 'function') {\n this.on('update', (evt, data)=>{\n this._config.onUpdate(data);\n });\n }\n if (isElement(this._config.container)) {\n this._config.container.appendChild(this.wordCountContainer);\n }\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n if (this._outputView) {\n this._outputView.element.remove();\n this._outputView.destroy();\n }\n super.destroy();\n }\n /**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */ get wordCountContainer() {\n const editor = this.editor;\n const t = editor.t;\n const displayWords = editor.config.get('wordCount.displayWords');\n const displayCharacters = editor.config.get('wordCount.displayCharacters');\n const bind = Template.bind(this, this);\n const children = [];\n if (!this._outputView) {\n this._outputView = new View();\n if (displayWords || displayWords === undefined) {\n this.bind('_wordsLabel').to(this, 'words', (words)=>{\n return t('Words: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_wordsLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__words'\n }\n });\n }\n if (displayCharacters || displayCharacters === undefined) {\n this.bind('_charactersLabel').to(this, 'characters', (words)=>{\n return t('Characters: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_charactersLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__characters'\n }\n });\n }\n this._outputView.setTemplate({\n tag: 'div',\n attributes: {\n class: [\n 'ck',\n 'ck-word-count'\n ]\n },\n children\n });\n this._outputView.render();\n }\n return this._outputView.element;\n }\n _getText() {\n let txt = '';\n for (const root of this.editor.model.document.getRoots()){\n if (txt !== '') {\n // Add a delimiter, so words from each root are treated independently.\n txt += '\\n';\n }\n txt += modelElementToPlainText(root);\n }\n return txt;\n }\n /**\n\t * Determines the number of characters in the current editor's model.\n\t */ _getCharacters(txt) {\n return txt.replace(/\\n/g, '').length;\n }\n /**\n\t * Determines the number of words in the current editor's model.\n\t */ _getWords(txt) {\n const detectedWords = txt.match(this._wordsMatchRegExp) || [];\n return detectedWords.length;\n }\n /**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */ _refreshStats() {\n const txt = this._getText();\n const words = this.words = this._getWords(txt);\n const characters = this.characters = this._getCharacters(txt);\n this.fire('update', {\n words,\n characters\n });\n }\n}\n\nexport { WordCount };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/utils\n */\n\nimport type { Element, Item } from 'ckeditor5/src/engine.js';\n\n/**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */\nexport function modelElementToPlainText( item: Item ): string {\n\tif ( item.is( '$text' ) || item.is( '$textProxy' ) ) {\n\t\treturn item.data;\n\t}\n\n\tconst element = item as Element;\n\tlet text = '';\n\tlet prev = null;\n\n\tfor ( const child of element.getChildren() ) {\n\t\tconst childText = modelElementToPlainText( child );\n\n\t\t// If last block was finish, start from new line.\n\t\tif ( prev && prev.is( 'element' ) ) {\n\t\t\ttext += '\\n';\n\t\t}\n\n\t\ttext += childText;\n\n\t\tprev = child;\n\t}\n\n\treturn text;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/wordcount\n */\n\nimport { type DocumentChangeEvent } from 'ckeditor5/src/engine.js';\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { Template, View } from 'ckeditor5/src/ui.js';\nimport { env } from 'ckeditor5/src/utils.js';\n\nimport { modelElementToPlainText } from './utils.js';\nimport type { WordCountConfig } from './wordcountconfig.js';\n\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */\nexport default class WordCount extends Plugin {\n\t/**\n\t * The number of characters in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public characters: number;\n\n\t/**\n\t * The number of words in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public words: number;\n\n\t/**\n\t * The label used to display the words value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _wordsLabel: string | undefined;\n\n\t/**\n\t * The label used to display the characters value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _charactersLabel: string | undefined;\n\n\t/**\n\t * The configuration of this plugin.\n\t */\n\tprivate _config: WordCountConfig;\n\n\t/**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */\n\tprivate _outputView: View | undefined;\n\n\t/**\n\t * A regular expression used to recognize words in the editor's content.\n\t */\n\tprivate readonly _wordsMatchRegExp: RegExp;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'characters', 0 );\n\t\tthis.set( 'words', 0 );\n\n\t\t// Don't wait for the #update event to set the value of the properties but obtain it right away.\n\t\t// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n\t\t// If not accessed directly, the properties will be refreshed upon #update anyway.\n\t\tObject.defineProperties( this, {\n\t\t\tcharacters: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.characters = this._getCharacters( this._getText() ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\twords: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.words = this._getWords( this._getText() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( '_wordsLabel', undefined );\n\t\tthis.set( '_charactersLabel', undefined );\n\n\t\tthis._config = editor.config.get( 'wordCount' ) || {};\n\n\t\tthis._outputView = undefined;\n\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ?\n\t\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\t\t// Groups:\n\t\t\t// {L} - Any kind of letter from any language.\n\t\t\t// {N} - Any kind of numeric character in any script.\n\t\t\tnew RegExp( '([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu' ) :\n\t\t\t/([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WordCount' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.on<DocumentChangeEvent>( 'change:data', throttle( this._refreshStats.bind( this ), 250 ) );\n\n\t\tif ( typeof this._config.onUpdate == 'function' ) {\n\t\t\tthis.on<WordCountUpdateEvent>( 'update', ( evt, data ) => {\n\t\t\t\tthis._config.onUpdate!( data );\n\t\t\t} );\n\t\t}\n\n\t\tif ( isElement( this._config.container ) ) {\n\t\t\tthis._config.container!.appendChild( this.wordCountContainer );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._outputView ) {\n\t\t\tthis._outputView.element!.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */\n\tpublic get wordCountContainer(): HTMLElement {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get( 'wordCount.displayWords' );\n\t\tconst displayCharacters = editor.config.get( 'wordCount.displayCharacters' );\n\t\tconst bind = Template.bind( this, this );\n\t\tconst children = [];\n\n\t\tif ( !this._outputView ) {\n\t\t\tthis._outputView = new View();\n\n\t\t\tif ( displayWords || displayWords === undefined ) {\n\t\t\t\tthis.bind( '_wordsLabel' ).to( this, 'words', words => {\n\t\t\t\t\treturn t( 'Words: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_wordsLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__words'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( displayCharacters || displayCharacters === undefined ) {\n\t\t\t\tthis.bind( '_charactersLabel' ).to( this, 'characters', words => {\n\t\t\t\t\treturn t( 'Characters: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_charactersLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__characters'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._outputView.setTemplate( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-word-count'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t} );\n\n\t\t\tthis._outputView.render();\n\t\t}\n\n\t\treturn this._outputView.element!;\n\t}\n\n\tprivate _getText(): string {\n\t\tlet txt = '';\n\n\t\tfor ( const root of this.editor.model.document.getRoots() ) {\n\t\t\tif ( txt !== '' ) {\n\t\t\t\t// Add a delimiter, so words from each root are treated independently.\n\t\t\t\ttxt += '\\n';\n\t\t\t}\n\n\t\t\ttxt += modelElementToPlainText( root );\n\t\t}\n\n\t\treturn txt;\n\t}\n\n\t/**\n\t * Determines the number of characters in the current editor's model.\n\t */\n\tprivate _getCharacters( txt: string ): number {\n\t\treturn txt.replace( /\\n/g, '' ).length;\n\t}\n\n\t/**\n\t * Determines the number of words in the current editor's model.\n\t */\n\tprivate _getWords( txt: string ): number {\n\t\tconst detectedWords = txt.match( this._wordsMatchRegExp ) || [];\n\n\t\treturn detectedWords.length;\n\t}\n\n\t/**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */\n\tprivate _refreshStats(): void {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords( txt );\n\t\tconst characters = this.characters = this._getCharacters( txt );\n\n\t\tthis.fire<WordCountUpdateEvent>( 'update', {\n\t\t\twords,\n\t\t\tcharacters\n\t\t} );\n\t}\n}\n\n/**\n * An event fired after {@link ~WordCount#words} and {@link ~WordCount#characters} are updated.\n *\n * @eventName ~WordCount#update\n */\nexport type WordCountUpdateEvent = {\n\tname: 'update';\n\targs: [ { words: number; characters: number } ];\n};\n"]}
|
1
|
+
{"version":3,"sources":["index.js","../src/utils.ts","../src/wordcount.ts"],"names":["modelElementToPlainText","item","is","data","element","text","prev","child","getChildren","childText","WordCount","Plugin","constructor","editor","set","Object","defineProperties","characters","get","_getCharacters","_getText","words","_getWords","undefined","_config","config","_outputView","_wordsMatchRegExp","env","features","isRegExpUnicodePropertySupported","RegExp","pluginName","isOfficialPlugin","model","document","on","throttle","_refreshStats","bind","onUpdate","evt","isElement","container","appendChild","wordCountContainer","remove","destroy","t","displayWords","displayCharacters","Template","children","View","to","push","tag","attributes","class","setTemplate","render","txt","root","getRoots","replace","length","detectedWords","match","fire"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACrE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;ACH/C,CAAA,CAAA;ADMA,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CA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CAAA,CAAA;AAC1C/C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA;AACAJ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACD,CAAA,CAAA,CAAA,CAAA;AACD;;AFhEA,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Template, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { env } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module word-count/utils\n */ /**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */ function modelElementToPlainText(item) {\n if (item.is('$text') || item.is('$textProxy')) {\n return item.data;\n }\n const element = item;\n let text = '';\n let prev = null;\n for (const child of element.getChildren()){\n const childText = modelElementToPlainText(child);\n // If last block was finish, start from new line.\n if (prev && prev.is('element')) {\n text += '\\n';\n }\n text += childText;\n prev = child;\n }\n return text;\n}\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */ class WordCount extends Plugin {\n /**\n\t * The configuration of this plugin.\n\t */ _config;\n /**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */ _outputView;\n /**\n\t * A regular expression used to recognize words in the editor's content.\n\t */ _wordsMatchRegExp;\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n this.set('characters', 0);\n this.set('words', 0);\n // Don't wait for the #update event to set the value of the properties but obtain it right away.\n // This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n // If not accessed directly, the properties will be refreshed upon #update anyway.\n Object.defineProperties(this, {\n characters: {\n get () {\n return this.characters = this._getCharacters(this._getText());\n }\n },\n words: {\n get () {\n return this.words = this._getWords(this._getText());\n }\n }\n });\n this.set('_wordsLabel', undefined);\n this.set('_charactersLabel', undefined);\n this._config = editor.config.get('wordCount') || {};\n this._outputView = undefined;\n this._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n // Groups:\n // {L} - Any kind of letter from any language.\n // {N} - Any kind of numeric character in any script.\n new RegExp('([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu') : /([a-zA-Z0-9À-ž]+\\S?)+/gu;\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'WordCount';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.model.document.on('change:data', throttle(this._refreshStats.bind(this), 250));\n if (typeof this._config.onUpdate == 'function') {\n this.on('update', (evt, data)=>{\n this._config.onUpdate(data);\n });\n }\n if (isElement(this._config.container)) {\n this._config.container.appendChild(this.wordCountContainer);\n }\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n if (this._outputView) {\n this._outputView.element.remove();\n this._outputView.destroy();\n }\n super.destroy();\n }\n /**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */ get wordCountContainer() {\n const editor = this.editor;\n const t = editor.t;\n const displayWords = editor.config.get('wordCount.displayWords');\n const displayCharacters = editor.config.get('wordCount.displayCharacters');\n const bind = Template.bind(this, this);\n const children = [];\n if (!this._outputView) {\n this._outputView = new View();\n if (displayWords || displayWords === undefined) {\n this.bind('_wordsLabel').to(this, 'words', (words)=>{\n return t('Words: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_wordsLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__words'\n }\n });\n }\n if (displayCharacters || displayCharacters === undefined) {\n this.bind('_charactersLabel').to(this, 'characters', (words)=>{\n return t('Characters: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_charactersLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__characters'\n }\n });\n }\n this._outputView.setTemplate({\n tag: 'div',\n attributes: {\n class: [\n 'ck',\n 'ck-word-count'\n ]\n },\n children\n });\n this._outputView.render();\n }\n return this._outputView.element;\n }\n _getText() {\n let txt = '';\n for (const root of this.editor.model.document.getRoots()){\n if (txt !== '') {\n // Add a delimiter, so words from each root are treated independently.\n txt += '\\n';\n }\n txt += modelElementToPlainText(root);\n }\n return txt;\n }\n /**\n\t * Determines the number of characters in the current editor's model.\n\t */ _getCharacters(txt) {\n return txt.replace(/\\n/g, '').length;\n }\n /**\n\t * Determines the number of words in the current editor's model.\n\t */ _getWords(txt) {\n const detectedWords = txt.match(this._wordsMatchRegExp) || [];\n return detectedWords.length;\n }\n /**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */ _refreshStats() {\n const txt = this._getText();\n const words = this.words = this._getWords(txt);\n const characters = this.characters = this._getCharacters(txt);\n this.fire('update', {\n words,\n characters\n });\n }\n}\n\nexport { WordCount };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/utils\n */\n\nimport type { Element, Item } from 'ckeditor5/src/engine.js';\n\n/**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */\nexport function modelElementToPlainText( item: Item ): string {\n\tif ( item.is( '$text' ) || item.is( '$textProxy' ) ) {\n\t\treturn item.data;\n\t}\n\n\tconst element = item as Element;\n\tlet text = '';\n\tlet prev = null;\n\n\tfor ( const child of element.getChildren() ) {\n\t\tconst childText = modelElementToPlainText( child );\n\n\t\t// If last block was finish, start from new line.\n\t\tif ( prev && prev.is( 'element' ) ) {\n\t\t\ttext += '\\n';\n\t\t}\n\n\t\ttext += childText;\n\n\t\tprev = child;\n\t}\n\n\treturn text;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/wordcount\n */\n\nimport { type DocumentChangeEvent } from 'ckeditor5/src/engine.js';\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { Template, View } from 'ckeditor5/src/ui.js';\nimport { env } from 'ckeditor5/src/utils.js';\n\nimport { modelElementToPlainText } from './utils.js';\nimport type { WordCountConfig } from './wordcountconfig.js';\n\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */\nexport default class WordCount extends Plugin {\n\t/**\n\t * The number of characters in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public characters: number;\n\n\t/**\n\t * The number of words in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public words: number;\n\n\t/**\n\t * The label used to display the words value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _wordsLabel: string | undefined;\n\n\t/**\n\t * The label used to display the characters value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _charactersLabel: string | undefined;\n\n\t/**\n\t * The configuration of this plugin.\n\t */\n\tprivate _config: WordCountConfig;\n\n\t/**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */\n\tprivate _outputView: View | undefined;\n\n\t/**\n\t * A regular expression used to recognize words in the editor's content.\n\t */\n\tprivate readonly _wordsMatchRegExp: RegExp;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'characters', 0 );\n\t\tthis.set( 'words', 0 );\n\n\t\t// Don't wait for the #update event to set the value of the properties but obtain it right away.\n\t\t// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n\t\t// If not accessed directly, the properties will be refreshed upon #update anyway.\n\t\tObject.defineProperties( this, {\n\t\t\tcharacters: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.characters = this._getCharacters( this._getText() ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\twords: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.words = this._getWords( this._getText() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( '_wordsLabel', undefined );\n\t\tthis.set( '_charactersLabel', undefined );\n\n\t\tthis._config = editor.config.get( 'wordCount' ) || {};\n\n\t\tthis._outputView = undefined;\n\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ?\n\t\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\t\t// Groups:\n\t\t\t// {L} - Any kind of letter from any language.\n\t\t\t// {N} - Any kind of numeric character in any script.\n\t\t\tnew RegExp( '([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu' ) :\n\t\t\t/([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WordCount' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.on<DocumentChangeEvent>( 'change:data', throttle( this._refreshStats.bind( this ), 250 ) );\n\n\t\tif ( typeof this._config.onUpdate == 'function' ) {\n\t\t\tthis.on<WordCountUpdateEvent>( 'update', ( evt, data ) => {\n\t\t\t\tthis._config.onUpdate!( data );\n\t\t\t} );\n\t\t}\n\n\t\tif ( isElement( this._config.container ) ) {\n\t\t\tthis._config.container!.appendChild( this.wordCountContainer );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._outputView ) {\n\t\t\tthis._outputView.element!.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */\n\tpublic get wordCountContainer(): HTMLElement {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get( 'wordCount.displayWords' );\n\t\tconst displayCharacters = editor.config.get( 'wordCount.displayCharacters' );\n\t\tconst bind = Template.bind( this, this );\n\t\tconst children = [];\n\n\t\tif ( !this._outputView ) {\n\t\t\tthis._outputView = new View();\n\n\t\t\tif ( displayWords || displayWords === undefined ) {\n\t\t\t\tthis.bind( '_wordsLabel' ).to( this, 'words', words => {\n\t\t\t\t\treturn t( 'Words: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_wordsLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__words'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( displayCharacters || displayCharacters === undefined ) {\n\t\t\t\tthis.bind( '_charactersLabel' ).to( this, 'characters', words => {\n\t\t\t\t\treturn t( 'Characters: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_charactersLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__characters'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._outputView.setTemplate( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-word-count'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t} );\n\n\t\t\tthis._outputView.render();\n\t\t}\n\n\t\treturn this._outputView.element!;\n\t}\n\n\tprivate _getText(): string {\n\t\tlet txt = '';\n\n\t\tfor ( const root of this.editor.model.document.getRoots() ) {\n\t\t\tif ( txt !== '' ) {\n\t\t\t\t// Add a delimiter, so words from each root are treated independently.\n\t\t\t\ttxt += '\\n';\n\t\t\t}\n\n\t\t\ttxt += modelElementToPlainText( root );\n\t\t}\n\n\t\treturn txt;\n\t}\n\n\t/**\n\t * Determines the number of characters in the current editor's model.\n\t */\n\tprivate _getCharacters( txt: string ): number {\n\t\treturn txt.replace( /\\n/g, '' ).length;\n\t}\n\n\t/**\n\t * Determines the number of words in the current editor's model.\n\t */\n\tprivate _getWords( txt: string ): number {\n\t\tconst detectedWords = txt.match( this._wordsMatchRegExp ) || [];\n\n\t\treturn detectedWords.length;\n\t}\n\n\t/**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */\n\tprivate _refreshStats(): void {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords( txt );\n\t\tconst characters = this.characters = this._getCharacters( txt );\n\n\t\tthis.fire<WordCountUpdateEvent>( 'update', {\n\t\t\twords,\n\t\t\tcharacters\n\t\t} );\n\t}\n}\n\n/**\n * An event fired after {@link ~WordCount#words} and {@link ~WordCount#characters} are updated.\n *\n * @eventName ~WordCount#update\n */\nexport type WordCountUpdateEvent = {\n\tname: 'update';\n\targs: [ { words: number; characters: number } ];\n};\n"]}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
export default {"af":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'af' ]: { dictionary, getPluralForm } } = {"af":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'af' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'af' ].dictionary = Object.assign( e[ 'af' ].dictionary, dictionary );
|
10
|
+
e[ 'af' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/ar.js
CHANGED
@@ -2,4 +2,4 @@
|
|
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
|
*/
|
5
|
-
export default {"ar":{"dictionary":{"Words: %0":"الكلمات: %0","Characters: %0":"الأحرف: %0"},getPluralForm(n){return n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11
|
5
|
+
export default {"ar":{"dictionary":{"Words: %0":"الكلمات: %0","Characters: %0":"الأحرف: %0"},getPluralForm(n){return (n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);}}}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
( e => {
|
7
|
-
const { [ 'ar' ]: { dictionary, getPluralForm } } = {"ar":{"dictionary":{"Words: %0":"الكلمات: %0","Characters: %0":"الأحرف: %0"},getPluralForm(n){return n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11
|
7
|
+
const { [ 'ar' ]: { dictionary, getPluralForm } } = {"ar":{"dictionary":{"Words: %0":"الكلمات: %0","Characters: %0":"الأحرف: %0"},getPluralForm(n){return (n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);}}};
|
8
8
|
e[ 'ar' ] ||= { dictionary: {}, getPluralForm: null };
|
9
9
|
e[ 'ar' ].dictionary = Object.assign( e[ 'ar' ].dictionary, dictionary );
|
10
10
|
e[ 'ar' ].getPluralForm = getPluralForm;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
export default {"ast":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'ast' ]: { dictionary, getPluralForm } } = {"ast":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'ast' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'ast' ].dictionary = Object.assign( e[ 'ast' ].dictionary, dictionary );
|
10
|
+
e[ 'ast' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
export default {"bs":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'bs' ]: { dictionary, getPluralForm } } = {"bs":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);}}};
|
8
|
+
e[ 'bs' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'bs' ].dictionary = Object.assign( e[ 'bs' ].dictionary, dictionary );
|
10
|
+
e[ 'bs' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/cs.js
CHANGED
@@ -2,4 +2,4 @@
|
|
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
|
*/
|
5
|
-
export default {"cs":{"dictionary":{"Words: %0":"Počet slov: %0","Characters: %0":"Počet znaků: %0"},getPluralForm(n){return (n == 1
|
5
|
+
export default {"cs":{"dictionary":{"Words: %0":"Počet slov: %0","Characters: %0":"Počet znaků: %0"},getPluralForm(n){return (n == 1 ? 0 : (n >= 2 && n <= 4) ? 1 : 2);}}}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
( e => {
|
7
|
-
const { [ 'cs' ]: { dictionary, getPluralForm } } = {"cs":{"dictionary":{"Words: %0":"Počet slov: %0","Characters: %0":"Počet znaků: %0"},getPluralForm(n){return (n == 1
|
7
|
+
const { [ 'cs' ]: { dictionary, getPluralForm } } = {"cs":{"dictionary":{"Words: %0":"Počet slov: %0","Characters: %0":"Počet znaků: %0"},getPluralForm(n){return (n == 1 ? 0 : (n >= 2 && n <= 4) ? 1 : 2);}}};
|
8
8
|
e[ 'cs' ] ||= { dictionary: {}, getPluralForm: null };
|
9
9
|
e[ 'cs' ].dictionary = Object.assign( e[ 'cs' ].dictionary, dictionary );
|
10
10
|
e[ 'cs' ].getPluralForm = getPluralForm;
|
package/dist/translations/en.js
CHANGED
@@ -2,4 +2,4 @@
|
|
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
|
*/
|
5
|
-
export default {"en":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},
|
5
|
+
export default {"en":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
( e => {
|
7
|
-
const { [ 'en' ]: { dictionary, getPluralForm } } = {"en":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},
|
7
|
+
const { [ 'en' ]: { dictionary, getPluralForm } } = {"en":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},getPluralForm(n){return (n != 1);}}};
|
8
8
|
e[ 'en' ] ||= { dictionary: {}, getPluralForm: null };
|
9
9
|
e[ 'en' ].dictionary = Object.assign( e[ 'en' ].dictionary, dictionary );
|
10
10
|
e[ 'en' ].getPluralForm = getPluralForm;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
export default {"eo":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'eo' ]: { dictionary, getPluralForm } } = {"eo":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'eo' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'eo' ].dictionary = Object.assign( e[ 'eo' ].dictionary, dictionary );
|
10
|
+
e[ 'eo' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -2,4 +2,4 @@
|
|
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
|
*/
|
5
|
-
export default {"es-co":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return n
|
5
|
+
export default {"es-co":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
( e => {
|
7
|
-
const { [ 'es-co' ]: { dictionary, getPluralForm } } = {"es-co":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return n
|
7
|
+
const { [ 'es-co' ]: { dictionary, getPluralForm } } = {"es-co":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return (n != 1);}}};
|
8
8
|
e[ 'es-co' ] ||= { dictionary: {}, getPluralForm: null };
|
9
9
|
e[ 'es-co' ].dictionary = Object.assign( e[ 'es-co' ].dictionary, dictionary );
|
10
10
|
e[ 'es-co' ].getPluralForm = getPluralForm;
|
package/dist/translations/es.js
CHANGED
@@ -2,4 +2,4 @@
|
|
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
|
*/
|
5
|
-
export default {"es":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return n
|
5
|
+
export default {"es":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
( e => {
|
7
|
-
const { [ 'es' ]: { dictionary, getPluralForm } } = {"es":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return n
|
7
|
+
const { [ 'es' ]: { dictionary, getPluralForm } } = {"es":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return (n != 1);}}};
|
8
8
|
e[ 'es' ] ||= { dictionary: {}, getPluralForm: null };
|
9
9
|
e[ 'es' ].dictionary = Object.assign( e[ 'es' ].dictionary, dictionary );
|
10
10
|
e[ 'es' ].getPluralForm = getPluralForm;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
export default {"eu":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'eu' ]: { dictionary, getPluralForm } } = {"eu":{"dictionary":{"Words: %0":"","Characters: %0":""},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'eu' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'eu' ].dictionary = Object.assign( e[ 'eu' ].dictionary, dictionary );
|
10
|
+
e[ 'eu' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/fa.js
CHANGED
@@ -2,4 +2,4 @@
|
|
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
|
*/
|
5
|
-
export default {"fa":{"dictionary":{"Words: %0":"تعداد لغات : %0","Characters: %0":"تعداد حروف : %0"},getPluralForm(n){return
|
5
|
+
export default {"fa":{"dictionary":{"Words: %0":"تعداد لغات : %0","Characters: %0":"تعداد حروف : %0"},getPluralForm(n){return 0;}}}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
( e => {
|
7
|
-
const { [ 'fa' ]: { dictionary, getPluralForm } } = {"fa":{"dictionary":{"Words: %0":"تعداد لغات : %0","Characters: %0":"تعداد حروف : %0"},getPluralForm(n){return
|
7
|
+
const { [ 'fa' ]: { dictionary, getPluralForm } } = {"fa":{"dictionary":{"Words: %0":"تعداد لغات : %0","Characters: %0":"تعداد حروف : %0"},getPluralForm(n){return 0;}}};
|
8
8
|
e[ 'fa' ] ||= { dictionary: {}, getPluralForm: null };
|
9
9
|
e[ 'fa' ].dictionary = Object.assign( e[ 'fa' ].dictionary, dictionary );
|
10
10
|
e[ 'fa' ].getPluralForm = getPluralForm;
|