@progress/kendo-angular-navigation 17.0.0-develop.4 → 17.0.0-develop.41
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/README.md +38 -18
- package/actionsheet/actionsheet.component.d.ts +1 -1
- package/actionsheet/item.component.d.ts +1 -1
- package/actionsheet/list.component.d.ts +1 -1
- package/actionsheet/models/group.d.ts +1 -1
- package/appbar/appbar-spacer.component.d.ts +1 -1
- package/appbar/appbar.component.d.ts +1 -1
- package/appbar/models/position-mode.d.ts +1 -1
- package/appbar/models/position.d.ts +1 -1
- package/appbar/models/theme-color.d.ts +1 -1
- package/bottomnavigation/bottomnavigation-item.component.d.ts +1 -1
- package/bottomnavigation/bottomnavigation.component.d.ts +1 -1
- package/bottomnavigation/types/bottomnavigation-fill.d.ts +1 -1
- package/bottomnavigation/types/bottomnavigation-item-flow.d.ts +1 -1
- package/bottomnavigation/types/bottomnavigation-position-mode.d.ts +1 -1
- package/bottomnavigation/types/bottomnavigation-theme-color.d.ts +1 -1
- package/breadcrumb/breadcrumb-item.component.d.ts +2 -2
- package/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/breadcrumb/list.component.d.ts +1 -1
- package/breadcrumb/models/breadcrumb-size.d.ts +1 -1
- package/breadcrumb/models/collapse-mode.d.ts +1 -1
- package/breadcrumb/template-directives/separator.directive.d.ts +1 -2
- package/common/direction.d.ts +1 -1
- package/{esm2020 → esm2022}/actionsheet/actionsheet.component.mjs +113 -60
- package/{esm2020 → esm2022}/actionsheet/item.component.mjs +7 -7
- package/{esm2020 → esm2022}/actionsheet/list.component.mjs +11 -7
- package/{esm2020 → esm2022}/actionsheet/models/item-click.event.mjs +8 -0
- package/{esm2020 → esm2022}/actionsheet/templates/actionsheet-template.mjs +4 -3
- package/{esm2020 → esm2022}/actionsheet/templates/content-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/actionsheet/templates/footer-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/actionsheet/templates/header-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/actionsheet/templates/item-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/actionsheet.module.mjs +4 -4
- package/{esm2020 → esm2022}/appbar/appbar-section.component.mjs +5 -7
- package/{esm2020 → esm2022}/appbar/appbar-spacer.component.mjs +15 -7
- package/{esm2020 → esm2022}/appbar/appbar.component.mjs +33 -25
- package/{esm2020 → esm2022}/appbar.module.mjs +4 -4
- package/{esm2020 → esm2022}/bottomnavigation/bottomnavigation-item.component.mjs +10 -4
- package/{esm2020 → esm2022}/bottomnavigation/bottomnavigation.component.mjs +75 -52
- package/{esm2020 → esm2022}/bottomnavigation/events/select-event.mjs +16 -0
- package/{esm2020 → esm2022}/bottomnavigation/templates/item-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/bottomnavigation.module.mjs +4 -4
- package/{esm2020 → esm2022}/breadcrumb/breadcrumb-item.component.mjs +19 -14
- package/{esm2020 → esm2022}/breadcrumb/breadcrumb.component.mjs +87 -56
- package/{esm2020 → esm2022}/breadcrumb/list.component.mjs +14 -6
- package/{esm2020 → esm2022}/breadcrumb/template-directives/item-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/breadcrumb/template-directives/separator.directive.mjs +20 -18
- package/{esm2020 → esm2022}/breadcrumb.module.mjs +4 -4
- package/{esm2020 → esm2022}/common/preventable-event.mjs +7 -7
- package/{esm2020 → esm2022}/navigation.module.mjs +4 -4
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{fesm2020 → fesm2022}/progress-kendo-angular-navigation.mjs +490 -313
- package/package.json +13 -19
- package/fesm2015/progress-kendo-angular-navigation.mjs +0 -2613
- /package/{esm2020 → esm2022}/actionsheet/animation/animations.mjs +0 -0
- /package/{esm2020 → esm2022}/actionsheet/models/actionsheet-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/actionsheet/models/animation.mjs +0 -0
- /package/{esm2020 → esm2022}/actionsheet/models/group.mjs +0 -0
- /package/{esm2020 → esm2022}/actionsheet/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/appbar/models/position-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/appbar/models/position.mjs +0 -0
- /package/{esm2020 → esm2022}/appbar/models/theme-color.mjs +0 -0
- /package/{esm2020 → esm2022}/bottomnavigation/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/bottomnavigation/types/bottomnavigation-fill.mjs +0 -0
- /package/{esm2020 → esm2022}/bottomnavigation/types/bottomnavigation-item-flow.mjs +0 -0
- /package/{esm2020 → esm2022}/bottomnavigation/types/bottomnavigation-item.mjs +0 -0
- /package/{esm2020 → esm2022}/bottomnavigation/types/bottomnavigation-position-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/bottomnavigation/types/bottomnavigation-theme-color.mjs +0 -0
- /package/{esm2020 → esm2022}/breadcrumb/models/breadcrumb-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/breadcrumb/models/breadcrumb-size.mjs +0 -0
- /package/{esm2020 → esm2022}/breadcrumb/models/collapse-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/breadcrumb/models/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/breadcrumb/util.mjs +0 -0
- /package/{esm2020 → esm2022}/common/direction.mjs +0 -0
- /package/{esm2020 → esm2022}/common/dom-queries.mjs +0 -0
- /package/{esm2020 → esm2022}/common/util.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-navigation.mjs +0 -0
|
@@ -1,2613 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as i0 from '@angular/core';
|
|
6
|
-
import { Component, HostBinding, Input, Directive, Optional, EventEmitter, Output, ViewChild, ContentChild, ViewChildren, isDevMode, ElementRef, NgModule } from '@angular/core';
|
|
7
|
-
import * as i1 from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
10
|
-
import { focusableSelector, closestInScope as closestInScope$1, isPresent as isPresent$1, isDocumentAvailable, Keys, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
11
|
-
import { NgIf, NgTemplateOutlet, NgFor, NgClass, NgStyle, AsyncPipe } from '@angular/common';
|
|
12
|
-
import { Subscription, fromEvent, merge, ReplaySubject, Subject } from 'rxjs';
|
|
13
|
-
import * as i2 from '@angular/animations';
|
|
14
|
-
import { style, animate } from '@angular/animations';
|
|
15
|
-
import { take, filter, map, startWith, share } from 'rxjs/operators';
|
|
16
|
-
import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
|
|
17
|
-
import { chevronRightIcon, chevronLeftIcon } from '@progress/kendo-svg-icons';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
const packageMetadata = {
|
|
23
|
-
name: '@progress/kendo-angular-navigation',
|
|
24
|
-
productName: 'Kendo UI for Angular',
|
|
25
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
26
|
-
publishDate: 1728984996,
|
|
27
|
-
version: '17.0.0-develop.4',
|
|
28
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const DEFAULT_THEME_COLOR = 'light';
|
|
32
|
-
const DEFAULT_POSITION = 'top';
|
|
33
|
-
const DEFAULT_POSITION_MODE = 'static';
|
|
34
|
-
/**
|
|
35
|
-
* Represents the [Kendo UI AppBar component for Angular]({% slug overview_appbar %}).
|
|
36
|
-
* Used to display information, actions, branding titles and additional navigation on the current screen.
|
|
37
|
-
*/
|
|
38
|
-
class AppBarComponent {
|
|
39
|
-
constructor(localizationService, host, renderer) {
|
|
40
|
-
this.localizationService = localizationService;
|
|
41
|
-
this.host = host;
|
|
42
|
-
this.renderer = renderer;
|
|
43
|
-
this.hostClass = true;
|
|
44
|
-
this.rtl = false;
|
|
45
|
-
this._themeColor = DEFAULT_THEME_COLOR;
|
|
46
|
-
this._position = DEFAULT_POSITION;
|
|
47
|
-
this._positionMode = DEFAULT_POSITION_MODE;
|
|
48
|
-
validatePackage(packageMetadata);
|
|
49
|
-
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
50
|
-
this.rtl = rtl;
|
|
51
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Specifies the position of the AppBar
|
|
56
|
-
* ([see example]({% slug positioning_appbar %}#toc-position)).
|
|
57
|
-
*
|
|
58
|
-
* * The possible values are:
|
|
59
|
-
* * `top` (Default)—Positions the AppBar at the top of the content.
|
|
60
|
-
* Setting the `position` property to `top` requires adding the Appbar component before the page content.
|
|
61
|
-
* The position property applies CSS `top: 0` style in [`fixed mode`](slug:api_navigation_appbarcomponent#toc-positionmode) and also adds a `box-shadow` to the bottom of the AppBar.
|
|
62
|
-
*
|
|
63
|
-
* * `bottom`—Positions the AppBar at the bottom of the content.
|
|
64
|
-
* Setting the `position` property to `bottom` requires adding the Appbar component after the page content.
|
|
65
|
-
* The position property applies CSS `bottom: 0` style in [`fixed mode`](slug:api_navigation_appbarcomponent#toc-positionmode) and also adds a `box-shadow ` to the top of the AppBar.
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
set position(position) {
|
|
69
|
-
const newPosition = position ? position : DEFAULT_POSITION;
|
|
70
|
-
this.handleHostClasses(newPosition, this.position);
|
|
71
|
-
this._position = newPosition;
|
|
72
|
-
}
|
|
73
|
-
get position() {
|
|
74
|
-
return this._position;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Specifies the positionMode of the AppBar
|
|
78
|
-
* ([see example](slug:positioning_appbar#toc-position-mode)).
|
|
79
|
-
*
|
|
80
|
-
* * The possible values are:
|
|
81
|
-
* * `static` (Default)—Does not position the AppBar in any special way. It is positioned according to the normal flow of the page.
|
|
82
|
-
* * `sticky`—Positions the AppBar based on the user's scroll position. A sticky element toggles between static and fixed CSS [`position`](https://developer.mozilla.org/en-US/docs/Web/CSS/position) property, depending on the scroll position.
|
|
83
|
-
* * `fixed`—Positions the AppBar relative to the viewport. It always stays in the same place even if the page is scrolled.
|
|
84
|
-
*/
|
|
85
|
-
set positionMode(positionMode) {
|
|
86
|
-
const newPositionMode = positionMode ? positionMode : DEFAULT_POSITION_MODE;
|
|
87
|
-
this.handleHostClasses(newPositionMode, this.positionMode);
|
|
88
|
-
this._positionMode = newPositionMode;
|
|
89
|
-
}
|
|
90
|
-
get positionMode() {
|
|
91
|
-
return this._positionMode;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Specifies the theme color of the AppBar.
|
|
95
|
-
* The theme color will be applied as background color of the component.
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* * The possible values are:
|
|
99
|
-
* * `light` (Default)—Applies coloring based on light theme color.
|
|
100
|
-
* * `dark`—Applies coloring based on dark theme color.
|
|
101
|
-
* * `inherit`— Applies inherited coloring value.
|
|
102
|
-
* * `primary`— Applies primary coloring value.
|
|
103
|
-
*
|
|
104
|
-
*/
|
|
105
|
-
set themeColor(themeColor) {
|
|
106
|
-
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR;
|
|
107
|
-
this.handleHostClasses(newThemeColor, this.themeColor);
|
|
108
|
-
this._themeColor = newThemeColor;
|
|
109
|
-
}
|
|
110
|
-
get themeColor() {
|
|
111
|
-
return this._themeColor;
|
|
112
|
-
}
|
|
113
|
-
ngAfterViewInit() {
|
|
114
|
-
const stylingOptions = ['position', 'positionMode', 'themeColor'];
|
|
115
|
-
stylingOptions.forEach(input => {
|
|
116
|
-
this.handleHostClasses(this[input]);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
ngOnDestroy() {
|
|
120
|
-
if (this.dynamicRTLSubscription) {
|
|
121
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
handleHostClasses(newValue, previousValue) {
|
|
125
|
-
const elem = this.host.nativeElement;
|
|
126
|
-
if (previousValue && newValue === previousValue) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (previousValue) {
|
|
130
|
-
this.renderer.removeClass(elem, `k-appbar-${previousValue}`);
|
|
131
|
-
}
|
|
132
|
-
if (newValue) {
|
|
133
|
-
this.renderer.addClass(elem, `k-appbar-${newValue}`);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
AppBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
-
AppBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppBarComponent, isStandalone: true, selector: "kendo-appbar", inputs: { position: "position", positionMode: "positionMode", themeColor: "themeColor" }, host: { properties: { "class.k-appbar": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
|
|
139
|
-
LocalizationService,
|
|
140
|
-
{
|
|
141
|
-
provide: L10N_PREFIX,
|
|
142
|
-
useValue: 'kendo.appbar.component'
|
|
143
|
-
}
|
|
144
|
-
], exportAs: ["kendoAppBar"], ngImport: i0, template: `
|
|
145
|
-
<ng-content></ng-content>
|
|
146
|
-
`, isInline: true });
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarComponent, decorators: [{
|
|
148
|
-
type: Component,
|
|
149
|
-
args: [{
|
|
150
|
-
exportAs: 'kendoAppBar',
|
|
151
|
-
selector: 'kendo-appbar',
|
|
152
|
-
template: `
|
|
153
|
-
<ng-content></ng-content>
|
|
154
|
-
`,
|
|
155
|
-
providers: [
|
|
156
|
-
LocalizationService,
|
|
157
|
-
{
|
|
158
|
-
provide: L10N_PREFIX,
|
|
159
|
-
useValue: 'kendo.appbar.component'
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
standalone: true
|
|
163
|
-
}]
|
|
164
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hostClass: [{
|
|
165
|
-
type: HostBinding,
|
|
166
|
-
args: ['class.k-appbar']
|
|
167
|
-
}], direction: [{
|
|
168
|
-
type: HostBinding,
|
|
169
|
-
args: ['attr.dir']
|
|
170
|
-
}], position: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], positionMode: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}], themeColor: [{
|
|
175
|
-
type: Input
|
|
176
|
-
}] } });
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Represents the [Kendo UI AppBarSection component for Angular]({% slug contentarrangement_appbar %}#toc-sections).
|
|
180
|
-
*
|
|
181
|
-
* @example
|
|
182
|
-
*
|
|
183
|
-
* ```ts-no-run
|
|
184
|
-
* * _@Component({
|
|
185
|
-
* selector: 'my-app',
|
|
186
|
-
* template: `
|
|
187
|
-
* <kendo-appbar>
|
|
188
|
-
* <kendo-appbar-section>
|
|
189
|
-
* <h2>Page Title</h2>
|
|
190
|
-
* </kendo-appbar-section>
|
|
191
|
-
* </kendo-appbar>
|
|
192
|
-
* `
|
|
193
|
-
* })
|
|
194
|
-
* class AppComponent {}
|
|
195
|
-
*/
|
|
196
|
-
class AppBarSectionComponent {
|
|
197
|
-
constructor() {
|
|
198
|
-
this.hostClass = true;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
AppBarSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
202
|
-
AppBarSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppBarSectionComponent, isStandalone: true, selector: "kendo-appbar-section", host: { properties: { "class.k-appbar-section": "this.hostClass" } }, ngImport: i0, template: `
|
|
203
|
-
<ng-content></ng-content>
|
|
204
|
-
`, isInline: true });
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarSectionComponent, decorators: [{
|
|
206
|
-
type: Component,
|
|
207
|
-
args: [{
|
|
208
|
-
selector: 'kendo-appbar-section',
|
|
209
|
-
template: `
|
|
210
|
-
<ng-content></ng-content>
|
|
211
|
-
`,
|
|
212
|
-
standalone: true
|
|
213
|
-
}]
|
|
214
|
-
}], propDecorators: { hostClass: [{
|
|
215
|
-
type: HostBinding,
|
|
216
|
-
args: ['class.k-appbar-section']
|
|
217
|
-
}] } });
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* @hidden
|
|
221
|
-
*/
|
|
222
|
-
const isPresent = (value) => value !== null && value !== undefined;
|
|
223
|
-
/**
|
|
224
|
-
* @hidden
|
|
225
|
-
*/
|
|
226
|
-
const outerWidth = (element) => {
|
|
227
|
-
const style = getComputedStyle(element);
|
|
228
|
-
let width = parseFloat(style.width);
|
|
229
|
-
width += (parseFloat(style.marginLeft) || 0) + (parseFloat(style.marginRight) || 0);
|
|
230
|
-
return width;
|
|
231
|
-
};
|
|
232
|
-
/**
|
|
233
|
-
* @hidden
|
|
234
|
-
*/
|
|
235
|
-
const getFirstAndLastFocusable = (parent) => {
|
|
236
|
-
const all = getAllFocusableChildren(parent);
|
|
237
|
-
const firstFocusable = all.length > 0 ? all[0] : parent;
|
|
238
|
-
const lastFocusable = all.length > 0 ? all[all.length - 1] : parent;
|
|
239
|
-
return [firstFocusable, lastFocusable];
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* @hidden
|
|
243
|
-
*/
|
|
244
|
-
const getAllFocusableChildren = (parent) => {
|
|
245
|
-
return parent.querySelectorAll(focusableSelector);
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* @hidden
|
|
249
|
-
*/
|
|
250
|
-
let idx = 0;
|
|
251
|
-
/**
|
|
252
|
-
* @hidden
|
|
253
|
-
*/
|
|
254
|
-
const hexColorRegex = /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/;
|
|
255
|
-
/**
|
|
256
|
-
* @hidden
|
|
257
|
-
*/
|
|
258
|
-
const getId = (prefix) => {
|
|
259
|
-
return `${prefix}${++idx}`;
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* @hidden
|
|
263
|
-
*/
|
|
264
|
-
const ACTIONSHEET_ITEM_INDEX_ATTRIBUTE = 'kendo-actionsheet-item-index';
|
|
265
|
-
/**
|
|
266
|
-
* @hidden
|
|
267
|
-
*/
|
|
268
|
-
const getActionSheetItemIndex = (target, targetAttr, scope) => {
|
|
269
|
-
const item = closestItem$1(target, targetAttr, scope);
|
|
270
|
-
if (item) {
|
|
271
|
-
return itemIndex$1(item, targetAttr);
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
const itemIndex$1 = (item, indexAttr) => +item.getAttribute(indexAttr);
|
|
275
|
-
const hasItemIndex$1 = (item, indexAttr) => isPresent(item.getAttribute(indexAttr));
|
|
276
|
-
const closestItem$1 = (target, targetAttr, scope) => closestInScope$1(target, el => hasItemIndex$1(el, targetAttr), scope);
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Represents the [Kendo UI AppBarSpacer component for Angular]({% slug contentarrangement_appbar %}#toc-spacings).
|
|
280
|
-
* Used to give additional white space between the AppBar sections and provides a way for customizing its width.
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
*
|
|
284
|
-
* ```ts-no-run
|
|
285
|
-
* * _@Component({
|
|
286
|
-
* selector: 'my-app',
|
|
287
|
-
* template: `
|
|
288
|
-
* <kendo-appbar>
|
|
289
|
-
* <kendo-appbar-section>
|
|
290
|
-
* <button kendoButton fillMode="flat">
|
|
291
|
-
* <kendo-icon name="menu"></kendo-icon>
|
|
292
|
-
* </button>
|
|
293
|
-
* </kendo-appbar-section>
|
|
294
|
-
*
|
|
295
|
-
* <kendo-appbar-spacer></kendo-appbar-spacer>
|
|
296
|
-
*
|
|
297
|
-
* <kendo-appbar-section>
|
|
298
|
-
* <h2>Page Title</h2>
|
|
299
|
-
* </kendo-appbar-section>
|
|
300
|
-
* </kendo-appbar>
|
|
301
|
-
* `
|
|
302
|
-
* })
|
|
303
|
-
* class AppComponent {}
|
|
304
|
-
* ```
|
|
305
|
-
*/
|
|
306
|
-
class AppBarSpacerComponent {
|
|
307
|
-
constructor(renderer, element) {
|
|
308
|
-
this.renderer = renderer;
|
|
309
|
-
this.element = element;
|
|
310
|
-
this.hostClass = true;
|
|
311
|
-
}
|
|
312
|
-
get sizedClass() {
|
|
313
|
-
return isPresent(this.width);
|
|
314
|
-
}
|
|
315
|
-
ngAfterViewInit() {
|
|
316
|
-
if (isPresent(this.width)) {
|
|
317
|
-
const element = this.element.nativeElement;
|
|
318
|
-
this.renderer.setStyle(element, 'flexBasis', this.width);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
AppBarSpacerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarSpacerComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
323
|
-
AppBarSpacerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppBarSpacerComponent, isStandalone: true, selector: "kendo-appbar-spacer", inputs: { width: "width" }, host: { properties: { "class.k-spacer": "this.hostClass", "class.k-spacer-sized": "this.sizedClass" } }, ngImport: i0, template: ``, isInline: true });
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarSpacerComponent, decorators: [{
|
|
325
|
-
type: Component,
|
|
326
|
-
args: [{
|
|
327
|
-
selector: 'kendo-appbar-spacer',
|
|
328
|
-
template: ``,
|
|
329
|
-
standalone: true
|
|
330
|
-
}]
|
|
331
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
|
|
332
|
-
type: HostBinding,
|
|
333
|
-
args: ['class.k-spacer']
|
|
334
|
-
}], sizedClass: [{
|
|
335
|
-
type: HostBinding,
|
|
336
|
-
args: ['class.k-spacer-sized']
|
|
337
|
-
}], width: [{
|
|
338
|
-
type: Input
|
|
339
|
-
}] } });
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Arguments for the `itemClick` event of the ActionSheet.
|
|
343
|
-
*/
|
|
344
|
-
class ActionSheetItemClickEvent {
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Represents a template that defines the header content of the ActionSheet. Utilizing the template overrides both the `title` and `subtitle` of the ActionSheet.
|
|
349
|
-
* To define the template, nest an `<ng-template>` tag
|
|
350
|
-
* with the `kendoActionSheetHeaderTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
351
|
-
*/
|
|
352
|
-
class ActionSheetHeaderTemplateDirective {
|
|
353
|
-
constructor(templateRef) {
|
|
354
|
-
this.templateRef = templateRef;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
ActionSheetHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetHeaderTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
358
|
-
ActionSheetHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetHeaderTemplateDirective, isStandalone: true, selector: "[kendoActionSheetHeaderTemplate]", ngImport: i0 });
|
|
359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetHeaderTemplateDirective, decorators: [{
|
|
360
|
-
type: Directive,
|
|
361
|
-
args: [{
|
|
362
|
-
selector: '[kendoActionSheetHeaderTemplate]',
|
|
363
|
-
standalone: true
|
|
364
|
-
}]
|
|
365
|
-
}], ctorParameters: function () {
|
|
366
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
367
|
-
type: Optional
|
|
368
|
-
}] }];
|
|
369
|
-
} });
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Represents a template that defines the item content of the ActionSheet.
|
|
373
|
-
* To define the template, nest an `<ng-template>` tag
|
|
374
|
-
* with the `kendoActionSheetItemTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
375
|
-
*/
|
|
376
|
-
class ActionSheetItemTemplateDirective {
|
|
377
|
-
constructor(templateRef) {
|
|
378
|
-
this.templateRef = templateRef;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
ActionSheetItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
382
|
-
ActionSheetItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetItemTemplateDirective, isStandalone: true, selector: "[kendoActionSheetItemTemplate]", ngImport: i0 });
|
|
383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetItemTemplateDirective, decorators: [{
|
|
384
|
-
type: Directive,
|
|
385
|
-
args: [{
|
|
386
|
-
selector: '[kendoActionSheetItemTemplate]',
|
|
387
|
-
standalone: true
|
|
388
|
-
}]
|
|
389
|
-
}], ctorParameters: function () {
|
|
390
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
391
|
-
type: Optional
|
|
392
|
-
}] }];
|
|
393
|
-
} });
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Represents a template that defines the items list content of the ActionSheet.
|
|
397
|
-
* To define the template, nest an `<ng-template>` tag
|
|
398
|
-
* with the `kendoActionSheetContentTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
399
|
-
*/
|
|
400
|
-
class ActionSheetContentTemplateDirective {
|
|
401
|
-
constructor(templateRef) {
|
|
402
|
-
this.templateRef = templateRef;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
ActionSheetContentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
406
|
-
ActionSheetContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetContentTemplateDirective, isStandalone: true, selector: "[kendoActionSheetContentTemplate]", ngImport: i0 });
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetContentTemplateDirective, decorators: [{
|
|
408
|
-
type: Directive,
|
|
409
|
-
args: [{
|
|
410
|
-
selector: '[kendoActionSheetContentTemplate]',
|
|
411
|
-
standalone: true
|
|
412
|
-
}]
|
|
413
|
-
}], ctorParameters: function () {
|
|
414
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
415
|
-
type: Optional
|
|
416
|
-
}] }];
|
|
417
|
-
} });
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Represents a template that defines the footer of the ActionSheet.
|
|
421
|
-
* To define the template, nest an `<ng-template>` tag
|
|
422
|
-
* with the `kendoActionSheetFooterTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
423
|
-
*/
|
|
424
|
-
class ActionSheetFooterTemplateDirective {
|
|
425
|
-
constructor(templateRef) {
|
|
426
|
-
this.templateRef = templateRef;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
ActionSheetFooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetFooterTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
430
|
-
ActionSheetFooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetFooterTemplateDirective, isStandalone: true, selector: "[kendoActionSheetFooterTemplate]", ngImport: i0 });
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetFooterTemplateDirective, decorators: [{
|
|
432
|
-
type: Directive,
|
|
433
|
-
args: [{
|
|
434
|
-
selector: '[kendoActionSheetFooterTemplate]',
|
|
435
|
-
standalone: true
|
|
436
|
-
}]
|
|
437
|
-
}], ctorParameters: function () {
|
|
438
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
439
|
-
type: Optional
|
|
440
|
-
}] }];
|
|
441
|
-
} });
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Represents a template that defines the content of the ActionSheet.
|
|
445
|
-
* To define the template, nest an `<ng-template>` tag
|
|
446
|
-
* with the `kendoActionSheetTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
447
|
-
*/
|
|
448
|
-
class ActionSheetTemplateDirective {
|
|
449
|
-
constructor(templateRef) {
|
|
450
|
-
this.templateRef = templateRef;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
ActionSheetTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
454
|
-
ActionSheetTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetTemplateDirective, isStandalone: true, selector: "[kendoActionSheetTemplate]", ngImport: i0 });
|
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetTemplateDirective, decorators: [{
|
|
456
|
-
type: Directive,
|
|
457
|
-
args: [{
|
|
458
|
-
selector: '[kendoActionSheetTemplate]',
|
|
459
|
-
standalone: true
|
|
460
|
-
}]
|
|
461
|
-
}], ctorParameters: function () {
|
|
462
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
463
|
-
type: Optional
|
|
464
|
-
}] }];
|
|
465
|
-
} });
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* @hidden
|
|
469
|
-
*/
|
|
470
|
-
function slideUp(duration, height) {
|
|
471
|
-
return [
|
|
472
|
-
style({ overflow: 'hidden', display: 'block', height: 0 }),
|
|
473
|
-
animate(`${duration}ms ease-in`, style({ height: `${height}` }))
|
|
474
|
-
];
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* @hidden
|
|
478
|
-
*/
|
|
479
|
-
function slideDown(duration, height) {
|
|
480
|
-
return [
|
|
481
|
-
style({ overflow: 'hidden', height: `${height}` }),
|
|
482
|
-
animate(`${duration}ms ease-in`, style({ overflow: 'hidden', height: 0 }))
|
|
483
|
-
];
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* @hidden
|
|
488
|
-
*/
|
|
489
|
-
class ActionSheetItemComponent {
|
|
490
|
-
constructor() {
|
|
491
|
-
this.pointerClass = true;
|
|
492
|
-
}
|
|
493
|
-
manageIconClasses(item) {
|
|
494
|
-
const classes = ['k-actionsheet-item-icon'];
|
|
495
|
-
const isHexColor = isPresent(item.iconColor) && hexColorRegex.test(item.iconColor);
|
|
496
|
-
const isThemeColor = isPresent(item.iconColor) && item.iconColor !== '' && !isHexColor;
|
|
497
|
-
if (isThemeColor) {
|
|
498
|
-
classes.push(`k-text-${item.iconColor}`);
|
|
499
|
-
}
|
|
500
|
-
return classes.join(' ');
|
|
501
|
-
}
|
|
502
|
-
manageIconStyles(item) {
|
|
503
|
-
const isHexColor = isPresent(item.iconColor) && hexColorRegex.test(item.iconColor);
|
|
504
|
-
const isSizeSet = isPresent(item.iconSize) && item.iconSize !== '';
|
|
505
|
-
const styles = {};
|
|
506
|
-
if (isHexColor) {
|
|
507
|
-
styles.color = item.iconColor;
|
|
508
|
-
}
|
|
509
|
-
if (isSizeSet) {
|
|
510
|
-
styles.fontSize = item.iconSize;
|
|
511
|
-
}
|
|
512
|
-
return styles;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
ActionSheetItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
516
|
-
ActionSheetItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetItemComponent, isStandalone: true, selector: "[kendoActionSheetItem]", inputs: { itemTemplate: "itemTemplate", item: "item" }, host: { properties: { "class.k-cursor-pointer": "this.pointerClass" } }, ngImport: i0, template: `
|
|
517
|
-
<ng-template *ngIf="itemTemplate; else defaultTemplate"
|
|
518
|
-
[ngTemplateOutlet]="itemTemplate"
|
|
519
|
-
[ngTemplateOutletContext]="{
|
|
520
|
-
$implicit: item
|
|
521
|
-
}">
|
|
522
|
-
</ng-template>
|
|
523
|
-
<ng-template #defaultTemplate>
|
|
524
|
-
<span class="k-actionsheet-action">
|
|
525
|
-
<span *ngIf="item.icon || item.iconClass || item.svgIcon" class="k-icon-wrap">
|
|
526
|
-
<kendo-icon-wrapper
|
|
527
|
-
[name]="item.icon"
|
|
528
|
-
[customFontClass]="item.iconClass"
|
|
529
|
-
[class]="manageIconClasses(item)"
|
|
530
|
-
[svgIcon]="item.svgIcon"
|
|
531
|
-
[style]="manageIconStyles(item)"
|
|
532
|
-
>
|
|
533
|
-
</kendo-icon-wrapper>
|
|
534
|
-
</span>
|
|
535
|
-
<span *ngIf="item.title || item.description" class="k-actionsheet-item-text">
|
|
536
|
-
<span *ngIf="item.title" class="k-actionsheet-item-title">{{item.title}}</span>
|
|
537
|
-
<span *ngIf="item.description" class="k-actionsheet-item-description">{{item.description}}</span>
|
|
538
|
-
</span>
|
|
539
|
-
</span>
|
|
540
|
-
</ng-template>
|
|
541
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
542
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetItemComponent, decorators: [{
|
|
543
|
-
type: Component,
|
|
544
|
-
args: [{
|
|
545
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
546
|
-
selector: '[kendoActionSheetItem]',
|
|
547
|
-
template: `
|
|
548
|
-
<ng-template *ngIf="itemTemplate; else defaultTemplate"
|
|
549
|
-
[ngTemplateOutlet]="itemTemplate"
|
|
550
|
-
[ngTemplateOutletContext]="{
|
|
551
|
-
$implicit: item
|
|
552
|
-
}">
|
|
553
|
-
</ng-template>
|
|
554
|
-
<ng-template #defaultTemplate>
|
|
555
|
-
<span class="k-actionsheet-action">
|
|
556
|
-
<span *ngIf="item.icon || item.iconClass || item.svgIcon" class="k-icon-wrap">
|
|
557
|
-
<kendo-icon-wrapper
|
|
558
|
-
[name]="item.icon"
|
|
559
|
-
[customFontClass]="item.iconClass"
|
|
560
|
-
[class]="manageIconClasses(item)"
|
|
561
|
-
[svgIcon]="item.svgIcon"
|
|
562
|
-
[style]="manageIconStyles(item)"
|
|
563
|
-
>
|
|
564
|
-
</kendo-icon-wrapper>
|
|
565
|
-
</span>
|
|
566
|
-
<span *ngIf="item.title || item.description" class="k-actionsheet-item-text">
|
|
567
|
-
<span *ngIf="item.title" class="k-actionsheet-item-title">{{item.title}}</span>
|
|
568
|
-
<span *ngIf="item.description" class="k-actionsheet-item-description">{{item.description}}</span>
|
|
569
|
-
</span>
|
|
570
|
-
</span>
|
|
571
|
-
</ng-template>
|
|
572
|
-
`,
|
|
573
|
-
standalone: true,
|
|
574
|
-
imports: [NgIf, NgTemplateOutlet, IconWrapperComponent]
|
|
575
|
-
}]
|
|
576
|
-
}], propDecorators: { itemTemplate: [{
|
|
577
|
-
type: Input
|
|
578
|
-
}], item: [{
|
|
579
|
-
type: Input
|
|
580
|
-
}], pointerClass: [{
|
|
581
|
-
type: HostBinding,
|
|
582
|
-
args: ['class.k-cursor-pointer']
|
|
583
|
-
}] } });
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* @hidden
|
|
587
|
-
*/
|
|
588
|
-
class ActionSheetListComponent {
|
|
589
|
-
constructor(renderer, ngZone, element) {
|
|
590
|
-
this.renderer = renderer;
|
|
591
|
-
this.ngZone = ngZone;
|
|
592
|
-
this.element = element;
|
|
593
|
-
this.groupItems = [];
|
|
594
|
-
this.allItems = [];
|
|
595
|
-
this.itemClick = new EventEmitter();
|
|
596
|
-
this.subscriptions = new Subscription();
|
|
597
|
-
}
|
|
598
|
-
ngAfterViewInit() {
|
|
599
|
-
this.initDomEvents();
|
|
600
|
-
}
|
|
601
|
-
ngOnDestroy() {
|
|
602
|
-
this.subscriptions.unsubscribe();
|
|
603
|
-
}
|
|
604
|
-
initDomEvents() {
|
|
605
|
-
if (!this.element) {
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
608
|
-
this.ngZone.runOutsideAngular(() => {
|
|
609
|
-
const nativeElement = this.element.nativeElement;
|
|
610
|
-
this.subscriptions.add(this.renderer.listen(nativeElement, 'click', this.clickHandler.bind(this)));
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
clickHandler(e) {
|
|
614
|
-
const itemIndex = getActionSheetItemIndex(e.target, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE, this.element.nativeElement);
|
|
615
|
-
const item = this.allItems[itemIndex];
|
|
616
|
-
if (!item) {
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
if (item.disabled) {
|
|
620
|
-
e.preventDefault();
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
this.ngZone.run(() => {
|
|
624
|
-
this.itemClick.emit({ item, originalEvent: e });
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
setAttrIndex(item) {
|
|
628
|
-
return this.allItems.indexOf(item);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
ActionSheetListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetListComponent, deps: [{ token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
632
|
-
ActionSheetListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetListComponent, isStandalone: true, selector: "[kendoActionSheetList]", inputs: { groupItems: "groupItems", allItems: "allItems", itemTemplate: "itemTemplate" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "\n <span *ngFor=\"let item of groupItems\" kendoActionSheetItem\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-disabled]=\"item.disabled\"\n [class.k-actionsheet-item]=\"true\"\n [attr.kendo-actionsheet-item-index]=\"setAttrIndex(item)\"\n [class.k-disabled]=\"item.disabled\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n [itemTemplate]=\"itemTemplate\"\n [item]=\"item\">\n </span>\n ", isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ActionSheetItemComponent, selector: "[kendoActionSheetItem]", inputs: ["itemTemplate", "item"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetListComponent, decorators: [{
|
|
634
|
-
type: Component,
|
|
635
|
-
args: [{
|
|
636
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
637
|
-
selector: '[kendoActionSheetList]',
|
|
638
|
-
template: `
|
|
639
|
-
<span *ngFor="let item of groupItems" kendoActionSheetItem
|
|
640
|
-
tabindex="0"
|
|
641
|
-
role="button"
|
|
642
|
-
[attr.aria-disabled]="item.disabled"
|
|
643
|
-
[class.k-actionsheet-item]="true"
|
|
644
|
-
[attr.${ACTIONSHEET_ITEM_INDEX_ATTRIBUTE}]="setAttrIndex(item)"
|
|
645
|
-
[class.k-disabled]="item.disabled"
|
|
646
|
-
[ngClass]="item.cssClass"
|
|
647
|
-
[ngStyle]="item.cssStyle"
|
|
648
|
-
[itemTemplate]="itemTemplate"
|
|
649
|
-
[item]="item">
|
|
650
|
-
</span>
|
|
651
|
-
`,
|
|
652
|
-
standalone: true,
|
|
653
|
-
imports: [NgFor, ActionSheetItemComponent, NgClass, NgStyle]
|
|
654
|
-
}]
|
|
655
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { groupItems: [{
|
|
656
|
-
type: Input
|
|
657
|
-
}], allItems: [{
|
|
658
|
-
type: Input
|
|
659
|
-
}], itemTemplate: [{
|
|
660
|
-
type: Input
|
|
661
|
-
}], itemClick: [{
|
|
662
|
-
type: Output
|
|
663
|
-
}] } });
|
|
664
|
-
|
|
665
|
-
const DEFAULT_ANIMATION_CONFIG = { duration: 300 };
|
|
666
|
-
/**
|
|
667
|
-
* Represents the [Kendo UI ActionSheet component for Angular]({% slug overview_actionsheet %}).
|
|
668
|
-
* Used to display a set of choices related to a task the user initiates.
|
|
669
|
-
*/
|
|
670
|
-
class ActionSheetComponent {
|
|
671
|
-
constructor(element, ngZone, renderer, localizationService, builder, cdr) {
|
|
672
|
-
this.element = element;
|
|
673
|
-
this.ngZone = ngZone;
|
|
674
|
-
this.renderer = renderer;
|
|
675
|
-
this.localizationService = localizationService;
|
|
676
|
-
this.builder = builder;
|
|
677
|
-
this.cdr = cdr;
|
|
678
|
-
/**
|
|
679
|
-
* Configures the ActionSheet opening and closing animations ([see example]({% slug animations_actionsheet %})).
|
|
680
|
-
* By default the animations are turned off. The default animations' duration is `300ms`.
|
|
681
|
-
*
|
|
682
|
-
* @default true
|
|
683
|
-
*/
|
|
684
|
-
this.animation = true;
|
|
685
|
-
/**
|
|
686
|
-
* Specifies the state of the ActionSheet.
|
|
687
|
-
*
|
|
688
|
-
* @default false
|
|
689
|
-
*/
|
|
690
|
-
this.expanded = false;
|
|
691
|
-
/**
|
|
692
|
-
* Sets the `aria-labelledby` attribute of the ActionSheet wrapper element.
|
|
693
|
-
* Use this option when the built-in header element is replaced through the [`ActionSheetHeaderTemplate`]({% slug api_navigation_actionsheetheadertemplatedirective %})
|
|
694
|
-
* or [`ActionSheetContentTemplate`]({% slug api_navigation_actionsheetcontenttemplatedirective %}).
|
|
695
|
-
*
|
|
696
|
-
*/
|
|
697
|
-
this.titleId = getId('k-actionsheet-title');
|
|
698
|
-
/**
|
|
699
|
-
* Fires when the `expanded` property of the component is updated.
|
|
700
|
-
* Used to provide a two-way binding for the `expanded` property.
|
|
701
|
-
*/
|
|
702
|
-
this.expandedChange = new EventEmitter();
|
|
703
|
-
/**
|
|
704
|
-
* Fires when the ActionSheet is expanded and its animation is complete.
|
|
705
|
-
*/
|
|
706
|
-
this.expand = new EventEmitter();
|
|
707
|
-
/**
|
|
708
|
-
* Fires when the ActionSheet is collapsed and its animation is complete.
|
|
709
|
-
*/
|
|
710
|
-
this.collapse = new EventEmitter();
|
|
711
|
-
/**
|
|
712
|
-
* Fires when an ActionSheet item is clicked.
|
|
713
|
-
*/
|
|
714
|
-
this.itemClick = new EventEmitter();
|
|
715
|
-
/**
|
|
716
|
-
* Fires when the modal overlay is clicked.
|
|
717
|
-
*/
|
|
718
|
-
this.overlayClick = new EventEmitter();
|
|
719
|
-
this.rtl = false;
|
|
720
|
-
this.domSubs = new Subscription();
|
|
721
|
-
this.animationEnd = new EventEmitter();
|
|
722
|
-
validatePackage(packageMetadata);
|
|
723
|
-
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
724
|
-
this.rtl = rtl;
|
|
725
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* @hidden
|
|
730
|
-
*/
|
|
731
|
-
get hostClass() {
|
|
732
|
-
return this.expanded;
|
|
733
|
-
}
|
|
734
|
-
ngAfterViewInit() {
|
|
735
|
-
this.initDomEvents();
|
|
736
|
-
this.setCssVariables();
|
|
737
|
-
}
|
|
738
|
-
ngOnChanges(changes) {
|
|
739
|
-
if (changes['expanded'] && this.expanded) {
|
|
740
|
-
this.setExpanded(true);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
ngOnDestroy() {
|
|
744
|
-
this.domSubs.unsubscribe();
|
|
745
|
-
if (this.dynamicRTLSubscription) {
|
|
746
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
747
|
-
}
|
|
748
|
-
if (this.player) {
|
|
749
|
-
this.player.destroy();
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* Toggles the visibility of the ActionSheet.
|
|
754
|
-
*
|
|
755
|
-
* @param expanded? - Boolean. Specifies if the ActionSheet will be expanded or collapsed.
|
|
756
|
-
*/
|
|
757
|
-
toggle(expanded) {
|
|
758
|
-
const previous = this.expanded;
|
|
759
|
-
const current = isPresent$1(expanded) ? expanded : !previous;
|
|
760
|
-
if (current === previous) {
|
|
761
|
-
return;
|
|
762
|
-
}
|
|
763
|
-
if (current === true) {
|
|
764
|
-
this.setExpanded(true);
|
|
765
|
-
}
|
|
766
|
-
else if (current === false && !this.animation) {
|
|
767
|
-
this.setExpanded(false);
|
|
768
|
-
}
|
|
769
|
-
if (this.animation) {
|
|
770
|
-
this.animationEnd.pipe(take(1))
|
|
771
|
-
.subscribe(() => { this.onAnimationEnd(current); });
|
|
772
|
-
this.playAnimation(current);
|
|
773
|
-
}
|
|
774
|
-
else {
|
|
775
|
-
this[current ? 'expand' : 'collapse'].emit();
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
/**
|
|
779
|
-
* @hidden
|
|
780
|
-
*/
|
|
781
|
-
get topGroupItems() {
|
|
782
|
-
var _a;
|
|
783
|
-
return (_a = this.items) === null || _a === void 0 ? void 0 : _a.filter(item => !item.group || item.group === 'top');
|
|
784
|
-
}
|
|
785
|
-
/**
|
|
786
|
-
* @hidden
|
|
787
|
-
*/
|
|
788
|
-
get bottomGroupItems() {
|
|
789
|
-
var _a;
|
|
790
|
-
return (_a = this.items) === null || _a === void 0 ? void 0 : _a.filter(item => item.group === 'bottom');
|
|
791
|
-
}
|
|
792
|
-
/**
|
|
793
|
-
* @hidden
|
|
794
|
-
*/
|
|
795
|
-
onItemClick(ev) {
|
|
796
|
-
this.itemClick.emit(ev);
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* @hidden
|
|
800
|
-
*/
|
|
801
|
-
onOverlayClick() {
|
|
802
|
-
this.overlayClick.emit();
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
* @hidden
|
|
806
|
-
*/
|
|
807
|
-
get shouldRenderSeparator() {
|
|
808
|
-
var _a, _b;
|
|
809
|
-
return ((_a = this.topGroupItems) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((_b = this.bottomGroupItems) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
810
|
-
}
|
|
811
|
-
initDomEvents() {
|
|
812
|
-
if (!this.element) {
|
|
813
|
-
return;
|
|
814
|
-
}
|
|
815
|
-
this.ngZone.runOutsideAngular(() => {
|
|
816
|
-
this.domSubs.add(this.renderer.listen(this.element.nativeElement, 'keydown', (ev) => {
|
|
817
|
-
this.onKeyDown(ev);
|
|
818
|
-
}));
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
setCssVariables() {
|
|
822
|
-
if (!this.element || !isDocumentAvailable()) {
|
|
823
|
-
return;
|
|
824
|
-
}
|
|
825
|
-
// The following syntax is used as it does not violate CSP compliance
|
|
826
|
-
this.element.nativeElement.style.setProperty('--kendo-actionsheet-height', 'auto');
|
|
827
|
-
this.element.nativeElement.style.setProperty('--kendo-actionsheet-max-height', 'none');
|
|
828
|
-
}
|
|
829
|
-
onKeyDown(event) {
|
|
830
|
-
const target = event.target;
|
|
831
|
-
if (event.keyCode === Keys.Tab) {
|
|
832
|
-
this.ngZone.run(() => {
|
|
833
|
-
this.keepFocusWithinComponent(target, event);
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
if (event.keyCode === Keys.Escape) {
|
|
837
|
-
this.ngZone.run(() => {
|
|
838
|
-
this.overlayClick.emit();
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
if (event.keyCode === Keys.Enter) {
|
|
842
|
-
this.ngZone.run(() => {
|
|
843
|
-
this.triggerItemClick(target, event);
|
|
844
|
-
});
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
handleInitialFocus() {
|
|
848
|
-
const [firstFocusable] = getFirstAndLastFocusable(this.element.nativeElement);
|
|
849
|
-
if (firstFocusable) {
|
|
850
|
-
firstFocusable.focus();
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
keepFocusWithinComponent(target, event) {
|
|
854
|
-
const wrapper = this.element.nativeElement;
|
|
855
|
-
const [firstFocusable, lastFocusable] = getFirstAndLastFocusable(wrapper);
|
|
856
|
-
const tabAfterLastFocusable = !event.shiftKey && target === lastFocusable;
|
|
857
|
-
const shiftTabAfterFirstFocusable = event.shiftKey && target === firstFocusable;
|
|
858
|
-
if (tabAfterLastFocusable) {
|
|
859
|
-
event.preventDefault();
|
|
860
|
-
firstFocusable.focus();
|
|
861
|
-
}
|
|
862
|
-
if (shiftTabAfterFirstFocusable) {
|
|
863
|
-
event.preventDefault();
|
|
864
|
-
lastFocusable.focus();
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
triggerItemClick(target, event) {
|
|
868
|
-
const itemIndex = getActionSheetItemIndex(target, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE, this.element.nativeElement);
|
|
869
|
-
const item = isPresent$1(itemIndex) ? this.items[itemIndex] : null;
|
|
870
|
-
if (!item || item.disabled) {
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
this.itemClick.emit({ item, originalEvent: event });
|
|
874
|
-
}
|
|
875
|
-
setExpanded(value) {
|
|
876
|
-
this.expanded = value;
|
|
877
|
-
this.expandedChange.emit(value);
|
|
878
|
-
if (this.expanded) {
|
|
879
|
-
this.cdr.detectChanges();
|
|
880
|
-
this.handleInitialFocus();
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
onAnimationEnd(currentExpanded) {
|
|
884
|
-
if (currentExpanded) {
|
|
885
|
-
this.expand.emit();
|
|
886
|
-
}
|
|
887
|
-
else {
|
|
888
|
-
this.setExpanded(false);
|
|
889
|
-
this.collapse.emit();
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
playAnimation(expanded) {
|
|
893
|
-
const duration = typeof this.animation !== 'boolean' && this.animation.duration ? this.animation.duration : DEFAULT_ANIMATION_CONFIG.duration;
|
|
894
|
-
const contentHeight = getComputedStyle(this.childContainer.nativeElement).height;
|
|
895
|
-
const animation = expanded ? slideUp(duration, contentHeight) : slideDown(duration, contentHeight);
|
|
896
|
-
const factory = this.builder.build(animation);
|
|
897
|
-
this.player = factory.create(this.childContainer.nativeElement);
|
|
898
|
-
this.player.onDone(() => {
|
|
899
|
-
if (this.player) {
|
|
900
|
-
this.animationEnd.emit();
|
|
901
|
-
this.player.destroy();
|
|
902
|
-
this.player = null;
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
this.player.play();
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
ActionSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i2.AnimationBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
909
|
-
ActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ActionSheetComponent, isStandalone: true, selector: "kendo-actionsheet", inputs: { title: "title", subtitle: "subtitle", items: "items", cssClass: "cssClass", animation: "animation", expanded: "expanded", titleId: "titleId" }, outputs: { expandedChange: "expandedChange", expand: "expand", collapse: "collapse", itemClick: "itemClick", overlayClick: "overlayClick" }, host: { properties: { "class.k-actionsheet-container": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
|
|
910
|
-
LocalizationService,
|
|
911
|
-
{
|
|
912
|
-
provide: L10N_PREFIX,
|
|
913
|
-
useValue: 'kendo.actionsheet.component'
|
|
914
|
-
}
|
|
915
|
-
], queries: [{ propertyName: "actionSheetTemplate", first: true, predicate: ActionSheetTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ActionSheetHeaderTemplateDirective, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ActionSheetContentTemplateDirective, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: ActionSheetItemTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ActionSheetFooterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "childContainer", first: true, predicate: ["childContainer"], descendants: true }], exportAs: ["kendoActionSheet"], usesOnChanges: true, ngImport: i0, template: `
|
|
916
|
-
<ng-container *ngIf="expanded">
|
|
917
|
-
<div class="k-overlay" (click)="onOverlayClick()"></div>
|
|
918
|
-
<div class="k-animation-container k-animation-container-shown">
|
|
919
|
-
<div #childContainer class="k-child-animation-container" [style]="'bottom: 0px; width: 100%;'">
|
|
920
|
-
<div class="k-actionsheet k-actionsheet-bottom"
|
|
921
|
-
[ngClass]="cssClass"
|
|
922
|
-
role="dialog"
|
|
923
|
-
aria-modal="true"
|
|
924
|
-
[attr.aria-labelledby]="titleId">
|
|
925
|
-
|
|
926
|
-
<ng-template *ngIf="actionSheetTemplate; else defaultTemplate"
|
|
927
|
-
[ngTemplateOutlet]="actionSheetTemplate?.templateRef">
|
|
928
|
-
</ng-template>
|
|
929
|
-
|
|
930
|
-
<ng-template #defaultTemplate>
|
|
931
|
-
<div *ngIf="title || subtitle || headerTemplate" class="k-actionsheet-titlebar">
|
|
932
|
-
<ng-template *ngIf="headerTemplate; else defaultHeaderTemplate"
|
|
933
|
-
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
934
|
-
</ng-template>
|
|
935
|
-
|
|
936
|
-
<ng-template #defaultHeaderTemplate>
|
|
937
|
-
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
938
|
-
<div class="k-actionsheet-title" [id]="titleId">
|
|
939
|
-
<div *ngIf="title" class="k-text-center">{{title}}</div>
|
|
940
|
-
<div *ngIf="subtitle" class="k-actionsheet-subtitle k-text-center">{{subtitle}}</div>
|
|
941
|
-
</div>
|
|
942
|
-
</div>
|
|
943
|
-
</ng-template>
|
|
944
|
-
</div>
|
|
945
|
-
|
|
946
|
-
<div *ngIf="items || contentTemplate" class="k-actionsheet-content">
|
|
947
|
-
<ng-template *ngIf="contentTemplate; else defaultContentTemplate"
|
|
948
|
-
[ngTemplateOutlet]="contentTemplate?.templateRef">
|
|
949
|
-
</ng-template>
|
|
950
|
-
<ng-template #defaultContentTemplate>
|
|
951
|
-
<div *ngIf="topGroupItems" kendoActionSheetList
|
|
952
|
-
class="k-list-ul"
|
|
953
|
-
role="group"
|
|
954
|
-
[groupItems]="topGroupItems"
|
|
955
|
-
[allItems]="items"
|
|
956
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
957
|
-
(itemClick)="onItemClick($event)">
|
|
958
|
-
</div>
|
|
959
|
-
|
|
960
|
-
<hr *ngIf="shouldRenderSeparator" class="k-hr"/>
|
|
961
|
-
|
|
962
|
-
<div *ngIf="bottomGroupItems" kendoActionSheetList
|
|
963
|
-
class="k-list-ul"
|
|
964
|
-
role="group"
|
|
965
|
-
[groupItems]="bottomGroupItems"
|
|
966
|
-
[allItems]="items"
|
|
967
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
968
|
-
(itemClick)="onItemClick($event)">
|
|
969
|
-
</div>
|
|
970
|
-
</ng-template>
|
|
971
|
-
</div>
|
|
972
|
-
<div *ngIf="footerTemplate" class="k-actionsheet-footer">
|
|
973
|
-
<ng-template
|
|
974
|
-
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
975
|
-
</ng-template>
|
|
976
|
-
</div>
|
|
977
|
-
</ng-template>
|
|
978
|
-
</div>
|
|
979
|
-
</div>
|
|
980
|
-
</div>
|
|
981
|
-
</ng-container>
|
|
982
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionSheetListComponent, selector: "[kendoActionSheetList]", inputs: ["groupItems", "allItems", "itemTemplate"], outputs: ["itemClick"] }] });
|
|
983
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetComponent, decorators: [{
|
|
984
|
-
type: Component,
|
|
985
|
-
args: [{
|
|
986
|
-
exportAs: 'kendoActionSheet',
|
|
987
|
-
selector: 'kendo-actionsheet',
|
|
988
|
-
template: `
|
|
989
|
-
<ng-container *ngIf="expanded">
|
|
990
|
-
<div class="k-overlay" (click)="onOverlayClick()"></div>
|
|
991
|
-
<div class="k-animation-container k-animation-container-shown">
|
|
992
|
-
<div #childContainer class="k-child-animation-container" [style]="'bottom: 0px; width: 100%;'">
|
|
993
|
-
<div class="k-actionsheet k-actionsheet-bottom"
|
|
994
|
-
[ngClass]="cssClass"
|
|
995
|
-
role="dialog"
|
|
996
|
-
aria-modal="true"
|
|
997
|
-
[attr.aria-labelledby]="titleId">
|
|
998
|
-
|
|
999
|
-
<ng-template *ngIf="actionSheetTemplate; else defaultTemplate"
|
|
1000
|
-
[ngTemplateOutlet]="actionSheetTemplate?.templateRef">
|
|
1001
|
-
</ng-template>
|
|
1002
|
-
|
|
1003
|
-
<ng-template #defaultTemplate>
|
|
1004
|
-
<div *ngIf="title || subtitle || headerTemplate" class="k-actionsheet-titlebar">
|
|
1005
|
-
<ng-template *ngIf="headerTemplate; else defaultHeaderTemplate"
|
|
1006
|
-
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
1007
|
-
</ng-template>
|
|
1008
|
-
|
|
1009
|
-
<ng-template #defaultHeaderTemplate>
|
|
1010
|
-
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
1011
|
-
<div class="k-actionsheet-title" [id]="titleId">
|
|
1012
|
-
<div *ngIf="title" class="k-text-center">{{title}}</div>
|
|
1013
|
-
<div *ngIf="subtitle" class="k-actionsheet-subtitle k-text-center">{{subtitle}}</div>
|
|
1014
|
-
</div>
|
|
1015
|
-
</div>
|
|
1016
|
-
</ng-template>
|
|
1017
|
-
</div>
|
|
1018
|
-
|
|
1019
|
-
<div *ngIf="items || contentTemplate" class="k-actionsheet-content">
|
|
1020
|
-
<ng-template *ngIf="contentTemplate; else defaultContentTemplate"
|
|
1021
|
-
[ngTemplateOutlet]="contentTemplate?.templateRef">
|
|
1022
|
-
</ng-template>
|
|
1023
|
-
<ng-template #defaultContentTemplate>
|
|
1024
|
-
<div *ngIf="topGroupItems" kendoActionSheetList
|
|
1025
|
-
class="k-list-ul"
|
|
1026
|
-
role="group"
|
|
1027
|
-
[groupItems]="topGroupItems"
|
|
1028
|
-
[allItems]="items"
|
|
1029
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
1030
|
-
(itemClick)="onItemClick($event)">
|
|
1031
|
-
</div>
|
|
1032
|
-
|
|
1033
|
-
<hr *ngIf="shouldRenderSeparator" class="k-hr"/>
|
|
1034
|
-
|
|
1035
|
-
<div *ngIf="bottomGroupItems" kendoActionSheetList
|
|
1036
|
-
class="k-list-ul"
|
|
1037
|
-
role="group"
|
|
1038
|
-
[groupItems]="bottomGroupItems"
|
|
1039
|
-
[allItems]="items"
|
|
1040
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
1041
|
-
(itemClick)="onItemClick($event)">
|
|
1042
|
-
</div>
|
|
1043
|
-
</ng-template>
|
|
1044
|
-
</div>
|
|
1045
|
-
<div *ngIf="footerTemplate" class="k-actionsheet-footer">
|
|
1046
|
-
<ng-template
|
|
1047
|
-
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
1048
|
-
</ng-template>
|
|
1049
|
-
</div>
|
|
1050
|
-
</ng-template>
|
|
1051
|
-
</div>
|
|
1052
|
-
</div>
|
|
1053
|
-
</div>
|
|
1054
|
-
</ng-container>
|
|
1055
|
-
`,
|
|
1056
|
-
providers: [
|
|
1057
|
-
LocalizationService,
|
|
1058
|
-
{
|
|
1059
|
-
provide: L10N_PREFIX,
|
|
1060
|
-
useValue: 'kendo.actionsheet.component'
|
|
1061
|
-
}
|
|
1062
|
-
],
|
|
1063
|
-
standalone: true,
|
|
1064
|
-
imports: [NgIf, NgClass, NgTemplateOutlet, ActionSheetListComponent]
|
|
1065
|
-
}]
|
|
1066
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i2.AnimationBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
1067
|
-
type: HostBinding,
|
|
1068
|
-
args: ['class.k-actionsheet-container']
|
|
1069
|
-
}], direction: [{
|
|
1070
|
-
type: HostBinding,
|
|
1071
|
-
args: ['attr.dir']
|
|
1072
|
-
}], title: [{
|
|
1073
|
-
type: Input
|
|
1074
|
-
}], subtitle: [{
|
|
1075
|
-
type: Input
|
|
1076
|
-
}], items: [{
|
|
1077
|
-
type: Input
|
|
1078
|
-
}], cssClass: [{
|
|
1079
|
-
type: Input
|
|
1080
|
-
}], animation: [{
|
|
1081
|
-
type: Input
|
|
1082
|
-
}], expanded: [{
|
|
1083
|
-
type: Input
|
|
1084
|
-
}], titleId: [{
|
|
1085
|
-
type: Input
|
|
1086
|
-
}], expandedChange: [{
|
|
1087
|
-
type: Output
|
|
1088
|
-
}], expand: [{
|
|
1089
|
-
type: Output
|
|
1090
|
-
}], collapse: [{
|
|
1091
|
-
type: Output
|
|
1092
|
-
}], itemClick: [{
|
|
1093
|
-
type: Output
|
|
1094
|
-
}], overlayClick: [{
|
|
1095
|
-
type: Output
|
|
1096
|
-
}], childContainer: [{
|
|
1097
|
-
type: ViewChild,
|
|
1098
|
-
args: ['childContainer']
|
|
1099
|
-
}], actionSheetTemplate: [{
|
|
1100
|
-
type: ContentChild,
|
|
1101
|
-
args: [ActionSheetTemplateDirective]
|
|
1102
|
-
}], headerTemplate: [{
|
|
1103
|
-
type: ContentChild,
|
|
1104
|
-
args: [ActionSheetHeaderTemplateDirective]
|
|
1105
|
-
}], contentTemplate: [{
|
|
1106
|
-
type: ContentChild,
|
|
1107
|
-
args: [ActionSheetContentTemplateDirective]
|
|
1108
|
-
}], itemTemplate: [{
|
|
1109
|
-
type: ContentChild,
|
|
1110
|
-
args: [ActionSheetItemTemplateDirective]
|
|
1111
|
-
}], footerTemplate: [{
|
|
1112
|
-
type: ContentChild,
|
|
1113
|
-
args: [ActionSheetFooterTemplateDirective]
|
|
1114
|
-
}] } });
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* @hidden
|
|
1118
|
-
*/
|
|
1119
|
-
class PreventableEvent {
|
|
1120
|
-
/**
|
|
1121
|
-
* @hidden
|
|
1122
|
-
*/
|
|
1123
|
-
constructor(args) {
|
|
1124
|
-
this.prevented = false;
|
|
1125
|
-
Object.assign(this, args);
|
|
1126
|
-
}
|
|
1127
|
-
/**
|
|
1128
|
-
* Prevents the default action for a specified event.
|
|
1129
|
-
* In this way, the source component suppresses
|
|
1130
|
-
* the built-in behavior that follows the event.
|
|
1131
|
-
*/
|
|
1132
|
-
preventDefault() {
|
|
1133
|
-
this.prevented = true;
|
|
1134
|
-
}
|
|
1135
|
-
/**
|
|
1136
|
-
* Returns `true` if the event was prevented
|
|
1137
|
-
* by any of its subscribers.
|
|
1138
|
-
*
|
|
1139
|
-
* @returns `true` if the default action was prevented.
|
|
1140
|
-
* Otherwise, returns `false`.
|
|
1141
|
-
*/
|
|
1142
|
-
isDefaultPrevented() {
|
|
1143
|
-
return this.prevented;
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
* Arguments for the `select` event of the BottomNavigation.
|
|
1149
|
-
*/
|
|
1150
|
-
class BottomNavigationSelectEvent extends PreventableEvent {
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* Represents a template that defines the item content of the BottomNavigation.
|
|
1155
|
-
* To define the template, nest an `<ng-template>` tag
|
|
1156
|
-
* with the `kendoBottomNavigationItemTemplate` directive inside the `<kendo-bottomnavigation>` tag ([see example]({% slug templates_bottomnavigation %})).
|
|
1157
|
-
*/
|
|
1158
|
-
class BottomNavigationItemTemplateDirective {
|
|
1159
|
-
constructor(templateRef) {
|
|
1160
|
-
this.templateRef = templateRef;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
BottomNavigationItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1164
|
-
BottomNavigationItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: BottomNavigationItemTemplateDirective, isStandalone: true, selector: "[kendoBottomNavigationItemTemplate]", ngImport: i0 });
|
|
1165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationItemTemplateDirective, decorators: [{
|
|
1166
|
-
type: Directive,
|
|
1167
|
-
args: [{
|
|
1168
|
-
selector: '[kendoBottomNavigationItemTemplate]',
|
|
1169
|
-
standalone: true
|
|
1170
|
-
}]
|
|
1171
|
-
}], ctorParameters: function () {
|
|
1172
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
1173
|
-
type: Optional
|
|
1174
|
-
}] }];
|
|
1175
|
-
} });
|
|
1176
|
-
|
|
1177
|
-
const closestInScope = (target, targetAttr, predicate, scope) => {
|
|
1178
|
-
while (target && target !== scope && !predicate(target, targetAttr)) {
|
|
1179
|
-
target = target.parentNode;
|
|
1180
|
-
}
|
|
1181
|
-
if (target !== scope) {
|
|
1182
|
-
return target;
|
|
1183
|
-
}
|
|
1184
|
-
};
|
|
1185
|
-
const hasItemIndex = (item, indexAttr) => isPresent(item.getAttribute(indexAttr));
|
|
1186
|
-
/**
|
|
1187
|
-
* @hidden
|
|
1188
|
-
*/
|
|
1189
|
-
const itemIndex = (item, indexAttr) => +item.getAttribute(indexAttr);
|
|
1190
|
-
/**
|
|
1191
|
-
* @hidden
|
|
1192
|
-
*/
|
|
1193
|
-
const closestItem = (target, targetAttr, scope) => closestInScope(target, targetAttr, hasItemIndex, scope);
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* @hidden
|
|
1197
|
-
*/
|
|
1198
|
-
const BOTTOMNAVIGATION_ITEM_INDEX = 'data-kendo-bottomnavigation-index';
|
|
1199
|
-
/**
|
|
1200
|
-
* @hidden
|
|
1201
|
-
*/
|
|
1202
|
-
const colors = ['primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse'];
|
|
1203
|
-
|
|
1204
|
-
/**
|
|
1205
|
-
* @hidden
|
|
1206
|
-
*/
|
|
1207
|
-
class BottomNavigationItemComponent {
|
|
1208
|
-
get disabledClass() {
|
|
1209
|
-
return this.item.disabled;
|
|
1210
|
-
}
|
|
1211
|
-
get label() {
|
|
1212
|
-
return this.item.text ? this.item.text : null;
|
|
1213
|
-
}
|
|
1214
|
-
get tabindex() {
|
|
1215
|
-
return this.item.tabIndex ? this.item.tabIndex : 0;
|
|
1216
|
-
}
|
|
1217
|
-
get selectedClass() {
|
|
1218
|
-
return this.selectedIdx ? this.selectedIdx === this.index : this.item.selected;
|
|
1219
|
-
}
|
|
1220
|
-
get itemIcon() {
|
|
1221
|
-
return Boolean(this.item.icon || this.item.iconClass || this.item.svgIcon);
|
|
1222
|
-
}
|
|
1223
|
-
get iconClasses() {
|
|
1224
|
-
const kendoIcon = this.item.icon ? `k-icon k-i-${this.item.icon}` : '';
|
|
1225
|
-
const customIcon = this.item.iconClass ? this.item.iconClass : '';
|
|
1226
|
-
return `${kendoIcon} ${customIcon}`;
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
BottomNavigationItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1230
|
-
BottomNavigationItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BottomNavigationItemComponent, isStandalone: true, selector: "[kendoBottomNavigationItem]", inputs: { itemTemplate: "itemTemplate", item: "item", index: "index", disabledComponent: "disabledComponent", selectedIdx: "selectedIdx", orientation: "orientation" }, host: { properties: { "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.aria-label": "this.label", "attr.tabindex": "this.tabindex", "attr.aria-current": "this.selectedClass", "class.k-selected": "this.selectedClass" } }, ngImport: i0, template: `
|
|
1231
|
-
<ng-container *ngIf="!itemTemplate">
|
|
1232
|
-
<kendo-icon-wrapper *ngIf="itemIcon"
|
|
1233
|
-
innerCssClass="k-bottom-nav-item-icon"
|
|
1234
|
-
size="xlarge"
|
|
1235
|
-
[name]="item.icon"
|
|
1236
|
-
[customFontClass]="item.iconClass"
|
|
1237
|
-
[svgIcon]="item.svgIcon"></kendo-icon-wrapper>
|
|
1238
|
-
<span *ngIf="item.text" class="k-bottom-nav-item-text">{{item.text}}</span>
|
|
1239
|
-
</ng-container>
|
|
1240
|
-
<ng-template *ngIf="itemTemplate"
|
|
1241
|
-
[ngTemplateOutlet]="itemTemplate?.templateRef"
|
|
1242
|
-
[ngTemplateOutletContext]="{ $implicit: item }">
|
|
1243
|
-
</ng-template>
|
|
1244
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationItemComponent, decorators: [{
|
|
1246
|
-
type: Component,
|
|
1247
|
-
args: [{
|
|
1248
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1249
|
-
selector: '[kendoBottomNavigationItem]',
|
|
1250
|
-
template: `
|
|
1251
|
-
<ng-container *ngIf="!itemTemplate">
|
|
1252
|
-
<kendo-icon-wrapper *ngIf="itemIcon"
|
|
1253
|
-
innerCssClass="k-bottom-nav-item-icon"
|
|
1254
|
-
size="xlarge"
|
|
1255
|
-
[name]="item.icon"
|
|
1256
|
-
[customFontClass]="item.iconClass"
|
|
1257
|
-
[svgIcon]="item.svgIcon"></kendo-icon-wrapper>
|
|
1258
|
-
<span *ngIf="item.text" class="k-bottom-nav-item-text">{{item.text}}</span>
|
|
1259
|
-
</ng-container>
|
|
1260
|
-
<ng-template *ngIf="itemTemplate"
|
|
1261
|
-
[ngTemplateOutlet]="itemTemplate?.templateRef"
|
|
1262
|
-
[ngTemplateOutletContext]="{ $implicit: item }">
|
|
1263
|
-
</ng-template>
|
|
1264
|
-
`,
|
|
1265
|
-
standalone: true,
|
|
1266
|
-
imports: [NgIf, IconWrapperComponent, NgTemplateOutlet]
|
|
1267
|
-
}]
|
|
1268
|
-
}], propDecorators: { itemTemplate: [{
|
|
1269
|
-
type: Input
|
|
1270
|
-
}], item: [{
|
|
1271
|
-
type: Input
|
|
1272
|
-
}], index: [{
|
|
1273
|
-
type: Input
|
|
1274
|
-
}], disabledComponent: [{
|
|
1275
|
-
type: Input
|
|
1276
|
-
}], selectedIdx: [{
|
|
1277
|
-
type: Input
|
|
1278
|
-
}], orientation: [{
|
|
1279
|
-
type: Input
|
|
1280
|
-
}], disabledClass: [{
|
|
1281
|
-
type: HostBinding,
|
|
1282
|
-
args: ['attr.aria-disabled']
|
|
1283
|
-
}, {
|
|
1284
|
-
type: HostBinding,
|
|
1285
|
-
args: ['class.k-disabled']
|
|
1286
|
-
}], label: [{
|
|
1287
|
-
type: HostBinding,
|
|
1288
|
-
args: ['attr.aria-label']
|
|
1289
|
-
}], tabindex: [{
|
|
1290
|
-
type: HostBinding,
|
|
1291
|
-
args: ['attr.tabindex']
|
|
1292
|
-
}], selectedClass: [{
|
|
1293
|
-
type: HostBinding,
|
|
1294
|
-
args: ['attr.aria-current']
|
|
1295
|
-
}, {
|
|
1296
|
-
type: HostBinding,
|
|
1297
|
-
args: ['class.k-selected']
|
|
1298
|
-
}] } });
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* Represents the [Kendo UI BottomNavigation component for Angular]({% slug overview_bottomnavigation %}).
|
|
1302
|
-
*
|
|
1303
|
-
* @example
|
|
1304
|
-
* ```ts-no-run
|
|
1305
|
-
* _@Component({
|
|
1306
|
-
* selector: 'my-app',
|
|
1307
|
-
* template: `
|
|
1308
|
-
* <kendo-bottomnavigation [items]="items"></kendo-bottomnavigation>
|
|
1309
|
-
* `
|
|
1310
|
-
* })
|
|
1311
|
-
* class AppComponent {
|
|
1312
|
-
* public items: Array<any> = [
|
|
1313
|
-
* { text: 'Inbox', icon: 'envelop', selected: true },
|
|
1314
|
-
* { text: 'Calendar', icon: 'calendar'},
|
|
1315
|
-
* { text: 'Profile', icon: 'user'}
|
|
1316
|
-
* ]
|
|
1317
|
-
* }
|
|
1318
|
-
* ```
|
|
1319
|
-
*/
|
|
1320
|
-
class BottomNavigationComponent {
|
|
1321
|
-
constructor(localization, hostElement, ngZone, changeDetector, renderer) {
|
|
1322
|
-
this.localization = localization;
|
|
1323
|
-
this.hostElement = hostElement;
|
|
1324
|
-
this.ngZone = ngZone;
|
|
1325
|
-
this.changeDetector = changeDetector;
|
|
1326
|
-
this.renderer = renderer;
|
|
1327
|
-
/**
|
|
1328
|
-
* Sets a top border to the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
1329
|
-
*
|
|
1330
|
-
* @default false
|
|
1331
|
-
*/
|
|
1332
|
-
this.border = false;
|
|
1333
|
-
/**
|
|
1334
|
-
* Disables the whole BottomNavigation.
|
|
1335
|
-
*
|
|
1336
|
-
* @default false
|
|
1337
|
-
*/
|
|
1338
|
-
this.disabled = false;
|
|
1339
|
-
/**
|
|
1340
|
-
* Fires each time an item is selected. This event is preventable.
|
|
1341
|
-
*/
|
|
1342
|
-
this.select = new EventEmitter();
|
|
1343
|
-
/**
|
|
1344
|
-
* @hidden
|
|
1345
|
-
*/
|
|
1346
|
-
this.hostClass = true;
|
|
1347
|
-
/**
|
|
1348
|
-
* @hidden
|
|
1349
|
-
*/
|
|
1350
|
-
this.role = 'navigation';
|
|
1351
|
-
this._fill = 'flat';
|
|
1352
|
-
this._itemFlow = 'vertical';
|
|
1353
|
-
this._positionMode = 'fixed';
|
|
1354
|
-
this._themeColor = 'primary';
|
|
1355
|
-
this._nativeHostElement = this.hostElement.nativeElement;
|
|
1356
|
-
this.subscriptions = new Subscription();
|
|
1357
|
-
this.rtl = false;
|
|
1358
|
-
validatePackage(packageMetadata);
|
|
1359
|
-
this.dynamicRTLSubscription = this.localization.changes.subscribe(({ rtl }) => {
|
|
1360
|
-
this.rtl = rtl;
|
|
1361
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
1362
|
-
});
|
|
1363
|
-
}
|
|
1364
|
-
/**
|
|
1365
|
-
* The fill style of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
1366
|
-
*
|
|
1367
|
-
* * The possible values are:
|
|
1368
|
-
* * (Default) `flat`
|
|
1369
|
-
* * `solid`
|
|
1370
|
-
*/
|
|
1371
|
-
set fill(fill) {
|
|
1372
|
-
this.renderer.removeClass(this._nativeHostElement, `k-bottom-nav-${this.fill}`);
|
|
1373
|
-
this.renderer.removeClass(this._nativeHostElement, `k-bottom-nav-${this.fill}-${this.themeColor}`);
|
|
1374
|
-
this._fill = fill === 'solid' ? 'solid' : 'flat';
|
|
1375
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-${this._fill}`);
|
|
1376
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-${this._fill}-${this.themeColor}`);
|
|
1377
|
-
}
|
|
1378
|
-
get fill() {
|
|
1379
|
-
return this._fill;
|
|
1380
|
-
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Specifies how the icon and text label are positioned in the BottomNavigation items.
|
|
1383
|
-
*
|
|
1384
|
-
* The possible values are:
|
|
1385
|
-
* * (Default) `vertical` - Renders the text below the icon.
|
|
1386
|
-
* * `horizontal` - Renders the icon and the text on the same line.
|
|
1387
|
-
*/
|
|
1388
|
-
set itemFlow(itemFlow) {
|
|
1389
|
-
this.renderer.removeClass(this._nativeHostElement, `k-bottom-nav-item-flow-${this.itemFlow}`);
|
|
1390
|
-
this._itemFlow = itemFlow === 'horizontal' ? 'horizontal' : 'vertical';
|
|
1391
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-item-flow-${this._itemFlow}`);
|
|
1392
|
-
}
|
|
1393
|
-
get itemFlow() {
|
|
1394
|
-
return this._itemFlow;
|
|
1395
|
-
}
|
|
1396
|
-
/**
|
|
1397
|
-
* Specifies the position and behavior of the BottomNavigation when the page is scrollable ([see example]({% slug positioning_bottomnavigation %})).
|
|
1398
|
-
*
|
|
1399
|
-
* The possible values are:
|
|
1400
|
-
* * (Default) `fixed` - The BottomNavigation always stays at the bottom of the viewport, regardless of the page scroll position.
|
|
1401
|
-
* * `sticky` - Positions the BottomNavigation at the end of the scrollable container.
|
|
1402
|
-
*/
|
|
1403
|
-
set positionMode(positionMode) {
|
|
1404
|
-
this.renderer.removeClass(this._nativeHostElement, `k-pos-${this.positionMode}`);
|
|
1405
|
-
this._positionMode = positionMode === 'sticky' ? 'sticky' : 'fixed';
|
|
1406
|
-
this.renderer.addClass(this._nativeHostElement, `k-pos-${this._positionMode}`);
|
|
1407
|
-
}
|
|
1408
|
-
get positionMode() {
|
|
1409
|
-
return this._positionMode;
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* Specifies the theme color of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
1413
|
-
*
|
|
1414
|
-
* * The possible values are:
|
|
1415
|
-
* * (Default) `primary` - Applies coloring based on the primary theme color.
|
|
1416
|
-
* * `secondary` - Applies coloring based on the secondary theme color.
|
|
1417
|
-
* * `tertiary` - Applies coloring based on the tertiary theme color.
|
|
1418
|
-
* * `info` - Applies coloring based on the info theme color.
|
|
1419
|
-
* * `success` - Applies coloring based on the success theme color.
|
|
1420
|
-
* * `warning` - Applies coloring based on the warning theme color.
|
|
1421
|
-
* * `error` - Applies coloring based on the error theme color.
|
|
1422
|
-
* * `dark` - Applies coloring based on the dark theme color.
|
|
1423
|
-
* * `light` - Applies coloring based on the light theme color.
|
|
1424
|
-
* * `inverse` - Applies coloring based on the inverted theme color.
|
|
1425
|
-
*/
|
|
1426
|
-
set themeColor(themeColor) {
|
|
1427
|
-
const newColor = colors.find(color => color === themeColor);
|
|
1428
|
-
if (newColor) {
|
|
1429
|
-
this.renderer.removeClass(this._nativeHostElement, `k-bottom-nav-${this.fill}-${this._themeColor}`);
|
|
1430
|
-
this._themeColor = themeColor;
|
|
1431
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-${this.fill}-${this._themeColor}`);
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
get themeColor() {
|
|
1435
|
-
return this._themeColor;
|
|
1436
|
-
}
|
|
1437
|
-
/**
|
|
1438
|
-
* @hidden
|
|
1439
|
-
*/
|
|
1440
|
-
get borderClass() {
|
|
1441
|
-
return this.border;
|
|
1442
|
-
}
|
|
1443
|
-
/**
|
|
1444
|
-
* @hidden
|
|
1445
|
-
*/
|
|
1446
|
-
get disabledClass() {
|
|
1447
|
-
return this.disabled;
|
|
1448
|
-
}
|
|
1449
|
-
/**
|
|
1450
|
-
* @hidden
|
|
1451
|
-
*/
|
|
1452
|
-
ngOnInit() {
|
|
1453
|
-
this.initDomEvents();
|
|
1454
|
-
}
|
|
1455
|
-
/**
|
|
1456
|
-
* @hidden
|
|
1457
|
-
*/
|
|
1458
|
-
ngAfterViewInit() {
|
|
1459
|
-
this.applyClasses();
|
|
1460
|
-
}
|
|
1461
|
-
/**
|
|
1462
|
-
* @hidden
|
|
1463
|
-
*/
|
|
1464
|
-
ngOnDestroy() {
|
|
1465
|
-
if (this.dynamicRTLSubscription) {
|
|
1466
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
1467
|
-
}
|
|
1468
|
-
this.subscriptions.unsubscribe();
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* @hidden
|
|
1472
|
-
*/
|
|
1473
|
-
selectItem(idx, args) {
|
|
1474
|
-
const eventArgs = new BottomNavigationSelectEvent(Object.assign({}, args));
|
|
1475
|
-
this.select.emit(eventArgs);
|
|
1476
|
-
if (!eventArgs.isDefaultPrevented()) {
|
|
1477
|
-
this.selectedIdx = idx;
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
applyClasses() {
|
|
1481
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-${this.fill}`);
|
|
1482
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-item-flow-${this.itemFlow}`);
|
|
1483
|
-
this.renderer.addClass(this._nativeHostElement, `k-pos-${this.positionMode}`);
|
|
1484
|
-
this.renderer.addClass(this._nativeHostElement, `k-bottom-nav-${this.fill}-${this.themeColor}`);
|
|
1485
|
-
}
|
|
1486
|
-
initDomEvents() {
|
|
1487
|
-
if (!this.hostElement) {
|
|
1488
|
-
return;
|
|
1489
|
-
}
|
|
1490
|
-
this.ngZone.runOutsideAngular(() => {
|
|
1491
|
-
this.subscriptions.add(this.renderer.listen(this._nativeHostElement, 'click', this.clickHandler.bind(this)));
|
|
1492
|
-
this.subscriptions.add(this.renderer.listen(this._nativeHostElement, 'keydown', this.keyDownHandler.bind(this)));
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
clickHandler(e) {
|
|
1496
|
-
const itemIdx = this.getBottomNavigationItemIndex(e.target);
|
|
1497
|
-
const item = this.items[itemIdx];
|
|
1498
|
-
if (!item) {
|
|
1499
|
-
return;
|
|
1500
|
-
}
|
|
1501
|
-
if (item.disabled) {
|
|
1502
|
-
e.preventDefault();
|
|
1503
|
-
return;
|
|
1504
|
-
}
|
|
1505
|
-
const args = {
|
|
1506
|
-
index: itemIdx,
|
|
1507
|
-
item: item,
|
|
1508
|
-
originalEvent: e,
|
|
1509
|
-
sender: this
|
|
1510
|
-
};
|
|
1511
|
-
this.ngZone.run(() => {
|
|
1512
|
-
this.selectItem(itemIdx, args);
|
|
1513
|
-
this.changeDetector.markForCheck();
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
keyDownHandler(e) {
|
|
1517
|
-
const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
|
|
1518
|
-
if (!isEnterOrSpace) {
|
|
1519
|
-
return;
|
|
1520
|
-
}
|
|
1521
|
-
this.clickHandler(e);
|
|
1522
|
-
}
|
|
1523
|
-
getBottomNavigationItemIndex(target) {
|
|
1524
|
-
const item = closestItem(target, BOTTOMNAVIGATION_ITEM_INDEX, this._nativeHostElement);
|
|
1525
|
-
if (item) {
|
|
1526
|
-
return itemIndex(item, BOTTOMNAVIGATION_ITEM_INDEX);
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
BottomNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1531
|
-
BottomNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BottomNavigationComponent, isStandalone: true, selector: "kendo-bottomnavigation", inputs: { items: "items", border: "border", disabled: "disabled", fill: "fill", itemFlow: "itemFlow", positionMode: "positionMode", themeColor: "themeColor" }, outputs: { select: "select" }, host: { properties: { "class.k-bottom-nav": "this.hostClass", "class.k-bottom-nav-border": "this.borderClass", "class.k-disabled": "this.disabledClass", "attr.role": "this.role", "attr.dir": "this.direction" } }, providers: [
|
|
1532
|
-
LocalizationService,
|
|
1533
|
-
{
|
|
1534
|
-
provide: L10N_PREFIX,
|
|
1535
|
-
useValue: 'kendo.bottomnavigation'
|
|
1536
|
-
}
|
|
1537
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: BottomNavigationItemTemplateDirective, descendants: true }], exportAs: ["kendoBottomNavigation"], ngImport: i0, template: "\n <ng-container *ngIf=\"items\">\n <span kendoBottomNavigationItem\n *ngFor=\"let item of items; let idx=index\"\n role=\"link\"\n class=\"k-bottom-nav-item\"\n [disabledComponent]=\"disabled\"\n [item]=\"item\"\n [index]=\"idx\"\n [selectedIdx]=\"selectedIdx\"\n [itemTemplate]=\"itemTemplate\"\n [attr.data-kendo-bottomnavigation-index]=\"idx\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n [orientation]=\"itemFlow\">\n </span>\n </ng-container>\n ", isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: BottomNavigationItemComponent, selector: "[kendoBottomNavigationItem]", inputs: ["itemTemplate", "item", "index", "disabledComponent", "selectedIdx", "orientation"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationComponent, decorators: [{
|
|
1539
|
-
type: Component,
|
|
1540
|
-
args: [{
|
|
1541
|
-
exportAs: 'kendoBottomNavigation',
|
|
1542
|
-
selector: 'kendo-bottomnavigation',
|
|
1543
|
-
providers: [
|
|
1544
|
-
LocalizationService,
|
|
1545
|
-
{
|
|
1546
|
-
provide: L10N_PREFIX,
|
|
1547
|
-
useValue: 'kendo.bottomnavigation'
|
|
1548
|
-
}
|
|
1549
|
-
],
|
|
1550
|
-
template: `
|
|
1551
|
-
<ng-container *ngIf="items">
|
|
1552
|
-
<span kendoBottomNavigationItem
|
|
1553
|
-
*ngFor="let item of items; let idx=index"
|
|
1554
|
-
role="link"
|
|
1555
|
-
class="k-bottom-nav-item"
|
|
1556
|
-
[disabledComponent]="disabled"
|
|
1557
|
-
[item]="item"
|
|
1558
|
-
[index]="idx"
|
|
1559
|
-
[selectedIdx]="selectedIdx"
|
|
1560
|
-
[itemTemplate]="itemTemplate"
|
|
1561
|
-
[attr.${BOTTOMNAVIGATION_ITEM_INDEX}]="idx"
|
|
1562
|
-
[ngClass]="item.cssClass"
|
|
1563
|
-
[ngStyle]="item.cssStyle"
|
|
1564
|
-
[orientation]="itemFlow">
|
|
1565
|
-
</span>
|
|
1566
|
-
</ng-container>
|
|
1567
|
-
`,
|
|
1568
|
-
standalone: true,
|
|
1569
|
-
imports: [NgIf, NgFor, BottomNavigationItemComponent, NgClass, NgStyle]
|
|
1570
|
-
}]
|
|
1571
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { items: [{
|
|
1572
|
-
type: Input
|
|
1573
|
-
}], border: [{
|
|
1574
|
-
type: Input
|
|
1575
|
-
}], disabled: [{
|
|
1576
|
-
type: Input
|
|
1577
|
-
}], fill: [{
|
|
1578
|
-
type: Input
|
|
1579
|
-
}], itemFlow: [{
|
|
1580
|
-
type: Input
|
|
1581
|
-
}], positionMode: [{
|
|
1582
|
-
type: Input
|
|
1583
|
-
}], themeColor: [{
|
|
1584
|
-
type: Input
|
|
1585
|
-
}], select: [{
|
|
1586
|
-
type: Output
|
|
1587
|
-
}], hostClass: [{
|
|
1588
|
-
type: HostBinding,
|
|
1589
|
-
args: ['class.k-bottom-nav']
|
|
1590
|
-
}], borderClass: [{
|
|
1591
|
-
type: HostBinding,
|
|
1592
|
-
args: ['class.k-bottom-nav-border']
|
|
1593
|
-
}], disabledClass: [{
|
|
1594
|
-
type: HostBinding,
|
|
1595
|
-
args: ['class.k-disabled']
|
|
1596
|
-
}], role: [{
|
|
1597
|
-
type: HostBinding,
|
|
1598
|
-
args: ['attr.role']
|
|
1599
|
-
}], direction: [{
|
|
1600
|
-
type: HostBinding,
|
|
1601
|
-
args: ['attr.dir']
|
|
1602
|
-
}], itemTemplate: [{
|
|
1603
|
-
type: ContentChild,
|
|
1604
|
-
args: [BottomNavigationItemTemplateDirective, { static: false }]
|
|
1605
|
-
}] } });
|
|
1606
|
-
|
|
1607
|
-
/**
|
|
1608
|
-
* Represents a template that defines the content of a Breadcrumb item.
|
|
1609
|
-
* To define the template, nest an `<ng-template>` tag with the `kendoBreadCrumbItemTemplate` directive inside the `<kendo-breadcrumb>` tag.
|
|
1610
|
-
*
|
|
1611
|
-
* For more information and example refer to the [Templates]({% slug templates_breadcrumb %}) article.
|
|
1612
|
-
*/
|
|
1613
|
-
class BreadCrumbItemTemplateDirective {
|
|
1614
|
-
constructor(templateRef) {
|
|
1615
|
-
this.templateRef = templateRef;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
BreadCrumbItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1619
|
-
BreadCrumbItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: BreadCrumbItemTemplateDirective, isStandalone: true, selector: "[kendoBreadCrumbItemTemplate]", ngImport: i0 });
|
|
1620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbItemTemplateDirective, decorators: [{
|
|
1621
|
-
type: Directive,
|
|
1622
|
-
args: [{
|
|
1623
|
-
selector: '[kendoBreadCrumbItemTemplate]',
|
|
1624
|
-
standalone: true
|
|
1625
|
-
}]
|
|
1626
|
-
}], ctorParameters: function () {
|
|
1627
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
|
1628
|
-
type: Optional
|
|
1629
|
-
}] }];
|
|
1630
|
-
} });
|
|
1631
|
-
|
|
1632
|
-
/**
|
|
1633
|
-
* @hidden
|
|
1634
|
-
*/
|
|
1635
|
-
const BREADCRUMB_ITEM_INDEX = 'data-kendo-breadcrumb-index';
|
|
1636
|
-
/**
|
|
1637
|
-
* @hidden
|
|
1638
|
-
*/
|
|
1639
|
-
const DEFAULT_SIZE = 'medium';
|
|
1640
|
-
const SIZES = {
|
|
1641
|
-
small: 'sm',
|
|
1642
|
-
medium: 'md',
|
|
1643
|
-
large: 'lg'
|
|
1644
|
-
};
|
|
1645
|
-
/**
|
|
1646
|
-
* @hidden
|
|
1647
|
-
*
|
|
1648
|
-
* Returns the styling classes to be added and removed
|
|
1649
|
-
*/
|
|
1650
|
-
const getStylingClasses = (stylingOption, previousValue, newValue) => {
|
|
1651
|
-
switch (stylingOption) {
|
|
1652
|
-
case 'size':
|
|
1653
|
-
return {
|
|
1654
|
-
toRemove: `k-breadcrumb-${SIZES[previousValue]}`,
|
|
1655
|
-
toAdd: newValue !== 'none' ? `k-breadcrumb-${SIZES[newValue]}` : ''
|
|
1656
|
-
};
|
|
1657
|
-
default:
|
|
1658
|
-
break;
|
|
1659
|
-
}
|
|
1660
|
-
};
|
|
1661
|
-
|
|
1662
|
-
/**
|
|
1663
|
-
* @hidden
|
|
1664
|
-
*/
|
|
1665
|
-
class BreadCrumbItemComponent {
|
|
1666
|
-
constructor(el) {
|
|
1667
|
-
this.el = el;
|
|
1668
|
-
this.index = -1;
|
|
1669
|
-
this.hostClasses = true;
|
|
1670
|
-
this.disabled = false;
|
|
1671
|
-
}
|
|
1672
|
-
get isRootItem() {
|
|
1673
|
-
return this.item.context.isFirst;
|
|
1674
|
-
}
|
|
1675
|
-
get isDisabled() {
|
|
1676
|
-
return this.disabled || null;
|
|
1677
|
-
}
|
|
1678
|
-
get isLastItem() {
|
|
1679
|
-
return this.item.context.isLast;
|
|
1680
|
-
}
|
|
1681
|
-
ngOnInit() {
|
|
1682
|
-
this.disabled = this.item.data && (this.item.data.disabled || this.item.context.isLast);
|
|
1683
|
-
}
|
|
1684
|
-
ngAfterViewInit() {
|
|
1685
|
-
if (isDocumentAvailable()) {
|
|
1686
|
-
this.width = outerWidth(this.el.nativeElement);
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
onImageLoad() {
|
|
1690
|
-
if (isDocumentAvailable()) {
|
|
1691
|
-
this.width = outerWidth(this.el.nativeElement);
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
BreadCrumbItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1696
|
-
BreadCrumbItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: `
|
|
1697
|
-
<ng-template #separator>
|
|
1698
|
-
<ng-content select="[kendoBreadCrumbSeparator]"></ng-content>
|
|
1699
|
-
</ng-template>
|
|
1700
|
-
|
|
1701
|
-
<ng-container *ngIf="collapseMode === 'wrap'">
|
|
1702
|
-
<ng-container *ngTemplateOutlet="separator"></ng-container>
|
|
1703
|
-
</ng-container>
|
|
1704
|
-
|
|
1705
|
-
<ng-container *ngIf="!item.context.collapsed">
|
|
1706
|
-
<span
|
|
1707
|
-
*ngIf="!itemTemplate"
|
|
1708
|
-
[ngClass]="{
|
|
1709
|
-
'k-breadcrumb-root-link': item.context.isFirst,
|
|
1710
|
-
'k-breadcrumb-link': index !== 0,
|
|
1711
|
-
'k-breadcrumb-icontext-link': !!item.data.icon && !!item.data.text,
|
|
1712
|
-
'k-breadcrumb-icon-link': !!item.data.icon && !item.data.text,
|
|
1713
|
-
'k-disabled': disabled
|
|
1714
|
-
}"
|
|
1715
|
-
[title]="item.data.title || ''"
|
|
1716
|
-
[tabindex]="disabled ? -1 : 0"
|
|
1717
|
-
[attr.aria-disabled]="disabled"
|
|
1718
|
-
[attr.aria-current]="item.context.isLast ? 'page' : null"
|
|
1719
|
-
role="link"
|
|
1720
|
-
>
|
|
1721
|
-
<img *ngIf="item.data.imageUrl" (load)="onImageLoad()" [src]="item.data.imageUrl" class="k-image" role="presentation" />
|
|
1722
|
-
<kendo-icon-wrapper *ngIf="item.data.icon || item.data.iconClass || item.data.svgIcon"
|
|
1723
|
-
[name]="item.data.icon"
|
|
1724
|
-
[customFontClass]="item.data.iconClass"
|
|
1725
|
-
[svgIcon]="item.data.svgIcon"
|
|
1726
|
-
>
|
|
1727
|
-
</kendo-icon-wrapper>
|
|
1728
|
-
<span class="k-breadcrumb-item-text">{{ item.data.text }}</span>
|
|
1729
|
-
</span>
|
|
1730
|
-
<ng-template
|
|
1731
|
-
*ngIf="itemTemplate"
|
|
1732
|
-
[ngTemplateOutlet]="itemTemplate"
|
|
1733
|
-
[ngTemplateOutletContext]="{
|
|
1734
|
-
$implicit: item.data,
|
|
1735
|
-
index: index
|
|
1736
|
-
}"
|
|
1737
|
-
></ng-template>
|
|
1738
|
-
</ng-container>
|
|
1739
|
-
|
|
1740
|
-
<ng-container *ngIf="collapseMode !== 'wrap'">
|
|
1741
|
-
<ng-container *ngTemplateOutlet="separator"></ng-container>
|
|
1742
|
-
</ng-container>
|
|
1743
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
|
|
1744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbItemComponent, decorators: [{
|
|
1745
|
-
type: Component,
|
|
1746
|
-
args: [{
|
|
1747
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1748
|
-
selector: '[kendoBreadCrumbItem]',
|
|
1749
|
-
template: `
|
|
1750
|
-
<ng-template #separator>
|
|
1751
|
-
<ng-content select="[kendoBreadCrumbSeparator]"></ng-content>
|
|
1752
|
-
</ng-template>
|
|
1753
|
-
|
|
1754
|
-
<ng-container *ngIf="collapseMode === 'wrap'">
|
|
1755
|
-
<ng-container *ngTemplateOutlet="separator"></ng-container>
|
|
1756
|
-
</ng-container>
|
|
1757
|
-
|
|
1758
|
-
<ng-container *ngIf="!item.context.collapsed">
|
|
1759
|
-
<span
|
|
1760
|
-
*ngIf="!itemTemplate"
|
|
1761
|
-
[ngClass]="{
|
|
1762
|
-
'k-breadcrumb-root-link': item.context.isFirst,
|
|
1763
|
-
'k-breadcrumb-link': index !== 0,
|
|
1764
|
-
'k-breadcrumb-icontext-link': !!item.data.icon && !!item.data.text,
|
|
1765
|
-
'k-breadcrumb-icon-link': !!item.data.icon && !item.data.text,
|
|
1766
|
-
'k-disabled': disabled
|
|
1767
|
-
}"
|
|
1768
|
-
[title]="item.data.title || ''"
|
|
1769
|
-
[tabindex]="disabled ? -1 : 0"
|
|
1770
|
-
[attr.aria-disabled]="disabled"
|
|
1771
|
-
[attr.aria-current]="item.context.isLast ? 'page' : null"
|
|
1772
|
-
role="link"
|
|
1773
|
-
>
|
|
1774
|
-
<img *ngIf="item.data.imageUrl" (load)="onImageLoad()" [src]="item.data.imageUrl" class="k-image" role="presentation" />
|
|
1775
|
-
<kendo-icon-wrapper *ngIf="item.data.icon || item.data.iconClass || item.data.svgIcon"
|
|
1776
|
-
[name]="item.data.icon"
|
|
1777
|
-
[customFontClass]="item.data.iconClass"
|
|
1778
|
-
[svgIcon]="item.data.svgIcon"
|
|
1779
|
-
>
|
|
1780
|
-
</kendo-icon-wrapper>
|
|
1781
|
-
<span class="k-breadcrumb-item-text">{{ item.data.text }}</span>
|
|
1782
|
-
</span>
|
|
1783
|
-
<ng-template
|
|
1784
|
-
*ngIf="itemTemplate"
|
|
1785
|
-
[ngTemplateOutlet]="itemTemplate"
|
|
1786
|
-
[ngTemplateOutletContext]="{
|
|
1787
|
-
$implicit: item.data,
|
|
1788
|
-
index: index
|
|
1789
|
-
}"
|
|
1790
|
-
></ng-template>
|
|
1791
|
-
</ng-container>
|
|
1792
|
-
|
|
1793
|
-
<ng-container *ngIf="collapseMode !== 'wrap'">
|
|
1794
|
-
<ng-container *ngTemplateOutlet="separator"></ng-container>
|
|
1795
|
-
</ng-container>
|
|
1796
|
-
`,
|
|
1797
|
-
standalone: true,
|
|
1798
|
-
imports: [NgIf, NgTemplateOutlet, NgClass, IconWrapperComponent]
|
|
1799
|
-
}]
|
|
1800
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { item: [{
|
|
1801
|
-
type: Input
|
|
1802
|
-
}], collapseMode: [{
|
|
1803
|
-
type: Input
|
|
1804
|
-
}], index: [{
|
|
1805
|
-
type: Input
|
|
1806
|
-
}], itemTemplate: [{
|
|
1807
|
-
type: Input
|
|
1808
|
-
}], hostClasses: [{
|
|
1809
|
-
type: HostBinding,
|
|
1810
|
-
args: ['class.k-breadcrumb-item']
|
|
1811
|
-
}], isRootItem: [{
|
|
1812
|
-
type: HostBinding,
|
|
1813
|
-
args: ['class.k-breadcrumb-root-item']
|
|
1814
|
-
}], isDisabled: [{
|
|
1815
|
-
type: HostBinding,
|
|
1816
|
-
args: ['attr.aria-disabled']
|
|
1817
|
-
}], isLastItem: [{
|
|
1818
|
-
type: HostBinding,
|
|
1819
|
-
args: ['class.k-breadcrumb-last-item']
|
|
1820
|
-
}] } });
|
|
1821
|
-
|
|
1822
|
-
const DEFAULT_ICON = 'chevron-right';
|
|
1823
|
-
const DEFAULT_RTL_ICON = 'chevron-left';
|
|
1824
|
-
const DEFAULT_SVG_ICON = chevronRightIcon;
|
|
1825
|
-
const DEFAULT_RTL_SVG_ICON = chevronLeftIcon;
|
|
1826
|
-
/**
|
|
1827
|
-
* @hidden
|
|
1828
|
-
*/
|
|
1829
|
-
class BreadCrumbSeparatorDirective {
|
|
1830
|
-
constructor(el, localization) {
|
|
1831
|
-
this.el = el;
|
|
1832
|
-
this.localization = localization;
|
|
1833
|
-
this.defaultClasses = true;
|
|
1834
|
-
this.ariaHidden = true;
|
|
1835
|
-
this.direction = 'ltr';
|
|
1836
|
-
this.direction = this.localization.rtl ? 'rtl' : 'ltr';
|
|
1837
|
-
}
|
|
1838
|
-
set icon(icon) {
|
|
1839
|
-
if (isPresent(icon)) {
|
|
1840
|
-
this._icon = icon;
|
|
1841
|
-
this.hasDefaultIcon = false;
|
|
1842
|
-
}
|
|
1843
|
-
else {
|
|
1844
|
-
this._icon = this.direction === 'ltr' ? DEFAULT_ICON : DEFAULT_RTL_ICON;
|
|
1845
|
-
this.hasDefaultIcon = true;
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
get icon() {
|
|
1849
|
-
return this._icon;
|
|
1850
|
-
}
|
|
1851
|
-
set svgIcon(svgIcon) {
|
|
1852
|
-
if (isPresent(svgIcon)) {
|
|
1853
|
-
this._svgIcon = svgIcon;
|
|
1854
|
-
this.hasDefaultSvgIcon = false;
|
|
1855
|
-
}
|
|
1856
|
-
else {
|
|
1857
|
-
this._svgIcon = this.direction === 'ltr' ? DEFAULT_SVG_ICON : DEFAULT_RTL_SVG_ICON;
|
|
1858
|
-
this.hasDefaultSvgIcon = true;
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
1861
|
-
get svgIcon() {
|
|
1862
|
-
return this._svgIcon;
|
|
1863
|
-
}
|
|
1864
|
-
ngOnInit() {
|
|
1865
|
-
this.localizationChangesSubscription = this.localization.changes.subscribe(({ rtl }) => {
|
|
1866
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
1867
|
-
if (this.hasDefaultIcon) {
|
|
1868
|
-
this.icon = undefined;
|
|
1869
|
-
}
|
|
1870
|
-
if (this.hasDefaultSvgIcon) {
|
|
1871
|
-
this.svgIcon = undefined;
|
|
1872
|
-
}
|
|
1873
|
-
});
|
|
1874
|
-
}
|
|
1875
|
-
ngOnDestroy() {
|
|
1876
|
-
this.localizationChangesSubscription.unsubscribe();
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
BreadCrumbSeparatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbSeparatorDirective, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1880
|
-
BreadCrumbSeparatorDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BreadCrumbSeparatorDirective, isStandalone: true, selector: "[kendoBreadCrumbSeparator]", inputs: { icon: "icon", svgIcon: "svgIcon" }, host: { properties: { "class.k-breadcrumb-delimiter-icon": "this.defaultClasses", "class.k-icon": "this.defaultClasses", "attr.aria-hidden": "this.ariaHidden" } }, ngImport: i0, template: `
|
|
1881
|
-
<kendo-icon-wrapper
|
|
1882
|
-
size='xsmall'
|
|
1883
|
-
[name]="icon"
|
|
1884
|
-
[svgIcon]="svgIcon"
|
|
1885
|
-
>
|
|
1886
|
-
</kendo-icon-wrapper>
|
|
1887
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
1888
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbSeparatorDirective, decorators: [{
|
|
1889
|
-
type: Component,
|
|
1890
|
-
args: [{
|
|
1891
|
-
selector: '[kendoBreadCrumbSeparator]',
|
|
1892
|
-
template: `
|
|
1893
|
-
<kendo-icon-wrapper
|
|
1894
|
-
size='xsmall'
|
|
1895
|
-
[name]="icon"
|
|
1896
|
-
[svgIcon]="svgIcon"
|
|
1897
|
-
>
|
|
1898
|
-
</kendo-icon-wrapper>
|
|
1899
|
-
`,
|
|
1900
|
-
standalone: true,
|
|
1901
|
-
imports: [IconWrapperComponent]
|
|
1902
|
-
}]
|
|
1903
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.LocalizationService }]; }, propDecorators: { icon: [{
|
|
1904
|
-
type: Input
|
|
1905
|
-
}], svgIcon: [{
|
|
1906
|
-
type: Input
|
|
1907
|
-
}], defaultClasses: [{
|
|
1908
|
-
type: HostBinding,
|
|
1909
|
-
args: ['class.k-breadcrumb-delimiter-icon']
|
|
1910
|
-
}, {
|
|
1911
|
-
type: HostBinding,
|
|
1912
|
-
args: ['class.k-icon']
|
|
1913
|
-
}], ariaHidden: [{
|
|
1914
|
-
type: HostBinding,
|
|
1915
|
-
args: ['attr.aria-hidden']
|
|
1916
|
-
}] } });
|
|
1917
|
-
|
|
1918
|
-
/**
|
|
1919
|
-
* @hidden
|
|
1920
|
-
*/
|
|
1921
|
-
class BreadCrumbListComponent {
|
|
1922
|
-
constructor(el, zone) {
|
|
1923
|
-
this.el = el;
|
|
1924
|
-
this.zone = zone;
|
|
1925
|
-
this.items = [];
|
|
1926
|
-
this.collapseMode = 'auto';
|
|
1927
|
-
this.itemClick = new EventEmitter();
|
|
1928
|
-
const element = this.el.nativeElement;
|
|
1929
|
-
this.isRootItemContainer = element.classList.contains('k-breadcrumb-root-item-container');
|
|
1930
|
-
this.zone.runOutsideAngular(() => {
|
|
1931
|
-
const click$ = fromEvent(element, 'click');
|
|
1932
|
-
const enterKey$ = fromEvent(element, 'keydown').pipe(filter((ev /* KeyboardEvent causes lint error */) => ev.keyCode === Keys.Enter));
|
|
1933
|
-
this.domEventsSubscription = merge(click$, enterKey$)
|
|
1934
|
-
.pipe(map((ev) => ev.target), filter(e => !e.classList.contains('k-breadcrumb-delimiter-icon')), // do not trigger handler when a separator is clicked
|
|
1935
|
-
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))
|
|
1936
|
-
.subscribe(el => {
|
|
1937
|
-
this.zone.run(() => this.itemClick.emit(el));
|
|
1938
|
-
});
|
|
1939
|
-
});
|
|
1940
|
-
}
|
|
1941
|
-
ngOnDestroy() {
|
|
1942
|
-
this.domEventsSubscription.unsubscribe();
|
|
1943
|
-
}
|
|
1944
|
-
getItemIndex(target) {
|
|
1945
|
-
const item = closestItem(target, BREADCRUMB_ITEM_INDEX, this.el.nativeElement);
|
|
1946
|
-
if (item) {
|
|
1947
|
-
return itemIndex(item, BREADCRUMB_ITEM_INDEX);
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
BreadCrumbListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbListComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1952
|
-
BreadCrumbListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 <ng-container *ngFor=\"let item of items; let i = index; let isFirst = first; let isLast = last\">\n <li\n #renderedItem\n kendoBreadCrumbItem\n *ngIf=\"!(collapseMode === 'wrap' && isFirst) || isRootItemContainer\"\n [attr.data-kendo-breadcrumb-index]=\"i\"\n [item]=\"item\"\n [index]=\"i\"\n [collapseMode]=\"collapseMode\"\n [itemTemplate]=\"itemTemplate\"\n >\n <span kendoBreadCrumbSeparator [icon]=\"separatorIcon\" [svgIcon]=\"separatorSVGIcon\" *ngIf=\"collapseMode === 'wrap' && !isFirst\"></span>\n <span\n kendoBreadCrumbSeparator\n [icon]=\"separatorIcon\"\n [svgIcon]=\"separatorSVGIcon\"\n *ngIf=\"collapseMode !== 'wrap' && !isLast && !(item?.context.collapsed && items[i + 1]?.context.collapsed)\"\n ></span>\n </li>\n </ng-container>\n ", isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BreadCrumbItemComponent, selector: "[kendoBreadCrumbItem]", inputs: ["item", "collapseMode", "index", "itemTemplate"] }, { kind: "component", type: BreadCrumbSeparatorDirective, selector: "[kendoBreadCrumbSeparator]", inputs: ["icon", "svgIcon"] }] });
|
|
1953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbListComponent, decorators: [{
|
|
1954
|
-
type: Component,
|
|
1955
|
-
args: [{
|
|
1956
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1957
|
-
selector: '[kendoBreadCrumbList]',
|
|
1958
|
-
template: `
|
|
1959
|
-
<ng-container *ngFor="let item of items; let i = index; let isFirst = first; let isLast = last">
|
|
1960
|
-
<li
|
|
1961
|
-
#renderedItem
|
|
1962
|
-
kendoBreadCrumbItem
|
|
1963
|
-
*ngIf="!(collapseMode === 'wrap' && isFirst) || isRootItemContainer"
|
|
1964
|
-
[attr.${BREADCRUMB_ITEM_INDEX}]="i"
|
|
1965
|
-
[item]="item"
|
|
1966
|
-
[index]="i"
|
|
1967
|
-
[collapseMode]="collapseMode"
|
|
1968
|
-
[itemTemplate]="itemTemplate"
|
|
1969
|
-
>
|
|
1970
|
-
<span kendoBreadCrumbSeparator [icon]="separatorIcon" [svgIcon]="separatorSVGIcon" *ngIf="collapseMode === 'wrap' && !isFirst"></span>
|
|
1971
|
-
<span
|
|
1972
|
-
kendoBreadCrumbSeparator
|
|
1973
|
-
[icon]="separatorIcon"
|
|
1974
|
-
[svgIcon]="separatorSVGIcon"
|
|
1975
|
-
*ngIf="collapseMode !== 'wrap' && !isLast && !(item?.context.collapsed && items[i + 1]?.context.collapsed)"
|
|
1976
|
-
></span>
|
|
1977
|
-
</li>
|
|
1978
|
-
</ng-container>
|
|
1979
|
-
`,
|
|
1980
|
-
standalone: true,
|
|
1981
|
-
imports: [NgFor, NgIf, BreadCrumbItemComponent, BreadCrumbSeparatorDirective]
|
|
1982
|
-
}]
|
|
1983
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { items: [{
|
|
1984
|
-
type: Input
|
|
1985
|
-
}], itemTemplate: [{
|
|
1986
|
-
type: Input
|
|
1987
|
-
}], collapseMode: [{
|
|
1988
|
-
type: Input
|
|
1989
|
-
}], separatorIcon: [{
|
|
1990
|
-
type: Input
|
|
1991
|
-
}], separatorSVGIcon: [{
|
|
1992
|
-
type: Input
|
|
1993
|
-
}], itemClick: [{
|
|
1994
|
-
type: Output
|
|
1995
|
-
}], renderedItems: [{
|
|
1996
|
-
type: ViewChildren,
|
|
1997
|
-
args: [BreadCrumbItemComponent]
|
|
1998
|
-
}] } });
|
|
1999
|
-
|
|
2000
|
-
const getCollapsed = (itemComponent) => itemComponent.item.context.collapsed;
|
|
2001
|
-
/**
|
|
2002
|
-
* @hidden
|
|
2003
|
-
*/
|
|
2004
|
-
const collapsed = (itemComponent) => getCollapsed(itemComponent) === true;
|
|
2005
|
-
/**
|
|
2006
|
-
* @hidden
|
|
2007
|
-
*/
|
|
2008
|
-
const expanded = (itemComponent) => getCollapsed(itemComponent) === false;
|
|
2009
|
-
const toggleFirst = (collapsed) => (itemComponents) => (itemComponents.find(ic => getCollapsed(ic) === collapsed).item.context.collapsed = !collapsed);
|
|
2010
|
-
/**
|
|
2011
|
-
* @hidden
|
|
2012
|
-
*/
|
|
2013
|
-
const collapseFirst = toggleFirst(false);
|
|
2014
|
-
/**
|
|
2015
|
-
* @hidden
|
|
2016
|
-
*/
|
|
2017
|
-
const expandFirst = toggleFirst(true);
|
|
2018
|
-
|
|
2019
|
-
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
2020
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2021
|
-
/**
|
|
2022
|
-
* Represents the [Kendo UI Breadcrumb component for Angular]({% slug overview_breadcrumb %}).
|
|
2023
|
-
*
|
|
2024
|
-
* @example
|
|
2025
|
-
* ```ts-no-run
|
|
2026
|
-
* _@Component({
|
|
2027
|
-
* selector: 'my-app',
|
|
2028
|
-
* template: `
|
|
2029
|
-
* <kendo-breadcrumb
|
|
2030
|
-
* [items]="items"
|
|
2031
|
-
* (itemClick)="onItemClick($event)">
|
|
2032
|
-
* </kendo-breadcrumb>
|
|
2033
|
-
* `
|
|
2034
|
-
* })
|
|
2035
|
-
* class AppComponent {
|
|
2036
|
-
* public items: BreadCrumbItem[] = [
|
|
2037
|
-
* { text: 'Home', title: 'Home', icon: 'home' },
|
|
2038
|
-
* { text: 'Kids', title: 'Kids' },
|
|
2039
|
-
* { text: '8y-16y', title: '8y-16y', disabled: true },
|
|
2040
|
-
* { text: 'New collection', title: 'New collection' },
|
|
2041
|
-
* { text: 'Jeans', title: 'Jeans' }
|
|
2042
|
-
* ];
|
|
2043
|
-
*
|
|
2044
|
-
* public onItemClick(item: BreadCrumbItem): void {
|
|
2045
|
-
* console.log(item);
|
|
2046
|
-
* }
|
|
2047
|
-
* }
|
|
2048
|
-
* ```
|
|
2049
|
-
*/
|
|
2050
|
-
class BreadCrumbComponent {
|
|
2051
|
-
constructor(localization, el, cdr, zone, renderer) {
|
|
2052
|
-
this.localization = localization;
|
|
2053
|
-
this.el = el;
|
|
2054
|
-
this.cdr = cdr;
|
|
2055
|
-
this.zone = zone;
|
|
2056
|
-
this.renderer = renderer;
|
|
2057
|
-
/**
|
|
2058
|
-
* Fires when a Breadcrumb item is clicked. The event will not be fired by disabled items and the last item.
|
|
2059
|
-
*/
|
|
2060
|
-
this.itemClick = new EventEmitter();
|
|
2061
|
-
this.hostClasses = true;
|
|
2062
|
-
this.hostAriaLabel = 'Breadcrumb';
|
|
2063
|
-
this._items = [];
|
|
2064
|
-
this._collapseMode = 'auto';
|
|
2065
|
-
this._size = DEFAULT_SIZE;
|
|
2066
|
-
this.updateItems = new ReplaySubject();
|
|
2067
|
-
this.afterViewInit = new Subject();
|
|
2068
|
-
this.subscriptions = new Subscription();
|
|
2069
|
-
this.direction = 'ltr';
|
|
2070
|
-
validatePackage(packageMetadata);
|
|
2071
|
-
const updateItems$ = this.updateItems.asObservable().pipe(startWith([]));
|
|
2072
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
2073
|
-
this.itemsData$ = updateItems$.pipe(map(items => items.filter(Boolean)), map(items => items.map((item, index, collection) => ({
|
|
2074
|
-
context: {
|
|
2075
|
-
collapsed: false,
|
|
2076
|
-
isLast: index === collection.length - 1,
|
|
2077
|
-
isFirst: index === 0
|
|
2078
|
-
},
|
|
2079
|
-
data: item
|
|
2080
|
-
}))), share());
|
|
2081
|
-
this.firstItem$ = updateItems$.pipe(map(items => {
|
|
2082
|
-
if (items.length > 0) {
|
|
2083
|
-
return [
|
|
2084
|
-
{
|
|
2085
|
-
context: {
|
|
2086
|
-
collapsed: false,
|
|
2087
|
-
isLast: items.length === 1,
|
|
2088
|
-
isFirst: true
|
|
2089
|
-
},
|
|
2090
|
-
data: items[0]
|
|
2091
|
-
}
|
|
2092
|
-
];
|
|
2093
|
-
}
|
|
2094
|
-
return [];
|
|
2095
|
-
}), share());
|
|
2096
|
-
}
|
|
2097
|
-
/**
|
|
2098
|
-
* The collection of items that will be rendered in the Breadcrumb.
|
|
2099
|
-
*/
|
|
2100
|
-
set items(items) {
|
|
2101
|
-
this._items = items || [];
|
|
2102
|
-
this.updateItems.next(this._items);
|
|
2103
|
-
}
|
|
2104
|
-
get items() {
|
|
2105
|
-
return this._items;
|
|
2106
|
-
}
|
|
2107
|
-
/**
|
|
2108
|
-
* Specifies the collapse mode of the Breadcrumb ([see example]({% slug collapse_modes_breadcrumb %})).
|
|
2109
|
-
*
|
|
2110
|
-
* The possible values are:
|
|
2111
|
-
* - `auto` (default)—items are automatically collapsed based on the width of the Breadcrumb.
|
|
2112
|
-
* - `wrap`—items are wrapped on multiple rows.
|
|
2113
|
-
* - `none`—all items are expanded on the same row.
|
|
2114
|
-
*
|
|
2115
|
-
* For more information and example refer to the [Collapse Modes]({% slug collapse_modes_breadcrumb %}) article.
|
|
2116
|
-
*/
|
|
2117
|
-
set collapseMode(mode) {
|
|
2118
|
-
if (isDevMode() && ['auto', 'wrap', 'none'].indexOf(mode) < 0) {
|
|
2119
|
-
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/');
|
|
2120
|
-
}
|
|
2121
|
-
this._collapseMode = mode || 'auto';
|
|
2122
|
-
this.updateItems.next(this.items);
|
|
2123
|
-
}
|
|
2124
|
-
get collapseMode() {
|
|
2125
|
-
return this._collapseMode;
|
|
2126
|
-
}
|
|
2127
|
-
/**
|
|
2128
|
-
* Specifies the padding of all Breadcrumb elements.
|
|
2129
|
-
*
|
|
2130
|
-
* The possible values are:
|
|
2131
|
-
* * `small`
|
|
2132
|
-
* * `medium` (default)
|
|
2133
|
-
* * `large`
|
|
2134
|
-
* * `none`
|
|
2135
|
-
*/
|
|
2136
|
-
set size(size) {
|
|
2137
|
-
const newSize = size ? size : DEFAULT_SIZE;
|
|
2138
|
-
this.handleClasses(newSize, 'size');
|
|
2139
|
-
this._size = newSize;
|
|
2140
|
-
}
|
|
2141
|
-
get size() {
|
|
2142
|
-
return this._size;
|
|
2143
|
-
}
|
|
2144
|
-
get wrapMode() {
|
|
2145
|
-
return this.collapseMode === 'wrap';
|
|
2146
|
-
}
|
|
2147
|
-
get getDir() {
|
|
2148
|
-
return this.direction;
|
|
2149
|
-
}
|
|
2150
|
-
ngOnInit() {
|
|
2151
|
-
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
2152
|
-
this.handleClasses(this.size, 'size');
|
|
2153
|
-
}
|
|
2154
|
-
ngAfterViewInit() {
|
|
2155
|
-
this.attachResizeHandler();
|
|
2156
|
-
this.afterViewInit.next();
|
|
2157
|
-
}
|
|
2158
|
-
ngOnDestroy() {
|
|
2159
|
-
this.subscriptions.unsubscribe();
|
|
2160
|
-
}
|
|
2161
|
-
handleResize() {
|
|
2162
|
-
const autoCollapseCandidates = [
|
|
2163
|
-
...this.listComponent.renderedItems.toArray().filter(ri => !ri.item.context.isFirst && !ri.item.context.isLast)
|
|
2164
|
-
];
|
|
2165
|
-
const componentWidth = Math.floor(outerWidth(this.el.nativeElement));
|
|
2166
|
-
const itemsContainerWidth = Math.round(this.itemsContainers
|
|
2167
|
-
.toArray()
|
|
2168
|
-
.map(el => outerWidth(el.nativeElement))
|
|
2169
|
-
.reduce((acc, curr) => acc + curr, 0));
|
|
2170
|
-
const nextExpandWidth = Math.ceil(([...autoCollapseCandidates].reverse().find(collapsed) || { width: 0 }).width);
|
|
2171
|
-
// // shrink
|
|
2172
|
-
if (componentWidth <= itemsContainerWidth && autoCollapseCandidates.find(expanded)) {
|
|
2173
|
-
collapseFirst(autoCollapseCandidates);
|
|
2174
|
-
// needed by resize sensor
|
|
2175
|
-
this.cdr.detectChanges();
|
|
2176
|
-
return this.handleResize();
|
|
2177
|
-
}
|
|
2178
|
-
// expand
|
|
2179
|
-
if (componentWidth > itemsContainerWidth + nextExpandWidth && autoCollapseCandidates.find(collapsed)) {
|
|
2180
|
-
expandFirst([...autoCollapseCandidates].reverse());
|
|
2181
|
-
// needed by resize sensor
|
|
2182
|
-
this.cdr.detectChanges();
|
|
2183
|
-
return this.handleResize();
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
shouldResize() {
|
|
2187
|
-
return isDocumentAvailable() && this.collapseMode === 'auto';
|
|
2188
|
-
}
|
|
2189
|
-
attachResizeHandler() {
|
|
2190
|
-
// resize when:
|
|
2191
|
-
// the component is initialized
|
|
2192
|
-
// the container is resized
|
|
2193
|
-
// items are added/removed
|
|
2194
|
-
this.subscriptions.add(merge(this.resizeSensor.resize, this.itemsData$, this.afterViewInit.asObservable())
|
|
2195
|
-
.pipe(filter(() => this.shouldResize()))
|
|
2196
|
-
.subscribe(() => {
|
|
2197
|
-
this.zone.runOutsideAngular(() => setTimeout(() => {
|
|
2198
|
-
this.zone.run(() => {
|
|
2199
|
-
if (this.listComponent) {
|
|
2200
|
-
this.handleResize();
|
|
2201
|
-
this.resizeSensor.acceptSize();
|
|
2202
|
-
}
|
|
2203
|
-
});
|
|
2204
|
-
}));
|
|
2205
|
-
}));
|
|
2206
|
-
}
|
|
2207
|
-
handleClasses(value, input) {
|
|
2208
|
-
const elem = this.el.nativeElement;
|
|
2209
|
-
const classes = getStylingClasses(input, this[input], value);
|
|
2210
|
-
if (classes.toRemove) {
|
|
2211
|
-
this.renderer.removeClass(elem, classes.toRemove);
|
|
2212
|
-
}
|
|
2213
|
-
if (classes.toAdd) {
|
|
2214
|
-
this.renderer.addClass(elem, classes.toAdd);
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
|
-
}
|
|
2218
|
-
BreadCrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2219
|
-
BreadCrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: [
|
|
2220
|
-
LocalizationService,
|
|
2221
|
-
{
|
|
2222
|
-
provide: L10N_PREFIX,
|
|
2223
|
-
useValue: 'kendo.breadcrumb'
|
|
2224
|
-
}
|
|
2225
|
-
], 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: `
|
|
2226
|
-
<ol
|
|
2227
|
-
#itemsContainer
|
|
2228
|
-
kendoBreadCrumbList
|
|
2229
|
-
class="k-breadcrumb-root-item-container"
|
|
2230
|
-
*ngIf="collapseMode === 'wrap'"
|
|
2231
|
-
[items]="firstItem$ | async"
|
|
2232
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
2233
|
-
[collapseMode]="collapseMode"
|
|
2234
|
-
[separatorIcon]="separatorIcon"
|
|
2235
|
-
[separatorSVGIcon]="separatorSVGIcon"
|
|
2236
|
-
(itemClick)="itemClick.emit($event)"
|
|
2237
|
-
></ol>
|
|
2238
|
-
<ol
|
|
2239
|
-
#itemsContainer
|
|
2240
|
-
kendoBreadCrumbList
|
|
2241
|
-
class="k-breadcrumb-container"
|
|
2242
|
-
[items]="itemsData$ | async"
|
|
2243
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
2244
|
-
[collapseMode]="collapseMode"
|
|
2245
|
-
[separatorIcon]="separatorIcon"
|
|
2246
|
-
[separatorSVGIcon]="separatorSVGIcon"
|
|
2247
|
-
(itemClick)="itemClick.emit($event)"
|
|
2248
|
-
[ngClass]="{ '!k-flex-wrap': collapseMode === 'wrap', 'k-flex-none': collapseMode === 'none' }"
|
|
2249
|
-
></ol>
|
|
2250
|
-
<kendo-resize-sensor [rateLimit]="1000" #resizeSensor></kendo-resize-sensor>
|
|
2251
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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" }] });
|
|
2252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbComponent, decorators: [{
|
|
2253
|
-
type: Component,
|
|
2254
|
-
args: [{
|
|
2255
|
-
exportAs: 'kendoBreadCrumb',
|
|
2256
|
-
selector: 'kendo-breadcrumb',
|
|
2257
|
-
providers: [
|
|
2258
|
-
LocalizationService,
|
|
2259
|
-
{
|
|
2260
|
-
provide: L10N_PREFIX,
|
|
2261
|
-
useValue: 'kendo.breadcrumb'
|
|
2262
|
-
}
|
|
2263
|
-
],
|
|
2264
|
-
template: `
|
|
2265
|
-
<ol
|
|
2266
|
-
#itemsContainer
|
|
2267
|
-
kendoBreadCrumbList
|
|
2268
|
-
class="k-breadcrumb-root-item-container"
|
|
2269
|
-
*ngIf="collapseMode === 'wrap'"
|
|
2270
|
-
[items]="firstItem$ | async"
|
|
2271
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
2272
|
-
[collapseMode]="collapseMode"
|
|
2273
|
-
[separatorIcon]="separatorIcon"
|
|
2274
|
-
[separatorSVGIcon]="separatorSVGIcon"
|
|
2275
|
-
(itemClick)="itemClick.emit($event)"
|
|
2276
|
-
></ol>
|
|
2277
|
-
<ol
|
|
2278
|
-
#itemsContainer
|
|
2279
|
-
kendoBreadCrumbList
|
|
2280
|
-
class="k-breadcrumb-container"
|
|
2281
|
-
[items]="itemsData$ | async"
|
|
2282
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
2283
|
-
[collapseMode]="collapseMode"
|
|
2284
|
-
[separatorIcon]="separatorIcon"
|
|
2285
|
-
[separatorSVGIcon]="separatorSVGIcon"
|
|
2286
|
-
(itemClick)="itemClick.emit($event)"
|
|
2287
|
-
[ngClass]="{ '!k-flex-wrap': collapseMode === 'wrap', 'k-flex-none': collapseMode === 'none' }"
|
|
2288
|
-
></ol>
|
|
2289
|
-
<kendo-resize-sensor [rateLimit]="1000" #resizeSensor></kendo-resize-sensor>
|
|
2290
|
-
`,
|
|
2291
|
-
standalone: true,
|
|
2292
|
-
imports: [NgIf, BreadCrumbListComponent, NgClass, ResizeSensorComponent, AsyncPipe]
|
|
2293
|
-
}]
|
|
2294
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { items: [{
|
|
2295
|
-
type: Input
|
|
2296
|
-
}], separatorIcon: [{
|
|
2297
|
-
type: Input
|
|
2298
|
-
}], separatorSVGIcon: [{
|
|
2299
|
-
type: Input
|
|
2300
|
-
}], collapseMode: [{
|
|
2301
|
-
type: Input
|
|
2302
|
-
}], size: [{
|
|
2303
|
-
type: Input
|
|
2304
|
-
}], itemClick: [{
|
|
2305
|
-
type: Output
|
|
2306
|
-
}], resizeSensor: [{
|
|
2307
|
-
type: ViewChild,
|
|
2308
|
-
args: ['resizeSensor', { static: true }]
|
|
2309
|
-
}], itemsContainers: [{
|
|
2310
|
-
type: ViewChildren,
|
|
2311
|
-
args: ['itemsContainer', { read: ElementRef }]
|
|
2312
|
-
}], listComponent: [{
|
|
2313
|
-
type: ViewChild,
|
|
2314
|
-
args: [BreadCrumbListComponent, { static: true }]
|
|
2315
|
-
}], itemTemplate: [{
|
|
2316
|
-
type: ContentChild,
|
|
2317
|
-
args: [BreadCrumbItemTemplateDirective]
|
|
2318
|
-
}], hostClasses: [{
|
|
2319
|
-
type: HostBinding,
|
|
2320
|
-
args: ['class.k-breadcrumb']
|
|
2321
|
-
}], wrapMode: [{
|
|
2322
|
-
type: HostBinding,
|
|
2323
|
-
args: ['class.k-breadcrumb-wrap']
|
|
2324
|
-
}], hostAriaLabel: [{
|
|
2325
|
-
type: HostBinding,
|
|
2326
|
-
args: ['attr.aria-label']
|
|
2327
|
-
}], getDir: [{
|
|
2328
|
-
type: HostBinding,
|
|
2329
|
-
args: ['attr.dir']
|
|
2330
|
-
}] } });
|
|
2331
|
-
|
|
2332
|
-
/**
|
|
2333
|
-
* Utility array that contains all `ActionSheet` related components and directives.
|
|
2334
|
-
*/
|
|
2335
|
-
const KENDO_ACTIONSHEET = [
|
|
2336
|
-
ActionSheetComponent,
|
|
2337
|
-
ActionSheetHeaderTemplateDirective,
|
|
2338
|
-
ActionSheetItemTemplateDirective,
|
|
2339
|
-
ActionSheetContentTemplateDirective,
|
|
2340
|
-
ActionSheetFooterTemplateDirective,
|
|
2341
|
-
ActionSheetTemplateDirective
|
|
2342
|
-
];
|
|
2343
|
-
/**
|
|
2344
|
-
* Utility array that contains all `AppBar` related components and directives.
|
|
2345
|
-
*/
|
|
2346
|
-
const KENDO_APPBAR = [
|
|
2347
|
-
AppBarComponent,
|
|
2348
|
-
AppBarSectionComponent,
|
|
2349
|
-
AppBarSpacerComponent
|
|
2350
|
-
];
|
|
2351
|
-
/**
|
|
2352
|
-
* Utility array that contains all `BottomNavigation` related components and directives.
|
|
2353
|
-
*/
|
|
2354
|
-
const KENDO_BOTTOMNAVIGATION = [
|
|
2355
|
-
BottomNavigationComponent,
|
|
2356
|
-
BottomNavigationItemTemplateDirective
|
|
2357
|
-
];
|
|
2358
|
-
/**
|
|
2359
|
-
* Utility array that contains all `BreadCrumb` related components and directives.
|
|
2360
|
-
*/
|
|
2361
|
-
const KENDO_BREADCRUMB = [
|
|
2362
|
-
BreadCrumbComponent,
|
|
2363
|
-
BreadCrumbItemTemplateDirective
|
|
2364
|
-
];
|
|
2365
|
-
/**
|
|
2366
|
-
* Utility array that contains all `@progress/kendo-angular-navigation` related components and directives.
|
|
2367
|
-
*/
|
|
2368
|
-
const KENDO_NAVIGATION = [
|
|
2369
|
-
...KENDO_ACTIONSHEET,
|
|
2370
|
-
...KENDO_APPBAR,
|
|
2371
|
-
...KENDO_BOTTOMNAVIGATION,
|
|
2372
|
-
...KENDO_BREADCRUMB
|
|
2373
|
-
];
|
|
2374
|
-
|
|
2375
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
2376
|
-
/**
|
|
2377
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
2378
|
-
* definition for the AppBar component.
|
|
2379
|
-
*
|
|
2380
|
-
* @example
|
|
2381
|
-
*
|
|
2382
|
-
* ```ts-no-run
|
|
2383
|
-
* // Import the AppBar module
|
|
2384
|
-
* import { AppBarModule } from '@progress/kendo-angular-navigation';
|
|
2385
|
-
*
|
|
2386
|
-
* // The browser platform with a compiler
|
|
2387
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2388
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
2389
|
-
*
|
|
2390
|
-
* import { NgModule } from '@angular/core';
|
|
2391
|
-
*
|
|
2392
|
-
* // Import the app component
|
|
2393
|
-
* import { AppComponent } from './app.component';
|
|
2394
|
-
*
|
|
2395
|
-
* // Define the app module
|
|
2396
|
-
* _@NgModule({
|
|
2397
|
-
* declarations: [AppComponent], // declare app component
|
|
2398
|
-
* imports: [BrowserModule, AppBarModule], // import AppBar module
|
|
2399
|
-
* bootstrap: [AppComponent]
|
|
2400
|
-
* })
|
|
2401
|
-
* export class AppModule {}
|
|
2402
|
-
*
|
|
2403
|
-
* // Compile and launch the module
|
|
2404
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
2405
|
-
*
|
|
2406
|
-
* ```
|
|
2407
|
-
*/
|
|
2408
|
-
class AppBarModule {
|
|
2409
|
-
}
|
|
2410
|
-
AppBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2411
|
-
AppBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AppBarModule, imports: [AppBarComponent, AppBarSectionComponent, AppBarSpacerComponent], exports: [AppBarComponent, AppBarSectionComponent, AppBarSpacerComponent] });
|
|
2412
|
-
AppBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarModule, imports: [KENDO_APPBAR] });
|
|
2413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppBarModule, decorators: [{
|
|
2414
|
-
type: NgModule,
|
|
2415
|
-
args: [{
|
|
2416
|
-
exports: [...KENDO_APPBAR],
|
|
2417
|
-
imports: [...KENDO_APPBAR]
|
|
2418
|
-
}]
|
|
2419
|
-
}] });
|
|
2420
|
-
|
|
2421
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
2422
|
-
/**
|
|
2423
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
2424
|
-
* definition for the Navigation components.
|
|
2425
|
-
*
|
|
2426
|
-
* @example
|
|
2427
|
-
*
|
|
2428
|
-
* ```ts-no-run
|
|
2429
|
-
* // Import the Navigation module
|
|
2430
|
-
* import { NavigationModule } from '@progress/kendo-angular-navigation';
|
|
2431
|
-
*
|
|
2432
|
-
* // The browser platform with a compiler
|
|
2433
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2434
|
-
*
|
|
2435
|
-
* import { NgModule } from '@angular/core';
|
|
2436
|
-
*
|
|
2437
|
-
* // Import the app component
|
|
2438
|
-
* import { AppComponent } from './app.component';
|
|
2439
|
-
*
|
|
2440
|
-
* // Define the app module
|
|
2441
|
-
* _@NgModule({
|
|
2442
|
-
* declarations: [AppComponent], // declare app component
|
|
2443
|
-
* imports: [BrowserModule, NavigationModule], // import Navigation module
|
|
2444
|
-
* bootstrap: [AppComponent]
|
|
2445
|
-
* })
|
|
2446
|
-
* export class AppModule {}
|
|
2447
|
-
*
|
|
2448
|
-
* // Compile and launch the module
|
|
2449
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
2450
|
-
*
|
|
2451
|
-
* ```
|
|
2452
|
-
*/
|
|
2453
|
-
class NavigationModule {
|
|
2454
|
-
}
|
|
2455
|
-
NavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2456
|
-
NavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: NavigationModule, imports: [ActionSheetComponent, ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective, ActionSheetTemplateDirective, AppBarComponent, AppBarSectionComponent, AppBarSpacerComponent, BottomNavigationComponent, BottomNavigationItemTemplateDirective, BreadCrumbComponent, BreadCrumbItemTemplateDirective], exports: [ActionSheetComponent, ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective, ActionSheetTemplateDirective, AppBarComponent, AppBarSectionComponent, AppBarSpacerComponent, BottomNavigationComponent, BottomNavigationItemTemplateDirective, BreadCrumbComponent, BreadCrumbItemTemplateDirective] });
|
|
2457
|
-
NavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationModule, providers: [IconsService, ResizeBatchService], imports: [ActionSheetComponent, AppBarComponent, AppBarSectionComponent, AppBarSpacerComponent, BottomNavigationComponent, BreadCrumbComponent] });
|
|
2458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationModule, decorators: [{
|
|
2459
|
-
type: NgModule,
|
|
2460
|
-
args: [{
|
|
2461
|
-
imports: [...KENDO_NAVIGATION],
|
|
2462
|
-
exports: [...KENDO_NAVIGATION],
|
|
2463
|
-
providers: [IconsService, ResizeBatchService]
|
|
2464
|
-
}]
|
|
2465
|
-
}] });
|
|
2466
|
-
|
|
2467
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
2468
|
-
/**
|
|
2469
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
2470
|
-
* definition for the BreadCrumb component.
|
|
2471
|
-
* @example
|
|
2472
|
-
*
|
|
2473
|
-
* ```ts-no-run
|
|
2474
|
-
* // Import the BreadCrumb module
|
|
2475
|
-
* import { BreadCrumbModule } from '@progress/kendo-angular-navigation';
|
|
2476
|
-
*
|
|
2477
|
-
* // The browser platform with a compiler
|
|
2478
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2479
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
2480
|
-
*
|
|
2481
|
-
* import { NgModule } from '@angular/core';
|
|
2482
|
-
*
|
|
2483
|
-
* // Import the app component
|
|
2484
|
-
* import { AppComponent } from './app.component';
|
|
2485
|
-
*
|
|
2486
|
-
* // Define the app module
|
|
2487
|
-
* _@NgModule({
|
|
2488
|
-
* declarations: [AppComponent], // declare app component
|
|
2489
|
-
* imports: [BrowserModule, BreadCrumbModule], // import BreadCrumb module
|
|
2490
|
-
* bootstrap: [AppComponent]
|
|
2491
|
-
* })
|
|
2492
|
-
* export class AppModule {}
|
|
2493
|
-
*
|
|
2494
|
-
* // Compile and launch the module
|
|
2495
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
2496
|
-
*
|
|
2497
|
-
* ```
|
|
2498
|
-
*/
|
|
2499
|
-
class BreadCrumbModule {
|
|
2500
|
-
}
|
|
2501
|
-
BreadCrumbModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2502
|
-
BreadCrumbModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbModule, imports: [BreadCrumbComponent, BreadCrumbItemTemplateDirective], exports: [BreadCrumbComponent, BreadCrumbItemTemplateDirective] });
|
|
2503
|
-
BreadCrumbModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbModule, providers: [IconsService, ResizeBatchService], imports: [BreadCrumbComponent] });
|
|
2504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadCrumbModule, decorators: [{
|
|
2505
|
-
type: NgModule,
|
|
2506
|
-
args: [{
|
|
2507
|
-
exports: [...KENDO_BREADCRUMB],
|
|
2508
|
-
imports: [...KENDO_BREADCRUMB],
|
|
2509
|
-
providers: [IconsService, ResizeBatchService]
|
|
2510
|
-
}]
|
|
2511
|
-
}] });
|
|
2512
|
-
|
|
2513
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
2514
|
-
/**
|
|
2515
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
2516
|
-
* definition for the BottomNavigation component.
|
|
2517
|
-
* @example
|
|
2518
|
-
*
|
|
2519
|
-
* ```ts-no-run
|
|
2520
|
-
* // Import the BottomNavigation module
|
|
2521
|
-
* import { BottomNavigationModule } from '@progress/kendo-angular-navigation';
|
|
2522
|
-
*
|
|
2523
|
-
* // The browser platform with a compiler
|
|
2524
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2525
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
2526
|
-
*
|
|
2527
|
-
* import { NgModule } from '@angular/core';
|
|
2528
|
-
*
|
|
2529
|
-
* // Import the app component
|
|
2530
|
-
* import { AppComponent } from './app.component';
|
|
2531
|
-
*
|
|
2532
|
-
* // Define the app module
|
|
2533
|
-
* _@NgModule({
|
|
2534
|
-
* declarations: [AppComponent], // declare app component
|
|
2535
|
-
* imports: [BrowserModule, BottomNavigationModule], // import BottomNavigation module
|
|
2536
|
-
* bootstrap: [AppComponent]
|
|
2537
|
-
* })
|
|
2538
|
-
* export class AppModule {}
|
|
2539
|
-
*
|
|
2540
|
-
* // Compile and launch the module
|
|
2541
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
2542
|
-
*
|
|
2543
|
-
* ```
|
|
2544
|
-
*/
|
|
2545
|
-
class BottomNavigationModule {
|
|
2546
|
-
}
|
|
2547
|
-
BottomNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2548
|
-
BottomNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationModule, imports: [BottomNavigationComponent, BottomNavigationItemTemplateDirective], exports: [BottomNavigationComponent, BottomNavigationItemTemplateDirective] });
|
|
2549
|
-
BottomNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationModule, providers: [IconsService], imports: [BottomNavigationComponent] });
|
|
2550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BottomNavigationModule, decorators: [{
|
|
2551
|
-
type: NgModule,
|
|
2552
|
-
args: [{
|
|
2553
|
-
exports: [...KENDO_BOTTOMNAVIGATION],
|
|
2554
|
-
imports: [...KENDO_BOTTOMNAVIGATION],
|
|
2555
|
-
providers: [IconsService]
|
|
2556
|
-
}]
|
|
2557
|
-
}] });
|
|
2558
|
-
|
|
2559
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
2560
|
-
/**
|
|
2561
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
2562
|
-
* definition for the ActionSheet component.
|
|
2563
|
-
*
|
|
2564
|
-
* @example
|
|
2565
|
-
*
|
|
2566
|
-
* ```ts-no-run
|
|
2567
|
-
* // Import the ActionSheet module
|
|
2568
|
-
* import { ActionSheetModule } from '@progress/kendo-angular-navigation';
|
|
2569
|
-
*
|
|
2570
|
-
* // The browser platform with a compiler
|
|
2571
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2572
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
2573
|
-
*
|
|
2574
|
-
* import { NgModule } from '@angular/core';
|
|
2575
|
-
*
|
|
2576
|
-
* // Import the app component
|
|
2577
|
-
* import { AppComponent } from './app.component';
|
|
2578
|
-
*
|
|
2579
|
-
* // Define the app module
|
|
2580
|
-
* _@NgModule({
|
|
2581
|
-
* declarations: [AppComponent], // declare app component
|
|
2582
|
-
* imports: [BrowserModule, ActionSheetModule], // import ActionSheet module
|
|
2583
|
-
* bootstrap: [AppComponent]
|
|
2584
|
-
* })
|
|
2585
|
-
* export class AppModule {}
|
|
2586
|
-
*
|
|
2587
|
-
* // Compile and launch the module
|
|
2588
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
2589
|
-
*
|
|
2590
|
-
* ```
|
|
2591
|
-
*/
|
|
2592
|
-
class ActionSheetModule {
|
|
2593
|
-
}
|
|
2594
|
-
ActionSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2595
|
-
ActionSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetModule, imports: [ActionSheetComponent, ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective, ActionSheetTemplateDirective], exports: [ActionSheetComponent, ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective, ActionSheetTemplateDirective] });
|
|
2596
|
-
ActionSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetModule, providers: [IconsService], imports: [ActionSheetComponent] });
|
|
2597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionSheetModule, decorators: [{
|
|
2598
|
-
type: NgModule,
|
|
2599
|
-
args: [{
|
|
2600
|
-
exports: [...KENDO_ACTIONSHEET],
|
|
2601
|
-
imports: [...KENDO_ACTIONSHEET],
|
|
2602
|
-
providers: [IconsService]
|
|
2603
|
-
}]
|
|
2604
|
-
}] });
|
|
2605
|
-
|
|
2606
|
-
// AppBar exports
|
|
2607
|
-
|
|
2608
|
-
/**
|
|
2609
|
-
* Generated bundle index. Do not edit.
|
|
2610
|
-
*/
|
|
2611
|
-
|
|
2612
|
-
export { ActionSheetComponent, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective, ActionSheetHeaderTemplateDirective, ActionSheetItemClickEvent, ActionSheetItemTemplateDirective, ActionSheetModule, ActionSheetTemplateDirective, AppBarComponent, AppBarModule, AppBarSectionComponent, AppBarSpacerComponent, BottomNavigationComponent, BottomNavigationItemTemplateDirective, BottomNavigationModule, BottomNavigationSelectEvent, BreadCrumbComponent, BreadCrumbItemComponent, BreadCrumbItemTemplateDirective, BreadCrumbListComponent, BreadCrumbModule, KENDO_ACTIONSHEET, KENDO_APPBAR, KENDO_BOTTOMNAVIGATION, KENDO_BREADCRUMB, KENDO_NAVIGATION, NavigationModule };
|
|
2613
|
-
|