@progress/kendo-angular-buttons 22.1.0-develop.9 → 23.0.0-develop.10
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/README.md +2 -1
- package/button/button.component.d.ts +7 -16
- package/button/selection-settings.d.ts +1 -1
- package/buttons.module.d.ts +2 -1
- package/chip/chip-list.component.d.ts +1 -3
- package/chip/chip.component.d.ts +7 -15
- package/common/models/fillmode.d.ts +2 -2
- package/common/models/size.d.ts +2 -2
- package/common/models/theme-color.d.ts +3 -5
- package/directives.d.ts +16 -1
- package/dropdownbutton/dropdownbutton.component.d.ts +5 -9
- package/fesm2022/progress-kendo-angular-buttons.mjs +1112 -442
- package/floatingactionbutton/floatingactionbutton.component.d.ts +10 -14
- package/floatingactionbutton/models/align.d.ts +1 -1
- package/floatingactionbutton/models/item-animation.interface.d.ts +1 -1
- package/floatingactionbutton/models/item-click.event.d.ts +1 -1
- package/floatingactionbutton/models/item.interface.d.ts +2 -2
- package/floatingactionbutton/models/offset.d.ts +1 -1
- package/floatingactionbutton/models/position-mode.d.ts +1 -1
- package/floatingactionbutton/templates/dial-item-template.directive.d.ts +1 -1
- package/floatingactionbutton/templates/fab-template.directive.d.ts +1 -1
- package/index.d.ts +3 -0
- package/listbutton/button-item-template.directive.d.ts +1 -1
- package/listbutton/list-item-model.d.ts +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -7
- package/smartpastebutton/models/form-field.d.ts +40 -0
- package/smartpastebutton/models/index.d.ts +6 -0
- package/smartpastebutton/models/service-settings.d.ts +108 -0
- package/smartpastebutton/smartpastebutton.component.d.ts +175 -0
- package/smartpastebutton/smartpastebutton.module.d.ts +27 -0
- package/smartpastebutton/utils.d.ts +50 -0
- package/speechtotextbutton/models/speechtotextbutton-settings.d.ts +1 -1
- package/speechtotextbutton/speechtotextbutton.component.d.ts +5 -11
- package/splitbutton/localization/custom-messages.component.d.ts +1 -1
- package/splitbutton/splitbutton.component.d.ts +9 -17
- package/util.d.ts +2 -2
|
@@ -3,12 +3,12 @@
|
|
|
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, Input, HostListener, HostBinding, Output, Optional, Component, ContentChildren, Directive, InjectionToken, Inject, ElementRef, ViewContainerRef, ViewChild, ContentChild, forwardRef, NgModule } from '@angular/core';
|
|
6
|
+
import { Injectable, isDevMode, EventEmitter, Input, HostListener, HostBinding, Output, Optional, Component, ContentChildren, Directive, InjectionToken, Inject, ElementRef, ViewContainerRef, ViewChild, ContentChild, forwardRef, SkipSelf, NgModule } from '@angular/core';
|
|
7
7
|
import { Subject, Subscription, fromEvent, merge, of, from, Observable } from 'rxjs';
|
|
8
8
|
import * as i12 from '@progress/kendo-angular-common';
|
|
9
|
-
import { isDocumentAvailable, isFirefox, isSafari, isChanged, hasObservers, normalizeKeys, Keys, TemplateContextDirective, MultiTabStop, guid, parseCSSClassNames, isPresent as isPresent$1, EventsOutsideAngularDirective, replaceMessagePlaceholder, anyChanged, ToggleButtonTabStopDirective, ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
|
|
9
|
+
import { isDocumentAvailable, isFirefox, isSafari, isChanged, hasObservers, normalizeKeys, Keys, TemplateContextDirective, MultiTabStop, guid, parseCSSClassNames, isPresent as isPresent$1, EventsOutsideAngularDirective, replaceMessagePlaceholder, anyChanged, PreventableEvent as PreventableEvent$1, ToggleButtonTabStopDirective, ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
|
|
10
10
|
export { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
|
|
11
|
-
import { caretAltDownIcon, xCircleIcon, moreVerticalIcon, microphoneOutlineIcon, stopSmIcon } from '@progress/kendo-svg-icons';
|
|
11
|
+
import { caretAltDownIcon, xCircleIcon, moreVerticalIcon, microphoneOutlineIcon, stopSmIcon, pasteSparkleIcon } from '@progress/kendo-svg-icons';
|
|
12
12
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
13
13
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
14
14
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -20,6 +20,10 @@ import { PopupService } from '@progress/kendo-angular-popup';
|
|
|
20
20
|
import * as i4 from '@angular/animations';
|
|
21
21
|
import { sequence, query, style, stagger, animate } from '@angular/animations';
|
|
22
22
|
import { KendoSpeechRecognition } from '@progress/kendo-webspeech-common';
|
|
23
|
+
import * as i2 from '@angular/common/http';
|
|
24
|
+
import { HttpHeaders, HttpRequest, HttpEventType } from '@angular/common/http';
|
|
25
|
+
import * as i3$1 from '@angular/forms';
|
|
26
|
+
import { KendoSmartPaste } from '@progress/kendo-smartpaste-common';
|
|
23
27
|
|
|
24
28
|
/**
|
|
25
29
|
* @hidden
|
|
@@ -46,7 +50,7 @@ const packageMetadata = {
|
|
|
46
50
|
productCode: 'KENDOUIANGULAR',
|
|
47
51
|
productCodes: ['KENDOUIANGULAR'],
|
|
48
52
|
publishDate: 0,
|
|
49
|
-
version: '
|
|
53
|
+
version: '23.0.0-develop.10',
|
|
50
54
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
51
55
|
};
|
|
52
56
|
|
|
@@ -103,25 +107,37 @@ const ROUNDNESS = {
|
|
|
103
107
|
/**
|
|
104
108
|
* @hidden
|
|
105
109
|
*
|
|
106
|
-
* Returns the styling classes to be added and removed
|
|
110
|
+
* Returns the styling classes to be added and removed.
|
|
107
111
|
*/
|
|
108
112
|
const getStylingClasses = (componentType, stylingOption, previousValue, newValue) => {
|
|
109
113
|
switch (stylingOption) {
|
|
110
|
-
case 'size':
|
|
114
|
+
case 'size': {
|
|
111
115
|
return {
|
|
112
|
-
toRemove: `k-${componentType}-${SIZES[previousValue]}
|
|
113
|
-
toAdd: newValue
|
|
116
|
+
toRemove: previousValue ? `k-${componentType}-${SIZES[previousValue]}` : null,
|
|
117
|
+
toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` : null
|
|
114
118
|
};
|
|
115
|
-
|
|
119
|
+
}
|
|
120
|
+
case 'rounded': {
|
|
121
|
+
let roundedClassToAdd = null;
|
|
122
|
+
if (newValue) {
|
|
123
|
+
if (newValue !== 'none') {
|
|
124
|
+
roundedClassToAdd = `k-rounded-${ROUNDNESS[newValue]}`;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
roundedClassToAdd = 'k-rounded-none';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
116
130
|
return {
|
|
117
|
-
toRemove: `k-rounded-${ROUNDNESS[previousValue]}
|
|
118
|
-
toAdd:
|
|
131
|
+
toRemove: previousValue ? `k-rounded-${ROUNDNESS[previousValue]}` : null,
|
|
132
|
+
toAdd: roundedClassToAdd || null
|
|
119
133
|
};
|
|
120
|
-
|
|
134
|
+
}
|
|
135
|
+
case 'fillMode': {
|
|
121
136
|
return {
|
|
122
|
-
toRemove: `k-${componentType}-${previousValue}
|
|
123
|
-
toAdd: newValue
|
|
137
|
+
toRemove: previousValue ? `k-${componentType}-${previousValue}` : null,
|
|
138
|
+
toAdd: newValue ? `k-${componentType}-${newValue}` : null
|
|
124
139
|
};
|
|
140
|
+
}
|
|
125
141
|
default:
|
|
126
142
|
break;
|
|
127
143
|
}
|
|
@@ -131,10 +147,10 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
131
147
|
*
|
|
132
148
|
* Returns the themeColor classes to be added and removed
|
|
133
149
|
*/
|
|
134
|
-
const getThemeColorClasses = (componentType,
|
|
150
|
+
const getThemeColorClasses = (componentType, previousValue, newValue) => {
|
|
135
151
|
return {
|
|
136
|
-
toRemove: `k-${componentType}-${
|
|
137
|
-
toAdd: newValue
|
|
152
|
+
toRemove: previousValue ? `k-${componentType}-${previousValue}` : null,
|
|
153
|
+
toAdd: newValue ? `k-${componentType}-${newValue}` : null
|
|
138
154
|
};
|
|
139
155
|
};
|
|
140
156
|
/**
|
|
@@ -155,10 +171,6 @@ const toggleClass = (className, add, renderer, element) => {
|
|
|
155
171
|
*/
|
|
156
172
|
const isObjectEmpty = (obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
157
173
|
|
|
158
|
-
const DEFAULT_ROUNDED$4 = 'medium';
|
|
159
|
-
const DEFAULT_SIZE$3 = 'medium';
|
|
160
|
-
const DEFAULT_THEME_COLOR$3 = 'base';
|
|
161
|
-
const DEFAULT_FILL_MODE$4 = 'solid';
|
|
162
174
|
/**
|
|
163
175
|
* Represents the Kendo UI Button component for Angular.
|
|
164
176
|
*
|
|
@@ -268,42 +280,33 @@ class ButtonComponent {
|
|
|
268
280
|
}
|
|
269
281
|
/**
|
|
270
282
|
* Sets the padding of the Button.
|
|
271
|
-
* See [Button Appearance](
|
|
272
|
-
*
|
|
273
|
-
* @default 'medium'
|
|
283
|
+
* See [Button Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/button/appearance#size). The default value is set by the Kendo theme.
|
|
274
284
|
*/
|
|
275
285
|
set size(size) {
|
|
276
|
-
|
|
277
|
-
this.
|
|
278
|
-
this._size = newSize;
|
|
286
|
+
this.handleClasses(size, 'size');
|
|
287
|
+
this._size = size;
|
|
279
288
|
}
|
|
280
289
|
get size() {
|
|
281
290
|
return this._size;
|
|
282
291
|
}
|
|
283
292
|
/**
|
|
284
293
|
* Sets the border radius of the Button.
|
|
285
|
-
* See [Button Appearance](
|
|
286
|
-
*
|
|
287
|
-
* @default 'medium'
|
|
294
|
+
* See [Button Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/button/appearance#roundness). The default value is set by the Kendo theme.
|
|
288
295
|
*/
|
|
289
296
|
set rounded(rounded) {
|
|
290
|
-
|
|
291
|
-
this.
|
|
292
|
-
this._rounded = newRounded;
|
|
297
|
+
this.handleClasses(rounded, 'rounded');
|
|
298
|
+
this._rounded = rounded;
|
|
293
299
|
}
|
|
294
300
|
get rounded() {
|
|
295
301
|
return this._rounded;
|
|
296
302
|
}
|
|
297
303
|
/**
|
|
298
304
|
* Sets the background and border styles of the Button.
|
|
299
|
-
* See [Button Appearance](
|
|
300
|
-
*
|
|
301
|
-
* @default 'solid'
|
|
305
|
+
* See [Button Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/button/appearance#fill-mode). The default value is set by the Kendo theme.
|
|
302
306
|
*/
|
|
303
307
|
set fillMode(fillMode) {
|
|
304
|
-
|
|
305
|
-
this.
|
|
306
|
-
this._fillMode = newFillMode;
|
|
308
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
309
|
+
this._fillMode = fillMode;
|
|
307
310
|
}
|
|
308
311
|
get fillMode() {
|
|
309
312
|
return this._fillMode;
|
|
@@ -311,14 +314,11 @@ class ButtonComponent {
|
|
|
311
314
|
/**
|
|
312
315
|
* Sets a predefined theme color for the Button.
|
|
313
316
|
* The theme color applies as a background and border color and adjusts the text color.
|
|
314
|
-
* See [Button Appearance](
|
|
315
|
-
*
|
|
316
|
-
* @default 'base'
|
|
317
|
+
* See [Button Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/button/appearance#theme-colors). The default value is set by the Kendo theme.
|
|
317
318
|
*/
|
|
318
319
|
set themeColor(themeColor) {
|
|
319
|
-
|
|
320
|
-
this.
|
|
321
|
-
this._themeColor = newThemeColor;
|
|
320
|
+
this.handleThemeColor(themeColor);
|
|
321
|
+
this._themeColor = themeColor;
|
|
322
322
|
}
|
|
323
323
|
get themeColor() {
|
|
324
324
|
return this._themeColor;
|
|
@@ -347,10 +347,10 @@ class ButtonComponent {
|
|
|
347
347
|
element;
|
|
348
348
|
isDisabled = false;
|
|
349
349
|
caretAltDownIcon = caretAltDownIcon;
|
|
350
|
-
_size =
|
|
351
|
-
_rounded =
|
|
352
|
-
_fillMode =
|
|
353
|
-
_themeColor =
|
|
350
|
+
_size = undefined;
|
|
351
|
+
_rounded = undefined;
|
|
352
|
+
_fillMode = undefined;
|
|
353
|
+
_themeColor = undefined;
|
|
354
354
|
_focused = false;
|
|
355
355
|
direction;
|
|
356
356
|
_selected;
|
|
@@ -446,12 +446,6 @@ class ButtonComponent {
|
|
|
446
446
|
this.toggleAriaPressed(this.toggleable);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
ngAfterViewInit() {
|
|
450
|
-
const stylingOptions = ['size', 'rounded', 'fillMode'];
|
|
451
|
-
stylingOptions.forEach(input => {
|
|
452
|
-
this.handleClasses(this[input], input);
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
449
|
ngOnDestroy() {
|
|
456
450
|
this.subs.unsubscribe();
|
|
457
451
|
}
|
|
@@ -532,7 +526,7 @@ class ButtonComponent {
|
|
|
532
526
|
const elem = this.element;
|
|
533
527
|
const classes = getStylingClasses('button', input, this[input], value);
|
|
534
528
|
if (input === 'fillMode') {
|
|
535
|
-
this.handleThemeColor(this.themeColor
|
|
529
|
+
this.handleThemeColor(this.themeColor);
|
|
536
530
|
}
|
|
537
531
|
if (classes.toRemove) {
|
|
538
532
|
this.renderer.removeClass(elem, classes.toRemove);
|
|
@@ -541,16 +535,14 @@ class ButtonComponent {
|
|
|
541
535
|
this.renderer.addClass(elem, classes.toAdd);
|
|
542
536
|
}
|
|
543
537
|
}
|
|
544
|
-
handleThemeColor(value
|
|
538
|
+
handleThemeColor(value) {
|
|
545
539
|
const elem = this.element;
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
if (
|
|
551
|
-
|
|
552
|
-
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
553
|
-
}
|
|
540
|
+
const themeColorClass = getThemeColorClasses('button', this.themeColor, value);
|
|
541
|
+
if (themeColorClass.toRemove) {
|
|
542
|
+
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
543
|
+
}
|
|
544
|
+
if (themeColorClass.toAdd) {
|
|
545
|
+
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
554
546
|
}
|
|
555
547
|
}
|
|
556
548
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: KendoButtonService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -586,7 +578,7 @@ class ButtonComponent {
|
|
|
586
578
|
[svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
|
|
587
579
|
</span>
|
|
588
580
|
}
|
|
589
|
-
|
|
581
|
+
|
|
590
582
|
`, 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"] }] });
|
|
591
583
|
}
|
|
592
584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
@@ -627,7 +619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
627
619
|
[svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
|
|
628
620
|
</span>
|
|
629
621
|
}
|
|
630
|
-
|
|
622
|
+
|
|
631
623
|
`,
|
|
632
624
|
standalone: true,
|
|
633
625
|
imports: [IconWrapperComponent, NgClass]
|
|
@@ -1041,10 +1033,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1041
1033
|
args: ['attr.tabindex']
|
|
1042
1034
|
}] } });
|
|
1043
1035
|
|
|
1044
|
-
const DEFAULT_SIZE$2 = 'medium';
|
|
1045
|
-
const DEFAULT_ROUNDED$3 = 'medium';
|
|
1046
|
-
const DEFAULT_THEME_COLOR$2 = 'base';
|
|
1047
|
-
const DEFAULT_FILL_MODE$3 = 'solid';
|
|
1048
1036
|
/**
|
|
1049
1037
|
* Displays a Chip that represents an input, attribute, or action.
|
|
1050
1038
|
*
|
|
@@ -1068,8 +1056,8 @@ class ChipComponent {
|
|
|
1068
1056
|
*/
|
|
1069
1057
|
icon;
|
|
1070
1058
|
/**
|
|
1071
|
-
* Defines an [`SVGIcon`](
|
|
1072
|
-
* a [`KendoSVGIcon`](
|
|
1059
|
+
* Defines an [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) to render inside the Chip using
|
|
1060
|
+
* a [`KendoSVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgiconcomponent) component.
|
|
1073
1061
|
*/
|
|
1074
1062
|
svgIcon;
|
|
1075
1063
|
/**
|
|
@@ -1094,7 +1082,7 @@ class ChipComponent {
|
|
|
1094
1082
|
removable = false;
|
|
1095
1083
|
/**
|
|
1096
1084
|
* Specifies a custom remove font icon class to render when the Chip is removable.
|
|
1097
|
-
* [see example](
|
|
1085
|
+
* [see example](https://www.telerik.com/kendo-angular-ui/components/styling/icons)
|
|
1098
1086
|
*/
|
|
1099
1087
|
removeIcon;
|
|
1100
1088
|
/**
|
|
@@ -1126,45 +1114,34 @@ class ChipComponent {
|
|
|
1126
1114
|
disabled = false;
|
|
1127
1115
|
/**
|
|
1128
1116
|
* Sets the padding of the Chip.
|
|
1129
|
-
* See [Chip Appearance](
|
|
1130
|
-
*
|
|
1131
|
-
* @default 'medium'
|
|
1117
|
+
* See [Chip Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/chip/appearance#size). The default value is set by the Kendo theme.
|
|
1132
1118
|
*/
|
|
1133
1119
|
set size(size) {
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
}
|
|
1138
|
-
this.handleClasses(newSize, 'size');
|
|
1139
|
-
this._size = newSize;
|
|
1120
|
+
!this.sizeIsSet && (this.sizeIsSet = true);
|
|
1121
|
+
this.handleClasses(size, 'size');
|
|
1122
|
+
this._size = size;
|
|
1140
1123
|
}
|
|
1141
1124
|
get size() {
|
|
1142
1125
|
return this._size;
|
|
1143
1126
|
}
|
|
1144
1127
|
/**
|
|
1145
1128
|
* Sets the border radius of the Chip.
|
|
1146
|
-
* See [Chip Appearance](
|
|
1147
|
-
*
|
|
1148
|
-
* @default 'medium'
|
|
1129
|
+
* See [Chip Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/chip/appearance#roundness). The default value is set by the Kendo theme.
|
|
1149
1130
|
*/
|
|
1150
1131
|
set rounded(rounded) {
|
|
1151
|
-
|
|
1152
|
-
this.
|
|
1153
|
-
this._rounded = newRounded;
|
|
1132
|
+
this.handleClasses(rounded, 'rounded');
|
|
1133
|
+
this._rounded = rounded;
|
|
1154
1134
|
}
|
|
1155
1135
|
get rounded() {
|
|
1156
1136
|
return this._rounded;
|
|
1157
1137
|
}
|
|
1158
1138
|
/**
|
|
1159
1139
|
* Sets the background and border styles of the Chip.
|
|
1160
|
-
* See [Chip Appearance](
|
|
1161
|
-
*
|
|
1162
|
-
* @default 'solid'
|
|
1140
|
+
* See [Chip Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/chip/appearance#fill-mode). The default value is set by the Kendo theme.
|
|
1163
1141
|
*/
|
|
1164
1142
|
set fillMode(fillMode) {
|
|
1165
|
-
|
|
1166
|
-
this.
|
|
1167
|
-
this._fillMode = newFillMode;
|
|
1143
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
1144
|
+
this._fillMode = fillMode;
|
|
1168
1145
|
}
|
|
1169
1146
|
get fillMode() {
|
|
1170
1147
|
return this._fillMode;
|
|
@@ -1172,14 +1149,11 @@ class ChipComponent {
|
|
|
1172
1149
|
/**
|
|
1173
1150
|
* Sets a predefined theme color for the Chip.
|
|
1174
1151
|
* The theme color applies as a background and border color and adjusts the text color.
|
|
1175
|
-
* See [Chip Appearance](
|
|
1176
|
-
*
|
|
1177
|
-
* @default 'base'
|
|
1152
|
+
* See [Chip Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/chip/appearance#theme-colors). The default value is set by the Kendo theme.
|
|
1178
1153
|
*/
|
|
1179
1154
|
set themeColor(themeColor) {
|
|
1180
|
-
|
|
1181
|
-
this.
|
|
1182
|
-
this._themeColor = newThemeColor;
|
|
1155
|
+
this.handleThemeColor(themeColor);
|
|
1156
|
+
this._themeColor = themeColor;
|
|
1183
1157
|
}
|
|
1184
1158
|
get themeColor() {
|
|
1185
1159
|
return this._themeColor;
|
|
@@ -1228,10 +1202,10 @@ class ChipComponent {
|
|
|
1228
1202
|
* @hidden
|
|
1229
1203
|
*/
|
|
1230
1204
|
sizeIsSet = false;
|
|
1231
|
-
_size =
|
|
1232
|
-
_rounded =
|
|
1233
|
-
_fillMode =
|
|
1234
|
-
_themeColor =
|
|
1205
|
+
_size = undefined;
|
|
1206
|
+
_rounded = undefined;
|
|
1207
|
+
_fillMode = undefined;
|
|
1208
|
+
_themeColor = undefined;
|
|
1235
1209
|
focused = false;
|
|
1236
1210
|
subs = new Subscription();
|
|
1237
1211
|
constructor(element, renderer, ngZone, localizationService) {
|
|
@@ -1260,10 +1234,6 @@ class ChipComponent {
|
|
|
1260
1234
|
}
|
|
1261
1235
|
ngAfterViewInit() {
|
|
1262
1236
|
const chip = this.element.nativeElement;
|
|
1263
|
-
const stylingOptions = ['size', 'rounded', 'fillMode'];
|
|
1264
|
-
stylingOptions.forEach(input => {
|
|
1265
|
-
this.handleClasses(this[input], input);
|
|
1266
|
-
});
|
|
1267
1237
|
this.attachElementEventHandlers(chip);
|
|
1268
1238
|
}
|
|
1269
1239
|
/**
|
|
@@ -1352,7 +1322,7 @@ class ChipComponent {
|
|
|
1352
1322
|
const elem = this.element.nativeElement;
|
|
1353
1323
|
const classes = getStylingClasses('chip', input, this[input], value);
|
|
1354
1324
|
if (input === 'fillMode') {
|
|
1355
|
-
this.handleThemeColor(this.themeColor
|
|
1325
|
+
this.handleThemeColor(this.themeColor);
|
|
1356
1326
|
}
|
|
1357
1327
|
if (classes.toRemove) {
|
|
1358
1328
|
this.renderer.removeClass(elem, classes.toRemove);
|
|
@@ -1361,16 +1331,14 @@ class ChipComponent {
|
|
|
1361
1331
|
this.renderer.addClass(elem, classes.toAdd);
|
|
1362
1332
|
}
|
|
1363
1333
|
}
|
|
1364
|
-
handleThemeColor(value
|
|
1334
|
+
handleThemeColor(value) {
|
|
1365
1335
|
const elem = this.element.nativeElement;
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1372
|
-
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
1373
|
-
}
|
|
1336
|
+
const themeColorClass = getThemeColorClasses('chip', this.themeColor, value);
|
|
1337
|
+
if (themeColorClass.toRemove) {
|
|
1338
|
+
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
1339
|
+
}
|
|
1340
|
+
if (themeColorClass.toAdd) {
|
|
1341
|
+
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
1374
1342
|
}
|
|
1375
1343
|
}
|
|
1376
1344
|
keyDownHandler(e) {
|
|
@@ -1406,7 +1374,7 @@ class ChipComponent {
|
|
|
1406
1374
|
[name]="icon"
|
|
1407
1375
|
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
1408
1376
|
}
|
|
1409
|
-
|
|
1377
|
+
|
|
1410
1378
|
@if (iconClass) {
|
|
1411
1379
|
<kendo-icon-wrapper
|
|
1412
1380
|
size="small"
|
|
@@ -1427,7 +1395,7 @@ class ChipComponent {
|
|
|
1427
1395
|
}
|
|
1428
1396
|
</span>
|
|
1429
1397
|
}
|
|
1430
|
-
|
|
1398
|
+
|
|
1431
1399
|
<span class="k-chip-content">
|
|
1432
1400
|
@if (label) {
|
|
1433
1401
|
<span class="k-chip-label">
|
|
@@ -1438,7 +1406,7 @@ class ChipComponent {
|
|
|
1438
1406
|
<ng-content></ng-content>
|
|
1439
1407
|
}
|
|
1440
1408
|
</span>
|
|
1441
|
-
|
|
1409
|
+
|
|
1442
1410
|
@if (hasMenu || removable) {
|
|
1443
1411
|
<span class="k-chip-actions">
|
|
1444
1412
|
@if (hasMenu) {
|
|
@@ -1477,7 +1445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1477
1445
|
[name]="icon"
|
|
1478
1446
|
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
1479
1447
|
}
|
|
1480
|
-
|
|
1448
|
+
|
|
1481
1449
|
@if (iconClass) {
|
|
1482
1450
|
<kendo-icon-wrapper
|
|
1483
1451
|
size="small"
|
|
@@ -1498,7 +1466,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1498
1466
|
}
|
|
1499
1467
|
</span>
|
|
1500
1468
|
}
|
|
1501
|
-
|
|
1469
|
+
|
|
1502
1470
|
<span class="k-chip-content">
|
|
1503
1471
|
@if (label) {
|
|
1504
1472
|
<span class="k-chip-label">
|
|
@@ -1509,7 +1477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1509
1477
|
<ng-content></ng-content>
|
|
1510
1478
|
}
|
|
1511
1479
|
</span>
|
|
1512
|
-
|
|
1480
|
+
|
|
1513
1481
|
@if (hasMenu || removable) {
|
|
1514
1482
|
<span class="k-chip-actions">
|
|
1515
1483
|
@if (hasMenu) {
|
|
@@ -1646,15 +1614,12 @@ class ChipListComponent {
|
|
|
1646
1614
|
selection = 'none';
|
|
1647
1615
|
/**
|
|
1648
1616
|
* Sets the gap between the Chips in the ChipList.
|
|
1649
|
-
* See [ChipList Appearance](
|
|
1650
|
-
*
|
|
1651
|
-
* @default 'medium'
|
|
1617
|
+
* See [ChipList Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/chiplist/appearance#size). The default value is set by the Kendo theme.
|
|
1652
1618
|
*/
|
|
1653
1619
|
set size(size) {
|
|
1654
|
-
|
|
1655
|
-
this.
|
|
1656
|
-
this.
|
|
1657
|
-
this._size = sizeValue;
|
|
1620
|
+
this.handleClasses(size, 'size');
|
|
1621
|
+
this.chips?.forEach(chip => this.setChipSize(chip, size));
|
|
1622
|
+
this._size = size;
|
|
1658
1623
|
}
|
|
1659
1624
|
get size() {
|
|
1660
1625
|
return this._size;
|
|
@@ -1679,7 +1644,7 @@ class ChipListComponent {
|
|
|
1679
1644
|
*/
|
|
1680
1645
|
role = 'listbox';
|
|
1681
1646
|
dynamicRTLSubscription;
|
|
1682
|
-
_size =
|
|
1647
|
+
_size = undefined;
|
|
1683
1648
|
subs = new Subscription();
|
|
1684
1649
|
_navigable = true;
|
|
1685
1650
|
/**
|
|
@@ -1982,7 +1947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1982
1947
|
* </kendo-dropdownbutton>
|
|
1983
1948
|
* ```
|
|
1984
1949
|
*
|
|
1985
|
-
* For more examples, refer to the article on the [DropDownButton templates](
|
|
1950
|
+
* For more examples, refer to the article on the [DropDownButton templates](https://www.telerik.com/kendo-angular-ui/components/buttons/dropdownbutton/items-and-templates).
|
|
1986
1951
|
*/
|
|
1987
1952
|
class ButtonItemTemplateDirective {
|
|
1988
1953
|
templateRef;
|
|
@@ -2843,7 +2808,6 @@ const NAVIGATION_SETTINGS_PROVIDER$2 = {
|
|
|
2843
2808
|
provide: NAVIGATION_CONFIG,
|
|
2844
2809
|
useValue: NAVIGATION_SETTINGS$2
|
|
2845
2810
|
};
|
|
2846
|
-
const DEFAULT_FILL_MODE$2 = 'solid';
|
|
2847
2811
|
/**
|
|
2848
2812
|
* Represents the Kendo UI DropDownButton component for Angular.
|
|
2849
2813
|
*
|
|
@@ -2883,7 +2847,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2883
2847
|
*/
|
|
2884
2848
|
icon = '';
|
|
2885
2849
|
/**
|
|
2886
|
-
* Specifies an [`SVGIcon`](
|
|
2850
|
+
* Specifies an [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) to render within the button.
|
|
2887
2851
|
*/
|
|
2888
2852
|
svgIcon;
|
|
2889
2853
|
/**
|
|
@@ -2909,18 +2873,15 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2909
2873
|
return this._data;
|
|
2910
2874
|
}
|
|
2911
2875
|
/**
|
|
2912
|
-
* Specifies the padding of the DropDownButton. See [DropDownButton Appearance](
|
|
2913
|
-
* @default 'medium'
|
|
2876
|
+
* 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.
|
|
2914
2877
|
*/
|
|
2915
|
-
size =
|
|
2878
|
+
size = undefined;
|
|
2916
2879
|
/**
|
|
2917
|
-
* Specifies the border radius of the DropDownButton. See [DropDownButton Appearance](
|
|
2918
|
-
* @default 'medium'
|
|
2880
|
+
* 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.
|
|
2919
2881
|
*/
|
|
2920
|
-
rounded =
|
|
2882
|
+
rounded = undefined;
|
|
2921
2883
|
/**
|
|
2922
|
-
* Specifies the background and border styles of the DropDownButton. See [DropDownButton Appearance](
|
|
2923
|
-
* @default 'solid'
|
|
2884
|
+
* 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.
|
|
2924
2885
|
*/
|
|
2925
2886
|
set fillMode(fillMode) {
|
|
2926
2887
|
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
@@ -2929,10 +2890,9 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2929
2890
|
return this._fillMode;
|
|
2930
2891
|
}
|
|
2931
2892
|
/**
|
|
2932
|
-
* Specifies predefined theme colors for the DropDownButton. See [DropDownButton Appearance](
|
|
2933
|
-
* @default 'base'
|
|
2893
|
+
* Specifies predefined theme colors for the DropDownButton. See [DropDownButton Appearance](https://www.telerik.com/kendo-angular-ui/components/buttons/dropdownbutton/appearance#theme-colors).
|
|
2934
2894
|
*/
|
|
2935
|
-
themeColor =
|
|
2895
|
+
themeColor = undefined;
|
|
2936
2896
|
/**
|
|
2937
2897
|
* Sets attributes for the main button.
|
|
2938
2898
|
*/
|
|
@@ -2971,7 +2931,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2971
2931
|
return this._active;
|
|
2972
2932
|
}
|
|
2973
2933
|
itemTemplate;
|
|
2974
|
-
_fillMode =
|
|
2934
|
+
_fillMode = undefined;
|
|
2975
2935
|
_buttonAttributes = null;
|
|
2976
2936
|
documentMouseUpSub;
|
|
2977
2937
|
/**
|
|
@@ -3144,7 +3104,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
3144
3104
|
[size]="size"
|
|
3145
3105
|
[rounded]="rounded"
|
|
3146
3106
|
[fillMode]="fillMode"
|
|
3147
|
-
[themeColor]="
|
|
3107
|
+
[themeColor]="themeColor"
|
|
3148
3108
|
(click)="openPopup()"
|
|
3149
3109
|
(focus)="handleFocus($event)"
|
|
3150
3110
|
(blur)="onButtonBlur()"
|
|
@@ -3206,7 +3166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3206
3166
|
[size]="size"
|
|
3207
3167
|
[rounded]="rounded"
|
|
3208
3168
|
[fillMode]="fillMode"
|
|
3209
|
-
[themeColor]="
|
|
3169
|
+
[themeColor]="themeColor"
|
|
3210
3170
|
(click)="openPopup()"
|
|
3211
3171
|
(focus)="handleFocus($event)"
|
|
3212
3172
|
(blur)="onButtonBlur()"
|
|
@@ -3362,7 +3322,7 @@ function closeAnimation(animationSettings) {
|
|
|
3362
3322
|
/**
|
|
3363
3323
|
* Represents a template that defines the content of a dial item.
|
|
3364
3324
|
* To define the template, nest an `<ng-template>` tag with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
3365
|
-
*([see example](
|
|
3325
|
+
*([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/templates#dial-item-template)).
|
|
3366
3326
|
*
|
|
3367
3327
|
* @example
|
|
3368
3328
|
* ```html
|
|
@@ -3395,7 +3355,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3395
3355
|
* Represents a template that defines the content of the FloatingActionButton.
|
|
3396
3356
|
* To define the template, nest an `<ng-template>` tag with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
3397
3357
|
*
|
|
3398
|
-
* ([see example](
|
|
3358
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/templates#floatingactionbutton-template)).
|
|
3399
3359
|
*
|
|
3400
3360
|
* @example
|
|
3401
3361
|
* ```html
|
|
@@ -3679,15 +3639,13 @@ const ROUNDED_CLASSES = {
|
|
|
3679
3639
|
small: 'k-rounded-sm',
|
|
3680
3640
|
medium: 'k-rounded-md',
|
|
3681
3641
|
large: 'k-rounded-lg',
|
|
3682
|
-
full: 'k-rounded-full'
|
|
3642
|
+
full: 'k-rounded-full',
|
|
3643
|
+
none: 'k-rounded-none'
|
|
3683
3644
|
};
|
|
3684
|
-
const
|
|
3645
|
+
const THEME_COLOR_PREFIX = 'k-fab';
|
|
3685
3646
|
const DEFAULT_DURATION = 180;
|
|
3686
3647
|
const DEFAULT_ITEM_GAP = 90;
|
|
3687
3648
|
const DEFAULT_OFFSET = '16px';
|
|
3688
|
-
const DEFAULT_ROUNDED$2 = 'full';
|
|
3689
|
-
const DEFAULT_SIZE$1 = 'medium';
|
|
3690
|
-
const DEFAULT_THEME_COLOR$1 = 'primary';
|
|
3691
3649
|
/**
|
|
3692
3650
|
* Represents the Kendo UI FloatingActionButton component for Angular.
|
|
3693
3651
|
* Use it to represent the primary or most common action in an application.
|
|
@@ -3722,38 +3680,31 @@ class FloatingActionButtonComponent {
|
|
|
3722
3680
|
dialItemTemplate;
|
|
3723
3681
|
fabTemplate;
|
|
3724
3682
|
/**
|
|
3725
|
-
* Specifies the theme color of the FloatingActionButton ([see example](
|
|
3726
|
-
* @default "primary"
|
|
3683
|
+
* Specifies the theme color of the FloatingActionButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/appearance#theme-colors)). The default value is set by the Kendo theme.
|
|
3727
3684
|
*/
|
|
3728
3685
|
set themeColor(themeColor) {
|
|
3729
|
-
|
|
3730
|
-
this.
|
|
3731
|
-
this._themeColor = newThemeColor;
|
|
3686
|
+
this.handleClasses(themeColor, 'themeColor');
|
|
3687
|
+
this._themeColor = themeColor;
|
|
3732
3688
|
}
|
|
3733
3689
|
get themeColor() {
|
|
3734
3690
|
return this._themeColor;
|
|
3735
3691
|
}
|
|
3736
3692
|
/**
|
|
3737
|
-
* Specifies the size of the FloatingActionButton ([see example](
|
|
3738
|
-
* @default "medium"
|
|
3693
|
+
* Specifies the size of the FloatingActionButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/appearance#size)). The default value is set by the Kendo theme.
|
|
3739
3694
|
*/
|
|
3740
3695
|
set size(size) {
|
|
3741
|
-
|
|
3742
|
-
this.
|
|
3743
|
-
this._size = newSize;
|
|
3696
|
+
this.handleClasses(size, 'size');
|
|
3697
|
+
this._size = size;
|
|
3744
3698
|
}
|
|
3745
3699
|
get size() {
|
|
3746
3700
|
return this._size;
|
|
3747
3701
|
}
|
|
3748
3702
|
/**
|
|
3749
|
-
* Specifies the border radius of the FloatingActionButton ([see example](
|
|
3750
|
-
*
|
|
3751
|
-
* @default "full"
|
|
3703
|
+
* Specifies the border radius of the FloatingActionButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/appearance#roundness)). The default value is set by the Kendo theme.
|
|
3752
3704
|
*/
|
|
3753
3705
|
set rounded(rounded) {
|
|
3754
|
-
|
|
3755
|
-
this.
|
|
3756
|
-
this._rounded = newRounded;
|
|
3706
|
+
this.handleClasses(rounded, 'rounded');
|
|
3707
|
+
this._rounded = rounded;
|
|
3757
3708
|
}
|
|
3758
3709
|
get rounded() {
|
|
3759
3710
|
return this._rounded;
|
|
@@ -3769,7 +3720,7 @@ class FloatingActionButtonComponent {
|
|
|
3769
3720
|
return this._disabled;
|
|
3770
3721
|
}
|
|
3771
3722
|
/**
|
|
3772
|
-
* Specifies the alignment of the FloatingActionButton ([see example](
|
|
3723
|
+
* Specifies the alignment of the FloatingActionButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/positioning#alignment)).
|
|
3773
3724
|
* @default { horizontal: 'end', vertical: 'top' }
|
|
3774
3725
|
*/
|
|
3775
3726
|
set align(align) {
|
|
@@ -3779,7 +3730,7 @@ class FloatingActionButtonComponent {
|
|
|
3779
3730
|
return this._align;
|
|
3780
3731
|
}
|
|
3781
3732
|
/**
|
|
3782
|
-
* Specifies the offset position of the FloatingActionButton ([see example](
|
|
3733
|
+
* Specifies the offset position of the FloatingActionButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/positioning#offset)).
|
|
3783
3734
|
* @default { x: '16px', y: '16px' }
|
|
3784
3735
|
*/
|
|
3785
3736
|
set offset(offset) {
|
|
@@ -3790,7 +3741,7 @@ class FloatingActionButtonComponent {
|
|
|
3790
3741
|
return this._offset;
|
|
3791
3742
|
}
|
|
3792
3743
|
/**
|
|
3793
|
-
* Specifies the position mode of the FloatingActionButton ([see example](
|
|
3744
|
+
* Specifies the position mode of the FloatingActionButton ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/positioning#position-mode)).
|
|
3794
3745
|
* @default "fixed"
|
|
3795
3746
|
*/
|
|
3796
3747
|
positionMode = 'fixed';
|
|
@@ -3799,7 +3750,7 @@ class FloatingActionButtonComponent {
|
|
|
3799
3750
|
*/
|
|
3800
3751
|
icon;
|
|
3801
3752
|
/**
|
|
3802
|
-
* Defines an [`SVGIcon`](
|
|
3753
|
+
* Defines an [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) to be rendered within the FloatingActionButton.
|
|
3803
3754
|
*/
|
|
3804
3755
|
svgIcon;
|
|
3805
3756
|
/**
|
|
@@ -3848,12 +3799,12 @@ class FloatingActionButtonComponent {
|
|
|
3848
3799
|
dialItemClick = new EventEmitter();
|
|
3849
3800
|
/**
|
|
3850
3801
|
* Fires when the popup is about to open. This event is preventable
|
|
3851
|
-
* ([more information and example](
|
|
3802
|
+
* ([more information and example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/events)).
|
|
3852
3803
|
*/
|
|
3853
3804
|
open = new EventEmitter();
|
|
3854
3805
|
/**
|
|
3855
3806
|
* Fires when the popup is about to close. This event is preventable
|
|
3856
|
-
* ([more information and example](
|
|
3807
|
+
* ([more information and example](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/events)).
|
|
3857
3808
|
*/
|
|
3858
3809
|
close = new EventEmitter();
|
|
3859
3810
|
/**
|
|
@@ -3870,9 +3821,9 @@ class FloatingActionButtonComponent {
|
|
|
3870
3821
|
* @hidden
|
|
3871
3822
|
*/
|
|
3872
3823
|
dialListId = `k-dial-list-${guid()}`;
|
|
3873
|
-
_themeColor =
|
|
3874
|
-
_size =
|
|
3875
|
-
_rounded =
|
|
3824
|
+
_themeColor = undefined;
|
|
3825
|
+
_size = undefined;
|
|
3826
|
+
_rounded = undefined;
|
|
3876
3827
|
_disabled = false;
|
|
3877
3828
|
_align = { horizontal: 'end', vertical: 'bottom' };
|
|
3878
3829
|
_offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
|
|
@@ -3939,7 +3890,7 @@ class FloatingActionButtonComponent {
|
|
|
3939
3890
|
* Toggles the visibility of the FloatingActionButton dial items popup.
|
|
3940
3891
|
*
|
|
3941
3892
|
* If you use the `toggleDial` method to open or close the dial items,
|
|
3942
|
-
* the `open` and `close` events do not fire ([more information and examples](
|
|
3893
|
+
* the `open` and `close` events do not fire ([more information and examples](https://www.telerik.com/kendo-angular-ui/components/buttons/floatingactionbutton/open_state)).
|
|
3943
3894
|
*
|
|
3944
3895
|
* @param open - The state of dial items popup.
|
|
3945
3896
|
*/
|
|
@@ -4129,12 +4080,12 @@ class FloatingActionButtonComponent {
|
|
|
4129
4080
|
if (isPresent(this.button) && (this[input] !== inputValue || this.initialSetup)) {
|
|
4130
4081
|
const button = this.button.nativeElement;
|
|
4131
4082
|
const classesToRemove = {
|
|
4132
|
-
themeColor: `${
|
|
4083
|
+
themeColor: `${THEME_COLOR_PREFIX}-${this.themeColor}`,
|
|
4133
4084
|
size: SIZE_CLASSES[this.size],
|
|
4134
4085
|
rounded: ROUNDED_CLASSES[this.rounded]
|
|
4135
4086
|
};
|
|
4136
4087
|
const classesToAdd = {
|
|
4137
|
-
themeColor: inputValue
|
|
4088
|
+
themeColor: inputValue ? `${THEME_COLOR_PREFIX}-${inputValue}` : '',
|
|
4138
4089
|
size: SIZE_CLASSES[inputValue],
|
|
4139
4090
|
rounded: ROUNDED_CLASSES[inputValue]
|
|
4140
4091
|
};
|
|
@@ -4375,20 +4326,20 @@ class FloatingActionButtonComponent {
|
|
|
4375
4326
|
}
|
|
4376
4327
|
], queries: [{ propertyName: "dialItemTemplate", first: true, predicate: DialItemTemplateDirective, descendants: true }, { propertyName: "fabTemplate", first: true, predicate: FloatingActionButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
4377
4328
|
<button
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4329
|
+
#button
|
|
4330
|
+
[attr.id]="id"
|
|
4331
|
+
[tabIndex]="componentTabIndex"
|
|
4332
|
+
type="button"
|
|
4333
|
+
class="k-fab"
|
|
4334
|
+
[class.k-disabled]="disabled"
|
|
4335
|
+
[ngClass]="buttonClass"
|
|
4336
|
+
[disabled]="disabled"
|
|
4337
|
+
[attr.aria-disabled]="disabled"
|
|
4338
|
+
[attr.aria-expanded]="ariaExpanded"
|
|
4339
|
+
[attr.aria-haspopup]="ariaHasPopup"
|
|
4340
|
+
[attr.aria-controls]="ariaControls"
|
|
4341
|
+
(focus)="focusHandler()"
|
|
4342
|
+
(blur)="blurHandler($event)"
|
|
4392
4343
|
[kendoEventsOutsideAngular]="{
|
|
4393
4344
|
keydown: keyDownHandler,
|
|
4394
4345
|
click: clickHandler,
|
|
@@ -4402,7 +4353,7 @@ class FloatingActionButtonComponent {
|
|
|
4402
4353
|
>
|
|
4403
4354
|
</ng-template>
|
|
4404
4355
|
}
|
|
4405
|
-
|
|
4356
|
+
|
|
4406
4357
|
@if (!fabTemplate) {
|
|
4407
4358
|
@if (icon || iconClass || svgIcon) {
|
|
4408
4359
|
<kendo-icon-wrapper
|
|
@@ -4416,7 +4367,7 @@ class FloatingActionButtonComponent {
|
|
|
4416
4367
|
}
|
|
4417
4368
|
}
|
|
4418
4369
|
</button>
|
|
4419
|
-
|
|
4370
|
+
|
|
4420
4371
|
<ng-template #popupTemplate>
|
|
4421
4372
|
<ul
|
|
4422
4373
|
kendoDialList
|
|
@@ -4453,20 +4404,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4453
4404
|
],
|
|
4454
4405
|
template: `
|
|
4455
4406
|
<button
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4407
|
+
#button
|
|
4408
|
+
[attr.id]="id"
|
|
4409
|
+
[tabIndex]="componentTabIndex"
|
|
4410
|
+
type="button"
|
|
4411
|
+
class="k-fab"
|
|
4412
|
+
[class.k-disabled]="disabled"
|
|
4413
|
+
[ngClass]="buttonClass"
|
|
4414
|
+
[disabled]="disabled"
|
|
4415
|
+
[attr.aria-disabled]="disabled"
|
|
4416
|
+
[attr.aria-expanded]="ariaExpanded"
|
|
4417
|
+
[attr.aria-haspopup]="ariaHasPopup"
|
|
4418
|
+
[attr.aria-controls]="ariaControls"
|
|
4419
|
+
(focus)="focusHandler()"
|
|
4420
|
+
(blur)="blurHandler($event)"
|
|
4470
4421
|
[kendoEventsOutsideAngular]="{
|
|
4471
4422
|
keydown: keyDownHandler,
|
|
4472
4423
|
click: clickHandler,
|
|
@@ -4480,7 +4431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4480
4431
|
>
|
|
4481
4432
|
</ng-template>
|
|
4482
4433
|
}
|
|
4483
|
-
|
|
4434
|
+
|
|
4484
4435
|
@if (!fabTemplate) {
|
|
4485
4436
|
@if (icon || iconClass || svgIcon) {
|
|
4486
4437
|
<kendo-icon-wrapper
|
|
@@ -4494,7 +4445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4494
4445
|
}
|
|
4495
4446
|
}
|
|
4496
4447
|
</button>
|
|
4497
|
-
|
|
4448
|
+
|
|
4498
4449
|
<ng-template #popupTemplate>
|
|
4499
4450
|
<ul
|
|
4500
4451
|
kendoDialList
|
|
@@ -4631,7 +4582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4631
4582
|
|
|
4632
4583
|
/**
|
|
4633
4584
|
* Represents a custom component for overriding the default SplitButton messages.
|
|
4634
|
-
* ([see example](
|
|
4585
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/globalization)).
|
|
4635
4586
|
*/
|
|
4636
4587
|
class SplitButtonCustomMessagesComponent extends Messages {
|
|
4637
4588
|
service;
|
|
@@ -4699,8 +4650,6 @@ const NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
4699
4650
|
provide: NAVIGATION_CONFIG,
|
|
4700
4651
|
useValue: NAVIGATION_SETTINGS
|
|
4701
4652
|
};
|
|
4702
|
-
const DEFAULT_ROUNDED$1 = 'medium';
|
|
4703
|
-
const DEFAULT_FILL_MODE$1 = 'solid';
|
|
4704
4653
|
/**
|
|
4705
4654
|
* Represents the Kendo UI SplitButton component for Angular.
|
|
4706
4655
|
*
|
|
@@ -4738,7 +4687,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
4738
4687
|
*/
|
|
4739
4688
|
text = '';
|
|
4740
4689
|
/**
|
|
4741
|
-
* Specifies an icon to display next to the button text ([see example](
|
|
4690
|
+
* Specifies an icon to display next to the button text ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/splitbutton/data-binding#arrays-of-complex-data)).
|
|
4742
4691
|
*/
|
|
4743
4692
|
icon = '';
|
|
4744
4693
|
/**
|
|
@@ -4746,7 +4695,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
4746
4695
|
*/
|
|
4747
4696
|
svgIcon;
|
|
4748
4697
|
/**
|
|
4749
|
-
* Specifies a custom CSS class for the icon displayed next to the button text ([see example](
|
|
4698
|
+
* Specifies a custom CSS class for the icon displayed next to the button text ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/splitbutton/data-binding#arrays-of-complex-data)).
|
|
4750
4699
|
*/
|
|
4751
4700
|
iconClass;
|
|
4752
4701
|
/**
|
|
@@ -4754,48 +4703,38 @@ class SplitButtonComponent extends ListButton {
|
|
|
4754
4703
|
*/
|
|
4755
4704
|
type = 'button';
|
|
4756
4705
|
/**
|
|
4757
|
-
* Specifies the URL of an image to display next to the button text ([see example](
|
|
4706
|
+
* Specifies the URL of an image to display next to the button text ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/splitbutton/data-binding#arrays-of-complex-data)).
|
|
4758
4707
|
*/
|
|
4759
4708
|
imageUrl = '';
|
|
4760
4709
|
/**
|
|
4761
|
-
* Configures the padding of the SplitButton ([see example](
|
|
4762
|
-
*
|
|
4763
|
-
* @default 'medium'
|
|
4710
|
+
* 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.
|
|
4764
4711
|
*/
|
|
4765
|
-
size =
|
|
4712
|
+
size = undefined;
|
|
4766
4713
|
/**
|
|
4767
|
-
* Configures the border radius of the SplitButton ([see example](
|
|
4768
|
-
*
|
|
4769
|
-
* @default 'medium'
|
|
4714
|
+
* 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.
|
|
4770
4715
|
*/
|
|
4771
4716
|
set rounded(rounded) {
|
|
4772
|
-
|
|
4773
|
-
this.
|
|
4774
|
-
this._rounded = newRounded;
|
|
4717
|
+
this.handleClasses(rounded, 'rounded');
|
|
4718
|
+
this._rounded = rounded;
|
|
4775
4719
|
}
|
|
4776
4720
|
get rounded() {
|
|
4777
4721
|
return this._rounded;
|
|
4778
4722
|
}
|
|
4779
4723
|
/**
|
|
4780
|
-
* Configures the background and border styles of the SplitButton ([see example](
|
|
4781
|
-
*
|
|
4782
|
-
* @default 'solid'
|
|
4724
|
+
* 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.
|
|
4783
4725
|
*/
|
|
4784
4726
|
set fillMode(fillMode) {
|
|
4785
|
-
|
|
4786
|
-
this._fillMode = fillMode === 'clear' ? 'flat' : newFillMode;
|
|
4727
|
+
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
4787
4728
|
}
|
|
4788
4729
|
get fillMode() {
|
|
4789
4730
|
return this._fillMode;
|
|
4790
4731
|
}
|
|
4791
4732
|
/**
|
|
4792
|
-
* Configures the theme color of the SplitButton. The theme color applies to the background, border, and text ([see example](
|
|
4793
|
-
*
|
|
4794
|
-
* @default 'base'
|
|
4733
|
+
* 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.
|
|
4795
4734
|
*/
|
|
4796
|
-
themeColor =
|
|
4735
|
+
themeColor = undefined;
|
|
4797
4736
|
/**
|
|
4798
|
-
* Disables the SplitButton when set to `true` ([see example](
|
|
4737
|
+
* 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)).
|
|
4799
4738
|
*/
|
|
4800
4739
|
set disabled(value) {
|
|
4801
4740
|
if (this.isOpen) {
|
|
@@ -4845,7 +4784,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
4845
4784
|
*/
|
|
4846
4785
|
arrowButtonIcon = 'caret-alt-down';
|
|
4847
4786
|
/**
|
|
4848
|
-
* Specifies the [`SVGIcon`](
|
|
4787
|
+
* Specifies the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgiconcomponent) displayed on the button that opens the popup.
|
|
4849
4788
|
*/
|
|
4850
4789
|
arrowButtonSvgIcon = caretAltDownIcon;
|
|
4851
4790
|
/**
|
|
@@ -4909,8 +4848,8 @@ class SplitButtonComponent extends ListButton {
|
|
|
4909
4848
|
}
|
|
4910
4849
|
buttonText = '';
|
|
4911
4850
|
arrowButtonClicked = false;
|
|
4912
|
-
_rounded =
|
|
4913
|
-
_fillMode =
|
|
4851
|
+
_rounded = undefined;
|
|
4852
|
+
_fillMode = undefined;
|
|
4914
4853
|
_buttonAttributes = null;
|
|
4915
4854
|
documentMouseUpSub;
|
|
4916
4855
|
set isFocused(value) {
|
|
@@ -5242,16 +5181,15 @@ class SplitButtonComponent extends ListButton {
|
|
|
5242
5181
|
></button>
|
|
5243
5182
|
<ng-template #popupTemplate>
|
|
5244
5183
|
<kendo-button-list
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
>
|
|
5184
|
+
[id]="listId"
|
|
5185
|
+
[data]="data"
|
|
5186
|
+
[textField]="textField"
|
|
5187
|
+
[itemTemplate]="itemTemplate"
|
|
5188
|
+
(onItemClick)="onItemClick($event)"
|
|
5189
|
+
(keydown)="keyDownHandler($event)"
|
|
5190
|
+
(keyup)="keyUpHandler($event)"
|
|
5191
|
+
[attr.dir]="dir"
|
|
5192
|
+
>
|
|
5255
5193
|
</kendo-button-list>
|
|
5256
5194
|
</ng-template>
|
|
5257
5195
|
<ng-container #container></ng-container>
|
|
@@ -5334,16 +5272,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5334
5272
|
></button>
|
|
5335
5273
|
<ng-template #popupTemplate>
|
|
5336
5274
|
<kendo-button-list
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
>
|
|
5275
|
+
[id]="listId"
|
|
5276
|
+
[data]="data"
|
|
5277
|
+
[textField]="textField"
|
|
5278
|
+
[itemTemplate]="itemTemplate"
|
|
5279
|
+
(onItemClick)="onItemClick($event)"
|
|
5280
|
+
(keydown)="keyDownHandler($event)"
|
|
5281
|
+
(keyup)="keyUpHandler($event)"
|
|
5282
|
+
[attr.dir]="dir"
|
|
5283
|
+
>
|
|
5347
5284
|
</kendo-button-list>
|
|
5348
5285
|
</ng-template>
|
|
5349
5286
|
<ng-container #container></ng-container>
|
|
@@ -5426,10 +5363,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5426
5363
|
args: ['keyup', ['$event']]
|
|
5427
5364
|
}] } });
|
|
5428
5365
|
|
|
5429
|
-
const DEFAULT_ROUNDED = 'medium';
|
|
5430
|
-
const DEFAULT_SIZE = 'medium';
|
|
5431
|
-
const DEFAULT_THEME_COLOR = 'base';
|
|
5432
|
-
const DEFAULT_FILL_MODE = 'solid';
|
|
5433
5366
|
/**
|
|
5434
5367
|
* Represents the Kendo UI SpeechToTextButton component for Angular.
|
|
5435
5368
|
*
|
|
@@ -5458,54 +5391,45 @@ class SpeechToTextButtonComponent {
|
|
|
5458
5391
|
return this.isDisabled;
|
|
5459
5392
|
}
|
|
5460
5393
|
/**
|
|
5461
|
-
* Sets the padding of the SpeechToTextButton.
|
|
5394
|
+
* Sets the padding of the SpeechToTextButton. The default value is set by the Kendo theme.
|
|
5462
5395
|
*
|
|
5463
|
-
* @default 'medium'
|
|
5464
5396
|
*/
|
|
5465
5397
|
set size(size) {
|
|
5466
|
-
|
|
5467
|
-
this.
|
|
5468
|
-
this._size = newSize;
|
|
5398
|
+
this.handleClasses(size, 'size');
|
|
5399
|
+
this._size = size;
|
|
5469
5400
|
}
|
|
5470
5401
|
get size() {
|
|
5471
5402
|
return this._size;
|
|
5472
5403
|
}
|
|
5473
5404
|
/**
|
|
5474
|
-
* Sets the border radius of the SpeechToTextButton.
|
|
5405
|
+
* Sets the border radius of the SpeechToTextButton. The default value is set by the Kendo theme.
|
|
5475
5406
|
*
|
|
5476
|
-
* @default 'medium'
|
|
5477
5407
|
*/
|
|
5478
5408
|
set rounded(rounded) {
|
|
5479
|
-
|
|
5480
|
-
this.
|
|
5481
|
-
this._rounded = newRounded;
|
|
5409
|
+
this.handleClasses(rounded, 'rounded');
|
|
5410
|
+
this._rounded = rounded;
|
|
5482
5411
|
}
|
|
5483
5412
|
get rounded() {
|
|
5484
5413
|
return this._rounded;
|
|
5485
5414
|
}
|
|
5486
5415
|
/**
|
|
5487
|
-
* Sets the background and border styles of the SpeechToTextButton.
|
|
5488
|
-
*
|
|
5489
|
-
* @default 'solid'
|
|
5416
|
+
* Sets the background and border styles of the SpeechToTextButton. The default value is set by the Kendo theme.
|
|
5490
5417
|
*/
|
|
5491
5418
|
set fillMode(fillMode) {
|
|
5492
|
-
|
|
5493
|
-
this.
|
|
5494
|
-
this._fillMode = newFillMode;
|
|
5419
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
5420
|
+
this._fillMode = fillMode;
|
|
5495
5421
|
}
|
|
5496
5422
|
get fillMode() {
|
|
5497
5423
|
return this._fillMode;
|
|
5498
5424
|
}
|
|
5499
5425
|
/**
|
|
5500
|
-
* Sets a predefined theme color for the SpeechToTextButton.
|
|
5501
|
-
* The theme color applies as a background and border color and adjusts the text color.
|
|
5426
|
+
* Sets a predefined theme color for the SpeechToTextButton. The default value is set by the Kendo theme.
|
|
5427
|
+
* The theme color applies as a background and border color and adjusts the text color for contrast.
|
|
5502
5428
|
*
|
|
5503
|
-
* @default 'base'
|
|
5504
5429
|
*/
|
|
5505
5430
|
set themeColor(themeColor) {
|
|
5506
|
-
|
|
5507
|
-
this.
|
|
5508
|
-
this._themeColor = newThemeColor;
|
|
5431
|
+
this.handleThemeColor(themeColor);
|
|
5432
|
+
this._themeColor = themeColor;
|
|
5509
5433
|
}
|
|
5510
5434
|
get themeColor() {
|
|
5511
5435
|
return this._themeColor;
|
|
@@ -5645,12 +5569,6 @@ class SpeechToTextButtonComponent {
|
|
|
5645
5569
|
}
|
|
5646
5570
|
}
|
|
5647
5571
|
}
|
|
5648
|
-
ngAfterViewInit() {
|
|
5649
|
-
const stylingOptions = ['size', 'rounded', 'fillMode'];
|
|
5650
|
-
stylingOptions.forEach(input => {
|
|
5651
|
-
this.handleClasses(this[input], input);
|
|
5652
|
-
});
|
|
5653
|
-
}
|
|
5654
5572
|
ngOnDestroy() {
|
|
5655
5573
|
this.destroyWebSpeech();
|
|
5656
5574
|
this.subs.unsubscribe();
|
|
@@ -5748,17 +5666,17 @@ class SpeechToTextButtonComponent {
|
|
|
5748
5666
|
microphoneSvgIcon = microphoneOutlineIcon;
|
|
5749
5667
|
stopSvgIcon = stopSmIcon;
|
|
5750
5668
|
speechRecognition;
|
|
5751
|
-
_size =
|
|
5752
|
-
_rounded =
|
|
5753
|
-
_fillMode =
|
|
5754
|
-
_themeColor =
|
|
5669
|
+
_size = undefined;
|
|
5670
|
+
_rounded = undefined;
|
|
5671
|
+
_fillMode = undefined;
|
|
5672
|
+
_themeColor = undefined;
|
|
5755
5673
|
_focused = false;
|
|
5756
5674
|
direction;
|
|
5757
5675
|
handleClasses(value, input) {
|
|
5758
5676
|
const elem = this.element;
|
|
5759
5677
|
const classes = getStylingClasses('button', input, this[input], value);
|
|
5760
5678
|
if (input === 'fillMode') {
|
|
5761
|
-
this.handleThemeColor(this.themeColor
|
|
5679
|
+
this.handleThemeColor(this.themeColor);
|
|
5762
5680
|
}
|
|
5763
5681
|
if (classes.toRemove) {
|
|
5764
5682
|
this.renderer.removeClass(elem, classes.toRemove);
|
|
@@ -5807,16 +5725,12 @@ class SpeechToTextButtonComponent {
|
|
|
5807
5725
|
toObservable(input) {
|
|
5808
5726
|
return input instanceof Observable ? input : from(input);
|
|
5809
5727
|
}
|
|
5810
|
-
handleThemeColor(value
|
|
5728
|
+
handleThemeColor(value) {
|
|
5811
5729
|
const elem = this.element;
|
|
5812
|
-
const
|
|
5813
|
-
const addFillMode = fillMode || this.fillMode;
|
|
5814
|
-
const themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
|
|
5730
|
+
const themeColorClass = getThemeColorClasses('button', this.themeColor, value);
|
|
5815
5731
|
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
5816
|
-
if (
|
|
5817
|
-
|
|
5818
|
-
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
5819
|
-
}
|
|
5732
|
+
if (themeColorClass.toAdd) {
|
|
5733
|
+
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
5820
5734
|
}
|
|
5821
5735
|
}
|
|
5822
5736
|
destroyWebSpeech() {
|
|
@@ -5943,152 +5857,878 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5943
5857
|
}] } });
|
|
5944
5858
|
|
|
5945
5859
|
/**
|
|
5946
|
-
*
|
|
5947
|
-
*
|
|
5948
|
-
* @example
|
|
5949
|
-
* ```typescript
|
|
5950
|
-
* @Component({
|
|
5951
|
-
* standalone: true,
|
|
5952
|
-
* imports: [KENDO_BUTTON],
|
|
5953
|
-
* // ...
|
|
5954
|
-
* })
|
|
5955
|
-
* export class MyComponent {}
|
|
5956
|
-
* ```
|
|
5860
|
+
* @hidden
|
|
5957
5861
|
*/
|
|
5958
|
-
const
|
|
5959
|
-
|
|
5960
|
-
|
|
5862
|
+
const DEFAULT_AI_REQUEST_OPTIONS = {
|
|
5863
|
+
headers: new HttpHeaders({
|
|
5864
|
+
'Content-Type': 'application/json'
|
|
5865
|
+
}),
|
|
5866
|
+
role: 'user',
|
|
5867
|
+
method: 'POST',
|
|
5868
|
+
responseType: 'json'
|
|
5869
|
+
};
|
|
5870
|
+
class SmartPasteRequestStartEvent extends PreventableEvent$1 {
|
|
5871
|
+
/**
|
|
5872
|
+
* Gets the request data to send to the AI service.
|
|
5873
|
+
*/
|
|
5874
|
+
requestData;
|
|
5875
|
+
constructor(requestData) {
|
|
5876
|
+
super();
|
|
5877
|
+
this.requestData = requestData;
|
|
5878
|
+
}
|
|
5879
|
+
}
|
|
5880
|
+
class SmartPasteRequestEndEvent extends PreventableEvent$1 {
|
|
5881
|
+
/**
|
|
5882
|
+
* Gets the HTTP response from the AI service.
|
|
5883
|
+
* Contains an error object when the request fails.
|
|
5884
|
+
*/
|
|
5885
|
+
response;
|
|
5886
|
+
constructor(response) {
|
|
5887
|
+
super();
|
|
5888
|
+
this.response = response;
|
|
5889
|
+
}
|
|
5890
|
+
}
|
|
5891
|
+
|
|
5961
5892
|
/**
|
|
5962
|
-
*
|
|
5893
|
+
* Checks if a field should be ignored during Smart Paste.
|
|
5963
5894
|
*
|
|
5964
|
-
* @
|
|
5965
|
-
* ```typescript
|
|
5966
|
-
* @Component({
|
|
5967
|
-
* standalone: true,
|
|
5968
|
-
* imports: [KENDO_BUTTONGROUP],
|
|
5969
|
-
* // ...
|
|
5970
|
-
* })
|
|
5971
|
-
* export class MyComponent {}
|
|
5972
|
-
* ```
|
|
5895
|
+
* @hidden
|
|
5973
5896
|
*/
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5897
|
+
function isFieldIgnored(element) {
|
|
5898
|
+
return element.hasAttribute('type') && element.type === 'hidden' ||
|
|
5899
|
+
element.hasAttribute('disabled') ||
|
|
5900
|
+
element.hasAttribute('readonly') ||
|
|
5901
|
+
(element.hasAttribute('aria-disabled') && element.getAttribute('aria-disabled') === 'true') ||
|
|
5902
|
+
(element.hasAttribute('aria-readonly') && element.getAttribute('aria-readonly') === 'true') ||
|
|
5903
|
+
(element.hasAttribute('aria-hidden') && element.getAttribute('aria-hidden') === 'true');
|
|
5904
|
+
}
|
|
5978
5905
|
/**
|
|
5979
|
-
*
|
|
5980
|
-
*
|
|
5981
|
-
* @example
|
|
5982
|
-
* ```typescript
|
|
5983
|
-
* @Component({
|
|
5984
|
-
* standalone: true,
|
|
5985
|
-
* imports: [KENDO_DROPDOWNBUTTON],
|
|
5986
|
-
* // ...
|
|
5987
|
-
* })
|
|
5988
|
-
* export class MyComponent {}
|
|
5989
|
-
* ```
|
|
5906
|
+
* @hidden
|
|
5990
5907
|
*/
|
|
5991
|
-
const
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5908
|
+
const getElementIdentifier = (element) => {
|
|
5909
|
+
if (!isDocumentAvailable()) {
|
|
5910
|
+
return null;
|
|
5911
|
+
}
|
|
5912
|
+
return element.getAttribute('formcontrolname') ||
|
|
5913
|
+
element.getAttribute('name') ||
|
|
5914
|
+
element.id;
|
|
5915
|
+
};
|
|
5995
5916
|
/**
|
|
5996
|
-
*
|
|
5917
|
+
* Specifies custom inputs (Kendo components) to include in Smart Paste.
|
|
5918
|
+
* Each custom input has an identifier used to detect the component.
|
|
5919
|
+
* Defaults to common Kendo UI components (DropDownList, ComboBox, AutoComplete, MultiSelect, DatePicker, etc.).
|
|
5997
5920
|
*
|
|
5998
|
-
* @
|
|
5999
|
-
* ```typescript
|
|
6000
|
-
* @Component({
|
|
6001
|
-
* standalone: true,
|
|
6002
|
-
* imports: [KENDO_CHIP],
|
|
6003
|
-
* // ...
|
|
6004
|
-
* })
|
|
6005
|
-
* export class MyComponent {}
|
|
6006
|
-
* ```
|
|
5921
|
+
* @hidden
|
|
6007
5922
|
*/
|
|
6008
|
-
const
|
|
6009
|
-
|
|
5923
|
+
const customInputs = [
|
|
5924
|
+
{ identifier: '.k-checkbox' },
|
|
5925
|
+
{ identifier: '.k-colorpalette' },
|
|
5926
|
+
{ identifier: '.k-colorgradient' },
|
|
5927
|
+
{ identifier: '.k-flatcolorpicker' },
|
|
5928
|
+
{ identifier: '.k-otp' },
|
|
5929
|
+
{ identifier: '.k-textbox' },
|
|
5930
|
+
{ identifier: '.k-radio' },
|
|
5931
|
+
{ identifier: '.k-slider' },
|
|
5932
|
+
{ identifier: '.k-rating' },
|
|
5933
|
+
{ identifier: '.k-signature' },
|
|
5934
|
+
{ identifier: '.k-switch' },
|
|
5935
|
+
{ identifier: '.k-textarea' },
|
|
5936
|
+
{ identifier: '.k-calendar' },
|
|
5937
|
+
{ identifier: '.k-timepicker' },
|
|
5938
|
+
{ identifier: '.k-dateinput' },
|
|
5939
|
+
{ identifier: '.k-datetimepicker' },
|
|
5940
|
+
{ identifier: '.k-dropdownlist' },
|
|
5941
|
+
{ identifier: '.k-combobox' },
|
|
5942
|
+
{ identifier: '.k-autocomplete' },
|
|
5943
|
+
{ identifier: '.k-multiselect' },
|
|
5944
|
+
{ identifier: '.k-datepicker' },
|
|
5945
|
+
{ identifier: '.k-numerictextbox' },
|
|
5946
|
+
{ identifier: '.k-maskedtextbox' },
|
|
5947
|
+
{ identifier: '.k-colorpicker' },
|
|
5948
|
+
{ identifier: '.k-dropdowntree' },
|
|
5949
|
+
{ identifier: '.k-multiselecttree' },
|
|
6010
5950
|
];
|
|
5951
|
+
const DATEPICKER_SELECTOR = '.k-datepicker';
|
|
5952
|
+
const TIMEPICKER_SELECTOR = '.k-timepicker';
|
|
5953
|
+
const DATETIMEPICKER_SELECTOR = '.k-datetimepicker';
|
|
5954
|
+
const DATERANGEPICKER_SELECTOR = '.k-daterangepicker';
|
|
5955
|
+
const CHECKBOX_SELECTOR = '.k-checkbox';
|
|
5956
|
+
const RADIO_SELECTOR = '.k-radio';
|
|
5957
|
+
const NUMERICTEXTBOX_SELECTOR = '.k-numerictextbox';
|
|
6011
5958
|
/**
|
|
6012
|
-
*
|
|
6013
|
-
*
|
|
6014
|
-
* @example
|
|
6015
|
-
* ```typescript
|
|
6016
|
-
* @Component({
|
|
6017
|
-
* standalone: true,
|
|
6018
|
-
* imports: [KENDO_CHIPLIST],
|
|
6019
|
-
* // ...
|
|
6020
|
-
* })
|
|
6021
|
-
* export class MyComponent {}
|
|
6022
|
-
* ```
|
|
5959
|
+
* @hidden
|
|
6023
5960
|
*/
|
|
6024
|
-
const
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
5961
|
+
const requiresDateValue = (element) => {
|
|
5962
|
+
const isDateInput = [DATEPICKER_SELECTOR, TIMEPICKER_SELECTOR, DATETIMEPICKER_SELECTOR, DATERANGEPICKER_SELECTOR];
|
|
5963
|
+
return isDateInput.some(selector => element.classList.contains(selector.slice(1)));
|
|
5964
|
+
};
|
|
6028
5965
|
/**
|
|
6029
|
-
*
|
|
6030
|
-
*
|
|
6031
|
-
* @example
|
|
6032
|
-
* ```typescript
|
|
6033
|
-
* @Component({
|
|
6034
|
-
* standalone: true,
|
|
6035
|
-
* imports: [KENDO_FLOATINGACTIONBUTTON],
|
|
6036
|
-
* // ...
|
|
6037
|
-
* })
|
|
6038
|
-
* export class MyComponent {}
|
|
6039
|
-
* ```
|
|
5966
|
+
* @hidden
|
|
6040
5967
|
*/
|
|
6041
|
-
const
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
];
|
|
5968
|
+
const requiresBooleanValue = (element) => {
|
|
5969
|
+
const isBooleanInput = [CHECKBOX_SELECTOR, RADIO_SELECTOR];
|
|
5970
|
+
return isBooleanInput.some(selector => element.classList.contains(selector.slice(1)));
|
|
5971
|
+
};
|
|
6046
5972
|
/**
|
|
6047
|
-
*
|
|
6048
|
-
*
|
|
6049
|
-
* @example
|
|
6050
|
-
* ```typescript
|
|
6051
|
-
* @Component({
|
|
6052
|
-
* standalone: true,
|
|
6053
|
-
* imports: [KENDO_SPLITBUTTON],
|
|
6054
|
-
* // ...
|
|
6055
|
-
* })
|
|
6056
|
-
* export class MyComponent {}
|
|
6057
|
-
* ```
|
|
5973
|
+
* @hidden
|
|
6058
5974
|
*/
|
|
6059
|
-
const
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
ButtonItemTemplateDirective
|
|
6064
|
-
];
|
|
5975
|
+
const requiresNumericValue = (element) => {
|
|
5976
|
+
const isNumericInput = [NUMERICTEXTBOX_SELECTOR];
|
|
5977
|
+
return isNumericInput.some(selector => element.classList.contains(selector.slice(1)));
|
|
5978
|
+
};
|
|
6065
5979
|
/**
|
|
6066
|
-
*
|
|
6067
|
-
*
|
|
6068
|
-
* @example
|
|
6069
|
-
* ```typescript
|
|
6070
|
-
* @Component({
|
|
6071
|
-
* standalone: true,
|
|
6072
|
-
* imports: [KENDO_SPEECHTOTEXTBUTTON],
|
|
6073
|
-
* // ...
|
|
6074
|
-
* })
|
|
6075
|
-
* export class MyComponent {}
|
|
6076
|
-
* ```
|
|
5980
|
+
* @hidden
|
|
6077
5981
|
*/
|
|
6078
|
-
const
|
|
6079
|
-
|
|
6080
|
-
|
|
5982
|
+
const populateCustomInputs = (element, value) => {
|
|
5983
|
+
const parseNumericValue = requiresNumericValue(element);
|
|
5984
|
+
if (parseNumericValue) {
|
|
5985
|
+
const numericValue = parseFloat(value);
|
|
5986
|
+
return !isNaN(numericValue) ? numericValue : null;
|
|
5987
|
+
}
|
|
5988
|
+
const parseBooleanValue = requiresBooleanValue(element);
|
|
5989
|
+
if (parseBooleanValue) {
|
|
5990
|
+
return value.toLowerCase() === 'true';
|
|
5991
|
+
}
|
|
5992
|
+
const parseDateValue = requiresDateValue(element);
|
|
5993
|
+
if (parseDateValue) {
|
|
5994
|
+
const dateValue = new Date(value);
|
|
5995
|
+
return !isNaN(dateValue.getTime()) ? dateValue : null;
|
|
5996
|
+
}
|
|
5997
|
+
return value;
|
|
5998
|
+
};
|
|
6081
5999
|
/**
|
|
6082
|
-
*
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
*
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6000
|
+
* @hidden
|
|
6001
|
+
*/
|
|
6002
|
+
const readClipboard = async () => {
|
|
6003
|
+
return await navigator.clipboard.readText();
|
|
6004
|
+
};
|
|
6005
|
+
/**
|
|
6006
|
+
* @hidden
|
|
6007
|
+
*/
|
|
6008
|
+
const sendSmartPasteRequest = (http, requestData) => {
|
|
6009
|
+
const body = {
|
|
6010
|
+
formFields: requestData.formFields,
|
|
6011
|
+
content: requestData.content
|
|
6012
|
+
};
|
|
6013
|
+
const request = new HttpRequest(requestData.requestOptions?.method || 'POST', requestData.url, body, requestData.requestOptions);
|
|
6014
|
+
return http.request(request).pipe(filter((event) => event.type === HttpEventType.Response));
|
|
6015
|
+
};
|
|
6016
|
+
|
|
6017
|
+
const DEFAULT_SVG_ICON = pasteSparkleIcon;
|
|
6018
|
+
const DEFAULT_ICON = 'paste-sparkle';
|
|
6019
|
+
/**
|
|
6020
|
+
* Represents the Kendo UI SmartPasteButton component for Angular.
|
|
6021
|
+
*
|
|
6022
|
+
* Fills form fields with AI-powered data extraction from clipboard content.
|
|
6023
|
+
*/
|
|
6024
|
+
class SmartPasteButtonComponent {
|
|
6025
|
+
renderer;
|
|
6026
|
+
ngZone;
|
|
6027
|
+
http;
|
|
6028
|
+
controlContainer;
|
|
6029
|
+
/**
|
|
6030
|
+
* Specifies the form controls to include in Smart Paste.
|
|
6031
|
+
* When not set, all form controls are included.
|
|
6032
|
+
*
|
|
6033
|
+
* @default null
|
|
6034
|
+
*/
|
|
6035
|
+
formFields = null;
|
|
6036
|
+
/**
|
|
6037
|
+
* When `true`, disables the SmartPasteButton and prevents user interaction.
|
|
6038
|
+
*
|
|
6039
|
+
* @default false
|
|
6040
|
+
*/
|
|
6041
|
+
set disabled(disabled) {
|
|
6042
|
+
if (disabled && isDocumentAvailable() && isFirefox(navigator.userAgent)) {
|
|
6043
|
+
this.blur();
|
|
6044
|
+
}
|
|
6045
|
+
this.isDisabled = disabled;
|
|
6046
|
+
this.renderer.setProperty(this.element, 'disabled', disabled);
|
|
6047
|
+
}
|
|
6048
|
+
get disabled() {
|
|
6049
|
+
return this.isDisabled;
|
|
6050
|
+
}
|
|
6051
|
+
/**
|
|
6052
|
+
* Sets the padding of the SmartPasteButton.
|
|
6053
|
+
*
|
|
6054
|
+
* @default undefined
|
|
6055
|
+
*/
|
|
6056
|
+
set size(size) {
|
|
6057
|
+
this.handleClasses(size, 'size');
|
|
6058
|
+
this._size = size;
|
|
6059
|
+
}
|
|
6060
|
+
get size() {
|
|
6061
|
+
return this._size;
|
|
6062
|
+
}
|
|
6063
|
+
/**
|
|
6064
|
+
* Sets the border radius of the SmartPasteButton.
|
|
6065
|
+
*
|
|
6066
|
+
* @default undefined
|
|
6067
|
+
*/
|
|
6068
|
+
set rounded(rounded) {
|
|
6069
|
+
this.handleClasses(rounded, 'rounded');
|
|
6070
|
+
this._rounded = rounded;
|
|
6071
|
+
}
|
|
6072
|
+
get rounded() {
|
|
6073
|
+
return this._rounded;
|
|
6074
|
+
}
|
|
6075
|
+
/**
|
|
6076
|
+
* Sets the background and border styles of the SmartPasteButton.
|
|
6077
|
+
*
|
|
6078
|
+
* @default undefined
|
|
6079
|
+
*/
|
|
6080
|
+
set fillMode(fillMode) {
|
|
6081
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
6082
|
+
this._fillMode = fillMode;
|
|
6083
|
+
}
|
|
6084
|
+
get fillMode() {
|
|
6085
|
+
return this._fillMode;
|
|
6086
|
+
}
|
|
6087
|
+
/**
|
|
6088
|
+
* Sets a predefined theme color for the SmartPasteButton.
|
|
6089
|
+
* The theme color applies as a background and border color and adjusts the text color.
|
|
6090
|
+
*
|
|
6091
|
+
* @default undefined
|
|
6092
|
+
*/
|
|
6093
|
+
set themeColor(themeColor) {
|
|
6094
|
+
this.handleThemeColor(themeColor);
|
|
6095
|
+
this._themeColor = themeColor;
|
|
6096
|
+
}
|
|
6097
|
+
get themeColor() {
|
|
6098
|
+
return this._themeColor;
|
|
6099
|
+
}
|
|
6100
|
+
/**
|
|
6101
|
+
* Sets an SVG icon to display inside the SmartPasteButton.
|
|
6102
|
+
*/
|
|
6103
|
+
set svgIcon(icon) {
|
|
6104
|
+
if (isDevMode() && icon && this.iconClass) {
|
|
6105
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
6106
|
+
}
|
|
6107
|
+
this._svgIcon = icon;
|
|
6108
|
+
}
|
|
6109
|
+
get svgIcon() {
|
|
6110
|
+
return this._svgIcon;
|
|
6111
|
+
}
|
|
6112
|
+
/**
|
|
6113
|
+
* Specifies a URL for an `img` element inside the SmartPasteButton.
|
|
6114
|
+
* The URL can be relative or absolute. When relative, the browser evaluates it relative to the web page URL.
|
|
6115
|
+
*/
|
|
6116
|
+
imageUrl;
|
|
6117
|
+
/**
|
|
6118
|
+
* Defines one or more CSS classes separated by spaces for a `span` element inside the SmartPasteButton.
|
|
6119
|
+
* Use `iconClass` to add custom icons.
|
|
6120
|
+
*/
|
|
6121
|
+
set iconClass(value) {
|
|
6122
|
+
const hasCustomIcon = this.icon !== DEFAULT_ICON || this.svgIcon !== DEFAULT_SVG_ICON;
|
|
6123
|
+
if (isDevMode() && value && hasCustomIcon) {
|
|
6124
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
6125
|
+
}
|
|
6126
|
+
if (!hasCustomIcon) {
|
|
6127
|
+
this._icon = null;
|
|
6128
|
+
this._svgIcon = null;
|
|
6129
|
+
}
|
|
6130
|
+
this._iconClass = value;
|
|
6131
|
+
}
|
|
6132
|
+
get iconClass() {
|
|
6133
|
+
return this._iconClass;
|
|
6134
|
+
}
|
|
6135
|
+
/**
|
|
6136
|
+
* Specifies the icon name to display in the SmartPasteButton.
|
|
6137
|
+
*
|
|
6138
|
+
* @default 'paste-sparkle'
|
|
6139
|
+
*/
|
|
6140
|
+
set icon(name) {
|
|
6141
|
+
if (isDevMode() && name && this.iconClass) {
|
|
6142
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
6143
|
+
}
|
|
6144
|
+
this._icon = name;
|
|
6145
|
+
}
|
|
6146
|
+
get icon() {
|
|
6147
|
+
return this._icon;
|
|
6148
|
+
}
|
|
6149
|
+
/**
|
|
6150
|
+
* Sets the URL to which Smart Paste sends the AI request.
|
|
6151
|
+
* When set, the component sends and handles an HTTP request automatically. Handle the `requestStart` event to modify request options before sending.
|
|
6152
|
+
* When not set, the component does not send an HTTP request. Handle the `requestStart` event to send and manage a custom HTTP request.
|
|
6153
|
+
*/
|
|
6154
|
+
requestUrl;
|
|
6155
|
+
/**
|
|
6156
|
+
* Configures the HTTP request options for the AI request.
|
|
6157
|
+
* Use this to customize headers, method, credentials, and other request settings.
|
|
6158
|
+
*/
|
|
6159
|
+
requestOptions;
|
|
6160
|
+
/**
|
|
6161
|
+
* Sets static form field metadata to bypass DOM extraction when Smart Paste runs.
|
|
6162
|
+
* Use this when you want to provide form field configuration directly instead of extracting it from the DOM.
|
|
6163
|
+
*
|
|
6164
|
+
* @default null
|
|
6165
|
+
*/
|
|
6166
|
+
smartPasteFormFields = null;
|
|
6167
|
+
/**
|
|
6168
|
+
* Fires when the Smart Paste request is about to start.
|
|
6169
|
+
* Prevent the event to stop the request before sending it.
|
|
6170
|
+
*/
|
|
6171
|
+
requestStart = new EventEmitter();
|
|
6172
|
+
/**
|
|
6173
|
+
* Fires when the Smart Paste request completes, either successfully or with an error.
|
|
6174
|
+
* Prevent the event to cancel populating the form fields with the response data.
|
|
6175
|
+
*/
|
|
6176
|
+
requestEnd = new EventEmitter();
|
|
6177
|
+
/**
|
|
6178
|
+
* Fires when the user cancels an ongoing Smart Paste request.
|
|
6179
|
+
*/
|
|
6180
|
+
requestCancel = new EventEmitter();
|
|
6181
|
+
get iconButtonClass() {
|
|
6182
|
+
return !this.hasText;
|
|
6183
|
+
}
|
|
6184
|
+
classButton = true;
|
|
6185
|
+
get classDisabled() {
|
|
6186
|
+
return this.isDisabled;
|
|
6187
|
+
}
|
|
6188
|
+
get getDirection() {
|
|
6189
|
+
return this.direction;
|
|
6190
|
+
}
|
|
6191
|
+
onFocus() {
|
|
6192
|
+
this.isFocused = true;
|
|
6193
|
+
}
|
|
6194
|
+
onBlur() {
|
|
6195
|
+
this.isFocused = false;
|
|
6196
|
+
}
|
|
6197
|
+
/**
|
|
6198
|
+
* Focuses the SmartPasteButton.
|
|
6199
|
+
*/
|
|
6200
|
+
focus() {
|
|
6201
|
+
if (isDocumentAvailable()) {
|
|
6202
|
+
this.element.focus();
|
|
6203
|
+
this.isFocused = true;
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
/**
|
|
6207
|
+
* Removes focus from the SmartPasteButton.
|
|
6208
|
+
*/
|
|
6209
|
+
blur() {
|
|
6210
|
+
if (isDocumentAvailable()) {
|
|
6211
|
+
this.element.blur();
|
|
6212
|
+
this.isFocused = false;
|
|
6213
|
+
}
|
|
6214
|
+
}
|
|
6215
|
+
get hasText() {
|
|
6216
|
+
return isDocumentAvailable() && this.element.textContent.trim().length > 0;
|
|
6217
|
+
}
|
|
6218
|
+
set isFocused(isFocused) {
|
|
6219
|
+
toggleClass('k-focus', isFocused, this.renderer, this.element);
|
|
6220
|
+
this._focused = isFocused;
|
|
6221
|
+
}
|
|
6222
|
+
get isFocused() {
|
|
6223
|
+
return this._focused;
|
|
6224
|
+
}
|
|
6225
|
+
element;
|
|
6226
|
+
isDisabled = false;
|
|
6227
|
+
subs = new Subscription();
|
|
6228
|
+
_size = undefined;
|
|
6229
|
+
_rounded = undefined;
|
|
6230
|
+
_fillMode = undefined;
|
|
6231
|
+
_themeColor = undefined;
|
|
6232
|
+
_focused = false;
|
|
6233
|
+
direction;
|
|
6234
|
+
_iconClass;
|
|
6235
|
+
_icon = DEFAULT_ICON;
|
|
6236
|
+
_svgIcon = DEFAULT_SVG_ICON;
|
|
6237
|
+
kendoSmartPaste;
|
|
6238
|
+
smartPasteBusy = false;
|
|
6239
|
+
currentRequestSubscription = null;
|
|
6240
|
+
nativeForm = null;
|
|
6241
|
+
constructor(elementRef, renderer, localization, ngZone, http, controlContainer) {
|
|
6242
|
+
this.renderer = renderer;
|
|
6243
|
+
this.ngZone = ngZone;
|
|
6244
|
+
this.http = http;
|
|
6245
|
+
this.controlContainer = controlContainer;
|
|
6246
|
+
validatePackage(packageMetadata);
|
|
6247
|
+
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
6248
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
6249
|
+
this.element = elementRef.nativeElement;
|
|
6250
|
+
}
|
|
6251
|
+
ngOnInit() {
|
|
6252
|
+
this.nativeForm = this.element.form;
|
|
6253
|
+
this.kendoSmartPaste = new KendoSmartPaste({
|
|
6254
|
+
getElement: () => this.nativeForm,
|
|
6255
|
+
customInputs: customInputs || undefined,
|
|
6256
|
+
getSmartPasteField: this.defaultGetSmartPasteField,
|
|
6257
|
+
setKendoInputValue: this.defaultSetKendoInputValue
|
|
6258
|
+
});
|
|
6259
|
+
this.ngZone.runOutsideAngular(() => {
|
|
6260
|
+
this.subs.add(this.renderer.listen(this.element, 'click', this.paste.bind(this)));
|
|
6261
|
+
this.subs.add(this.renderer.listen(this.element, 'mousedown', (event) => {
|
|
6262
|
+
const isBrowserSafari = isDocumentAvailable() && isSafari(navigator.userAgent);
|
|
6263
|
+
if (!this.isDisabled && isBrowserSafari) {
|
|
6264
|
+
event.preventDefault();
|
|
6265
|
+
this.element.focus();
|
|
6266
|
+
}
|
|
6267
|
+
}));
|
|
6268
|
+
});
|
|
6269
|
+
}
|
|
6270
|
+
ngOnDestroy() {
|
|
6271
|
+
this.unsubscribeCurrentRequest();
|
|
6272
|
+
this.subs.unsubscribe();
|
|
6273
|
+
}
|
|
6274
|
+
/**
|
|
6275
|
+
* Starts the Smart Paste operation.
|
|
6276
|
+
* Reads clipboard content and sends it to the AI service for processing.
|
|
6277
|
+
*/
|
|
6278
|
+
async paste() {
|
|
6279
|
+
if (!this.nativeForm) {
|
|
6280
|
+
return;
|
|
6281
|
+
}
|
|
6282
|
+
if (this.smartPasteBusy) {
|
|
6283
|
+
this.requestCancel.emit();
|
|
6284
|
+
this.unsubscribeCurrentRequest();
|
|
6285
|
+
this.smartPasteBusy = false;
|
|
6286
|
+
return;
|
|
6287
|
+
}
|
|
6288
|
+
let clipboardContent;
|
|
6289
|
+
try {
|
|
6290
|
+
clipboardContent = await readClipboard();
|
|
6291
|
+
}
|
|
6292
|
+
catch (error) {
|
|
6293
|
+
this.ngZone.run(() => {
|
|
6294
|
+
const responseErrorEvent = new SmartPasteRequestEndEvent(error);
|
|
6295
|
+
this.requestEnd.emit(responseErrorEvent);
|
|
6296
|
+
});
|
|
6297
|
+
return;
|
|
6298
|
+
}
|
|
6299
|
+
if (!clipboardContent || clipboardContent.trim() === '') {
|
|
6300
|
+
return;
|
|
6301
|
+
}
|
|
6302
|
+
this.smartPasteBusy = true;
|
|
6303
|
+
this.unsubscribeCurrentRequest();
|
|
6304
|
+
const formFields = this.extractFormFields();
|
|
6305
|
+
const requestData = {
|
|
6306
|
+
formFields,
|
|
6307
|
+
content: clipboardContent,
|
|
6308
|
+
url: this.requestUrl,
|
|
6309
|
+
requestOptions: {
|
|
6310
|
+
...this.requestOptions
|
|
6311
|
+
}
|
|
6312
|
+
};
|
|
6313
|
+
if (!this.requestUrl) {
|
|
6314
|
+
this.smartPasteBusy = false;
|
|
6315
|
+
return;
|
|
6316
|
+
}
|
|
6317
|
+
this.ngZone.run(() => {
|
|
6318
|
+
const requestStartEvent = new SmartPasteRequestStartEvent(requestData);
|
|
6319
|
+
this.requestStart.emit(requestStartEvent);
|
|
6320
|
+
if (requestStartEvent.isDefaultPrevented()) {
|
|
6321
|
+
this.smartPasteBusy = false;
|
|
6322
|
+
return;
|
|
6323
|
+
}
|
|
6324
|
+
if (!this.smartPasteBusy) {
|
|
6325
|
+
return;
|
|
6326
|
+
}
|
|
6327
|
+
this.handleSmartPasteRequest(requestData, formFields);
|
|
6328
|
+
});
|
|
6329
|
+
}
|
|
6330
|
+
sendSmartPasteRequest(requestData) {
|
|
6331
|
+
const body = {
|
|
6332
|
+
formFields: requestData.formFields,
|
|
6333
|
+
content: requestData.content
|
|
6334
|
+
};
|
|
6335
|
+
const request = new HttpRequest(requestData.requestOptions?.method || 'POST', requestData.url, body, requestData.requestOptions);
|
|
6336
|
+
return this.http.request(request).pipe(filter((event) => event.type === HttpEventType.Response));
|
|
6337
|
+
}
|
|
6338
|
+
unsubscribeCurrentRequest() {
|
|
6339
|
+
if (this.currentRequestSubscription) {
|
|
6340
|
+
this.currentRequestSubscription.unsubscribe();
|
|
6341
|
+
this.currentRequestSubscription = null;
|
|
6342
|
+
}
|
|
6343
|
+
}
|
|
6344
|
+
defaultGetSmartPasteField = (field) => {
|
|
6345
|
+
const element = field.element;
|
|
6346
|
+
if (isFieldIgnored(element)) {
|
|
6347
|
+
return null;
|
|
6348
|
+
}
|
|
6349
|
+
const hasKendoWrapper = customInputs.some(input => {
|
|
6350
|
+
if (!element.classList.contains(input.identifier.slice(1)) && element.closest(input.identifier)) {
|
|
6351
|
+
return true;
|
|
6352
|
+
}
|
|
6353
|
+
});
|
|
6354
|
+
if (hasKendoWrapper) {
|
|
6355
|
+
return null;
|
|
6356
|
+
}
|
|
6357
|
+
if (field.type === 'kendo-input') {
|
|
6358
|
+
const identifier = getElementIdentifier(element);
|
|
6359
|
+
if (!identifier) {
|
|
6360
|
+
return null;
|
|
6361
|
+
}
|
|
6362
|
+
if (requiresBooleanValue(element)) {
|
|
6363
|
+
field.allowedValues = ['true', 'false'];
|
|
6364
|
+
}
|
|
6365
|
+
field.field = identifier;
|
|
6366
|
+
}
|
|
6367
|
+
return field;
|
|
6368
|
+
};
|
|
6369
|
+
defaultSetKendoInputValue = (field, value) => {
|
|
6370
|
+
const element = field.element;
|
|
6371
|
+
const controlName = getElementIdentifier(element);
|
|
6372
|
+
if (!controlName || !this.controlContainer) {
|
|
6373
|
+
return;
|
|
6374
|
+
}
|
|
6375
|
+
const control = this.controlContainer.control.get?.(controlName);
|
|
6376
|
+
if (!control || typeof control.setValue !== 'function') {
|
|
6377
|
+
return;
|
|
6378
|
+
}
|
|
6379
|
+
const updatedValue = populateCustomInputs(element, value);
|
|
6380
|
+
if (!isPresent$1(updatedValue)) {
|
|
6381
|
+
return;
|
|
6382
|
+
}
|
|
6383
|
+
this.setControlValue(control, updatedValue);
|
|
6384
|
+
};
|
|
6385
|
+
setControlValue(control, value) {
|
|
6386
|
+
this.ngZone.run(() => {
|
|
6387
|
+
control.setValue(value);
|
|
6388
|
+
control.markAsDirty();
|
|
6389
|
+
control.updateValueAndValidity();
|
|
6390
|
+
});
|
|
6391
|
+
}
|
|
6392
|
+
extractFormFields() {
|
|
6393
|
+
if (!this.formFields || this.formFields.length === 0) {
|
|
6394
|
+
return this.kendoSmartPaste.extractFormConfig();
|
|
6395
|
+
}
|
|
6396
|
+
else {
|
|
6397
|
+
const formFields = this.formFields.map(field => {
|
|
6398
|
+
const element = this.nativeForm?.querySelector(`#${field.field}`);
|
|
6399
|
+
return {
|
|
6400
|
+
...field,
|
|
6401
|
+
element
|
|
6402
|
+
};
|
|
6403
|
+
});
|
|
6404
|
+
return formFields;
|
|
6405
|
+
}
|
|
6406
|
+
}
|
|
6407
|
+
handleClasses(value, input) {
|
|
6408
|
+
const elem = this.element;
|
|
6409
|
+
const classes = getStylingClasses('button', input, this[input], value);
|
|
6410
|
+
if (input === 'fillMode') {
|
|
6411
|
+
this.handleThemeColor(this.themeColor);
|
|
6412
|
+
}
|
|
6413
|
+
if (classes.toRemove) {
|
|
6414
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
6415
|
+
}
|
|
6416
|
+
if (classes.toAdd) {
|
|
6417
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
handleThemeColor(value) {
|
|
6421
|
+
const elem = this.element;
|
|
6422
|
+
const themeColorClass = getThemeColorClasses('button', this.themeColor, value);
|
|
6423
|
+
if (themeColorClass.toRemove) {
|
|
6424
|
+
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
6425
|
+
}
|
|
6426
|
+
if (themeColorClass.toAdd) {
|
|
6427
|
+
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6430
|
+
handleSmartPasteRequest(requestData, formFields) {
|
|
6431
|
+
this.currentRequestSubscription = this.sendSmartPasteRequest(requestData).subscribe((response) => {
|
|
6432
|
+
if (!this.smartPasteBusy) {
|
|
6433
|
+
return;
|
|
6434
|
+
}
|
|
6435
|
+
const responseEvent = new SmartPasteRequestEndEvent(response);
|
|
6436
|
+
this.requestEnd.emit(responseEvent);
|
|
6437
|
+
if (responseEvent.isDefaultPrevented()) {
|
|
6438
|
+
this.smartPasteBusy = false;
|
|
6439
|
+
return;
|
|
6440
|
+
}
|
|
6441
|
+
if (response?.body?.fieldValues) {
|
|
6442
|
+
this.kendoSmartPaste.populateFormFields(response.body, formFields);
|
|
6443
|
+
}
|
|
6444
|
+
this.smartPasteBusy = false;
|
|
6445
|
+
this.currentRequestSubscription = null;
|
|
6446
|
+
}, (error) => {
|
|
6447
|
+
if (!this.smartPasteBusy) {
|
|
6448
|
+
return;
|
|
6449
|
+
}
|
|
6450
|
+
const responseErrorEvent = new SmartPasteRequestEndEvent(error);
|
|
6451
|
+
this.requestEnd.emit(responseErrorEvent);
|
|
6452
|
+
this.smartPasteBusy = false;
|
|
6453
|
+
this.currentRequestSubscription = null;
|
|
6454
|
+
});
|
|
6455
|
+
}
|
|
6456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SmartPasteButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.NgZone }, { token: i2.HttpClient }, { token: i3$1.ControlContainer, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
6457
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: SmartPasteButtonComponent, isStandalone: true, selector: "button[kendoSmartPasteButton]", inputs: { formFields: "formFields", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", svgIcon: "svgIcon", imageUrl: "imageUrl", iconClass: "iconClass", icon: "icon", requestUrl: "requestUrl", requestOptions: "requestOptions", smartPasteFormFields: "smartPasteFormFields" }, outputs: { requestStart: "requestStart", requestEnd: "requestEnd", requestCancel: "requestCancel" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-icon-button": "this.iconButtonClass", "class.k-button": "this.classButton", "class.k-disabled": "this.classDisabled", "attr.dir": "this.getDirection" } }, providers: [
|
|
6458
|
+
LocalizationService,
|
|
6459
|
+
{
|
|
6460
|
+
provide: L10N_PREFIX,
|
|
6461
|
+
useValue: 'kendo.smartpastebutton'
|
|
6462
|
+
}
|
|
6463
|
+
], exportAs: ["kendoSmartPasteButton"], ngImport: i0, template: `
|
|
6464
|
+
@if (icon || svgIcon) {
|
|
6465
|
+
<kendo-icon-wrapper
|
|
6466
|
+
innerCssClass="k-button-icon"
|
|
6467
|
+
[name]="icon"
|
|
6468
|
+
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
6469
|
+
}
|
|
6470
|
+
@if (imageUrl) {
|
|
6471
|
+
<span class="k-button-icon k-icon">
|
|
6472
|
+
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
6473
|
+
</span>
|
|
6474
|
+
}
|
|
6475
|
+
@if (iconClass) {
|
|
6476
|
+
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
6477
|
+
}
|
|
6478
|
+
<span class="k-button-text"><ng-content></ng-content></span>
|
|
6479
|
+
`, 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"] }] });
|
|
6480
|
+
}
|
|
6481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SmartPasteButtonComponent, decorators: [{
|
|
6482
|
+
type: Component,
|
|
6483
|
+
args: [{
|
|
6484
|
+
exportAs: 'kendoSmartPasteButton',
|
|
6485
|
+
providers: [
|
|
6486
|
+
LocalizationService,
|
|
6487
|
+
{
|
|
6488
|
+
provide: L10N_PREFIX,
|
|
6489
|
+
useValue: 'kendo.smartpastebutton'
|
|
6490
|
+
}
|
|
6491
|
+
],
|
|
6492
|
+
selector: 'button[kendoSmartPasteButton]',
|
|
6493
|
+
standalone: true,
|
|
6494
|
+
imports: [IconWrapperComponent, NgClass],
|
|
6495
|
+
template: `
|
|
6496
|
+
@if (icon || svgIcon) {
|
|
6497
|
+
<kendo-icon-wrapper
|
|
6498
|
+
innerCssClass="k-button-icon"
|
|
6499
|
+
[name]="icon"
|
|
6500
|
+
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
6501
|
+
}
|
|
6502
|
+
@if (imageUrl) {
|
|
6503
|
+
<span class="k-button-icon k-icon">
|
|
6504
|
+
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
6505
|
+
</span>
|
|
6506
|
+
}
|
|
6507
|
+
@if (iconClass) {
|
|
6508
|
+
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
6509
|
+
}
|
|
6510
|
+
<span class="k-button-text"><ng-content></ng-content></span>
|
|
6511
|
+
`
|
|
6512
|
+
}]
|
|
6513
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.NgZone }, { type: i2.HttpClient }, { type: i3$1.ControlContainer, decorators: [{
|
|
6514
|
+
type: Optional
|
|
6515
|
+
}, {
|
|
6516
|
+
type: SkipSelf
|
|
6517
|
+
}] }], propDecorators: { formFields: [{
|
|
6518
|
+
type: Input
|
|
6519
|
+
}], disabled: [{
|
|
6520
|
+
type: Input
|
|
6521
|
+
}], size: [{
|
|
6522
|
+
type: Input
|
|
6523
|
+
}], rounded: [{
|
|
6524
|
+
type: Input
|
|
6525
|
+
}], fillMode: [{
|
|
6526
|
+
type: Input
|
|
6527
|
+
}], themeColor: [{
|
|
6528
|
+
type: Input
|
|
6529
|
+
}], svgIcon: [{
|
|
6530
|
+
type: Input
|
|
6531
|
+
}], imageUrl: [{
|
|
6532
|
+
type: Input
|
|
6533
|
+
}], iconClass: [{
|
|
6534
|
+
type: Input
|
|
6535
|
+
}], icon: [{
|
|
6536
|
+
type: Input
|
|
6537
|
+
}], requestUrl: [{
|
|
6538
|
+
type: Input
|
|
6539
|
+
}], requestOptions: [{
|
|
6540
|
+
type: Input
|
|
6541
|
+
}], smartPasteFormFields: [{
|
|
6542
|
+
type: Input
|
|
6543
|
+
}], requestStart: [{
|
|
6544
|
+
type: Output
|
|
6545
|
+
}], requestEnd: [{
|
|
6546
|
+
type: Output
|
|
6547
|
+
}], requestCancel: [{
|
|
6548
|
+
type: Output
|
|
6549
|
+
}], iconButtonClass: [{
|
|
6550
|
+
type: HostBinding,
|
|
6551
|
+
args: ['class.k-icon-button']
|
|
6552
|
+
}], classButton: [{
|
|
6553
|
+
type: HostBinding,
|
|
6554
|
+
args: ['class.k-button']
|
|
6555
|
+
}], classDisabled: [{
|
|
6556
|
+
type: HostBinding,
|
|
6557
|
+
args: ['class.k-disabled']
|
|
6558
|
+
}], getDirection: [{
|
|
6559
|
+
type: HostBinding,
|
|
6560
|
+
args: ['attr.dir']
|
|
6561
|
+
}], onFocus: [{
|
|
6562
|
+
type: HostListener,
|
|
6563
|
+
args: ['focus']
|
|
6564
|
+
}], onBlur: [{
|
|
6565
|
+
type: HostListener,
|
|
6566
|
+
args: ['blur']
|
|
6567
|
+
}] } });
|
|
6568
|
+
|
|
6569
|
+
/**
|
|
6570
|
+
* Use the `KENDO_BUTTON` utility array to add all Button-related components and directives to a standalone Angular component.
|
|
6571
|
+
*
|
|
6572
|
+
* @example
|
|
6573
|
+
* ```typescript
|
|
6574
|
+
* @Component({
|
|
6575
|
+
* standalone: true,
|
|
6576
|
+
* imports: [KENDO_BUTTON],
|
|
6577
|
+
* // ...
|
|
6578
|
+
* })
|
|
6579
|
+
* export class MyComponent {}
|
|
6580
|
+
* ```
|
|
6581
|
+
*/
|
|
6582
|
+
const KENDO_BUTTON = [
|
|
6583
|
+
ButtonComponent
|
|
6584
|
+
];
|
|
6585
|
+
/**
|
|
6586
|
+
* Use the `KENDO_BUTTONGROUP` utility array to add all ButtonGroup-related components and directives to a standalone Angular component.
|
|
6587
|
+
*
|
|
6588
|
+
* @example
|
|
6589
|
+
* ```typescript
|
|
6590
|
+
* @Component({
|
|
6591
|
+
* standalone: true,
|
|
6592
|
+
* imports: [KENDO_BUTTONGROUP],
|
|
6593
|
+
* // ...
|
|
6594
|
+
* })
|
|
6595
|
+
* export class MyComponent {}
|
|
6596
|
+
* ```
|
|
6597
|
+
*/
|
|
6598
|
+
const KENDO_BUTTONGROUP = [
|
|
6599
|
+
ButtonComponent,
|
|
6600
|
+
ButtonGroupComponent
|
|
6601
|
+
];
|
|
6602
|
+
/**
|
|
6603
|
+
* Use the `KENDO_DROPDOWNBUTTON` utility array to add all DropDownButton-related components and directives to a standalone Angular component.
|
|
6604
|
+
*
|
|
6605
|
+
* @example
|
|
6606
|
+
* ```typescript
|
|
6607
|
+
* @Component({
|
|
6608
|
+
* standalone: true,
|
|
6609
|
+
* imports: [KENDO_DROPDOWNBUTTON],
|
|
6610
|
+
* // ...
|
|
6611
|
+
* })
|
|
6612
|
+
* export class MyComponent {}
|
|
6613
|
+
* ```
|
|
6614
|
+
*/
|
|
6615
|
+
const KENDO_DROPDOWNBUTTON = [
|
|
6616
|
+
DropDownButtonComponent,
|
|
6617
|
+
ButtonItemTemplateDirective
|
|
6618
|
+
];
|
|
6619
|
+
/**
|
|
6620
|
+
* Use the `KENDO_CHIP` utility array to add all Chip-related components and directives to a standalone Angular component.
|
|
6621
|
+
*
|
|
6622
|
+
* @example
|
|
6623
|
+
* ```typescript
|
|
6624
|
+
* @Component({
|
|
6625
|
+
* standalone: true,
|
|
6626
|
+
* imports: [KENDO_CHIP],
|
|
6627
|
+
* // ...
|
|
6628
|
+
* })
|
|
6629
|
+
* export class MyComponent {}
|
|
6630
|
+
* ```
|
|
6631
|
+
*/
|
|
6632
|
+
const KENDO_CHIP = [
|
|
6633
|
+
ChipComponent
|
|
6634
|
+
];
|
|
6635
|
+
/**
|
|
6636
|
+
* Use the `KENDO_CHIPLIST` utility array to add all ChipList-related components and directives to a standalone Angular component.
|
|
6637
|
+
*
|
|
6638
|
+
* @example
|
|
6639
|
+
* ```typescript
|
|
6640
|
+
* @Component({
|
|
6641
|
+
* standalone: true,
|
|
6642
|
+
* imports: [KENDO_CHIPLIST],
|
|
6643
|
+
* // ...
|
|
6644
|
+
* })
|
|
6645
|
+
* export class MyComponent {}
|
|
6646
|
+
* ```
|
|
6647
|
+
*/
|
|
6648
|
+
const KENDO_CHIPLIST = [
|
|
6649
|
+
ChipComponent,
|
|
6650
|
+
ChipListComponent
|
|
6651
|
+
];
|
|
6652
|
+
/**
|
|
6653
|
+
* Use the `KENDO_FLOATINGACTIONBUTTON` utility array to add all FloatingActionButton-related components and directives to a standalone Angular component.
|
|
6654
|
+
*
|
|
6655
|
+
* @example
|
|
6656
|
+
* ```typescript
|
|
6657
|
+
* @Component({
|
|
6658
|
+
* standalone: true,
|
|
6659
|
+
* imports: [KENDO_FLOATINGACTIONBUTTON],
|
|
6660
|
+
* // ...
|
|
6661
|
+
* })
|
|
6662
|
+
* export class MyComponent {}
|
|
6663
|
+
* ```
|
|
6664
|
+
*/
|
|
6665
|
+
const KENDO_FLOATINGACTIONBUTTON = [
|
|
6666
|
+
FloatingActionButtonComponent,
|
|
6667
|
+
DialItemTemplateDirective,
|
|
6668
|
+
FloatingActionButtonTemplateDirective
|
|
6669
|
+
];
|
|
6670
|
+
/**
|
|
6671
|
+
* Use the `KENDO_SPLITBUTTON` utility array to add all SplitButton-related components and directives to a standalone Angular component.
|
|
6672
|
+
*
|
|
6673
|
+
* @example
|
|
6674
|
+
* ```typescript
|
|
6675
|
+
* @Component({
|
|
6676
|
+
* standalone: true,
|
|
6677
|
+
* imports: [KENDO_SPLITBUTTON],
|
|
6678
|
+
* // ...
|
|
6679
|
+
* })
|
|
6680
|
+
* export class MyComponent {}
|
|
6681
|
+
* ```
|
|
6682
|
+
*/
|
|
6683
|
+
const KENDO_SPLITBUTTON = [
|
|
6684
|
+
SplitButtonComponent,
|
|
6685
|
+
SplitButtonCustomMessagesComponent,
|
|
6686
|
+
ToggleButtonTabStopDirective,
|
|
6687
|
+
ButtonItemTemplateDirective
|
|
6688
|
+
];
|
|
6689
|
+
/**
|
|
6690
|
+
* Use the `KENDO_SPEECHTOTEXTBUTTON` utility array to add all SpeechToTextButton-related components and directives to a standalone Angular component.
|
|
6691
|
+
*
|
|
6692
|
+
* @example
|
|
6693
|
+
* ```typescript
|
|
6694
|
+
* @Component({
|
|
6695
|
+
* standalone: true,
|
|
6696
|
+
* imports: [KENDO_SPEECHTOTEXTBUTTON],
|
|
6697
|
+
* // ...
|
|
6698
|
+
* })
|
|
6699
|
+
* export class MyComponent {}
|
|
6700
|
+
* ```
|
|
6701
|
+
*/
|
|
6702
|
+
const KENDO_SPEECHTOTEXTBUTTON = [
|
|
6703
|
+
SpeechToTextButtonComponent
|
|
6704
|
+
];
|
|
6705
|
+
/**
|
|
6706
|
+
* Use the `KENDO_SMARTPASTEBUTTON` utility array to add all SmartPasteButton-related components and directives to a standalone Angular component.
|
|
6707
|
+
*
|
|
6708
|
+
* @example
|
|
6709
|
+
* ```typescript
|
|
6710
|
+
* @Component({
|
|
6711
|
+
* standalone: true,
|
|
6712
|
+
* imports: [KENDO_SMARTPASTEBUTTON],
|
|
6713
|
+
* // ...
|
|
6714
|
+
* })
|
|
6715
|
+
* export class MyComponent {}
|
|
6716
|
+
* ```
|
|
6717
|
+
*/
|
|
6718
|
+
const KENDO_SMARTPASTEBUTTON = [
|
|
6719
|
+
SmartPasteButtonComponent
|
|
6720
|
+
];
|
|
6721
|
+
/**
|
|
6722
|
+
* Use the `KENDO_BUTTONS` utility array to add all `@progress/kendo-angular-buttons`-related components and directives to a standalone Angular component.
|
|
6723
|
+
*
|
|
6724
|
+
* @example
|
|
6725
|
+
* ```typescript
|
|
6726
|
+
* @Component({
|
|
6727
|
+
* standalone: true,
|
|
6728
|
+
* imports: [KENDO_BUTTONS],
|
|
6729
|
+
* // ...
|
|
6730
|
+
* })
|
|
6731
|
+
* export class MyComponent {}
|
|
6092
6732
|
* ```
|
|
6093
6733
|
*/
|
|
6094
6734
|
const KENDO_BUTTONS = [
|
|
@@ -6099,7 +6739,8 @@ const KENDO_BUTTONS = [
|
|
|
6099
6739
|
...KENDO_CHIPLIST,
|
|
6100
6740
|
...KENDO_FLOATINGACTIONBUTTON,
|
|
6101
6741
|
...KENDO_SPLITBUTTON,
|
|
6102
|
-
...KENDO_SPEECHTOTEXTBUTTON
|
|
6742
|
+
...KENDO_SPEECHTOTEXTBUTTON,
|
|
6743
|
+
...KENDO_SMARTPASTEBUTTON
|
|
6103
6744
|
];
|
|
6104
6745
|
|
|
6105
6746
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
@@ -6202,8 +6843,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6202
6843
|
*/
|
|
6203
6844
|
class ButtonsModule {
|
|
6204
6845
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6205
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: ButtonsModule, imports: [ButtonComponent, ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, ButtonItemTemplateDirective, ChipComponent, ChipComponent, ChipListComponent, FloatingActionButtonComponent, DialItemTemplateDirective, FloatingActionButtonTemplateDirective, SplitButtonComponent, SplitButtonCustomMessagesComponent, i12.ToggleButtonTabStopDirective, ButtonItemTemplateDirective, SpeechToTextButtonComponent, i12.ToggleButtonTabStopDirective], exports: [ButtonComponent, ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, ButtonItemTemplateDirective, ChipComponent, ChipComponent, ChipListComponent, FloatingActionButtonComponent, DialItemTemplateDirective, FloatingActionButtonTemplateDirective, SplitButtonComponent, SplitButtonCustomMessagesComponent, i12.ToggleButtonTabStopDirective, ButtonItemTemplateDirective, SpeechToTextButtonComponent, i12.ToggleButtonTabStopDirective] });
|
|
6206
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonsModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [ButtonComponent, ButtonComponent, DropDownButtonComponent, ChipComponent, ChipComponent, FloatingActionButtonComponent, SplitButtonComponent, SpeechToTextButtonComponent] });
|
|
6846
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: ButtonsModule, imports: [ButtonComponent, ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, ButtonItemTemplateDirective, ChipComponent, ChipComponent, ChipListComponent, FloatingActionButtonComponent, DialItemTemplateDirective, FloatingActionButtonTemplateDirective, SplitButtonComponent, SplitButtonCustomMessagesComponent, i12.ToggleButtonTabStopDirective, ButtonItemTemplateDirective, SpeechToTextButtonComponent, SmartPasteButtonComponent, i12.ToggleButtonTabStopDirective], exports: [ButtonComponent, ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, ButtonItemTemplateDirective, ChipComponent, ChipComponent, ChipListComponent, FloatingActionButtonComponent, DialItemTemplateDirective, FloatingActionButtonTemplateDirective, SplitButtonComponent, SplitButtonCustomMessagesComponent, i12.ToggleButtonTabStopDirective, ButtonItemTemplateDirective, SpeechToTextButtonComponent, SmartPasteButtonComponent, i12.ToggleButtonTabStopDirective] });
|
|
6847
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonsModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [ButtonComponent, ButtonComponent, DropDownButtonComponent, ChipComponent, ChipComponent, FloatingActionButtonComponent, SplitButtonComponent, SpeechToTextButtonComponent, SmartPasteButtonComponent] });
|
|
6207
6848
|
}
|
|
6208
6849
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ButtonsModule, decorators: [{
|
|
6209
6850
|
type: NgModule,
|
|
@@ -6371,9 +7012,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6371
7012
|
}]
|
|
6372
7013
|
}] });
|
|
6373
7014
|
|
|
7015
|
+
/**
|
|
7016
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
7017
|
+
* definition for the SmartPasteButton component.
|
|
7018
|
+
*
|
|
7019
|
+
* The module is meant for backward compatibility. For new applications, use the standalone SmartPasteButton component.
|
|
7020
|
+
*
|
|
7021
|
+
* @example
|
|
7022
|
+
* ```ts-no-run
|
|
7023
|
+
* import { SmartPasteButtonModule } from '@progress/kendo-angular-buttons';
|
|
7024
|
+
*
|
|
7025
|
+
* _@NgModule({
|
|
7026
|
+
* imports: [SmartPasteButtonModule]
|
|
7027
|
+
* })
|
|
7028
|
+
* export class AppModule {}
|
|
7029
|
+
* ```
|
|
7030
|
+
*/
|
|
7031
|
+
class SmartPasteButtonModule {
|
|
7032
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SmartPasteButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7033
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: SmartPasteButtonModule, imports: [SmartPasteButtonComponent], exports: [SmartPasteButtonComponent] });
|
|
7034
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SmartPasteButtonModule, imports: [SmartPasteButtonComponent] });
|
|
7035
|
+
}
|
|
7036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SmartPasteButtonModule, decorators: [{
|
|
7037
|
+
type: NgModule,
|
|
7038
|
+
args: [{
|
|
7039
|
+
exports: [SmartPasteButtonComponent],
|
|
7040
|
+
imports: [SmartPasteButtonComponent]
|
|
7041
|
+
}]
|
|
7042
|
+
}] });
|
|
7043
|
+
|
|
6374
7044
|
/**
|
|
6375
7045
|
* Generated bundle index. Do not edit.
|
|
6376
7046
|
*/
|
|
6377
7047
|
|
|
6378
|
-
export { ButtonComponent as Button, ButtonComponent, ButtonComponent as ButtonDirective, ButtonGroupComponent as ButtonGroup, ButtonGroupComponent, ButtonGroupModule, ButtonItemTemplateDirective, ButtonModule, ButtonsModule, ChipComponent, ChipListComponent, ChipModule, DialItemTemplateDirective, DropDownButtonComponent as DropDownButton, DropDownButtonComponent, DropDownButtonModule, FloatingActionButtonComponent, FloatingActionButtonModule, FloatingActionButtonTemplateDirective, FocusableDirective, KENDO_BUTTON, KENDO_BUTTONGROUP, KENDO_BUTTONS, KENDO_CHIP, KENDO_CHIPLIST, KENDO_DROPDOWNBUTTON, KENDO_FLOATINGACTIONBUTTON, KENDO_SPEECHTOTEXTBUTTON, KENDO_SPLITBUTTON, KendoButtonService, ListComponent, LocalizedSplitButtonMessagesDirective, PreventableEvent, SpeechToTextButtonComponent, SpeechToTextButtonModule, SplitButtonComponent as SplitButton, SplitButtonComponent, SplitButtonCustomMessagesComponent, SplitButtonModule };
|
|
7048
|
+
export { ButtonComponent as Button, ButtonComponent, ButtonComponent as ButtonDirective, ButtonGroupComponent as ButtonGroup, ButtonGroupComponent, ButtonGroupModule, ButtonItemTemplateDirective, ButtonModule, ButtonsModule, ChipComponent, ChipListComponent, ChipModule, DialItemTemplateDirective, DropDownButtonComponent as DropDownButton, DropDownButtonComponent, DropDownButtonModule, FloatingActionButtonComponent, FloatingActionButtonModule, FloatingActionButtonTemplateDirective, FocusableDirective, KENDO_BUTTON, KENDO_BUTTONGROUP, KENDO_BUTTONS, KENDO_CHIP, KENDO_CHIPLIST, KENDO_DROPDOWNBUTTON, KENDO_FLOATINGACTIONBUTTON, KENDO_SMARTPASTEBUTTON, KENDO_SPEECHTOTEXTBUTTON, KENDO_SPLITBUTTON, KendoButtonService, ListComponent, LocalizedSplitButtonMessagesDirective, PreventableEvent, SmartPasteButtonComponent, SmartPasteButtonModule, SmartPasteRequestEndEvent, SmartPasteRequestStartEvent, SpeechToTextButtonComponent, SpeechToTextButtonModule, SplitButtonComponent as SplitButton, SplitButtonComponent, SplitButtonCustomMessagesComponent, SplitButtonModule };
|
|
6379
7049
|
|