@ckeditor/ckeditor5-import-word 37.1.0 → 38.0.0-rc.1

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.
Files changed (52) hide show
  1. package/README.md +2 -2
  2. package/build/import-word.js +1 -1
  3. package/build/translations/en-au.js +1 -0
  4. package/ckeditor5-metadata.json +1 -1
  5. package/lang/translations/ar.po +1 -1
  6. package/lang/translations/bg.po +1 -1
  7. package/lang/translations/bn.po +1 -1
  8. package/lang/translations/ca.po +1 -1
  9. package/lang/translations/cs.po +1 -1
  10. package/lang/translations/da.po +1 -1
  11. package/lang/translations/de.po +1 -1
  12. package/lang/translations/el.po +1 -1
  13. package/lang/translations/en-au.po +25 -0
  14. package/lang/translations/es.po +1 -1
  15. package/lang/translations/et.po +1 -1
  16. package/lang/translations/fi.po +1 -1
  17. package/lang/translations/fr.po +1 -1
  18. package/lang/translations/he.po +1 -1
  19. package/lang/translations/hi.po +1 -1
  20. package/lang/translations/hr.po +1 -1
  21. package/lang/translations/hu.po +1 -1
  22. package/lang/translations/id.po +1 -1
  23. package/lang/translations/it.po +1 -1
  24. package/lang/translations/ja.po +1 -1
  25. package/lang/translations/ko.po +1 -1
  26. package/lang/translations/lt.po +1 -1
  27. package/lang/translations/lv.po +1 -1
  28. package/lang/translations/ms.po +1 -1
  29. package/lang/translations/nl.po +1 -1
  30. package/lang/translations/no.po +1 -1
  31. package/lang/translations/pl.po +1 -1
  32. package/lang/translations/pt-br.po +1 -1
  33. package/lang/translations/pt.po +1 -1
  34. package/lang/translations/ro.po +1 -1
  35. package/lang/translations/ru.po +1 -1
  36. package/lang/translations/sk.po +1 -1
  37. package/lang/translations/sr-latn.po +1 -1
  38. package/lang/translations/sr.po +1 -1
  39. package/lang/translations/sv.po +1 -1
  40. package/lang/translations/th.po +1 -1
  41. package/lang/translations/tr.po +1 -1
  42. package/lang/translations/uk.po +1 -1
  43. package/lang/translations/vi.po +1 -1
  44. package/lang/translations/zh-cn.po +1 -1
  45. package/lang/translations/zh.po +1 -1
  46. package/package.json +2 -2
  47. package/src/importword.d.ts +5 -3
  48. package/src/importword.js +1 -1
  49. package/src/importwordcommand.js +1 -1
  50. package/src/importwordediting.d.ts +4 -2
  51. package/src/importwordediting.js +1 -1
  52. package/src/importwordui.js +1 -1
package/README.md CHANGED
@@ -12,11 +12,11 @@ This is a premium feature. Please [contact us](https://ckeditor.com/contact/) if
12
12
 
13
13
  ## Demo
14
14
 
15
- Check out the [demo in the import from Word feature](https://ckeditor.com/docs/ckeditor5/latest/features/import-word/import-word.html#demo) guide.
15
+ Check out the [demo in the import from Word feature](https://ckeditor.com/docs/ckeditor5/latest/features/converters/import-word/import-word/import-word.html#demo) guide.
16
16
 
17
17
  ## Documentation
18
18
 
19
- See the [`@ckeditor/ckeditor5-import-word` package](https://ckeditor.com/docs/ckeditor5/latest/api/import-word.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/) as well as the [import from Word](https://ckeditor.com/docs/ckeditor5/latest/features/import-word/import-word.html) feature guide.
19
+ See the [`@ckeditor/ckeditor5-import-word` package](https://ckeditor.com/docs/ckeditor5/latest/api/import-word.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/) as well as the [import from Word](https://ckeditor.com/docs/ckeditor5/latest/features/converters/import-word/import-word/import-word.html) feature guide.
20
20
 
21
21
  ## Getting support
22
22
 
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={847:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var o=r(758),n=r.n(o)()((function(t){return t[1]}));n.push([t.id,":root{--ck-toolbar-spinner-size:18px}.ck-importword_status-pending{position:relative}.ck.ck-importword__spinner-container{display:none}.ck.ck-importword__spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent;height:var(--ck-toolbar-spinner-size);left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);width:var(--ck-toolbar-spinner-size);z-index:1}.ck-importword_status-pending .ck.ck-importword__spinner-container{animation:rotate 1.5s linear infinite;display:block;height:var(--ck-toolbar-spinner-size);position:absolute;width:var(--ck-toolbar-spinner-size)}.ck-importword_status-pending .ck.ck-button__icon{color:transparent}@keyframes rotate{to{transform:rotate(1turn)}}",""]);const i=n},758:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,o){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(o)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(n[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);o&&n[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),e.push(c))}},e}},278:(t,e,r)=>{"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),s=[];function a(t){for(var e=-1,r=0;r<s.length;r++)if(s[r].identifier===t){e=r;break}return e}function c(t,e){for(var r={},o=[],n=0;n<t.length;n++){var i=t[n],c=e.base?i[0]+e.base:i[0],l=r[c]||0,d="".concat(c," ").concat(l);r[c]=l+1;var u=a(d),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(s[u].references++,s[u].updater(p)):s.push({identifier:d,updater:g(p,e),references:1}),o.push(d)}return o}function l(t){var e=document.createElement("style"),o=t.attributes||{};if(void 0===o.nonce){var n=r.nc;n&&(o.nonce=n)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var s=i(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var d,u=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function p(t,e,r,o){var n=r?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=u(e,n);else{var i=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function h(t,e,r){var o=r.css,n=r.media,i=r.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var m=null,f=0;function g(t,e){var r,o,n;if(e.singleton){var i=f++;r=m||(m=l(e)),o=p.bind(null,r,i,!1),n=p.bind(null,r,i,!0)}else r=l(e),o=h.bind(null,r,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=n());var r=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<r.length;o++){var n=a(r[o]);s[n].references--}for(var i=c(t,e),l=0;l<r.length;l++){var d=a(r[l]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}r=i}}}},945:(t,e,r)=>{t.exports=r(79)("./src/clipboard.js")},704:(t,e,r)=>{t.exports=r(79)("./src/core.js")},492:(t,e,r)=>{t.exports=r(79)("./src/engine.js")},273:(t,e,r)=>{t.exports=r(79)("./src/ui.js")},448:(t,e,r)=>{t.exports=r(79)("./src/upload.js")},209:(t,e,r)=>{t.exports=r(79)("./src/utils.js")},79: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]={id:o,exports:{}};return t[o](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},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})},r.nc=void 0;var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>y,ImportWordEditing:()=>b,ImportWordUI:()=>l});var t=r(704),e=r(273),n=r(448);var i=r(278),s=r.n(i),a=r(847),c={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(a.Z,c);a.Z.locals;class l extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o);s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path clip-rule="evenodd" d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path clip-rule="evenodd" d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),s.buttonView.extendTemplate({attributes:{class:[s.buttonView.bindTemplate.if("isOn","ck-importword_status-pending")]}});const a=new e.View;return a.setTemplate({tag:"span",attributes:{class:["ck","ck-importword__spinner-container"]},children:[{tag:"span",attributes:{class:["ck","ck-importword__spinner"]}}]}),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var d=r(945),u=r(492),p=r(209);class h extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,default_styles:r.defaultStyles}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,p.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,p.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,p.uid)(),{usingOperation:!1,affectsData:!1,range:new u.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,p.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,p.logError)("import-word-plugin-conversion-failed")}}const m=["plugins","CloudServices","config","https://docx-converter.cke-cs.com/v2/convert/docx-html","cloudServices","_token","get","pluginName","editor","add","define","init","tokenUrl","importWord","token","requires","ImportWordEditing"];var f,g;f=m,g=156,function(t){for(;--t;)f.push(f.shift())}(++g);const v=function(t,e){return m[t-=0]};class b extends t.Plugin{static get[v("0x4")](){return v("0xd")}static get[v("0xc")](){return[e.Notification,d.ClipboardPipeline,v("0xf")]}constructor(t){super(t),this._token=null}async[v("0x8")](){const t=this[v("0x5")];t[v("0x10")][v("0x7")](v("0xa"),{converterUrl:v("0x0"),tokenUrl:(t.config[v("0x3")](v("0x1"))||{})[v("0x9")],defaultStyles:!1}),t.commands[v("0x6")](v("0xa"),new h(t));const{tokenUrl:e}=t[v("0x10")][v("0x3")](v("0xa"));if(e){const{tokenUrl:r}=t[v("0x10")][v("0x3")](v("0x1"))||{};this._token=e===r?t[v("0xe")][v("0x3")](v("0xf"))[v("0xb")]:await t.plugins[v("0x3")](v("0xf")).registerTokenUrl(e)}}getToken(){return this[v("0x2")]}}var x,_,k=["ImportWord","pluginName","requires"];x=k,_=116,function(t){for(;--t;)x.push(x.shift())}(++_);var w=function(t,e){return k[t-=0]};class y extends t.Plugin{static get[w("0x2")](){return w("0x1")}static get[w("0x0")](){return[b,l]}}})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
5
+ */(()=>{var t={847:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var o=r(758),n=r.n(o)()((function(t){return t[1]}));n.push([t.id,":root{--ck-toolbar-spinner-size:18px}.ck-importword_status-pending{position:relative}.ck.ck-importword__spinner-container{display:none}.ck.ck-importword__spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent;height:var(--ck-toolbar-spinner-size);left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);width:var(--ck-toolbar-spinner-size);z-index:1}.ck-importword_status-pending .ck.ck-importword__spinner-container{animation:rotate 1.5s linear infinite;display:block;height:var(--ck-toolbar-spinner-size);position:absolute;width:var(--ck-toolbar-spinner-size)}.ck-importword_status-pending .ck.ck-button__icon{color:transparent}@keyframes rotate{to{transform:rotate(1turn)}}",""]);const i=n},758:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,o){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(o)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(n[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);o&&n[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),e.push(c))}},e}},278:(t,e,r)=>{"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),s=[];function a(t){for(var e=-1,r=0;r<s.length;r++)if(s[r].identifier===t){e=r;break}return e}function c(t,e){for(var r={},o=[],n=0;n<t.length;n++){var i=t[n],c=e.base?i[0]+e.base:i[0],l=r[c]||0,d="".concat(c," ").concat(l);r[c]=l+1;var u=a(d),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(s[u].references++,s[u].updater(p)):s.push({identifier:d,updater:g(p,e),references:1}),o.push(d)}return o}function l(t){var e=document.createElement("style"),o=t.attributes||{};if(void 0===o.nonce){var n=r.nc;n&&(o.nonce=n)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var s=i(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var d,u=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function p(t,e,r,o){var n=r?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=u(e,n);else{var i=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function h(t,e,r){var o=r.css,n=r.media,i=r.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var m=null,f=0;function g(t,e){var r,o,n;if(e.singleton){var i=f++;r=m||(m=l(e)),o=p.bind(null,r,i,!1),n=p.bind(null,r,i,!0)}else r=l(e),o=h.bind(null,r,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=n());var r=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<r.length;o++){var n=a(r[o]);s[n].references--}for(var i=c(t,e),l=0;l<r.length;l++){var d=a(r[l]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}r=i}}}},945:(t,e,r)=>{t.exports=r(79)("./src/clipboard.js")},704:(t,e,r)=>{t.exports=r(79)("./src/core.js")},492:(t,e,r)=>{t.exports=r(79)("./src/engine.js")},273:(t,e,r)=>{t.exports=r(79)("./src/ui.js")},448:(t,e,r)=>{t.exports=r(79)("./src/upload.js")},209:(t,e,r)=>{t.exports=r(79)("./src/utils.js")},79: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]={id:o,exports:{}};return t[o](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},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})},r.nc=void 0;var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>y,ImportWordEditing:()=>b,ImportWordUI:()=>l});var t=r(704),e=r(273),n=r(448);var i=r(278),s=r.n(i),a=r(847),c={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(a.Z,c);a.Z.locals;class l extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o);s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path clip-rule="evenodd" d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path clip-rule="evenodd" d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),s.buttonView.extendTemplate({attributes:{class:[s.buttonView.bindTemplate.if("isOn","ck-importword_status-pending")]}});const a=new e.View;return a.setTemplate({tag:"span",attributes:{class:["ck","ck-importword__spinner-container"]},children:[{tag:"span",attributes:{class:["ck","ck-importword__spinner"]}}]}),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var d=r(945),u=r(492),p=r(209);class h extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,default_styles:r.defaultStyles}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,p.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,p.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,p.uid)(),{usingOperation:!1,affectsData:!1,range:new u.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,p.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,p.logError)("import-word-plugin-conversion-failed")}}const m=["ImportWordEditing","https://docx-converter.cke-cs.com/v2/convert/docx-html","editor","config","CloudServices","_token","importWord","getToken","cloudServices","commands","init","requires","get","registerTokenUrl","add","plugins"];var f,g;f=m,g=420,function(t){for(;--t;)f.push(f.shift())}(++g);const v=function(t,e){return m[t-=0]};class b extends t.Plugin{static get pluginName(){return v("0xc")}static get[v("0x7")](){return[e.Notification,d.ClipboardPipeline,v("0x0")]}constructor(t){super(t),this[v("0x1")]=null}async[v("0x6")](){const t=this[v("0xe")];t.config.define(v("0x2"),{converterUrl:v("0xd"),tokenUrl:(t[v("0xf")][v("0x8")]("cloudServices")||{}).tokenUrl,defaultStyles:!1}),t[v("0x5")][v("0xa")](v("0x2"),new h(t));const{tokenUrl:e}=t[v("0xf")][v("0x8")]("importWord");if(e){const{tokenUrl:r}=t.config[v("0x8")](v("0x4"))||{};this[v("0x1")]=e===r?t[v("0xb")].get("CloudServices").token:await t[v("0xb")].get(v("0x0"))[v("0x9")](e)}}[v("0x3")](){return this[v("0x1")]}}var x,w,_=["pluginName","ImportWord","requires"];x=_,w=155,function(t){for(;--t;)x.push(x.shift())}(++w);var k=function(t,e){return _[t-=0]};class y extends t.Plugin{static get[k("0x1")](){return k("0x2")}static get[k("0x0")](){return[b,l]}}})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
@@ -0,0 +1 @@
1
+ !function(o){const n=o["en-au"]=o["en-au"]||{};n.dictionary=Object.assign(n.dictionary||{},{"Import from Word":"Import from Word"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -4,7 +4,7 @@
4
4
  "name": "Import from Word",
5
5
  "className": "ImportWord",
6
6
  "description": "Allows importing a content from a Word file directly into CKEditor 5.",
7
- "docs": "features/import-word/import-word.html",
7
+ "docs": "features/converters/import-word/import-word.html",
8
8
  "path": "src/importword.js",
9
9
  "requires": [
10
10
  "CloudServices"
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Arabic (https://www.transifex.com/ckeditor/teams/11143/ar/)\n"
15
+ "Language-Team: Arabic (https://app.transifex.com/ckeditor/teams/11143/ar/)\n"
16
16
  "Language: ar\n"
17
17
  "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Bulgarian (https://www.transifex.com/ckeditor/teams/11143/bg/)\n"
15
+ "Language-Team: Bulgarian (https://app.transifex.com/ckeditor/teams/11143/bg/)\n"
16
16
  "Language: bg\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Bengali (https://www.transifex.com/ckeditor/teams/11143/bn/)\n"
15
+ "Language-Team: Bengali (https://app.transifex.com/ckeditor/teams/11143/bn/)\n"
16
16
  "Language: bn\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Catalan (https://www.transifex.com/ckeditor/teams/11143/ca/)\n"
15
+ "Language-Team: Catalan (https://app.transifex.com/ckeditor/teams/11143/ca/)\n"
16
16
  "Language: ca\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Czech (https://www.transifex.com/ckeditor/teams/11143/cs/)\n"
15
+ "Language-Team: Czech (https://app.transifex.com/ckeditor/teams/11143/cs/)\n"
16
16
  "Language: cs\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Danish (https://www.transifex.com/ckeditor/teams/11143/da/)\n"
15
+ "Language-Team: Danish (https://app.transifex.com/ckeditor/teams/11143/da/)\n"
16
16
  "Language: da\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: German (https://www.transifex.com/ckeditor/teams/11143/de/)\n"
15
+ "Language-Team: German (https://app.transifex.com/ckeditor/teams/11143/de/)\n"
16
16
  "Language: de\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Greek (https://www.transifex.com/ckeditor/teams/11143/el/)\n"
15
+ "Language-Team: Greek (https://app.transifex.com/ckeditor/teams/11143/el/)\n"
16
16
  "Language: el\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -0,0 +1,25 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: English (Australia) (https://app.transifex.com/ckeditor/teams/11143/en_AU/)\n"
16
+ "Language: en_AU\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
19
+ msgctxt "A toolbar button tooltip for the import from Word feature."
20
+ msgid "Import from Word"
21
+ msgstr "Import from Word"
22
+
23
+ msgctxt "An error message shown to the user when an error occurred while importing the Word file."
24
+ msgid "An error occurred while importing the Word file."
25
+ msgstr "An error occurred while importing the Word file."
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Spanish (https://www.transifex.com/ckeditor/teams/11143/es/)\n"
15
+ "Language-Team: Spanish (https://app.transifex.com/ckeditor/teams/11143/es/)\n"
16
16
  "Language: es\n"
17
17
  "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Estonian (https://www.transifex.com/ckeditor/teams/11143/et/)\n"
15
+ "Language-Team: Estonian (https://app.transifex.com/ckeditor/teams/11143/et/)\n"
16
16
  "Language: et\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Finnish (https://www.transifex.com/ckeditor/teams/11143/fi/)\n"
15
+ "Language-Team: Finnish (https://app.transifex.com/ckeditor/teams/11143/fi/)\n"
16
16
  "Language: fi\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: French (https://www.transifex.com/ckeditor/teams/11143/fr/)\n"
15
+ "Language-Team: French (https://app.transifex.com/ckeditor/teams/11143/fr/)\n"
16
16
  "Language: fr\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Hebrew (https://www.transifex.com/ckeditor/teams/11143/he/)\n"
15
+ "Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
16
16
  "Language: he\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Hindi (https://www.transifex.com/ckeditor/teams/11143/hi/)\n"
15
+ "Language-Team: Hindi (https://app.transifex.com/ckeditor/teams/11143/hi/)\n"
16
16
  "Language: hi\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Croatian (https://www.transifex.com/ckeditor/teams/11143/hr/)\n"
15
+ "Language-Team: Croatian (https://app.transifex.com/ckeditor/teams/11143/hr/)\n"
16
16
  "Language: hr\n"
17
17
  "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Hungarian (https://www.transifex.com/ckeditor/teams/11143/hu/)\n"
15
+ "Language-Team: Hungarian (https://app.transifex.com/ckeditor/teams/11143/hu/)\n"
16
16
  "Language: hu\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Indonesian (https://www.transifex.com/ckeditor/teams/11143/id/)\n"
15
+ "Language-Team: Indonesian (https://app.transifex.com/ckeditor/teams/11143/id/)\n"
16
16
  "Language: id\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Italian (https://www.transifex.com/ckeditor/teams/11143/it/)\n"
15
+ "Language-Team: Italian (https://app.transifex.com/ckeditor/teams/11143/it/)\n"
16
16
  "Language: it\n"
17
17
  "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Japanese (https://www.transifex.com/ckeditor/teams/11143/ja/)\n"
15
+ "Language-Team: Japanese (https://app.transifex.com/ckeditor/teams/11143/ja/)\n"
16
16
  "Language: ja\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Korean (https://www.transifex.com/ckeditor/teams/11143/ko/)\n"
15
+ "Language-Team: Korean (https://app.transifex.com/ckeditor/teams/11143/ko/)\n"
16
16
  "Language: ko\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Lithuanian (https://www.transifex.com/ckeditor/teams/11143/lt/)\n"
15
+ "Language-Team: Lithuanian (https://app.transifex.com/ckeditor/teams/11143/lt/)\n"
16
16
  "Language: lt\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Latvian (https://www.transifex.com/ckeditor/teams/11143/lv/)\n"
15
+ "Language-Team: Latvian (https://app.transifex.com/ckeditor/teams/11143/lv/)\n"
16
16
  "Language: lv\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Malay (https://www.transifex.com/ckeditor/teams/11143/ms/)\n"
15
+ "Language-Team: Malay (https://app.transifex.com/ckeditor/teams/11143/ms/)\n"
16
16
  "Language: ms\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Dutch (https://www.transifex.com/ckeditor/teams/11143/nl/)\n"
15
+ "Language-Team: Dutch (https://app.transifex.com/ckeditor/teams/11143/nl/)\n"
16
16
  "Language: nl\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Norwegian (https://www.transifex.com/ckeditor/teams/11143/no/)\n"
15
+ "Language-Team: Norwegian (https://app.transifex.com/ckeditor/teams/11143/no/)\n"
16
16
  "Language: no\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Polish (https://www.transifex.com/ckeditor/teams/11143/pl/)\n"
15
+ "Language-Team: Polish (https://app.transifex.com/ckeditor/teams/11143/pl/)\n"
16
16
  "Language: pl\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Portuguese (Brazil) (https://www.transifex.com/ckeditor/teams/11143/pt_BR/)\n"
15
+ "Language-Team: Portuguese (Brazil) (https://app.transifex.com/ckeditor/teams/11143/pt_BR/)\n"
16
16
  "Language: pt_BR\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Portuguese (https://www.transifex.com/ckeditor/teams/11143/pt/)\n"
15
+ "Language-Team: Portuguese (https://app.transifex.com/ckeditor/teams/11143/pt/)\n"
16
16
  "Language: pt\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Romanian (https://www.transifex.com/ckeditor/teams/11143/ro/)\n"
15
+ "Language-Team: Romanian (https://app.transifex.com/ckeditor/teams/11143/ro/)\n"
16
16
  "Language: ro\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Russian (https://www.transifex.com/ckeditor/teams/11143/ru/)\n"
15
+ "Language-Team: Russian (https://app.transifex.com/ckeditor/teams/11143/ru/)\n"
16
16
  "Language: ru\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Slovak (https://www.transifex.com/ckeditor/teams/11143/sk/)\n"
15
+ "Language-Team: Slovak (https://app.transifex.com/ckeditor/teams/11143/sk/)\n"
16
16
  "Language: sk\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Serbian (Latin) (https://www.transifex.com/ckeditor/teams/11143/sr@latin/)\n"
15
+ "Language-Team: Serbian (Latin) (https://app.transifex.com/ckeditor/teams/11143/sr@latin/)\n"
16
16
  "Language: sr@latin\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Serbian (https://www.transifex.com/ckeditor/teams/11143/sr/)\n"
15
+ "Language-Team: Serbian (https://app.transifex.com/ckeditor/teams/11143/sr/)\n"
16
16
  "Language: sr\n"
17
17
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Swedish (https://www.transifex.com/ckeditor/teams/11143/sv/)\n"
15
+ "Language-Team: Swedish (https://app.transifex.com/ckeditor/teams/11143/sv/)\n"
16
16
  "Language: sv\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Thai (https://www.transifex.com/ckeditor/teams/11143/th/)\n"
15
+ "Language-Team: Thai (https://app.transifex.com/ckeditor/teams/11143/th/)\n"
16
16
  "Language: th\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Turkish (https://www.transifex.com/ckeditor/teams/11143/tr/)\n"
15
+ "Language-Team: Turkish (https://app.transifex.com/ckeditor/teams/11143/tr/)\n"
16
16
  "Language: tr\n"
17
17
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Ukrainian (https://www.transifex.com/ckeditor/teams/11143/uk/)\n"
15
+ "Language-Team: Ukrainian (https://app.transifex.com/ckeditor/teams/11143/uk/)\n"
16
16
  "Language: uk\n"
17
17
  "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Vietnamese (https://www.transifex.com/ckeditor/teams/11143/vi/)\n"
15
+ "Language-Team: Vietnamese (https://app.transifex.com/ckeditor/teams/11143/vi/)\n"
16
16
  "Language: vi\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Chinese (China) (https://www.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
15
+ "Language-Team: Chinese (China) (https://app.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
16
16
  "Language: zh_CN\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
@@ -12,7 +12,7 @@
12
12
  #
13
13
  msgid ""
14
14
  msgstr ""
15
- "Language-Team: Chinese (Taiwan) (https://www.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
15
+ "Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
16
16
  "Language: zh_TW\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-import-word",
3
- "version": "37.1.0",
3
+ "version": "38.0.0-rc.1",
4
4
  "description": "Import from Word feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "main": "src/index.js",
31
31
  "dependencies": {
32
- "ckeditor5": "^37.1.0"
32
+ "ckeditor5": "^38.0.0-rc.1"
33
33
  },
34
34
  "license": "SEE LICENSE IN LICENSE.md",
35
35
  "author": "CKSource (https://cksource.com/)",
@@ -6,8 +6,10 @@
6
6
  * @module import-word/importword
7
7
  * @publicApi
8
8
  */
9
- import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
9
+ import { Plugin } from 'ckeditor5/src/core';
10
10
  import type { TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
11
+ import ImportWordUI from './importwordui';
12
+ import ImportWordEditing from './importwordediting';
11
13
  /**
12
14
  * The import from Word feature.
13
15
  *
@@ -18,7 +20,7 @@ import type { TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
18
20
  * * {@link module:import-word/importwordediting~ImportWordEditing},
19
21
  * * {@link module:import-word/importwordui~ImportWordUI},
20
22
  *
21
- * For a detailed overview, check the {@glink features/import-word/import-word import from Word} feature documentation.
23
+ * For a detailed overview, check the {@glink features/converters/import-word/import-word import from Word} feature documentation.
22
24
  */
23
25
  export default class ImportWord extends Plugin {
24
26
  /**
@@ -28,7 +30,7 @@ export default class ImportWord extends Plugin {
28
30
  /**
29
31
  * @inheritDoc
30
32
  */
31
- static get requires(): PluginDependencies;
33
+ static get requires(): (typeof ImportWordEditing | typeof ImportWordUI)[];
32
34
  }
33
35
  /**
34
36
  * The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
package/src/importword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x2961=['ImportWord','pluginName','requires'];(function(_0x3f9198,_0x2961c8){var _0x3adc80=function(_0x28bd6f){while(--_0x28bd6f){_0x3f9198['push'](_0x3f9198['shift']());}};_0x3adc80(++_0x2961c8);}(_0x2961,0x74));var _0x3adc=function(_0x3f9198,_0x2961c8){_0x3f9198=_0x3f9198-0x0;var _0x3adc80=_0x2961[_0x3f9198];return _0x3adc80;};import{Plugin as _0x50f669}from'ckeditor5/src/core';import _0x1b2aad from'./importwordui';import _0x3f04dc from'./importwordediting';export default class i extends _0x50f669{static get[_0x3adc('0x2')](){return _0x3adc('0x1');}static get[_0x3adc('0x0')](){return[_0x3f04dc,_0x1b2aad];}}
23
+ var _0x4371=['pluginName','ImportWord','requires'];(function(_0xd20b1f,_0x4371d4){var _0x558f96=function(_0x22a94c){while(--_0x22a94c){_0xd20b1f['push'](_0xd20b1f['shift']());}};_0x558f96(++_0x4371d4);}(_0x4371,0x9b));var _0x558f=function(_0xd20b1f,_0x4371d4){_0xd20b1f=_0xd20b1f-0x0;var _0x558f96=_0x4371[_0xd20b1f];return _0x558f96;};import{Plugin as _0x5d6559}from'ckeditor5/src/core';import _0x4870dc from'./importwordui';import _0x265faf from'./importwordediting';export default class i extends _0x5d6559{static get[_0x558f('0x1')](){return _0x558f('0x2');}static get[_0x558f('0x0')](){return[_0x265faf,_0x4870dc];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x5d9969}from'ckeditor5/src/core';import{Range as _0x46c143}from'ckeditor5/src/engine';import{logWarning as _0xc9d35b,logError as _0x45e29c,first as _0x5cfa4e,uid as _0x4dee65}from'ckeditor5/src/utils';export default class d extends _0x5d9969{constructor(_0x3e5ae){super(_0x3e5ae),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x2983cf,_0x55533f)=>{const _0x263d0e=new DataTransfer();_0x263d0e['setData']('text/html',_0x55533f['html']);const _0x554840=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x2595a6=>{this['_importMarker']['stopListening'](),_0x2595a6['setSelection'](_0x554840),_0x3e5ae['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x263d0e});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x42be99,_0xcd0a7d={}){if(this['isBusy'])return Promise['resolve']();const _0x48fb54=this['editor']['config']['get']('importWord'),_0x411a25={'url':_0x48fb54['converterUrl'],'file':_0x42be99,'serviceConfig':{..._0xcd0a7d,'default_styles':_0x48fb54['defaultStyles']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x411a25)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x56337f=this['editor']['model'],_0x1774ca=_0x56337f['schema'],_0x20b4bb=_0x56337f['document']['selection'],_0x2c4f6d=_0x5cfa4e(_0x20b4bb['getSelectedBlocks']());return!!_0x2c4f6d&&_0x1774ca['checkChild'](_0x2c4f6d['parent'],'paragraph');}['_prepareForImport'](){const _0x45d878=this['editor'],_0x4e25e8=_0x45d878['model'],_0x3563ea=_0x4e25e8['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x45d878['model']['createBatch']({'isUndoable':!0x0}),_0x4e25e8['enqueueChange'](this['_undoStepBatch'],_0xa0475=>{_0x3563ea['isCollapsed']||_0x4e25e8['deleteContent'](_0x3563ea,{'leaveUnmerged':!0x0});const _0x12b5cc=_0x3563ea['getFirstPosition'](),_0x14ea0c=_0x5cfa4e(_0x3563ea['getSelectedBlocks']());let _0xcb37ec;_0xcb37ec=_0x14ea0c['is']('element','paragraph')&&_0x14ea0c['isEmpty']?_0x12b5cc:_0x12b5cc['isAtStart']?_0x4e25e8['createPositionBefore'](_0x14ea0c):_0x12b5cc['isAtEnd']?_0x4e25e8['createPositionAfter'](_0x14ea0c):_0xa0475['split'](_0x12b5cc)['position'],this['_importMarker']=_0xa0475['addMarker']('importWord:'+_0x4dee65(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x46c143(_0xcb37ec)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x1120cd=this['editor']['model'];_0x1120cd['markers']['has'](this['_importMarker'])&&_0x1120cd['enqueueChange'](this['_undoStepBatch'],_0x942567=>{_0x942567['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x3a9b71,file:_0x4c7f92,serviceConfig:_0x5212d7}){const _0x25c230=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x4e7a39=new FormData();_0x4e7a39['set']('config',JSON['stringify'](_0x5212d7)),_0x4e7a39['set']('file',_0x4c7f92);const _0x1dfc3b={'method':'POST','headers':{},'body':_0x4e7a39,'signal':this['_abortController']['signal']};return _0x25c230&&(_0x1dfc3b['headers']['Authorization']=_0x25c230['value']),fetch(_0x3a9b71,_0x1dfc3b);}['_handleImportResponse'](_0x5bc800){return _0x5bc800['ok']?_0x5bc800['json']()['then'](_0x90b09e=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x90b09e);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0xc9d35b('import-word-plugin-import-cancelled');const _0x4eff77=this['editor'],_0x2f333e=(0x0,_0x4eff77['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x4eff77['plugins']['get']('Notification')['showWarning'](_0x2f333e),_0x45e29c('import-word-plugin-conversion-failed');}}
23
+ import{Command as _0x59d6e8}from'ckeditor5/src/core';import{Range as _0x2195ec}from'ckeditor5/src/engine';import{logWarning as _0x3c44ca,logError as _0x281378,first as _0x491bc8,uid as _0x3f8b8c}from'ckeditor5/src/utils';export default class d extends _0x59d6e8{constructor(_0x3a8912){super(_0x3a8912),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x42249b,_0x186288)=>{const _0x38d86a=new DataTransfer();_0x38d86a['setData']('text/html',_0x186288['html']);const _0x3f1e5a=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x5d8252=>{this['_importMarker']['stopListening'](),_0x5d8252['setSelection'](_0x3f1e5a),_0x3a8912['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x38d86a});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x172be6,_0x97a7cf={}){if(this['isBusy'])return Promise['resolve']();const _0xf6e535=this['editor']['config']['get']('importWord'),_0xf15982={'url':_0xf6e535['converterUrl'],'file':_0x172be6,'serviceConfig':{..._0x97a7cf,'default_styles':_0xf6e535['defaultStyles']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0xf15982)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x4eabfd=this['editor']['model'],_0x5aa99e=_0x4eabfd['schema'],_0x3a6222=_0x4eabfd['document']['selection'],_0x533ad6=_0x491bc8(_0x3a6222['getSelectedBlocks']());return!!_0x533ad6&&_0x5aa99e['checkChild'](_0x533ad6['parent'],'paragraph');}['_prepareForImport'](){const _0x2d56d8=this['editor'],_0x2eb8b8=_0x2d56d8['model'],_0x4228a4=_0x2eb8b8['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x2d56d8['model']['createBatch']({'isUndoable':!0x0}),_0x2eb8b8['enqueueChange'](this['_undoStepBatch'],_0x3ceedc=>{_0x4228a4['isCollapsed']||_0x2eb8b8['deleteContent'](_0x4228a4,{'leaveUnmerged':!0x0});const _0x579f45=_0x4228a4['getFirstPosition'](),_0x192a5d=_0x491bc8(_0x4228a4['getSelectedBlocks']());let _0x257d06;_0x257d06=_0x192a5d['is']('element','paragraph')&&_0x192a5d['isEmpty']?_0x579f45:_0x579f45['isAtStart']?_0x2eb8b8['createPositionBefore'](_0x192a5d):_0x579f45['isAtEnd']?_0x2eb8b8['createPositionAfter'](_0x192a5d):_0x3ceedc['split'](_0x579f45)['position'],this['_importMarker']=_0x3ceedc['addMarker']('importWord:'+_0x3f8b8c(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x2195ec(_0x257d06)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x3b5cec=this['editor']['model'];_0x3b5cec['markers']['has'](this['_importMarker'])&&_0x3b5cec['enqueueChange'](this['_undoStepBatch'],_0xd8376=>{_0xd8376['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x214fee,file:_0x4767f9,serviceConfig:_0x55bc3e}){const _0x36ca52=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x17d46e=new FormData();_0x17d46e['set']('config',JSON['stringify'](_0x55bc3e)),_0x17d46e['set']('file',_0x4767f9);const _0x4db106={'method':'POST','headers':{},'body':_0x17d46e,'signal':this['_abortController']['signal']};return _0x36ca52&&(_0x4db106['headers']['Authorization']=_0x36ca52['value']),fetch(_0x214fee,_0x4db106);}['_handleImportResponse'](_0x4d876){return _0x4d876['ok']?_0x4d876['json']()['then'](_0x410b00=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x410b00);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x3c44ca('import-word-plugin-import-cancelled');const _0x29d704=this['editor'],_0x4b6793=(0x0,_0x29d704['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x29d704['plugins']['get']('Notification')['showWarning'](_0x4b6793),_0x281378('import-word-plugin-conversion-failed');}}
@@ -6,7 +6,9 @@
6
6
  * @module import-word/importwordediting
7
7
  * @publicApi
8
8
  */
9
- import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
10
+ import { Notification } from 'ckeditor5/src/ui';
11
+ import { ClipboardPipeline } from 'ckeditor5/src/clipboard';
10
12
  import type { InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
11
13
  /**
12
14
  * The editing part of the import from Word feature.
@@ -21,7 +23,7 @@ export default class ImportWordEditing extends Plugin {
21
23
  /**
22
24
  * @inheritDoc
23
25
  */
24
- static get requires(): PluginDependencies;
26
+ static get requires(): (string | typeof Notification | typeof ClipboardPipeline)[];
25
27
  /**
26
28
  * @inheritDoc
27
29
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xb020=['plugins','CloudServices','config','https://docx-converter.cke-cs.com/v2/convert/docx-html','cloudServices','_token','get','pluginName','editor','add','define','init','tokenUrl','importWord','token','requires','ImportWordEditing'];(function(_0xd6f86a,_0xb02002){const _0x2b1803=function(_0x1ac39f){while(--_0x1ac39f){_0xd6f86a['push'](_0xd6f86a['shift']());}};_0x2b1803(++_0xb02002);}(_0xb020,0x9c));const _0x2b18=function(_0xd6f86a,_0xb02002){_0xd6f86a=_0xd6f86a-0x0;let _0x2b1803=_0xb020[_0xd6f86a];return _0x2b1803;};import{Plugin as _0x2f8498}from'ckeditor5/src/core';import{Notification as _0x285629}from'ckeditor5/src/ui';import{ClipboardPipeline as _0x317026}from'ckeditor5/src/clipboard';import _0x477be9 from'./importwordcommand';export default class e extends _0x2f8498{static get[_0x2b18('0x4')](){return _0x2b18('0xd');}static get[_0x2b18('0xc')](){return[_0x285629,_0x317026,_0x2b18('0xf')];}constructor(_0x531c71){super(_0x531c71),this['_token']=null;}async[_0x2b18('0x8')](){const _0x5855c3=this[_0x2b18('0x5')];_0x5855c3[_0x2b18('0x10')][_0x2b18('0x7')](_0x2b18('0xa'),{'converterUrl':_0x2b18('0x0'),'tokenUrl':(_0x5855c3['config'][_0x2b18('0x3')](_0x2b18('0x1'))||{})[_0x2b18('0x9')],'defaultStyles':!0x1}),_0x5855c3['commands'][_0x2b18('0x6')](_0x2b18('0xa'),new _0x477be9(_0x5855c3));const {tokenUrl:_0x44d583}=_0x5855c3[_0x2b18('0x10')][_0x2b18('0x3')](_0x2b18('0xa'));if(_0x44d583){const {tokenUrl:_0x31d7ca}=_0x5855c3[_0x2b18('0x10')][_0x2b18('0x3')](_0x2b18('0x1'))||{};this['_token']=_0x44d583===_0x31d7ca?_0x5855c3[_0x2b18('0xe')][_0x2b18('0x3')](_0x2b18('0xf'))[_0x2b18('0xb')]:await _0x5855c3['plugins'][_0x2b18('0x3')](_0x2b18('0xf'))['registerTokenUrl'](_0x44d583);}}['getToken'](){return this[_0x2b18('0x2')];}}
23
+ const _0x30c7=['ImportWordEditing','https://docx-converter.cke-cs.com/v2/convert/docx-html','editor','config','CloudServices','_token','importWord','getToken','cloudServices','commands','init','requires','get','registerTokenUrl','add','plugins'];(function(_0x4c2db7,_0x30c778){const _0x528e57=function(_0x50cbab){while(--_0x50cbab){_0x4c2db7['push'](_0x4c2db7['shift']());}};_0x528e57(++_0x30c778);}(_0x30c7,0x1a4));const _0x528e=function(_0x4c2db7,_0x30c778){_0x4c2db7=_0x4c2db7-0x0;let _0x528e57=_0x30c7[_0x4c2db7];return _0x528e57;};import{Plugin as _0x345da6}from'ckeditor5/src/core';import{Notification as _0x5c1b3a}from'ckeditor5/src/ui';import{ClipboardPipeline as _0x39d41e}from'ckeditor5/src/clipboard';import _0xee35d4 from'./importwordcommand';export default class e extends _0x345da6{static get['pluginName'](){return _0x528e('0xc');}static get[_0x528e('0x7')](){return[_0x5c1b3a,_0x39d41e,_0x528e('0x0')];}constructor(_0x144932){super(_0x144932),this[_0x528e('0x1')]=null;}async[_0x528e('0x6')](){const _0x5547a9=this[_0x528e('0xe')];_0x5547a9['config']['define'](_0x528e('0x2'),{'converterUrl':_0x528e('0xd'),'tokenUrl':(_0x5547a9[_0x528e('0xf')][_0x528e('0x8')]('cloudServices')||{})['tokenUrl'],'defaultStyles':!0x1}),_0x5547a9[_0x528e('0x5')][_0x528e('0xa')](_0x528e('0x2'),new _0xee35d4(_0x5547a9));const {tokenUrl:_0x2941f9}=_0x5547a9[_0x528e('0xf')][_0x528e('0x8')]('importWord');if(_0x2941f9){const {tokenUrl:_0x421c65}=_0x5547a9['config'][_0x528e('0x8')](_0x528e('0x4'))||{};this[_0x528e('0x1')]=_0x2941f9===_0x421c65?_0x5547a9[_0x528e('0xb')]['get']('CloudServices')['token']:await _0x5547a9[_0x528e('0xb')]['get'](_0x528e('0x0'))[_0x528e('0x9')](_0x2941f9);}}[_0x528e('0x3')](){return this[_0x528e('0x1')];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x35da9f}from'ckeditor5/src/core';import{View as _0x1e1278}from'ckeditor5/src/ui';import{FileDialogButtonView as _0x24b20d}from'ckeditor5/src/upload';import _0x53d714 from'../theme/icons/importword.svg';import'../theme/importword.css';export default class o extends _0x35da9f{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x547bcd=this['editor'],t=_0x547bcd['t'];_0x547bcd['ui']['componentFactory']['add']('importWord',_0x242eb0=>{const _0x4a65c9=_0x547bcd['commands']['get']('importWord'),_0x5bcb28=new _0x24b20d(_0x242eb0);_0x5bcb28['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x5bcb28['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x53d714,'tooltip':!0x0}),_0x5bcb28['buttonView']['bind']('isOn','isEnabled')['to'](_0x4a65c9,'isBusy','isEnabled'),_0x5bcb28['buttonView']['extendTemplate']({'attributes':{'class':[_0x5bcb28['buttonView']['bindTemplate']['if']('isOn','ck-importword_status-pending')]}});const _0x310d4e=new _0x1e1278();return _0x310d4e['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-importword__spinner-container']},'children':[{'tag':'span','attributes':{'class':['ck','ck-importword__spinner']}}]}),_0x5bcb28['buttonView']['children']['add'](_0x310d4e),_0x5bcb28['on']('done',(_0x50c09d,_0x182de8)=>{_0x547bcd['execute']('importWord',_0x182de8[0x0],{}),_0x547bcd['editing']['view']['focus']();}),_0x5bcb28;});}}
23
+ import{Plugin as _0xd91a10}from'ckeditor5/src/core';import{View as _0x103e34}from'ckeditor5/src/ui';import{FileDialogButtonView as _0x1142b1}from'ckeditor5/src/upload';import _0xe23418 from'../theme/icons/importword.svg';import'../theme/importword.css';export default class o extends _0xd91a10{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x21335e=this['editor'],t=_0x21335e['t'];_0x21335e['ui']['componentFactory']['add']('importWord',_0x1ed359=>{const _0x34b0ea=_0x21335e['commands']['get']('importWord'),_0xaf831a=new _0x1142b1(_0x1ed359);_0xaf831a['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0xaf831a['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0xe23418,'tooltip':!0x0}),_0xaf831a['buttonView']['bind']('isOn','isEnabled')['to'](_0x34b0ea,'isBusy','isEnabled'),_0xaf831a['buttonView']['extendTemplate']({'attributes':{'class':[_0xaf831a['buttonView']['bindTemplate']['if']('isOn','ck-importword_status-pending')]}});const _0x4eeb19=new _0x103e34();return _0x4eeb19['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-importword__spinner-container']},'children':[{'tag':'span','attributes':{'class':['ck','ck-importword__spinner']}}]}),_0xaf831a['buttonView']['children']['add'](_0x4eeb19),_0xaf831a['on']('done',(_0x32d2e2,_0x1edbda)=>{_0x21335e['execute']('importWord',_0x1edbda[0x0],{}),_0x21335e['editing']['view']['focus']();}),_0xaf831a;});}}