UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

67 lines 12.8 kB
import { Component, Input } from '@angular/core'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; import * as i2 from "./pdf-findbar-message-container/pdf-findbar-message-container.component"; import * as i3 from "./pdf-findbar-options-two-container/pdf-find-entire-word/pdf-find-entire-word.component"; import * as i4 from "./pdf-findbar-options-one-container/pdf-find-highlight-all/pdf-find-highlight-all.component"; import * as i5 from "./pdf-find-input-area/pdf-find-input-area.component"; import * as i6 from "./pdf-findbar-options-one-container/pdf-find-match-case/pdf-find-match-case.component"; import * as i7 from "./pdf-findbar-options-one-container/pdf-find-multiple/pdf-find-multiple.component"; import * as i8 from "./pdf-findbar-options-one-container/pdf-find-regexp/pdf-find-regexp.component"; import * as i9 from "./pdf-findbar-options-three-container/pdf-find-results-count/pdf-find-results-count.component"; import * as i10 from "./pdf-findbar-options-two-container/pdf-match-diacritics/pdf-match-diacritics.component"; export class PdfFindbarComponent { showFindButton = true; mobileFriendlyZoomScale; findbarLeft; findbarTop; /* UI templates */ customFindbarInputArea; customFindbar; customFindbarButtons; showFindHighlightAll = true; showFindMatchCase = true; showFindEntireWord = true; showFindMatchDiacritics = true; showFindResultsCount = true; showFindMessages = true; showFindMultiple = true; showFindRegexp = true; static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PdfFindbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PdfFindbarComponent, selector: "pdf-findbar", inputs: { showFindButton: "showFindButton", mobileFriendlyZoomScale: "mobileFriendlyZoomScale", findbarLeft: "findbarLeft", findbarTop: "findbarTop", customFindbarInputArea: "customFindbarInputArea", customFindbar: "customFindbar", customFindbarButtons: "customFindbarButtons", showFindHighlightAll: "showFindHighlightAll", showFindMatchCase: "showFindMatchCase", showFindEntireWord: "showFindEntireWord", showFindMatchDiacritics: "showFindMatchDiacritics", showFindResultsCount: "showFindResultsCount", showFindMessages: "showFindMessages", showFindMultiple: "showFindMultiple", showFindRegexp: "showFindRegexp" }, ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"customFindbar ? customFindbar : defaultFindbar\"> </ng-container>\n\n<ng-template #defaultFindbar>\n <div class=\"findbar hidden doorHanger\" id=\"findbar\" [style.transform]=\"'scale(' + mobileFriendlyZoomScale + ')'\"\n [style.transformOrigin]=\"'left top'\" [style.left]=\"findbarLeft\" [style.top]=\"findbarTop\">\n <ng-container [ngTemplateOutlet]=\"customFindbarButtons ? customFindbarButtons : defaultFindbarButtons\">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #defaultFindbarButtons>\n <pdf-find-input-area [customFindbarInputArea]=\"customFindbarInputArea\"></pdf-find-input-area>\n <pdf-find-highlight-all [class.hidden]=\"!showFindHighlightAll\"></pdf-find-highlight-all>\n <pdf-find-match-case [class.hidden]=\"!showFindMatchCase\"></pdf-find-match-case>\n <pdf-match-diacritics [class.hidden]=\"!showFindMatchDiacritics\"></pdf-match-diacritics>\n <pdf-find-entire-word [class.hidden]=\"!showFindEntireWord\"></pdf-find-entire-word>\n <pdf-find-multiple [class.hidden]=\"!showFindMultiple\"></pdf-find-multiple>\n <pdf-find-regexp [class.hidden]=\"!showFindRegexp\"></pdf-find-regexp>\n <pdf-find-results-count [class.hidden]=\"!showFindResultsCount\"></pdf-find-results-count>\n <pdf-findbar-message-container [class.hidden]=\"!showFindMessages\"></pdf-findbar-message-container>\n</ng-template>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PdfFindbarMessageContainerComponent, selector: "pdf-findbar-message-container" }, { kind: "component", type: i3.PdfFindEntireWordComponent, selector: "pdf-find-entire-word" }, { kind: "component", type: i4.PdfFindHighlightAllComponent, selector: "pdf-find-highlight-all" }, { kind: "component", type: i5.PdfFindInputAreaComponent, selector: "pdf-find-input-area", inputs: ["customFindbarInputArea"] }, { kind: "component", type: i6.PdfFindMatchCaseComponent, selector: "pdf-find-match-case" }, { kind: "component", type: i7.PdfFindMultipleComponent, selector: "pdf-find-multiple" }, { kind: "component", type: i8.PdfFindRegExpComponent, selector: "pdf-find-regexp" }, { kind: "component", type: i9.PdfFindResultsCountComponent, selector: "pdf-find-results-count" }, { kind: "component", type: i10.PdfMatchDiacriticsComponent, selector: "pdf-match-diacritics" }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PdfFindbarComponent, decorators: [{ type: Component, args: [{ selector: 'pdf-findbar', template: "<ng-container [ngTemplateOutlet]=\"customFindbar ? customFindbar : defaultFindbar\"> </ng-container>\n\n<ng-template #defaultFindbar>\n <div class=\"findbar hidden doorHanger\" id=\"findbar\" [style.transform]=\"'scale(' + mobileFriendlyZoomScale + ')'\"\n [style.transformOrigin]=\"'left top'\" [style.left]=\"findbarLeft\" [style.top]=\"findbarTop\">\n <ng-container [ngTemplateOutlet]=\"customFindbarButtons ? customFindbarButtons : defaultFindbarButtons\">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #defaultFindbarButtons>\n <pdf-find-input-area [customFindbarInputArea]=\"customFindbarInputArea\"></pdf-find-input-area>\n <pdf-find-highlight-all [class.hidden]=\"!showFindHighlightAll\"></pdf-find-highlight-all>\n <pdf-find-match-case [class.hidden]=\"!showFindMatchCase\"></pdf-find-match-case>\n <pdf-match-diacritics [class.hidden]=\"!showFindMatchDiacritics\"></pdf-match-diacritics>\n <pdf-find-entire-word [class.hidden]=\"!showFindEntireWord\"></pdf-find-entire-word>\n <pdf-find-multiple [class.hidden]=\"!showFindMultiple\"></pdf-find-multiple>\n <pdf-find-regexp [class.hidden]=\"!showFindRegexp\"></pdf-find-regexp>\n <pdf-find-results-count [class.hidden]=\"!showFindResultsCount\"></pdf-find-results-count>\n <pdf-findbar-message-container [class.hidden]=\"!showFindMessages\"></pdf-findbar-message-container>\n</ng-template>" }] }], propDecorators: { showFindButton: [{ type: Input }], mobileFriendlyZoomScale: [{ type: Input }], findbarLeft: [{ type: Input }], findbarTop: [{ type: Input }], customFindbarInputArea: [{ type: Input }], customFindbar: [{ type: Input }], customFindbarButtons: [{ type: Input }], showFindHighlightAll: [{ type: Input }], showFindMatchCase: [{ type: Input }], showFindEntireWord: [{ type: Input }], showFindMatchDiacritics: [{ type: Input }], showFindResultsCount: [{ type: Input }], showFindMessages: [{ type: Input }], showFindMultiple: [{ type: Input }], showFindRegexp: [{ type: Input }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGRmLWZpbmRiYXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LWV4dGVuZGVkLXBkZi12aWV3ZXIvc3JjL2xpYi90b29sYmFyL3BkZi1maW5kYmFyL3BkZi1maW5kYmFyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1leHRlbmRlZC1wZGYtdmlld2VyL3NyYy9saWIvdG9vbGJhci9wZGYtZmluZGJhci9wZGYtZmluZGJhci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBZSxNQUFNLGVBQWUsQ0FBQzs7Ozs7Ozs7Ozs7O0FBUTlELE1BQU0sT0FBTyxtQkFBbUI7SUFFdkIsY0FBYyxHQUF5QixJQUFJLENBQUM7SUFHNUMsdUJBQXVCLENBQVM7SUFHaEMsV0FBVyxDQUFxQjtJQUdoQyxVQUFVLENBQXFCO0lBRXRDLGtCQUFrQjtJQUVYLHNCQUFzQix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