-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5a7dc3
commit 411194c
Showing
11 changed files
with
65 additions
and
66 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/discovery-react-components/src/components/DiscoverySearch/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ct-components/src/components/DocumentPreview/components/PdfHighlight/utils/Highlighter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ents/DocumentPreview/components/PdfHighlight/utils/textLayout/PdfTextContentTextLayout.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...mponents/src/components/DocumentPreview/components/PdfHighlight/utils/textLayout/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
...act-components/src/components/DocumentPreview/components/PdfViewer/PdfViewerTextLayer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...t-components/src/components/DocumentPreview/components/PdfViewer/__tests__/utils.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 49 additions & 49 deletions
98
...scovery-react-components/src/components/DocumentPreview/components/PdfViewer/typings.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
declare module 'pdfjs-dist/build/pdf.worker.min.js'; | ||
// declare module 'pdfjs-dist/build/pdf.worker.min.js'; | ||
|
||
// | ||
// Declare modules and their types that is referred from PDF text layer rendering. | ||
// Unused properties are commented out | ||
// | ||
declare module 'pdfjs-dist/lib/web/ui_utils' { | ||
export class EventBus { | ||
on(eventName: string, listener: any): void; | ||
off(eventName: string, listener: any): void; | ||
dispatch(eventName: string, args?: any): void; | ||
} | ||
// export function getGlobalEventBus(): EventBus; | ||
} | ||
// // | ||
// // Declare modules and their types that is referred from PDF text layer rendering. | ||
// // Unused properties are commented out | ||
// // | ||
// declare module 'pdfjs-dist/lib/web/ui_utils' { | ||
// export class EventBus { | ||
// on(eventName: string, listener: any): void; | ||
// off(eventName: string, listener: any): void; | ||
// dispatch(eventName: string, args?: any): void; | ||
// } | ||
// // export function getGlobalEventBus(): EventBus; | ||
// } | ||
|
||
declare module 'pdfjs-dist/lib/web/text_layer_builder' { | ||
import { EventBus } from 'pdfjs-dist/lib/web/ui_utils'; | ||
import { PageViewport } from 'pdfjs-dist/types/display/display_utils'; | ||
import { TextContent } from 'pdfjs-dist/types/display/api'; | ||
// declare module 'pdfjs-dist/lib/web/text_layer_builder' { | ||
// import { EventBus } from 'pdfjs-dist/lib/web/ui_utils'; | ||
// import { PageViewport } from 'pdfjs-dist/types/src/display/display_utils'; | ||
// import { TextContent } from 'pdfjs-dist/types/src/display/api'; | ||
|
||
export class TextLayerBuilder { | ||
constructor(options: TextLayerBuilder.Options); | ||
// export class TextLayerBuilder { | ||
// constructor(options: TextLayerBuilder.Options); | ||
|
||
textLayerDiv: HTMLElement; | ||
eventBus: EventBus; | ||
textContent: TextContent | null; | ||
// textContentItemsStr: any[]; | ||
renderingDone: boolean; | ||
// pageIdx: number; | ||
pageNumber: number; | ||
// matches: any[]; | ||
// viewport: PageViewport; | ||
textDivs: HTMLElement[]; | ||
// findController: any; | ||
textLayerRenderTask: TextLayerRenderTask; | ||
// enhanceTextSelection: any; | ||
// textLayerDiv: HTMLElement; | ||
// eventBus: EventBus; | ||
// textContent: TextContent | null; | ||
// // textContentItemsStr: any[]; | ||
// renderingDone: boolean; | ||
// // pageIdx: number; | ||
// pageNumber: number; | ||
// // matches: any[]; | ||
// // viewport: PageViewport; | ||
// textDivs: HTMLElement[]; | ||
// // findController: any; | ||
// textLayerRenderTask: TextLayerRenderTask; | ||
// // enhanceTextSelection: any; | ||
|
||
render(timeout?: number): void; | ||
cancel(): void; | ||
// setTextContentStream(readableStream: any): void; | ||
setTextContent(textContent: TextContent): void; | ||
} | ||
export const DefaultTextLayerFactory; | ||
// render(timeout?: number): void; | ||
// cancel(): void; | ||
// // setTextContentStream(readableStream: any): void; | ||
// setTextContent(textContent: TextContent): void; | ||
// } | ||
// export const DefaultTextLayerFactory; | ||
|
||
declare namespace TextLayerBuilder { | ||
export interface Options { | ||
textLayerDiv: HTMLElement; | ||
eventBus: EventBus; | ||
pageIndex: number; | ||
viewport: PageViewport; | ||
// findController?: any; | ||
// enhanceTextSelection?: any; | ||
} | ||
} | ||
} | ||
// declare namespace TextLayerBuilder { | ||
// export interface Options { | ||
// textLayerDiv: HTMLElement; | ||
// eventBus: EventBus; | ||
// pageIndex: number; | ||
// viewport: PageViewport; | ||
// // findController?: any; | ||
// // enhanceTextSelection?: any; | ||
// } | ||
// } | ||
// } |
2 changes: 1 addition & 1 deletion
2
...s/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/discovery-react-components/src/components/DocumentPreview/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/discovery-react-components/src/utils/setPdfJsGlobalWorkerOptions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters