@ckeditor/ckeditor5-pagination 41.3.1 → 41.4.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 +1 -1
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +72 -0
- package/dist/index.css +158 -0
- package/dist/index.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/ar.umd.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bg.umd.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bn.umd.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/ca.umd.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/cs.umd.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/da.umd.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/de.umd.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/el.umd.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/es.umd.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/et.umd.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fi.umd.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/fr.umd.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/he.umd.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hi.umd.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/hu.umd.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/id.umd.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/it.umd.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ja.umd.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/ko.umd.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lt.umd.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/lv.umd.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/ms.umd.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/nl.umd.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/no.umd.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pl.umd.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt-br.umd.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/pt.umd.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ro.umd.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/ru.umd.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sk.umd.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sr.umd.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/sv.umd.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/th.umd.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tr.umd.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/uk.umd.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/vi.umd.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh-cn.umd.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/translations/zh.umd.js +23 -0
- package/dist/types/augmentation.d.ts +23 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/pagination.d.ts +151 -0
- package/dist/types/paginationediting.d.ts +74 -0
- package/dist/types/paginationlookup.d.ts +62 -0
- package/dist/types/paginationrenderer.d.ts +44 -0
- package/dist/types/paginationui.d.ts +29 -0
- package/dist/types/ui/linesrepository.d.ts +38 -0
- package/dist/types/ui/lineview.d.ts +57 -0
- package/dist/types/ui/pagenavigatorview.d.ts +65 -0
- package/package.json +4 -3
- package/src/index.js +1 -1
- package/src/pagination.js +1 -1
- 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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module pagination/paginationlookup
|
|
11
|
+
*/
|
|
12
|
+
import type { Range } from 'ckeditor5/src/engine.js';
|
|
13
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
+
/**
|
|
15
|
+
* The pagination lookup plugin.
|
|
16
|
+
*/
|
|
17
|
+
export default class PaginationLookup extends Plugin {
|
|
18
|
+
/**
|
|
19
|
+
* List of the page breaks.
|
|
20
|
+
*
|
|
21
|
+
* @observable
|
|
22
|
+
* @default []
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
pageBreaks: Array<PageBreakInfo>;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "PaginationLookup";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
afterInit(): void;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
destroy(): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Single page break information.
|
|
45
|
+
*/
|
|
46
|
+
export declare class PageBreakInfo {
|
|
47
|
+
readonly type: 'manual' | 'element' | 'text';
|
|
48
|
+
readonly modelRange: Range;
|
|
49
|
+
/**
|
|
50
|
+
* Creates PageBreakInfo instance.
|
|
51
|
+
*/
|
|
52
|
+
constructor({ type, modelRange, domNode, offset }: {
|
|
53
|
+
readonly type: PageBreakInfo['type'];
|
|
54
|
+
readonly modelRange: PageBreakInfo['modelRange'];
|
|
55
|
+
readonly domNode: Node;
|
|
56
|
+
readonly offset: number;
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* The top offset in window coordinates.
|
|
60
|
+
*/
|
|
61
|
+
get offset(): number;
|
|
62
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module pagination/paginationrenderer
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The pagination renderer plugin. This plugin renders pagination lines (with numbers) over
|
|
15
|
+
* the editing root of the editor.
|
|
16
|
+
*/
|
|
17
|
+
export default class PaginationRenderer extends Plugin {
|
|
18
|
+
/**
|
|
19
|
+
* The current page number.
|
|
20
|
+
*
|
|
21
|
+
* @observable
|
|
22
|
+
* @default 1
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
pageNumber: number;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "PaginationRenderer";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
destroy(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Scroll the editor content to a desired page.
|
|
40
|
+
*
|
|
41
|
+
* @param pageNumber The page number (counting from 1).
|
|
42
|
+
*/
|
|
43
|
+
scrollToPage(pageNumber: number): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module pagination/paginationui
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The pagination UI plugin. It introduces:
|
|
15
|
+
*
|
|
16
|
+
* * The `'pageNavigation'` UI view,
|
|
17
|
+
* * The `'nextPage'` UI button,
|
|
18
|
+
* * The `'previousPage'` UI button.
|
|
19
|
+
*/
|
|
20
|
+
export default class PaginationUI extends Plugin {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get pluginName(): "PaginationUI";
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
init(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module pagination/ui/linesrepository
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* Helper class for managing the page break lines.
|
|
15
|
+
*/
|
|
16
|
+
export default class LinesRepository {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new lines repository instance.
|
|
19
|
+
*/
|
|
20
|
+
constructor(editor: Editor);
|
|
21
|
+
/**
|
|
22
|
+
* Destroys the lines repository instance.
|
|
23
|
+
*/
|
|
24
|
+
destroy(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Hides all lines.
|
|
27
|
+
*/
|
|
28
|
+
cleanLines(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Shows a line at specified page coordinates.
|
|
31
|
+
*
|
|
32
|
+
* @param left
|
|
33
|
+
* @param top
|
|
34
|
+
* @param width
|
|
35
|
+
* @param pageNumber The page number (line label).
|
|
36
|
+
*/
|
|
37
|
+
showLine(left: number, top: number, width: number, pageNumber: number): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module pagination/ui/lineview
|
|
11
|
+
*/
|
|
12
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
13
|
+
import '../../theme/line.css';
|
|
14
|
+
/**
|
|
15
|
+
* The page break line view.
|
|
16
|
+
*/
|
|
17
|
+
export default class LineView extends View {
|
|
18
|
+
/**
|
|
19
|
+
* Controls whether the line is visible.
|
|
20
|
+
*
|
|
21
|
+
* @observable
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
isVisible: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Controls the line position x coordinate.
|
|
27
|
+
*
|
|
28
|
+
* @observable
|
|
29
|
+
* @default null
|
|
30
|
+
*/
|
|
31
|
+
left: number | null;
|
|
32
|
+
/**
|
|
33
|
+
* Controls the line width.
|
|
34
|
+
*
|
|
35
|
+
* @observable
|
|
36
|
+
* @default null
|
|
37
|
+
*/
|
|
38
|
+
width: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Controls the line label.
|
|
41
|
+
*
|
|
42
|
+
* @observable
|
|
43
|
+
* @default null
|
|
44
|
+
*/
|
|
45
|
+
pageNumber: number | null;
|
|
46
|
+
/**
|
|
47
|
+
* Controls the line position y coordinate.
|
|
48
|
+
*
|
|
49
|
+
* @observable
|
|
50
|
+
* @default null
|
|
51
|
+
*/
|
|
52
|
+
top: number | null;
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
constructor();
|
|
57
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module pagination/ui/pagenavigatorview
|
|
11
|
+
*/
|
|
12
|
+
import { View, InputNumberView } from 'ckeditor5/src/ui.js';
|
|
13
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
14
|
+
import '../../theme/pagenavigator.css';
|
|
15
|
+
/**
|
|
16
|
+
* The page navigation UI element.
|
|
17
|
+
*/
|
|
18
|
+
export default class PageNavigatorView extends View {
|
|
19
|
+
/**
|
|
20
|
+
* The current page number.
|
|
21
|
+
*
|
|
22
|
+
* @observable
|
|
23
|
+
* @default 1
|
|
24
|
+
*/
|
|
25
|
+
pageNumber: number;
|
|
26
|
+
/**
|
|
27
|
+
* The total page count.
|
|
28
|
+
*
|
|
29
|
+
* @observable
|
|
30
|
+
* @default 1
|
|
31
|
+
*/
|
|
32
|
+
totalPages: number;
|
|
33
|
+
/**
|
|
34
|
+
* Controls whether the component is enabled.
|
|
35
|
+
*
|
|
36
|
+
* @observable
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
isEnabled: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* An instance of the input number view to type a new page number.
|
|
42
|
+
*/
|
|
43
|
+
pageNumberView: InputNumberView;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
constructor(locale: Locale);
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
render(): void;
|
|
52
|
+
/**
|
|
53
|
+
* @inheritDoc
|
|
54
|
+
*/
|
|
55
|
+
focus(): void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* An event fired after {@link module:pagination/ui/pagenavigatorview~PageNavigatorView#pageNumberView} value is updated.
|
|
59
|
+
*
|
|
60
|
+
* @eventName ~PageNavigatorView#navigation
|
|
61
|
+
*/
|
|
62
|
+
export type PaginationNavigationEvent = {
|
|
63
|
+
name: 'navigation';
|
|
64
|
+
args: [pageNumber: number];
|
|
65
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-pagination",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.4.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.
|
|
16
|
-
"ckeditor5": "41.
|
|
15
|
+
"@ckeditor/ckeditor5-theme-lark": "41.4.0",
|
|
16
|
+
"ckeditor5": "41.4.0",
|
|
17
17
|
"lodash-es": "4.17.21"
|
|
18
18
|
},
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -21,6 +21,7 @@
|
|
|
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",
|
|
24
25
|
"lang",
|
|
25
26
|
"src/**/*.js",
|
|
26
27
|
"src/**/*.d.ts",
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x1fba57,_0x170946){var _0x37de56=_0x5ee5,_0x2ce4a0=_0x1fba57();while(!![]){try{var _0x48a73f=parseInt(_0x37de56(0x1b1))/0x1*(-parseInt(_0x37de56(0x1af))/0x2)+parseInt(_0x37de56(0x1ad))/0x3*(parseInt(_0x37de56(0x1b2))/0x4)+parseInt(_0x37de56(0x1b3))/0x5*(parseInt(_0x37de56(0x1ae))/0x6)+parseInt(_0x37de56(0x1ab))/0x7+-parseInt(_0x37de56(0x1b5))/0x8+parseInt(_0x37de56(0x1ac))/0x9+-parseInt(_0x37de56(0x1b0))/0xa*(parseInt(_0x37de56(0x1b4))/0xb);if(_0x48a73f===_0x170946)break;else _0x2ce4a0['push'](_0x2ce4a0['shift']());}catch(_0x266195){_0x2ce4a0['push'](_0x2ce4a0['shift']());}}}(_0x403b,0xedd2f));export{default as Pagination}from'./pagination.js';function _0x403b(){var _0x3a6915=['82IZZVuh','23108770AxcaQR','5802LENflW','747112frlOMr','2105140svRdru','11lxLWtq','7324488kygMUo','12898921KcqlrK','7378182XqXdVP','15IVOnBx','12JKspQd'];_0x403b=function(){return _0x3a6915;};return _0x403b();}function _0x5ee5(_0x3f059d,_0x197957){var _0x403b8b=_0x403b();return _0x5ee5=function(_0x5ee570,_0x386172){_0x5ee570=_0x5ee570-0x1ab;var _0x21c6cc=_0x403b8b[_0x5ee570];return _0x21c6cc;},_0x5ee5(_0x3f059d,_0x197957);}import'./augmentation.js';
|
package/src/pagination.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x149206=_0x6393;(function(_0x3628f0,_0x2af65b){const _0x1132d2=_0x6393,_0x1ac0b3=_0x3628f0();while(!![]){try{const _0x361369=-parseInt(_0x1132d2(0x158))/0x1*(-parseInt(_0x1132d2(0x159))/0x2)+parseInt(_0x1132d2(0x163))/0x3+-parseInt(_0x1132d2(0x16b))/0x4*(parseInt(_0x1132d2(0x16e))/0x5)+parseInt(_0x1132d2(0x155))/0x6*(-parseInt(_0x1132d2(0x15a))/0x7)+-parseInt(_0x1132d2(0x152))/0x8*(-parseInt(_0x1132d2(0x154))/0x9)+-parseInt(_0x1132d2(0x157))/0xa*(-parseInt(_0x1132d2(0x14f))/0xb)+-parseInt(_0x1132d2(0x16c))/0xc*(-parseInt(_0x1132d2(0x168))/0xd);if(_0x361369===_0x2af65b)break;else _0x1ac0b3['push'](_0x1ac0b3['shift']());}catch(_0x4dfa10){_0x1ac0b3['push'](_0x1ac0b3['shift']());}}}(_0x35fb,0xcce57));import{Plugin as _0x5215cc}from'ckeditor5/src/core.js';function _0x6393(_0x53c5f1,_0x3e6d76){const _0x35fbf2=_0x35fb();return _0x6393=function(_0x6393da,_0x1befec){_0x6393da=_0x6393da-0x14f;let _0x1b0873=_0x35fbf2[_0x6393da];return _0x1b0873;},_0x6393(_0x53c5f1,_0x3e6d76);}import _0xb45270 from'./paginationediting.js';import _0x373a7b from'./paginationui.js';function _0x35fb(){const _0x3b69f2=['pluginName','browserCheck','3384UvuqLi','3252Betsqi','editor','5585tTnycu','110qguXsc','requires','isBlink','667064Dcqwta','bind','45jMnWpM','6EQeaYP','pageNumber','683510ODzrIy','30298QhDVQI','40HCnhcx','6234977OeAvtp','forceDisabled','get','totalPages','ready','scrollToPage','set','Pagination','pagination.enableOnUnsupportedBrowsers','135798ymdFQy','config','isEnabled','init','plugins','44291cPOqYF'];_0x35fb=function(){return _0x3b69f2;};return _0x35fb();}import{env as _0x20622f}from'ckeditor5/src/utils.js';export default class o extends _0x5215cc{static get[_0x149206(0x169)](){const _0x40576a=_0x149206;return _0x40576a(0x161);}static get[_0x149206(0x150)](){return[_0xb45270,_0x373a7b];}constructor(_0x31a4a7){const _0x4efe9a=_0x149206;super(_0x31a4a7),this[_0x4efe9a(0x165)]=!0x1;}[_0x149206(0x166)](){const _0x45f9d3=_0x149206;this[_0x45f9d3(0x160)]({'pageNumber':0x1,'totalPages':0x1});const _0x30b2f6=this[_0x45f9d3(0x16d)][_0x45f9d3(0x167)][_0x45f9d3(0x15c)](_0xb45270);this[_0x45f9d3(0x153)](_0x45f9d3(0x156))['to'](_0x30b2f6),this[_0x45f9d3(0x153)](_0x45f9d3(0x15d))['to'](_0x30b2f6),_0x20622f[_0x45f9d3(0x151)]||this[_0x45f9d3(0x16d)][_0x45f9d3(0x164)][_0x45f9d3(0x15c)](_0x45f9d3(0x162))?this[_0x45f9d3(0x16d)]['on'](_0x45f9d3(0x15e),()=>{const _0x1f51ba=_0x45f9d3;this[_0x1f51ba(0x165)]=!0x0;}):this[_0x45f9d3(0x15b)](_0x45f9d3(0x16a));}[_0x149206(0x15f)](_0x480d1f){const _0x2755ea=_0x149206;this[_0x2755ea(0x16d)][_0x2755ea(0x167)][_0x2755ea(0x15c)](_0xb45270)[_0x2755ea(0x15f)](_0x480d1f);}}
|
package/src/paginationediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x4085a7}from'ckeditor5/src/core.js';import{CKEditorError as _0x23cdd2}from'ckeditor5/src/utils.js';import _0x4e1079 from'./paginationlookup.js';import _0x4e513e from'./paginationrenderer.js';import'../theme/pagination.css';export default class s extends _0x4085a7{static get['pluginName'](){return'PaginationEditing';}static get['requires'](){return[_0x4e1079,_0x4e513e];}['init'](){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x117b52=this['editor']['plugins']['get']('Pagination'),_0x2274c2=this['editor']['plugins']['get'](_0x4e1079),_0x21aafb=this['editor']['plugins']['get'](_0x4e513e);this['bind']('isEnabled')['to'](_0x117b52),this['_setUpDataDowncastConversion'](),this['bind']('pageNumber')['to'](_0x21aafb),this['listenTo'](_0x2274c2,'change:pageBreaks',(_0x5553eb,_0xf25fec,_0x526afe,_0x354418)=>{this['totalPages']=_0x526afe['length'],this['_updatePageBreakMarkers'](_0x526afe,_0x354418);}),this['_setupKeystrokes']();const _0x2e038c=this['editor'];this['licenseKey']=_0x2e038c['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2f77e2;for(const _0x491a58 in _0x2e038c){const _0x4abecf=_0x491a58,_0x326e19=_0x2e038c[_0x4abecf];if('paginationLicenseKeyTrial'===_0x326e19||'paginationLicenseKeyInvalid'===_0x326e19||'paginationLicenseKeyValid'===_0x326e19||'paginationLicenseKeyTrialLimit:operations'===_0x326e19){delete _0x2e038c[_0x4abecf],_0x2f77e2=_0x326e19;break;}}if('paginationLicenseKeyInvalid'===_0x2f77e2)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x23cdd2('pagination-invalid-license-key',null);if('paginationLicenseKeyTrial'===_0x2f77e2&&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'===_0x2f77e2)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x23cdd2('pagination-trial-license-key-reached-limit-changes',null);'paginationLicenseKeyValid'===_0x2f77e2&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}['destroy'](){clearInterval(this['_licenseKeyCheckInterval']);}['scrollToPage'](_0x4fc5d5){if(!this['isEnabled'])return;this['editor']['plugins']['get'](_0x4e513e)['scrollToPage'](this['_validatePageNumber'](_0x4fc5d5));}['moveSelectionToPage'](_0x20e635){if(!this['isEnabled'])return;const _0x2e55c8=this['editor'],_0x2da359=this['editor']['plugins']['get'](_0x4e1079)['pageBreaks'][_0x20e635-0x1];_0x2da359&&_0x2e55c8['model']['change'](_0x27ce8a=>{switch(_0x2da359['type']){case'manual':{const _0x4639a7=_0x2e55c8['model']['schema']['getNearestSelectionRange'](_0x2da359['modelRange']['end'],'forward');_0x27ce8a['setSelection'](_0x4639a7);break;}case'element':{const _0xe6a3d2=_0x2e55c8['model']['schema']['getNearestSelectionRange'](_0x2da359['modelRange']['start'],'forward');_0x27ce8a['setSelection'](_0xe6a3d2);break;}case'text':{const _0x2b7f1b=_0x2da359['modelRange']['start'];if('\x20'===_0x2b7f1b['textNode']['data'][_0x2b7f1b['offset']]){const _0x5de44b=_0x27ce8a['createPositionAt'](_0x2b7f1b['parent'],_0x2b7f1b['offset']+0x1);_0x27ce8a['setSelection'](_0x5de44b);}else _0x27ce8a['setSelection'](_0x2da359['modelRange']);}}_0x2e55c8['editing']['view']['focus']();});}['goToNextPage'](){const _0x26dc8d=this['_validatePageNumber'](this['pageNumber']+0x1);this['moveSelectionToPage'](_0x26dc8d),this['scrollToPage'](_0x26dc8d);}['goToPreviousPage'](){const _0x17cb26=this['_validatePageNumber'](this['pageNumber']-0x1);this['moveSelectionToPage'](_0x17cb26),this['scrollToPage'](_0x17cb26);}['_updatePageBreakMarkers'](_0x55c28e,_0x4a9d31){const _0x3fc5c7=this['editor']['model'];this['isEnabled']&&_0x3fc5c7['change'](_0x5757a0=>{for(let _0x398a77=0x1;_0x398a77<_0x55c28e['length'];_0x398a77++){const _0x215682=_0x55c28e[_0x398a77]['modelRange'],_0x4c8e2b='pagination:'+(_0x398a77+0x1);_0x3fc5c7['markers']['has'](_0x4c8e2b)?_0x5757a0['updateMarker'](_0x4c8e2b,{'range':_0x215682}):_0x5757a0['addMarker'](_0x4c8e2b,{'range':_0x215682,'usingOperation':!0x1,'affectsData':!0x0});}for(let _0x13f31f=_0x55c28e['length'];_0x13f31f<_0x4a9d31['length'];_0x13f31f++){const _0x9a7a89='pagination:'+(_0x13f31f+0x1);_0x3fc5c7['markers']['has'](_0x9a7a89)&&_0x5757a0['removeMarker'](_0x9a7a89);}});}['_setUpDataDowncastConversion'](){const _0x45053f='pagination';this['editor']['conversion']['for']('dataDowncast')['add'](_0x3625ae=>{_0x3625ae['on']('addMarker:'+_0x45053f,(_0x50fffc,{markerRange:_0x504316,markerName:_0x2ca183},_0xdb4793)=>{if(!_0xdb4793['options']['pagination'])return;if(!_0xdb4793['consumable']['consume'](_0x504316,_0x50fffc['name']))return;const _0x56f857=_0x504316['getContainedElement']();let _0x24832b=_0x56f857?_0xdb4793['mapper']['toViewElement'](_0x56f857):null;if(!_0x24832b){const _0xad1aea=_0x504316['start'];if(_0xdb4793['schema']['checkChild'](_0xad1aea,'$text')){const _0x519ca4=_0xdb4793['mapper']['toViewPosition'](_0xad1aea);_0x24832b=_0xdb4793['writer']['createContainerElement']('span'),_0x24832b['getFillerOffset']=()=>null,_0xdb4793['writer']['insert'](_0x519ca4,_0x24832b);}else{const _0x71acfb=_0xad1aea['nodeAfter'];_0x24832b=_0xdb4793['mapper']['toViewElement'](_0x71acfb);}}for(;_0x24832b['parent']!==_0x24832b['root']&&0x0===_0x24832b['index'];)_0x24832b=_0x24832b['parent'];const _0x11175e=_0x2ca183['substring'](0xb);_0xdb4793['writer']['setStyle']('page-break-before','always',_0x24832b),_0xdb4793['writer']['setAttribute']('data-pagination-page',_0x11175e,_0x24832b),_0xdb4793['mapper']['bindElementToMarker'](_0x24832b,_0x2ca183),_0x50fffc['stop']();});});}['_setupKeystrokes'](){const _0x390b27=this['editor'],t=_0x390b27['locale']['t'];_0x390b27['keystrokes']['set']('Shift+Pageup',(_0x1c0792,_0x126057)=>{this['goToPreviousPage'](),_0x126057();}),_0x390b27['keystrokes']['set']('Shift+Pagedown',(_0x2b9d5e,_0x372b3a)=>{this['goToNextPage'](),_0x372b3a();}),_0x390b27['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'](_0x13f39a){return _0x13f39a<0x1&&(_0x13f39a=0x1),_0x13f39a>this['totalPages']&&(_0x13f39a=this['totalPages']),_0x13f39a;}}
|