@progress/kendo-angular-layout 7.0.0-next.202204011521 → 7.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/avatar.component.d.ts +4 -5
- package/avatar/models/fill.d.ts +1 -1
- package/avatar/models/rounded.d.ts +1 -1
- package/avatar/models/size.d.ts +1 -1
- package/avatar/models/theme-color.d.ts +1 -1
- package/bundles/kendo-angular-layout.umd.js +1 -1
- package/common/preventable-event.d.ts +28 -0
- package/esm2015/avatar/avatar.component.js +24 -17
- package/esm2015/common/preventable-event.js +34 -0
- package/esm2015/common/util.js +3 -3
- package/esm2015/main.js +1 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/panelbar/events/collapse-event.js +10 -0
- package/esm2015/panelbar/events/expand-event.js +10 -0
- package/esm2015/panelbar/events/select-event.js +10 -0
- package/esm2015/panelbar/events/state-change-event.js +9 -0
- package/esm2015/panelbar/events.js +8 -0
- package/esm2015/panelbar/panelbar-item.component.js +32 -2
- package/esm2015/panelbar/panelbar.component.js +145 -55
- package/fesm2015/kendo-angular-layout.js +270 -89
- package/main.d.ts +1 -0
- package/package.json +9 -11
- package/panelbar/events/collapse-event.d.ts +15 -0
- package/panelbar/events/expand-event.d.ts +15 -0
- package/panelbar/events/select-event.d.ts +15 -0
- package/panelbar/events/state-change-event.d.ts +14 -0
- package/panelbar/events.d.ts +8 -0
- package/panelbar/panelbar.component.d.ts +26 -3
|
@@ -7,7 +7,7 @@ import { Directive, Optional, Injectable, isDevMode, Component, SkipSelf, Host,
|
|
|
7
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import * as i1$1 from '@progress/kendo-angular-common';
|
|
10
|
-
import { Keys, PreventableEvent, isDocumentAvailable, hasObservers, EventsModule, DraggableModule, ResizeSensorModule, isChanged } from '@progress/kendo-angular-common';
|
|
10
|
+
import { Keys, PreventableEvent as PreventableEvent$1, isDocumentAvailable, hasObservers, EventsModule, DraggableModule, ResizeSensorModule, isChanged } from '@progress/kendo-angular-common';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import * as i1$2 from '@angular/animations';
|
|
13
13
|
import { trigger, state, style, transition, animate, AUTO_STYLE } from '@angular/animations';
|
|
@@ -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: 1650441140,
|
|
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
|
};
|
|
@@ -179,12 +179,12 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
179
179
|
case 'size':
|
|
180
180
|
return {
|
|
181
181
|
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
182
|
-
toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` :
|
|
182
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
|
|
183
183
|
};
|
|
184
184
|
case 'rounded':
|
|
185
185
|
return {
|
|
186
186
|
toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
|
|
187
|
-
toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` :
|
|
187
|
+
toAdd: newValue !== 'none' ? `k-rounded-${ROUNDNESS[newValue]}` : ''
|
|
188
188
|
};
|
|
189
189
|
default:
|
|
190
190
|
break;
|
|
@@ -193,7 +193,7 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
193
193
|
/**
|
|
194
194
|
* @hidden
|
|
195
195
|
*/
|
|
196
|
-
const mapShapeToRounded = (shape) => SHAPE_TO_ROUNDED[shape] ||
|
|
196
|
+
const mapShapeToRounded = (shape) => SHAPE_TO_ROUNDED[shape] || 'none';
|
|
197
197
|
/**
|
|
198
198
|
* @hidden
|
|
199
199
|
*/
|
|
@@ -528,7 +528,22 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
528
528
|
[src]="imageUrl"
|
|
529
529
|
alt="">
|
|
530
530
|
<ng-container *ngIf="!titleTemplate"><span class="k-panelbar-item-text">{{title}}</span></ng-container>
|
|
531
|
-
<ng-template *ngIf="titleTemplate"
|
|
531
|
+
<ng-template *ngIf="titleTemplate"
|
|
532
|
+
[ngTemplateOutlet]="titleTemplate"
|
|
533
|
+
[ngTemplateOutletContext]="{
|
|
534
|
+
item: {
|
|
535
|
+
title: title,
|
|
536
|
+
id: id,
|
|
537
|
+
icon: icon,
|
|
538
|
+
iconClass: iconClass,
|
|
539
|
+
imageUrl: imageUrl,
|
|
540
|
+
selected: selected,
|
|
541
|
+
expanded: expanded,
|
|
542
|
+
disabled: disabled,
|
|
543
|
+
focused: focused,
|
|
544
|
+
content: content
|
|
545
|
+
}
|
|
546
|
+
}"></ng-template>
|
|
532
547
|
<span *ngIf="hasChildItems || hasContent"
|
|
533
548
|
class="k-icon k-panelbar-toggle"
|
|
534
549
|
[ngClass]="{'k-i-arrow-chevron-up k-panelbar-collapse': expanded, 'k-i-arrow-chevron-down k-panelbar-expand': !expanded}">
|
|
@@ -654,7 +669,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
654
669
|
[src]="imageUrl"
|
|
655
670
|
alt="">
|
|
656
671
|
<ng-container *ngIf="!titleTemplate"><span class="k-panelbar-item-text">{{title}}</span></ng-container>
|
|
657
|
-
<ng-template *ngIf="titleTemplate"
|
|
672
|
+
<ng-template *ngIf="titleTemplate"
|
|
673
|
+
[ngTemplateOutlet]="titleTemplate"
|
|
674
|
+
[ngTemplateOutletContext]="{
|
|
675
|
+
item: {
|
|
676
|
+
title: title,
|
|
677
|
+
id: id,
|
|
678
|
+
icon: icon,
|
|
679
|
+
iconClass: iconClass,
|
|
680
|
+
imageUrl: imageUrl,
|
|
681
|
+
selected: selected,
|
|
682
|
+
expanded: expanded,
|
|
683
|
+
disabled: disabled,
|
|
684
|
+
focused: focused,
|
|
685
|
+
content: content
|
|
686
|
+
}
|
|
687
|
+
}"></ng-template>
|
|
658
688
|
<span *ngIf="hasChildItems || hasContent"
|
|
659
689
|
class="k-icon k-panelbar-toggle"
|
|
660
690
|
[ngClass]="{'k-i-arrow-chevron-up k-panelbar-collapse': expanded, 'k-i-arrow-chevron-down k-panelbar-expand': !expanded}">
|
|
@@ -836,6 +866,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
836
866
|
type: Optional
|
|
837
867
|
}] }]; } });
|
|
838
868
|
|
|
869
|
+
/**
|
|
870
|
+
* @hidden
|
|
871
|
+
*/
|
|
872
|
+
class PreventableEvent {
|
|
873
|
+
/**
|
|
874
|
+
* @hidden
|
|
875
|
+
*/
|
|
876
|
+
constructor(args) {
|
|
877
|
+
this.prevented = false;
|
|
878
|
+
Object.assign(this, args);
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Prevents the default action for a specified event.
|
|
882
|
+
* In this way, the source component suppresses
|
|
883
|
+
* the built-in behavior that follows the event.
|
|
884
|
+
*/
|
|
885
|
+
preventDefault() {
|
|
886
|
+
this.prevented = true;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Returns `true` if the event was prevented
|
|
890
|
+
* by any of its subscribers.
|
|
891
|
+
*
|
|
892
|
+
* @returns `true` if the default action was prevented.
|
|
893
|
+
* Otherwise, returns `false`.
|
|
894
|
+
*/
|
|
895
|
+
isDefaultPrevented() {
|
|
896
|
+
return this.prevented;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Arguments for the `collapse` event of the PanelBar.
|
|
902
|
+
*/
|
|
903
|
+
class PanelBarCollapseEvent extends PreventableEvent {
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Arguments for the `expand` event of the PanelBar.
|
|
908
|
+
*/
|
|
909
|
+
class PanelBarExpandEvent extends PreventableEvent {
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Arguments for the `select` event of the PanelBar.
|
|
914
|
+
*/
|
|
915
|
+
class PanelBarSelectEvent extends PreventableEvent {
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Arguments for the `stateChange` event of the PanelBar.
|
|
920
|
+
*/
|
|
921
|
+
class PanelBarStateChangeEvent {
|
|
922
|
+
}
|
|
923
|
+
|
|
839
924
|
/**
|
|
840
925
|
* Represents the [Kendo UI PanelBar component for Angular]({% slug overview_panelbar %}).
|
|
841
926
|
*/
|
|
@@ -866,17 +951,35 @@ class PanelBarComponent {
|
|
|
866
951
|
* Sets the height of the component when the `"full"` expand mode is used.
|
|
867
952
|
* This option is ignored in the `"multiple"` and `"single"` expand modes.
|
|
868
953
|
*/
|
|
869
|
-
this.height =
|
|
954
|
+
this.height = '400px';
|
|
870
955
|
/**
|
|
871
956
|
* Fires each time the user interacts with a PanelBar item
|
|
872
957
|
* ([see example]({% slug routing_panelbar %}#toc-getting-the-selected-item)).
|
|
873
|
-
* The event data contains all items that are modified.
|
|
958
|
+
* The event data contains a collection of all items that are modified.
|
|
874
959
|
*/
|
|
875
960
|
this.stateChange = new EventEmitter();
|
|
961
|
+
/**
|
|
962
|
+
* Fires when an item is about to be selected.
|
|
963
|
+
* ([see example]({% slug events_panelbar %}))
|
|
964
|
+
* This event is preventable. If you cancel it, the item will not be selected.
|
|
965
|
+
*/
|
|
966
|
+
this.select = new EventEmitter();
|
|
967
|
+
/**
|
|
968
|
+
* Fires when an item is about to be expanded.
|
|
969
|
+
* ([see example]({% slug events_panelbar %}))
|
|
970
|
+
* This event is preventable. If you cancel it, the item will remain collapsed.
|
|
971
|
+
*/
|
|
972
|
+
this.expand = new EventEmitter();
|
|
973
|
+
/**
|
|
974
|
+
* Fires when an item is about to be collapsed.
|
|
975
|
+
* ([see example]({% slug events_panelbar %}))
|
|
976
|
+
* This event is preventable. If you cancel it, the item will remain expanded.
|
|
977
|
+
*/
|
|
978
|
+
this.collapse = new EventEmitter();
|
|
876
979
|
this.tabIndex = 0;
|
|
877
|
-
this.role =
|
|
980
|
+
this.role = 'tree';
|
|
878
981
|
this.hostClass = true;
|
|
879
|
-
this.activeDescendant =
|
|
982
|
+
this.activeDescendant = '';
|
|
880
983
|
this.isViewInit = true;
|
|
881
984
|
this.focused = false;
|
|
882
985
|
this._keepItemContent = false;
|
|
@@ -888,7 +991,7 @@ class PanelBarComponent {
|
|
|
888
991
|
childrenHeight += item.headerHeight();
|
|
889
992
|
});
|
|
890
993
|
this.childrenItems.forEach(item => {
|
|
891
|
-
item.contentHeight = PanelBarExpandMode.Full === this.expandMode ? (panelbarHeight - childrenHeight) +
|
|
994
|
+
item.contentHeight = PanelBarExpandMode.Full === this.expandMode ? (panelbarHeight - childrenHeight) + 'px' : 'auto';
|
|
892
995
|
item.contentOverflow = contentOverflow;
|
|
893
996
|
});
|
|
894
997
|
};
|
|
@@ -927,7 +1030,7 @@ class PanelBarComponent {
|
|
|
927
1030
|
return this.expandMode === PanelBarExpandMode.Full ? this.height : 'auto';
|
|
928
1031
|
}
|
|
929
1032
|
get overflow() {
|
|
930
|
-
return this.expandMode === PanelBarExpandMode.Full ?
|
|
1033
|
+
return this.expandMode === PanelBarExpandMode.Full ? 'hidden' : 'visible';
|
|
931
1034
|
}
|
|
932
1035
|
get dir() {
|
|
933
1036
|
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
@@ -977,7 +1080,7 @@ class PanelBarComponent {
|
|
|
977
1080
|
this.validateConfiguration();
|
|
978
1081
|
}
|
|
979
1082
|
ngOnChanges(changes) {
|
|
980
|
-
if (changes['height'] || changes['expandMode'] || changes[
|
|
1083
|
+
if (changes['height'] || changes['expandMode'] || changes['items']) { // eslint-disable-line
|
|
981
1084
|
if (this.childrenItems) {
|
|
982
1085
|
setTimeout(this.updateChildrenHeight);
|
|
983
1086
|
}
|
|
@@ -1024,7 +1127,7 @@ class PanelBarComponent {
|
|
|
1024
1127
|
onComponentBlur() {
|
|
1025
1128
|
this.eventService.onBlur();
|
|
1026
1129
|
this.focused = false;
|
|
1027
|
-
this.activeDescendant =
|
|
1130
|
+
this.activeDescendant = '';
|
|
1028
1131
|
}
|
|
1029
1132
|
/**
|
|
1030
1133
|
* @hidden
|
|
@@ -1043,6 +1146,26 @@ class PanelBarComponent {
|
|
|
1043
1146
|
}
|
|
1044
1147
|
}
|
|
1045
1148
|
}
|
|
1149
|
+
/**
|
|
1150
|
+
* @hidden
|
|
1151
|
+
*/
|
|
1152
|
+
emitEvent(event, item) {
|
|
1153
|
+
let eventArgs;
|
|
1154
|
+
switch (event) {
|
|
1155
|
+
case 'select':
|
|
1156
|
+
eventArgs = new PanelBarSelectEvent();
|
|
1157
|
+
break;
|
|
1158
|
+
case 'collapse':
|
|
1159
|
+
eventArgs = new PanelBarCollapseEvent();
|
|
1160
|
+
break;
|
|
1161
|
+
default:
|
|
1162
|
+
eventArgs = new PanelBarExpandEvent();
|
|
1163
|
+
break;
|
|
1164
|
+
}
|
|
1165
|
+
eventArgs.item = item.serialize();
|
|
1166
|
+
this[event].emit(eventArgs);
|
|
1167
|
+
return eventArgs;
|
|
1168
|
+
}
|
|
1046
1169
|
get viewItems() {
|
|
1047
1170
|
let treeItems = [];
|
|
1048
1171
|
this.viewChildItems.toArray().forEach(item => {
|
|
@@ -1054,7 +1177,7 @@ class PanelBarComponent {
|
|
|
1054
1177
|
validateConfiguration() {
|
|
1055
1178
|
if (isDevMode()) {
|
|
1056
1179
|
if (this.items && (this.contentItems && this.contentItems.length > 0)) {
|
|
1057
|
-
throw new Error(
|
|
1180
|
+
throw new Error('Invalid configuration: mixed template components and items property.');
|
|
1058
1181
|
}
|
|
1059
1182
|
}
|
|
1060
1183
|
}
|
|
@@ -1069,37 +1192,80 @@ class PanelBarComponent {
|
|
|
1069
1192
|
let focusedState = selectedState;
|
|
1070
1193
|
selectedState = this.selectable ? selectedState : currentItem.selected;
|
|
1071
1194
|
if (currentItem.selected !== selectedState || currentItem.focused !== focusedState) {
|
|
1072
|
-
currentItem.
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1195
|
+
const isSelectPrevented = selectedState ? this.emitEvent('select', currentItem).isDefaultPrevented() : false;
|
|
1196
|
+
if (!isSelectPrevented) {
|
|
1197
|
+
currentItem.selected = selectedState;
|
|
1198
|
+
currentItem.focused = focusedState;
|
|
1199
|
+
this.activeDescendant = focusedState ? currentItem.itemId : '';
|
|
1200
|
+
modifiedItems.push(currentItem);
|
|
1201
|
+
}
|
|
1076
1202
|
}
|
|
1077
1203
|
});
|
|
1078
1204
|
if (this.expandMode === PanelBarExpandMode.Multiple) {
|
|
1079
|
-
if (item.hasChildItems || item.hasContent) {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1205
|
+
if ((item.hasChildItems || item.hasContent) && item.selected) {
|
|
1206
|
+
const isEventPrevented = item.expanded ?
|
|
1207
|
+
this.emitEvent('collapse', item).isDefaultPrevented() :
|
|
1208
|
+
this.emitEvent('expand', item).isDefaultPrevented();
|
|
1209
|
+
if (!isEventPrevented) {
|
|
1210
|
+
item.expanded = !item.expanded;
|
|
1211
|
+
if (modifiedItems.indexOf(item) < 0) {
|
|
1212
|
+
modifiedItems.push(item);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1084
1215
|
}
|
|
1085
1216
|
}
|
|
1086
1217
|
else {
|
|
1087
1218
|
let siblings = item.parent ? item.parent.childrenItems : this.childrenItems;
|
|
1088
|
-
|
|
1219
|
+
let preventedCollapseItem;
|
|
1220
|
+
let expandedItems = [];
|
|
1221
|
+
if ((item.hasChildItems || item.hasContent) && item.selected) {
|
|
1089
1222
|
siblings
|
|
1090
1223
|
.forEach((currentItem) => {
|
|
1091
1224
|
let expandedState = currentItem === item;
|
|
1092
1225
|
if (currentItem.expanded !== expandedState) {
|
|
1093
|
-
currentItem.expanded
|
|
1094
|
-
|
|
1095
|
-
|
|
1226
|
+
const isEventPrevented = currentItem.expanded ?
|
|
1227
|
+
this.emitEvent('collapse', currentItem).isDefaultPrevented() :
|
|
1228
|
+
this.emitEvent('expand', currentItem).isDefaultPrevented();
|
|
1229
|
+
if (!isEventPrevented) {
|
|
1230
|
+
currentItem.expanded = expandedState;
|
|
1231
|
+
if (currentItem.expanded) {
|
|
1232
|
+
expandedItems.push(currentItem);
|
|
1233
|
+
}
|
|
1234
|
+
if (modifiedItems.indexOf(currentItem) < 0) {
|
|
1235
|
+
modifiedItems.push(currentItem);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
else if (isEventPrevented && currentItem.expanded) {
|
|
1239
|
+
preventedCollapseItem = currentItem;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
else if (currentItem.expanded === expandedState && expandedState) {
|
|
1243
|
+
const isCollapsePrevented = this.emitEvent('collapse', currentItem).isDefaultPrevented();
|
|
1244
|
+
if (!isCollapsePrevented) {
|
|
1245
|
+
currentItem.expanded = !currentItem.expanded;
|
|
1246
|
+
if (modifiedItems.indexOf(currentItem) < 0) {
|
|
1247
|
+
modifiedItems.push(currentItem);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
expandedItems.forEach(item => {
|
|
1253
|
+
if (preventedCollapseItem && item.id !== preventedCollapseItem.id) {
|
|
1254
|
+
item.expanded = false;
|
|
1255
|
+
if (isDevMode()) {
|
|
1256
|
+
const expandMode = PanelBarExpandMode[this.expandMode].toLowerCase();
|
|
1257
|
+
console.warn(`
|
|
1258
|
+
The ${expandMode} expandMode allows the expansion of only one item at a time.
|
|
1259
|
+
See https://www.telerik.com/kendo-angular-ui-develop/components/layout/panelbar/expand-modes/`);
|
|
1096
1260
|
}
|
|
1097
1261
|
}
|
|
1098
1262
|
});
|
|
1099
1263
|
}
|
|
1100
1264
|
}
|
|
1101
1265
|
if (modifiedItems.length > 0) {
|
|
1102
|
-
|
|
1266
|
+
let eventArgs = new PanelBarStateChangeEvent();
|
|
1267
|
+
eventArgs.items = modifiedItems.map(currentItem => currentItem.serialize());
|
|
1268
|
+
this.stateChange.emit(eventArgs);
|
|
1103
1269
|
}
|
|
1104
1270
|
}
|
|
1105
1271
|
isVisible(item) {
|
|
@@ -1125,16 +1291,16 @@ class PanelBarComponent {
|
|
|
1125
1291
|
currentIndex = visibleItems.findIndex(item => item === currentItem);
|
|
1126
1292
|
}
|
|
1127
1293
|
switch (action) {
|
|
1128
|
-
case
|
|
1294
|
+
case 'lastItem':
|
|
1129
1295
|
nextItem = visibleItems[visibleItems.length - 1];
|
|
1130
1296
|
break;
|
|
1131
|
-
case
|
|
1297
|
+
case 'firstItem':
|
|
1132
1298
|
nextItem = visibleItems[0];
|
|
1133
1299
|
break;
|
|
1134
|
-
case
|
|
1300
|
+
case 'nextItem':
|
|
1135
1301
|
nextItem = visibleItems[currentIndex < visibleItems.length - 1 ? currentIndex + 1 : 0];
|
|
1136
1302
|
break;
|
|
1137
|
-
case
|
|
1303
|
+
case 'previousItem':
|
|
1138
1304
|
nextItem = visibleItems[currentIndex > 0 ? currentIndex - 1 : visibleItems.length - 1];
|
|
1139
1305
|
break;
|
|
1140
1306
|
default:
|
|
@@ -1148,19 +1314,21 @@ class PanelBarComponent {
|
|
|
1148
1314
|
to.focused = true;
|
|
1149
1315
|
this.activeDescendant = to.itemId;
|
|
1150
1316
|
const modifiedItems = new Array(from.serialize(), to.serialize());
|
|
1151
|
-
|
|
1317
|
+
let eventArgs = new PanelBarStateChangeEvent();
|
|
1318
|
+
eventArgs.items = modifiedItems;
|
|
1319
|
+
this.stateChange.emit(eventArgs);
|
|
1152
1320
|
}
|
|
1153
1321
|
focusLastItem() {
|
|
1154
|
-
this.focusItem(
|
|
1322
|
+
this.focusItem('lastItem');
|
|
1155
1323
|
}
|
|
1156
1324
|
focusFirstItem() {
|
|
1157
|
-
this.focusItem(
|
|
1325
|
+
this.focusItem('firstItem');
|
|
1158
1326
|
}
|
|
1159
1327
|
focusNextItem() {
|
|
1160
|
-
this.focusItem(
|
|
1328
|
+
this.focusItem('nextItem');
|
|
1161
1329
|
}
|
|
1162
1330
|
focusPreviousItem() {
|
|
1163
|
-
this.focusItem(
|
|
1331
|
+
this.focusItem('previousItem');
|
|
1164
1332
|
}
|
|
1165
1333
|
expandItem() {
|
|
1166
1334
|
let currentItem = this.allItems.filter(item => item.focused)[0];
|
|
@@ -1213,7 +1381,7 @@ class PanelBarComponent {
|
|
|
1213
1381
|
}
|
|
1214
1382
|
}
|
|
1215
1383
|
PanelBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PanelBarComponent, deps: [{ token: i0.ElementRef }, { token: PanelBarService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1216
|
-
PanelBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PanelBarComponent, selector: "kendo-panelbar", inputs: { expandMode: "expandMode", selectable: "selectable", animate: "animate", height: "height", keepItemContent: "keepItemContent", items: "items" }, outputs: { stateChange: "stateChange" }, host: { listeners: { "click": "onComponentClick($event)", "focus": "onComponentFocus()", "blur": "onComponentBlur()", "keydown": "onComponentKeyDown($event)" }, properties: { "attr.tabIndex": "this.tabIndex", "attr.role": "this.role", "class.k-panelbar": "this.hostClass", "attr.aria-activedescendant": "this.activeDescendant", "style.height": "this.hostHeight", "style.overflow": "this.overflow", "attr.dir": "this.dir" } }, providers: [
|
|
1384
|
+
PanelBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PanelBarComponent, selector: "kendo-panelbar", inputs: { expandMode: "expandMode", selectable: "selectable", animate: "animate", height: "height", keepItemContent: "keepItemContent", items: "items" }, outputs: { stateChange: "stateChange", select: "select", expand: "expand", collapse: "collapse" }, host: { listeners: { "click": "onComponentClick($event)", "focus": "onComponentFocus()", "blur": "onComponentBlur()", "keydown": "onComponentKeyDown($event)" }, properties: { "attr.tabIndex": "this.tabIndex", "attr.role": "this.role", "class.k-panelbar": "this.hostClass", "attr.aria-activedescendant": "this.activeDescendant", "style.height": "this.hostHeight", "style.overflow": "this.overflow", "attr.dir": "this.dir" } }, providers: [
|
|
1217
1385
|
PanelBarService,
|
|
1218
1386
|
LocalizationService,
|
|
1219
1387
|
{
|
|
@@ -1225,17 +1393,17 @@ PanelBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
1225
1393
|
<ng-template [ngIf]="items?.length">
|
|
1226
1394
|
<ng-container *ngFor="let item of items">
|
|
1227
1395
|
<kendo-panelbar-item *ngIf="!item.hidden"
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1396
|
+
[title]="item.title"
|
|
1397
|
+
[id]="item.id"
|
|
1398
|
+
[icon]="item.icon"
|
|
1399
|
+
[iconClass]="item.iconClass"
|
|
1400
|
+
[imageUrl]="item.imageUrl"
|
|
1401
|
+
[selected]="!!item.selected"
|
|
1402
|
+
[expanded]="!!item.expanded"
|
|
1403
|
+
[disabled]="!!item.disabled"
|
|
1404
|
+
[template]="templateRef"
|
|
1405
|
+
[items]="item.children"
|
|
1406
|
+
[content]="item.content"
|
|
1239
1407
|
>
|
|
1240
1408
|
</kendo-panelbar-item>
|
|
1241
1409
|
</ng-container>
|
|
@@ -1259,17 +1427,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1259
1427
|
<ng-template [ngIf]="items?.length">
|
|
1260
1428
|
<ng-container *ngFor="let item of items">
|
|
1261
1429
|
<kendo-panelbar-item *ngIf="!item.hidden"
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1430
|
+
[title]="item.title"
|
|
1431
|
+
[id]="item.id"
|
|
1432
|
+
[icon]="item.icon"
|
|
1433
|
+
[iconClass]="item.iconClass"
|
|
1434
|
+
[imageUrl]="item.imageUrl"
|
|
1435
|
+
[selected]="!!item.selected"
|
|
1436
|
+
[expanded]="!!item.expanded"
|
|
1437
|
+
[disabled]="!!item.disabled"
|
|
1438
|
+
[template]="templateRef"
|
|
1439
|
+
[items]="item.children"
|
|
1440
|
+
[content]="item.content"
|
|
1273
1441
|
>
|
|
1274
1442
|
</kendo-panelbar-item>
|
|
1275
1443
|
</ng-container>
|
|
@@ -1290,6 +1458,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1290
1458
|
type: Input
|
|
1291
1459
|
}], stateChange: [{
|
|
1292
1460
|
type: Output
|
|
1461
|
+
}], select: [{
|
|
1462
|
+
type: Output
|
|
1463
|
+
}], expand: [{
|
|
1464
|
+
type: Output
|
|
1465
|
+
}], collapse: [{
|
|
1466
|
+
type: Output
|
|
1293
1467
|
}], tabIndex: [{
|
|
1294
1468
|
type: HostBinding,
|
|
1295
1469
|
args: ['attr.tabIndex']
|
|
@@ -2292,7 +2466,7 @@ class TabCloseEvent {
|
|
|
2292
2466
|
* Arguments for the `select` event of the TabStrip.
|
|
2293
2467
|
* The `select` event fires when a tab is selected (clicked).
|
|
2294
2468
|
*/
|
|
2295
|
-
class SelectEvent extends PreventableEvent {
|
|
2469
|
+
class SelectEvent extends PreventableEvent$1 {
|
|
2296
2470
|
/**
|
|
2297
2471
|
* Constructs the event arguments for the `select` event.
|
|
2298
2472
|
* @param index - The index of the selected tab.
|
|
@@ -2772,7 +2946,7 @@ const normalizeScrollableSettings = (settings) => normalizeSettings(settings ===
|
|
|
2772
2946
|
* The `tabScroll` event fires when the tabs are being scrolled.
|
|
2773
2947
|
*
|
|
2774
2948
|
*/
|
|
2775
|
-
class TabScrollEvent extends PreventableEvent {
|
|
2949
|
+
class TabScrollEvent extends PreventableEvent$1 {
|
|
2776
2950
|
/**
|
|
2777
2951
|
* @hidden
|
|
2778
2952
|
*/
|
|
@@ -3964,7 +4138,7 @@ const nestedLink = (element, selector) => element.querySelector(selector);
|
|
|
3964
4138
|
/**
|
|
3965
4139
|
* @hidden
|
|
3966
4140
|
*/
|
|
3967
|
-
class DrawerListSelectEvent extends PreventableEvent {
|
|
4141
|
+
class DrawerListSelectEvent extends PreventableEvent$1 {
|
|
3968
4142
|
/**
|
|
3969
4143
|
* @hidden
|
|
3970
4144
|
*/
|
|
@@ -4713,7 +4887,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4713
4887
|
/**
|
|
4714
4888
|
* Arguments for the `select` event of the Drawer.
|
|
4715
4889
|
*/
|
|
4716
|
-
class DrawerSelectEvent extends PreventableEvent {
|
|
4890
|
+
class DrawerSelectEvent extends PreventableEvent$1 {
|
|
4717
4891
|
/**
|
|
4718
4892
|
* @hidden
|
|
4719
4893
|
*/
|
|
@@ -4804,7 +4978,7 @@ handlersRTL[Keys.ArrowRight] = 'left';
|
|
|
4804
4978
|
/**
|
|
4805
4979
|
* @hidden
|
|
4806
4980
|
*/
|
|
4807
|
-
class StepperActivateEvent$1 extends PreventableEvent {
|
|
4981
|
+
class StepperActivateEvent$1 extends PreventableEvent$1 {
|
|
4808
4982
|
/**
|
|
4809
4983
|
* @hidden
|
|
4810
4984
|
*/
|
|
@@ -5750,7 +5924,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5750
5924
|
/**
|
|
5751
5925
|
* Arguments for the `activate` event of the Stepper.
|
|
5752
5926
|
*/
|
|
5753
|
-
class StepperActivateEvent extends PreventableEvent {
|
|
5927
|
+
class StepperActivateEvent extends PreventableEvent$1 {
|
|
5754
5928
|
/**
|
|
5755
5929
|
* @hidden
|
|
5756
5930
|
*/
|
|
@@ -5794,6 +5968,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5794
5968
|
}]
|
|
5795
5969
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
5796
5970
|
|
|
5971
|
+
const DEFAULT_ROUNDED = 'full';
|
|
5972
|
+
const DEFAULT_SIZE = 'medium';
|
|
5973
|
+
const DEFAULT_THEME_COLOR = 'primary';
|
|
5974
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
5797
5975
|
/**
|
|
5798
5976
|
* Displays images, icons or initials representing people or other entities.
|
|
5799
5977
|
*/
|
|
@@ -5806,10 +5984,10 @@ class AvatarComponent {
|
|
|
5806
5984
|
* Sets a border to the avatar.
|
|
5807
5985
|
*/
|
|
5808
5986
|
this.border = false;
|
|
5809
|
-
this._themeColor =
|
|
5810
|
-
this._size =
|
|
5811
|
-
this._fillMode =
|
|
5812
|
-
this._rounded =
|
|
5987
|
+
this._themeColor = DEFAULT_THEME_COLOR;
|
|
5988
|
+
this._size = DEFAULT_SIZE;
|
|
5989
|
+
this._fillMode = DEFAULT_FILL_MODE;
|
|
5990
|
+
this._rounded = DEFAULT_ROUNDED;
|
|
5813
5991
|
validatePackage(packageMetadata);
|
|
5814
5992
|
}
|
|
5815
5993
|
/**
|
|
@@ -5839,12 +6017,13 @@ class AvatarComponent {
|
|
|
5839
6017
|
* * `small`
|
|
5840
6018
|
* * `medium` (Default)
|
|
5841
6019
|
* * `large`
|
|
5842
|
-
*
|
|
6020
|
+
* * `none`
|
|
5843
6021
|
*/
|
|
5844
6022
|
set size(size) {
|
|
5845
6023
|
if (size !== this._size) {
|
|
5846
|
-
|
|
5847
|
-
this.
|
|
6024
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
6025
|
+
this.handleClasses('size', newSize);
|
|
6026
|
+
this._size = newSize;
|
|
5848
6027
|
}
|
|
5849
6028
|
}
|
|
5850
6029
|
get size() {
|
|
@@ -5859,13 +6038,13 @@ class AvatarComponent {
|
|
|
5859
6038
|
* * `medium`
|
|
5860
6039
|
* * `large`
|
|
5861
6040
|
* * `full` (Default)
|
|
5862
|
-
* *
|
|
5863
|
-
*
|
|
6041
|
+
* * `none`
|
|
5864
6042
|
*/
|
|
5865
6043
|
set rounded(rounded) {
|
|
5866
6044
|
if (rounded !== this._rounded) {
|
|
5867
|
-
|
|
5868
|
-
this.
|
|
6045
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
6046
|
+
this.handleClasses('rounded', newRounded);
|
|
6047
|
+
this._rounded = newRounded;
|
|
5869
6048
|
}
|
|
5870
6049
|
}
|
|
5871
6050
|
get rounded() {
|
|
@@ -5887,10 +6066,12 @@ class AvatarComponent {
|
|
|
5887
6066
|
* * `dark`— Applies coloring based on dark theme color.
|
|
5888
6067
|
* * `light`— Applies coloring based on light theme color.
|
|
5889
6068
|
* * `inverse`— Applies coloring based on inverted theme color.
|
|
6069
|
+
* * `none`— Removes the styling associated with the theme color.
|
|
5890
6070
|
*/
|
|
5891
6071
|
set themeColor(themeColor) {
|
|
5892
6072
|
if (themeColor !== this._themeColor) {
|
|
5893
|
-
|
|
6073
|
+
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR;
|
|
6074
|
+
this._themeColor = newThemeColor;
|
|
5894
6075
|
this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
|
|
5895
6076
|
}
|
|
5896
6077
|
}
|
|
@@ -5903,12 +6084,12 @@ class AvatarComponent {
|
|
|
5903
6084
|
* The possible values are:
|
|
5904
6085
|
* * `solid` (Default)
|
|
5905
6086
|
* * `outline`
|
|
5906
|
-
* *
|
|
5907
|
-
*
|
|
6087
|
+
* * `none`
|
|
5908
6088
|
*/
|
|
5909
6089
|
set fillMode(fillMode) {
|
|
5910
6090
|
if (fillMode !== this.fillMode) {
|
|
5911
|
-
|
|
6091
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
6092
|
+
this._fillMode = newFillMode;
|
|
5912
6093
|
this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
|
|
5913
6094
|
}
|
|
5914
6095
|
}
|
|
@@ -5996,11 +6177,11 @@ class AvatarComponent {
|
|
|
5996
6177
|
});
|
|
5997
6178
|
classesToRemove.forEach((cl => this.renderer.removeClass(wrapperElement, cl)));
|
|
5998
6179
|
// add fill if needed
|
|
5999
|
-
if (fill !==
|
|
6180
|
+
if (fill !== 'none') {
|
|
6000
6181
|
this.renderer.addClass(wrapperElement, `k-avatar-${fill}`);
|
|
6001
6182
|
}
|
|
6002
6183
|
// add theme color class if fill and theme color
|
|
6003
|
-
if (fill !==
|
|
6184
|
+
if (fill !== 'none' && themeColor !== 'none') {
|
|
6004
6185
|
this.renderer.addClass(wrapperElement, `k-avatar-${fill}-${themeColor}`);
|
|
6005
6186
|
}
|
|
6006
6187
|
}
|
|
@@ -6553,7 +6734,7 @@ function collapse(duration, height) {
|
|
|
6553
6734
|
/**
|
|
6554
6735
|
* Arguments for the `action` event of the ExpansionPanel.
|
|
6555
6736
|
*/
|
|
6556
|
-
class ExpansionPanelActionEvent extends PreventableEvent {
|
|
6737
|
+
class ExpansionPanelActionEvent extends PreventableEvent$1 {
|
|
6557
6738
|
/**
|
|
6558
6739
|
* @hidden
|
|
6559
6740
|
*/
|
|
@@ -7126,7 +7307,7 @@ const HINT_BORDERS_HEIGHT = 2;
|
|
|
7126
7307
|
* Arguments for the `reorder` event. The event fires when the order or starting
|
|
7127
7308
|
* positions of the items is changed via the UI. If you prevent the event, the change is canceled ([see example]({% slug reordering_tilelayout %}#toc-handling-the-reorder-event)).
|
|
7128
7309
|
*/
|
|
7129
|
-
class TileLayoutReorderEvent extends PreventableEvent {
|
|
7310
|
+
class TileLayoutReorderEvent extends PreventableEvent$1 {
|
|
7130
7311
|
/**
|
|
7131
7312
|
* Constructs the event arguments for the `reorder` event.
|
|
7132
7313
|
* @param item - The TileLayoutItem being reordered.
|
|
@@ -7156,7 +7337,7 @@ class TileLayoutReorderEvent extends PreventableEvent {
|
|
|
7156
7337
|
* Arguments for the `resize` event. The `resize` event fires when any item size
|
|
7157
7338
|
* is changed from the UI. If you cancel the event, the change is prevented ([see example]({% slug resizing_tilelayout %}#toc-handling-the-resize-event)).
|
|
7158
7339
|
*/
|
|
7159
|
-
class TileLayoutResizeEvent extends PreventableEvent {
|
|
7340
|
+
class TileLayoutResizeEvent extends PreventableEvent$1 {
|
|
7160
7341
|
/**
|
|
7161
7342
|
* Constructs the event arguments for the `resize` event.
|
|
7162
7343
|
* @param item - The TileLayoutItem being resized
|
|
@@ -9063,5 +9244,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
9063
9244
|
* Generated bundle index. Do not edit.
|
|
9064
9245
|
*/
|
|
9065
9246
|
|
|
9066
|
-
export { AvatarComponent, AvatarModule, CardAction, CardActionsComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardMediaDirective, CardModule, CardSeparatorDirective, CardSubtitleDirective, CardTitleDirective, DrawerComponent, DrawerContainerComponent, DrawerContentComponent, DrawerFooterTemplateDirective, DrawerHeaderTemplateDirective, DrawerItemTemplateDirective, DrawerModule, DrawerSelectEvent, DrawerTemplateDirective, ExpansionPanelActionEvent, ExpansionPanelComponent, ExpansionPanelModule, ExpansionPanelTitleDirective, GridLayoutComponent, GridLayoutItemComponent, GridLayoutModule, LayoutModule, LocalizedStepperMessagesDirective, LocalizedTabStripMessagesDirective, PanelBarComponent, PanelBarContentDirective, PanelBarExpandMode, PanelBarItemComponent, PanelBarItemTemplateDirective, PanelBarItemTitleDirective, PanelBarModule, SelectEvent, SplitterComponent, SplitterModule, SplitterPaneComponent, StackLayoutComponent, StackLayoutModule, StepperActivateEvent, StepperComponent, StepperCustomMessagesComponent, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperModule, StepperStepTemplateDirective, TabCloseEvent, TabComponent, TabContentDirective, TabStripComponent, TabStripCustomMessagesComponent, TabStripModule, TabStripTabComponent, TabTitleDirective, TileLayoutComponent, TileLayoutItemBodyComponent, TileLayoutItemComponent, TileLayoutItemHeaderComponent, TileLayoutModule, TileLayoutReorderEvent, TileLayoutResizeEvent, TileLayoutResizeHandleDirective };
|
|
9247
|
+
export { AvatarComponent, AvatarModule, CardAction, CardActionsComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardMediaDirective, CardModule, CardSeparatorDirective, CardSubtitleDirective, CardTitleDirective, DrawerComponent, DrawerContainerComponent, DrawerContentComponent, DrawerFooterTemplateDirective, DrawerHeaderTemplateDirective, DrawerItemTemplateDirective, DrawerModule, DrawerSelectEvent, DrawerTemplateDirective, ExpansionPanelActionEvent, ExpansionPanelComponent, ExpansionPanelModule, ExpansionPanelTitleDirective, GridLayoutComponent, GridLayoutItemComponent, GridLayoutModule, LayoutModule, LocalizedStepperMessagesDirective, LocalizedTabStripMessagesDirective, PanelBarCollapseEvent, PanelBarComponent, PanelBarContentDirective, PanelBarExpandEvent, PanelBarExpandMode, PanelBarItemComponent, PanelBarItemTemplateDirective, PanelBarItemTitleDirective, PanelBarModule, PanelBarSelectEvent, PanelBarStateChangeEvent, SelectEvent, SplitterComponent, SplitterModule, SplitterPaneComponent, StackLayoutComponent, StackLayoutModule, StepperActivateEvent, StepperComponent, StepperCustomMessagesComponent, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperModule, StepperStepTemplateDirective, TabCloseEvent, TabComponent, TabContentDirective, TabStripComponent, TabStripCustomMessagesComponent, TabStripModule, TabStripTabComponent, TabTitleDirective, TileLayoutComponent, TileLayoutItemBodyComponent, TileLayoutItemComponent, TileLayoutItemHeaderComponent, TileLayoutModule, TileLayoutReorderEvent, TileLayoutResizeEvent, TileLayoutResizeHandleDirective };
|
|
9067
9248
|
|