@ckeditor/ckeditor5-pagination 41.3.0-alpha.3 → 41.3.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/build/pagination.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +6 -3
- package/lang/translations/ar.po +20 -4
- package/lang/translations/bg.po +20 -4
- package/lang/translations/bn.po +20 -4
- package/lang/translations/ca.po +20 -4
- package/lang/translations/cs.po +20 -4
- package/lang/translations/da.po +20 -4
- package/lang/translations/de.po +20 -4
- package/lang/translations/el.po +20 -4
- package/lang/translations/en.po +20 -4
- package/lang/translations/es.po +20 -4
- package/lang/translations/et.po +20 -4
- package/lang/translations/fi.po +20 -4
- package/lang/translations/fr.po +20 -4
- package/lang/translations/he.po +20 -4
- package/lang/translations/hi.po +20 -4
- package/lang/translations/hu.po +20 -4
- package/lang/translations/id.po +20 -4
- package/lang/translations/it.po +20 -4
- package/lang/translations/ja.po +20 -4
- package/lang/translations/ko.po +20 -4
- package/lang/translations/lt.po +20 -4
- package/lang/translations/lv.po +20 -4
- package/lang/translations/ms.po +20 -4
- package/lang/translations/nl.po +20 -4
- package/lang/translations/no.po +20 -4
- package/lang/translations/pl.po +20 -4
- package/lang/translations/pt-br.po +20 -4
- package/lang/translations/pt.po +20 -4
- package/lang/translations/ro.po +20 -4
- package/lang/translations/ru.po +20 -4
- package/lang/translations/sk.po +20 -4
- package/lang/translations/sr.po +20 -4
- package/lang/translations/sv.po +20 -4
- package/lang/translations/th.po +20 -4
- package/lang/translations/tr.po +20 -4
- package/lang/translations/uk.po +20 -4
- package/lang/translations/vi.po +20 -4
- package/lang/translations/zh-cn.po +20 -4
- package/lang/translations/zh.po +20 -6
- package/package.json +3 -4
- package/src/index.js +1 -1
- package/src/pagination.js +1 -1
- package/src/paginationediting.d.ts +16 -0
- package/src/paginationediting.js +1 -1
- package/src/paginationlookup.js +1 -1
- package/src/paginationrenderer.js +1 -1
- package/src/paginationui.js +1 -1
- package/src/ui/linesrepository.js +1 -1
- package/src/ui/lineview.js +1 -1
- package/src/ui/pagenavigatorview.js +1 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/ur.js +0 -1
- package/dist/content-index.css +0 -4
- package/dist/editor-index.css +0 -72
- package/dist/index.css +0 -158
- package/dist/translations/ar.d.ts +0 -8
- package/dist/translations/ar.js +0 -23
- package/dist/translations/bg.d.ts +0 -8
- package/dist/translations/bg.js +0 -23
- package/dist/translations/bn.d.ts +0 -8
- package/dist/translations/bn.js +0 -23
- package/dist/translations/ca.d.ts +0 -8
- package/dist/translations/ca.js +0 -23
- package/dist/translations/cs.d.ts +0 -8
- package/dist/translations/cs.js +0 -23
- package/dist/translations/da.d.ts +0 -8
- package/dist/translations/da.js +0 -23
- package/dist/translations/de.d.ts +0 -8
- package/dist/translations/de.js +0 -23
- package/dist/translations/el.d.ts +0 -8
- package/dist/translations/el.js +0 -23
- package/dist/translations/en-au.d.ts +0 -8
- package/dist/translations/en-au.js +0 -23
- package/dist/translations/en.d.ts +0 -8
- package/dist/translations/en.js +0 -23
- package/dist/translations/es.d.ts +0 -8
- package/dist/translations/es.js +0 -23
- package/dist/translations/et.d.ts +0 -8
- package/dist/translations/et.js +0 -23
- package/dist/translations/fi.d.ts +0 -8
- package/dist/translations/fi.js +0 -23
- package/dist/translations/fr.d.ts +0 -8
- package/dist/translations/fr.js +0 -23
- package/dist/translations/gl.d.ts +0 -8
- package/dist/translations/gl.js +0 -23
- package/dist/translations/he.d.ts +0 -8
- package/dist/translations/he.js +0 -23
- package/dist/translations/hi.d.ts +0 -8
- package/dist/translations/hi.js +0 -23
- package/dist/translations/hr.d.ts +0 -8
- package/dist/translations/hr.js +0 -23
- package/dist/translations/hu.d.ts +0 -8
- package/dist/translations/hu.js +0 -23
- package/dist/translations/id.d.ts +0 -8
- package/dist/translations/id.js +0 -23
- package/dist/translations/it.d.ts +0 -8
- package/dist/translations/it.js +0 -23
- package/dist/translations/ja.d.ts +0 -8
- package/dist/translations/ja.js +0 -23
- package/dist/translations/jv.d.ts +0 -8
- package/dist/translations/jv.js +0 -23
- package/dist/translations/ko.d.ts +0 -8
- package/dist/translations/ko.js +0 -23
- package/dist/translations/lt.d.ts +0 -8
- package/dist/translations/lt.js +0 -23
- package/dist/translations/lv.d.ts +0 -8
- package/dist/translations/lv.js +0 -23
- package/dist/translations/ms.d.ts +0 -8
- package/dist/translations/ms.js +0 -23
- package/dist/translations/nl.d.ts +0 -8
- package/dist/translations/nl.js +0 -23
- package/dist/translations/no.d.ts +0 -8
- package/dist/translations/no.js +0 -23
- package/dist/translations/pl.d.ts +0 -8
- package/dist/translations/pl.js +0 -23
- package/dist/translations/pt-br.d.ts +0 -8
- package/dist/translations/pt-br.js +0 -23
- package/dist/translations/pt.d.ts +0 -8
- package/dist/translations/pt.js +0 -23
- package/dist/translations/ro.d.ts +0 -8
- package/dist/translations/ro.js +0 -23
- package/dist/translations/ru.d.ts +0 -8
- package/dist/translations/ru.js +0 -23
- package/dist/translations/sk.d.ts +0 -8
- package/dist/translations/sk.js +0 -23
- package/dist/translations/sr-latn.d.ts +0 -8
- package/dist/translations/sr-latn.js +0 -23
- package/dist/translations/sr.d.ts +0 -8
- package/dist/translations/sr.js +0 -23
- package/dist/translations/sv.d.ts +0 -8
- package/dist/translations/sv.js +0 -23
- package/dist/translations/th.d.ts +0 -8
- package/dist/translations/th.js +0 -23
- package/dist/translations/tr.d.ts +0 -8
- package/dist/translations/tr.js +0 -23
- package/dist/translations/ug.d.ts +0 -8
- package/dist/translations/ug.js +0 -23
- package/dist/translations/uk.d.ts +0 -8
- package/dist/translations/uk.js +0 -23
- package/dist/translations/ur.d.ts +0 -8
- package/dist/translations/ur.js +0 -23
- package/dist/translations/vi.d.ts +0 -8
- package/dist/translations/vi.js +0 -23
- package/dist/translations/zh-cn.d.ts +0 -8
- package/dist/translations/zh-cn.js +0 -23
- package/dist/translations/zh.d.ts +0 -8
- package/dist/translations/zh.js +0 -23
- package/dist/types/augmentation.d.ts +0 -23
- package/dist/types/index.d.ts +0 -13
- package/dist/types/pagination.d.ts +0 -151
- package/dist/types/paginationediting.d.ts +0 -58
- package/dist/types/paginationlookup.d.ts +0 -62
- package/dist/types/paginationrenderer.d.ts +0 -44
- package/dist/types/paginationui.d.ts +0 -29
- package/dist/types/ui/linesrepository.d.ts +0 -38
- package/dist/types/ui/lineview.d.ts +0 -57
- package/dist/types/ui/pagenavigatorview.d.ts +0 -65
- package/lang/translations/en-au.po +0 -26
- package/lang/translations/gl.po +0 -26
- package/lang/translations/hr.po +0 -26
- package/lang/translations/jv.po +0 -26
- package/lang/translations/sr-latn.po +0 -26
- package/lang/translations/ug.po +0 -26
- package/lang/translations/ur.po +0 -26
package/lang/translations/vi.po
CHANGED
|
@@ -18,9 +18,25 @@ msgstr ""
|
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "A toolbar button tooltip for a pagination feature."
|
|
21
|
-
msgid "
|
|
22
|
-
msgstr "
|
|
21
|
+
msgid "Go to next page"
|
|
22
|
+
msgstr "Chuyển đến trang tiếp theo"
|
|
23
23
|
|
|
24
24
|
msgctxt "A toolbar button tooltip for a pagination feature."
|
|
25
|
-
msgid "
|
|
26
|
-
msgstr "
|
|
25
|
+
msgid "Go to previous page"
|
|
26
|
+
msgstr "Chuyển về trang trước"
|
|
27
|
+
|
|
28
|
+
msgctxt "Assistive technologies label for the page number input in the pagination feature's toolbar UI. Example: 'Current page number (from 1 to 10)'."
|
|
29
|
+
msgid "Current page number (from 1 to %0)"
|
|
30
|
+
msgstr "Số trang hiện tại (từ 1 đến %0)"
|
|
31
|
+
|
|
32
|
+
msgctxt "Accessibility help dialog section title for pagination plugin keystrokes."
|
|
33
|
+
msgid "Keystrokes for navigating through documents"
|
|
34
|
+
msgstr "Tổ hợp phím để điều hướng qua lại giữa các tài liệu"
|
|
35
|
+
|
|
36
|
+
msgctxt "Accessibility help dialog entry explaining the meaning of the keystroke that allows users for navigating to the previous page in the document."
|
|
37
|
+
msgid "Go to the previous page (also move selection)"
|
|
38
|
+
msgstr "Chuyển về trang trước (đồng thời di chuyển vùng lựa chọn)"
|
|
39
|
+
|
|
40
|
+
msgctxt "Accessibility help dialog entry explaining the meaning of the keystroke that allows users for navigating to the next page in the document."
|
|
41
|
+
msgid "Go to the next page (also move selection)"
|
|
42
|
+
msgstr "Chuyển đến trang tiếp theo (đồng thời di chuyển vùng lựa chọn)"
|
|
@@ -18,9 +18,25 @@ msgstr ""
|
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "A toolbar button tooltip for a pagination feature."
|
|
21
|
-
msgid "
|
|
22
|
-
msgstr "
|
|
21
|
+
msgid "Go to next page"
|
|
22
|
+
msgstr "前往下一页"
|
|
23
23
|
|
|
24
24
|
msgctxt "A toolbar button tooltip for a pagination feature."
|
|
25
|
-
msgid "
|
|
26
|
-
msgstr "
|
|
25
|
+
msgid "Go to previous page"
|
|
26
|
+
msgstr "前往上一页"
|
|
27
|
+
|
|
28
|
+
msgctxt "Assistive technologies label for the page number input in the pagination feature's toolbar UI. Example: 'Current page number (from 1 to 10)'."
|
|
29
|
+
msgid "Current page number (from 1 to %0)"
|
|
30
|
+
msgstr "当前页码(从1到%0)"
|
|
31
|
+
|
|
32
|
+
msgctxt "Accessibility help dialog section title for pagination plugin keystrokes."
|
|
33
|
+
msgid "Keystrokes for navigating through documents"
|
|
34
|
+
msgstr "浏览文档的按键"
|
|
35
|
+
|
|
36
|
+
msgctxt "Accessibility help dialog entry explaining the meaning of the keystroke that allows users for navigating to the previous page in the document."
|
|
37
|
+
msgid "Go to the previous page (also move selection)"
|
|
38
|
+
msgstr "前往上一页(同时移动选择)"
|
|
39
|
+
|
|
40
|
+
msgctxt "Accessibility help dialog entry explaining the meaning of the keystroke that allows users for navigating to the next page in the document."
|
|
41
|
+
msgid "Go to the next page (also move selection)"
|
|
42
|
+
msgstr "前往下一页(同时移动选择)"
|
package/lang/translations/zh.po
CHANGED
|
@@ -18,11 +18,25 @@ msgstr ""
|
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "A toolbar button tooltip for a pagination feature."
|
|
21
|
-
msgid "
|
|
22
|
-
msgstr ""
|
|
23
|
-
"顯示下一頁\n"
|
|
24
|
-
""
|
|
21
|
+
msgid "Go to next page"
|
|
22
|
+
msgstr "前往下一頁"
|
|
25
23
|
|
|
26
24
|
msgctxt "A toolbar button tooltip for a pagination feature."
|
|
27
|
-
msgid "
|
|
28
|
-
msgstr "
|
|
25
|
+
msgid "Go to previous page"
|
|
26
|
+
msgstr "前往上一頁"
|
|
27
|
+
|
|
28
|
+
msgctxt "Assistive technologies label for the page number input in the pagination feature's toolbar UI. Example: 'Current page number (from 1 to 10)'."
|
|
29
|
+
msgid "Current page number (from 1 to %0)"
|
|
30
|
+
msgstr "目前頁碼(從 1 到 %0)"
|
|
31
|
+
|
|
32
|
+
msgctxt "Accessibility help dialog section title for pagination plugin keystrokes."
|
|
33
|
+
msgid "Keystrokes for navigating through documents"
|
|
34
|
+
msgstr "用於瀏覽文件的按鍵動作"
|
|
35
|
+
|
|
36
|
+
msgctxt "Accessibility help dialog entry explaining the meaning of the keystroke that allows users for navigating to the previous page in the document."
|
|
37
|
+
msgid "Go to the previous page (also move selection)"
|
|
38
|
+
msgstr "前往上一頁(同時移動選取內容)"
|
|
39
|
+
|
|
40
|
+
msgctxt "Accessibility help dialog entry explaining the meaning of the keystroke that allows users for navigating to the next page in the document."
|
|
41
|
+
msgid "Go to the next page (also move selection)"
|
|
42
|
+
msgstr "前往下一頁(同時移動選取內容)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-pagination",
|
|
3
|
-
"version": "41.3.0
|
|
3
|
+
"version": "41.3.0",
|
|
4
4
|
"description": "Pagination feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-theme-lark": "41.3.0
|
|
16
|
-
"ckeditor5": "41.3.0
|
|
15
|
+
"@ckeditor/ckeditor5-theme-lark": "41.3.0",
|
|
16
|
+
"ckeditor5": "41.3.0",
|
|
17
17
|
"lodash-es": "4.17.21"
|
|
18
18
|
},
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
22
22
|
"bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
|
|
23
23
|
"files": [
|
|
24
|
-
"dist",
|
|
25
24
|
"lang",
|
|
26
25
|
"src/**/*.js",
|
|
27
26
|
"src/**/*.d.ts",
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x726415,_0x46210b){var _0x2495ee=_0x387a,_0x41920f=_0x726415();while(!![]){try{var _0xe7d7ac=parseInt(_0x2495ee(0x9a))/0x1+-parseInt(_0x2495ee(0x95))/0x2*(parseInt(_0x2495ee(0x97))/0x3)+-parseInt(_0x2495ee(0x9d))/0x4+parseInt(_0x2495ee(0x9c))/0x5*(parseInt(_0x2495ee(0x98))/0x6)+-parseInt(_0x2495ee(0x9b))/0x7+parseInt(_0x2495ee(0x99))/0x8+parseInt(_0x2495ee(0x96))/0x9*(parseInt(_0x2495ee(0x94))/0xa);if(_0xe7d7ac===_0x46210b)break;else _0x41920f['push'](_0x41920f['shift']());}catch(_0x301221){_0x41920f['push'](_0x41920f['shift']());}}}(_0x2fdd,0x33782));function _0x387a(_0x258438,_0x369d5a){var _0x2fdda8=_0x2fdd();return _0x387a=function(_0x387aed,_0x5a15d2){_0x387aed=_0x387aed-0x94;var _0x287530=_0x2fdda8[_0x387aed];return _0x287530;},_0x387a(_0x258438,_0x369d5a);}export{default as Pagination}from'./pagination.js';function _0x2fdd(){var _0x2e02ea=['146094Rlvzre','2743360LducJL','300771HNlvig','1715126ABSDYV','30BlNCQS','1086276aHkRjq','249100OLijVZ','1440KbLKqG','126UnPhdY','1713ACJcQh'];_0x2fdd=function(){return _0x2e02ea;};return _0x2fdd();}import'./augmentation.js';
|
package/src/pagination.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2b8443=_0x52f3;(function(_0x370b46,_0x1718d3){const _0x238af9=_0x52f3,_0xc2e763=_0x370b46();while(!![]){try{const _0x5472d2=-parseInt(_0x238af9(0x1eb))/0x1+-parseInt(_0x238af9(0x1e8))/0x2*(parseInt(_0x238af9(0x1ed))/0x3)+-parseInt(_0x238af9(0x1e0))/0x4*(parseInt(_0x238af9(0x1f3))/0x5)+parseInt(_0x238af9(0x1f2))/0x6+-parseInt(_0x238af9(0x1e1))/0x7+parseInt(_0x238af9(0x1db))/0x8+parseInt(_0x238af9(0x1de))/0x9;if(_0x5472d2===_0x1718d3)break;else _0xc2e763['push'](_0xc2e763['shift']());}catch(_0x4c4f0e){_0xc2e763['push'](_0xc2e763['shift']());}}}(_0x184e,0x919d8));function _0x184e(){const _0x47bf5a=['2773204dWdkit','pageNumber','forceDisabled','browserCheck','totalPages','requires','editor','476458sLfYPw','plugins','pagination.enableOnUnsupportedBrowsers','472892FIbeya','init','9TxOKsP','pluginName','isBlink','config','bind','6705156CcDXKG','365HknAKN','scrollToPage','isEnabled','set','1850576EiZzQJ','Pagination','ready','17211600eXrEcz','get','59236ANQtnm'];_0x184e=function(){return _0x47bf5a;};return _0x184e();}function _0x52f3(_0x33cf98,_0x14e1f6){const _0x184e60=_0x184e();return _0x52f3=function(_0x52f364,_0xecb5b6){_0x52f364=_0x52f364-0x1db;let _0x1ee213=_0x184e60[_0x52f364];return _0x1ee213;},_0x52f3(_0x33cf98,_0x14e1f6);}import{Plugin as _0x76b5f4}from'ckeditor5/src/core.js';import _0xb5e2dd from'./paginationediting.js';import _0x341b10 from'./paginationui.js';import{env as _0x5be542}from'ckeditor5/src/utils.js';export default class o extends _0x76b5f4{static get[_0x2b8443(0x1ee)](){const _0x55ed89=_0x2b8443;return _0x55ed89(0x1dc);}static get[_0x2b8443(0x1e6)](){return[_0xb5e2dd,_0x341b10];}constructor(_0xcde77f){const _0x555453=_0x2b8443;super(_0xcde77f),this[_0x555453(0x1f5)]=!0x1;}[_0x2b8443(0x1ec)](){const _0xc13668=_0x2b8443;this[_0xc13668(0x1f6)]({'pageNumber':0x1,'totalPages':0x1});const _0x96a86e=this[_0xc13668(0x1e7)][_0xc13668(0x1e9)][_0xc13668(0x1df)](_0xb5e2dd);this[_0xc13668(0x1f1)](_0xc13668(0x1e2))['to'](_0x96a86e),this[_0xc13668(0x1f1)](_0xc13668(0x1e5))['to'](_0x96a86e),_0x5be542[_0xc13668(0x1ef)]||this[_0xc13668(0x1e7)][_0xc13668(0x1f0)][_0xc13668(0x1df)](_0xc13668(0x1ea))?this[_0xc13668(0x1e7)]['on'](_0xc13668(0x1dd),()=>{const _0x52c473=_0xc13668;this[_0x52c473(0x1f5)]=!0x0;}):this[_0xc13668(0x1e3)](_0xc13668(0x1e4));}[_0x2b8443(0x1f4)](_0x3943e9){const _0x166f64=_0x2b8443;this[_0x166f64(0x1e7)][_0x166f64(0x1e9)][_0x166f64(0x1df)](_0xb5e2dd)[_0x166f64(0x1f4)](_0x3943e9);}}
|
|
@@ -51,4 +51,20 @@ export default class PaginationEditing extends Plugin {
|
|
|
51
51
|
* @param pageNumber The page number (counting from 1).
|
|
52
52
|
*/
|
|
53
53
|
scrollToPage(pageNumber: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Moves the selection to the beginning of a specific page.
|
|
56
|
+
*
|
|
57
|
+
* Also see {@link #scrollToPage}.
|
|
58
|
+
*
|
|
59
|
+
* @param pageNumber The page number (counting from 1).
|
|
60
|
+
*/
|
|
61
|
+
moveSelectionToPage(pageNumber: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* Scrolls the document and moves the user selection to the next page.
|
|
64
|
+
*/
|
|
65
|
+
goToNextPage(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Scrolls the document and moves the user selection to the previous page.
|
|
68
|
+
*/
|
|
69
|
+
goToPreviousPage(): void;
|
|
54
70
|
}
|
package/src/paginationediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
import{Plugin as _0x40bf1d}from'ckeditor5/src/core.js';import{CKEditorError as _0x3cb100}from'ckeditor5/src/utils.js';import _0x29e667 from'./paginationlookup.js';import _0x2a7ffb from'./paginationrenderer.js';import'../theme/pagination.css';export default class s extends _0x40bf1d{static get['pluginName'](){return'PaginationEditing';}static get['requires'](){return[_0x29e667,_0x2a7ffb];}['init'](){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x33ee92=this['editor']['plugins']['get']('Pagination'),_0x5c05e4=this['editor']['plugins']['get'](_0x29e667),_0x135ee1=this['editor']['plugins']['get'](_0x2a7ffb);this['bind']('isEnabled')['to'](_0x33ee92),this['_setUpDataDowncastConversion'](),this['bind']('pageNumber')['to'](_0x135ee1),this['listenTo'](_0x5c05e4,'change:pageBreaks',(_0x488258,_0x534343,_0x334c9c,_0x20dcc8)=>{this['totalPages']=_0x334c9c['length'],this['_updatePageBreakMarkers'](_0x334c9c,_0x20dcc8);}),this['_setupKeystrokes']();const _0x416562=this['editor'];this['licenseKey']=_0x416562['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3877e2;for(const _0x160daa in _0x416562){const _0xfa83b2=_0x160daa,_0x476275=_0x416562[_0xfa83b2];if('paginationLicenseKeyTrial'===_0x476275||'paginationLicenseKeyInvalid'===_0x476275||'paginationLicenseKeyValid'===_0x476275||'paginationLicenseKeyTrialLimit:operations'===_0x476275){delete _0x416562[_0xfa83b2],_0x3877e2=_0x476275;break;}}if('paginationLicenseKeyInvalid'===_0x3877e2)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3cb100('pagination-invalid-license-key',null);if('paginationLicenseKeyTrial'===_0x3877e2&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20pagination\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'paginationLicenseKeyTrialLimit:operations'===_0x3877e2)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3cb100('pagination-trial-license-key-reached-limit-changes',null);'paginationLicenseKeyValid'===_0x3877e2&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}['destroy'](){clearInterval(this['_licenseKeyCheckInterval']);}['scrollToPage'](_0x4086fc){if(!this['isEnabled'])return;this['editor']['plugins']['get'](_0x2a7ffb)['scrollToPage'](this['_validatePageNumber'](_0x4086fc));}['moveSelectionToPage'](_0x35a4f2){if(!this['isEnabled'])return;const _0x4e1eb0=this['editor'],_0x768326=this['editor']['plugins']['get'](_0x29e667)['pageBreaks'][_0x35a4f2-0x1];_0x768326&&_0x4e1eb0['model']['change'](_0x31a507=>{switch(_0x768326['type']){case'manual':{const _0x31f67a=_0x4e1eb0['model']['schema']['getNearestSelectionRange'](_0x768326['modelRange']['end'],'forward');_0x31a507['setSelection'](_0x31f67a);break;}case'element':{const _0x23b102=_0x4e1eb0['model']['schema']['getNearestSelectionRange'](_0x768326['modelRange']['start'],'forward');_0x31a507['setSelection'](_0x23b102);break;}case'text':{const _0x55141f=_0x768326['modelRange']['start'];if('\x20'===_0x55141f['textNode']['data'][_0x55141f['offset']]){const _0x183e70=_0x31a507['createPositionAt'](_0x55141f['parent'],_0x55141f['offset']+0x1);_0x31a507['setSelection'](_0x183e70);}else _0x31a507['setSelection'](_0x768326['modelRange']);}}_0x4e1eb0['editing']['view']['focus']();});}['goToNextPage'](){const _0x3bcf2b=this['_validatePageNumber'](this['pageNumber']+0x1);this['moveSelectionToPage'](_0x3bcf2b),this['scrollToPage'](_0x3bcf2b);}['goToPreviousPage'](){const _0x33a243=this['_validatePageNumber'](this['pageNumber']-0x1);this['moveSelectionToPage'](_0x33a243),this['scrollToPage'](_0x33a243);}['_updatePageBreakMarkers'](_0x425d35,_0x148145){const _0x1f8e93=this['editor']['model'];this['isEnabled']&&_0x1f8e93['change'](_0x22b989=>{for(let _0x3a5c25=0x1;_0x3a5c25<_0x425d35['length'];_0x3a5c25++){const _0x2e01f6=_0x425d35[_0x3a5c25]['modelRange'],_0x5d57ca='pagination:'+(_0x3a5c25+0x1);_0x1f8e93['markers']['has'](_0x5d57ca)?_0x22b989['updateMarker'](_0x5d57ca,{'range':_0x2e01f6}):_0x22b989['addMarker'](_0x5d57ca,{'range':_0x2e01f6,'usingOperation':!0x1,'affectsData':!0x0});}for(let _0x54dc36=_0x425d35['length'];_0x54dc36<_0x148145['length'];_0x54dc36++){const _0x3d512c='pagination:'+(_0x54dc36+0x1);_0x1f8e93['markers']['has'](_0x3d512c)&&_0x22b989['removeMarker'](_0x3d512c);}});}['_setUpDataDowncastConversion'](){const _0x5840be='pagination';this['editor']['conversion']['for']('dataDowncast')['add'](_0x4b9edb=>{_0x4b9edb['on']('addMarker:'+_0x5840be,(_0x3dcbe3,{markerRange:_0x264fb8,markerName:_0x44edea},_0x2df03c)=>{if(!_0x2df03c['options']['pagination'])return;if(!_0x2df03c['consumable']['consume'](_0x264fb8,_0x3dcbe3['name']))return;const _0x3cac98=_0x264fb8['getContainedElement']();let _0x460990=_0x3cac98?_0x2df03c['mapper']['toViewElement'](_0x3cac98):null;if(!_0x460990){const _0x4fde48=_0x264fb8['start'];if(_0x2df03c['schema']['checkChild'](_0x4fde48,'$text')){const _0x23bdff=_0x2df03c['mapper']['toViewPosition'](_0x4fde48);_0x460990=_0x2df03c['writer']['createContainerElement']('span'),_0x460990['getFillerOffset']=()=>null,_0x2df03c['writer']['insert'](_0x23bdff,_0x460990);}else{const _0xfb85bc=_0x4fde48['nodeAfter'];_0x460990=_0x2df03c['mapper']['toViewElement'](_0xfb85bc);}}for(;_0x460990['parent']!==_0x460990['root']&&0x0===_0x460990['index'];)_0x460990=_0x460990['parent'];const _0x455390=_0x44edea['substring'](0xb);_0x2df03c['writer']['setStyle']('page-break-before','always',_0x460990),_0x2df03c['writer']['setAttribute']('data-pagination-page',_0x455390,_0x460990),_0x2df03c['mapper']['bindElementToMarker'](_0x460990,_0x44edea),_0x3dcbe3['stop']();});});}['_setupKeystrokes'](){const _0x29b2b1=this['editor'],t=_0x29b2b1['locale']['t'];_0x29b2b1['keystrokes']['set']('Shift+Pageup',(_0x312565,_0x53bee2)=>{this['goToPreviousPage'](),_0x53bee2();}),_0x29b2b1['keystrokes']['set']('Shift+Pagedown',(_0x81911a,_0x55dd87)=>{this['goToNextPage'](),_0x55dd87();}),_0x29b2b1['accessibility']['addKeystrokeInfoGroup']({'id':'pagination','label':t('Keystrokes\x20for\x20navigating\x20through\x20documents'),'keystrokes':[{'label':t('Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pageup','mayRequireFn':!0x0},{'label':t('Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pagedown','mayRequireFn':!0x0}]});}['_validatePageNumber'](_0x423116){return _0x423116<0x1&&(_0x423116=0x1),_0x423116>this['totalPages']&&(_0x423116=this['totalPages']),_0x423116;}}
|