@progress/kendo-angular-navigation 1.1.6 → 2.0.0-dev.202204141001
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/{dist/es2015/appbar → appbar}/appbar-section.component.d.ts +3 -0
- package/{dist/es2015/appbar → appbar}/appbar-spacer.component.d.ts +4 -1
- package/{dist/es2015/appbar → appbar}/appbar.component.d.ts +11 -8
- package/{dist/es2015/appbar → appbar}/models/position-mode.d.ts +0 -0
- package/{dist/es2015/appbar → appbar}/models/position.d.ts +0 -0
- package/{dist/es2015/appbar → appbar}/models/theme-color.d.ts +0 -0
- package/{dist/es2015/appbar.module.d.ts → appbar.module.d.ts} +8 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/bottomnavigation-item.component.d.ts +11 -8
- package/{dist/es2015/bottomnavigation → bottomnavigation}/bottomnavigation.component.d.ts +13 -6
- package/{dist/es2015/bottomnavigation → bottomnavigation}/constants.d.ts +0 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/events/select-event.d.ts +0 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/templates/item-template.directive.d.ts +3 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-fill.d.ts +0 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-item-flow.d.ts +0 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-item.d.ts +0 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-position-mode.d.ts +0 -0
- package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-theme-color.d.ts +0 -0
- package/{dist/es2015/bottomnavigation.module.d.ts → bottomnavigation.module.d.ts} +8 -0
- package/{dist/es2015/breadcrumb → breadcrumb}/breadcrumb-item.component.d.ts +6 -3
- package/{dist/es2015/breadcrumb → breadcrumb}/breadcrumb.component.d.ts +9 -4
- package/{dist/es2015/breadcrumb → breadcrumb}/list.component.d.ts +3 -0
- package/{dist/es2015/breadcrumb → breadcrumb}/models/breadcrumb-item.interface.d.ts +0 -0
- package/{dist/es2015/breadcrumb → breadcrumb}/models/collapse-mode.d.ts +0 -0
- package/{dist/es2015/breadcrumb → breadcrumb}/models/constants.d.ts +0 -0
- package/{dist/es2015/breadcrumb → breadcrumb}/template-directives/item-template.directive.d.ts +3 -0
- package/{dist/es2015/breadcrumb → breadcrumb}/template-directives/separator.directive.d.ts +5 -1
- package/{dist/es2015/breadcrumb → breadcrumb}/util.d.ts +0 -0
- package/{dist/es2015/breadcrumb.module.d.ts → breadcrumb.module.d.ts} +11 -0
- package/bundles/kendo-angular-navigation.umd.js +5 -0
- package/{dist/es2015/common → common}/direction.d.ts +0 -0
- package/{dist/es2015/common → common}/dom-queries.d.ts +0 -0
- package/{dist/es2015/common → common}/preventable-event.d.ts +0 -0
- package/{dist/es2015/common → common}/util.d.ts +0 -0
- package/esm2015/appbar/appbar-section.component.js +45 -0
- package/{dist/es2015 → esm2015}/appbar/appbar-spacer.component.js +21 -25
- package/{dist/es2015 → esm2015}/appbar/appbar.component.js +65 -79
- package/{dist/es → esm2015}/appbar/models/position-mode.js +1 -0
- package/{dist/es2015 → esm2015}/appbar/models/position.js +1 -0
- package/{dist/es2015 → esm2015}/appbar/models/theme-color.js +1 -0
- package/{dist/es2015 → esm2015}/appbar.module.js +18 -11
- package/esm2015/bottomnavigation/bottomnavigation-item.component.js +102 -0
- package/{dist/es2015 → esm2015}/bottomnavigation/bottomnavigation.component.js +70 -88
- package/{dist/es2015 → esm2015}/bottomnavigation/constants.js +0 -0
- package/{dist/es2015 → esm2015}/bottomnavigation/events/select-event.js +0 -0
- package/esm2015/bottomnavigation/templates/item-template.directive.js +26 -0
- package/{dist/es2015 → esm2015}/bottomnavigation/types/bottomnavigation-fill.js +1 -0
- package/{dist/es → esm2015}/bottomnavigation/types/bottomnavigation-item-flow.js +1 -0
- package/{dist/es → esm2015}/bottomnavigation/types/bottomnavigation-item.js +1 -0
- package/{dist/es → esm2015}/bottomnavigation/types/bottomnavigation-position-mode.js +1 -0
- package/{dist/es2015 → esm2015}/bottomnavigation/types/bottomnavigation-theme-color.js +1 -0
- package/{dist/es2015 → esm2015}/bottomnavigation.module.js +14 -11
- package/esm2015/breadcrumb/breadcrumb-item.component.js +161 -0
- package/{dist/es2015 → esm2015}/breadcrumb/breadcrumb.component.js +88 -73
- package/esm2015/breadcrumb/list.component.js +92 -0
- package/{dist/es → esm2015}/breadcrumb/models/breadcrumb-item.interface.js +1 -0
- package/{dist/es → esm2015}/breadcrumb/models/collapse-mode.js +1 -0
- package/{dist/es2015 → esm2015}/breadcrumb/models/constants.js +0 -0
- package/esm2015/breadcrumb/template-directives/item-template.directive.js +27 -0
- package/esm2015/breadcrumb/template-directives/separator.directive.js +69 -0
- package/{dist/es2015 → esm2015}/breadcrumb/util.js +0 -3
- package/{dist/es2015 → esm2015}/breadcrumb.module.js +18 -11
- package/{dist/es → esm2015}/common/direction.js +1 -0
- package/{dist/es2015 → esm2015}/common/dom-queries.js +0 -3
- package/{dist/es2015 → esm2015}/common/preventable-event.js +0 -0
- package/{dist/es2015 → esm2015}/common/util.js +0 -0
- package/{dist/es/appbar/models/position.js → esm2015/kendo-angular-navigation.js} +4 -0
- package/{dist/es → esm2015}/main.js +2 -0
- package/{dist/es2015 → esm2015}/navigation.module.js +20 -13
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-navigation.js} +584 -568
- package/{dist/es/breadcrumb/models/constants.js → kendo-angular-navigation.d.ts} +3 -2
- package/{dist/es2015/main.d.ts → main.d.ts} +2 -0
- package/{dist/es2015/navigation.module.d.ts → navigation.module.d.ts} +7 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +33 -109
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/dist/cdn/js/kendo-angular-navigation.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/appbar/appbar-section.component.js +0 -41
- package/dist/es/appbar/appbar-spacer.component.js +0 -77
- package/dist/es/appbar/appbar.component.js +0 -202
- package/dist/es/appbar/models/theme-color.js +0 -4
- package/dist/es/appbar.module.js +0 -61
- package/dist/es/bottomnavigation/bottomnavigation-item.component.js +0 -136
- package/dist/es/bottomnavigation/bottomnavigation.component.js +0 -356
- package/dist/es/bottomnavigation/constants.js +0 -12
- package/dist/es/bottomnavigation/events/select-event.js +0 -17
- package/dist/es/bottomnavigation/templates/item-template.directive.js +0 -25
- package/dist/es/bottomnavigation/types/bottomnavigation-fill.js +0 -4
- package/dist/es/bottomnavigation/types/bottomnavigation-theme-color.js +0 -19
- package/dist/es/bottomnavigation.module.js +0 -57
- package/dist/es/breadcrumb/breadcrumb-item.component.js +0 -98
- package/dist/es/breadcrumb/breadcrumb.component.js +0 -274
- package/dist/es/breadcrumb/list.component.js +0 -80
- package/dist/es/breadcrumb/template-directives/item-template.directive.js +0 -26
- package/dist/es/breadcrumb/template-directives/separator.directive.js +0 -78
- package/dist/es/breadcrumb/util.js +0 -27
- package/dist/es/breadcrumb.module.js +0 -68
- package/dist/es/common/dom-queries.js +0 -25
- package/dist/es/common/preventable-event.js +0 -36
- package/dist/es/common/util.js +0 -17
- package/dist/es/index.js +0 -15
- package/dist/es/navigation.module.js +0 -55
- package/dist/es/package-metadata.js +0 -15
- package/dist/es2015/appbar/appbar-section.component.js +0 -60
- package/dist/es2015/appbar/models/position-mode.js +0 -4
- package/dist/es2015/bottomnavigation/bottomnavigation-item.component.js +0 -110
- package/dist/es2015/bottomnavigation/templates/item-template.directive.js +0 -24
- package/dist/es2015/bottomnavigation/types/bottomnavigation-item-flow.js +0 -4
- package/dist/es2015/bottomnavigation/types/bottomnavigation-item.js +0 -4
- package/dist/es2015/bottomnavigation/types/bottomnavigation-position-mode.js +0 -4
- package/dist/es2015/breadcrumb/breadcrumb-item.component.js +0 -128
- package/dist/es2015/breadcrumb/list.component.js +0 -98
- package/dist/es2015/breadcrumb/models/breadcrumb-item.interface.js +0 -4
- package/dist/es2015/breadcrumb/models/collapse-mode.js +0 -4
- package/dist/es2015/breadcrumb/template-directives/item-template.directive.js +0 -25
- package/dist/es2015/breadcrumb/template-directives/separator.directive.js +0 -71
- package/dist/es2015/common/direction.js +0 -4
- package/dist/es2015/index.d.ts +0 -15
- package/dist/es2015/index.js +0 -15
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.js +0 -19
- package/dist/fesm5/index.js +0 -1633
- package/dist/npm/appbar/appbar-section.component.js +0 -43
- package/dist/npm/appbar/appbar-spacer.component.js +0 -79
- package/dist/npm/appbar/appbar.component.js +0 -204
- package/dist/npm/appbar/models/position-mode.js +0 -6
- package/dist/npm/appbar/models/position.js +0 -6
- package/dist/npm/appbar/models/theme-color.js +0 -6
- package/dist/npm/appbar.module.js +0 -63
- package/dist/npm/bottomnavigation/bottomnavigation-item.component.js +0 -138
- package/dist/npm/bottomnavigation/bottomnavigation.component.js +0 -358
- package/dist/npm/bottomnavigation/constants.js +0 -14
- package/dist/npm/bottomnavigation/events/select-event.js +0 -19
- package/dist/npm/bottomnavigation/templates/item-template.directive.js +0 -27
- package/dist/npm/bottomnavigation/types/bottomnavigation-fill.js +0 -6
- package/dist/npm/bottomnavigation/types/bottomnavigation-item-flow.js +0 -6
- package/dist/npm/bottomnavigation/types/bottomnavigation-item.js +0 -6
- package/dist/npm/bottomnavigation/types/bottomnavigation-position-mode.js +0 -6
- package/dist/npm/bottomnavigation/types/bottomnavigation-theme-color.js +0 -21
- package/dist/npm/bottomnavigation.module.js +0 -59
- package/dist/npm/breadcrumb/breadcrumb-item.component.js +0 -100
- package/dist/npm/breadcrumb/breadcrumb.component.js +0 -276
- package/dist/npm/breadcrumb/list.component.js +0 -82
- package/dist/npm/breadcrumb/models/breadcrumb-item.interface.js +0 -6
- package/dist/npm/breadcrumb/models/collapse-mode.js +0 -6
- package/dist/npm/breadcrumb/models/constants.js +0 -10
- package/dist/npm/breadcrumb/template-directives/item-template.directive.js +0 -28
- package/dist/npm/breadcrumb/template-directives/separator.directive.js +0 -80
- package/dist/npm/breadcrumb/util.js +0 -30
- package/dist/npm/breadcrumb.module.js +0 -70
- package/dist/npm/common/direction.js +0 -6
- package/dist/npm/common/dom-queries.js +0 -28
- package/dist/npm/common/preventable-event.js +0 -38
- package/dist/npm/common/util.js +0 -19
- package/dist/npm/index.js +0 -25
- package/dist/npm/main.js +0 -33
- package/dist/npm/navigation.module.js +0 -57
- package/dist/npm/package-metadata.js +0 -17
- package/dist/systemjs/kendo-angular-navigation.js +0 -5
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
10
|
-
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
11
|
-
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
12
|
-
var rxjs_1 = require("rxjs");
|
|
13
|
-
var select_event_1 = require("./events/select-event");
|
|
14
|
-
var item_template_directive_1 = require("./templates/item-template.directive");
|
|
15
|
-
var dom_queries_1 = require("../common/dom-queries");
|
|
16
|
-
var constants_1 = require("./constants");
|
|
17
|
-
var package_metadata_1 = require("../package-metadata");
|
|
18
|
-
/**
|
|
19
|
-
* Represents the [Kendo UI BottomNavigation component for Angular]({% slug overview_bottomnavigation %}).
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts-no-run
|
|
23
|
-
* _@Component({
|
|
24
|
-
* selector: 'my-app',
|
|
25
|
-
* template: `
|
|
26
|
-
* <kendo-bottomnavigation [items]="items"></kendo-bottomnavigation>
|
|
27
|
-
* `
|
|
28
|
-
* })
|
|
29
|
-
* class AppComponent {
|
|
30
|
-
* public items: Array<any> = [
|
|
31
|
-
* { text: 'Inbox', icon: 'email', selected: true },
|
|
32
|
-
* { text: 'Calendar', icon: 'calendar'},
|
|
33
|
-
* { text: 'Profile', icon: 'user'}
|
|
34
|
-
* ]
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
var BottomNavigationComponent = /** @class */ (function () {
|
|
39
|
-
function BottomNavigationComponent(localization, hostElement, ngZone, changeDetector, renderer) {
|
|
40
|
-
var _this = this;
|
|
41
|
-
this.localization = localization;
|
|
42
|
-
this.hostElement = hostElement;
|
|
43
|
-
this.ngZone = ngZone;
|
|
44
|
-
this.changeDetector = changeDetector;
|
|
45
|
-
this.renderer = renderer;
|
|
46
|
-
/**
|
|
47
|
-
* Sets a top border to the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
48
|
-
*
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
this.border = false;
|
|
52
|
-
/**
|
|
53
|
-
* Disables the whole BottomNavigation.
|
|
54
|
-
*
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
this.disabled = false;
|
|
58
|
-
/**
|
|
59
|
-
* Fires each time an item is selected. This event is preventable.
|
|
60
|
-
*/
|
|
61
|
-
this.select = new core_1.EventEmitter();
|
|
62
|
-
/**
|
|
63
|
-
* @hidden
|
|
64
|
-
*/
|
|
65
|
-
this.hostClass = true;
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
this.role = 'navigation';
|
|
70
|
-
this._fill = 'flat';
|
|
71
|
-
this._itemFlow = 'vertical';
|
|
72
|
-
this._positionMode = 'fixed';
|
|
73
|
-
this._themeColor = 'primary';
|
|
74
|
-
this._nativeHostElement = this.hostElement.nativeElement;
|
|
75
|
-
this.subscriptions = new rxjs_1.Subscription();
|
|
76
|
-
this.rtl = false;
|
|
77
|
-
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
78
|
-
this.dynamicRTLSubscription = this.localization.changes.subscribe(function (_a) {
|
|
79
|
-
var rtl = _a.rtl;
|
|
80
|
-
_this.rtl = rtl;
|
|
81
|
-
_this.direction = _this.rtl ? 'rtl' : 'ltr';
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
Object.defineProperty(BottomNavigationComponent.prototype, "fill", {
|
|
85
|
-
get: function () {
|
|
86
|
-
return this._fill;
|
|
87
|
-
},
|
|
88
|
-
/**
|
|
89
|
-
* The fill style of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
90
|
-
*
|
|
91
|
-
* * The possible values are:
|
|
92
|
-
* * (Default) `flat`
|
|
93
|
-
* * `solid`
|
|
94
|
-
*/
|
|
95
|
-
set: function (fill) {
|
|
96
|
-
this.renderer.removeClass(this._nativeHostElement, "k-bottom-nav-" + this.fill);
|
|
97
|
-
this._fill = fill === 'solid' ? 'solid' : 'flat';
|
|
98
|
-
this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this._fill);
|
|
99
|
-
},
|
|
100
|
-
enumerable: true,
|
|
101
|
-
configurable: true
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(BottomNavigationComponent.prototype, "itemFlow", {
|
|
104
|
-
get: function () {
|
|
105
|
-
return this._itemFlow;
|
|
106
|
-
},
|
|
107
|
-
/**
|
|
108
|
-
* Specifies how the icon and text label are positioned in the BottomNavigation items ([see example]({% slug items_bottomnavigation %}#toc-itemflow)).
|
|
109
|
-
*
|
|
110
|
-
* The possible values are:
|
|
111
|
-
* * (Default) `vertical` - Renders the text below the icon.
|
|
112
|
-
* * `horizontal` - Renders the icon and the text on the same line.
|
|
113
|
-
*/
|
|
114
|
-
set: function (itemFlow) {
|
|
115
|
-
this.renderer.removeClass(this._nativeHostElement, "k-bottom-nav-item-flow-" + this.itemFlow);
|
|
116
|
-
this._itemFlow = itemFlow === 'horizontal' ? 'horizontal' : 'vertical';
|
|
117
|
-
this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-item-flow-" + this._itemFlow);
|
|
118
|
-
},
|
|
119
|
-
enumerable: true,
|
|
120
|
-
configurable: true
|
|
121
|
-
});
|
|
122
|
-
Object.defineProperty(BottomNavigationComponent.prototype, "positionMode", {
|
|
123
|
-
get: function () {
|
|
124
|
-
return this._positionMode;
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* Specifies the position and behavior of the BottomNavigation when the page is scrollable ([see example]({% slug positioning_bottomnavigation %})).
|
|
128
|
-
*
|
|
129
|
-
* The possible values are:
|
|
130
|
-
* * (Default) `fixed` - The BottomNavigation always stays at the bottom of the viewport, regardless of the page scroll position.
|
|
131
|
-
* * `sticky` - Positions the BottomNavigation at the end of the scrollable container.
|
|
132
|
-
*/
|
|
133
|
-
set: function (positionMode) {
|
|
134
|
-
this.renderer.removeClass(this._nativeHostElement, "k-pos-" + this.positionMode);
|
|
135
|
-
this._positionMode = positionMode === 'sticky' ? 'sticky' : 'fixed';
|
|
136
|
-
this.renderer.addClass(this._nativeHostElement, "k-pos-" + this._positionMode);
|
|
137
|
-
},
|
|
138
|
-
enumerable: true,
|
|
139
|
-
configurable: true
|
|
140
|
-
});
|
|
141
|
-
Object.defineProperty(BottomNavigationComponent.prototype, "themeColor", {
|
|
142
|
-
get: function () {
|
|
143
|
-
return this._themeColor;
|
|
144
|
-
},
|
|
145
|
-
/**
|
|
146
|
-
* Specifies the theme color of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
147
|
-
*
|
|
148
|
-
* * The possible values are:
|
|
149
|
-
* * (Default) `primary` - Applies coloring based on the primary theme color.
|
|
150
|
-
* * `secondary` - Applies coloring based on the secondary theme color.
|
|
151
|
-
* * `tertiary` - Applies coloring based on the tertiary theme color.
|
|
152
|
-
* * `info` - Applies coloring based on the info theme color.
|
|
153
|
-
* * `success` - Applies coloring based on the success theme color.
|
|
154
|
-
* * `warning` - Applies coloring based on the warning theme color.
|
|
155
|
-
* * `error` - Applies coloring based on the error theme color.
|
|
156
|
-
* * `dark` - Applies coloring based on the dark theme color.
|
|
157
|
-
* * `light` - Applies coloring based on the light theme color.
|
|
158
|
-
* * `inverse` - Applies coloring based on the inverted theme color.
|
|
159
|
-
*/
|
|
160
|
-
set: function (themeColor) {
|
|
161
|
-
var newColor = constants_1.colors.find(function (color) { return color === themeColor; });
|
|
162
|
-
if (newColor) {
|
|
163
|
-
this.renderer.removeClass(this._nativeHostElement, "k-bottom-nav-" + this._themeColor);
|
|
164
|
-
this._themeColor = themeColor;
|
|
165
|
-
this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this._themeColor);
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
enumerable: true,
|
|
169
|
-
configurable: true
|
|
170
|
-
});
|
|
171
|
-
Object.defineProperty(BottomNavigationComponent.prototype, "borderClass", {
|
|
172
|
-
/**
|
|
173
|
-
* @hidden
|
|
174
|
-
*/
|
|
175
|
-
get: function () {
|
|
176
|
-
return this.border;
|
|
177
|
-
},
|
|
178
|
-
enumerable: true,
|
|
179
|
-
configurable: true
|
|
180
|
-
});
|
|
181
|
-
Object.defineProperty(BottomNavigationComponent.prototype, "disabledClass", {
|
|
182
|
-
/**
|
|
183
|
-
* @hidden
|
|
184
|
-
*/
|
|
185
|
-
get: function () {
|
|
186
|
-
return this.disabled;
|
|
187
|
-
},
|
|
188
|
-
enumerable: true,
|
|
189
|
-
configurable: true
|
|
190
|
-
});
|
|
191
|
-
/**
|
|
192
|
-
* @hidden
|
|
193
|
-
*/
|
|
194
|
-
BottomNavigationComponent.prototype.ngOnInit = function () {
|
|
195
|
-
this.initDomEvents();
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* @hidden
|
|
199
|
-
*/
|
|
200
|
-
BottomNavigationComponent.prototype.ngAfterViewInit = function () {
|
|
201
|
-
this.applyClasses();
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* @hidden
|
|
205
|
-
*/
|
|
206
|
-
BottomNavigationComponent.prototype.ngOnDestroy = function () {
|
|
207
|
-
if (this.dynamicRTLSubscription) {
|
|
208
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
209
|
-
}
|
|
210
|
-
this.subscriptions.unsubscribe();
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* @hidden
|
|
214
|
-
*/
|
|
215
|
-
BottomNavigationComponent.prototype.selectItem = function (idx, args) {
|
|
216
|
-
var eventArgs = new select_event_1.BottomNavigationSelectEvent(tslib_1.__assign({}, args));
|
|
217
|
-
this.select.emit(eventArgs);
|
|
218
|
-
if (!eventArgs.isDefaultPrevented()) {
|
|
219
|
-
this.selectedIdx = idx;
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
BottomNavigationComponent.prototype.applyClasses = function () {
|
|
223
|
-
this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this.fill);
|
|
224
|
-
this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-item-flow-" + this.itemFlow);
|
|
225
|
-
this.renderer.addClass(this._nativeHostElement, "k-pos-" + this.positionMode);
|
|
226
|
-
this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this.themeColor);
|
|
227
|
-
};
|
|
228
|
-
BottomNavigationComponent.prototype.initDomEvents = function () {
|
|
229
|
-
var _this = this;
|
|
230
|
-
if (!this.hostElement) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
this.ngZone.runOutsideAngular(function () {
|
|
234
|
-
_this.subscriptions.add(_this.renderer.listen(_this._nativeHostElement, 'click', _this.clickHandler.bind(_this)));
|
|
235
|
-
_this.subscriptions.add(_this.renderer.listen(_this._nativeHostElement, 'keydown', _this.keyDownHandler.bind(_this)));
|
|
236
|
-
});
|
|
237
|
-
};
|
|
238
|
-
BottomNavigationComponent.prototype.clickHandler = function (e) {
|
|
239
|
-
var _this = this;
|
|
240
|
-
var itemIdx = this.getBottomNavigationItemIndex(e.target);
|
|
241
|
-
var item = this.items[itemIdx];
|
|
242
|
-
if (!item) {
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (item.disabled) {
|
|
246
|
-
e.preventDefault();
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
var args = {
|
|
250
|
-
index: itemIdx,
|
|
251
|
-
item: item,
|
|
252
|
-
originalEvent: e,
|
|
253
|
-
sender: this
|
|
254
|
-
};
|
|
255
|
-
this.ngZone.run(function () {
|
|
256
|
-
_this.selectItem(itemIdx, args);
|
|
257
|
-
_this.changeDetector.markForCheck();
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
BottomNavigationComponent.prototype.keyDownHandler = function (e) {
|
|
261
|
-
var isEnterOrSpace = e.keyCode === kendo_angular_common_1.Keys.Enter || e.keyCode === kendo_angular_common_1.Keys.Space;
|
|
262
|
-
if (!isEnterOrSpace) {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
this.clickHandler(e);
|
|
266
|
-
};
|
|
267
|
-
BottomNavigationComponent.prototype.getBottomNavigationItemIndex = function (target) {
|
|
268
|
-
var item = dom_queries_1.closestItem(target, constants_1.BOTTOMNAVIGATION_ITEM_INDEX, this._nativeHostElement);
|
|
269
|
-
if (item) {
|
|
270
|
-
return dom_queries_1.itemIndex(item, constants_1.BOTTOMNAVIGATION_ITEM_INDEX);
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
tslib_1.__decorate([
|
|
274
|
-
core_1.Input(),
|
|
275
|
-
tslib_1.__metadata("design:type", Array)
|
|
276
|
-
], BottomNavigationComponent.prototype, "items", void 0);
|
|
277
|
-
tslib_1.__decorate([
|
|
278
|
-
core_1.Input(),
|
|
279
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
280
|
-
], BottomNavigationComponent.prototype, "border", void 0);
|
|
281
|
-
tslib_1.__decorate([
|
|
282
|
-
core_1.Input(),
|
|
283
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
284
|
-
], BottomNavigationComponent.prototype, "disabled", void 0);
|
|
285
|
-
tslib_1.__decorate([
|
|
286
|
-
core_1.Input(),
|
|
287
|
-
tslib_1.__metadata("design:type", String),
|
|
288
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
289
|
-
], BottomNavigationComponent.prototype, "fill", null);
|
|
290
|
-
tslib_1.__decorate([
|
|
291
|
-
core_1.Input(),
|
|
292
|
-
tslib_1.__metadata("design:type", String),
|
|
293
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
294
|
-
], BottomNavigationComponent.prototype, "itemFlow", null);
|
|
295
|
-
tslib_1.__decorate([
|
|
296
|
-
core_1.Input(),
|
|
297
|
-
tslib_1.__metadata("design:type", String),
|
|
298
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
299
|
-
], BottomNavigationComponent.prototype, "positionMode", null);
|
|
300
|
-
tslib_1.__decorate([
|
|
301
|
-
core_1.Input(),
|
|
302
|
-
tslib_1.__metadata("design:type", String),
|
|
303
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
304
|
-
], BottomNavigationComponent.prototype, "themeColor", null);
|
|
305
|
-
tslib_1.__decorate([
|
|
306
|
-
core_1.Output(),
|
|
307
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
308
|
-
], BottomNavigationComponent.prototype, "select", void 0);
|
|
309
|
-
tslib_1.__decorate([
|
|
310
|
-
core_1.HostBinding('class.k-hstack'),
|
|
311
|
-
core_1.HostBinding('class.k-justify-content-stretch'),
|
|
312
|
-
core_1.HostBinding('class.k-bottom-nav'),
|
|
313
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
314
|
-
], BottomNavigationComponent.prototype, "hostClass", void 0);
|
|
315
|
-
tslib_1.__decorate([
|
|
316
|
-
core_1.HostBinding('class.k-bottom-nav-border'),
|
|
317
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
318
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
319
|
-
], BottomNavigationComponent.prototype, "borderClass", null);
|
|
320
|
-
tslib_1.__decorate([
|
|
321
|
-
core_1.HostBinding('class.k-state-disabled'),
|
|
322
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
323
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
324
|
-
], BottomNavigationComponent.prototype, "disabledClass", null);
|
|
325
|
-
tslib_1.__decorate([
|
|
326
|
-
core_1.HostBinding('attr.role'),
|
|
327
|
-
tslib_1.__metadata("design:type", String)
|
|
328
|
-
], BottomNavigationComponent.prototype, "role", void 0);
|
|
329
|
-
tslib_1.__decorate([
|
|
330
|
-
core_1.HostBinding('attr.dir'),
|
|
331
|
-
tslib_1.__metadata("design:type", String)
|
|
332
|
-
], BottomNavigationComponent.prototype, "direction", void 0);
|
|
333
|
-
tslib_1.__decorate([
|
|
334
|
-
core_1.ContentChild(item_template_directive_1.BottomNavigationItemTemplateDirective, { static: false }),
|
|
335
|
-
tslib_1.__metadata("design:type", item_template_directive_1.BottomNavigationItemTemplateDirective)
|
|
336
|
-
], BottomNavigationComponent.prototype, "itemTemplate", void 0);
|
|
337
|
-
BottomNavigationComponent = tslib_1.__decorate([
|
|
338
|
-
core_1.Component({
|
|
339
|
-
exportAs: 'kendoBottomNavigation',
|
|
340
|
-
selector: 'kendo-bottomnavigation',
|
|
341
|
-
providers: [
|
|
342
|
-
kendo_angular_l10n_1.LocalizationService,
|
|
343
|
-
{
|
|
344
|
-
provide: kendo_angular_l10n_1.L10N_PREFIX,
|
|
345
|
-
useValue: 'kendo.bottomnavigation'
|
|
346
|
-
}
|
|
347
|
-
],
|
|
348
|
-
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." + constants_1.BOTTOMNAVIGATION_ITEM_INDEX + "]=\"idx\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n [orientation]=\"itemFlow\">\n </span>\n </ng-container>\n "
|
|
349
|
-
}),
|
|
350
|
-
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService,
|
|
351
|
-
core_1.ElementRef,
|
|
352
|
-
core_1.NgZone,
|
|
353
|
-
core_1.ChangeDetectorRef,
|
|
354
|
-
core_1.Renderer2])
|
|
355
|
-
], BottomNavigationComponent);
|
|
356
|
-
return BottomNavigationComponent;
|
|
357
|
-
}());
|
|
358
|
-
exports.BottomNavigationComponent = BottomNavigationComponent;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
exports.BOTTOMNAVIGATION_ITEM_INDEX = 'data-kendo-bottomnavigation-index';
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
exports.colors = ['primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse'];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var preventable_event_1 = require("../../common/preventable-event");
|
|
9
|
-
/**
|
|
10
|
-
* Arguments for the `select` event of the BottomNavigation.
|
|
11
|
-
*/
|
|
12
|
-
var BottomNavigationSelectEvent = /** @class */ (function (_super) {
|
|
13
|
-
tslib_1.__extends(BottomNavigationSelectEvent, _super);
|
|
14
|
-
function BottomNavigationSelectEvent() {
|
|
15
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
return BottomNavigationSelectEvent;
|
|
18
|
-
}(preventable_event_1.PreventableEvent));
|
|
19
|
-
exports.BottomNavigationSelectEvent = BottomNavigationSelectEvent;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents a template that defines the item content of the BottomNavigation.
|
|
11
|
-
* To define the template, nest an `<ng-template>` tag
|
|
12
|
-
* with the `kendoBottomNavigationItemTemplate` directive inside the `<kendo-bottomnavigation>` tag ([see example]({% slug templates_bottomnavigation %})).
|
|
13
|
-
*/
|
|
14
|
-
var BottomNavigationItemTemplateDirective = /** @class */ (function () {
|
|
15
|
-
function BottomNavigationItemTemplateDirective(templateRef) {
|
|
16
|
-
this.templateRef = templateRef;
|
|
17
|
-
}
|
|
18
|
-
BottomNavigationItemTemplateDirective = tslib_1.__decorate([
|
|
19
|
-
core_1.Directive({
|
|
20
|
-
selector: '[kendoBottomNavigationItemTemplate]'
|
|
21
|
-
}),
|
|
22
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
23
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
24
|
-
], BottomNavigationItemTemplateDirective);
|
|
25
|
-
return BottomNavigationItemTemplateDirective;
|
|
26
|
-
}());
|
|
27
|
-
exports.BottomNavigationItemTemplateDirective = BottomNavigationItemTemplateDirective;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
/**
|
|
7
|
-
* Specifies the theme color of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
|
|
8
|
-
*
|
|
9
|
-
* * The possible values are:
|
|
10
|
-
* * (Default) `primary` - Applies coloring based on the primary theme color.
|
|
11
|
-
* * `secondary` - Applies coloring based on the secondary theme color.
|
|
12
|
-
* * `tertiary` - Applies coloring based on the tertiary theme color.
|
|
13
|
-
* * `info` - Applies coloring based on the info theme color.
|
|
14
|
-
* * `success` - Applies coloring based on the success theme color.
|
|
15
|
-
* * `warning` - Applies coloring based on the warning theme color.
|
|
16
|
-
* * `error` - Applies coloring based on the error theme color.
|
|
17
|
-
* * `dark` - Applies coloring based on the dark theme color.
|
|
18
|
-
* * `light` - Applies coloring based on the light theme color.
|
|
19
|
-
* * `inverse` - Applies coloring based on the inverted theme color.
|
|
20
|
-
*/
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var bottomnavigation_item_component_1 = require("./bottomnavigation/bottomnavigation-item.component");
|
|
9
|
-
var item_template_directive_1 = require("./bottomnavigation/templates/item-template.directive");
|
|
10
|
-
var core_1 = require("@angular/core");
|
|
11
|
-
var common_1 = require("@angular/common");
|
|
12
|
-
var bottomnavigation_component_1 = require("./bottomnavigation/bottomnavigation.component");
|
|
13
|
-
var templateDirectives = [item_template_directive_1.BottomNavigationItemTemplateDirective];
|
|
14
|
-
var exportedComponents = [bottomnavigation_component_1.BottomNavigationComponent].concat(templateDirectives);
|
|
15
|
-
var declarations = [bottomnavigation_item_component_1.BottomNavigationItemComponent].concat(exportedComponents);
|
|
16
|
-
/**
|
|
17
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
18
|
-
* definition for the BottomNavigation component.
|
|
19
|
-
* @example
|
|
20
|
-
*
|
|
21
|
-
* ```ts-no-run
|
|
22
|
-
* // Import the BottomNavigation module
|
|
23
|
-
* import { BottomNavigationModule } from '@progress/kendo-angular-navigation';
|
|
24
|
-
*
|
|
25
|
-
* // The browser platform with a compiler
|
|
26
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
27
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
28
|
-
*
|
|
29
|
-
* import { NgModule } from '@angular/core';
|
|
30
|
-
*
|
|
31
|
-
* // Import the app component
|
|
32
|
-
* import { AppComponent } from './app.component';
|
|
33
|
-
*
|
|
34
|
-
* // Define the app module
|
|
35
|
-
* _@NgModule({
|
|
36
|
-
* declarations: [AppComponent], // declare app component
|
|
37
|
-
* imports: [BrowserModule, BottomNavigationModule], // import BottomNavigation module
|
|
38
|
-
* bootstrap: [AppComponent]
|
|
39
|
-
* })
|
|
40
|
-
* export class AppModule {}
|
|
41
|
-
*
|
|
42
|
-
* // Compile and launch the module
|
|
43
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
44
|
-
*
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
var BottomNavigationModule = /** @class */ (function () {
|
|
48
|
-
function BottomNavigationModule() {
|
|
49
|
-
}
|
|
50
|
-
BottomNavigationModule = tslib_1.__decorate([
|
|
51
|
-
core_1.NgModule({
|
|
52
|
-
declarations: [declarations],
|
|
53
|
-
exports: [exportedComponents],
|
|
54
|
-
imports: [common_1.CommonModule]
|
|
55
|
-
})
|
|
56
|
-
], BottomNavigationModule);
|
|
57
|
-
return BottomNavigationModule;
|
|
58
|
-
}());
|
|
59
|
-
exports.BottomNavigationModule = BottomNavigationModule;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
10
|
-
var util_1 = require("../common/util");
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
var BreadCrumbItemComponent = /** @class */ (function () {
|
|
15
|
-
function BreadCrumbItemComponent(el) {
|
|
16
|
-
this.el = el;
|
|
17
|
-
this.index = -1;
|
|
18
|
-
this.hostClasses = true;
|
|
19
|
-
this.disabled = false;
|
|
20
|
-
}
|
|
21
|
-
Object.defineProperty(BreadCrumbItemComponent.prototype, "isRootItem", {
|
|
22
|
-
get: function () {
|
|
23
|
-
return this.item.context.isFirst;
|
|
24
|
-
},
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(BreadCrumbItemComponent.prototype, "isDisabled", {
|
|
29
|
-
get: function () {
|
|
30
|
-
return this.disabled || null;
|
|
31
|
-
},
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true
|
|
34
|
-
});
|
|
35
|
-
Object.defineProperty(BreadCrumbItemComponent.prototype, "isLastItem", {
|
|
36
|
-
get: function () {
|
|
37
|
-
return this.item.context.isLast;
|
|
38
|
-
},
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true
|
|
41
|
-
});
|
|
42
|
-
BreadCrumbItemComponent.prototype.ngOnInit = function () {
|
|
43
|
-
this.disabled = this.item.data && (this.item.data.disabled || this.item.context.isLast);
|
|
44
|
-
};
|
|
45
|
-
BreadCrumbItemComponent.prototype.ngAfterViewInit = function () {
|
|
46
|
-
if (kendo_angular_common_1.isDocumentAvailable()) {
|
|
47
|
-
this.width = util_1.outerWidth(this.el.nativeElement);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
BreadCrumbItemComponent.prototype.onImageLoad = function () {
|
|
51
|
-
if (kendo_angular_common_1.isDocumentAvailable()) {
|
|
52
|
-
this.width = util_1.outerWidth(this.el.nativeElement);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
tslib_1.__decorate([
|
|
56
|
-
core_1.Input(),
|
|
57
|
-
tslib_1.__metadata("design:type", Object)
|
|
58
|
-
], BreadCrumbItemComponent.prototype, "item", void 0);
|
|
59
|
-
tslib_1.__decorate([
|
|
60
|
-
core_1.Input(),
|
|
61
|
-
tslib_1.__metadata("design:type", String)
|
|
62
|
-
], BreadCrumbItemComponent.prototype, "collapseMode", void 0);
|
|
63
|
-
tslib_1.__decorate([
|
|
64
|
-
core_1.Input(),
|
|
65
|
-
tslib_1.__metadata("design:type", Number)
|
|
66
|
-
], BreadCrumbItemComponent.prototype, "index", void 0);
|
|
67
|
-
tslib_1.__decorate([
|
|
68
|
-
core_1.Input(),
|
|
69
|
-
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
70
|
-
], BreadCrumbItemComponent.prototype, "itemTemplate", void 0);
|
|
71
|
-
tslib_1.__decorate([
|
|
72
|
-
core_1.HostBinding('class.k-flex-none'),
|
|
73
|
-
core_1.HostBinding('class.k-breadcrumb-item'),
|
|
74
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
75
|
-
], BreadCrumbItemComponent.prototype, "hostClasses", void 0);
|
|
76
|
-
tslib_1.__decorate([
|
|
77
|
-
core_1.HostBinding('class.k-breadcrumb-root-item'),
|
|
78
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
79
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
80
|
-
], BreadCrumbItemComponent.prototype, "isRootItem", null);
|
|
81
|
-
tslib_1.__decorate([
|
|
82
|
-
core_1.HostBinding('attr.aria-disabled'),
|
|
83
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
84
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
85
|
-
], BreadCrumbItemComponent.prototype, "isDisabled", null);
|
|
86
|
-
tslib_1.__decorate([
|
|
87
|
-
core_1.HostBinding('class.k-breadcrumb-last-item'),
|
|
88
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
89
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
90
|
-
], BreadCrumbItemComponent.prototype, "isLastItem", null);
|
|
91
|
-
BreadCrumbItemComponent = tslib_1.__decorate([
|
|
92
|
-
core_1.Component({
|
|
93
|
-
selector: '[kendoBreadCrumbItem]',
|
|
94
|
-
template: "\n <ng-template #separator>\n <ng-content select=\"[kendoBreadCrumbSeparator]\"></ng-content>\n </ng-template>\n\n <ng-container *ngIf=\"collapseMode === 'wrap'\">\n <ng-container *ngTemplateOutlet=\"separator\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!item.context.collapsed\">\n <span\n *ngIf=\"!itemTemplate\"\n [ngClass]=\"{\n 'k-breadcrumb-root-link': item.context.isFirst,\n 'k-breadcrumb-link': index !== 0,\n 'k-breadcrumb-icontext-link': !!item.data.icon && !!item.data.text,\n 'k-breadcrumb-icon-link': !!item.data.icon && !item.data.text,\n 'k-state-disabled': disabled\n }\"\n [title]=\"item.data.title || ''\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-current]=\"item.context.isLast ? true : null\"\n role=\"link\"\n class=\"k-cursor-pointer k-flex-none\"\n >\n <img *ngIf=\"item.data.imageUrl\" (load)=\"onImageLoad()\" [src]=\"item.data.imageUrl\" class=\"k-image\" role=\"presentation\" />\n <span *ngIf=\"item.data.icon && !item.data.iconClass\" class=\"k-icon k-i-{{ item.data.icon }}\"></span>\n <span *ngIf=\"item.data.iconClass\" class=\"{{ item.data.iconClass }}\"></span>\n {{ item.data.text }}\n </span>\n <ng-template\n *ngIf=\"itemTemplate\"\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: item.data,\n index: index\n }\"\n ></ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"collapseMode !== 'wrap'\">\n <ng-container *ngTemplateOutlet=\"separator\"></ng-container>\n </ng-container>\n "
|
|
95
|
-
}),
|
|
96
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef])
|
|
97
|
-
], BreadCrumbItemComponent);
|
|
98
|
-
return BreadCrumbItemComponent;
|
|
99
|
-
}());
|
|
100
|
-
exports.BreadCrumbItemComponent = BreadCrumbItemComponent;
|