@progress/kendo-angular-buttons 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-buttons.mjs +246 -164
- package/index.d.ts +61 -37
- package/package-metadata.mjs +2 -2
- package/package.json +7 -7
|
@@ -3,10 +3,10 @@
|
|
|
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, isDevMode, EventEmitter, HostListener, HostBinding, Output, Input, Optional, Component, ContentChildren, Directive, InjectionToken, Inject, ElementRef, ViewContainerRef, ViewChild, ContentChild, forwardRef, SkipSelf,
|
|
6
|
+
import { Injectable, isDevMode, EventEmitter, signal, HostListener, HostBinding, Output, Input, Optional, ChangeDetectionStrategy, Component, ContentChildren, Directive, InjectionToken, Inject, ElementRef, ViewContainerRef, ViewChild, ContentChild, forwardRef, SkipSelf, afterNextRender, NgModule } from '@angular/core';
|
|
7
7
|
import { Subject, Subscription, fromEvent, merge, of, Observable, from } from 'rxjs';
|
|
8
8
|
import * as i12 from '@progress/kendo-angular-common';
|
|
9
|
-
import { isDocumentAvailable, isFirefox, isSafari,
|
|
9
|
+
import { isDocumentAvailable, isFirefox, isSafari, hasObservers, KENDO_WEBMCP_HOST, isChanged, normalizeKeys, Keys, TemplateContextDirective, MultiTabStop, guid, parseCSSClassNames, isPresent as isPresent$1, EventsOutsideAngularDirective, replaceMessagePlaceholder, anyChanged, PreventableEvent as PreventableEvent$1, ResizeSensorComponent, ToggleButtonTabStopDirective, ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
|
|
10
10
|
export { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
|
|
11
11
|
import { chevronDownIcon, xCircleIcon, moreVerticalIcon, microphoneIcon, stopIcon, pasteSparkleIcon } from '@progress/kendo-svg-icons';
|
|
12
12
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
@@ -49,8 +49,8 @@ const packageMetadata = {
|
|
|
49
49
|
productName: 'Kendo UI for Angular',
|
|
50
50
|
productCode: 'KENDOUIANGULAR',
|
|
51
51
|
productCodes: ['KENDOUIANGULAR'],
|
|
52
|
-
publishDate:
|
|
53
|
-
version: '25.0.0-develop.
|
|
52
|
+
publishDate: 1783692393,
|
|
53
|
+
version: '25.0.0-develop.3',
|
|
54
54
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
55
55
|
};
|
|
56
56
|
|
|
@@ -199,7 +199,13 @@ class ButtonComponent {
|
|
|
199
199
|
*
|
|
200
200
|
* @default false
|
|
201
201
|
*/
|
|
202
|
-
toggleable
|
|
202
|
+
set toggleable(value) {
|
|
203
|
+
this._toggleable.set(value);
|
|
204
|
+
this.toggleAriaPressed(value);
|
|
205
|
+
}
|
|
206
|
+
get toggleable() {
|
|
207
|
+
return this._toggleable();
|
|
208
|
+
}
|
|
203
209
|
/**
|
|
204
210
|
* Backwards-compatible alias
|
|
205
211
|
*
|
|
@@ -221,10 +227,10 @@ class ButtonComponent {
|
|
|
221
227
|
* @default false
|
|
222
228
|
*/
|
|
223
229
|
get selected() {
|
|
224
|
-
return this._selected || false;
|
|
230
|
+
return this._selected() || false;
|
|
225
231
|
}
|
|
226
232
|
set selected(value) {
|
|
227
|
-
this._selected
|
|
233
|
+
this._selected.set(value);
|
|
228
234
|
}
|
|
229
235
|
/**
|
|
230
236
|
* @hidden
|
|
@@ -292,10 +298,10 @@ class ButtonComponent {
|
|
|
292
298
|
*/
|
|
293
299
|
set size(size) {
|
|
294
300
|
this.handleClasses(size, 'size');
|
|
295
|
-
this._size
|
|
301
|
+
this._size.set(size);
|
|
296
302
|
}
|
|
297
303
|
get size() {
|
|
298
|
-
return this._size;
|
|
304
|
+
return this._size();
|
|
299
305
|
}
|
|
300
306
|
/**
|
|
301
307
|
* Sets the border radius of the Button.
|
|
@@ -303,10 +309,10 @@ class ButtonComponent {
|
|
|
303
309
|
*/
|
|
304
310
|
set rounded(rounded) {
|
|
305
311
|
this.handleClasses(rounded, 'rounded');
|
|
306
|
-
this._rounded
|
|
312
|
+
this._rounded.set(rounded);
|
|
307
313
|
}
|
|
308
314
|
get rounded() {
|
|
309
|
-
return this._rounded;
|
|
315
|
+
return this._rounded();
|
|
310
316
|
}
|
|
311
317
|
/**
|
|
312
318
|
* Sets the background and border styles of the Button.
|
|
@@ -314,10 +320,10 @@ class ButtonComponent {
|
|
|
314
320
|
*/
|
|
315
321
|
set fillMode(fillMode) {
|
|
316
322
|
this.handleClasses(fillMode, 'fillMode');
|
|
317
|
-
this._fillMode
|
|
323
|
+
this._fillMode.set(fillMode);
|
|
318
324
|
}
|
|
319
325
|
get fillMode() {
|
|
320
|
-
return this._fillMode;
|
|
326
|
+
return this._fillMode();
|
|
321
327
|
}
|
|
322
328
|
/**
|
|
323
329
|
* Sets a predefined theme color for the Button.
|
|
@@ -326,10 +332,10 @@ class ButtonComponent {
|
|
|
326
332
|
*/
|
|
327
333
|
set themeColor(themeColor) {
|
|
328
334
|
this.handleThemeColor(themeColor);
|
|
329
|
-
this._themeColor
|
|
335
|
+
this._themeColor.set(themeColor);
|
|
330
336
|
}
|
|
331
337
|
get themeColor() {
|
|
332
|
-
return this._themeColor;
|
|
338
|
+
return this._themeColor();
|
|
333
339
|
}
|
|
334
340
|
/**
|
|
335
341
|
* Sets an SVG icon to display inside the Button.
|
|
@@ -353,19 +359,26 @@ class ButtonComponent {
|
|
|
353
359
|
*/
|
|
354
360
|
click = new EventEmitter();
|
|
355
361
|
element;
|
|
356
|
-
isDisabled = false;
|
|
357
362
|
chevronDownIcon = chevronDownIcon;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
363
|
+
get isDisabled() {
|
|
364
|
+
return this._disabled();
|
|
365
|
+
}
|
|
366
|
+
set isDisabled(value) {
|
|
367
|
+
this._disabled.set(value);
|
|
368
|
+
}
|
|
369
|
+
_size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
370
|
+
_rounded = signal(undefined, ...(ngDevMode ? [{ debugName: "_rounded" }] : []));
|
|
371
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
372
|
+
_themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
|
|
362
373
|
_focused = false;
|
|
363
|
-
direction;
|
|
364
|
-
_selected;
|
|
365
374
|
subs = new Subscription();
|
|
366
375
|
_iconClass;
|
|
367
376
|
_icon;
|
|
368
377
|
_svgIcon;
|
|
378
|
+
_disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
379
|
+
_selected = signal(false, ...(ngDevMode ? [{ debugName: "_selected" }] : []));
|
|
380
|
+
_toggleable = signal(false, ...(ngDevMode ? [{ debugName: "_toggleable" }] : []));
|
|
381
|
+
_direction = signal('', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
369
382
|
set isFocused(isFocused) {
|
|
370
383
|
toggleClass('k-focus', isFocused, this.renderer, this.element);
|
|
371
384
|
this._focused = isFocused;
|
|
@@ -381,10 +394,10 @@ class ButtonComponent {
|
|
|
381
394
|
return this.isDisabled;
|
|
382
395
|
}
|
|
383
396
|
get classActive() {
|
|
384
|
-
return this.
|
|
397
|
+
return this._selected();
|
|
385
398
|
}
|
|
386
399
|
get getDirection() {
|
|
387
|
-
return this.
|
|
400
|
+
return this._direction();
|
|
388
401
|
}
|
|
389
402
|
/**
|
|
390
403
|
* @hidden
|
|
@@ -412,8 +425,8 @@ class ButtonComponent {
|
|
|
412
425
|
this.service = service;
|
|
413
426
|
this.ngZone = ngZone;
|
|
414
427
|
validatePackage(packageMetadata);
|
|
415
|
-
this.
|
|
416
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) =>
|
|
428
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
429
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr')));
|
|
417
430
|
this.element = element.nativeElement;
|
|
418
431
|
this.renderer.addClass(this.element, 'k-button');
|
|
419
432
|
}
|
|
@@ -432,11 +445,6 @@ class ButtonComponent {
|
|
|
432
445
|
}));
|
|
433
446
|
});
|
|
434
447
|
}
|
|
435
|
-
ngOnChanges(change) {
|
|
436
|
-
if (isChanged('togglable', change) || isChanged('toggleable', change)) {
|
|
437
|
-
this.toggleAriaPressed(this.toggleable);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
448
|
ngOnDestroy() {
|
|
441
449
|
this.subs.unsubscribe();
|
|
442
450
|
}
|
|
@@ -547,7 +555,7 @@ class ButtonComponent {
|
|
|
547
555
|
provide: KENDO_WEBMCP_HOST,
|
|
548
556
|
useExisting: ButtonComponent
|
|
549
557
|
}
|
|
550
|
-
], exportAs: ["kendoButton"],
|
|
558
|
+
], exportAs: ["kendoButton"], ngImport: i0, template: `
|
|
551
559
|
<ng-template #iconTemplate>
|
|
552
560
|
@if (icon || svgIcon) {
|
|
553
561
|
<kendo-icon-wrapper
|
|
@@ -586,11 +594,13 @@ class ButtonComponent {
|
|
|
586
594
|
</span>
|
|
587
595
|
}
|
|
588
596
|
|
|
589
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
597
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
590
598
|
}
|
|
591
599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
592
600
|
type: Component,
|
|
593
601
|
args: [{
|
|
602
|
+
selector: 'button[kendoButton]',
|
|
603
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
594
604
|
exportAs: 'kendoButton',
|
|
595
605
|
providers: [
|
|
596
606
|
LocalizationService,
|
|
@@ -603,7 +613,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
603
613
|
useExisting: ButtonComponent
|
|
604
614
|
}
|
|
605
615
|
],
|
|
606
|
-
selector: 'button[kendoButton]',
|
|
607
616
|
template: `
|
|
608
617
|
<ng-template #iconTemplate>
|
|
609
618
|
@if (icon || svgIcon) {
|
|
@@ -772,7 +781,7 @@ class ButtonGroupComponent {
|
|
|
772
781
|
*/
|
|
773
782
|
set tabIndex(value) {
|
|
774
783
|
this._tabIndex = value;
|
|
775
|
-
this.
|
|
784
|
+
this._currentTabIndex.set(value);
|
|
776
785
|
}
|
|
777
786
|
get tabIndex() {
|
|
778
787
|
return this._tabIndex;
|
|
@@ -795,9 +804,9 @@ class ButtonGroupComponent {
|
|
|
795
804
|
navigate = new EventEmitter();
|
|
796
805
|
buttons;
|
|
797
806
|
_tabIndex = 0;
|
|
798
|
-
|
|
807
|
+
_currentTabIndex = signal(0, ...(ngDevMode ? [{ debugName: "_currentTabIndex" }] : []));
|
|
799
808
|
lastFocusedIndex = -1;
|
|
800
|
-
|
|
809
|
+
_direction = signal(undefined, ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
801
810
|
subs = new Subscription();
|
|
802
811
|
wrapperClasses = true;
|
|
803
812
|
get disabledClass() {
|
|
@@ -808,7 +817,7 @@ class ButtonGroupComponent {
|
|
|
808
817
|
}
|
|
809
818
|
role = 'group';
|
|
810
819
|
get dir() {
|
|
811
|
-
return this.
|
|
820
|
+
return this._direction();
|
|
812
821
|
}
|
|
813
822
|
get ariaDisabled() {
|
|
814
823
|
return this.disabled;
|
|
@@ -820,14 +829,14 @@ class ButtonGroupComponent {
|
|
|
820
829
|
if (this.disabled) {
|
|
821
830
|
return undefined;
|
|
822
831
|
}
|
|
823
|
-
return this.navigable ? this.
|
|
832
|
+
return this.navigable ? this._currentTabIndex() : undefined;
|
|
824
833
|
}
|
|
825
834
|
constructor(service, localization, renderer, element) {
|
|
826
835
|
this.service = service;
|
|
827
836
|
this.renderer = renderer;
|
|
828
837
|
this.element = element;
|
|
829
838
|
validatePackage(packageMetadata);
|
|
830
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) => this.
|
|
839
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr')));
|
|
831
840
|
}
|
|
832
841
|
ngOnInit() {
|
|
833
842
|
this.subs.add(this.service.buttonClicked$.subscribe((button) => {
|
|
@@ -846,7 +855,7 @@ class ButtonGroupComponent {
|
|
|
846
855
|
button.setSelected(newSelectionValue);
|
|
847
856
|
}
|
|
848
857
|
if (this.navigable) {
|
|
849
|
-
this.
|
|
858
|
+
this._currentTabIndex.set(-1);
|
|
850
859
|
this.renderer.setAttribute(button, tabindex, '0');
|
|
851
860
|
}
|
|
852
861
|
}));
|
|
@@ -855,13 +864,13 @@ class ButtonGroupComponent {
|
|
|
855
864
|
this.handleSubs('focusout', (event) => this.navigable && event.relatedTarget && event.relatedTarget.parentNode !== this.element.nativeElement, () => {
|
|
856
865
|
this.lastFocusedIndex = this.buttons.toArray().findIndex(button => button.tabIndex !== -1);
|
|
857
866
|
this.defocus(this.buttons.toArray());
|
|
858
|
-
this.
|
|
867
|
+
this._currentTabIndex.set(this.tabIndex);
|
|
859
868
|
});
|
|
860
869
|
this.subs.add(fromEvent(this.element.nativeElement, 'focusout')
|
|
861
870
|
.pipe(filter((event) => this.navigable && event.relatedTarget && event.relatedTarget.parentNode !== this.element.nativeElement))
|
|
862
871
|
.subscribe(() => {
|
|
863
872
|
this.defocus(this.buttons.toArray());
|
|
864
|
-
this.
|
|
873
|
+
this._currentTabIndex.set(this.tabIndex);
|
|
865
874
|
}));
|
|
866
875
|
}
|
|
867
876
|
ngOnChanges(changes) {
|
|
@@ -875,10 +884,10 @@ class ButtonGroupComponent {
|
|
|
875
884
|
if (isChanged('navigable', changes)) {
|
|
876
885
|
if (changes['navigable'].currentValue) {
|
|
877
886
|
this.defocus(this.buttons.toArray());
|
|
878
|
-
this.
|
|
887
|
+
this._currentTabIndex.set(0);
|
|
879
888
|
}
|
|
880
889
|
else {
|
|
881
|
-
this.
|
|
890
|
+
this._currentTabIndex.set(-1);
|
|
882
891
|
this.buttons.forEach((button) => this.renderer.setAttribute(button, tabindex, '0'));
|
|
883
892
|
}
|
|
884
893
|
}
|
|
@@ -971,7 +980,7 @@ class ButtonGroupComponent {
|
|
|
971
980
|
.subscribe(handler));
|
|
972
981
|
}
|
|
973
982
|
focusHandler = () => {
|
|
974
|
-
this.
|
|
983
|
+
this._currentTabIndex.set(-1);
|
|
975
984
|
this.defocus(this.buttons.toArray());
|
|
976
985
|
const firstFocusableIndex = this.buttons.toArray().findIndex(current => !current.disabled);
|
|
977
986
|
const index = this.lastFocusedIndex === -1 ? firstFocusableIndex : this.lastFocusedIndex;
|
|
@@ -989,11 +998,13 @@ class ButtonGroupComponent {
|
|
|
989
998
|
}
|
|
990
999
|
], queries: [{ propertyName: "buttons", predicate: ButtonComponent }], exportAs: ["kendoButtonGroup"], usesOnChanges: true, ngImport: i0, template: `
|
|
991
1000
|
<ng-content select="[kendoButton]"></ng-content>
|
|
992
|
-
`, isInline: true });
|
|
1001
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
993
1002
|
}
|
|
994
1003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ButtonGroupComponent, decorators: [{
|
|
995
1004
|
type: Component,
|
|
996
1005
|
args: [{
|
|
1006
|
+
selector: 'kendo-buttongroup',
|
|
1007
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
997
1008
|
exportAs: 'kendoButtonGroup',
|
|
998
1009
|
providers: [
|
|
999
1010
|
KendoButtonService,
|
|
@@ -1003,7 +1014,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1003
1014
|
useValue: 'kendo.buttongroup'
|
|
1004
1015
|
}
|
|
1005
1016
|
],
|
|
1006
|
-
selector: 'kendo-buttongroup',
|
|
1007
1017
|
template: `
|
|
1008
1018
|
<ng-content select="[kendoButton]"></ng-content>
|
|
1009
1019
|
`,
|
|
@@ -1064,8 +1074,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1064
1074
|
class ChipComponent {
|
|
1065
1075
|
element;
|
|
1066
1076
|
renderer;
|
|
1067
|
-
ngZone;
|
|
1068
1077
|
localizationService;
|
|
1078
|
+
ngZone;
|
|
1069
1079
|
/**
|
|
1070
1080
|
* Sets the label text of the Chip.
|
|
1071
1081
|
*
|
|
@@ -1096,7 +1106,13 @@ class ChipComponent {
|
|
|
1096
1106
|
* Specifies the selected state of the Chip.
|
|
1097
1107
|
* @default false
|
|
1098
1108
|
*/
|
|
1099
|
-
selected
|
|
1109
|
+
set selected(value) {
|
|
1110
|
+
this._selected.set(value);
|
|
1111
|
+
this.setAriSelected(value);
|
|
1112
|
+
}
|
|
1113
|
+
get selected() {
|
|
1114
|
+
return this._selected();
|
|
1115
|
+
}
|
|
1100
1116
|
/**
|
|
1101
1117
|
* Specifies if the Chip is removable.
|
|
1102
1118
|
* If set to `true`, the Chip renders a remove icon.
|
|
@@ -1201,15 +1217,17 @@ class ChipComponent {
|
|
|
1201
1217
|
return this.disabled || null;
|
|
1202
1218
|
}
|
|
1203
1219
|
get selectedClass() {
|
|
1204
|
-
return this.
|
|
1220
|
+
return this._selected();
|
|
1205
1221
|
}
|
|
1206
1222
|
get focusedClass() {
|
|
1207
|
-
return this.
|
|
1223
|
+
return this._focused();
|
|
1208
1224
|
}
|
|
1209
1225
|
/**
|
|
1210
1226
|
* @hidden
|
|
1211
1227
|
*/
|
|
1212
|
-
direction
|
|
1228
|
+
get direction() {
|
|
1229
|
+
return this._direction();
|
|
1230
|
+
}
|
|
1213
1231
|
/**
|
|
1214
1232
|
* @hidden
|
|
1215
1233
|
*/
|
|
@@ -1226,33 +1244,27 @@ class ChipComponent {
|
|
|
1226
1244
|
_rounded = undefined;
|
|
1227
1245
|
_fillMode = undefined;
|
|
1228
1246
|
_themeColor = undefined;
|
|
1229
|
-
|
|
1247
|
+
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : []));
|
|
1248
|
+
_selected = signal(false, ...(ngDevMode ? [{ debugName: "_selected" }] : []));
|
|
1249
|
+
_direction = signal('', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
1230
1250
|
subs = new Subscription();
|
|
1231
|
-
constructor(element, renderer,
|
|
1251
|
+
constructor(element, renderer, localizationService, ngZone) {
|
|
1232
1252
|
this.element = element;
|
|
1233
1253
|
this.renderer = renderer;
|
|
1234
|
-
this.ngZone = ngZone;
|
|
1235
1254
|
this.localizationService = localizationService;
|
|
1255
|
+
this.ngZone = ngZone;
|
|
1236
1256
|
validatePackage(packageMetadata);
|
|
1237
|
-
this.
|
|
1257
|
+
this._direction.set(localizationService.rtl ? 'rtl' : 'ltr');
|
|
1238
1258
|
}
|
|
1239
1259
|
ngOnInit() {
|
|
1240
1260
|
this.subs.add(this.localizationService.changes
|
|
1241
|
-
.subscribe(({ rtl }) => this.
|
|
1261
|
+
.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr')));
|
|
1242
1262
|
this.renderer.setAttribute(this.element.nativeElement, 'role', 'button');
|
|
1243
|
-
this.renderer.setAttribute(this.element.nativeElement, 'aria-pressed', `${this.
|
|
1263
|
+
this.renderer.setAttribute(this.element.nativeElement, 'aria-pressed', `${this._selected()}`);
|
|
1244
1264
|
}
|
|
1245
1265
|
ngOnDestroy() {
|
|
1246
1266
|
this.subs.unsubscribe();
|
|
1247
1267
|
}
|
|
1248
|
-
ngOnChanges(changes) {
|
|
1249
|
-
if (changes?.['selected']) {
|
|
1250
|
-
const hasAriaSelected = this.element.nativeElement.hasAttribute('aria-selected');
|
|
1251
|
-
if (!hasAriaSelected) {
|
|
1252
|
-
this.renderer.setAttribute(this.element.nativeElement, 'aria-pressed', `${this.selected}`);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
1268
|
ngAfterViewInit() {
|
|
1257
1269
|
const chip = this.element.nativeElement;
|
|
1258
1270
|
this.attachElementEventHandlers(chip);
|
|
@@ -1380,14 +1392,20 @@ class ChipComponent {
|
|
|
1380
1392
|
});
|
|
1381
1393
|
}
|
|
1382
1394
|
}
|
|
1383
|
-
|
|
1395
|
+
setAriSelected(value) {
|
|
1396
|
+
const hasAriaSelected = this.element?.nativeElement.hasAttribute('aria-selected');
|
|
1397
|
+
if (!hasAriaSelected) {
|
|
1398
|
+
this.renderer.setAttribute(this.element.nativeElement, 'aria-pressed', `${value}`);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1384
1402
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ChipComponent, isStandalone: true, selector: "kendo-chip", inputs: { label: "label", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", avatarSettings: "avatarSettings", selected: "selected", removable: "removable", removeIcon: "removeIcon", removeSvgIcon: "removeSvgIcon", hasMenu: "hasMenu", menuIcon: "menuIcon", menuSvgIcon: "menuSvgIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", menuToggle: "menuToggle", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "class.k-chip": "this.hostClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
|
|
1385
1403
|
LocalizationService,
|
|
1386
1404
|
{
|
|
1387
1405
|
provide: L10N_PREFIX,
|
|
1388
1406
|
useValue: 'kendo.chip'
|
|
1389
1407
|
}
|
|
1390
|
-
],
|
|
1408
|
+
], ngImport: i0, template: `
|
|
1391
1409
|
@if (icon || svgIcon) {
|
|
1392
1410
|
<kendo-icon-wrapper
|
|
1393
1411
|
size="small"
|
|
@@ -1452,12 +1470,13 @@ class ChipComponent {
|
|
|
1452
1470
|
}
|
|
1453
1471
|
</span>
|
|
1454
1472
|
}
|
|
1455
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
1473
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1456
1474
|
}
|
|
1457
1475
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChipComponent, decorators: [{
|
|
1458
1476
|
type: Component,
|
|
1459
1477
|
args: [{
|
|
1460
1478
|
selector: 'kendo-chip',
|
|
1479
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1461
1480
|
template: `
|
|
1462
1481
|
@if (icon || svgIcon) {
|
|
1463
1482
|
<kendo-icon-wrapper
|
|
@@ -1534,7 +1553,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1534
1553
|
standalone: true,
|
|
1535
1554
|
imports: [NgStyle, IconWrapperComponent]
|
|
1536
1555
|
}]
|
|
1537
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type:
|
|
1556
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.NgZone }], propDecorators: { label: [{
|
|
1538
1557
|
type: Input
|
|
1539
1558
|
}], icon: [{
|
|
1540
1559
|
type: Input
|
|
@@ -1623,7 +1642,9 @@ class ChipListComponent {
|
|
|
1623
1642
|
/**
|
|
1624
1643
|
* @hidden
|
|
1625
1644
|
*/
|
|
1626
|
-
direction
|
|
1645
|
+
get direction() {
|
|
1646
|
+
return this._direction();
|
|
1647
|
+
}
|
|
1627
1648
|
/**
|
|
1628
1649
|
* Sets the selection mode of the ChipList.
|
|
1629
1650
|
*
|
|
@@ -1662,6 +1683,7 @@ class ChipListComponent {
|
|
|
1662
1683
|
_size = undefined;
|
|
1663
1684
|
subs = new Subscription();
|
|
1664
1685
|
_navigable = true;
|
|
1686
|
+
_direction = signal('', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
1665
1687
|
/**
|
|
1666
1688
|
* @hidden
|
|
1667
1689
|
*/
|
|
@@ -1712,11 +1734,11 @@ class ChipListComponent {
|
|
|
1712
1734
|
this.element = element;
|
|
1713
1735
|
this.ngZone = ngZone;
|
|
1714
1736
|
validatePackage(packageMetadata);
|
|
1715
|
-
this.
|
|
1737
|
+
this._direction.set(localizationService.rtl ? 'rtl' : 'ltr');
|
|
1716
1738
|
}
|
|
1717
1739
|
ngOnInit() {
|
|
1718
1740
|
this.dynamicRTLSubscription = this.localizationService.changes
|
|
1719
|
-
.subscribe(({ rtl }) => this.
|
|
1741
|
+
.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr'));
|
|
1720
1742
|
}
|
|
1721
1743
|
ngAfterViewInit() {
|
|
1722
1744
|
const stylingInputs = ['size'];
|
|
@@ -1880,12 +1902,13 @@ class ChipListComponent {
|
|
|
1880
1902
|
}
|
|
1881
1903
|
], queries: [{ propertyName: "chips", predicate: ChipComponent }], ngImport: i0, template: `
|
|
1882
1904
|
<ng-content></ng-content>
|
|
1883
|
-
`, isInline: true });
|
|
1905
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1884
1906
|
}
|
|
1885
1907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChipListComponent, decorators: [{
|
|
1886
1908
|
type: Component,
|
|
1887
1909
|
args: [{
|
|
1888
1910
|
selector: 'kendo-chiplist, kendo-chip-list',
|
|
1911
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1889
1912
|
template: `
|
|
1890
1913
|
<ng-content></ng-content>
|
|
1891
1914
|
`,
|
|
@@ -2388,7 +2411,7 @@ class ListButton extends MultiTabStop {
|
|
|
2388
2411
|
focusService;
|
|
2389
2412
|
navigationService;
|
|
2390
2413
|
wrapperRef;
|
|
2391
|
-
|
|
2414
|
+
zone;
|
|
2392
2415
|
popupService;
|
|
2393
2416
|
elRef;
|
|
2394
2417
|
cdr;
|
|
@@ -2396,16 +2419,16 @@ class ListButton extends MultiTabStop {
|
|
|
2396
2419
|
listId = guid();
|
|
2397
2420
|
buttonId = guid();
|
|
2398
2421
|
_data;
|
|
2399
|
-
_open = false;
|
|
2422
|
+
_open = signal(false, ...(ngDevMode ? [{ debugName: "_open" }] : []));
|
|
2400
2423
|
_disabled = false;
|
|
2401
|
-
_active = false;
|
|
2424
|
+
_active = signal(false, ...(ngDevMode ? [{ debugName: "_active" }] : []));
|
|
2402
2425
|
_popupSettings = { animate: true, popupClass: '' };
|
|
2403
2426
|
_isFocused = false;
|
|
2404
2427
|
_itemClick;
|
|
2405
2428
|
_blur;
|
|
2406
2429
|
wrapper;
|
|
2407
2430
|
subs = new Subscription();
|
|
2408
|
-
direction;
|
|
2431
|
+
direction = signal(undefined, ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
2409
2432
|
popupRef;
|
|
2410
2433
|
popupSubs = new Subscription();
|
|
2411
2434
|
button;
|
|
@@ -2480,7 +2503,7 @@ class ListButton extends MultiTabStop {
|
|
|
2480
2503
|
*/
|
|
2481
2504
|
get anchorAlign() {
|
|
2482
2505
|
const align = { horizontal: this.popupSettings.align || 'left', vertical: 'bottom' };
|
|
2483
|
-
if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
2506
|
+
if (this.direction() === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
2484
2507
|
align.horizontal = 'right';
|
|
2485
2508
|
}
|
|
2486
2509
|
return align;
|
|
@@ -2490,18 +2513,18 @@ class ListButton extends MultiTabStop {
|
|
|
2490
2513
|
*/
|
|
2491
2514
|
get popupAlign() {
|
|
2492
2515
|
const align = { horizontal: this.popupSettings.align || 'left', vertical: 'top' };
|
|
2493
|
-
if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
2516
|
+
if (this.direction() === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
2494
2517
|
align.horizontal = 'right';
|
|
2495
2518
|
}
|
|
2496
2519
|
return align;
|
|
2497
2520
|
}
|
|
2498
2521
|
isClosePrevented = false;
|
|
2499
|
-
constructor(focusService, navigationService, wrapperRef,
|
|
2522
|
+
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService) {
|
|
2500
2523
|
super();
|
|
2501
2524
|
this.focusService = focusService;
|
|
2502
2525
|
this.navigationService = navigationService;
|
|
2503
2526
|
this.wrapperRef = wrapperRef;
|
|
2504
|
-
this.
|
|
2527
|
+
this.zone = zone;
|
|
2505
2528
|
this.popupService = popupService;
|
|
2506
2529
|
this.elRef = elRef;
|
|
2507
2530
|
this.cdr = cdr;
|
|
@@ -2510,7 +2533,7 @@ class ListButton extends MultiTabStop {
|
|
|
2510
2533
|
this.focusService = focusService;
|
|
2511
2534
|
this.navigationService = navigationService;
|
|
2512
2535
|
this.wrapper = wrapperRef.nativeElement;
|
|
2513
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction
|
|
2536
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction.set(rtl ? 'rtl' : 'ltr'))));
|
|
2514
2537
|
this.subscribeEvents();
|
|
2515
2538
|
}
|
|
2516
2539
|
ngOnChanges(changes) {
|
|
@@ -2534,7 +2557,7 @@ class ListButton extends MultiTabStop {
|
|
|
2534
2557
|
return popupClasses.join(' ');
|
|
2535
2558
|
}
|
|
2536
2559
|
get openState() {
|
|
2537
|
-
return this._open;
|
|
2560
|
+
return this._open();
|
|
2538
2561
|
}
|
|
2539
2562
|
/**
|
|
2540
2563
|
* @hidden
|
|
@@ -2543,13 +2566,13 @@ class ListButton extends MultiTabStop {
|
|
|
2543
2566
|
if (this.disabled) {
|
|
2544
2567
|
return;
|
|
2545
2568
|
}
|
|
2546
|
-
this._open
|
|
2569
|
+
this._open.set(open);
|
|
2547
2570
|
}
|
|
2548
2571
|
/**
|
|
2549
2572
|
* Returns the current open state of the popup.
|
|
2550
2573
|
*/
|
|
2551
2574
|
get isOpen() {
|
|
2552
|
-
return this._open;
|
|
2575
|
+
return this._open();
|
|
2553
2576
|
}
|
|
2554
2577
|
/**
|
|
2555
2578
|
* @hidden
|
|
@@ -2596,11 +2619,11 @@ class ListButton extends MultiTabStop {
|
|
|
2596
2619
|
}));
|
|
2597
2620
|
}
|
|
2598
2621
|
subscribeComponentBlurredEvent() {
|
|
2599
|
-
this.
|
|
2622
|
+
this.zone.runOutsideAngular(() => {
|
|
2600
2623
|
this.subs.add(this.navigationService.tab.pipe(filter(() => this._isFocused), tap(() => this.focusButton())).subscribe(this.handleTab.bind(this)));
|
|
2601
2624
|
this.subs.add(fromEvent(document, 'click')
|
|
2602
2625
|
.pipe(filter((event) => !this.wrapperContains(event.target)), filter(() => this._isFocused))
|
|
2603
|
-
.subscribe(() => this.
|
|
2626
|
+
.subscribe(() => this.zone.run(() => this.blurWrapper())));
|
|
2604
2627
|
});
|
|
2605
2628
|
}
|
|
2606
2629
|
subscribeNavigationEvents() {
|
|
@@ -2707,7 +2730,7 @@ class ListButton extends MultiTabStop {
|
|
|
2707
2730
|
}
|
|
2708
2731
|
onNavigationEnterUp(_args) {
|
|
2709
2732
|
if (!this._disabled && !this.openState) {
|
|
2710
|
-
this._active
|
|
2733
|
+
this._active.set(false);
|
|
2711
2734
|
}
|
|
2712
2735
|
if (this.openState) {
|
|
2713
2736
|
const focused = this.focusService.focused;
|
|
@@ -2788,11 +2811,12 @@ class ListButton extends MultiTabStop {
|
|
|
2788
2811
|
}
|
|
2789
2812
|
}
|
|
2790
2813
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ListButton, deps: [{ token: FocusService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: PopupContainerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2791
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ListButton, isStandalone: true, selector: "ng-component", inputs: { disabled: "disabled", tabIndex: "tabIndex", buttonClass: "buttonClass", popupSettings: "popupSettings" }, outputs: { open: "open", close: "close", escape: "escape" }, viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true, read: ElementRef }, { propertyName: "buttonList", first: true, predicate: ["buttonList"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
|
2814
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ListButton, isStandalone: true, selector: "ng-component", inputs: { disabled: "disabled", tabIndex: "tabIndex", buttonClass: "buttonClass", popupSettings: "popupSettings" }, outputs: { open: "open", close: "close", escape: "escape" }, viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true, read: ElementRef }, { propertyName: "buttonList", first: true, predicate: ["buttonList"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2792
2815
|
}
|
|
2793
2816
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ListButton, decorators: [{
|
|
2794
2817
|
type: Component,
|
|
2795
2818
|
args: [{
|
|
2819
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2796
2820
|
template: ''
|
|
2797
2821
|
}]
|
|
2798
2822
|
}], ctorParameters: () => [{ type: FocusService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: PopupContainerService }], propDecorators: { button: [{
|
|
@@ -2897,24 +2921,39 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2897
2921
|
/**
|
|
2898
2922
|
* Specifies the padding of the DropDownButton. See [DropDownButton Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/dropdownbutton/appearance#size). The default value is set by the Kendo theme.
|
|
2899
2923
|
*/
|
|
2900
|
-
size
|
|
2924
|
+
set size(size) {
|
|
2925
|
+
this._size.set(size);
|
|
2926
|
+
}
|
|
2927
|
+
get size() {
|
|
2928
|
+
return this._size();
|
|
2929
|
+
}
|
|
2901
2930
|
/**
|
|
2902
2931
|
* Specifies the border radius of the DropDownButton. See [DropDownButton Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/dropdownbutton/appearance#roundness). The default value is set by the Kendo theme.
|
|
2903
2932
|
*/
|
|
2904
|
-
rounded
|
|
2933
|
+
set rounded(rounded) {
|
|
2934
|
+
this._rounded.set(rounded);
|
|
2935
|
+
}
|
|
2936
|
+
get rounded() {
|
|
2937
|
+
return this._rounded();
|
|
2938
|
+
}
|
|
2905
2939
|
/**
|
|
2906
2940
|
* Specifies the background and border styles of the DropDownButton. See [DropDownButton Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/dropdownbutton/appearance#fill-mode). The default value is set by the Kendo theme.
|
|
2907
2941
|
*/
|
|
2908
2942
|
set fillMode(fillMode) {
|
|
2909
|
-
this._fillMode
|
|
2943
|
+
this._fillMode.set(fillMode === 'clear' ? 'flat' : fillMode);
|
|
2910
2944
|
}
|
|
2911
2945
|
get fillMode() {
|
|
2912
|
-
return this._fillMode;
|
|
2946
|
+
return this._fillMode();
|
|
2913
2947
|
}
|
|
2914
2948
|
/**
|
|
2915
2949
|
* Specifies predefined theme colors for the DropDownButton. See [DropDownButton Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/dropdownbutton/appearance#theme-colors).
|
|
2916
2950
|
*/
|
|
2917
|
-
themeColor
|
|
2951
|
+
set themeColor(themeColor) {
|
|
2952
|
+
this._themeColor.set(themeColor);
|
|
2953
|
+
}
|
|
2954
|
+
get themeColor() {
|
|
2955
|
+
return this._themeColor();
|
|
2956
|
+
}
|
|
2918
2957
|
/**
|
|
2919
2958
|
* Sets attributes for the main button.
|
|
2920
2959
|
*/
|
|
@@ -2944,16 +2983,19 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2944
2983
|
}
|
|
2945
2984
|
hostDisplayStyle = 'inline-flex';
|
|
2946
2985
|
get dir() {
|
|
2947
|
-
return this.direction;
|
|
2986
|
+
return this.direction();
|
|
2948
2987
|
}
|
|
2949
2988
|
/**
|
|
2950
2989
|
* @hidden
|
|
2951
2990
|
*/
|
|
2952
2991
|
get active() {
|
|
2953
|
-
return this._active;
|
|
2992
|
+
return this._active();
|
|
2954
2993
|
}
|
|
2955
2994
|
itemTemplate;
|
|
2956
|
-
|
|
2995
|
+
_size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
2996
|
+
_rounded = signal(undefined, ...(ngDevMode ? [{ debugName: "_rounded" }] : []));
|
|
2997
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
2998
|
+
_themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
|
|
2957
2999
|
_buttonAttributes = null;
|
|
2958
3000
|
documentMouseUpSub;
|
|
2959
3001
|
/**
|
|
@@ -2963,10 +3005,10 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2963
3005
|
this.keyDownHandler(event, true);
|
|
2964
3006
|
const code = normalizeKeys(event);
|
|
2965
3007
|
if (code === Keys.Space) {
|
|
2966
|
-
this._active
|
|
3008
|
+
this._active.set(true);
|
|
2967
3009
|
}
|
|
2968
3010
|
if (code === Keys.Enter) {
|
|
2969
|
-
this._active
|
|
3011
|
+
this._active.set(true);
|
|
2970
3012
|
event.preventDefault();
|
|
2971
3013
|
}
|
|
2972
3014
|
}
|
|
@@ -2975,7 +3017,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2975
3017
|
*/
|
|
2976
3018
|
keyup(event) {
|
|
2977
3019
|
this.keyUpHandler(event);
|
|
2978
|
-
this._active
|
|
3020
|
+
this._active.set(false);
|
|
2979
3021
|
}
|
|
2980
3022
|
/**
|
|
2981
3023
|
* @hidden
|
|
@@ -2985,7 +3027,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2985
3027
|
event.preventDefault();
|
|
2986
3028
|
}
|
|
2987
3029
|
else {
|
|
2988
|
-
this._active
|
|
3030
|
+
this._active.set(true);
|
|
2989
3031
|
}
|
|
2990
3032
|
}
|
|
2991
3033
|
/**
|
|
@@ -2995,7 +3037,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2995
3037
|
if (this._disabled) {
|
|
2996
3038
|
event.preventDefault();
|
|
2997
3039
|
}
|
|
2998
|
-
this._active
|
|
3040
|
+
this._active.set(false);
|
|
2999
3041
|
}
|
|
3000
3042
|
/**
|
|
3001
3043
|
* @hidden
|
|
@@ -3038,7 +3080,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
3038
3080
|
zone.runOutsideAngular(() => {
|
|
3039
3081
|
this.documentMouseUpSub = this.renderer.listen('document', 'mouseup', () => {
|
|
3040
3082
|
if (this.active) {
|
|
3041
|
-
zone.run(() => this._active
|
|
3083
|
+
zone.run(() => this._active.set(false));
|
|
3042
3084
|
}
|
|
3043
3085
|
});
|
|
3044
3086
|
});
|
|
@@ -3153,11 +3195,13 @@ class DropDownButtonComponent extends ListButton {
|
|
|
3153
3195
|
</kendo-button-list>
|
|
3154
3196
|
</ng-template>
|
|
3155
3197
|
<ng-container #container></ng-container>
|
|
3156
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], 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"] }] });
|
|
3198
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3157
3199
|
}
|
|
3158
3200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
3159
3201
|
type: Component,
|
|
3160
3202
|
args: [{
|
|
3203
|
+
selector: 'kendo-dropdownbutton',
|
|
3204
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3161
3205
|
exportAs: 'kendoDropDownButton',
|
|
3162
3206
|
providers: [
|
|
3163
3207
|
FocusService,
|
|
@@ -3170,7 +3214,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3170
3214
|
},
|
|
3171
3215
|
PopupContainerService
|
|
3172
3216
|
],
|
|
3173
|
-
selector: 'kendo-dropdownbutton',
|
|
3174
3217
|
template: `
|
|
3175
3218
|
<button kendoButton #button
|
|
3176
3219
|
type="button"
|
|
@@ -3684,17 +3727,19 @@ class FloatingActionButtonComponent {
|
|
|
3684
3727
|
element;
|
|
3685
3728
|
focusService;
|
|
3686
3729
|
navigationService;
|
|
3687
|
-
ngZone;
|
|
3688
3730
|
popupService;
|
|
3689
3731
|
builder;
|
|
3690
3732
|
localizationService;
|
|
3733
|
+
ngZone;
|
|
3691
3734
|
get fixedClass() {
|
|
3692
3735
|
return this.positionMode === 'fixed';
|
|
3693
3736
|
}
|
|
3694
3737
|
get absoluteClass() {
|
|
3695
3738
|
return this.positionMode === 'absolute';
|
|
3696
3739
|
}
|
|
3697
|
-
direction
|
|
3740
|
+
get direction() {
|
|
3741
|
+
return this._direction();
|
|
3742
|
+
}
|
|
3698
3743
|
button;
|
|
3699
3744
|
popupTemplate;
|
|
3700
3745
|
dialItemTemplate;
|
|
@@ -3850,6 +3895,7 @@ class FloatingActionButtonComponent {
|
|
|
3850
3895
|
_disabled = false;
|
|
3851
3896
|
_align = { horizontal: 'end', vertical: 'bottom' };
|
|
3852
3897
|
_offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
|
|
3898
|
+
_direction = signal(undefined, ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
3853
3899
|
subscriptions = new Subscription();
|
|
3854
3900
|
popupMouseDownListener;
|
|
3855
3901
|
rtl = false;
|
|
@@ -3857,20 +3903,21 @@ class FloatingActionButtonComponent {
|
|
|
3857
3903
|
popupRef;
|
|
3858
3904
|
initialSetup = true;
|
|
3859
3905
|
focusChangedProgrammatically = false;
|
|
3860
|
-
constructor(renderer, element, focusService, navigationService,
|
|
3906
|
+
constructor(renderer, element, focusService, navigationService, popupService, builder, localizationService, ngZone) {
|
|
3861
3907
|
this.renderer = renderer;
|
|
3862
3908
|
this.element = element;
|
|
3863
3909
|
this.focusService = focusService;
|
|
3864
3910
|
this.navigationService = navigationService;
|
|
3865
|
-
this.ngZone = ngZone;
|
|
3866
3911
|
this.popupService = popupService;
|
|
3867
3912
|
this.builder = builder;
|
|
3868
3913
|
this.localizationService = localizationService;
|
|
3914
|
+
this.ngZone = ngZone;
|
|
3869
3915
|
validatePackage(packageMetadata);
|
|
3870
3916
|
this.subscribeNavigationEvents();
|
|
3917
|
+
this._direction.set(this.localizationService.rtl ? 'rtl' : 'ltr');
|
|
3871
3918
|
this.subscriptions.add(this.localizationService.changes.subscribe(({ rtl }) => {
|
|
3872
3919
|
this.rtl = rtl;
|
|
3873
|
-
this.
|
|
3920
|
+
this._direction.set(rtl ? 'rtl' : 'ltr');
|
|
3874
3921
|
}));
|
|
3875
3922
|
}
|
|
3876
3923
|
ngAfterViewInit() {
|
|
@@ -3926,7 +3973,9 @@ class FloatingActionButtonComponent {
|
|
|
3926
3973
|
return;
|
|
3927
3974
|
}
|
|
3928
3975
|
if (shouldOpen) {
|
|
3929
|
-
|
|
3976
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3977
|
+
setTimeout(() => this.openDial());
|
|
3978
|
+
});
|
|
3930
3979
|
}
|
|
3931
3980
|
else {
|
|
3932
3981
|
this.closeDial();
|
|
@@ -4337,7 +4386,7 @@ class FloatingActionButtonComponent {
|
|
|
4337
4386
|
}
|
|
4338
4387
|
return DEFAULT_DURATION;
|
|
4339
4388
|
}
|
|
4340
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FloatingActionButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: FocusService }, { token: NavigationService }, { token:
|
|
4389
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FloatingActionButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: FocusService }, { token: NavigationService }, { token: i3.PopupService }, { token: i4.AnimationBuilder }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
4341
4390
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FloatingActionButtonComponent, isStandalone: true, selector: "kendo-floatingactionbutton", inputs: { themeColor: "themeColor", size: "size", rounded: "rounded", disabled: "disabled", align: "align", offset: "offset", positionMode: "positionMode", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", buttonClass: "buttonClass", dialClass: "dialClass", text: "text", dialItemAnimation: "dialItemAnimation", tabIndex: "tabIndex", dialItems: "dialItems" }, outputs: { onBlur: "blur", onFocus: "focus", dialItemClick: "dialItemClick", open: "open", close: "close" }, host: { properties: { "class.k-pos-fixed": "this.fixedClass", "class.k-pos-absolute": "this.absoluteClass", "attr.dir": "this.direction" } }, providers: [
|
|
4342
4391
|
FocusService,
|
|
4343
4392
|
NavigationService,
|
|
@@ -4409,12 +4458,13 @@ class FloatingActionButtonComponent {
|
|
|
4409
4458
|
>
|
|
4410
4459
|
</ul>
|
|
4411
4460
|
</ng-template>
|
|
4412
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: DialListComponent, selector: "[kendoDialList]", inputs: ["dialItems", "dialItemTemplate", "align"] }] });
|
|
4461
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: DialListComponent, selector: "[kendoDialList]", inputs: ["dialItems", "dialItemTemplate", "align"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4413
4462
|
}
|
|
4414
4463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FloatingActionButtonComponent, decorators: [{
|
|
4415
4464
|
type: Component,
|
|
4416
4465
|
args: [{
|
|
4417
4466
|
selector: 'kendo-floatingactionbutton',
|
|
4467
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4418
4468
|
providers: [
|
|
4419
4469
|
FocusService,
|
|
4420
4470
|
NavigationService,
|
|
@@ -4491,7 +4541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4491
4541
|
standalone: true,
|
|
4492
4542
|
imports: [NgClass, EventsOutsideAngularDirective, NgTemplateOutlet, IconWrapperComponent, DialListComponent]
|
|
4493
4543
|
}]
|
|
4494
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: FocusService }, { type: NavigationService }, { type:
|
|
4544
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: FocusService }, { type: NavigationService }, { type: i3.PopupService }, { type: i4.AnimationBuilder }, { type: i1.LocalizationService }, { type: i0.NgZone }], propDecorators: { fixedClass: [{
|
|
4495
4545
|
type: HostBinding,
|
|
4496
4546
|
args: ['class.k-pos-fixed']
|
|
4497
4547
|
}], absoluteClass: [{
|
|
@@ -4583,11 +4633,23 @@ class Messages extends ComponentMessages {
|
|
|
4583
4633
|
* </kendo-splitbutton>
|
|
4584
4634
|
* ```
|
|
4585
4635
|
*/
|
|
4586
|
-
splitButtonLabel
|
|
4636
|
+
set splitButtonLabel(value) {
|
|
4637
|
+
this._splitButtonLabel.set(value);
|
|
4638
|
+
}
|
|
4639
|
+
get splitButtonLabel() {
|
|
4640
|
+
return this._splitButtonLabel();
|
|
4641
|
+
}
|
|
4587
4642
|
/**
|
|
4588
4643
|
* Specifies the text for the SplitButton toggle button `aria-label`.
|
|
4589
4644
|
*/
|
|
4590
|
-
toggleButtonLabel
|
|
4645
|
+
set toggleButtonLabel(value) {
|
|
4646
|
+
this._toggleButtonLabel.set(value);
|
|
4647
|
+
}
|
|
4648
|
+
get toggleButtonLabel() {
|
|
4649
|
+
return this._toggleButtonLabel();
|
|
4650
|
+
}
|
|
4651
|
+
_toggleButtonLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_toggleButtonLabel" }] : []));
|
|
4652
|
+
_splitButtonLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_splitButtonLabel" }] : []));
|
|
4591
4653
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4592
4654
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: Messages, isStandalone: true, selector: "kendo-splitbutton-messages-base", inputs: { splitButtonLabel: "splitButtonLabel", toggleButtonLabel: "toggleButtonLabel" }, usesInheritance: true, ngImport: i0 });
|
|
4593
4655
|
}
|
|
@@ -4734,30 +4796,40 @@ class SplitButtonComponent extends ListButton {
|
|
|
4734
4796
|
/**
|
|
4735
4797
|
* Configures the padding of the SplitButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/api/splitbuttoncomponent#size)). The default value is set by the Kendo theme.
|
|
4736
4798
|
*/
|
|
4737
|
-
size
|
|
4799
|
+
set size(size) {
|
|
4800
|
+
this._size.set(size);
|
|
4801
|
+
}
|
|
4802
|
+
get size() {
|
|
4803
|
+
return this._size();
|
|
4804
|
+
}
|
|
4738
4805
|
/**
|
|
4739
4806
|
* Configures the border radius of the SplitButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/api/splitbuttoncomponent#rounded)). The default value is set by the Kendo theme.
|
|
4740
4807
|
*/
|
|
4741
4808
|
set rounded(rounded) {
|
|
4742
4809
|
this.handleClasses(rounded, 'rounded');
|
|
4743
|
-
this._rounded
|
|
4810
|
+
this._rounded.set(rounded);
|
|
4744
4811
|
}
|
|
4745
4812
|
get rounded() {
|
|
4746
|
-
return this._rounded;
|
|
4813
|
+
return this._rounded();
|
|
4747
4814
|
}
|
|
4748
4815
|
/**
|
|
4749
4816
|
* Configures the background and border styles of the SplitButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/api/splitbuttoncomponent#fillmode)). The default value is set by the Kendo theme.
|
|
4750
4817
|
*/
|
|
4751
4818
|
set fillMode(fillMode) {
|
|
4752
|
-
this._fillMode
|
|
4819
|
+
this._fillMode.set(fillMode === 'clear' ? 'flat' : fillMode);
|
|
4753
4820
|
}
|
|
4754
4821
|
get fillMode() {
|
|
4755
|
-
return this._fillMode;
|
|
4822
|
+
return this._fillMode();
|
|
4756
4823
|
}
|
|
4757
4824
|
/**
|
|
4758
4825
|
* Configures the theme color of the SplitButton. The theme color applies to the background, border, and text ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/api/splitbuttoncomponent#themecolor)). The default value is set by the Kendo theme.
|
|
4759
4826
|
*/
|
|
4760
|
-
themeColor
|
|
4827
|
+
set themeColor(themeColor) {
|
|
4828
|
+
this._themeColor.set(themeColor);
|
|
4829
|
+
}
|
|
4830
|
+
get themeColor() {
|
|
4831
|
+
return this._themeColor();
|
|
4832
|
+
}
|
|
4761
4833
|
/**
|
|
4762
4834
|
* Disables the SplitButton when set to `true` ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/splitbutton/data-binding#arrays-of-complex-data)).
|
|
4763
4835
|
*/
|
|
@@ -4853,7 +4925,9 @@ class SplitButtonComponent extends ListButton {
|
|
|
4853
4925
|
* Specifies a template to customize the content of the items in the drop-down list.
|
|
4854
4926
|
*/
|
|
4855
4927
|
itemTemplate;
|
|
4856
|
-
activeArrow
|
|
4928
|
+
get activeArrow() {
|
|
4929
|
+
return this._activeArrow();
|
|
4930
|
+
}
|
|
4857
4931
|
listId = guid();
|
|
4858
4932
|
/**
|
|
4859
4933
|
* @hidden
|
|
@@ -4865,7 +4939,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
4865
4939
|
* @hidden
|
|
4866
4940
|
*/
|
|
4867
4941
|
get active() {
|
|
4868
|
-
return this._active;
|
|
4942
|
+
return this._active();
|
|
4869
4943
|
}
|
|
4870
4944
|
/**
|
|
4871
4945
|
* @hidden
|
|
@@ -4873,11 +4947,14 @@ class SplitButtonComponent extends ListButton {
|
|
|
4873
4947
|
get componentTabIndex() {
|
|
4874
4948
|
return this.disabled ? -1 : this.tabIndex;
|
|
4875
4949
|
}
|
|
4876
|
-
buttonText = '';
|
|
4950
|
+
buttonText = signal('', ...(ngDevMode ? [{ debugName: "buttonText" }] : []));
|
|
4877
4951
|
arrowButtonClicked = false;
|
|
4878
|
-
_rounded = undefined;
|
|
4879
|
-
_fillMode = undefined;
|
|
4952
|
+
_rounded = signal(undefined, ...(ngDevMode ? [{ debugName: "_rounded" }] : []));
|
|
4953
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
4954
|
+
_themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
|
|
4955
|
+
_size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
4880
4956
|
_buttonAttributes = null;
|
|
4957
|
+
_activeArrow = signal(false, ...(ngDevMode ? [{ debugName: "_activeArrow" }] : []));
|
|
4881
4958
|
documentMouseUpSub;
|
|
4882
4959
|
set isFocused(value) {
|
|
4883
4960
|
this._isFocused = value;
|
|
@@ -4889,14 +4966,14 @@ class SplitButtonComponent extends ListButton {
|
|
|
4889
4966
|
return true;
|
|
4890
4967
|
}
|
|
4891
4968
|
get dir() {
|
|
4892
|
-
return this.direction;
|
|
4969
|
+
return this.direction();
|
|
4893
4970
|
}
|
|
4894
4971
|
/**
|
|
4895
4972
|
* @hidden
|
|
4896
4973
|
*/
|
|
4897
4974
|
get ariaLabel() {
|
|
4898
4975
|
const localizationMsg = this.messageFor('splitButtonLabel') || '';
|
|
4899
|
-
return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText);
|
|
4976
|
+
return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText());
|
|
4900
4977
|
}
|
|
4901
4978
|
/**
|
|
4902
4979
|
* @hidden
|
|
@@ -4934,14 +5011,14 @@ class SplitButtonComponent extends ListButton {
|
|
|
4934
5011
|
* @hidden
|
|
4935
5012
|
*/
|
|
4936
5013
|
toggleButtonActiveState(enable) {
|
|
4937
|
-
this._active
|
|
5014
|
+
this._active.set(enable);
|
|
4938
5015
|
}
|
|
4939
5016
|
/**
|
|
4940
5017
|
* @hidden
|
|
4941
5018
|
*/
|
|
4942
5019
|
toggleArrowButtonActiveState(enable) {
|
|
4943
5020
|
this.arrowButtonClicked = true;
|
|
4944
|
-
this.
|
|
5021
|
+
this._activeArrow.set(enable);
|
|
4945
5022
|
}
|
|
4946
5023
|
/**
|
|
4947
5024
|
* @hidden
|
|
@@ -4963,14 +5040,14 @@ class SplitButtonComponent extends ListButton {
|
|
|
4963
5040
|
keydown(event) {
|
|
4964
5041
|
this.keyDownHandler(event, true);
|
|
4965
5042
|
if (event.code === Keys.Space) {
|
|
4966
|
-
this._active
|
|
5043
|
+
this._active.set(true);
|
|
4967
5044
|
}
|
|
4968
5045
|
}
|
|
4969
5046
|
/**
|
|
4970
5047
|
* @hidden
|
|
4971
5048
|
*/
|
|
4972
5049
|
keyup(event) {
|
|
4973
|
-
this._active
|
|
5050
|
+
this._active.set(false);
|
|
4974
5051
|
if (event.code !== Keys.Space) {
|
|
4975
5052
|
this.keyUpHandler(event);
|
|
4976
5053
|
}
|
|
@@ -5036,7 +5113,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
5036
5113
|
*/
|
|
5037
5114
|
get anchorAlign() {
|
|
5038
5115
|
const align = { horizontal: this.popupSettings.align || 'left', vertical: 'bottom' };
|
|
5039
|
-
if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
5116
|
+
if (this.direction() === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
5040
5117
|
align.horizontal = 'right';
|
|
5041
5118
|
}
|
|
5042
5119
|
return align;
|
|
@@ -5046,7 +5123,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
5046
5123
|
*/
|
|
5047
5124
|
get popupAlign() {
|
|
5048
5125
|
const align = { horizontal: this.popupSettings.align || 'left', vertical: 'top' };
|
|
5049
|
-
if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
5126
|
+
if (this.direction() === 'rtl' && !isPresent(this.popupSettings.align)) {
|
|
5050
5127
|
align.horizontal = 'right';
|
|
5051
5128
|
}
|
|
5052
5129
|
return align;
|
|
@@ -5085,10 +5162,10 @@ class SplitButtonComponent extends ListButton {
|
|
|
5085
5162
|
zone.runOutsideAngular(() => {
|
|
5086
5163
|
this.documentMouseUpSub = this.renderer.listen('document', 'mouseup', () => {
|
|
5087
5164
|
if (this.active) {
|
|
5088
|
-
zone.run(() => this._active
|
|
5165
|
+
zone.run(() => this._active.set(false));
|
|
5089
5166
|
}
|
|
5090
5167
|
if (this.activeArrow) {
|
|
5091
|
-
zone.run(() => this.
|
|
5168
|
+
zone.run(() => this._activeArrow.set(false));
|
|
5092
5169
|
}
|
|
5093
5170
|
});
|
|
5094
5171
|
});
|
|
@@ -5105,8 +5182,8 @@ class SplitButtonComponent extends ListButton {
|
|
|
5105
5182
|
.split('\n')
|
|
5106
5183
|
.join('')
|
|
5107
5184
|
.trim();
|
|
5108
|
-
if (innerText !== this.buttonText) {
|
|
5109
|
-
this.buttonText
|
|
5185
|
+
if (innerText !== this.buttonText()) {
|
|
5186
|
+
this.buttonText.set(innerText);
|
|
5110
5187
|
}
|
|
5111
5188
|
}
|
|
5112
5189
|
}
|
|
@@ -5220,11 +5297,13 @@ class SplitButtonComponent extends ListButton {
|
|
|
5220
5297
|
</kendo-button-list>
|
|
5221
5298
|
</ng-template>
|
|
5222
5299
|
<ng-container #container></ng-container>
|
|
5223
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], 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"] }] });
|
|
5300
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5224
5301
|
}
|
|
5225
5302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
5226
5303
|
type: Component,
|
|
5227
5304
|
args: [{
|
|
5305
|
+
selector: 'kendo-splitbutton',
|
|
5306
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5228
5307
|
exportAs: 'kendoSplitButton',
|
|
5229
5308
|
providers: [
|
|
5230
5309
|
FocusService,
|
|
@@ -5241,7 +5320,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
5241
5320
|
useExisting: forwardRef(() => SplitButtonComponent)
|
|
5242
5321
|
}
|
|
5243
5322
|
],
|
|
5244
|
-
selector: 'kendo-splitbutton',
|
|
5245
5323
|
template: `
|
|
5246
5324
|
<ng-container kendoSplitButtonLocalizedMessages
|
|
5247
5325
|
i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label"
|
|
@@ -5520,7 +5598,7 @@ class SpeechToTextButtonComponent {
|
|
|
5520
5598
|
return this.isDisabled;
|
|
5521
5599
|
}
|
|
5522
5600
|
get getDirection() {
|
|
5523
|
-
return this.
|
|
5601
|
+
return this._direction();
|
|
5524
5602
|
}
|
|
5525
5603
|
/**
|
|
5526
5604
|
* @hidden
|
|
@@ -5600,8 +5678,8 @@ class SpeechToTextButtonComponent {
|
|
|
5600
5678
|
this.renderer = renderer;
|
|
5601
5679
|
this.ngZone = ngZone;
|
|
5602
5680
|
validatePackage(packageMetadata);
|
|
5603
|
-
this.
|
|
5604
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) =>
|
|
5681
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
5682
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr')));
|
|
5605
5683
|
this.element = element.nativeElement;
|
|
5606
5684
|
this.renderer.addClass(this.element, 'k-button');
|
|
5607
5685
|
}
|
|
@@ -5689,7 +5767,7 @@ class SpeechToTextButtonComponent {
|
|
|
5689
5767
|
_fillMode = undefined;
|
|
5690
5768
|
_themeColor = undefined;
|
|
5691
5769
|
_focused = false;
|
|
5692
|
-
|
|
5770
|
+
_direction = signal('', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
5693
5771
|
handleClasses(value, input) {
|
|
5694
5772
|
const elem = this.element;
|
|
5695
5773
|
const classes = getStylingClasses('button', input, this[input], value);
|
|
@@ -5790,11 +5868,13 @@ class SpeechToTextButtonComponent {
|
|
|
5790
5868
|
[svgIcon]="buttonSvgIcon">
|
|
5791
5869
|
</kendo-icon-wrapper>
|
|
5792
5870
|
<span class="k-button-text"><ng-content></ng-content></span>
|
|
5793
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
5871
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5794
5872
|
}
|
|
5795
5873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SpeechToTextButtonComponent, decorators: [{
|
|
5796
5874
|
type: Component,
|
|
5797
5875
|
args: [{
|
|
5876
|
+
selector: 'button[kendoSpeechToTextButton]',
|
|
5877
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5798
5878
|
exportAs: 'kendoSpeechToTextButton',
|
|
5799
5879
|
providers: [
|
|
5800
5880
|
LocalizationService,
|
|
@@ -5803,7 +5883,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
5803
5883
|
useValue: 'kendo.speechtotextbutton'
|
|
5804
5884
|
}
|
|
5805
5885
|
],
|
|
5806
|
-
selector: 'button[kendoSpeechToTextButton]',
|
|
5807
5886
|
template: `
|
|
5808
5887
|
<kendo-icon-wrapper
|
|
5809
5888
|
innerCssClass="k-button-icon"
|
|
@@ -6204,7 +6283,7 @@ class SmartPasteButtonComponent {
|
|
|
6204
6283
|
return this.isDisabled;
|
|
6205
6284
|
}
|
|
6206
6285
|
get getDirection() {
|
|
6207
|
-
return this.
|
|
6286
|
+
return this._direction();
|
|
6208
6287
|
}
|
|
6209
6288
|
onFocus() {
|
|
6210
6289
|
this.isFocused = true;
|
|
@@ -6248,7 +6327,7 @@ class SmartPasteButtonComponent {
|
|
|
6248
6327
|
_fillMode = undefined;
|
|
6249
6328
|
_themeColor = undefined;
|
|
6250
6329
|
_focused = false;
|
|
6251
|
-
|
|
6330
|
+
_direction = signal('', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
6252
6331
|
_iconClass;
|
|
6253
6332
|
_icon = DEFAULT_ICON;
|
|
6254
6333
|
_svgIcon = DEFAULT_SVG_ICON;
|
|
@@ -6262,8 +6341,8 @@ class SmartPasteButtonComponent {
|
|
|
6262
6341
|
this.http = http;
|
|
6263
6342
|
this.controlContainer = controlContainer;
|
|
6264
6343
|
validatePackage(packageMetadata);
|
|
6265
|
-
this.
|
|
6266
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) =>
|
|
6344
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
6345
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr')));
|
|
6267
6346
|
this.element = elementRef.nativeElement;
|
|
6268
6347
|
this.renderer.addClass(this.element, 'k-button');
|
|
6269
6348
|
}
|
|
@@ -6495,11 +6574,13 @@ class SmartPasteButtonComponent {
|
|
|
6495
6574
|
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
6496
6575
|
}
|
|
6497
6576
|
<span class="k-button-text"><ng-content></ng-content></span>
|
|
6498
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
6577
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6499
6578
|
}
|
|
6500
6579
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmartPasteButtonComponent, decorators: [{
|
|
6501
6580
|
type: Component,
|
|
6502
6581
|
args: [{
|
|
6582
|
+
selector: 'button[kendoSmartPasteButton]',
|
|
6583
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6503
6584
|
exportAs: 'kendoSmartPasteButton',
|
|
6504
6585
|
providers: [
|
|
6505
6586
|
LocalizationService,
|
|
@@ -6508,7 +6589,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6508
6589
|
useValue: 'kendo.smartpastebutton'
|
|
6509
6590
|
}
|
|
6510
6591
|
],
|
|
6511
|
-
selector: 'button[kendoSmartPasteButton]',
|
|
6512
6592
|
standalone: true,
|
|
6513
6593
|
imports: [IconWrapperComponent, NgClass],
|
|
6514
6594
|
template: `
|
|
@@ -6597,12 +6677,13 @@ class SegmentedControlComponent {
|
|
|
6597
6677
|
renderer;
|
|
6598
6678
|
wrapper;
|
|
6599
6679
|
zone;
|
|
6680
|
+
injector;
|
|
6600
6681
|
hostClass = true;
|
|
6601
6682
|
get stretchedClass() {
|
|
6602
6683
|
return this._layoutMode === 'stretch';
|
|
6603
6684
|
}
|
|
6604
6685
|
get direction() {
|
|
6605
|
-
return this._direction;
|
|
6686
|
+
return this._direction();
|
|
6606
6687
|
}
|
|
6607
6688
|
hostRole = 'group';
|
|
6608
6689
|
thumb;
|
|
@@ -6664,16 +6745,17 @@ class SegmentedControlComponent {
|
|
|
6664
6745
|
_items = [];
|
|
6665
6746
|
_size;
|
|
6666
6747
|
_layoutMode = 'compact';
|
|
6667
|
-
_direction;
|
|
6748
|
+
_direction = signal('', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
6668
6749
|
subs = new Subscription();
|
|
6669
|
-
constructor(renderer, wrapper, zone, localization) {
|
|
6750
|
+
constructor(renderer, wrapper, zone, injector, localization) {
|
|
6670
6751
|
this.renderer = renderer;
|
|
6671
6752
|
this.wrapper = wrapper;
|
|
6672
6753
|
this.zone = zone;
|
|
6754
|
+
this.injector = injector;
|
|
6673
6755
|
validatePackage(packageMetadata);
|
|
6674
|
-
this._direction
|
|
6756
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
6675
6757
|
this.subs.add(localization.changes.subscribe(({ rtl }) => {
|
|
6676
|
-
this._direction
|
|
6758
|
+
this._direction.set(rtl ? 'rtl' : 'ltr');
|
|
6677
6759
|
}));
|
|
6678
6760
|
}
|
|
6679
6761
|
ngAfterViewInit() {
|
|
@@ -6725,7 +6807,7 @@ class SegmentedControlComponent {
|
|
|
6725
6807
|
if (!isDocumentAvailable()) {
|
|
6726
6808
|
return;
|
|
6727
6809
|
}
|
|
6728
|
-
|
|
6810
|
+
afterNextRender(() => {
|
|
6729
6811
|
const element = this.wrapper.nativeElement;
|
|
6730
6812
|
if (!element?.getBoundingClientRect) {
|
|
6731
6813
|
return;
|
|
@@ -6741,9 +6823,9 @@ class SegmentedControlComponent {
|
|
|
6741
6823
|
const right = controlRect.right - itemRect.right;
|
|
6742
6824
|
this.renderer.setStyle(selectionIndicator, 'left', `${left}px`);
|
|
6743
6825
|
this.renderer.setStyle(selectionIndicator, 'right', `${right}px`);
|
|
6744
|
-
});
|
|
6826
|
+
}, { injector: this.injector });
|
|
6745
6827
|
}
|
|
6746
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SegmentedControlComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6828
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SegmentedControlComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6747
6829
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SegmentedControlComponent, isStandalone: true, selector: "kendo-segmented-control", inputs: { items: "items", layoutMode: "layoutMode", size: "size", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, host: { properties: { "class.k-segmented-control": "this.hostClass", "class.k-segmented-control-stretched": "this.stretchedClass", "attr.dir": "this.direction", "attr.role": "this.hostRole" } }, providers: [
|
|
6748
6830
|
LocalizationService,
|
|
6749
6831
|
{
|
|
@@ -6820,7 +6902,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6820
6902
|
}
|
|
6821
6903
|
`
|
|
6822
6904
|
}]
|
|
6823
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.LocalizationService }], propDecorators: { hostClass: [{
|
|
6905
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i1.LocalizationService }], propDecorators: { hostClass: [{
|
|
6824
6906
|
type: HostBinding,
|
|
6825
6907
|
args: ['class.k-segmented-control']
|
|
6826
6908
|
}], stretchedClass: [{
|