@progress/kendo-angular-layout 21.4.1-develop.1 → 22.0.0-develop.1
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/avatar/l10n/messages.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-layout.mjs +290 -290
- package/package.json +12 -20
- package/stepper/localization/messages.d.ts +1 -1
- package/tabstrip/localization/messages.d.ts +1 -1
- package/timeline/localization/messages.d.ts +1 -1
- package/esm2022/avatar/avatar.component.mjs +0 -406
- package/esm2022/avatar/l10n/custom-messages.component.mjs +0 -53
- package/esm2022/avatar/l10n/localized-messages.directive.mjs +0 -40
- package/esm2022/avatar/l10n/messages.mjs +0 -27
- package/esm2022/avatar/models/fill.mjs +0 -5
- package/esm2022/avatar/models/models.mjs +0 -9
- package/esm2022/avatar/models/rounded.mjs +0 -5
- package/esm2022/avatar/models/shape.mjs +0 -5
- package/esm2022/avatar/models/size.mjs +0 -5
- package/esm2022/avatar/models/theme-color.mjs +0 -5
- package/esm2022/avatar.module.mjs +0 -38
- package/esm2022/card/card-actions.component.mjs +0 -177
- package/esm2022/card/card-body.component.mjs +0 -37
- package/esm2022/card/card-footer.component.mjs +0 -37
- package/esm2022/card/card-header.component.mjs +0 -38
- package/esm2022/card/card.component.mjs +0 -118
- package/esm2022/card/directives/card-media.directive.mjs +0 -33
- package/esm2022/card/directives/card-separator.directive.mjs +0 -61
- package/esm2022/card/directives/card-subtitle.directive.mjs +0 -31
- package/esm2022/card/directives/card-title.directive.mjs +0 -31
- package/esm2022/card/models/actions-layout.mjs +0 -5
- package/esm2022/card/models/card-action.mjs +0 -21
- package/esm2022/card.module.mjs +0 -45
- package/esm2022/common/direction.mjs +0 -5
- package/esm2022/common/dom-queries.mjs +0 -47
- package/esm2022/common/orientation.mjs +0 -5
- package/esm2022/common/preventable-event.mjs +0 -31
- package/esm2022/common/styling-classes.mjs +0 -5
- package/esm2022/common/util.mjs +0 -85
- package/esm2022/directives.mjs +0 -174
- package/esm2022/drawer/animations.mjs +0 -146
- package/esm2022/drawer/drawer-container.component.mjs +0 -135
- package/esm2022/drawer/drawer-content.component.mjs +0 -39
- package/esm2022/drawer/drawer.component.mjs +0 -471
- package/esm2022/drawer/drawer.service.mjs +0 -105
- package/esm2022/drawer/events/drawer-list-select.event.mjs +0 -29
- package/esm2022/drawer/events/select-event.mjs +0 -33
- package/esm2022/drawer/item.component.mjs +0 -210
- package/esm2022/drawer/list.component.mjs +0 -165
- package/esm2022/drawer/models/constants.mjs +0 -8
- package/esm2022/drawer/models/drawer-animation.interface.mjs +0 -5
- package/esm2022/drawer/models/drawer-item-expand.interface.mjs +0 -5
- package/esm2022/drawer/models/drawer-item.interface.mjs +0 -5
- package/esm2022/drawer/models/drawer-view-item.interface.mjs +0 -5
- package/esm2022/drawer/models/mode.mjs +0 -5
- package/esm2022/drawer/models/position.mjs +0 -5
- package/esm2022/drawer/template-directives/drawer-template.directive.mjs +0 -43
- package/esm2022/drawer/template-directives/footer-template.directive.mjs +0 -36
- package/esm2022/drawer/template-directives/header-template.directive.mjs +0 -36
- package/esm2022/drawer/template-directives/item-template.directive.mjs +0 -44
- package/esm2022/drawer/template-directives.mjs +0 -8
- package/esm2022/drawer/types.mjs +0 -5
- package/esm2022/drawer/util.mjs +0 -16
- package/esm2022/drawer.module.mjs +0 -43
- package/esm2022/expansionpanel/animations.mjs +0 -23
- package/esm2022/expansionpanel/events/action-event.mjs +0 -21
- package/esm2022/expansionpanel/expansionpanel-title.directive.mjs +0 -38
- package/esm2022/expansionpanel/expansionpanel.component.mjs +0 -515
- package/esm2022/expansionpanel.module.mjs +0 -38
- package/esm2022/gridlayout.module.mjs +0 -38
- package/esm2022/index.mjs +0 -89
- package/esm2022/layout.module.mjs +0 -89
- package/esm2022/layouts/grid-layout.component.mjs +0 -179
- package/esm2022/layouts/gridlayout-item.component.mjs +0 -82
- package/esm2022/layouts/models/gridlayout-gap-settings.mjs +0 -5
- package/esm2022/layouts/models/gridlayout-row-col-size.mjs +0 -5
- package/esm2022/layouts/models/layout-align-settings.mjs +0 -5
- package/esm2022/layouts/models/layout-horizontal-align.mjs +0 -5
- package/esm2022/layouts/models/layout-vertical-align.mjs +0 -5
- package/esm2022/layouts/models.mjs +0 -10
- package/esm2022/layouts/stack-layout.component.mjs +0 -161
- package/esm2022/layouts/util.mjs +0 -101
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/panelbar/events/collapse-event.mjs +0 -14
- package/esm2022/panelbar/events/expand-event.mjs +0 -14
- package/esm2022/panelbar/events/item-click-event.mjs +0 -17
- package/esm2022/panelbar/events/select-event.mjs +0 -14
- package/esm2022/panelbar/events/state-change-event.mjs +0 -13
- package/esm2022/panelbar/events.mjs +0 -9
- package/esm2022/panelbar/panelbar-content.directive.mjs +0 -36
- package/esm2022/panelbar/panelbar-expand-mode.mjs +0 -29
- package/esm2022/panelbar/panelbar-item-model.mjs +0 -5
- package/esm2022/panelbar/panelbar-item-template.directive.mjs +0 -37
- package/esm2022/panelbar/panelbar-item-title.directive.mjs +0 -42
- package/esm2022/panelbar/panelbar-item.component.mjs +0 -722
- package/esm2022/panelbar/panelbar.component.mjs +0 -705
- package/esm2022/panelbar/panelbar.service.mjs +0 -53
- package/esm2022/panelbar.module.mjs +0 -41
- package/esm2022/progress-kendo-angular-layout.mjs +0 -8
- package/esm2022/splitter/splitter-bar.component.mjs +0 -338
- package/esm2022/splitter/splitter-pane.component.mjs +0 -324
- package/esm2022/splitter/splitter.component.mjs +0 -301
- package/esm2022/splitter/splitter.service.mjs +0 -205
- package/esm2022/splitter/util.mjs +0 -34
- package/esm2022/splitter.module.mjs +0 -38
- package/esm2022/stacklayout.module.mjs +0 -37
- package/esm2022/stepper/events/activate-event.mjs +0 -33
- package/esm2022/stepper/list.component.mjs +0 -185
- package/esm2022/stepper/localization/custom-messages.component.mjs +0 -52
- package/esm2022/stepper/localization/localized-messages.directive.mjs +0 -41
- package/esm2022/stepper/localization/messages.mjs +0 -27
- package/esm2022/stepper/models/constants.mjs +0 -8
- package/esm2022/stepper/models/orientation.mjs +0 -5
- package/esm2022/stepper/models/step-predicate.mjs +0 -5
- package/esm2022/stepper/models/step-type.mjs +0 -5
- package/esm2022/stepper/models/stepper-step.interface.mjs +0 -5
- package/esm2022/stepper/step.component.mjs +0 -396
- package/esm2022/stepper/stepper.component.mjs +0 -423
- package/esm2022/stepper/stepper.service.mjs +0 -186
- package/esm2022/stepper/template-directives/indicator-template.directive.mjs +0 -37
- package/esm2022/stepper/template-directives/label-template.directive.mjs +0 -37
- package/esm2022/stepper/template-directives/step-template.directive.mjs +0 -39
- package/esm2022/stepper/template-directives.mjs +0 -7
- package/esm2022/stepper/types.mjs +0 -5
- package/esm2022/stepper.module.mjs +0 -41
- package/esm2022/tabstrip/constants.mjs +0 -29
- package/esm2022/tabstrip/directives/tab-content.directive.mjs +0 -39
- package/esm2022/tabstrip/directives/tab-title.directive.mjs +0 -37
- package/esm2022/tabstrip/directives/tab.directive.mjs +0 -24
- package/esm2022/tabstrip/events/select-event.mjs +0 -25
- package/esm2022/tabstrip/events/tabclose-event.mjs +0 -23
- package/esm2022/tabstrip/events/tabscroll-event.mjs +0 -23
- package/esm2022/tabstrip/events.mjs +0 -7
- package/esm2022/tabstrip/localization/custom-messages.component.mjs +0 -53
- package/esm2022/tabstrip/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/tabstrip/localization/messages.mjs +0 -39
- package/esm2022/tabstrip/models/button-state-change.mjs +0 -5
- package/esm2022/tabstrip/models/scroll-button-type.mjs +0 -5
- package/esm2022/tabstrip/models/scroll-buttons-visibility.mjs +0 -5
- package/esm2022/tabstrip/models/scrollable-settings.mjs +0 -23
- package/esm2022/tabstrip/models/size.mjs +0 -5
- package/esm2022/tabstrip/models/tab-alignment.mjs +0 -5
- package/esm2022/tabstrip/models/tab-position.mjs +0 -5
- package/esm2022/tabstrip/models/tabstrip-tab.component.mjs +0 -130
- package/esm2022/tabstrip/rendering/tab.component.mjs +0 -182
- package/esm2022/tabstrip/scrollable-button.component.mjs +0 -182
- package/esm2022/tabstrip/tabstrip-scroll.service.mjs +0 -176
- package/esm2022/tabstrip/tabstrip.component.mjs +0 -954
- package/esm2022/tabstrip/tabstrip.service.mjs +0 -155
- package/esm2022/tabstrip/util.mjs +0 -120
- package/esm2022/tabstrip.module.mjs +0 -41
- package/esm2022/tilelayout/constants.mjs +0 -70
- package/esm2022/tilelayout/dragging-service.mjs +0 -421
- package/esm2022/tilelayout/keyboard-navigation.service.mjs +0 -189
- package/esm2022/tilelayout/models/dragging-config.interface.mjs +0 -5
- package/esm2022/tilelayout/models/flowmode.type.mjs +0 -5
- package/esm2022/tilelayout/models/gap.interface.mjs +0 -5
- package/esm2022/tilelayout/models/navigation.interface.mjs +0 -5
- package/esm2022/tilelayout/reorder-event.mjs +0 -43
- package/esm2022/tilelayout/resize-event.mjs +0 -37
- package/esm2022/tilelayout/tilelayout-item-body.component.mjs +0 -45
- package/esm2022/tilelayout/tilelayout-item-header.component.mjs +0 -43
- package/esm2022/tilelayout/tilelayout-item.component.mjs +0 -322
- package/esm2022/tilelayout/tilelayout-resize-handle.directive.mjs +0 -61
- package/esm2022/tilelayout/tilelayout.component.mjs +0 -388
- package/esm2022/tilelayout/util.mjs +0 -138
- package/esm2022/tilelayout.module.mjs +0 -40
- package/esm2022/timeline/events/navigation-direction.mjs +0 -5
- package/esm2022/timeline/localization/custom-messages.component.mjs +0 -43
- package/esm2022/timeline/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/timeline/localization/messages.mjs +0 -33
- package/esm2022/timeline/models/anchor-target.mjs +0 -5
- package/esm2022/timeline/models/default-model-fields.mjs +0 -16
- package/esm2022/timeline/models/events-order.mjs +0 -5
- package/esm2022/timeline/models/model-fields.mjs +0 -5
- package/esm2022/timeline/models/timeline-event.mjs +0 -5
- package/esm2022/timeline/templates/timeline-card-actions.directive.mjs +0 -40
- package/esm2022/timeline/templates/timeline-card-body.directive.mjs +0 -40
- package/esm2022/timeline/templates/timeline-card-header.directive.mjs +0 -41
- package/esm2022/timeline/timeline-card.component.mjs +0 -451
- package/esm2022/timeline/timeline-horizontal.component.mjs +0 -781
- package/esm2022/timeline/timeline-vertical.component.mjs +0 -203
- package/esm2022/timeline/timeline.component.mjs +0 -491
- package/esm2022/timeline/timeline.service.mjs +0 -32
- package/esm2022/timeline/util.mjs +0 -26
- package/esm2022/timeline.module.mjs +0 -41
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable } from '@angular/core';
|
|
6
|
-
import { isPresent } from '../common/util';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export const defaultIsItemExpanded = (_item) => false;
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export class DrawerService {
|
|
16
|
-
owner;
|
|
17
|
-
selectedIndices = [];
|
|
18
|
-
viewData;
|
|
19
|
-
focusIndex = 0;
|
|
20
|
-
originalItems = [];
|
|
21
|
-
idxCounter = 0;
|
|
22
|
-
init() {
|
|
23
|
-
this.resetViewData();
|
|
24
|
-
this.originalItems = this.owner.items || [];
|
|
25
|
-
const rootItems = this.originalItems.filter(item => !isPresent(item.parentId));
|
|
26
|
-
this.populateViewData(rootItems);
|
|
27
|
-
}
|
|
28
|
-
get view() {
|
|
29
|
-
return Array.from(this.viewData);
|
|
30
|
-
}
|
|
31
|
-
changeFocusedItem(items, keyName, renderer) {
|
|
32
|
-
const currentItem = items.get(this.focusIndex);
|
|
33
|
-
let nextItem;
|
|
34
|
-
if (keyName === 'arrowUp') {
|
|
35
|
-
if (this.focusIndex === 0) {
|
|
36
|
-
nextItem = items.get(items.length - 1);
|
|
37
|
-
this.focusIndex = items.length - 1;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
nextItem = items.get(this.focusIndex - 1);
|
|
41
|
-
this.focusIndex = this.focusIndex - 1;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else if (keyName === 'arrowDown') {
|
|
45
|
-
if (this.focusIndex === items.length - 1) {
|
|
46
|
-
nextItem = items.get(0);
|
|
47
|
-
this.focusIndex = 0;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
nextItem = items.get(this.focusIndex + 1);
|
|
51
|
-
this.focusIndex = this.focusIndex + 1;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
renderer.setAttribute(currentItem.nativeElement, 'tabindex', '-1');
|
|
55
|
-
renderer.setAttribute(nextItem.nativeElement, 'tabindex', '0');
|
|
56
|
-
nextItem.nativeElement.focus();
|
|
57
|
-
}
|
|
58
|
-
populateViewData(items, level = 0) {
|
|
59
|
-
items.forEach((item) => {
|
|
60
|
-
this.setSelection(item);
|
|
61
|
-
const children = this.loadChildren(item);
|
|
62
|
-
const isExpanded = this.isItemExpanded(item);
|
|
63
|
-
this.viewData.add({
|
|
64
|
-
item: item,
|
|
65
|
-
index: this.idxCounter++,
|
|
66
|
-
level: level,
|
|
67
|
-
hasChildren: children.length > 0,
|
|
68
|
-
isExpanded: isExpanded
|
|
69
|
-
});
|
|
70
|
-
if (children.length > 0 && isExpanded) {
|
|
71
|
-
this.populateViewData(children, level + 1);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
resetViewData() {
|
|
76
|
-
this.idxCounter = 0;
|
|
77
|
-
this.viewData = new Set();
|
|
78
|
-
}
|
|
79
|
-
loadChildren(item) {
|
|
80
|
-
return this.originalItems.filter(i => {
|
|
81
|
-
return isPresent(i.parentId) && (i.parentId === item.id);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
isItemExpanded = defaultIsItemExpanded;
|
|
85
|
-
onSelect(selectedIdx) {
|
|
86
|
-
this.selectedIndices = [selectedIdx];
|
|
87
|
-
const drawer = this.owner;
|
|
88
|
-
if (drawer.autoCollapse && !drawer.minimized) {
|
|
89
|
-
drawer.toggle(false);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
setSelection(item) {
|
|
93
|
-
if (this.selectedIndices.length === 0 && item.selected) {
|
|
94
|
-
this.selectedIndices.push(this.idxCounter);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
resetSelection() {
|
|
98
|
-
this.selectedIndices = [];
|
|
99
|
-
}
|
|
100
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
101
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerService });
|
|
102
|
-
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerService, decorators: [{
|
|
104
|
-
type: Injectable
|
|
105
|
-
}] });
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export class DrawerListSelectEvent extends PreventableEvent {
|
|
10
|
-
/**
|
|
11
|
-
* The index of the selected item in the `items` collection.
|
|
12
|
-
*/
|
|
13
|
-
index;
|
|
14
|
-
/**
|
|
15
|
-
* The selected Drawer item.
|
|
16
|
-
*/
|
|
17
|
-
item;
|
|
18
|
-
/**
|
|
19
|
-
* The DOM event that triggered the selection.
|
|
20
|
-
*/
|
|
21
|
-
originalEvent;
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
constructor(args) {
|
|
26
|
-
super();
|
|
27
|
-
Object.assign(this, args);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
-
/**
|
|
7
|
-
* Defines the arguments for the `select` event of the Drawer.
|
|
8
|
-
*/
|
|
9
|
-
export class DrawerSelectEvent extends PreventableEvent {
|
|
10
|
-
/**
|
|
11
|
-
* Defines the index of the selected item in the `items` collection.
|
|
12
|
-
*/
|
|
13
|
-
index;
|
|
14
|
-
/**
|
|
15
|
-
* Defines the selected Drawer item.
|
|
16
|
-
*/
|
|
17
|
-
item;
|
|
18
|
-
/**
|
|
19
|
-
* Defines the DOM event that triggered the selection.
|
|
20
|
-
*/
|
|
21
|
-
originalEvent;
|
|
22
|
-
/**
|
|
23
|
-
* Defines the Drawer that triggered the event.
|
|
24
|
-
*/
|
|
25
|
-
sender;
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
constructor(args) {
|
|
30
|
-
super();
|
|
31
|
-
Object.assign(this, args);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
-
import { Component, Input, TemplateRef, HostBinding, ElementRef, Renderer2 } from "@angular/core";
|
|
7
|
-
import { chevronDownIcon, chevronUpIcon } from "@progress/kendo-svg-icons";
|
|
8
|
-
import { DrawerService } from './drawer.service';
|
|
9
|
-
import { nestedLink, DRAWER_LINK_SELECTOR } from './util';
|
|
10
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
11
|
-
import { NgTemplateOutlet } from "@angular/common";
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "./drawer.service";
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export class DrawerItemComponent {
|
|
18
|
-
drawerService;
|
|
19
|
-
element;
|
|
20
|
-
renderer;
|
|
21
|
-
viewItem;
|
|
22
|
-
index;
|
|
23
|
-
itemTemplate;
|
|
24
|
-
mini;
|
|
25
|
-
expanded;
|
|
26
|
-
disabled;
|
|
27
|
-
cssClass;
|
|
28
|
-
cssStyle;
|
|
29
|
-
get disabledClass() {
|
|
30
|
-
return this.item.disabled;
|
|
31
|
-
}
|
|
32
|
-
get selectedClass() {
|
|
33
|
-
return this.drawerService.selectedIndices.indexOf(this.index) >= 0;
|
|
34
|
-
}
|
|
35
|
-
get label() {
|
|
36
|
-
return this.item.text ? this.item.text : null;
|
|
37
|
-
}
|
|
38
|
-
arrowUpIcon = chevronUpIcon;
|
|
39
|
-
arrowDownIcon = chevronDownIcon;
|
|
40
|
-
constructor(drawerService, element, renderer) {
|
|
41
|
-
this.drawerService = drawerService;
|
|
42
|
-
this.element = element;
|
|
43
|
-
this.renderer = renderer;
|
|
44
|
-
}
|
|
45
|
-
ngAfterViewInit() {
|
|
46
|
-
const elem = this.element.nativeElement;
|
|
47
|
-
const link = nestedLink(elem, DRAWER_LINK_SELECTOR);
|
|
48
|
-
if (link) {
|
|
49
|
-
this.renderer.removeAttribute(link, 'tabindex');
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
get iconClasses() {
|
|
53
|
-
if (this.item.icon) {
|
|
54
|
-
const stripIcon = this.item.icon.replace('k-i-', '');
|
|
55
|
-
return `${stripIcon}`;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
get innerCssClasses() {
|
|
59
|
-
if (this.item.iconClass && this.item.icon) {
|
|
60
|
-
return `${this.item.iconClass}`;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
get customIconClasses() {
|
|
64
|
-
if (!this.item.icon && this.item.iconClass) {
|
|
65
|
-
return this.item.iconClass;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
get item() {
|
|
69
|
-
return this.viewItem.item;
|
|
70
|
-
}
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerItemComponent, deps: [{ token: i1.DrawerService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DrawerItemComponent, isStandalone: true, 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-disabled": "this.disabledClass", "attr.aria-current": "this.selectedClass", "class.k-selected": "this.selectedClass", "attr.aria-label": "this.label" } }, ngImport: i0, template: `
|
|
73
|
-
@if (itemTemplate) {
|
|
74
|
-
<ng-template
|
|
75
|
-
[ngTemplateOutlet]="itemTemplate"
|
|
76
|
-
[ngTemplateOutletContext]="{
|
|
77
|
-
$implicit: item,
|
|
78
|
-
isItemExpanded: viewItem.isExpanded,
|
|
79
|
-
hasChildren: viewItem.hasChildren,
|
|
80
|
-
level: viewItem.level
|
|
81
|
-
}">
|
|
82
|
-
</ng-template>
|
|
83
|
-
} @else {
|
|
84
|
-
@if (expanded) {
|
|
85
|
-
@if (item.icon || item.iconClass || item.svgIcon) {
|
|
86
|
-
<kendo-icon-wrapper
|
|
87
|
-
[name]="iconClasses"
|
|
88
|
-
[customFontClass]="customIconClasses"
|
|
89
|
-
[svgIcon]="item.svgIcon"
|
|
90
|
-
[innerCssClass]="innerCssClasses"
|
|
91
|
-
>
|
|
92
|
-
</kendo-icon-wrapper>
|
|
93
|
-
}
|
|
94
|
-
<span class="k-item-text">{{ item.text }}</span>
|
|
95
|
-
@if (viewItem.hasChildren) {
|
|
96
|
-
<span class="k-spacer"></span>
|
|
97
|
-
}
|
|
98
|
-
@if (viewItem.hasChildren) {
|
|
99
|
-
<kendo-icon-wrapper
|
|
100
|
-
[name]="viewItem.isExpanded ? 'arrow-chevron-up' : 'arrow-chevron-down'"
|
|
101
|
-
innerCssClass="k-drawer-toggle"
|
|
102
|
-
[svgIcon]="viewItem.isExpanded ? arrowUpIcon : arrowDownIcon"
|
|
103
|
-
>
|
|
104
|
-
</kendo-icon-wrapper>
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
@if (mini && !expanded) {
|
|
108
|
-
@if (item.icon || item.iconClass || item.svgIcon) {
|
|
109
|
-
<kendo-icon-wrapper
|
|
110
|
-
[name]="iconClasses"
|
|
111
|
-
[customFontClass]="customIconClasses"
|
|
112
|
-
[svgIcon]="item.svgIcon"
|
|
113
|
-
[innerCssClass]="innerCssClasses"
|
|
114
|
-
>
|
|
115
|
-
</kendo-icon-wrapper>
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
121
|
-
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerItemComponent, decorators: [{
|
|
123
|
-
type: Component,
|
|
124
|
-
args: [{
|
|
125
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
126
|
-
selector: '[kendoDrawerItem]',
|
|
127
|
-
template: `
|
|
128
|
-
@if (itemTemplate) {
|
|
129
|
-
<ng-template
|
|
130
|
-
[ngTemplateOutlet]="itemTemplate"
|
|
131
|
-
[ngTemplateOutletContext]="{
|
|
132
|
-
$implicit: item,
|
|
133
|
-
isItemExpanded: viewItem.isExpanded,
|
|
134
|
-
hasChildren: viewItem.hasChildren,
|
|
135
|
-
level: viewItem.level
|
|
136
|
-
}">
|
|
137
|
-
</ng-template>
|
|
138
|
-
} @else {
|
|
139
|
-
@if (expanded) {
|
|
140
|
-
@if (item.icon || item.iconClass || item.svgIcon) {
|
|
141
|
-
<kendo-icon-wrapper
|
|
142
|
-
[name]="iconClasses"
|
|
143
|
-
[customFontClass]="customIconClasses"
|
|
144
|
-
[svgIcon]="item.svgIcon"
|
|
145
|
-
[innerCssClass]="innerCssClasses"
|
|
146
|
-
>
|
|
147
|
-
</kendo-icon-wrapper>
|
|
148
|
-
}
|
|
149
|
-
<span class="k-item-text">{{ item.text }}</span>
|
|
150
|
-
@if (viewItem.hasChildren) {
|
|
151
|
-
<span class="k-spacer"></span>
|
|
152
|
-
}
|
|
153
|
-
@if (viewItem.hasChildren) {
|
|
154
|
-
<kendo-icon-wrapper
|
|
155
|
-
[name]="viewItem.isExpanded ? 'arrow-chevron-up' : 'arrow-chevron-down'"
|
|
156
|
-
innerCssClass="k-drawer-toggle"
|
|
157
|
-
[svgIcon]="viewItem.isExpanded ? arrowUpIcon : arrowDownIcon"
|
|
158
|
-
>
|
|
159
|
-
</kendo-icon-wrapper>
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
@if (mini && !expanded) {
|
|
163
|
-
@if (item.icon || item.iconClass || item.svgIcon) {
|
|
164
|
-
<kendo-icon-wrapper
|
|
165
|
-
[name]="iconClasses"
|
|
166
|
-
[customFontClass]="customIconClasses"
|
|
167
|
-
[svgIcon]="item.svgIcon"
|
|
168
|
-
[innerCssClass]="innerCssClasses"
|
|
169
|
-
>
|
|
170
|
-
</kendo-icon-wrapper>
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
`,
|
|
176
|
-
standalone: true,
|
|
177
|
-
imports: [NgTemplateOutlet, IconWrapperComponent]
|
|
178
|
-
}]
|
|
179
|
-
}], ctorParameters: () => [{ type: i1.DrawerService }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { viewItem: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], index: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], itemTemplate: [{
|
|
184
|
-
type: Input
|
|
185
|
-
}], mini: [{
|
|
186
|
-
type: Input
|
|
187
|
-
}], expanded: [{
|
|
188
|
-
type: Input
|
|
189
|
-
}], disabled: [{
|
|
190
|
-
type: Input
|
|
191
|
-
}], cssClass: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}], cssStyle: [{
|
|
194
|
-
type: Input
|
|
195
|
-
}], disabledClass: [{
|
|
196
|
-
type: HostBinding,
|
|
197
|
-
args: ['attr.aria-disabled']
|
|
198
|
-
}, {
|
|
199
|
-
type: HostBinding,
|
|
200
|
-
args: ['class.k-disabled']
|
|
201
|
-
}], selectedClass: [{
|
|
202
|
-
type: HostBinding,
|
|
203
|
-
args: ['attr.aria-current']
|
|
204
|
-
}, {
|
|
205
|
-
type: HostBinding,
|
|
206
|
-
args: ['class.k-selected']
|
|
207
|
-
}], label: [{
|
|
208
|
-
type: HostBinding,
|
|
209
|
-
args: ['attr.aria-label']
|
|
210
|
-
}] } });
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Subscription } from 'rxjs';
|
|
6
|
-
import { Component, ElementRef, Input, NgZone, Renderer2, TemplateRef, Output, EventEmitter, ViewChildren, QueryList } from "@angular/core";
|
|
7
|
-
import { closestItem, itemIndex } from '../common/dom-queries';
|
|
8
|
-
import { DRAWER_ITEM_INDEX } from './models/constants';
|
|
9
|
-
import { DrawerService } from './drawer.service';
|
|
10
|
-
import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
|
|
11
|
-
import { ACTIVE_NESTED_LINK_SELECTOR, nestedLink } from './util';
|
|
12
|
-
import { DrawerListSelectEvent } from './events/drawer-list-select.event';
|
|
13
|
-
import { DrawerItemComponent } from './item.component';
|
|
14
|
-
import { NgClass, NgStyle } from '@angular/common';
|
|
15
|
-
import * as i0 from "@angular/core";
|
|
16
|
-
import * as i1 from "./drawer.service";
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export class DrawerListComponent {
|
|
21
|
-
drawerService;
|
|
22
|
-
renderer;
|
|
23
|
-
ngZone;
|
|
24
|
-
element;
|
|
25
|
-
itemTemplate;
|
|
26
|
-
mini;
|
|
27
|
-
expanded;
|
|
28
|
-
view = [];
|
|
29
|
-
select = new EventEmitter();
|
|
30
|
-
items;
|
|
31
|
-
subscriptions = new Subscription();
|
|
32
|
-
constructor(drawerService, renderer, ngZone, element) {
|
|
33
|
-
this.drawerService = drawerService;
|
|
34
|
-
this.renderer = renderer;
|
|
35
|
-
this.ngZone = ngZone;
|
|
36
|
-
this.element = element;
|
|
37
|
-
}
|
|
38
|
-
ngOnInit() {
|
|
39
|
-
this.initDomEvents();
|
|
40
|
-
}
|
|
41
|
-
ngOnDestroy() {
|
|
42
|
-
this.subscriptions.unsubscribe();
|
|
43
|
-
}
|
|
44
|
-
identifyItem(_index, viewItem) {
|
|
45
|
-
return viewItem.item.id ?? viewItem.index;
|
|
46
|
-
}
|
|
47
|
-
initDomEvents() {
|
|
48
|
-
if (!this.element) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.ngZone.runOutsideAngular(() => {
|
|
52
|
-
const nativeElement = this.element.nativeElement;
|
|
53
|
-
this.subscriptions.add(this.renderer.listen(nativeElement, 'click', this.clickHandler.bind(this)));
|
|
54
|
-
this.subscriptions.add(this.renderer.listen(nativeElement, 'keydown', (e) => {
|
|
55
|
-
const code = normalizeKeys(e);
|
|
56
|
-
const isEnterOrSpace = code === Keys.Enter || code === Keys.Space;
|
|
57
|
-
const isArrowUpOrDown = code === Keys.ArrowUp || code === Keys.ArrowDown;
|
|
58
|
-
if (isEnterOrSpace) {
|
|
59
|
-
this.onEnterOrSpaceKeyDown(e);
|
|
60
|
-
}
|
|
61
|
-
else if (isArrowUpOrDown) {
|
|
62
|
-
if (e.target.classList.contains('k-drawer-item')) {
|
|
63
|
-
e.preventDefault();
|
|
64
|
-
const keyName = code === Keys.ArrowUp ? 'arrowUp' : 'arrowDown';
|
|
65
|
-
this.drawerService.changeFocusedItem(this.items, keyName, this.renderer);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
clickHandler(e) {
|
|
72
|
-
const viewItemIdx = this.getDrawerItemIndex(e.target);
|
|
73
|
-
const viewItem = this.view[viewItemIdx];
|
|
74
|
-
const filterItems = this.view.filter(items => !items.item.separator);
|
|
75
|
-
const selectedItemIndex = filterItems.findIndex(item => item.index === viewItemIdx);
|
|
76
|
-
if (!viewItem) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (viewItem.item.disabled) {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const args = {
|
|
84
|
-
index: viewItem.index,
|
|
85
|
-
item: viewItem.item,
|
|
86
|
-
originalEvent: e
|
|
87
|
-
};
|
|
88
|
-
this.ngZone.run(() => {
|
|
89
|
-
const event = new DrawerListSelectEvent(args);
|
|
90
|
-
this.select.emit(event);
|
|
91
|
-
if (!event.isDefaultPrevented()) {
|
|
92
|
-
this.drawerService.focusIndex = selectedItemIndex;
|
|
93
|
-
this.drawerService.onSelect(viewItemIdx);
|
|
94
|
-
this.drawerService.init();
|
|
95
|
-
this.view = this.drawerService.view;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
onEnterOrSpaceKeyDown(e) {
|
|
100
|
-
this.clickHandler(e);
|
|
101
|
-
const link = nestedLink(this.element.nativeElement, ACTIVE_NESTED_LINK_SELECTOR);
|
|
102
|
-
if (link) {
|
|
103
|
-
link.click();
|
|
104
|
-
}
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
getDrawerItemIndex(target) {
|
|
108
|
-
const item = closestItem(target, DRAWER_ITEM_INDEX, this.element.nativeElement);
|
|
109
|
-
if (item) {
|
|
110
|
-
return itemIndex(item, DRAWER_ITEM_INDEX);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerListComponent, deps: [{ token: i1.DrawerService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
114
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DrawerListComponent, isStandalone: true, selector: "[kendoDrawerList]", inputs: { itemTemplate: "itemTemplate", mini: "mini", expanded: "expanded", view: "view" }, outputs: { select: "select" }, viewQueries: [{ propertyName: "items", predicate: DrawerItemComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "\n @for (v of view; track identifyItem(idx, v); let idx = $index) {\n @if (!v.item.separator) {\n <li kendoDrawerItem\n class=\"k-drawer-item {{expanded ? ' k-level-' + v.level : ''}}\"\n role=\"menuitem\"\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]=\"v.index === 0 ? '0' : '-1'\">\n </li>\n }\n @if (v.item.separator) {\n <li\n role=\"separator\"\n class=\"k-drawer-item k-drawer-separator\"\n [ngClass]=\"v.item.cssClass\"\n [ngStyle]=\"v.item.cssStyle\">\n \n </li>\n }\n }\n ", isInline: true, dependencies: [{ kind: "component", type: DrawerItemComponent, selector: "[kendoDrawerItem]", inputs: ["viewItem", "index", "itemTemplate", "mini", "expanded", "disabled", "cssClass", "cssStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
115
|
-
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerListComponent, decorators: [{
|
|
117
|
-
type: Component,
|
|
118
|
-
args: [{
|
|
119
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
120
|
-
selector: '[kendoDrawerList]',
|
|
121
|
-
template: `
|
|
122
|
-
@for (v of view; track identifyItem(idx, v); let idx = $index) {
|
|
123
|
-
@if (!v.item.separator) {
|
|
124
|
-
<li kendoDrawerItem
|
|
125
|
-
class="k-drawer-item {{expanded ? ' k-level-' + v.level : ''}}"
|
|
126
|
-
role="menuitem"
|
|
127
|
-
[viewItem]="v"
|
|
128
|
-
[index]="idx"
|
|
129
|
-
[mini]="mini"
|
|
130
|
-
[expanded]="expanded"
|
|
131
|
-
[itemTemplate]="itemTemplate"
|
|
132
|
-
[attr.${DRAWER_ITEM_INDEX}]="v.index"
|
|
133
|
-
[ngClass]="v.item.cssClass"
|
|
134
|
-
[ngStyle]="v.item.cssStyle"
|
|
135
|
-
[tabindex]="v.index === 0 ? '0' : '-1'">
|
|
136
|
-
</li>
|
|
137
|
-
}
|
|
138
|
-
@if (v.item.separator) {
|
|
139
|
-
<li
|
|
140
|
-
role="separator"
|
|
141
|
-
class="k-drawer-item k-drawer-separator"
|
|
142
|
-
[ngClass]="v.item.cssClass"
|
|
143
|
-
[ngStyle]="v.item.cssStyle">
|
|
144
|
-
|
|
145
|
-
</li>
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
`,
|
|
149
|
-
standalone: true,
|
|
150
|
-
imports: [DrawerItemComponent, NgClass, NgStyle]
|
|
151
|
-
}]
|
|
152
|
-
}], ctorParameters: () => [{ type: i1.DrawerService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ElementRef }], propDecorators: { itemTemplate: [{
|
|
153
|
-
type: Input
|
|
154
|
-
}], mini: [{
|
|
155
|
-
type: Input
|
|
156
|
-
}], expanded: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], view: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], select: [{
|
|
161
|
-
type: Output
|
|
162
|
-
}], items: [{
|
|
163
|
-
type: ViewChildren,
|
|
164
|
-
args: [DrawerItemComponent, { read: ElementRef }]
|
|
165
|
-
}] } });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const DRAWER_ITEM_INDEX = 'data-kendo-drawer-index';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Defines a template that specifies the content of the Drawer.
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag with the `kendoDrawerTemplate` directive inside the `<kendo-drawer>` tag.
|
|
10
|
-
* Using this template directive overrides all other templates, for example, `kendoDrawerHeaderTemplate` and `kendoDrawerItemTemplate`.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```html
|
|
14
|
-
* <kendo-drawer>
|
|
15
|
-
* <ng-template kendoDrawerTemplate>
|
|
16
|
-
* <div class="custom-drawer-content">
|
|
17
|
-
* <h3>Custom Drawer</h3>
|
|
18
|
-
* <ul>
|
|
19
|
-
* <li>Custom Item 1</li>
|
|
20
|
-
* <li>Custom Item 2</li>
|
|
21
|
-
* </ul>
|
|
22
|
-
* </div>
|
|
23
|
-
* </ng-template>
|
|
24
|
-
* </kendo-drawer>
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export class DrawerTemplateDirective {
|
|
28
|
-
templateRef;
|
|
29
|
-
constructor(templateRef) {
|
|
30
|
-
this.templateRef = templateRef;
|
|
31
|
-
}
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DrawerTemplateDirective, isStandalone: true, selector: "[kendoDrawerTemplate]", ngImport: i0 });
|
|
34
|
-
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerTemplateDirective, decorators: [{
|
|
36
|
-
type: Directive,
|
|
37
|
-
args: [{
|
|
38
|
-
selector: '[kendoDrawerTemplate]',
|
|
39
|
-
standalone: true
|
|
40
|
-
}]
|
|
41
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
|
|
42
|
-
type: Optional
|
|
43
|
-
}] }] });
|