@progress/kendo-angular-toolbar 11.0.0-develop.98 → 11.0.0
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/NOTICE.txt +17 -17
- package/common/{constants.d.ts → size.d.ts} +3 -2
- package/esm2020/common/{constants.mjs → size.mjs} +1 -4
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/renderer.component.mjs +5 -1
- package/esm2020/toolbar.component.mjs +105 -33
- package/esm2020/toolbar.module.mjs +4 -3
- package/esm2020/tools/toolbar-button.component.mjs +99 -48
- package/esm2020/tools/toolbar-buttongroup.component.mjs +101 -70
- package/esm2020/tools/toolbar-buttonlist.component.mjs +2 -0
- package/esm2020/tools/toolbar-dropdownbutton.component.mjs +107 -54
- package/esm2020/tools/toolbar-separator.component.mjs +12 -0
- package/esm2020/tools/toolbar-splitbutton.component.mjs +114 -63
- package/esm2020/util.mjs +24 -0
- package/fesm2015/progress-kendo-angular-toolbar.mjs +648 -351
- package/fesm2020/progress-kendo-angular-toolbar.mjs +647 -351
- package/index.d.ts +1 -0
- package/package.json +8 -7
- package/renderer.component.d.ts +1 -0
- package/schematics/ngAdd/index.js +4 -2
- package/tool-options.d.ts +2 -0
- package/toolbar.component.d.ts +21 -3
- package/toolbar.module.d.ts +2 -1
- package/tools/toolbar-button.component.d.ts +23 -3
- package/tools/toolbar-buttongroup.component.d.ts +15 -4
- package/tools/toolbar-dropdownbutton.component.d.ts +10 -2
- package/tools/toolbar-splitbutton.component.d.ts +11 -3
- package/util.d.ts +22 -1
package/NOTICE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Progress Kendo UI for Angular 2023
|
|
2
2
|
|
|
3
|
-
Copyright
|
|
3
|
+
Copyright © 2016-2023 Progress Software Corporation and/or one of its
|
|
4
4
|
subsidiaries or affiliates. All rights reserved.
|
|
5
5
|
|
|
6
6
|
Portions of the Product include certain open source and commercial third-party
|
|
@@ -65,7 +65,7 @@ the Product:
|
|
|
65
65
|
|
|
66
66
|
(1) The Apache Software License, Version 2.0:
|
|
67
67
|
|
|
68
|
-
Progress Kendo UI for Angular
|
|
68
|
+
Progress Kendo UI for Angular 2023 incorporates TsLib v1.9.3. Such technology
|
|
69
69
|
is subject to the following terms and conditions: Apache Software License Version 2.0.
|
|
70
70
|
|
|
71
71
|
Apache License
|
|
@@ -290,7 +290,7 @@ is subject to the following terms and conditions: Apache Software License Versio
|
|
|
290
290
|
|
|
291
291
|
(2) BSD-Style Licenses:
|
|
292
292
|
|
|
293
|
-
(a) Progress Kendo UI for Angular
|
|
293
|
+
(a) Progress Kendo UI for Angular 2023 incorporates xlf-translate v2.0.4. Such
|
|
294
294
|
technology is subject to the following terms and conditions:
|
|
295
295
|
|
|
296
296
|
BSD 3-Clause License
|
|
@@ -325,7 +325,7 @@ technology is subject to the following terms and conditions:
|
|
|
325
325
|
|
|
326
326
|
(3) The ISC License:
|
|
327
327
|
|
|
328
|
-
(a) Progress Kendo UI for Angular
|
|
328
|
+
(a) Progress Kendo UI for Angular 2023 incorporates glob v7.1.3. Such technology
|
|
329
329
|
is subject to the following terms and conditions:
|
|
330
330
|
|
|
331
331
|
The ISC License
|
|
@@ -352,7 +352,7 @@ is subject to the following terms and conditions:
|
|
|
352
352
|
|
|
353
353
|
(4) MIT-Style Licenses:
|
|
354
354
|
|
|
355
|
-
(a) Progress Kendo UI for Angular
|
|
355
|
+
(a) Progress Kendo UI for Angular 2023 incorporates HammerJS v2.0.8. Such
|
|
356
356
|
technology is subject to the following terms and conditions:
|
|
357
357
|
|
|
358
358
|
The MIT License (MIT)
|
|
@@ -377,7 +377,7 @@ technology is subject to the following terms and conditions:
|
|
|
377
377
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
378
378
|
SOFTWARE.
|
|
379
379
|
|
|
380
|
-
(b) Progress Kendo UI for Angular
|
|
380
|
+
(b) Progress Kendo UI for Angular 2023 incorporates prosemirror-commands v1*,
|
|
381
381
|
prosemirror-cursor v1*, prosemirror-gapcursor v1*, prosemirror-history v1*,
|
|
382
382
|
prosemirror-inputrules v1*, prosemirror-keymap v1*, prosemirror-model v1*,
|
|
383
383
|
prosemirror-schema-list v1*, prosemirror-state v1*, prosemirror-tables v0.7*,
|
|
@@ -404,7 +404,7 @@ subject to the following terms and conditions:
|
|
|
404
404
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
405
405
|
THE SOFTWARE.
|
|
406
406
|
|
|
407
|
-
(c) Progress Kendo UI for Angular
|
|
407
|
+
(c) Progress Kendo UI for Angular 2023 incorporates cheerio v0.2.2. Such technology is subject to the following terms and conditions:
|
|
408
408
|
|
|
409
409
|
MIT License
|
|
410
410
|
|
|
@@ -428,7 +428,7 @@ subject to the following terms and conditions:
|
|
|
428
428
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
429
429
|
SOFTWARE.
|
|
430
430
|
|
|
431
|
-
(d) Progress Kendo UI for Angular
|
|
431
|
+
(d) Progress Kendo UI for Angular 2023 incorporates @types/prosemirror-commands v1*,
|
|
432
432
|
@types/prosemirror-dropcursor v1*, @types/prosemirror-gapcursor v1*, @types/prosemirror-history v1*,
|
|
433
433
|
@types/prosemirror-inputrules v1*, @types/prosemirror-keymap v1*, @types/prosemirror-model v1*,
|
|
434
434
|
@types/prosemirror-schema-list v1*, @types/prosemirror-state v1*, @types/prosemirror-tables v0.9*,
|
|
@@ -457,7 +457,7 @@ subject to the following terms and conditions:
|
|
|
457
457
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
458
458
|
SOFTWARE.
|
|
459
459
|
|
|
460
|
-
(e) Progress Kendo UI for Angular
|
|
460
|
+
(e) Progress Kendo UI for Angular 2023 incorporates pako-esm v1.0.0. Such
|
|
461
461
|
technology is subject to the following terms and conditions:
|
|
462
462
|
|
|
463
463
|
Copyright © 2020 Progress Software Corporation and/or one of its subsidiaries
|
|
@@ -483,7 +483,7 @@ technology is subject to the following terms and conditions:
|
|
|
483
483
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
484
484
|
THE SOFTWARE.
|
|
485
485
|
|
|
486
|
-
(f) Progress Kendo UI for Angular
|
|
486
|
+
(f) Progress Kendo UI for Angular 2023 incorporates jszip-esm v1.0.0. Such
|
|
487
487
|
technology is subject to the following terms and conditions:
|
|
488
488
|
|
|
489
489
|
Copyright © 2020 Progress Software Corporation and/or one of its subsidiaries
|
|
@@ -510,7 +510,7 @@ technology is subject to the following terms and conditions:
|
|
|
510
510
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
511
511
|
THE SOFTWARE.
|
|
512
512
|
|
|
513
|
-
(g) Progress Kendo UI for Angular
|
|
513
|
+
(g) Progress Kendo UI for Angular 2023 incorporates data.task v3.1.2. Such
|
|
514
514
|
technology is subject to the following terms and conditions:
|
|
515
515
|
|
|
516
516
|
The MIT License
|
|
@@ -535,7 +535,7 @@ technology is subject to the following terms and conditions:
|
|
|
535
535
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
536
536
|
THE SOFTWARE.
|
|
537
537
|
|
|
538
|
-
(h) Progress Kendo UI for Angular
|
|
538
|
+
(h) Progress Kendo UI for Angular 2023 incorporates ramda v0.23. Such technology
|
|
539
539
|
is subject to the following terms and conditions:
|
|
540
540
|
|
|
541
541
|
The MIT License (MIT)
|
|
@@ -560,7 +560,7 @@ is subject to the following terms and conditions:
|
|
|
560
560
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
561
561
|
THE SOFTWARE.
|
|
562
562
|
|
|
563
|
-
(i) Progress Kendo UI for Angular
|
|
563
|
+
(i) Progress Kendo UI for Angular 2023 incorporates js-yaml v3.14.0. Such
|
|
564
564
|
technology is subject to the following terms and conditions:
|
|
565
565
|
|
|
566
566
|
(The MIT License)
|
|
@@ -587,7 +587,7 @@ technology is subject to the following terms and conditions:
|
|
|
587
587
|
|
|
588
588
|
(5) UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE:
|
|
589
589
|
|
|
590
|
-
Progress Kendo UI for Angular
|
|
590
|
+
Progress Kendo UI for Angular 2023 incorporates Unicode CLDR Database v33.
|
|
591
591
|
Such technology is subject to the following terms and conditions:
|
|
592
592
|
|
|
593
593
|
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
|
|
@@ -605,7 +605,7 @@ Such technology is subject to the following terms and conditions:
|
|
|
605
605
|
|
|
606
606
|
COPYRIGHT AND PERMISSION NOTICE
|
|
607
607
|
|
|
608
|
-
Copyright © 1991-
|
|
608
|
+
Copyright © 1991-2019 Unicode, Inc. All rights reserved.
|
|
609
609
|
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
|
|
610
610
|
|
|
611
611
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
@@ -642,7 +642,7 @@ incorporated into the Product: NONE
|
|
|
642
642
|
|
|
643
643
|
3. Special Notices Regarding Progress Products incorporated into the Product:
|
|
644
644
|
|
|
645
|
-
(a) Progress Kendo UI for Angular
|
|
645
|
+
(a) Progress Kendo UI for Angular 2023 incorporates Kendo UI Licensing CLI v1.1
|
|
646
646
|
from Progress Software Corporation. See NOTICE.txt text file within product for
|
|
647
647
|
third-party license information.
|
|
648
648
|
|
|
@@ -651,4 +651,4 @@ the release notes or other documentation that accompanies updates received in
|
|
|
651
651
|
connection with support of the Product.
|
|
652
652
|
|
|
653
653
|
|
|
654
|
-
Updated
|
|
654
|
+
Updated 13.Jan.2023
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Represents the possible size options of the Toolbar.
|
|
7
|
+
* @default `medium`
|
|
7
8
|
*/
|
|
8
|
-
export declare
|
|
9
|
+
export declare type ToolbarSize = 'small' | 'medium' | 'large' | 'none';
|
|
@@ -2,7 +2,4 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const defaultPopupWidth = '150px';
|
|
5
|
+
export {};
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-toolbar',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '',
|
|
12
|
+
publishDate: 1674032337,
|
|
13
|
+
version: '11.0.0',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -22,6 +22,7 @@ export class ToolBarRendererComponent {
|
|
|
22
22
|
this.rendererService = rendererService;
|
|
23
23
|
this.refreshService = refreshService;
|
|
24
24
|
this.rendererClick = new EventEmitter();
|
|
25
|
+
this.hostClass = true;
|
|
25
26
|
this.rendererService.element = element;
|
|
26
27
|
this.rendererService.renderer = this;
|
|
27
28
|
this.refreshSubscription = this.refreshService.onRefresh.subscribe((tool) => {
|
|
@@ -103,7 +104,7 @@ export class ToolBarRendererComponent {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
ToolBarRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.RendererService }, { token: i2.RefreshService }], target: i0.ɵɵFactoryTarget.Component });
|
|
106
|
-
ToolBarRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-spacer": "this.spacerClass" } }, providers: [RendererService], exportAs: ["kendoToolBarRenderer"], ngImport: i0, template: `
|
|
107
|
+
ToolBarRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-spacer": "this.spacerClass", "class.k-toolbar-renderer": "this.hostClass" } }, providers: [RendererService], exportAs: ["kendoToolBarRenderer"], ngImport: i0, template: `
|
|
107
108
|
<ng-container *ngIf="location === 'toolbar'">
|
|
108
109
|
<ng-template [ngTemplateOutlet]="template"></ng-template>
|
|
109
110
|
</ng-container>
|
|
@@ -137,6 +138,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
137
138
|
}], spacerClass: [{
|
|
138
139
|
type: HostBinding,
|
|
139
140
|
args: ['class.k-spacer']
|
|
141
|
+
}], hostClass: [{
|
|
142
|
+
type: HostBinding,
|
|
143
|
+
args: ['class.k-toolbar-renderer']
|
|
140
144
|
}], onClick: [{
|
|
141
145
|
type: HostListener,
|
|
142
146
|
args: ['click', ['$event']]
|
|
@@ -11,23 +11,25 @@ import { packageMetadata } from './package-metadata';
|
|
|
11
11
|
import { RefreshService } from './refresh.service';
|
|
12
12
|
import { NavigationService } from './navigation.service';
|
|
13
13
|
import { ToolBarToolComponent } from './tools/toolbar-tool.component';
|
|
14
|
-
import { innerWidth, closest, isPresent } from './util';
|
|
14
|
+
import { innerWidth, closest, isPresent, getStylingClasses, SIZES } from './util';
|
|
15
15
|
import { Keys } from '@progress/kendo-angular-common';
|
|
16
16
|
import { PreventableEvent } from './common/preventable-event';
|
|
17
17
|
import { Subscription, fromEvent, Subject, merge } from 'rxjs';
|
|
18
18
|
import { takeUntil } from 'rxjs/operators';
|
|
19
19
|
import { filter } from 'rxjs/operators';
|
|
20
20
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
21
|
-
import {
|
|
21
|
+
import { moreVerticalIcon } from '@progress/kendo-svg-icons';
|
|
22
22
|
import * as i0 from "@angular/core";
|
|
23
23
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
24
24
|
import * as i2 from "@progress/kendo-angular-popup";
|
|
25
25
|
import * as i3 from "./refresh.service";
|
|
26
26
|
import * as i4 from "./navigation.service";
|
|
27
27
|
import * as i5 from "./renderer.component";
|
|
28
|
-
import * as i6 from "@progress/kendo-angular-
|
|
29
|
-
import * as i7 from "
|
|
30
|
-
import * as i8 from "
|
|
28
|
+
import * as i6 from "@progress/kendo-angular-buttons";
|
|
29
|
+
import * as i7 from "@progress/kendo-angular-common";
|
|
30
|
+
import * as i8 from "./localization/localized-toolbar-messages.directive";
|
|
31
|
+
import * as i9 from "@angular/common";
|
|
32
|
+
const DEFAULT_SIZE = 'medium';
|
|
31
33
|
const getInitialPopupSettings = (isRtl) => ({
|
|
32
34
|
animate: true,
|
|
33
35
|
anchorAlign: { horizontal: isRtl ? 'left' : 'right', vertical: 'bottom' },
|
|
@@ -37,7 +39,9 @@ const getInitialPopupSettings = (isRtl) => ({
|
|
|
37
39
|
* Represents the [Kendo UI ToolBar component for Angular]({% slug overview_toolbar %}).
|
|
38
40
|
*/
|
|
39
41
|
export class ToolBarComponent {
|
|
40
|
-
constructor(localization, popupService, refreshService, navigationService,
|
|
42
|
+
constructor(localization, popupService, refreshService, navigationService,
|
|
43
|
+
// Needs to be public as it is being accessed in the Editor component
|
|
44
|
+
element, zone, renderer, _cdr) {
|
|
41
45
|
this.localization = localization;
|
|
42
46
|
this.popupService = popupService;
|
|
43
47
|
this.refreshService = refreshService;
|
|
@@ -62,11 +66,13 @@ export class ToolBarComponent {
|
|
|
62
66
|
* Fires when the overflow popup of the ToolBar is closed.
|
|
63
67
|
*/
|
|
64
68
|
this.close = new EventEmitter();
|
|
65
|
-
this.
|
|
69
|
+
this.hostClass = true;
|
|
66
70
|
this.cancelRenderedToolsSubscription$ = new Subject();
|
|
71
|
+
this._size = DEFAULT_SIZE;
|
|
67
72
|
this.subscriptions = new Subscription();
|
|
68
73
|
this.popupSubs = new Subscription();
|
|
69
74
|
this.role = 'toolbar';
|
|
75
|
+
this.moreVerticalIcon = moreVerticalIcon;
|
|
70
76
|
/**
|
|
71
77
|
* @hidden
|
|
72
78
|
*/
|
|
@@ -78,6 +84,9 @@ export class ToolBarComponent {
|
|
|
78
84
|
validatePackage(packageMetadata);
|
|
79
85
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
80
86
|
}
|
|
87
|
+
get overflowClass() {
|
|
88
|
+
return `k-button-${SIZES[this.size]}`;
|
|
89
|
+
}
|
|
81
90
|
/**
|
|
82
91
|
* @hidden
|
|
83
92
|
*/
|
|
@@ -100,6 +109,23 @@ export class ToolBarComponent {
|
|
|
100
109
|
get popupSettings() {
|
|
101
110
|
return this._popupSettings || getInitialPopupSettings(this.localization.rtl);
|
|
102
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Specifies the padding of all Toolbar elements.
|
|
114
|
+
*
|
|
115
|
+
* The possible values are:
|
|
116
|
+
* * `small`
|
|
117
|
+
* * `medium` (default)
|
|
118
|
+
* * `large`
|
|
119
|
+
* * `none`
|
|
120
|
+
*/
|
|
121
|
+
set size(size) {
|
|
122
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
123
|
+
this.handleClasses(newSize, 'size');
|
|
124
|
+
this._size = newSize;
|
|
125
|
+
}
|
|
126
|
+
get size() {
|
|
127
|
+
return this._size;
|
|
128
|
+
}
|
|
103
129
|
/**
|
|
104
130
|
* @hidden
|
|
105
131
|
*/
|
|
@@ -221,6 +247,7 @@ export class ToolBarComponent {
|
|
|
221
247
|
}
|
|
222
248
|
this.navigationService.setRenderedTools(this.renderedTools.toArray());
|
|
223
249
|
this.subscriptions.add(this.renderedTools.changes.subscribe((rts) => this.navigationService.setRenderedTools(rts.toArray())));
|
|
250
|
+
this.handleClasses(this.size, 'size');
|
|
224
251
|
}
|
|
225
252
|
ngOnInit() {
|
|
226
253
|
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
@@ -291,7 +318,7 @@ export class ToolBarComponent {
|
|
|
291
318
|
content: this.popupTemplate,
|
|
292
319
|
appendTo: this.appendTo,
|
|
293
320
|
animate: this.popupSettings.animate,
|
|
294
|
-
popupClass: this.popupSettings.popupClass,
|
|
321
|
+
popupClass: this.normalizePopupClasses(this.popupSettings.popupClass),
|
|
295
322
|
positionMode: 'absolute'
|
|
296
323
|
});
|
|
297
324
|
this.setPopupContentDimensions();
|
|
@@ -308,7 +335,10 @@ export class ToolBarComponent {
|
|
|
308
335
|
this.shrink(containerWidth, this.childrenWidth);
|
|
309
336
|
this.stretch(containerWidth, this.childrenWidth);
|
|
310
337
|
this.displayAnchor();
|
|
311
|
-
this.resizeSensor
|
|
338
|
+
this.resizeSensor?.acceptSize();
|
|
339
|
+
if (this.popupOpen) {
|
|
340
|
+
this.toggle();
|
|
341
|
+
}
|
|
312
342
|
}
|
|
313
343
|
}
|
|
314
344
|
/**
|
|
@@ -317,6 +347,7 @@ export class ToolBarComponent {
|
|
|
317
347
|
onPopupOpen() {
|
|
318
348
|
this.zone.runOutsideAngular(() => {
|
|
319
349
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
350
|
+
const currentTool = this.overflowRenderedTools.toArray().find(tool => closest(ev.target, (el) => el === tool.element.nativeElement));
|
|
320
351
|
switch (ev.keyCode) {
|
|
321
352
|
case Keys.ArrowUp:
|
|
322
353
|
this.zone.run(() => {
|
|
@@ -339,6 +370,16 @@ export class ToolBarComponent {
|
|
|
339
370
|
this.navigationService.resetNavigation();
|
|
340
371
|
});
|
|
341
372
|
break;
|
|
373
|
+
case Keys.Enter:
|
|
374
|
+
case Keys.Space:
|
|
375
|
+
this.zone.run(() => {
|
|
376
|
+
if (currentTool) {
|
|
377
|
+
ev.preventDefault();
|
|
378
|
+
ev.target.click();
|
|
379
|
+
ev.target.focus();
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
break;
|
|
342
383
|
default:
|
|
343
384
|
break;
|
|
344
385
|
}
|
|
@@ -369,11 +410,11 @@ export class ToolBarComponent {
|
|
|
369
410
|
}
|
|
370
411
|
displayAnchor() {
|
|
371
412
|
const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
|
|
372
|
-
this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
413
|
+
this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
373
414
|
}
|
|
374
415
|
get popupWidth() {
|
|
375
416
|
if (!this.popupSettings || !this.popupSettings.width) {
|
|
376
|
-
return
|
|
417
|
+
return 'auto';
|
|
377
418
|
}
|
|
378
419
|
return isNaN(this.popupSettings.width) ? this.popupSettings.width : `${this.popupSettings.width}px`;
|
|
379
420
|
}
|
|
@@ -481,9 +522,37 @@ export class ToolBarComponent {
|
|
|
481
522
|
this.popupRef = null;
|
|
482
523
|
}
|
|
483
524
|
}
|
|
525
|
+
handleClasses(value, input) {
|
|
526
|
+
const elem = this.element.nativeElement;
|
|
527
|
+
const classes = getStylingClasses('toolbar', input, this[input], value);
|
|
528
|
+
if (classes.toRemove) {
|
|
529
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
530
|
+
}
|
|
531
|
+
if (classes.toAdd) {
|
|
532
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
normalizePopupClasses(classList) {
|
|
536
|
+
let classes = ['k-menu-popup', 'k-toolbar-popup'];
|
|
537
|
+
if (!classList) {
|
|
538
|
+
return classes;
|
|
539
|
+
}
|
|
540
|
+
if (typeof classList === 'string') {
|
|
541
|
+
classes.push(...classList.split(' '));
|
|
542
|
+
}
|
|
543
|
+
else if (Array.isArray(classList)) {
|
|
544
|
+
classes = [...classes, ...classList];
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
for (const cl in classList) {
|
|
548
|
+
classes.push(classList[cl]);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
return classes;
|
|
552
|
+
}
|
|
484
553
|
}
|
|
485
554
|
ToolBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.RefreshService }, { token: i4.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
486
|
-
ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarComponent, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", tabindex: "tabindex", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-
|
|
555
|
+
ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarComponent, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", tabindex: "tabindex", size: "size", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
|
|
487
556
|
RefreshService,
|
|
488
557
|
NavigationService,
|
|
489
558
|
LocalizationService,
|
|
@@ -491,7 +560,7 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
491
560
|
provide: L10N_PREFIX,
|
|
492
561
|
useValue: 'kendo.toolbar'
|
|
493
562
|
}
|
|
494
|
-
], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "renderedTools", predicate: ["toolbarRenderer"], descendants: true }, { propertyName: "overflowRenderedTools", predicate: ["overflowRenderer"], descendants: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
|
|
563
|
+
], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "renderedTools", predicate: ["toolbarRenderer"], descendants: true }, { propertyName: "overflowRenderedTools", predicate: ["overflowRenderer"], descendants: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
|
|
495
564
|
<ng-container kendoToolbarLocalizedMessages
|
|
496
565
|
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
497
566
|
moreToolsTitle="More tools"
|
|
@@ -507,8 +576,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
507
576
|
></kendo-toolbar-renderer>
|
|
508
577
|
</ng-container>
|
|
509
578
|
<button
|
|
579
|
+
kendoButton
|
|
580
|
+
fillMode="flat"
|
|
510
581
|
#overflowButton
|
|
511
582
|
type="button"
|
|
583
|
+
icon="more-vertical"
|
|
584
|
+
[svgIcon]="moreVerticalIcon"
|
|
512
585
|
tabindex="-1"
|
|
513
586
|
[title]="moreToolsTitle"
|
|
514
587
|
[attr.aria-label]="moreToolsTitle"
|
|
@@ -519,19 +592,18 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
519
592
|
[style.visibility]="'hidden'"
|
|
520
593
|
[style.position]="'relative'"
|
|
521
594
|
[style.margin-inline-start]="'auto'"
|
|
522
|
-
class="k-overflow-
|
|
595
|
+
class="k-toolbar-overflow-button"
|
|
596
|
+
[ngClass]="overflowClass"
|
|
523
597
|
(click)="showPopup()"
|
|
524
598
|
>
|
|
525
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
526
599
|
</button>
|
|
527
600
|
<ng-template #popupTemplate>
|
|
528
|
-
<
|
|
529
|
-
class="k-
|
|
601
|
+
<div
|
|
602
|
+
class="k-menu-group k-menu-group-md"
|
|
530
603
|
role="menu"
|
|
531
604
|
[id]="popupId"
|
|
532
605
|
[attr.aria-labelledby]="overflowBtnId">
|
|
533
606
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
534
|
-
<li class="k-item" role="menuitem">
|
|
535
607
|
<kendo-toolbar-renderer
|
|
536
608
|
#overflowRenderer
|
|
537
609
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -539,13 +611,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
539
611
|
[resizable]="overflow"
|
|
540
612
|
[tool]="tool"
|
|
541
613
|
></kendo-toolbar-renderer>
|
|
542
|
-
</li>
|
|
543
614
|
</ng-container>
|
|
544
|
-
</
|
|
615
|
+
</div>
|
|
545
616
|
</ng-template>
|
|
546
617
|
<ng-container #container></ng-container>
|
|
547
618
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
548
|
-
`, isInline: true, components: [{ type: i5.ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type:
|
|
619
|
+
`, isInline: true, components: [{ type: i5.ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { type: i6.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i7.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i8.LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
549
620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
550
621
|
type: Component,
|
|
551
622
|
args: [{
|
|
@@ -576,8 +647,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
576
647
|
></kendo-toolbar-renderer>
|
|
577
648
|
</ng-container>
|
|
578
649
|
<button
|
|
650
|
+
kendoButton
|
|
651
|
+
fillMode="flat"
|
|
579
652
|
#overflowButton
|
|
580
653
|
type="button"
|
|
654
|
+
icon="more-vertical"
|
|
655
|
+
[svgIcon]="moreVerticalIcon"
|
|
581
656
|
tabindex="-1"
|
|
582
657
|
[title]="moreToolsTitle"
|
|
583
658
|
[attr.aria-label]="moreToolsTitle"
|
|
@@ -588,19 +663,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
588
663
|
[style.visibility]="'hidden'"
|
|
589
664
|
[style.position]="'relative'"
|
|
590
665
|
[style.margin-inline-start]="'auto'"
|
|
591
|
-
class="k-overflow-
|
|
666
|
+
class="k-toolbar-overflow-button"
|
|
667
|
+
[ngClass]="overflowClass"
|
|
592
668
|
(click)="showPopup()"
|
|
593
669
|
>
|
|
594
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
595
670
|
</button>
|
|
596
671
|
<ng-template #popupTemplate>
|
|
597
|
-
<
|
|
598
|
-
class="k-
|
|
672
|
+
<div
|
|
673
|
+
class="k-menu-group k-menu-group-md"
|
|
599
674
|
role="menu"
|
|
600
675
|
[id]="popupId"
|
|
601
676
|
[attr.aria-labelledby]="overflowBtnId">
|
|
602
677
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
603
|
-
<li class="k-item" role="menuitem">
|
|
604
678
|
<kendo-toolbar-renderer
|
|
605
679
|
#overflowRenderer
|
|
606
680
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -608,9 +682,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
608
682
|
[resizable]="overflow"
|
|
609
683
|
[tool]="tool"
|
|
610
684
|
></kendo-toolbar-renderer>
|
|
611
|
-
</li>
|
|
612
685
|
</ng-container>
|
|
613
|
-
</
|
|
686
|
+
</div>
|
|
614
687
|
</ng-template>
|
|
615
688
|
<ng-container #container></ng-container>
|
|
616
689
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
@@ -624,6 +697,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
624
697
|
type: Input
|
|
625
698
|
}], tabindex: [{
|
|
626
699
|
type: Input
|
|
700
|
+
}], size: [{
|
|
701
|
+
type: Input
|
|
627
702
|
}], tabIndex: [{
|
|
628
703
|
type: Input,
|
|
629
704
|
args: ['tabIndex']
|
|
@@ -636,7 +711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
636
711
|
args: [ToolBarToolComponent]
|
|
637
712
|
}], overflowButton: [{
|
|
638
713
|
type: ViewChild,
|
|
639
|
-
args: ['overflowButton', { static: false }]
|
|
714
|
+
args: ['overflowButton', { static: false, read: ElementRef }]
|
|
640
715
|
}], popupTemplate: [{
|
|
641
716
|
type: ViewChild,
|
|
642
717
|
args: ['popupTemplate', { static: true }]
|
|
@@ -652,10 +727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
652
727
|
}], overflowRenderedTools: [{
|
|
653
728
|
type: ViewChildren,
|
|
654
729
|
args: ['overflowRenderer']
|
|
655
|
-
}],
|
|
656
|
-
type: HostBinding,
|
|
657
|
-
args: ['class.k-widget']
|
|
658
|
-
}, {
|
|
730
|
+
}], hostClass: [{
|
|
659
731
|
type: HostBinding,
|
|
660
732
|
args: ['class.k-toolbar']
|
|
661
733
|
}], onFocus: [{
|
|
@@ -19,6 +19,7 @@ import { ToolBarRendererComponent } from './renderer.component';
|
|
|
19
19
|
import { ToolBarButtonListComponent } from './tools/toolbar-buttonlist.component';
|
|
20
20
|
import { LocalizedToolbarMessagesDirective } from './localization/localized-toolbar-messages.directive';
|
|
21
21
|
import { ToolbarCustomMessagesComponent } from './localization/custom-messages.component';
|
|
22
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
22
23
|
import * as i0 from "@angular/core";
|
|
23
24
|
const TOOLBAR_TOOLS = [
|
|
24
25
|
ToolBarToolComponent,
|
|
@@ -59,19 +60,19 @@ ToolBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
59
60
|
ToolBarSpacerComponent, ToolBarRendererComponent,
|
|
60
61
|
ToolBarButtonListComponent,
|
|
61
62
|
ToolbarCustomMessagesComponent,
|
|
62
|
-
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
63
|
+
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
63
64
|
ToolBarButtonComponent,
|
|
64
65
|
ToolBarButtonGroupComponent,
|
|
65
66
|
ToolBarDropDownButtonComponent,
|
|
66
67
|
ToolBarSplitButtonComponent,
|
|
67
68
|
ToolBarSeparatorComponent,
|
|
68
69
|
ToolBarSpacerComponent, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective] });
|
|
69
|
-
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]] });
|
|
70
|
+
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]] });
|
|
70
71
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, decorators: [{
|
|
71
72
|
type: NgModule,
|
|
72
73
|
args: [{
|
|
73
74
|
declarations: [ToolBarComponent, TOOLBAR_TOOLS, TOOLBAR_COMMON],
|
|
74
75
|
exports: [ToolBarComponent, TOOLBAR_TOOLS, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective],
|
|
75
|
-
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]
|
|
76
|
+
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]
|
|
76
77
|
}]
|
|
77
78
|
}] });
|