@progress/kendo-angular-buttons 21.4.1-develop.1 → 22.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/fesm2022/progress-kendo-angular-buttons.mjs +105 -105
  2. package/listbutton/list-button.d.ts +1 -1
  3. package/package.json +11 -19
  4. package/splitbutton/localization/messages.d.ts +1 -1
  5. package/esm2022/button/button-settings.mjs +0 -5
  6. package/esm2022/button/button.component.mjs +0 -558
  7. package/esm2022/button/button.module.mjs +0 -43
  8. package/esm2022/button/button.service.mjs +0 -22
  9. package/esm2022/button/selection-settings.mjs +0 -5
  10. package/esm2022/buttongroup/buttongroup.component.mjs +0 -340
  11. package/esm2022/buttongroup/buttongroup.module.mjs +0 -49
  12. package/esm2022/buttons.module.mjs +0 -58
  13. package/esm2022/chip/chip-content-click-event-args.interface.mjs +0 -5
  14. package/esm2022/chip/chip-list-remove-event-args.interface.mjs +0 -5
  15. package/esm2022/chip/chip-list.component.mjs +0 -360
  16. package/esm2022/chip/chip-remove-event-args.interface.mjs +0 -5
  17. package/esm2022/chip/chip.component.mjs +0 -585
  18. package/esm2022/chip/chip.module.mjs +0 -45
  19. package/esm2022/chip/models/avatar-settings.interface.mjs +0 -5
  20. package/esm2022/chip/models/selection.mjs +0 -5
  21. package/esm2022/common/models/arrow-settings.mjs +0 -5
  22. package/esm2022/common/models/fillmode.mjs +0 -5
  23. package/esm2022/common/models/rounded.mjs +0 -5
  24. package/esm2022/common/models/size.mjs +0 -5
  25. package/esm2022/common/models/styling-classes.mjs +0 -5
  26. package/esm2022/common/models/theme-color.mjs +0 -5
  27. package/esm2022/common/models.mjs +0 -10
  28. package/esm2022/direction.mjs +0 -5
  29. package/esm2022/directives.mjs +0 -176
  30. package/esm2022/dropdownbutton/dropdownbutton.component.mjs +0 -482
  31. package/esm2022/dropdownbutton/dropdownbutton.module.mjs +0 -50
  32. package/esm2022/floatingactionbutton/animations/animations.mjs +0 -33
  33. package/esm2022/floatingactionbutton/dial-item.component.mjs +0 -161
  34. package/esm2022/floatingactionbutton/dial-list.component.mjs +0 -98
  35. package/esm2022/floatingactionbutton/floatingactionbutton.component.mjs +0 -954
  36. package/esm2022/floatingactionbutton/floatingactionbutton.module.mjs +0 -47
  37. package/esm2022/floatingactionbutton/models/align.mjs +0 -5
  38. package/esm2022/floatingactionbutton/models/item-animation.interface.mjs +0 -5
  39. package/esm2022/floatingactionbutton/models/item-click.event.mjs +0 -5
  40. package/esm2022/floatingactionbutton/models/item.interface.mjs +0 -5
  41. package/esm2022/floatingactionbutton/models/offset.mjs +0 -5
  42. package/esm2022/floatingactionbutton/models/position-mode.mjs +0 -5
  43. package/esm2022/floatingactionbutton/templates/dial-item-template.directive.mjs +0 -37
  44. package/esm2022/floatingactionbutton/templates/fab-template.directive.mjs +0 -38
  45. package/esm2022/floatingactionbutton/utils.mjs +0 -38
  46. package/esm2022/focusable/focus.service.mjs +0 -38
  47. package/esm2022/focusable/focusable.directive.mjs +0 -67
  48. package/esm2022/index.mjs +0 -33
  49. package/esm2022/listbutton/button-item-template.directive.mjs +0 -47
  50. package/esm2022/listbutton/container.service.mjs +0 -18
  51. package/esm2022/listbutton/list-button.mjs +0 -461
  52. package/esm2022/listbutton/list-item-model.mjs +0 -5
  53. package/esm2022/listbutton/list.component.mjs +0 -177
  54. package/esm2022/listbutton/popup-settings.mjs +0 -5
  55. package/esm2022/navigation/key-events.mjs +0 -13
  56. package/esm2022/navigation/navigation-action.mjs +0 -20
  57. package/esm2022/navigation/navigation-config.mjs +0 -9
  58. package/esm2022/navigation/navigation.service.mjs +0 -111
  59. package/esm2022/package-metadata.mjs +0 -16
  60. package/esm2022/preventable-event.mjs +0 -25
  61. package/esm2022/progress-kendo-angular-buttons.mjs +0 -8
  62. package/esm2022/speechtotextbutton/models/error-event.mjs +0 -5
  63. package/esm2022/speechtotextbutton/models/integration-mode.mjs +0 -5
  64. package/esm2022/speechtotextbutton/models/result-event.mjs +0 -5
  65. package/esm2022/speechtotextbutton/models/speechtotextbutton-settings.mjs +0 -5
  66. package/esm2022/speechtotextbutton/speechtotextbutton.component.mjs +0 -532
  67. package/esm2022/speechtotextbutton/speechtotextbutton.module.mjs +0 -31
  68. package/esm2022/splitbutton/localization/custom-messages.component.mjs +0 -40
  69. package/esm2022/splitbutton/localization/localized-messages.directive.mjs +0 -39
  70. package/esm2022/splitbutton/localization/messages.mjs +0 -50
  71. package/esm2022/splitbutton/splitbutton.component.mjs +0 -761
  72. package/esm2022/splitbutton/splitbutton.module.mjs +0 -37
  73. package/esm2022/util.mjs +0 -108
@@ -1,761 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, ElementRef, Input, Output, HostBinding, HostListener, EventEmitter, ContentChild, NgZone, ChangeDetectorRef, Renderer2, forwardRef } from '@angular/core';
6
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
7
- import { PopupService } from '@progress/kendo-angular-popup';
8
- import { ListButton } from './../listbutton/list-button';
9
- import { ButtonItemTemplateDirective } from './../listbutton/button-item-template.directive';
10
- import { FocusService } from './../focusable/focus.service';
11
- import { NavigationService } from './../navigation/navigation.service';
12
- import { NAVIGATION_CONFIG } from './../navigation/navigation-config';
13
- import { isDocumentAvailable, guid, isChanged, anyChanged, MultiTabStop, replaceMessagePlaceholder } from '@progress/kendo-angular-common';
14
- import { closest, isPresent } from './../util';
15
- import { Keys } from '@progress/kendo-angular-common';
16
- import { getStylingClasses } from '../util';
17
- import { PopupContainerService } from '../listbutton/container.service';
18
- import { caretAltDownIcon } from '@progress/kendo-svg-icons';
19
- import { ListComponent } from '../listbutton/list.component';
20
- import { NgClass } from '@angular/common';
21
- import { ButtonComponent } from '../button/button.component';
22
- import { LocalizedSplitButtonMessagesDirective } from './localization/localized-messages.directive';
23
- import * as i0 from "@angular/core";
24
- import * as i1 from "./../focusable/focus.service";
25
- import * as i2 from "./../navigation/navigation.service";
26
- import * as i3 from "@progress/kendo-angular-popup";
27
- import * as i4 from "@progress/kendo-angular-l10n";
28
- import * as i5 from "../listbutton/container.service";
29
- const NAVIGATION_SETTINGS = {
30
- useLeftRightArrows: true
31
- };
32
- const NAVIGATION_SETTINGS_PROVIDER = {
33
- provide: NAVIGATION_CONFIG,
34
- useValue: NAVIGATION_SETTINGS
35
- };
36
- const DEFAULT_ROUNDED = 'medium';
37
- const DEFAULT_FILL_MODE = 'solid';
38
- /**
39
- * Represents the Kendo UI SplitButton component for Angular.
40
- *
41
- * @example
42
- * ```ts
43
- * @Component({
44
- * selector: 'my-app',
45
- * template: `
46
- * <kendo-splitbutton [data]="items" (buttonClick)="onSplitButtonClick()">Paste</kendo-splitbutton>
47
- * `
48
- * })
49
- *
50
- * class AppComponent {
51
- * public items: Array<any> = [{
52
- * text: 'Keep Text Only',
53
- * icon: 'clipboard-text',
54
- * click: () => { console.log('Keep Text Only click handler'); }
55
- * }, {
56
- * text: 'Paste as HTML',
57
- * icon: 'clipboard-code'
58
- * }
59
- * ];
60
- *
61
- * public onSplitButtonClick(dataItem: any): void {
62
- * console.log('Paste');
63
- * }
64
- * }
65
- * ```
66
- */
67
- export class SplitButtonComponent extends ListButton {
68
- localization;
69
- renderer;
70
- /**
71
- * Sets the text displayed within the SplitButton.
72
- */
73
- text = '';
74
- /**
75
- * Specifies an icon to display next to the button text ([see example]({% slug databinding_splitbutton %}#arrays-of-complex-data)).
76
- */
77
- icon = '';
78
- /**
79
- * Specifies an `SVGIcon` to display next to the button text.
80
- */
81
- svgIcon;
82
- /**
83
- * Specifies a custom CSS class for the icon displayed next to the button text ([see example]({% slug databinding_splitbutton %}#arrays-of-complex-data)).
84
- */
85
- iconClass;
86
- /**
87
- * Specifies the `type` attribute of the main button.
88
- */
89
- type = 'button';
90
- /**
91
- * Specifies the URL of an image to display next to the button text ([see example]({% slug databinding_splitbutton %}#arrays-of-complex-data)).
92
- */
93
- imageUrl = '';
94
- /**
95
- * Configures the padding of the SplitButton ([see example]({% slug api_buttons_splitbuttoncomponent %}#size)).
96
- *
97
- * @default 'medium'
98
- */
99
- size = 'medium';
100
- /**
101
- * Configures the border radius of the SplitButton ([see example]({% slug api_buttons_splitbuttoncomponent %}#rounded)).
102
- *
103
- * @default 'medium'
104
- */
105
- set rounded(rounded) {
106
- const newRounded = rounded || DEFAULT_ROUNDED;
107
- this.handleClasses(newRounded, 'rounded');
108
- this._rounded = newRounded;
109
- }
110
- get rounded() {
111
- return this._rounded;
112
- }
113
- /**
114
- * Configures the background and border styles of the SplitButton ([see example]({% slug api_buttons_splitbuttoncomponent %}#fillMode)).
115
- *
116
- * @default 'solid'
117
- */
118
- set fillMode(fillMode) {
119
- const newFillMode = fillMode || DEFAULT_FILL_MODE;
120
- this._fillMode = fillMode === 'clear' ? 'flat' : newFillMode;
121
- }
122
- get fillMode() {
123
- return this._fillMode;
124
- }
125
- /**
126
- * Configures the theme color of the SplitButton. The theme color applies to the background, border, and text ([see example]({% slug api_buttons_splitbuttoncomponent %}#themeColor)).
127
- *
128
- * @default 'base'
129
- */
130
- themeColor = 'base';
131
- /**
132
- * Disables the SplitButton when set to `true` ([see example]({% slug databinding_splitbutton %}#arrays-of-complex-data)).
133
- */
134
- set disabled(value) {
135
- if (this.isOpen) {
136
- this.toggle(false);
137
- }
138
- this._disabled = value;
139
- }
140
- get disabled() {
141
- return this._disabled;
142
- }
143
- /**
144
- * Configures the popup settings of the SplitButton.
145
- */
146
- set popupSettings(settings) {
147
- this._popupSettings = { animate: true, popupClass: '', ...settings };
148
- }
149
- get popupSettings() {
150
- return this._popupSettings;
151
- }
152
- /**
153
- * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
154
- */
155
- tabIndex = 0;
156
- /**
157
- * Configures the text field of the button-list popup.
158
- */
159
- textField;
160
- /**
161
- * Sets the data for the SplitButton. Provide the data as an array-like list.
162
- */
163
- set data(data) {
164
- this._data = data || [];
165
- }
166
- get data() {
167
- if (!this._data) {
168
- this.data = [];
169
- }
170
- return this._data;
171
- }
172
- /**
173
- * Specifies the CSS classes for the button that opens the popup.
174
- * Supports values compatible with [`ngClass`](link:site.data.urls.angular['ngclassapi']).
175
- */
176
- arrowButtonClass;
177
- /**
178
- * Specifies the name of the font icon displayed on the button that opens the popup.
179
- */
180
- arrowButtonIcon = 'caret-alt-down';
181
- /**
182
- * Specifies the [`SVGIcon`](slug:api_icons_svgiconcomponent) displayed on the button that opens the popup.
183
- */
184
- arrowButtonSvgIcon = caretAltDownIcon;
185
- /**
186
- * Sets attributes for the main button.
187
- */
188
- set buttonAttributes(buttonAttributes) {
189
- const newButtonAttributes = buttonAttributes || null;
190
- this.handleButtonAttributes(newButtonAttributes);
191
- this._buttonAttributes = newButtonAttributes;
192
- }
193
- get buttonAttributes() {
194
- return this._buttonAttributes;
195
- }
196
- /**
197
- * Emits an event when the main button is clicked.
198
- */
199
- buttonClick = new EventEmitter();
200
- /**
201
- * Emits an event when an item in the drop-down list is clicked. The event data contains the clicked item's data.
202
- */
203
- itemClick = new EventEmitter();
204
- /**
205
- * Emits an event when the SplitButton gains focus.
206
- */
207
- onFocus = new EventEmitter();
208
- /**
209
- * Emits an event when the SplitButton is blurred.
210
- */
211
- onBlur = new EventEmitter();
212
- /**
213
- * Emits an event before the popup opens. This event is preventable.
214
- */
215
- open = new EventEmitter();
216
- /**
217
- * Emits an event before the popup closes. This event is preventable.
218
- */
219
- close = new EventEmitter();
220
- /**
221
- * Specifies a template to customize the content of the items in the drop-down list.
222
- */
223
- itemTemplate;
224
- activeArrow = false;
225
- listId = guid();
226
- /**
227
- * @hidden
228
- */
229
- get hasContent() {
230
- return this.button?.nativeElement.childElementCount > 0;
231
- }
232
- /**
233
- * @hidden
234
- */
235
- get active() {
236
- return this._active;
237
- }
238
- /**
239
- * @hidden
240
- */
241
- get componentTabIndex() {
242
- return this.disabled ? -1 : this.tabIndex;
243
- }
244
- buttonText = '';
245
- arrowButtonClicked = false;
246
- _rounded = DEFAULT_ROUNDED;
247
- _fillMode = DEFAULT_FILL_MODE;
248
- _buttonAttributes = null;
249
- documentMouseUpSub;
250
- set isFocused(value) {
251
- this._isFocused = value;
252
- }
253
- get isFocused() {
254
- return this._isFocused && !this._disabled && isDocumentAvailable() && this.wrapperContains(document.activeElement);
255
- }
256
- get widgetClasses() {
257
- return true;
258
- }
259
- get dir() {
260
- return this.direction;
261
- }
262
- /**
263
- * @hidden
264
- */
265
- get ariaLabel() {
266
- const localizationMsg = this.messageFor('splitButtonLabel') || '';
267
- return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
268
- }
269
- /**
270
- * @hidden
271
- */
272
- messageFor(key) {
273
- return this.localization.get(key);
274
- }
275
- /**
276
- * @hidden
277
- */
278
- onButtonFocus(event) {
279
- if (!this._disabled) {
280
- if (!this._isFocused) {
281
- this.onFocus.emit();
282
- }
283
- this._isFocused = true;
284
- this.focusService.resetFocus();
285
- const relatedTargetInList = event.relatedTarget && closest(event.relatedTarget, '.k-popup kendo-button-list');
286
- if (this.openState && !relatedTargetInList) {
287
- this.focusService.focus(0);
288
- }
289
- }
290
- }
291
- /**
292
- * @hidden
293
- */
294
- onArrowButtonClick() {
295
- this.togglePopupVisibility();
296
- this.arrowButtonClicked = false;
297
- if (!this.isOpen) {
298
- this.focus();
299
- }
300
- }
301
- /**
302
- * @hidden
303
- */
304
- toggleButtonActiveState(enable) {
305
- this._active = enable;
306
- }
307
- /**
308
- * @hidden
309
- */
310
- toggleArrowButtonActiveState(enable) {
311
- this.arrowButtonClicked = true;
312
- this.activeArrow = enable;
313
- }
314
- /**
315
- * @hidden
316
- */
317
- onButtonClick() {
318
- this.buttonClick.emit();
319
- }
320
- /**
321
- * @hidden
322
- */
323
- onButtonBlur() {
324
- if (!this.isOpen && !this.arrowButtonClicked) {
325
- this.blurWrapper();
326
- }
327
- }
328
- /**
329
- * @hidden
330
- */
331
- keydown(event) {
332
- this.keyDownHandler(event, true);
333
- if (event.code === Keys.Space) {
334
- this._active = true;
335
- }
336
- }
337
- /**
338
- * @hidden
339
- */
340
- keyup(event) {
341
- this._active = false;
342
- if (event.code !== Keys.Space) {
343
- this.keyUpHandler(event);
344
- }
345
- }
346
- ngDoCheck() {
347
- this.updateButtonText();
348
- }
349
- ngAfterViewInit() {
350
- this.containerService.container = this.container;
351
- this.containerService.template = this.popupTemplate;
352
- this.handleClasses(this.rounded, 'rounded');
353
- this.handleButtonAttributes(this.buttonAttributes);
354
- }
355
- ngOnChanges(changes) {
356
- if (changes.hasOwnProperty('text')) {
357
- this.updateButtonText();
358
- }
359
- if (anyChanged(['text', 'icon', 'svgIcon', 'iconClass', 'imageUrl'], changes)) {
360
- this.toggleButtonIconClass();
361
- }
362
- if (isChanged('popupSettings', changes) && isPresent(this.popupRef)) {
363
- const popup = this.popupRef.popup.instance;
364
- const newSettings = changes['popupSettings'].currentValue;
365
- popup.popupClass = newSettings.popupClass;
366
- popup.animate = newSettings.animate;
367
- popup.popupAlign = this.popupAlign;
368
- }
369
- }
370
- /**
371
- * @hidden
372
- */
373
- ngOnDestroy() {
374
- if (this.documentMouseUpSub) {
375
- this.documentMouseUpSub();
376
- }
377
- super.ngOnDestroy();
378
- }
379
- /**
380
- * @hidden
381
- */
382
- onNavigationEnterUp(args) {
383
- if (args.target !== this.button.nativeElement) {
384
- super.onNavigationEnterUp(args);
385
- }
386
- }
387
- /**
388
- * @hidden
389
- */
390
- togglePopupVisibility() {
391
- if (isDocumentAvailable() && this.wrapperContains(document.activeElement) && this.arrowButtonClicked) {
392
- this.button.nativeElement.focus();
393
- }
394
- super.togglePopupVisibility();
395
- }
396
- /**
397
- * @hidden
398
- */
399
- wrapperContains(element) {
400
- return (this.wrapper === element || this.wrapper.contains(element));
401
- }
402
- /**
403
- * @hidden
404
- */
405
- get anchorAlign() {
406
- const align = { horizontal: this.popupSettings.align || 'left', vertical: 'bottom' };
407
- if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
408
- align.horizontal = 'right';
409
- }
410
- return align;
411
- }
412
- /**
413
- * @hidden
414
- */
415
- get popupAlign() {
416
- const align = { horizontal: this.popupSettings.align || 'left', vertical: 'top' };
417
- if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
418
- align.horizontal = 'right';
419
- }
420
- return align;
421
- }
422
- /**
423
- * @hidden
424
- */
425
- get isIconButton() {
426
- const hasIcon = this.icon || this.svgIcon || this.iconClass || this.imageUrl;
427
- const hasTextContent = isDocumentAvailable() && this.button?.nativeElement.textContent.trim().length > 0;
428
- return hasIcon && !hasTextContent;
429
- }
430
- /**
431
- * Focuses the SplitButton component.
432
- */
433
- focus() {
434
- if (isDocumentAvailable()) {
435
- this.button.nativeElement.focus();
436
- }
437
- }
438
- /**
439
- * Blurs the SplitButton component.
440
- */
441
- blur() {
442
- if (isDocumentAvailable()) {
443
- this.button.nativeElement.blur();
444
- this.blurWrapper();
445
- }
446
- }
447
- constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer, containerService) {
448
- super(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService);
449
- this.localization = localization;
450
- this.renderer = renderer;
451
- this._itemClick = this.itemClick;
452
- this._blur = this.onBlur;
453
- zone.runOutsideAngular(() => {
454
- this.documentMouseUpSub = this.renderer.listen('document', 'mouseup', () => {
455
- if (this.active) {
456
- zone.run(() => this._active = false);
457
- }
458
- if (this.activeArrow) {
459
- zone.run(() => this.activeArrow = false);
460
- }
461
- });
462
- });
463
- }
464
- /**
465
- * Returns the current open state of the popup.
466
- */
467
- get isOpen() {
468
- return this.openState;
469
- }
470
- updateButtonText() {
471
- if (isDocumentAvailable()) {
472
- const innerText = this.wrapper?.innerText
473
- .split('\n')
474
- .join('')
475
- .trim();
476
- if (innerText !== this.buttonText) {
477
- this.buttonText = innerText;
478
- }
479
- }
480
- }
481
- handleClasses(value, input) {
482
- const elem = this.wrapperRef.nativeElement;
483
- const classes = getStylingClasses('button', input, this[input], value);
484
- if (classes.toRemove) {
485
- this.renderer.removeClass(elem, classes.toRemove);
486
- }
487
- if (classes.toAdd) {
488
- this.renderer.addClass(elem, classes.toAdd);
489
- }
490
- }
491
- toggleButtonIconClass() {
492
- this.button.nativeElement.classList[this.isIconButton ? 'add' : 'remove']('k-button-icon');
493
- }
494
- handleButtonAttributes(newButtonAttributes) {
495
- const mainButton = this.button?.nativeElement;
496
- if (isPresent(this.buttonAttributes) && isPresent(mainButton)) {
497
- for (const attr in this.buttonAttributes) {
498
- this.renderer.removeAttribute(mainButton, attr, this.buttonAttributes[attr]);
499
- }
500
- }
501
- if (isPresent(newButtonAttributes) && isPresent(mainButton)) {
502
- for (const attr in newButtonAttributes) {
503
- this.renderer.setAttribute(mainButton, attr, newButtonAttributes[attr]);
504
- }
505
- }
506
- }
507
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SplitButtonComponent, deps: [{ token: i1.FocusService }, { token: i2.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.PopupContainerService }], target: i0.ɵɵFactoryTarget.Component });
508
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SplitButtonComponent, isStandalone: true, selector: "kendo-splitbutton", inputs: { text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", type: "type", imageUrl: "imageUrl", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", disabled: "disabled", popupSettings: "popupSettings", tabIndex: "tabIndex", textField: "textField", data: "data", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", buttonAttributes: "buttonAttributes" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)" }, properties: { "class.k-focus": "this.isFocused", "class.k-split-button": "this.widgetClasses", "class.k-button-group": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
509
- FocusService,
510
- NavigationService,
511
- NAVIGATION_SETTINGS_PROVIDER,
512
- LocalizationService,
513
- {
514
- provide: L10N_PREFIX,
515
- useValue: 'kendo.splitbutton'
516
- },
517
- PopupContainerService,
518
- {
519
- provide: MultiTabStop,
520
- useExisting: forwardRef(() => SplitButtonComponent)
521
- }
522
- ], queries: [{ propertyName: "itemTemplate", first: true, predicate: ButtonItemTemplateDirective, descendants: true }], exportAs: ["kendoSplitButton"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
523
- <ng-container kendoSplitButtonLocalizedMessages
524
- i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
525
- splitButtonLabel="{{ '{buttonText} splitbutton' }}"
526
- i18n-toggleButtonLabel="kendo.splitbutton.toggleButtonLabel|The text for the SplitButton toggle button aria-label"
527
- toggleButtonLabel="Toggle options"
528
- ></ng-container>
529
- <button
530
- kendoButton
531
- #button
532
- [type]="type"
533
- [tabindex]="componentTabIndex"
534
- [disabled]="disabled"
535
- [size]="size"
536
- [rounded]="rounded"
537
- [fillMode]="fillMode"
538
- [themeColor]="themeColor"
539
- [icon]="icon"
540
- [svgIcon]="svgIcon"
541
- [class.k-active]="active"
542
- [iconClass]="iconClass"
543
- [imageUrl]="imageUrl"
544
- [ngClass]="buttonClass"
545
- (focus)="onButtonFocus($event)"
546
- (click)="onButtonClick()"
547
- (blur)="onButtonBlur()"
548
- (mousedown)="toggleButtonActiveState(true)"
549
- (mouseup)="toggleButtonActiveState(false)"
550
- [attr.aria-expanded]="openState"
551
- [attr.aria-controls]="listId"
552
- [attr.aria-label]="ariaLabel"
553
- >
554
- @if (text) {
555
- <span class="k-button-text">
556
- {{ text }} </span>
557
- }<ng-content></ng-content>
558
- </button>
559
- <button kendoButton #arrowButton type="button"
560
- class="k-split-button-arrow"
561
- [class.k-active]="activeArrow"
562
- [ngClass]="arrowButtonClass"
563
- [disabled]="disabled"
564
- [icon]="arrowButtonIcon"
565
- [svgIcon]="arrowButtonSvgIcon"
566
- [size]="size"
567
- [rounded]="rounded"
568
- [fillMode]="fillMode"
569
- [themeColor]="themeColor"
570
- [tabindex]="-1"
571
- [attr.aria-label]="messageFor('toggleButtonLabel')"
572
- (click)="onArrowButtonClick()"
573
- (mousedown)="toggleArrowButtonActiveState(true)"
574
- (mouseup)="toggleArrowButtonActiveState(false)"
575
- (keydown.enter)="$event.stopImmediatePropagation(); $event.preventDefault();"
576
- ></button>
577
- <ng-template #popupTemplate>
578
- <kendo-button-list
579
- [id]="listId"
580
- [data]="data"
581
- [textField]="textField"
582
- [itemTemplate]="itemTemplate"
583
- (onItemClick)="onItemClick($event)"
584
- (keydown)="keyDownHandler($event)"
585
- (keyup)="keyUpHandler($event)"
586
- [attr.dir]="dir"
587
- [size]="size"
588
- >
589
- </kendo-button-list>
590
- </ng-template>
591
- <ng-container #container></ng-container>
592
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, 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"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }] });
593
- }
594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SplitButtonComponent, decorators: [{
595
- type: Component,
596
- args: [{
597
- exportAs: 'kendoSplitButton',
598
- providers: [
599
- FocusService,
600
- NavigationService,
601
- NAVIGATION_SETTINGS_PROVIDER,
602
- LocalizationService,
603
- {
604
- provide: L10N_PREFIX,
605
- useValue: 'kendo.splitbutton'
606
- },
607
- PopupContainerService,
608
- {
609
- provide: MultiTabStop,
610
- useExisting: forwardRef(() => SplitButtonComponent)
611
- }
612
- ],
613
- selector: 'kendo-splitbutton',
614
- template: `
615
- <ng-container kendoSplitButtonLocalizedMessages
616
- i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
617
- splitButtonLabel="{{ '{buttonText} splitbutton' }}"
618
- i18n-toggleButtonLabel="kendo.splitbutton.toggleButtonLabel|The text for the SplitButton toggle button aria-label"
619
- toggleButtonLabel="Toggle options"
620
- ></ng-container>
621
- <button
622
- kendoButton
623
- #button
624
- [type]="type"
625
- [tabindex]="componentTabIndex"
626
- [disabled]="disabled"
627
- [size]="size"
628
- [rounded]="rounded"
629
- [fillMode]="fillMode"
630
- [themeColor]="themeColor"
631
- [icon]="icon"
632
- [svgIcon]="svgIcon"
633
- [class.k-active]="active"
634
- [iconClass]="iconClass"
635
- [imageUrl]="imageUrl"
636
- [ngClass]="buttonClass"
637
- (focus)="onButtonFocus($event)"
638
- (click)="onButtonClick()"
639
- (blur)="onButtonBlur()"
640
- (mousedown)="toggleButtonActiveState(true)"
641
- (mouseup)="toggleButtonActiveState(false)"
642
- [attr.aria-expanded]="openState"
643
- [attr.aria-controls]="listId"
644
- [attr.aria-label]="ariaLabel"
645
- >
646
- @if (text) {
647
- <span class="k-button-text">
648
- {{ text }} </span>
649
- }<ng-content></ng-content>
650
- </button>
651
- <button kendoButton #arrowButton type="button"
652
- class="k-split-button-arrow"
653
- [class.k-active]="activeArrow"
654
- [ngClass]="arrowButtonClass"
655
- [disabled]="disabled"
656
- [icon]="arrowButtonIcon"
657
- [svgIcon]="arrowButtonSvgIcon"
658
- [size]="size"
659
- [rounded]="rounded"
660
- [fillMode]="fillMode"
661
- [themeColor]="themeColor"
662
- [tabindex]="-1"
663
- [attr.aria-label]="messageFor('toggleButtonLabel')"
664
- (click)="onArrowButtonClick()"
665
- (mousedown)="toggleArrowButtonActiveState(true)"
666
- (mouseup)="toggleArrowButtonActiveState(false)"
667
- (keydown.enter)="$event.stopImmediatePropagation(); $event.preventDefault();"
668
- ></button>
669
- <ng-template #popupTemplate>
670
- <kendo-button-list
671
- [id]="listId"
672
- [data]="data"
673
- [textField]="textField"
674
- [itemTemplate]="itemTemplate"
675
- (onItemClick)="onItemClick($event)"
676
- (keydown)="keyDownHandler($event)"
677
- (keyup)="keyUpHandler($event)"
678
- [attr.dir]="dir"
679
- [size]="size"
680
- >
681
- </kendo-button-list>
682
- </ng-template>
683
- <ng-container #container></ng-container>
684
- `,
685
- standalone: true,
686
- imports: [LocalizedSplitButtonMessagesDirective, ButtonComponent, NgClass, ListComponent]
687
- }]
688
- }], ctorParameters: () => [{ type: i1.FocusService }, { type: i2.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i4.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i5.PopupContainerService }], propDecorators: { text: [{
689
- type: Input
690
- }], icon: [{
691
- type: Input
692
- }], svgIcon: [{
693
- type: Input
694
- }], iconClass: [{
695
- type: Input
696
- }], type: [{
697
- type: Input
698
- }], imageUrl: [{
699
- type: Input
700
- }], size: [{
701
- type: Input
702
- }], rounded: [{
703
- type: Input
704
- }], fillMode: [{
705
- type: Input
706
- }], themeColor: [{
707
- type: Input
708
- }], disabled: [{
709
- type: Input
710
- }], popupSettings: [{
711
- type: Input
712
- }], tabIndex: [{
713
- type: Input
714
- }], textField: [{
715
- type: Input
716
- }], data: [{
717
- type: Input
718
- }], arrowButtonClass: [{
719
- type: Input
720
- }], arrowButtonIcon: [{
721
- type: Input
722
- }], arrowButtonSvgIcon: [{
723
- type: Input
724
- }], buttonAttributes: [{
725
- type: Input
726
- }], buttonClick: [{
727
- type: Output
728
- }], itemClick: [{
729
- type: Output
730
- }], onFocus: [{
731
- type: Output,
732
- args: ['focus']
733
- }], onBlur: [{
734
- type: Output,
735
- args: ['blur']
736
- }], open: [{
737
- type: Output
738
- }], close: [{
739
- type: Output
740
- }], itemTemplate: [{
741
- type: ContentChild,
742
- args: [ButtonItemTemplateDirective]
743
- }], isFocused: [{
744
- type: HostBinding,
745
- args: ['class.k-focus']
746
- }], widgetClasses: [{
747
- type: HostBinding,
748
- args: ['class.k-split-button']
749
- }, {
750
- type: HostBinding,
751
- args: ['class.k-button-group']
752
- }], dir: [{
753
- type: HostBinding,
754
- args: ['attr.dir']
755
- }], keydown: [{
756
- type: HostListener,
757
- args: ['keydown', ['$event']]
758
- }], keyup: [{
759
- type: HostListener,
760
- args: ['keyup', ['$event']]
761
- }] } });