@progress/kendo-angular-layout 7.0.2-dev.202205251252 → 7.1.0-dev.202206080813
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/bundles/kendo-angular-layout.umd.js +1 -1
- package/drawer/drawer.component.d.ts +12 -5
- package/drawer/drawer.service.d.ts +17 -1
- package/drawer/item.component.d.ts +6 -10
- package/drawer/list.component.d.ts +6 -6
- package/drawer/models/drawer-item-expand.interface.d.ts +8 -0
- package/drawer/models/drawer-item.interface.d.ts +8 -0
- package/drawer/models/drawer-view-item.interface.d.ts +29 -0
- package/esm2015/drawer/drawer.component.js +30 -14
- package/esm2015/drawer/drawer.service.js +49 -7
- package/esm2015/drawer/item.component.js +29 -11
- package/esm2015/drawer/list.component.js +29 -31
- package/esm2015/drawer/models/drawer-item-expand.interface.js +5 -0
- package/esm2015/drawer/models/drawer-view-item.interface.js +5 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/tilelayout/dragging-service.js +3 -2
- package/esm2015/tilelayout/tilelayout.component.js +1 -1
- package/fesm2015/kendo-angular-layout.js +139 -65
- package/main.d.ts +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,5 @@
|
|
|
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
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
+
export {};
|
|
@@ -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: 1654675998,
|
|
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
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Injectable } from '@angular/core';
|
|
6
6
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
7
7
|
import { calculateCellFromPosition, getDropTarget, isRowItemPresent, normalizeValue, propsChanged, setElementStyles } from './util';
|
|
8
|
-
import { closestInScope } from '../common/dom-queries';
|
|
8
|
+
import { closestInScope, isFocusable } from '../common/dom-queries';
|
|
9
9
|
import { DRAGGED_ZINDEX, HINT_BORDERS_HEIGHT, OVERLAP_THRESHOLD, REVERSE_OVERLAP_THRESHOLD } from './constants';
|
|
10
10
|
import { TileLayoutReorderEvent } from './reorder-event';
|
|
11
11
|
import { TileLayoutResizeEvent } from './resize-event';
|
|
@@ -57,7 +57,8 @@ export class TileLayoutDraggingService {
|
|
|
57
57
|
.find(item => item.order === +closestTile.style.order);
|
|
58
58
|
});
|
|
59
59
|
const reordering = !resizing && this.reorderable.getValue() && this.draggedItem.reorderable && closestHeader;
|
|
60
|
-
|
|
60
|
+
const focusableTarget = isFocusable(originalEvent.target);
|
|
61
|
+
if (!(reordering || resizing) || focusableTarget) {
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
64
|
else {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Component, HostBinding, Input, Output, EventEmitter, ContentChildren, ViewChild } from '@angular/core';
|
|
6
6
|
import { TileLayoutDraggingService } from './dragging-service';
|
|
7
7
|
import { Subscription } from 'rxjs';
|
|
8
|
-
import Draggable from '@
|
|
8
|
+
import Draggable from '@progress/kendo-draggable';
|
|
9
9
|
import { TileLayoutItemComponent } from './tilelayout-item.component';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { hasObservers } from '@progress/kendo-angular-common';
|
|
@@ -17,7 +17,7 @@ import { CommonModule } from '@angular/common';
|
|
|
17
17
|
import { delay, takeUntil, map, tap, filter, switchMap, take } from 'rxjs/operators';
|
|
18
18
|
import * as i4 from '@progress/kendo-angular-progressbar';
|
|
19
19
|
import { ProgressBarModule } from '@progress/kendo-angular-progressbar';
|
|
20
|
-
import Draggable from '@
|
|
20
|
+
import Draggable from '@progress/kendo-draggable';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
@@ -26,7 +26,7 @@ const packageMetadata = {
|
|
|
26
26
|
name: '@progress/kendo-angular-layout',
|
|
27
27
|
productName: 'Kendo UI for Angular',
|
|
28
28
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
29
|
-
publishDate:
|
|
29
|
+
publishDate: 1654675998,
|
|
30
30
|
version: '',
|
|
31
31
|
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'
|
|
32
32
|
};
|
|
@@ -3949,12 +3949,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3949
3949
|
type: Optional
|
|
3950
3950
|
}] }]; } });
|
|
3951
3951
|
|
|
3952
|
+
/**
|
|
3953
|
+
* @hidden
|
|
3954
|
+
*/
|
|
3955
|
+
const defaultIsItemExpanded = (_item) => false;
|
|
3952
3956
|
/**
|
|
3953
3957
|
* @hidden
|
|
3954
3958
|
*/
|
|
3955
3959
|
class DrawerService {
|
|
3956
3960
|
constructor() {
|
|
3957
3961
|
this.selectedIndices = [];
|
|
3962
|
+
this.originalItems = [];
|
|
3963
|
+
this.idxCounter = 0;
|
|
3964
|
+
this.isItemExpanded = defaultIsItemExpanded;
|
|
3965
|
+
}
|
|
3966
|
+
init() {
|
|
3967
|
+
this.resetViewData();
|
|
3968
|
+
this.originalItems = this.owner.items || [];
|
|
3969
|
+
let rootItems = this.originalItems.filter(item => !isPresent(item.parentId));
|
|
3970
|
+
this.populateViewData(rootItems);
|
|
3971
|
+
}
|
|
3972
|
+
get view() {
|
|
3973
|
+
return Array.from(this.viewData);
|
|
3974
|
+
}
|
|
3975
|
+
populateViewData(items, level = 0) {
|
|
3976
|
+
items.forEach((item) => {
|
|
3977
|
+
this.setSelection(item);
|
|
3978
|
+
const children = this.loadChildren(item);
|
|
3979
|
+
const isExpanded = this.isItemExpanded(item);
|
|
3980
|
+
this.viewData.add({
|
|
3981
|
+
item: item,
|
|
3982
|
+
index: this.idxCounter++,
|
|
3983
|
+
level: level,
|
|
3984
|
+
hasChildren: children.length > 0,
|
|
3985
|
+
isExpanded: isExpanded
|
|
3986
|
+
});
|
|
3987
|
+
if (children.length > 0 && isExpanded) {
|
|
3988
|
+
this.populateViewData(children, level + 1);
|
|
3989
|
+
}
|
|
3990
|
+
});
|
|
3991
|
+
}
|
|
3992
|
+
resetViewData() {
|
|
3993
|
+
this.idxCounter = 0;
|
|
3994
|
+
this.viewData = new Set();
|
|
3995
|
+
}
|
|
3996
|
+
loadChildren(item) {
|
|
3997
|
+
return this.originalItems.filter(i => {
|
|
3998
|
+
return isPresent(i.parentId) && (i.parentId === item.id);
|
|
3999
|
+
});
|
|
3958
4000
|
}
|
|
3959
4001
|
onSelect(selectedIdx) {
|
|
3960
4002
|
this.selectedIndices = [selectedIdx];
|
|
@@ -3963,15 +4005,14 @@ class DrawerService {
|
|
|
3963
4005
|
drawer.toggle(false);
|
|
3964
4006
|
}
|
|
3965
4007
|
}
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
for (let i = 0; i < items.length; i++) {
|
|
3970
|
-
if (items[i].selected) {
|
|
3971
|
-
this.selectedIndices.push(i);
|
|
3972
|
-
}
|
|
4008
|
+
setSelection(item) {
|
|
4009
|
+
if (this.selectedIndices.length === 0 && item.selected) {
|
|
4010
|
+
this.selectedIndices.push(this.idxCounter);
|
|
3973
4011
|
}
|
|
3974
4012
|
}
|
|
4013
|
+
resetSelection() {
|
|
4014
|
+
this.selectedIndices = [];
|
|
4015
|
+
}
|
|
3975
4016
|
}
|
|
3976
4017
|
DrawerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3977
4018
|
DrawerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerService });
|
|
@@ -4170,18 +4211,13 @@ class DrawerItemComponent {
|
|
|
4170
4211
|
get label() {
|
|
4171
4212
|
return this.item.text ? this.item.text : null;
|
|
4172
4213
|
}
|
|
4173
|
-
/**
|
|
4174
|
-
* @hidden
|
|
4175
|
-
*/
|
|
4176
4214
|
ngAfterViewInit() {
|
|
4177
|
-
const
|
|
4215
|
+
const elem = this.element.nativeElement;
|
|
4216
|
+
const link = nestedLink(elem, DRAWER_LINK_SELECTOR);
|
|
4178
4217
|
if (link) {
|
|
4179
4218
|
this.renderer.removeAttribute(link, 'tabindex');
|
|
4180
4219
|
}
|
|
4181
4220
|
}
|
|
4182
|
-
/**
|
|
4183
|
-
* @hidden
|
|
4184
|
-
*/
|
|
4185
4221
|
get iconClasses() {
|
|
4186
4222
|
const classes = [];
|
|
4187
4223
|
if (this.item.icon) {
|
|
@@ -4192,18 +4228,31 @@ class DrawerItemComponent {
|
|
|
4192
4228
|
}
|
|
4193
4229
|
return classes;
|
|
4194
4230
|
}
|
|
4231
|
+
get item() {
|
|
4232
|
+
return this.viewItem.item;
|
|
4233
|
+
}
|
|
4195
4234
|
}
|
|
4196
4235
|
DrawerItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerItemComponent, deps: [{ token: DrawerService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
4197
|
-
DrawerItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DrawerItemComponent, selector: "[kendoDrawerItem]", inputs: {
|
|
4236
|
+
DrawerItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DrawerItemComponent, selector: "[kendoDrawerItem]", inputs: { viewItem: "viewItem", index: "index", itemTemplate: "itemTemplate", mini: "mini", expanded: "expanded", disabled: "disabled", cssClass: "cssClass", cssStyle: "cssStyle" }, host: { properties: { "attr.aria-disabled": "this.disabledClass", "class.k-state-disabled": "this.disabledClass", "attr.aria-selected": "this.selectedClass", "class.k-state-selected": "this.selectedClass", "attr.aria-label": "this.label" } }, ngImport: i0, template: `
|
|
4198
4237
|
<ng-template *ngIf="itemTemplate; else defaultTemplate"
|
|
4199
4238
|
[ngTemplateOutlet]="itemTemplate"
|
|
4200
|
-
[ngTemplateOutletContext]="{
|
|
4239
|
+
[ngTemplateOutletContext]="{
|
|
4240
|
+
$implicit: item,
|
|
4241
|
+
isItemExpanded: viewItem.isExpanded,
|
|
4242
|
+
hasChildren: viewItem.hasChildren,
|
|
4243
|
+
level: viewItem.level
|
|
4244
|
+
}">
|
|
4201
4245
|
</ng-template>
|
|
4202
4246
|
|
|
4203
4247
|
<ng-template #defaultTemplate>
|
|
4204
4248
|
<ng-container *ngIf="expanded">
|
|
4205
4249
|
<span [ngClass]="iconClasses"></span>
|
|
4206
4250
|
<span class="k-item-text">{{ item.text }}</span>
|
|
4251
|
+
<span *ngIf="viewItem.hasChildren"
|
|
4252
|
+
class="k-icon k-drawer-toggle"
|
|
4253
|
+
[class.k-i-arrow-chevron-up]="viewItem.isExpanded"
|
|
4254
|
+
[class.k-i-arrow-chevron-down]="!viewItem.isExpanded"
|
|
4255
|
+
></span>
|
|
4207
4256
|
</ng-container>
|
|
4208
4257
|
<ng-container *ngIf="mini && !expanded">
|
|
4209
4258
|
<span [ngClass]="iconClasses"></span>
|
|
@@ -4218,13 +4267,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4218
4267
|
template: `
|
|
4219
4268
|
<ng-template *ngIf="itemTemplate; else defaultTemplate"
|
|
4220
4269
|
[ngTemplateOutlet]="itemTemplate"
|
|
4221
|
-
[ngTemplateOutletContext]="{
|
|
4270
|
+
[ngTemplateOutletContext]="{
|
|
4271
|
+
$implicit: item,
|
|
4272
|
+
isItemExpanded: viewItem.isExpanded,
|
|
4273
|
+
hasChildren: viewItem.hasChildren,
|
|
4274
|
+
level: viewItem.level
|
|
4275
|
+
}">
|
|
4222
4276
|
</ng-template>
|
|
4223
4277
|
|
|
4224
4278
|
<ng-template #defaultTemplate>
|
|
4225
4279
|
<ng-container *ngIf="expanded">
|
|
4226
4280
|
<span [ngClass]="iconClasses"></span>
|
|
4227
4281
|
<span class="k-item-text">{{ item.text }}</span>
|
|
4282
|
+
<span *ngIf="viewItem.hasChildren"
|
|
4283
|
+
class="k-icon k-drawer-toggle"
|
|
4284
|
+
[class.k-i-arrow-chevron-up]="viewItem.isExpanded"
|
|
4285
|
+
[class.k-i-arrow-chevron-down]="!viewItem.isExpanded"
|
|
4286
|
+
></span>
|
|
4228
4287
|
</ng-container>
|
|
4229
4288
|
<ng-container *ngIf="mini && !expanded">
|
|
4230
4289
|
<span [ngClass]="iconClasses"></span>
|
|
@@ -4232,7 +4291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4232
4291
|
</ng-template>
|
|
4233
4292
|
`
|
|
4234
4293
|
}]
|
|
4235
|
-
}], ctorParameters: function () { return [{ type: DrawerService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: {
|
|
4294
|
+
}], ctorParameters: function () { return [{ type: DrawerService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { viewItem: [{
|
|
4236
4295
|
type: Input
|
|
4237
4296
|
}], index: [{
|
|
4238
4297
|
type: Input
|
|
@@ -4269,27 +4328,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4269
4328
|
* @hidden
|
|
4270
4329
|
*/
|
|
4271
4330
|
class DrawerListComponent {
|
|
4272
|
-
constructor(drawerService, renderer, ngZone,
|
|
4331
|
+
constructor(drawerService, renderer, ngZone, element) {
|
|
4273
4332
|
this.drawerService = drawerService;
|
|
4274
4333
|
this.renderer = renderer;
|
|
4275
4334
|
this.ngZone = ngZone;
|
|
4276
|
-
this.changeDetector = changeDetector;
|
|
4277
4335
|
this.element = element;
|
|
4336
|
+
this.view = [];
|
|
4278
4337
|
this.select = new EventEmitter();
|
|
4279
4338
|
this.subscriptions = new Subscription();
|
|
4280
4339
|
}
|
|
4281
4340
|
ngOnInit() {
|
|
4282
|
-
this.initialSelection();
|
|
4283
4341
|
this.initDomEvents();
|
|
4284
4342
|
}
|
|
4285
4343
|
ngOnDestroy() {
|
|
4286
4344
|
this.subscriptions.unsubscribe();
|
|
4287
4345
|
}
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
this.drawerService.initSelection();
|
|
4292
|
-
}
|
|
4346
|
+
identifyItem(_index, viewItem) {
|
|
4347
|
+
var _a;
|
|
4348
|
+
return (_a = viewItem.item.id) !== null && _a !== void 0 ? _a : viewItem.index;
|
|
4293
4349
|
}
|
|
4294
4350
|
initDomEvents() {
|
|
4295
4351
|
if (!this.element) {
|
|
@@ -4302,26 +4358,27 @@ class DrawerListComponent {
|
|
|
4302
4358
|
});
|
|
4303
4359
|
}
|
|
4304
4360
|
clickHandler(e) {
|
|
4305
|
-
const
|
|
4306
|
-
const
|
|
4307
|
-
if (!
|
|
4361
|
+
const viewItemIdx = this.getDrawerItemIndex(e.target);
|
|
4362
|
+
const viewItem = this.view[viewItemIdx];
|
|
4363
|
+
if (!viewItem) {
|
|
4308
4364
|
return;
|
|
4309
4365
|
}
|
|
4310
|
-
if (item.disabled) {
|
|
4366
|
+
if (viewItem.item.disabled) {
|
|
4311
4367
|
e.preventDefault();
|
|
4312
4368
|
return;
|
|
4313
4369
|
}
|
|
4314
4370
|
const args = {
|
|
4315
|
-
index:
|
|
4316
|
-
item: item,
|
|
4371
|
+
index: viewItem.index,
|
|
4372
|
+
item: viewItem.item,
|
|
4317
4373
|
originalEvent: e
|
|
4318
4374
|
};
|
|
4319
4375
|
this.ngZone.run(() => {
|
|
4320
4376
|
const event = new DrawerListSelectEvent(args);
|
|
4321
4377
|
this.select.emit(event);
|
|
4322
4378
|
if (!event.isDefaultPrevented()) {
|
|
4323
|
-
this.drawerService.onSelect(
|
|
4324
|
-
this.
|
|
4379
|
+
this.drawerService.onSelect(viewItemIdx);
|
|
4380
|
+
this.drawerService.init();
|
|
4381
|
+
this.view = this.drawerService.view;
|
|
4325
4382
|
}
|
|
4326
4383
|
});
|
|
4327
4384
|
}
|
|
@@ -4344,45 +4401,45 @@ class DrawerListComponent {
|
|
|
4344
4401
|
}
|
|
4345
4402
|
}
|
|
4346
4403
|
}
|
|
4347
|
-
DrawerListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerListComponent, deps: [{ token: DrawerService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.
|
|
4348
|
-
DrawerListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DrawerListComponent, selector: "[kendoDrawerList]", inputs: {
|
|
4404
|
+
DrawerListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerListComponent, deps: [{ token: DrawerService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4405
|
+
DrawerListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DrawerListComponent, selector: "[kendoDrawerList]", inputs: { itemTemplate: "itemTemplate", mini: "mini", expanded: "expanded", view: "view" }, outputs: { select: "select" }, ngImport: i0, template: "\n <ng-container *ngFor=\"let v of view; trackBy:identifyItem; let idx = index\">\n <li *ngIf=\"!v.item.separator\" kendoDrawerItem\n class=\"k-drawer-item {{expanded ? ' k-level-' + v.level : ''}}\"\n [viewItem]=\"v\"\n [index]=\"idx\"\n [mini]=\"mini\"\n [expanded]=\"expanded\"\n [itemTemplate]=\"itemTemplate\"\n [attr.data-kendo-drawer-index]=\"v.index\"\n [ngClass]=\"v.item.cssClass\"\n [ngStyle]=\"v.item.cssStyle\"\n tabindex=\"0\">\n </li>\n\n <li *ngIf=\"v.item.separator\"\n class=\"k-drawer-item k-drawer-separator\"\n [ngClass]=\"v.item.cssClass\"\n [ngStyle]=\"v.item.cssStyle\">\n \n </li>\n </ng-container>\n ", isInline: true, components: [{ type: DrawerItemComponent, selector: "[kendoDrawerItem]", inputs: ["viewItem", "index", "itemTemplate", "mini", "expanded", "disabled", "cssClass", "cssStyle"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
4349
4406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerListComponent, decorators: [{
|
|
4350
4407
|
type: Component,
|
|
4351
4408
|
args: [{
|
|
4352
4409
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
4353
4410
|
selector: '[kendoDrawerList]',
|
|
4354
4411
|
template: `
|
|
4355
|
-
<ng-container *ngFor="let
|
|
4356
|
-
<li *ngIf="!item.separator" kendoDrawerItem
|
|
4357
|
-
class="k-drawer-item"
|
|
4358
|
-
[
|
|
4412
|
+
<ng-container *ngFor="let v of view; trackBy:identifyItem; let idx = index">
|
|
4413
|
+
<li *ngIf="!v.item.separator" kendoDrawerItem
|
|
4414
|
+
class="k-drawer-item {{expanded ? ' k-level-' + v.level : ''}}"
|
|
4415
|
+
[viewItem]="v"
|
|
4359
4416
|
[index]="idx"
|
|
4360
4417
|
[mini]="mini"
|
|
4361
4418
|
[expanded]="expanded"
|
|
4362
4419
|
[itemTemplate]="itemTemplate"
|
|
4363
|
-
[attr.${DRAWER_ITEM_INDEX}]="
|
|
4364
|
-
[ngClass]="item.cssClass"
|
|
4365
|
-
[ngStyle]="item.cssStyle"
|
|
4420
|
+
[attr.${DRAWER_ITEM_INDEX}]="v.index"
|
|
4421
|
+
[ngClass]="v.item.cssClass"
|
|
4422
|
+
[ngStyle]="v.item.cssStyle"
|
|
4366
4423
|
tabindex="0">
|
|
4367
4424
|
</li>
|
|
4368
4425
|
|
|
4369
|
-
<li *ngIf="item.separator"
|
|
4426
|
+
<li *ngIf="v.item.separator"
|
|
4370
4427
|
class="k-drawer-item k-drawer-separator"
|
|
4371
|
-
[ngClass]="item.cssClass"
|
|
4372
|
-
[ngStyle]="item.cssStyle">
|
|
4428
|
+
[ngClass]="v.item.cssClass"
|
|
4429
|
+
[ngStyle]="v.item.cssStyle">
|
|
4373
4430
|
|
|
4374
4431
|
</li>
|
|
4375
4432
|
</ng-container>
|
|
4376
4433
|
`
|
|
4377
4434
|
}]
|
|
4378
|
-
}], ctorParameters: function () { return [{ type: DrawerService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.
|
|
4379
|
-
type: Input
|
|
4380
|
-
}], itemTemplate: [{
|
|
4435
|
+
}], ctorParameters: function () { return [{ type: DrawerService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { itemTemplate: [{
|
|
4381
4436
|
type: Input
|
|
4382
4437
|
}], mini: [{
|
|
4383
4438
|
type: Input
|
|
4384
4439
|
}], expanded: [{
|
|
4385
4440
|
type: Input
|
|
4441
|
+
}], view: [{
|
|
4442
|
+
type: Input
|
|
4386
4443
|
}], select: [{
|
|
4387
4444
|
type: Output
|
|
4388
4445
|
}] } });
|
|
@@ -4467,6 +4524,10 @@ class DrawerComponent {
|
|
|
4467
4524
|
* or the overlay is clicked. Defaults to `true`.
|
|
4468
4525
|
*/
|
|
4469
4526
|
this.autoCollapse = true;
|
|
4527
|
+
/**
|
|
4528
|
+
* The collection of items that will be rendered in the Drawer.
|
|
4529
|
+
*/
|
|
4530
|
+
this.items = [];
|
|
4470
4531
|
/**
|
|
4471
4532
|
* Specifies the animation settings of the Drawer.
|
|
4472
4533
|
* ([see example]({% slug interaction_drawer %}#toc-toggling-between-states)).
|
|
@@ -4499,7 +4560,6 @@ class DrawerComponent {
|
|
|
4499
4560
|
this.expandedChange = new EventEmitter();
|
|
4500
4561
|
this.animationEnd = new EventEmitter();
|
|
4501
4562
|
this.rtl = false;
|
|
4502
|
-
this._items = [];
|
|
4503
4563
|
validatePackage(packageMetadata);
|
|
4504
4564
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
4505
4565
|
this.rtl = rtl;
|
|
@@ -4532,16 +4592,23 @@ class DrawerComponent {
|
|
|
4532
4592
|
return this.drawerWidth;
|
|
4533
4593
|
}
|
|
4534
4594
|
/**
|
|
4535
|
-
*
|
|
4595
|
+
* Defines a callback function which determines if an item should be expanded.
|
|
4536
4596
|
*/
|
|
4537
|
-
set
|
|
4538
|
-
if (isPresent(
|
|
4539
|
-
|
|
4540
|
-
this.drawerService.initSelection();
|
|
4597
|
+
set isItemExpanded(fn) {
|
|
4598
|
+
if (isDevMode && isPresent(fn) && typeof fn !== 'function') {
|
|
4599
|
+
throw new Error(`isItemExpanded must be a function, but received ${JSON.stringify(fn)}.`);
|
|
4541
4600
|
}
|
|
4601
|
+
this.drawerService.isItemExpanded = fn;
|
|
4542
4602
|
}
|
|
4543
|
-
get
|
|
4544
|
-
return this.
|
|
4603
|
+
get isItemExpanded() {
|
|
4604
|
+
return this.drawerService.isItemExpanded;
|
|
4605
|
+
}
|
|
4606
|
+
ngOnChanges(changes) {
|
|
4607
|
+
if (changes && changes['items']) {
|
|
4608
|
+
this.drawerService.resetSelection();
|
|
4609
|
+
this.drawerService.init();
|
|
4610
|
+
this.viewItems = this.drawerService.view;
|
|
4611
|
+
}
|
|
4545
4612
|
}
|
|
4546
4613
|
ngOnDestroy() {
|
|
4547
4614
|
if (this.dynamicRTLSubscription) {
|
|
@@ -4633,14 +4700,14 @@ class DrawerComponent {
|
|
|
4633
4700
|
}
|
|
4634
4701
|
}
|
|
4635
4702
|
DrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.AnimationBuilder }, { token: i1.LocalizationService }, { token: DrawerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4636
|
-
DrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DrawerComponent, selector: "kendo-drawer", inputs: { mode: "mode", position: "position", mini: "mini", expanded: "expanded", width: "width", miniWidth: "miniWidth", autoCollapse: "autoCollapse", items: "items", animation: "animation" }, outputs: { expand: "expand", collapse: "collapse", select: "select", expandedChange: "expandedChange" }, host: { properties: { "class.k-widget": "this.hostClasses", "class.k-drawer": "this.hostClasses", "class.k-drawer-start": "this.startPositionClass", "class.k-drawer-end": "this.endPositionClass", "style.transform": "this.overlayTransofrmStyles", "style.flexBasis.px": "this.flexStyles", "attr.dir": "this.direction" } }, providers: [
|
|
4703
|
+
DrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DrawerComponent, selector: "kendo-drawer", inputs: { mode: "mode", position: "position", mini: "mini", expanded: "expanded", width: "width", miniWidth: "miniWidth", autoCollapse: "autoCollapse", items: "items", isItemExpanded: "isItemExpanded", animation: "animation" }, outputs: { expand: "expand", collapse: "collapse", select: "select", expandedChange: "expandedChange" }, host: { properties: { "class.k-widget": "this.hostClasses", "class.k-drawer": "this.hostClasses", "class.k-drawer-start": "this.startPositionClass", "class.k-drawer-end": "this.endPositionClass", "style.transform": "this.overlayTransofrmStyles", "style.flexBasis.px": "this.flexStyles", "attr.dir": "this.direction" } }, providers: [
|
|
4637
4704
|
LocalizationService,
|
|
4638
4705
|
DrawerService,
|
|
4639
4706
|
{
|
|
4640
4707
|
provide: L10N_PREFIX,
|
|
4641
4708
|
useValue: 'kendo.drawer'
|
|
4642
4709
|
}
|
|
4643
|
-
], queries: [{ propertyName: "drawerTemplate", first: true, predicate: DrawerTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: DrawerFooterTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: DrawerHeaderTemplateDirective, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: DrawerItemTemplateDirective, descendants: true }], exportAs: ["kendoDrawer"], ngImport: i0, template: `
|
|
4710
|
+
], queries: [{ propertyName: "drawerTemplate", first: true, predicate: DrawerTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: DrawerFooterTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: DrawerHeaderTemplateDirective, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: DrawerItemTemplateDirective, descendants: true }], exportAs: ["kendoDrawer"], usesOnChanges: true, ngImport: i0, template: `
|
|
4644
4711
|
<div class="k-drawer-wrapper" *ngIf="expanded || mini" [style.width.px]="drawerWidth">
|
|
4645
4712
|
<ng-container *ngIf="!drawerTemplate">
|
|
4646
4713
|
<ng-template *ngIf="headerTemplate"
|
|
@@ -4649,7 +4716,9 @@ DrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4649
4716
|
|
|
4650
4717
|
<ul kendoDrawerList
|
|
4651
4718
|
(select)="onSelect($event)"
|
|
4652
|
-
[
|
|
4719
|
+
[mini]="mini"
|
|
4720
|
+
[expanded]="expanded"
|
|
4721
|
+
[view]="viewItems"
|
|
4653
4722
|
[itemTemplate]="itemTemplate?.templateRef"
|
|
4654
4723
|
class="k-drawer-items">
|
|
4655
4724
|
</ul>
|
|
@@ -4663,7 +4732,7 @@ DrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4663
4732
|
[ngTemplateOutlet]="drawerTemplate?.templateRef">
|
|
4664
4733
|
</ng-template>
|
|
4665
4734
|
</div>
|
|
4666
|
-
`, isInline: true, components: [{ type: DrawerListComponent, selector: "[kendoDrawerList]", inputs: ["
|
|
4735
|
+
`, isInline: true, components: [{ type: DrawerListComponent, selector: "[kendoDrawerList]", inputs: ["itemTemplate", "mini", "expanded", "view"], outputs: ["select"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
4667
4736
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DrawerComponent, decorators: [{
|
|
4668
4737
|
type: Component,
|
|
4669
4738
|
args: [{
|
|
@@ -4686,7 +4755,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4686
4755
|
|
|
4687
4756
|
<ul kendoDrawerList
|
|
4688
4757
|
(select)="onSelect($event)"
|
|
4689
|
-
[
|
|
4758
|
+
[mini]="mini"
|
|
4759
|
+
[expanded]="expanded"
|
|
4760
|
+
[view]="viewItems"
|
|
4690
4761
|
[itemTemplate]="itemTemplate?.templateRef"
|
|
4691
4762
|
class="k-drawer-items">
|
|
4692
4763
|
</ul>
|
|
@@ -4736,6 +4807,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4736
4807
|
type: Input
|
|
4737
4808
|
}], items: [{
|
|
4738
4809
|
type: Input
|
|
4810
|
+
}], isItemExpanded: [{
|
|
4811
|
+
type: Input
|
|
4739
4812
|
}], direction: [{
|
|
4740
4813
|
type: HostBinding,
|
|
4741
4814
|
args: ['attr.dir']
|
|
@@ -7410,7 +7483,8 @@ class TileLayoutDraggingService {
|
|
|
7410
7483
|
.find(item => item.order === +closestTile.style.order);
|
|
7411
7484
|
});
|
|
7412
7485
|
const reordering = !resizing && this.reorderable.getValue() && this.draggedItem.reorderable && closestHeader;
|
|
7413
|
-
|
|
7486
|
+
const focusableTarget = isFocusable(originalEvent.target);
|
|
7487
|
+
if (!(reordering || resizing) || focusableTarget) {
|
|
7414
7488
|
return;
|
|
7415
7489
|
}
|
|
7416
7490
|
else {
|
package/main.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export { DrawerItem } from './drawer/models/drawer-item.interface';
|
|
|
31
31
|
export { DrawerSelectEvent } from './drawer/events/select-event';
|
|
32
32
|
export { DrawerPosition } from './drawer/models/position';
|
|
33
33
|
export { DrawerMode } from './drawer/models/mode';
|
|
34
|
+
export { DrawerItemExpandedFn } from './drawer/models/drawer-item-expand.interface';
|
|
34
35
|
export * from './drawer/template-directives';
|
|
35
36
|
export { StepperComponent } from './stepper/stepper.component';
|
|
36
37
|
export { StepperActivateEvent } from './stepper/events/activate-event';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-layout",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0-dev.202206080813",
|
|
4
4
|
"description": "Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@progress/kendo-schematics": "^3.0.0",
|
|
42
|
-
"@
|
|
42
|
+
"@progress/kendo-draggable": "^3.0.0",
|
|
43
43
|
"tslib": "^2.3.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
"fallbackTags": {
|
|
85
85
|
"dev": "latest"
|
|
86
86
|
},
|
|
87
|
-
"analyzeCommits": "@
|
|
87
|
+
"analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
|
|
88
88
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|
|
89
|
-
"getLastRelease": "@
|
|
90
|
-
"verifyConditions": "@
|
|
91
|
-
"verifyRelease": "@
|
|
89
|
+
"getLastRelease": "@progress/semantic-prerelease/getLastRelease",
|
|
90
|
+
"verifyConditions": "@progress/semantic-prerelease/verifyConditions",
|
|
91
|
+
"verifyRelease": "@progress/semantic-prerelease/verifyRelease"
|
|
92
92
|
},
|
|
93
93
|
"main": "bundles/kendo-angular-layout.umd.js",
|
|
94
94
|
"module": "fesm2015/kendo-angular-layout.js",
|