@progress/kendo-angular-navigation 21.4.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.
Files changed (58) hide show
  1. package/fesm2022/progress-kendo-angular-navigation.mjs +83 -83
  2. package/package.json +11 -19
  3. package/esm2022/actionsheet/actionsheet-view.component.mjs +0 -173
  4. package/esm2022/actionsheet/actionsheet.component.mjs +0 -700
  5. package/esm2022/actionsheet/animation/animations.mjs +0 -23
  6. package/esm2022/actionsheet/item.component.mjs +0 -125
  7. package/esm2022/actionsheet/list.component.mjs +0 -95
  8. package/esm2022/actionsheet/models/actionsheet-action-layout.mjs +0 -5
  9. package/esm2022/actionsheet/models/actionsheet-action.mjs +0 -5
  10. package/esm2022/actionsheet/models/actionsheet-item.interface.mjs +0 -5
  11. package/esm2022/actionsheet/models/animation.mjs +0 -5
  12. package/esm2022/actionsheet/models/group.mjs +0 -5
  13. package/esm2022/actionsheet/models/index.mjs +0 -10
  14. package/esm2022/actionsheet/models/item-click.event.mjs +0 -19
  15. package/esm2022/actionsheet/templates/actionsheet-template.mjs +0 -37
  16. package/esm2022/actionsheet/templates/content-template.directive.mjs +0 -37
  17. package/esm2022/actionsheet/templates/footer-template.directive.mjs +0 -37
  18. package/esm2022/actionsheet/templates/header-template.directive.mjs +0 -37
  19. package/esm2022/actionsheet/templates/item-template.directive.mjs +0 -37
  20. package/esm2022/actionsheet.module.mjs +0 -48
  21. package/esm2022/appbar/appbar-section.component.mjs +0 -40
  22. package/esm2022/appbar/appbar-spacer.component.mjs +0 -69
  23. package/esm2022/appbar/appbar.component.mjs +0 -158
  24. package/esm2022/appbar/models/position-mode.mjs +0 -5
  25. package/esm2022/appbar/models/position.mjs +0 -5
  26. package/esm2022/appbar/models/theme-color.mjs +0 -5
  27. package/esm2022/appbar.module.mjs +0 -42
  28. package/esm2022/bottomnavigation/bottomnavigation-item.component.mjs +0 -122
  29. package/esm2022/bottomnavigation/bottomnavigation.component.mjs +0 -334
  30. package/esm2022/bottomnavigation/constants.mjs +0 -12
  31. package/esm2022/bottomnavigation/events/select-event.mjs +0 -33
  32. package/esm2022/bottomnavigation/templates/item-template.directive.mjs +0 -36
  33. package/esm2022/bottomnavigation/types/bottomnavigation-fill.mjs +0 -5
  34. package/esm2022/bottomnavigation/types/bottomnavigation-item-flow.mjs +0 -5
  35. package/esm2022/bottomnavigation/types/bottomnavigation-item.mjs +0 -5
  36. package/esm2022/bottomnavigation/types/bottomnavigation-position-mode.mjs +0 -5
  37. package/esm2022/bottomnavigation/types/bottomnavigation-theme-color.mjs +0 -20
  38. package/esm2022/bottomnavigation.module.mjs +0 -43
  39. package/esm2022/breadcrumb/breadcrumb-item.component.mjs +0 -186
  40. package/esm2022/breadcrumb/breadcrumb.component.mjs +0 -362
  41. package/esm2022/breadcrumb/list.component.mjs +0 -107
  42. package/esm2022/breadcrumb/models/breadcrumb-item.interface.mjs +0 -5
  43. package/esm2022/breadcrumb/models/breadcrumb-size.mjs +0 -5
  44. package/esm2022/breadcrumb/models/collapse-mode.mjs +0 -5
  45. package/esm2022/breadcrumb/models/constants.mjs +0 -33
  46. package/esm2022/breadcrumb/template-directives/item-template.directive.mjs +0 -40
  47. package/esm2022/breadcrumb/template-directives/separator.directive.mjs +0 -108
  48. package/esm2022/breadcrumb/util.mjs +0 -22
  49. package/esm2022/breadcrumb.module.mjs +0 -44
  50. package/esm2022/common/direction.mjs +0 -5
  51. package/esm2022/common/dom-queries.mjs +0 -22
  52. package/esm2022/common/preventable-event.mjs +0 -34
  53. package/esm2022/common/util.mjs +0 -63
  54. package/esm2022/directives.mjs +0 -146
  55. package/esm2022/index.mjs +0 -27
  56. package/esm2022/navigation.module.mjs +0 -56
  57. package/esm2022/package-metadata.mjs +0 -16
  58. package/esm2022/progress-kendo-angular-navigation.mjs +0 -8
@@ -1,186 +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, Input, ElementRef, TemplateRef, HostBinding } from '@angular/core';
6
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
- import { outerWidth } from '../common/util';
8
- import { IconWrapperComponent } from '@progress/kendo-angular-icons';
9
- import { NgTemplateOutlet, NgClass } from '@angular/common';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * @hidden
13
- */
14
- export class BreadCrumbItemComponent {
15
- el;
16
- item;
17
- collapseMode;
18
- index = -1;
19
- itemTemplate;
20
- hostClasses = true;
21
- get isRootItem() {
22
- return this.item.context.isFirst;
23
- }
24
- get isDisabled() {
25
- return this.disabled || null;
26
- }
27
- get isLastItem() {
28
- return this.item.context.isLast;
29
- }
30
- width;
31
- disabled = false;
32
- constructor(el) {
33
- this.el = el;
34
- }
35
- ngOnInit() {
36
- this.disabled = this.item.data && (this.item.data.disabled || this.item.context.isLast);
37
- }
38
- ngAfterViewInit() {
39
- if (isDocumentAvailable()) {
40
- this.width = outerWidth(this.el.nativeElement);
41
- }
42
- }
43
- onImageLoad() {
44
- if (isDocumentAvailable()) {
45
- this.width = outerWidth(this.el.nativeElement);
46
- }
47
- }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadCrumbItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
49
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BreadCrumbItemComponent, isStandalone: true, selector: "[kendoBreadCrumbItem]", inputs: { item: "item", collapseMode: "collapseMode", index: "index", itemTemplate: "itemTemplate" }, host: { properties: { "class.k-breadcrumb-item": "this.hostClasses", "class.k-breadcrumb-root-item": "this.isRootItem", "attr.aria-disabled": "this.isDisabled", "class.k-breadcrumb-last-item": "this.isLastItem" } }, ngImport: i0, template: `
50
- <ng-template #separator>
51
- <ng-content select="[kendoBreadCrumbSeparator]"></ng-content>
52
- </ng-template>
53
-
54
- @if (collapseMode === 'wrap') {
55
- <ng-container *ngTemplateOutlet="separator"></ng-container>
56
- }
57
-
58
- @if (!item.context.collapsed) {
59
- @if (!itemTemplate) {
60
- <span
61
- [ngClass]="{
62
- 'k-breadcrumb-root-link': item.context.isFirst,
63
- 'k-breadcrumb-link': index !== 0,
64
- 'k-breadcrumb-icontext-link': (!!item.data.icon || !!item.data.svgIcon) && !!item.data.text,
65
- 'k-breadcrumb-icon-link': (!!item.data.icon || !!item.data.svgIcon) && !item.data.text,
66
- 'k-disabled': disabled
67
- }"
68
- [title]="item.data.title || ''"
69
- [tabindex]="disabled ? -1 : 0"
70
- [attr.aria-disabled]="disabled"
71
- [attr.aria-current]="item.context.isLast ? 'page' : null"
72
- role="link"
73
- >
74
- @if (item.data.imageUrl) {
75
- <img (load)="onImageLoad()" [src]="item.data.imageUrl" class="k-image" role="presentation" />
76
- }
77
- @if (item.data.icon || item.data.iconClass || item.data.svgIcon) {
78
- <kendo-icon-wrapper
79
- [name]="item.data.icon"
80
- [customFontClass]="item.data.iconClass"
81
- [svgIcon]="item.data.svgIcon"
82
- >
83
- </kendo-icon-wrapper>
84
- }
85
- <span class="k-breadcrumb-item-text">{{ item.data.text }}</span>
86
- </span>
87
- }
88
- @if (itemTemplate) {
89
- <ng-template
90
- [ngTemplateOutlet]="itemTemplate"
91
- [ngTemplateOutletContext]="{
92
- $implicit: item.data,
93
- index: index
94
- }"
95
- ></ng-template>
96
- }
97
- }
98
-
99
- @if (collapseMode !== 'wrap') {
100
- <ng-container *ngTemplateOutlet="separator"></ng-container>
101
- }
102
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
103
- }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadCrumbItemComponent, decorators: [{
105
- type: Component,
106
- args: [{
107
- // eslint-disable-next-line @angular-eslint/component-selector
108
- selector: '[kendoBreadCrumbItem]',
109
- template: `
110
- <ng-template #separator>
111
- <ng-content select="[kendoBreadCrumbSeparator]"></ng-content>
112
- </ng-template>
113
-
114
- @if (collapseMode === 'wrap') {
115
- <ng-container *ngTemplateOutlet="separator"></ng-container>
116
- }
117
-
118
- @if (!item.context.collapsed) {
119
- @if (!itemTemplate) {
120
- <span
121
- [ngClass]="{
122
- 'k-breadcrumb-root-link': item.context.isFirst,
123
- 'k-breadcrumb-link': index !== 0,
124
- 'k-breadcrumb-icontext-link': (!!item.data.icon || !!item.data.svgIcon) && !!item.data.text,
125
- 'k-breadcrumb-icon-link': (!!item.data.icon || !!item.data.svgIcon) && !item.data.text,
126
- 'k-disabled': disabled
127
- }"
128
- [title]="item.data.title || ''"
129
- [tabindex]="disabled ? -1 : 0"
130
- [attr.aria-disabled]="disabled"
131
- [attr.aria-current]="item.context.isLast ? 'page' : null"
132
- role="link"
133
- >
134
- @if (item.data.imageUrl) {
135
- <img (load)="onImageLoad()" [src]="item.data.imageUrl" class="k-image" role="presentation" />
136
- }
137
- @if (item.data.icon || item.data.iconClass || item.data.svgIcon) {
138
- <kendo-icon-wrapper
139
- [name]="item.data.icon"
140
- [customFontClass]="item.data.iconClass"
141
- [svgIcon]="item.data.svgIcon"
142
- >
143
- </kendo-icon-wrapper>
144
- }
145
- <span class="k-breadcrumb-item-text">{{ item.data.text }}</span>
146
- </span>
147
- }
148
- @if (itemTemplate) {
149
- <ng-template
150
- [ngTemplateOutlet]="itemTemplate"
151
- [ngTemplateOutletContext]="{
152
- $implicit: item.data,
153
- index: index
154
- }"
155
- ></ng-template>
156
- }
157
- }
158
-
159
- @if (collapseMode !== 'wrap') {
160
- <ng-container *ngTemplateOutlet="separator"></ng-container>
161
- }
162
- `,
163
- standalone: true,
164
- imports: [NgTemplateOutlet, NgClass, IconWrapperComponent]
165
- }]
166
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { item: [{
167
- type: Input
168
- }], collapseMode: [{
169
- type: Input
170
- }], index: [{
171
- type: Input
172
- }], itemTemplate: [{
173
- type: Input
174
- }], hostClasses: [{
175
- type: HostBinding,
176
- args: ['class.k-breadcrumb-item']
177
- }], isRootItem: [{
178
- type: HostBinding,
179
- args: ['class.k-breadcrumb-root-item']
180
- }], isDisabled: [{
181
- type: HostBinding,
182
- args: ['attr.aria-disabled']
183
- }], isLastItem: [{
184
- type: HostBinding,
185
- args: ['class.k-breadcrumb-last-item']
186
- }] } });
@@ -1,362 +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
- /* eslint-disable @typescript-eslint/no-inferrable-types */
6
- /* eslint-disable @typescript-eslint/no-explicit-any */
7
- import { Component, ContentChild, Input, Output, EventEmitter, ViewChild, HostBinding, ElementRef, ChangeDetectorRef, NgZone, ViewChildren, QueryList, isDevMode, Renderer2 } from '@angular/core';
8
- import { Subscription, ReplaySubject, merge, Subject } from 'rxjs';
9
- import { filter, map, share, startWith } from 'rxjs/operators';
10
- import { ResizeSensorComponent, isDocumentAvailable } from '@progress/kendo-angular-common';
11
- import { validatePackage } from '@progress/kendo-licensing';
12
- import { packageMetadata } from '../package-metadata';
13
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
14
- import { BreadCrumbItemTemplateDirective } from './template-directives/item-template.directive';
15
- import { outerWidth } from '../common/util';
16
- import { BreadCrumbListComponent } from './list.component';
17
- import { collapsed, expanded, collapseFirst, expandFirst } from './util';
18
- import { DEFAULT_SIZE, getStylingClasses } from './models/constants';
19
- import { NgClass, AsyncPipe } from '@angular/common';
20
- import * as i0 from "@angular/core";
21
- import * as i1 from "@progress/kendo-angular-l10n";
22
- /**
23
- * Represents the [Kendo UI Breadcrumb component for Angular](slug:overview_breadcrumb).
24
- *
25
- * Use the Breadcrumb component to allow users to navigate through a hierarchical structure. The component automatically handles overflow
26
- * scenarios and supports customizable separators, templates, and collapse modes.
27
- *
28
- * @example
29
- * ```typescript
30
- * @Component({
31
- * selector: 'my-app',
32
- * template: `
33
- * <kendo-breadcrumb
34
- * [items]="items"
35
- * (itemClick)="onItemClick($event)">
36
- * </kendo-breadcrumb>
37
- * `
38
- * })
39
- * class AppComponent {
40
- * public items: BreadCrumbItem[] = [
41
- * { text: 'Home', title: 'Home', icon: 'home' },
42
- * { text: 'Kids', title: 'Kids' },
43
- * { text: '8y-16y', title: '8y-16y', disabled: true },
44
- * { text: 'New collection', title: 'New collection' },
45
- * { text: 'Jeans', title: 'Jeans' }
46
- * ];
47
- *
48
- * public onItemClick(item: BreadCrumbItem): void {
49
- * console.log(item);
50
- * }
51
- * }
52
- * ```
53
- */
54
- export class BreadCrumbComponent {
55
- localization;
56
- el;
57
- cdr;
58
- zone;
59
- renderer;
60
- /**
61
- * Configures the collection of items that will be rendered in the Breadcrumb.
62
- */
63
- set items(items) {
64
- this._items = items || [];
65
- this.updateItems.next(this._items);
66
- }
67
- get items() {
68
- return this._items;
69
- }
70
- /**
71
- * Specifies the name of a [built-in font icon](slug:icon_list) in a Kendo UI theme to be rendered as a separator.
72
- */
73
- separatorIcon;
74
- /**
75
- * Defines an [`SVGIcon`](slug:api_icons_svgicon) to be rendered as a separator.
76
- */
77
- separatorSVGIcon;
78
- /**
79
- * Controls the collapse mode of the Breadcrumb.
80
- * For more information and example, refer to the [Collapse Modes]({% slug collapse_modes_breadcrumb %}) article.
81
- *
82
- * @default `auto`
83
- */
84
- set collapseMode(mode) {
85
- if (isDevMode() && ['auto', 'wrap', 'none'].indexOf(mode) < 0) {
86
- throw new Error('Invalid collapse mode. Allowed values are "auto", "wrap" or "none". \nFor more details see https://www.telerik.com/kendo-angular-ui/components/navigation/api/BreadCrumbCollapseMode/');
87
- }
88
- this._collapseMode = mode || 'auto';
89
- this.updateItems.next(this.items);
90
- }
91
- get collapseMode() {
92
- return this._collapseMode;
93
- }
94
- /**
95
- * Determines the padding of all Breadcrumb elements.
96
- *
97
- * @default `medium`
98
- */
99
- set size(size) {
100
- const newSize = size ? size : DEFAULT_SIZE;
101
- this.handleClasses(newSize, 'size');
102
- this._size = newSize;
103
- }
104
- get size() {
105
- return this._size;
106
- }
107
- /**
108
- * Fires when you click a Breadcrumb item. The event will not be fired by disabled items and the last item.
109
- */
110
- itemClick = new EventEmitter();
111
- /**
112
- * @hidden
113
- */
114
- resizeSensor;
115
- /**
116
- * @hidden
117
- */
118
- itemsContainers;
119
- /**
120
- * @hidden
121
- */
122
- listComponent;
123
- /**
124
- * @hidden
125
- */
126
- itemTemplate;
127
- hostClasses = true;
128
- get wrapMode() {
129
- return this.collapseMode === 'wrap';
130
- }
131
- hostAriaLabel = 'Breadcrumb';
132
- get getDir() {
133
- return this.direction;
134
- }
135
- itemsData$;
136
- firstItem$;
137
- _items = [];
138
- _collapseMode = 'auto';
139
- _size = DEFAULT_SIZE;
140
- updateItems = new ReplaySubject();
141
- afterViewInit = new Subject();
142
- subscriptions = new Subscription();
143
- direction = 'ltr';
144
- constructor(localization, el, cdr, zone, renderer) {
145
- this.localization = localization;
146
- this.el = el;
147
- this.cdr = cdr;
148
- this.zone = zone;
149
- this.renderer = renderer;
150
- validatePackage(packageMetadata);
151
- const updateItems$ = this.updateItems.asObservable().pipe(startWith([]));
152
- this.direction = localization.rtl ? 'rtl' : 'ltr';
153
- this.itemsData$ = updateItems$.pipe(map(items => items.filter(Boolean)), map(items => items.map((item, index, collection) => ({
154
- context: {
155
- collapsed: false,
156
- isLast: index === collection.length - 1,
157
- isFirst: index === 0
158
- },
159
- data: item
160
- }))), share());
161
- this.firstItem$ = updateItems$.pipe(map(items => {
162
- if (items.length > 0) {
163
- return [
164
- {
165
- context: {
166
- collapsed: false,
167
- isLast: items.length === 1,
168
- isFirst: true
169
- },
170
- data: items[0]
171
- }
172
- ];
173
- }
174
- return [];
175
- }), share());
176
- }
177
- ngOnInit() {
178
- this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
179
- this.handleClasses(this.size, 'size');
180
- }
181
- ngAfterViewInit() {
182
- this.attachResizeHandler();
183
- this.afterViewInit.next(undefined);
184
- }
185
- ngOnDestroy() {
186
- this.subscriptions.unsubscribe();
187
- }
188
- handleResize() {
189
- const autoCollapseCandidates = [
190
- ...this.listComponent.renderedItems.toArray().filter(ri => !ri.item.context.isFirst && !ri.item.context.isLast)
191
- ];
192
- const componentWidth = Math.floor(outerWidth(this.el.nativeElement));
193
- const itemsContainerWidth = Math.round(this.itemsContainers
194
- .toArray()
195
- .map(el => outerWidth(el.nativeElement))
196
- .reduce((acc, curr) => acc + curr, 0));
197
- const nextExpandWidth = Math.ceil(([...autoCollapseCandidates].reverse().find(collapsed) || { width: 0 }).width);
198
- // // shrink
199
- if (componentWidth <= itemsContainerWidth && autoCollapseCandidates.find(expanded)) {
200
- collapseFirst(autoCollapseCandidates);
201
- // needed by resize sensor
202
- this.cdr.detectChanges();
203
- return this.handleResize();
204
- }
205
- // expand
206
- if (componentWidth > itemsContainerWidth + nextExpandWidth && autoCollapseCandidates.find(collapsed)) {
207
- expandFirst([...autoCollapseCandidates].reverse());
208
- // needed by resize sensor
209
- this.cdr.detectChanges();
210
- return this.handleResize();
211
- }
212
- }
213
- shouldResize() {
214
- return isDocumentAvailable() && this.collapseMode === 'auto';
215
- }
216
- attachResizeHandler() {
217
- // resize when:
218
- // the component is initialized
219
- // the container is resized
220
- // items are added/removed
221
- this.subscriptions.add(merge(this.resizeSensor.resize, this.itemsData$, this.afterViewInit.asObservable())
222
- .pipe(filter(() => this.shouldResize()))
223
- .subscribe(() => {
224
- this.resizeHandler();
225
- }));
226
- }
227
- handleClasses(value, input) {
228
- const elem = this.el.nativeElement;
229
- const classes = getStylingClasses(input, this[input], value);
230
- if (classes.toRemove) {
231
- this.renderer.removeClass(elem, classes.toRemove);
232
- }
233
- if (classes.toAdd) {
234
- this.renderer.addClass(elem, classes.toAdd);
235
- }
236
- }
237
- resizeHandler = () => {
238
- this.zone.runOutsideAngular(() => setTimeout(() => {
239
- this.zone.run(() => {
240
- if (this.listComponent) {
241
- this.handleResize();
242
- this.resizeSensor.acceptSize();
243
- }
244
- });
245
- }));
246
- };
247
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadCrumbComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
248
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BreadCrumbComponent, isStandalone: true, selector: "kendo-breadcrumb", inputs: { items: "items", separatorIcon: "separatorIcon", separatorSVGIcon: "separatorSVGIcon", collapseMode: "collapseMode", size: "size" }, outputs: { itemClick: "itemClick" }, host: { properties: { "class.k-breadcrumb": "this.hostClasses", "class.k-breadcrumb-wrap": "this.wrapMode", "attr.aria-label": "this.hostAriaLabel", "attr.dir": "this.getDir" } }, providers: [
249
- LocalizationService,
250
- {
251
- provide: L10N_PREFIX,
252
- useValue: 'kendo.breadcrumb'
253
- }
254
- ], queries: [{ propertyName: "itemTemplate", first: true, predicate: BreadCrumbItemTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true, static: true }, { propertyName: "listComponent", first: true, predicate: BreadCrumbListComponent, descendants: true, static: true }, { propertyName: "itemsContainers", predicate: ["itemsContainer"], descendants: true, read: ElementRef }], exportAs: ["kendoBreadCrumb"], ngImport: i0, template: `
255
- @if (collapseMode === 'wrap') {
256
- <ol
257
- #itemsContainer
258
- kendoBreadCrumbList
259
- class="k-breadcrumb-root-item-container"
260
- [items]="firstItem$ | async"
261
- [itemTemplate]="itemTemplate?.templateRef"
262
- [collapseMode]="collapseMode"
263
- [separatorIcon]="separatorIcon"
264
- [separatorSVGIcon]="separatorSVGIcon"
265
- (itemClick)="itemClick.emit($event)"
266
- ></ol>
267
- }
268
- <ol
269
- #itemsContainer
270
- kendoBreadCrumbList
271
- class="k-breadcrumb-container"
272
- [items]="itemsData$ | async"
273
- [itemTemplate]="itemTemplate?.templateRef"
274
- [collapseMode]="collapseMode"
275
- [separatorIcon]="separatorIcon"
276
- [separatorSVGIcon]="separatorSVGIcon"
277
- (itemClick)="itemClick.emit($event)"
278
- [ngClass]="{ '!k-flex-wrap': collapseMode === 'wrap', 'k-flex-none': collapseMode === 'none' }"
279
- ></ol>
280
- <kendo-resize-sensor [rateLimit]="1000" #resizeSensor></kendo-resize-sensor>
281
- `, isInline: true, dependencies: [{ kind: "component", type: BreadCrumbListComponent, selector: "[kendoBreadCrumbList]", inputs: ["items", "itemTemplate", "collapseMode", "separatorIcon", "separatorSVGIcon"], outputs: ["itemClick"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
282
- }
283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadCrumbComponent, decorators: [{
284
- type: Component,
285
- args: [{
286
- exportAs: 'kendoBreadCrumb',
287
- selector: 'kendo-breadcrumb',
288
- providers: [
289
- LocalizationService,
290
- {
291
- provide: L10N_PREFIX,
292
- useValue: 'kendo.breadcrumb'
293
- }
294
- ],
295
- template: `
296
- @if (collapseMode === 'wrap') {
297
- <ol
298
- #itemsContainer
299
- kendoBreadCrumbList
300
- class="k-breadcrumb-root-item-container"
301
- [items]="firstItem$ | async"
302
- [itemTemplate]="itemTemplate?.templateRef"
303
- [collapseMode]="collapseMode"
304
- [separatorIcon]="separatorIcon"
305
- [separatorSVGIcon]="separatorSVGIcon"
306
- (itemClick)="itemClick.emit($event)"
307
- ></ol>
308
- }
309
- <ol
310
- #itemsContainer
311
- kendoBreadCrumbList
312
- class="k-breadcrumb-container"
313
- [items]="itemsData$ | async"
314
- [itemTemplate]="itemTemplate?.templateRef"
315
- [collapseMode]="collapseMode"
316
- [separatorIcon]="separatorIcon"
317
- [separatorSVGIcon]="separatorSVGIcon"
318
- (itemClick)="itemClick.emit($event)"
319
- [ngClass]="{ '!k-flex-wrap': collapseMode === 'wrap', 'k-flex-none': collapseMode === 'none' }"
320
- ></ol>
321
- <kendo-resize-sensor [rateLimit]="1000" #resizeSensor></kendo-resize-sensor>
322
- `,
323
- standalone: true,
324
- imports: [BreadCrumbListComponent, NgClass, ResizeSensorComponent, AsyncPipe]
325
- }]
326
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { items: [{
327
- type: Input
328
- }], separatorIcon: [{
329
- type: Input
330
- }], separatorSVGIcon: [{
331
- type: Input
332
- }], collapseMode: [{
333
- type: Input
334
- }], size: [{
335
- type: Input
336
- }], itemClick: [{
337
- type: Output
338
- }], resizeSensor: [{
339
- type: ViewChild,
340
- args: ['resizeSensor', { static: true }]
341
- }], itemsContainers: [{
342
- type: ViewChildren,
343
- args: ['itemsContainer', { read: ElementRef }]
344
- }], listComponent: [{
345
- type: ViewChild,
346
- args: [BreadCrumbListComponent, { static: true }]
347
- }], itemTemplate: [{
348
- type: ContentChild,
349
- args: [BreadCrumbItemTemplateDirective]
350
- }], hostClasses: [{
351
- type: HostBinding,
352
- args: ['class.k-breadcrumb']
353
- }], wrapMode: [{
354
- type: HostBinding,
355
- args: ['class.k-breadcrumb-wrap']
356
- }], hostAriaLabel: [{
357
- type: HostBinding,
358
- args: ['attr.aria-label']
359
- }], getDir: [{
360
- type: HostBinding,
361
- args: ['attr.dir']
362
- }] } });
@@ -1,107 +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, Output, Input, EventEmitter, TemplateRef, ViewChildren, QueryList, ElementRef, NgZone } from '@angular/core';
6
- import { fromEvent, merge } from 'rxjs';
7
- import { filter, map } from 'rxjs/operators';
8
- import { Keys } from '@progress/kendo-angular-common';
9
- import { BREADCRUMB_ITEM_INDEX } from './models/constants';
10
- import { BreadCrumbItemComponent } from './breadcrumb-item.component';
11
- import { closestItem, itemIndex } from '../common/dom-queries';
12
- import { isPresent } from '../common/util';
13
- import { BreadCrumbSeparatorDirective } from './template-directives/separator.directive';
14
- import * as i0 from "@angular/core";
15
- /**
16
- * @hidden
17
- */
18
- export class BreadCrumbListComponent {
19
- el;
20
- zone;
21
- items = [];
22
- itemTemplate;
23
- collapseMode = 'auto';
24
- separatorIcon;
25
- separatorSVGIcon;
26
- itemClick = new EventEmitter();
27
- renderedItems;
28
- isRootItemContainer;
29
- domEventsSubscription;
30
- constructor(el, zone) {
31
- this.el = el;
32
- this.zone = zone;
33
- const element = this.el.nativeElement;
34
- this.isRootItemContainer = element.classList.contains('k-breadcrumb-root-item-container');
35
- this.zone.runOutsideAngular(() => {
36
- const click$ = fromEvent(element, 'click');
37
- const enterKey$ = fromEvent(element, 'keydown').pipe(filter((ev) => ev.code === Keys.Enter || ev.code === Keys.NumpadEnter));
38
- this.domEventsSubscription = merge(click$, enterKey$)
39
- .pipe(map((ev) => ev.target), filter(e => !e.classList.contains('k-breadcrumb-delimiter-icon')), // do not trigger handler when a separator is clicked
40
- map(e => this.getItemIndex(e)), filter(isPresent), map(i => parseInt(i, 10)), map(i => this.items[i]), filter(item => !item.data.disabled && !item.context.isLast), map(item => item.data))
41
- .subscribe(el => {
42
- this.zone.run(() => this.itemClick.emit(el));
43
- });
44
- });
45
- }
46
- ngOnDestroy() {
47
- this.domEventsSubscription.unsubscribe();
48
- }
49
- getItemIndex(target) {
50
- const item = closestItem(target, BREADCRUMB_ITEM_INDEX, this.el.nativeElement);
51
- if (item) {
52
- return itemIndex(item, BREADCRUMB_ITEM_INDEX);
53
- }
54
- }
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadCrumbListComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
56
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BreadCrumbListComponent, isStandalone: true, selector: "[kendoBreadCrumbList]", inputs: { items: "items", itemTemplate: "itemTemplate", collapseMode: "collapseMode", separatorIcon: "separatorIcon", separatorSVGIcon: "separatorSVGIcon" }, outputs: { itemClick: "itemClick" }, viewQueries: [{ propertyName: "renderedItems", predicate: BreadCrumbItemComponent, descendants: true }], ngImport: i0, template: "\n @for (item of items; track item; let i = $index; let isFirst = $first; let isLast = $last) {\n @if (!(collapseMode === 'wrap' && isFirst) || isRootItemContainer) {\n <li\n #renderedItem\n kendoBreadCrumbItem\n [attr.data-kendo-breadcrumb-index]=\"i\"\n [item]=\"item\"\n [index]=\"i\"\n [collapseMode]=\"collapseMode\"\n [itemTemplate]=\"itemTemplate\"\n >\n @if (collapseMode === 'wrap' && !isFirst) {\n <span kendoBreadCrumbSeparator [icon]=\"separatorIcon\" [svgIcon]=\"separatorSVGIcon\"></span>\n }\n @if (collapseMode !== 'wrap' && !isLast && !(item?.context.collapsed && items[i + 1]?.context.collapsed)) {\n <span\n kendoBreadCrumbSeparator\n [icon]=\"separatorIcon\"\n [svgIcon]=\"separatorSVGIcon\"\n ></span>\n }\n </li>\n }\n }\n ", isInline: true, dependencies: [{ kind: "component", type: BreadCrumbItemComponent, selector: "[kendoBreadCrumbItem]", inputs: ["item", "collapseMode", "index", "itemTemplate"] }, { kind: "component", type: BreadCrumbSeparatorDirective, selector: "[kendoBreadCrumbSeparator]", inputs: ["icon", "svgIcon"] }] });
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadCrumbListComponent, decorators: [{
59
- type: Component,
60
- args: [{
61
- // eslint-disable-next-line @angular-eslint/component-selector
62
- selector: '[kendoBreadCrumbList]',
63
- template: `
64
- @for (item of items; track item; let i = $index; let isFirst = $first; let isLast = $last) {
65
- @if (!(collapseMode === 'wrap' && isFirst) || isRootItemContainer) {
66
- <li
67
- #renderedItem
68
- kendoBreadCrumbItem
69
- [attr.${BREADCRUMB_ITEM_INDEX}]="i"
70
- [item]="item"
71
- [index]="i"
72
- [collapseMode]="collapseMode"
73
- [itemTemplate]="itemTemplate"
74
- >
75
- @if (collapseMode === 'wrap' && !isFirst) {
76
- <span kendoBreadCrumbSeparator [icon]="separatorIcon" [svgIcon]="separatorSVGIcon"></span>
77
- }
78
- @if (collapseMode !== 'wrap' && !isLast && !(item?.context.collapsed && items[i + 1]?.context.collapsed)) {
79
- <span
80
- kendoBreadCrumbSeparator
81
- [icon]="separatorIcon"
82
- [svgIcon]="separatorSVGIcon"
83
- ></span>
84
- }
85
- </li>
86
- }
87
- }
88
- `,
89
- standalone: true,
90
- imports: [BreadCrumbItemComponent, BreadCrumbSeparatorDirective]
91
- }]
92
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { items: [{
93
- type: Input
94
- }], itemTemplate: [{
95
- type: Input
96
- }], collapseMode: [{
97
- type: Input
98
- }], separatorIcon: [{
99
- type: Input
100
- }], separatorSVGIcon: [{
101
- type: Input
102
- }], itemClick: [{
103
- type: Output
104
- }], renderedItems: [{
105
- type: ViewChildren,
106
- args: [BreadCrumbItemComponent]
107
- }] } });
@@ -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,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,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 {};