@progress/kendo-pdfviewer-common 0.3.0-dev.202409251459 → 0.3.0-dev.202410100645
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/dist/es/annotations/annotation-editor-layer-builder.js +139 -0
- package/dist/es/annotations/annotation-editor-layer.js +780 -0
- package/dist/es/annotations/annotation-editor-ui-manager.js +1690 -0
- package/dist/es/annotations/annotation-layer-builder.js +217 -0
- package/dist/es/annotations/annotation-layer.js +2793 -0
- package/dist/es/annotations/draw-layer-builder.js +65 -0
- package/dist/es/annotations/draw-layer.js +220 -0
- package/dist/es/annotations/editors/annotation-editor.js +1519 -0
- package/dist/es/annotations/editors/free-text-editor.js +783 -0
- package/dist/es/annotations/editors/highlight-editor.js +717 -0
- package/dist/es/annotations/editors/outliner.js +747 -0
- package/dist/es/annotations/helpers/annotation-storage.js +294 -0
- package/dist/es/annotations/helpers/color-manager.js +72 -0
- package/dist/es/annotations/helpers/command-manager.js +133 -0
- package/dist/es/annotations/helpers/id-manager.js +34 -0
- package/dist/es/annotations/helpers/image-manager.js +176 -0
- package/dist/es/annotations/helpers/text-accessibility-manager.js +212 -0
- package/dist/es/annotations/helpers/tools.js +19 -0
- package/dist/es/annotations/shared/display_utils.js +1024 -0
- package/dist/es/annotations/shared/event_utils.js +213 -0
- package/dist/es/annotations/shared/murmurhash3.js +126 -0
- package/dist/es/annotations/shared/scripting_utils.js +90 -0
- package/dist/es/annotations/shared/ui_utils.js +823 -0
- package/dist/es/annotations/shared/utils.js +909 -0
- package/dist/es/common/component.js +33 -0
- package/dist/es/common/core.js +91 -0
- package/dist/es/common/dom.js +11 -0
- package/dist/es/common/main.js +4 -0
- package/dist/es/common/math.js +1 -0
- package/dist/es/enums/PdfViewerInteractionMode.js +6 -0
- package/dist/es/links/link-service.js +505 -0
- package/dist/es/main.js +2 -0
- package/dist/es/scroller.js +29 -30
- package/dist/es/text/text-layer-builder.js +288 -0
- package/dist/es/utils.js +5 -5
- package/dist/es/widget/page.js +762 -0
- package/dist/es/widget/pdfviewer.js +1659 -0
- package/dist/es2015/annotations/annotation-editor-layer-builder.js +139 -0
- package/dist/es2015/annotations/annotation-editor-layer.js +780 -0
- package/dist/es2015/annotations/annotation-editor-ui-manager.js +1690 -0
- package/dist/es2015/annotations/annotation-layer-builder.js +217 -0
- package/dist/es2015/annotations/annotation-layer.js +2793 -0
- package/dist/es2015/annotations/draw-layer-builder.js +65 -0
- package/dist/es2015/annotations/draw-layer.js +220 -0
- package/dist/es2015/annotations/editors/annotation-editor.js +1519 -0
- package/dist/es2015/annotations/editors/free-text-editor.js +783 -0
- package/dist/es2015/annotations/editors/highlight-editor.js +717 -0
- package/dist/es2015/annotations/editors/outliner.js +747 -0
- package/dist/es2015/annotations/helpers/annotation-storage.js +294 -0
- package/dist/es2015/annotations/helpers/color-manager.js +72 -0
- package/dist/es2015/annotations/helpers/command-manager.js +133 -0
- package/dist/es2015/annotations/helpers/id-manager.js +34 -0
- package/dist/es2015/annotations/helpers/image-manager.js +176 -0
- package/dist/es2015/annotations/helpers/text-accessibility-manager.js +212 -0
- package/dist/es2015/annotations/helpers/tools.js +19 -0
- package/dist/es2015/annotations/shared/display_utils.js +1024 -0
- package/dist/es2015/annotations/shared/event_utils.js +213 -0
- package/dist/es2015/annotations/shared/murmurhash3.js +126 -0
- package/dist/es2015/annotations/shared/scripting_utils.js +90 -0
- package/dist/es2015/annotations/shared/ui_utils.js +823 -0
- package/dist/es2015/annotations/shared/utils.js +909 -0
- package/dist/es2015/common/component.js +33 -0
- package/dist/es2015/common/core.js +91 -0
- package/dist/es2015/common/dom.js +11 -0
- package/dist/es2015/common/main.js +4 -0
- package/dist/es2015/common/math.js +1 -0
- package/dist/es2015/enums/PdfViewerInteractionMode.js +6 -0
- package/dist/es2015/links/link-service.js +505 -0
- package/dist/es2015/main.js +2 -0
- package/dist/es2015/scroller.js +29 -30
- package/dist/es2015/text/text-layer-builder.js +288 -0
- package/dist/es2015/utils.js +5 -5
- package/dist/es2015/widget/page.js +762 -0
- package/dist/es2015/widget/pdfviewer.js +1659 -0
- package/dist/npm/annotations/annotation-editor-layer-builder.d.ts +39 -0
- package/dist/npm/annotations/annotation-editor-layer-builder.js +142 -0
- package/dist/npm/annotations/annotation-editor-layer.d.ts +196 -0
- package/dist/npm/annotations/annotation-editor-layer.js +783 -0
- package/dist/npm/annotations/annotation-editor-ui-manager.d.ts +281 -0
- package/dist/npm/annotations/annotation-editor-ui-manager.js +1694 -0
- package/dist/npm/annotations/annotation-layer-builder.d.ts +58 -0
- package/dist/npm/annotations/annotation-layer-builder.js +220 -0
- package/dist/npm/annotations/annotation-layer.d.ts +134 -0
- package/dist/npm/annotations/annotation-layer.js +2794 -0
- package/dist/npm/annotations/draw-layer-builder.d.ts +21 -0
- package/dist/npm/annotations/draw-layer-builder.js +68 -0
- package/dist/npm/annotations/draw-layer.d.ts +33 -0
- package/dist/npm/annotations/draw-layer.js +223 -0
- package/dist/npm/annotations/editors/annotation-editor.d.ts +349 -0
- package/dist/npm/annotations/editors/annotation-editor.js +1523 -0
- package/dist/npm/annotations/editors/free-text-editor.d.ts +108 -0
- package/dist/npm/annotations/editors/free-text-editor.js +786 -0
- package/dist/npm/annotations/editors/highlight-editor.d.ts +114 -0
- package/dist/npm/annotations/editors/highlight-editor.js +717 -0
- package/dist/npm/annotations/editors/outliner.d.ts +51 -0
- package/dist/npm/annotations/editors/outliner.js +750 -0
- package/dist/npm/annotations/helpers/annotation-storage.d.ts +98 -0
- package/dist/npm/annotations/helpers/annotation-storage.js +299 -0
- package/dist/npm/annotations/helpers/color-manager.d.ts +6 -0
- package/dist/npm/annotations/helpers/color-manager.js +76 -0
- package/dist/npm/annotations/helpers/command-manager.d.ts +42 -0
- package/dist/npm/annotations/helpers/command-manager.js +137 -0
- package/dist/npm/annotations/helpers/id-manager.d.ts +6 -0
- package/dist/npm/annotations/helpers/id-manager.js +38 -0
- package/dist/npm/annotations/helpers/image-manager.d.ts +18 -0
- package/dist/npm/annotations/helpers/image-manager.js +180 -0
- package/dist/npm/annotations/helpers/text-accessibility-manager.d.ts +36 -0
- package/dist/npm/annotations/helpers/text-accessibility-manager.js +215 -0
- package/dist/npm/annotations/helpers/tools.d.ts +1 -0
- package/dist/npm/annotations/helpers/tools.js +23 -0
- package/dist/npm/annotations/shared/display_utils.d.ts +6 -0
- package/dist/npm/annotations/shared/display_utils.js +1030 -0
- package/dist/npm/annotations/shared/event_utils.d.ts +33 -0
- package/dist/npm/annotations/shared/event_utils.js +165 -0
- package/dist/npm/annotations/shared/murmurhash3.d.ts +8 -0
- package/dist/npm/annotations/shared/murmurhash3.js +129 -0
- package/dist/npm/annotations/shared/scripting_utils.d.ts +17 -0
- package/dist/npm/annotations/shared/scripting_utils.js +93 -0
- package/dist/npm/annotations/shared/ui_utils.d.ts +54 -0
- package/dist/npm/annotations/shared/ui_utils.js +250 -0
- package/dist/npm/annotations/shared/utils.d.ts +148 -0
- package/dist/npm/annotations/shared/utils.js +872 -0
- package/dist/npm/common/component.d.ts +9 -0
- package/dist/npm/common/component.js +37 -0
- package/dist/npm/common/core.d.ts +18 -0
- package/dist/npm/common/core.js +112 -0
- package/dist/npm/common/dom.d.ts +3 -0
- package/dist/npm/common/dom.js +17 -0
- package/dist/npm/common/main.d.ts +4 -0
- package/dist/npm/common/main.js +7 -0
- package/dist/npm/common/math.d.ts +1 -0
- package/dist/npm/common/math.js +5 -0
- package/dist/npm/enums/PdfViewerInteractionMode.d.ts +4 -0
- package/dist/npm/enums/PdfViewerInteractionMode.js +9 -0
- package/dist/npm/links/link-service.d.ts +116 -0
- package/dist/npm/links/link-service.js +501 -0
- package/dist/npm/main.d.ts +2 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/scroller.d.ts +7 -3
- package/dist/npm/scroller.js +32 -32
- package/dist/npm/text/text-layer-builder.d.ts +30 -0
- package/dist/npm/text/text-layer-builder.js +291 -0
- package/dist/npm/utils.d.ts +20 -2
- package/dist/npm/utils.js +11 -8
- package/dist/npm/widget/page.d.ts +75 -0
- package/dist/npm/widget/page.js +763 -0
- package/dist/npm/widget/pdfviewer.d.ts +222 -0
- package/dist/npm/widget/pdfviewer.js +1663 -0
- package/package.json +13 -9
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
|
|
2
|
+
/** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
|
|
3
|
+
/** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
|
|
4
|
+
/** @typedef {import("./text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
|
|
5
|
+
/** @typedef {import("./interfaces").IL10n} IL10n */
|
|
6
|
+
/** @typedef {import("../src/display/annotation_layer.js").AnnotationLayer} AnnotationLayer */
|
|
7
|
+
import { AnnotationEditorLayer } from "./annotation-editor-layer";
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} AnnotationEditorLayerBuilderOptions
|
|
10
|
+
* @property {AnnotationEditorUIManager} [uiManager]
|
|
11
|
+
* @property {PDFPageProxy} pdfPage
|
|
12
|
+
* @property {IL10n} [l10n]
|
|
13
|
+
* @property {TextAccessibilityManager} [accessibilityManager]
|
|
14
|
+
* @property {AnnotationLayer} [annotationLayer]
|
|
15
|
+
* @property {TextLayer} [textLayer]
|
|
16
|
+
* @property {DrawLayer} [drawLayer]
|
|
17
|
+
* @property {function} [onAppend]
|
|
18
|
+
*/
|
|
19
|
+
declare class AnnotationEditorLayerBuilder {
|
|
20
|
+
#private;
|
|
21
|
+
pdfPage: any;
|
|
22
|
+
annotationEditorLayer: AnnotationEditorLayer;
|
|
23
|
+
_cancelled: any;
|
|
24
|
+
div: any;
|
|
25
|
+
accessibilityManager: any;
|
|
26
|
+
/**
|
|
27
|
+
* @param {AnnotationEditorLayerBuilderOptions} options
|
|
28
|
+
*/
|
|
29
|
+
constructor(options: any);
|
|
30
|
+
/**
|
|
31
|
+
* @param {PageViewport} viewport
|
|
32
|
+
* @param {string} intent (default value is 'display')
|
|
33
|
+
*/
|
|
34
|
+
render(viewport: any, intent?: string): Promise<void>;
|
|
35
|
+
cancel(): void;
|
|
36
|
+
hide(): void;
|
|
37
|
+
show(): void;
|
|
38
|
+
}
|
|
39
|
+
export { AnnotationEditorLayerBuilder };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Copyright 2022 Mozilla Foundation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
var _AnnotationEditorLayerBuilder_annotationLayer, _AnnotationEditorLayerBuilder_drawLayer, _AnnotationEditorLayerBuilder_onAppend, _AnnotationEditorLayerBuilder_textLayer, _AnnotationEditorLayerBuilder_uiManager;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AnnotationEditorLayerBuilder = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
/** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
|
|
21
|
+
// eslint-disable-next-line max-len
|
|
22
|
+
/** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
|
|
23
|
+
// eslint-disable-next-line max-len
|
|
24
|
+
/** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
|
|
25
|
+
// eslint-disable-next-line max-len
|
|
26
|
+
/** @typedef {import("./text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
|
|
27
|
+
/** @typedef {import("./interfaces").IL10n} IL10n */
|
|
28
|
+
// eslint-disable-next-line max-len
|
|
29
|
+
/** @typedef {import("../src/display/annotation_layer.js").AnnotationLayer} AnnotationLayer */
|
|
30
|
+
const annotation_editor_layer_1 = require("./annotation-editor-layer");
|
|
31
|
+
// import { GenericL10n } from "web-null_l10n";
|
|
32
|
+
/**
|
|
33
|
+
* @typedef {Object} AnnotationEditorLayerBuilderOptions
|
|
34
|
+
* @property {AnnotationEditorUIManager} [uiManager]
|
|
35
|
+
* @property {PDFPageProxy} pdfPage
|
|
36
|
+
* @property {IL10n} [l10n]
|
|
37
|
+
* @property {TextAccessibilityManager} [accessibilityManager]
|
|
38
|
+
* @property {AnnotationLayer} [annotationLayer]
|
|
39
|
+
* @property {TextLayer} [textLayer]
|
|
40
|
+
* @property {DrawLayer} [drawLayer]
|
|
41
|
+
* @property {function} [onAppend]
|
|
42
|
+
*/
|
|
43
|
+
class AnnotationEditorLayerBuilder {
|
|
44
|
+
/**
|
|
45
|
+
* @param {AnnotationEditorLayerBuilderOptions} options
|
|
46
|
+
*/
|
|
47
|
+
constructor(options) {
|
|
48
|
+
// todo: props
|
|
49
|
+
this.pdfPage = null;
|
|
50
|
+
this.annotationEditorLayer = null;
|
|
51
|
+
this._cancelled = null;
|
|
52
|
+
this.div = null;
|
|
53
|
+
this.accessibilityManager = null;
|
|
54
|
+
// todo: props
|
|
55
|
+
_AnnotationEditorLayerBuilder_annotationLayer.set(this, null);
|
|
56
|
+
_AnnotationEditorLayerBuilder_drawLayer.set(this, null);
|
|
57
|
+
_AnnotationEditorLayerBuilder_onAppend.set(this, null);
|
|
58
|
+
_AnnotationEditorLayerBuilder_textLayer.set(this, null);
|
|
59
|
+
_AnnotationEditorLayerBuilder_uiManager.set(this, null);
|
|
60
|
+
this.pdfPage = options.pdfPage;
|
|
61
|
+
this.accessibilityManager = options.accessibilityManager;
|
|
62
|
+
// this.l10n = options.l10n;
|
|
63
|
+
// if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|
64
|
+
// this.l10n ||= new GenericL10n();
|
|
65
|
+
// }
|
|
66
|
+
this.annotationEditorLayer = null;
|
|
67
|
+
this.div = null;
|
|
68
|
+
this._cancelled = false;
|
|
69
|
+
tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_uiManager, options.uiManager, "f");
|
|
70
|
+
tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_annotationLayer, options.annotationLayer || null, "f");
|
|
71
|
+
tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_textLayer, options.textLayer || null, "f");
|
|
72
|
+
tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_drawLayer, options.drawLayer || null, "f");
|
|
73
|
+
tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_onAppend, options.onAppend || null, "f");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @param {PageViewport} viewport
|
|
77
|
+
* @param {string} intent (default value is 'display')
|
|
78
|
+
*/
|
|
79
|
+
render(viewport_1) {
|
|
80
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (viewport, intent = "display") {
|
|
81
|
+
var _a;
|
|
82
|
+
if (intent !== "display") {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (this._cancelled) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const clonedViewport = viewport.clone({ dontFlip: true });
|
|
89
|
+
if (this.div) {
|
|
90
|
+
this.annotationEditorLayer.update({ viewport: clonedViewport });
|
|
91
|
+
this.show();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
// Create an AnnotationEditor layer div
|
|
95
|
+
const div = (this.div = document.createElement("div"));
|
|
96
|
+
div.className = "k-annotation-editor-layer annotationEditorLayer";
|
|
97
|
+
div.hidden = true;
|
|
98
|
+
div.dir = tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_uiManager, "f").direction;
|
|
99
|
+
(_a = tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_onAppend, "f")) === null || _a === void 0 ? void 0 : _a.call(this, div);
|
|
100
|
+
this.annotationEditorLayer = new annotation_editor_layer_1.AnnotationEditorLayer({
|
|
101
|
+
uiManager: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_uiManager, "f"),
|
|
102
|
+
div,
|
|
103
|
+
accessibilityManager: this.accessibilityManager,
|
|
104
|
+
pageIndex: this.pdfPage.pageNumber - 1,
|
|
105
|
+
// l10n: this.l10n,
|
|
106
|
+
viewport: clonedViewport,
|
|
107
|
+
annotationLayer: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_annotationLayer, "f"),
|
|
108
|
+
textLayer: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_textLayer, "f"),
|
|
109
|
+
drawLayer: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_drawLayer, "f"),
|
|
110
|
+
});
|
|
111
|
+
const parameters = {
|
|
112
|
+
viewport: clonedViewport,
|
|
113
|
+
div,
|
|
114
|
+
annotations: null,
|
|
115
|
+
intent,
|
|
116
|
+
};
|
|
117
|
+
this.annotationEditorLayer.render(parameters);
|
|
118
|
+
this.show();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
cancel() {
|
|
122
|
+
this._cancelled = true;
|
|
123
|
+
if (!this.div) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
this.annotationEditorLayer.destroy();
|
|
127
|
+
}
|
|
128
|
+
hide() {
|
|
129
|
+
if (!this.div) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.div.hidden = true;
|
|
133
|
+
}
|
|
134
|
+
show() {
|
|
135
|
+
if (!this.div || this.annotationEditorLayer.isInvisible) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
this.div.hidden = false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.AnnotationEditorLayerBuilder = AnnotationEditorLayerBuilder;
|
|
142
|
+
_AnnotationEditorLayerBuilder_annotationLayer = new WeakMap(), _AnnotationEditorLayerBuilder_drawLayer = new WeakMap(), _AnnotationEditorLayerBuilder_onAppend = new WeakMap(), _AnnotationEditorLayerBuilder_textLayer = new WeakMap(), _AnnotationEditorLayerBuilder_uiManager = new WeakMap();
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/** @typedef {import("./tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
|
|
2
|
+
/** @typedef {import("../display_utils.js").PageViewport} PageViewport */
|
|
3
|
+
/** @typedef {import("../../../web/text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
|
|
4
|
+
/** @typedef {import("../../../web/interfaces").IL10n} IL10n */
|
|
5
|
+
/** @typedef {import("../annotation_layer.js").AnnotationLayer} AnnotationLayer */
|
|
6
|
+
/** @typedef {import("../draw_layer.js").DrawLayer} DrawLayer */
|
|
7
|
+
import { FreeTextEditor } from "./editors/free-text-editor";
|
|
8
|
+
import { HighlightEditor } from "./editors/highlight-editor";
|
|
9
|
+
declare class AnnotationEditorLayer {
|
|
10
|
+
#private;
|
|
11
|
+
drawLayer: any;
|
|
12
|
+
pageIndex: number;
|
|
13
|
+
div: any;
|
|
14
|
+
viewport: any;
|
|
15
|
+
static _initialized: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @param {AnnotationEditorLayerOptions} options
|
|
18
|
+
*/
|
|
19
|
+
constructor({ uiManager, pageIndex, div, accessibilityManager, annotationLayer, drawLayer, textLayer, viewport }: {
|
|
20
|
+
uiManager: any;
|
|
21
|
+
pageIndex: any;
|
|
22
|
+
div: any;
|
|
23
|
+
accessibilityManager: any;
|
|
24
|
+
annotationLayer: any;
|
|
25
|
+
drawLayer: any;
|
|
26
|
+
textLayer: any;
|
|
27
|
+
viewport: any;
|
|
28
|
+
});
|
|
29
|
+
hide(): void;
|
|
30
|
+
show(): void;
|
|
31
|
+
get isEmpty(): boolean;
|
|
32
|
+
get isInvisible(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Update the toolbar if it's required to reflect the tool currently used.
|
|
35
|
+
* @param {number} mode
|
|
36
|
+
*/
|
|
37
|
+
updateToolbar(): void;
|
|
38
|
+
/**
|
|
39
|
+
* The mode has changed: it must be updated.
|
|
40
|
+
* @param {number} mode
|
|
41
|
+
*/
|
|
42
|
+
updateMode(mode?: number): void;
|
|
43
|
+
hasTextLayer(textLayer: any): boolean;
|
|
44
|
+
addInkEditorIfNeeded(isCommitting: any): void;
|
|
45
|
+
/**
|
|
46
|
+
* Set the editing state.
|
|
47
|
+
* @param {boolean} isEditing
|
|
48
|
+
*/
|
|
49
|
+
setEditingState(isEditing: any): void;
|
|
50
|
+
/**
|
|
51
|
+
* Add some commands into the CommandManager (undo/redo stuff).
|
|
52
|
+
* @param {Object} params
|
|
53
|
+
*/
|
|
54
|
+
addCommands(params: any): void;
|
|
55
|
+
toggleDrawing(enabled?: boolean): void;
|
|
56
|
+
togglePointerEvents(enabled?: boolean): void;
|
|
57
|
+
toggleAnnotationLayerPointerEvents(enabled?: boolean): void;
|
|
58
|
+
/**
|
|
59
|
+
* Enable pointer events on the main div in order to enable
|
|
60
|
+
* editor creation.
|
|
61
|
+
*/
|
|
62
|
+
enable(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Disable editor creation.
|
|
65
|
+
*/
|
|
66
|
+
disable(): void;
|
|
67
|
+
getEditableAnnotation(id: any): any;
|
|
68
|
+
/**
|
|
69
|
+
* Set the current editor.
|
|
70
|
+
* @param {AnnotationEditor} editor
|
|
71
|
+
*/
|
|
72
|
+
setActiveEditor(editor: any): void;
|
|
73
|
+
enableTextSelection(): void;
|
|
74
|
+
disableTextSelection(): void;
|
|
75
|
+
enableClick(): void;
|
|
76
|
+
disableClick(): void;
|
|
77
|
+
attach(editor: any): void;
|
|
78
|
+
detach(editor: any): void;
|
|
79
|
+
/**
|
|
80
|
+
* Remove an editor.
|
|
81
|
+
* @param {AnnotationEditor} editor
|
|
82
|
+
*/
|
|
83
|
+
remove(editor: any): void;
|
|
84
|
+
/**
|
|
85
|
+
* An editor can have a different parent, for example after having
|
|
86
|
+
* being dragged and droped from a page to another.
|
|
87
|
+
* @param {AnnotationEditor} editor
|
|
88
|
+
*/
|
|
89
|
+
changeParent(editor: any): void;
|
|
90
|
+
/**
|
|
91
|
+
* Add a new editor in the current view.
|
|
92
|
+
* @param {AnnotationEditor} editor
|
|
93
|
+
*/
|
|
94
|
+
add(editor: any): void;
|
|
95
|
+
moveEditorInDOM(editor: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* Add or rebuild depending if it has been removed or not.
|
|
98
|
+
* @param {AnnotationEditor} editor
|
|
99
|
+
*/
|
|
100
|
+
addOrRebuild(editor: any): void;
|
|
101
|
+
/**
|
|
102
|
+
* Add a new editor and make this addition undoable.
|
|
103
|
+
* @param {AnnotationEditor} editor
|
|
104
|
+
*/
|
|
105
|
+
addUndoableEditor(editor: any): void;
|
|
106
|
+
/**
|
|
107
|
+
* Get an id for an editor.
|
|
108
|
+
* @returns {string}
|
|
109
|
+
*/
|
|
110
|
+
getNextId(): string;
|
|
111
|
+
combinedSignal(abortController: any): any;
|
|
112
|
+
canCreateNewEmptyEditor(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Paste some content into a new editor.
|
|
115
|
+
* @param {number} mode
|
|
116
|
+
* @param {Object} params
|
|
117
|
+
*/
|
|
118
|
+
pasteEditor(mode: any, params: any): void;
|
|
119
|
+
/**
|
|
120
|
+
* Create a new editor
|
|
121
|
+
* @param {Object} data
|
|
122
|
+
* @returns {AnnotationEditor | null}
|
|
123
|
+
*/
|
|
124
|
+
deserialize(data: any): any;
|
|
125
|
+
/**
|
|
126
|
+
* Create and add a new editor.
|
|
127
|
+
* @param {PointerEvent} event
|
|
128
|
+
* @param {boolean} isCentered
|
|
129
|
+
* @param [Object] data
|
|
130
|
+
* @returns {AnnotationEditor}
|
|
131
|
+
*/
|
|
132
|
+
createAndAddNewEditor(event: any, isCentered: any, data?: {}): FreeTextEditor | HighlightEditor;
|
|
133
|
+
/**
|
|
134
|
+
* Create and add a new editor.
|
|
135
|
+
*/
|
|
136
|
+
addNewEditor(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Set the last selected editor.
|
|
139
|
+
* @param {AnnotationEditor} editor
|
|
140
|
+
*/
|
|
141
|
+
setSelected(editor: any): void;
|
|
142
|
+
/**
|
|
143
|
+
* Add or remove an editor the current selection.
|
|
144
|
+
* @param {AnnotationEditor} editor
|
|
145
|
+
*/
|
|
146
|
+
toggleSelected(editor: any): void;
|
|
147
|
+
/**
|
|
148
|
+
* Check if the editor is selected.
|
|
149
|
+
* @param {AnnotationEditor} editor
|
|
150
|
+
*/
|
|
151
|
+
isSelected(editor: any): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Unselect an editor.
|
|
154
|
+
* @param {AnnotationEditor} editor
|
|
155
|
+
*/
|
|
156
|
+
unselect(editor: any): void;
|
|
157
|
+
/**
|
|
158
|
+
* Pointerup callback.
|
|
159
|
+
* @param {PointerEvent} event
|
|
160
|
+
*/
|
|
161
|
+
pointerup(event: any): void;
|
|
162
|
+
/**
|
|
163
|
+
* Pointerdown callback.
|
|
164
|
+
* @param {PointerEvent} event
|
|
165
|
+
*/
|
|
166
|
+
pointerdown(event: any): void;
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @param {AnnotationEditor} editor
|
|
170
|
+
* @param {number} x
|
|
171
|
+
* @param {number} y
|
|
172
|
+
* @returns
|
|
173
|
+
*/
|
|
174
|
+
findNewParent(editor: any, x: any, y: any): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Destroy the main editor.
|
|
177
|
+
*/
|
|
178
|
+
destroy(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Render the main editor.
|
|
181
|
+
* @param {RenderEditorLayerOptions} parameters
|
|
182
|
+
*/
|
|
183
|
+
render({ viewport }: {
|
|
184
|
+
viewport: any;
|
|
185
|
+
}): void;
|
|
186
|
+
update({ viewport }: {
|
|
187
|
+
viewport: any;
|
|
188
|
+
}): void;
|
|
189
|
+
/**
|
|
190
|
+
* Get page dimensions.
|
|
191
|
+
* @returns {Object} dimensions.
|
|
192
|
+
*/
|
|
193
|
+
get pageDimensions(): any[];
|
|
194
|
+
get scale(): any;
|
|
195
|
+
}
|
|
196
|
+
export { AnnotationEditorLayer };
|