@progress/kendo-react-pdf-viewer 7.2.4-develop.2 → 7.2.4-develop.4
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/PDFViewer.js +8 -0
- package/PDFViewer.mjs +498 -0
- package/dist/cdn/js/kendo-react-pdf-viewer.js +8 -5
- package/index.d.mts +257 -5
- package/index.d.ts +255 -31
- package/index.js +8 -5
- package/index.mjs +14 -519
- package/messages.js +8 -0
- package/messages.mjs +47 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +9 -9
- package/PDFViewer.d.ts +0 -211
- package/messages.d.ts +0 -94
- package/package-metadata.d.ts +0 -9
package/PDFViewer.d.ts
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { ToolbarProps } from '@progress/kendo-react-buttons';
|
|
7
|
-
import { SaveOptions } from '@progress/kendo-file-saver';
|
|
8
|
-
import { TypedArray } from '@progress/kendo-pdfviewer-common';
|
|
9
|
-
export type PDFViewerTool = 'pager' | 'spacer' | 'zoomInOut' | 'zoom' | 'selection' | 'search' | 'open' | 'download' | 'print';
|
|
10
|
-
interface PDFViewerEvent {
|
|
11
|
-
/**
|
|
12
|
-
* The event target object.
|
|
13
|
-
*/
|
|
14
|
-
target: PDFViewerHandle;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) ErrorEvent object.
|
|
18
|
-
*/
|
|
19
|
-
export interface ErrorEvent extends PDFViewerEvent {
|
|
20
|
-
/**
|
|
21
|
-
* The raised error.
|
|
22
|
-
*/
|
|
23
|
-
error: Error | {
|
|
24
|
-
message: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) DownloadEvent object.
|
|
29
|
-
*/
|
|
30
|
-
export interface DownloadEvent extends PDFViewerEvent {
|
|
31
|
-
/**
|
|
32
|
-
* The Blob object.
|
|
33
|
-
*/
|
|
34
|
-
blob: Blob;
|
|
35
|
-
/**
|
|
36
|
-
* The name which will be used for saving the file.
|
|
37
|
-
*/
|
|
38
|
-
fileName: string;
|
|
39
|
-
/**
|
|
40
|
-
* The options which will be used for saving the file.
|
|
41
|
-
*/
|
|
42
|
-
saveOptions: SaveOptions;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) LoadEvent object.
|
|
46
|
-
*/
|
|
47
|
-
export interface LoadEvent extends PDFViewerEvent {
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) ZoomEvent object.
|
|
51
|
-
*/
|
|
52
|
-
export interface ZoomEvent extends PDFViewerEvent {
|
|
53
|
-
/**
|
|
54
|
-
* The zoom value.
|
|
55
|
-
*/
|
|
56
|
-
zoom: number;
|
|
57
|
-
/**
|
|
58
|
-
* A React `SyntheticEvent`.
|
|
59
|
-
*/
|
|
60
|
-
syntheticEvent: React.SyntheticEvent<any>;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) PageEvent object.
|
|
64
|
-
*/
|
|
65
|
-
export interface PageEvent extends PDFViewerEvent {
|
|
66
|
-
/**
|
|
67
|
-
* The page number.
|
|
68
|
-
*/
|
|
69
|
-
page: number;
|
|
70
|
-
/**
|
|
71
|
-
* A React `SyntheticEvent`.
|
|
72
|
-
*/
|
|
73
|
-
syntheticEvent: React.SyntheticEvent<any>;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The props of the KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) component.
|
|
77
|
-
*/
|
|
78
|
-
export interface PDFViewerProps {
|
|
79
|
-
/**
|
|
80
|
-
* Represents the url of the PDF file.
|
|
81
|
-
*/
|
|
82
|
-
url?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Represents the data of the PDF file in Base64 format.
|
|
85
|
-
*/
|
|
86
|
-
data?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Represents the raw binary data buffer of the PDF file.
|
|
89
|
-
*/
|
|
90
|
-
arrayBuffer?: ArrayBuffer;
|
|
91
|
-
/**
|
|
92
|
-
* Represents the data of the PDF file in typed array format.
|
|
93
|
-
*/
|
|
94
|
-
typedArray?: TypedArray;
|
|
95
|
-
/**
|
|
96
|
-
* Represents the additional styles which will be added to the PDFViewer component.
|
|
97
|
-
*/
|
|
98
|
-
style?: React.CSSProperties;
|
|
99
|
-
/**
|
|
100
|
-
* Represents the file name used to save the file when the user clicks the download tool.
|
|
101
|
-
*/
|
|
102
|
-
saveFileName?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Represents the options for saving the file when the user clicks the download tool.
|
|
105
|
-
*/
|
|
106
|
-
saveOptions?: SaveOptions;
|
|
107
|
-
/**
|
|
108
|
-
* Represents the tools collection rendered in the toolbar.
|
|
109
|
-
*
|
|
110
|
-
* @default - ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print']
|
|
111
|
-
*/
|
|
112
|
-
tools?: PDFViewerTool[];
|
|
113
|
-
/**
|
|
114
|
-
* Represents the zoom levels populated in the ComboBox component.
|
|
115
|
-
*/
|
|
116
|
-
zoomLevels?: {
|
|
117
|
-
id: number;
|
|
118
|
-
priority: number;
|
|
119
|
-
value: number;
|
|
120
|
-
text: string;
|
|
121
|
-
type: string;
|
|
122
|
-
locationString?: string;
|
|
123
|
-
}[];
|
|
124
|
-
/**
|
|
125
|
-
* Represents the zoom value of the document.
|
|
126
|
-
*/
|
|
127
|
-
zoom?: number;
|
|
128
|
-
/**
|
|
129
|
-
* Represents the default zoom value.
|
|
130
|
-
*/
|
|
131
|
-
defaultZoom?: number;
|
|
132
|
-
/**
|
|
133
|
-
* Represents the minimum zoom value.
|
|
134
|
-
*/
|
|
135
|
-
minZoom?: number;
|
|
136
|
-
/**
|
|
137
|
-
* Represents the maximum zoom value.
|
|
138
|
-
*/
|
|
139
|
-
maxZoom?: number;
|
|
140
|
-
/**
|
|
141
|
-
* Represents the zoom rate value.
|
|
142
|
-
*/
|
|
143
|
-
zoomRate?: number;
|
|
144
|
-
/**
|
|
145
|
-
* Fires when an error occurs.
|
|
146
|
-
*/
|
|
147
|
-
onError?: (event: ErrorEvent) => void;
|
|
148
|
-
/**
|
|
149
|
-
* Fires when a PDF document has been loaded.
|
|
150
|
-
*/
|
|
151
|
-
onLoad?: (event: LoadEvent) => void;
|
|
152
|
-
/**
|
|
153
|
-
* Fires when the download tool has been clicked. To prevent the download, return `false`.
|
|
154
|
-
*/
|
|
155
|
-
onDownload?: (event: DownloadEvent) => boolean | void;
|
|
156
|
-
/**
|
|
157
|
-
* Fires when the zoom has changed.
|
|
158
|
-
*/
|
|
159
|
-
onZoom?: (event: ZoomEvent) => void;
|
|
160
|
-
/**
|
|
161
|
-
* Fires when the page has changed.
|
|
162
|
-
*/
|
|
163
|
-
onPageChange?: (event: PageEvent) => void;
|
|
164
|
-
/**
|
|
165
|
-
* Fires when the toolbar component is about to be rendered. Use it to override the default appearance of the toolbar.
|
|
166
|
-
*/
|
|
167
|
-
onRenderToolbar?: (defaultRendering: React.ReactElement<ToolbarProps>) => React.ReactNode;
|
|
168
|
-
/**
|
|
169
|
-
* Fires when the content component is about to be rendered. Use it to override the default appearance of the content.
|
|
170
|
-
*/
|
|
171
|
-
onRenderContent?: (defaultRendering: React.ReactElement<HTMLDivElement>) => React.ReactNode;
|
|
172
|
-
/**
|
|
173
|
-
* Fires when the loading indication component is about to be rendered. Use it to override the default appearance of the loading.
|
|
174
|
-
*/
|
|
175
|
-
onRenderLoader?: (defaultRendering: React.ReactElement<HTMLDivElement> | null) => React.ReactNode;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
|
|
179
|
-
* callback of the [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) component.
|
|
180
|
-
*/
|
|
181
|
-
export interface PDFViewerHandle {
|
|
182
|
-
/**
|
|
183
|
-
* The root DOM element of the PDFViewer component.
|
|
184
|
-
*/
|
|
185
|
-
element: HTMLDivElement | null;
|
|
186
|
-
/**
|
|
187
|
-
* The props of the PDFViewer component.
|
|
188
|
-
*/
|
|
189
|
-
props: PDFViewerProps;
|
|
190
|
-
/**
|
|
191
|
-
* The `PDF.js` document loaded in the PDFViewer component.
|
|
192
|
-
*/
|
|
193
|
-
document: any;
|
|
194
|
-
/**
|
|
195
|
-
* The `PDF.js` pages loaded in the PDFViewer component.
|
|
196
|
-
*/
|
|
197
|
-
pages: any[];
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Represents the [KendoReact PDFViewer component]({% slug api_pdf-viewer_pdfviewerprops %}).
|
|
201
|
-
*
|
|
202
|
-
* @example
|
|
203
|
-
* ```jsx
|
|
204
|
-
* function App() {
|
|
205
|
-
* return <PDFViewer url="sample.pdf" />;
|
|
206
|
-
* }
|
|
207
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
208
|
-
* ```
|
|
209
|
-
*/
|
|
210
|
-
export declare const PDFViewer: React.ForwardRefExoticComponent<PDFViewerProps & React.RefAttributes<PDFViewerHandle | null>>;
|
|
211
|
-
export {};
|
package/messages.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare const zoomIn = "pdfviewer.zoomIn";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export declare const zoomOut = "pdfviewer.zoomOut";
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare const zoomLevel = "pdfviewer.zoomLevel";
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export declare const enableSelection = "pdfviewer.enableSelection";
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export declare const enablePanning = "pdfviewer.enablePanning";
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
export declare const search = "pdfviewer.search";
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
export declare const open = "pdfviewer.open";
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
export declare const download = "pdfviewer.download";
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
export declare const print = "pdfviewer.print";
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
export declare const close = "pdfviewer.close";
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
export declare const matchCase = "pdfviewer.matchCase";
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
52
|
-
export declare const prevMatch = "pdfviewer.prevMatch";
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*/
|
|
56
|
-
export declare const nextMatch = "pdfviewer.nextMatch";
|
|
57
|
-
/**
|
|
58
|
-
* @hidden
|
|
59
|
-
*/
|
|
60
|
-
export declare const actualWidth = "pdfviewer.actualWidth";
|
|
61
|
-
/**
|
|
62
|
-
* @hidden
|
|
63
|
-
*/
|
|
64
|
-
export declare const fitToWidth = "pdfviewer.fitToWidth";
|
|
65
|
-
/**
|
|
66
|
-
* @hidden
|
|
67
|
-
*/
|
|
68
|
-
export declare const fitToPage = "pdfviewer.fitToPage";
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
export declare const popupBlocked = "pdfviewer.popupBlocked";
|
|
73
|
-
/**
|
|
74
|
-
* @hidden
|
|
75
|
-
*/
|
|
76
|
-
export declare const messages: {
|
|
77
|
-
"pdfviewer.zoomIn": string;
|
|
78
|
-
"pdfviewer.zoomOut": string;
|
|
79
|
-
"pdfviewer.zoomLevel": string;
|
|
80
|
-
"pdfviewer.enableSelection": string;
|
|
81
|
-
"pdfviewer.enablePanning": string;
|
|
82
|
-
"pdfviewer.search": string;
|
|
83
|
-
"pdfviewer.open": string;
|
|
84
|
-
"pdfviewer.download": string;
|
|
85
|
-
"pdfviewer.print": string;
|
|
86
|
-
"pdfviewer.close": string;
|
|
87
|
-
"pdfviewer.matchCase": string;
|
|
88
|
-
"pdfviewer.prevMatch": string;
|
|
89
|
-
"pdfviewer.nextMatch": string;
|
|
90
|
-
"pdfviewer.actualWidth": string;
|
|
91
|
-
"pdfviewer.fitToWidth": string;
|
|
92
|
-
"pdfviewer.fitToPage": string;
|
|
93
|
-
"pdfviewer.popupBlocked": string;
|
|
94
|
-
};
|
package/package-metadata.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PackageMetadata } from '@progress/kendo-licensing';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare const packageMetadata: PackageMetadata;
|