@ckeditor/ckeditor5-export-word 44.1.0-alpha.5 → 44.2.0-alpha.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 +1 -1
- package/README.md +1 -1
- package/build/export-word.js +2 -2
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +2 -2
- package/dist/index.js +2 -2
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/gu.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/kk.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/oc.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sl.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/ti.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +32 -5
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/exportword.d.ts +2 -2
- package/src/exportword.js +2 -2
- package/src/exportwordcommand.d.ts +1 -1
- package/src/exportwordcommand.js +2 -2
- package/src/exportwordui.d.ts +1 -1
- package/src/exportwordui.js +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -2
- package/src/utils/common-translations.d.ts +1 -1
- package/src/utils/common-translations.js +2 -2
- package/src/utils.d.ts +1 -7
- package/src/utils.js +2 -2
- package/dist/augmentation.d.ts +0 -25
- package/dist/exportword.d.ts +0 -364
- package/dist/exportwordcommand.d.ts +0 -40
- package/dist/exportwordui.d.ts +0 -35
- package/dist/index.d.ts +0 -14
- package/dist/utils/common-translations.d.ts +0 -13
- package/dist/utils.d.ts +0 -62
package/src/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x733c14,_0x422c9c){const _0x22e931=_0x2dae,_0x41fbd1=_0x733c14();while(!![]){try{const _0x25e0b8=-parseInt(_0x22e931(0x163))/0x1+parseInt(_0x22e931(0x193))/0x2*(parseInt(_0x22e931(0x15b))/0x3)+-parseInt(_0x22e931(0x180))/0x4*(-parseInt(_0x22e931(0x185))/0x5)+-parseInt(_0x22e931(0x18b))/0x6*(parseInt(_0x22e931(0x188))/0x7)+-parseInt(_0x22e931(0x186))/0x8*(-parseInt(_0x22e931(0x15d))/0x9)+parseInt(_0x22e931(0x176))/0xa+parseInt(_0x22e931(0x167))/0xb*(-parseInt(_0x22e931(0x179))/0xc);if(_0x25e0b8===_0x422c9c)break;else _0x41fbd1['push'](_0x41fbd1['shift']());}catch(_0x3ba320){_0x41fbd1['push'](_0x41fbd1['shift']());}}}(_0x4685,0xb11c6));function _0x4685(){const _0x5ec09b=['isResolved','@external','get','keys','plugins','push','getCommentThreads','1240418LpoBtl','config','map','CommentsRepository','3aUWcBD','$defaultValues','510687LUCEvP','has','data','image','$labels','TrackChanges','569712PchjOq','timezone','Users','getLabel','14928276NXTVYw','resolvedOptions','users','previewMode','contentLanguage','MergeFields','merge_fields','getDataSetValues','comments','document','authorName','mergeFields','language','getSuggestions','DateTimeFormat','10613840jdNFNK','createdAt','getDefaultValues','12ZHTSSY','entries','locale','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','content','author','MergeFieldsEditing','4146580VLgSNQ','length','collaboration_features','getMergeFieldType','suggestions','5BeNHFD','152hDdeTE','name','7duGFZJ','comment_threads','timeZone','6864486YFPAhW'];_0x4685=function(){return _0x5ec09b;};return _0x4685();}export function getConverterOptions(_0x303826,_0x57bf67={}){const _0x295495=_0x2dae,_0x5479bc=_0x303826[_0x295495(0x190)][_0x295495(0x15e)](_0x295495(0x165)),_0x57ccad=_0x303826[_0x295495(0x190)][_0x295495(0x15e)](_0x295495(0x15a)),_0x3980e5=_0x303826[_0x295495(0x190)][_0x295495(0x15e)](_0x295495(0x162)),_0x78dea0=_0x57bf67;if(_0x5479bc&&_0x57ccad){const _0x5ad7a1=getComments(_0x303826[_0x295495(0x190)][_0x295495(0x18e)](_0x295495(0x15a))[_0x295495(0x192)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x295495(0x18f)](_0x5ad7a1)[_0x295495(0x181)]&&(_0x78dea0[_0x295495(0x16f)]=_0x5ad7a1);}if(_0x5479bc&&_0x3980e5){const _0x58dad3=_0x303826[_0x295495(0x190)][_0x295495(0x18e)](_0x295495(0x162)),_0x43a1c5=_0x303826[_0x295495(0x190)][_0x295495(0x18e)](_0x295495(0x165)),_0x9d14dd=getSuggestions(_0x58dad3[_0x295495(0x174)]({'toJSON':!0x0}),_0x43a1c5[_0x295495(0x169)]);Object[_0x295495(0x18f)](_0x9d14dd)[_0x295495(0x181)]&&(_0x78dea0[_0x295495(0x184)]=_0x9d14dd);}return(_0x78dea0[_0x295495(0x184)]||_0x78dea0[_0x295495(0x16f)])&&(_0x78dea0[_0x295495(0x164)]=new Intl[(_0x295495(0x175))]()[_0x295495(0x168)]()[_0x295495(0x18a)]),_0x78dea0;}function _0x2dae(_0x2aa9df,_0x2a1a0f){const _0x46852a=_0x4685();return _0x2dae=function(_0x2daeb1,_0x517c59){_0x2daeb1=_0x2daeb1-0x159;let _0x2e51d1=_0x46852a[_0x2daeb1];return _0x2e51d1;},_0x2dae(_0x2aa9df,_0x2a1a0f);}export function getComments(_0x22e2e2){const _0x35ecce=_0x2dae,_0x3e9c49={};if(!_0x22e2e2[_0x35ecce(0x181)])return _0x3e9c49;for(const _0x30cfed of _0x22e2e2)_0x30cfed[_0x35ecce(0x16f)][_0x35ecce(0x159)](_0x31c6b3=>{const _0x52fc5a=_0x35ecce;void 0x0===_0x3e9c49[_0x30cfed['id']]&&(_0x3e9c49[_0x30cfed['id']]=[]),_0x3e9c49[_0x30cfed['id']][_0x52fc5a(0x191)]({'author':_0x31c6b3[_0x52fc5a(0x17e)][_0x52fc5a(0x187)],'content':_0x31c6b3[_0x52fc5a(0x17d)],'created':_0x31c6b3[_0x52fc5a(0x177)],'is_resolved':_0x30cfed[_0x52fc5a(0x18c)]});});return _0x3e9c49;}export function getSuggestions(_0x3bc195,_0x52b2d3){const _0x5d1cd3=_0x2dae,_0x52498a={};if(!_0x3bc195[_0x5d1cd3(0x181)]||!_0x52b2d3[_0x5d1cd3(0x181)])return _0x52498a;for(const {id:_0x3fa74c,createdAt:_0x197013,authorId:_0x4b6cf9,attributes:_0x5a99aa}of _0x3bc195){const _0x2a2926=_0x5a99aa&&_0x5a99aa[_0x5d1cd3(0x18d)],_0xa40865=_0x2a2926?_0x2a2926[_0x5d1cd3(0x171)]:_0x52b2d3[_0x5d1cd3(0x18e)](_0x4b6cf9)[_0x5d1cd3(0x187)];_0x52498a[_0x3fa74c]={'author':_0xa40865,'created':_0x197013};}return _0x52498a;}export function getConverterOptionsV2(_0x327752,_0x4447c9={}){const _0x4ccb48=_0x2dae,_0x631f3d=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x165)),_0x20509f=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x15a)),_0x1ea55d=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x162)),_0x59ad7f=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x16c)),_0x354dd9=_0x327752[_0x4ccb48(0x17b)][_0x4ccb48(0x16b)],_0x2f56e7=_0x4447c9,_0x26539a={};if(_0x2f56e7[_0x4ccb48(0x170)]=_0x2f56e7[_0x4ccb48(0x170)]||{},_0x2f56e7[_0x4ccb48(0x170)][_0x4ccb48(0x173)]=_0x2f56e7[_0x4ccb48(0x170)][_0x4ccb48(0x173)]||_0x354dd9,_0x631f3d&&_0x20509f){const _0x1a5a4f=getCommentsV2(_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x15a))[_0x4ccb48(0x192)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x1a5a4f[_0x4ccb48(0x181)]&&(_0x26539a[_0x4ccb48(0x189)]=_0x1a5a4f);}if(_0x631f3d&&_0x1ea55d){const _0xd18fcf=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x162)),_0x462a47=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x165)),_0xc75253=getSuggestionsV2(_0xd18fcf[_0x4ccb48(0x174)]({'toJSON':!0x0}),_0x462a47[_0x4ccb48(0x169)]);_0xc75253[_0x4ccb48(0x181)]&&(_0x26539a[_0x4ccb48(0x184)]=_0xc75253);}if(_0x59ad7f){const _0x3dbc33=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x17f)),_0x565fd4=_0x3dbc33[_0x4ccb48(0x16a)],{prefix:_0x4bf774,suffix:_0x1a89a2}=_0x327752[_0x4ccb48(0x194)][_0x4ccb48(0x18e)](_0x4ccb48(0x172));if(_0x2f56e7[_0x4ccb48(0x16d)]={'prefix':_0x4bf774,'suffix':_0x1a89a2},_0x4ccb48(0x161)!==_0x565fd4){_0x2f56e7[_0x4ccb48(0x16d)][_0x4ccb48(0x15f)]={};const _0x3a03b8=_0x4ccb48(0x17c),_0x5c55fb=_0x4ccb48(0x15c)===_0x565fd4?_0x3dbc33[_0x4ccb48(0x178)]():_0x3dbc33[_0x4ccb48(0x16e)](_0x565fd4,!0x0);for(const _0x57dea5 of Object[_0x4ccb48(0x17a)](_0x5c55fb)){const [_0x4ae0e0,_0x20c0e1]=_0x57dea5;_0x4ccb48(0x160)===_0x3dbc33[_0x4ccb48(0x183)](_0x4ae0e0)?_0x2f56e7[_0x4ccb48(0x16d)][_0x4ccb48(0x15f)][_0x4ae0e0]=null!==_0x20c0e1?_0x20c0e1:_0x3a03b8:_0x2f56e7[_0x4ccb48(0x16d)][_0x4ccb48(0x15f)][_0x4ae0e0]=null!==_0x20c0e1?_0x20c0e1:_0x3dbc33[_0x4ccb48(0x166)](_0x4ae0e0)||_0x4ae0e0;}}}return(_0x26539a[_0x4ccb48(0x189)]||_0x26539a[_0x4ccb48(0x184)])&&(_0x2f56e7[_0x4ccb48(0x164)]=new Intl[(_0x4ccb48(0x175))]()[_0x4ccb48(0x168)]()[_0x4ccb48(0x18a)],_0x2f56e7[_0x4ccb48(0x182)]=_0x26539a),_0x2f56e7;}export function getCommentsV2(_0x126fa6){const _0x45dcd8=_0x2dae,_0x3ad1d2=[];if(!_0x126fa6[_0x45dcd8(0x181)])return _0x3ad1d2;for(const _0x4e579f of _0x126fa6){const _0x2afb05=_0x4e579f[_0x45dcd8(0x16f)][_0x45dcd8(0x159)](_0x2d1df6=>({'author':_0x2d1df6[_0x45dcd8(0x17e)][_0x45dcd8(0x187)],'content':_0x2d1df6[_0x45dcd8(0x17d)],'created_at':_0x2d1df6[_0x45dcd8(0x177)]}));_0x3ad1d2[_0x45dcd8(0x191)]({'thread_id':_0x4e579f['id'],'is_resolved':_0x4e579f[_0x45dcd8(0x18c)],'comments':_0x2afb05});}return _0x3ad1d2;}export function getSuggestionsV2(_0x204f4d,_0x128f9b){const _0x7f0574=_0x2dae;return _0x204f4d[_0x7f0574(0x181)]&&_0x128f9b[_0x7f0574(0x181)]?_0x204f4d[_0x7f0574(0x159)](({id:_0x5c6886,createdAt:_0x4c0adb,authorId:_0x5a8c50,attributes:_0x34b797})=>{const _0x2c1630=_0x7f0574,_0x2d9974=_0x34b797&&_0x34b797[_0x2c1630(0x18d)];return{'id':_0x5c6886,'author':_0x2d9974?_0x2d9974[_0x2c1630(0x171)]:_0x128f9b[_0x2c1630(0x18e)](_0x5a8c50)[_0x2c1630(0x187)],'created_at':_0x4c0adb};}):[];}
|
package/dist/augmentation.d.ts
DELETED
|
@@ -1,25 +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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
import type { ExportWordConfig, ExportWord, ExportWordCommand } from './index.js';
|
|
10
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
-
interface EditorConfig {
|
|
12
|
-
/**
|
|
13
|
-
* The configuration of the {@link module:export-word/exportword~ExportWord export to Word feature}.
|
|
14
|
-
*
|
|
15
|
-
* Read more in {@link module:export-word/exportword~ExportWordConfig}.
|
|
16
|
-
*/
|
|
17
|
-
exportWord?: ExportWordConfig;
|
|
18
|
-
}
|
|
19
|
-
interface PluginsMap {
|
|
20
|
-
[ExportWord.pluginName]: ExportWord;
|
|
21
|
-
}
|
|
22
|
-
interface CommandsMap {
|
|
23
|
-
exportWord: ExportWordCommand;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/dist/exportword.d.ts
DELETED
|
@@ -1,364 +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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module export-word/exportword
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
-
import { Notification } from 'ckeditor5/src/ui.js';
|
|
15
|
-
import type { InitializedToken, TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
|
|
16
|
-
import ExportWordUI from './exportwordui.js';
|
|
17
|
-
/**
|
|
18
|
-
* The export to Word feature.
|
|
19
|
-
*
|
|
20
|
-
* It allows you to generate a Word file directly from the editor content.
|
|
21
|
-
*
|
|
22
|
-
* For a detailed overview, check the {@glink features/converters/export-word export to Word} feature documentation.
|
|
23
|
-
*/
|
|
24
|
-
export default class ExportWord extends Plugin {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
static get pluginName(): "ExportWord";
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
static get isOfficialPlugin(): true;
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
static get isPremiumPlugin(): true;
|
|
37
|
-
/**
|
|
38
|
-
* @inheritDoc
|
|
39
|
-
*/
|
|
40
|
-
static get requires(): readonly ["CloudServices", typeof Notification, typeof ExportWordUI];
|
|
41
|
-
/**
|
|
42
|
-
* @inheritDoc
|
|
43
|
-
*/
|
|
44
|
-
init(): void;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The configuration of the export to Word feature. It is used by the Word export features from
|
|
48
|
-
* the `@ckeditor/ckeditor5-export-word` package.
|
|
49
|
-
*
|
|
50
|
-
* ```ts
|
|
51
|
-
* ClassicEditor
|
|
52
|
-
* .create( editorElement, {
|
|
53
|
-
* exportWord: ... // Export to Word feature options.
|
|
54
|
-
* } )
|
|
55
|
-
* .then( ... )
|
|
56
|
-
* .catch( ... );
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
60
|
-
*/
|
|
61
|
-
export interface ExportWordConfig {
|
|
62
|
-
/**
|
|
63
|
-
* Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
|
|
64
|
-
*
|
|
65
|
-
* ```ts
|
|
66
|
-
* const exportWordConfig = {
|
|
67
|
-
* stylesheets: [ './path/to/custom-style.css' ]
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* **Default editor's content styles**:
|
|
72
|
-
* {@glink getting-started/setup/css The default editor content styles}
|
|
73
|
-
* are applied to the generated Word file thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
|
|
74
|
-
* If you don't want them to be applied, you have to omit the token:
|
|
75
|
-
*
|
|
76
|
-
* **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
|
|
77
|
-
* In other setups you always need to pass the stylesheets.
|
|
78
|
-
*
|
|
79
|
-
* ```ts
|
|
80
|
-
* const exportWordConfig = {
|
|
81
|
-
* stylesheets: [ './path/to/custom-editor-styles.css' ]
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* **Custom styling:** For more advanced styling, your configuration should look like this:
|
|
86
|
-
*
|
|
87
|
-
* ```ts
|
|
88
|
-
* const exportWordConfig = {
|
|
89
|
-
* stylesheets: [
|
|
90
|
-
* './path/to/editor-styles.css',
|
|
91
|
-
* './path/to/custom-styles.css'
|
|
92
|
-
* ]
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
*
|
|
96
|
-
* @default `[ 'EDITOR_STYLES' ]`
|
|
97
|
-
*/
|
|
98
|
-
stylesheets?: Array<string>;
|
|
99
|
-
/**
|
|
100
|
-
* The name of the generated Word file.
|
|
101
|
-
*
|
|
102
|
-
* ```ts
|
|
103
|
-
* // Static file name.
|
|
104
|
-
* const exportWordConfig = {
|
|
105
|
-
* fileName: 'my-document.docx'
|
|
106
|
-
* }
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* // Dynamic file name.
|
|
110
|
-
* const exportWordConfig = {
|
|
111
|
-
* fileName: () => {
|
|
112
|
-
* const articleTitle = document.querySelector( '#title' );
|
|
113
|
-
*
|
|
114
|
-
* return `${ articleTitle.value }.docx`;
|
|
115
|
-
* }
|
|
116
|
-
* }
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* **NOTE:** The file name must contain the `.docx` extension.
|
|
120
|
-
* Otherwise your operating system or device may have trouble identifying the file type.
|
|
121
|
-
*
|
|
122
|
-
* @default 'document.docx'
|
|
123
|
-
*/
|
|
124
|
-
fileName?: string | (() => string);
|
|
125
|
-
/**
|
|
126
|
-
* A URL to the Docx converter.
|
|
127
|
-
*
|
|
128
|
-
* ```ts
|
|
129
|
-
* const exportWordConfig = {
|
|
130
|
-
* converterUrl: 'https://myconverter.com/v2/'
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
* **NOTE:** The plugin uses the default HTML to Word converter delivered by CKEditor Cloud Services.
|
|
135
|
-
* You can provide a URL to an on-premises converter instead.
|
|
136
|
-
*
|
|
137
|
-
* @default 'https://docx-converter.cke-cs.com/v2/convert/html-docx'
|
|
138
|
-
*/
|
|
139
|
-
converterUrl?: string;
|
|
140
|
-
/**
|
|
141
|
-
* The CKEditor Cloud Services HTML to DOCX Converter [configuration options](https://docx-converter.cke-cs.com/docs#section/Options).
|
|
142
|
-
*
|
|
143
|
-
* **NOTE:** Configuring the plugin is not mandatory.
|
|
144
|
-
*
|
|
145
|
-
* ```ts
|
|
146
|
-
* const exportWordConfig = {
|
|
147
|
-
* converterOptions: {
|
|
148
|
-
* ...
|
|
149
|
-
* }
|
|
150
|
-
* }
|
|
151
|
-
* ```
|
|
152
|
-
*
|
|
153
|
-
* @default `{
|
|
154
|
-
* document: {
|
|
155
|
-
* size: 'A4',
|
|
156
|
-
* orientation: 'portrait',
|
|
157
|
-
* language: editor.locale.contentLanguage,
|
|
158
|
-
* margin: {
|
|
159
|
-
* top: '1in',
|
|
160
|
-
* bottom: '1in',
|
|
161
|
-
* right: '1in',
|
|
162
|
-
* left: '1in'
|
|
163
|
-
* }
|
|
164
|
-
* }
|
|
165
|
-
* headers: undefined,
|
|
166
|
-
* footers: undefined,
|
|
167
|
-
* auto_pagination: false,
|
|
168
|
-
* base_url: undefined,
|
|
169
|
-
* extra_http_headers: undefined
|
|
170
|
-
* }`
|
|
171
|
-
*/
|
|
172
|
-
converterOptions?: ExportWordConverterOptions | ExportWordConverterOptionsV2;
|
|
173
|
-
/**
|
|
174
|
-
* A function to gather the HTML to be converted to Word.
|
|
175
|
-
*
|
|
176
|
-
* **NOTE:** This option may be useful when the editor does not have a `getData()` method,
|
|
177
|
-
* or if the HTML to be converted should be different than the edited one.
|
|
178
|
-
*
|
|
179
|
-
* ```ts
|
|
180
|
-
* const exportWordConfig = {
|
|
181
|
-
* dataCallback: ( editor ) => {
|
|
182
|
-
* return `
|
|
183
|
-
* <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
|
|
184
|
-
* <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
|
|
185
|
-
* `;
|
|
186
|
-
* }
|
|
187
|
-
* }
|
|
188
|
-
* ```
|
|
189
|
-
*
|
|
190
|
-
* @default `( editor ) => editor.getData( { pagination: true } )
|
|
191
|
-
*
|
|
192
|
-
* If using the {@glink features/pagination/pagination pagination} feature, the `pagination:true` option inserts additional markers into
|
|
193
|
-
* editor's data. Thanks to that, the Docx converter creates a Word document similar to what is displayed in the editor.
|
|
194
|
-
*/
|
|
195
|
-
dataCallback?: (editor: Editor) => string;
|
|
196
|
-
/**
|
|
197
|
-
* A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
|
|
198
|
-
* the export to Word feature.
|
|
199
|
-
*
|
|
200
|
-
* **Note:** The token can be disabled with the `false` value provided.
|
|
201
|
-
*
|
|
202
|
-
* See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
|
|
203
|
-
*/
|
|
204
|
-
tokenUrl?: TokenUrl | false;
|
|
205
|
-
/**
|
|
206
|
-
* The authentication token.
|
|
207
|
-
*
|
|
208
|
-
* See: {@link module:cloud-services/cloudservices~CloudServices#token}
|
|
209
|
-
*/
|
|
210
|
-
token?: InitializedToken;
|
|
211
|
-
/**
|
|
212
|
-
* The version of `Export to Word` API.
|
|
213
|
-
*
|
|
214
|
-
* @default '2'
|
|
215
|
-
*/
|
|
216
|
-
version?: 1 | 2;
|
|
217
|
-
/**
|
|
218
|
-
* The watermark configuration.
|
|
219
|
-
*
|
|
220
|
-
* ```ts
|
|
221
|
-
* converterOptions: {
|
|
222
|
-
* watermark: {
|
|
223
|
-
* source: 'https://via.placeholder.com/200',
|
|
224
|
-
* width: '500px',
|
|
225
|
-
* height: '600px',
|
|
226
|
-
* washout: 'false'
|
|
227
|
-
* }
|
|
228
|
-
* }
|
|
229
|
-
* ```
|
|
230
|
-
*
|
|
231
|
-
* The watermark configuration is represented as an object containing 4 properties:
|
|
232
|
-
*
|
|
233
|
-
* - `source`: A source of the image used for the watermark.
|
|
234
|
-
* - `width`: A string value representing the width of the watermark.
|
|
235
|
-
* - `height`: A string value representing the height of the watermark.
|
|
236
|
-
* - `washout`: Determines whether the washout effect should be applied. Optional - the default value is `false`.
|
|
237
|
-
*
|
|
238
|
-
*/
|
|
239
|
-
watermark?: ExportWordConverterWatermarkV2;
|
|
240
|
-
}
|
|
241
|
-
export type ExportWordConverterOptions = {
|
|
242
|
-
format?: ExportWordConverterFormatOption;
|
|
243
|
-
margin_top?: string;
|
|
244
|
-
margin_bottom?: string;
|
|
245
|
-
margin_right?: string;
|
|
246
|
-
margin_left?: string;
|
|
247
|
-
header?: ExportWordConverterHeaderFooterOption;
|
|
248
|
-
footer?: ExportWordConverterHeaderFooterOption;
|
|
249
|
-
comments?: ExportWordConverterCommentsOption;
|
|
250
|
-
suggestions?: ExportWordConverterSuggestionsOption;
|
|
251
|
-
orientation?: ExportWordConverterOrientationOption;
|
|
252
|
-
auto_pagination?: boolean;
|
|
253
|
-
base_url?: string;
|
|
254
|
-
};
|
|
255
|
-
export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
|
|
256
|
-
export type ExportWordConverterOrientationOption = 'portrait' | 'landscape' | string & Record<never, never>;
|
|
257
|
-
export type ExportWordConverterHeaderFooterOption = Array<{
|
|
258
|
-
html?: string;
|
|
259
|
-
css?: string;
|
|
260
|
-
type?: 'default' | 'even' | 'odd' | 'first' | string & Record<never, never>;
|
|
261
|
-
}>;
|
|
262
|
-
export type ExportWordConverterCommentsOption = {
|
|
263
|
-
[id: string]: Array<{
|
|
264
|
-
author: string;
|
|
265
|
-
created: Date;
|
|
266
|
-
content?: string;
|
|
267
|
-
is_resolved: boolean;
|
|
268
|
-
}>;
|
|
269
|
-
};
|
|
270
|
-
export type ExportWordConverterSuggestionsOption = {
|
|
271
|
-
[id: string]: {
|
|
272
|
-
author: string;
|
|
273
|
-
created: Date | null;
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
export type ExportWordConverterOptionsV2 = {
|
|
277
|
-
document?: ExportWordConverterDocumentOptionsV2;
|
|
278
|
-
headers?: ExportWordConverterHeaderFooterOptionsV2;
|
|
279
|
-
footers?: ExportWordConverterHeaderFooterOptionsV2;
|
|
280
|
-
extra_http_headers?: ExportWordConverterExtraHttpHeaders;
|
|
281
|
-
base_url?: string;
|
|
282
|
-
auto_pagination?: boolean;
|
|
283
|
-
watermark?: ExportWordConverterWatermarkV2;
|
|
284
|
-
};
|
|
285
|
-
export type ExportWordConverterDocumentOptionsV2 = {
|
|
286
|
-
margins?: ExportWordConverterMarginsOptionsV2;
|
|
287
|
-
size?: ExportWordConverterFormatOptionsV2;
|
|
288
|
-
orientation?: ExportWordConverterOrientationOptionsV2;
|
|
289
|
-
language?: string;
|
|
290
|
-
};
|
|
291
|
-
export type ExportWordConverterMarginsOptionsV2 = {
|
|
292
|
-
top?: string;
|
|
293
|
-
right?: string;
|
|
294
|
-
bottom?: string;
|
|
295
|
-
left?: string;
|
|
296
|
-
};
|
|
297
|
-
export type ExportWordConverterHeaderFooterOptionsV2 = {
|
|
298
|
-
first?: ExportWordConverterHeaderFooterItemOptionsV2;
|
|
299
|
-
odd?: ExportWordConverterHeaderFooterItemOptionsV2;
|
|
300
|
-
even?: ExportWordConverterHeaderFooterItemOptionsV2;
|
|
301
|
-
default?: ExportWordConverterHeaderFooterItemOptionsV2;
|
|
302
|
-
};
|
|
303
|
-
export type ExportWordConverterWatermarkV2 = {
|
|
304
|
-
source?: string;
|
|
305
|
-
width?: string;
|
|
306
|
-
height?: string;
|
|
307
|
-
washout?: boolean;
|
|
308
|
-
};
|
|
309
|
-
/**
|
|
310
|
-
* If fetching some resources (e.g. images) used in a generated Word requires passing an additional
|
|
311
|
-
* authorization factor in the form of additional HTTP headers:
|
|
312
|
-
*
|
|
313
|
-
* ```
|
|
314
|
-
* extra_http_headers: {
|
|
315
|
-
* 'https://ckeditor.com': {
|
|
316
|
-
* authorization: 'Bearer xxx'
|
|
317
|
-
* },
|
|
318
|
-
* 'https://example.com': {
|
|
319
|
-
* authorization: 'Bearer xxx'
|
|
320
|
-
* },
|
|
321
|
-
* }
|
|
322
|
-
* ```
|
|
323
|
-
*/
|
|
324
|
-
export type ExportWordConverterExtraHttpHeaders = {
|
|
325
|
-
[domain: string]: ExportWordConverterExtraHttpHeadersHeader;
|
|
326
|
-
};
|
|
327
|
-
export type ExportWordConverterExtraHttpHeadersHeader = {
|
|
328
|
-
[header: string]: string;
|
|
329
|
-
};
|
|
330
|
-
export type ExportWordConverterHeaderFooterItemOptionsV2 = {
|
|
331
|
-
html?: string;
|
|
332
|
-
css?: string;
|
|
333
|
-
};
|
|
334
|
-
export type ExportWordConverterOrientationOptionsV2 = 'portrait' | 'landscape' | string & Record<never, never>;
|
|
335
|
-
export type ExportWordConverterFormatOptionsV2 = ExportWordConverterPredifinedFormatOptionsV2 | ExportWordConverterCustomFormatOptionsV2;
|
|
336
|
-
export type ExportWordConverterPredifinedFormatOptionsV2 = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
|
|
337
|
-
export type ExportWordConverterCustomFormatOptionsV2 = {
|
|
338
|
-
width?: string;
|
|
339
|
-
height?: string;
|
|
340
|
-
};
|
|
341
|
-
export type ExportWordConverterCollaborationFeaturesOptionsV2 = {
|
|
342
|
-
comment_threads?: ExportWordConverterCommentsThreadOptionsV2;
|
|
343
|
-
suggestions?: ExportWordConverterSuggestionsOptionsV2;
|
|
344
|
-
};
|
|
345
|
-
export type ExportWordConverterCommentsThreadOptionsV2 = Array<{
|
|
346
|
-
thread_id: string;
|
|
347
|
-
is_resolved: boolean;
|
|
348
|
-
comments: ExportWordConverterCommentsV2;
|
|
349
|
-
}>;
|
|
350
|
-
export type ExportWordConverterCommentsV2 = Array<{
|
|
351
|
-
author: string;
|
|
352
|
-
created_at: Date;
|
|
353
|
-
content: string;
|
|
354
|
-
}>;
|
|
355
|
-
export type ExportWordConverterSuggestionsOptionsV2 = Array<{
|
|
356
|
-
id: string;
|
|
357
|
-
author: string;
|
|
358
|
-
created_at: Date | null;
|
|
359
|
-
}>;
|
|
360
|
-
export type ExportWordConverterMergeFieldsOptionsV2 = {
|
|
361
|
-
prefix: string;
|
|
362
|
-
suffix: string;
|
|
363
|
-
data?: Record<string, string>;
|
|
364
|
-
};
|
|
@@ -1,40 +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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module export-word/exportwordcommand
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
-
import type { ExportWordConfig } from './exportword.js';
|
|
15
|
-
/**
|
|
16
|
-
* The export to Word command.
|
|
17
|
-
*
|
|
18
|
-
* It takes the editor's HTML and CSS rules from the document and sends them to the HTML to Word converter.
|
|
19
|
-
* After processing, the converter will send back a Word file for download.
|
|
20
|
-
*/
|
|
21
|
-
export default class ExportWordCommand extends Command {
|
|
22
|
-
/**
|
|
23
|
-
* A command state that indicates if the command is currently executing.
|
|
24
|
-
*
|
|
25
|
-
* @observable
|
|
26
|
-
*/
|
|
27
|
-
isBusy: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
constructor(editor: Editor);
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
refresh(): void;
|
|
36
|
-
/**
|
|
37
|
-
* @inheritDoc
|
|
38
|
-
*/
|
|
39
|
-
execute(options?: ExportWordConfig): Promise<void>;
|
|
40
|
-
}
|
package/dist/exportwordui.d.ts
DELETED
|
@@ -1,35 +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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module export-word/exportwordui
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The export to Word UI feature.
|
|
15
|
-
*
|
|
16
|
-
* It introduces 'Export to Word' button in toolbar and menu bar.
|
|
17
|
-
*/
|
|
18
|
-
export default class ExportWordUI extends Plugin {
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
static get pluginName(): "ExportWordUI";
|
|
23
|
-
/**
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
26
|
-
static get isOfficialPlugin(): true;
|
|
27
|
-
/**
|
|
28
|
-
* @inheritDoc
|
|
29
|
-
*/
|
|
30
|
-
static get isPremiumPlugin(): true;
|
|
31
|
-
/**
|
|
32
|
-
* @inheritDoc
|
|
33
|
-
*/
|
|
34
|
-
init(): void;
|
|
35
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,14 +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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module export-word
|
|
11
|
-
*/
|
|
12
|
-
export { default as ExportWord, type ExportWordConfig } from './exportword.js';
|
|
13
|
-
export type { default as ExportWordCommand } from './exportwordcommand.js';
|
|
14
|
-
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module export-word/utils/common-translations
|
|
11
|
-
*/
|
|
12
|
-
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
-
export declare function getTranslation(locale: Locale, id: string): string;
|
package/dist/utils.d.ts
DELETED
|
@@ -1,62 +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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
import type { Editor } from 'ckeditor5/src/core.js';
|
|
10
|
-
import type { Collection } from 'ckeditor5/src/utils.js';
|
|
11
|
-
import type { ExportWordConverterOptions, ExportWordConverterInternalOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption, ExportWordConverterCommentsThreadOptionsV2, ExportWordConverterOptionsV2, ExportWordConverterInternalOptionsV2, ExportWordConverterSuggestionsOptionsV2 } from './exportword.js';
|
|
12
|
-
import type { CommentThread } from '@ckeditor/ckeditor5-comments';
|
|
13
|
-
import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
|
|
14
|
-
import type { User } from '@ckeditor/ckeditor5-collaboration-core';
|
|
15
|
-
/**
|
|
16
|
-
* A helper function for getting concatenated CSS rules from external stylesheets.
|
|
17
|
-
*
|
|
18
|
-
* @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
|
|
21
|
-
/**
|
|
22
|
-
* A helper function for getting a proper options object containing
|
|
23
|
-
* comments, suggestions and the browser's timezone for the "Export to Word" converter.
|
|
24
|
-
*
|
|
25
|
-
* @param editor An editor instance.
|
|
26
|
-
* @param converterOptionsFromConfig Converter options passed through `editor.config.exportWord.converterOptions`.
|
|
27
|
-
*/
|
|
28
|
-
export declare function getConverterOptions(editor: Editor, converterOptionsFromConfig?: ExportWordConverterOptions): ExportWordConverterInternalOptions;
|
|
29
|
-
/**
|
|
30
|
-
* A helper function for getting a comments object for the converter options.
|
|
31
|
-
*
|
|
32
|
-
* @param threads The comment threads array.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption;
|
|
35
|
-
/**
|
|
36
|
-
* A helper function for getting a suggestions object for the converter options.
|
|
37
|
-
*
|
|
38
|
-
* @param suggestions The suggestions array.
|
|
39
|
-
* @param users A list of all users in the editor.
|
|
40
|
-
*/
|
|
41
|
-
export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption;
|
|
42
|
-
/**
|
|
43
|
-
* A helper function for getting a proper options object containing
|
|
44
|
-
* comments, suggestions and the browser's timezone for the "Export to Word" converter for V2 API.
|
|
45
|
-
*
|
|
46
|
-
* @param editor An editor instance.
|
|
47
|
-
* @param converterOptionsFromConfig Converter options passed through `editor.config.exportWord.converterOptions`.
|
|
48
|
-
*/
|
|
49
|
-
export declare function getConverterOptionsV2(editor: Editor, converterOptionsFromConfig?: ExportWordConverterOptionsV2): ExportWordConverterInternalOptionsV2;
|
|
50
|
-
/**
|
|
51
|
-
* A helper function for getting a comments object for the converter options in V2 API.
|
|
52
|
-
*
|
|
53
|
-
* @param threads The comment threads array.
|
|
54
|
-
*/
|
|
55
|
-
export declare function getCommentsV2(threads: Array<CommentThread>): ExportWordConverterCommentsThreadOptionsV2;
|
|
56
|
-
/**
|
|
57
|
-
* A helper function for getting a suggestions object for the converter options in V2 API.
|
|
58
|
-
*
|
|
59
|
-
* @param suggestions The suggestions array.
|
|
60
|
-
* @param users A list of all users in the editor.
|
|
61
|
-
*/
|
|
62
|
-
export declare function getSuggestionsV2(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOptionsV2;
|