@progress/kendo-angular-toolbar 21.4.1-develop.1 → 22.0.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/progress-kendo-angular-toolbar.mjs +62 -62
- package/localization/messages.d.ts +1 -1
- package/package.json +12 -20
- package/esm2022/common/fillmode.mjs +0 -5
- package/esm2022/common/overflow-mode.mjs +0 -5
- package/esm2022/common/overflow-settings.mjs +0 -5
- package/esm2022/common/preventable-event.mjs +0 -25
- package/esm2022/common/renderer-click.mjs +0 -5
- package/esm2022/common/scroll-buttons.mjs +0 -5
- package/esm2022/common/size.mjs +0 -5
- package/esm2022/direction.mjs +0 -5
- package/esm2022/directives.mjs +0 -45
- package/esm2022/display-mode.mjs +0 -5
- package/esm2022/group-selection-settings.mjs +0 -5
- package/esm2022/index.mjs +0 -17
- package/esm2022/localization/custom-messages.component.mjs +0 -56
- package/esm2022/localization/localized-toolbar-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -39
- package/esm2022/navigation.service.mjs +0 -159
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/popup-settings.mjs +0 -5
- package/esm2022/progress-kendo-angular-toolbar.mjs +0 -8
- package/esm2022/refresh.service.mjs +0 -20
- package/esm2022/render-location.mjs +0 -5
- package/esm2022/renderer.component.mjs +0 -191
- package/esm2022/renderer.service.mjs +0 -52
- package/esm2022/scroll.service.mjs +0 -110
- package/esm2022/scrollable-button.component.mjs +0 -152
- package/esm2022/tool-options.mjs +0 -5
- package/esm2022/toolbar.component.mjs +0 -1582
- package/esm2022/toolbar.module.mjs +0 -46
- package/esm2022/tools/toolbar-button.component.mjs +0 -712
- package/esm2022/tools/toolbar-buttongroup.component.mjs +0 -448
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +0 -595
- package/esm2022/tools/toolbar-separator.component.mjs +0 -96
- package/esm2022/tools/toolbar-spacer.component.mjs +0 -76
- package/esm2022/tools/toolbar-splitbutton.component.mjs +0 -607
- package/esm2022/tools/toolbar-tool.component.mjs +0 -106
- package/esm2022/tools/tools.service.mjs +0 -25
- package/esm2022/util.mjs +0 -244
package/esm2022/index.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export { ToolBarComponent } from './toolbar.component';
|
|
6
|
-
export { ToolBarToolComponent } from './tools/toolbar-tool.component';
|
|
7
|
-
export { ToolBarButtonComponent } from './tools/toolbar-button.component';
|
|
8
|
-
export { ToolBarButtonGroupComponent } from './tools/toolbar-buttongroup.component';
|
|
9
|
-
export { ToolBarDropDownButtonComponent } from './tools/toolbar-dropdownbutton.component';
|
|
10
|
-
export { ToolBarSplitButtonComponent } from './tools/toolbar-splitbutton.component';
|
|
11
|
-
export { ToolBarSeparatorComponent } from './tools/toolbar-separator.component';
|
|
12
|
-
export { ToolBarSpacerComponent } from './tools/toolbar-spacer.component';
|
|
13
|
-
export { ToolBarModule } from './toolbar.module';
|
|
14
|
-
export { LocalizedToolbarMessagesDirective } from './localization/localized-toolbar-messages.directive';
|
|
15
|
-
export { ToolbarCustomMessagesComponent } from './localization/custom-messages.component';
|
|
16
|
-
export { RefreshService } from './refresh.service';
|
|
17
|
-
export * from './directives';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, forwardRef } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { ToolbarMessages } from './messages';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
/**
|
|
11
|
-
* Represents the custom messages component of the ToolBar.
|
|
12
|
-
*
|
|
13
|
-
* Use this component to override default messages for the ToolBar.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```html
|
|
17
|
-
* <kendo-toolbar>
|
|
18
|
-
* <kendo-toolbar-messages
|
|
19
|
-
* moreToolsTitle="More options"
|
|
20
|
-
* previousToolButton="Previous"
|
|
21
|
-
* nextToolButton="Next">
|
|
22
|
-
* </kendo-toolbar-messages>
|
|
23
|
-
* </kendo-toolbar>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export class ToolbarCustomMessagesComponent extends ToolbarMessages {
|
|
27
|
-
service;
|
|
28
|
-
constructor(service) {
|
|
29
|
-
super();
|
|
30
|
-
this.service = service;
|
|
31
|
-
}
|
|
32
|
-
get override() {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarCustomMessagesComponent, isStandalone: true, selector: "kendo-toolbar-messages", providers: [
|
|
37
|
-
{
|
|
38
|
-
provide: ToolbarMessages,
|
|
39
|
-
useExisting: forwardRef(() => ToolbarCustomMessagesComponent)
|
|
40
|
-
}
|
|
41
|
-
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
42
|
-
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarCustomMessagesComponent, decorators: [{
|
|
44
|
-
type: Component,
|
|
45
|
-
args: [{
|
|
46
|
-
providers: [
|
|
47
|
-
{
|
|
48
|
-
provide: ToolbarMessages,
|
|
49
|
-
useExisting: forwardRef(() => ToolbarCustomMessagesComponent)
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
selector: 'kendo-toolbar-messages',
|
|
53
|
-
template: ``,
|
|
54
|
-
standalone: true
|
|
55
|
-
}]
|
|
56
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, forwardRef } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { ToolbarMessages } from './messages';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class LocalizedToolbarMessagesDirective extends ToolbarMessages {
|
|
14
|
-
service;
|
|
15
|
-
constructor(service) {
|
|
16
|
-
super();
|
|
17
|
-
this.service = service;
|
|
18
|
-
}
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedToolbarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedToolbarMessagesDirective, isStandalone: true, selector: "[kendoToolbarLocalizedMessages]", providers: [
|
|
21
|
-
{
|
|
22
|
-
provide: ToolbarMessages,
|
|
23
|
-
useExisting: forwardRef(() => LocalizedToolbarMessagesDirective)
|
|
24
|
-
}
|
|
25
|
-
], usesInheritance: true, ngImport: i0 });
|
|
26
|
-
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedToolbarMessagesDirective, decorators: [{
|
|
28
|
-
type: Directive,
|
|
29
|
-
args: [{
|
|
30
|
-
providers: [
|
|
31
|
-
{
|
|
32
|
-
provide: ToolbarMessages,
|
|
33
|
-
useExisting: forwardRef(() => LocalizedToolbarMessagesDirective)
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
selector: '[kendoToolbarLocalizedMessages]',
|
|
37
|
-
standalone: true
|
|
38
|
-
}]
|
|
39
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
6
|
-
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class ToolbarMessages extends ComponentMessages {
|
|
12
|
-
/**
|
|
13
|
-
* Sets the title of the **More Tools** button in a responsive ToolBar.
|
|
14
|
-
*/
|
|
15
|
-
moreToolsTitle;
|
|
16
|
-
/**
|
|
17
|
-
* Sets the title for the **Previous Tool** button when the ToolBar is scrollable.
|
|
18
|
-
*/
|
|
19
|
-
previousToolButton;
|
|
20
|
-
/**
|
|
21
|
-
* Sets the title for the **Next Tool** button when the ToolBar is scrollable.
|
|
22
|
-
*/
|
|
23
|
-
nextToolButton;
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
25
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarMessages, selector: "kendo-toolbar-messages-base", inputs: { moreToolsTitle: "moreToolsTitle", previousToolButton: "previousToolButton", nextToolButton: "nextToolButton" }, usesInheritance: true, ngImport: i0 });
|
|
26
|
-
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarMessages, decorators: [{
|
|
28
|
-
type: Directive,
|
|
29
|
-
args: [{
|
|
30
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
31
|
-
selector: 'kendo-toolbar-messages-base'
|
|
32
|
-
}]
|
|
33
|
-
}], propDecorators: { moreToolsTitle: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], previousToolButton: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], nextToolButton: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}] } });
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable, NgZone } from '@angular/core';
|
|
6
|
-
import { take } from 'rxjs/operators';
|
|
7
|
-
import { isPresent } from './util';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class NavigationService {
|
|
13
|
-
zone;
|
|
14
|
-
overflowButton;
|
|
15
|
-
focused = { renderedTool: null, index: -1 };
|
|
16
|
-
renderedTools = [];
|
|
17
|
-
isPopupFocused = false;
|
|
18
|
-
isOverflowButtonFocused = false;
|
|
19
|
-
constructor(zone) {
|
|
20
|
-
this.zone = zone;
|
|
21
|
-
}
|
|
22
|
-
setRenderedTools(rts) {
|
|
23
|
-
this.renderedTools = rts;
|
|
24
|
-
}
|
|
25
|
-
click({ context, event: ev }) {
|
|
26
|
-
if (this.focused.renderedTool !== context && ev) {
|
|
27
|
-
this.focus(context, ev);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
moveFocusToToolBar() {
|
|
31
|
-
this.isPopupFocused = false;
|
|
32
|
-
this.focusOverflowButton();
|
|
33
|
-
}
|
|
34
|
-
moveFocusToPopup() {
|
|
35
|
-
this.isPopupFocused = true;
|
|
36
|
-
this.resetNavigation();
|
|
37
|
-
this.focus();
|
|
38
|
-
}
|
|
39
|
-
focusNext(ev) {
|
|
40
|
-
if (this.isOverflowButtonFocused) {
|
|
41
|
-
const firstFocusableRT = this.getFocusableTools()[0];
|
|
42
|
-
this.focus(firstFocusableRT, ev);
|
|
43
|
-
}
|
|
44
|
-
else if (!this.isOverflowButtonFocused && this.focused.renderedTool && !this.focused.renderedTool.tool.handleKey(ev)) {
|
|
45
|
-
const nextRT = this.getFocusableTools().slice(this.focused.index + 1)[0];
|
|
46
|
-
if (nextRT) {
|
|
47
|
-
this.focus(nextRT, ev);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
if (this.isOverflowButtonVisible() && !this.isPopupFocused) {
|
|
51
|
-
this.focusOverflowButton();
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
const firstRT = this.getFocusableTools()[0];
|
|
55
|
-
this.focus(firstRT, ev);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
focusPrev(ev) {
|
|
61
|
-
if (this.isOverflowButtonFocused) {
|
|
62
|
-
const lastFocusableRT = this.getFocusableTools().reverse()[0];
|
|
63
|
-
this.focus(lastFocusableRT, ev);
|
|
64
|
-
}
|
|
65
|
-
else if (!this.isOverflowButtonFocused && this.focused.renderedTool && !this.focused.renderedTool.tool.handleKey(ev)) {
|
|
66
|
-
const prevRT = this.getFocusableTools()
|
|
67
|
-
.slice(0, this.focused.index)
|
|
68
|
-
.reverse()[0];
|
|
69
|
-
if (prevRT) {
|
|
70
|
-
this.focus(prevRT, ev);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
if (this.isOverflowButtonVisible() && !this.isPopupFocused) {
|
|
74
|
-
this.focusOverflowButton();
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
const lastRT = this.getFocusableTools().reverse()[0];
|
|
78
|
-
this.focus(lastRT, ev);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
resetNavigation() {
|
|
84
|
-
this.blurOverflowButton();
|
|
85
|
-
this.focused.renderedTool = null;
|
|
86
|
-
this.focused.index = -1;
|
|
87
|
-
}
|
|
88
|
-
focusFirst(ev) {
|
|
89
|
-
const firstTool = this.getFocusableTools()[0];
|
|
90
|
-
const overFlowButton = this.overflowButton;
|
|
91
|
-
if (firstTool) {
|
|
92
|
-
this.focused.renderedTool = firstTool;
|
|
93
|
-
this.focused.index = this.getFocusableTools().findIndex(rt => rt === firstTool);
|
|
94
|
-
this.focus(firstTool, ev);
|
|
95
|
-
}
|
|
96
|
-
else if (overFlowButton) {
|
|
97
|
-
overFlowButton.nativeElement.focus();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
focusLast(ev) {
|
|
101
|
-
const lastTool = this.getFocusableTools().reverse()[0];
|
|
102
|
-
const overFlowButton = this.overflowButton;
|
|
103
|
-
if (lastTool) {
|
|
104
|
-
this.focused.renderedTool = lastTool;
|
|
105
|
-
this.focused.index = this.getFocusableTools().findIndex(rt => rt === lastTool);
|
|
106
|
-
this.focus(lastTool, ev);
|
|
107
|
-
}
|
|
108
|
-
else if (overFlowButton) {
|
|
109
|
-
overFlowButton.nativeElement.focus();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
getFocusableTools() {
|
|
113
|
-
return this.renderedTools.filter(rt => (rt.tool.overflows === this.isPopupFocused) && rt.tool.canFocus());
|
|
114
|
-
}
|
|
115
|
-
focus(renderedTool, ev) {
|
|
116
|
-
// running the code below in onStable fixes issue #2939
|
|
117
|
-
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
118
|
-
if (!renderedTool) {
|
|
119
|
-
const focusableRTs = this.getFocusableTools();
|
|
120
|
-
const lastFocusedRT = focusableRTs.find(rt => rt === this.focused.renderedTool) || focusableRTs[0];
|
|
121
|
-
// guard against only disabled tools
|
|
122
|
-
if (lastFocusedRT) {
|
|
123
|
-
this.focused.renderedTool = lastFocusedRT;
|
|
124
|
-
this.focused.index = this.getFocusableTools().findIndex(rt => rt === lastFocusedRT);
|
|
125
|
-
// if event is undefined, then this means that the tool is the first one in the overflow popup
|
|
126
|
-
lastFocusedRT.tool.focus(ev);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else if (renderedTool.tool.canFocus && renderedTool.tool.canFocus()) {
|
|
130
|
-
this.focused.renderedTool = renderedTool;
|
|
131
|
-
this.focused.index = this.getFocusableTools().findIndex(rt => rt === renderedTool);
|
|
132
|
-
renderedTool.tool.focus(ev);
|
|
133
|
-
this.blurOverflowButton();
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
blurOverflowButton() {
|
|
138
|
-
if (this.overflowButton) {
|
|
139
|
-
this.isOverflowButtonFocused = false;
|
|
140
|
-
this.overflowButton.nativeElement.tabIndex = -1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
focusOverflowButton() {
|
|
144
|
-
if (this.overflowButton) {
|
|
145
|
-
this.isOverflowButtonFocused = true;
|
|
146
|
-
this.overflowButton.nativeElement.tabIndex = 0;
|
|
147
|
-
this.overflowButton.nativeElement.focus();
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
isOverflowButtonVisible() {
|
|
151
|
-
return (isPresent(this.overflowButton) &&
|
|
152
|
-
window.getComputedStyle(this.overflowButton.nativeElement).getPropertyValue('visibility') === 'visible');
|
|
153
|
-
}
|
|
154
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
155
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService });
|
|
156
|
-
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, decorators: [{
|
|
158
|
-
type: Injectable
|
|
159
|
-
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-toolbar',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCode: 'KENDOUIANGULAR',
|
|
12
|
-
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate: 1768386436,
|
|
14
|
-
version: '21.4.1-develop.1',
|
|
15
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable, EventEmitter } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class RefreshService {
|
|
11
|
-
onRefresh = new EventEmitter();
|
|
12
|
-
refresh(tool) {
|
|
13
|
-
this.onRefresh.emit(tool);
|
|
14
|
-
}
|
|
15
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RefreshService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RefreshService });
|
|
17
|
-
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RefreshService, decorators: [{
|
|
19
|
-
type: Injectable
|
|
20
|
-
}] });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Input, Renderer2 as Renderer, Output, EventEmitter, Directive, ViewContainerRef } from '@angular/core';
|
|
6
|
-
import { isPresent } from '@progress/kendo-angular-common';
|
|
7
|
-
import { ToolBarToolComponent } from './tools/toolbar-tool.component';
|
|
8
|
-
import { RefreshService } from './refresh.service';
|
|
9
|
-
import { RendererService } from './renderer.service';
|
|
10
|
-
import { ToolbarToolsService } from './tools/tools.service';
|
|
11
|
-
import { isElementOrTextNode, outerWidth } from './util';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "./renderer.service";
|
|
14
|
-
import * as i2 from "./refresh.service";
|
|
15
|
-
import * as i3 from "./tools/tools.service";
|
|
16
|
-
const MIN_SPACER_WIDTH = 18;
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export class ToolBarRendererComponent {
|
|
21
|
-
renderer;
|
|
22
|
-
rendererService;
|
|
23
|
-
refreshService;
|
|
24
|
-
toolsService;
|
|
25
|
-
viewContainer;
|
|
26
|
-
tool;
|
|
27
|
-
location;
|
|
28
|
-
resizable;
|
|
29
|
-
rendererClick = new EventEmitter();
|
|
30
|
-
template;
|
|
31
|
-
element;
|
|
32
|
-
get isSpacer() {
|
|
33
|
-
return this.tool && this.tool.__isSpacer;
|
|
34
|
-
}
|
|
35
|
-
refreshSubscription;
|
|
36
|
-
internalComponentRef;
|
|
37
|
-
constructor(renderer, rendererService, refreshService, toolsService, viewContainer) {
|
|
38
|
-
this.renderer = renderer;
|
|
39
|
-
this.rendererService = rendererService;
|
|
40
|
-
this.refreshService = refreshService;
|
|
41
|
-
this.toolsService = toolsService;
|
|
42
|
-
this.viewContainer = viewContainer;
|
|
43
|
-
}
|
|
44
|
-
ngOnInit() {
|
|
45
|
-
this.tool.location = this.location;
|
|
46
|
-
this.element = this.tool.element;
|
|
47
|
-
this.rendererService.element = this.element;
|
|
48
|
-
this.rendererService.renderer = this;
|
|
49
|
-
this.refreshSubscription = this.refreshService.onRefresh.subscribe((tool) => {
|
|
50
|
-
if (this.tool === tool) {
|
|
51
|
-
this.refresh();
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
ngOnDestroy() {
|
|
56
|
-
this.refreshSubscription?.unsubscribe();
|
|
57
|
-
this.internalComponentRef?.removeEventListener('click', this.onClick);
|
|
58
|
-
}
|
|
59
|
-
ngAfterViewInit() {
|
|
60
|
-
const viewContainerRootNodes = this.viewContainer.get(0)?.rootNodes?.filter(isElementOrTextNode);
|
|
61
|
-
if (!viewContainerRootNodes || viewContainerRootNodes.length === 0) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
this.internalComponentRef = viewContainerRootNodes[0];
|
|
65
|
-
this.internalComponentRef.addEventListener('click', this.onClick);
|
|
66
|
-
if (this.resizable) {
|
|
67
|
-
if (this.location === 'toolbar') {
|
|
68
|
-
this.template = this.tool.toolbarTemplate;
|
|
69
|
-
this.hideTool();
|
|
70
|
-
}
|
|
71
|
-
else if (this.location === 'section') {
|
|
72
|
-
this.template = this.tool.toolbarTemplate;
|
|
73
|
-
if (this.tool.isHidden) {
|
|
74
|
-
this.hideTool();
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
|
|
78
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
this.template = this.tool.popupTemplate;
|
|
83
|
-
if (this.tool.isHidden) {
|
|
84
|
-
this.hideTool();
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this.tool.overflows = false;
|
|
93
|
-
this.template = this.tool.toolbarTemplate;
|
|
94
|
-
if (this.tool.isHidden) {
|
|
95
|
-
this.hideTool();
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
|
|
99
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (this.resizable) {
|
|
103
|
-
this.refresh();
|
|
104
|
-
}
|
|
105
|
-
this.updateTools();
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @hidden
|
|
109
|
-
*/
|
|
110
|
-
get width() {
|
|
111
|
-
if (this.isSpacer) {
|
|
112
|
-
return MIN_SPACER_WIDTH;
|
|
113
|
-
}
|
|
114
|
-
if (!this.internalComponentRef) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
return this.tool.overflows ? 0 : outerWidth(this.internalComponentRef);
|
|
118
|
-
}
|
|
119
|
-
isDisplayed() {
|
|
120
|
-
return this.internalComponentRef?.style?.display !== 'none';
|
|
121
|
-
}
|
|
122
|
-
refresh() {
|
|
123
|
-
this.tool.location = this.location;
|
|
124
|
-
if (!isPresent(this.internalComponentRef)) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
if (this.tool.isHidden) {
|
|
128
|
-
this.hideTool();
|
|
129
|
-
}
|
|
130
|
-
else if (this.resizable) {
|
|
131
|
-
if (this.location === 'toolbar') {
|
|
132
|
-
this.renderer.setStyle(this.internalComponentRef, 'visibility', this.tool.visibility);
|
|
133
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.toolbarDisplay);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.overflowDisplay);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
|
|
141
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
|
|
142
|
-
}
|
|
143
|
-
this.updateTools();
|
|
144
|
-
}
|
|
145
|
-
setAttribute(element, attr, value) {
|
|
146
|
-
this.renderer.setAttribute(element, attr, value);
|
|
147
|
-
}
|
|
148
|
-
onClick = (ev) => {
|
|
149
|
-
this.rendererClick.emit({ context: this, event: ev });
|
|
150
|
-
};
|
|
151
|
-
updateTools() {
|
|
152
|
-
this.tool.location = this.location;
|
|
153
|
-
const isInToolbar = this.toolsService.renderedTools.some(t => t.tool === this.tool);
|
|
154
|
-
const isInPopup = this.toolsService.overflowTools.some(t => t.tool === this.tool);
|
|
155
|
-
if (this.location === 'toolbar') {
|
|
156
|
-
isInPopup && (this.toolsService.overflowTools = this.toolsService.overflowTools.filter(t => t.tool !== this.tool));
|
|
157
|
-
!isInToolbar && this.toolsService.renderedTools.push(this);
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
if (!isInPopup) {
|
|
161
|
-
this.toolsService.overflowTools.push(this);
|
|
162
|
-
this.toolsService.overflowTools.sort((t1, t2) => {
|
|
163
|
-
// ensures correct navigation order in Popup
|
|
164
|
-
return this.toolsService.allTools.indexOf(t1.tool) - this.toolsService.allTools.indexOf(t2.tool);
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
hideTool() {
|
|
170
|
-
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
|
|
171
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
|
|
172
|
-
}
|
|
173
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.Renderer2 }, { token: i1.RendererService }, { token: i2.RefreshService }, { token: i3.ToolbarToolsService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
174
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolBarRendererComponent, isStandalone: true, selector: "[kendoToolbarRenderer]", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, providers: [RendererService], ngImport: i0 });
|
|
175
|
-
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarRendererComponent, decorators: [{
|
|
177
|
-
type: Directive,
|
|
178
|
-
args: [{
|
|
179
|
-
providers: [RendererService],
|
|
180
|
-
standalone: true,
|
|
181
|
-
selector: '[kendoToolbarRenderer]'
|
|
182
|
-
}]
|
|
183
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i1.RendererService }, { type: i2.RefreshService }, { type: i3.ToolbarToolsService }, { type: i0.ViewContainerRef }], propDecorators: { tool: [{
|
|
184
|
-
type: Input
|
|
185
|
-
}], location: [{
|
|
186
|
-
type: Input
|
|
187
|
-
}], resizable: [{
|
|
188
|
-
type: Input
|
|
189
|
-
}], rendererClick: [{
|
|
190
|
-
type: Output
|
|
191
|
-
}] } });
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable } from '@angular/core';
|
|
6
|
-
import { findFocusable, findFocusableChild, findFocusableSibling } from './util';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class RendererService {
|
|
12
|
-
element;
|
|
13
|
-
renderer;
|
|
14
|
-
getElement() {
|
|
15
|
-
return this.element.nativeElement;
|
|
16
|
-
}
|
|
17
|
-
querySelector(selector) {
|
|
18
|
-
return this.element.nativeElement.querySelector(selector);
|
|
19
|
-
}
|
|
20
|
-
querySelectorAll(selector) {
|
|
21
|
-
return this.element.nativeElement.querySelectorAll(selector);
|
|
22
|
-
}
|
|
23
|
-
findFocusable() {
|
|
24
|
-
return findFocusable(this.element.nativeElement, false);
|
|
25
|
-
}
|
|
26
|
-
findFocusableChild(element) {
|
|
27
|
-
if (!element) {
|
|
28
|
-
element = this.findFocusable();
|
|
29
|
-
}
|
|
30
|
-
return findFocusableChild(element, false);
|
|
31
|
-
}
|
|
32
|
-
findNextFocusableSibling(element) {
|
|
33
|
-
if (!element) {
|
|
34
|
-
element = this.findFocusable();
|
|
35
|
-
}
|
|
36
|
-
return findFocusableSibling(element, false);
|
|
37
|
-
}
|
|
38
|
-
findPrevFocusableSibling(element) {
|
|
39
|
-
if (!element) {
|
|
40
|
-
element = this.findFocusable();
|
|
41
|
-
}
|
|
42
|
-
return findFocusableSibling(element, false, true);
|
|
43
|
-
}
|
|
44
|
-
setAttribute(element, attr, value) {
|
|
45
|
-
this.renderer.setAttribute(element, attr, value);
|
|
46
|
-
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RendererService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
48
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RendererService });
|
|
49
|
-
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RendererService, decorators: [{
|
|
51
|
-
type: Injectable
|
|
52
|
-
}] });
|