Skip to content

Commit

Permalink
Add support for search functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrach-tayo committed Nov 24, 2023
1 parent 36515ba commit d4824fd
Show file tree
Hide file tree
Showing 13 changed files with 218 additions and 54 deletions.
8 changes: 8 additions & 0 deletions dist/cjs/components/PdfHighlighter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ interface Props<T_HT> {
highlights: Array<T_HT>;
onScrollChange: () => void;
scrollRef: (scrollTo: (highlight: T_HT) => void) => void;
findRefs: (findPrev: () => void, findNext: () => void) => void;
pdfDocument: PDFDocumentProxy;
pdfScaleValue: string;
searchValue: string;
onSearch: (currentMatch: number, totalMatchCount: number) => void;
onSelectionFinished: (position: ScaledPosition, content: {
text?: string;
image?: string;
Expand All @@ -46,6 +49,8 @@ interface Props<T_HT> {
export declare class PdfHighlighter<T_HT extends IHighlight> extends PureComponent<Props<T_HT>, State<T_HT>> {
static defaultProps: {
pdfScaleValue: string;
searchValue: string;
onSearch: () => void;
};
state: State<T_HT>;
eventBus: EventBus;
Expand All @@ -66,6 +71,9 @@ export declare class PdfHighlighter<T_HT extends IHighlight> extends PureCompone
attachRef: () => void;
componentDidUpdate(prevProps: Props<T_HT>): void;
init(): void;
calculateMatchProgress: () => void;
goToNextMatch: () => void;
goToPreviousMatch: () => void;
componentWillUnmount(): void;
findOrCreateHighlightLayer(page: number): Element | null;
groupHighlightsByPage(highlights: Array<T_HT>): {
Expand Down
57 changes: 56 additions & 1 deletion dist/cjs/components/PdfHighlighter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4824fd

Please sign in to comment.