@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,52 +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
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { KENDO_PDFVIEWER } from './directives';
|
|
7
|
-
import { IconsService } from '@progress/kendo-angular-icons';
|
|
8
|
-
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "./pdfviewer.component";
|
|
12
|
-
import * as i2 from "./localization/custom-messages.component";
|
|
13
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
14
|
-
/**
|
|
15
|
-
* Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) definition for the PDFViewer component.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* import { NgModule } from '@angular/core';
|
|
20
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
21
|
-
* import { PDFViewerModule } from '@progress/kendo-angular-pdf-viewer';
|
|
22
|
-
* import { AppComponent } from './app.component';
|
|
23
|
-
*
|
|
24
|
-
* @NgModule({
|
|
25
|
-
* declarations: [AppComponent],
|
|
26
|
-
* imports: [BrowserModule, PDFViewerModule],
|
|
27
|
-
* bootstrap: [AppComponent]
|
|
28
|
-
* })
|
|
29
|
-
* export class AppModule {}
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export class PDFViewerModule {
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: PDFViewerModule, imports: [i1.PDFViewerComponent, i2.PDFViewerCustomMessagesComponent], exports: [i1.PDFViewerComponent, i2.PDFViewerCustomMessagesComponent] });
|
|
35
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFViewerModule, providers: [
|
|
36
|
-
IconsService,
|
|
37
|
-
PopupService,
|
|
38
|
-
ResizeBatchService
|
|
39
|
-
], imports: [i1.PDFViewerComponent] });
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFViewerModule, decorators: [{
|
|
42
|
-
type: NgModule,
|
|
43
|
-
args: [{
|
|
44
|
-
exports: [...KENDO_PDFVIEWER],
|
|
45
|
-
imports: [...KENDO_PDFVIEWER],
|
|
46
|
-
providers: [
|
|
47
|
-
IconsService,
|
|
48
|
-
PopupService,
|
|
49
|
-
ResizeBatchService
|
|
50
|
-
]
|
|
51
|
-
}]
|
|
52
|
-
}] });
|
|
@@ -1,8 +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
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|
|
@@ -1,66 +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
|
-
import { Component, ElementRef, HostBinding, Input, Renderer2 } from '@angular/core';
|
|
6
|
-
import { focusableSelector } from '@progress/kendo-angular-common';
|
|
7
|
-
import { Subscription } from 'rxjs';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class ToolbarInputWrapperComponent {
|
|
13
|
-
host;
|
|
14
|
-
renderer;
|
|
15
|
-
toolbarTool;
|
|
16
|
-
hostClass = true;
|
|
17
|
-
subs = new Subscription();
|
|
18
|
-
constructor(host, renderer) {
|
|
19
|
-
this.host = host;
|
|
20
|
-
this.renderer = renderer;
|
|
21
|
-
}
|
|
22
|
-
ngAfterViewInit() {
|
|
23
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'keydown.enter', () => {
|
|
24
|
-
if (this.toolbarTool.focus) {
|
|
25
|
-
this.toolbarTool.focus();
|
|
26
|
-
}
|
|
27
|
-
else if (this.toolbarTool.element) {
|
|
28
|
-
this.toolbarTool.element.nativeElement.setAttribute('tabindex', '0');
|
|
29
|
-
this.toolbarTool.element.nativeElement.focus();
|
|
30
|
-
}
|
|
31
|
-
}));
|
|
32
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'blur', () => this.host.nativeElement.querySelectorAll(focusableSelector).forEach(el => el.setAttribute('tabindex', '-1'))));
|
|
33
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'keydown.escape', () => {
|
|
34
|
-
if (this.toolbarTool.blur) {
|
|
35
|
-
this.toolbarTool.blur();
|
|
36
|
-
}
|
|
37
|
-
else if (this.toolbarTool.element) {
|
|
38
|
-
this.toolbarTool.element.nativeElement.setAttribute('tabindex', '-1');
|
|
39
|
-
this.toolbarTool.element.nativeElement.blur();
|
|
40
|
-
}
|
|
41
|
-
this.host.nativeElement.focus();
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
ngOnDestroy() {
|
|
45
|
-
this.subs.unsubscribe();
|
|
46
|
-
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarInputWrapperComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarInputWrapperComponent, isStandalone: true, selector: "kendo-toolbar-input-wrapper", inputs: { toolbarTool: "toolbarTool" }, host: { properties: { "class.k-toolbar-item": "this.hostClass" } }, ngImport: i0, template: `
|
|
49
|
-
<ng-content></ng-content>
|
|
50
|
-
`, isInline: true });
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarInputWrapperComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{
|
|
55
|
-
selector: 'kendo-toolbar-input-wrapper',
|
|
56
|
-
template: `
|
|
57
|
-
<ng-content></ng-content>
|
|
58
|
-
`,
|
|
59
|
-
standalone: true
|
|
60
|
-
}]
|
|
61
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { toolbarTool: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], hostClass: [{
|
|
64
|
-
type: HostBinding,
|
|
65
|
-
args: ['class.k-toolbar-item']
|
|
66
|
-
}] } });
|
|
@@ -1,191 +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
|
-
import { Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewChild } from '@angular/core';
|
|
6
|
-
import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@progress/kendo-angular-inputs';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { arrowDownIcon, arrowUpIcon, convertLowercaseIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
9
|
-
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export class PDFViewerSearchComponent {
|
|
16
|
-
localization;
|
|
17
|
-
textbox;
|
|
18
|
-
closeButton;
|
|
19
|
-
ariaRole = 'dialog';
|
|
20
|
-
get ariaLabel() {
|
|
21
|
-
return this.messageFor('searchTitle');
|
|
22
|
-
}
|
|
23
|
-
onEscape() {
|
|
24
|
-
this.close.emit();
|
|
25
|
-
}
|
|
26
|
-
matches;
|
|
27
|
-
currentMatch;
|
|
28
|
-
searchChange = new EventEmitter();
|
|
29
|
-
prevMatch = new EventEmitter();
|
|
30
|
-
nextMatch = new EventEmitter();
|
|
31
|
-
close = new EventEmitter();
|
|
32
|
-
convertLowercaseIcon = convertLowercaseIcon;
|
|
33
|
-
arrowUpIcon = arrowUpIcon;
|
|
34
|
-
arrowDownIcon = arrowDownIcon;
|
|
35
|
-
xIcon = xIcon;
|
|
36
|
-
value = null;
|
|
37
|
-
matchCase = false;
|
|
38
|
-
constructor(localization) {
|
|
39
|
-
this.localization = localization;
|
|
40
|
-
}
|
|
41
|
-
ngAfterViewInit() {
|
|
42
|
-
this.textbox.focus();
|
|
43
|
-
}
|
|
44
|
-
messageFor(key) {
|
|
45
|
-
return this.localization.get(key);
|
|
46
|
-
}
|
|
47
|
-
onShiftTab(e) {
|
|
48
|
-
if (e.target.matches('.k-input-inner')) {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
this.closeButton.nativeElement.focus();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFViewerSearchComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PDFViewerSearchComponent, isStandalone: true, selector: "[kendoPDFViewerSearch]", inputs: { matches: "matches", currentMatch: "currentMatch" }, outputs: { searchChange: "searchChange", prevMatch: "prevMatch", nextMatch: "nextMatch", close: "close" }, host: { listeners: { "keydown.escape": "onEscape()" }, properties: { "attr.role": "this.ariaRole", "attr.aria-label": "this.ariaLabel" } }, viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textbox"], descendants: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
55
|
-
<kendo-textbox
|
|
56
|
-
#textbox
|
|
57
|
-
[placeholder]="messageFor('searchInputPlaceholder')"
|
|
58
|
-
[value]="value"
|
|
59
|
-
(valueChange)="value = $event; searchChange.emit({text: $event, matchCase})"
|
|
60
|
-
(keydown.shift.tab)="onShiftTab($event)">
|
|
61
|
-
<ng-template kendoTextBoxSuffixTemplate>
|
|
62
|
-
<button
|
|
63
|
-
type="button"
|
|
64
|
-
kendoButton
|
|
65
|
-
[attr.title]="messageFor('searchMatchCaseTitle')"
|
|
66
|
-
fillMode="flat"
|
|
67
|
-
[togglable]="true"
|
|
68
|
-
(click)="matchCase = !matchCase; searchChange.emit({text: value, matchCase})"
|
|
69
|
-
icon="convert-lowercase"
|
|
70
|
-
[svgIcon]="convertLowercaseIcon"></button>
|
|
71
|
-
</ng-template>
|
|
72
|
-
</kendo-textbox>
|
|
73
|
-
<span class="k-search-matches">
|
|
74
|
-
<span>{{currentMatch}}</span> {{messageFor('searchMatchesOf')}} <span>{{matches}}</span>
|
|
75
|
-
</span>
|
|
76
|
-
<button
|
|
77
|
-
type="button"
|
|
78
|
-
kendoButton
|
|
79
|
-
[attr.title]="messageFor('searchPreviousMatchTitle')"
|
|
80
|
-
fillMode="flat"
|
|
81
|
-
[disabled]="matches === 0"
|
|
82
|
-
(click)="prevMatch.emit()"
|
|
83
|
-
icon='arrow-up'
|
|
84
|
-
[svgIcon]="arrowUpIcon"></button>
|
|
85
|
-
<button
|
|
86
|
-
type="button"
|
|
87
|
-
kendoButton
|
|
88
|
-
[attr.title]="messageFor('searchNextMatchTitle')"
|
|
89
|
-
fillMode="flat"
|
|
90
|
-
[disabled]="matches === 0"
|
|
91
|
-
(click)="nextMatch.emit()"
|
|
92
|
-
icon='arrow-down'
|
|
93
|
-
[svgIcon]="arrowDownIcon"></button>
|
|
94
|
-
<button
|
|
95
|
-
type="button"
|
|
96
|
-
#closeButton
|
|
97
|
-
kendoButton
|
|
98
|
-
[attr.title]="messageFor('searchCloseTitle')"
|
|
99
|
-
fillMode="flat"
|
|
100
|
-
(click)="close.emit()"
|
|
101
|
-
(keydown.tab)="$event.preventDefault(); textbox.focus();"
|
|
102
|
-
icon='x'
|
|
103
|
-
[svgIcon]="xIcon"></button>
|
|
104
|
-
`, isInline: true, dependencies: [{ kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { 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"] }] });
|
|
105
|
-
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFViewerSearchComponent, decorators: [{
|
|
107
|
-
type: Component,
|
|
108
|
-
args: [{
|
|
109
|
-
selector: '[kendoPDFViewerSearch]',
|
|
110
|
-
template: `
|
|
111
|
-
<kendo-textbox
|
|
112
|
-
#textbox
|
|
113
|
-
[placeholder]="messageFor('searchInputPlaceholder')"
|
|
114
|
-
[value]="value"
|
|
115
|
-
(valueChange)="value = $event; searchChange.emit({text: $event, matchCase})"
|
|
116
|
-
(keydown.shift.tab)="onShiftTab($event)">
|
|
117
|
-
<ng-template kendoTextBoxSuffixTemplate>
|
|
118
|
-
<button
|
|
119
|
-
type="button"
|
|
120
|
-
kendoButton
|
|
121
|
-
[attr.title]="messageFor('searchMatchCaseTitle')"
|
|
122
|
-
fillMode="flat"
|
|
123
|
-
[togglable]="true"
|
|
124
|
-
(click)="matchCase = !matchCase; searchChange.emit({text: value, matchCase})"
|
|
125
|
-
icon="convert-lowercase"
|
|
126
|
-
[svgIcon]="convertLowercaseIcon"></button>
|
|
127
|
-
</ng-template>
|
|
128
|
-
</kendo-textbox>
|
|
129
|
-
<span class="k-search-matches">
|
|
130
|
-
<span>{{currentMatch}}</span> {{messageFor('searchMatchesOf')}} <span>{{matches}}</span>
|
|
131
|
-
</span>
|
|
132
|
-
<button
|
|
133
|
-
type="button"
|
|
134
|
-
kendoButton
|
|
135
|
-
[attr.title]="messageFor('searchPreviousMatchTitle')"
|
|
136
|
-
fillMode="flat"
|
|
137
|
-
[disabled]="matches === 0"
|
|
138
|
-
(click)="prevMatch.emit()"
|
|
139
|
-
icon='arrow-up'
|
|
140
|
-
[svgIcon]="arrowUpIcon"></button>
|
|
141
|
-
<button
|
|
142
|
-
type="button"
|
|
143
|
-
kendoButton
|
|
144
|
-
[attr.title]="messageFor('searchNextMatchTitle')"
|
|
145
|
-
fillMode="flat"
|
|
146
|
-
[disabled]="matches === 0"
|
|
147
|
-
(click)="nextMatch.emit()"
|
|
148
|
-
icon='arrow-down'
|
|
149
|
-
[svgIcon]="arrowDownIcon"></button>
|
|
150
|
-
<button
|
|
151
|
-
type="button"
|
|
152
|
-
#closeButton
|
|
153
|
-
kendoButton
|
|
154
|
-
[attr.title]="messageFor('searchCloseTitle')"
|
|
155
|
-
fillMode="flat"
|
|
156
|
-
(click)="close.emit()"
|
|
157
|
-
(keydown.tab)="$event.preventDefault(); textbox.focus();"
|
|
158
|
-
icon='x'
|
|
159
|
-
[svgIcon]="xIcon"></button>
|
|
160
|
-
`,
|
|
161
|
-
standalone: true,
|
|
162
|
-
imports: [TextBoxComponent, TextBoxSuffixTemplateDirective, ButtonComponent]
|
|
163
|
-
}]
|
|
164
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { textbox: [{
|
|
165
|
-
type: ViewChild,
|
|
166
|
-
args: ['textbox']
|
|
167
|
-
}], closeButton: [{
|
|
168
|
-
type: ViewChild,
|
|
169
|
-
args: ['closeButton', { read: ElementRef }]
|
|
170
|
-
}], ariaRole: [{
|
|
171
|
-
type: HostBinding,
|
|
172
|
-
args: ['attr.role']
|
|
173
|
-
}], ariaLabel: [{
|
|
174
|
-
type: HostBinding,
|
|
175
|
-
args: ['attr.aria-label']
|
|
176
|
-
}], onEscape: [{
|
|
177
|
-
type: HostListener,
|
|
178
|
-
args: ['keydown.escape']
|
|
179
|
-
}], matches: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], currentMatch: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], searchChange: [{
|
|
184
|
-
type: Output
|
|
185
|
-
}], prevMatch: [{
|
|
186
|
-
type: Output
|
|
187
|
-
}], nextMatch: [{
|
|
188
|
-
type: Output
|
|
189
|
-
}], close: [{
|
|
190
|
-
type: Output
|
|
191
|
-
}] } });
|
|
@@ -1,49 +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
|
-
import { ComboBoxComponent } from '@progress/kendo-angular-dropdowns';
|
|
6
|
-
import { Directive, ElementRef } from '@angular/core';
|
|
7
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-dropdowns";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class ToolbarComboBoxDirective {
|
|
14
|
-
combo;
|
|
15
|
-
hostEl;
|
|
16
|
-
inputElement;
|
|
17
|
-
constructor(combo, hostEl) {
|
|
18
|
-
this.combo = combo;
|
|
19
|
-
this.hostEl = hostEl;
|
|
20
|
-
}
|
|
21
|
-
ngAfterViewInit() {
|
|
22
|
-
this.inputElement = this.combo.searchbar.input.nativeElement;
|
|
23
|
-
this.hostEl.nativeElement.setAttribute('tabindex', '-1');
|
|
24
|
-
this.inputElement.addEventListener('keydown', this.keydownHandler, true);
|
|
25
|
-
}
|
|
26
|
-
ngOnDestroy() {
|
|
27
|
-
this.inputElement.removeEventListener('keydown', this.keydownHandler);
|
|
28
|
-
}
|
|
29
|
-
keydownHandler = (e) => {
|
|
30
|
-
if (e.code === Keys.Escape) {
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
if (this.combo.isOpen) {
|
|
33
|
-
this.combo.toggle(false);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.hostEl.nativeElement.parentElement.focus();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComboBoxDirective, deps: [{ token: i1.ComboBoxComponent }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarComboBoxDirective, isStandalone: true, selector: "[kendoPDFViewerComboBox]", ngImport: i0 });
|
|
42
|
-
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarComboBoxDirective, decorators: [{
|
|
44
|
-
type: Directive,
|
|
45
|
-
args: [{
|
|
46
|
-
selector: '[kendoPDFViewerComboBox]',
|
|
47
|
-
standalone: true
|
|
48
|
-
}]
|
|
49
|
-
}], ctorParameters: () => [{ type: i1.ComboBoxComponent }, { type: i0.ElementRef }] });
|
|
@@ -1,70 +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
|
-
import { Directive, ElementRef, Renderer2 } from '@angular/core';
|
|
6
|
-
import { ToolbarNavigationService } from './toolbar-navigation.service';
|
|
7
|
-
import { Keys, focusableSelector, normalizeKeys } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "./toolbar-navigation.service";
|
|
10
|
-
const controller = new AbortController();
|
|
11
|
-
const { signal } = controller;
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export class ToolbarFocusableDirective {
|
|
16
|
-
host;
|
|
17
|
-
navigationService;
|
|
18
|
-
renderer;
|
|
19
|
-
constructor(host, navigationService, renderer) {
|
|
20
|
-
this.host = host;
|
|
21
|
-
this.navigationService = navigationService;
|
|
22
|
-
this.renderer = renderer;
|
|
23
|
-
navigationService.register(this);
|
|
24
|
-
}
|
|
25
|
-
ngAfterViewInit() {
|
|
26
|
-
const element = this.host.nativeElement;
|
|
27
|
-
this.renderer.setAttribute(element, 'tabindex', this.navigationService.isActive(this) ? '0' : '-1');
|
|
28
|
-
element.addEventListener('keydown', (e) => {
|
|
29
|
-
const targetsSelf = e.target === element;
|
|
30
|
-
const code = normalizeKeys(e);
|
|
31
|
-
const isLeftArrow = code === Keys.ArrowLeft;
|
|
32
|
-
const isRightArrow = code === Keys.ArrowRight;
|
|
33
|
-
const isArrow = isLeftArrow || isRightArrow;
|
|
34
|
-
if (!targetsSelf || !isArrow) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.renderer.setAttribute(element, 'tabindex', '-1');
|
|
38
|
-
element.querySelectorAll(focusableSelector).forEach(el => {
|
|
39
|
-
this.renderer.setAttribute(el, 'tabindex', '-1');
|
|
40
|
-
});
|
|
41
|
-
if (isRightArrow) {
|
|
42
|
-
this.navigationService.move('right');
|
|
43
|
-
}
|
|
44
|
-
else if (isLeftArrow) {
|
|
45
|
-
this.navigationService.move('left');
|
|
46
|
-
}
|
|
47
|
-
}, { signal, capture: true });
|
|
48
|
-
element.addEventListener('click', () => {
|
|
49
|
-
this.navigationService.setActiveIndex(this);
|
|
50
|
-
}, { signal, capture: true });
|
|
51
|
-
}
|
|
52
|
-
ngOnDestroy() {
|
|
53
|
-
controller.abort();
|
|
54
|
-
this.navigationService.unregister(this);
|
|
55
|
-
}
|
|
56
|
-
activate() {
|
|
57
|
-
const element = this.host.nativeElement;
|
|
58
|
-
this.renderer.setAttribute(element, 'tabindex', '0');
|
|
59
|
-
element.focus();
|
|
60
|
-
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
62
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarFocusableDirective, isStandalone: true, selector: "[kendoPDFViewerToolbarFocusable]", ngImport: i0 });
|
|
63
|
-
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarFocusableDirective, decorators: [{
|
|
65
|
-
type: Directive,
|
|
66
|
-
args: [{
|
|
67
|
-
selector: '[kendoPDFViewerToolbarFocusable]',
|
|
68
|
-
standalone: true
|
|
69
|
-
}]
|
|
70
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ToolbarNavigationService }, { type: i0.Renderer2 }] });
|
|
@@ -1,53 +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
|
-
import { Injectable } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class ToolbarNavigationService {
|
|
13
|
-
localizationService;
|
|
14
|
-
focusableTools = [];
|
|
15
|
-
currentFocusIndex = 0;
|
|
16
|
-
constructor(localizationService) {
|
|
17
|
-
this.localizationService = localizationService;
|
|
18
|
-
}
|
|
19
|
-
register(tool) {
|
|
20
|
-
if (!this.focusableTools.some(el => el === tool)) {
|
|
21
|
-
this.focusableTools.push(tool);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
unregister(tool) {
|
|
25
|
-
this.currentFocusIndex = 0;
|
|
26
|
-
this.focusableTools = this.focusableTools.filter(el => el !== tool);
|
|
27
|
-
}
|
|
28
|
-
isActive(focusable) {
|
|
29
|
-
return this.focusableTools[this.currentFocusIndex] === focusable;
|
|
30
|
-
}
|
|
31
|
-
setActiveIndex(tool) {
|
|
32
|
-
this.currentFocusIndex = Math.max(this.focusableTools.indexOf(tool), 0);
|
|
33
|
-
}
|
|
34
|
-
move(direction) {
|
|
35
|
-
let delta = direction === 'right' ? 1 : -1;
|
|
36
|
-
if (this.localizationService.rtl) {
|
|
37
|
-
delta = -delta;
|
|
38
|
-
}
|
|
39
|
-
this.currentFocusIndex += delta;
|
|
40
|
-
if (this.currentFocusIndex < 0) {
|
|
41
|
-
this.currentFocusIndex = this.focusableTools.length - 1;
|
|
42
|
-
}
|
|
43
|
-
else if (this.currentFocusIndex >= this.focusableTools.length) {
|
|
44
|
-
this.currentFocusIndex = 0;
|
|
45
|
-
}
|
|
46
|
-
this.focusableTools[this.currentFocusIndex].activate();
|
|
47
|
-
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService });
|
|
50
|
-
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
|
52
|
-
type: Injectable
|
|
53
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|