@progress/kendo-angular-pdfviewer 21.1.1-develop.2 → 21.2.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/esm2022/annotations/annotation-editor.mjs +83 -84
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/pdfviewer.component.mjs +344 -333
- package/esm2022/toolbar/toolbar.component.mjs +512 -491
- package/fesm2022/progress-kendo-angular-pdfviewer.mjs +941 -908
- package/package.json +14 -14
- package/schematics/ngAdd/index.js +2 -2
|
@@ -13,7 +13,6 @@ import { ToolbarComboBoxDirective } from './toolbar-combobox.directive';
|
|
|
13
13
|
import { ButtonComponent, ButtonGroupComponent } from '@progress/kendo-angular-buttons';
|
|
14
14
|
import { ToolbarFocusableDirective } from './toolbar-focusable.directive';
|
|
15
15
|
import { ToolbarInputWrapperComponent } from './input-wrapper.component';
|
|
16
|
-
import { NgFor, NgSwitch, NgSwitchCase, NgIf } from '@angular/common';
|
|
17
16
|
import { map } from 'rxjs/operators';
|
|
18
17
|
import * as i0 from "@angular/core";
|
|
19
18
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
@@ -128,257 +127,268 @@ export class ToolbarComponent {
|
|
|
128
127
|
};
|
|
129
128
|
}));
|
|
130
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 });
|
|
131
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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
|
|
374
384
|
#fileSelectEl
|
|
375
|
-
*ngIf="type === 'tools' &&tools?.indexOf('open') > -1;"
|
|
376
385
|
type="file"
|
|
377
386
|
[style.display]="'none'"
|
|
378
387
|
aria-hidden="true"
|
|
379
388
|
accept=".pdf, .PDF"
|
|
380
389
|
(change)="onFileSelect($event)" />
|
|
381
|
-
|
|
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]" }] });
|
|
382
392
|
}
|
|
383
393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
384
394
|
type: Component,
|
|
@@ -386,258 +396,269 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
386
396
|
selector: '[kendoPDFViewerToolbar]',
|
|
387
397
|
providers: [ToolbarNavigationService],
|
|
388
398
|
template: `
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
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
|
|
631
652
|
#fileSelectEl
|
|
632
|
-
*ngIf="type === 'tools' &&tools?.indexOf('open') > -1;"
|
|
633
653
|
type="file"
|
|
634
654
|
[style.display]="'none'"
|
|
635
655
|
aria-hidden="true"
|
|
636
656
|
accept=".pdf, .PDF"
|
|
637
657
|
(change)="onFileSelect($event)" />
|
|
638
|
-
|
|
658
|
+
}
|
|
659
|
+
`,
|
|
639
660
|
standalone: true,
|
|
640
|
-
imports: [
|
|
661
|
+
imports: [ToolbarInputWrapperComponent, ToolbarFocusableDirective, PagerComponent, CustomMessagesComponent, ButtonGroupComponent, ButtonComponent, ComboBoxComponent, ToolbarComboBoxDirective, ItemTemplateDirective]
|
|
641
662
|
}]
|
|
642
663
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.ToolbarNavigationService }], propDecorators: { toolbarClasses: [{
|
|
643
664
|
type: HostBinding,
|