@progress/kendo-angular-toolbar 5.0.2 → 6.0.0-dev.202204131416
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/bundles/kendo-angular-toolbar.umd.js +5 -0
- package/{dist/es2015/common → common}/constants.d.ts +0 -0
- package/{dist/es2015/common → common}/preventable-event.d.ts +0 -0
- package/{dist/es2015/common → common}/renderer-click.d.ts +0 -0
- package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
- package/{dist/es2015/display-mode.d.ts → display-mode.d.ts} +0 -0
- package/{dist/es2015 → esm2015}/common/constants.js +0 -0
- package/{dist/es2015 → esm2015}/common/preventable-event.js +0 -0
- package/{dist/es → esm2015}/common/renderer-click.js +1 -0
- package/{dist/es2015 → esm2015}/direction.js +1 -0
- package/{dist/es2015 → esm2015}/display-mode.js +1 -0
- package/{dist/es2015 → esm2015}/group-selection-settings.js +1 -0
- package/{dist/es/common/constants.js → esm2015/kendo-angular-toolbar.js} +2 -2
- package/esm2015/localization/custom-messages.component.js +40 -0
- package/esm2015/localization/localized-toolbar-messages.directive.js +36 -0
- package/esm2015/localization/messages.js +23 -0
- package/{dist/es → esm2015}/main.js +0 -0
- package/{dist/es2015 → esm2015}/navigation.service.js +9 -9
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es → esm2015}/popup-settings.js +1 -0
- package/{dist/es2015 → esm2015}/refresh.service.js +8 -10
- package/{dist/es → esm2015}/render-location.js +1 -0
- package/{dist/es2015 → esm2015}/renderer.component.js +36 -41
- package/{dist/es2015 → esm2015}/renderer.service.js +8 -7
- package/{dist/es → esm2015}/tool-options.js +1 -0
- package/{dist/es2015 → esm2015}/toolbar.component.js +166 -135
- package/{dist/es2015 → esm2015}/toolbar.module.js +27 -11
- package/{dist/es2015 → esm2015}/tools/toolbar-button.component.js +117 -114
- package/esm2015/tools/toolbar-buttongroup.component.js +267 -0
- package/esm2015/tools/toolbar-buttonlist.component.js +94 -0
- package/{dist/es2015 → esm2015}/tools/toolbar-dropdownbutton.component.js +119 -121
- package/esm2015/tools/toolbar-separator.component.js +68 -0
- package/{dist/es2015 → esm2015}/tools/toolbar-splitbutton.component.js +129 -125
- package/{dist/es2015 → esm2015}/tools/toolbar-tool.component.js +15 -19
- package/{dist/es2015 → esm2015}/util.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-toolbar.js} +1019 -886
- package/{dist/es2015/group-selection-settings.d.ts → group-selection-settings.d.ts} +0 -0
- package/kendo-angular-toolbar.d.ts +9 -0
- package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/localization → localization}/localized-toolbar-messages.directive.d.ts +3 -0
- package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
- package/{dist/es2015/navigation.service.d.ts → navigation.service.d.ts} +3 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +34 -102
- package/{dist/es2015/popup-settings.d.ts → popup-settings.d.ts} +0 -0
- package/{dist/es2015/refresh.service.d.ts → refresh.service.d.ts} +3 -0
- package/{dist/es2015/render-location.d.ts → render-location.d.ts} +0 -0
- package/{dist/es2015/renderer.component.d.ts → renderer.component.d.ts} +4 -1
- package/{dist/es2015/renderer.service.d.ts → renderer.service.d.ts} +3 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/tool-options.d.ts → tool-options.d.ts} +0 -0
- package/{dist/es2015/toolbar.component.d.ts → toolbar.component.d.ts} +30 -18
- package/toolbar.module.d.ts +37 -0
- package/{dist/es2015/tools → tools}/toolbar-button.component.d.ts +10 -6
- package/{dist/es2015/tools → tools}/toolbar-buttongroup.component.d.ts +7 -5
- package/{dist/es2015/tools → tools}/toolbar-buttonlist.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/toolbar-dropdownbutton.component.d.ts +15 -10
- package/{dist/es2015/tools → tools}/toolbar-separator.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/toolbar-splitbutton.component.d.ts +14 -9
- package/{dist/es2015/tools → tools}/toolbar-tool.component.d.ts +5 -2
- package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-toolbar.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/common/preventable-event.js +0 -29
- package/dist/es/direction.js +0 -4
- package/dist/es/display-mode.js +0 -4
- package/dist/es/group-selection-settings.js +0 -4
- package/dist/es/index.js +0 -14
- package/dist/es/localization/custom-messages.component.js +0 -43
- package/dist/es/localization/localized-toolbar-messages.directive.js +0 -35
- package/dist/es/localization/messages.js +0 -22
- package/dist/es/navigation.service.js +0 -130
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/refresh.service.js +0 -22
- package/dist/es/renderer.component.js +0 -132
- package/dist/es/renderer.service.js +0 -52
- package/dist/es/toolbar.component.js +0 -641
- package/dist/es/toolbar.module.js +0 -60
- package/dist/es/tools/toolbar-button.component.js +0 -310
- package/dist/es/tools/toolbar-buttongroup.component.js +0 -165
- package/dist/es/tools/toolbar-buttonlist.component.js +0 -66
- package/dist/es/tools/toolbar-dropdownbutton.component.js +0 -368
- package/dist/es/tools/toolbar-separator.component.js +0 -67
- package/dist/es/tools/toolbar-splitbutton.component.js +0 -380
- package/dist/es/tools/toolbar-tool.component.js +0 -76
- package/dist/es/util.js +0 -204
- package/dist/es2015/common/renderer-click.js +0 -4
- package/dist/es2015/index.d.ts +0 -14
- package/dist/es2015/index.js +0 -14
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/custom-messages.component.js +0 -35
- package/dist/es2015/localization/localized-toolbar-messages.directive.js +0 -31
- package/dist/es2015/localization/messages.js +0 -16
- package/dist/es2015/main.js +0 -14
- package/dist/es2015/popup-settings.js +0 -4
- package/dist/es2015/render-location.js +0 -4
- package/dist/es2015/tool-options.js +0 -4
- package/dist/es2015/toolbar.module.d.ts +0 -18
- package/dist/es2015/tools/toolbar-buttongroup.component.js +0 -216
- package/dist/es2015/tools/toolbar-buttonlist.component.js +0 -87
- package/dist/es2015/tools/toolbar-separator.component.js +0 -68
- package/dist/fesm5/index.js +0 -2665
- package/dist/npm/common/constants.js +0 -10
- package/dist/npm/common/preventable-event.js +0 -31
- package/dist/npm/common/renderer-click.js +0 -6
- package/dist/npm/direction.js +0 -6
- package/dist/npm/display-mode.js +0 -6
- package/dist/npm/group-selection-settings.js +0 -6
- package/dist/npm/index.js +0 -23
- package/dist/npm/localization/custom-messages.component.js +0 -45
- package/dist/npm/localization/localized-toolbar-messages.directive.js +0 -37
- package/dist/npm/localization/messages.js +0 -24
- package/dist/npm/main.js +0 -26
- package/dist/npm/navigation.service.js +0 -132
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/popup-settings.js +0 -6
- package/dist/npm/refresh.service.js +0 -24
- package/dist/npm/render-location.js +0 -6
- package/dist/npm/renderer.component.js +0 -134
- package/dist/npm/renderer.service.js +0 -54
- package/dist/npm/tool-options.js +0 -6
- package/dist/npm/toolbar.component.js +0 -643
- package/dist/npm/toolbar.module.js +0 -62
- package/dist/npm/tools/toolbar-button.component.js +0 -312
- package/dist/npm/tools/toolbar-buttongroup.component.js +0 -167
- package/dist/npm/tools/toolbar-buttonlist.component.js +0 -68
- package/dist/npm/tools/toolbar-dropdownbutton.component.js +0 -370
- package/dist/npm/tools/toolbar-separator.component.js +0 -69
- package/dist/npm/tools/toolbar-splitbutton.component.js +0 -382
- package/dist/npm/tools/toolbar-tool.component.js +0 -78
- package/dist/npm/util.js +0 -209
- package/dist/systemjs/kendo-angular-toolbar.js +0 -5
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
-
import
|
|
6
|
-
import { Component, HostBinding, ViewChild, TemplateRef, ElementRef, QueryList, ContentChildren, Input, ViewChildren, HostListener, Output, EventEmitter, ViewContainerRef, NgZone, Renderer2 } from '@angular/core';
|
|
7
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
|
8
|
-
import { ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
5
|
+
import { Component, HostBinding, ViewChild, ContentChildren, Input, ViewChildren, HostListener, Output, EventEmitter, ViewContainerRef } from '@angular/core';
|
|
9
6
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
8
|
import { packageMetadata } from './package-metadata';
|
|
@@ -16,21 +13,29 @@ import { outerWidth, innerWidth, closest, isPresent } from './util';
|
|
|
16
13
|
import { Keys } from '@progress/kendo-angular-common';
|
|
17
14
|
import { PreventableEvent } from './common/preventable-event';
|
|
18
15
|
import { Subscription, fromEvent, Subject, merge } from 'rxjs';
|
|
19
|
-
import {
|
|
16
|
+
import { takeUntil } from 'rxjs/operators';
|
|
20
17
|
import { filter } from 'rxjs/operators';
|
|
21
18
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
22
19
|
import { defaultPopupWidth } from './common/constants';
|
|
20
|
+
import * as i0 from "@angular/core";
|
|
21
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
22
|
+
import * as i2 from "@progress/kendo-angular-popup";
|
|
23
|
+
import * as i3 from "./refresh.service";
|
|
24
|
+
import * as i4 from "./navigation.service";
|
|
25
|
+
import * as i5 from "./renderer.component";
|
|
26
|
+
import * as i6 from "@progress/kendo-angular-common";
|
|
27
|
+
import * as i7 from "./localization/localized-toolbar-messages.directive";
|
|
28
|
+
import * as i8 from "@angular/common";
|
|
23
29
|
const getInitialPopupSettings = (isRtl) => ({
|
|
24
30
|
animate: true,
|
|
25
31
|
anchorAlign: { horizontal: isRtl ? 'left' : 'right', vertical: 'bottom' },
|
|
26
32
|
popupAlign: { horizontal: isRtl ? 'left' : 'right', vertical: 'top' }
|
|
27
33
|
});
|
|
28
|
-
const ɵ0 = getInitialPopupSettings;
|
|
29
34
|
/**
|
|
30
35
|
* Represents the [Kendo UI ToolBar component for Angular]({% slug overview_toolbar %}).
|
|
31
36
|
*/
|
|
32
|
-
|
|
33
|
-
constructor(localization, popupService, refreshService, navigationService, element, zone, renderer) {
|
|
37
|
+
export class ToolBarComponent {
|
|
38
|
+
constructor(localization, popupService, refreshService, navigationService, element, zone, renderer, _cdr) {
|
|
34
39
|
this.localization = localization;
|
|
35
40
|
this.popupService = popupService;
|
|
36
41
|
this.refreshService = refreshService;
|
|
@@ -38,6 +43,7 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
38
43
|
this.element = element;
|
|
39
44
|
this.zone = zone;
|
|
40
45
|
this.renderer = renderer;
|
|
46
|
+
this._cdr = _cdr;
|
|
41
47
|
/**
|
|
42
48
|
* Hides the overflowing tools in a popup.
|
|
43
49
|
*/
|
|
@@ -157,7 +163,12 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
157
163
|
case Keys.ArrowLeft:
|
|
158
164
|
this.zone.run(() => {
|
|
159
165
|
ev.preventDefault();
|
|
160
|
-
this.direction === 'ltr'
|
|
166
|
+
if (this.direction === 'ltr') {
|
|
167
|
+
this.navigationService.focusPrev(ev);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.navigationService.focusNext(ev);
|
|
171
|
+
}
|
|
161
172
|
// prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
|
|
162
173
|
this.element.nativeElement.setAttribute('tabindex', '-1');
|
|
163
174
|
});
|
|
@@ -165,7 +176,12 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
165
176
|
case Keys.ArrowRight:
|
|
166
177
|
this.zone.run(() => {
|
|
167
178
|
ev.preventDefault();
|
|
168
|
-
this.direction === 'ltr'
|
|
179
|
+
if (this.direction === 'ltr') {
|
|
180
|
+
this.navigationService.focusNext(ev);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
this.navigationService.focusPrev(ev);
|
|
184
|
+
}
|
|
169
185
|
// prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
|
|
170
186
|
this.element.nativeElement.setAttribute('tabindex', '-1');
|
|
171
187
|
});
|
|
@@ -182,9 +198,7 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
182
198
|
});
|
|
183
199
|
});
|
|
184
200
|
if (this.overflow) {
|
|
185
|
-
this.subscriptions.add(merge(
|
|
186
|
-
// trigger resizing calculations once every 200ms instead of each time the resize event is emitted
|
|
187
|
-
this.resizeSensor.resize.pipe(bufferTime(200), filter(v => v.length > 0)), this.renderedTools.changes).subscribe(() => { this.onResize(); }));
|
|
201
|
+
this.subscriptions.add(merge(this.resizeSensor.resize, this.renderedTools.changes).subscribe(() => { this.onResize(); }));
|
|
188
202
|
// because of https://github.com/telerik/kendo-angular-buttons/pull/276
|
|
189
203
|
// calling onResize twice is the trade-off for removing the manual ChangeDetection
|
|
190
204
|
// triggering altogether - it ensures correct layout and calculations
|
|
@@ -229,6 +243,12 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
229
243
|
get moreToolsTitle() {
|
|
230
244
|
return this.localization.get('moreToolsTitle');
|
|
231
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* @hidden
|
|
248
|
+
*/
|
|
249
|
+
get cdr() {
|
|
250
|
+
return this._cdr;
|
|
251
|
+
}
|
|
232
252
|
/**
|
|
233
253
|
* @hidden
|
|
234
254
|
*/
|
|
@@ -276,11 +296,9 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
276
296
|
const containerWidth = innerWidth(this.element.nativeElement) - this.overflowAnchorWidth;
|
|
277
297
|
this.shrink(containerWidth, this.childrenWidth);
|
|
278
298
|
this.stretch(containerWidth, this.childrenWidth);
|
|
279
|
-
this.
|
|
280
|
-
|
|
281
|
-
});
|
|
299
|
+
this.displayAnchor();
|
|
300
|
+
this.resizeSensor.acceptSize();
|
|
282
301
|
}
|
|
283
|
-
this.resizeSensor.acceptSize();
|
|
284
302
|
}
|
|
285
303
|
/**
|
|
286
304
|
* @hidden
|
|
@@ -443,112 +461,77 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
443
461
|
popupContentContainer.style.height = this.popupHeight;
|
|
444
462
|
popupContentContainer.style.overflow = 'auto';
|
|
445
463
|
}
|
|
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
|
-
tslib_1.__decorate([
|
|
518
|
-
HostListener('focusout', ['$event']),
|
|
519
|
-
tslib_1.__metadata("design:type", Function),
|
|
520
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
521
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
522
|
-
], ToolBarComponent.prototype, "onFocusOut", null);
|
|
523
|
-
tslib_1.__decorate([
|
|
524
|
-
HostBinding('attr.role'),
|
|
525
|
-
tslib_1.__metadata("design:type", String),
|
|
526
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
527
|
-
], ToolBarComponent.prototype, "getRole", null);
|
|
528
|
-
tslib_1.__decorate([
|
|
529
|
-
HostBinding('attr.dir'),
|
|
530
|
-
tslib_1.__metadata("design:type", String),
|
|
531
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
532
|
-
], ToolBarComponent.prototype, "getDir", null);
|
|
533
|
-
tslib_1.__decorate([
|
|
534
|
-
HostBinding('class.k-toolbar-resizable'),
|
|
535
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
536
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
537
|
-
], ToolBarComponent.prototype, "resizableClass", null);
|
|
538
|
-
ToolBarComponent = tslib_1.__decorate([
|
|
539
|
-
Component({
|
|
540
|
-
exportAs: 'kendoToolBar',
|
|
541
|
-
providers: [
|
|
542
|
-
RefreshService,
|
|
543
|
-
NavigationService,
|
|
544
|
-
LocalizationService,
|
|
545
|
-
{
|
|
546
|
-
provide: L10N_PREFIX,
|
|
547
|
-
useValue: 'kendo.toolbar'
|
|
548
|
-
}
|
|
549
|
-
],
|
|
550
|
-
selector: 'kendo-toolbar',
|
|
551
|
-
template: `
|
|
464
|
+
}
|
|
465
|
+
ToolBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 });
|
|
466
|
+
ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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-widget": "this.hostClasses", "class.k-toolbar": "this.hostClasses", "attr.role": "this.getRole", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
|
|
467
|
+
RefreshService,
|
|
468
|
+
NavigationService,
|
|
469
|
+
LocalizationService,
|
|
470
|
+
{
|
|
471
|
+
provide: L10N_PREFIX,
|
|
472
|
+
useValue: 'kendo.toolbar'
|
|
473
|
+
}
|
|
474
|
+
], 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: `
|
|
475
|
+
<ng-container kendoToolbarLocalizedMessages
|
|
476
|
+
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
477
|
+
moreToolsTitle="More tools"
|
|
478
|
+
>
|
|
479
|
+
</ng-container>
|
|
480
|
+
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
481
|
+
<kendo-toolbar-renderer
|
|
482
|
+
#toolbarRenderer
|
|
483
|
+
(rendererClick)="onRendererClick($event)"
|
|
484
|
+
[location]="'toolbar'"
|
|
485
|
+
[resizable]="overflow"
|
|
486
|
+
[tool]="tool"
|
|
487
|
+
></kendo-toolbar-renderer>
|
|
488
|
+
</ng-container>
|
|
489
|
+
<button
|
|
490
|
+
#overflowButton
|
|
491
|
+
type="button"
|
|
492
|
+
tabindex="-1"
|
|
493
|
+
[title]="moreToolsTitle"
|
|
494
|
+
[attr.aria-label]="moreToolsTitle"
|
|
495
|
+
*ngIf="overflow"
|
|
496
|
+
[style.visibility]="'hidden'"
|
|
497
|
+
class="k-overflow-anchor k-button"
|
|
498
|
+
(click)="showPopup()"
|
|
499
|
+
>
|
|
500
|
+
<span class="k-icon k-i-more-vertical"></span>
|
|
501
|
+
</button>
|
|
502
|
+
<ng-template #popupTemplate>
|
|
503
|
+
<ul class="k-overflow-container k-list-container k-reset">
|
|
504
|
+
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
505
|
+
<li class="k-item">
|
|
506
|
+
<kendo-toolbar-renderer
|
|
507
|
+
#overflowRenderer
|
|
508
|
+
(rendererClick)="onRendererClick($event)"
|
|
509
|
+
[location]="'overflow'"
|
|
510
|
+
[resizable]="overflow"
|
|
511
|
+
[tool]="tool"
|
|
512
|
+
></kendo-toolbar-renderer>
|
|
513
|
+
</li>
|
|
514
|
+
</ng-container>
|
|
515
|
+
</ul>
|
|
516
|
+
</ng-template>
|
|
517
|
+
<ng-container #container></ng-container>
|
|
518
|
+
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
519
|
+
`, 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: i7.LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
521
|
+
type: Component,
|
|
522
|
+
args: [{
|
|
523
|
+
exportAs: 'kendoToolBar',
|
|
524
|
+
providers: [
|
|
525
|
+
RefreshService,
|
|
526
|
+
NavigationService,
|
|
527
|
+
LocalizationService,
|
|
528
|
+
{
|
|
529
|
+
provide: L10N_PREFIX,
|
|
530
|
+
useValue: 'kendo.toolbar'
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
selector: 'kendo-toolbar',
|
|
534
|
+
template: `
|
|
552
535
|
<ng-container kendoToolbarLocalizedMessages
|
|
553
536
|
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
554
537
|
moreToolsTitle="More tools"
|
|
@@ -592,16 +575,64 @@ ToolBarComponent = tslib_1.__decorate([
|
|
|
592
575
|
</ul>
|
|
593
576
|
</ng-template>
|
|
594
577
|
<ng-container #container></ng-container>
|
|
595
|
-
<kendo-resize-sensor *ngIf="overflow"
|
|
578
|
+
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
596
579
|
`
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
580
|
+
}]
|
|
581
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: i3.RefreshService }, { type: i4.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { overflow: [{
|
|
582
|
+
type: Input
|
|
583
|
+
}], resizable: [{
|
|
584
|
+
type: Input
|
|
585
|
+
}], popupSettings: [{
|
|
586
|
+
type: Input
|
|
587
|
+
}], tabindex: [{
|
|
588
|
+
type: Input
|
|
589
|
+
}], tabIndex: [{
|
|
590
|
+
type: Input,
|
|
591
|
+
args: ['tabIndex']
|
|
592
|
+
}], open: [{
|
|
593
|
+
type: Output
|
|
594
|
+
}], close: [{
|
|
595
|
+
type: Output
|
|
596
|
+
}], allTools: [{
|
|
597
|
+
type: ContentChildren,
|
|
598
|
+
args: [ToolBarToolComponent]
|
|
599
|
+
}], overflowButton: [{
|
|
600
|
+
type: ViewChild,
|
|
601
|
+
args: ['overflowButton', { static: false }]
|
|
602
|
+
}], popupTemplate: [{
|
|
603
|
+
type: ViewChild,
|
|
604
|
+
args: ['popupTemplate', { static: true }]
|
|
605
|
+
}], resizeSensor: [{
|
|
606
|
+
type: ViewChild,
|
|
607
|
+
args: ['resizeSensor', { static: false }]
|
|
608
|
+
}], container: [{
|
|
609
|
+
type: ViewChild,
|
|
610
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
611
|
+
}], renderedTools: [{
|
|
612
|
+
type: ViewChildren,
|
|
613
|
+
args: ['toolbarRenderer']
|
|
614
|
+
}], overflowRenderedTools: [{
|
|
615
|
+
type: ViewChildren,
|
|
616
|
+
args: ['overflowRenderer']
|
|
617
|
+
}], hostClasses: [{
|
|
618
|
+
type: HostBinding,
|
|
619
|
+
args: ['class.k-widget']
|
|
620
|
+
}, {
|
|
621
|
+
type: HostBinding,
|
|
622
|
+
args: ['class.k-toolbar']
|
|
623
|
+
}], onFocus: [{
|
|
624
|
+
type: HostListener,
|
|
625
|
+
args: ['focus', ['$event']]
|
|
626
|
+
}], onFocusOut: [{
|
|
627
|
+
type: HostListener,
|
|
628
|
+
args: ['focusout', ['$event']]
|
|
629
|
+
}], getRole: [{
|
|
630
|
+
type: HostBinding,
|
|
631
|
+
args: ['attr.role']
|
|
632
|
+
}], getDir: [{
|
|
633
|
+
type: HostBinding,
|
|
634
|
+
args: ['attr.dir']
|
|
635
|
+
}], resizableClass: [{
|
|
636
|
+
type: HostBinding,
|
|
637
|
+
args: ['class.k-toolbar-resizable']
|
|
638
|
+
}] } });
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
-
import * as tslib_1 from "tslib";
|
|
6
5
|
import { NgModule } from '@angular/core';
|
|
7
6
|
import { CommonModule } from '@angular/common';
|
|
8
7
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
@@ -19,6 +18,7 @@ import { ToolBarRendererComponent } from './renderer.component';
|
|
|
19
18
|
import { ToolBarButtonListComponent } from './tools/toolbar-buttonlist.component';
|
|
20
19
|
import { LocalizedToolbarMessagesDirective } from './localization/localized-toolbar-messages.directive';
|
|
21
20
|
import { ToolbarCustomMessagesComponent } from './localization/custom-messages.component';
|
|
21
|
+
import * as i0 from "@angular/core";
|
|
22
22
|
const TOOLBAR_TOOLS = [
|
|
23
23
|
ToolBarToolComponent,
|
|
24
24
|
ToolBarButtonComponent,
|
|
@@ -45,13 +45,29 @@ const TOOLBAR_COMMON = [
|
|
|
45
45
|
* - `ToolBarSplitButtonComponent`—The SplitButton Tool component class.
|
|
46
46
|
* - `ToolBarSeparatorComponent`—The Separator Tool component class.
|
|
47
47
|
*/
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
ToolBarModule =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
export class ToolBarModule {
|
|
49
|
+
}
|
|
50
|
+
ToolBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
51
|
+
ToolBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarModule, declarations: [ToolBarComponent, ToolBarToolComponent,
|
|
52
|
+
ToolBarButtonComponent,
|
|
53
|
+
ToolBarButtonGroupComponent,
|
|
54
|
+
ToolBarDropDownButtonComponent,
|
|
55
|
+
ToolBarSplitButtonComponent,
|
|
56
|
+
ToolBarSeparatorComponent, ToolBarRendererComponent,
|
|
57
|
+
ToolBarButtonListComponent,
|
|
58
|
+
ToolbarCustomMessagesComponent,
|
|
59
|
+
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
60
|
+
ToolBarButtonComponent,
|
|
61
|
+
ToolBarButtonGroupComponent,
|
|
62
|
+
ToolBarDropDownButtonComponent,
|
|
63
|
+
ToolBarSplitButtonComponent,
|
|
64
|
+
ToolBarSeparatorComponent, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective] });
|
|
65
|
+
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]] });
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarModule, decorators: [{
|
|
67
|
+
type: NgModule,
|
|
68
|
+
args: [{
|
|
69
|
+
declarations: [ToolBarComponent, TOOLBAR_TOOLS, TOOLBAR_COMMON],
|
|
70
|
+
exports: [ToolBarComponent, TOOLBAR_TOOLS, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective],
|
|
71
|
+
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]
|
|
72
|
+
}]
|
|
73
|
+
}] });
|