@progress/kendo-angular-layout 21.4.1 → 22.0.0
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,135 +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 { Component, HostBinding, ContentChild } from '@angular/core';
|
|
6
|
-
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { DrawerComponent } from './drawer.component';
|
|
8
|
-
import { isPresent } from '../common/util';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
11
|
-
/**
|
|
12
|
-
* Serves as a container for the [Drawer component]({% slug overview_drawer %}) and its content.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```html
|
|
16
|
-
* <kendo-drawer-container>
|
|
17
|
-
* <kendo-drawer [items]="items"></kendo-drawer>
|
|
18
|
-
* <kendo-drawer-content>
|
|
19
|
-
* <h1>Main Content</h1>
|
|
20
|
-
* </kendo-drawer-content>
|
|
21
|
-
* </kendo-drawer-container>
|
|
22
|
-
* ```
|
|
23
|
-
* @remarks
|
|
24
|
-
* Supported children components are: {@link DrawerComponent}, {@link DrawerContentComponent}.
|
|
25
|
-
*/
|
|
26
|
-
export class DrawerContainerComponent {
|
|
27
|
-
localizationService;
|
|
28
|
-
get hostClass() {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
get overlayClass() {
|
|
32
|
-
return this.drawer.mode === 'overlay';
|
|
33
|
-
}
|
|
34
|
-
get miniClass() {
|
|
35
|
-
return this.drawer.mini && !this.drawer.expanded;
|
|
36
|
-
}
|
|
37
|
-
get pushClass() {
|
|
38
|
-
return this.drawer.mode === 'push';
|
|
39
|
-
}
|
|
40
|
-
get isExpandedClass() {
|
|
41
|
-
return this.drawer.expanded;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
direction;
|
|
47
|
-
/**
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
drawer;
|
|
51
|
-
dynamicRTLSubscription;
|
|
52
|
-
rtl = false;
|
|
53
|
-
constructor(localizationService) {
|
|
54
|
-
this.localizationService = localizationService;
|
|
55
|
-
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
56
|
-
this.rtl = rtl;
|
|
57
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
ngOnDestroy() {
|
|
61
|
-
if (this.dynamicRTLSubscription) {
|
|
62
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* @hidden
|
|
67
|
-
*/
|
|
68
|
-
get overlay() {
|
|
69
|
-
return isPresent(this.drawer) &&
|
|
70
|
-
this.drawer.expanded &&
|
|
71
|
-
this.drawer.mode === 'overlay';
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* @hidden
|
|
75
|
-
*/
|
|
76
|
-
closeDrawer() {
|
|
77
|
-
if (this.overlay && this.drawer.autoCollapse) {
|
|
78
|
-
this.drawer.toggle(false);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerContainerComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DrawerContainerComponent, isStandalone: true, selector: "kendo-drawer-container", host: { properties: { "class.k-drawer-container": "this.hostClass", "class.k-drawer-overlay": "this.overlayClass", "class.k-drawer-mini": "this.miniClass", "class.k-drawer-push": "this.pushClass", "class.k-drawer-expanded": "this.isExpandedClass", "attr.dir": "this.direction" } }, providers: [
|
|
83
|
-
LocalizationService,
|
|
84
|
-
{
|
|
85
|
-
provide: L10N_PREFIX,
|
|
86
|
-
useValue: 'kendo.drawer.container'
|
|
87
|
-
}
|
|
88
|
-
], queries: [{ propertyName: "drawer", first: true, predicate: DrawerComponent, descendants: true }], ngImport: i0, template: `
|
|
89
|
-
@if (overlay) {
|
|
90
|
-
<div class="k-overlay" (click)="closeDrawer()"></div>
|
|
91
|
-
}
|
|
92
|
-
<ng-content></ng-content>
|
|
93
|
-
`, isInline: true });
|
|
94
|
-
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerContainerComponent, decorators: [{
|
|
96
|
-
type: Component,
|
|
97
|
-
args: [{
|
|
98
|
-
selector: 'kendo-drawer-container',
|
|
99
|
-
providers: [
|
|
100
|
-
LocalizationService,
|
|
101
|
-
{
|
|
102
|
-
provide: L10N_PREFIX,
|
|
103
|
-
useValue: 'kendo.drawer.container'
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
template: `
|
|
107
|
-
@if (overlay) {
|
|
108
|
-
<div class="k-overlay" (click)="closeDrawer()"></div>
|
|
109
|
-
}
|
|
110
|
-
<ng-content></ng-content>
|
|
111
|
-
`,
|
|
112
|
-
standalone: true
|
|
113
|
-
}]
|
|
114
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { hostClass: [{
|
|
115
|
-
type: HostBinding,
|
|
116
|
-
args: ['class.k-drawer-container']
|
|
117
|
-
}], overlayClass: [{
|
|
118
|
-
type: HostBinding,
|
|
119
|
-
args: ['class.k-drawer-overlay']
|
|
120
|
-
}], miniClass: [{
|
|
121
|
-
type: HostBinding,
|
|
122
|
-
args: ['class.k-drawer-mini']
|
|
123
|
-
}], pushClass: [{
|
|
124
|
-
type: HostBinding,
|
|
125
|
-
args: ['class.k-drawer-push']
|
|
126
|
-
}], isExpandedClass: [{
|
|
127
|
-
type: HostBinding,
|
|
128
|
-
args: ['class.k-drawer-expanded']
|
|
129
|
-
}], direction: [{
|
|
130
|
-
type: HostBinding,
|
|
131
|
-
args: ['attr.dir']
|
|
132
|
-
}], drawer: [{
|
|
133
|
-
type: ContentChild,
|
|
134
|
-
args: [DrawerComponent]
|
|
135
|
-
}] } });
|
|
@@ -1,39 +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 { Component, HostBinding, ViewEncapsulation } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Defines the content of the Drawer component.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```html
|
|
12
|
-
* <kendo-drawer-content>
|
|
13
|
-
* <h1>Main Content Area</h1>
|
|
14
|
-
* <p>Your application content goes here.</p>
|
|
15
|
-
* </kendo-drawer-content>
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export class DrawerContentComponent {
|
|
19
|
-
hostClasses = true;
|
|
20
|
-
constructor() { }
|
|
21
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: DrawerContentComponent, isStandalone: true, selector: "kendo-drawer-content", host: { properties: { "class.k-drawer-content": "this.hostClasses" } }, ngImport: i0, template: `
|
|
23
|
-
<ng-content></ng-content>
|
|
24
|
-
`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerContentComponent, decorators: [{
|
|
27
|
-
type: Component,
|
|
28
|
-
args: [{
|
|
29
|
-
selector: 'kendo-drawer-content',
|
|
30
|
-
template: `
|
|
31
|
-
<ng-content></ng-content>
|
|
32
|
-
`,
|
|
33
|
-
encapsulation: ViewEncapsulation.None,
|
|
34
|
-
standalone: true
|
|
35
|
-
}]
|
|
36
|
-
}], ctorParameters: () => [], propDecorators: { hostClasses: [{
|
|
37
|
-
type: HostBinding,
|
|
38
|
-
args: ['class.k-drawer-content']
|
|
39
|
-
}] } });
|
|
@@ -1,471 +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, ContentChild, ElementRef, EventEmitter, HostBinding, Input, Output, isDevMode } from '@angular/core';
|
|
7
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
|
-
import { packageMetadata } from '../package-metadata';
|
|
9
|
-
import { DrawerTemplateDirective, DrawerItemTemplateDirective, DrawerHeaderTemplateDirective, DrawerFooterTemplateDirective } from './template-directives';
|
|
10
|
-
import { DrawerService } from './drawer.service';
|
|
11
|
-
import { isPresent } from '../common/util';
|
|
12
|
-
import { AnimationBuilder } from '@angular/animations';
|
|
13
|
-
import { collapseAnimation, expandAnimation } from './animations';
|
|
14
|
-
import { take } from 'rxjs/operators';
|
|
15
|
-
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
16
|
-
import { getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
|
|
17
|
-
import { DrawerListComponent } from './list.component';
|
|
18
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
19
|
-
import * as i0 from "@angular/core";
|
|
20
|
-
import * as i1 from "@angular/animations";
|
|
21
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
22
|
-
import * as i3 from "./drawer.service";
|
|
23
|
-
const DEFAULT_ANIMATION = { type: 'slide', duration: 200 };
|
|
24
|
-
/**
|
|
25
|
-
* Represents the [Kendo UI Drawer component for Angular]({% slug overview_drawer %}).
|
|
26
|
-
* Provides a dismissible or permanently visible panel for navigation in responsive web applications.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* @Component({
|
|
31
|
-
* selector: 'my-app',
|
|
32
|
-
* template: `
|
|
33
|
-
* <kendo-drawer-container>
|
|
34
|
-
* <kendo-drawer #drawer
|
|
35
|
-
* [items]="items"
|
|
36
|
-
* mode="overlay"
|
|
37
|
-
* [(expanded)]="expanded">
|
|
38
|
-
* </kendo-drawer>
|
|
39
|
-
* <kendo-drawer-content>
|
|
40
|
-
* <button class="k-button" (click)="drawer.toggle()">Open the Drawer</button>
|
|
41
|
-
* </kendo-drawer-content>
|
|
42
|
-
* </kendo-drawer-container>
|
|
43
|
-
* `
|
|
44
|
-
* })
|
|
45
|
-
* class AppComponent {
|
|
46
|
-
* public expanded = false;
|
|
47
|
-
* public items = [
|
|
48
|
-
* { text: 'Inbox', icon: 'inbox' },
|
|
49
|
-
* { text: 'Notifications', icon: 'bell' }
|
|
50
|
-
* ];
|
|
51
|
-
* }
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export class DrawerComponent {
|
|
55
|
-
element;
|
|
56
|
-
builder;
|
|
57
|
-
localizationService;
|
|
58
|
-
drawerService;
|
|
59
|
-
hostClasses = true;
|
|
60
|
-
get startPositionClass() {
|
|
61
|
-
return this.position === 'start';
|
|
62
|
-
}
|
|
63
|
-
get endPositionClass() {
|
|
64
|
-
return this.position === 'end';
|
|
65
|
-
}
|
|
66
|
-
get overlayTransofrmStyles() {
|
|
67
|
-
if (this.mode === 'push') {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (this.expanded || this.minimized) {
|
|
71
|
-
return `translateX(0px)`;
|
|
72
|
-
}
|
|
73
|
-
return `translateX(-100%)`;
|
|
74
|
-
}
|
|
75
|
-
get flexStyles() {
|
|
76
|
-
if (this.mode === 'overlay') {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (!this.expanded && !this.minimized) {
|
|
80
|
-
return 0;
|
|
81
|
-
}
|
|
82
|
-
return this.drawerWidth;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Specifies the mode in which the Drawer displays.
|
|
86
|
-
*
|
|
87
|
-
* @default 'overlay'
|
|
88
|
-
*/
|
|
89
|
-
mode = 'overlay';
|
|
90
|
-
/**
|
|
91
|
-
* Specifies the position of the Drawer
|
|
92
|
-
* ([see example]({% slug positioning_drawer %})).
|
|
93
|
-
*
|
|
94
|
-
* @default 'start'
|
|
95
|
-
*/
|
|
96
|
-
position = 'start';
|
|
97
|
-
/**
|
|
98
|
-
* Enables the mini (compact) view of the Drawer which displays when the component is collapsed
|
|
99
|
-
* ([see example]({% slug expandmodespositions_drawer %}#toc-mini-view)).
|
|
100
|
-
*
|
|
101
|
-
* @default false
|
|
102
|
-
*/
|
|
103
|
-
mini = false;
|
|
104
|
-
/**
|
|
105
|
-
* Specifies the state of the Drawer.
|
|
106
|
-
*
|
|
107
|
-
* @default false
|
|
108
|
-
*/
|
|
109
|
-
expanded = false;
|
|
110
|
-
/**
|
|
111
|
-
* Defines the width of the Drawer when it is expanded.
|
|
112
|
-
*
|
|
113
|
-
* @default 240
|
|
114
|
-
*/
|
|
115
|
-
width = 240;
|
|
116
|
-
/**
|
|
117
|
-
* Defines the width of the Drawer when the mini view is enabled and the component is collapsed.
|
|
118
|
-
*
|
|
119
|
-
* @default 50
|
|
120
|
-
*/
|
|
121
|
-
miniWidth = 50;
|
|
122
|
-
/**
|
|
123
|
-
* Specifies if the Drawer automatically collapses when an item or the overlay is clicked.
|
|
124
|
-
*
|
|
125
|
-
* @default true
|
|
126
|
-
*/
|
|
127
|
-
autoCollapse = true;
|
|
128
|
-
/**
|
|
129
|
-
* Defines the collection of items that render in the Drawer.
|
|
130
|
-
*
|
|
131
|
-
* @default []
|
|
132
|
-
*/
|
|
133
|
-
items = [];
|
|
134
|
-
/**
|
|
135
|
-
* Defines a callback function which determines if an item should be expanded.
|
|
136
|
-
* This is useful for hierarchical data structures where the expansion state of an item depends on its parent or other items.
|
|
137
|
-
*/
|
|
138
|
-
set isItemExpanded(fn) {
|
|
139
|
-
if (isDevMode && isPresent(fn) && typeof fn !== 'function') {
|
|
140
|
-
throw new Error(`isItemExpanded must be a function, but received ${JSON.stringify(fn)}.`);
|
|
141
|
-
}
|
|
142
|
-
this.drawerService.isItemExpanded = fn;
|
|
143
|
-
}
|
|
144
|
-
get isItemExpanded() {
|
|
145
|
-
return this.drawerService.isItemExpanded;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* @hidden
|
|
149
|
-
*/
|
|
150
|
-
direction;
|
|
151
|
-
/**
|
|
152
|
-
* Specifies the animation settings of the Drawer
|
|
153
|
-
* ([see example]({% slug interaction_drawer %}#toc-toggling-between-states)).
|
|
154
|
-
*
|
|
155
|
-
* @default { type: 'slide', duration: 200 }
|
|
156
|
-
*/
|
|
157
|
-
animation = DEFAULT_ANIMATION;
|
|
158
|
-
/**
|
|
159
|
-
* Fires when the Drawer is expanded and its animation is complete.
|
|
160
|
-
*/
|
|
161
|
-
expand = new EventEmitter();
|
|
162
|
-
/**
|
|
163
|
-
* Fires when the Drawer is collapsed and its animation is complete.
|
|
164
|
-
*/
|
|
165
|
-
collapse = new EventEmitter();
|
|
166
|
-
/**
|
|
167
|
-
* Fires when an item in the Drawer is selected.
|
|
168
|
-
* This event is preventable.
|
|
169
|
-
*/
|
|
170
|
-
select = new EventEmitter();
|
|
171
|
-
/**
|
|
172
|
-
* Fires when the `expanded` property of the component is updated.
|
|
173
|
-
* Used to provide a two-way binding for the `expanded` property.
|
|
174
|
-
*/
|
|
175
|
-
expandedChange = new EventEmitter();
|
|
176
|
-
/**
|
|
177
|
-
* @hidden
|
|
178
|
-
*/
|
|
179
|
-
drawerTemplate;
|
|
180
|
-
/**
|
|
181
|
-
* @hidden
|
|
182
|
-
*/
|
|
183
|
-
footerTemplate;
|
|
184
|
-
/**
|
|
185
|
-
* @hidden
|
|
186
|
-
*/
|
|
187
|
-
headerTemplate;
|
|
188
|
-
/**
|
|
189
|
-
* @hidden
|
|
190
|
-
*/
|
|
191
|
-
itemTemplate;
|
|
192
|
-
/**
|
|
193
|
-
* @hidden
|
|
194
|
-
*/
|
|
195
|
-
showLicenseWatermark = false;
|
|
196
|
-
/**
|
|
197
|
-
* @hidden
|
|
198
|
-
*/
|
|
199
|
-
licenseMessage;
|
|
200
|
-
viewItems;
|
|
201
|
-
animationEnd = new EventEmitter();
|
|
202
|
-
dynamicRTLSubscription;
|
|
203
|
-
rtl = false;
|
|
204
|
-
constructor(element, builder, localizationService, drawerService) {
|
|
205
|
-
this.element = element;
|
|
206
|
-
this.builder = builder;
|
|
207
|
-
this.localizationService = localizationService;
|
|
208
|
-
this.drawerService = drawerService;
|
|
209
|
-
const isValid = validatePackage(packageMetadata);
|
|
210
|
-
this.licenseMessage = getLicenseMessage(packageMetadata);
|
|
211
|
-
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
212
|
-
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
213
|
-
this.rtl = rtl;
|
|
214
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
215
|
-
});
|
|
216
|
-
this.drawerService.owner = this;
|
|
217
|
-
}
|
|
218
|
-
ngOnChanges(changes) {
|
|
219
|
-
if (changes && changes['items']) {
|
|
220
|
-
this.drawerService.resetSelection();
|
|
221
|
-
this.drawerService.init();
|
|
222
|
-
this.viewItems = this.drawerService.view;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
ngOnDestroy() {
|
|
226
|
-
if (this.dynamicRTLSubscription) {
|
|
227
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* @hidden
|
|
232
|
-
*/
|
|
233
|
-
get minimized() {
|
|
234
|
-
return this.mini && !this.expanded;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* @hidden
|
|
238
|
-
*/
|
|
239
|
-
get drawerWidth() {
|
|
240
|
-
return this.minimized ? this.miniWidth : this.width;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Toggles the visibility of the Drawer.
|
|
244
|
-
* If the `expanded` parameter is not provided, the Drawer will toggle between expanded and collapsed states.
|
|
245
|
-
*
|
|
246
|
-
* @param expanded Specifies if the Drawer will be expanded or collapsed.
|
|
247
|
-
*/
|
|
248
|
-
toggle(expanded) {
|
|
249
|
-
const previous = this.expanded;
|
|
250
|
-
const current = isPresent(expanded) ? expanded : !previous;
|
|
251
|
-
if (current === previous) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
if (current === true) {
|
|
255
|
-
this.setExpanded(true);
|
|
256
|
-
}
|
|
257
|
-
else if (current === false && !this.animation) {
|
|
258
|
-
this.setExpanded(false);
|
|
259
|
-
}
|
|
260
|
-
if (this.animation) {
|
|
261
|
-
this.animationEnd.pipe(take(1))
|
|
262
|
-
.subscribe(() => { this.onAnimationEnd(current); });
|
|
263
|
-
this.animate(current);
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
this[current ? 'expand' : 'collapse'].emit();
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* @hidden
|
|
271
|
-
*/
|
|
272
|
-
onSelect(e) {
|
|
273
|
-
this.select.emit(Object.assign(e, { sender: this }));
|
|
274
|
-
}
|
|
275
|
-
onAnimationEnd(currentExpanded) {
|
|
276
|
-
if (currentExpanded) {
|
|
277
|
-
this.expand.emit();
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
this.setExpanded(false);
|
|
281
|
-
this.collapse.emit();
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
setExpanded(value) {
|
|
285
|
-
this.expanded = value;
|
|
286
|
-
this.expandedChange.emit(value);
|
|
287
|
-
}
|
|
288
|
-
animate(expanded) {
|
|
289
|
-
const settings = {
|
|
290
|
-
mode: this.mode,
|
|
291
|
-
mini: this.mini,
|
|
292
|
-
miniWidth: this.miniWidth,
|
|
293
|
-
width: this.width,
|
|
294
|
-
rtl: this.rtl,
|
|
295
|
-
position: this.position,
|
|
296
|
-
animation: (typeof this.animation !== 'boolean') ? this.animation : DEFAULT_ANIMATION
|
|
297
|
-
};
|
|
298
|
-
const animation = expanded ? expandAnimation(settings) : collapseAnimation(settings);
|
|
299
|
-
const player = this.createPlayer(animation, this.element.nativeElement);
|
|
300
|
-
player.play();
|
|
301
|
-
}
|
|
302
|
-
createPlayer(animation, animatedElement) {
|
|
303
|
-
const factory = this.builder.build(animation);
|
|
304
|
-
let player = factory.create(animatedElement);
|
|
305
|
-
player.onDone(() => {
|
|
306
|
-
if (player) {
|
|
307
|
-
this.animationEnd.emit();
|
|
308
|
-
player.destroy();
|
|
309
|
-
player = null;
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
return player;
|
|
313
|
-
}
|
|
314
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerComponent, deps: [{ token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: i2.LocalizationService }, { token: i3.DrawerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
315
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DrawerComponent, isStandalone: true, 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-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: [
|
|
316
|
-
LocalizationService,
|
|
317
|
-
DrawerService,
|
|
318
|
-
{
|
|
319
|
-
provide: L10N_PREFIX,
|
|
320
|
-
useValue: 'kendo.drawer'
|
|
321
|
-
}
|
|
322
|
-
], 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: `
|
|
323
|
-
@if (expanded || mini) {
|
|
324
|
-
<div class="k-drawer-wrapper" [style.width.px]="drawerWidth">
|
|
325
|
-
@if (!drawerTemplate) {
|
|
326
|
-
@if (headerTemplate) {
|
|
327
|
-
<ng-template
|
|
328
|
-
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
329
|
-
</ng-template>
|
|
330
|
-
}
|
|
331
|
-
<ul kendoDrawerList
|
|
332
|
-
role="menubar"
|
|
333
|
-
aria-orientation="vertical"
|
|
334
|
-
(select)="onSelect($event)"
|
|
335
|
-
[mini]="mini"
|
|
336
|
-
[expanded]="expanded"
|
|
337
|
-
[view]="viewItems"
|
|
338
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
339
|
-
class="k-drawer-items">
|
|
340
|
-
</ul>
|
|
341
|
-
@if (footerTemplate) {
|
|
342
|
-
<ng-template
|
|
343
|
-
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
344
|
-
</ng-template>
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
@if (drawerTemplate) {
|
|
348
|
-
<ng-template
|
|
349
|
-
[ngTemplateOutlet]="drawerTemplate?.templateRef">
|
|
350
|
-
</ng-template>
|
|
351
|
-
}
|
|
352
|
-
</div>
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
@if (showLicenseWatermark) {
|
|
356
|
-
<div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
|
|
357
|
-
}
|
|
358
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DrawerListComponent, selector: "[kendoDrawerList]", inputs: ["itemTemplate", "mini", "expanded", "view"], outputs: ["select"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }] });
|
|
359
|
-
}
|
|
360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawerComponent, decorators: [{
|
|
361
|
-
type: Component,
|
|
362
|
-
args: [{
|
|
363
|
-
exportAs: 'kendoDrawer',
|
|
364
|
-
providers: [
|
|
365
|
-
LocalizationService,
|
|
366
|
-
DrawerService,
|
|
367
|
-
{
|
|
368
|
-
provide: L10N_PREFIX,
|
|
369
|
-
useValue: 'kendo.drawer'
|
|
370
|
-
}
|
|
371
|
-
],
|
|
372
|
-
selector: 'kendo-drawer',
|
|
373
|
-
template: `
|
|
374
|
-
@if (expanded || mini) {
|
|
375
|
-
<div class="k-drawer-wrapper" [style.width.px]="drawerWidth">
|
|
376
|
-
@if (!drawerTemplate) {
|
|
377
|
-
@if (headerTemplate) {
|
|
378
|
-
<ng-template
|
|
379
|
-
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
380
|
-
</ng-template>
|
|
381
|
-
}
|
|
382
|
-
<ul kendoDrawerList
|
|
383
|
-
role="menubar"
|
|
384
|
-
aria-orientation="vertical"
|
|
385
|
-
(select)="onSelect($event)"
|
|
386
|
-
[mini]="mini"
|
|
387
|
-
[expanded]="expanded"
|
|
388
|
-
[view]="viewItems"
|
|
389
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
390
|
-
class="k-drawer-items">
|
|
391
|
-
</ul>
|
|
392
|
-
@if (footerTemplate) {
|
|
393
|
-
<ng-template
|
|
394
|
-
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
395
|
-
</ng-template>
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
@if (drawerTemplate) {
|
|
399
|
-
<ng-template
|
|
400
|
-
[ngTemplateOutlet]="drawerTemplate?.templateRef">
|
|
401
|
-
</ng-template>
|
|
402
|
-
}
|
|
403
|
-
</div>
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
@if (showLicenseWatermark) {
|
|
407
|
-
<div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
|
|
408
|
-
}
|
|
409
|
-
`,
|
|
410
|
-
standalone: true,
|
|
411
|
-
imports: [NgTemplateOutlet, DrawerListComponent, WatermarkOverlayComponent]
|
|
412
|
-
}]
|
|
413
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.AnimationBuilder }, { type: i2.LocalizationService }, { type: i3.DrawerService }], propDecorators: { hostClasses: [{
|
|
414
|
-
type: HostBinding,
|
|
415
|
-
args: ['class.k-drawer']
|
|
416
|
-
}], startPositionClass: [{
|
|
417
|
-
type: HostBinding,
|
|
418
|
-
args: ['class.k-drawer-start']
|
|
419
|
-
}], endPositionClass: [{
|
|
420
|
-
type: HostBinding,
|
|
421
|
-
args: ['class.k-drawer-end']
|
|
422
|
-
}], overlayTransofrmStyles: [{
|
|
423
|
-
type: HostBinding,
|
|
424
|
-
args: ['style.transform']
|
|
425
|
-
}], flexStyles: [{
|
|
426
|
-
type: HostBinding,
|
|
427
|
-
args: ['style.flexBasis.px']
|
|
428
|
-
}], mode: [{
|
|
429
|
-
type: Input
|
|
430
|
-
}], position: [{
|
|
431
|
-
type: Input
|
|
432
|
-
}], mini: [{
|
|
433
|
-
type: Input
|
|
434
|
-
}], expanded: [{
|
|
435
|
-
type: Input
|
|
436
|
-
}], width: [{
|
|
437
|
-
type: Input
|
|
438
|
-
}], miniWidth: [{
|
|
439
|
-
type: Input
|
|
440
|
-
}], autoCollapse: [{
|
|
441
|
-
type: Input
|
|
442
|
-
}], items: [{
|
|
443
|
-
type: Input
|
|
444
|
-
}], isItemExpanded: [{
|
|
445
|
-
type: Input
|
|
446
|
-
}], direction: [{
|
|
447
|
-
type: HostBinding,
|
|
448
|
-
args: ['attr.dir']
|
|
449
|
-
}], animation: [{
|
|
450
|
-
type: Input
|
|
451
|
-
}], expand: [{
|
|
452
|
-
type: Output
|
|
453
|
-
}], collapse: [{
|
|
454
|
-
type: Output
|
|
455
|
-
}], select: [{
|
|
456
|
-
type: Output
|
|
457
|
-
}], expandedChange: [{
|
|
458
|
-
type: Output
|
|
459
|
-
}], drawerTemplate: [{
|
|
460
|
-
type: ContentChild,
|
|
461
|
-
args: [DrawerTemplateDirective]
|
|
462
|
-
}], footerTemplate: [{
|
|
463
|
-
type: ContentChild,
|
|
464
|
-
args: [DrawerFooterTemplateDirective]
|
|
465
|
-
}], headerTemplate: [{
|
|
466
|
-
type: ContentChild,
|
|
467
|
-
args: [DrawerHeaderTemplateDirective]
|
|
468
|
-
}], itemTemplate: [{
|
|
469
|
-
type: ContentChild,
|
|
470
|
-
args: [DrawerItemTemplateDirective]
|
|
471
|
-
}] } });
|