@progress/kendo-angular-pdfviewer 19.3.0-develop.24 → 19.3.0-develop.26

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.
@@ -3,26 +3,31 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { Directive, Input, forwardRef, Component, Injectable, HostBinding, EventEmitter, ViewChild, Output, ElementRef, HostListener, isDevMode, NgModule } from '@angular/core';
6
+ import { Directive, Input, forwardRef, Component, Injectable, HostBinding, EventEmitter, ViewChild, Output, ElementRef, HostListener, isDevMode, ViewContainerRef, NgModule } from '@angular/core';
7
7
  import * as i1 from '@progress/kendo-angular-l10n';
8
8
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
- import { removeChildren, PdfViewer } from '@progress/kendo-pdfviewer-common';
10
+ import { PdfViewerInteractionMode, removeChildren, PdfViewer } from '@progress/kendo-pdfviewer-common';
11
11
  import { PreventableEvent, Keys, focusableSelector, getLicenseMessage, shouldShowValidationUI, hasObservers, EventsOutsideAngularDirective, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
12
12
  import { saveAs } from '@progress/kendo-file-saver';
13
13
  import { Subscription } from 'rxjs';
14
14
  import { PagerComponent, CustomMessagesComponent } from '@progress/kendo-angular-pager';
15
- import { zoomInIcon, zoomOutIcon, handIcon, pointerIcon, searchIcon, folderOpenIcon, downloadIcon, printIcon, convertLowercaseIcon, arrowUpIcon, arrowDownIcon, xIcon } from '@progress/kendo-svg-icons';
15
+ import { zoomInIcon, zoomOutIcon, handIcon, pointerIcon, searchIcon, folderOpenIcon, downloadIcon, printIcon, trackChangesIcon, highlightIcon, freeTextIcon, xIcon, convertLowercaseIcon, arrowUpIcon, arrowDownIcon, paletteIcon, trashIcon, checkIcon } from '@progress/kendo-svg-icons';
16
16
  import * as i1$1 from '@progress/kendo-angular-dropdowns';
17
- import { ComboBoxComponent, ItemTemplateDirective } from '@progress/kendo-angular-dropdowns';
18
- import { ButtonGroupComponent, ButtonComponent } from '@progress/kendo-angular-buttons';
17
+ import { ComboBoxComponent, ItemTemplateDirective, KENDO_DROPDOWNLIST } from '@progress/kendo-angular-dropdowns';
18
+ import * as i2 from '@progress/kendo-angular-buttons';
19
+ import { ButtonGroupComponent, ButtonComponent, KENDO_BUTTON } from '@progress/kendo-angular-buttons';
19
20
  import { NgFor, NgSwitch, NgSwitchCase, NgIf } from '@angular/common';
20
- import { map } from 'rxjs/operators';
21
- import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@progress/kendo-angular-inputs';
21
+ import { map, take } from 'rxjs/operators';
22
+ import * as i3 from '@progress/kendo-angular-inputs';
23
+ import { TextBoxComponent, TextBoxSuffixTemplateDirective, KENDO_FLATCOLORPICKER } from '@progress/kendo-angular-inputs';
22
24
  import { LoaderComponent as LoaderComponent$1 } from '@progress/kendo-angular-indicators';
23
25
  import 'pdfjs-dist/build/pdf.worker.min.mjs';
24
- import { IconsService } from '@progress/kendo-angular-icons';
26
+ import * as i2$1 from '@progress/kendo-angular-popup';
25
27
  import { PopupService } from '@progress/kendo-angular-popup';
28
+ import * as i1$2 from '@progress/kendo-angular-dialog';
29
+ import { DialogService } from '@progress/kendo-angular-dialog';
30
+ import { IconsService } from '@progress/kendo-angular-icons';
26
31
 
27
32
  /**
28
33
  * @hidden
@@ -128,8 +133,56 @@ class Messages extends ComponentMessages {
128
133
  * Sets the placeholder text for the zoom tool input.
129
134
  */
130
135
  zoomInputPlaceholder;
136
+ /**
137
+ * Sets the title and label for the **Annotation Editor** tool.
138
+ */
139
+ annotationsTitle;
140
+ /**
141
+ * Sets the title and label for the **Annotation Editor** tool.
142
+ */
143
+ annotationEditorTitle;
144
+ /**
145
+ * Sets the title and label for the **Delete Annotation** tool.
146
+ */
147
+ deleteAnnotationTitle;
148
+ /**
149
+ * Sets the title and label for the **Highligh Annotation** tool.
150
+ */
151
+ highlightAnnotationTitle;
152
+ /**
153
+ * Sets the title and label for the **Free Text Annotation** tool.
154
+ */
155
+ freeTextAnnotationTitle;
156
+ /**
157
+ * Sets the title and label for the **Close Annotations Toolbar** tool.
158
+ */
159
+ closeAnnotationsToolbarTitle;
160
+ /**
161
+ * Sets the title of the **Delete Annotation** confirmation dialog.
162
+ */
163
+ deleteAnnotationConfirmationDialogTitle;
164
+ /**
165
+ * Sets the content text of the **Delete Annotation** confirmation dialog.
166
+ */
167
+ deleteAnnotationConfirmationDialogContent;
168
+ /**
169
+ * Sets the text of the **Delete Annotation** confirmation dialog confirm action button.
170
+ */
171
+ deleteAnnotationConfirmationDialogConfirmText;
172
+ /**
173
+ * Sets the text of the **Delete Annotation** confirmation dialog reject action button.
174
+ */
175
+ deleteAnnotationConfirmationDialogRejectText;
176
+ /**
177
+ * Sets the text of the **Font Size** section in the annotation editor dialog.
178
+ */
179
+ annotationEditorFontSizeTitle;
180
+ /**
181
+ * Sets the text of the **Color** section in the annotation editor dialog.
182
+ */
183
+ annotationEditorColorTitle;
131
184
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
132
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendo-pdfviewer-messages-base", inputs: { zoomInTitle: "zoomInTitle", zoomOutTitle: "zoomOutTitle", selectionTitle: "selectionTitle", panningTitle: "panningTitle", searchTitle: "searchTitle", openTitle: "openTitle", downloadTitle: "downloadTitle", printTitle: "printTitle", pagerInputLabel: "pagerInputLabel", pagerInputTitle: "pagerInputTitle", pagerFirstPage: "pagerFirstPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerLastPage: "pagerLastPage", pagerOf: "pagerOf", pagerPage: "pagerPage", fitToPage: "fitToPage", fitToWidth: "fitToWidth", searchInputPlaceholder: "searchInputPlaceholder", searchMatchesOf: "searchMatchesOf", searchPreviousMatchTitle: "searchPreviousMatchTitle", searchNextMatchTitle: "searchNextMatchTitle", searchCloseTitle: "searchCloseTitle", searchMatchCaseTitle: "searchMatchCaseTitle", zoomInputPlaceholder: "zoomInputPlaceholder" }, usesInheritance: true, ngImport: i0 });
185
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendo-pdfviewer-messages-base", inputs: { zoomInTitle: "zoomInTitle", zoomOutTitle: "zoomOutTitle", selectionTitle: "selectionTitle", panningTitle: "panningTitle", searchTitle: "searchTitle", openTitle: "openTitle", downloadTitle: "downloadTitle", printTitle: "printTitle", pagerInputLabel: "pagerInputLabel", pagerInputTitle: "pagerInputTitle", pagerFirstPage: "pagerFirstPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerLastPage: "pagerLastPage", pagerOf: "pagerOf", pagerPage: "pagerPage", fitToPage: "fitToPage", fitToWidth: "fitToWidth", searchInputPlaceholder: "searchInputPlaceholder", searchMatchesOf: "searchMatchesOf", searchPreviousMatchTitle: "searchPreviousMatchTitle", searchNextMatchTitle: "searchNextMatchTitle", searchCloseTitle: "searchCloseTitle", searchMatchCaseTitle: "searchMatchCaseTitle", zoomInputPlaceholder: "zoomInputPlaceholder", annotationsTitle: "annotationsTitle", annotationEditorTitle: "annotationEditorTitle", deleteAnnotationTitle: "deleteAnnotationTitle", highlightAnnotationTitle: "highlightAnnotationTitle", freeTextAnnotationTitle: "freeTextAnnotationTitle", closeAnnotationsToolbarTitle: "closeAnnotationsToolbarTitle", deleteAnnotationConfirmationDialogTitle: "deleteAnnotationConfirmationDialogTitle", deleteAnnotationConfirmationDialogContent: "deleteAnnotationConfirmationDialogContent", deleteAnnotationConfirmationDialogConfirmText: "deleteAnnotationConfirmationDialogConfirmText", deleteAnnotationConfirmationDialogRejectText: "deleteAnnotationConfirmationDialogRejectText", annotationEditorFontSizeTitle: "annotationEditorFontSizeTitle", annotationEditorColorTitle: "annotationEditorColorTitle" }, usesInheritance: true, ngImport: i0 });
133
186
  }
134
187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
135
188
  type: Directive,
@@ -187,6 +240,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
187
240
  type: Input
188
241
  }], zoomInputPlaceholder: [{
189
242
  type: Input
243
+ }], annotationsTitle: [{
244
+ type: Input
245
+ }], annotationEditorTitle: [{
246
+ type: Input
247
+ }], deleteAnnotationTitle: [{
248
+ type: Input
249
+ }], highlightAnnotationTitle: [{
250
+ type: Input
251
+ }], freeTextAnnotationTitle: [{
252
+ type: Input
253
+ }], closeAnnotationsToolbarTitle: [{
254
+ type: Input
255
+ }], deleteAnnotationConfirmationDialogTitle: [{
256
+ type: Input
257
+ }], deleteAnnotationConfirmationDialogContent: [{
258
+ type: Input
259
+ }], deleteAnnotationConfirmationDialogConfirmText: [{
260
+ type: Input
261
+ }], deleteAnnotationConfirmationDialogRejectText: [{
262
+ type: Input
263
+ }], annotationEditorFontSizeTitle: [{
264
+ type: Input
265
+ }], annotationEditorColorTitle: [{
266
+ type: Input
190
267
  }] } });
191
268
 
192
269
  /**
@@ -240,8 +317,8 @@ const packageMetadata = {
240
317
  productName: 'Kendo UI for Angular',
241
318
  productCode: 'KENDOUIANGULAR',
242
319
  productCodes: ['KENDOUIANGULAR'],
243
- publishDate: 1754485529,
244
- version: '19.3.0-develop.24',
320
+ publishDate: 1754555459,
321
+ version: '19.3.0-develop.26',
245
322
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
246
323
  };
247
324
 
@@ -320,6 +397,10 @@ const zoomToFitOptions = {
320
397
  'fitToPage': 'FitToPage',
321
398
  'fitToWidth': 'FitToWidth'
322
399
  };
400
+ /**
401
+ * @hidden
402
+ */
403
+ const fontSizes = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
323
404
 
324
405
  /**
325
406
  * Represents the arguments for the PDFViewer `download` event. The event fires when the user clicks the **Download** tool. Canceling the event prevents the download.
@@ -589,6 +670,10 @@ class ToolbarComponent {
589
670
  zoomOptionsData;
590
671
  pagesContainerId;
591
672
  tools;
673
+ type = 'tools';
674
+ wrapperId;
675
+ isAnnotationsToolbarVisible = false;
676
+ annotationsToolId;
592
677
  fileSelect = new EventEmitter();
593
678
  fileSelectStart = new EventEmitter();
594
679
  fileSelectError = new EventEmitter();
@@ -601,6 +686,8 @@ class ToolbarComponent {
601
686
  zoomLevelChange = new EventEmitter();
602
687
  print = new EventEmitter();
603
688
  search = new EventEmitter();
689
+ toggleAnnotationsToolbar = new EventEmitter();
690
+ setAnnotationMode = new EventEmitter();
604
691
  zoomInIcon = zoomInIcon;
605
692
  zoomOutIcon = zoomOutIcon;
606
693
  handIcon = handIcon;
@@ -609,7 +696,14 @@ class ToolbarComponent {
609
696
  folderOpenIcon = folderOpenIcon;
610
697
  downloadIcon = downloadIcon;
611
698
  printIcon = printIcon;
699
+ trackChangesIcon = trackChangesIcon;
700
+ highlightIcon = highlightIcon;
701
+ freeTextIcon = freeTextIcon;
702
+ xIcon = xIcon;
612
703
  pagerType = 'input';
704
+ isSelectionEnabled = false;
705
+ isHighlightMode;
706
+ isFreeTextMode;
613
707
  constructor(localization, navigationService) {
614
708
  this.localization = localization;
615
709
  this.navigationService = navigationService;
@@ -638,6 +732,16 @@ class ToolbarComponent {
638
732
  focus() {
639
733
  this.navigationService.focusableTools[this.navigationService.currentFocusIndex].activate();
640
734
  }
735
+ onHighlightClick() {
736
+ this.isHighlightMode = !this.isHighlightMode;
737
+ this.isFreeTextMode = false;
738
+ this.setAnnotationMode.emit(this.isHighlightMode ? 'highlight' : 'none');
739
+ }
740
+ onFreeTextClick() {
741
+ this.isFreeTextMode = !this.isFreeTextMode;
742
+ this.isHighlightMode = false;
743
+ this.setAnnotationMode.emit(this.isFreeTextMode ? 'freeText' : 'none');
744
+ }
641
745
  valueNormalizer = (text) => text.pipe(map((value) => {
642
746
  const parsedValue = parseFloat(value);
643
747
  const newValue = Number.isNaN(parsedValue) ? 1 : parsedValue / 100;
@@ -648,184 +752,250 @@ class ToolbarComponent {
648
752
  };
649
753
  }));
650
754
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.LocalizationService }, { token: ToolbarNavigationService }], target: i0.ɵɵFactoryTarget.Component });
651
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarComponent, isStandalone: true, selector: "[kendoPDFViewerToolbar]", inputs: { zoomLevel: "zoomLevel", calculatedComboBoxValue: "calculatedComboBoxValue", skip: "skip", pageSize: "pageSize", total: "total", zoomInDisabled: "zoomInDisabled", zoomOutDisabled: "zoomOutDisabled", disabledTools: "disabledTools", zoomLevelChooserValue: "zoomLevelChooserValue", zoomOptionsData: "zoomOptionsData", pagesContainerId: "pagesContainerId", tools: "tools" }, outputs: { fileSelect: "fileSelect", fileSelectStart: "fileSelectStart", fileSelectError: "fileSelectError", download: "download", selectionEnabled: "selectionEnabled", panningEnabled: "panningEnabled", pageChange: "pageChange", zoomIn: "zoomIn", zoomOut: "zoomOut", zoomLevelChange: "zoomLevelChange", print: "print", search: "search" }, host: { properties: { "class.k-toolbar": "this.toolbarClasses", "class.k-toolbar-md": "this.toolbarClasses", "class.k-toolbar-flat": "this.toolbarClasses" } }, providers: [ToolbarNavigationService], viewQueries: [{ propertyName: "fileSelectEl", first: true, predicate: ["fileSelectEl"], descendants: true }], ngImport: i0, template: `
652
- <ng-container *ngFor="let tool of tools">
653
- <ng-container [ngSwitch]="tool">
654
- <kendo-toolbar-input-wrapper
655
- *ngSwitchCase="'pager'"
656
- kendoPDFViewerToolbarFocusable
657
- [toolbarTool]="pager">
658
- <kendo-datapager
659
- #pager
755
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarComponent, isStandalone: true, selector: "[kendoPDFViewerToolbar]", inputs: { zoomLevel: "zoomLevel", calculatedComboBoxValue: "calculatedComboBoxValue", skip: "skip", pageSize: "pageSize", total: "total", zoomInDisabled: "zoomInDisabled", zoomOutDisabled: "zoomOutDisabled", disabledTools: "disabledTools", zoomLevelChooserValue: "zoomLevelChooserValue", zoomOptionsData: "zoomOptionsData", pagesContainerId: "pagesContainerId", tools: "tools", type: "type", wrapperId: "wrapperId", isAnnotationsToolbarVisible: "isAnnotationsToolbarVisible", annotationsToolId: "annotationsToolId" }, outputs: { fileSelect: "fileSelect", fileSelectStart: "fileSelectStart", fileSelectError: "fileSelectError", download: "download", selectionEnabled: "selectionEnabled", panningEnabled: "panningEnabled", pageChange: "pageChange", zoomIn: "zoomIn", zoomOut: "zoomOut", zoomLevelChange: "zoomLevelChange", print: "print", search: "search", toggleAnnotationsToolbar: "toggleAnnotationsToolbar", setAnnotationMode: "setAnnotationMode" }, host: { properties: { "class.k-toolbar": "this.toolbarClasses", "class.k-toolbar-md": "this.toolbarClasses", "class.k-toolbar-flat": "this.toolbarClasses" } }, providers: [ToolbarNavigationService], viewQueries: [{ propertyName: "fileSelectEl", first: true, predicate: ["fileSelectEl"], descendants: true }], ngImport: i0, template: `
756
+ <ng-container *ngIf="type === 'tools'">
757
+ <ng-container *ngFor="let tool of tools">
758
+ <ng-container [ngSwitch]="tool">
759
+ <kendo-toolbar-input-wrapper
760
+ *ngSwitchCase="'pager'"
761
+ kendoPDFViewerToolbarFocusable
762
+ [toolbarTool]="pager">
763
+ <kendo-datapager
764
+ #pager
765
+ [attr.aria-controls]="pagesContainerId"
766
+ [attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
767
+ [class.k-disabled]="disabledTools"
768
+ [navigable]="true"
769
+ [pageSize]="pageSize"
770
+ [skip]="skip"
771
+ [total]="total"
772
+ [pageSizeValues]="false"
773
+ [info]="false"
774
+ [type]="pagerType"
775
+ (pageChange)="pageChange.emit($event)">
776
+ <kendo-datapager-messages
777
+ [firstPage]="messageFor('pagerFirstPage')"
778
+ [previousPage]="messageFor('pagerPreviousPage')"
779
+ [nextPage]="messageFor('pagerNextPage')"
780
+ [lastPage]="messageFor('pagerLastPage')"
781
+ [inputLabel]="messageFor('pagerInputLabel')"
782
+ [pageNumberInputTitle]="messageFor('pagerInputTitle')"
783
+ [of]="messageFor('pagerOf')"
784
+ [page]="messageFor('pagerPage')"></kendo-datapager-messages>
785
+ </kendo-datapager>
786
+ </kendo-toolbar-input-wrapper>
787
+ <span
788
+ *ngSwitchCase="'spacer'"
789
+ class="k-spacer"></span>
790
+ <kendo-buttongroup
791
+ *ngSwitchCase="'zoomInOut'"
660
792
  [attr.aria-controls]="pagesContainerId"
661
- [attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
662
- [class.k-disabled]="disabledTools"
663
- [navigable]="true"
664
- [pageSize]="pageSize"
665
- [skip]="skip"
666
- [total]="total"
667
- [pageSizeValues]="false"
668
- [info]="false"
669
- [type]="pagerType"
670
- (pageChange)="pageChange.emit($event)">
671
- <kendo-datapager-messages
672
- [firstPage]="messageFor('pagerFirstPage')"
673
- [previousPage]="messageFor('pagerPreviousPage')"
674
- [nextPage]="messageFor('pagerNextPage')"
675
- [lastPage]="messageFor('pagerLastPage')"
676
- [inputLabel]="messageFor('pagerInputLabel')"
677
- [pageNumberInputTitle]="messageFor('pagerInputTitle')"
678
- [of]="messageFor('pagerOf')"
679
- [page]="messageFor('pagerPage')"></kendo-datapager-messages>
680
- </kendo-datapager>
681
- </kendo-toolbar-input-wrapper>
682
- <span
683
- *ngSwitchCase="'spacer'"
684
- class="k-spacer"></span>
685
- <kendo-buttongroup
686
- *ngSwitchCase="'zoomInOut'"
687
- [attr.aria-controls]="pagesContainerId"
688
- class="k-button-group-flat k-toolbar-button-group"
689
- [navigable]="false">
793
+ class="k-button-group-flat k-toolbar-button-group"
794
+ [navigable]="false">
795
+ <button
796
+ type="button"
797
+ kendoButton
798
+ fillMode="flat"
799
+ kendoPDFViewerToolbarFocusable
800
+ icon="zoom-out"
801
+ [disabled]="disabledTools || zoomOutDisabled"
802
+ [svgIcon]="zoomOutIcon"
803
+ [attr.title]="messageFor('zoomOutTitle')"
804
+ [attr.aria-label]="messageFor('zoomOutTitle')"
805
+ (click)="zoomOut.emit()"></button>
806
+ <button
807
+ type="button"
808
+ kendoButton
809
+ fillMode="flat"
810
+ kendoPDFViewerToolbarFocusable
811
+ icon="zoom-in"
812
+ [disabled]="disabledTools || zoomInDisabled"
813
+ [svgIcon]="zoomInIcon"
814
+ [attr.title]="messageFor('zoomInTitle')"
815
+ [attr.aria-label]="messageFor('zoomInTitle')"
816
+ (click)="zoomIn.emit()"></button>
817
+ </kendo-buttongroup>
818
+ <kendo-toolbar-input-wrapper
819
+ *ngSwitchCase="'zoom'"
820
+ kendoPDFViewerToolbarFocusable
821
+ [toolbarTool]="combobox">
822
+ <kendo-combobox
823
+ #combobox
824
+ kendoPDFViewerComboBox
825
+ class="k-toolbar-combobox"
826
+ fillMode="flat"
827
+ [attr.aria-controls]="pagesContainerId"
828
+ [tabindex]="-1"
829
+ [data]="zoomOptionsData"
830
+ [disabled]="disabledTools"
831
+ [placeholder]="messageFor('zoomInputPlaceholder')"
832
+ textField="displayValue"
833
+ valueField="id"
834
+ [value]="zoomLevelChooserValue"
835
+ [allowCustom]="true"
836
+ [valueNormalizer]="valueNormalizer"
837
+ [clearButton]="false"
838
+ (valueChange)="onZoomLevelChooserValueChange($event)">
839
+ <ng-template kendoComboBoxItemTemplate let-dataItem>
840
+ {{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
841
+ </ng-template>
842
+ </kendo-combobox>
843
+ </kendo-toolbar-input-wrapper>
844
+ <kendo-buttongroup
845
+ *ngSwitchCase="'selection'"
846
+ [attr.aria-controls]="pagesContainerId"
847
+ [navigable]="false"
848
+ class="k-button-group-flat k-toolbar-button-group"
849
+ selection="single">
850
+ <button
851
+ type="button"
852
+ kendoButton
853
+ kendoPDFViewerToolbarFocusable
854
+ fillMode="flat"
855
+ icon="pointer"
856
+ [toggleable]="true"
857
+ [svgIcon]="pointerIcon"
858
+ [attr.title]="messageFor('selectionTitle')"
859
+ [attr.aria-label]="messageFor('selectionTitle')"
860
+ (click)="selectionEnabled.emit(); isSelectionEnabled = true;"></button>
861
+ <button
862
+ type="button"
863
+ kendoButton
864
+ kendoPDFViewerToolbarFocusable
865
+ fillMode="flat"
866
+ icon="hand"
867
+ [svgIcon]="handIcon"
868
+ [toggleable]="true"
869
+ [selected]="true"
870
+ [attr.title]="messageFor('panningTitle')"
871
+ [attr.aria-label]="messageFor('panningTitle')"
872
+ (click)="panningEnabled.emit(); isSelectionEnabled = false;"></button>
873
+ </kendo-buttongroup>
690
874
  <button
875
+ *ngSwitchCase="'search'"
691
876
  type="button"
877
+ kendoPDFViewerToolbarFocusable
692
878
  kendoButton
879
+ class="k-toolbar-button"
693
880
  fillMode="flat"
694
- kendoPDFViewerToolbarFocusable
695
- icon="zoom-out"
696
- [disabled]="disabledTools || zoomOutDisabled"
697
- [svgIcon]="zoomOutIcon"
698
- [attr.title]="messageFor('zoomOutTitle')"
699
- [attr.aria-label]="messageFor('zoomOutTitle')"
700
- (click)="zoomOut.emit()"></button>
881
+ icon="search"
882
+ [disabled]="disabledTools"
883
+ [attr.title]="messageFor('searchTitle')"
884
+ [attr.aria-label]="messageFor('searchTitle')"
885
+ aria-haspopup="dialog"
886
+ [svgIcon]="searchIcon"
887
+ (click)="search.emit()"></button>
701
888
  <button
889
+ *ngSwitchCase="'open'"
702
890
  type="button"
703
- kendoButton
704
891
  fillMode="flat"
705
892
  kendoPDFViewerToolbarFocusable
706
- icon="zoom-in"
707
- [disabled]="disabledTools || zoomInDisabled"
708
- [svgIcon]="zoomInIcon"
709
- [attr.title]="messageFor('zoomInTitle')"
710
- [attr.aria-label]="messageFor('zoomInTitle')"
711
- (click)="zoomIn.emit()"></button>
712
- </kendo-buttongroup>
713
- <kendo-toolbar-input-wrapper
714
- *ngSwitchCase="'zoom'"
715
- kendoPDFViewerToolbarFocusable
716
- [toolbarTool]="combobox">
717
- <kendo-combobox
718
- #combobox
719
- kendoPDFViewerComboBox
720
- class="k-toolbar-combobox"
893
+ kendoButton
894
+ class="k-toolbar-button"
721
895
  fillMode="flat"
896
+ icon="folder-open"
897
+ [svgIcon]="folderOpenIcon"
898
+ [attr.title]="messageFor('openTitle')"
899
+ [attr.aria-label]="messageFor('openTitle')"
722
900
  [attr.aria-controls]="pagesContainerId"
723
- [tabindex]="-1"
724
- [data]="zoomOptionsData"
725
- [disabled]="disabledTools"
726
- [placeholder]="messageFor('zoomInputPlaceholder')"
727
- textField="displayValue"
728
- valueField="id"
729
- [value]="zoomLevelChooserValue"
730
- [allowCustom]="true"
731
- [valueNormalizer]="valueNormalizer"
732
- [clearButton]="false"
733
- (valueChange)="onZoomLevelChooserValueChange($event)">
734
- <ng-template kendoComboBoxItemTemplate let-dataItem>
735
- {{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
736
- </ng-template>
737
- </kendo-combobox>
738
- </kendo-toolbar-input-wrapper>
739
- <kendo-buttongroup
740
- *ngSwitchCase="'selection'"
741
- [attr.aria-controls]="pagesContainerId"
742
- [navigable]="false"
743
- class="k-button-group-flat k-toolbar-button-group"
744
- selection="single">
901
+ (click)="fileSelectEl?.nativeElement.click()">
902
+ </button>
745
903
  <button
904
+ *ngSwitchCase="'download'"
746
905
  type="button"
747
- kendoButton
748
- kendoPDFViewerToolbarFocusable
749
906
  fillMode="flat"
750
- icon="pointer"
751
- [toggleable]="true"
752
- [svgIcon]="pointerIcon"
753
- [attr.title]="messageFor('selectionTitle')"
754
- [attr.aria-label]="messageFor('selectionTitle')"
755
- (click)="selectionEnabled.emit()"></button>
907
+ kendoPDFViewerToolbarFocusable
908
+ kendoButton
909
+ class="k-toolbar-button"
910
+ icon="download"
911
+ [svgIcon]="downloadIcon"
912
+ [disabled]="disabledTools"
913
+ [attr.title]="messageFor('downloadTitle')"
914
+ [attr.aria-label]="messageFor('downloadTitle')"
915
+ (click)="download.emit()"></button>
756
916
  <button
917
+ *ngSwitchCase="'print'"
757
918
  type="button"
919
+ fillMode="flat"
920
+ kendoPDFViewerToolbarFocusable
758
921
  kendoButton
922
+ class="k-toolbar-button"
923
+ icon="print"
924
+ [svgIcon]="printIcon"
925
+ [disabled]="disabledTools"
926
+ [attr.title]="messageFor('printTitle')"
927
+ [attr.aria-label]="messageFor('printTitle')"
928
+ (click)="print.emit()"></button>
929
+ <button
930
+ *ngSwitchCase="'annotations'"
931
+ type="button"
932
+ [attr.id]="annotationsToolId"
759
933
  kendoPDFViewerToolbarFocusable
934
+ kendoButton
935
+ class="k-toolbar-button"
760
936
  fillMode="flat"
761
- icon="hand"
762
- [svgIcon]="handIcon"
763
- [toggleable]="true"
764
- [selected]="true"
765
- [attr.title]="messageFor('panningTitle')"
766
- [attr.aria-label]="messageFor('panningTitle')"
767
- (click)="panningEnabled.emit()"></button>
768
- </kendo-buttongroup>
769
- <button
770
- *ngSwitchCase="'search'"
771
- type="button"
772
- kendoPDFViewerToolbarFocusable
773
- kendoButton
774
- class="k-toolbar-button"
775
- fillMode="flat"
776
- icon="search"
777
- [disabled]="disabledTools"
778
- [attr.title]="messageFor('searchTitle')"
779
- [attr.aria-label]="messageFor('searchTitle')"
780
- aria-haspopup="dialog"
781
- [svgIcon]="searchIcon"
782
- (click)="search.emit()"></button>
783
- <button
784
- *ngSwitchCase="'open'"
785
- type="button"
786
- fillMode="flat"
787
- kendoPDFViewerToolbarFocusable
788
- kendoButton
789
- class="k-toolbar-button"
790
- fillMode="flat"
791
- icon="folder-open"
792
- [svgIcon]="folderOpenIcon"
793
- [attr.title]="messageFor('openTitle')"
794
- [attr.aria-label]="messageFor('openTitle')"
795
- [attr.aria-controls]="pagesContainerId"
796
- (click)="fileSelectEl?.nativeElement.click()">
797
- </button>
798
- <button
799
- *ngSwitchCase="'download'"
800
- type="button"
801
- fillMode="flat"
802
- kendoPDFViewerToolbarFocusable
803
- kendoButton
804
- class="k-toolbar-button"
805
- icon="download"
806
- [svgIcon]="downloadIcon"
807
- [disabled]="disabledTools"
808
- [attr.title]="messageFor('downloadTitle')"
809
- [attr.aria-label]="messageFor('downloadTitle')"
810
- (click)="download.emit()"></button>
811
- <button
812
- *ngSwitchCase="'print'"
813
- type="button"
814
- fillMode="flat"
815
- kendoPDFViewerToolbarFocusable
816
- kendoButton
817
- class="k-toolbar-button"
818
- icon="print"
819
- [svgIcon]="printIcon"
820
- [disabled]="disabledTools"
821
- [attr.title]="messageFor('printTitle')"
822
- [attr.aria-label]="messageFor('printTitle')"
823
- (click)="print.emit()"></button>
937
+ icon="track-changes"
938
+ [selected]="isAnnotationsToolbarVisible"
939
+ [disabled]="disabledTools || !isSelectionEnabled"
940
+ [attr.title]="messageFor('annotationsTitle')"
941
+ [attr.aria-label]="messageFor('annotationsTitle')"
942
+ [attr.aria-controls]="wrapperId"
943
+ [attr.aria-expanded]="isAnnotationsToolbarVisible"
944
+ [svgIcon]="trackChangesIcon"
945
+ (click)="toggleAnnotationsToolbar.emit();"></button>
946
+ </ng-container>
824
947
  </ng-container>
825
948
  </ng-container>
949
+ <ng-container *ngIf="type === 'annotations'">
950
+ <button
951
+ type="button"
952
+ kendoPDFViewerToolbarFocusable
953
+ kendoButton
954
+ class="k-toolbar-button"
955
+ fillMode="flat"
956
+ icon="highlight"
957
+ [selected]="isHighlightMode"
958
+ [disabled]="disabledTools"
959
+ [attr.title]="messageFor('highlightAnnotationTitle')"
960
+ [attr.aria-label]="messageFor('highlightAnnotationTitle')"
961
+ aria-haspopup="dialog"
962
+ [svgIcon]="highlightIcon"
963
+ (click)="onHighlightClick()"></button>
964
+ <div class="k-toolbar-separator k-separator"></div>
965
+ <button
966
+ type="button"
967
+ fillMode="flat"
968
+ kendoPDFViewerToolbarFocusable
969
+ kendoButton
970
+ [selected]="isFreeTextMode"
971
+ class="k-toolbar-button"
972
+ fillMode="flat"
973
+ icon="free-text"
974
+ [svgIcon]="freeTextIcon"
975
+ [attr.title]="messageFor('freeTextAnnotationTitle')"
976
+ [attr.aria-label]="messageFor('freeTextAnnotationTitle')"
977
+ [attr.aria-controls]="pagesContainerId"
978
+ (click)="onFreeTextClick()">
979
+ </button>
980
+ <span class="k-spacer"></span>
981
+ <button
982
+ type="button"
983
+ fillMode="flat"
984
+ kendoPDFViewerToolbarFocusable
985
+ kendoButton
986
+ class="k-toolbar-button"
987
+ fillMode="flat"
988
+ icon="x"
989
+ [svgIcon]="xIcon"
990
+ [attr.title]="messageFor('closeAnnotationsToolbarTitle')"
991
+ [attr.aria-label]="messageFor('closeAnnotationsToolbarTitle')"
992
+ [attr.aria-controls]="pagesContainerId"
993
+ (click)="toggleAnnotationsToolbar.emit();">
994
+ </button>
995
+ </ng-container>
826
996
  <input
827
997
  #fileSelectEl
828
- *ngIf="tools?.indexOf('open') > -1;"
998
+ *ngIf="type === 'tools' &&tools?.indexOf('open') > -1;"
829
999
  type="file"
830
1000
  [style.display]="'none'"
831
1001
  aria-hidden="true"
@@ -839,183 +1009,249 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
839
1009
  selector: '[kendoPDFViewerToolbar]',
840
1010
  providers: [ToolbarNavigationService],
841
1011
  template: `
842
- <ng-container *ngFor="let tool of tools">
843
- <ng-container [ngSwitch]="tool">
844
- <kendo-toolbar-input-wrapper
845
- *ngSwitchCase="'pager'"
846
- kendoPDFViewerToolbarFocusable
847
- [toolbarTool]="pager">
848
- <kendo-datapager
849
- #pager
1012
+ <ng-container *ngIf="type === 'tools'">
1013
+ <ng-container *ngFor="let tool of tools">
1014
+ <ng-container [ngSwitch]="tool">
1015
+ <kendo-toolbar-input-wrapper
1016
+ *ngSwitchCase="'pager'"
1017
+ kendoPDFViewerToolbarFocusable
1018
+ [toolbarTool]="pager">
1019
+ <kendo-datapager
1020
+ #pager
1021
+ [attr.aria-controls]="pagesContainerId"
1022
+ [attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
1023
+ [class.k-disabled]="disabledTools"
1024
+ [navigable]="true"
1025
+ [pageSize]="pageSize"
1026
+ [skip]="skip"
1027
+ [total]="total"
1028
+ [pageSizeValues]="false"
1029
+ [info]="false"
1030
+ [type]="pagerType"
1031
+ (pageChange)="pageChange.emit($event)">
1032
+ <kendo-datapager-messages
1033
+ [firstPage]="messageFor('pagerFirstPage')"
1034
+ [previousPage]="messageFor('pagerPreviousPage')"
1035
+ [nextPage]="messageFor('pagerNextPage')"
1036
+ [lastPage]="messageFor('pagerLastPage')"
1037
+ [inputLabel]="messageFor('pagerInputLabel')"
1038
+ [pageNumberInputTitle]="messageFor('pagerInputTitle')"
1039
+ [of]="messageFor('pagerOf')"
1040
+ [page]="messageFor('pagerPage')"></kendo-datapager-messages>
1041
+ </kendo-datapager>
1042
+ </kendo-toolbar-input-wrapper>
1043
+ <span
1044
+ *ngSwitchCase="'spacer'"
1045
+ class="k-spacer"></span>
1046
+ <kendo-buttongroup
1047
+ *ngSwitchCase="'zoomInOut'"
1048
+ [attr.aria-controls]="pagesContainerId"
1049
+ class="k-button-group-flat k-toolbar-button-group"
1050
+ [navigable]="false">
1051
+ <button
1052
+ type="button"
1053
+ kendoButton
1054
+ fillMode="flat"
1055
+ kendoPDFViewerToolbarFocusable
1056
+ icon="zoom-out"
1057
+ [disabled]="disabledTools || zoomOutDisabled"
1058
+ [svgIcon]="zoomOutIcon"
1059
+ [attr.title]="messageFor('zoomOutTitle')"
1060
+ [attr.aria-label]="messageFor('zoomOutTitle')"
1061
+ (click)="zoomOut.emit()"></button>
1062
+ <button
1063
+ type="button"
1064
+ kendoButton
1065
+ fillMode="flat"
1066
+ kendoPDFViewerToolbarFocusable
1067
+ icon="zoom-in"
1068
+ [disabled]="disabledTools || zoomInDisabled"
1069
+ [svgIcon]="zoomInIcon"
1070
+ [attr.title]="messageFor('zoomInTitle')"
1071
+ [attr.aria-label]="messageFor('zoomInTitle')"
1072
+ (click)="zoomIn.emit()"></button>
1073
+ </kendo-buttongroup>
1074
+ <kendo-toolbar-input-wrapper
1075
+ *ngSwitchCase="'zoom'"
1076
+ kendoPDFViewerToolbarFocusable
1077
+ [toolbarTool]="combobox">
1078
+ <kendo-combobox
1079
+ #combobox
1080
+ kendoPDFViewerComboBox
1081
+ class="k-toolbar-combobox"
1082
+ fillMode="flat"
1083
+ [attr.aria-controls]="pagesContainerId"
1084
+ [tabindex]="-1"
1085
+ [data]="zoomOptionsData"
1086
+ [disabled]="disabledTools"
1087
+ [placeholder]="messageFor('zoomInputPlaceholder')"
1088
+ textField="displayValue"
1089
+ valueField="id"
1090
+ [value]="zoomLevelChooserValue"
1091
+ [allowCustom]="true"
1092
+ [valueNormalizer]="valueNormalizer"
1093
+ [clearButton]="false"
1094
+ (valueChange)="onZoomLevelChooserValueChange($event)">
1095
+ <ng-template kendoComboBoxItemTemplate let-dataItem>
1096
+ {{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
1097
+ </ng-template>
1098
+ </kendo-combobox>
1099
+ </kendo-toolbar-input-wrapper>
1100
+ <kendo-buttongroup
1101
+ *ngSwitchCase="'selection'"
850
1102
  [attr.aria-controls]="pagesContainerId"
851
- [attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
852
- [class.k-disabled]="disabledTools"
853
- [navigable]="true"
854
- [pageSize]="pageSize"
855
- [skip]="skip"
856
- [total]="total"
857
- [pageSizeValues]="false"
858
- [info]="false"
859
- [type]="pagerType"
860
- (pageChange)="pageChange.emit($event)">
861
- <kendo-datapager-messages
862
- [firstPage]="messageFor('pagerFirstPage')"
863
- [previousPage]="messageFor('pagerPreviousPage')"
864
- [nextPage]="messageFor('pagerNextPage')"
865
- [lastPage]="messageFor('pagerLastPage')"
866
- [inputLabel]="messageFor('pagerInputLabel')"
867
- [pageNumberInputTitle]="messageFor('pagerInputTitle')"
868
- [of]="messageFor('pagerOf')"
869
- [page]="messageFor('pagerPage')"></kendo-datapager-messages>
870
- </kendo-datapager>
871
- </kendo-toolbar-input-wrapper>
872
- <span
873
- *ngSwitchCase="'spacer'"
874
- class="k-spacer"></span>
875
- <kendo-buttongroup
876
- *ngSwitchCase="'zoomInOut'"
877
- [attr.aria-controls]="pagesContainerId"
878
- class="k-button-group-flat k-toolbar-button-group"
879
- [navigable]="false">
1103
+ [navigable]="false"
1104
+ class="k-button-group-flat k-toolbar-button-group"
1105
+ selection="single">
1106
+ <button
1107
+ type="button"
1108
+ kendoButton
1109
+ kendoPDFViewerToolbarFocusable
1110
+ fillMode="flat"
1111
+ icon="pointer"
1112
+ [toggleable]="true"
1113
+ [svgIcon]="pointerIcon"
1114
+ [attr.title]="messageFor('selectionTitle')"
1115
+ [attr.aria-label]="messageFor('selectionTitle')"
1116
+ (click)="selectionEnabled.emit(); isSelectionEnabled = true;"></button>
1117
+ <button
1118
+ type="button"
1119
+ kendoButton
1120
+ kendoPDFViewerToolbarFocusable
1121
+ fillMode="flat"
1122
+ icon="hand"
1123
+ [svgIcon]="handIcon"
1124
+ [toggleable]="true"
1125
+ [selected]="true"
1126
+ [attr.title]="messageFor('panningTitle')"
1127
+ [attr.aria-label]="messageFor('panningTitle')"
1128
+ (click)="panningEnabled.emit(); isSelectionEnabled = false;"></button>
1129
+ </kendo-buttongroup>
880
1130
  <button
1131
+ *ngSwitchCase="'search'"
881
1132
  type="button"
1133
+ kendoPDFViewerToolbarFocusable
882
1134
  kendoButton
1135
+ class="k-toolbar-button"
883
1136
  fillMode="flat"
884
- kendoPDFViewerToolbarFocusable
885
- icon="zoom-out"
886
- [disabled]="disabledTools || zoomOutDisabled"
887
- [svgIcon]="zoomOutIcon"
888
- [attr.title]="messageFor('zoomOutTitle')"
889
- [attr.aria-label]="messageFor('zoomOutTitle')"
890
- (click)="zoomOut.emit()"></button>
1137
+ icon="search"
1138
+ [disabled]="disabledTools"
1139
+ [attr.title]="messageFor('searchTitle')"
1140
+ [attr.aria-label]="messageFor('searchTitle')"
1141
+ aria-haspopup="dialog"
1142
+ [svgIcon]="searchIcon"
1143
+ (click)="search.emit()"></button>
891
1144
  <button
1145
+ *ngSwitchCase="'open'"
892
1146
  type="button"
893
- kendoButton
894
1147
  fillMode="flat"
895
1148
  kendoPDFViewerToolbarFocusable
896
- icon="zoom-in"
897
- [disabled]="disabledTools || zoomInDisabled"
898
- [svgIcon]="zoomInIcon"
899
- [attr.title]="messageFor('zoomInTitle')"
900
- [attr.aria-label]="messageFor('zoomInTitle')"
901
- (click)="zoomIn.emit()"></button>
902
- </kendo-buttongroup>
903
- <kendo-toolbar-input-wrapper
904
- *ngSwitchCase="'zoom'"
905
- kendoPDFViewerToolbarFocusable
906
- [toolbarTool]="combobox">
907
- <kendo-combobox
908
- #combobox
909
- kendoPDFViewerComboBox
910
- class="k-toolbar-combobox"
1149
+ kendoButton
1150
+ class="k-toolbar-button"
911
1151
  fillMode="flat"
1152
+ icon="folder-open"
1153
+ [svgIcon]="folderOpenIcon"
1154
+ [attr.title]="messageFor('openTitle')"
1155
+ [attr.aria-label]="messageFor('openTitle')"
912
1156
  [attr.aria-controls]="pagesContainerId"
913
- [tabindex]="-1"
914
- [data]="zoomOptionsData"
915
- [disabled]="disabledTools"
916
- [placeholder]="messageFor('zoomInputPlaceholder')"
917
- textField="displayValue"
918
- valueField="id"
919
- [value]="zoomLevelChooserValue"
920
- [allowCustom]="true"
921
- [valueNormalizer]="valueNormalizer"
922
- [clearButton]="false"
923
- (valueChange)="onZoomLevelChooserValueChange($event)">
924
- <ng-template kendoComboBoxItemTemplate let-dataItem>
925
- {{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
926
- </ng-template>
927
- </kendo-combobox>
928
- </kendo-toolbar-input-wrapper>
929
- <kendo-buttongroup
930
- *ngSwitchCase="'selection'"
931
- [attr.aria-controls]="pagesContainerId"
932
- [navigable]="false"
933
- class="k-button-group-flat k-toolbar-button-group"
934
- selection="single">
1157
+ (click)="fileSelectEl?.nativeElement.click()">
1158
+ </button>
935
1159
  <button
1160
+ *ngSwitchCase="'download'"
936
1161
  type="button"
937
- kendoButton
938
- kendoPDFViewerToolbarFocusable
939
1162
  fillMode="flat"
940
- icon="pointer"
941
- [toggleable]="true"
942
- [svgIcon]="pointerIcon"
943
- [attr.title]="messageFor('selectionTitle')"
944
- [attr.aria-label]="messageFor('selectionTitle')"
945
- (click)="selectionEnabled.emit()"></button>
1163
+ kendoPDFViewerToolbarFocusable
1164
+ kendoButton
1165
+ class="k-toolbar-button"
1166
+ icon="download"
1167
+ [svgIcon]="downloadIcon"
1168
+ [disabled]="disabledTools"
1169
+ [attr.title]="messageFor('downloadTitle')"
1170
+ [attr.aria-label]="messageFor('downloadTitle')"
1171
+ (click)="download.emit()"></button>
946
1172
  <button
1173
+ *ngSwitchCase="'print'"
947
1174
  type="button"
1175
+ fillMode="flat"
1176
+ kendoPDFViewerToolbarFocusable
948
1177
  kendoButton
1178
+ class="k-toolbar-button"
1179
+ icon="print"
1180
+ [svgIcon]="printIcon"
1181
+ [disabled]="disabledTools"
1182
+ [attr.title]="messageFor('printTitle')"
1183
+ [attr.aria-label]="messageFor('printTitle')"
1184
+ (click)="print.emit()"></button>
1185
+ <button
1186
+ *ngSwitchCase="'annotations'"
1187
+ type="button"
1188
+ [attr.id]="annotationsToolId"
949
1189
  kendoPDFViewerToolbarFocusable
1190
+ kendoButton
1191
+ class="k-toolbar-button"
950
1192
  fillMode="flat"
951
- icon="hand"
952
- [svgIcon]="handIcon"
953
- [toggleable]="true"
954
- [selected]="true"
955
- [attr.title]="messageFor('panningTitle')"
956
- [attr.aria-label]="messageFor('panningTitle')"
957
- (click)="panningEnabled.emit()"></button>
958
- </kendo-buttongroup>
959
- <button
960
- *ngSwitchCase="'search'"
961
- type="button"
962
- kendoPDFViewerToolbarFocusable
963
- kendoButton
964
- class="k-toolbar-button"
965
- fillMode="flat"
966
- icon="search"
967
- [disabled]="disabledTools"
968
- [attr.title]="messageFor('searchTitle')"
969
- [attr.aria-label]="messageFor('searchTitle')"
970
- aria-haspopup="dialog"
971
- [svgIcon]="searchIcon"
972
- (click)="search.emit()"></button>
973
- <button
974
- *ngSwitchCase="'open'"
975
- type="button"
976
- fillMode="flat"
977
- kendoPDFViewerToolbarFocusable
978
- kendoButton
979
- class="k-toolbar-button"
980
- fillMode="flat"
981
- icon="folder-open"
982
- [svgIcon]="folderOpenIcon"
983
- [attr.title]="messageFor('openTitle')"
984
- [attr.aria-label]="messageFor('openTitle')"
985
- [attr.aria-controls]="pagesContainerId"
986
- (click)="fileSelectEl?.nativeElement.click()">
987
- </button>
988
- <button
989
- *ngSwitchCase="'download'"
990
- type="button"
991
- fillMode="flat"
992
- kendoPDFViewerToolbarFocusable
993
- kendoButton
994
- class="k-toolbar-button"
995
- icon="download"
996
- [svgIcon]="downloadIcon"
997
- [disabled]="disabledTools"
998
- [attr.title]="messageFor('downloadTitle')"
999
- [attr.aria-label]="messageFor('downloadTitle')"
1000
- (click)="download.emit()"></button>
1001
- <button
1002
- *ngSwitchCase="'print'"
1003
- type="button"
1004
- fillMode="flat"
1005
- kendoPDFViewerToolbarFocusable
1006
- kendoButton
1007
- class="k-toolbar-button"
1008
- icon="print"
1009
- [svgIcon]="printIcon"
1010
- [disabled]="disabledTools"
1011
- [attr.title]="messageFor('printTitle')"
1012
- [attr.aria-label]="messageFor('printTitle')"
1013
- (click)="print.emit()"></button>
1193
+ icon="track-changes"
1194
+ [selected]="isAnnotationsToolbarVisible"
1195
+ [disabled]="disabledTools || !isSelectionEnabled"
1196
+ [attr.title]="messageFor('annotationsTitle')"
1197
+ [attr.aria-label]="messageFor('annotationsTitle')"
1198
+ [attr.aria-controls]="wrapperId"
1199
+ [attr.aria-expanded]="isAnnotationsToolbarVisible"
1200
+ [svgIcon]="trackChangesIcon"
1201
+ (click)="toggleAnnotationsToolbar.emit();"></button>
1202
+ </ng-container>
1014
1203
  </ng-container>
1015
1204
  </ng-container>
1205
+ <ng-container *ngIf="type === 'annotations'">
1206
+ <button
1207
+ type="button"
1208
+ kendoPDFViewerToolbarFocusable
1209
+ kendoButton
1210
+ class="k-toolbar-button"
1211
+ fillMode="flat"
1212
+ icon="highlight"
1213
+ [selected]="isHighlightMode"
1214
+ [disabled]="disabledTools"
1215
+ [attr.title]="messageFor('highlightAnnotationTitle')"
1216
+ [attr.aria-label]="messageFor('highlightAnnotationTitle')"
1217
+ aria-haspopup="dialog"
1218
+ [svgIcon]="highlightIcon"
1219
+ (click)="onHighlightClick()"></button>
1220
+ <div class="k-toolbar-separator k-separator"></div>
1221
+ <button
1222
+ type="button"
1223
+ fillMode="flat"
1224
+ kendoPDFViewerToolbarFocusable
1225
+ kendoButton
1226
+ [selected]="isFreeTextMode"
1227
+ class="k-toolbar-button"
1228
+ fillMode="flat"
1229
+ icon="free-text"
1230
+ [svgIcon]="freeTextIcon"
1231
+ [attr.title]="messageFor('freeTextAnnotationTitle')"
1232
+ [attr.aria-label]="messageFor('freeTextAnnotationTitle')"
1233
+ [attr.aria-controls]="pagesContainerId"
1234
+ (click)="onFreeTextClick()">
1235
+ </button>
1236
+ <span class="k-spacer"></span>
1237
+ <button
1238
+ type="button"
1239
+ fillMode="flat"
1240
+ kendoPDFViewerToolbarFocusable
1241
+ kendoButton
1242
+ class="k-toolbar-button"
1243
+ fillMode="flat"
1244
+ icon="x"
1245
+ [svgIcon]="xIcon"
1246
+ [attr.title]="messageFor('closeAnnotationsToolbarTitle')"
1247
+ [attr.aria-label]="messageFor('closeAnnotationsToolbarTitle')"
1248
+ [attr.aria-controls]="pagesContainerId"
1249
+ (click)="toggleAnnotationsToolbar.emit();">
1250
+ </button>
1251
+ </ng-container>
1016
1252
  <input
1017
1253
  #fileSelectEl
1018
- *ngIf="tools?.indexOf('open') > -1;"
1254
+ *ngIf="type === 'tools' &&tools?.indexOf('open') > -1;"
1019
1255
  type="file"
1020
1256
  [style.display]="'none'"
1021
1257
  aria-hidden="true"
@@ -1061,6 +1297,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1061
1297
  type: Input
1062
1298
  }], tools: [{
1063
1299
  type: Input
1300
+ }], type: [{
1301
+ type: Input
1302
+ }], wrapperId: [{
1303
+ type: Input
1304
+ }], isAnnotationsToolbarVisible: [{
1305
+ type: Input
1306
+ }], annotationsToolId: [{
1307
+ type: Input
1064
1308
  }], fileSelect: [{
1065
1309
  type: Output
1066
1310
  }], fileSelectStart: [{
@@ -1085,6 +1329,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1085
1329
  type: Output
1086
1330
  }], search: [{
1087
1331
  type: Output
1332
+ }], toggleAnnotationsToolbar: [{
1333
+ type: Output
1334
+ }], setAnnotationMode: [{
1335
+ type: Output
1088
1336
  }] } });
1089
1337
 
1090
1338
  /**
@@ -1341,6 +1589,198 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1341
1589
  }]
1342
1590
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1343
1591
 
1592
+ /**
1593
+ * @hidden
1594
+ */
1595
+ const AnnotationEditorTypes = {
1596
+ disable: -1,
1597
+ none: 0,
1598
+ freeText: 3,
1599
+ highlight: 9
1600
+ };
1601
+
1602
+ /**
1603
+ * @hidden
1604
+ */
1605
+ class AnnotationPopupToolbarContentComponent {
1606
+ dialogService;
1607
+ ngZone;
1608
+ hostClasses = true;
1609
+ paletteIcon = paletteIcon;
1610
+ trashIcon = trashIcon;
1611
+ localizationService;
1612
+ pdfViewerWidget;
1613
+ anchor;
1614
+ annotationEditorType;
1615
+ popupRef;
1616
+ showToolbar = true;
1617
+ initialColor;
1618
+ fontSizes = fontSizes;
1619
+ initialFontSize;
1620
+ dialogContainer;
1621
+ removeAnnotationConfirmation;
1622
+ dialogResultSub;
1623
+ constructor(dialogService, ngZone) {
1624
+ this.dialogService = dialogService;
1625
+ this.ngZone = ngZone;
1626
+ }
1627
+ ngOnDestroy() {
1628
+ if (this.dialogResultSub) {
1629
+ this.dialogResultSub.unsubscribe();
1630
+ }
1631
+ }
1632
+ editAnnotation() {
1633
+ this.popupRef.popup.setInput('popupClass', 'k-pdf-viewer-annotation-editor');
1634
+ this.hostClasses = false;
1635
+ this.ngZone.run(() => this.showToolbar = false);
1636
+ }
1637
+ deleteAnnotation() {
1638
+ const removeItem = (shouldRemove) => {
1639
+ if (shouldRemove) {
1640
+ this.pdfViewerWidget.deleteAnnotation();
1641
+ }
1642
+ };
1643
+ if (this.removeAnnotationConfirmation) {
1644
+ this.ngZone.run(() => {
1645
+ const dialog = this.dialogService.open({
1646
+ appendTo: this.dialogContainer,
1647
+ title: this.localizationService.get('deleteAnnotationConfirmationDialogTitle'),
1648
+ content: this.localizationService.get('deleteAnnotationConfirmationDialogContent'),
1649
+ actions: [{
1650
+ text: this.localizationService.get('deleteAnnotationConfirmationDialogConfirmText'),
1651
+ themeColor: 'primary',
1652
+ svgIcon: checkIcon,
1653
+ icon: 'check'
1654
+ }, {
1655
+ text: this.localizationService.get('deleteAnnotationConfirmationDialogRejectText'),
1656
+ svgIcon: xIcon,
1657
+ icon: 'x'
1658
+ }],
1659
+ });
1660
+ this.dialogResultSub = dialog.result.pipe(take(1)).subscribe((e) => {
1661
+ const shouldRemove = e.text === (this.localizationService.get('deleteAnnotationConfirmationDialogConfirmText'));
1662
+ removeItem(shouldRemove);
1663
+ this.dialogResultSub.unsubscribe();
1664
+ this.dialogResultSub = null;
1665
+ });
1666
+ });
1667
+ }
1668
+ else {
1669
+ removeItem(true);
1670
+ }
1671
+ }
1672
+ onColorValueChange(value) {
1673
+ this.pdfViewerWidget[this.annotationEditorType === 'highlight' ? 'setHighlightColor' : 'setFreeTextColor'](value);
1674
+ }
1675
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AnnotationPopupToolbarContentComponent, deps: [{ token: i1$2.DialogService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1676
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AnnotationPopupToolbarContentComponent, isStandalone: true, selector: "[kendoPDFViewerAnnotationPopupToolbar]", host: { properties: { "class.k-toolbar": "this.hostClasses", "class.k-toolbar-md": "this.hostClasses", "class.k-toolbar-flat": "this.hostClasses" } }, providers: [DialogService], ngImport: i0, template: `
1677
+ <ng-container *ngIf="showToolbar">
1678
+ <button
1679
+ kendoButton
1680
+ [attr.title]="localizationService?.get('annotationEditorTitle')"
1681
+ [attr.aria-label]="localizationService?.get('annotationEditorTitle')"
1682
+ [svgIcon]="paletteIcon"
1683
+ icon="palette"
1684
+ fillMode="flat"
1685
+ type="button"
1686
+ (click)="editAnnotation()"></button>
1687
+ <button
1688
+ kendoButton
1689
+ [attr.title]="localizationService?.get('deleteAnnotationTitle')"
1690
+ [attr.aria-label]="localizationService?.get('deleteAnnotationTitle')"
1691
+ [svgIcon]="trashIcon"
1692
+ icon="trash"
1693
+ fillMode="flat"
1694
+ type="button"
1695
+ (click)="deleteAnnotation()"></button>
1696
+ </ng-container>
1697
+ <ng-container *ngIf="!showToolbar">
1698
+ <ng-container *ngIf="annotationEditorType === 'freeText'">
1699
+ <span class="k-column-menu-group-header">
1700
+ <span id="text-font-size-label" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorFontSizeTitle') }}</span>
1701
+ </span>
1702
+ <kendo-dropdownlist
1703
+ [data]="fontSizes"
1704
+ [value]="initialFontSize"
1705
+ (valueChange)="pdfViewerWidget.setFreeTextFontSize($event)"
1706
+ fillMode="flat"
1707
+ aria-labelledby="text-font-size-label"></kendo-dropdownlist>
1708
+ </ng-container>
1709
+ <span class="k-column-menu-group-header">
1710
+ <label [for]="flatColorPicker" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorColorTitle') }}</label>
1711
+ </span>
1712
+ <kendo-flatcolorpicker
1713
+ #flatColorPicker
1714
+ [preview]="false"
1715
+ [value]="initialColor"
1716
+ (valueChange)="onColorValueChange($event)"
1717
+ fillMode="flat"></kendo-flatcolorpicker>
1718
+ <ng-container>
1719
+ `, isInline: true, dependencies: [{ kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: i3.FlatColorPickerComponent, selector: "kendo-flatcolorpicker", inputs: ["readonly", "disabled", "format", "value", "tabindex", "clearButton", "preview", "actionsLayout", "activeView", "views", "gradientSettings", "adaptiveMode", "paletteSettings", "size"], outputs: ["valueChange", "cancel", "activeViewChange", "clearButtonClick", "actionButtonClick"], exportAs: ["kendoFlatColorPicker"] }, { kind: "component", type: i1$1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1720
+ }
1721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AnnotationPopupToolbarContentComponent, decorators: [{
1722
+ type: Component,
1723
+ args: [{
1724
+ selector: '[kendoPDFViewerAnnotationPopupToolbar]',
1725
+ standalone: true,
1726
+ providers: [DialogService],
1727
+ imports: [KENDO_BUTTON, KENDO_FLATCOLORPICKER, KENDO_DROPDOWNLIST, NgIf],
1728
+ template: `
1729
+ <ng-container *ngIf="showToolbar">
1730
+ <button
1731
+ kendoButton
1732
+ [attr.title]="localizationService?.get('annotationEditorTitle')"
1733
+ [attr.aria-label]="localizationService?.get('annotationEditorTitle')"
1734
+ [svgIcon]="paletteIcon"
1735
+ icon="palette"
1736
+ fillMode="flat"
1737
+ type="button"
1738
+ (click)="editAnnotation()"></button>
1739
+ <button
1740
+ kendoButton
1741
+ [attr.title]="localizationService?.get('deleteAnnotationTitle')"
1742
+ [attr.aria-label]="localizationService?.get('deleteAnnotationTitle')"
1743
+ [svgIcon]="trashIcon"
1744
+ icon="trash"
1745
+ fillMode="flat"
1746
+ type="button"
1747
+ (click)="deleteAnnotation()"></button>
1748
+ </ng-container>
1749
+ <ng-container *ngIf="!showToolbar">
1750
+ <ng-container *ngIf="annotationEditorType === 'freeText'">
1751
+ <span class="k-column-menu-group-header">
1752
+ <span id="text-font-size-label" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorFontSizeTitle') }}</span>
1753
+ </span>
1754
+ <kendo-dropdownlist
1755
+ [data]="fontSizes"
1756
+ [value]="initialFontSize"
1757
+ (valueChange)="pdfViewerWidget.setFreeTextFontSize($event)"
1758
+ fillMode="flat"
1759
+ aria-labelledby="text-font-size-label"></kendo-dropdownlist>
1760
+ </ng-container>
1761
+ <span class="k-column-menu-group-header">
1762
+ <label [for]="flatColorPicker" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorColorTitle') }}</label>
1763
+ </span>
1764
+ <kendo-flatcolorpicker
1765
+ #flatColorPicker
1766
+ [preview]="false"
1767
+ [value]="initialColor"
1768
+ (valueChange)="onColorValueChange($event)"
1769
+ fillMode="flat"></kendo-flatcolorpicker>
1770
+ <ng-container>
1771
+ `
1772
+ }]
1773
+ }], ctorParameters: function () { return [{ type: i1$2.DialogService }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
1774
+ type: HostBinding,
1775
+ args: ['class.k-toolbar']
1776
+ }, {
1777
+ type: HostBinding,
1778
+ args: ['class.k-toolbar-md']
1779
+ }, {
1780
+ type: HostBinding,
1781
+ args: ['class.k-toolbar-flat']
1782
+ }] } });
1783
+
1344
1784
  let counter = 0;
1345
1785
  /**
1346
1786
  * Represents the [Kendo UI PDFViewer component for Angular](slug:overview_pdfviewer).
@@ -1363,11 +1803,13 @@ class PDFViewerComponent {
1363
1803
  localizationService;
1364
1804
  cdr;
1365
1805
  host;
1806
+ popupService;
1366
1807
  hostClass = true;
1367
1808
  direction;
1809
+ display = 'flex';
1368
1810
  /**
1369
1811
  * Represents the tools collection rendered in the toolbar.
1370
- * @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print' ]
1812
+ * @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print', 'annotations' ]
1371
1813
  */
1372
1814
  tools = [
1373
1815
  'pager',
@@ -1379,7 +1821,8 @@ class PDFViewerComponent {
1379
1821
  'search',
1380
1822
  'open',
1381
1823
  'download',
1382
- 'print'
1824
+ 'print',
1825
+ 'annotations'
1383
1826
  ];
1384
1827
  /**
1385
1828
  * The configuration of the internal Loader component.
@@ -1464,6 +1907,12 @@ class PDFViewerComponent {
1464
1907
  * @default 1
1465
1908
  */
1466
1909
  loadOnDemandPageSize = 1;
1910
+ /**
1911
+ * Determines whether a confirmation dialog is shown when the user tries to delete an annotation.
1912
+ *
1913
+ * @default true
1914
+ */
1915
+ removeAnnotationConfirmation = true;
1467
1916
  /**
1468
1917
  * Fires when the component loads a PDF document successfully.
1469
1918
  */
@@ -1485,6 +1934,8 @@ class PDFViewerComponent {
1485
1934
  */
1486
1935
  zoomLevelChange = new EventEmitter();
1487
1936
  pagesContainer;
1937
+ pagesContainerViewContainerRef;
1938
+ dialogContainerViewContainerRef;
1488
1939
  /**
1489
1940
  * Returns the current page number of the loaded PDF document.
1490
1941
  */
@@ -1519,17 +1970,30 @@ class PDFViewerComponent {
1519
1970
  }
1520
1971
  return `k-pdfviewer-${counter}-pages-container`;
1521
1972
  }
1973
+ /**
1974
+ * @hidden
1975
+ */
1976
+ get annotationsToolbarId() {
1977
+ return `k-pdfviewer-${counter}-annotations-toolbar`;
1978
+ }
1979
+ /**
1980
+ * @hidden
1981
+ */
1982
+ get annotationsToolId() {
1983
+ return `k-pdfviewer-${counter}-annotations-button`;
1984
+ }
1522
1985
  loading = false;
1523
1986
  searchActive = false;
1524
1987
  matchCase = false;
1525
1988
  currentMatches = [];
1526
1989
  currentMatch;
1990
+ showAnnotationsToolbar = false;
1527
1991
  /**
1528
1992
  * @hidden
1529
1993
  */
1530
1994
  set enabledSelection(value) {
1531
1995
  if (this.pdfViewerWidget) {
1532
- value ? this.pdfViewerWidget.documentScroller.disablePanEventsTracking() : this.pdfViewerWidget.documentScroller.enablePanEventsTracking();
1996
+ this.ngZone.runOutsideAngular(() => this.pdfViewerWidget.setInteractionMode({ mode: value ? PdfViewerInteractionMode.TextSelection : PdfViewerInteractionMode.Pan }));
1533
1997
  }
1534
1998
  this._enabledSelection = value;
1535
1999
  }
@@ -1539,6 +2003,14 @@ class PDFViewerComponent {
1539
2003
  get enabledSelection() {
1540
2004
  return this._enabledSelection;
1541
2005
  }
2006
+ /**
2007
+ * @hidden
2008
+ */
2009
+ onSetAnnotationMode(mode) {
2010
+ this.pdfViewerWidget?.resetAnnotationEditorMode();
2011
+ this.pdfViewerWidget?.setInteractionMode({ mode: PdfViewerInteractionMode.TextSelection });
2012
+ this.pdfViewerWidget?.setAnnotationEditorMode({ mode: AnnotationEditorTypes[mode], interactionMode: PdfViewerInteractionMode.TextSelection });
2013
+ }
1542
2014
  /**
1543
2015
  * @hidden
1544
2016
  */
@@ -1556,13 +2028,16 @@ class PDFViewerComponent {
1556
2028
  _fitType;
1557
2029
  _zoomToFit = false;
1558
2030
  subs = new Subscription();
2031
+ popupSub = new Subscription();
1559
2032
  emitLoad = true;
1560
- constructor(ngZone, renderer, localizationService, cdr, host) {
2033
+ pdfViewerWidget;
2034
+ constructor(ngZone, renderer, localizationService, cdr, host, popupService) {
1561
2035
  this.ngZone = ngZone;
1562
2036
  this.renderer = renderer;
1563
2037
  this.localizationService = localizationService;
1564
2038
  this.cdr = cdr;
1565
2039
  this.host = host;
2040
+ this.popupService = popupService;
1566
2041
  const isValid = validatePackage(packageMetadata);
1567
2042
  this.licenseMessage = getLicenseMessage(packageMetadata);
1568
2043
  this.showLicenseWatermark = shouldShowValidationUI(isValid);
@@ -1574,8 +2049,11 @@ class PDFViewerComponent {
1574
2049
  }
1575
2050
  ngOnDestroy() {
1576
2051
  this.subs.unsubscribe();
2052
+ this.popupSub?.unsubscribe();
1577
2053
  this.pdfViewerWidget?.destroy();
1578
2054
  this.pdfContext = null;
2055
+ this.observer?.disconnect();
2056
+ this.observer = null;
1579
2057
  }
1580
2058
  ngOnChanges(changes) {
1581
2059
  const newBase64Data = changes['data'] && this.data;
@@ -1615,6 +2093,27 @@ class PDFViewerComponent {
1615
2093
  onPageChange(e) {
1616
2094
  this.ngZone.runOutsideAngular(() => this.scrollToPage(e.skip + 1));
1617
2095
  }
2096
+ /**
2097
+ * @hidden
2098
+ */
2099
+ onPanningEnabled() {
2100
+ this.enabledSelection = false;
2101
+ this.showAnnotationsToolbar = false;
2102
+ this.ngZone.runOutsideAngular(() => {
2103
+ this.pdfViewerWidget?.resetAnnotationEditorMode();
2104
+ this.pdfViewerWidget?.setInteractionMode({ mode: PdfViewerInteractionMode.Pan });
2105
+ });
2106
+ }
2107
+ /**
2108
+ * @hidden
2109
+ */
2110
+ onSelectionEnabled() {
2111
+ this.enabledSelection = true;
2112
+ this.ngZone.runOutsideAngular(() => {
2113
+ this.pdfViewerWidget?.resetAnnotationEditorMode();
2114
+ this.pdfViewerWidget?.setInteractionMode({ mode: PdfViewerInteractionMode.TextSelection });
2115
+ });
2116
+ }
1618
2117
  /**
1619
2118
  * @hidden
1620
2119
  */
@@ -1739,7 +2238,16 @@ class PDFViewerComponent {
1739
2238
  this.pdfViewerWidget?.goToPreviousSearchMatch();
1740
2239
  this.currentMatch = this.currentMatch - 1 < 1 ? this.currentMatches.length : this.currentMatch - 1;
1741
2240
  }
1742
- pdfViewerWidget;
2241
+ /**
2242
+ * @hidden
2243
+ */
2244
+ toggleAnnotationsToolbar() {
2245
+ this.showAnnotationsToolbar = !this.showAnnotationsToolbar;
2246
+ this.host.nativeElement.querySelector(`#${this.annotationsToolId}`)?.focus();
2247
+ if (!this.showAnnotationsToolbar) {
2248
+ this.pdfViewerWidget?.resetAnnotationEditorMode();
2249
+ }
2250
+ }
1743
2251
  loadPdf(dataType, data) {
1744
2252
  this.pdfViewerWidget?.destroy();
1745
2253
  this.loading = true;
@@ -1764,7 +2272,9 @@ class PDFViewerComponent {
1764
2272
  this.loading = false;
1765
2273
  },
1766
2274
  scroll: this.scrollHandler,
1767
- error: this.errorHandler
2275
+ error: this.errorHandler,
2276
+ annotationEditorToolBarShow: this.onAnnotationEditorToolBarShowHandler,
2277
+ annotationEditorToolBarHide: this.onAnnotationEditorToolBarHideHandler,
1768
2278
  }
1769
2279
  });
1770
2280
  });
@@ -1812,6 +2322,7 @@ class PDFViewerComponent {
1812
2322
  if (!this.pdfContext) {
1813
2323
  this.pdfViewerWidget.documentScroller.enablePanEventsTracking();
1814
2324
  }
2325
+ this.pdfViewerWidget.setInteractionMode({ mode: PdfViewerInteractionMode.Pan });
1815
2326
  if (!this._zoomToFit) {
1816
2327
  this.pdfContext = { ...e, element: this.pagesContainer.nativeElement, zoom: e.sender.state.zoomLevel };
1817
2328
  if (this.emitLoad) {
@@ -1824,6 +2335,7 @@ class PDFViewerComponent {
1824
2335
  this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
1825
2336
  this.onZoomLevelChange(zoomLevelOption, false);
1826
2337
  }
2338
+ this.pdfViewerWidget.activatePageNumber(1);
1827
2339
  this.cdr.markForCheck();
1828
2340
  this.assignPageIds();
1829
2341
  this.ngZone.run(() => this.loading = false);
@@ -1841,19 +2353,80 @@ class PDFViewerComponent {
1841
2353
  this.pdfContext = null;
1842
2354
  this.zoneAwareEmitter('error', { error: e, context: this.pdfContext });
1843
2355
  };
2356
+ annotationPopup = null;
2357
+ observer;
2358
+ onAnnotationEditorToolBarShowHandler = (e) => {
2359
+ this.cdr.markForCheck();
2360
+ this.observer?.disconnect();
2361
+ const type = e.annotationEditorMode;
2362
+ const anchor = e.anchor;
2363
+ const editor = e.source.firstSelectedEditor;
2364
+ const popup = this.annotationPopup?.popup;
2365
+ // Do not continue if popup is already visible for this annotation.
2366
+ if (popup && popup.instance.anchor === anchor && type === "freeText") {
2367
+ return;
2368
+ }
2369
+ if (this.annotationPopup) {
2370
+ this.annotationPopup.close();
2371
+ this.annotationPopup = null;
2372
+ }
2373
+ this.annotationPopup = this.popupService.open({
2374
+ anchor: anchor,
2375
+ appendTo: this.pagesContainerViewContainerRef,
2376
+ content: AnnotationPopupToolbarContentComponent,
2377
+ popupClass: 'k-pdfviewer-annotation-popup',
2378
+ });
2379
+ const annotationToolbarInstance = this.annotationPopup.content.instance;
2380
+ annotationToolbarInstance.localizationService = this.localizationService;
2381
+ annotationToolbarInstance.annotationEditorType = type;
2382
+ annotationToolbarInstance.pdfViewerWidget = this.pdfViewerWidget;
2383
+ annotationToolbarInstance.anchor = anchor;
2384
+ annotationToolbarInstance.popupRef = this.annotationPopup;
2385
+ annotationToolbarInstance.initialColor = editor?.color;
2386
+ annotationToolbarInstance.initialFontSize = editor.propertiesToUpdate[0][1];
2387
+ annotationToolbarInstance.dialogContainer = this.dialogContainerViewContainerRef;
2388
+ annotationToolbarInstance.removeAnnotationConfirmation = this.removeAnnotationConfirmation;
2389
+ this.popupSub = this.annotationPopup.popup.instance.anchorViewportLeave.subscribe(() => {
2390
+ this.ngZone.run(() => this.annotationPopup?.close());
2391
+ this.annotationPopup = null;
2392
+ this.popupSub?.unsubscribe();
2393
+ this.popupSub = null;
2394
+ });
2395
+ this.ngZone.runOutsideAngular(() => {
2396
+ this.observer = this.classMutationObserver(anchor, 'k-selected', () => {
2397
+ this.ngZone.run(() => this.annotationPopup?.close());
2398
+ });
2399
+ });
2400
+ };
2401
+ onAnnotationEditorToolBarHideHandler = () => {
2402
+ this.cdr.markForCheck();
2403
+ if (this.annotationPopup?.popup) {
2404
+ this.annotationPopup.close();
2405
+ this.annotationPopup = null;
2406
+ }
2407
+ };
1844
2408
  zoneAwareEmitter = (eventName, eventData) => {
1845
2409
  if (hasObservers(this[eventName])) {
1846
2410
  this.ngZone.run(() => this[eventName].emit(eventData));
1847
2411
  }
1848
2412
  };
1849
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1850
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PDFViewerComponent, isStandalone: true, selector: "kendo-pdfviewer", inputs: { tools: "tools", loaderSettings: "loaderSettings", saveFileName: "saveFileName", saveOptions: "saveOptions", url: "url", data: "data", arrayBuffer: "arrayBuffer", typedArray: "typedArray", zoom: "zoom", zoomRate: "zoomRate", minZoom: "minZoom", maxZoom: "maxZoom", loadOnDemand: "loadOnDemand", loadOnDemandPageSize: "loadOnDemandPageSize" }, outputs: { load: "load", error: "error", download: "download", pageChange: "pageChange", zoomLevelChange: "zoomLevelChange" }, host: { properties: { "class.k-pdf-viewer": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
2413
+ classMutationObserver = (element, className, callback) => {
2414
+ const observer = new MutationObserver((m) => {
2415
+ m.forEach(() => {
2416
+ callback();
2417
+ });
2418
+ });
2419
+ observer.observe(element, { attributeFilter: ['class'] });
2420
+ return observer;
2421
+ };
2422
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i2$1.PopupService }], target: i0.ɵɵFactoryTarget.Component });
2423
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PDFViewerComponent, isStandalone: true, selector: "kendo-pdfviewer", inputs: { tools: "tools", loaderSettings: "loaderSettings", saveFileName: "saveFileName", saveOptions: "saveOptions", url: "url", data: "data", arrayBuffer: "arrayBuffer", typedArray: "typedArray", zoom: "zoom", zoomRate: "zoomRate", minZoom: "minZoom", maxZoom: "maxZoom", loadOnDemand: "loadOnDemand", loadOnDemandPageSize: "loadOnDemandPageSize", removeAnnotationConfirmation: "removeAnnotationConfirmation" }, outputs: { load: "load", error: "error", download: "download", pageChange: "pageChange", zoomLevelChange: "zoomLevelChange" }, host: { properties: { "class.k-pdf-viewer": "this.hostClass", "attr.dir": "this.direction", "attr.display": "this.display" } }, providers: [
1851
2424
  LocalizationService,
1852
2425
  {
1853
2426
  provide: L10N_PREFIX,
1854
2427
  useValue: 'kendo.pdfviewer'
1855
2428
  }
1856
- ], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
2429
+ ], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }, { propertyName: "pagesContainerViewContainerRef", first: true, predicate: ["pagesContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dialogContainerViewContainerRef", first: true, predicate: ["dialogContainer"], descendants: true, read: ViewContainerRef }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
1857
2430
  <ng-container kendoPDFViewerLocalizedMessages
1858
2431
  i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
1859
2432
  pagerFirstPage="Go to the first page"
@@ -1928,7 +2501,43 @@ class PDFViewerComponent {
1928
2501
  searchMatchCaseTitle="Match case"
1929
2502
 
1930
2503
  i18n-zoomInputPlaceholder="kendo.pdfviewer.zoomInputPlaceholder|The text for the zoom tool input placeholder."
1931
- zoomInputPlaceholder="Choose zoom level">
2504
+ zoomInputPlaceholder="Choose zoom level"
2505
+
2506
+ i18n-annotationsTitle="kendo.pdfviewer.annotationsTitle|The Annotations tool title and label."
2507
+ annotationsTitle="Annotations"
2508
+
2509
+ i18n-annotationEditorTitle="kendo.pdfviewer.annotationEditorTitle|The annotation editor tool title and label."
2510
+ annotationEditorTitle="Annotation editor"
2511
+
2512
+ i18n-deleteAnnotationTitle="kendo.pdfviewer.deleteAnnotationTitle|The delete annotation tool title and label."
2513
+ deleteAnnotationTitle="Delete annotation"
2514
+
2515
+ i18n-highlightAnnotationTitle="kendo.pdfviewer.highlightAnnotationTitle|The highlight annotation tool title and label."
2516
+ highlightAnnotationTitle="Highlight"
2517
+
2518
+ i18n-freeTextAnnotationTitle="kendo.pdfviewer.freeTextAnnotationTitle|The free text annotation tool title and label."
2519
+ freeTextAnnotationTitle="Free text"
2520
+
2521
+ i18n-closeAnnotationsToolbarTitle="kendo.pdfviewer.closeAnnotationsToolbarTitle|The close annotations toolbar tool title and label."
2522
+ closeAnnotationsToolbarTitle="Close"
2523
+
2524
+ i18n-deleteAnnotationConfirmationDialogTitle="kendo.pdfviewer.deleteAnnotationConfirmationDialogTitle|The delete annotation confirmation dialog title."
2525
+ deleteAnnotationConfirmationDialogTitle="Delete annotation"
2526
+
2527
+ i18n-deleteAnnotationConfirmationDialogContent="kendo.pdfviewer.deleteAnnotationConfirmationDialogContent|The delete annotation confirmation dialog content."
2528
+ deleteAnnotationConfirmationDialogContent="Are you sure you want to delete this annotation?"
2529
+
2530
+ i18n-deleteAnnotationConfirmationDialogConfirmText="kendo.pdfviewer.deleteAnnotationConfirmationDialogConfirmText|The delete annotation confirmation dialog confirm button text."
2531
+ deleteAnnotationConfirmationDialogConfirmText="Delete"
2532
+
2533
+ i18n-deleteAnnotationConfirmationDialogRejectText="kendo.pdfviewer.deleteAnnotationConfirmationDialogRejectText|The delete annotation confirmation dialog reject button text."
2534
+ deleteAnnotationConfirmationDialogRejectText="Cancel"
2535
+
2536
+ i18n-annotationEditorFontSizeTitle="kendo.pdfviewer.annotationEditorFontSizeTitle|The annotation editor font size section title."
2537
+ annotationEditorFontSizeTitle="Font size"
2538
+
2539
+ i18n-annotationEditorColorTitle="kendo.pdfviewer.annotationEditorColorTitle|The annotation editor color section title."
2540
+ annotationEditorColorTitle="Color">
1932
2541
  </ng-container>
1933
2542
  <div kendoPDFViewerLoader
1934
2543
  *ngIf="loading"
@@ -1946,18 +2555,32 @@ class PDFViewerComponent {
1946
2555
  [zoomOptionsData]="zoomOptionsData"
1947
2556
  [zoomLevelChooserValue]="zoomLevel"
1948
2557
  [disabledTools]="!pdfContext?.pdfDoc"
2558
+ [isAnnotationsToolbarVisible]="showAnnotationsToolbar"
2559
+ [wrapperId]="showAnnotationsToolbar ? annotationsToolbarId : undefined"
2560
+ [annotationsToolId]="annotationsToolId"
1949
2561
  (pageChange)="onPageChange($event)"
1950
2562
  (fileSelect)="onFileSelect($event)"
1951
2563
  (fileSelectStart)="loading = true;"
1952
2564
  (fileSelectError)="onFileSelectError($event)"
1953
2565
  (download)="onDownload()"
1954
- (panningEnabled)="enabledSelection = false;"
1955
- (selectionEnabled)="enabledSelection = true;"
2566
+ (panningEnabled)="onPanningEnabled();"
2567
+ (selectionEnabled)="onSelectionEnabled();"
1956
2568
  (zoomIn)="onZoomIn()"
1957
2569
  (zoomOut)="onZoomOut()"
1958
2570
  (zoomLevelChange)="onZoomLevelChange($event)"
1959
2571
  (print)="onPrint()"
1960
- (search)="onSearch()"></div>
2572
+ (search)="onSearch()"
2573
+ (toggleAnnotationsToolbar)="toggleAnnotationsToolbar()"></div>
2574
+ <div *ngIf="showAnnotationsToolbar"
2575
+ [attr.id]="annotationsToolbarId"
2576
+ kendoPDFViewerToolbar
2577
+ #toolbar
2578
+ role="toolbar"
2579
+ type="annotations"
2580
+ (setAnnotationMode)="onSetAnnotationMode($event)"
2581
+ [attr.aria-controls]="pagesContainerId"
2582
+ [disabledTools]="!pdfContext?.pdfDoc"
2583
+ (toggleAnnotationsToolbar)="toggleAnnotationsToolbar()"></div>
1961
2584
  <div
1962
2585
  class="k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto"
1963
2586
  [class.k-enable-text-select]="enabledSelection"
@@ -1983,8 +2606,9 @@ class PDFViewerComponent {
1983
2606
  [attr.id]="pagesContainerId"></div>
1984
2607
  </div>
1985
2608
 
2609
+ <div #dialogContainer></div>
1986
2610
  <div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
1987
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedPDFViewerMessagesDirective, selector: "[kendoPDFViewerLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: LoaderComponent, selector: "[kendoPDFViewerLoader]", inputs: ["settings"] }, { kind: "component", type: ToolbarComponent, selector: "[kendoPDFViewerToolbar]", inputs: ["zoomLevel", "calculatedComboBoxValue", "skip", "pageSize", "total", "zoomInDisabled", "zoomOutDisabled", "disabledTools", "zoomLevelChooserValue", "zoomOptionsData", "pagesContainerId", "tools"], outputs: ["fileSelect", "fileSelectStart", "fileSelectError", "download", "selectionEnabled", "panningEnabled", "pageChange", "zoomIn", "zoomOut", "zoomLevelChange", "print", "search"] }, { kind: "component", type: PDFViewerSearchComponent, selector: "[kendoPDFViewerSearch]", inputs: ["matches", "currentMatch"], outputs: ["searchChange", "prevMatch", "nextMatch", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }] });
2611
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedPDFViewerMessagesDirective, selector: "[kendoPDFViewerLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: LoaderComponent, selector: "[kendoPDFViewerLoader]", inputs: ["settings"] }, { kind: "component", type: ToolbarComponent, selector: "[kendoPDFViewerToolbar]", inputs: ["zoomLevel", "calculatedComboBoxValue", "skip", "pageSize", "total", "zoomInDisabled", "zoomOutDisabled", "disabledTools", "zoomLevelChooserValue", "zoomOptionsData", "pagesContainerId", "tools", "type", "wrapperId", "isAnnotationsToolbarVisible", "annotationsToolId"], outputs: ["fileSelect", "fileSelectStart", "fileSelectError", "download", "selectionEnabled", "panningEnabled", "pageChange", "zoomIn", "zoomOut", "zoomLevelChange", "print", "search", "toggleAnnotationsToolbar", "setAnnotationMode"] }, { kind: "component", type: PDFViewerSearchComponent, selector: "[kendoPDFViewerSearch]", inputs: ["matches", "currentMatch"], outputs: ["searchChange", "prevMatch", "nextMatch", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }] });
1988
2612
  }
1989
2613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, decorators: [{
1990
2614
  type: Component,
@@ -2073,7 +2697,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2073
2697
  searchMatchCaseTitle="Match case"
2074
2698
 
2075
2699
  i18n-zoomInputPlaceholder="kendo.pdfviewer.zoomInputPlaceholder|The text for the zoom tool input placeholder."
2076
- zoomInputPlaceholder="Choose zoom level">
2700
+ zoomInputPlaceholder="Choose zoom level"
2701
+
2702
+ i18n-annotationsTitle="kendo.pdfviewer.annotationsTitle|The Annotations tool title and label."
2703
+ annotationsTitle="Annotations"
2704
+
2705
+ i18n-annotationEditorTitle="kendo.pdfviewer.annotationEditorTitle|The annotation editor tool title and label."
2706
+ annotationEditorTitle="Annotation editor"
2707
+
2708
+ i18n-deleteAnnotationTitle="kendo.pdfviewer.deleteAnnotationTitle|The delete annotation tool title and label."
2709
+ deleteAnnotationTitle="Delete annotation"
2710
+
2711
+ i18n-highlightAnnotationTitle="kendo.pdfviewer.highlightAnnotationTitle|The highlight annotation tool title and label."
2712
+ highlightAnnotationTitle="Highlight"
2713
+
2714
+ i18n-freeTextAnnotationTitle="kendo.pdfviewer.freeTextAnnotationTitle|The free text annotation tool title and label."
2715
+ freeTextAnnotationTitle="Free text"
2716
+
2717
+ i18n-closeAnnotationsToolbarTitle="kendo.pdfviewer.closeAnnotationsToolbarTitle|The close annotations toolbar tool title and label."
2718
+ closeAnnotationsToolbarTitle="Close"
2719
+
2720
+ i18n-deleteAnnotationConfirmationDialogTitle="kendo.pdfviewer.deleteAnnotationConfirmationDialogTitle|The delete annotation confirmation dialog title."
2721
+ deleteAnnotationConfirmationDialogTitle="Delete annotation"
2722
+
2723
+ i18n-deleteAnnotationConfirmationDialogContent="kendo.pdfviewer.deleteAnnotationConfirmationDialogContent|The delete annotation confirmation dialog content."
2724
+ deleteAnnotationConfirmationDialogContent="Are you sure you want to delete this annotation?"
2725
+
2726
+ i18n-deleteAnnotationConfirmationDialogConfirmText="kendo.pdfviewer.deleteAnnotationConfirmationDialogConfirmText|The delete annotation confirmation dialog confirm button text."
2727
+ deleteAnnotationConfirmationDialogConfirmText="Delete"
2728
+
2729
+ i18n-deleteAnnotationConfirmationDialogRejectText="kendo.pdfviewer.deleteAnnotationConfirmationDialogRejectText|The delete annotation confirmation dialog reject button text."
2730
+ deleteAnnotationConfirmationDialogRejectText="Cancel"
2731
+
2732
+ i18n-annotationEditorFontSizeTitle="kendo.pdfviewer.annotationEditorFontSizeTitle|The annotation editor font size section title."
2733
+ annotationEditorFontSizeTitle="Font size"
2734
+
2735
+ i18n-annotationEditorColorTitle="kendo.pdfviewer.annotationEditorColorTitle|The annotation editor color section title."
2736
+ annotationEditorColorTitle="Color">
2077
2737
  </ng-container>
2078
2738
  <div kendoPDFViewerLoader
2079
2739
  *ngIf="loading"
@@ -2091,18 +2751,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2091
2751
  [zoomOptionsData]="zoomOptionsData"
2092
2752
  [zoomLevelChooserValue]="zoomLevel"
2093
2753
  [disabledTools]="!pdfContext?.pdfDoc"
2754
+ [isAnnotationsToolbarVisible]="showAnnotationsToolbar"
2755
+ [wrapperId]="showAnnotationsToolbar ? annotationsToolbarId : undefined"
2756
+ [annotationsToolId]="annotationsToolId"
2094
2757
  (pageChange)="onPageChange($event)"
2095
2758
  (fileSelect)="onFileSelect($event)"
2096
2759
  (fileSelectStart)="loading = true;"
2097
2760
  (fileSelectError)="onFileSelectError($event)"
2098
2761
  (download)="onDownload()"
2099
- (panningEnabled)="enabledSelection = false;"
2100
- (selectionEnabled)="enabledSelection = true;"
2762
+ (panningEnabled)="onPanningEnabled();"
2763
+ (selectionEnabled)="onSelectionEnabled();"
2101
2764
  (zoomIn)="onZoomIn()"
2102
2765
  (zoomOut)="onZoomOut()"
2103
2766
  (zoomLevelChange)="onZoomLevelChange($event)"
2104
2767
  (print)="onPrint()"
2105
- (search)="onSearch()"></div>
2768
+ (search)="onSearch()"
2769
+ (toggleAnnotationsToolbar)="toggleAnnotationsToolbar()"></div>
2770
+ <div *ngIf="showAnnotationsToolbar"
2771
+ [attr.id]="annotationsToolbarId"
2772
+ kendoPDFViewerToolbar
2773
+ #toolbar
2774
+ role="toolbar"
2775
+ type="annotations"
2776
+ (setAnnotationMode)="onSetAnnotationMode($event)"
2777
+ [attr.aria-controls]="pagesContainerId"
2778
+ [disabledTools]="!pdfContext?.pdfDoc"
2779
+ (toggleAnnotationsToolbar)="toggleAnnotationsToolbar()"></div>
2106
2780
  <div
2107
2781
  class="k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto"
2108
2782
  [class.k-enable-text-select]="enabledSelection"
@@ -2128,17 +2802,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2128
2802
  [attr.id]="pagesContainerId"></div>
2129
2803
  </div>
2130
2804
 
2805
+ <div #dialogContainer></div>
2131
2806
  <div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
2132
2807
  `,
2133
2808
  standalone: true,
2134
2809
  imports: [LocalizedPDFViewerMessagesDirective, NgIf, EventsOutsideAngularDirective, LoaderComponent, ToolbarComponent, PDFViewerSearchComponent, WatermarkOverlayComponent]
2135
2810
  }]
2136
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
2811
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i2$1.PopupService }]; }, propDecorators: { hostClass: [{
2137
2812
  type: HostBinding,
2138
2813
  args: ['class.k-pdf-viewer']
2139
2814
  }], direction: [{
2140
2815
  type: HostBinding,
2141
2816
  args: ['attr.dir']
2817
+ }], display: [{
2818
+ type: HostBinding,
2819
+ args: ['attr.display']
2142
2820
  }], tools: [{
2143
2821
  type: Input
2144
2822
  }], loaderSettings: [{
@@ -2167,6 +2845,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2167
2845
  type: Input
2168
2846
  }], loadOnDemandPageSize: [{
2169
2847
  type: Input
2848
+ }], removeAnnotationConfirmation: [{
2849
+ type: Input
2170
2850
  }], load: [{
2171
2851
  type: Output
2172
2852
  }], error: [{
@@ -2180,6 +2860,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2180
2860
  }], pagesContainer: [{
2181
2861
  type: ViewChild,
2182
2862
  args: ['pagesContainer']
2863
+ }], pagesContainerViewContainerRef: [{
2864
+ type: ViewChild,
2865
+ args: ['pagesContainer', { read: ViewContainerRef }]
2866
+ }], dialogContainerViewContainerRef: [{
2867
+ type: ViewChild,
2868
+ args: ['dialogContainer', { read: ViewContainerRef }]
2183
2869
  }] } });
2184
2870
 
2185
2871
  /**