@progress/kendo-angular-toolbar 18.1.0-develop.29 → 18.1.0-develop.3
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/esm2022/localization/messages.mjs +2 -14
- package/esm2022/navigation.service.mjs +3 -5
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/renderer.component.mjs +0 -8
- package/esm2022/toolbar.component.mjs +124 -716
- package/esm2022/tools/toolbar-button.component.mjs +2 -62
- package/esm2022/tools/toolbar-buttongroup.component.mjs +6 -87
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +11 -67
- package/esm2022/tools/toolbar-separator.component.mjs +0 -8
- package/esm2022/tools/toolbar-splitbutton.component.mjs +5 -61
- package/esm2022/tools/toolbar-tool.component.mjs +1 -9
- package/esm2022/tools/tools.service.mjs +0 -3
- package/esm2022/util.mjs +0 -17
- package/fesm2022/progress-kendo-angular-toolbar.mjs +155 -1300
- package/index.d.ts +0 -3
- package/localization/messages.d.ts +2 -10
- package/package.json +9 -9
- package/render-location.d.ts +1 -1
- package/toolbar.component.d.ts +6 -77
- package/tools/toolbar-button.component.d.ts +0 -1
- package/tools/toolbar-buttongroup.component.d.ts +0 -1
- package/tools/toolbar-dropdownbutton.component.d.ts +1 -2
- package/tools/toolbar-splitbutton.component.d.ts +0 -1
- package/tools/toolbar-tool.component.d.ts +0 -6
- package/tools/tools.service.d.ts +0 -1
- package/util.d.ts +0 -5
- package/common/overflow-mode.d.ts +0 -8
- package/common/overflow-settings.d.ts +0 -53
- package/common/scroll-buttons.d.ts +0 -12
- package/esm2022/common/overflow-mode.mjs +0 -5
- package/esm2022/common/overflow-settings.mjs +0 -5
- package/esm2022/common/scroll-buttons.mjs +0 -5
- package/esm2022/scroll.service.mjs +0 -102
- package/esm2022/scrollable-button.component.mjs +0 -162
- package/scroll.service.d.ts +0 -42
- package/scrollable-button.component.d.ts +0 -44
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, HostBinding, Input, Renderer2, NgZone, Output, EventEmitter, HostListener } from '@angular/core';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import { caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
|
-
const DIRECTION_CLASSES = {
|
|
13
|
-
left: 'caret-alt-left',
|
|
14
|
-
right: 'caret-alt-right'
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
export class ToolbarScrollableButtonComponent {
|
|
20
|
-
host;
|
|
21
|
-
renderer;
|
|
22
|
-
ngZone;
|
|
23
|
-
localization;
|
|
24
|
-
get prevClass() {
|
|
25
|
-
return this.prev;
|
|
26
|
-
}
|
|
27
|
-
get nextClass() {
|
|
28
|
-
return !this.prev;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
onMouseDown(ev) {
|
|
34
|
-
ev.preventDefault();
|
|
35
|
-
ev.stopImmediatePropagation();
|
|
36
|
-
}
|
|
37
|
-
role = 'button';
|
|
38
|
-
prev = false;
|
|
39
|
-
overflow;
|
|
40
|
-
onClick = new EventEmitter();
|
|
41
|
-
get iconClass() {
|
|
42
|
-
return this.scrollButtonIconClass;
|
|
43
|
-
}
|
|
44
|
-
get customIconClass() {
|
|
45
|
-
return this.customScrollButtonIconClass;
|
|
46
|
-
}
|
|
47
|
-
get svgIcon() {
|
|
48
|
-
return this.scrollButtonSVGIcon;
|
|
49
|
-
}
|
|
50
|
-
caretAltLeftIcon = caretAltLeftIcon;
|
|
51
|
-
caretAltRightIcon = caretAltRightIcon;
|
|
52
|
-
subs = new Subscription();
|
|
53
|
-
constructor(host, renderer, ngZone, localization) {
|
|
54
|
-
this.host = host;
|
|
55
|
-
this.renderer = renderer;
|
|
56
|
-
this.ngZone = ngZone;
|
|
57
|
-
this.localization = localization;
|
|
58
|
-
}
|
|
59
|
-
ngAfterViewInit() {
|
|
60
|
-
this.ngZone.runOutsideAngular(() => {
|
|
61
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'click', this.clickHandler));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
ngOnDestroy() {
|
|
65
|
-
this.subs.unsubscribe();
|
|
66
|
-
}
|
|
67
|
-
clickHandler = () => {
|
|
68
|
-
const buttonType = this.prev ? 'prev' : 'next';
|
|
69
|
-
this.onClick.emit(buttonType);
|
|
70
|
-
};
|
|
71
|
-
get scrollButtonIconClass() {
|
|
72
|
-
const defaultPrevIcon = !this.localization.rtl ?
|
|
73
|
-
DIRECTION_CLASSES.left :
|
|
74
|
-
DIRECTION_CLASSES.right;
|
|
75
|
-
const defaultNextIcon = !this.localization.rtl ?
|
|
76
|
-
DIRECTION_CLASSES.right :
|
|
77
|
-
DIRECTION_CLASSES.left;
|
|
78
|
-
if (typeof this.overflow === 'object') {
|
|
79
|
-
const prevIcon = typeof this.overflow.prevButtonIcon === 'undefined' ? defaultPrevIcon : '';
|
|
80
|
-
const nextIcon = typeof this.overflow.nextButtonIcon === 'undefined' ? defaultNextIcon : '';
|
|
81
|
-
if (prevIcon && this.prev) {
|
|
82
|
-
return prevIcon;
|
|
83
|
-
}
|
|
84
|
-
else if (nextIcon && !this.prev) {
|
|
85
|
-
return nextIcon;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
get customScrollButtonIconClass() {
|
|
90
|
-
if (typeof this.overflow === 'object') {
|
|
91
|
-
const prevIcon = this.overflow.prevButtonIcon;
|
|
92
|
-
const nextIcon = this.overflow.nextButtonIcon;
|
|
93
|
-
if (prevIcon && this.prev) {
|
|
94
|
-
return `k-icon ${prevIcon}`;
|
|
95
|
-
}
|
|
96
|
-
if (nextIcon && !this.prev) {
|
|
97
|
-
return `k-icon ${nextIcon}`;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
get scrollButtonSVGIcon() {
|
|
102
|
-
const defaultPrevSVGIcon = !this.localization.rtl ?
|
|
103
|
-
this.caretAltLeftIcon :
|
|
104
|
-
this.caretAltRightIcon;
|
|
105
|
-
const defaultNextSVGIcon = !this.localization.rtl ?
|
|
106
|
-
this.caretAltRightIcon :
|
|
107
|
-
this.caretAltLeftIcon;
|
|
108
|
-
if (typeof this.overflow === 'object') {
|
|
109
|
-
const prevIcon = this.overflow.prevSVGButtonIcon !== undefined ? this.overflow.prevSVGButtonIcon : defaultPrevSVGIcon;
|
|
110
|
-
const nextIcon = this.overflow.nextSVGButtonIcon !== undefined ? this.overflow.nextSVGButtonIcon : defaultNextSVGIcon;
|
|
111
|
-
if (prevIcon || nextIcon) {
|
|
112
|
-
return this.prev ? prevIcon : nextIcon;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarScrollableButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarScrollableButtonComponent, isStandalone: true, selector: "[kendoToolbarScrollableButton]", inputs: { prev: "prev", overflow: "overflow" }, outputs: { onClick: "onClick" }, host: { listeners: { "mousedown": "onMouseDown($event)" }, properties: { "class.k-toolbar-prev": "this.prevClass", "class.k-toolbar-next": "this.nextClass", "attr.role": "this.role" } }, ngImport: i0, template: `
|
|
118
|
-
<kendo-icon-wrapper
|
|
119
|
-
[name]="iconClass"
|
|
120
|
-
[customFontClass]="customIconClass"
|
|
121
|
-
[svgIcon]="svgIcon"
|
|
122
|
-
innerCssClass="k-button-icon"
|
|
123
|
-
>
|
|
124
|
-
</kendo-icon-wrapper>
|
|
125
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
126
|
-
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarScrollableButtonComponent, decorators: [{
|
|
128
|
-
type: Component,
|
|
129
|
-
args: [{
|
|
130
|
-
template: `
|
|
131
|
-
<kendo-icon-wrapper
|
|
132
|
-
[name]="iconClass"
|
|
133
|
-
[customFontClass]="customIconClass"
|
|
134
|
-
[svgIcon]="svgIcon"
|
|
135
|
-
innerCssClass="k-button-icon"
|
|
136
|
-
>
|
|
137
|
-
</kendo-icon-wrapper>
|
|
138
|
-
`,
|
|
139
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
140
|
-
selector: '[kendoToolbarScrollableButton]',
|
|
141
|
-
standalone: true,
|
|
142
|
-
imports: [IconWrapperComponent]
|
|
143
|
-
}]
|
|
144
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { prevClass: [{
|
|
145
|
-
type: HostBinding,
|
|
146
|
-
args: ['class.k-toolbar-prev']
|
|
147
|
-
}], nextClass: [{
|
|
148
|
-
type: HostBinding,
|
|
149
|
-
args: ['class.k-toolbar-next']
|
|
150
|
-
}], onMouseDown: [{
|
|
151
|
-
type: HostListener,
|
|
152
|
-
args: ['mousedown', ['$event']]
|
|
153
|
-
}], role: [{
|
|
154
|
-
type: HostBinding,
|
|
155
|
-
args: ['attr.role']
|
|
156
|
-
}], prev: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], overflow: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], onClick: [{
|
|
161
|
-
type: Output
|
|
162
|
-
}] } });
|
package/scroll.service.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgZone } from '@angular/core';
|
|
6
|
-
import { Subject } from 'rxjs';
|
|
7
|
-
import { ToolBarComponent } from './toolbar.component';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export type ScrollButtonActiveStateChange = {
|
|
14
|
-
buttonType: string;
|
|
15
|
-
active: boolean;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export type ScrollButtonType = 'prev' | 'next';
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export declare class ScrollService {
|
|
25
|
-
private ngZone;
|
|
26
|
-
private localization;
|
|
27
|
-
owner: ToolBarComponent;
|
|
28
|
-
position: number;
|
|
29
|
-
scrollButtonActiveStateChange: Subject<ScrollButtonActiveStateChange>;
|
|
30
|
-
get scrollElement(): HTMLElement;
|
|
31
|
-
get scrollContainerOverflowSize(): number;
|
|
32
|
-
get toolsOverflow(): boolean;
|
|
33
|
-
constructor(ngZone: NgZone, localization: LocalizationService);
|
|
34
|
-
toggleScrollButtonsState(): void;
|
|
35
|
-
onScroll(e: Event): void;
|
|
36
|
-
scrollTools(direction: string): void;
|
|
37
|
-
calculateListPosition(direction: string, scrollSpeed: number): void;
|
|
38
|
-
private toggleButtonActiveState;
|
|
39
|
-
private isDisabled;
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollService, never>;
|
|
41
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ScrollService>;
|
|
42
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ElementRef, Renderer2, NgZone, AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
6
|
-
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { ToolbarOverflowSettings } from './common/overflow-settings';
|
|
9
|
-
import { ScrollButtonType } from './scroll.service';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export declare class ToolbarScrollableButtonComponent implements AfterViewInit, OnDestroy {
|
|
15
|
-
host: ElementRef;
|
|
16
|
-
private renderer;
|
|
17
|
-
private ngZone;
|
|
18
|
-
private localization;
|
|
19
|
-
get prevClass(): boolean;
|
|
20
|
-
get nextClass(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
onMouseDown(ev: any): void;
|
|
25
|
-
role: string;
|
|
26
|
-
prev: boolean;
|
|
27
|
-
overflow: ToolbarOverflowSettings;
|
|
28
|
-
onClick: EventEmitter<ScrollButtonType>;
|
|
29
|
-
get iconClass(): string;
|
|
30
|
-
get customIconClass(): string;
|
|
31
|
-
get svgIcon(): SVGIcon;
|
|
32
|
-
caretAltLeftIcon: SVGIcon;
|
|
33
|
-
caretAltRightIcon: SVGIcon;
|
|
34
|
-
private subs;
|
|
35
|
-
constructor(host: ElementRef, renderer: Renderer2, ngZone: NgZone, localization: LocalizationService);
|
|
36
|
-
ngAfterViewInit(): void;
|
|
37
|
-
ngOnDestroy(): void;
|
|
38
|
-
private clickHandler;
|
|
39
|
-
private get scrollButtonIconClass();
|
|
40
|
-
private get customScrollButtonIconClass();
|
|
41
|
-
private get scrollButtonSVGIcon();
|
|
42
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarScrollableButtonComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarScrollableButtonComponent, "[kendoToolbarScrollableButton]", never, { "prev": { "alias": "prev"; "required": false; }; "overflow": { "alias": "overflow"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
44
|
-
}
|