@progress/kendo-angular-layout 6.3.3 → 6.3.5
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/cdn/js/kendo-angular-layout.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/panelbar/panelbar-item.component.js +45 -23
- package/dist/es/panelbar/panelbar.component.js +5 -13
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/panelbar/panelbar-item.component.d.ts +13 -13
- package/dist/es2015/panelbar/panelbar-item.component.js +45 -31
- package/dist/es2015/panelbar/panelbar.component.d.ts +1 -1
- package/dist/es2015/panelbar/panelbar.component.js +5 -9
- package/dist/fesm2015/index.js +51 -41
- package/dist/fesm5/index.js +51 -37
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/panelbar/panelbar-item.component.js +44 -22
- package/dist/npm/panelbar/panelbar.component.js +5 -13
- package/dist/systemjs/kendo-angular-layout.js +1 -1
- package/package.json +5 -5
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-layout',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1635940072,
|
|
13
13
|
version: '',
|
|
14
14
|
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'
|
|
15
15
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TemplateRef, QueryList, AfterContentChecked, AfterViewChecked, OnDestroy, ElementRef } from '@angular/core';
|
|
5
|
+
import { TemplateRef, QueryList, AfterContentChecked, AfterViewChecked, OnDestroy, ElementRef, Renderer2, OnInit } from '@angular/core';
|
|
6
6
|
import { PanelBarService } from "./panelbar.service";
|
|
7
7
|
import { PanelBarContentDirective } from "./panelbar-content.directive";
|
|
8
8
|
import { PanelBarItemTitleDirective } from "./panelbar-item-title.directive";
|
|
@@ -11,10 +11,11 @@ import { Subscription } from 'rxjs';
|
|
|
11
11
|
/**
|
|
12
12
|
* Represents the items of the PanelBar.
|
|
13
13
|
*/
|
|
14
|
-
export declare class PanelBarItemComponent implements AfterContentChecked, AfterViewChecked, OnDestroy {
|
|
14
|
+
export declare class PanelBarItemComponent implements OnInit, AfterContentChecked, AfterViewChecked, OnDestroy {
|
|
15
15
|
parent: PanelBarItemComponent;
|
|
16
16
|
private eventService;
|
|
17
17
|
private element;
|
|
18
|
+
private renderer;
|
|
18
19
|
/**
|
|
19
20
|
* Sets the title of the PanelBar item ([see example]({% slug items_panelbar %}#toc-titles)).
|
|
20
21
|
*/
|
|
@@ -78,7 +79,7 @@ export declare class PanelBarItemComponent implements AfterContentChecked, After
|
|
|
78
79
|
readonly animate: boolean;
|
|
79
80
|
role: string;
|
|
80
81
|
titleAttribute: string;
|
|
81
|
-
|
|
82
|
+
kItemClass: boolean;
|
|
82
83
|
readonly kStateDefaultClass: boolean;
|
|
83
84
|
readonly kStateDisabledClass: boolean;
|
|
84
85
|
readonly kStateExpandedClass: boolean;
|
|
@@ -86,6 +87,8 @@ export declare class PanelBarItemComponent implements AfterContentChecked, After
|
|
|
86
87
|
readonly ariaExpanded: boolean;
|
|
87
88
|
readonly ariaSelected: boolean;
|
|
88
89
|
readonly ariaDisabled: boolean;
|
|
90
|
+
readonly headerClass: boolean;
|
|
91
|
+
readonly childClass: boolean;
|
|
89
92
|
/**
|
|
90
93
|
* @hidden
|
|
91
94
|
*/
|
|
@@ -98,22 +101,15 @@ export declare class PanelBarItemComponent implements AfterContentChecked, After
|
|
|
98
101
|
wrapperFocused: boolean;
|
|
99
102
|
protected subscriptions: Subscription;
|
|
100
103
|
private _expanded;
|
|
101
|
-
|
|
104
|
+
private level;
|
|
105
|
+
constructor(parent: PanelBarItemComponent, eventService: PanelBarService, element: ElementRef, renderer: Renderer2);
|
|
102
106
|
/**
|
|
103
107
|
* @hidden
|
|
104
108
|
*/
|
|
105
109
|
headerHeight(): number;
|
|
106
|
-
|
|
107
|
-
* @hidden
|
|
108
|
-
*/
|
|
110
|
+
ngOnInit(): void;
|
|
109
111
|
ngAfterContentChecked(): void;
|
|
110
|
-
/**
|
|
111
|
-
* @hidden
|
|
112
|
-
*/
|
|
113
112
|
ngAfterViewChecked(): void;
|
|
114
|
-
/**
|
|
115
|
-
* @hidden
|
|
116
|
-
*/
|
|
117
113
|
ngOnDestroy(): void;
|
|
118
114
|
/**
|
|
119
115
|
* @hidden
|
|
@@ -147,5 +143,9 @@ export declare class PanelBarItemComponent implements AfterContentChecked, After
|
|
|
147
143
|
* @hidden
|
|
148
144
|
*/
|
|
149
145
|
toggleExpandedChildAnimations(value: boolean): void;
|
|
146
|
+
/**
|
|
147
|
+
* @hidden
|
|
148
|
+
*/
|
|
149
|
+
private addLevelClass;
|
|
150
150
|
private onWrapperFocusChange;
|
|
151
151
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
var PanelBarItemComponent_1;
|
|
7
|
-
import { Component, Input, ContentChildren, ViewChildren, Optional, Host, HostBinding, SkipSelf, isDevMode, TemplateRef, QueryList, ViewChild, ElementRef } from '@angular/core';
|
|
7
|
+
import { Component, Input, ContentChildren, ViewChildren, Optional, Host, HostBinding, SkipSelf, isDevMode, TemplateRef, QueryList, ViewChild, ElementRef, Renderer2 } from '@angular/core';
|
|
8
8
|
import { animate, trigger, style, state, transition, AUTO_STYLE } from '@angular/animations';
|
|
9
9
|
import { PanelBarService } from "./panelbar.service";
|
|
10
10
|
import { PanelBarContentDirective } from "./panelbar-content.directive";
|
|
@@ -20,10 +20,11 @@ let nextId = 0;
|
|
|
20
20
|
* Represents the items of the PanelBar.
|
|
21
21
|
*/
|
|
22
22
|
let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponent {
|
|
23
|
-
constructor(parent, eventService, element) {
|
|
23
|
+
constructor(parent, eventService, element, renderer) {
|
|
24
24
|
this.parent = parent;
|
|
25
25
|
this.eventService = eventService;
|
|
26
26
|
this.element = element;
|
|
27
|
+
this.renderer = renderer;
|
|
27
28
|
/**
|
|
28
29
|
* Allows the component to set the `"id"` property to each item.
|
|
29
30
|
* Used to set the `id` attributes of the nested elements and to enable the WAI-ARIA support.
|
|
@@ -58,6 +59,7 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
58
59
|
this.state = "inactive";
|
|
59
60
|
this.role = "treeitem";
|
|
60
61
|
this.titleAttribute = null; // tslint:disable-line
|
|
62
|
+
this.kItemClass = true;
|
|
61
63
|
this.focused = false;
|
|
62
64
|
this.wrapperFocused = false;
|
|
63
65
|
this.subscriptions = new Subscription(() => { });
|
|
@@ -65,6 +67,7 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
65
67
|
this.subscriptions.add(eventService.parent$.subscribe(focused => this.onWrapperFocusChange(focused)));
|
|
66
68
|
this.subscriptions.add(eventService.keepContent$.subscribe(keepContent => this.keepContent = keepContent));
|
|
67
69
|
this.wrapperFocused = parent ? parent.focused : false;
|
|
70
|
+
this.level = this.parent ? this.parent.level + 1 : 0;
|
|
68
71
|
}
|
|
69
72
|
/**
|
|
70
73
|
* When set to `true`, expands the PanelBar item ([see example]({% slug items_panelbar %}#toc-expanded-state)).
|
|
@@ -83,9 +86,6 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
83
86
|
get animate() {
|
|
84
87
|
return this.eventService.animate;
|
|
85
88
|
}
|
|
86
|
-
get kItemClass() {
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
89
|
get kStateDefaultClass() {
|
|
90
90
|
return !this.disabled;
|
|
91
91
|
}
|
|
@@ -107,6 +107,12 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
107
107
|
get ariaDisabled() {
|
|
108
108
|
return this.disabled ? true : null;
|
|
109
109
|
}
|
|
110
|
+
get headerClass() {
|
|
111
|
+
return this.parent ? null : true;
|
|
112
|
+
}
|
|
113
|
+
get childClass() {
|
|
114
|
+
return this.parent ? true : null;
|
|
115
|
+
}
|
|
110
116
|
/**
|
|
111
117
|
* @hidden
|
|
112
118
|
*/
|
|
@@ -119,9 +125,9 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
119
125
|
headerHeight() {
|
|
120
126
|
return this.element.nativeElement.offsetHeight - (this.contentWrapper ? this.contentWrapper.nativeElement.offsetHeight : 0);
|
|
121
127
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
ngOnInit() {
|
|
129
|
+
this.addLevelClass();
|
|
130
|
+
}
|
|
125
131
|
ngAfterContentChecked() {
|
|
126
132
|
this.hasItems = this.items && this.items.filter(item => !item.hidden).length > 0;
|
|
127
133
|
this.hasChildItems = this.contentItems.filter(item => item !== this).length > 0 || this.hasItems;
|
|
@@ -129,9 +135,6 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
129
135
|
this.content !== undefined;
|
|
130
136
|
this.validateConfiguration();
|
|
131
137
|
}
|
|
132
|
-
/**
|
|
133
|
-
* @hidden
|
|
134
|
-
*/
|
|
135
138
|
ngAfterViewChecked() {
|
|
136
139
|
if (this.items) {
|
|
137
140
|
this.childrenItems = this.viewChildItems.toArray();
|
|
@@ -140,9 +143,6 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
140
143
|
this.childrenItems = this.contentItems.filter(item => item !== this);
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
|
-
/**
|
|
144
|
-
* @hidden
|
|
145
|
-
*/
|
|
146
146
|
ngOnDestroy() {
|
|
147
147
|
this.subscriptions.unsubscribe();
|
|
148
148
|
}
|
|
@@ -231,6 +231,14 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* @hidden
|
|
236
|
+
*/
|
|
237
|
+
addLevelClass() {
|
|
238
|
+
if (this.level >= 0) {
|
|
239
|
+
this.renderer.addClass(this.element.nativeElement, `k-level-${this.level}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
234
242
|
onWrapperFocusChange(focused) {
|
|
235
243
|
this.wrapperFocused = focused;
|
|
236
244
|
}
|
|
@@ -298,9 +306,8 @@ tslib_1.__decorate([
|
|
|
298
306
|
], PanelBarItemComponent.prototype, "titleAttribute", void 0);
|
|
299
307
|
tslib_1.__decorate([
|
|
300
308
|
HostBinding('class.k-item'),
|
|
301
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
302
|
-
|
|
303
|
-
], PanelBarItemComponent.prototype, "kItemClass", null);
|
|
309
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
310
|
+
], PanelBarItemComponent.prototype, "kItemClass", void 0);
|
|
304
311
|
tslib_1.__decorate([
|
|
305
312
|
HostBinding('class.k-state-default'),
|
|
306
313
|
tslib_1.__metadata("design:type", Boolean),
|
|
@@ -336,6 +343,16 @@ tslib_1.__decorate([
|
|
|
336
343
|
tslib_1.__metadata("design:type", Boolean),
|
|
337
344
|
tslib_1.__metadata("design:paramtypes", [])
|
|
338
345
|
], PanelBarItemComponent.prototype, "ariaDisabled", null);
|
|
346
|
+
tslib_1.__decorate([
|
|
347
|
+
HostBinding('class.k-panelbar-header'),
|
|
348
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
349
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
350
|
+
], PanelBarItemComponent.prototype, "headerClass", null);
|
|
351
|
+
tslib_1.__decorate([
|
|
352
|
+
HostBinding('class.k-panelbar-item'),
|
|
353
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
354
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
355
|
+
], PanelBarItemComponent.prototype, "childClass", null);
|
|
339
356
|
tslib_1.__decorate([
|
|
340
357
|
ViewChildren(PanelBarItemComponent_1),
|
|
341
358
|
tslib_1.__metadata("design:type", QueryList)
|
|
@@ -373,28 +390,24 @@ PanelBarItemComponent = PanelBarItemComponent_1 = tslib_1.__decorate([
|
|
|
373
390
|
<span
|
|
374
391
|
#header
|
|
375
392
|
[class.k-link]="true"
|
|
376
|
-
[class.k-header]="!parent"
|
|
377
393
|
[class.k-state-selected]="!disabled && selected"
|
|
378
394
|
[class.k-state-focused]="focused && wrapperFocused"
|
|
379
395
|
(click)="onItemClick($event)">
|
|
380
396
|
<span
|
|
381
397
|
*ngIf="icon || iconClass"
|
|
382
|
-
class="k-icon"
|
|
398
|
+
class="k-icon k-panelbar-item-icon"
|
|
383
399
|
[ngClass]="iconClasses">
|
|
384
400
|
</span>
|
|
385
401
|
<img
|
|
386
402
|
*ngIf="imageUrl"
|
|
387
|
-
class="k-image"
|
|
403
|
+
class="k-image k-panelbar-item-icon"
|
|
388
404
|
[src]="imageUrl"
|
|
389
405
|
alt="">
|
|
390
|
-
<ng-container *ngIf="!titleTemplate">{{title}}</ng-container>
|
|
406
|
+
<ng-container *ngIf="!titleTemplate"><span class="k-panelbar-item-text">{{title}}</span></ng-container>
|
|
391
407
|
<ng-template *ngIf="titleTemplate" [ngTemplateOutlet]="titleTemplate"></ng-template>
|
|
392
408
|
<span *ngIf="hasChildItems || hasContent"
|
|
393
|
-
|
|
394
|
-
[
|
|
395
|
-
[class.k-panelbar-collapse]="expanded"
|
|
396
|
-
[class.k-i-arrow-s]="!expanded"
|
|
397
|
-
[class.k-panelbar-expand]="!expanded">
|
|
409
|
+
class="k-icon k-panelbar-toggle"
|
|
410
|
+
[ngClass]="{'k-i-arrow-chevron-up k-panelbar-collapse': expanded, 'k-i-arrow-chevron-down k-panelbar-expand': !expanded}">
|
|
398
411
|
</span>
|
|
399
412
|
</span>
|
|
400
413
|
<div #contentWrapper
|
|
@@ -406,14 +419,14 @@ PanelBarItemComponent = PanelBarItemComponent_1 = tslib_1.__decorate([
|
|
|
406
419
|
*ngIf="hasChildItems && !items?.length"
|
|
407
420
|
[style.overflow]="contentOverflow"
|
|
408
421
|
[style.height]="contentHeight"
|
|
409
|
-
class="k-panel k-group">
|
|
422
|
+
class="k-panel k-group k-panelbar-group">
|
|
410
423
|
<ng-content select="kendo-panelbar-item"></ng-content>
|
|
411
424
|
</div>
|
|
412
425
|
<div
|
|
413
426
|
*ngIf="hasContent && !content"
|
|
414
427
|
[style.overflow]="contentOverflow"
|
|
415
428
|
[style.height]="contentHeight"
|
|
416
|
-
class="k-content">
|
|
429
|
+
class="k-content k-panelbar-content">
|
|
417
430
|
<ng-template
|
|
418
431
|
[ngTemplateOutlet]="contentTemplate.first.templateRef"
|
|
419
432
|
[ngTemplateOutletContext]="{
|
|
@@ -431,7 +444,7 @@ PanelBarItemComponent = PanelBarItemComponent_1 = tslib_1.__decorate([
|
|
|
431
444
|
<div *ngIf="hasItems"
|
|
432
445
|
[style.overflow]="contentOverflow"
|
|
433
446
|
[style.height]="contentHeight"
|
|
434
|
-
class="k-panel k-group">
|
|
447
|
+
class="k-panel k-group k-panelbar-group">
|
|
435
448
|
<ng-container *ngFor="let item of items">
|
|
436
449
|
<kendo-panelbar-item *ngIf="!item.hidden"
|
|
437
450
|
[title]="item.title"
|
|
@@ -452,7 +465,7 @@ PanelBarItemComponent = PanelBarItemComponent_1 = tslib_1.__decorate([
|
|
|
452
465
|
*ngIf="content"
|
|
453
466
|
[style.overflow]="contentOverflow"
|
|
454
467
|
[style.height]="contentHeight"
|
|
455
|
-
class="k-content">
|
|
468
|
+
class="k-content k-panelbar-content">
|
|
456
469
|
<ng-template
|
|
457
470
|
[ngTemplateOutlet]="template"
|
|
458
471
|
[ngTemplateOutletContext]="{
|
|
@@ -473,6 +486,7 @@ PanelBarItemComponent = PanelBarItemComponent_1 = tslib_1.__decorate([
|
|
|
473
486
|
tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
|
|
474
487
|
tslib_1.__metadata("design:paramtypes", [PanelBarItemComponent,
|
|
475
488
|
PanelBarService,
|
|
476
|
-
ElementRef
|
|
489
|
+
ElementRef,
|
|
490
|
+
Renderer2])
|
|
477
491
|
], PanelBarItemComponent);
|
|
478
492
|
export { PanelBarItemComponent };
|
|
@@ -57,6 +57,7 @@ export declare class PanelBarComponent implements AfterViewChecked, OnChanges, O
|
|
|
57
57
|
stateChange: EventEmitter<any>;
|
|
58
58
|
tabIndex: number;
|
|
59
59
|
role: string;
|
|
60
|
+
hostClass: boolean;
|
|
60
61
|
activeDescendant: string;
|
|
61
62
|
readonly hostHeight: string;
|
|
62
63
|
readonly overflow: string;
|
|
@@ -108,7 +109,6 @@ export declare class PanelBarComponent implements AfterViewChecked, OnChanges, O
|
|
|
108
109
|
private validateConfiguration;
|
|
109
110
|
private updateChildrenHeight;
|
|
110
111
|
private onItemAction;
|
|
111
|
-
readonly hostClasses: boolean;
|
|
112
112
|
private isVisible;
|
|
113
113
|
private getVisibleParent;
|
|
114
114
|
private focusItem;
|
|
@@ -54,6 +54,7 @@ class PanelBarComponent {
|
|
|
54
54
|
this.stateChange = new EventEmitter();
|
|
55
55
|
this.tabIndex = 0;
|
|
56
56
|
this.role = "tree";
|
|
57
|
+
this.hostClass = true;
|
|
57
58
|
this.activeDescendant = "";
|
|
58
59
|
this.isViewInit = true;
|
|
59
60
|
this.focused = false;
|
|
@@ -280,9 +281,6 @@ class PanelBarComponent {
|
|
|
280
281
|
this.stateChange.emit(modifiedItems.map(currentItem => currentItem.serialize()));
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
|
-
get hostClasses() {
|
|
284
|
-
return true;
|
|
285
|
-
}
|
|
286
284
|
isVisible(item) {
|
|
287
285
|
const visibleItems = this.visibleItems();
|
|
288
286
|
return visibleItems.some(i => i === item);
|
|
@@ -431,6 +429,10 @@ tslib_1.__decorate([
|
|
|
431
429
|
HostBinding('attr.role'),
|
|
432
430
|
tslib_1.__metadata("design:type", String)
|
|
433
431
|
], PanelBarComponent.prototype, "role", void 0);
|
|
432
|
+
tslib_1.__decorate([
|
|
433
|
+
HostBinding('class.k-panelbar'),
|
|
434
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
435
|
+
], PanelBarComponent.prototype, "hostClass", void 0);
|
|
434
436
|
tslib_1.__decorate([
|
|
435
437
|
HostBinding('attr.aria-activedescendant'),
|
|
436
438
|
tslib_1.__metadata("design:type", String)
|
|
@@ -490,12 +492,6 @@ tslib_1.__decorate([
|
|
|
490
492
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
491
493
|
tslib_1.__metadata("design:returntype", void 0)
|
|
492
494
|
], PanelBarComponent.prototype, "onComponentKeyDown", null);
|
|
493
|
-
tslib_1.__decorate([
|
|
494
|
-
HostBinding('class.k-widget'),
|
|
495
|
-
HostBinding('class.k-panelbar'),
|
|
496
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
497
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
498
|
-
], PanelBarComponent.prototype, "hostClasses", null);
|
|
499
495
|
PanelBarComponent = tslib_1.__decorate([
|
|
500
496
|
Component({
|
|
501
497
|
exportAs: 'kendoPanelbar',
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
6
|
-
import { Injectable, Directive, TemplateRef, Optional, isDevMode, Input, ViewChild, ElementRef, HostBinding, ViewChildren, QueryList, ContentChildren, Component, SkipSelf, Host, EventEmitter, Output, ContentChild, HostListener,
|
|
6
|
+
import { Injectable, Directive, TemplateRef, Optional, isDevMode, Input, ViewChild, ElementRef, HostBinding, ViewChildren, QueryList, ContentChildren, Component, SkipSelf, Host, Renderer2, EventEmitter, Output, ContentChild, HostListener, ChangeDetectorRef, NgZone, Inject, forwardRef, ViewEncapsulation, NgModule } from '@angular/core';
|
|
7
7
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { Keys, PreventableEvent, isDocumentAvailable, hasObservers, EventsModule, DraggableDirective, DraggableModule, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -21,7 +21,7 @@ const packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-layout',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
24
|
+
publishDate: 1635940072,
|
|
25
25
|
version: '',
|
|
26
26
|
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'
|
|
27
27
|
};
|
|
@@ -232,10 +232,11 @@ let nextId$1 = 0;
|
|
|
232
232
|
* Represents the items of the PanelBar.
|
|
233
233
|
*/
|
|
234
234
|
let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponent {
|
|
235
|
-
constructor(parent, eventService, element) {
|
|
235
|
+
constructor(parent, eventService, element, renderer) {
|
|
236
236
|
this.parent = parent;
|
|
237
237
|
this.eventService = eventService;
|
|
238
238
|
this.element = element;
|
|
239
|
+
this.renderer = renderer;
|
|
239
240
|
/**
|
|
240
241
|
* Allows the component to set the `"id"` property to each item.
|
|
241
242
|
* Used to set the `id` attributes of the nested elements and to enable the WAI-ARIA support.
|
|
@@ -270,6 +271,7 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
270
271
|
this.state = "inactive";
|
|
271
272
|
this.role = "treeitem";
|
|
272
273
|
this.titleAttribute = null; // tslint:disable-line
|
|
274
|
+
this.kItemClass = true;
|
|
273
275
|
this.focused = false;
|
|
274
276
|
this.wrapperFocused = false;
|
|
275
277
|
this.subscriptions = new Subscription(() => { });
|
|
@@ -277,6 +279,7 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
277
279
|
this.subscriptions.add(eventService.parent$.subscribe(focused => this.onWrapperFocusChange(focused)));
|
|
278
280
|
this.subscriptions.add(eventService.keepContent$.subscribe(keepContent => this.keepContent = keepContent));
|
|
279
281
|
this.wrapperFocused = parent ? parent.focused : false;
|
|
282
|
+
this.level = this.parent ? this.parent.level + 1 : 0;
|
|
280
283
|
}
|
|
281
284
|
/**
|
|
282
285
|
* When set to `true`, expands the PanelBar item ([see example]({% slug items_panelbar %}#toc-expanded-state)).
|
|
@@ -295,9 +298,6 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
295
298
|
get animate() {
|
|
296
299
|
return this.eventService.animate;
|
|
297
300
|
}
|
|
298
|
-
get kItemClass() {
|
|
299
|
-
return true;
|
|
300
|
-
}
|
|
301
301
|
get kStateDefaultClass() {
|
|
302
302
|
return !this.disabled;
|
|
303
303
|
}
|
|
@@ -319,6 +319,12 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
319
319
|
get ariaDisabled() {
|
|
320
320
|
return this.disabled ? true : null;
|
|
321
321
|
}
|
|
322
|
+
get headerClass() {
|
|
323
|
+
return this.parent ? null : true;
|
|
324
|
+
}
|
|
325
|
+
get childClass() {
|
|
326
|
+
return this.parent ? true : null;
|
|
327
|
+
}
|
|
322
328
|
/**
|
|
323
329
|
* @hidden
|
|
324
330
|
*/
|
|
@@ -331,9 +337,9 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
331
337
|
headerHeight() {
|
|
332
338
|
return this.element.nativeElement.offsetHeight - (this.contentWrapper ? this.contentWrapper.nativeElement.offsetHeight : 0);
|
|
333
339
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
340
|
+
ngOnInit() {
|
|
341
|
+
this.addLevelClass();
|
|
342
|
+
}
|
|
337
343
|
ngAfterContentChecked() {
|
|
338
344
|
this.hasItems = this.items && this.items.filter(item => !item.hidden).length > 0;
|
|
339
345
|
this.hasChildItems = this.contentItems.filter(item => item !== this).length > 0 || this.hasItems;
|
|
@@ -341,9 +347,6 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
341
347
|
this.content !== undefined;
|
|
342
348
|
this.validateConfiguration();
|
|
343
349
|
}
|
|
344
|
-
/**
|
|
345
|
-
* @hidden
|
|
346
|
-
*/
|
|
347
350
|
ngAfterViewChecked() {
|
|
348
351
|
if (this.items) {
|
|
349
352
|
this.childrenItems = this.viewChildItems.toArray();
|
|
@@ -352,9 +355,6 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
352
355
|
this.childrenItems = this.contentItems.filter(item => item !== this);
|
|
353
356
|
}
|
|
354
357
|
}
|
|
355
|
-
/**
|
|
356
|
-
* @hidden
|
|
357
|
-
*/
|
|
358
358
|
ngOnDestroy() {
|
|
359
359
|
this.subscriptions.unsubscribe();
|
|
360
360
|
}
|
|
@@ -443,6 +443,14 @@ let PanelBarItemComponent = PanelBarItemComponent_1 = class PanelBarItemComponen
|
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* @hidden
|
|
448
|
+
*/
|
|
449
|
+
addLevelClass() {
|
|
450
|
+
if (this.level >= 0) {
|
|
451
|
+
this.renderer.addClass(this.element.nativeElement, `k-level-${this.level}`);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
446
454
|
onWrapperFocusChange(focused) {
|
|
447
455
|
this.wrapperFocused = focused;
|
|
448
456
|
}
|
|
@@ -510,9 +518,8 @@ __decorate([
|
|
|
510
518
|
], PanelBarItemComponent.prototype, "titleAttribute", void 0);
|
|
511
519
|
__decorate([
|
|
512
520
|
HostBinding('class.k-item'),
|
|
513
|
-
__metadata("design:type", Boolean)
|
|
514
|
-
|
|
515
|
-
], PanelBarItemComponent.prototype, "kItemClass", null);
|
|
521
|
+
__metadata("design:type", Boolean)
|
|
522
|
+
], PanelBarItemComponent.prototype, "kItemClass", void 0);
|
|
516
523
|
__decorate([
|
|
517
524
|
HostBinding('class.k-state-default'),
|
|
518
525
|
__metadata("design:type", Boolean),
|
|
@@ -548,6 +555,16 @@ __decorate([
|
|
|
548
555
|
__metadata("design:type", Boolean),
|
|
549
556
|
__metadata("design:paramtypes", [])
|
|
550
557
|
], PanelBarItemComponent.prototype, "ariaDisabled", null);
|
|
558
|
+
__decorate([
|
|
559
|
+
HostBinding('class.k-panelbar-header'),
|
|
560
|
+
__metadata("design:type", Boolean),
|
|
561
|
+
__metadata("design:paramtypes", [])
|
|
562
|
+
], PanelBarItemComponent.prototype, "headerClass", null);
|
|
563
|
+
__decorate([
|
|
564
|
+
HostBinding('class.k-panelbar-item'),
|
|
565
|
+
__metadata("design:type", Boolean),
|
|
566
|
+
__metadata("design:paramtypes", [])
|
|
567
|
+
], PanelBarItemComponent.prototype, "childClass", null);
|
|
551
568
|
__decorate([
|
|
552
569
|
ViewChildren(PanelBarItemComponent_1),
|
|
553
570
|
__metadata("design:type", QueryList)
|
|
@@ -585,28 +602,24 @@ PanelBarItemComponent = PanelBarItemComponent_1 = __decorate([
|
|
|
585
602
|
<span
|
|
586
603
|
#header
|
|
587
604
|
[class.k-link]="true"
|
|
588
|
-
[class.k-header]="!parent"
|
|
589
605
|
[class.k-state-selected]="!disabled && selected"
|
|
590
606
|
[class.k-state-focused]="focused && wrapperFocused"
|
|
591
607
|
(click)="onItemClick($event)">
|
|
592
608
|
<span
|
|
593
609
|
*ngIf="icon || iconClass"
|
|
594
|
-
class="k-icon"
|
|
610
|
+
class="k-icon k-panelbar-item-icon"
|
|
595
611
|
[ngClass]="iconClasses">
|
|
596
612
|
</span>
|
|
597
613
|
<img
|
|
598
614
|
*ngIf="imageUrl"
|
|
599
|
-
class="k-image"
|
|
615
|
+
class="k-image k-panelbar-item-icon"
|
|
600
616
|
[src]="imageUrl"
|
|
601
617
|
alt="">
|
|
602
|
-
<ng-container *ngIf="!titleTemplate">{{title}}</ng-container>
|
|
618
|
+
<ng-container *ngIf="!titleTemplate"><span class="k-panelbar-item-text">{{title}}</span></ng-container>
|
|
603
619
|
<ng-template *ngIf="titleTemplate" [ngTemplateOutlet]="titleTemplate"></ng-template>
|
|
604
620
|
<span *ngIf="hasChildItems || hasContent"
|
|
605
|
-
|
|
606
|
-
[
|
|
607
|
-
[class.k-panelbar-collapse]="expanded"
|
|
608
|
-
[class.k-i-arrow-s]="!expanded"
|
|
609
|
-
[class.k-panelbar-expand]="!expanded">
|
|
621
|
+
class="k-icon k-panelbar-toggle"
|
|
622
|
+
[ngClass]="{'k-i-arrow-chevron-up k-panelbar-collapse': expanded, 'k-i-arrow-chevron-down k-panelbar-expand': !expanded}">
|
|
610
623
|
</span>
|
|
611
624
|
</span>
|
|
612
625
|
<div #contentWrapper
|
|
@@ -618,14 +631,14 @@ PanelBarItemComponent = PanelBarItemComponent_1 = __decorate([
|
|
|
618
631
|
*ngIf="hasChildItems && !items?.length"
|
|
619
632
|
[style.overflow]="contentOverflow"
|
|
620
633
|
[style.height]="contentHeight"
|
|
621
|
-
class="k-panel k-group">
|
|
634
|
+
class="k-panel k-group k-panelbar-group">
|
|
622
635
|
<ng-content select="kendo-panelbar-item"></ng-content>
|
|
623
636
|
</div>
|
|
624
637
|
<div
|
|
625
638
|
*ngIf="hasContent && !content"
|
|
626
639
|
[style.overflow]="contentOverflow"
|
|
627
640
|
[style.height]="contentHeight"
|
|
628
|
-
class="k-content">
|
|
641
|
+
class="k-content k-panelbar-content">
|
|
629
642
|
<ng-template
|
|
630
643
|
[ngTemplateOutlet]="contentTemplate.first.templateRef"
|
|
631
644
|
[ngTemplateOutletContext]="{
|
|
@@ -643,7 +656,7 @@ PanelBarItemComponent = PanelBarItemComponent_1 = __decorate([
|
|
|
643
656
|
<div *ngIf="hasItems"
|
|
644
657
|
[style.overflow]="contentOverflow"
|
|
645
658
|
[style.height]="contentHeight"
|
|
646
|
-
class="k-panel k-group">
|
|
659
|
+
class="k-panel k-group k-panelbar-group">
|
|
647
660
|
<ng-container *ngFor="let item of items">
|
|
648
661
|
<kendo-panelbar-item *ngIf="!item.hidden"
|
|
649
662
|
[title]="item.title"
|
|
@@ -664,7 +677,7 @@ PanelBarItemComponent = PanelBarItemComponent_1 = __decorate([
|
|
|
664
677
|
*ngIf="content"
|
|
665
678
|
[style.overflow]="contentOverflow"
|
|
666
679
|
[style.height]="contentHeight"
|
|
667
|
-
class="k-content">
|
|
680
|
+
class="k-content k-panelbar-content">
|
|
668
681
|
<ng-template
|
|
669
682
|
[ngTemplateOutlet]="template"
|
|
670
683
|
[ngTemplateOutletContext]="{
|
|
@@ -685,7 +698,8 @@ PanelBarItemComponent = PanelBarItemComponent_1 = __decorate([
|
|
|
685
698
|
__param(0, SkipSelf()), __param(0, Host()), __param(0, Optional()),
|
|
686
699
|
__metadata("design:paramtypes", [PanelBarItemComponent,
|
|
687
700
|
PanelBarService,
|
|
688
|
-
ElementRef
|
|
701
|
+
ElementRef,
|
|
702
|
+
Renderer2])
|
|
689
703
|
], PanelBarItemComponent);
|
|
690
704
|
|
|
691
705
|
/**
|
|
@@ -744,6 +758,7 @@ class PanelBarComponent {
|
|
|
744
758
|
this.stateChange = new EventEmitter();
|
|
745
759
|
this.tabIndex = 0;
|
|
746
760
|
this.role = "tree";
|
|
761
|
+
this.hostClass = true;
|
|
747
762
|
this.activeDescendant = "";
|
|
748
763
|
this.isViewInit = true;
|
|
749
764
|
this.focused = false;
|
|
@@ -970,9 +985,6 @@ class PanelBarComponent {
|
|
|
970
985
|
this.stateChange.emit(modifiedItems.map(currentItem => currentItem.serialize()));
|
|
971
986
|
}
|
|
972
987
|
}
|
|
973
|
-
get hostClasses() {
|
|
974
|
-
return true;
|
|
975
|
-
}
|
|
976
988
|
isVisible(item) {
|
|
977
989
|
const visibleItems = this.visibleItems();
|
|
978
990
|
return visibleItems.some(i => i === item);
|
|
@@ -1121,6 +1133,10 @@ __decorate([
|
|
|
1121
1133
|
HostBinding('attr.role'),
|
|
1122
1134
|
__metadata("design:type", String)
|
|
1123
1135
|
], PanelBarComponent.prototype, "role", void 0);
|
|
1136
|
+
__decorate([
|
|
1137
|
+
HostBinding('class.k-panelbar'),
|
|
1138
|
+
__metadata("design:type", Boolean)
|
|
1139
|
+
], PanelBarComponent.prototype, "hostClass", void 0);
|
|
1124
1140
|
__decorate([
|
|
1125
1141
|
HostBinding('attr.aria-activedescendant'),
|
|
1126
1142
|
__metadata("design:type", String)
|
|
@@ -1180,12 +1196,6 @@ __decorate([
|
|
|
1180
1196
|
__metadata("design:paramtypes", [Object]),
|
|
1181
1197
|
__metadata("design:returntype", void 0)
|
|
1182
1198
|
], PanelBarComponent.prototype, "onComponentKeyDown", null);
|
|
1183
|
-
__decorate([
|
|
1184
|
-
HostBinding('class.k-widget'),
|
|
1185
|
-
HostBinding('class.k-panelbar'),
|
|
1186
|
-
__metadata("design:type", Boolean),
|
|
1187
|
-
__metadata("design:paramtypes", [])
|
|
1188
|
-
], PanelBarComponent.prototype, "hostClasses", null);
|
|
1189
1199
|
PanelBarComponent = __decorate([
|
|
1190
1200
|
Component({
|
|
1191
1201
|
exportAs: 'kendoPanelbar',
|