@progress/kendo-react-pdf-viewer 6.1.1 → 7.0.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/{dist/npm/PDFViewer.d.ts → PDFViewer.d.ts} +5 -2
- package/dist/cdn/js/kendo-react-pdf-viewer.js +5 -2
- package/{dist/es/main.d.ts → index.d.ts} +5 -1
- package/index.js +5 -0
- package/index.mjs +514 -0
- package/{dist/es/messages.d.ts → messages.d.ts} +4 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +36 -65
- package/about.md +0 -3
- package/dist/cdn/js/kendo-react-pdf-viewer.js.LICENSE.txt +0 -21
- package/dist/es/PDFViewer.d.ts +0 -208
- package/dist/es/PDFViewer.js +0 -493
- package/dist/es/main.js +0 -30
- package/dist/es/messages.js +0 -85
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/npm/PDFViewer.js +0 -496
- package/dist/npm/main.d.ts +0 -29
- package/dist/npm/main.js +0 -35
- package/dist/npm/messages.d.ts +0 -85
- package/dist/npm/messages.js +0 -88
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/systemjs/kendo-react-pdf-viewer.js +0 -10
- package/dist/systemjs/kendo-react-pdf-viewer.txt +0 -0
- package/e2e-legacy/snapshots/pdf-viewer.png +0 -0
- package/e2e-next/basic.tests.ts +0 -23
package/package.json
CHANGED
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-pdf-viewer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-develop.2",
|
|
4
4
|
"description": "KendoReact PDFViewer package",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
"author": "Progress",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
7
|
+
"homepage": "https://www.telerik.com/kendo-react-ui",
|
|
8
|
+
"main": "./index.js",
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./index.mjs",
|
|
13
|
+
"require": "./index.js"
|
|
14
|
+
}
|
|
8
15
|
},
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"@progress/kendo-file-saver": "^1.1.1",
|
|
19
|
+
"@progress/kendo-licensing": "^1.3.0",
|
|
20
|
+
"@progress/kendo-pdfviewer-common": "0.2.4",
|
|
21
|
+
"@progress/kendo-react-buttons": "7.0.0-develop.2",
|
|
22
|
+
"@progress/kendo-react-common": "7.0.0-develop.2",
|
|
23
|
+
"@progress/kendo-react-data-tools": "7.0.0-develop.2",
|
|
24
|
+
"@progress/kendo-react-dropdowns": "7.0.0-develop.2",
|
|
25
|
+
"@progress/kendo-react-indicators": "7.0.0-develop.2",
|
|
26
|
+
"@progress/kendo-react-inputs": "7.0.0-develop.2",
|
|
27
|
+
"@progress/kendo-react-intl": "7.0.0-develop.2",
|
|
28
|
+
"@progress/kendo-react-upload": "7.0.0-develop.2",
|
|
29
|
+
"@progress/kendo-svg-icons": "^2.0.0",
|
|
30
|
+
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
31
|
+
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"prop-types": "^15.6.0"
|
|
18
35
|
},
|
|
19
|
-
"homepage": "https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pdf-viewer&utm_content=homepage",
|
|
20
36
|
"keywords": [
|
|
21
37
|
"Kendo UI",
|
|
22
38
|
"React",
|
|
@@ -29,60 +45,15 @@
|
|
|
29
45
|
"PDFViewer",
|
|
30
46
|
"Pivot Table"
|
|
31
47
|
],
|
|
32
|
-
"peerDependencies": {
|
|
33
|
-
"@progress/kendo-data-query": "^1.0.0",
|
|
34
|
-
"@progress/kendo-drawing": "^1.17.2",
|
|
35
|
-
"@progress/kendo-file-saver": "^1.1.1",
|
|
36
|
-
"@progress/kendo-licensing": "^1.3.0",
|
|
37
|
-
"@progress/kendo-react-animation": "^6.0.0",
|
|
38
|
-
"@progress/kendo-react-buttons": "^6.0.0",
|
|
39
|
-
"@progress/kendo-react-data-tools": "^6.0.0",
|
|
40
|
-
"@progress/kendo-react-dateinputs": "^6.0.0",
|
|
41
|
-
"@progress/kendo-react-dropdowns": "^6.0.0",
|
|
42
|
-
"@progress/kendo-react-indicators": "^6.0.0",
|
|
43
|
-
"@progress/kendo-react-inputs": "^6.0.0",
|
|
44
|
-
"@progress/kendo-react-intl": "^6.0.0",
|
|
45
|
-
"@progress/kendo-react-progressbars": "^6.0.0",
|
|
46
|
-
"@progress/kendo-react-treeview": "^6.0.0",
|
|
47
|
-
"@progress/kendo-react-upload": "^6.0.0",
|
|
48
|
-
"@progress/kendo-svg-icons": "^2.0.0",
|
|
49
|
-
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
50
|
-
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
51
|
-
},
|
|
52
|
-
"dependencies": {
|
|
53
|
-
"@progress/kendo-draggable": "^3.0.0",
|
|
54
|
-
"@progress/kendo-pdfviewer-common": "0.2.4",
|
|
55
|
-
"@progress/kendo-react-common": "6.1.1",
|
|
56
|
-
"@typescript/lib-dom": "npm:@types/web",
|
|
57
|
-
"prop-types": "^15.6.0"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@progress/kendo-data-query": "^1.0.0",
|
|
61
|
-
"@progress/kendo-date-math": "^1.5.1",
|
|
62
|
-
"@progress/kendo-drawing": "^1.17.2",
|
|
63
|
-
"@progress/kendo-file-saver": "^1.1.1",
|
|
64
|
-
"@progress/kendo-licensing": "^1.3.0",
|
|
65
|
-
"@progress/kendo-react-animation": "6.1.1",
|
|
66
|
-
"@progress/kendo-react-buttons": "6.1.1",
|
|
67
|
-
"@progress/kendo-react-data-tools": "6.1.1",
|
|
68
|
-
"@progress/kendo-react-dateinputs": "6.1.1",
|
|
69
|
-
"@progress/kendo-react-dropdowns": "6.1.1",
|
|
70
|
-
"@progress/kendo-react-indicators": "6.1.1",
|
|
71
|
-
"@progress/kendo-react-inputs": "6.1.1",
|
|
72
|
-
"@progress/kendo-react-intl": "6.1.1",
|
|
73
|
-
"@progress/kendo-react-progressbars": "6.1.1",
|
|
74
|
-
"@progress/kendo-react-treeview": "6.1.1",
|
|
75
|
-
"@progress/kendo-react-upload": "6.1.1",
|
|
76
|
-
"@progress/kendo-svg-icons": "^2.0.0"
|
|
77
|
-
},
|
|
78
48
|
"@progress": {
|
|
79
49
|
"friendlyName": "PDFViewer",
|
|
80
50
|
"framework": "KendoReact"
|
|
81
51
|
},
|
|
82
|
-
"
|
|
83
|
-
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+https://github.com/telerik/kendo-react.git"
|
|
55
|
+
},
|
|
84
56
|
"publishConfig": {
|
|
85
57
|
"access": "public"
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
}
|
|
58
|
+
}
|
|
59
|
+
}
|
package/about.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @licstart The following is the entire license notice for the
|
|
3
|
-
* JavaScript code in this page
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2023 Mozilla Foundation
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*
|
|
19
|
-
* @licend The above is the entire license notice for the
|
|
20
|
-
* JavaScript code in this page
|
|
21
|
-
*/
|
package/dist/es/PDFViewer.d.ts
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ToolbarProps } from '@progress/kendo-react-buttons';
|
|
3
|
-
import { SaveOptions } from '@progress/kendo-file-saver';
|
|
4
|
-
import 'pdfjs-dist/build/pdf.worker.entry';
|
|
5
|
-
import { TypedArray } from '@progress/kendo-pdfviewer-common';
|
|
6
|
-
export declare type PDFViewerTool = 'pager' | 'spacer' | 'zoomInOut' | 'zoom' | 'selection' | 'search' | 'open' | 'download' | 'print';
|
|
7
|
-
interface PDFViewerEvent {
|
|
8
|
-
/**
|
|
9
|
-
* The event target object.
|
|
10
|
-
*/
|
|
11
|
-
target: PDFViewerHandle;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) ErrorEvent object.
|
|
15
|
-
*/
|
|
16
|
-
export interface ErrorEvent extends PDFViewerEvent {
|
|
17
|
-
/**
|
|
18
|
-
* The raised error.
|
|
19
|
-
*/
|
|
20
|
-
error: Error | {
|
|
21
|
-
message: string;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) DownloadEvent object.
|
|
26
|
-
*/
|
|
27
|
-
export interface DownloadEvent extends PDFViewerEvent {
|
|
28
|
-
/**
|
|
29
|
-
* The Blob object.
|
|
30
|
-
*/
|
|
31
|
-
blob: Blob;
|
|
32
|
-
/**
|
|
33
|
-
* The name which will be used for saving the file.
|
|
34
|
-
*/
|
|
35
|
-
fileName: string;
|
|
36
|
-
/**
|
|
37
|
-
* The options which will be used for saving the file.
|
|
38
|
-
*/
|
|
39
|
-
saveOptions: SaveOptions;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) LoadEvent object.
|
|
43
|
-
*/
|
|
44
|
-
export interface LoadEvent extends PDFViewerEvent {
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) ZoomEvent object.
|
|
48
|
-
*/
|
|
49
|
-
export interface ZoomEvent extends PDFViewerEvent {
|
|
50
|
-
/**
|
|
51
|
-
* The zoom value.
|
|
52
|
-
*/
|
|
53
|
-
zoom: number;
|
|
54
|
-
/**
|
|
55
|
-
* A React `SyntheticEvent`.
|
|
56
|
-
*/
|
|
57
|
-
syntheticEvent: React.SyntheticEvent<any>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) PageEvent object.
|
|
61
|
-
*/
|
|
62
|
-
export interface PageEvent extends PDFViewerEvent {
|
|
63
|
-
/**
|
|
64
|
-
* The page number.
|
|
65
|
-
*/
|
|
66
|
-
page: number;
|
|
67
|
-
/**
|
|
68
|
-
* A React `SyntheticEvent`.
|
|
69
|
-
*/
|
|
70
|
-
syntheticEvent: React.SyntheticEvent<any>;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* The props of the KendoReact [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) component.
|
|
74
|
-
*/
|
|
75
|
-
export interface PDFViewerProps {
|
|
76
|
-
/**
|
|
77
|
-
* Represents the url of the PDF file.
|
|
78
|
-
*/
|
|
79
|
-
url?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Represents the data of the PDF file in Base64 format.
|
|
82
|
-
*/
|
|
83
|
-
data?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Represents the raw binary data buffer of the PDF file.
|
|
86
|
-
*/
|
|
87
|
-
arrayBuffer?: ArrayBuffer;
|
|
88
|
-
/**
|
|
89
|
-
* Represents the data of the PDF file in typed array format.
|
|
90
|
-
*/
|
|
91
|
-
typedArray?: TypedArray;
|
|
92
|
-
/**
|
|
93
|
-
* Represents the additional styles which will be added to the PDFViewer component.
|
|
94
|
-
*/
|
|
95
|
-
style?: React.CSSProperties;
|
|
96
|
-
/**
|
|
97
|
-
* Represents the file name used to save the file when the user clicks the download tool.
|
|
98
|
-
*/
|
|
99
|
-
saveFileName?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Represents the options for saving the file when the user clicks the download tool.
|
|
102
|
-
*/
|
|
103
|
-
saveOptions?: SaveOptions;
|
|
104
|
-
/**
|
|
105
|
-
* Represents the tools collection rendered in the toolbar.
|
|
106
|
-
*
|
|
107
|
-
* @default - ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print']
|
|
108
|
-
*/
|
|
109
|
-
tools?: PDFViewerTool[];
|
|
110
|
-
/**
|
|
111
|
-
* Represents the zoom levels populated in the ComboBox component.
|
|
112
|
-
*/
|
|
113
|
-
zoomLevels?: {
|
|
114
|
-
id: number;
|
|
115
|
-
priority: number;
|
|
116
|
-
value: number;
|
|
117
|
-
text: string;
|
|
118
|
-
type: string;
|
|
119
|
-
locationString?: string;
|
|
120
|
-
}[];
|
|
121
|
-
/**
|
|
122
|
-
* Represents the zoom value of the document.
|
|
123
|
-
*/
|
|
124
|
-
zoom?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Represents the default zoom value.
|
|
127
|
-
*/
|
|
128
|
-
defaultZoom?: number;
|
|
129
|
-
/**
|
|
130
|
-
* Represents the minimum zoom value.
|
|
131
|
-
*/
|
|
132
|
-
minZoom?: number;
|
|
133
|
-
/**
|
|
134
|
-
* Represents the maximum zoom value.
|
|
135
|
-
*/
|
|
136
|
-
maxZoom?: number;
|
|
137
|
-
/**
|
|
138
|
-
* Represents the zoom rate value.
|
|
139
|
-
*/
|
|
140
|
-
zoomRate?: number;
|
|
141
|
-
/**
|
|
142
|
-
* Fires when an error occurs.
|
|
143
|
-
*/
|
|
144
|
-
onError?: (event: ErrorEvent) => void;
|
|
145
|
-
/**
|
|
146
|
-
* Fires when a PDF document has been loaded.
|
|
147
|
-
*/
|
|
148
|
-
onLoad?: (event: LoadEvent) => void;
|
|
149
|
-
/**
|
|
150
|
-
* Fires when the download tool has been clicked. To prevent the download, return `false`.
|
|
151
|
-
*/
|
|
152
|
-
onDownload?: (event: DownloadEvent) => boolean | void;
|
|
153
|
-
/**
|
|
154
|
-
* Fires when the zoom has changed.
|
|
155
|
-
*/
|
|
156
|
-
onZoom?: (event: ZoomEvent) => void;
|
|
157
|
-
/**
|
|
158
|
-
* Fires when the page has changed.
|
|
159
|
-
*/
|
|
160
|
-
onPageChange?: (event: PageEvent) => void;
|
|
161
|
-
/**
|
|
162
|
-
* Fires when the toolbar component is about to be rendered. Use it to override the default appearance of the toolbar.
|
|
163
|
-
*/
|
|
164
|
-
onRenderToolbar?: (defaultRendering: React.ReactElement<ToolbarProps>) => React.ReactNode;
|
|
165
|
-
/**
|
|
166
|
-
* Fires when the content component is about to be rendered. Use it to override the default appearance of the content.
|
|
167
|
-
*/
|
|
168
|
-
onRenderContent?: (defaultRendering: React.ReactElement<HTMLDivElement>) => React.ReactNode;
|
|
169
|
-
/**
|
|
170
|
-
* Fires when the loading indication component is about to be rendered. Use it to override the default appearance of the loading.
|
|
171
|
-
*/
|
|
172
|
-
onRenderLoader?: (defaultRendering: React.ReactElement<HTMLDivElement> | null) => React.ReactNode;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
|
|
176
|
-
* callback of the [PDFViewer]({% slug api_pdf-viewer_pdfviewer %}) component.
|
|
177
|
-
*/
|
|
178
|
-
export interface PDFViewerHandle {
|
|
179
|
-
/**
|
|
180
|
-
* The root DOM element of the PDFViewer component.
|
|
181
|
-
*/
|
|
182
|
-
element: HTMLDivElement | null;
|
|
183
|
-
/**
|
|
184
|
-
* The props of the PDFViewer component.
|
|
185
|
-
*/
|
|
186
|
-
props: PDFViewerProps;
|
|
187
|
-
/**
|
|
188
|
-
* The `PDF.js` document loaded in the PDFViewer component.
|
|
189
|
-
*/
|
|
190
|
-
document: any;
|
|
191
|
-
/**
|
|
192
|
-
* The `PDF.js` pages loaded in the PDFViewer component.
|
|
193
|
-
*/
|
|
194
|
-
pages: any[];
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Represents the [KendoReact PDFViewer component]({% slug api_pdf-viewer_pdfviewerprops %}).
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
* ```jsx
|
|
201
|
-
* function App() {
|
|
202
|
-
* return <PDFViewer url="sample.pdf" />;
|
|
203
|
-
* }
|
|
204
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
205
|
-
* ```
|
|
206
|
-
*/
|
|
207
|
-
export declare const PDFViewer: React.ForwardRefExoticComponent<PDFViewerProps & React.RefAttributes<PDFViewerHandle | null>>;
|
|
208
|
-
export {};
|