@progress/kendo-angular-navigation 21.4.1 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/progress-kendo-angular-navigation.mjs +83 -83
- package/package.json +11 -19
- package/esm2022/actionsheet/actionsheet-view.component.mjs +0 -173
- package/esm2022/actionsheet/actionsheet.component.mjs +0 -700
- package/esm2022/actionsheet/animation/animations.mjs +0 -23
- package/esm2022/actionsheet/item.component.mjs +0 -125
- package/esm2022/actionsheet/list.component.mjs +0 -95
- package/esm2022/actionsheet/models/actionsheet-action-layout.mjs +0 -5
- package/esm2022/actionsheet/models/actionsheet-action.mjs +0 -5
- package/esm2022/actionsheet/models/actionsheet-item.interface.mjs +0 -5
- package/esm2022/actionsheet/models/animation.mjs +0 -5
- package/esm2022/actionsheet/models/group.mjs +0 -5
- package/esm2022/actionsheet/models/index.mjs +0 -10
- package/esm2022/actionsheet/models/item-click.event.mjs +0 -19
- package/esm2022/actionsheet/templates/actionsheet-template.mjs +0 -37
- package/esm2022/actionsheet/templates/content-template.directive.mjs +0 -37
- package/esm2022/actionsheet/templates/footer-template.directive.mjs +0 -37
- package/esm2022/actionsheet/templates/header-template.directive.mjs +0 -37
- package/esm2022/actionsheet/templates/item-template.directive.mjs +0 -37
- package/esm2022/actionsheet.module.mjs +0 -48
- package/esm2022/appbar/appbar-section.component.mjs +0 -40
- package/esm2022/appbar/appbar-spacer.component.mjs +0 -69
- package/esm2022/appbar/appbar.component.mjs +0 -158
- package/esm2022/appbar/models/position-mode.mjs +0 -5
- package/esm2022/appbar/models/position.mjs +0 -5
- package/esm2022/appbar/models/theme-color.mjs +0 -5
- package/esm2022/appbar.module.mjs +0 -42
- package/esm2022/bottomnavigation/bottomnavigation-item.component.mjs +0 -122
- package/esm2022/bottomnavigation/bottomnavigation.component.mjs +0 -334
- package/esm2022/bottomnavigation/constants.mjs +0 -12
- package/esm2022/bottomnavigation/events/select-event.mjs +0 -33
- package/esm2022/bottomnavigation/templates/item-template.directive.mjs +0 -36
- package/esm2022/bottomnavigation/types/bottomnavigation-fill.mjs +0 -5
- package/esm2022/bottomnavigation/types/bottomnavigation-item-flow.mjs +0 -5
- package/esm2022/bottomnavigation/types/bottomnavigation-item.mjs +0 -5
- package/esm2022/bottomnavigation/types/bottomnavigation-position-mode.mjs +0 -5
- package/esm2022/bottomnavigation/types/bottomnavigation-theme-color.mjs +0 -20
- package/esm2022/bottomnavigation.module.mjs +0 -43
- package/esm2022/breadcrumb/breadcrumb-item.component.mjs +0 -186
- package/esm2022/breadcrumb/breadcrumb.component.mjs +0 -362
- package/esm2022/breadcrumb/list.component.mjs +0 -107
- package/esm2022/breadcrumb/models/breadcrumb-item.interface.mjs +0 -5
- package/esm2022/breadcrumb/models/breadcrumb-size.mjs +0 -5
- package/esm2022/breadcrumb/models/collapse-mode.mjs +0 -5
- package/esm2022/breadcrumb/models/constants.mjs +0 -33
- package/esm2022/breadcrumb/template-directives/item-template.directive.mjs +0 -40
- package/esm2022/breadcrumb/template-directives/separator.directive.mjs +0 -108
- package/esm2022/breadcrumb/util.mjs +0 -22
- package/esm2022/breadcrumb.module.mjs +0 -44
- package/esm2022/common/direction.mjs +0 -5
- package/esm2022/common/dom-queries.mjs +0 -22
- package/esm2022/common/preventable-event.mjs +0 -34
- package/esm2022/common/util.mjs +0 -63
- package/esm2022/directives.mjs +0 -146
- package/esm2022/index.mjs +0 -27
- package/esm2022/navigation.module.mjs +0 -56
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-navigation.mjs +0 -8
|
@@ -1,700 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ChangeDetectorRef, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, HostBinding, Input, NgZone, Output, Renderer2, ViewChild, QueryList, forwardRef } from '@angular/core';
|
|
6
|
-
import { NgClass, NgTemplateOutlet, NgStyle } from '@angular/common';
|
|
7
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
|
-
import { packageMetadata } from '../package-metadata';
|
|
9
|
-
import { Subscription } from 'rxjs';
|
|
10
|
-
import { ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective, ActionSheetTemplateDirective } from './models';
|
|
11
|
-
import { isDocumentAvailable, isPresent, Keys } from '@progress/kendo-angular-common';
|
|
12
|
-
import { getId, getActionSheetItemIndex, getFirstAndLastFocusable, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE } from '../common/util';
|
|
13
|
-
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
14
|
-
import { AnimationBuilder } from '@angular/animations';
|
|
15
|
-
import { slideDown, slideUp } from './animation/animations';
|
|
16
|
-
import { take } from 'rxjs/operators';
|
|
17
|
-
import { ActionSheetListComponent } from './list.component';
|
|
18
|
-
import { ButtonDirective } from '@progress/kendo-angular-buttons';
|
|
19
|
-
import { ActionSheetViewComponent } from './actionsheet-view.component';
|
|
20
|
-
import * as i0 from "@angular/core";
|
|
21
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
22
|
-
import * as i2 from "@angular/animations";
|
|
23
|
-
const DEFAULT_ANIMATION_CONFIG = { duration: 300 };
|
|
24
|
-
/**
|
|
25
|
-
* Represents the [Kendo UI ActionSheet component for Angular](slug:overview_actionsheet).
|
|
26
|
-
* Use this component to display a set of choices related to a user-initiated task in a modal sheet that slides up from the bottom of the screen.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```html
|
|
30
|
-
* <kendo-actionsheet [items]="actionItems" [expanded]="true">
|
|
31
|
-
* </kendo-actionsheet>
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export class ActionSheetComponent {
|
|
35
|
-
element;
|
|
36
|
-
ngZone;
|
|
37
|
-
renderer;
|
|
38
|
-
localizationService;
|
|
39
|
-
builder;
|
|
40
|
-
cdr;
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
currentView = 1;
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
get hostClass() {
|
|
49
|
-
return this.expanded;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
direction;
|
|
55
|
-
/**
|
|
56
|
-
* Specifies the action buttons displayed in the ActionSheet footer.
|
|
57
|
-
*/
|
|
58
|
-
actions;
|
|
59
|
-
/**
|
|
60
|
-
* Configures the layout of the action buttons in the footer. By default, actions are arranged horizontally and stretched to fill the container.
|
|
61
|
-
*/
|
|
62
|
-
actionsLayout = {
|
|
63
|
-
orientation: 'horizontal',
|
|
64
|
-
alignment: 'stretched'
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Determines whether the ActionSheet closes when the overlay is clicked.
|
|
68
|
-
*
|
|
69
|
-
* @default false
|
|
70
|
-
*/
|
|
71
|
-
overlayClickClose = false;
|
|
72
|
-
/**
|
|
73
|
-
* Sets the title text displayed in the ActionSheet header.
|
|
74
|
-
*/
|
|
75
|
-
title;
|
|
76
|
-
/**
|
|
77
|
-
* Sets the subtitle text displayed below the title in the header.
|
|
78
|
-
*/
|
|
79
|
-
subtitle;
|
|
80
|
-
/**
|
|
81
|
-
* Provides the collection of items rendered in the ActionSheet content area.
|
|
82
|
-
*/
|
|
83
|
-
items;
|
|
84
|
-
/**
|
|
85
|
-
* Applies CSS classes to the inner ActionSheet element. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
86
|
-
*/
|
|
87
|
-
cssClass;
|
|
88
|
-
/**
|
|
89
|
-
* Applies inline styles to the inner ActionSheet element. Accepts any value supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
|
|
90
|
-
*/
|
|
91
|
-
cssStyle;
|
|
92
|
-
/**
|
|
93
|
-
* Configures the opening and closing animations for the ActionSheet ([see example](slug:animations_actionsheet)).
|
|
94
|
-
*
|
|
95
|
-
* @default true
|
|
96
|
-
*/
|
|
97
|
-
animation = true;
|
|
98
|
-
/**
|
|
99
|
-
* Controls whether the ActionSheet is expanded or collapsed.
|
|
100
|
-
*
|
|
101
|
-
* @default false
|
|
102
|
-
*/
|
|
103
|
-
expanded = false;
|
|
104
|
-
/**
|
|
105
|
-
* Sets the `aria-labelledby` attribute of the ActionSheet wrapper element.
|
|
106
|
-
* Use this option when the built-in header element is replaced through the [`ActionSheetHeaderTemplate`](slug:api_navigation_actionsheetheadertemplatedirective)
|
|
107
|
-
* or [`ActionSheetContentTemplate`](slug:api_navigation_actionsheetcontenttemplatedirective).
|
|
108
|
-
*/
|
|
109
|
-
titleId = getId('k-actionsheet-title');
|
|
110
|
-
/**
|
|
111
|
-
* @hidden
|
|
112
|
-
*
|
|
113
|
-
* Determines if the ActionSheet should focus the first focusable element when opened.
|
|
114
|
-
*/
|
|
115
|
-
initialFocus = true;
|
|
116
|
-
/**
|
|
117
|
-
* Fires when the `expanded` property of the component is updated.
|
|
118
|
-
* You can use this event to provide two-way binding for the `expanded` property.
|
|
119
|
-
*/
|
|
120
|
-
expandedChange = new EventEmitter();
|
|
121
|
-
/**
|
|
122
|
-
* Fires when any of the ActionSheet action buttons is clicked.
|
|
123
|
-
*/
|
|
124
|
-
action = new EventEmitter();
|
|
125
|
-
/**
|
|
126
|
-
* Fires when the ActionSheet is expanded and its animation is complete.
|
|
127
|
-
*/
|
|
128
|
-
expand = new EventEmitter();
|
|
129
|
-
/**
|
|
130
|
-
* Fires when the ActionSheet is collapsed and its animation is complete.
|
|
131
|
-
*/
|
|
132
|
-
collapse = new EventEmitter();
|
|
133
|
-
/**
|
|
134
|
-
* Fires when an ActionSheet item is clicked.
|
|
135
|
-
*/
|
|
136
|
-
itemClick = new EventEmitter();
|
|
137
|
-
/**
|
|
138
|
-
* Fires when the modal overlay is clicked.
|
|
139
|
-
*/
|
|
140
|
-
overlayClick = new EventEmitter();
|
|
141
|
-
/**
|
|
142
|
-
* @hidden
|
|
143
|
-
*/
|
|
144
|
-
childContainer;
|
|
145
|
-
/**
|
|
146
|
-
* @hidden
|
|
147
|
-
*/
|
|
148
|
-
actionSheetViews;
|
|
149
|
-
/**
|
|
150
|
-
* @hidden
|
|
151
|
-
*/
|
|
152
|
-
actionSheetTemplate;
|
|
153
|
-
/**
|
|
154
|
-
* @hidden
|
|
155
|
-
*/
|
|
156
|
-
headerTemplate;
|
|
157
|
-
/**
|
|
158
|
-
* @hidden
|
|
159
|
-
*/
|
|
160
|
-
contentTemplate;
|
|
161
|
-
/**
|
|
162
|
-
* @hidden
|
|
163
|
-
*/
|
|
164
|
-
itemTemplate;
|
|
165
|
-
/**
|
|
166
|
-
* @hidden
|
|
167
|
-
*/
|
|
168
|
-
footerTemplate;
|
|
169
|
-
dynamicRTLSubscription;
|
|
170
|
-
rtl = false;
|
|
171
|
-
domSubs = new Subscription();
|
|
172
|
-
player;
|
|
173
|
-
animationEnd = new EventEmitter();
|
|
174
|
-
constructor(element, ngZone, renderer, localizationService, builder, cdr) {
|
|
175
|
-
this.element = element;
|
|
176
|
-
this.ngZone = ngZone;
|
|
177
|
-
this.renderer = renderer;
|
|
178
|
-
this.localizationService = localizationService;
|
|
179
|
-
this.builder = builder;
|
|
180
|
-
this.cdr = cdr;
|
|
181
|
-
validatePackage(packageMetadata);
|
|
182
|
-
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
183
|
-
this.rtl = rtl;
|
|
184
|
-
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
ngAfterViewInit() {
|
|
188
|
-
this.initDomEvents();
|
|
189
|
-
this.setCssVariables();
|
|
190
|
-
}
|
|
191
|
-
ngOnChanges(changes) {
|
|
192
|
-
if (changes['expanded'] && this.expanded) {
|
|
193
|
-
this.setExpanded(true);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
ngOnDestroy() {
|
|
197
|
-
this.domSubs.unsubscribe();
|
|
198
|
-
if (this.dynamicRTLSubscription) {
|
|
199
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
200
|
-
}
|
|
201
|
-
if (this.player) {
|
|
202
|
-
this.player.destroy();
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* @hidden
|
|
207
|
-
* Navigates to the next view.
|
|
208
|
-
*/
|
|
209
|
-
nextView() {
|
|
210
|
-
if (this.currentView < this.actionSheetViews.length) {
|
|
211
|
-
this.currentView += 1;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* @hidden
|
|
216
|
-
* Navigates to the previous view.
|
|
217
|
-
*/
|
|
218
|
-
prevView() {
|
|
219
|
-
if (this.currentView > 1) {
|
|
220
|
-
this.currentView -= 1;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Toggles the visibility of the ActionSheet.
|
|
225
|
-
*
|
|
226
|
-
* @param expanded? - Boolean. Specifies if the ActionSheet will be expanded or collapsed.
|
|
227
|
-
*/
|
|
228
|
-
toggle(expanded) {
|
|
229
|
-
const previous = this.expanded;
|
|
230
|
-
const current = isPresent(expanded) ? expanded : !previous;
|
|
231
|
-
if (current === previous) {
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
if (current === true) {
|
|
235
|
-
this.setExpanded(true);
|
|
236
|
-
}
|
|
237
|
-
else if (current === false && !this.animation) {
|
|
238
|
-
this.setExpanded(false);
|
|
239
|
-
}
|
|
240
|
-
if (this.animation) {
|
|
241
|
-
this.animationEnd.pipe(take(1))
|
|
242
|
-
.subscribe(() => { this.onAnimationEnd(current); });
|
|
243
|
-
this.playAnimation(current);
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
this[current ? 'expand' : 'collapse'].emit();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* @hidden
|
|
251
|
-
*/
|
|
252
|
-
get orientationClass() {
|
|
253
|
-
return this.actionsLayout.orientation ? `k-actions-${this.actionsLayout.orientation}` : '';
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @hidden
|
|
257
|
-
*/
|
|
258
|
-
get alignmentClass() {
|
|
259
|
-
return this.actionsLayout.alignment ? `k-actions-${this.actionsLayout.alignment}` : '';
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* @hidden
|
|
263
|
-
*/
|
|
264
|
-
get topGroupItems() {
|
|
265
|
-
return this.items?.filter(item => !item.group || item.group === 'top');
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* @hidden
|
|
269
|
-
*/
|
|
270
|
-
get bottomGroupItems() {
|
|
271
|
-
return this.items?.filter(item => item.group === 'bottom');
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* @hidden
|
|
275
|
-
*/
|
|
276
|
-
onItemClick(ev) {
|
|
277
|
-
this.itemClick.emit(ev);
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* @hidden
|
|
281
|
-
*/
|
|
282
|
-
onOverlayClick() {
|
|
283
|
-
this.overlayClick.emit();
|
|
284
|
-
if (this.overlayClickClose) {
|
|
285
|
-
this.toggle(false);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* @hidden
|
|
290
|
-
*/
|
|
291
|
-
get shouldRenderSeparator() {
|
|
292
|
-
return this.topGroupItems?.length > 0 && this.bottomGroupItems?.length > 0;
|
|
293
|
-
}
|
|
294
|
-
initDomEvents() {
|
|
295
|
-
if (!this.element) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
this.ngZone.runOutsideAngular(() => {
|
|
299
|
-
this.domSubs.add(this.renderer.listen(this.element.nativeElement, 'keydown', (ev) => {
|
|
300
|
-
this.onKeyDown(ev);
|
|
301
|
-
}));
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
setCssVariables() {
|
|
305
|
-
if (!this.element || !isDocumentAvailable()) {
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
// The following syntax is used as it does not violate CSP compliance
|
|
309
|
-
this.element.nativeElement.style.setProperty('--kendo-actionsheet-height', 'auto');
|
|
310
|
-
this.element.nativeElement.style.setProperty('--kendo-actionsheet-max-height', 'none');
|
|
311
|
-
}
|
|
312
|
-
onKeyDown(event) {
|
|
313
|
-
const target = event.target;
|
|
314
|
-
if (event.code === Keys.Tab) {
|
|
315
|
-
this.ngZone.run(() => {
|
|
316
|
-
this.keepFocusWithinComponent(target, event);
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
if (event.code === Keys.Escape) {
|
|
320
|
-
this.ngZone.run(() => {
|
|
321
|
-
this.overlayClick.emit();
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
if (event.code === Keys.Enter || event.code === Keys.NumpadEnter) {
|
|
325
|
-
this.ngZone.run(() => {
|
|
326
|
-
this.triggerItemClick(target, event);
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
handleInitialFocus() {
|
|
331
|
-
const [firstFocusable] = getFirstAndLastFocusable(this.element.nativeElement);
|
|
332
|
-
if (firstFocusable && this.initialFocus) {
|
|
333
|
-
firstFocusable.focus();
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
keepFocusWithinComponent(target, event) {
|
|
337
|
-
const wrapper = this.element.nativeElement;
|
|
338
|
-
const [firstFocusable, lastFocusable] = getFirstAndLastFocusable(wrapper);
|
|
339
|
-
const tabAfterLastFocusable = !event.shiftKey && target === lastFocusable;
|
|
340
|
-
const shiftTabAfterFirstFocusable = event.shiftKey && target === firstFocusable;
|
|
341
|
-
if (tabAfterLastFocusable) {
|
|
342
|
-
event.preventDefault();
|
|
343
|
-
firstFocusable.focus();
|
|
344
|
-
}
|
|
345
|
-
if (shiftTabAfterFirstFocusable) {
|
|
346
|
-
event.preventDefault();
|
|
347
|
-
lastFocusable.focus();
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
triggerItemClick(target, event) {
|
|
351
|
-
const itemIndex = getActionSheetItemIndex(target, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE, this.element.nativeElement);
|
|
352
|
-
const item = isPresent(itemIndex) ? this.items[itemIndex] : null;
|
|
353
|
-
if (!item || item.disabled) {
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
this.itemClick.emit({ item, originalEvent: event });
|
|
357
|
-
}
|
|
358
|
-
setExpanded(value) {
|
|
359
|
-
this.expanded = value;
|
|
360
|
-
this.expandedChange.emit(value);
|
|
361
|
-
if (this.expanded) {
|
|
362
|
-
this.cdr.detectChanges();
|
|
363
|
-
this.handleInitialFocus();
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
onAnimationEnd(currentExpanded) {
|
|
367
|
-
if (currentExpanded) {
|
|
368
|
-
this.expand.emit();
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
this.setExpanded(false);
|
|
372
|
-
this.collapse.emit();
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
playAnimation(expanded) {
|
|
376
|
-
const duration = typeof this.animation !== 'boolean' && this.animation.duration ? this.animation.duration : DEFAULT_ANIMATION_CONFIG.duration;
|
|
377
|
-
const contentHeight = getComputedStyle(this.childContainer.nativeElement).height;
|
|
378
|
-
const animation = expanded ? slideUp(duration, contentHeight) : slideDown(duration, contentHeight);
|
|
379
|
-
const factory = this.builder.build(animation);
|
|
380
|
-
this.player = factory.create(this.childContainer.nativeElement);
|
|
381
|
-
this.player.onDone(() => {
|
|
382
|
-
if (this.player) {
|
|
383
|
-
this.animationEnd.emit();
|
|
384
|
-
this.player.destroy();
|
|
385
|
-
this.player = null;
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
this.player.play();
|
|
389
|
-
}
|
|
390
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i2.AnimationBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
391
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ActionSheetComponent, isStandalone: true, selector: "kendo-actionsheet", inputs: { actions: "actions", actionsLayout: "actionsLayout", overlayClickClose: "overlayClickClose", title: "title", subtitle: "subtitle", items: "items", cssClass: "cssClass", cssStyle: "cssStyle", animation: "animation", expanded: "expanded", titleId: "titleId", initialFocus: "initialFocus" }, outputs: { expandedChange: "expandedChange", action: "action", expand: "expand", collapse: "collapse", itemClick: "itemClick", overlayClick: "overlayClick" }, host: { properties: { "class.k-actionsheet-container": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
|
|
392
|
-
LocalizationService,
|
|
393
|
-
{
|
|
394
|
-
provide: L10N_PREFIX,
|
|
395
|
-
useValue: 'kendo.actionsheet.component'
|
|
396
|
-
}
|
|
397
|
-
], queries: [{ propertyName: "actionSheetTemplate", first: true, predicate: ActionSheetTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ActionSheetHeaderTemplateDirective, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ActionSheetContentTemplateDirective, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: ActionSheetItemTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ActionSheetFooterTemplateDirective, descendants: true }, { propertyName: "actionSheetViews", predicate: i0.forwardRef(() => ActionSheetViewComponent) }], viewQueries: [{ propertyName: "childContainer", first: true, predicate: ["childContainer"], descendants: true }], exportAs: ["kendoActionSheet"], usesOnChanges: true, ngImport: i0, template: `
|
|
398
|
-
@if (expanded) {
|
|
399
|
-
<div class="k-overlay" (click)="onOverlayClick()"></div>
|
|
400
|
-
<div class="k-animation-container k-animation-container-shown">
|
|
401
|
-
<div #childContainer class="k-child-animation-container" [style]="'bottom: 0px; width: 100%;'">
|
|
402
|
-
<div
|
|
403
|
-
class="k-actionsheet k-actionsheet-bottom"
|
|
404
|
-
[ngClass]="cssClass"
|
|
405
|
-
[ngStyle]="cssStyle"
|
|
406
|
-
role="dialog"
|
|
407
|
-
aria-modal="true"
|
|
408
|
-
[attr.aria-labelledby]="titleId"
|
|
409
|
-
[style.--kendo-actionsheet-view-current]="actionSheetViews?.length > 0 ? currentView : null"
|
|
410
|
-
>
|
|
411
|
-
@if (actionSheetViews?.length > 0) {
|
|
412
|
-
<ng-content select="kendo-actionsheet-view"></ng-content>
|
|
413
|
-
}
|
|
414
|
-
@if (actionSheetViews?.length === 0) {
|
|
415
|
-
<div class="k-actionsheet-view">
|
|
416
|
-
@if (actionSheetTemplate) {
|
|
417
|
-
<ng-template
|
|
418
|
-
[ngTemplateOutlet]="actionSheetTemplate?.templateRef">
|
|
419
|
-
</ng-template>
|
|
420
|
-
} @else {
|
|
421
|
-
@if (title || subtitle || headerTemplate) {
|
|
422
|
-
<div class="k-actionsheet-titlebar">
|
|
423
|
-
@if (headerTemplate) {
|
|
424
|
-
<ng-template
|
|
425
|
-
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
426
|
-
</ng-template>
|
|
427
|
-
} @else {
|
|
428
|
-
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
429
|
-
<div class="k-actionsheet-title" [id]="titleId">
|
|
430
|
-
@if (title) {
|
|
431
|
-
<div class="k-text-center">{{title}}</div>
|
|
432
|
-
}
|
|
433
|
-
@if (subtitle) {
|
|
434
|
-
<div class="k-actionsheet-subtitle k-text-center">{{subtitle}}</div>
|
|
435
|
-
}
|
|
436
|
-
</div>
|
|
437
|
-
</div>
|
|
438
|
-
}
|
|
439
|
-
</div>
|
|
440
|
-
}
|
|
441
|
-
@if (items || contentTemplate) {
|
|
442
|
-
<div class="k-actionsheet-content">
|
|
443
|
-
@if (contentTemplate) {
|
|
444
|
-
<ng-template
|
|
445
|
-
[ngTemplateOutlet]="contentTemplate?.templateRef">
|
|
446
|
-
</ng-template>
|
|
447
|
-
} @else {
|
|
448
|
-
@if (topGroupItems) {
|
|
449
|
-
<div kendoActionSheetList
|
|
450
|
-
class="k-list-ul"
|
|
451
|
-
role="group"
|
|
452
|
-
[groupItems]="topGroupItems"
|
|
453
|
-
[allItems]="items"
|
|
454
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
455
|
-
(itemClick)="onItemClick($event)">
|
|
456
|
-
</div>
|
|
457
|
-
}
|
|
458
|
-
@if (shouldRenderSeparator) {
|
|
459
|
-
<hr class="k-hr"/>
|
|
460
|
-
}
|
|
461
|
-
@if (bottomGroupItems) {
|
|
462
|
-
<div kendoActionSheetList
|
|
463
|
-
class="k-list-ul"
|
|
464
|
-
role="group"
|
|
465
|
-
[groupItems]="bottomGroupItems"
|
|
466
|
-
[allItems]="items"
|
|
467
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
468
|
-
(itemClick)="onItemClick($event)">
|
|
469
|
-
</div>
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
</div>
|
|
473
|
-
}
|
|
474
|
-
@if (footerTemplate || actions) {
|
|
475
|
-
<div [ngClass]="[orientationClass, alignmentClass, 'k-actions', 'k-actionsheet-footer']">
|
|
476
|
-
@if (footerTemplate) {
|
|
477
|
-
<ng-template
|
|
478
|
-
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
479
|
-
</ng-template>
|
|
480
|
-
}
|
|
481
|
-
@if (!footerTemplate && actions) {
|
|
482
|
-
@for (actionButton of actions; track actionButton) {
|
|
483
|
-
<button
|
|
484
|
-
kendoButton
|
|
485
|
-
type="button"
|
|
486
|
-
[icon]="actionButton.icon"
|
|
487
|
-
[title]="actionButton.title"
|
|
488
|
-
[svgIcon]="actionButton.svgIcon"
|
|
489
|
-
[themeColor]="actionButton.themeColor"
|
|
490
|
-
[fillMode]="actionButton.fillMode"
|
|
491
|
-
[size]="actionButton.size"
|
|
492
|
-
[attr.aria-label]="actionButton.text"
|
|
493
|
-
(click)="action.emit(actionButton)"
|
|
494
|
-
>
|
|
495
|
-
{{ actionButton.text }}
|
|
496
|
-
</button>
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
</div>
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
</div>
|
|
503
|
-
}
|
|
504
|
-
</div>
|
|
505
|
-
</div>
|
|
506
|
-
</div>
|
|
507
|
-
}
|
|
508
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionSheetListComponent, selector: "[kendoActionSheetList]", inputs: ["groupItems", "allItems", "itemTemplate"], outputs: ["itemClick"] }, { kind: "component", type: ButtonDirective, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
509
|
-
}
|
|
510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ActionSheetComponent, decorators: [{
|
|
511
|
-
type: Component,
|
|
512
|
-
args: [{
|
|
513
|
-
exportAs: 'kendoActionSheet',
|
|
514
|
-
selector: 'kendo-actionsheet',
|
|
515
|
-
template: `
|
|
516
|
-
@if (expanded) {
|
|
517
|
-
<div class="k-overlay" (click)="onOverlayClick()"></div>
|
|
518
|
-
<div class="k-animation-container k-animation-container-shown">
|
|
519
|
-
<div #childContainer class="k-child-animation-container" [style]="'bottom: 0px; width: 100%;'">
|
|
520
|
-
<div
|
|
521
|
-
class="k-actionsheet k-actionsheet-bottom"
|
|
522
|
-
[ngClass]="cssClass"
|
|
523
|
-
[ngStyle]="cssStyle"
|
|
524
|
-
role="dialog"
|
|
525
|
-
aria-modal="true"
|
|
526
|
-
[attr.aria-labelledby]="titleId"
|
|
527
|
-
[style.--kendo-actionsheet-view-current]="actionSheetViews?.length > 0 ? currentView : null"
|
|
528
|
-
>
|
|
529
|
-
@if (actionSheetViews?.length > 0) {
|
|
530
|
-
<ng-content select="kendo-actionsheet-view"></ng-content>
|
|
531
|
-
}
|
|
532
|
-
@if (actionSheetViews?.length === 0) {
|
|
533
|
-
<div class="k-actionsheet-view">
|
|
534
|
-
@if (actionSheetTemplate) {
|
|
535
|
-
<ng-template
|
|
536
|
-
[ngTemplateOutlet]="actionSheetTemplate?.templateRef">
|
|
537
|
-
</ng-template>
|
|
538
|
-
} @else {
|
|
539
|
-
@if (title || subtitle || headerTemplate) {
|
|
540
|
-
<div class="k-actionsheet-titlebar">
|
|
541
|
-
@if (headerTemplate) {
|
|
542
|
-
<ng-template
|
|
543
|
-
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
544
|
-
</ng-template>
|
|
545
|
-
} @else {
|
|
546
|
-
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
547
|
-
<div class="k-actionsheet-title" [id]="titleId">
|
|
548
|
-
@if (title) {
|
|
549
|
-
<div class="k-text-center">{{title}}</div>
|
|
550
|
-
}
|
|
551
|
-
@if (subtitle) {
|
|
552
|
-
<div class="k-actionsheet-subtitle k-text-center">{{subtitle}}</div>
|
|
553
|
-
}
|
|
554
|
-
</div>
|
|
555
|
-
</div>
|
|
556
|
-
}
|
|
557
|
-
</div>
|
|
558
|
-
}
|
|
559
|
-
@if (items || contentTemplate) {
|
|
560
|
-
<div class="k-actionsheet-content">
|
|
561
|
-
@if (contentTemplate) {
|
|
562
|
-
<ng-template
|
|
563
|
-
[ngTemplateOutlet]="contentTemplate?.templateRef">
|
|
564
|
-
</ng-template>
|
|
565
|
-
} @else {
|
|
566
|
-
@if (topGroupItems) {
|
|
567
|
-
<div kendoActionSheetList
|
|
568
|
-
class="k-list-ul"
|
|
569
|
-
role="group"
|
|
570
|
-
[groupItems]="topGroupItems"
|
|
571
|
-
[allItems]="items"
|
|
572
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
573
|
-
(itemClick)="onItemClick($event)">
|
|
574
|
-
</div>
|
|
575
|
-
}
|
|
576
|
-
@if (shouldRenderSeparator) {
|
|
577
|
-
<hr class="k-hr"/>
|
|
578
|
-
}
|
|
579
|
-
@if (bottomGroupItems) {
|
|
580
|
-
<div kendoActionSheetList
|
|
581
|
-
class="k-list-ul"
|
|
582
|
-
role="group"
|
|
583
|
-
[groupItems]="bottomGroupItems"
|
|
584
|
-
[allItems]="items"
|
|
585
|
-
[itemTemplate]="itemTemplate?.templateRef"
|
|
586
|
-
(itemClick)="onItemClick($event)">
|
|
587
|
-
</div>
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
</div>
|
|
591
|
-
}
|
|
592
|
-
@if (footerTemplate || actions) {
|
|
593
|
-
<div [ngClass]="[orientationClass, alignmentClass, 'k-actions', 'k-actionsheet-footer']">
|
|
594
|
-
@if (footerTemplate) {
|
|
595
|
-
<ng-template
|
|
596
|
-
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
597
|
-
</ng-template>
|
|
598
|
-
}
|
|
599
|
-
@if (!footerTemplate && actions) {
|
|
600
|
-
@for (actionButton of actions; track actionButton) {
|
|
601
|
-
<button
|
|
602
|
-
kendoButton
|
|
603
|
-
type="button"
|
|
604
|
-
[icon]="actionButton.icon"
|
|
605
|
-
[title]="actionButton.title"
|
|
606
|
-
[svgIcon]="actionButton.svgIcon"
|
|
607
|
-
[themeColor]="actionButton.themeColor"
|
|
608
|
-
[fillMode]="actionButton.fillMode"
|
|
609
|
-
[size]="actionButton.size"
|
|
610
|
-
[attr.aria-label]="actionButton.text"
|
|
611
|
-
(click)="action.emit(actionButton)"
|
|
612
|
-
>
|
|
613
|
-
{{ actionButton.text }}
|
|
614
|
-
</button>
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
</div>
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
</div>
|
|
621
|
-
}
|
|
622
|
-
</div>
|
|
623
|
-
</div>
|
|
624
|
-
</div>
|
|
625
|
-
}
|
|
626
|
-
`,
|
|
627
|
-
providers: [
|
|
628
|
-
LocalizationService,
|
|
629
|
-
{
|
|
630
|
-
provide: L10N_PREFIX,
|
|
631
|
-
useValue: 'kendo.actionsheet.component'
|
|
632
|
-
}
|
|
633
|
-
],
|
|
634
|
-
standalone: true,
|
|
635
|
-
imports: [NgStyle, NgClass, NgTemplateOutlet, ActionSheetListComponent, ButtonDirective]
|
|
636
|
-
}]
|
|
637
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i2.AnimationBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { hostClass: [{
|
|
638
|
-
type: HostBinding,
|
|
639
|
-
args: ['class.k-actionsheet-container']
|
|
640
|
-
}], direction: [{
|
|
641
|
-
type: HostBinding,
|
|
642
|
-
args: ['attr.dir']
|
|
643
|
-
}], actions: [{
|
|
644
|
-
type: Input
|
|
645
|
-
}], actionsLayout: [{
|
|
646
|
-
type: Input
|
|
647
|
-
}], overlayClickClose: [{
|
|
648
|
-
type: Input
|
|
649
|
-
}], title: [{
|
|
650
|
-
type: Input
|
|
651
|
-
}], subtitle: [{
|
|
652
|
-
type: Input
|
|
653
|
-
}], items: [{
|
|
654
|
-
type: Input
|
|
655
|
-
}], cssClass: [{
|
|
656
|
-
type: Input
|
|
657
|
-
}], cssStyle: [{
|
|
658
|
-
type: Input
|
|
659
|
-
}], animation: [{
|
|
660
|
-
type: Input
|
|
661
|
-
}], expanded: [{
|
|
662
|
-
type: Input
|
|
663
|
-
}], titleId: [{
|
|
664
|
-
type: Input
|
|
665
|
-
}], initialFocus: [{
|
|
666
|
-
type: Input
|
|
667
|
-
}], expandedChange: [{
|
|
668
|
-
type: Output
|
|
669
|
-
}], action: [{
|
|
670
|
-
type: Output
|
|
671
|
-
}], expand: [{
|
|
672
|
-
type: Output
|
|
673
|
-
}], collapse: [{
|
|
674
|
-
type: Output
|
|
675
|
-
}], itemClick: [{
|
|
676
|
-
type: Output
|
|
677
|
-
}], overlayClick: [{
|
|
678
|
-
type: Output
|
|
679
|
-
}], childContainer: [{
|
|
680
|
-
type: ViewChild,
|
|
681
|
-
args: ['childContainer']
|
|
682
|
-
}], actionSheetViews: [{
|
|
683
|
-
type: ContentChildren,
|
|
684
|
-
args: [forwardRef(() => ActionSheetViewComponent)]
|
|
685
|
-
}], actionSheetTemplate: [{
|
|
686
|
-
type: ContentChild,
|
|
687
|
-
args: [ActionSheetTemplateDirective]
|
|
688
|
-
}], headerTemplate: [{
|
|
689
|
-
type: ContentChild,
|
|
690
|
-
args: [ActionSheetHeaderTemplateDirective]
|
|
691
|
-
}], contentTemplate: [{
|
|
692
|
-
type: ContentChild,
|
|
693
|
-
args: [ActionSheetContentTemplateDirective]
|
|
694
|
-
}], itemTemplate: [{
|
|
695
|
-
type: ContentChild,
|
|
696
|
-
args: [ActionSheetItemTemplateDirective]
|
|
697
|
-
}], footerTemplate: [{
|
|
698
|
-
type: ContentChild,
|
|
699
|
-
args: [ActionSheetFooterTemplateDirective]
|
|
700
|
-
}] } });
|