@progress/kendo-angular-pdfviewer 21.4.1-develop.1 → 22.0.0-develop.1
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.
- package/fesm2022/progress-kendo-angular-pdfviewer.mjs +43 -43
- package/localization/messages.d.ts +1 -1
- package/package.json +18 -26
- package/schematics/ngAdd/index.js +2 -2
- package/esm2022/annotations/annotation-editor.mjs +0 -198
- package/esm2022/directives.mjs +0 -27
- package/esm2022/index.mjs +0 -17
- package/esm2022/loader/loader.component.mjs +0 -54
- package/esm2022/localization/custom-messages.component.mjs +0 -51
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -249
- package/esm2022/models/annotation-editor.type.mjs +0 -13
- package/esm2022/models/events.mjs +0 -31
- package/esm2022/models/loader-settings.mjs +0 -5
- package/esm2022/models/pdfviewer-context.mjs +0 -5
- package/esm2022/models/toolbar-tool.mjs +0 -5
- package/esm2022/models/zoom-level.mjs +0 -5
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pdfviewer.component.mjs +0 -1152
- package/esm2022/pdfviewer.module.mjs +0 -52
- package/esm2022/progress-kendo-angular-pdfviewer.mjs +0 -8
- package/esm2022/toolbar/input-wrapper.component.mjs +0 -66
- package/esm2022/toolbar/search.component.mjs +0 -191
- package/esm2022/toolbar/toolbar-combobox.directive.mjs +0 -49
- package/esm2022/toolbar/toolbar-focusable.directive.mjs +0 -70
- package/esm2022/toolbar/toolbar-navigation.service.mjs +0 -53
- package/esm2022/toolbar/toolbar.component.mjs +0 -737
- package/esm2022/util.mjs +0 -83
|
@@ -1,737 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
6
|
-
import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, ViewChild } from '@angular/core';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { PagerComponent, CustomMessagesComponent } from '@progress/kendo-angular-pager';
|
|
9
|
-
import { searchIcon, zoomInIcon, zoomOutIcon, pointerIcon, handIcon, folderOpenIcon, downloadIcon, printIcon, trackChangesIcon, highlightIcon, freeTextIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
10
|
-
import { ToolbarNavigationService } from './toolbar-navigation.service';
|
|
11
|
-
import { ComboBoxComponent, ItemTemplateDirective } from '@progress/kendo-angular-dropdowns';
|
|
12
|
-
import { ToolbarComboBoxDirective } from './toolbar-combobox.directive';
|
|
13
|
-
import { ButtonComponent, ButtonGroupComponent } from '@progress/kendo-angular-buttons';
|
|
14
|
-
import { ToolbarFocusableDirective } from './toolbar-focusable.directive';
|
|
15
|
-
import { ToolbarInputWrapperComponent } from './input-wrapper.component';
|
|
16
|
-
import { map } from 'rxjs/operators';
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
19
|
-
import * as i2 from "./toolbar-navigation.service";
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
export class ToolbarComponent {
|
|
24
|
-
localization;
|
|
25
|
-
navigationService;
|
|
26
|
-
toolbarClasses = true;
|
|
27
|
-
fileSelectEl;
|
|
28
|
-
zoomLevel = {
|
|
29
|
-
text: '125%',
|
|
30
|
-
displayValue: '125%',
|
|
31
|
-
value: 1.25
|
|
32
|
-
};
|
|
33
|
-
calculatedComboBoxValue = {
|
|
34
|
-
text: 'Fit to width',
|
|
35
|
-
displayValue: null,
|
|
36
|
-
value: null
|
|
37
|
-
};
|
|
38
|
-
skip = 0;
|
|
39
|
-
pageSize = 1;
|
|
40
|
-
total;
|
|
41
|
-
zoomInDisabled;
|
|
42
|
-
zoomOutDisabled;
|
|
43
|
-
disabledTools;
|
|
44
|
-
zoomLevelChooserValue;
|
|
45
|
-
zoomOptionsData;
|
|
46
|
-
pagesContainerId;
|
|
47
|
-
tools;
|
|
48
|
-
type = 'tools';
|
|
49
|
-
wrapperId;
|
|
50
|
-
isAnnotationsToolbarVisible = false;
|
|
51
|
-
annotationsToolId;
|
|
52
|
-
isSelectionEnabled = false;
|
|
53
|
-
fileSelect = new EventEmitter();
|
|
54
|
-
fileSelectStart = new EventEmitter();
|
|
55
|
-
fileSelectError = new EventEmitter();
|
|
56
|
-
download = new EventEmitter();
|
|
57
|
-
selectionEnabled = new EventEmitter();
|
|
58
|
-
panningEnabled = new EventEmitter();
|
|
59
|
-
pageChange = new EventEmitter();
|
|
60
|
-
zoomIn = new EventEmitter();
|
|
61
|
-
zoomOut = new EventEmitter();
|
|
62
|
-
zoomLevelChange = new EventEmitter();
|
|
63
|
-
print = new EventEmitter();
|
|
64
|
-
search = new EventEmitter();
|
|
65
|
-
toggleAnnotationsToolbar = new EventEmitter();
|
|
66
|
-
setAnnotationMode = new EventEmitter();
|
|
67
|
-
zoomInIcon = zoomInIcon;
|
|
68
|
-
zoomOutIcon = zoomOutIcon;
|
|
69
|
-
handIcon = handIcon;
|
|
70
|
-
pointerIcon = pointerIcon;
|
|
71
|
-
searchIcon = searchIcon;
|
|
72
|
-
folderOpenIcon = folderOpenIcon;
|
|
73
|
-
downloadIcon = downloadIcon;
|
|
74
|
-
printIcon = printIcon;
|
|
75
|
-
trackChangesIcon = trackChangesIcon;
|
|
76
|
-
highlightIcon = highlightIcon;
|
|
77
|
-
freeTextIcon = freeTextIcon;
|
|
78
|
-
xIcon = xIcon;
|
|
79
|
-
pagerType = 'input';
|
|
80
|
-
isHighlightMode;
|
|
81
|
-
isFreeTextMode;
|
|
82
|
-
constructor(localization, navigationService) {
|
|
83
|
-
this.localization = localization;
|
|
84
|
-
this.navigationService = navigationService;
|
|
85
|
-
}
|
|
86
|
-
messageFor(key) {
|
|
87
|
-
return this.localization.get(key);
|
|
88
|
-
}
|
|
89
|
-
onFileSelect(e) {
|
|
90
|
-
const file = e.target.files[0];
|
|
91
|
-
this.fileSelectStart.emit();
|
|
92
|
-
if (file) {
|
|
93
|
-
const reader = new FileReader();
|
|
94
|
-
reader.onload = (e) => {
|
|
95
|
-
const data = e.target.result;
|
|
96
|
-
this.fileSelect.emit(data);
|
|
97
|
-
};
|
|
98
|
-
reader.onerror = (e) => {
|
|
99
|
-
this.fileSelectError.emit(e);
|
|
100
|
-
};
|
|
101
|
-
reader.readAsDataURL(file);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
onZoomLevelChooserValueChange(zoomLevel) {
|
|
105
|
-
this.zoomLevelChange.emit(zoomLevel);
|
|
106
|
-
}
|
|
107
|
-
focus() {
|
|
108
|
-
this.navigationService.focusableTools[this.navigationService.currentFocusIndex].activate();
|
|
109
|
-
}
|
|
110
|
-
onHighlightClick() {
|
|
111
|
-
this.isHighlightMode = !this.isHighlightMode;
|
|
112
|
-
this.isFreeTextMode = false;
|
|
113
|
-
this.setAnnotationMode.emit(this.isHighlightMode ? 'highlight' : 'none');
|
|
114
|
-
}
|
|
115
|
-
onFreeTextClick() {
|
|
116
|
-
this.isFreeTextMode = !this.isFreeTextMode;
|
|
117
|
-
this.isHighlightMode = false;
|
|
118
|
-
this.setAnnotationMode.emit(this.isFreeTextMode ? 'freeText' : 'none');
|
|
119
|
-
}
|
|
120
|
-
valueNormalizer = (text) => text.pipe(map((value) => {
|
|
121
|
-
const parsedValue = parseFloat(value);
|
|
122
|
-
const newValue = Number.isNaN(parsedValue) ? 1 : parsedValue / 100;
|
|
123
|
-
return {
|
|
124
|
-
value: newValue,
|
|
125
|
-
displayValue: `${Math.round(newValue * 100)}%`,
|
|
126
|
-
text: `${Math.round(newValue * 100)}%`
|
|
127
|
-
};
|
|
128
|
-
}));
|
|
129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.ToolbarNavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
130
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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", isSelectionEnabled: "isSelectionEnabled" }, 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: `
|
|
131
|
-
@if (type === 'tools') {
|
|
132
|
-
@for (tool of tools; track tool) {
|
|
133
|
-
@switch (tool) {
|
|
134
|
-
@case ('pager') {
|
|
135
|
-
<kendo-toolbar-input-wrapper
|
|
136
|
-
kendoPDFViewerToolbarFocusable
|
|
137
|
-
[toolbarTool]="pager">
|
|
138
|
-
<kendo-datapager
|
|
139
|
-
#pager
|
|
140
|
-
[attr.aria-controls]="pagesContainerId"
|
|
141
|
-
[attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
|
|
142
|
-
[class.k-disabled]="disabledTools"
|
|
143
|
-
[navigable]="true"
|
|
144
|
-
[pageSize]="pageSize"
|
|
145
|
-
[skip]="skip"
|
|
146
|
-
[total]="total"
|
|
147
|
-
[pageSizeValues]="false"
|
|
148
|
-
[info]="false"
|
|
149
|
-
[type]="pagerType"
|
|
150
|
-
(pageChange)="pageChange.emit($event)">
|
|
151
|
-
<kendo-datapager-messages
|
|
152
|
-
[firstPage]="messageFor('pagerFirstPage')"
|
|
153
|
-
[previousPage]="messageFor('pagerPreviousPage')"
|
|
154
|
-
[nextPage]="messageFor('pagerNextPage')"
|
|
155
|
-
[lastPage]="messageFor('pagerLastPage')"
|
|
156
|
-
[inputLabel]="messageFor('pagerInputLabel')"
|
|
157
|
-
[pageNumberInputTitle]="messageFor('pagerInputTitle')"
|
|
158
|
-
[of]="messageFor('pagerOf')"
|
|
159
|
-
[page]="messageFor('pagerPage')"></kendo-datapager-messages>
|
|
160
|
-
</kendo-datapager>
|
|
161
|
-
</kendo-toolbar-input-wrapper>
|
|
162
|
-
}
|
|
163
|
-
@case ('spacer') {
|
|
164
|
-
<span
|
|
165
|
-
class="k-spacer"></span>
|
|
166
|
-
}
|
|
167
|
-
@case ('zoomInOut') {
|
|
168
|
-
<kendo-buttongroup
|
|
169
|
-
[attr.aria-controls]="pagesContainerId"
|
|
170
|
-
class="k-button-group-flat k-toolbar-button-group"
|
|
171
|
-
[navigable]="false">
|
|
172
|
-
<button
|
|
173
|
-
type="button"
|
|
174
|
-
kendoButton
|
|
175
|
-
fillMode="flat"
|
|
176
|
-
kendoPDFViewerToolbarFocusable
|
|
177
|
-
icon="zoom-out"
|
|
178
|
-
[disabled]="disabledTools || zoomOutDisabled"
|
|
179
|
-
[svgIcon]="zoomOutIcon"
|
|
180
|
-
[attr.title]="messageFor('zoomOutTitle')"
|
|
181
|
-
[attr.aria-label]="messageFor('zoomOutTitle')"
|
|
182
|
-
(click)="zoomOut.emit()"></button>
|
|
183
|
-
<button
|
|
184
|
-
type="button"
|
|
185
|
-
kendoButton
|
|
186
|
-
fillMode="flat"
|
|
187
|
-
kendoPDFViewerToolbarFocusable
|
|
188
|
-
icon="zoom-in"
|
|
189
|
-
[disabled]="disabledTools || zoomInDisabled"
|
|
190
|
-
[svgIcon]="zoomInIcon"
|
|
191
|
-
[attr.title]="messageFor('zoomInTitle')"
|
|
192
|
-
[attr.aria-label]="messageFor('zoomInTitle')"
|
|
193
|
-
(click)="zoomIn.emit()"></button>
|
|
194
|
-
</kendo-buttongroup>
|
|
195
|
-
}
|
|
196
|
-
@case ('zoom') {
|
|
197
|
-
<kendo-toolbar-input-wrapper
|
|
198
|
-
kendoPDFViewerToolbarFocusable
|
|
199
|
-
[toolbarTool]="combobox">
|
|
200
|
-
<kendo-combobox
|
|
201
|
-
#combobox
|
|
202
|
-
kendoPDFViewerComboBox
|
|
203
|
-
class="k-toolbar-combobox"
|
|
204
|
-
fillMode="flat"
|
|
205
|
-
[attr.aria-controls]="pagesContainerId"
|
|
206
|
-
[tabindex]="-1"
|
|
207
|
-
[data]="zoomOptionsData"
|
|
208
|
-
[disabled]="disabledTools"
|
|
209
|
-
[placeholder]="messageFor('zoomInputPlaceholder')"
|
|
210
|
-
textField="displayValue"
|
|
211
|
-
valueField="id"
|
|
212
|
-
[value]="zoomLevelChooserValue"
|
|
213
|
-
[allowCustom]="true"
|
|
214
|
-
[valueNormalizer]="valueNormalizer"
|
|
215
|
-
[clearButton]="false"
|
|
216
|
-
(valueChange)="onZoomLevelChooserValueChange($event)">
|
|
217
|
-
<ng-template kendoComboBoxItemTemplate let-dataItem>
|
|
218
|
-
{{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
|
|
219
|
-
</ng-template>
|
|
220
|
-
</kendo-combobox>
|
|
221
|
-
</kendo-toolbar-input-wrapper>
|
|
222
|
-
}
|
|
223
|
-
@case ('selection') {
|
|
224
|
-
<kendo-buttongroup
|
|
225
|
-
[attr.aria-controls]="pagesContainerId"
|
|
226
|
-
[navigable]="false"
|
|
227
|
-
class="k-button-group-flat k-toolbar-button-group"
|
|
228
|
-
selection="single">
|
|
229
|
-
<button
|
|
230
|
-
type="button"
|
|
231
|
-
kendoButton
|
|
232
|
-
kendoPDFViewerToolbarFocusable
|
|
233
|
-
fillMode="flat"
|
|
234
|
-
icon="pointer"
|
|
235
|
-
[selected]="isSelectionEnabled"
|
|
236
|
-
[toggleable]="true"
|
|
237
|
-
[svgIcon]="pointerIcon"
|
|
238
|
-
[attr.title]="messageFor('selectionTitle')"
|
|
239
|
-
[attr.aria-label]="messageFor('selectionTitle')"
|
|
240
|
-
(click)="selectionEnabled.emit(); isSelectionEnabled = true;"></button>
|
|
241
|
-
<button
|
|
242
|
-
type="button"
|
|
243
|
-
kendoButton
|
|
244
|
-
kendoPDFViewerToolbarFocusable
|
|
245
|
-
fillMode="flat"
|
|
246
|
-
icon="hand"
|
|
247
|
-
[svgIcon]="handIcon"
|
|
248
|
-
[toggleable]="true"
|
|
249
|
-
[selected]="!isSelectionEnabled"
|
|
250
|
-
[attr.title]="messageFor('panningTitle')"
|
|
251
|
-
[attr.aria-label]="messageFor('panningTitle')"
|
|
252
|
-
(click)="panningEnabled.emit(); isSelectionEnabled = false;"></button>
|
|
253
|
-
</kendo-buttongroup>
|
|
254
|
-
}
|
|
255
|
-
@case ('search') {
|
|
256
|
-
<button
|
|
257
|
-
type="button"
|
|
258
|
-
kendoPDFViewerToolbarFocusable
|
|
259
|
-
kendoButton
|
|
260
|
-
class="k-toolbar-button"
|
|
261
|
-
fillMode="flat"
|
|
262
|
-
icon="search"
|
|
263
|
-
[disabled]="disabledTools"
|
|
264
|
-
[attr.title]="messageFor('searchTitle')"
|
|
265
|
-
[attr.aria-label]="messageFor('searchTitle')"
|
|
266
|
-
aria-haspopup="dialog"
|
|
267
|
-
[svgIcon]="searchIcon"
|
|
268
|
-
(click)="search.emit()"></button>
|
|
269
|
-
}
|
|
270
|
-
@case ('open') {
|
|
271
|
-
<button
|
|
272
|
-
type="button"
|
|
273
|
-
fillMode="flat"
|
|
274
|
-
kendoPDFViewerToolbarFocusable
|
|
275
|
-
kendoButton
|
|
276
|
-
class="k-toolbar-button"
|
|
277
|
-
fillMode="flat"
|
|
278
|
-
icon="folder-open"
|
|
279
|
-
[svgIcon]="folderOpenIcon"
|
|
280
|
-
[attr.title]="messageFor('openTitle')"
|
|
281
|
-
[attr.aria-label]="messageFor('openTitle')"
|
|
282
|
-
[attr.aria-controls]="pagesContainerId"
|
|
283
|
-
(click)="fileSelectEl?.nativeElement.click()">
|
|
284
|
-
</button>
|
|
285
|
-
}
|
|
286
|
-
@case ('download') {
|
|
287
|
-
<button
|
|
288
|
-
type="button"
|
|
289
|
-
fillMode="flat"
|
|
290
|
-
kendoPDFViewerToolbarFocusable
|
|
291
|
-
kendoButton
|
|
292
|
-
class="k-toolbar-button"
|
|
293
|
-
icon="download"
|
|
294
|
-
[svgIcon]="downloadIcon"
|
|
295
|
-
[disabled]="disabledTools"
|
|
296
|
-
[attr.title]="messageFor('downloadTitle')"
|
|
297
|
-
[attr.aria-label]="messageFor('downloadTitle')"
|
|
298
|
-
(click)="download.emit()"></button>
|
|
299
|
-
}
|
|
300
|
-
@case ('print') {
|
|
301
|
-
<button
|
|
302
|
-
type="button"
|
|
303
|
-
fillMode="flat"
|
|
304
|
-
kendoPDFViewerToolbarFocusable
|
|
305
|
-
kendoButton
|
|
306
|
-
class="k-toolbar-button"
|
|
307
|
-
icon="print"
|
|
308
|
-
[svgIcon]="printIcon"
|
|
309
|
-
[disabled]="disabledTools"
|
|
310
|
-
[attr.title]="messageFor('printTitle')"
|
|
311
|
-
[attr.aria-label]="messageFor('printTitle')"
|
|
312
|
-
(click)="print.emit()"></button>
|
|
313
|
-
}
|
|
314
|
-
@case ('annotations') {
|
|
315
|
-
<button
|
|
316
|
-
type="button"
|
|
317
|
-
[attr.id]="annotationsToolId"
|
|
318
|
-
kendoPDFViewerToolbarFocusable
|
|
319
|
-
kendoButton
|
|
320
|
-
class="k-toolbar-button"
|
|
321
|
-
fillMode="flat"
|
|
322
|
-
icon="track-changes"
|
|
323
|
-
[selected]="isAnnotationsToolbarVisible"
|
|
324
|
-
[disabled]="disabledTools || !isSelectionEnabled"
|
|
325
|
-
[attr.title]="messageFor('annotationsTitle')"
|
|
326
|
-
[attr.aria-label]="messageFor('annotationsTitle')"
|
|
327
|
-
[attr.aria-controls]="wrapperId"
|
|
328
|
-
[attr.aria-expanded]="isAnnotationsToolbarVisible"
|
|
329
|
-
[svgIcon]="trackChangesIcon"
|
|
330
|
-
(click)="toggleAnnotationsToolbar.emit();"></button>
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
@if (type === 'annotations') {
|
|
336
|
-
<button
|
|
337
|
-
type="button"
|
|
338
|
-
kendoPDFViewerToolbarFocusable
|
|
339
|
-
kendoButton
|
|
340
|
-
class="k-toolbar-button"
|
|
341
|
-
fillMode="flat"
|
|
342
|
-
icon="highlight"
|
|
343
|
-
[selected]="isHighlightMode"
|
|
344
|
-
[disabled]="disabledTools"
|
|
345
|
-
[attr.title]="messageFor('highlightAnnotationTitle')"
|
|
346
|
-
[attr.aria-label]="messageFor('highlightAnnotationTitle')"
|
|
347
|
-
aria-haspopup="dialog"
|
|
348
|
-
[svgIcon]="highlightIcon"
|
|
349
|
-
(click)="onHighlightClick()"></button>
|
|
350
|
-
<div class="k-toolbar-separator k-separator"></div>
|
|
351
|
-
<button
|
|
352
|
-
type="button"
|
|
353
|
-
fillMode="flat"
|
|
354
|
-
kendoPDFViewerToolbarFocusable
|
|
355
|
-
kendoButton
|
|
356
|
-
[selected]="isFreeTextMode"
|
|
357
|
-
class="k-toolbar-button"
|
|
358
|
-
fillMode="flat"
|
|
359
|
-
icon="free-text"
|
|
360
|
-
[svgIcon]="freeTextIcon"
|
|
361
|
-
[attr.title]="messageFor('freeTextAnnotationTitle')"
|
|
362
|
-
[attr.aria-label]="messageFor('freeTextAnnotationTitle')"
|
|
363
|
-
[attr.aria-controls]="pagesContainerId"
|
|
364
|
-
(click)="onFreeTextClick()">
|
|
365
|
-
</button>
|
|
366
|
-
<span class="k-spacer"></span>
|
|
367
|
-
<button
|
|
368
|
-
type="button"
|
|
369
|
-
fillMode="flat"
|
|
370
|
-
kendoPDFViewerToolbarFocusable
|
|
371
|
-
kendoButton
|
|
372
|
-
class="k-toolbar-button"
|
|
373
|
-
fillMode="flat"
|
|
374
|
-
icon="x"
|
|
375
|
-
[svgIcon]="xIcon"
|
|
376
|
-
[attr.title]="messageFor('closeAnnotationsToolbarTitle')"
|
|
377
|
-
[attr.aria-label]="messageFor('closeAnnotationsToolbarTitle')"
|
|
378
|
-
[attr.aria-controls]="pagesContainerId"
|
|
379
|
-
(click)="toggleAnnotationsToolbar.emit();">
|
|
380
|
-
</button>
|
|
381
|
-
}
|
|
382
|
-
@if (type === 'tools' &&tools?.indexOf('open') > -1;) {
|
|
383
|
-
<input
|
|
384
|
-
#fileSelectEl
|
|
385
|
-
type="file"
|
|
386
|
-
[style.display]="'none'"
|
|
387
|
-
aria-hidden="true"
|
|
388
|
-
accept=".pdf, .PDF"
|
|
389
|
-
(change)="onFileSelect($event)" />
|
|
390
|
-
}
|
|
391
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ToolbarInputWrapperComponent, selector: "kendo-toolbar-input-wrapper", inputs: ["toolbarTool"] }, { kind: "directive", type: ToolbarFocusableDirective, selector: "[kendoPDFViewerToolbarFocusable]" }, { kind: "component", type: PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive", "adaptiveMode"], outputs: ["pageChange", "pageSizeChange", "pagerInputVisibilityChange", "pageTextVisibilityChange", "itemsTextVisibilityChange"], exportAs: ["kendoDataPager", "kendoPager"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-datapager-messages, kendo-pager-messages" }, { kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "component", type: 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: ComboBoxComponent, selector: "kendo-combobox", inputs: ["icon", "svgIcon", "inputAttributes", "showStickyHeader", "focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "escape"], exportAs: ["kendoComboBox"] }, { kind: "directive", type: ToolbarComboBoxDirective, selector: "[kendoPDFViewerComboBox]" }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }] });
|
|
392
|
-
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
394
|
-
type: Component,
|
|
395
|
-
args: [{
|
|
396
|
-
selector: '[kendoPDFViewerToolbar]',
|
|
397
|
-
providers: [ToolbarNavigationService],
|
|
398
|
-
template: `
|
|
399
|
-
@if (type === 'tools') {
|
|
400
|
-
@for (tool of tools; track tool) {
|
|
401
|
-
@switch (tool) {
|
|
402
|
-
@case ('pager') {
|
|
403
|
-
<kendo-toolbar-input-wrapper
|
|
404
|
-
kendoPDFViewerToolbarFocusable
|
|
405
|
-
[toolbarTool]="pager">
|
|
406
|
-
<kendo-datapager
|
|
407
|
-
#pager
|
|
408
|
-
[attr.aria-controls]="pagesContainerId"
|
|
409
|
-
[attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
|
|
410
|
-
[class.k-disabled]="disabledTools"
|
|
411
|
-
[navigable]="true"
|
|
412
|
-
[pageSize]="pageSize"
|
|
413
|
-
[skip]="skip"
|
|
414
|
-
[total]="total"
|
|
415
|
-
[pageSizeValues]="false"
|
|
416
|
-
[info]="false"
|
|
417
|
-
[type]="pagerType"
|
|
418
|
-
(pageChange)="pageChange.emit($event)">
|
|
419
|
-
<kendo-datapager-messages
|
|
420
|
-
[firstPage]="messageFor('pagerFirstPage')"
|
|
421
|
-
[previousPage]="messageFor('pagerPreviousPage')"
|
|
422
|
-
[nextPage]="messageFor('pagerNextPage')"
|
|
423
|
-
[lastPage]="messageFor('pagerLastPage')"
|
|
424
|
-
[inputLabel]="messageFor('pagerInputLabel')"
|
|
425
|
-
[pageNumberInputTitle]="messageFor('pagerInputTitle')"
|
|
426
|
-
[of]="messageFor('pagerOf')"
|
|
427
|
-
[page]="messageFor('pagerPage')"></kendo-datapager-messages>
|
|
428
|
-
</kendo-datapager>
|
|
429
|
-
</kendo-toolbar-input-wrapper>
|
|
430
|
-
}
|
|
431
|
-
@case ('spacer') {
|
|
432
|
-
<span
|
|
433
|
-
class="k-spacer"></span>
|
|
434
|
-
}
|
|
435
|
-
@case ('zoomInOut') {
|
|
436
|
-
<kendo-buttongroup
|
|
437
|
-
[attr.aria-controls]="pagesContainerId"
|
|
438
|
-
class="k-button-group-flat k-toolbar-button-group"
|
|
439
|
-
[navigable]="false">
|
|
440
|
-
<button
|
|
441
|
-
type="button"
|
|
442
|
-
kendoButton
|
|
443
|
-
fillMode="flat"
|
|
444
|
-
kendoPDFViewerToolbarFocusable
|
|
445
|
-
icon="zoom-out"
|
|
446
|
-
[disabled]="disabledTools || zoomOutDisabled"
|
|
447
|
-
[svgIcon]="zoomOutIcon"
|
|
448
|
-
[attr.title]="messageFor('zoomOutTitle')"
|
|
449
|
-
[attr.aria-label]="messageFor('zoomOutTitle')"
|
|
450
|
-
(click)="zoomOut.emit()"></button>
|
|
451
|
-
<button
|
|
452
|
-
type="button"
|
|
453
|
-
kendoButton
|
|
454
|
-
fillMode="flat"
|
|
455
|
-
kendoPDFViewerToolbarFocusable
|
|
456
|
-
icon="zoom-in"
|
|
457
|
-
[disabled]="disabledTools || zoomInDisabled"
|
|
458
|
-
[svgIcon]="zoomInIcon"
|
|
459
|
-
[attr.title]="messageFor('zoomInTitle')"
|
|
460
|
-
[attr.aria-label]="messageFor('zoomInTitle')"
|
|
461
|
-
(click)="zoomIn.emit()"></button>
|
|
462
|
-
</kendo-buttongroup>
|
|
463
|
-
}
|
|
464
|
-
@case ('zoom') {
|
|
465
|
-
<kendo-toolbar-input-wrapper
|
|
466
|
-
kendoPDFViewerToolbarFocusable
|
|
467
|
-
[toolbarTool]="combobox">
|
|
468
|
-
<kendo-combobox
|
|
469
|
-
#combobox
|
|
470
|
-
kendoPDFViewerComboBox
|
|
471
|
-
class="k-toolbar-combobox"
|
|
472
|
-
fillMode="flat"
|
|
473
|
-
[attr.aria-controls]="pagesContainerId"
|
|
474
|
-
[tabindex]="-1"
|
|
475
|
-
[data]="zoomOptionsData"
|
|
476
|
-
[disabled]="disabledTools"
|
|
477
|
-
[placeholder]="messageFor('zoomInputPlaceholder')"
|
|
478
|
-
textField="displayValue"
|
|
479
|
-
valueField="id"
|
|
480
|
-
[value]="zoomLevelChooserValue"
|
|
481
|
-
[allowCustom]="true"
|
|
482
|
-
[valueNormalizer]="valueNormalizer"
|
|
483
|
-
[clearButton]="false"
|
|
484
|
-
(valueChange)="onZoomLevelChooserValueChange($event)">
|
|
485
|
-
<ng-template kendoComboBoxItemTemplate let-dataItem>
|
|
486
|
-
{{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
|
|
487
|
-
</ng-template>
|
|
488
|
-
</kendo-combobox>
|
|
489
|
-
</kendo-toolbar-input-wrapper>
|
|
490
|
-
}
|
|
491
|
-
@case ('selection') {
|
|
492
|
-
<kendo-buttongroup
|
|
493
|
-
[attr.aria-controls]="pagesContainerId"
|
|
494
|
-
[navigable]="false"
|
|
495
|
-
class="k-button-group-flat k-toolbar-button-group"
|
|
496
|
-
selection="single">
|
|
497
|
-
<button
|
|
498
|
-
type="button"
|
|
499
|
-
kendoButton
|
|
500
|
-
kendoPDFViewerToolbarFocusable
|
|
501
|
-
fillMode="flat"
|
|
502
|
-
icon="pointer"
|
|
503
|
-
[selected]="isSelectionEnabled"
|
|
504
|
-
[toggleable]="true"
|
|
505
|
-
[svgIcon]="pointerIcon"
|
|
506
|
-
[attr.title]="messageFor('selectionTitle')"
|
|
507
|
-
[attr.aria-label]="messageFor('selectionTitle')"
|
|
508
|
-
(click)="selectionEnabled.emit(); isSelectionEnabled = true;"></button>
|
|
509
|
-
<button
|
|
510
|
-
type="button"
|
|
511
|
-
kendoButton
|
|
512
|
-
kendoPDFViewerToolbarFocusable
|
|
513
|
-
fillMode="flat"
|
|
514
|
-
icon="hand"
|
|
515
|
-
[svgIcon]="handIcon"
|
|
516
|
-
[toggleable]="true"
|
|
517
|
-
[selected]="!isSelectionEnabled"
|
|
518
|
-
[attr.title]="messageFor('panningTitle')"
|
|
519
|
-
[attr.aria-label]="messageFor('panningTitle')"
|
|
520
|
-
(click)="panningEnabled.emit(); isSelectionEnabled = false;"></button>
|
|
521
|
-
</kendo-buttongroup>
|
|
522
|
-
}
|
|
523
|
-
@case ('search') {
|
|
524
|
-
<button
|
|
525
|
-
type="button"
|
|
526
|
-
kendoPDFViewerToolbarFocusable
|
|
527
|
-
kendoButton
|
|
528
|
-
class="k-toolbar-button"
|
|
529
|
-
fillMode="flat"
|
|
530
|
-
icon="search"
|
|
531
|
-
[disabled]="disabledTools"
|
|
532
|
-
[attr.title]="messageFor('searchTitle')"
|
|
533
|
-
[attr.aria-label]="messageFor('searchTitle')"
|
|
534
|
-
aria-haspopup="dialog"
|
|
535
|
-
[svgIcon]="searchIcon"
|
|
536
|
-
(click)="search.emit()"></button>
|
|
537
|
-
}
|
|
538
|
-
@case ('open') {
|
|
539
|
-
<button
|
|
540
|
-
type="button"
|
|
541
|
-
fillMode="flat"
|
|
542
|
-
kendoPDFViewerToolbarFocusable
|
|
543
|
-
kendoButton
|
|
544
|
-
class="k-toolbar-button"
|
|
545
|
-
fillMode="flat"
|
|
546
|
-
icon="folder-open"
|
|
547
|
-
[svgIcon]="folderOpenIcon"
|
|
548
|
-
[attr.title]="messageFor('openTitle')"
|
|
549
|
-
[attr.aria-label]="messageFor('openTitle')"
|
|
550
|
-
[attr.aria-controls]="pagesContainerId"
|
|
551
|
-
(click)="fileSelectEl?.nativeElement.click()">
|
|
552
|
-
</button>
|
|
553
|
-
}
|
|
554
|
-
@case ('download') {
|
|
555
|
-
<button
|
|
556
|
-
type="button"
|
|
557
|
-
fillMode="flat"
|
|
558
|
-
kendoPDFViewerToolbarFocusable
|
|
559
|
-
kendoButton
|
|
560
|
-
class="k-toolbar-button"
|
|
561
|
-
icon="download"
|
|
562
|
-
[svgIcon]="downloadIcon"
|
|
563
|
-
[disabled]="disabledTools"
|
|
564
|
-
[attr.title]="messageFor('downloadTitle')"
|
|
565
|
-
[attr.aria-label]="messageFor('downloadTitle')"
|
|
566
|
-
(click)="download.emit()"></button>
|
|
567
|
-
}
|
|
568
|
-
@case ('print') {
|
|
569
|
-
<button
|
|
570
|
-
type="button"
|
|
571
|
-
fillMode="flat"
|
|
572
|
-
kendoPDFViewerToolbarFocusable
|
|
573
|
-
kendoButton
|
|
574
|
-
class="k-toolbar-button"
|
|
575
|
-
icon="print"
|
|
576
|
-
[svgIcon]="printIcon"
|
|
577
|
-
[disabled]="disabledTools"
|
|
578
|
-
[attr.title]="messageFor('printTitle')"
|
|
579
|
-
[attr.aria-label]="messageFor('printTitle')"
|
|
580
|
-
(click)="print.emit()"></button>
|
|
581
|
-
}
|
|
582
|
-
@case ('annotations') {
|
|
583
|
-
<button
|
|
584
|
-
type="button"
|
|
585
|
-
[attr.id]="annotationsToolId"
|
|
586
|
-
kendoPDFViewerToolbarFocusable
|
|
587
|
-
kendoButton
|
|
588
|
-
class="k-toolbar-button"
|
|
589
|
-
fillMode="flat"
|
|
590
|
-
icon="track-changes"
|
|
591
|
-
[selected]="isAnnotationsToolbarVisible"
|
|
592
|
-
[disabled]="disabledTools || !isSelectionEnabled"
|
|
593
|
-
[attr.title]="messageFor('annotationsTitle')"
|
|
594
|
-
[attr.aria-label]="messageFor('annotationsTitle')"
|
|
595
|
-
[attr.aria-controls]="wrapperId"
|
|
596
|
-
[attr.aria-expanded]="isAnnotationsToolbarVisible"
|
|
597
|
-
[svgIcon]="trackChangesIcon"
|
|
598
|
-
(click)="toggleAnnotationsToolbar.emit();"></button>
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
@if (type === 'annotations') {
|
|
604
|
-
<button
|
|
605
|
-
type="button"
|
|
606
|
-
kendoPDFViewerToolbarFocusable
|
|
607
|
-
kendoButton
|
|
608
|
-
class="k-toolbar-button"
|
|
609
|
-
fillMode="flat"
|
|
610
|
-
icon="highlight"
|
|
611
|
-
[selected]="isHighlightMode"
|
|
612
|
-
[disabled]="disabledTools"
|
|
613
|
-
[attr.title]="messageFor('highlightAnnotationTitle')"
|
|
614
|
-
[attr.aria-label]="messageFor('highlightAnnotationTitle')"
|
|
615
|
-
aria-haspopup="dialog"
|
|
616
|
-
[svgIcon]="highlightIcon"
|
|
617
|
-
(click)="onHighlightClick()"></button>
|
|
618
|
-
<div class="k-toolbar-separator k-separator"></div>
|
|
619
|
-
<button
|
|
620
|
-
type="button"
|
|
621
|
-
fillMode="flat"
|
|
622
|
-
kendoPDFViewerToolbarFocusable
|
|
623
|
-
kendoButton
|
|
624
|
-
[selected]="isFreeTextMode"
|
|
625
|
-
class="k-toolbar-button"
|
|
626
|
-
fillMode="flat"
|
|
627
|
-
icon="free-text"
|
|
628
|
-
[svgIcon]="freeTextIcon"
|
|
629
|
-
[attr.title]="messageFor('freeTextAnnotationTitle')"
|
|
630
|
-
[attr.aria-label]="messageFor('freeTextAnnotationTitle')"
|
|
631
|
-
[attr.aria-controls]="pagesContainerId"
|
|
632
|
-
(click)="onFreeTextClick()">
|
|
633
|
-
</button>
|
|
634
|
-
<span class="k-spacer"></span>
|
|
635
|
-
<button
|
|
636
|
-
type="button"
|
|
637
|
-
fillMode="flat"
|
|
638
|
-
kendoPDFViewerToolbarFocusable
|
|
639
|
-
kendoButton
|
|
640
|
-
class="k-toolbar-button"
|
|
641
|
-
fillMode="flat"
|
|
642
|
-
icon="x"
|
|
643
|
-
[svgIcon]="xIcon"
|
|
644
|
-
[attr.title]="messageFor('closeAnnotationsToolbarTitle')"
|
|
645
|
-
[attr.aria-label]="messageFor('closeAnnotationsToolbarTitle')"
|
|
646
|
-
[attr.aria-controls]="pagesContainerId"
|
|
647
|
-
(click)="toggleAnnotationsToolbar.emit();">
|
|
648
|
-
</button>
|
|
649
|
-
}
|
|
650
|
-
@if (type === 'tools' &&tools?.indexOf('open') > -1;) {
|
|
651
|
-
<input
|
|
652
|
-
#fileSelectEl
|
|
653
|
-
type="file"
|
|
654
|
-
[style.display]="'none'"
|
|
655
|
-
aria-hidden="true"
|
|
656
|
-
accept=".pdf, .PDF"
|
|
657
|
-
(change)="onFileSelect($event)" />
|
|
658
|
-
}
|
|
659
|
-
`,
|
|
660
|
-
standalone: true,
|
|
661
|
-
imports: [ToolbarInputWrapperComponent, ToolbarFocusableDirective, PagerComponent, CustomMessagesComponent, ButtonGroupComponent, ButtonComponent, ComboBoxComponent, ToolbarComboBoxDirective, ItemTemplateDirective]
|
|
662
|
-
}]
|
|
663
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.ToolbarNavigationService }], propDecorators: { toolbarClasses: [{
|
|
664
|
-
type: HostBinding,
|
|
665
|
-
args: ['class.k-toolbar']
|
|
666
|
-
}, {
|
|
667
|
-
type: HostBinding,
|
|
668
|
-
args: ['class.k-toolbar-md']
|
|
669
|
-
}, {
|
|
670
|
-
type: HostBinding,
|
|
671
|
-
args: ['class.k-toolbar-flat']
|
|
672
|
-
}], fileSelectEl: [{
|
|
673
|
-
type: ViewChild,
|
|
674
|
-
args: ['fileSelectEl']
|
|
675
|
-
}], zoomLevel: [{
|
|
676
|
-
type: Input
|
|
677
|
-
}], calculatedComboBoxValue: [{
|
|
678
|
-
type: Input
|
|
679
|
-
}], skip: [{
|
|
680
|
-
type: Input
|
|
681
|
-
}], pageSize: [{
|
|
682
|
-
type: Input
|
|
683
|
-
}], total: [{
|
|
684
|
-
type: Input
|
|
685
|
-
}], zoomInDisabled: [{
|
|
686
|
-
type: Input
|
|
687
|
-
}], zoomOutDisabled: [{
|
|
688
|
-
type: Input
|
|
689
|
-
}], disabledTools: [{
|
|
690
|
-
type: Input
|
|
691
|
-
}], zoomLevelChooserValue: [{
|
|
692
|
-
type: Input
|
|
693
|
-
}], zoomOptionsData: [{
|
|
694
|
-
type: Input
|
|
695
|
-
}], pagesContainerId: [{
|
|
696
|
-
type: Input
|
|
697
|
-
}], tools: [{
|
|
698
|
-
type: Input
|
|
699
|
-
}], type: [{
|
|
700
|
-
type: Input
|
|
701
|
-
}], wrapperId: [{
|
|
702
|
-
type: Input
|
|
703
|
-
}], isAnnotationsToolbarVisible: [{
|
|
704
|
-
type: Input
|
|
705
|
-
}], annotationsToolId: [{
|
|
706
|
-
type: Input
|
|
707
|
-
}], isSelectionEnabled: [{
|
|
708
|
-
type: Input
|
|
709
|
-
}], fileSelect: [{
|
|
710
|
-
type: Output
|
|
711
|
-
}], fileSelectStart: [{
|
|
712
|
-
type: Output
|
|
713
|
-
}], fileSelectError: [{
|
|
714
|
-
type: Output
|
|
715
|
-
}], download: [{
|
|
716
|
-
type: Output
|
|
717
|
-
}], selectionEnabled: [{
|
|
718
|
-
type: Output
|
|
719
|
-
}], panningEnabled: [{
|
|
720
|
-
type: Output
|
|
721
|
-
}], pageChange: [{
|
|
722
|
-
type: Output
|
|
723
|
-
}], zoomIn: [{
|
|
724
|
-
type: Output
|
|
725
|
-
}], zoomOut: [{
|
|
726
|
-
type: Output
|
|
727
|
-
}], zoomLevelChange: [{
|
|
728
|
-
type: Output
|
|
729
|
-
}], print: [{
|
|
730
|
-
type: Output
|
|
731
|
-
}], search: [{
|
|
732
|
-
type: Output
|
|
733
|
-
}], toggleAnnotationsToolbar: [{
|
|
734
|
-
type: Output
|
|
735
|
-
}], setAnnotationMode: [{
|
|
736
|
-
type: Output
|
|
737
|
-
}] } });
|