@progress/kendo-angular-menu 25.0.0-develop.1 → 25.0.0-develop.3
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/fesm2022/progress-kendo-angular-menu.mjs +670 -157
- package/index.d.ts +266 -99
- package/package-metadata.mjs +2 -2
- package/package.json +7 -7
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, NgZone, EventEmitter, Optional, Directive, ContentChildren, Input, Component, ElementRef, forwardRef, HostBinding, ViewChild, Output, isDevMode, ContentChild, NgModule } from '@angular/core';
|
|
6
|
+
import { Injectable, NgZone, EventEmitter, Optional, Directive, signal, ContentChildren, Input, ChangeDetectionStrategy, Component, ElementRef, inject, DestroyRef, forwardRef, HostBinding, ViewChild, Output, isDevMode, effect, ContentChild, NgModule } from '@angular/core';
|
|
7
7
|
import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';
|
|
8
8
|
import * as i3 from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { PreventableEvent as PreventableEvent$1, hasObservers, Keys, normalizeKeys, isDocumentAvailable, isPresent, parseCSSClassNames, KENDO_WEBMCP_HOST, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
13
|
import { chevronDownIcon, chevronLeftIcon, chevronRightIcon } from '@progress/kendo-svg-icons';
|
|
13
14
|
import * as i5 from '@progress/kendo-angular-popup';
|
|
14
15
|
import { PopupService, POPUP_CONTAINER } from '@progress/kendo-angular-popup';
|
|
@@ -22,8 +23,8 @@ const packageMetadata = {
|
|
|
22
23
|
productName: 'Kendo UI for Angular',
|
|
23
24
|
productCode: 'KENDOUIANGULAR',
|
|
24
25
|
productCodes: ['KENDOUIANGULAR'],
|
|
25
|
-
publishDate:
|
|
26
|
-
version: '25.0.0-develop.
|
|
26
|
+
publishDate: 1783692407,
|
|
27
|
+
version: '25.0.0-develop.3',
|
|
27
28
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -708,13 +709,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
708
709
|
type: Injectable
|
|
709
710
|
}], ctorParameters: () => [{ type: ActionsService }, { type: ItemsService }] });
|
|
710
711
|
|
|
711
|
-
/**
|
|
712
|
-
* @hidden
|
|
713
|
-
*/
|
|
714
|
-
const normalize = (settings) => settings && Object.assign({
|
|
715
|
-
toggle: 'select'
|
|
716
|
-
}, settings);
|
|
717
|
-
|
|
718
712
|
/**
|
|
719
713
|
* @hidden
|
|
720
714
|
*/
|
|
@@ -1034,15 +1028,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1034
1028
|
* Supported children components are: {@link MenuItemComponent}.
|
|
1035
1029
|
*/
|
|
1036
1030
|
class MenuItemComponent {
|
|
1037
|
-
text
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1031
|
+
set text(value) {
|
|
1032
|
+
this._text.set(value);
|
|
1033
|
+
}
|
|
1034
|
+
get text() {
|
|
1035
|
+
return this._text();
|
|
1036
|
+
}
|
|
1037
|
+
set url(value) {
|
|
1038
|
+
this._url.set(value);
|
|
1039
|
+
}
|
|
1040
|
+
get url() {
|
|
1041
|
+
return this._url();
|
|
1042
|
+
}
|
|
1043
|
+
set disabled(value) {
|
|
1044
|
+
this._disabled.set(value);
|
|
1045
|
+
}
|
|
1046
|
+
get disabled() {
|
|
1047
|
+
return this._disabled();
|
|
1048
|
+
}
|
|
1049
|
+
set cssClass(value) {
|
|
1050
|
+
this._cssClass.set(value);
|
|
1051
|
+
}
|
|
1052
|
+
get cssClass() {
|
|
1053
|
+
return this._cssClass();
|
|
1054
|
+
}
|
|
1055
|
+
set cssStyle(value) {
|
|
1056
|
+
this._cssStyle.set(value);
|
|
1057
|
+
}
|
|
1058
|
+
get cssStyle() {
|
|
1059
|
+
return this._cssStyle();
|
|
1060
|
+
}
|
|
1061
|
+
set icon(value) {
|
|
1062
|
+
this._icon.set(value);
|
|
1063
|
+
}
|
|
1064
|
+
get icon() {
|
|
1065
|
+
return this._icon();
|
|
1066
|
+
}
|
|
1067
|
+
set svgIcon(value) {
|
|
1068
|
+
this._svgIcon.set(value);
|
|
1069
|
+
}
|
|
1070
|
+
get svgIcon() {
|
|
1071
|
+
return this._svgIcon();
|
|
1072
|
+
}
|
|
1073
|
+
set data(value) {
|
|
1074
|
+
this._data.set(value);
|
|
1075
|
+
}
|
|
1076
|
+
get data() {
|
|
1077
|
+
return this._data();
|
|
1078
|
+
}
|
|
1079
|
+
set separator(value) {
|
|
1080
|
+
this._separator.set(value);
|
|
1081
|
+
}
|
|
1082
|
+
get separator() {
|
|
1083
|
+
return this._separator();
|
|
1084
|
+
}
|
|
1046
1085
|
/**
|
|
1047
1086
|
* @hidden
|
|
1048
1087
|
*/
|
|
@@ -1091,15 +1130,25 @@ class MenuItemComponent {
|
|
|
1091
1130
|
return this.children.toArray().filter(c => c !== this);
|
|
1092
1131
|
}
|
|
1093
1132
|
}
|
|
1133
|
+
_text = signal(undefined, ...(ngDevMode ? [{ debugName: "_text" }] : []));
|
|
1134
|
+
_url = signal(undefined, ...(ngDevMode ? [{ debugName: "_url" }] : []));
|
|
1135
|
+
_disabled = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
1136
|
+
_cssClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_cssClass" }] : []));
|
|
1137
|
+
_cssStyle = signal(undefined, ...(ngDevMode ? [{ debugName: "_cssStyle" }] : []));
|
|
1138
|
+
_icon = signal(undefined, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
|
|
1139
|
+
_svgIcon = signal(undefined, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
|
|
1140
|
+
_data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
1141
|
+
_separator = signal(undefined, ...(ngDevMode ? [{ debugName: "_separator" }] : []));
|
|
1094
1142
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1095
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: MenuItemComponent, isStandalone: true, selector: "kendo-menu-item", inputs: { text: "text", url: "url", disabled: "disabled", cssClass: "cssClass", cssStyle: "cssStyle", icon: "icon", svgIcon: "svgIcon", data: "data", separator: "separator" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "itemContentTemplate", predicate: ItemContentTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
|
|
1143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: MenuItemComponent, isStandalone: true, selector: "kendo-menu-item", inputs: { text: "text", url: "url", disabled: "disabled", cssClass: "cssClass", cssStyle: "cssStyle", icon: "icon", svgIcon: "svgIcon", data: "data", separator: "separator" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "itemContentTemplate", predicate: ItemContentTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1096
1144
|
}
|
|
1097
1145
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
1098
1146
|
type: Component,
|
|
1099
1147
|
args: [{
|
|
1100
1148
|
selector: 'kendo-menu-item',
|
|
1101
1149
|
template: ``,
|
|
1102
|
-
standalone: true
|
|
1150
|
+
standalone: true,
|
|
1151
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1103
1152
|
}]
|
|
1104
1153
|
}], propDecorators: { text: [{
|
|
1105
1154
|
type: Input
|
|
@@ -1188,26 +1237,51 @@ class MenuBase {
|
|
|
1188
1237
|
/**
|
|
1189
1238
|
* Specifies the Menu items.
|
|
1190
1239
|
*/
|
|
1191
|
-
items
|
|
1240
|
+
set items(value) {
|
|
1241
|
+
this._items.set(value);
|
|
1242
|
+
}
|
|
1243
|
+
get items() {
|
|
1244
|
+
return this._items();
|
|
1245
|
+
}
|
|
1192
1246
|
/**
|
|
1193
1247
|
* Specifies if the Menu will be vertical ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/vertical)).
|
|
1194
1248
|
*/
|
|
1195
|
-
vertical
|
|
1249
|
+
set vertical(value) {
|
|
1250
|
+
this._vertical.set(value);
|
|
1251
|
+
}
|
|
1252
|
+
get vertical() {
|
|
1253
|
+
return this._vertical();
|
|
1254
|
+
}
|
|
1196
1255
|
/**
|
|
1197
1256
|
* Specifies that the root items can be opened only on click
|
|
1198
1257
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/open-close#opening-on-click)).
|
|
1199
1258
|
*/
|
|
1200
|
-
openOnClick
|
|
1259
|
+
set openOnClick(value) {
|
|
1260
|
+
this._openOnClick.set(value);
|
|
1261
|
+
}
|
|
1262
|
+
get openOnClick() {
|
|
1263
|
+
return this._openOnClick();
|
|
1264
|
+
}
|
|
1201
1265
|
/**
|
|
1202
1266
|
* Specifies the delay in milliseconds before the Menu items are opened or closed on item hover
|
|
1203
1267
|
* or leave ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/open-close#delay-on-hover)). Used to avoid the accidental
|
|
1204
1268
|
* opening or closing of the items.
|
|
1205
1269
|
*/
|
|
1206
|
-
hoverDelay
|
|
1270
|
+
set hoverDelay(value) {
|
|
1271
|
+
this._hoverDelay.set(value);
|
|
1272
|
+
}
|
|
1273
|
+
get hoverDelay() {
|
|
1274
|
+
return this._hoverDelay();
|
|
1275
|
+
}
|
|
1207
1276
|
/**
|
|
1208
1277
|
* Sets the Menu animation.
|
|
1209
1278
|
*/
|
|
1210
|
-
animate
|
|
1279
|
+
set animate(value) {
|
|
1280
|
+
this._animate.set(value);
|
|
1281
|
+
}
|
|
1282
|
+
get animate() {
|
|
1283
|
+
return this._animate();
|
|
1284
|
+
}
|
|
1211
1285
|
/**
|
|
1212
1286
|
* Sets the Menu size.
|
|
1213
1287
|
*
|
|
@@ -1217,17 +1291,32 @@ class MenuBase {
|
|
|
1217
1291
|
* * `large`
|
|
1218
1292
|
*
|
|
1219
1293
|
*/
|
|
1220
|
-
size
|
|
1294
|
+
set size(value) {
|
|
1295
|
+
this._size.set(value);
|
|
1296
|
+
}
|
|
1297
|
+
get size() {
|
|
1298
|
+
return this._size();
|
|
1299
|
+
}
|
|
1221
1300
|
/**
|
|
1222
1301
|
* Configures the popup settings for the Menu items.
|
|
1223
1302
|
* Allows customization of the popup class and margin.
|
|
1224
1303
|
*/
|
|
1225
|
-
popupSettings
|
|
1304
|
+
set popupSettings(value) {
|
|
1305
|
+
this._popupSettings.set(value);
|
|
1306
|
+
}
|
|
1307
|
+
get popupSettings() {
|
|
1308
|
+
return this._popupSettings();
|
|
1309
|
+
}
|
|
1226
1310
|
/**
|
|
1227
|
-
* Defines a function that determines how to track
|
|
1311
|
+
* Defines a function that determines how to track for the menu items.
|
|
1228
1312
|
* By default, the component tracks changes by index.
|
|
1229
1313
|
*/
|
|
1230
|
-
trackBy
|
|
1314
|
+
set trackBy(value) {
|
|
1315
|
+
this._trackBy.set(value);
|
|
1316
|
+
}
|
|
1317
|
+
get trackBy() {
|
|
1318
|
+
return this._trackBy();
|
|
1319
|
+
}
|
|
1231
1320
|
/**
|
|
1232
1321
|
* @hidden
|
|
1233
1322
|
*/
|
|
@@ -1240,20 +1329,37 @@ class MenuBase {
|
|
|
1240
1329
|
* @hidden
|
|
1241
1330
|
*/
|
|
1242
1331
|
children;
|
|
1332
|
+
_items = signal(undefined, ...(ngDevMode ? [{ debugName: "_items" }] : []));
|
|
1333
|
+
_vertical = signal(false, ...(ngDevMode ? [{ debugName: "_vertical" }] : []));
|
|
1334
|
+
_openOnClick = signal(false, ...(ngDevMode ? [{ debugName: "_openOnClick" }] : []));
|
|
1335
|
+
_hoverDelay = signal(100, ...(ngDevMode ? [{ debugName: "_hoverDelay" }] : []));
|
|
1336
|
+
_animate = signal(true, ...(ngDevMode ? [{ debugName: "_animate" }] : []));
|
|
1337
|
+
_size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
1338
|
+
_popupSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
|
|
1339
|
+
_trackBy = signal(defaultTrackBy, ...(ngDevMode ? [{ debugName: "_trackBy" }] : []));
|
|
1340
|
+
_children = signal([], ...(ngDevMode ? [{ debugName: "_children" }] : []));
|
|
1341
|
+
destroyRef = inject(DestroyRef);
|
|
1342
|
+
ngAfterContentInit() {
|
|
1343
|
+
this._children.set(this.children.toArray());
|
|
1344
|
+
this.children.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1345
|
+
this._children.set(this.children.toArray());
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1243
1348
|
/**
|
|
1244
1349
|
* @hidden
|
|
1245
1350
|
*/
|
|
1246
1351
|
get rootItems() {
|
|
1247
|
-
return this.
|
|
1352
|
+
return this._items() || this._children();
|
|
1248
1353
|
}
|
|
1249
1354
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MenuBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1250
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: MenuBase, isStandalone: true, selector: "kendo-menu-base", inputs: { items: "items", vertical: "vertical", openOnClick: "openOnClick", hoverDelay: "hoverDelay", animate: "animate", size: "size", popupSettings: "popupSettings", trackBy: "trackBy" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
|
|
1355
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: MenuBase, isStandalone: true, selector: "kendo-menu-base", inputs: { items: "items", vertical: "vertical", openOnClick: "openOnClick", hoverDelay: "hoverDelay", animate: "animate", size: "size", popupSettings: "popupSettings", trackBy: "trackBy" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1251
1356
|
}
|
|
1252
1357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MenuBase, decorators: [{
|
|
1253
1358
|
type: Component,
|
|
1254
1359
|
args: [{
|
|
1255
1360
|
selector: 'kendo-menu-base',
|
|
1256
|
-
template:
|
|
1361
|
+
template: ``,
|
|
1362
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1257
1363
|
}]
|
|
1258
1364
|
}], propDecorators: { items: [{
|
|
1259
1365
|
type: Input
|
|
@@ -1364,20 +1470,98 @@ class ListComponent {
|
|
|
1364
1470
|
renderer;
|
|
1365
1471
|
ngZone;
|
|
1366
1472
|
element;
|
|
1367
|
-
appendTo
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1473
|
+
set appendTo(value) {
|
|
1474
|
+
this._appendTo.set(value);
|
|
1475
|
+
}
|
|
1476
|
+
get appendTo() {
|
|
1477
|
+
return this._appendTo();
|
|
1478
|
+
}
|
|
1479
|
+
set items(value) {
|
|
1480
|
+
this._items.set(value);
|
|
1481
|
+
}
|
|
1482
|
+
get items() {
|
|
1483
|
+
return this._items();
|
|
1484
|
+
}
|
|
1485
|
+
set level(value) {
|
|
1486
|
+
this._level.set(value);
|
|
1487
|
+
}
|
|
1488
|
+
get level() {
|
|
1489
|
+
return this._level();
|
|
1490
|
+
}
|
|
1491
|
+
set index(value) {
|
|
1492
|
+
this._index.set(value);
|
|
1493
|
+
}
|
|
1494
|
+
get index() {
|
|
1495
|
+
return this._index();
|
|
1496
|
+
}
|
|
1497
|
+
set animate(value) {
|
|
1498
|
+
this._animate.set(value);
|
|
1499
|
+
}
|
|
1500
|
+
get animate() {
|
|
1501
|
+
return this._animate();
|
|
1502
|
+
}
|
|
1503
|
+
set size(value) {
|
|
1504
|
+
this._size.set(value);
|
|
1505
|
+
}
|
|
1506
|
+
get size() {
|
|
1507
|
+
return this._size();
|
|
1508
|
+
}
|
|
1509
|
+
set vertical(value) {
|
|
1510
|
+
this._vertical.set(value);
|
|
1511
|
+
}
|
|
1512
|
+
get vertical() {
|
|
1513
|
+
return this._vertical();
|
|
1514
|
+
}
|
|
1515
|
+
set rtl(value) {
|
|
1516
|
+
this._rtl.set(value);
|
|
1517
|
+
}
|
|
1518
|
+
get rtl() {
|
|
1519
|
+
return this._rtl();
|
|
1520
|
+
}
|
|
1521
|
+
set openOnClick(value) {
|
|
1522
|
+
this._openOnClick.set(value);
|
|
1523
|
+
}
|
|
1524
|
+
get openOnClick() {
|
|
1525
|
+
return this._openOnClick();
|
|
1526
|
+
}
|
|
1527
|
+
set itemTemplate(value) {
|
|
1528
|
+
this._itemTemplate.set(value);
|
|
1529
|
+
}
|
|
1530
|
+
get itemTemplate() {
|
|
1531
|
+
return this._itemTemplate();
|
|
1532
|
+
}
|
|
1533
|
+
set itemLinkTemplate(value) {
|
|
1534
|
+
this._itemLinkTemplate.set(value);
|
|
1535
|
+
}
|
|
1536
|
+
get itemLinkTemplate() {
|
|
1537
|
+
return this._itemLinkTemplate();
|
|
1538
|
+
}
|
|
1539
|
+
set popupSettings(value) {
|
|
1540
|
+
this._popupSettings.set(value);
|
|
1541
|
+
}
|
|
1542
|
+
get popupSettings() {
|
|
1543
|
+
return this._popupSettings();
|
|
1544
|
+
}
|
|
1545
|
+
set trackBy(value) {
|
|
1546
|
+
this._trackBy.set(value);
|
|
1547
|
+
}
|
|
1548
|
+
get trackBy() {
|
|
1549
|
+
return this._trackBy();
|
|
1550
|
+
}
|
|
1380
1551
|
domSubscriptions;
|
|
1552
|
+
_appendTo = signal(undefined, ...(ngDevMode ? [{ debugName: "_appendTo" }] : []));
|
|
1553
|
+
_items = signal(undefined, ...(ngDevMode ? [{ debugName: "_items" }] : []));
|
|
1554
|
+
_level = signal(undefined, ...(ngDevMode ? [{ debugName: "_level" }] : []));
|
|
1555
|
+
_index = signal(undefined, ...(ngDevMode ? [{ debugName: "_index" }] : []));
|
|
1556
|
+
_animate = signal(true, ...(ngDevMode ? [{ debugName: "_animate" }] : []));
|
|
1557
|
+
_size = signal('medium', ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
1558
|
+
_vertical = signal(undefined, ...(ngDevMode ? [{ debugName: "_vertical" }] : []));
|
|
1559
|
+
_rtl = signal(undefined, ...(ngDevMode ? [{ debugName: "_rtl" }] : []));
|
|
1560
|
+
_openOnClick = signal(undefined, ...(ngDevMode ? [{ debugName: "_openOnClick" }] : []));
|
|
1561
|
+
_itemTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_itemTemplate" }] : []));
|
|
1562
|
+
_itemLinkTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_itemLinkTemplate" }] : []));
|
|
1563
|
+
_popupSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
|
|
1564
|
+
_trackBy = signal(undefined, ...(ngDevMode ? [{ debugName: "_trackBy" }] : []));
|
|
1381
1565
|
constructor(itemsService, hover, actions, navigation, renderer, ngZone, element) {
|
|
1382
1566
|
this.itemsService = itemsService;
|
|
1383
1567
|
this.hover = hover;
|
|
@@ -1443,13 +1627,11 @@ class ListComponent {
|
|
|
1443
1627
|
const touchSubscription = this.renderer.listen(document, 'touchstart', (e) => {
|
|
1444
1628
|
if (inMenu(e.target, this.itemsService)) {
|
|
1445
1629
|
const item = this.nodeItem(e.target);
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
this.hover.over(item);
|
|
1452
|
-
}
|
|
1630
|
+
// Needs to be called because the 'click' handler will be called only on secondary tap and the item will remain unfocused
|
|
1631
|
+
this.navigation.focus(item);
|
|
1632
|
+
// This is needed since the 'mouseover' event is not always dispatched
|
|
1633
|
+
if (!item.opened) {
|
|
1634
|
+
this.hover.over(item);
|
|
1453
1635
|
}
|
|
1454
1636
|
}
|
|
1455
1637
|
else if (this.navigation.focusedIdx) {
|
|
@@ -1533,7 +1715,7 @@ class ListComponent {
|
|
|
1533
1715
|
this.actions.execute();
|
|
1534
1716
|
}
|
|
1535
1717
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ListComponent, deps: [{ token: ItemsService }, { token: HoverService }, { token: ActionsService }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1536
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ListComponent, isStandalone: true, selector: "[kendoMenuList]", inputs: { appendTo: "appendTo", items: "items", level: "level", index: "index", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate", popupSettings: "popupSettings", trackBy: "trackBy" }, ngImport: i0, template: "\n @for (item of items; track trackByWrapper($index, item); let idx = $index) {\n @if (!item.separator) {\n <li\n kendoMenuItem\n [appendTo]=\"appendTo\"\n [item]=\"item\"\n [level]=\"level\"\n [size]=\"size\"\n [vertical]=\"vertical\"\n [animate]=\"animate\"\n [rtl]=\"rtl\"\n [itemTemplate]=\"itemTemplate\"\n [itemLinkTemplate]=\"itemLinkTemplate\"\n [popupSettings]=\"popupSettings\"\n [trackBy]=\"trackBy\"\n [openOnClick]=\"openOnClick\"\n [index]=\"hierarchyIndex(idx)\"\n [siblingIndex]=\"idx\"\n [attr.data-kendo-menu-index]=\"hierarchyIndex(idx)\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n role=\"menuitem\"\n class=\"k-item k-menu-item\"\n [class.k-first]=\"idx === 0\"\n [class.k-last]=\"idx === items.length - 1\"\n [class.k-disabled]=\"item.disabled\"></li>\n }\n @if (item.separator) {\n <li\n class=\"k-separator k-item\"\n [ngClass]=\"item.cssClass\"\n aria-hidden=\"true\"\n [ngStyle]=\"item.cssStyle\">\n \n </li>\n }\n }\n ", isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => ItemComponent), selector: "[kendoMenuItem]", inputs: ["appendTo", "item", "level", "index", "siblingIndex", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate", "popupSettings", "trackBy"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1718
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ListComponent, isStandalone: true, selector: "[kendoMenuList]", inputs: { appendTo: "appendTo", items: "items", level: "level", index: "index", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate", popupSettings: "popupSettings", trackBy: "trackBy" }, ngImport: i0, template: "\n @for (item of items; track trackByWrapper($index, item); let idx = $index) {\n @if (!item.separator) {\n <li\n kendoMenuItem\n [appendTo]=\"appendTo\"\n [item]=\"item\"\n [level]=\"level\"\n [size]=\"size\"\n [vertical]=\"vertical\"\n [animate]=\"animate\"\n [rtl]=\"rtl\"\n [itemTemplate]=\"itemTemplate\"\n [itemLinkTemplate]=\"itemLinkTemplate\"\n [popupSettings]=\"popupSettings\"\n [trackBy]=\"trackBy\"\n [openOnClick]=\"openOnClick\"\n [index]=\"hierarchyIndex(idx)\"\n [siblingIndex]=\"idx\"\n [attr.data-kendo-menu-index]=\"hierarchyIndex(idx)\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n role=\"menuitem\"\n class=\"k-item k-menu-item\"\n [class.k-first]=\"idx === 0\"\n [class.k-last]=\"idx === items.length - 1\"\n [class.k-disabled]=\"item.disabled\"></li>\n }\n @if (item.separator) {\n <li\n class=\"k-separator k-item\"\n [ngClass]=\"item.cssClass\"\n aria-hidden=\"true\"\n [ngStyle]=\"item.cssStyle\">\n \n </li>\n }\n }\n ", isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => ItemComponent), selector: "[kendoMenuItem]", inputs: ["appendTo", "item", "level", "index", "siblingIndex", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate", "popupSettings", "trackBy"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1537
1719
|
}
|
|
1538
1720
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ListComponent, decorators: [{
|
|
1539
1721
|
type: Component,
|
|
@@ -1579,7 +1761,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1579
1761
|
}
|
|
1580
1762
|
`,
|
|
1581
1763
|
standalone: true,
|
|
1582
|
-
imports: [forwardRef(() => ItemComponent), NgClass, NgStyle]
|
|
1764
|
+
imports: [forwardRef(() => ItemComponent), NgClass, NgStyle],
|
|
1765
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1583
1766
|
}]
|
|
1584
1767
|
}], ctorParameters: () => [{ type: ItemsService }, { type: HoverService }, { type: ActionsService }, { type: NavigationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ElementRef }], propDecorators: { appendTo: [{
|
|
1585
1768
|
type: Input
|
|
@@ -1614,14 +1797,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1614
1797
|
class ItemComponent {
|
|
1615
1798
|
itemsService;
|
|
1616
1799
|
navigation;
|
|
1617
|
-
changeDetector;
|
|
1618
1800
|
renderer;
|
|
1619
1801
|
popupService;
|
|
1620
1802
|
element;
|
|
1621
1803
|
contextService;
|
|
1622
|
-
appendTo
|
|
1623
|
-
|
|
1624
|
-
|
|
1804
|
+
set appendTo(value) {
|
|
1805
|
+
this._appendTo.set(value);
|
|
1806
|
+
}
|
|
1807
|
+
get appendTo() {
|
|
1808
|
+
return this._appendTo();
|
|
1809
|
+
}
|
|
1810
|
+
set item(value) {
|
|
1811
|
+
const prev = this._item();
|
|
1812
|
+
this._item.set(value);
|
|
1813
|
+
if (prev && prev !== value && this.opened) {
|
|
1814
|
+
this.close();
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
get item() {
|
|
1818
|
+
return this._item();
|
|
1819
|
+
}
|
|
1820
|
+
set level(value) {
|
|
1821
|
+
this._level.set(value);
|
|
1822
|
+
}
|
|
1823
|
+
get level() {
|
|
1824
|
+
return this._level();
|
|
1825
|
+
}
|
|
1625
1826
|
set index(index) {
|
|
1626
1827
|
if (this._index && this._index !== index) {
|
|
1627
1828
|
this.itemsService.remove(this);
|
|
@@ -1636,16 +1837,66 @@ class ItemComponent {
|
|
|
1636
1837
|
get index() {
|
|
1637
1838
|
return this._index;
|
|
1638
1839
|
}
|
|
1639
|
-
siblingIndex
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1840
|
+
set siblingIndex(value) {
|
|
1841
|
+
this._siblingIndex.set(value);
|
|
1842
|
+
}
|
|
1843
|
+
get siblingIndex() {
|
|
1844
|
+
return this._siblingIndex();
|
|
1845
|
+
}
|
|
1846
|
+
set animate(value) {
|
|
1847
|
+
this._animate.set(value);
|
|
1848
|
+
}
|
|
1849
|
+
get animate() {
|
|
1850
|
+
return this._animate();
|
|
1851
|
+
}
|
|
1852
|
+
set size(value) {
|
|
1853
|
+
this._size.set(value);
|
|
1854
|
+
}
|
|
1855
|
+
get size() {
|
|
1856
|
+
return this._size();
|
|
1857
|
+
}
|
|
1858
|
+
set vertical(value) {
|
|
1859
|
+
this._vertical.set(value);
|
|
1860
|
+
}
|
|
1861
|
+
get vertical() {
|
|
1862
|
+
return this._vertical();
|
|
1863
|
+
}
|
|
1864
|
+
set rtl(value) {
|
|
1865
|
+
this._rtl.set(value);
|
|
1866
|
+
}
|
|
1867
|
+
get rtl() {
|
|
1868
|
+
return this._rtl();
|
|
1869
|
+
}
|
|
1870
|
+
set openOnClick(value) {
|
|
1871
|
+
this._openOnClick.set(value);
|
|
1872
|
+
}
|
|
1873
|
+
get openOnClick() {
|
|
1874
|
+
return this._openOnClick();
|
|
1875
|
+
}
|
|
1876
|
+
set itemTemplate(value) {
|
|
1877
|
+
this._itemTemplate.set(value);
|
|
1878
|
+
}
|
|
1879
|
+
get itemTemplate() {
|
|
1880
|
+
return this._itemTemplate();
|
|
1881
|
+
}
|
|
1882
|
+
set itemLinkTemplate(value) {
|
|
1883
|
+
this._itemLinkTemplate.set(value);
|
|
1884
|
+
}
|
|
1885
|
+
get itemLinkTemplate() {
|
|
1886
|
+
return this._itemLinkTemplate();
|
|
1887
|
+
}
|
|
1888
|
+
set popupSettings(value) {
|
|
1889
|
+
this._popupSettings.set(value);
|
|
1890
|
+
}
|
|
1891
|
+
get popupSettings() {
|
|
1892
|
+
return this._popupSettings();
|
|
1893
|
+
}
|
|
1894
|
+
set trackBy(value) {
|
|
1895
|
+
this._trackBy.set(value);
|
|
1896
|
+
}
|
|
1897
|
+
get trackBy() {
|
|
1898
|
+
return this._trackBy();
|
|
1899
|
+
}
|
|
1649
1900
|
link;
|
|
1650
1901
|
popupTemplate;
|
|
1651
1902
|
get disabled() {
|
|
@@ -1709,17 +1960,35 @@ class ItemComponent {
|
|
|
1709
1960
|
* @hidden
|
|
1710
1961
|
*/
|
|
1711
1962
|
SVGIcon = getSVGIcon;
|
|
1712
|
-
opened
|
|
1963
|
+
get opened() {
|
|
1964
|
+
return this._opened();
|
|
1965
|
+
}
|
|
1966
|
+
set opened(value) {
|
|
1967
|
+
this._opened.set(value);
|
|
1968
|
+
}
|
|
1713
1969
|
navigating = false;
|
|
1714
1970
|
childId;
|
|
1715
1971
|
contentItems;
|
|
1716
1972
|
popupRef;
|
|
1717
|
-
_index;
|
|
1718
1973
|
destroyed = false;
|
|
1719
|
-
|
|
1974
|
+
_index;
|
|
1975
|
+
_appendTo = signal(undefined, ...(ngDevMode ? [{ debugName: "_appendTo" }] : []));
|
|
1976
|
+
_item = signal(undefined, ...(ngDevMode ? [{ debugName: "_item" }] : []));
|
|
1977
|
+
_level = signal(undefined, ...(ngDevMode ? [{ debugName: "_level" }] : []));
|
|
1978
|
+
_opened = signal(false, ...(ngDevMode ? [{ debugName: "_opened" }] : []));
|
|
1979
|
+
_siblingIndex = signal(undefined, ...(ngDevMode ? [{ debugName: "_siblingIndex" }] : []));
|
|
1980
|
+
_animate = signal(true, ...(ngDevMode ? [{ debugName: "_animate" }] : []));
|
|
1981
|
+
_size = signal('medium', ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
1982
|
+
_vertical = signal(undefined, ...(ngDevMode ? [{ debugName: "_vertical" }] : []));
|
|
1983
|
+
_rtl = signal(undefined, ...(ngDevMode ? [{ debugName: "_rtl" }] : []));
|
|
1984
|
+
_openOnClick = signal(false, ...(ngDevMode ? [{ debugName: "_openOnClick" }] : []));
|
|
1985
|
+
_itemTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_itemTemplate" }] : []));
|
|
1986
|
+
_itemLinkTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_itemLinkTemplate" }] : []));
|
|
1987
|
+
_popupSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
|
|
1988
|
+
_trackBy = signal(undefined, ...(ngDevMode ? [{ debugName: "_trackBy" }] : []));
|
|
1989
|
+
constructor(itemsService, navigation, renderer, popupService, element, contextService) {
|
|
1720
1990
|
this.itemsService = itemsService;
|
|
1721
1991
|
this.navigation = navigation;
|
|
1722
|
-
this.changeDetector = changeDetector;
|
|
1723
1992
|
this.renderer = renderer;
|
|
1724
1993
|
this.popupService = popupService;
|
|
1725
1994
|
this.element = element;
|
|
@@ -1733,11 +2002,6 @@ class ItemComponent {
|
|
|
1733
2002
|
ngOnInit() {
|
|
1734
2003
|
this.itemsService.add(this);
|
|
1735
2004
|
}
|
|
1736
|
-
ngOnChanges(changes) {
|
|
1737
|
-
if (changes['item'] && !changes['item'].firstChange && this.opened) {
|
|
1738
|
-
this.close();
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
2005
|
ngAfterViewInit() {
|
|
1742
2006
|
if (this.hasContent) {
|
|
1743
2007
|
this.setAttribute('aria-expanded', this.opened.toString());
|
|
@@ -1787,7 +2051,6 @@ class ItemComponent {
|
|
|
1787
2051
|
});
|
|
1788
2052
|
this.setAttribute('aria-expanded', 'true');
|
|
1789
2053
|
this.setAttribute('aria-controls', this.childId);
|
|
1790
|
-
this.changeDetector.detectChanges();
|
|
1791
2054
|
}
|
|
1792
2055
|
}
|
|
1793
2056
|
close() {
|
|
@@ -1797,7 +2060,6 @@ class ItemComponent {
|
|
|
1797
2060
|
this.popupRef.close();
|
|
1798
2061
|
this.popupRef = null;
|
|
1799
2062
|
}
|
|
1800
|
-
this.changeDetector.detectChanges();
|
|
1801
2063
|
this.setAttribute('aria-expanded', 'false');
|
|
1802
2064
|
this.renderer.removeAttribute(this.element.nativeElement, 'aria-controls');
|
|
1803
2065
|
}
|
|
@@ -1831,11 +2093,11 @@ class ItemComponent {
|
|
|
1831
2093
|
margin: this.popupSettings.margin ?? DEFAULT_MARGIN
|
|
1832
2094
|
};
|
|
1833
2095
|
}
|
|
1834
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ItemComponent, deps: [{ token: ItemsService }, { token: NavigationService }, { token: i0.
|
|
2096
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ItemComponent, deps: [{ token: ItemsService }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i5.PopupService }, { token: i0.ElementRef }, { token: ContextMenuService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1835
2097
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ItemComponent, isStandalone: true, selector: "[kendoMenuItem]", inputs: { appendTo: "appendTo", item: "item", level: "level", index: "index", siblingIndex: "siblingIndex", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate", popupSettings: "popupSettings", trackBy: "trackBy" }, host: { properties: { "attr.aria-disabled": "this.disabled", "attr.aria-haspopup": "this.hasPopup" } }, providers: [PopupService, {
|
|
1836
2098
|
provide: POPUP_CONTAINER,
|
|
1837
2099
|
useFactory: bodyFactory
|
|
1838
|
-
}], viewQueries: [{ propertyName: "link", first: true, predicate: ["link"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }],
|
|
2100
|
+
}], viewQueries: [{ propertyName: "link", first: true, predicate: ["link"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1839
2101
|
@if (!hasLink && !item.content && !linkTemplate) {
|
|
1840
2102
|
<span class="k-link k-menu-link" #link
|
|
1841
2103
|
[class.k-active]="opened" [class.k-disabled]="item.disabled && (level > 0 || isContextMenu)" role="presentation">
|
|
@@ -1899,7 +2161,7 @@ class ItemComponent {
|
|
|
1899
2161
|
<kendo-icon-wrapper [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" aria-hidden="true"></kendo-icon-wrapper>
|
|
1900
2162
|
}
|
|
1901
2163
|
</ng-template>
|
|
1902
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ListComponent, selector: "[kendoMenuList]", inputs: ["appendTo", "items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate", "popupSettings", "trackBy"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
2164
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ListComponent, selector: "[kendoMenuList]", inputs: ["appendTo", "items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate", "popupSettings", "trackBy"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1903
2165
|
}
|
|
1904
2166
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ItemComponent, decorators: [{
|
|
1905
2167
|
type: Component,
|
|
@@ -1975,9 +2237,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1975
2237
|
</ng-template>
|
|
1976
2238
|
`,
|
|
1977
2239
|
standalone: true,
|
|
1978
|
-
imports: [NgTemplateOutlet, ListComponent, NgClass, IconWrapperComponent]
|
|
2240
|
+
imports: [NgTemplateOutlet, ListComponent, NgClass, IconWrapperComponent],
|
|
2241
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1979
2242
|
}]
|
|
1980
|
-
}], ctorParameters: () => [{ type: ItemsService }, { type: NavigationService }, { type: i0.
|
|
2243
|
+
}], ctorParameters: () => [{ type: ItemsService }, { type: NavigationService }, { type: i0.Renderer2 }, { type: i5.PopupService }, { type: i0.ElementRef }, { type: ContextMenuService, decorators: [{
|
|
1981
2244
|
type: Optional
|
|
1982
2245
|
}] }], propDecorators: { appendTo: [{
|
|
1983
2246
|
type: Input
|
|
@@ -2021,6 +2284,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2021
2284
|
args: ['attr.aria-haspopup']
|
|
2022
2285
|
}] } });
|
|
2023
2286
|
|
|
2287
|
+
/**
|
|
2288
|
+
* @hidden
|
|
2289
|
+
*/
|
|
2290
|
+
const normalize = (settings) => settings && Object.assign({
|
|
2291
|
+
toggle: 'select'
|
|
2292
|
+
}, settings);
|
|
2293
|
+
|
|
2024
2294
|
/**
|
|
2025
2295
|
* Represents the [Kendo UI Menu component for Angular](https://www.telerik.com/kendo-angular-ui/components/menus/menu).
|
|
2026
2296
|
*
|
|
@@ -2053,19 +2323,39 @@ class MenuComponent extends MenuBase {
|
|
|
2053
2323
|
/**
|
|
2054
2324
|
* Defines the container to which the popups will be appended.
|
|
2055
2325
|
*/
|
|
2056
|
-
appendTo
|
|
2326
|
+
set appendTo(value) {
|
|
2327
|
+
this._appendTo.set(value);
|
|
2328
|
+
}
|
|
2329
|
+
get appendTo() {
|
|
2330
|
+
return this._appendTo();
|
|
2331
|
+
}
|
|
2057
2332
|
/**
|
|
2058
2333
|
* @hidden
|
|
2059
2334
|
*/
|
|
2060
|
-
menuItemTemplate
|
|
2335
|
+
set menuItemTemplate(value) {
|
|
2336
|
+
this._menuItemTemplate.set(value);
|
|
2337
|
+
}
|
|
2338
|
+
get menuItemTemplate() {
|
|
2339
|
+
return this._menuItemTemplate();
|
|
2340
|
+
}
|
|
2061
2341
|
/**
|
|
2062
2342
|
* @hidden
|
|
2063
2343
|
*/
|
|
2064
|
-
ariaRole
|
|
2344
|
+
set ariaRole(value) {
|
|
2345
|
+
this._ariaRole.set(value);
|
|
2346
|
+
}
|
|
2347
|
+
get ariaRole() {
|
|
2348
|
+
return this._ariaRole();
|
|
2349
|
+
}
|
|
2065
2350
|
/**
|
|
2066
2351
|
* @hidden
|
|
2067
2352
|
*/
|
|
2068
|
-
menuItemLinkTemplate
|
|
2353
|
+
set menuItemLinkTemplate(value) {
|
|
2354
|
+
this._menuItemLinkTemplate.set(value);
|
|
2355
|
+
}
|
|
2356
|
+
get menuItemLinkTemplate() {
|
|
2357
|
+
return this._menuItemLinkTemplate();
|
|
2358
|
+
}
|
|
2069
2359
|
/**
|
|
2070
2360
|
* Fires when a Menu item is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/events)).
|
|
2071
2361
|
*/
|
|
@@ -2097,7 +2387,7 @@ class MenuComponent extends MenuBase {
|
|
|
2097
2387
|
return this.rtl;
|
|
2098
2388
|
}
|
|
2099
2389
|
get rtl() {
|
|
2100
|
-
return this.
|
|
2390
|
+
return this._rtl();
|
|
2101
2391
|
}
|
|
2102
2392
|
/**
|
|
2103
2393
|
* @hidden
|
|
@@ -2115,6 +2405,12 @@ class MenuComponent extends MenuBase {
|
|
|
2115
2405
|
}
|
|
2116
2406
|
closeClickSubscription;
|
|
2117
2407
|
contextKeyDownSubscription;
|
|
2408
|
+
localizationSubscription;
|
|
2409
|
+
_appendTo = signal(undefined, ...(ngDevMode ? [{ debugName: "_appendTo" }] : []));
|
|
2410
|
+
_menuItemTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_menuItemTemplate" }] : []));
|
|
2411
|
+
_ariaRole = signal('menubar', ...(ngDevMode ? [{ debugName: "_ariaRole" }] : []));
|
|
2412
|
+
_menuItemLinkTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_menuItemLinkTemplate" }] : []));
|
|
2413
|
+
_rtl = signal(false, ...(ngDevMode ? [{ debugName: "_rtl" }] : []));
|
|
2118
2414
|
constructor(itemsService, hover, actions, navigation, localization, ngZone, renderer, contextService) {
|
|
2119
2415
|
super();
|
|
2120
2416
|
this.itemsService = itemsService;
|
|
@@ -2126,12 +2422,28 @@ class MenuComponent extends MenuBase {
|
|
|
2126
2422
|
this.renderer = renderer;
|
|
2127
2423
|
this.contextService = contextService;
|
|
2128
2424
|
validatePackage(packageMetadata);
|
|
2425
|
+
this._rtl.set(localization.rtl);
|
|
2426
|
+
this.localizationSubscription = localization.changes.subscribe(({ rtl }) => this._rtl.set(rtl));
|
|
2129
2427
|
this.actions.owner = this;
|
|
2130
2428
|
if (contextService) {
|
|
2131
2429
|
contextService.items = this.itemsService;
|
|
2132
2430
|
this.contextKeyDownSubscription = contextService.keydown.subscribe(this.contextKeyDown.bind(this));
|
|
2133
2431
|
}
|
|
2134
2432
|
}
|
|
2433
|
+
ngOnChanges(changes) {
|
|
2434
|
+
this.navigation.vertical = this.vertical;
|
|
2435
|
+
this.hover.delay = this.hoverDelay;
|
|
2436
|
+
if (changes.openOnClick) {
|
|
2437
|
+
const openOnClick = this.openOnClick = normalize(this.openOnClick);
|
|
2438
|
+
this.hover.openOnOver = !openOnClick;
|
|
2439
|
+
if (openOnClick?.toggle === 'click') {
|
|
2440
|
+
this.attachCloseClick();
|
|
2441
|
+
}
|
|
2442
|
+
else {
|
|
2443
|
+
this.unsubscribeClick();
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2135
2447
|
/**
|
|
2136
2448
|
* Opens or closes the specified Menu items.
|
|
2137
2449
|
*
|
|
@@ -2157,25 +2469,12 @@ class MenuComponent extends MenuBase {
|
|
|
2157
2469
|
focus(index) {
|
|
2158
2470
|
this.navigation.focusIndex(index);
|
|
2159
2471
|
}
|
|
2160
|
-
ngOnChanges(changes) {
|
|
2161
|
-
this.navigation.vertical = this.vertical;
|
|
2162
|
-
this.hover.delay = this.hoverDelay;
|
|
2163
|
-
if (changes.openOnClick) {
|
|
2164
|
-
const openOnClick = this.openOnClick = normalize(this.openOnClick);
|
|
2165
|
-
this.hover.openOnOver = !openOnClick;
|
|
2166
|
-
if (openOnClick && openOnClick.toggle === 'click') {
|
|
2167
|
-
this.attachCloseClick();
|
|
2168
|
-
}
|
|
2169
|
-
else {
|
|
2170
|
-
this.unsubscribeClick();
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
2472
|
ngAfterViewChecked() {
|
|
2175
2473
|
this.navigation.updateActive();
|
|
2176
2474
|
}
|
|
2177
2475
|
ngOnDestroy() {
|
|
2178
2476
|
this.unsubscribeClick();
|
|
2477
|
+
this.localizationSubscription.unsubscribe();
|
|
2179
2478
|
if (this.contextService) {
|
|
2180
2479
|
this.contextService.items = null;
|
|
2181
2480
|
this.contextKeyDownSubscription.unsubscribe();
|
|
@@ -2250,7 +2549,7 @@ class MenuComponent extends MenuBase {
|
|
|
2250
2549
|
[trackBy]="trackBy"
|
|
2251
2550
|
[ngClass]="menuClasses">
|
|
2252
2551
|
</ul>
|
|
2253
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ListComponent, selector: "[kendoMenuList]", inputs: ["appendTo", "items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate", "popupSettings", "trackBy"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2552
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ListComponent, selector: "[kendoMenuList]", inputs: ["appendTo", "items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate", "popupSettings", "trackBy"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2254
2553
|
}
|
|
2255
2554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MenuComponent, decorators: [{
|
|
2256
2555
|
type: Component,
|
|
@@ -2290,7 +2589,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2290
2589
|
</ul>
|
|
2291
2590
|
`,
|
|
2292
2591
|
standalone: true,
|
|
2293
|
-
imports: [ListComponent, NgClass]
|
|
2592
|
+
imports: [ListComponent, NgClass],
|
|
2593
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2294
2594
|
}]
|
|
2295
2595
|
}], ctorParameters: () => [{ type: ItemsService }, { type: HoverService }, { type: ActionsService }, { type: NavigationService }, { type: i3.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: ContextMenuService, decorators: [{
|
|
2296
2596
|
type: Optional
|
|
@@ -2329,7 +2629,13 @@ class LinkDirective {
|
|
|
2329
2629
|
/**
|
|
2330
2630
|
* Specifies the index of the Menu item. The input is mandatory.
|
|
2331
2631
|
*/
|
|
2332
|
-
index
|
|
2632
|
+
set index(value) {
|
|
2633
|
+
this._index.set(value);
|
|
2634
|
+
}
|
|
2635
|
+
get index() {
|
|
2636
|
+
return this._index();
|
|
2637
|
+
}
|
|
2638
|
+
_index = signal(undefined, ...(ngDevMode ? [{ debugName: "_index" }] : []));
|
|
2333
2639
|
hostClasses = true;
|
|
2334
2640
|
role = 'presentation';
|
|
2335
2641
|
tabindex = '-1';
|
|
@@ -2391,7 +2697,13 @@ class ExpandArrowComponent {
|
|
|
2391
2697
|
/**
|
|
2392
2698
|
* Specifies the index of the Menu item. The input is mandatory.
|
|
2393
2699
|
*/
|
|
2394
|
-
index
|
|
2700
|
+
set index(value) {
|
|
2701
|
+
this._index.set(value);
|
|
2702
|
+
}
|
|
2703
|
+
get index() {
|
|
2704
|
+
return this._index();
|
|
2705
|
+
}
|
|
2706
|
+
_index = signal(undefined, ...(ngDevMode ? [{ debugName: "_index" }] : []));
|
|
2395
2707
|
hostClasses = true;
|
|
2396
2708
|
ariaHidden = 'true';
|
|
2397
2709
|
item;
|
|
@@ -2415,7 +2727,7 @@ class ExpandArrowComponent {
|
|
|
2415
2727
|
this.SVGIcon = getSVGIcon(this.item.horizontal, this.item.rtl);
|
|
2416
2728
|
}
|
|
2417
2729
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ExpandArrowComponent, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2418
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ExpandArrowComponent, isStandalone: true, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
2730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ExpandArrowComponent, isStandalone: true, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2419
2731
|
}
|
|
2420
2732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ExpandArrowComponent, decorators: [{
|
|
2421
2733
|
type: Component,
|
|
@@ -2423,7 +2735,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2423
2735
|
selector: '[kendoMenuExpandArrow]',
|
|
2424
2736
|
template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`,
|
|
2425
2737
|
standalone: true,
|
|
2426
|
-
imports: [IconWrapperComponent]
|
|
2738
|
+
imports: [IconWrapperComponent],
|
|
2739
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2427
2740
|
}]
|
|
2428
2741
|
}], ctorParameters: () => [{ type: ItemsService }], propDecorators: { index: [{
|
|
2429
2742
|
type: Input,
|
|
@@ -2501,13 +2814,19 @@ const ITEM_FIELDS = ['textField', 'urlField', 'iconField', 'svgIconField', 'disa
|
|
|
2501
2814
|
*/
|
|
2502
2815
|
class BindingDirectiveBase {
|
|
2503
2816
|
menu;
|
|
2504
|
-
data
|
|
2817
|
+
set data(value) {
|
|
2818
|
+
this._data.set(value);
|
|
2819
|
+
}
|
|
2820
|
+
get data() {
|
|
2821
|
+
return this._data();
|
|
2822
|
+
}
|
|
2823
|
+
_data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
2505
2824
|
fields;
|
|
2506
2825
|
constructor(menu) {
|
|
2507
2826
|
this.menu = menu;
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2827
|
+
effect(() => {
|
|
2828
|
+
this.rebind();
|
|
2829
|
+
});
|
|
2511
2830
|
}
|
|
2512
2831
|
/**
|
|
2513
2832
|
* Rebinds the Menu items.
|
|
@@ -2521,10 +2840,10 @@ class BindingDirectiveBase {
|
|
|
2521
2840
|
fields.push({ target: inputName.replace('Field', ''), source: inputValue });
|
|
2522
2841
|
}
|
|
2523
2842
|
}
|
|
2524
|
-
this.menu.items = this.
|
|
2843
|
+
this.menu.items = this._data() ? this.mapItems(this._data()) : [];
|
|
2525
2844
|
}
|
|
2526
2845
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: BindingDirectiveBase, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2527
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: BindingDirectiveBase, isStandalone: true, selector: "kendoBindingBase",
|
|
2846
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: BindingDirectiveBase, isStandalone: true, selector: "kendoBindingBase", ngImport: i0 });
|
|
2528
2847
|
}
|
|
2529
2848
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: BindingDirectiveBase, decorators: [{
|
|
2530
2849
|
type: Directive,
|
|
@@ -2578,43 +2897,102 @@ class HierarchyBindingDirective extends BindingDirectiveBase {
|
|
|
2578
2897
|
/**
|
|
2579
2898
|
* Specifies the array of data which will be used to populate the Menu.
|
|
2580
2899
|
*/
|
|
2581
|
-
data
|
|
2900
|
+
set data(value) {
|
|
2901
|
+
this._data.set(value);
|
|
2902
|
+
}
|
|
2903
|
+
get data() {
|
|
2904
|
+
return this._data();
|
|
2905
|
+
}
|
|
2582
2906
|
/**
|
|
2583
2907
|
* Defines the `text` field (or fields) of an item.
|
|
2584
2908
|
*/
|
|
2585
|
-
textField
|
|
2909
|
+
set textField(value) {
|
|
2910
|
+
this._textField.set(value);
|
|
2911
|
+
}
|
|
2912
|
+
get textField() {
|
|
2913
|
+
return this._textField();
|
|
2914
|
+
}
|
|
2586
2915
|
/**
|
|
2587
2916
|
* Defines the `url` field (or fields) of an item.
|
|
2588
2917
|
*/
|
|
2589
|
-
urlField
|
|
2918
|
+
set urlField(value) {
|
|
2919
|
+
this._urlField.set(value);
|
|
2920
|
+
}
|
|
2921
|
+
get urlField() {
|
|
2922
|
+
return this._urlField();
|
|
2923
|
+
}
|
|
2590
2924
|
/**
|
|
2591
2925
|
* Defines the `icon` field (or fields) of an item.
|
|
2592
2926
|
*/
|
|
2593
|
-
iconField
|
|
2927
|
+
set iconField(value) {
|
|
2928
|
+
this._iconField.set(value);
|
|
2929
|
+
}
|
|
2930
|
+
get iconField() {
|
|
2931
|
+
return this._iconField();
|
|
2932
|
+
}
|
|
2594
2933
|
/**
|
|
2595
2934
|
* Defines the `svgIcon` field of the items.
|
|
2596
2935
|
*/
|
|
2597
|
-
svgIconField
|
|
2936
|
+
set svgIconField(value) {
|
|
2937
|
+
this._svgIconField.set(value);
|
|
2938
|
+
}
|
|
2939
|
+
get svgIconField() {
|
|
2940
|
+
return this._svgIconField();
|
|
2941
|
+
}
|
|
2598
2942
|
/**
|
|
2599
2943
|
* Defines the `disabled` field (or fields) of an item.
|
|
2600
2944
|
*/
|
|
2601
|
-
disabledField
|
|
2945
|
+
set disabledField(value) {
|
|
2946
|
+
this._disabledField.set(value);
|
|
2947
|
+
}
|
|
2948
|
+
get disabledField() {
|
|
2949
|
+
return this._disabledField();
|
|
2950
|
+
}
|
|
2602
2951
|
/**
|
|
2603
2952
|
* Defines the `cssClass` field (or fields) of an item.
|
|
2604
2953
|
*/
|
|
2605
|
-
cssClassField
|
|
2954
|
+
set cssClassField(value) {
|
|
2955
|
+
this._cssClassField.set(value);
|
|
2956
|
+
}
|
|
2957
|
+
get cssClassField() {
|
|
2958
|
+
return this._cssClassField();
|
|
2959
|
+
}
|
|
2606
2960
|
/**
|
|
2607
2961
|
* Defines the `cssStyle` field (or fields) of an item.
|
|
2608
2962
|
*/
|
|
2609
|
-
cssStyleField
|
|
2963
|
+
set cssStyleField(value) {
|
|
2964
|
+
this._cssStyleField.set(value);
|
|
2965
|
+
}
|
|
2966
|
+
get cssStyleField() {
|
|
2967
|
+
return this._cssStyleField();
|
|
2968
|
+
}
|
|
2610
2969
|
/**
|
|
2611
2970
|
* Defines the `separator` field (or fields) of the items.
|
|
2612
2971
|
*/
|
|
2613
|
-
separatorField
|
|
2972
|
+
set separatorField(value) {
|
|
2973
|
+
this._separatorField.set(value);
|
|
2974
|
+
}
|
|
2975
|
+
get separatorField() {
|
|
2976
|
+
return this._separatorField();
|
|
2977
|
+
}
|
|
2614
2978
|
/**
|
|
2615
2979
|
* Defines the `children` field (or fields) of the items.
|
|
2616
2980
|
*/
|
|
2617
|
-
childrenField
|
|
2981
|
+
set childrenField(value) {
|
|
2982
|
+
this._childrenField.set(value);
|
|
2983
|
+
}
|
|
2984
|
+
get childrenField() {
|
|
2985
|
+
return this._childrenField();
|
|
2986
|
+
}
|
|
2987
|
+
_textField = signal(undefined, ...(ngDevMode ? [{ debugName: "_textField" }] : []));
|
|
2988
|
+
_urlField = signal(undefined, ...(ngDevMode ? [{ debugName: "_urlField" }] : []));
|
|
2989
|
+
_iconField = signal(undefined, ...(ngDevMode ? [{ debugName: "_iconField" }] : []));
|
|
2990
|
+
_svgIconField = signal(undefined, ...(ngDevMode ? [{ debugName: "_svgIconField" }] : []));
|
|
2991
|
+
_disabledField = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabledField" }] : []));
|
|
2992
|
+
_cssClassField = signal(undefined, ...(ngDevMode ? [{ debugName: "_cssClassField" }] : []));
|
|
2993
|
+
_cssStyleField = signal(undefined, ...(ngDevMode ? [{ debugName: "_cssStyleField" }] : []));
|
|
2994
|
+
_separatorField = signal(undefined, ...(ngDevMode ? [{ debugName: "_separatorField" }] : []));
|
|
2995
|
+
_childrenField = signal(undefined, ...(ngDevMode ? [{ debugName: "_childrenField" }] : []));
|
|
2618
2996
|
constructor(menu) {
|
|
2619
2997
|
super(menu);
|
|
2620
2998
|
}
|
|
@@ -2692,47 +3070,112 @@ class FlatBindingDirective extends BindingDirectiveBase {
|
|
|
2692
3070
|
/**
|
|
2693
3071
|
* Specifies the array of data which will be used to populate the Menu.
|
|
2694
3072
|
*/
|
|
2695
|
-
data
|
|
3073
|
+
set data(value) {
|
|
3074
|
+
this._data.set(value);
|
|
3075
|
+
}
|
|
3076
|
+
get data() {
|
|
3077
|
+
return this._data();
|
|
3078
|
+
}
|
|
2696
3079
|
/**
|
|
2697
3080
|
* Defines the `text` field of the items.
|
|
2698
3081
|
*/
|
|
2699
|
-
textField
|
|
3082
|
+
set textField(value) {
|
|
3083
|
+
this._textField.set(value);
|
|
3084
|
+
}
|
|
3085
|
+
get textField() {
|
|
3086
|
+
return this._textField();
|
|
3087
|
+
}
|
|
2700
3088
|
/**
|
|
2701
3089
|
* Defines the `url` field of the items.
|
|
2702
3090
|
*/
|
|
2703
|
-
urlField
|
|
3091
|
+
set urlField(value) {
|
|
3092
|
+
this._urlField.set(value);
|
|
3093
|
+
}
|
|
3094
|
+
get urlField() {
|
|
3095
|
+
return this._urlField();
|
|
3096
|
+
}
|
|
2704
3097
|
/**
|
|
2705
3098
|
* Defines the `icon` field of the items.
|
|
2706
3099
|
*/
|
|
2707
|
-
iconField
|
|
3100
|
+
set iconField(value) {
|
|
3101
|
+
this._iconField.set(value);
|
|
3102
|
+
}
|
|
3103
|
+
get iconField() {
|
|
3104
|
+
return this._iconField();
|
|
3105
|
+
}
|
|
2708
3106
|
/**
|
|
2709
3107
|
* Defines the `svgIcon` field of the items.
|
|
2710
3108
|
*/
|
|
2711
|
-
svgIconField
|
|
3109
|
+
set svgIconField(value) {
|
|
3110
|
+
this._svgIconField.set(value);
|
|
3111
|
+
}
|
|
3112
|
+
get svgIconField() {
|
|
3113
|
+
return this._svgIconField();
|
|
3114
|
+
}
|
|
2712
3115
|
/**
|
|
2713
3116
|
* Defines the `disabled` field of the items.
|
|
2714
3117
|
*/
|
|
2715
|
-
disabledField
|
|
3118
|
+
set disabledField(value) {
|
|
3119
|
+
this._disabledField.set(value);
|
|
3120
|
+
}
|
|
3121
|
+
get disabledField() {
|
|
3122
|
+
return this._disabledField();
|
|
3123
|
+
}
|
|
2716
3124
|
/**
|
|
2717
3125
|
* Defines the `cssClass` field of the items.
|
|
2718
3126
|
*/
|
|
2719
|
-
cssClassField
|
|
3127
|
+
set cssClassField(value) {
|
|
3128
|
+
this._cssClassField.set(value);
|
|
3129
|
+
}
|
|
3130
|
+
get cssClassField() {
|
|
3131
|
+
return this._cssClassField();
|
|
3132
|
+
}
|
|
2720
3133
|
/**
|
|
2721
3134
|
* Defines the `cssStyle` field of the items.
|
|
2722
3135
|
*/
|
|
2723
|
-
cssStyleField
|
|
3136
|
+
set cssStyleField(value) {
|
|
3137
|
+
this._cssStyleField.set(value);
|
|
3138
|
+
}
|
|
3139
|
+
get cssStyleField() {
|
|
3140
|
+
return this._cssStyleField();
|
|
3141
|
+
}
|
|
2724
3142
|
/**
|
|
2725
3143
|
* Defines the `separator` field of the items.
|
|
2726
3144
|
*/
|
|
2727
|
-
separatorField
|
|
3145
|
+
set separatorField(value) {
|
|
3146
|
+
this._separatorField.set(value);
|
|
3147
|
+
}
|
|
3148
|
+
get separatorField() {
|
|
3149
|
+
return this._separatorField();
|
|
3150
|
+
}
|
|
2728
3151
|
/**
|
|
2729
3152
|
* Defines the `id` field of the items.
|
|
2730
3153
|
*/
|
|
2731
|
-
idField
|
|
3154
|
+
set idField(value) {
|
|
3155
|
+
this._idField.set(value);
|
|
3156
|
+
}
|
|
3157
|
+
get idField() {
|
|
3158
|
+
return this._idField();
|
|
3159
|
+
}
|
|
2732
3160
|
/**
|
|
2733
3161
|
* Defines the parent `id` field of the items.
|
|
2734
3162
|
*/
|
|
2735
|
-
parentIdField
|
|
3163
|
+
set parentIdField(value) {
|
|
3164
|
+
this._parentIdField.set(value);
|
|
3165
|
+
}
|
|
3166
|
+
get parentIdField() {
|
|
3167
|
+
return this._parentIdField();
|
|
3168
|
+
}
|
|
3169
|
+
_textField = signal(undefined, ...(ngDevMode ? [{ debugName: "_textField" }] : []));
|
|
3170
|
+
_urlField = signal(undefined, ...(ngDevMode ? [{ debugName: "_urlField" }] : []));
|
|
3171
|
+
_iconField = signal(undefined, ...(ngDevMode ? [{ debugName: "_iconField" }] : []));
|
|
3172
|
+
_svgIconField = signal(undefined, ...(ngDevMode ? [{ debugName: "_svgIconField" }] : []));
|
|
3173
|
+
_disabledField = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabledField" }] : []));
|
|
3174
|
+
_cssClassField = signal(undefined, ...(ngDevMode ? [{ debugName: "_cssClassField" }] : []));
|
|
3175
|
+
_cssStyleField = signal(undefined, ...(ngDevMode ? [{ debugName: "_cssStyleField" }] : []));
|
|
3176
|
+
_separatorField = signal(undefined, ...(ngDevMode ? [{ debugName: "_separatorField" }] : []));
|
|
3177
|
+
_idField = signal(undefined, ...(ngDevMode ? [{ debugName: "_idField" }] : []));
|
|
3178
|
+
_parentIdField = signal(undefined, ...(ngDevMode ? [{ debugName: "_parentIdField" }] : []));
|
|
2736
3179
|
constructor(menu) {
|
|
2737
3180
|
super(menu);
|
|
2738
3181
|
}
|
|
@@ -2967,7 +3410,12 @@ class ContextMenuTargetDirective {
|
|
|
2967
3410
|
/**
|
|
2968
3411
|
* Specifies the data which is associated with the target.
|
|
2969
3412
|
*/
|
|
2970
|
-
data
|
|
3413
|
+
set data(value) {
|
|
3414
|
+
this._data.set(value);
|
|
3415
|
+
}
|
|
3416
|
+
get data() {
|
|
3417
|
+
return this._data();
|
|
3418
|
+
}
|
|
2971
3419
|
/**
|
|
2972
3420
|
* Specifies the target DOM element.
|
|
2973
3421
|
*/
|
|
@@ -2976,6 +3424,7 @@ class ContextMenuTargetDirective {
|
|
|
2976
3424
|
* @hidden
|
|
2977
3425
|
*/
|
|
2978
3426
|
hostClass = true;
|
|
3427
|
+
_data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
2979
3428
|
constructor(elementRef, targetService) {
|
|
2980
3429
|
this.targetService = targetService;
|
|
2981
3430
|
if (elementRef) {
|
|
@@ -3039,63 +3488,120 @@ class ContextMenuComponent extends MenuBase {
|
|
|
3039
3488
|
*
|
|
3040
3489
|
* @default 'contextmenu'
|
|
3041
3490
|
*/
|
|
3042
|
-
showOn
|
|
3491
|
+
set showOn(value) {
|
|
3492
|
+
this._showOn.set(value);
|
|
3493
|
+
this.bindShowHandler();
|
|
3494
|
+
}
|
|
3495
|
+
get showOn() {
|
|
3496
|
+
return this._showOn();
|
|
3497
|
+
}
|
|
3043
3498
|
/**
|
|
3044
3499
|
* Specifies the element for which the ContextMenu will open ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#configuration)).
|
|
3045
3500
|
*/
|
|
3046
|
-
target
|
|
3501
|
+
set target(value) {
|
|
3502
|
+
this._target.set(value);
|
|
3503
|
+
this.bindShowHandler();
|
|
3504
|
+
}
|
|
3505
|
+
get target() {
|
|
3506
|
+
return this._target();
|
|
3507
|
+
}
|
|
3047
3508
|
/**
|
|
3048
3509
|
* Specifies a CSS selector which filters the elements in the target for which the ContextMenu will open
|
|
3049
3510
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#changing-items-for-specific-targets)).
|
|
3050
3511
|
*/
|
|
3051
|
-
filter
|
|
3512
|
+
set filter(value) {
|
|
3513
|
+
this._filter.set(value);
|
|
3514
|
+
}
|
|
3515
|
+
get filter() {
|
|
3516
|
+
return this._filter();
|
|
3517
|
+
}
|
|
3052
3518
|
/**
|
|
3053
3519
|
* Specifies if the ContextMenu will be aligned to the target or to the `filter` element (if specified).
|
|
3054
3520
|
*
|
|
3055
3521
|
* @default false
|
|
3056
3522
|
*/
|
|
3057
|
-
alignToAnchor
|
|
3523
|
+
set alignToAnchor(value) {
|
|
3524
|
+
this._alignToAnchor.set(value);
|
|
3525
|
+
}
|
|
3526
|
+
get alignToAnchor() {
|
|
3527
|
+
return this._alignToAnchor();
|
|
3528
|
+
}
|
|
3058
3529
|
/**
|
|
3059
3530
|
* Specifies if the Menu will be vertically rendered ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/orientation)).
|
|
3060
3531
|
*
|
|
3061
3532
|
* @default true
|
|
3062
3533
|
*/
|
|
3063
|
-
vertical
|
|
3534
|
+
set vertical(value) {
|
|
3535
|
+
this._vertical.set(value);
|
|
3536
|
+
}
|
|
3537
|
+
get vertical() {
|
|
3538
|
+
return this._vertical();
|
|
3539
|
+
}
|
|
3064
3540
|
/**
|
|
3065
3541
|
* Specifies the popup animation.
|
|
3066
3542
|
*
|
|
3067
3543
|
* @default true
|
|
3068
3544
|
*/
|
|
3069
|
-
popupAnimate
|
|
3545
|
+
set popupAnimate(value) {
|
|
3546
|
+
this._popupAnimate.set(value);
|
|
3547
|
+
}
|
|
3548
|
+
get popupAnimate() {
|
|
3549
|
+
return this._popupAnimate();
|
|
3550
|
+
}
|
|
3070
3551
|
/**
|
|
3071
3552
|
* Specifies the pivot point of the popup.
|
|
3072
3553
|
*
|
|
3073
3554
|
* @default { horizontal: 'left', vertical: 'top' }
|
|
3074
3555
|
*/
|
|
3075
|
-
popupAlign
|
|
3556
|
+
set popupAlign(value) {
|
|
3557
|
+
this._popupAlign.set(value);
|
|
3558
|
+
}
|
|
3559
|
+
get popupAlign() {
|
|
3560
|
+
return this._popupAlign();
|
|
3561
|
+
}
|
|
3076
3562
|
/**
|
|
3077
3563
|
* Specifies the pivot point of the anchor. Applicable if `alignToAnchor` is `true`.
|
|
3078
3564
|
*
|
|
3079
3565
|
* @default { horizontal: 'left', vertical: 'bottom' }
|
|
3080
3566
|
*/
|
|
3081
|
-
anchorAlign
|
|
3567
|
+
set anchorAlign(value) {
|
|
3568
|
+
this._anchorAlign.set(value);
|
|
3569
|
+
}
|
|
3570
|
+
get anchorAlign() {
|
|
3571
|
+
return this._anchorAlign();
|
|
3572
|
+
}
|
|
3082
3573
|
/**
|
|
3083
3574
|
* Configures the collision behavior of the popup.
|
|
3084
3575
|
*
|
|
3085
3576
|
* @default { horizontal: 'fit', vertical: 'flip' }
|
|
3086
3577
|
*/
|
|
3087
|
-
collision
|
|
3578
|
+
set collision(value) {
|
|
3579
|
+
this._collision.set(value);
|
|
3580
|
+
}
|
|
3581
|
+
get collision() {
|
|
3582
|
+
return this._collision();
|
|
3583
|
+
}
|
|
3088
3584
|
/**
|
|
3089
3585
|
* Defines the container to which the popups will be appended.
|
|
3090
3586
|
*/
|
|
3091
|
-
appendTo
|
|
3587
|
+
set appendTo(value) {
|
|
3588
|
+
this._appendTo.set(value);
|
|
3589
|
+
}
|
|
3590
|
+
get appendTo() {
|
|
3591
|
+
return this._appendTo();
|
|
3592
|
+
}
|
|
3092
3593
|
/**
|
|
3093
3594
|
* Sets the value for the [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) attribute of the ContextMenu.
|
|
3094
3595
|
*
|
|
3095
3596
|
* @remarks
|
|
3096
3597
|
* This property is related to accessibility.
|
|
3097
3598
|
*/
|
|
3098
|
-
ariaLabel
|
|
3599
|
+
set ariaLabel(value) {
|
|
3600
|
+
this._ariaLabel.set(value);
|
|
3601
|
+
}
|
|
3602
|
+
get ariaLabel() {
|
|
3603
|
+
return this._ariaLabel();
|
|
3604
|
+
}
|
|
3099
3605
|
/**
|
|
3100
3606
|
* Fires when the Menu is opened ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)).
|
|
3101
3607
|
*/
|
|
@@ -3132,6 +3638,17 @@ class ContextMenuComponent extends MenuBase {
|
|
|
3132
3638
|
currentTarget;
|
|
3133
3639
|
directiveTarget;
|
|
3134
3640
|
activeTarget;
|
|
3641
|
+
_showOn = signal(CONTEXT_MENU, ...(ngDevMode ? [{ debugName: "_showOn" }] : []));
|
|
3642
|
+
_target = signal(undefined, ...(ngDevMode ? [{ debugName: "_target" }] : []));
|
|
3643
|
+
_filter = signal(undefined, ...(ngDevMode ? [{ debugName: "_filter" }] : []));
|
|
3644
|
+
_alignToAnchor = signal(false, ...(ngDevMode ? [{ debugName: "_alignToAnchor" }] : []));
|
|
3645
|
+
_popupAnimate = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupAnimate" }] : []));
|
|
3646
|
+
_popupAlign = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupAlign" }] : []));
|
|
3647
|
+
_anchorAlign = signal(undefined, ...(ngDevMode ? [{ debugName: "_anchorAlign" }] : []));
|
|
3648
|
+
_collision = signal(undefined, ...(ngDevMode ? [{ debugName: "_collision" }] : []));
|
|
3649
|
+
_appendTo = signal(undefined, ...(ngDevMode ? [{ debugName: "_appendTo" }] : []));
|
|
3650
|
+
_ariaLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
|
|
3651
|
+
_vertical = signal(true, ...(ngDevMode ? [{ debugName: "_vertical" }] : []));
|
|
3135
3652
|
constructor(popupService, service, ngZone, renderer) {
|
|
3136
3653
|
super();
|
|
3137
3654
|
this.popupService = popupService;
|
|
@@ -3166,11 +3683,6 @@ class ContextMenuComponent extends MenuBase {
|
|
|
3166
3683
|
this.createPopup({ anchor: this.currentTarget });
|
|
3167
3684
|
}
|
|
3168
3685
|
}
|
|
3169
|
-
ngOnChanges(changes) {
|
|
3170
|
-
if (changes.target || changes.showOn) {
|
|
3171
|
-
this.bindShowHandler();
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
3686
|
ngOnInit() {
|
|
3175
3687
|
this.ngZone.runOutsideAngular(() => {
|
|
3176
3688
|
const closeClickSubscription = this.renderer.listen('document', 'mousedown', (e) => {
|
|
@@ -3409,7 +3921,7 @@ class ContextMenuComponent extends MenuBase {
|
|
|
3409
3921
|
provide: POPUP_CONTAINER,
|
|
3410
3922
|
useFactory: bodyFactory
|
|
3411
3923
|
}
|
|
3412
|
-
], queries: [{ propertyName: "contentTemplate", first: true, predicate: ContextMenuTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "defaultContentTemplate", first: true, predicate: ["default"], descendants: true }], exportAs: ["kendoContextMenu"], usesInheritance: true,
|
|
3924
|
+
], queries: [{ propertyName: "contentTemplate", first: true, predicate: ContextMenuTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "defaultContentTemplate", first: true, predicate: ["default"], descendants: true }], exportAs: ["kendoContextMenu"], usesInheritance: true, ngImport: i0, template: `
|
|
3413
3925
|
<ng-template #default>
|
|
3414
3926
|
<kendo-menu [items]="rootItems"
|
|
3415
3927
|
[appendTo]="appendTo"
|
|
@@ -3425,7 +3937,7 @@ class ContextMenuComponent extends MenuBase {
|
|
|
3425
3937
|
[menuItemLinkTemplate]="itemLinkTemplate.first?.templateRef"
|
|
3426
3938
|
></kendo-menu>
|
|
3427
3939
|
</ng-template>
|
|
3428
|
-
`, isInline: true, dependencies: [{ kind: "component", type: MenuComponent, selector: "kendo-menu", inputs: ["appendTo", "menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }] });
|
|
3940
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MenuComponent, selector: "kendo-menu", inputs: ["appendTo", "menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3429
3941
|
}
|
|
3430
3942
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
3431
3943
|
type: Component,
|
|
@@ -3471,7 +3983,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3471
3983
|
</ng-template>
|
|
3472
3984
|
`,
|
|
3473
3985
|
standalone: true,
|
|
3474
|
-
imports: [MenuComponent]
|
|
3986
|
+
imports: [MenuComponent],
|
|
3987
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
3475
3988
|
}]
|
|
3476
3989
|
}], ctorParameters: () => [{ type: i5.PopupService }, { type: ContextMenuService }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { showOn: [{
|
|
3477
3990
|
type: Input
|