@progress/kendo-angular-toolbar 5.0.4-dev.202204180802 → 6.0.0-dev.202204180857
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 +153 -126
- 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} +1010 -881
- 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} +24 -17
- 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 -648
- 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 -2672
- 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 -650
- 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, ChangeDetectorRef } 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';
|
|
@@ -20,16 +17,24 @@ 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
|
-
|
|
37
|
+
export class ToolBarComponent {
|
|
33
38
|
constructor(localization, popupService, refreshService, navigationService, element, zone, renderer, _cdr) {
|
|
34
39
|
this.localization = localization;
|
|
35
40
|
this.popupService = popupService;
|
|
@@ -158,7 +163,12 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
158
163
|
case Keys.ArrowLeft:
|
|
159
164
|
this.zone.run(() => {
|
|
160
165
|
ev.preventDefault();
|
|
161
|
-
this.direction === 'ltr'
|
|
166
|
+
if (this.direction === 'ltr') {
|
|
167
|
+
this.navigationService.focusPrev(ev);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.navigationService.focusNext(ev);
|
|
171
|
+
}
|
|
162
172
|
// prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
|
|
163
173
|
this.element.nativeElement.setAttribute('tabindex', '-1');
|
|
164
174
|
});
|
|
@@ -166,7 +176,12 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
166
176
|
case Keys.ArrowRight:
|
|
167
177
|
this.zone.run(() => {
|
|
168
178
|
ev.preventDefault();
|
|
169
|
-
this.direction === 'ltr'
|
|
179
|
+
if (this.direction === 'ltr') {
|
|
180
|
+
this.navigationService.focusNext(ev);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
this.navigationService.focusPrev(ev);
|
|
184
|
+
}
|
|
170
185
|
// prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
|
|
171
186
|
this.element.nativeElement.setAttribute('tabindex', '-1');
|
|
172
187
|
});
|
|
@@ -446,112 +461,77 @@ let ToolBarComponent = class ToolBarComponent {
|
|
|
446
461
|
popupContentContainer.style.height = this.popupHeight;
|
|
447
462
|
popupContentContainer.style.overflow = 'auto';
|
|
448
463
|
}
|
|
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
|
-
tslib_1.__decorate([
|
|
521
|
-
HostListener('focusout', ['$event']),
|
|
522
|
-
tslib_1.__metadata("design:type", Function),
|
|
523
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
524
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
525
|
-
], ToolBarComponent.prototype, "onFocusOut", null);
|
|
526
|
-
tslib_1.__decorate([
|
|
527
|
-
HostBinding('attr.role'),
|
|
528
|
-
tslib_1.__metadata("design:type", String),
|
|
529
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
530
|
-
], ToolBarComponent.prototype, "getRole", null);
|
|
531
|
-
tslib_1.__decorate([
|
|
532
|
-
HostBinding('attr.dir'),
|
|
533
|
-
tslib_1.__metadata("design:type", String),
|
|
534
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
535
|
-
], ToolBarComponent.prototype, "getDir", null);
|
|
536
|
-
tslib_1.__decorate([
|
|
537
|
-
HostBinding('class.k-toolbar-resizable'),
|
|
538
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
539
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
540
|
-
], ToolBarComponent.prototype, "resizableClass", null);
|
|
541
|
-
ToolBarComponent = tslib_1.__decorate([
|
|
542
|
-
Component({
|
|
543
|
-
exportAs: 'kendoToolBar',
|
|
544
|
-
providers: [
|
|
545
|
-
RefreshService,
|
|
546
|
-
NavigationService,
|
|
547
|
-
LocalizationService,
|
|
548
|
-
{
|
|
549
|
-
provide: L10N_PREFIX,
|
|
550
|
-
useValue: 'kendo.toolbar'
|
|
551
|
-
}
|
|
552
|
-
],
|
|
553
|
-
selector: 'kendo-toolbar',
|
|
554
|
-
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: `
|
|
555
535
|
<ng-container kendoToolbarLocalizedMessages
|
|
556
536
|
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
557
537
|
moreToolsTitle="More tools"
|
|
@@ -597,15 +577,62 @@ ToolBarComponent = tslib_1.__decorate([
|
|
|
597
577
|
<ng-container #container></ng-container>
|
|
598
578
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
599
579
|
`
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
],
|
|
610
|
-
|
|
611
|
-
|
|
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
|
+
}] });
|
|
@@ -2,15 +2,16 @@
|
|
|
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
|
-
var ToolBarButtonComponent_1;
|
|
7
|
-
import { Component, TemplateRef, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef } from '@angular/core';
|
|
5
|
+
import { Component, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef } from '@angular/core';
|
|
8
6
|
import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
9
7
|
import { getValueForLocation } from '../util';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-buttons";
|
|
10
|
+
import * as i2 from "@angular/common";
|
|
10
11
|
/**
|
|
11
12
|
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
14
15
|
constructor() {
|
|
15
16
|
super();
|
|
16
17
|
// showText and showIcon showIcon should be declared first
|
|
@@ -170,112 +171,66 @@ let ToolBarButtonComponent = ToolBarButtonComponent_1 = class ToolBarButtonCompo
|
|
|
170
171
|
getButton() {
|
|
171
172
|
return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
|
|
172
173
|
}
|
|
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
|
-
], ToolBarButtonComponent.prototype, "icon", null);
|
|
234
|
-
tslib_1.__decorate([
|
|
235
|
-
Input(),
|
|
236
|
-
tslib_1.__metadata("design:type", String),
|
|
237
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
238
|
-
], ToolBarButtonComponent.prototype, "iconClass", null);
|
|
239
|
-
tslib_1.__decorate([
|
|
240
|
-
Input(),
|
|
241
|
-
tslib_1.__metadata("design:type", String),
|
|
242
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
243
|
-
], ToolBarButtonComponent.prototype, "imageUrl", null);
|
|
244
|
-
tslib_1.__decorate([
|
|
245
|
-
Output(),
|
|
246
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
247
|
-
], ToolBarButtonComponent.prototype, "click", void 0);
|
|
248
|
-
tslib_1.__decorate([
|
|
249
|
-
Output(),
|
|
250
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
251
|
-
], ToolBarButtonComponent.prototype, "pointerdown", void 0);
|
|
252
|
-
tslib_1.__decorate([
|
|
253
|
-
Output(),
|
|
254
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
255
|
-
], ToolBarButtonComponent.prototype, "selectedChange", void 0);
|
|
256
|
-
tslib_1.__decorate([
|
|
257
|
-
ViewChild('toolbarTemplate', { static: true }),
|
|
258
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
259
|
-
], ToolBarButtonComponent.prototype, "toolbarTemplate", void 0);
|
|
260
|
-
tslib_1.__decorate([
|
|
261
|
-
ViewChild('popupTemplate', { static: true }),
|
|
262
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
263
|
-
], ToolBarButtonComponent.prototype, "popupTemplate", void 0);
|
|
264
|
-
tslib_1.__decorate([
|
|
265
|
-
ViewChild('toolbarButton', { read: ElementRef, static: false }),
|
|
266
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
267
|
-
], ToolBarButtonComponent.prototype, "toolbarButtonElement", void 0);
|
|
268
|
-
tslib_1.__decorate([
|
|
269
|
-
ViewChild('overflowButton', { read: ElementRef, static: false }),
|
|
270
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
271
|
-
], ToolBarButtonComponent.prototype, "overflowButtonElement", void 0);
|
|
272
|
-
ToolBarButtonComponent = ToolBarButtonComponent_1 = tslib_1.__decorate([
|
|
273
|
-
Component({
|
|
274
|
-
exportAs: 'kendoToolBarButton',
|
|
275
|
-
// tslint:disable-next-line:no-forward-ref
|
|
276
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent_1) }],
|
|
277
|
-
selector: 'kendo-toolbar-button',
|
|
278
|
-
template: `
|
|
174
|
+
}
|
|
175
|
+
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
177
|
+
<ng-template #toolbarTemplate>
|
|
178
|
+
<button
|
|
179
|
+
#toolbarButton
|
|
180
|
+
[tabindex]="tabIndex"
|
|
181
|
+
type="button"
|
|
182
|
+
kendoButton
|
|
183
|
+
[ngStyle]="style"
|
|
184
|
+
[ngClass]="className"
|
|
185
|
+
[attr.title]="title"
|
|
186
|
+
[disabled]="disabled"
|
|
187
|
+
[toggleable]="toggleable"
|
|
188
|
+
[fillMode]="fillMode"
|
|
189
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
190
|
+
[selected]="selected"
|
|
191
|
+
[icon]="toolbarOptions.icon"
|
|
192
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
193
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
194
|
+
(click)="click.emit($event)"
|
|
195
|
+
(pointerdown)="pointerdown.emit($event)"
|
|
196
|
+
(selectedChange)="selectedChange.emit($event)"
|
|
197
|
+
(blur)="onBlur()"
|
|
198
|
+
>
|
|
199
|
+
{{ toolbarOptions.text }}
|
|
200
|
+
</button>
|
|
201
|
+
</ng-template>
|
|
202
|
+
<ng-template #popupTemplate>
|
|
203
|
+
<button
|
|
204
|
+
#overflowButton
|
|
205
|
+
tabindex="-1"
|
|
206
|
+
type="button"
|
|
207
|
+
kendoButton
|
|
208
|
+
class="k-overflow-button"
|
|
209
|
+
[ngStyle]="style"
|
|
210
|
+
[ngClass]="className"
|
|
211
|
+
[attr.title]="title"
|
|
212
|
+
[disabled]="disabled"
|
|
213
|
+
[toggleable]="toggleable"
|
|
214
|
+
[fillMode]="fillMode"
|
|
215
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
216
|
+
[selected]="selected"
|
|
217
|
+
[icon]="overflowOptions.icon"
|
|
218
|
+
[iconClass]="overflowOptions.iconClass"
|
|
219
|
+
[imageUrl]="overflowOptions.imageUrl"
|
|
220
|
+
(click)="click.emit($event)"
|
|
221
|
+
(selectedChange)="selectedChange.emit($event)"
|
|
222
|
+
>
|
|
223
|
+
{{ overflowOptions.text }}
|
|
224
|
+
</button>
|
|
225
|
+
</ng-template>
|
|
226
|
+
`, isInline: true, directives: [{ type: i1.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
228
|
+
type: Component,
|
|
229
|
+
args: [{
|
|
230
|
+
exportAs: 'kendoToolBarButton',
|
|
231
|
+
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }],
|
|
232
|
+
selector: 'kendo-toolbar-button',
|
|
233
|
+
template: `
|
|
279
234
|
<ng-template #toolbarTemplate>
|
|
280
235
|
<button
|
|
281
236
|
#toolbarButton
|
|
@@ -326,7 +281,55 @@ ToolBarButtonComponent = ToolBarButtonComponent_1 = tslib_1.__decorate([
|
|
|
326
281
|
</button>
|
|
327
282
|
</ng-template>
|
|
328
283
|
`
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
284
|
+
}]
|
|
285
|
+
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
286
|
+
type: Input
|
|
287
|
+
}], showIcon: [{
|
|
288
|
+
type: Input
|
|
289
|
+
}], text: [{
|
|
290
|
+
type: Input
|
|
291
|
+
}], style: [{
|
|
292
|
+
type: Input
|
|
293
|
+
}], className: [{
|
|
294
|
+
type: Input
|
|
295
|
+
}], title: [{
|
|
296
|
+
type: Input
|
|
297
|
+
}], disabled: [{
|
|
298
|
+
type: Input
|
|
299
|
+
}], toggleable: [{
|
|
300
|
+
type: Input
|
|
301
|
+
}], look: [{
|
|
302
|
+
type: Input
|
|
303
|
+
}], togglable: [{
|
|
304
|
+
type: Input
|
|
305
|
+
}], selected: [{
|
|
306
|
+
type: Input
|
|
307
|
+
}], fillMode: [{
|
|
308
|
+
type: Input
|
|
309
|
+
}], themeColor: [{
|
|
310
|
+
type: Input
|
|
311
|
+
}], icon: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}], iconClass: [{
|
|
314
|
+
type: Input
|
|
315
|
+
}], imageUrl: [{
|
|
316
|
+
type: Input
|
|
317
|
+
}], click: [{
|
|
318
|
+
type: Output
|
|
319
|
+
}], pointerdown: [{
|
|
320
|
+
type: Output
|
|
321
|
+
}], selectedChange: [{
|
|
322
|
+
type: Output
|
|
323
|
+
}], toolbarTemplate: [{
|
|
324
|
+
type: ViewChild,
|
|
325
|
+
args: ['toolbarTemplate', { static: true }]
|
|
326
|
+
}], popupTemplate: [{
|
|
327
|
+
type: ViewChild,
|
|
328
|
+
args: ['popupTemplate', { static: true }]
|
|
329
|
+
}], toolbarButtonElement: [{
|
|
330
|
+
type: ViewChild,
|
|
331
|
+
args: ['toolbarButton', { read: ElementRef, static: false }]
|
|
332
|
+
}], overflowButtonElement: [{
|
|
333
|
+
type: ViewChild,
|
|
334
|
+
args: ['overflowButton', { read: ElementRef, static: false }]
|
|
335
|
+
}] } });
|