@progress/kendo-angular-buttons 8.0.0-next.202204011456 → 8.0.0-next.202204131126
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/bundles/kendo-angular-buttons.umd.js +1 -1
- package/button/button.directive.d.ts +30 -43
- package/buttongroup/buttongroup.component.d.ts +1 -2
- package/chip/chip-list.component.d.ts +1 -1
- package/chip/chip.component.d.ts +19 -20
- package/common/models/fillmode.d.ts +2 -2
- package/common/models/rounded.d.ts +2 -2
- package/common/models/size.d.ts +2 -2
- package/common/models/theme-color.d.ts +2 -2
- package/common/models.d.ts +0 -1
- package/dropdownbutton/dropdownbutton.component.d.ts +14 -25
- package/esm2015/button/button.directive.js +55 -65
- package/esm2015/buttongroup/buttongroup.component.js +6 -5
- package/esm2015/chip/chip-list.component.js +4 -3
- package/esm2015/chip/chip.component.js +47 -47
- package/esm2015/common/models.js +0 -1
- package/esm2015/dropdownbutton/dropdownbutton.component.js +25 -36
- package/esm2015/floatingactionbutton/dial-item.component.js +1 -0
- package/esm2015/floatingactionbutton/dial-list.component.js +1 -0
- package/esm2015/floatingactionbutton/floatingactionbutton.component.js +55 -52
- package/esm2015/focusable/focusable.directive.js +5 -11
- package/esm2015/listbutton/list-button.js +15 -35
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/splitbutton/localization/messages.js +1 -0
- package/esm2015/splitbutton/splitbutton.component.js +27 -19
- package/esm2015/util.js +4 -4
- package/fesm2015/kendo-angular-buttons.js +240 -276
- package/floatingactionbutton/floatingactionbutton.component.d.ts +22 -35
- package/focusable/focusable.directive.d.ts +1 -2
- package/listbutton/list-button.d.ts +1 -11
- package/main.d.ts +0 -1
- package/package.json +4 -4
- package/splitbutton/splitbutton.component.d.ts +11 -9
- package/common/models/shape.d.ts +0 -11
- package/esm2015/common/models/shape.js +0 -5
|
@@ -8,9 +8,9 @@ import * as i8 from '@progress/kendo-angular-common';
|
|
|
8
8
|
import { isDocumentAvailable, Keys, isChanged, hasObservers, guid, EventsModule } from '@progress/kendo-angular-common';
|
|
9
9
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
11
|
+
import { Subject, Subscription, fromEvent, merge } from 'rxjs';
|
|
11
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
13
|
import { detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
13
|
-
import { Subject, fromEvent, merge, Subscription } from 'rxjs';
|
|
14
14
|
import * as i2 from '@angular/common';
|
|
15
15
|
import { CommonModule } from '@angular/common';
|
|
16
16
|
import * as i3 from '@progress/kendo-angular-popup';
|
|
@@ -26,7 +26,7 @@ const packageMetadata = {
|
|
|
26
26
|
name: '@progress/kendo-angular-buttons',
|
|
27
27
|
productName: 'Kendo UI for Angular',
|
|
28
28
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
29
|
-
publishDate:
|
|
29
|
+
publishDate: 1649849126,
|
|
30
30
|
version: '',
|
|
31
31
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
32
32
|
};
|
|
@@ -95,17 +95,17 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
95
95
|
case 'size':
|
|
96
96
|
return {
|
|
97
97
|
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
98
|
-
toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` :
|
|
98
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
|
|
99
99
|
};
|
|
100
100
|
case 'rounded':
|
|
101
101
|
return {
|
|
102
102
|
toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
|
|
103
|
-
toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` :
|
|
103
|
+
toAdd: newValue !== 'none' ? `k-rounded-${ROUNDNESS[newValue]}` : ''
|
|
104
104
|
};
|
|
105
105
|
case 'fillMode':
|
|
106
106
|
return {
|
|
107
107
|
toRemove: `k-${componentType}-${previousValue}`,
|
|
108
|
-
toAdd: newValue ? `k-${componentType}-${newValue}` :
|
|
108
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${newValue}` : ''
|
|
109
109
|
};
|
|
110
110
|
default:
|
|
111
111
|
break;
|
|
@@ -119,7 +119,7 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
119
119
|
const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousValue, newValue) => {
|
|
120
120
|
return {
|
|
121
121
|
toRemove: `k-${componentType}-${prevFillMode}-${previousValue}`,
|
|
122
|
-
toAdd: newValue ? `k-${componentType}-${fillMode}-${newValue}` :
|
|
122
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${fillMode}-${newValue}` : ''
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
@@ -152,6 +152,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
152
152
|
}] });
|
|
153
153
|
|
|
154
154
|
const SPAN_TAG_NAME = 'SPAN';
|
|
155
|
+
const DEFAULT_ROUNDED$2 = 'medium';
|
|
156
|
+
const DEFAULT_SIZE$1 = 'medium';
|
|
157
|
+
const DEFAULT_THEME_COLOR$1 = 'base';
|
|
158
|
+
const DEFAULT_FILL_MODE$2 = 'solid';
|
|
155
159
|
/**
|
|
156
160
|
* Represents the Kendo UI Button component for Angular.
|
|
157
161
|
*/
|
|
@@ -181,16 +185,15 @@ class ButtonDirective {
|
|
|
181
185
|
this.isDisabled = false;
|
|
182
186
|
this.isIcon = false;
|
|
183
187
|
this.isIconClass = false;
|
|
184
|
-
this._size =
|
|
185
|
-
this._rounded =
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
188
|
-
this._themeColor = 'base';
|
|
188
|
+
this._size = DEFAULT_SIZE$1;
|
|
189
|
+
this._rounded = DEFAULT_ROUNDED$2;
|
|
190
|
+
this._fillMode = DEFAULT_FILL_MODE$2;
|
|
191
|
+
this._themeColor = DEFAULT_THEME_COLOR$1;
|
|
189
192
|
this._focused = false;
|
|
190
|
-
this.
|
|
193
|
+
this.subs = new Subscription();
|
|
191
194
|
validatePackage(packageMetadata);
|
|
192
195
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
193
|
-
this.
|
|
196
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
194
197
|
this.element = element.nativeElement;
|
|
195
198
|
this.renderer = renderer;
|
|
196
199
|
}
|
|
@@ -291,14 +294,15 @@ class ButtonDirective {
|
|
|
291
294
|
* ([see example]({% slug appearance_button %}#toc-size)).
|
|
292
295
|
*
|
|
293
296
|
* The possible values are:
|
|
294
|
-
* * `
|
|
295
|
-
* * `
|
|
296
|
-
* * `
|
|
297
|
-
* * `
|
|
297
|
+
* * `small`
|
|
298
|
+
* * `medium` (default)
|
|
299
|
+
* * `large`
|
|
300
|
+
* * `none`
|
|
298
301
|
*/
|
|
299
302
|
set size(size) {
|
|
300
|
-
|
|
301
|
-
this.
|
|
303
|
+
const newSize = size ? size : DEFAULT_SIZE$1;
|
|
304
|
+
this.handleClasses(newSize, 'size');
|
|
305
|
+
this._size = newSize;
|
|
302
306
|
}
|
|
303
307
|
get size() {
|
|
304
308
|
return this._size;
|
|
@@ -308,15 +312,16 @@ class ButtonDirective {
|
|
|
308
312
|
* ([see example]({% slug appearance_button %}#toc-rounded)).
|
|
309
313
|
*
|
|
310
314
|
* The possible values are:
|
|
311
|
-
* * `
|
|
312
|
-
* * `
|
|
313
|
-
* * `
|
|
314
|
-
* * `
|
|
315
|
-
* * `
|
|
315
|
+
* * `small`
|
|
316
|
+
* * `medium` (default)
|
|
317
|
+
* * `large`
|
|
318
|
+
* * `full`
|
|
319
|
+
* * `none`
|
|
316
320
|
*/
|
|
317
321
|
set rounded(rounded) {
|
|
318
|
-
|
|
319
|
-
this.
|
|
322
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED$2;
|
|
323
|
+
this.handleClasses(newRounded, 'rounded');
|
|
324
|
+
this._rounded = newRounded;
|
|
320
325
|
}
|
|
321
326
|
get rounded() {
|
|
322
327
|
return this._rounded;
|
|
@@ -326,16 +331,17 @@ class ButtonDirective {
|
|
|
326
331
|
* ([see example]({% slug appearance_button %}#toc-fillMode)).
|
|
327
332
|
*
|
|
328
333
|
* The possible values are:
|
|
329
|
-
* * `
|
|
330
|
-
* * `
|
|
331
|
-
* * `
|
|
332
|
-
* * `
|
|
333
|
-
* * `
|
|
334
|
-
* * `
|
|
334
|
+
* * `flat`
|
|
335
|
+
* * `solid` (default)
|
|
336
|
+
* * `outline`
|
|
337
|
+
* * `clear`
|
|
338
|
+
* * `link`
|
|
339
|
+
* * `none`
|
|
335
340
|
*/
|
|
336
341
|
set fillMode(fillMode) {
|
|
337
|
-
|
|
338
|
-
this.
|
|
342
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE$2;
|
|
343
|
+
this.handleClasses(newFillMode, 'fillMode');
|
|
344
|
+
this._fillMode = newFillMode;
|
|
339
345
|
}
|
|
340
346
|
get fillMode() {
|
|
341
347
|
return this._fillMode;
|
|
@@ -346,41 +352,27 @@ class ButtonDirective {
|
|
|
346
352
|
* ([see example]({% slug appearance_button %}#toc-themeColor)).
|
|
347
353
|
*
|
|
348
354
|
* The possible values are:
|
|
349
|
-
* * `
|
|
350
|
-
* * `
|
|
351
|
-
* * `
|
|
352
|
-
* * `
|
|
353
|
-
* * `
|
|
354
|
-
* * `
|
|
355
|
-
* * `
|
|
356
|
-
* * `
|
|
357
|
-
* * `
|
|
358
|
-
* * `
|
|
359
|
-
* * `
|
|
355
|
+
* * `base` (default)
|
|
356
|
+
* * `primary`
|
|
357
|
+
* * `secondary`
|
|
358
|
+
* * `tertiary`
|
|
359
|
+
* * `info`
|
|
360
|
+
* * `success`
|
|
361
|
+
* * `warning`
|
|
362
|
+
* * `error`
|
|
363
|
+
* * `dark`
|
|
364
|
+
* * `light`
|
|
365
|
+
* * `inverse`
|
|
366
|
+
* * `none`
|
|
360
367
|
*/
|
|
361
368
|
set themeColor(themeColor) {
|
|
362
|
-
|
|
363
|
-
this.
|
|
369
|
+
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR$1;
|
|
370
|
+
this.handleThemeColor(newThemeColor);
|
|
371
|
+
this._themeColor = newThemeColor;
|
|
364
372
|
}
|
|
365
373
|
get themeColor() {
|
|
366
374
|
return this._themeColor;
|
|
367
375
|
}
|
|
368
|
-
/**
|
|
369
|
-
* @hidden
|
|
370
|
-
*
|
|
371
|
-
* The shape property specifies if the Button will form a rectangle or square.
|
|
372
|
-
* ([see example]({% slug appearance_button %}#toc-shape)).
|
|
373
|
-
*
|
|
374
|
-
* The possible values are:
|
|
375
|
-
* * `'square'`
|
|
376
|
-
* * `'rectangle'` (default)
|
|
377
|
-
*/
|
|
378
|
-
set shape(shape) {
|
|
379
|
-
this._shape = shape;
|
|
380
|
-
}
|
|
381
|
-
get shape() {
|
|
382
|
-
return this._shape;
|
|
383
|
-
}
|
|
384
376
|
set isFocused(isFocused) {
|
|
385
377
|
this.toggleClass('k-focus', isFocused);
|
|
386
378
|
this._focused = isFocused;
|
|
@@ -447,8 +439,8 @@ class ButtonDirective {
|
|
|
447
439
|
this.setAttribute('role', this.role);
|
|
448
440
|
}
|
|
449
441
|
this.ngZone.runOutsideAngular(() => {
|
|
450
|
-
this.
|
|
451
|
-
this.
|
|
442
|
+
this.subs.add(this.renderer.listen(this.element, 'click', this._onButtonClick.bind(this)));
|
|
443
|
+
this.subs.add(this.renderer.listen(this.element, 'keydown', (event) => {
|
|
452
444
|
const isSpaceOrEnter = event.keyCode === Keys.Space || event.keyCode === Keys.Enter;
|
|
453
445
|
if (isSpan && isSpaceOrEnter) {
|
|
454
446
|
this.click.emit(event);
|
|
@@ -476,9 +468,8 @@ class ButtonDirective {
|
|
|
476
468
|
this.iconNode = null;
|
|
477
469
|
this.iconSpanNode = null;
|
|
478
470
|
this.renderer = null;
|
|
479
|
-
this.
|
|
471
|
+
this.subs.unsubscribe();
|
|
480
472
|
clearTimeout(this.deferTimeout);
|
|
481
|
-
this.domEvents.forEach(unbindHandler => unbindHandler());
|
|
482
473
|
}
|
|
483
474
|
/**
|
|
484
475
|
* Focuses the Button component.
|
|
@@ -661,7 +652,7 @@ class ButtonDirective {
|
|
|
661
652
|
const addFillMode = fillMode ? fillMode : this.fillMode;
|
|
662
653
|
const themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
|
|
663
654
|
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
664
|
-
if (addFillMode !==
|
|
655
|
+
if (addFillMode !== 'none' && fillMode !== 'none') {
|
|
665
656
|
if (themeColorClass.toAdd) {
|
|
666
657
|
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
667
658
|
}
|
|
@@ -669,7 +660,7 @@ class ButtonDirective {
|
|
|
669
660
|
}
|
|
670
661
|
}
|
|
671
662
|
ButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: KendoButtonService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
672
|
-
ButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: { toggleable: "toggleable", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor",
|
|
663
|
+
ButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: { toggleable: "toggleable", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", role: "role", primary: "primary", look: "look" }, outputs: { selectedChange: "selectedChange", click: "click" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-button": "this.classButton", "class.k-toggle-button": "this.isToggleable", "attr.role": "this.roleSetter", "attr.aria-disabled": "this.classDisabled", "class.k-disabled": "this.classDisabled", "class.k-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
|
|
673
664
|
LocalizationService,
|
|
674
665
|
{
|
|
675
666
|
provide: L10N_PREFIX,
|
|
@@ -715,8 +706,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
715
706
|
type: Input
|
|
716
707
|
}], themeColor: [{
|
|
717
708
|
type: Input
|
|
718
|
-
}], shape: [{
|
|
719
|
-
type: Input
|
|
720
709
|
}], role: [{
|
|
721
710
|
type: Input
|
|
722
711
|
}], selectedChange: [{
|
|
@@ -801,8 +790,9 @@ class ButtonGroupComponent {
|
|
|
801
790
|
this.navigate = new EventEmitter();
|
|
802
791
|
this._tabIndex = 0;
|
|
803
792
|
this.currentTabIndex = 0;
|
|
793
|
+
this.subs = new Subscription();
|
|
804
794
|
validatePackage(packageMetadata);
|
|
805
|
-
this.
|
|
795
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
|
806
796
|
}
|
|
807
797
|
/**
|
|
808
798
|
* Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
@@ -867,7 +857,7 @@ class ButtonGroupComponent {
|
|
|
867
857
|
}
|
|
868
858
|
}
|
|
869
859
|
ngOnInit() {
|
|
870
|
-
this.
|
|
860
|
+
this.subs.add(this.service.buttonClicked$.subscribe((button) => {
|
|
871
861
|
let newSelectionValue;
|
|
872
862
|
if (this.isSelectionSingle()) {
|
|
873
863
|
newSelectionValue = true;
|
|
@@ -881,7 +871,7 @@ class ButtonGroupComponent {
|
|
|
881
871
|
button.setSelected(newSelectionValue);
|
|
882
872
|
}
|
|
883
873
|
button.setAttribute(tabindex, '0');
|
|
884
|
-
});
|
|
874
|
+
}));
|
|
885
875
|
}
|
|
886
876
|
ngOnChanges(change) {
|
|
887
877
|
if (isChanged('disabled', change)) {
|
|
@@ -909,8 +899,7 @@ class ButtonGroupComponent {
|
|
|
909
899
|
}
|
|
910
900
|
}
|
|
911
901
|
ngOnDestroy() {
|
|
912
|
-
this.
|
|
913
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
902
|
+
this.subs.unsubscribe();
|
|
914
903
|
}
|
|
915
904
|
ngAfterContentChecked() {
|
|
916
905
|
this.verifySettings();
|
|
@@ -1160,6 +1149,7 @@ class FocusableDirective {
|
|
|
1160
1149
|
constructor(focusService, elementRef, renderer) {
|
|
1161
1150
|
this.focusService = focusService;
|
|
1162
1151
|
this.renderer = renderer;
|
|
1152
|
+
this.subs = new Subscription();
|
|
1163
1153
|
this.element = elementRef.nativeElement;
|
|
1164
1154
|
this.subscribeEvents();
|
|
1165
1155
|
}
|
|
@@ -1175,13 +1165,13 @@ class FocusableDirective {
|
|
|
1175
1165
|
* @hidden
|
|
1176
1166
|
*/
|
|
1177
1167
|
ngOnDestroy() {
|
|
1178
|
-
this.
|
|
1168
|
+
this.subs.unsubscribe();
|
|
1179
1169
|
}
|
|
1180
1170
|
subscribeEvents() {
|
|
1181
1171
|
if (!isDocumentAvailable()) {
|
|
1182
1172
|
return;
|
|
1183
1173
|
}
|
|
1184
|
-
this.
|
|
1174
|
+
this.subs.add(this.focusService.onFocus.subscribe((index) => {
|
|
1185
1175
|
if (this.index === index) {
|
|
1186
1176
|
this.renderer.addClass(this.element, 'k-focus');
|
|
1187
1177
|
this.element.focus();
|
|
@@ -1189,15 +1179,7 @@ class FocusableDirective {
|
|
|
1189
1179
|
else {
|
|
1190
1180
|
this.renderer.removeClass(this.element, 'k-focus');
|
|
1191
1181
|
}
|
|
1192
|
-
});
|
|
1193
|
-
}
|
|
1194
|
-
unsubscribeEvents() {
|
|
1195
|
-
if (!isDocumentAvailable()) {
|
|
1196
|
-
return;
|
|
1197
|
-
}
|
|
1198
|
-
if (this.focusSubscription) {
|
|
1199
|
-
this.focusSubscription.unsubscribe();
|
|
1200
|
-
}
|
|
1182
|
+
}));
|
|
1201
1183
|
}
|
|
1202
1184
|
}
|
|
1203
1185
|
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusableDirective, deps: [{ token: FocusService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -1613,11 +1595,12 @@ class ListButton {
|
|
|
1613
1595
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
1614
1596
|
this.listId = guid();
|
|
1615
1597
|
this._isFocused = false;
|
|
1598
|
+
this.subs = new Subscription();
|
|
1616
1599
|
validatePackage(packageMetadata);
|
|
1617
1600
|
this.focusService = focusService;
|
|
1618
1601
|
this.navigationService = navigationService;
|
|
1619
1602
|
this.wrapper = wrapperRef.nativeElement;
|
|
1620
|
-
this.
|
|
1603
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
1621
1604
|
this.subscribeEvents();
|
|
1622
1605
|
}
|
|
1623
1606
|
get popupClasses() {
|
|
@@ -1654,12 +1637,9 @@ class ListButton {
|
|
|
1654
1637
|
}
|
|
1655
1638
|
ngOnDestroy() {
|
|
1656
1639
|
this.openState = false;
|
|
1657
|
-
this.unsubscribeEvents();
|
|
1658
1640
|
clearTimeout(this.focusFirstTimeout);
|
|
1659
1641
|
clearTimeout(this.blurTimeout);
|
|
1660
|
-
|
|
1661
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
1662
|
-
}
|
|
1642
|
+
this.subs.unsubscribe();
|
|
1663
1643
|
}
|
|
1664
1644
|
subscribeEvents() {
|
|
1665
1645
|
if (!isDocumentAvailable()) {
|
|
@@ -1670,25 +1650,25 @@ class ListButton {
|
|
|
1670
1650
|
this.subscribeNavigationEvents();
|
|
1671
1651
|
}
|
|
1672
1652
|
subscribeListItemFocusEvent() {
|
|
1673
|
-
this.
|
|
1653
|
+
this.subs.add(this.focusService.onFocus.subscribe(() => {
|
|
1674
1654
|
this._isFocused = true;
|
|
1675
|
-
});
|
|
1655
|
+
}));
|
|
1676
1656
|
}
|
|
1677
1657
|
subscribeComponentBlurredEvent() {
|
|
1678
1658
|
this._zone.runOutsideAngular(() => {
|
|
1679
|
-
this.
|
|
1680
|
-
this.
|
|
1659
|
+
this.subs.add(this.navigationService.tab.pipe(filter(() => this._isFocused)).subscribe(this.handleTab.bind(this)));
|
|
1660
|
+
this.subs.add(fromEvent(document, 'click')
|
|
1681
1661
|
.pipe(filter((event) => !this.wrapperContains(event.target)), filter(() => this._isFocused))
|
|
1682
|
-
.subscribe(() => this._zone.run(() => this.blurWrapper()));
|
|
1662
|
+
.subscribe(() => this._zone.run(() => this.blurWrapper())));
|
|
1683
1663
|
});
|
|
1684
1664
|
}
|
|
1685
1665
|
subscribeNavigationEvents() {
|
|
1686
|
-
this.
|
|
1687
|
-
this.
|
|
1666
|
+
this.subs.add(this.navigationService.navigate.subscribe(this.focusService.focus.bind(this.focusService)));
|
|
1667
|
+
this.subs.add(this.navigationService.enterup.subscribe(() => {
|
|
1688
1668
|
this.enterHandler();
|
|
1689
1669
|
this.focusWrapper();
|
|
1690
|
-
});
|
|
1691
|
-
this.
|
|
1670
|
+
}));
|
|
1671
|
+
this.subs.add(this.navigationService.open.subscribe(() => {
|
|
1692
1672
|
if (!this._open) {
|
|
1693
1673
|
this.togglePopupVisibility();
|
|
1694
1674
|
this.focusFirstItem();
|
|
@@ -1696,28 +1676,10 @@ class ListButton {
|
|
|
1696
1676
|
else {
|
|
1697
1677
|
this.focusWrapper();
|
|
1698
1678
|
}
|
|
1699
|
-
});
|
|
1700
|
-
this.
|
|
1679
|
+
}));
|
|
1680
|
+
this.subs.add(merge(this.navigationService.close, this.navigationService.esc).subscribe(() => this.focusWrapper()));
|
|
1701
1681
|
}
|
|
1702
1682
|
enterHandler() { } // eslint-disable-line
|
|
1703
|
-
unsubscribeEvents() {
|
|
1704
|
-
if (!isDocumentAvailable()) {
|
|
1705
|
-
return;
|
|
1706
|
-
}
|
|
1707
|
-
this.unsubscribe(this.componentBlurredSubscription);
|
|
1708
|
-
this.unsubscribe(this.focusSubscription);
|
|
1709
|
-
this.unsubscribe(this.navigationSubscription);
|
|
1710
|
-
this.unsubscribe(this.enterPressSubscription);
|
|
1711
|
-
this.unsubscribe(this.enterUpSubscription);
|
|
1712
|
-
this.unsubscribe(this.openSubscription);
|
|
1713
|
-
this.unsubscribe(this.closeSubscription);
|
|
1714
|
-
this.unsubscribe(this.tabSubscription);
|
|
1715
|
-
}
|
|
1716
|
-
unsubscribe(subscription) {
|
|
1717
|
-
if (subscription) {
|
|
1718
|
-
subscription.unsubscribe();
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
1683
|
/**
|
|
1722
1684
|
* @hidden
|
|
1723
1685
|
*/
|
|
@@ -1826,6 +1788,7 @@ Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.
|
|
|
1826
1788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, decorators: [{
|
|
1827
1789
|
type: Directive,
|
|
1828
1790
|
args: [{
|
|
1791
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1829
1792
|
selector: 'kendo-splitbutton-messages-base'
|
|
1830
1793
|
}]
|
|
1831
1794
|
}], propDecorators: { splitButtonLabel: [{
|
|
@@ -1868,6 +1831,8 @@ const NAVIGATION_SETTINGS_PROVIDER$2 = {
|
|
|
1868
1831
|
provide: NAVIGATION_CONFIG,
|
|
1869
1832
|
useValue: NAVIGATION_SETTINGS$2
|
|
1870
1833
|
};
|
|
1834
|
+
const DEFAULT_ROUNDED$1 = 'medium';
|
|
1835
|
+
const DEFAULT_FILL_MODE$1 = 'solid';
|
|
1871
1836
|
/**
|
|
1872
1837
|
* Represents the Kendo UI SplitButton component for Angular.
|
|
1873
1838
|
*
|
|
@@ -1944,10 +1909,10 @@ class SplitButtonComponent extends ListButton {
|
|
|
1944
1909
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-size)).
|
|
1945
1910
|
*
|
|
1946
1911
|
* The possible values are:
|
|
1947
|
-
* * `
|
|
1948
|
-
* * `
|
|
1949
|
-
* * `
|
|
1950
|
-
* * `
|
|
1912
|
+
* * `small`
|
|
1913
|
+
* * `medium` (default)
|
|
1914
|
+
* * `large`
|
|
1915
|
+
* * `none`
|
|
1951
1916
|
*/
|
|
1952
1917
|
this.size = 'medium';
|
|
1953
1918
|
/**
|
|
@@ -1967,6 +1932,7 @@ class SplitButtonComponent extends ListButton {
|
|
|
1967
1932
|
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
1968
1933
|
* * `light`— Applies coloring based on the `light` theme color.
|
|
1969
1934
|
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
1935
|
+
* * `none`— Removes the built in theme color.
|
|
1970
1936
|
*/
|
|
1971
1937
|
this.themeColor = 'base';
|
|
1972
1938
|
/**
|
|
@@ -2053,8 +2019,9 @@ class SplitButtonComponent extends ListButton {
|
|
|
2053
2019
|
this.listId = guid();
|
|
2054
2020
|
this.buttonText = '';
|
|
2055
2021
|
this.lockFocus = false;
|
|
2056
|
-
this._rounded =
|
|
2057
|
-
this._fillMode =
|
|
2022
|
+
this._rounded = DEFAULT_ROUNDED$1;
|
|
2023
|
+
this._fillMode = DEFAULT_FILL_MODE$1;
|
|
2024
|
+
this.popupSubs = new Subscription();
|
|
2058
2025
|
this._itemClick = this.itemClick;
|
|
2059
2026
|
this._blur = this.onBlur;
|
|
2060
2027
|
}
|
|
@@ -2063,15 +2030,16 @@ class SplitButtonComponent extends ListButton {
|
|
|
2063
2030
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
2064
2031
|
*
|
|
2065
2032
|
* The possible values are:
|
|
2066
|
-
* * `
|
|
2067
|
-
* * `
|
|
2068
|
-
* * `
|
|
2069
|
-
* * `
|
|
2070
|
-
* * `
|
|
2033
|
+
* * `small`
|
|
2034
|
+
* * `medium` (default)
|
|
2035
|
+
* * `large`
|
|
2036
|
+
* * `full`
|
|
2037
|
+
* * `none`
|
|
2071
2038
|
*/
|
|
2072
2039
|
set rounded(rounded) {
|
|
2073
|
-
|
|
2074
|
-
this.
|
|
2040
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED$1;
|
|
2041
|
+
this.handleClasses(newRounded, 'rounded');
|
|
2042
|
+
this._rounded = newRounded;
|
|
2075
2043
|
}
|
|
2076
2044
|
get rounded() {
|
|
2077
2045
|
return this._rounded;
|
|
@@ -2087,7 +2055,8 @@ class SplitButtonComponent extends ListButton {
|
|
|
2087
2055
|
* * `link`
|
|
2088
2056
|
*/
|
|
2089
2057
|
set fillMode(fillMode) {
|
|
2090
|
-
|
|
2058
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE$1;
|
|
2059
|
+
this._fillMode = fillMode === 'clear' ? 'flat' : newFillMode;
|
|
2091
2060
|
}
|
|
2092
2061
|
get fillMode() {
|
|
2093
2062
|
return this._fillMode;
|
|
@@ -2402,11 +2371,12 @@ class SplitButtonComponent extends ListButton {
|
|
|
2402
2371
|
popupAlign: this.popupAlign,
|
|
2403
2372
|
popupClass: this.popupClasses
|
|
2404
2373
|
});
|
|
2405
|
-
this.popupRef.popupAnchorViewportLeave.subscribe(() => (this.openState = false));
|
|
2406
|
-
this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
|
|
2374
|
+
this.popupSubs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => (this.openState = false)));
|
|
2375
|
+
this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)));
|
|
2407
2376
|
}
|
|
2408
2377
|
destroyPopup() {
|
|
2409
2378
|
if (this.popupRef) {
|
|
2379
|
+
this.popupSubs.unsubscribe();
|
|
2410
2380
|
this.popupRef.close();
|
|
2411
2381
|
this.popupRef = null;
|
|
2412
2382
|
}
|
|
@@ -2477,7 +2447,7 @@ SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
2477
2447
|
[size]="size"
|
|
2478
2448
|
[rounded]="rounded"
|
|
2479
2449
|
[fillMode]="fillMode"
|
|
2480
|
-
[themeColor]="
|
|
2450
|
+
[themeColor]="themeColor"
|
|
2481
2451
|
[tabindex]="-1"
|
|
2482
2452
|
(click)="onArrowButtonClick()"
|
|
2483
2453
|
(mousedown)="toggleArrowButtonActiveState(true)"
|
|
@@ -2499,7 +2469,7 @@ SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
2499
2469
|
</kendo-button-list>
|
|
2500
2470
|
</ng-template>
|
|
2501
2471
|
<ng-container #container></ng-container>
|
|
2502
|
-
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "
|
|
2472
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2503
2473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
2504
2474
|
type: Component,
|
|
2505
2475
|
args: [{
|
|
@@ -2560,7 +2530,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2560
2530
|
[size]="size"
|
|
2561
2531
|
[rounded]="rounded"
|
|
2562
2532
|
[fillMode]="fillMode"
|
|
2563
|
-
[themeColor]="
|
|
2533
|
+
[themeColor]="themeColor"
|
|
2564
2534
|
[tabindex]="-1"
|
|
2565
2535
|
(click)="onArrowButtonClick()"
|
|
2566
2536
|
(mousedown)="toggleArrowButtonActiveState(true)"
|
|
@@ -2729,6 +2699,7 @@ const NAVIGATION_SETTINGS_PROVIDER$1 = {
|
|
|
2729
2699
|
provide: NAVIGATION_CONFIG,
|
|
2730
2700
|
useValue: NAVIGATION_SETTINGS$1
|
|
2731
2701
|
};
|
|
2702
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
2732
2703
|
/**
|
|
2733
2704
|
* Represents the Kendo UI DropDownButton component for Angular.
|
|
2734
2705
|
*
|
|
@@ -2779,34 +2750,22 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2779
2750
|
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)).
|
|
2780
2751
|
*
|
|
2781
2752
|
* The possible values are:
|
|
2782
|
-
* * `
|
|
2783
|
-
* * `
|
|
2784
|
-
* * `
|
|
2785
|
-
* * `
|
|
2753
|
+
* * `small`
|
|
2754
|
+
* * `medium` (default)
|
|
2755
|
+
* * `large`
|
|
2756
|
+
* * `none`
|
|
2786
2757
|
*/
|
|
2787
2758
|
this.size = 'medium';
|
|
2788
|
-
/**
|
|
2789
|
-
* @hidden
|
|
2790
|
-
*
|
|
2791
|
-
* The shape property specifies if the DropDownButton will be a square or rectangle.
|
|
2792
|
-
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)).
|
|
2793
|
-
*
|
|
2794
|
-
* The possible values are:
|
|
2795
|
-
* * `'rectangle'` (default)
|
|
2796
|
-
* * `'square'`
|
|
2797
|
-
* * `null`
|
|
2798
|
-
*/
|
|
2799
|
-
this.shape = 'rectangle';
|
|
2800
2759
|
/**
|
|
2801
2760
|
* The rounded property specifies the border radius of the DropDownButton
|
|
2802
2761
|
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)).
|
|
2803
2762
|
*
|
|
2804
2763
|
* The possible values are:
|
|
2805
|
-
* * `
|
|
2806
|
-
* * `
|
|
2807
|
-
* * `
|
|
2808
|
-
* * `
|
|
2809
|
-
* * `
|
|
2764
|
+
* * `small`
|
|
2765
|
+
* * `medium` (default)
|
|
2766
|
+
* * `large`
|
|
2767
|
+
* * `full`
|
|
2768
|
+
* * `none`
|
|
2810
2769
|
*/
|
|
2811
2770
|
this.rounded = 'medium';
|
|
2812
2771
|
/**
|
|
@@ -2826,7 +2785,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2826
2785
|
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
2827
2786
|
* * `light`— Applies coloring based on the `light` theme color.
|
|
2828
2787
|
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
2829
|
-
* * `
|
|
2788
|
+
* * `none` —Removes the default CSS class (no class would be rendered).
|
|
2830
2789
|
*/
|
|
2831
2790
|
this.themeColor = 'base';
|
|
2832
2791
|
/**
|
|
@@ -2856,7 +2815,8 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2856
2815
|
*/
|
|
2857
2816
|
this.onBlur = new EventEmitter();
|
|
2858
2817
|
this.listId = guid();
|
|
2859
|
-
this._fillMode =
|
|
2818
|
+
this._fillMode = DEFAULT_FILL_MODE;
|
|
2819
|
+
this.popupSubs = new Subscription();
|
|
2860
2820
|
this._itemClick = this.itemClick;
|
|
2861
2821
|
this._blur = this.onBlur;
|
|
2862
2822
|
}
|
|
@@ -2907,7 +2867,7 @@ class DropDownButtonComponent extends ListButton {
|
|
|
2907
2867
|
* * `flat`
|
|
2908
2868
|
* * `outline`
|
|
2909
2869
|
* * `link`
|
|
2910
|
-
* * `
|
|
2870
|
+
* * `none`
|
|
2911
2871
|
*/
|
|
2912
2872
|
set fillMode(fillMode) {
|
|
2913
2873
|
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
@@ -3108,11 +3068,11 @@ class DropDownButtonComponent extends ListButton {
|
|
|
3108
3068
|
|| (this.popupRef && this.popupRef.popupElement.contains(element));
|
|
3109
3069
|
}
|
|
3110
3070
|
subscribeNavigationEvents() {
|
|
3111
|
-
this.
|
|
3112
|
-
.subscribe(this.onArrowKeyNavigate.bind(this));
|
|
3113
|
-
this.
|
|
3114
|
-
this.
|
|
3115
|
-
this.
|
|
3071
|
+
this.subs.add(this.navigationService.navigate
|
|
3072
|
+
.subscribe(this.onArrowKeyNavigate.bind(this)));
|
|
3073
|
+
this.subs.add(this.navigationService.enterup.subscribe(this.onNavigationEnterUp.bind(this)));
|
|
3074
|
+
this.subs.add(this.navigationService.open.subscribe(this.onNavigationOpen.bind(this)));
|
|
3075
|
+
this.subs.add(merge(this.navigationService.close, this.navigationService.esc).subscribe(this.onNavigationClose.bind(this)));
|
|
3116
3076
|
}
|
|
3117
3077
|
onNavigationEnterUp() {
|
|
3118
3078
|
if (!this._disabled && !this.openState) {
|
|
@@ -3165,18 +3125,19 @@ class DropDownButtonComponent extends ListButton {
|
|
|
3165
3125
|
popupAlign: this.popupAlign,
|
|
3166
3126
|
popupClass: this.popupClasses
|
|
3167
3127
|
});
|
|
3168
|
-
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false);
|
|
3169
|
-
this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
|
|
3128
|
+
this.popupSubs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false));
|
|
3129
|
+
this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)));
|
|
3170
3130
|
}
|
|
3171
3131
|
destroyPopup() {
|
|
3172
3132
|
if (this.popupRef) {
|
|
3173
3133
|
this.popupRef.close();
|
|
3174
3134
|
this.popupRef = null;
|
|
3135
|
+
this.popupSubs.unsubscribe();
|
|
3175
3136
|
}
|
|
3176
3137
|
}
|
|
3177
3138
|
}
|
|
3178
3139
|
DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonComponent, deps: [{ token: FocusService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3179
|
-
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: { icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", textField: "textField", disabled: "disabled", data: "data", size: "size",
|
|
3140
|
+
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: { icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", textField: "textField", disabled: "disabled", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", tabIndex: "tabIndex" }, outputs: { itemClick: "itemClick", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "class.k-dropdown-button": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
|
|
3180
3141
|
FocusService,
|
|
3181
3142
|
NavigationService,
|
|
3182
3143
|
NAVIGATION_SETTINGS_PROVIDER$1,
|
|
@@ -3227,7 +3188,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
3227
3188
|
</kendo-button-list>
|
|
3228
3189
|
</ng-template>
|
|
3229
3190
|
<ng-container #container></ng-container>
|
|
3230
|
-
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "
|
|
3191
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3231
3192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
3232
3193
|
type: Component,
|
|
3233
3194
|
args: [{
|
|
@@ -3303,8 +3264,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3303
3264
|
type: Input
|
|
3304
3265
|
}], size: [{
|
|
3305
3266
|
type: Input
|
|
3306
|
-
}], shape: [{
|
|
3307
|
-
type: Input
|
|
3308
3267
|
}], rounded: [{
|
|
3309
3268
|
type: Input
|
|
3310
3269
|
}], fillMode: [{
|
|
@@ -3430,6 +3389,7 @@ class ChipComponent {
|
|
|
3430
3389
|
this._fillMode = 'solid';
|
|
3431
3390
|
this._themeColor = 'base';
|
|
3432
3391
|
this.focused = false;
|
|
3392
|
+
this.subs = new Subscription();
|
|
3433
3393
|
validatePackage(packageMetadata);
|
|
3434
3394
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
3435
3395
|
}
|
|
@@ -3438,14 +3398,16 @@ class ChipComponent {
|
|
|
3438
3398
|
* ([see example]({% slug appearance_chip %}#toc-size)).
|
|
3439
3399
|
*
|
|
3440
3400
|
* The possible values are:
|
|
3441
|
-
* * `
|
|
3442
|
-
* * `
|
|
3443
|
-
* * `
|
|
3444
|
-
* * `
|
|
3401
|
+
* * `small`
|
|
3402
|
+
* * `medium` (default)
|
|
3403
|
+
* * `large`
|
|
3404
|
+
* * `none`
|
|
3445
3405
|
*/
|
|
3446
3406
|
set size(size) {
|
|
3447
|
-
|
|
3448
|
-
|
|
3407
|
+
if (isPresent(size)) {
|
|
3408
|
+
this._size = size;
|
|
3409
|
+
}
|
|
3410
|
+
this.handleClasses(this._size, 'size');
|
|
3449
3411
|
}
|
|
3450
3412
|
get size() {
|
|
3451
3413
|
return this._size;
|
|
@@ -3455,15 +3417,17 @@ class ChipComponent {
|
|
|
3455
3417
|
* ([see example]({% slug appearance_chip %}#toc-rounded)).
|
|
3456
3418
|
*
|
|
3457
3419
|
* The possible values are:
|
|
3458
|
-
* * `
|
|
3459
|
-
* * `
|
|
3460
|
-
* * `
|
|
3461
|
-
* * `
|
|
3462
|
-
* * `
|
|
3420
|
+
* * `small`
|
|
3421
|
+
* * `medium` (default)
|
|
3422
|
+
* * `large`
|
|
3423
|
+
* * `full`
|
|
3424
|
+
* * `none`
|
|
3463
3425
|
*/
|
|
3464
3426
|
set rounded(rounded) {
|
|
3465
|
-
|
|
3466
|
-
|
|
3427
|
+
if (isPresent(rounded)) {
|
|
3428
|
+
this._rounded = rounded;
|
|
3429
|
+
}
|
|
3430
|
+
this.handleClasses(this._rounded, 'rounded');
|
|
3467
3431
|
}
|
|
3468
3432
|
get rounded() {
|
|
3469
3433
|
return this._rounded;
|
|
@@ -3473,13 +3437,15 @@ class ChipComponent {
|
|
|
3473
3437
|
* ([see example]({% slug appearance_chip %}#toc-fillMode)).
|
|
3474
3438
|
*
|
|
3475
3439
|
* The possible values are:
|
|
3476
|
-
* * `
|
|
3477
|
-
* * `
|
|
3478
|
-
* * `
|
|
3440
|
+
* * `solid` (default)
|
|
3441
|
+
* * `outline`
|
|
3442
|
+
* * `none`
|
|
3479
3443
|
*/
|
|
3480
3444
|
set fillMode(fillMode) {
|
|
3481
|
-
|
|
3482
|
-
|
|
3445
|
+
if (isPresent(fillMode)) {
|
|
3446
|
+
this._fillMode = fillMode;
|
|
3447
|
+
}
|
|
3448
|
+
this.handleClasses(this._fillMode, 'fillMode');
|
|
3483
3449
|
}
|
|
3484
3450
|
get fillMode() {
|
|
3485
3451
|
return this._fillMode;
|
|
@@ -3490,16 +3456,18 @@ class ChipComponent {
|
|
|
3490
3456
|
* ([see example]({% slug appearance_chip %}#toc-themeColor)).
|
|
3491
3457
|
*
|
|
3492
3458
|
* The possible values are:
|
|
3493
|
-
* * `
|
|
3494
|
-
* * `
|
|
3495
|
-
* * `
|
|
3496
|
-
* * `
|
|
3497
|
-
* * `
|
|
3498
|
-
* * `
|
|
3459
|
+
* * `base` (default)
|
|
3460
|
+
* * `info`
|
|
3461
|
+
* * `success`
|
|
3462
|
+
* * `warning`
|
|
3463
|
+
* * `error`
|
|
3464
|
+
* * `none`
|
|
3499
3465
|
*/
|
|
3500
3466
|
set themeColor(themeColor) {
|
|
3501
|
-
|
|
3502
|
-
|
|
3467
|
+
if (isPresent(themeColor)) {
|
|
3468
|
+
this._themeColor = themeColor;
|
|
3469
|
+
}
|
|
3470
|
+
this.handleThemeColor(this._themeColor);
|
|
3503
3471
|
}
|
|
3504
3472
|
get themeColor() {
|
|
3505
3473
|
return this._themeColor;
|
|
@@ -3520,16 +3488,11 @@ class ChipComponent {
|
|
|
3520
3488
|
return this.focused;
|
|
3521
3489
|
}
|
|
3522
3490
|
ngOnInit() {
|
|
3523
|
-
this.
|
|
3524
|
-
.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
|
|
3491
|
+
this.subs.add(this.localizationService.changes
|
|
3492
|
+
.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
|
3525
3493
|
}
|
|
3526
3494
|
ngOnDestroy() {
|
|
3527
|
-
|
|
3528
|
-
this.dynamicRTLSubscription.unsubscribe();
|
|
3529
|
-
}
|
|
3530
|
-
if (this.detachDomEvents) {
|
|
3531
|
-
this.detachDomEvents();
|
|
3532
|
-
}
|
|
3495
|
+
this.subs.unsubscribe();
|
|
3533
3496
|
}
|
|
3534
3497
|
ngAfterViewInit() {
|
|
3535
3498
|
const chip = this.element.nativeElement;
|
|
@@ -3595,25 +3558,20 @@ class ChipComponent {
|
|
|
3595
3558
|
}
|
|
3596
3559
|
attachElementEventHandlers(chip) {
|
|
3597
3560
|
this.ngZone.runOutsideAngular(() => {
|
|
3598
|
-
|
|
3561
|
+
this.subs.add(this.renderer.listen(chip, 'focus', () => {
|
|
3599
3562
|
this.renderer.addClass(chip, 'k-focus');
|
|
3600
|
-
});
|
|
3601
|
-
|
|
3563
|
+
}));
|
|
3564
|
+
this.subs.add(this.renderer.listen(chip, 'blur', () => {
|
|
3602
3565
|
this.renderer.removeClass(chip, 'k-focus');
|
|
3603
|
-
});
|
|
3604
|
-
|
|
3566
|
+
}));
|
|
3567
|
+
this.subs.add(this.renderer.listen(chip, 'click', (e) => {
|
|
3605
3568
|
const isRemoveClicked = closest(e.target, '.k-chip-remove-action');
|
|
3606
3569
|
if (!isRemoveClicked) {
|
|
3607
3570
|
this.ngZone.run(() => {
|
|
3608
3571
|
this.contentClick.emit({ sender: this, originalEvent: e });
|
|
3609
3572
|
});
|
|
3610
3573
|
}
|
|
3611
|
-
});
|
|
3612
|
-
this.detachDomEvents = () => {
|
|
3613
|
-
focusListener();
|
|
3614
|
-
blurListener();
|
|
3615
|
-
contentClickListener();
|
|
3616
|
-
};
|
|
3574
|
+
}));
|
|
3617
3575
|
});
|
|
3618
3576
|
}
|
|
3619
3577
|
/**
|
|
@@ -3646,7 +3604,7 @@ class ChipComponent {
|
|
|
3646
3604
|
const addFillMode = fillMode ? fillMode : this.fillMode;
|
|
3647
3605
|
const themeColorClass = getThemeColorClasses('chip', removeFillMode, addFillMode, this.themeColor, value);
|
|
3648
3606
|
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
3649
|
-
if (addFillMode !==
|
|
3607
|
+
if (addFillMode !== 'none' && fillMode !== 'none') {
|
|
3650
3608
|
if (themeColorClass.toAdd) {
|
|
3651
3609
|
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
3652
3610
|
}
|
|
@@ -3849,11 +3807,12 @@ class ChipListComponent {
|
|
|
3849
3807
|
* * `'small'`
|
|
3850
3808
|
* * `'medium'` (default)
|
|
3851
3809
|
* * `'large'`
|
|
3852
|
-
* * `
|
|
3810
|
+
* * `none`
|
|
3853
3811
|
*/
|
|
3854
3812
|
set size(size) {
|
|
3855
|
-
|
|
3856
|
-
this.
|
|
3813
|
+
const sizeValue = size ? size : 'medium';
|
|
3814
|
+
this.handleClasses(sizeValue, 'size');
|
|
3815
|
+
this._size = sizeValue;
|
|
3857
3816
|
}
|
|
3858
3817
|
get size() {
|
|
3859
3818
|
return this._size;
|
|
@@ -4214,6 +4173,7 @@ DialItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
4214
4173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialItemComponent, decorators: [{
|
|
4215
4174
|
type: Component,
|
|
4216
4175
|
args: [{
|
|
4176
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
4217
4177
|
selector: '[kendoDialItem]',
|
|
4218
4178
|
template: `
|
|
4219
4179
|
<ng-template *ngIf="dialItemTemplate"
|
|
@@ -4309,6 +4269,7 @@ DialListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
4309
4269
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DialListComponent, decorators: [{
|
|
4310
4270
|
type: Component,
|
|
4311
4271
|
args: [{
|
|
4272
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
4312
4273
|
selector: '[kendoDialList]',
|
|
4313
4274
|
template: `
|
|
4314
4275
|
<ng-container *ngFor='let item of dialItems; let idx = index'>
|
|
@@ -4366,6 +4327,9 @@ const FILLMODE_CLASS = 'k-fab-solid';
|
|
|
4366
4327
|
const DEFAULT_DURATION = 180;
|
|
4367
4328
|
const DEFAULT_ITEM_GAP = 90;
|
|
4368
4329
|
const DEFAULT_OFFSET = '16px';
|
|
4330
|
+
const DEFAULT_ROUNDED = 'full';
|
|
4331
|
+
const DEFAULT_SIZE = 'medium';
|
|
4332
|
+
const DEFAULT_THEME_COLOR = 'primary';
|
|
4369
4333
|
/**
|
|
4370
4334
|
*
|
|
4371
4335
|
* Represents the [Kendo UI FloatingActionButton component for Angular]({% slug overview_floatingactionbutton %}).
|
|
@@ -4440,13 +4404,12 @@ class FloatingActionButtonComponent {
|
|
|
4440
4404
|
* @hidden
|
|
4441
4405
|
*/
|
|
4442
4406
|
this.id = `k-${guid()}`;
|
|
4443
|
-
this._themeColor =
|
|
4444
|
-
this._size =
|
|
4445
|
-
this.
|
|
4407
|
+
this._themeColor = DEFAULT_THEME_COLOR;
|
|
4408
|
+
this._size = DEFAULT_SIZE;
|
|
4409
|
+
this._rounded = DEFAULT_ROUNDED;
|
|
4446
4410
|
this._disabled = false;
|
|
4447
4411
|
this._align = { horizontal: 'end', vertical: 'bottom' };
|
|
4448
4412
|
this._offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
|
|
4449
|
-
this._rounded = 'full';
|
|
4450
4413
|
this.subscriptions = new Subscription();
|
|
4451
4414
|
this.rtl = false;
|
|
4452
4415
|
this.animationEnd = new EventEmitter();
|
|
@@ -4470,20 +4433,22 @@ class FloatingActionButtonComponent {
|
|
|
4470
4433
|
* The theme color will be applied as background color of the component.
|
|
4471
4434
|
*
|
|
4472
4435
|
* The possible values are:
|
|
4473
|
-
* * `
|
|
4474
|
-
* * `
|
|
4475
|
-
* * `
|
|
4476
|
-
* * `
|
|
4477
|
-
* * `
|
|
4478
|
-
* * `
|
|
4479
|
-
* * `
|
|
4480
|
-
* * `
|
|
4481
|
-
* * `
|
|
4482
|
-
* * `
|
|
4436
|
+
* * `primary` (Default)—Applies coloring based on the `primary` theme color.
|
|
4437
|
+
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
4438
|
+
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
4439
|
+
* * `info`—Applies coloring based on the `info` theme color.
|
|
4440
|
+
* * `success`— Applies coloring based on the `success` theme color.
|
|
4441
|
+
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
4442
|
+
* * `error`— Applies coloring based on the `error` theme color.
|
|
4443
|
+
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
4444
|
+
* * `light`— Applies coloring based on the `light` theme color.
|
|
4445
|
+
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
4446
|
+
* * `none`— Removes the built in theme color.
|
|
4483
4447
|
*/
|
|
4484
4448
|
set themeColor(themeColor) {
|
|
4485
|
-
|
|
4486
|
-
this.
|
|
4449
|
+
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR;
|
|
4450
|
+
this.handleClasses(newThemeColor, 'themeColor');
|
|
4451
|
+
this._themeColor = newThemeColor;
|
|
4487
4452
|
}
|
|
4488
4453
|
get themeColor() {
|
|
4489
4454
|
return this._themeColor;
|
|
@@ -4493,13 +4458,15 @@ class FloatingActionButtonComponent {
|
|
|
4493
4458
|
* ([see example]({% slug appearance_floatingactionbutton %}#toc-size)).
|
|
4494
4459
|
*
|
|
4495
4460
|
* The possible values are:
|
|
4496
|
-
* * `
|
|
4497
|
-
* * `
|
|
4498
|
-
* * `
|
|
4461
|
+
* * `small`
|
|
4462
|
+
* * `medium` (Default)
|
|
4463
|
+
* * `large`
|
|
4464
|
+
* * `none`
|
|
4499
4465
|
*/
|
|
4500
4466
|
set size(size) {
|
|
4501
|
-
|
|
4502
|
-
this.
|
|
4467
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
4468
|
+
this.handleClasses(newSize, 'size');
|
|
4469
|
+
this._size = newSize;
|
|
4503
4470
|
}
|
|
4504
4471
|
get size() {
|
|
4505
4472
|
return this._size;
|
|
@@ -4508,36 +4475,20 @@ class FloatingActionButtonComponent {
|
|
|
4508
4475
|
* The rounded property specifies the border radius of the FloatingActionButton.
|
|
4509
4476
|
*
|
|
4510
4477
|
* The possible values are:
|
|
4511
|
-
* * `
|
|
4512
|
-
* * `
|
|
4513
|
-
* * `
|
|
4514
|
-
* * `
|
|
4515
|
-
* * `
|
|
4478
|
+
* * `small`
|
|
4479
|
+
* * `medium`
|
|
4480
|
+
* * `large`
|
|
4481
|
+
* * `full` (default)
|
|
4482
|
+
* * `none`
|
|
4516
4483
|
*/
|
|
4517
4484
|
set rounded(rounded) {
|
|
4518
|
-
|
|
4519
|
-
this.
|
|
4485
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
4486
|
+
this.handleClasses(newRounded, 'rounded');
|
|
4487
|
+
this._rounded = newRounded;
|
|
4520
4488
|
}
|
|
4521
4489
|
get rounded() {
|
|
4522
4490
|
return this._rounded;
|
|
4523
4491
|
}
|
|
4524
|
-
/**
|
|
4525
|
-
* @hidden
|
|
4526
|
-
*
|
|
4527
|
-
* Specifies the shape of the FloatingActionButton
|
|
4528
|
-
* ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)).
|
|
4529
|
-
*
|
|
4530
|
-
* The possible values are:
|
|
4531
|
-
* * `rectangle` (Default)—Applies rectangular shape on the FloatingActionButton.
|
|
4532
|
-
* * `square`—Applies square shape on the FloatingActionButton.
|
|
4533
|
-
*
|
|
4534
|
-
*/
|
|
4535
|
-
set shape(shape) {
|
|
4536
|
-
this._shape = shape;
|
|
4537
|
-
}
|
|
4538
|
-
get shape() {
|
|
4539
|
-
return this._shape;
|
|
4540
|
-
}
|
|
4541
4492
|
/**
|
|
4542
4493
|
* Specifies whether the FloatingActionButton is disabled.
|
|
4543
4494
|
*/
|
|
@@ -4629,7 +4580,12 @@ class FloatingActionButtonComponent {
|
|
|
4629
4580
|
if (this.disabled || shouldOpen === this.isOpen) {
|
|
4630
4581
|
return;
|
|
4631
4582
|
}
|
|
4632
|
-
|
|
4583
|
+
if (shouldOpen) {
|
|
4584
|
+
setTimeout(() => this.openDial());
|
|
4585
|
+
}
|
|
4586
|
+
else {
|
|
4587
|
+
this.closeDial();
|
|
4588
|
+
}
|
|
4633
4589
|
}
|
|
4634
4590
|
/**
|
|
4635
4591
|
* @hidden
|
|
@@ -4738,7 +4694,7 @@ class FloatingActionButtonComponent {
|
|
|
4738
4694
|
rounded: ROUNDED_CLASSES[this.rounded]
|
|
4739
4695
|
};
|
|
4740
4696
|
const classesToAdd = {
|
|
4741
|
-
themeColor: inputValue ? `${FILLMODE_CLASS}-${inputValue}` :
|
|
4697
|
+
themeColor: inputValue !== 'none' ? `${FILLMODE_CLASS}-${inputValue}` : '',
|
|
4742
4698
|
size: SIZE_CLASSES[inputValue],
|
|
4743
4699
|
rounded: ROUNDED_CLASSES[inputValue]
|
|
4744
4700
|
};
|
|
@@ -4805,11 +4761,21 @@ class FloatingActionButtonComponent {
|
|
|
4805
4761
|
return;
|
|
4806
4762
|
}
|
|
4807
4763
|
const event = new PreventableEvent();
|
|
4808
|
-
|
|
4764
|
+
if (open) {
|
|
4765
|
+
this.open.emit(event);
|
|
4766
|
+
}
|
|
4767
|
+
else {
|
|
4768
|
+
this.close.emit(event);
|
|
4769
|
+
}
|
|
4809
4770
|
if (event.isDefaultPrevented()) {
|
|
4810
4771
|
return;
|
|
4811
4772
|
}
|
|
4812
|
-
|
|
4773
|
+
if (open) {
|
|
4774
|
+
this.openDial();
|
|
4775
|
+
}
|
|
4776
|
+
else {
|
|
4777
|
+
this.closeDial();
|
|
4778
|
+
}
|
|
4813
4779
|
}
|
|
4814
4780
|
openPopup() {
|
|
4815
4781
|
if (this.isOpen) {
|
|
@@ -4980,7 +4946,7 @@ class FloatingActionButtonComponent {
|
|
|
4980
4946
|
}
|
|
4981
4947
|
}
|
|
4982
4948
|
FloatingActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingActionButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: FocusService }, { token: NavigationService }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i4.AnimationBuilder }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4983
|
-
FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: { themeColor: "themeColor", size: "size", rounded: "rounded",
|
|
4949
|
+
FloatingActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: { themeColor: "themeColor", size: "size", rounded: "rounded", disabled: "disabled", align: "align", offset: "offset", positionMode: "positionMode", icon: "icon", iconClass: "iconClass", buttonClass: "buttonClass", dialClass: "dialClass", text: "text", dialItemAnimation: "dialItemAnimation", tabIndex: "tabIndex", dialItems: "dialItems" }, outputs: { onBlur: "blur", onFocus: "focus", dialItemClick: "dialItemClick", open: "open", close: "close" }, host: { properties: { "class.k-pos-fixed": "this.fixedClass", "class.k-pos-absolute": "this.absoluteClass", "attr.dir": "this.direction" } }, providers: [
|
|
4984
4950
|
FocusService,
|
|
4985
4951
|
NavigationService,
|
|
4986
4952
|
NAVIGATION_SETTINGS_PROVIDER,
|
|
@@ -5123,8 +5089,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5123
5089
|
type: Input
|
|
5124
5090
|
}], rounded: [{
|
|
5125
5091
|
type: Input
|
|
5126
|
-
}], shape: [{
|
|
5127
|
-
type: Input
|
|
5128
5092
|
}], disabled: [{
|
|
5129
5093
|
type: Input
|
|
5130
5094
|
}], align: [{
|