@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.
Files changed (161) hide show
  1. package/{dist/es2015/appbar → appbar}/appbar-section.component.d.ts +3 -0
  2. package/{dist/es2015/appbar → appbar}/appbar-spacer.component.d.ts +4 -1
  3. package/{dist/es2015/appbar → appbar}/appbar.component.d.ts +11 -8
  4. package/{dist/es2015/appbar → appbar}/models/position-mode.d.ts +0 -0
  5. package/{dist/es2015/appbar → appbar}/models/position.d.ts +0 -0
  6. package/{dist/es2015/appbar → appbar}/models/theme-color.d.ts +0 -0
  7. package/{dist/es2015/appbar.module.d.ts → appbar.module.d.ts} +8 -0
  8. package/{dist/es2015/bottomnavigation → bottomnavigation}/bottomnavigation-item.component.d.ts +11 -8
  9. package/{dist/es2015/bottomnavigation → bottomnavigation}/bottomnavigation.component.d.ts +13 -6
  10. package/{dist/es2015/bottomnavigation → bottomnavigation}/constants.d.ts +0 -0
  11. package/{dist/es2015/bottomnavigation → bottomnavigation}/events/select-event.d.ts +0 -0
  12. package/{dist/es2015/bottomnavigation → bottomnavigation}/templates/item-template.directive.d.ts +3 -0
  13. package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-fill.d.ts +0 -0
  14. package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-item-flow.d.ts +0 -0
  15. package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-item.d.ts +0 -0
  16. package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-position-mode.d.ts +0 -0
  17. package/{dist/es2015/bottomnavigation → bottomnavigation}/types/bottomnavigation-theme-color.d.ts +0 -0
  18. package/{dist/es2015/bottomnavigation.module.d.ts → bottomnavigation.module.d.ts} +8 -0
  19. package/{dist/es2015/breadcrumb → breadcrumb}/breadcrumb-item.component.d.ts +6 -3
  20. package/{dist/es2015/breadcrumb → breadcrumb}/breadcrumb.component.d.ts +9 -4
  21. package/{dist/es2015/breadcrumb → breadcrumb}/list.component.d.ts +3 -0
  22. package/{dist/es2015/breadcrumb → breadcrumb}/models/breadcrumb-item.interface.d.ts +0 -0
  23. package/{dist/es2015/breadcrumb → breadcrumb}/models/collapse-mode.d.ts +0 -0
  24. package/{dist/es2015/breadcrumb → breadcrumb}/models/constants.d.ts +0 -0
  25. package/{dist/es2015/breadcrumb → breadcrumb}/template-directives/item-template.directive.d.ts +3 -0
  26. package/{dist/es2015/breadcrumb → breadcrumb}/template-directives/separator.directive.d.ts +5 -1
  27. package/{dist/es2015/breadcrumb → breadcrumb}/util.d.ts +0 -0
  28. package/{dist/es2015/breadcrumb.module.d.ts → breadcrumb.module.d.ts} +11 -0
  29. package/bundles/kendo-angular-navigation.umd.js +5 -0
  30. package/{dist/es2015/common → common}/direction.d.ts +0 -0
  31. package/{dist/es2015/common → common}/dom-queries.d.ts +0 -0
  32. package/{dist/es2015/common → common}/preventable-event.d.ts +0 -0
  33. package/{dist/es2015/common → common}/util.d.ts +0 -0
  34. package/esm2015/appbar/appbar-section.component.js +45 -0
  35. package/{dist/es2015 → esm2015}/appbar/appbar-spacer.component.js +21 -25
  36. package/{dist/es2015 → esm2015}/appbar/appbar.component.js +65 -79
  37. package/{dist/es → esm2015}/appbar/models/position-mode.js +1 -0
  38. package/{dist/es2015 → esm2015}/appbar/models/position.js +1 -0
  39. package/{dist/es2015 → esm2015}/appbar/models/theme-color.js +1 -0
  40. package/{dist/es2015 → esm2015}/appbar.module.js +18 -11
  41. package/esm2015/bottomnavigation/bottomnavigation-item.component.js +102 -0
  42. package/{dist/es2015 → esm2015}/bottomnavigation/bottomnavigation.component.js +70 -88
  43. package/{dist/es2015 → esm2015}/bottomnavigation/constants.js +0 -0
  44. package/{dist/es2015 → esm2015}/bottomnavigation/events/select-event.js +0 -0
  45. package/esm2015/bottomnavigation/templates/item-template.directive.js +26 -0
  46. package/{dist/es2015 → esm2015}/bottomnavigation/types/bottomnavigation-fill.js +1 -0
  47. package/{dist/es → esm2015}/bottomnavigation/types/bottomnavigation-item-flow.js +1 -0
  48. package/{dist/es → esm2015}/bottomnavigation/types/bottomnavigation-item.js +1 -0
  49. package/{dist/es → esm2015}/bottomnavigation/types/bottomnavigation-position-mode.js +1 -0
  50. package/{dist/es2015 → esm2015}/bottomnavigation/types/bottomnavigation-theme-color.js +1 -0
  51. package/{dist/es2015 → esm2015}/bottomnavigation.module.js +14 -11
  52. package/esm2015/breadcrumb/breadcrumb-item.component.js +161 -0
  53. package/{dist/es2015 → esm2015}/breadcrumb/breadcrumb.component.js +88 -73
  54. package/esm2015/breadcrumb/list.component.js +92 -0
  55. package/{dist/es → esm2015}/breadcrumb/models/breadcrumb-item.interface.js +1 -0
  56. package/{dist/es → esm2015}/breadcrumb/models/collapse-mode.js +1 -0
  57. package/{dist/es2015 → esm2015}/breadcrumb/models/constants.js +0 -0
  58. package/esm2015/breadcrumb/template-directives/item-template.directive.js +27 -0
  59. package/esm2015/breadcrumb/template-directives/separator.directive.js +69 -0
  60. package/{dist/es2015 → esm2015}/breadcrumb/util.js +0 -3
  61. package/{dist/es2015 → esm2015}/breadcrumb.module.js +18 -11
  62. package/{dist/es → esm2015}/common/direction.js +1 -0
  63. package/{dist/es2015 → esm2015}/common/dom-queries.js +0 -3
  64. package/{dist/es2015 → esm2015}/common/preventable-event.js +0 -0
  65. package/{dist/es2015 → esm2015}/common/util.js +0 -0
  66. package/{dist/es/appbar/models/position.js → esm2015/kendo-angular-navigation.js} +4 -0
  67. package/{dist/es → esm2015}/main.js +2 -0
  68. package/{dist/es2015 → esm2015}/navigation.module.js +20 -13
  69. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  70. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-navigation.js} +584 -568
  71. package/{dist/es/breadcrumb/models/constants.js → kendo-angular-navigation.d.ts} +3 -2
  72. package/{dist/es2015/main.d.ts → main.d.ts} +2 -0
  73. package/{dist/es2015/navigation.module.d.ts → navigation.module.d.ts} +7 -0
  74. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  75. package/package.json +33 -109
  76. package/schematics/ngAdd/index.js +5 -2
  77. package/schematics/ngAdd/index.js.map +1 -1
  78. package/dist/cdn/js/kendo-angular-navigation.js +0 -20
  79. package/dist/cdn/main.js +0 -5
  80. package/dist/es/appbar/appbar-section.component.js +0 -41
  81. package/dist/es/appbar/appbar-spacer.component.js +0 -77
  82. package/dist/es/appbar/appbar.component.js +0 -202
  83. package/dist/es/appbar/models/theme-color.js +0 -4
  84. package/dist/es/appbar.module.js +0 -61
  85. package/dist/es/bottomnavigation/bottomnavigation-item.component.js +0 -136
  86. package/dist/es/bottomnavigation/bottomnavigation.component.js +0 -356
  87. package/dist/es/bottomnavigation/constants.js +0 -12
  88. package/dist/es/bottomnavigation/events/select-event.js +0 -17
  89. package/dist/es/bottomnavigation/templates/item-template.directive.js +0 -25
  90. package/dist/es/bottomnavigation/types/bottomnavigation-fill.js +0 -4
  91. package/dist/es/bottomnavigation/types/bottomnavigation-theme-color.js +0 -19
  92. package/dist/es/bottomnavigation.module.js +0 -57
  93. package/dist/es/breadcrumb/breadcrumb-item.component.js +0 -98
  94. package/dist/es/breadcrumb/breadcrumb.component.js +0 -274
  95. package/dist/es/breadcrumb/list.component.js +0 -80
  96. package/dist/es/breadcrumb/template-directives/item-template.directive.js +0 -26
  97. package/dist/es/breadcrumb/template-directives/separator.directive.js +0 -78
  98. package/dist/es/breadcrumb/util.js +0 -27
  99. package/dist/es/breadcrumb.module.js +0 -68
  100. package/dist/es/common/dom-queries.js +0 -25
  101. package/dist/es/common/preventable-event.js +0 -36
  102. package/dist/es/common/util.js +0 -17
  103. package/dist/es/index.js +0 -15
  104. package/dist/es/navigation.module.js +0 -55
  105. package/dist/es/package-metadata.js +0 -15
  106. package/dist/es2015/appbar/appbar-section.component.js +0 -60
  107. package/dist/es2015/appbar/models/position-mode.js +0 -4
  108. package/dist/es2015/bottomnavigation/bottomnavigation-item.component.js +0 -110
  109. package/dist/es2015/bottomnavigation/templates/item-template.directive.js +0 -24
  110. package/dist/es2015/bottomnavigation/types/bottomnavigation-item-flow.js +0 -4
  111. package/dist/es2015/bottomnavigation/types/bottomnavigation-item.js +0 -4
  112. package/dist/es2015/bottomnavigation/types/bottomnavigation-position-mode.js +0 -4
  113. package/dist/es2015/breadcrumb/breadcrumb-item.component.js +0 -128
  114. package/dist/es2015/breadcrumb/list.component.js +0 -98
  115. package/dist/es2015/breadcrumb/models/breadcrumb-item.interface.js +0 -4
  116. package/dist/es2015/breadcrumb/models/collapse-mode.js +0 -4
  117. package/dist/es2015/breadcrumb/template-directives/item-template.directive.js +0 -25
  118. package/dist/es2015/breadcrumb/template-directives/separator.directive.js +0 -71
  119. package/dist/es2015/common/direction.js +0 -4
  120. package/dist/es2015/index.d.ts +0 -15
  121. package/dist/es2015/index.js +0 -15
  122. package/dist/es2015/index.metadata.json +0 -1
  123. package/dist/es2015/main.js +0 -19
  124. package/dist/fesm5/index.js +0 -1633
  125. package/dist/npm/appbar/appbar-section.component.js +0 -43
  126. package/dist/npm/appbar/appbar-spacer.component.js +0 -79
  127. package/dist/npm/appbar/appbar.component.js +0 -204
  128. package/dist/npm/appbar/models/position-mode.js +0 -6
  129. package/dist/npm/appbar/models/position.js +0 -6
  130. package/dist/npm/appbar/models/theme-color.js +0 -6
  131. package/dist/npm/appbar.module.js +0 -63
  132. package/dist/npm/bottomnavigation/bottomnavigation-item.component.js +0 -138
  133. package/dist/npm/bottomnavigation/bottomnavigation.component.js +0 -358
  134. package/dist/npm/bottomnavigation/constants.js +0 -14
  135. package/dist/npm/bottomnavigation/events/select-event.js +0 -19
  136. package/dist/npm/bottomnavigation/templates/item-template.directive.js +0 -27
  137. package/dist/npm/bottomnavigation/types/bottomnavigation-fill.js +0 -6
  138. package/dist/npm/bottomnavigation/types/bottomnavigation-item-flow.js +0 -6
  139. package/dist/npm/bottomnavigation/types/bottomnavigation-item.js +0 -6
  140. package/dist/npm/bottomnavigation/types/bottomnavigation-position-mode.js +0 -6
  141. package/dist/npm/bottomnavigation/types/bottomnavigation-theme-color.js +0 -21
  142. package/dist/npm/bottomnavigation.module.js +0 -59
  143. package/dist/npm/breadcrumb/breadcrumb-item.component.js +0 -100
  144. package/dist/npm/breadcrumb/breadcrumb.component.js +0 -276
  145. package/dist/npm/breadcrumb/list.component.js +0 -82
  146. package/dist/npm/breadcrumb/models/breadcrumb-item.interface.js +0 -6
  147. package/dist/npm/breadcrumb/models/collapse-mode.js +0 -6
  148. package/dist/npm/breadcrumb/models/constants.js +0 -10
  149. package/dist/npm/breadcrumb/template-directives/item-template.directive.js +0 -28
  150. package/dist/npm/breadcrumb/template-directives/separator.directive.js +0 -80
  151. package/dist/npm/breadcrumb/util.js +0 -30
  152. package/dist/npm/breadcrumb.module.js +0 -70
  153. package/dist/npm/common/direction.js +0 -6
  154. package/dist/npm/common/dom-queries.js +0 -28
  155. package/dist/npm/common/preventable-event.js +0 -38
  156. package/dist/npm/common/util.js +0 -19
  157. package/dist/npm/index.js +0 -25
  158. package/dist/npm/main.js +0 -33
  159. package/dist/npm/navigation.module.js +0 -57
  160. package/dist/npm/package-metadata.js +0 -17
  161. package/dist/systemjs/kendo-angular-navigation.js +0 -5
@@ -1,1633 +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
- import { __decorate, __metadata, __param, __extends, __assign } from 'tslib';
6
- import { HostBinding, Input, Component, Renderer2, ElementRef, NgModule, Directive, Optional, TemplateRef, Output, EventEmitter, ViewChildren, QueryList, NgZone, isDevMode, ViewChild, ContentChild, ChangeDetectorRef } from '@angular/core';
7
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
- import { validatePackage } from '@progress/kendo-licensing';
9
- import { CommonModule } from '@angular/common';
10
- import { isDocumentAvailable, Keys, ResizeSensorComponent, ResizeSensorModule } from '@progress/kendo-angular-common';
11
- import { fromEvent, merge, ReplaySubject, Subject, Subscription } from 'rxjs';
12
- import { filter, map, startWith, share } from 'rxjs/operators';
13
-
14
- /**
15
- * @hidden
16
- */
17
- var packageMetadata = {
18
- name: '@progress/kendo-angular-navigation',
19
- productName: 'Kendo UI for Angular',
20
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
21
- publishDate: 1647344375,
22
- version: '',
23
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
24
- };
25
-
26
- /**
27
- * Represents the [Kendo UI AppBar component for Angular]({% slug overview_appbar %}).
28
- * Used to display information, actions, branding titles and additional navigation on the current screen.
29
- */
30
- var AppBarComponent = /** @class */ (function () {
31
- function AppBarComponent(localizationService) {
32
- var _this = this;
33
- this.localizationService = localizationService;
34
- this.hostClass = true;
35
- /**
36
- * Specifies the position of the AppBar
37
- * ([see example]({% slug positioning_appbar %}#toc-position)).
38
- *
39
- * * The possible values are:
40
- * * `top` (Default)—Positions the AppBar at the top of the content.
41
- * Setting the `position` property to `top` requires adding the Appbar component before the page content.
42
- * 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.
43
- *
44
- * * `bottom`—Positions the AppBar at the bottom of the content.
45
- * Setting the `position` property to `bottom` requires adding the Appbar component after the page content.
46
- * 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.
47
- *
48
- */
49
- this.position = 'top';
50
- /**
51
- * Specifies the positionMode of the AppBar
52
- * ([see example]({% slug positioning_appbar %}#toc-positionmode)).
53
- *
54
- * * The possible values are:
55
- * * `static` (Default)—Does not position the AppBar in any special way. It is positioned according to the normal flow of the page.
56
- * * `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.
57
- * * `fixed`—Positions the AppBar relative to the viewport. It always stays in the same place even if the page is scrolled.
58
- */
59
- this.positionMode = 'static';
60
- /**
61
- * Specifies the theme color of the AppBar.
62
- * The theme color will be applied as background color of the component.
63
- *
64
- *
65
- * * The possible values are:
66
- * * `light` (Default)—Applies coloring based on light theme color.
67
- * * `dark`—Applies coloring based on dark theme color.
68
- * * `inherit`— Applies inherited coloring value.
69
- *
70
- */
71
- this.themeColor = 'light';
72
- this.rtl = false;
73
- validatePackage(packageMetadata);
74
- this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
75
- var rtl = _a.rtl;
76
- _this.rtl = rtl;
77
- _this.direction = _this.rtl ? 'rtl' : 'ltr';
78
- });
79
- }
80
- Object.defineProperty(AppBarComponent.prototype, "topClass", {
81
- get: function () {
82
- return this.position === 'top';
83
- },
84
- enumerable: true,
85
- configurable: true
86
- });
87
- Object.defineProperty(AppBarComponent.prototype, "bottomClass", {
88
- get: function () {
89
- return this.position === 'bottom';
90
- },
91
- enumerable: true,
92
- configurable: true
93
- });
94
- Object.defineProperty(AppBarComponent.prototype, "stickyClass", {
95
- get: function () {
96
- return this.positionMode === 'sticky';
97
- },
98
- enumerable: true,
99
- configurable: true
100
- });
101
- Object.defineProperty(AppBarComponent.prototype, "fixedClass", {
102
- get: function () {
103
- return this.positionMode === 'fixed';
104
- },
105
- enumerable: true,
106
- configurable: true
107
- });
108
- Object.defineProperty(AppBarComponent.prototype, "staticClass", {
109
- get: function () {
110
- return this.positionMode === 'static';
111
- },
112
- enumerable: true,
113
- configurable: true
114
- });
115
- Object.defineProperty(AppBarComponent.prototype, "lightClass", {
116
- get: function () {
117
- return this.themeColor === 'light';
118
- },
119
- enumerable: true,
120
- configurable: true
121
- });
122
- Object.defineProperty(AppBarComponent.prototype, "darkClass", {
123
- get: function () {
124
- return this.themeColor === 'dark';
125
- },
126
- enumerable: true,
127
- configurable: true
128
- });
129
- Object.defineProperty(AppBarComponent.prototype, "inheritClass", {
130
- get: function () {
131
- return this.themeColor === 'inherit';
132
- },
133
- enumerable: true,
134
- configurable: true
135
- });
136
- AppBarComponent.prototype.ngOnDestroy = function () {
137
- if (this.dynamicRTLSubscription) {
138
- this.dynamicRTLSubscription.unsubscribe();
139
- }
140
- };
141
- __decorate([
142
- HostBinding('class.k-appbar'),
143
- __metadata("design:type", Boolean)
144
- ], AppBarComponent.prototype, "hostClass", void 0);
145
- __decorate([
146
- HostBinding('class.k-appbar-top'),
147
- __metadata("design:type", Boolean),
148
- __metadata("design:paramtypes", [])
149
- ], AppBarComponent.prototype, "topClass", null);
150
- __decorate([
151
- HostBinding('class.k-appbar-bottom'),
152
- __metadata("design:type", Boolean),
153
- __metadata("design:paramtypes", [])
154
- ], AppBarComponent.prototype, "bottomClass", null);
155
- __decorate([
156
- HostBinding('class.k-appbar-sticky'),
157
- __metadata("design:type", Boolean),
158
- __metadata("design:paramtypes", [])
159
- ], AppBarComponent.prototype, "stickyClass", null);
160
- __decorate([
161
- HostBinding('class.k-appbar-fixed'),
162
- __metadata("design:type", Boolean),
163
- __metadata("design:paramtypes", [])
164
- ], AppBarComponent.prototype, "fixedClass", null);
165
- __decorate([
166
- HostBinding('class.k-appbar-static'),
167
- __metadata("design:type", Boolean),
168
- __metadata("design:paramtypes", [])
169
- ], AppBarComponent.prototype, "staticClass", null);
170
- __decorate([
171
- HostBinding('class.k-appbar-light'),
172
- __metadata("design:type", Boolean),
173
- __metadata("design:paramtypes", [])
174
- ], AppBarComponent.prototype, "lightClass", null);
175
- __decorate([
176
- HostBinding('class.k-appbar-dark'),
177
- __metadata("design:type", Boolean),
178
- __metadata("design:paramtypes", [])
179
- ], AppBarComponent.prototype, "darkClass", null);
180
- __decorate([
181
- HostBinding('class.k-appbar-inherit'),
182
- __metadata("design:type", Boolean),
183
- __metadata("design:paramtypes", [])
184
- ], AppBarComponent.prototype, "inheritClass", null);
185
- __decorate([
186
- HostBinding('attr.dir'),
187
- __metadata("design:type", String)
188
- ], AppBarComponent.prototype, "direction", void 0);
189
- __decorate([
190
- Input(),
191
- __metadata("design:type", String)
192
- ], AppBarComponent.prototype, "position", void 0);
193
- __decorate([
194
- Input(),
195
- __metadata("design:type", String)
196
- ], AppBarComponent.prototype, "positionMode", void 0);
197
- __decorate([
198
- Input(),
199
- __metadata("design:type", String)
200
- ], AppBarComponent.prototype, "themeColor", void 0);
201
- AppBarComponent = __decorate([
202
- Component({
203
- exportAs: 'kendoAppBar',
204
- selector: 'kendo-appbar',
205
- template: "\n <ng-content></ng-content>\n ",
206
- providers: [
207
- LocalizationService,
208
- {
209
- provide: L10N_PREFIX,
210
- useValue: 'kendo.appbar.component'
211
- }
212
- ]
213
- }),
214
- __metadata("design:paramtypes", [LocalizationService])
215
- ], AppBarComponent);
216
- return AppBarComponent;
217
- }());
218
-
219
- /**
220
- * Represents the [Kendo UI AppBarSection component for Angular]({% slug contentarrangement_appbar %}#toc-sections).
221
- *
222
- * @example
223
- *
224
- * ```ts-no-run
225
- * * _@Component({
226
- * selector: 'my-app',
227
- * template: `
228
- * <kendo-appbar>
229
- * <kendo-appbar-section>
230
- * <h2>Page Title</h2>
231
- * </kendo-appbar-section>
232
- * </kendo-appbar>
233
- * `
234
- * })
235
- * class AppComponent {}
236
- */
237
- var AppBarSectionComponent = /** @class */ (function () {
238
- function AppBarSectionComponent() {
239
- this.hostClass = true;
240
- }
241
- __decorate([
242
- HostBinding('class.k-appbar-section'),
243
- __metadata("design:type", Boolean)
244
- ], AppBarSectionComponent.prototype, "hostClass", void 0);
245
- AppBarSectionComponent = __decorate([
246
- Component({
247
- selector: 'kendo-appbar-section',
248
- template: "\n <ng-content></ng-content>\n "
249
- })
250
- ], AppBarSectionComponent);
251
- return AppBarSectionComponent;
252
- }());
253
-
254
- /**
255
- * @hidden
256
- */
257
- var isPresent = function (value) { return value !== null && value !== undefined; };
258
- /**
259
- * @hidden
260
- */
261
- var outerWidth = function (element) {
262
- var width = element.offsetWidth;
263
- var style = getComputedStyle(element);
264
- width += (parseFloat(style.marginLeft) || 0) + (parseFloat(style.marginRight) || 0);
265
- return width;
266
- };
267
-
268
- /**
269
- * Represents the [Kendo UI AppBarSpacer component for Angular]({% slug contentarrangement_appbar %}#toc-spacings).
270
- * Used to give additional white space between the AppBar sections and provides a way for customizing its width.
271
- *
272
- * @example
273
- *
274
- * ```ts-no-run
275
- * * _@Component({
276
- * selector: 'my-app',
277
- * template: `
278
- * <kendo-appbar>
279
- * <kendo-appbar-section>
280
- * <button kendoButton fillMode="flat">
281
- * <kendo-icon name="menu"></kendo-icon>
282
- * </button>
283
- * </kendo-appbar-section>
284
- *
285
- * <kendo-appbar-spacer></kendo-appbar-spacer>
286
- *
287
- * <kendo-appbar-section>
288
- * <h2>Page Title</h2>
289
- * </kendo-appbar-section>
290
- * </kendo-appbar>
291
- * `
292
- * })
293
- * class AppComponent {}
294
- * ```
295
- */
296
- var AppBarSpacerComponent = /** @class */ (function () {
297
- function AppBarSpacerComponent(renderer, element) {
298
- this.renderer = renderer;
299
- this.element = element;
300
- this.hostClass = true;
301
- }
302
- Object.defineProperty(AppBarSpacerComponent.prototype, "sizedClass", {
303
- get: function () {
304
- return isPresent(this.width);
305
- },
306
- enumerable: true,
307
- configurable: true
308
- });
309
- AppBarSpacerComponent.prototype.ngAfterViewInit = function () {
310
- if (isPresent(this.width)) {
311
- var element = this.element.nativeElement;
312
- this.renderer.setStyle(element, 'flexBasis', this.width);
313
- }
314
- };
315
- __decorate([
316
- HostBinding('class.k-appbar-spacer'),
317
- __metadata("design:type", Boolean)
318
- ], AppBarSpacerComponent.prototype, "hostClass", void 0);
319
- __decorate([
320
- HostBinding('class.k-appbar-spacer-sized'),
321
- __metadata("design:type", Boolean),
322
- __metadata("design:paramtypes", [])
323
- ], AppBarSpacerComponent.prototype, "sizedClass", null);
324
- __decorate([
325
- Input(),
326
- __metadata("design:type", String)
327
- ], AppBarSpacerComponent.prototype, "width", void 0);
328
- AppBarSpacerComponent = __decorate([
329
- Component({
330
- selector: 'kendo-appbar-spacer',
331
- template: ""
332
- }),
333
- __metadata("design:paramtypes", [Renderer2, ElementRef])
334
- ], AppBarSpacerComponent);
335
- return AppBarSpacerComponent;
336
- }());
337
-
338
- var exportedModules = [
339
- AppBarComponent,
340
- AppBarSectionComponent,
341
- AppBarSpacerComponent
342
- ];
343
- var declarations = exportedModules.slice();
344
- /**
345
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
346
- * definition for the AppBar component.
347
- *
348
- * * @example
349
- *
350
- * ```ts-no-run
351
- * // Import the AppBar module
352
- * import { AppBarModule } from '@progress/kendo-angular-navigation';
353
- *
354
- * // The browser platform with a compiler
355
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
356
- * import { BrowserModule } from '@angular/platform-browser';
357
- *
358
- * import { NgModule } from '@angular/core';
359
- *
360
- * // Import the app component
361
- * import { AppComponent } from './app.component';
362
- *
363
- * // Define the app module
364
- * _@NgModule({
365
- * declarations: [AppComponent], // declare app component
366
- * imports: [BrowserModule, AppBarModule], // import AppBar module
367
- * bootstrap: [AppComponent]
368
- * })
369
- * export class AppModule {}
370
- *
371
- * // Compile and launch the module
372
- * platformBrowserDynamic().bootstrapModule(AppModule);
373
- *
374
- * ```
375
- */
376
- var AppBarModule = /** @class */ (function () {
377
- function AppBarModule() {
378
- }
379
- AppBarModule = __decorate([
380
- NgModule({
381
- declarations: [declarations],
382
- exports: [exportedModules],
383
- imports: [CommonModule]
384
- })
385
- ], AppBarModule);
386
- return AppBarModule;
387
- }());
388
-
389
- /**
390
- * Represents a template that defines the content of a Breadcrumb item.
391
- * To define the template, nest an `<ng-template>` tag with the `kendoBreadCrumbItemTemplate` directive inside the `<kendo-breadcrumb>` tag.
392
- *
393
- * For more information and example refer to the [Templates]({% slug templates_breadcrumb %}) article.
394
- */
395
- var BreadCrumbItemTemplateDirective = /** @class */ (function () {
396
- function BreadCrumbItemTemplateDirective(templateRef) {
397
- this.templateRef = templateRef;
398
- }
399
- BreadCrumbItemTemplateDirective = __decorate([
400
- Directive({
401
- selector: '[kendoBreadCrumbItemTemplate]'
402
- }),
403
- __param(0, Optional()),
404
- __metadata("design:paramtypes", [TemplateRef])
405
- ], BreadCrumbItemTemplateDirective);
406
- return BreadCrumbItemTemplateDirective;
407
- }());
408
-
409
- /**
410
- * @hidden
411
- */
412
- var BREADCRUMB_ITEM_INDEX = 'data-kendo-breadcrumb-index';
413
-
414
- /**
415
- * @hidden
416
- */
417
- var BreadCrumbItemComponent = /** @class */ (function () {
418
- function BreadCrumbItemComponent(el) {
419
- this.el = el;
420
- this.index = -1;
421
- this.hostClasses = true;
422
- this.disabled = false;
423
- }
424
- Object.defineProperty(BreadCrumbItemComponent.prototype, "isRootItem", {
425
- get: function () {
426
- return this.item.context.isFirst;
427
- },
428
- enumerable: true,
429
- configurable: true
430
- });
431
- Object.defineProperty(BreadCrumbItemComponent.prototype, "isDisabled", {
432
- get: function () {
433
- return this.disabled || null;
434
- },
435
- enumerable: true,
436
- configurable: true
437
- });
438
- Object.defineProperty(BreadCrumbItemComponent.prototype, "isLastItem", {
439
- get: function () {
440
- return this.item.context.isLast;
441
- },
442
- enumerable: true,
443
- configurable: true
444
- });
445
- BreadCrumbItemComponent.prototype.ngOnInit = function () {
446
- this.disabled = this.item.data && (this.item.data.disabled || this.item.context.isLast);
447
- };
448
- BreadCrumbItemComponent.prototype.ngAfterViewInit = function () {
449
- if (isDocumentAvailable()) {
450
- this.width = outerWidth(this.el.nativeElement);
451
- }
452
- };
453
- BreadCrumbItemComponent.prototype.onImageLoad = function () {
454
- if (isDocumentAvailable()) {
455
- this.width = outerWidth(this.el.nativeElement);
456
- }
457
- };
458
- __decorate([
459
- Input(),
460
- __metadata("design:type", Object)
461
- ], BreadCrumbItemComponent.prototype, "item", void 0);
462
- __decorate([
463
- Input(),
464
- __metadata("design:type", String)
465
- ], BreadCrumbItemComponent.prototype, "collapseMode", void 0);
466
- __decorate([
467
- Input(),
468
- __metadata("design:type", Number)
469
- ], BreadCrumbItemComponent.prototype, "index", void 0);
470
- __decorate([
471
- Input(),
472
- __metadata("design:type", TemplateRef)
473
- ], BreadCrumbItemComponent.prototype, "itemTemplate", void 0);
474
- __decorate([
475
- HostBinding('class.k-flex-none'),
476
- HostBinding('class.k-breadcrumb-item'),
477
- __metadata("design:type", Boolean)
478
- ], BreadCrumbItemComponent.prototype, "hostClasses", void 0);
479
- __decorate([
480
- HostBinding('class.k-breadcrumb-root-item'),
481
- __metadata("design:type", Boolean),
482
- __metadata("design:paramtypes", [])
483
- ], BreadCrumbItemComponent.prototype, "isRootItem", null);
484
- __decorate([
485
- HostBinding('attr.aria-disabled'),
486
- __metadata("design:type", Boolean),
487
- __metadata("design:paramtypes", [])
488
- ], BreadCrumbItemComponent.prototype, "isDisabled", null);
489
- __decorate([
490
- HostBinding('class.k-breadcrumb-last-item'),
491
- __metadata("design:type", Boolean),
492
- __metadata("design:paramtypes", [])
493
- ], BreadCrumbItemComponent.prototype, "isLastItem", null);
494
- BreadCrumbItemComponent = __decorate([
495
- Component({
496
- selector: '[kendoBreadCrumbItem]',
497
- 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 "
498
- }),
499
- __metadata("design:paramtypes", [ElementRef])
500
- ], BreadCrumbItemComponent);
501
- return BreadCrumbItemComponent;
502
- }());
503
-
504
- var closestInScope = function (target, targetAttr, predicate, scope) {
505
- while (target && target !== scope && !predicate(target, targetAttr)) {
506
- target = target.parentNode;
507
- }
508
- if (target !== scope) {
509
- return target;
510
- }
511
- };
512
- var hasItemIndex = function (item, indexAttr) { return isPresent(item.getAttribute(indexAttr)); };
513
- /**
514
- * @hidden
515
- */
516
- var itemIndex = function (item, indexAttr) { return +item.getAttribute(indexAttr); };
517
- /**
518
- * @hidden
519
- */
520
- var closestItem = function (target, targetAttr, scope) { return closestInScope(target, targetAttr, hasItemIndex, scope); };
521
-
522
- /**
523
- * @hidden
524
- */
525
- var BreadCrumbListComponent = /** @class */ (function () {
526
- function BreadCrumbListComponent(el, zone) {
527
- var _this = this;
528
- this.el = el;
529
- this.zone = zone;
530
- this.items = [];
531
- this.collapseMode = 'auto';
532
- this.itemClick = new EventEmitter();
533
- var element = this.el.nativeElement;
534
- this.isRootItemContainer = element.classList.contains('k-breadcrumb-root-item-container');
535
- this.zone.runOutsideAngular(function () {
536
- var click$ = fromEvent(element, 'click');
537
- var enterKey$ = fromEvent(element, 'keydown').pipe(filter(function (ev /* KeyboardEvent causes lint error */) { return ev.keyCode === Keys.Enter; }));
538
- _this.domEventsSubscription = merge(click$, enterKey$)
539
- .pipe(map(function (ev) { return ev.target; }), filter(function (e) { return !e.classList.contains('k-breadcrumb-delimiter-icon'); }), // do not trigger handler when a separator is clicked
540
- map(function (e) { return _this.getItemIndex(e); }), filter(isPresent), map(function (i) { return parseInt(i, 10); }), map(function (i) { return _this.items[i]; }), filter(function (item) { return !item.data.disabled && !item.context.isLast; }), map(function (item) { return item.data; }))
541
- .subscribe(function (el) {
542
- _this.zone.run(function () { return _this.itemClick.emit(el); });
543
- });
544
- });
545
- }
546
- BreadCrumbListComponent.prototype.ngOnDestroy = function () {
547
- this.domEventsSubscription.unsubscribe();
548
- };
549
- BreadCrumbListComponent.prototype.getItemIndex = function (target) {
550
- var item = closestItem(target, BREADCRUMB_ITEM_INDEX, this.el.nativeElement);
551
- if (item) {
552
- return itemIndex(item, BREADCRUMB_ITEM_INDEX);
553
- }
554
- };
555
- __decorate([
556
- Input(),
557
- __metadata("design:type", Array)
558
- ], BreadCrumbListComponent.prototype, "items", void 0);
559
- __decorate([
560
- Input(),
561
- __metadata("design:type", TemplateRef)
562
- ], BreadCrumbListComponent.prototype, "itemTemplate", void 0);
563
- __decorate([
564
- Input(),
565
- __metadata("design:type", String)
566
- ], BreadCrumbListComponent.prototype, "collapseMode", void 0);
567
- __decorate([
568
- Input(),
569
- __metadata("design:type", String)
570
- ], BreadCrumbListComponent.prototype, "separatorIcon", void 0);
571
- __decorate([
572
- Output(),
573
- __metadata("design:type", EventEmitter)
574
- ], BreadCrumbListComponent.prototype, "itemClick", void 0);
575
- __decorate([
576
- ViewChildren(BreadCrumbItemComponent),
577
- __metadata("design:type", QueryList)
578
- ], BreadCrumbListComponent.prototype, "renderedItems", void 0);
579
- BreadCrumbListComponent = __decorate([
580
- Component({
581
- selector: '[kendoBreadCrumbList]',
582
- 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." + BREADCRUMB_ITEM_INDEX + "]=\"i\"\n [item]=\"item\"\n [index]=\"i\"\n [collapseMode]=\"collapseMode\"\n [itemTemplate]=\"itemTemplate\"\n >\n <span kendoBreadCrumbSeparator [icon]=\"separatorIcon\" *ngIf=\"collapseMode === 'wrap' && !isFirst\"></span>\n <span\n kendoBreadCrumbSeparator\n [icon]=\"separatorIcon\"\n *ngIf=\"collapseMode !== 'wrap' && !isLast && !(item?.context.collapsed && items[i + 1]?.context.collapsed)\"\n ></span>\n </li>\n </ng-container>\n "
583
- }),
584
- __metadata("design:paramtypes", [ElementRef, NgZone])
585
- ], BreadCrumbListComponent);
586
- return BreadCrumbListComponent;
587
- }());
588
-
589
- var getCollapsed = function (itemComponent) { return itemComponent.item.context.collapsed; };
590
- /**
591
- * @hidden
592
- */
593
- var collapsed = function (itemComponent) { return getCollapsed(itemComponent) === true; };
594
- /**
595
- * @hidden
596
- */
597
- var expanded = function (itemComponent) { return getCollapsed(itemComponent) === false; };
598
- var toggleFirst = function (collapsed) { return function (itemComponents) {
599
- return (itemComponents.find(function (ic) { return getCollapsed(ic) === collapsed; }).item.context.collapsed = !collapsed);
600
- }; };
601
- /**
602
- * @hidden
603
- */
604
- var collapseFirst = toggleFirst(false);
605
- /**
606
- * @hidden
607
- */
608
- var expandFirst = toggleFirst(true);
609
-
610
- /**
611
- * Represents the [Kendo UI Breadcrumb component for Angular]({% slug overview_breadcrumb %}).
612
- *
613
- * @example
614
- * ```ts-no-run
615
- * _@Component({
616
- * selector: 'my-app',
617
- * template: `
618
- * <kendo-breadcrumb
619
- * [items]="items"
620
- * (itemClick)="onItemClick($event)">
621
- * </kendo-breadcrumb>
622
- * `
623
- * })
624
- * class AppComponent {
625
- * public items: BreadCrumbItem[] = [
626
- * { text: 'Home', title: 'Home', icon: 'home' },
627
- * { text: 'Kids', title: 'Kids' },
628
- * { text: '8y-16y', title: '8y-16y', disabled: true },
629
- * { text: 'New collection', title: 'New collection' },
630
- * { text: 'Jeans', title: 'Jeans' }
631
- * ];
632
- *
633
- * public onItemClick(item: BreadCrumbItem): void {
634
- * console.log(item);
635
- * }
636
- * }
637
- * ```
638
- */
639
- var BreadCrumbComponent = /** @class */ (function () {
640
- function BreadCrumbComponent(el, cdr, zone, localization) {
641
- this.el = el;
642
- this.cdr = cdr;
643
- this.zone = zone;
644
- this.localization = localization;
645
- /**
646
- * Fires when a Breadcrumb item is clicked. The event will not be fired by disabled items and the last item.
647
- */
648
- this.itemClick = new EventEmitter();
649
- this.hostClasses = true;
650
- this._items = [];
651
- this._collapseMode = 'auto';
652
- this.updateItems = new ReplaySubject();
653
- this.afterViewInit = new Subject();
654
- this.subscriptions = new Subscription();
655
- this.direction = 'ltr';
656
- validatePackage(packageMetadata);
657
- var updateItems$ = this.updateItems.asObservable().pipe(startWith([]));
658
- this.direction = localization.rtl ? 'rtl' : 'ltr';
659
- this.itemsData$ = updateItems$.pipe(map(function (items) { return items.filter(Boolean); }), map(function (items) {
660
- return items.map(function (item, index, collection) { return ({
661
- context: {
662
- collapsed: false,
663
- isLast: index === collection.length - 1,
664
- isFirst: index === 0
665
- },
666
- data: item
667
- }); });
668
- }), share());
669
- this.firstItem$ = updateItems$.pipe(map(function (items) {
670
- if (items.length > 0) {
671
- return [
672
- {
673
- context: {
674
- collapsed: false,
675
- isLast: items.length === 1,
676
- isFirst: true
677
- },
678
- data: items[0]
679
- }
680
- ];
681
- }
682
- return [];
683
- }), share());
684
- }
685
- Object.defineProperty(BreadCrumbComponent.prototype, "items", {
686
- get: function () {
687
- return this._items;
688
- },
689
- /**
690
- * The collection of items that will be rendered in the Breadcrumb.
691
- */
692
- set: function (items) {
693
- this._items = items || [];
694
- this.updateItems.next(this._items);
695
- },
696
- enumerable: true,
697
- configurable: true
698
- });
699
- Object.defineProperty(BreadCrumbComponent.prototype, "collapseMode", {
700
- get: function () {
701
- return this._collapseMode;
702
- },
703
- /**
704
- * Specifies the collapse mode of the Breadcrumb ([see example]({% slug collapse_modes_breadcrumb %})).
705
- *
706
- * The possible values are:
707
- * - `auto` (default)&mdash;items are automatically collapsed based on the width of the Breadcrumb.
708
- * - `wrap`&mdash;items are wrapped on multiple rows.
709
- * - `none`&mdash;all items are expanded on the same row.
710
- *
711
- * For more information and example refer to the [Collapse Modes]({% slug collapse_modes_breadcrumb %}) article.
712
- */
713
- set: function (mode) {
714
- if (isDevMode() && ['auto', 'wrap', 'none'].indexOf(mode) < 0) {
715
- 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/');
716
- }
717
- this._collapseMode = mode || 'auto';
718
- this.updateItems.next(this.items);
719
- },
720
- enumerable: true,
721
- configurable: true
722
- });
723
- Object.defineProperty(BreadCrumbComponent.prototype, "wrapMode", {
724
- get: function () {
725
- return this.collapseMode === 'wrap';
726
- },
727
- enumerable: true,
728
- configurable: true
729
- });
730
- Object.defineProperty(BreadCrumbComponent.prototype, "getDir", {
731
- get: function () {
732
- return this.direction;
733
- },
734
- enumerable: true,
735
- configurable: true
736
- });
737
- BreadCrumbComponent.prototype.ngOnInit = function () {
738
- var _this = this;
739
- this.subscriptions.add(this.localization.changes.subscribe(function (_a) {
740
- var rtl = _a.rtl;
741
- return (_this.direction = rtl ? 'rtl' : 'ltr');
742
- }));
743
- };
744
- BreadCrumbComponent.prototype.ngAfterViewInit = function () {
745
- this.attachResizeHandler();
746
- this.afterViewInit.next();
747
- };
748
- BreadCrumbComponent.prototype.ngOnDestroy = function () {
749
- this.subscriptions.unsubscribe();
750
- };
751
- BreadCrumbComponent.prototype.handleResize = function () {
752
- var autoCollapseCandidates = this.listComponent.renderedItems.toArray().filter(function (ri) { return !ri.item.context.isFirst && !ri.item.context.isLast; }).slice();
753
- var componentWidth = outerWidth(this.el.nativeElement);
754
- var itemsContainerWidth = Math.floor(this.itemsContainers
755
- .toArray()
756
- .map(function (el) { return outerWidth(el.nativeElement); })
757
- .reduce(function (acc, curr) { return acc + curr; }, 0));
758
- var nextExpandWidth = (autoCollapseCandidates.slice().reverse().find(collapsed) || { width: 0 }).width;
759
- // // shrink
760
- if (componentWidth <= itemsContainerWidth && autoCollapseCandidates.find(expanded)) {
761
- collapseFirst(autoCollapseCandidates);
762
- // needed by resize sensor
763
- this.cdr.detectChanges();
764
- return this.handleResize();
765
- }
766
- // expand
767
- if (componentWidth > itemsContainerWidth + nextExpandWidth && autoCollapseCandidates.find(collapsed)) {
768
- expandFirst(autoCollapseCandidates.slice().reverse());
769
- // needed by resize sensor
770
- this.cdr.detectChanges();
771
- return this.handleResize();
772
- }
773
- };
774
- BreadCrumbComponent.prototype.shouldResize = function () {
775
- return isDocumentAvailable() && this.collapseMode === 'auto';
776
- };
777
- BreadCrumbComponent.prototype.attachResizeHandler = function () {
778
- var _this = this;
779
- // resize when:
780
- // the component is initialized
781
- // the container is resized
782
- // items are added/removed
783
- this.subscriptions.add(merge(this.resizeSensor.resize, this.itemsData$, this.afterViewInit.asObservable())
784
- .pipe(filter(function () { return _this.shouldResize(); }))
785
- .subscribe(function () {
786
- _this.zone.runOutsideAngular(function () {
787
- return setTimeout(function () {
788
- _this.zone.run(function () {
789
- if (_this.listComponent) {
790
- _this.handleResize();
791
- _this.resizeSensor.acceptSize();
792
- }
793
- });
794
- });
795
- });
796
- }));
797
- };
798
- __decorate([
799
- Input(),
800
- __metadata("design:type", Array),
801
- __metadata("design:paramtypes", [Array])
802
- ], BreadCrumbComponent.prototype, "items", null);
803
- __decorate([
804
- Input(),
805
- __metadata("design:type", String)
806
- ], BreadCrumbComponent.prototype, "separatorIcon", void 0);
807
- __decorate([
808
- Input(),
809
- __metadata("design:type", String),
810
- __metadata("design:paramtypes", [String])
811
- ], BreadCrumbComponent.prototype, "collapseMode", null);
812
- __decorate([
813
- Output(),
814
- __metadata("design:type", EventEmitter)
815
- ], BreadCrumbComponent.prototype, "itemClick", void 0);
816
- __decorate([
817
- ViewChild('resizeSensor', { static: true }),
818
- __metadata("design:type", ResizeSensorComponent)
819
- ], BreadCrumbComponent.prototype, "resizeSensor", void 0);
820
- __decorate([
821
- ViewChildren('itemsContainer', { read: ElementRef }),
822
- __metadata("design:type", QueryList)
823
- ], BreadCrumbComponent.prototype, "itemsContainers", void 0);
824
- __decorate([
825
- ViewChild(BreadCrumbListComponent, { static: true }),
826
- __metadata("design:type", BreadCrumbListComponent)
827
- ], BreadCrumbComponent.prototype, "listComponent", void 0);
828
- __decorate([
829
- ContentChild(BreadCrumbItemTemplateDirective, { static: false }),
830
- __metadata("design:type", BreadCrumbItemTemplateDirective)
831
- ], BreadCrumbComponent.prototype, "itemTemplate", void 0);
832
- __decorate([
833
- HostBinding('class.k-widget'),
834
- HostBinding('class.k-breadcrumb'),
835
- __metadata("design:type", Boolean)
836
- ], BreadCrumbComponent.prototype, "hostClasses", void 0);
837
- __decorate([
838
- HostBinding('class.k-breadcrumb-wrap'),
839
- __metadata("design:type", Boolean),
840
- __metadata("design:paramtypes", [])
841
- ], BreadCrumbComponent.prototype, "wrapMode", null);
842
- __decorate([
843
- HostBinding('attr.dir'),
844
- __metadata("design:type", String),
845
- __metadata("design:paramtypes", [])
846
- ], BreadCrumbComponent.prototype, "getDir", null);
847
- BreadCrumbComponent = __decorate([
848
- Component({
849
- exportAs: 'kendoBreadCrumb',
850
- selector: 'kendo-breadcrumb',
851
- providers: [
852
- LocalizationService,
853
- {
854
- provide: L10N_PREFIX,
855
- useValue: 'kendo.breadcrumb'
856
- }
857
- ],
858
- template: "\n <ol\n #itemsContainer\n kendoBreadCrumbList\n class=\"k-breadcrumb-root-item-container\"\n *ngIf=\"collapseMode === 'wrap'\"\n [items]=\"firstItem$ | async\"\n [itemTemplate]=\"itemTemplate?.templateRef\"\n [collapseMode]=\"collapseMode\"\n [separatorIcon]=\"separatorIcon\"\n (itemClick)=\"itemClick.emit($event)\"\n ></ol>\n <ol\n #itemsContainer\n kendoBreadCrumbList\n class=\"k-breadcrumb-container\"\n [items]=\"itemsData$ | async\"\n [itemTemplate]=\"itemTemplate?.templateRef\"\n [collapseMode]=\"collapseMode\"\n [separatorIcon]=\"separatorIcon\"\n (itemClick)=\"itemClick.emit($event)\"\n [ngClass]=\"{ 'k-flex-wrap': collapseMode === 'wrap', 'k-flex-none': collapseMode === 'none' }\"\n ></ol>\n <kendo-resize-sensor [rateLimit]=\"1000\" #resizeSensor></kendo-resize-sensor>\n "
859
- }),
860
- __metadata("design:paramtypes", [ElementRef,
861
- ChangeDetectorRef,
862
- NgZone,
863
- LocalizationService])
864
- ], BreadCrumbComponent);
865
- return BreadCrumbComponent;
866
- }());
867
-
868
- var DEFAULT_ICON = 'arrow-chevron-right';
869
- var DEFAULT_RTL_ICON = 'arrow-chevron-left';
870
- /**
871
- * @hidden
872
- */
873
- var BreadCrumbSeparatorDirective = /** @class */ (function () {
874
- function BreadCrumbSeparatorDirective(el, localization) {
875
- this.el = el;
876
- this.localization = localization;
877
- this.defaultClasses = true;
878
- this.ariaHidden = true;
879
- this.direction = 'ltr';
880
- this.direction = this.localization.rtl ? 'rtl' : 'ltr';
881
- }
882
- Object.defineProperty(BreadCrumbSeparatorDirective.prototype, "icon", {
883
- get: function () {
884
- return this._icon;
885
- },
886
- set: function (icon) {
887
- var element = this.el.nativeElement;
888
- element.classList.remove("k-i-" + this._icon);
889
- if (isPresent(icon)) {
890
- this._icon = icon;
891
- this.hasDefaultIcon = false;
892
- }
893
- else {
894
- this._icon = this.direction === 'ltr' ? DEFAULT_ICON : DEFAULT_RTL_ICON;
895
- this.hasDefaultIcon = true;
896
- }
897
- element.classList.add("k-i-" + this._icon);
898
- },
899
- enumerable: true,
900
- configurable: true
901
- });
902
- BreadCrumbSeparatorDirective.prototype.ngOnInit = function () {
903
- var _this = this;
904
- this.localizationChangesSubscription = this.localization.changes.subscribe(function (_a) {
905
- var rtl = _a.rtl;
906
- _this.direction = rtl ? 'rtl' : 'ltr';
907
- if (_this.hasDefaultIcon) {
908
- _this.icon = undefined;
909
- }
910
- });
911
- };
912
- BreadCrumbSeparatorDirective.prototype.ngOnDestroy = function () {
913
- this.localizationChangesSubscription.unsubscribe();
914
- };
915
- __decorate([
916
- Input(),
917
- __metadata("design:type", String),
918
- __metadata("design:paramtypes", [String])
919
- ], BreadCrumbSeparatorDirective.prototype, "icon", null);
920
- __decorate([
921
- HostBinding('class.k-breadcrumb-delimiter-icon'),
922
- HostBinding('class.k-icon'),
923
- __metadata("design:type", Boolean)
924
- ], BreadCrumbSeparatorDirective.prototype, "defaultClasses", void 0);
925
- __decorate([
926
- HostBinding('attr.aria-hidden'),
927
- __metadata("design:type", Boolean)
928
- ], BreadCrumbSeparatorDirective.prototype, "ariaHidden", void 0);
929
- BreadCrumbSeparatorDirective = __decorate([
930
- Directive({
931
- selector: '[kendoBreadCrumbSeparator]'
932
- }),
933
- __metadata("design:paramtypes", [ElementRef, LocalizationService])
934
- ], BreadCrumbSeparatorDirective);
935
- return BreadCrumbSeparatorDirective;
936
- }());
937
-
938
- var templateDirectives = [
939
- BreadCrumbItemTemplateDirective
940
- ];
941
- var exportedModules$1 = [
942
- BreadCrumbComponent,
943
- BreadCrumbItemComponent,
944
- BreadCrumbListComponent
945
- ].concat(templateDirectives);
946
- var declarations$1 = exportedModules$1.concat([
947
- BreadCrumbSeparatorDirective
948
- ]);
949
- /**
950
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
951
- * definition for the BreadCrumb component.
952
- * @example
953
- *
954
- * ```ts-no-run
955
- * // Import the BreadCrumb module
956
- * import { BreadCrumbModule } from '@progress/kendo-angular-navigation';
957
- *
958
- * // The browser platform with a compiler
959
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
960
- * import { BrowserModule } from '@angular/platform-browser';
961
- *
962
- * import { NgModule } from '@angular/core';
963
- *
964
- * // Import the app component
965
- * import { AppComponent } from './app.component';
966
- *
967
- * // Define the app module
968
- * _@NgModule({
969
- * declarations: [AppComponent], // declare app component
970
- * imports: [BrowserModule, BreadCrumbModule], // import BreadCrumb module
971
- * bootstrap: [AppComponent]
972
- * })
973
- * export class AppModule {}
974
- *
975
- * // Compile and launch the module
976
- * platformBrowserDynamic().bootstrapModule(AppModule);
977
- *
978
- * ```
979
- */
980
- var BreadCrumbModule = /** @class */ (function () {
981
- function BreadCrumbModule() {
982
- }
983
- BreadCrumbModule = __decorate([
984
- NgModule({
985
- declarations: [declarations$1],
986
- exports: [exportedModules$1],
987
- imports: [CommonModule, ResizeSensorModule]
988
- })
989
- ], BreadCrumbModule);
990
- return BreadCrumbModule;
991
- }());
992
-
993
- /**
994
- * Represents a template that defines the item content of the BottomNavigation.
995
- * To define the template, nest an `<ng-template>` tag
996
- * with the `kendoBottomNavigationItemTemplate` directive inside the `<kendo-bottomnavigation>` tag ([see example]({% slug templates_bottomnavigation %})).
997
- */
998
- var BottomNavigationItemTemplateDirective = /** @class */ (function () {
999
- function BottomNavigationItemTemplateDirective(templateRef) {
1000
- this.templateRef = templateRef;
1001
- }
1002
- BottomNavigationItemTemplateDirective = __decorate([
1003
- Directive({
1004
- selector: '[kendoBottomNavigationItemTemplate]'
1005
- }),
1006
- __param(0, Optional()),
1007
- __metadata("design:paramtypes", [TemplateRef])
1008
- ], BottomNavigationItemTemplateDirective);
1009
- return BottomNavigationItemTemplateDirective;
1010
- }());
1011
-
1012
- /**
1013
- * @hidden
1014
- */
1015
- var BottomNavigationItemComponent = /** @class */ (function () {
1016
- function BottomNavigationItemComponent() {
1017
- }
1018
- Object.defineProperty(BottomNavigationItemComponent.prototype, "disabledClass", {
1019
- get: function () {
1020
- return this.item.disabled;
1021
- },
1022
- enumerable: true,
1023
- configurable: true
1024
- });
1025
- Object.defineProperty(BottomNavigationItemComponent.prototype, "horizontalItemClass", {
1026
- get: function () {
1027
- return this.orientation === 'horizontal';
1028
- },
1029
- enumerable: true,
1030
- configurable: true
1031
- });
1032
- Object.defineProperty(BottomNavigationItemComponent.prototype, "verticalItemClass", {
1033
- get: function () {
1034
- return this.orientation === 'vertical';
1035
- },
1036
- enumerable: true,
1037
- configurable: true
1038
- });
1039
- Object.defineProperty(BottomNavigationItemComponent.prototype, "label", {
1040
- get: function () {
1041
- return this.item.text ? this.item.text : null;
1042
- },
1043
- enumerable: true,
1044
- configurable: true
1045
- });
1046
- Object.defineProperty(BottomNavigationItemComponent.prototype, "tabindex", {
1047
- get: function () {
1048
- return this.item.tabIndex ? this.item.tabIndex : 0;
1049
- },
1050
- enumerable: true,
1051
- configurable: true
1052
- });
1053
- Object.defineProperty(BottomNavigationItemComponent.prototype, "selectedClass", {
1054
- get: function () {
1055
- return this.selectedIdx ? this.selectedIdx === this.index : this.item.selected;
1056
- },
1057
- enumerable: true,
1058
- configurable: true
1059
- });
1060
- Object.defineProperty(BottomNavigationItemComponent.prototype, "itemIcon", {
1061
- get: function () {
1062
- return this.item.icon || this.item.iconClass ? true : false;
1063
- },
1064
- enumerable: true,
1065
- configurable: true
1066
- });
1067
- Object.defineProperty(BottomNavigationItemComponent.prototype, "iconClasses", {
1068
- get: function () {
1069
- var kendoIcon = this.item.icon ? "k-icon k-i-" + this.item.icon : '';
1070
- var customIcon = this.item.iconClass ? this.item.iconClass : '';
1071
- return kendoIcon + " " + customIcon;
1072
- },
1073
- enumerable: true,
1074
- configurable: true
1075
- });
1076
- __decorate([
1077
- Input(),
1078
- __metadata("design:type", BottomNavigationItemTemplateDirective)
1079
- ], BottomNavigationItemComponent.prototype, "itemTemplate", void 0);
1080
- __decorate([
1081
- Input(),
1082
- __metadata("design:type", Object)
1083
- ], BottomNavigationItemComponent.prototype, "item", void 0);
1084
- __decorate([
1085
- Input(),
1086
- __metadata("design:type", Number)
1087
- ], BottomNavigationItemComponent.prototype, "index", void 0);
1088
- __decorate([
1089
- Input(),
1090
- __metadata("design:type", Boolean)
1091
- ], BottomNavigationItemComponent.prototype, "disabledComponent", void 0);
1092
- __decorate([
1093
- Input(),
1094
- __metadata("design:type", Number)
1095
- ], BottomNavigationItemComponent.prototype, "selectedIdx", void 0);
1096
- __decorate([
1097
- Input(),
1098
- __metadata("design:type", String)
1099
- ], BottomNavigationItemComponent.prototype, "orientation", void 0);
1100
- __decorate([
1101
- HostBinding('attr.aria-disabled'),
1102
- HostBinding('class.k-state-disabled'),
1103
- __metadata("design:type", Boolean),
1104
- __metadata("design:paramtypes", [])
1105
- ], BottomNavigationItemComponent.prototype, "disabledClass", null);
1106
- __decorate([
1107
- HostBinding('class.k-hstack'),
1108
- __metadata("design:type", Boolean),
1109
- __metadata("design:paramtypes", [])
1110
- ], BottomNavigationItemComponent.prototype, "horizontalItemClass", null);
1111
- __decorate([
1112
- HostBinding('class.k-vstack'),
1113
- __metadata("design:type", Boolean),
1114
- __metadata("design:paramtypes", [])
1115
- ], BottomNavigationItemComponent.prototype, "verticalItemClass", null);
1116
- __decorate([
1117
- HostBinding('attr.aria-label'),
1118
- __metadata("design:type", String),
1119
- __metadata("design:paramtypes", [])
1120
- ], BottomNavigationItemComponent.prototype, "label", null);
1121
- __decorate([
1122
- HostBinding('attr.tabindex'),
1123
- __metadata("design:type", Number),
1124
- __metadata("design:paramtypes", [])
1125
- ], BottomNavigationItemComponent.prototype, "tabindex", null);
1126
- __decorate([
1127
- HostBinding('attr.aria-selected'),
1128
- HostBinding('class.k-state-selected'),
1129
- __metadata("design:type", Boolean),
1130
- __metadata("design:paramtypes", [])
1131
- ], BottomNavigationItemComponent.prototype, "selectedClass", null);
1132
- BottomNavigationItemComponent = __decorate([
1133
- Component({
1134
- selector: '[kendoBottomNavigationItem]',
1135
- template: "\n <ng-container *ngIf=\"!itemTemplate\">\n <span *ngIf=\"itemIcon\" class=\"k-bottom-nav-item-icon\" [ngClass]=\"iconClasses\"></span>\n <span *ngIf=\"item.text\" class=\"k-bottom-nav-item-text\">{{item.text}}</span>\n </ng-container>\n <ng-template *ngIf=\"itemTemplate\"\n [ngTemplateOutlet]=\"itemTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\">\n </ng-template>\n "
1136
- })
1137
- ], BottomNavigationItemComponent);
1138
- return BottomNavigationItemComponent;
1139
- }());
1140
-
1141
- /**
1142
- * @hidden
1143
- */
1144
- var PreventableEvent = /** @class */ (function () {
1145
- /**
1146
- * @hidden
1147
- */
1148
- function PreventableEvent(args) {
1149
- this.prevented = false;
1150
- Object.assign(this, args);
1151
- }
1152
- /**
1153
- * Prevents the default action for a specified event.
1154
- * In this way, the source component suppresses
1155
- * the built-in behavior that follows the event.
1156
- */
1157
- PreventableEvent.prototype.preventDefault = function () {
1158
- this.prevented = true;
1159
- };
1160
- /**
1161
- * Returns `true` if the event was prevented
1162
- * by any of its subscribers.
1163
- *
1164
- * @returns `true` if the default action was prevented.
1165
- * Otherwise, returns `false`.
1166
- */
1167
- PreventableEvent.prototype.isDefaultPrevented = function () {
1168
- return this.prevented;
1169
- };
1170
- return PreventableEvent;
1171
- }());
1172
-
1173
- /**
1174
- * Arguments for the `select` event of the BottomNavigation.
1175
- */
1176
- var BottomNavigationSelectEvent = /** @class */ (function (_super) {
1177
- __extends(BottomNavigationSelectEvent, _super);
1178
- function BottomNavigationSelectEvent() {
1179
- return _super !== null && _super.apply(this, arguments) || this;
1180
- }
1181
- return BottomNavigationSelectEvent;
1182
- }(PreventableEvent));
1183
-
1184
- /**
1185
- * @hidden
1186
- */
1187
- var BOTTOMNAVIGATION_ITEM_INDEX = 'data-kendo-bottomnavigation-index';
1188
- /**
1189
- * @hidden
1190
- */
1191
- var colors = ['primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse'];
1192
-
1193
- /**
1194
- * Represents the [Kendo UI BottomNavigation component for Angular]({% slug overview_bottomnavigation %}).
1195
- *
1196
- * @example
1197
- * ```ts-no-run
1198
- * _@Component({
1199
- * selector: 'my-app',
1200
- * template: `
1201
- * <kendo-bottomnavigation [items]="items"></kendo-bottomnavigation>
1202
- * `
1203
- * })
1204
- * class AppComponent {
1205
- * public items: Array<any> = [
1206
- * { text: 'Inbox', icon: 'email', selected: true },
1207
- * { text: 'Calendar', icon: 'calendar'},
1208
- * { text: 'Profile', icon: 'user'}
1209
- * ]
1210
- * }
1211
- * ```
1212
- */
1213
- var BottomNavigationComponent = /** @class */ (function () {
1214
- function BottomNavigationComponent(localization, hostElement, ngZone, changeDetector, renderer) {
1215
- var _this = this;
1216
- this.localization = localization;
1217
- this.hostElement = hostElement;
1218
- this.ngZone = ngZone;
1219
- this.changeDetector = changeDetector;
1220
- this.renderer = renderer;
1221
- /**
1222
- * Sets a top border to the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
1223
- *
1224
- * @default false
1225
- */
1226
- this.border = false;
1227
- /**
1228
- * Disables the whole BottomNavigation.
1229
- *
1230
- * @default false
1231
- */
1232
- this.disabled = false;
1233
- /**
1234
- * Fires each time an item is selected. This event is preventable.
1235
- */
1236
- this.select = new EventEmitter();
1237
- /**
1238
- * @hidden
1239
- */
1240
- this.hostClass = true;
1241
- /**
1242
- * @hidden
1243
- */
1244
- this.role = 'navigation';
1245
- this._fill = 'flat';
1246
- this._itemFlow = 'vertical';
1247
- this._positionMode = 'fixed';
1248
- this._themeColor = 'primary';
1249
- this._nativeHostElement = this.hostElement.nativeElement;
1250
- this.subscriptions = new Subscription();
1251
- this.rtl = false;
1252
- validatePackage(packageMetadata);
1253
- this.dynamicRTLSubscription = this.localization.changes.subscribe(function (_a) {
1254
- var rtl = _a.rtl;
1255
- _this.rtl = rtl;
1256
- _this.direction = _this.rtl ? 'rtl' : 'ltr';
1257
- });
1258
- }
1259
- Object.defineProperty(BottomNavigationComponent.prototype, "fill", {
1260
- get: function () {
1261
- return this._fill;
1262
- },
1263
- /**
1264
- * The fill style of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
1265
- *
1266
- * * The possible values are:
1267
- * * (Default) `flat`
1268
- * * `solid`
1269
- */
1270
- set: function (fill) {
1271
- this.renderer.removeClass(this._nativeHostElement, "k-bottom-nav-" + this.fill);
1272
- this._fill = fill === 'solid' ? 'solid' : 'flat';
1273
- this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this._fill);
1274
- },
1275
- enumerable: true,
1276
- configurable: true
1277
- });
1278
- Object.defineProperty(BottomNavigationComponent.prototype, "itemFlow", {
1279
- get: function () {
1280
- return this._itemFlow;
1281
- },
1282
- /**
1283
- * Specifies how the icon and text label are positioned in the BottomNavigation items ([see example]({% slug items_bottomnavigation %}#toc-itemflow)).
1284
- *
1285
- * The possible values are:
1286
- * * (Default) `vertical` - Renders the text below the icon.
1287
- * * `horizontal` - Renders the icon and the text on the same line.
1288
- */
1289
- set: function (itemFlow) {
1290
- this.renderer.removeClass(this._nativeHostElement, "k-bottom-nav-item-flow-" + this.itemFlow);
1291
- this._itemFlow = itemFlow === 'horizontal' ? 'horizontal' : 'vertical';
1292
- this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-item-flow-" + this._itemFlow);
1293
- },
1294
- enumerable: true,
1295
- configurable: true
1296
- });
1297
- Object.defineProperty(BottomNavigationComponent.prototype, "positionMode", {
1298
- get: function () {
1299
- return this._positionMode;
1300
- },
1301
- /**
1302
- * Specifies the position and behavior of the BottomNavigation when the page is scrollable ([see example]({% slug positioning_bottomnavigation %})).
1303
- *
1304
- * The possible values are:
1305
- * * (Default) `fixed` - The BottomNavigation always stays at the bottom of the viewport, regardless of the page scroll position.
1306
- * * `sticky` - Positions the BottomNavigation at the end of the scrollable container.
1307
- */
1308
- set: function (positionMode) {
1309
- this.renderer.removeClass(this._nativeHostElement, "k-pos-" + this.positionMode);
1310
- this._positionMode = positionMode === 'sticky' ? 'sticky' : 'fixed';
1311
- this.renderer.addClass(this._nativeHostElement, "k-pos-" + this._positionMode);
1312
- },
1313
- enumerable: true,
1314
- configurable: true
1315
- });
1316
- Object.defineProperty(BottomNavigationComponent.prototype, "themeColor", {
1317
- get: function () {
1318
- return this._themeColor;
1319
- },
1320
- /**
1321
- * Specifies the theme color of the BottomNavigation ([see example]({% slug appearance_bottomnavigation %})).
1322
- *
1323
- * * The possible values are:
1324
- * * (Default) `primary` - Applies coloring based on the primary theme color.
1325
- * * `secondary` - Applies coloring based on the secondary theme color.
1326
- * * `tertiary` - Applies coloring based on the tertiary theme color.
1327
- * * `info` - Applies coloring based on the info theme color.
1328
- * * `success` - Applies coloring based on the success theme color.
1329
- * * `warning` - Applies coloring based on the warning theme color.
1330
- * * `error` - Applies coloring based on the error theme color.
1331
- * * `dark` - Applies coloring based on the dark theme color.
1332
- * * `light` - Applies coloring based on the light theme color.
1333
- * * `inverse` - Applies coloring based on the inverted theme color.
1334
- */
1335
- set: function (themeColor) {
1336
- var newColor = colors.find(function (color) { return color === themeColor; });
1337
- if (newColor) {
1338
- this.renderer.removeClass(this._nativeHostElement, "k-bottom-nav-" + this._themeColor);
1339
- this._themeColor = themeColor;
1340
- this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this._themeColor);
1341
- }
1342
- },
1343
- enumerable: true,
1344
- configurable: true
1345
- });
1346
- Object.defineProperty(BottomNavigationComponent.prototype, "borderClass", {
1347
- /**
1348
- * @hidden
1349
- */
1350
- get: function () {
1351
- return this.border;
1352
- },
1353
- enumerable: true,
1354
- configurable: true
1355
- });
1356
- Object.defineProperty(BottomNavigationComponent.prototype, "disabledClass", {
1357
- /**
1358
- * @hidden
1359
- */
1360
- get: function () {
1361
- return this.disabled;
1362
- },
1363
- enumerable: true,
1364
- configurable: true
1365
- });
1366
- /**
1367
- * @hidden
1368
- */
1369
- BottomNavigationComponent.prototype.ngOnInit = function () {
1370
- this.initDomEvents();
1371
- };
1372
- /**
1373
- * @hidden
1374
- */
1375
- BottomNavigationComponent.prototype.ngAfterViewInit = function () {
1376
- this.applyClasses();
1377
- };
1378
- /**
1379
- * @hidden
1380
- */
1381
- BottomNavigationComponent.prototype.ngOnDestroy = function () {
1382
- if (this.dynamicRTLSubscription) {
1383
- this.dynamicRTLSubscription.unsubscribe();
1384
- }
1385
- this.subscriptions.unsubscribe();
1386
- };
1387
- /**
1388
- * @hidden
1389
- */
1390
- BottomNavigationComponent.prototype.selectItem = function (idx, args) {
1391
- var eventArgs = new BottomNavigationSelectEvent(__assign({}, args));
1392
- this.select.emit(eventArgs);
1393
- if (!eventArgs.isDefaultPrevented()) {
1394
- this.selectedIdx = idx;
1395
- }
1396
- };
1397
- BottomNavigationComponent.prototype.applyClasses = function () {
1398
- this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this.fill);
1399
- this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-item-flow-" + this.itemFlow);
1400
- this.renderer.addClass(this._nativeHostElement, "k-pos-" + this.positionMode);
1401
- this.renderer.addClass(this._nativeHostElement, "k-bottom-nav-" + this.themeColor);
1402
- };
1403
- BottomNavigationComponent.prototype.initDomEvents = function () {
1404
- var _this = this;
1405
- if (!this.hostElement) {
1406
- return;
1407
- }
1408
- this.ngZone.runOutsideAngular(function () {
1409
- _this.subscriptions.add(_this.renderer.listen(_this._nativeHostElement, 'click', _this.clickHandler.bind(_this)));
1410
- _this.subscriptions.add(_this.renderer.listen(_this._nativeHostElement, 'keydown', _this.keyDownHandler.bind(_this)));
1411
- });
1412
- };
1413
- BottomNavigationComponent.prototype.clickHandler = function (e) {
1414
- var _this = this;
1415
- var itemIdx = this.getBottomNavigationItemIndex(e.target);
1416
- var item = this.items[itemIdx];
1417
- if (!item) {
1418
- return;
1419
- }
1420
- if (item.disabled) {
1421
- e.preventDefault();
1422
- return;
1423
- }
1424
- var args = {
1425
- index: itemIdx,
1426
- item: item,
1427
- originalEvent: e,
1428
- sender: this
1429
- };
1430
- this.ngZone.run(function () {
1431
- _this.selectItem(itemIdx, args);
1432
- _this.changeDetector.markForCheck();
1433
- });
1434
- };
1435
- BottomNavigationComponent.prototype.keyDownHandler = function (e) {
1436
- var isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
1437
- if (!isEnterOrSpace) {
1438
- return;
1439
- }
1440
- this.clickHandler(e);
1441
- };
1442
- BottomNavigationComponent.prototype.getBottomNavigationItemIndex = function (target) {
1443
- var item = closestItem(target, BOTTOMNAVIGATION_ITEM_INDEX, this._nativeHostElement);
1444
- if (item) {
1445
- return itemIndex(item, BOTTOMNAVIGATION_ITEM_INDEX);
1446
- }
1447
- };
1448
- __decorate([
1449
- Input(),
1450
- __metadata("design:type", Array)
1451
- ], BottomNavigationComponent.prototype, "items", void 0);
1452
- __decorate([
1453
- Input(),
1454
- __metadata("design:type", Boolean)
1455
- ], BottomNavigationComponent.prototype, "border", void 0);
1456
- __decorate([
1457
- Input(),
1458
- __metadata("design:type", Boolean)
1459
- ], BottomNavigationComponent.prototype, "disabled", void 0);
1460
- __decorate([
1461
- Input(),
1462
- __metadata("design:type", String),
1463
- __metadata("design:paramtypes", [String])
1464
- ], BottomNavigationComponent.prototype, "fill", null);
1465
- __decorate([
1466
- Input(),
1467
- __metadata("design:type", String),
1468
- __metadata("design:paramtypes", [String])
1469
- ], BottomNavigationComponent.prototype, "itemFlow", null);
1470
- __decorate([
1471
- Input(),
1472
- __metadata("design:type", String),
1473
- __metadata("design:paramtypes", [String])
1474
- ], BottomNavigationComponent.prototype, "positionMode", null);
1475
- __decorate([
1476
- Input(),
1477
- __metadata("design:type", String),
1478
- __metadata("design:paramtypes", [String])
1479
- ], BottomNavigationComponent.prototype, "themeColor", null);
1480
- __decorate([
1481
- Output(),
1482
- __metadata("design:type", EventEmitter)
1483
- ], BottomNavigationComponent.prototype, "select", void 0);
1484
- __decorate([
1485
- HostBinding('class.k-hstack'),
1486
- HostBinding('class.k-justify-content-stretch'),
1487
- HostBinding('class.k-bottom-nav'),
1488
- __metadata("design:type", Boolean)
1489
- ], BottomNavigationComponent.prototype, "hostClass", void 0);
1490
- __decorate([
1491
- HostBinding('class.k-bottom-nav-border'),
1492
- __metadata("design:type", Boolean),
1493
- __metadata("design:paramtypes", [])
1494
- ], BottomNavigationComponent.prototype, "borderClass", null);
1495
- __decorate([
1496
- HostBinding('class.k-state-disabled'),
1497
- __metadata("design:type", Boolean),
1498
- __metadata("design:paramtypes", [])
1499
- ], BottomNavigationComponent.prototype, "disabledClass", null);
1500
- __decorate([
1501
- HostBinding('attr.role'),
1502
- __metadata("design:type", String)
1503
- ], BottomNavigationComponent.prototype, "role", void 0);
1504
- __decorate([
1505
- HostBinding('attr.dir'),
1506
- __metadata("design:type", String)
1507
- ], BottomNavigationComponent.prototype, "direction", void 0);
1508
- __decorate([
1509
- ContentChild(BottomNavigationItemTemplateDirective, { static: false }),
1510
- __metadata("design:type", BottomNavigationItemTemplateDirective)
1511
- ], BottomNavigationComponent.prototype, "itemTemplate", void 0);
1512
- BottomNavigationComponent = __decorate([
1513
- Component({
1514
- exportAs: 'kendoBottomNavigation',
1515
- selector: 'kendo-bottomnavigation',
1516
- providers: [
1517
- LocalizationService,
1518
- {
1519
- provide: L10N_PREFIX,
1520
- useValue: 'kendo.bottomnavigation'
1521
- }
1522
- ],
1523
- 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." + BOTTOMNAVIGATION_ITEM_INDEX + "]=\"idx\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n [orientation]=\"itemFlow\">\n </span>\n </ng-container>\n "
1524
- }),
1525
- __metadata("design:paramtypes", [LocalizationService,
1526
- ElementRef,
1527
- NgZone,
1528
- ChangeDetectorRef,
1529
- Renderer2])
1530
- ], BottomNavigationComponent);
1531
- return BottomNavigationComponent;
1532
- }());
1533
-
1534
- var templateDirectives$1 = [BottomNavigationItemTemplateDirective];
1535
- var exportedComponents = [BottomNavigationComponent].concat(templateDirectives$1);
1536
- var declarations$2 = [BottomNavigationItemComponent].concat(exportedComponents);
1537
- /**
1538
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
1539
- * definition for the BottomNavigation component.
1540
- * @example
1541
- *
1542
- * ```ts-no-run
1543
- * // Import the BottomNavigation module
1544
- * import { BottomNavigationModule } from '@progress/kendo-angular-navigation';
1545
- *
1546
- * // The browser platform with a compiler
1547
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1548
- * import { BrowserModule } from '@angular/platform-browser';
1549
- *
1550
- * import { NgModule } from '@angular/core';
1551
- *
1552
- * // Import the app component
1553
- * import { AppComponent } from './app.component';
1554
- *
1555
- * // Define the app module
1556
- * _@NgModule({
1557
- * declarations: [AppComponent], // declare app component
1558
- * imports: [BrowserModule, BottomNavigationModule], // import BottomNavigation module
1559
- * bootstrap: [AppComponent]
1560
- * })
1561
- * export class AppModule {}
1562
- *
1563
- * // Compile and launch the module
1564
- * platformBrowserDynamic().bootstrapModule(AppModule);
1565
- *
1566
- * ```
1567
- */
1568
- var BottomNavigationModule = /** @class */ (function () {
1569
- function BottomNavigationModule() {
1570
- }
1571
- BottomNavigationModule = __decorate([
1572
- NgModule({
1573
- declarations: [declarations$2],
1574
- exports: [exportedComponents],
1575
- imports: [CommonModule]
1576
- })
1577
- ], BottomNavigationModule);
1578
- return BottomNavigationModule;
1579
- }());
1580
-
1581
- /**
1582
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
1583
- * definition for the Navigation components.
1584
- *
1585
- * @example
1586
- *
1587
- * ```ts-no-run
1588
- * // Import the Navigation module
1589
- * import { NavigationModule } from '@progress/kendo-angular-navigation';
1590
- *
1591
- * // The browser platform with a compiler
1592
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1593
- *
1594
- * import { NgModule } from '@angular/core';
1595
- *
1596
- * // Import the app component
1597
- * import { AppComponent } from './app.component';
1598
- *
1599
- * // Define the app module
1600
- * _@NgModule({
1601
- * declarations: [AppComponent], // declare app component
1602
- * imports: [BrowserModule, NavigationModule], // import Navigation module
1603
- * bootstrap: [AppComponent]
1604
- * })
1605
- * export class AppModule {}
1606
- *
1607
- * // Compile and launch the module
1608
- * platformBrowserDynamic().bootstrapModule(AppModule);
1609
- *
1610
- * ```
1611
- */
1612
- var NavigationModule = /** @class */ (function () {
1613
- function NavigationModule() {
1614
- }
1615
- NavigationModule = __decorate([
1616
- NgModule({
1617
- exports: [
1618
- AppBarModule,
1619
- BreadCrumbModule,
1620
- BottomNavigationModule
1621
- ]
1622
- })
1623
- ], NavigationModule);
1624
- return NavigationModule;
1625
- }());
1626
-
1627
- // AppBar exports
1628
-
1629
- /**
1630
- * Generated bundle index. Do not edit.
1631
- */
1632
-
1633
- export { BottomNavigationItemComponent, BOTTOMNAVIGATION_ITEM_INDEX, BreadCrumbItemComponent, BreadCrumbListComponent, BREADCRUMB_ITEM_INDEX, BreadCrumbSeparatorDirective, PreventableEvent, AppBarComponent, AppBarSectionComponent, AppBarSpacerComponent, AppBarModule, NavigationModule, BreadCrumbComponent, BreadCrumbItemTemplateDirective, BreadCrumbModule, BottomNavigationComponent, BottomNavigationItemTemplateDirective, BottomNavigationSelectEvent, BottomNavigationModule };