@progress/kendo-angular-pdfviewer 19.3.0-develop.3 → 19.3.0-develop.31

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.
@@ -0,0 +1,41 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { NgZone, ViewContainerRef } from '@angular/core';
6
+ import { DialogService } from '@progress/kendo-angular-dialog';
7
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
8
+ import { PopupRef } from '@progress/kendo-angular-popup';
9
+ import { PdfViewer } from '@progress/kendo-pdfviewer-common';
10
+ import { SVGIcon } from '@progress/kendo-svg-icons';
11
+ import { AnnotationEditorType } from './../models/annotation-editor.type';
12
+ import * as i0 from "@angular/core";
13
+ /**
14
+ * @hidden
15
+ */
16
+ export declare class AnnotationPopupToolbarContentComponent {
17
+ private dialogService;
18
+ private ngZone;
19
+ hostClasses: boolean;
20
+ paletteIcon: SVGIcon;
21
+ trashIcon: SVGIcon;
22
+ localizationService: LocalizationService;
23
+ pdfViewerWidget: PdfViewer;
24
+ anchor: HTMLElement;
25
+ annotationEditorType: AnnotationEditorType;
26
+ popupRef: PopupRef;
27
+ showToolbar: boolean;
28
+ initialColor: string;
29
+ fontSizes: number[];
30
+ initialFontSize: number;
31
+ dialogContainer: ViewContainerRef;
32
+ removeAnnotationConfirmation: boolean;
33
+ private dialogResultSub;
34
+ constructor(dialogService: DialogService, ngZone: NgZone);
35
+ ngOnDestroy(): void;
36
+ editAnnotation(): void;
37
+ deleteAnnotation(): void;
38
+ onColorValueChange(value: string): void;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnnotationPopupToolbarContentComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnnotationPopupToolbarContentComponent, "[kendoPDFViewerAnnotationPopupToolbar]", never, {}, {}, never, never, true, never>;
41
+ }
@@ -0,0 +1,199 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { NgIf } from '@angular/common';
6
+ import { Component, HostBinding, NgZone } from '@angular/core';
7
+ import { KENDO_BUTTON } from '@progress/kendo-angular-buttons';
8
+ import { DialogService } from '@progress/kendo-angular-dialog';
9
+ import { KENDO_DROPDOWNLIST } from '@progress/kendo-angular-dropdowns';
10
+ import { KENDO_FLATCOLORPICKER } from '@progress/kendo-angular-inputs';
11
+ import { checkIcon, paletteIcon, trashIcon, xIcon } from '@progress/kendo-svg-icons';
12
+ import { take } from 'rxjs/operators';
13
+ import { fontSizes } from './../util';
14
+ import * as i0 from "@angular/core";
15
+ import * as i1 from "@progress/kendo-angular-dialog";
16
+ import * as i2 from "@progress/kendo-angular-buttons";
17
+ import * as i3 from "@progress/kendo-angular-inputs";
18
+ import * as i4 from "@progress/kendo-angular-dropdowns";
19
+ /**
20
+ * @hidden
21
+ */
22
+ export class AnnotationPopupToolbarContentComponent {
23
+ dialogService;
24
+ ngZone;
25
+ hostClasses = true;
26
+ paletteIcon = paletteIcon;
27
+ trashIcon = trashIcon;
28
+ localizationService;
29
+ pdfViewerWidget;
30
+ anchor;
31
+ annotationEditorType;
32
+ popupRef;
33
+ showToolbar = true;
34
+ initialColor;
35
+ fontSizes = fontSizes;
36
+ initialFontSize;
37
+ dialogContainer;
38
+ removeAnnotationConfirmation;
39
+ dialogResultSub;
40
+ constructor(dialogService, ngZone) {
41
+ this.dialogService = dialogService;
42
+ this.ngZone = ngZone;
43
+ }
44
+ ngOnDestroy() {
45
+ if (this.dialogResultSub) {
46
+ this.dialogResultSub.unsubscribe();
47
+ }
48
+ }
49
+ editAnnotation() {
50
+ this.popupRef.popup.setInput('popupClass', 'k-pdf-viewer-annotation-editor');
51
+ this.hostClasses = false;
52
+ this.ngZone.run(() => this.showToolbar = false);
53
+ }
54
+ deleteAnnotation() {
55
+ const removeItem = (shouldRemove) => {
56
+ if (shouldRemove) {
57
+ this.pdfViewerWidget.deleteAnnotation();
58
+ }
59
+ };
60
+ if (this.removeAnnotationConfirmation) {
61
+ this.ngZone.run(() => {
62
+ const dialog = this.dialogService.open({
63
+ appendTo: this.dialogContainer,
64
+ title: this.localizationService.get('deleteAnnotationConfirmationDialogTitle'),
65
+ content: this.localizationService.get('deleteAnnotationConfirmationDialogContent'),
66
+ actions: [{
67
+ text: this.localizationService.get('deleteAnnotationConfirmationDialogConfirmText'),
68
+ themeColor: 'primary',
69
+ svgIcon: checkIcon,
70
+ icon: 'check'
71
+ }, {
72
+ text: this.localizationService.get('deleteAnnotationConfirmationDialogRejectText'),
73
+ svgIcon: xIcon,
74
+ icon: 'x'
75
+ }],
76
+ });
77
+ this.dialogResultSub = dialog.result.pipe(take(1)).subscribe((e) => {
78
+ const shouldRemove = e.text === (this.localizationService.get('deleteAnnotationConfirmationDialogConfirmText'));
79
+ removeItem(shouldRemove);
80
+ this.dialogResultSub.unsubscribe();
81
+ this.dialogResultSub = null;
82
+ });
83
+ });
84
+ }
85
+ else {
86
+ removeItem(true);
87
+ }
88
+ }
89
+ onColorValueChange(value) {
90
+ this.pdfViewerWidget[this.annotationEditorType === 'highlight' ? 'setHighlightColor' : 'setFreeTextColor'](value);
91
+ }
92
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AnnotationPopupToolbarContentComponent, deps: [{ token: i1.DialogService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
93
+ 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: `
94
+ <ng-container *ngIf="showToolbar">
95
+ <button
96
+ kendoButton
97
+ [attr.title]="localizationService?.get('annotationEditorTitle')"
98
+ [attr.aria-label]="localizationService?.get('annotationEditorTitle')"
99
+ [svgIcon]="paletteIcon"
100
+ icon="palette"
101
+ fillMode="flat"
102
+ type="button"
103
+ (click)="editAnnotation()"></button>
104
+ <button
105
+ kendoButton
106
+ [attr.title]="localizationService?.get('deleteAnnotationTitle')"
107
+ [attr.aria-label]="localizationService?.get('deleteAnnotationTitle')"
108
+ [svgIcon]="trashIcon"
109
+ icon="trash"
110
+ fillMode="flat"
111
+ type="button"
112
+ (click)="deleteAnnotation()"></button>
113
+ </ng-container>
114
+ <ng-container *ngIf="!showToolbar">
115
+ <ng-container *ngIf="annotationEditorType === 'freeText'">
116
+ <span class="k-column-menu-group-header">
117
+ <span id="text-font-size-label" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorFontSizeTitle') }}</span>
118
+ </span>
119
+ <kendo-dropdownlist
120
+ [data]="fontSizes"
121
+ [value]="initialFontSize"
122
+ (valueChange)="pdfViewerWidget.setFreeTextFontSize($event)"
123
+ fillMode="flat"
124
+ aria-labelledby="text-font-size-label"></kendo-dropdownlist>
125
+ </ng-container>
126
+ <span class="k-column-menu-group-header">
127
+ <label [for]="flatColorPicker" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorColorTitle') }}</label>
128
+ </span>
129
+ <kendo-flatcolorpicker
130
+ #flatColorPicker
131
+ [preview]="false"
132
+ [value]="initialColor"
133
+ (valueChange)="onColorValueChange($event)"
134
+ fillMode="flat"></kendo-flatcolorpicker>
135
+ <ng-container>
136
+ `, 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: i4.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"] }] });
137
+ }
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AnnotationPopupToolbarContentComponent, decorators: [{
139
+ type: Component,
140
+ args: [{
141
+ selector: '[kendoPDFViewerAnnotationPopupToolbar]',
142
+ standalone: true,
143
+ providers: [DialogService],
144
+ imports: [KENDO_BUTTON, KENDO_FLATCOLORPICKER, KENDO_DROPDOWNLIST, NgIf],
145
+ template: `
146
+ <ng-container *ngIf="showToolbar">
147
+ <button
148
+ kendoButton
149
+ [attr.title]="localizationService?.get('annotationEditorTitle')"
150
+ [attr.aria-label]="localizationService?.get('annotationEditorTitle')"
151
+ [svgIcon]="paletteIcon"
152
+ icon="palette"
153
+ fillMode="flat"
154
+ type="button"
155
+ (click)="editAnnotation()"></button>
156
+ <button
157
+ kendoButton
158
+ [attr.title]="localizationService?.get('deleteAnnotationTitle')"
159
+ [attr.aria-label]="localizationService?.get('deleteAnnotationTitle')"
160
+ [svgIcon]="trashIcon"
161
+ icon="trash"
162
+ fillMode="flat"
163
+ type="button"
164
+ (click)="deleteAnnotation()"></button>
165
+ </ng-container>
166
+ <ng-container *ngIf="!showToolbar">
167
+ <ng-container *ngIf="annotationEditorType === 'freeText'">
168
+ <span class="k-column-menu-group-header">
169
+ <span id="text-font-size-label" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorFontSizeTitle') }}</span>
170
+ </span>
171
+ <kendo-dropdownlist
172
+ [data]="fontSizes"
173
+ [value]="initialFontSize"
174
+ (valueChange)="pdfViewerWidget.setFreeTextFontSize($event)"
175
+ fillMode="flat"
176
+ aria-labelledby="text-font-size-label"></kendo-dropdownlist>
177
+ </ng-container>
178
+ <span class="k-column-menu-group-header">
179
+ <label [for]="flatColorPicker" class="k-column-menu-group-header-text">{{ localizationService?.get('annotationEditorColorTitle') }}</label>
180
+ </span>
181
+ <kendo-flatcolorpicker
182
+ #flatColorPicker
183
+ [preview]="false"
184
+ [value]="initialColor"
185
+ (valueChange)="onColorValueChange($event)"
186
+ fillMode="flat"></kendo-flatcolorpicker>
187
+ <ng-container>
188
+ `
189
+ }]
190
+ }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
191
+ type: HostBinding,
192
+ args: ['class.k-toolbar']
193
+ }, {
194
+ type: HostBinding,
195
+ args: ['class.k-toolbar-md']
196
+ }, {
197
+ type: HostBinding,
198
+ args: ['class.k-toolbar-flat']
199
+ }] } });
@@ -109,8 +109,56 @@ export class Messages extends ComponentMessages {
109
109
  * Sets the placeholder text for the zoom tool input.
110
110
  */
111
111
  zoomInputPlaceholder;
112
+ /**
113
+ * Sets the title and label for the **Annotation Editor** tool.
114
+ */
115
+ annotationsTitle;
116
+ /**
117
+ * Sets the title and label for the **Annotation Editor** tool.
118
+ */
119
+ annotationEditorTitle;
120
+ /**
121
+ * Sets the title and label for the **Delete Annotation** tool.
122
+ */
123
+ deleteAnnotationTitle;
124
+ /**
125
+ * Sets the title and label for the **Highligh Annotation** tool.
126
+ */
127
+ highlightAnnotationTitle;
128
+ /**
129
+ * Sets the title and label for the **Free Text Annotation** tool.
130
+ */
131
+ freeTextAnnotationTitle;
132
+ /**
133
+ * Sets the title and label for the **Close Annotations Toolbar** tool.
134
+ */
135
+ closeAnnotationsToolbarTitle;
136
+ /**
137
+ * Sets the title of the **Delete Annotation** confirmation dialog.
138
+ */
139
+ deleteAnnotationConfirmationDialogTitle;
140
+ /**
141
+ * Sets the content text of the **Delete Annotation** confirmation dialog.
142
+ */
143
+ deleteAnnotationConfirmationDialogContent;
144
+ /**
145
+ * Sets the text of the **Delete Annotation** confirmation dialog confirm action button.
146
+ */
147
+ deleteAnnotationConfirmationDialogConfirmText;
148
+ /**
149
+ * Sets the text of the **Delete Annotation** confirmation dialog reject action button.
150
+ */
151
+ deleteAnnotationConfirmationDialogRejectText;
152
+ /**
153
+ * Sets the text of the **Font Size** section in the annotation editor dialog.
154
+ */
155
+ annotationEditorFontSizeTitle;
156
+ /**
157
+ * Sets the text of the **Color** section in the annotation editor dialog.
158
+ */
159
+ annotationEditorColorTitle;
112
160
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
113
- 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 });
161
+ 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 });
114
162
  }
115
163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
116
164
  type: Directive,
@@ -168,4 +216,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
168
216
  type: Input
169
217
  }], zoomInputPlaceholder: [{
170
218
  type: Input
219
+ }], annotationsTitle: [{
220
+ type: Input
221
+ }], annotationEditorTitle: [{
222
+ type: Input
223
+ }], deleteAnnotationTitle: [{
224
+ type: Input
225
+ }], highlightAnnotationTitle: [{
226
+ type: Input
227
+ }], freeTextAnnotationTitle: [{
228
+ type: Input
229
+ }], closeAnnotationsToolbarTitle: [{
230
+ type: Input
231
+ }], deleteAnnotationConfirmationDialogTitle: [{
232
+ type: Input
233
+ }], deleteAnnotationConfirmationDialogContent: [{
234
+ type: Input
235
+ }], deleteAnnotationConfirmationDialogConfirmText: [{
236
+ type: Input
237
+ }], deleteAnnotationConfirmationDialogRejectText: [{
238
+ type: Input
239
+ }], annotationEditorFontSizeTitle: [{
240
+ type: Input
241
+ }], annotationEditorColorTitle: [{
242
+ type: Input
171
243
  }] } });
@@ -0,0 +1,13 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * @hidden
7
+ */
8
+ export const AnnotationEditorTypes = {
9
+ disable: -1,
10
+ none: 0,
11
+ freeText: 3,
12
+ highlight: 9
13
+ };
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1751985210,
14
- version: '19.3.0-develop.3',
13
+ publishDate: 1754576893,
14
+ version: '19.3.0-develop.31',
15
15
  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',
16
16
  };