@ckeditor/ckeditor5-import-word 0.0.0-internal-20241017.0 → 0.0.0-internal-20241206.0
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/LICENSE.md +6 -6
- package/README.md +19 -14
- package/build/import-word.js +1 -1
- package/build/translations/af.js +1 -0
- package/build/translations/ast.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/eo.js +1 -0
- package/build/translations/es-co.js +1 -0
- package/build/translations/eu.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/gu.js +1 -0
- package/build/translations/hy.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/ku.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/ne.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/sq.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/dist/index.js +1 -1
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +23 -0
- package/dist/translations/af.umd.js +23 -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 +23 -0
- package/dist/translations/ast.umd.js +23 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +23 -0
- package/dist/translations/az.umd.js +23 -0
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +23 -0
- package/dist/translations/bs.umd.js +23 -0
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +23 -0
- package/dist/translations/de-ch.umd.js +23 -0
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +23 -0
- package/dist/translations/en-gb.umd.js +23 -0
- 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 +23 -0
- package/dist/translations/eo.umd.js +23 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +23 -0
- package/dist/translations/es-co.umd.js +23 -0
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +23 -0
- package/dist/translations/eu.umd.js +23 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +23 -0
- package/dist/translations/fa.umd.js +23 -0
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.d.ts +8 -0
- package/dist/translations/gu.js +23 -0
- package/dist/translations/gu.umd.js +23 -0
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.d.ts +8 -0
- package/dist/translations/hy.js +23 -0
- package/dist/translations/hy.umd.js +23 -0
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +23 -0
- package/dist/translations/jv.umd.js +23 -0
- package/dist/translations/kk.d.ts +8 -0
- package/dist/translations/kk.js +23 -0
- package/dist/translations/kk.umd.js +23 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +23 -0
- package/dist/translations/km.umd.js +23 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +23 -0
- package/dist/translations/kn.umd.js +23 -0
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +23 -0
- package/dist/translations/ku.umd.js +23 -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/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +23 -0
- package/dist/translations/nb.umd.js +23 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +23 -0
- package/dist/translations/ne.umd.js +23 -0
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.d.ts +8 -0
- package/dist/translations/oc.js +23 -0
- package/dist/translations/oc.umd.js +23 -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 +23 -0
- package/dist/translations/si.umd.js +23 -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 +23 -0
- package/dist/translations/sl.umd.js +23 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +23 -0
- package/dist/translations/sq.umd.js +23 -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/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +23 -0
- package/dist/translations/ti.umd.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tk.umd.js +23 -0
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +23 -0
- package/dist/translations/tt.umd.js +23 -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/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/ur.umd.js +23 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +23 -0
- package/dist/translations/uz.umd.js +23 -0
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/translations/af.po +24 -0
- package/lang/translations/ar.po +4 -10
- package/lang/translations/ast.po +24 -0
- package/lang/translations/az.po +24 -0
- package/lang/translations/bg.po +3 -9
- package/lang/translations/bn.po +3 -9
- package/lang/translations/bs.po +24 -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 +24 -0
- 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 +24 -0
- package/lang/translations/en.po +5 -11
- package/lang/translations/eo.po +24 -0
- package/lang/translations/es-co.po +24 -0
- package/lang/translations/es.po +4 -10
- package/lang/translations/et.po +3 -9
- package/lang/translations/eu.po +24 -0
- package/lang/translations/fa.po +24 -0
- 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 +24 -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 +24 -0
- 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 +24 -0
- package/lang/translations/kk.po +24 -0
- package/lang/translations/km.po +24 -0
- package/lang/translations/kn.po +24 -0
- package/lang/translations/ko.po +3 -9
- package/lang/translations/ku.po +24 -0
- 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 +24 -0
- package/lang/translations/ne.po +24 -0
- package/lang/translations/nl.po +3 -9
- package/lang/translations/no.po +3 -9
- package/lang/translations/oc.po +24 -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 +24 -0
- package/lang/translations/sk.po +4 -10
- package/lang/translations/sl.po +24 -0
- package/lang/translations/sq.po +24 -0
- 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 +24 -0
- package/lang/translations/tk.po +24 -0
- package/lang/translations/tr.po +3 -9
- package/lang/translations/tt.po +24 -0
- package/lang/translations/ug.po +4 -10
- package/lang/translations/uk.po +4 -10
- package/lang/translations/ur.po +24 -0
- package/lang/translations/uz.po +24 -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 +26 -7
- package/src/augmentation.d.ts +1 -1
- package/src/importword.d.ts +1 -1
- package/src/importword.js +1 -1
- package/src/importwordcommand.d.ts +1 -1
- package/src/importwordcommand.js +1 -1
- package/src/importwordediting.d.ts +1 -1
- package/src/importwordediting.js +1 -1
- package/src/importwordui.d.ts +1 -1
- package/src/importwordui.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.d.ts +1 -1
- package/src/utils/common-translations.js +1 -1
- package/dist/augmentation.d.ts +0 -27
- package/dist/importword.d.ts +0 -136
- package/dist/importwordcommand.d.ts +0 -58
- package/dist/importwordediting.d.ts +0 -51
- package/dist/importwordui.d.ts +0 -34
- package/dist/index.d.ts +0 -16
- package/dist/utils/common-translations.d.ts +0 -13
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x5f40c9=_0x5f01;(function(_0xa67a0d,_0x199340){const _0x4282fe=_0x5f01,_0x338ce4=_0xa67a0d();while(!![]){try{const _0x3e2b88=-parseInt(_0x4282fe(0x180))/0x1*(parseInt(_0x4282fe(0x198))/0x2)+-parseInt(_0x4282fe(0x17b))/0x3+-parseInt(_0x4282fe(0x194))/0x4+parseInt(_0x4282fe(0x192))/0x5+parseInt(_0x4282fe(0x190))/0x6*(-parseInt(_0x4282fe(0x188))/0x7)+-parseInt(_0x4282fe(0x19a))/0x8*(-parseInt(_0x4282fe(0x19e))/0x9)+parseInt(_0x4282fe(0x195))/0xa;if(_0x3e2b88===_0x199340)break;else _0x338ce4['push'](_0x338ce4['shift']());}catch(_0x229216){_0x338ce4['push'](_0x338ce4['shift']());}}}(_0x4cb6,0x752ae));import{Plugin as _0x552479}from'ckeditor5/src/core.js';import{MenuBarMenuListItemFileDialogButtonView as _0x5674ba,SpinnerView as _0x1dcc29,FileDialogButtonView as _0x1886fa}from'ckeditor5/src/ui.js';import _0x1f2e5f from'../theme/icons/importword.svg';function _0x5f01(_0x22623d,_0x2b9650){const _0x4cb66a=_0x4cb6();return _0x5f01=function(_0x5f0118,_0x277992){_0x5f0118=_0x5f0118-0x178;let _0x8467db=_0x4cb66a[_0x5f0118];return _0x8467db;},_0x5f01(_0x22623d,_0x2b9650);}import{getTranslation as _0xd90633}from'./utils/common-translations.js';function _0x4cb6(){const _0x5ae45b=['13913030ZnNNlH','children','isEnabled','43166atVFdv','isOn','157576pTywhu','bind','iconView','componentFactory','180aQAZKa','ImportWordUI','editing','commands','focus','isPremiumPlugin','label','554289MdEQyf','Importing\x20Word\x20document','isOfficialPlugin','editor','Import\x20from\x20Word','17ITakZc','isVisible','importWord','add','init','done','menuBar:importWord','isBusy','7pGsuHO','set','locale','application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template','tooltip','execute','view','_createButton','2917878BtMWFu','pluginName','1464855yQvMLd','get','2241236KTNakR'];_0x4cb6=function(){return _0x5ae45b;};return _0x4cb6();}export default class i extends _0x552479{static get[_0x5f40c9(0x191)](){const _0x5aa637=_0x5f40c9;return _0x5aa637(0x19f);}static get[_0x5f40c9(0x17d)](){return!0x0;}static get[_0x5f40c9(0x179)](){return!0x0;}[_0x5f40c9(0x184)](){const _0x145e51=_0x5f40c9,_0x4217df=this[_0x145e51(0x17e)];_0x4217df['ui'][_0x145e51(0x19d)][_0x145e51(0x183)](_0x145e51(0x182),()=>{const _0x4a14d8=_0x145e51,_0x47174a=this[_0x4a14d8(0x18f)](_0x1886fa),_0x505812=_0x4217df[_0x4a14d8(0x1a1)][_0x4a14d8(0x193)](_0x4a14d8(0x182));return _0x47174a[_0x4a14d8(0x19b)](_0x4a14d8(0x199))['to'](_0x505812,_0x4a14d8(0x187)),_0x47174a[_0x4a14d8(0x18c)]=!0x0,_0x47174a;}),_0x4217df['ui'][_0x145e51(0x19d)][_0x145e51(0x183)](_0x145e51(0x186),()=>this[_0x145e51(0x18f)](_0x5674ba));}[_0x5f40c9(0x18f)](_0xfbf119){const _0x190334=_0x5f40c9,_0x30a682=this[_0x190334(0x17e)],_0x3cd36d=_0x30a682[_0x190334(0x1a1)][_0x190334(0x193)](_0x190334(0x182)),_0x5e4e64=new _0xfbf119(_0x30a682[_0x190334(0x18a)]),_0x1619d1=new _0x1dcc29();return _0x5e4e64[_0x190334(0x189)]({'acceptedType':_0x190334(0x18b)}),_0x5e4e64[_0x190334(0x189)]({'icon':_0x1f2e5f}),_0x5e4e64[_0x190334(0x19b)](_0x190334(0x197))['to'](_0x3cd36d),_0x5e4e64[_0x190334(0x19b)](_0x190334(0x17a))['to'](_0x3cd36d,_0x190334(0x187),_0x3273a5=>_0xd90633(_0x30a682[_0x190334(0x18a)],_0x3273a5?_0x190334(0x17c):_0x190334(0x17f))),_0x1619d1[_0x190334(0x19b)](_0x190334(0x181))['to'](_0x3cd36d,_0x190334(0x187)),_0x5e4e64[_0x190334(0x19c)][_0x190334(0x19b)](_0x190334(0x181))['to'](_0x3cd36d,_0x190334(0x187),_0x212316=>!_0x212316),_0x5e4e64[_0x190334(0x196)][_0x190334(0x183)](_0x1619d1),_0x5e4e64['on'](_0x190334(0x185),(_0x1cd4bb,_0x53e4b0)=>{const _0x7a188f=_0x190334;_0x30a682[_0x7a188f(0x18d)](_0x7a188f(0x182),_0x53e4b0[0x0],{}),_0x30a682[_0x7a188f(0x1a0)][_0x7a188f(0x18e)][_0x7a188f(0x178)]();}),_0x5e4e64;}}
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
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-
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module import-word
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x95d79c,_0x54770b){var _0x14ce6b=_0x4068,_0x3a9159=_0x95d79c();while(!![]){try{var _0x3e7df9=parseInt(_0x14ce6b(0x16d))/0x1+-parseInt(_0x14ce6b(0x165))/0x2*(-parseInt(_0x14ce6b(0x168))/0x3)+parseInt(_0x14ce6b(0x169))/0x4*(parseInt(_0x14ce6b(0x16f))/0x5)+parseInt(_0x14ce6b(0x166))/0x6*(-parseInt(_0x14ce6b(0x16e))/0x7)+-parseInt(_0x14ce6b(0x167))/0x8*(parseInt(_0x14ce6b(0x16a))/0x9)+parseInt(_0x14ce6b(0x16c))/0xa+-parseInt(_0x14ce6b(0x16b))/0xb;if(_0x3e7df9===_0x54770b)break;else _0x3a9159['push'](_0x3a9159['shift']());}catch(_0xb853fc){_0x3a9159['push'](_0x3a9159['shift']());}}}(_0x103c,0xe9db0));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';function _0x4068(_0x1a1ccd,_0x8621be){var _0x103c76=_0x103c();return _0x4068=function(_0x406821,_0x34f9fe){_0x406821=_0x406821-0x165;var _0x1844b3=_0x103c76[_0x406821];return _0x1844b3;},_0x4068(_0x1a1ccd,_0x8621be);}function _0x103c(){var _0x2bf179=['6eACNbr','56kBHgDK','391938BmPfRO','100GIHUKU','1378719piWJqD','19038778Bjnygv','12690460hjDSlI','1808572cQkbND','1015084kzTUqV','8905FikeLC','12OfnmaG'];_0x103c=function(){return _0x2bf179;};return _0x103c();}import'./augmentation.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
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-
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module import-word/utils/common-translations
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x20d635,_0x167cb3){const t=_0x20d635['t'];switch(_0x167cb3){case'Import\x20from\x20Word':return t('Import\x20from\x20Word');case'An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.':return t('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');case'Importing\x20Word\x20document':return t('Importing\x20Word\x20document');default:return _0x167cb3;}}
|
package/dist/augmentation.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import type { ImportWordConfig, ImportWord, ImportWordEditing, ImportWordUI, ImportWordCommand } from './index.js';
|
|
10
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
-
interface EditorConfig {
|
|
12
|
-
/**
|
|
13
|
-
* The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
|
|
14
|
-
*
|
|
15
|
-
* Read more in {@link module:import-word/importword~ImportWordConfig}.
|
|
16
|
-
*/
|
|
17
|
-
importWord?: ImportWordConfig;
|
|
18
|
-
}
|
|
19
|
-
interface PluginsMap {
|
|
20
|
-
[ImportWord.pluginName]: ImportWord;
|
|
21
|
-
[ImportWordEditing.pluginName]: ImportWordEditing;
|
|
22
|
-
[ImportWordUI.pluginName]: ImportWordUI;
|
|
23
|
-
}
|
|
24
|
-
interface CommandsMap {
|
|
25
|
-
importWord: ImportWordCommand;
|
|
26
|
-
}
|
|
27
|
-
}
|
package/dist/importword.d.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module import-word/importword
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
-
import type { TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
|
|
15
|
-
import ImportWordUI from './importwordui.js';
|
|
16
|
-
import ImportWordEditing from './importwordediting.js';
|
|
17
|
-
/**
|
|
18
|
-
* The import from Word feature.
|
|
19
|
-
*
|
|
20
|
-
* It allows importing content from a Word file directly into CKEditor 5.
|
|
21
|
-
*
|
|
22
|
-
* This is a "glue" plugin which enables:
|
|
23
|
-
*
|
|
24
|
-
* * {@link module:import-word/importwordediting~ImportWordEditing},
|
|
25
|
-
* * {@link module:import-word/importwordui~ImportWordUI},
|
|
26
|
-
*
|
|
27
|
-
* For a detailed overview, check the {@glink features/converters/import-word/import-word import from Word} feature documentation.
|
|
28
|
-
*/
|
|
29
|
-
export default class ImportWord extends Plugin {
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
static get pluginName(): "ImportWord";
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
static get isOfficialPlugin(): true;
|
|
38
|
-
/**
|
|
39
|
-
* @inheritDoc
|
|
40
|
-
*/
|
|
41
|
-
static get isPremiumPlugin(): true;
|
|
42
|
-
/**
|
|
43
|
-
* @inheritDoc
|
|
44
|
-
*/
|
|
45
|
-
static get requires(): readonly [typeof ImportWordEditing, typeof ImportWordUI];
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
|
|
49
|
-
*
|
|
50
|
-
* The configuration for the import from Word feature requires providing the
|
|
51
|
-
* {@link module:import-word/importword~ImportWordConfig#tokenUrl `config.importWord.tokenUrl`}:
|
|
52
|
-
*
|
|
53
|
-
* ```ts
|
|
54
|
-
* ClassicEditor
|
|
55
|
-
* .create( editorElement, {
|
|
56
|
-
* importWord: {
|
|
57
|
-
* tokenUrl: 'https://example.com/cs-token-endpoint'
|
|
58
|
-
* }
|
|
59
|
-
* } )
|
|
60
|
-
* .then( ... )
|
|
61
|
-
* .catch( ... );
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
65
|
-
*/
|
|
66
|
-
export interface ImportWordConfig {
|
|
67
|
-
/**
|
|
68
|
-
* A URL to the Docx converter.
|
|
69
|
-
*
|
|
70
|
-
* ```ts
|
|
71
|
-
* const importWordConfig = {
|
|
72
|
-
* converterUrl: 'https://myconverter.com/v1/'
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* **Note:** The plugin uses the default Word to HTML converter delivered by CKEditor Cloud Services.
|
|
77
|
-
* You can provide a URL to an on-premises converter instead.
|
|
78
|
-
*
|
|
79
|
-
* @default 'https://docx-converter.cke-cs.com/v2/convert/docx-html'
|
|
80
|
-
*/
|
|
81
|
-
converterUrl?: string;
|
|
82
|
-
/**
|
|
83
|
-
* A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl`
|
|
84
|
-
* is required for the Import from Word feature.
|
|
85
|
-
*
|
|
86
|
-
* **Note:** The token can be disabled with the `false` value provided.
|
|
87
|
-
*
|
|
88
|
-
* See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
|
|
89
|
-
*/
|
|
90
|
-
tokenUrl?: TokenUrl;
|
|
91
|
-
formatting: FormattingOptions;
|
|
92
|
-
}
|
|
93
|
-
export interface FormattingOptions {
|
|
94
|
-
/**
|
|
95
|
-
* Controls whether the additional formatting dedicated to minimizing differences between default Word styles
|
|
96
|
-
* and default HTML formatting should be included in the generated document.
|
|
97
|
-
*
|
|
98
|
-
* If `inline`, the converter service preserves the formatting to be consistent with Word ones.
|
|
99
|
-
* For example, in Word headings are not bold by default, whereas in HTML, they are. Enabling this option
|
|
100
|
-
* appends font-weight: normal to all headings.
|
|
101
|
-
*
|
|
102
|
-
* @default false
|
|
103
|
-
*/
|
|
104
|
-
resets?: 'none' | 'inline';
|
|
105
|
-
/**
|
|
106
|
-
* Controls whether formatting set by default (like the default font size or default font family)
|
|
107
|
-
* should be included in the generated document.
|
|
108
|
-
*
|
|
109
|
-
* If `inline`, the converter service preserves the default formatting of the imported Word document.
|
|
110
|
-
*
|
|
111
|
-
* @default 'none'
|
|
112
|
-
*/
|
|
113
|
-
defaults?: 'none' | 'inline';
|
|
114
|
-
/**
|
|
115
|
-
* Controls whether Word styles should be included in the generated document.
|
|
116
|
-
*
|
|
117
|
-
* If `inline`, the converter service preserves the default styles of the imported Word document.
|
|
118
|
-
*
|
|
119
|
-
* @default 'inline'
|
|
120
|
-
*/
|
|
121
|
-
styles?: 'none' | 'inline';
|
|
122
|
-
/**
|
|
123
|
-
* Defines which formatting styles should be kept for the imported comments text.
|
|
124
|
-
*
|
|
125
|
-
* Possible values are:
|
|
126
|
-
*
|
|
127
|
-
* * `'basic'` - basic styles are kept (bold, italic, underline, strikethrough and links),
|
|
128
|
-
* * `'none'` - comment text is imported without any styling,
|
|
129
|
-
* * `'full'` - all styles are kept (not recommended).
|
|
130
|
-
*
|
|
131
|
-
* **Note:** Please remember that importing comments requires installing the {@link module:comments/comments~Comments} feature.
|
|
132
|
-
*
|
|
133
|
-
* @default 'basic'
|
|
134
|
-
*/
|
|
135
|
-
comments?: 'basic' | 'none' | 'full';
|
|
136
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module import-word/importwordcommand
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
-
/**
|
|
15
|
-
* The import from Word command.
|
|
16
|
-
*
|
|
17
|
-
* It sends the Word file to the converter endpoint and inserts its content into the editor.
|
|
18
|
-
*/
|
|
19
|
-
export default class ImportWordCommand extends Command {
|
|
20
|
-
/**
|
|
21
|
-
* A command state that indicates if the command is currently executing.
|
|
22
|
-
*
|
|
23
|
-
* @observable
|
|
24
|
-
*/
|
|
25
|
-
isBusy: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
constructor(editor: Editor);
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
refresh(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Executes the command. Sends the provided file instance to the converter service endpoint and inserts the result into the model.
|
|
36
|
-
*
|
|
37
|
-
* @fires execute
|
|
38
|
-
* @param file The Word file instance to be uploaded for conversion.
|
|
39
|
-
* @param [serviceConfig] Additional options to pass to the converter service.
|
|
40
|
-
*/
|
|
41
|
-
execute(file: File, serviceConfig?: Record<string, unknown>): Promise<unknown>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Fired when the converter service returned the HTML content that will be inserted into the editor.
|
|
45
|
-
*
|
|
46
|
-
* @eventName ~ImportWordCommand#dataInsert
|
|
47
|
-
*/
|
|
48
|
-
export type DataInsertEvent = {
|
|
49
|
-
name: 'dataInsert';
|
|
50
|
-
args: [data: DataInsertEventData];
|
|
51
|
-
};
|
|
52
|
-
interface DataInsertEventData {
|
|
53
|
-
/**
|
|
54
|
-
* The HTML content to insertion.
|
|
55
|
-
*/
|
|
56
|
-
html: string;
|
|
57
|
-
}
|
|
58
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module import-word/importwordediting
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
-
import { Notification } from 'ckeditor5/src/ui.js';
|
|
15
|
-
import { ClipboardPipeline } from 'ckeditor5/src/clipboard.js';
|
|
16
|
-
import type { InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
|
|
17
|
-
/**
|
|
18
|
-
* The editing part of the import from Word feature.
|
|
19
|
-
*
|
|
20
|
-
* It registers the {@link module:import-word/importwordcommand~ImportWordCommand `'importWord'` command}.
|
|
21
|
-
*/
|
|
22
|
-
export default class ImportWordEditing extends Plugin {
|
|
23
|
-
/**
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
26
|
-
static get pluginName(): "ImportWordEditing";
|
|
27
|
-
/**
|
|
28
|
-
* @inheritDoc
|
|
29
|
-
*/
|
|
30
|
-
static get isOfficialPlugin(): true;
|
|
31
|
-
/**
|
|
32
|
-
* @inheritDoc
|
|
33
|
-
*/
|
|
34
|
-
static get isPremiumPlugin(): true;
|
|
35
|
-
/**
|
|
36
|
-
* @inheritDoc
|
|
37
|
-
*/
|
|
38
|
-
static get requires(): readonly [typeof Notification, typeof ClipboardPipeline, "CloudServices"];
|
|
39
|
-
/**
|
|
40
|
-
* @inheritDoc
|
|
41
|
-
*/
|
|
42
|
-
constructor(editor: Editor);
|
|
43
|
-
/**
|
|
44
|
-
* @inheritDoc
|
|
45
|
-
*/
|
|
46
|
-
init(): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Returns a token used by the import from Word plugin for communication with the Cloud Services.
|
|
49
|
-
*/
|
|
50
|
-
getToken(): InitializedToken | null;
|
|
51
|
-
}
|
package/dist/importwordui.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module import-word/importwordui
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
-
/**
|
|
15
|
-
* The ImportWordUI plugin. It introduces the `'importWord'` toolbar button.
|
|
16
|
-
*/
|
|
17
|
-
export default class ImportWordUI extends Plugin {
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
static get pluginName(): "ImportWordUI";
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
static get isOfficialPlugin(): true;
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
static get isPremiumPlugin(): true;
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
init(): void;
|
|
34
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module import-word
|
|
11
|
-
*/
|
|
12
|
-
export { default as ImportWord, type ImportWordConfig } from './importword.js';
|
|
13
|
-
export { default as ImportWordEditing } from './importwordediting.js';
|
|
14
|
-
export { default as ImportWordUI } from './importwordui.js';
|
|
15
|
-
export type { default as ImportWordCommand } from './importwordcommand.js';
|
|
16
|
-
import './augmentation.js';
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module import-word/utils/common-translations
|
|
11
|
-
*/
|
|
12
|
-
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
-
export declare function getTranslation(locale: Locale, id: string): string;
|