@progress/kendo-angular-toolbar 17.0.0-develop.21 → 17.0.0-develop.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/common/fillmode.d.ts +1 -1
  2. package/common/size.d.ts +1 -1
  3. package/direction.d.ts +1 -1
  4. package/display-mode.d.ts +1 -1
  5. package/{esm2020 → esm2022}/common/preventable-event.mjs +1 -3
  6. package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
  7. package/{esm2020 → esm2022}/localization/localized-toolbar-messages.directive.mjs +9 -8
  8. package/{esm2020 → esm2022}/localization/messages.mjs +7 -3
  9. package/{esm2020 → esm2022}/navigation.service.mjs +9 -7
  10. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  11. package/{esm2020 → esm2022}/refresh.service.mjs +4 -6
  12. package/{esm2020 → esm2022}/renderer.component.mjs +22 -10
  13. package/{esm2020 → esm2022}/renderer.service.mjs +5 -3
  14. package/{esm2020 → esm2022}/toolbar.component.mjs +83 -61
  15. package/{esm2020 → esm2022}/toolbar.module.mjs +4 -4
  16. package/{esm2020 → esm2022}/tools/toolbar-button.component.mjs +106 -90
  17. package/{esm2020 → esm2022}/tools/toolbar-buttongroup.component.mjs +45 -29
  18. package/{esm2020 → esm2022}/tools/toolbar-dropdownbutton.component.mjs +112 -95
  19. package/{esm2020 → esm2022}/tools/toolbar-separator.component.mjs +7 -12
  20. package/{esm2020 → esm2022}/tools/toolbar-spacer.component.mjs +10 -16
  21. package/{esm2020 → esm2022}/tools/toolbar-splitbutton.component.mjs +117 -102
  22. package/{esm2020 → esm2022}/tools/toolbar-tool.component.mjs +23 -13
  23. package/{esm2020 → esm2022}/tools/tools.service.mjs +8 -10
  24. package/{fesm2020 → fesm2022}/progress-kendo-angular-toolbar.mjs +578 -477
  25. package/group-selection-settings.d.ts +1 -1
  26. package/localization/messages.d.ts +1 -1
  27. package/package.json +15 -21
  28. package/render-location.d.ts +1 -1
  29. package/renderer.component.d.ts +1 -1
  30. package/toolbar.component.d.ts +1 -1
  31. package/tools/toolbar-button.component.d.ts +2 -4
  32. package/tools/toolbar-buttongroup.component.d.ts +2 -4
  33. package/tools/toolbar-dropdownbutton.component.d.ts +2 -4
  34. package/tools/toolbar-separator.component.d.ts +1 -3
  35. package/tools/toolbar-spacer.component.d.ts +1 -3
  36. package/tools/toolbar-splitbutton.component.d.ts +2 -4
  37. package/tools/toolbar-tool.component.d.ts +3 -3
  38. package/fesm2015/progress-kendo-angular-toolbar.mjs +0 -3401
  39. /package/{esm2020 → esm2022}/common/fillmode.mjs +0 -0
  40. /package/{esm2020 → esm2022}/common/renderer-click.mjs +0 -0
  41. /package/{esm2020 → esm2022}/common/size.mjs +0 -0
  42. /package/{esm2020 → esm2022}/direction.mjs +0 -0
  43. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  44. /package/{esm2020 → esm2022}/display-mode.mjs +0 -0
  45. /package/{esm2020 → esm2022}/group-selection-settings.mjs +0 -0
  46. /package/{esm2020 → esm2022}/index.mjs +0 -0
  47. /package/{esm2020 → esm2022}/popup-settings.mjs +0 -0
  48. /package/{esm2020 → esm2022}/progress-kendo-angular-toolbar.mjs +0 -0
  49. /package/{esm2020 → esm2022}/render-location.mjs +0 -0
  50. /package/{esm2020 → esm2022}/tool-options.mjs +0 -0
  51. /package/{esm2020 → esm2022}/util.mjs +0 -0
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, TemplateRef, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef, isDevMode, NgZone } from '@angular/core';
5
+ import { Component, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef, isDevMode, NgZone } from '@angular/core';
6
6
  import { ToolBarToolComponent } from './toolbar-tool.component';
7
7
  import { getValueForLocation } from '../util';
8
8
  import { ButtonComponent } from '@progress/kendo-angular-buttons';
@@ -14,85 +14,8 @@ import * as i0 from "@angular/core";
14
14
  * Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
15
15
  */
16
16
  export class ToolBarButtonComponent extends ToolBarToolComponent {
17
- constructor(element, zone) {
18
- super();
19
- this.element = element;
20
- this.zone = zone;
21
- /**
22
- * Specifies where button icon should be displayed
23
- */
24
- this.showIcon = 'both';
25
- /**
26
- * Provides visual styling that indicates if the Button is active
27
- * ([see example]({% slug controltypes_toolbar %}#toc-toggle-buttons)).
28
- * By default, `toggleable` is set to `false`.
29
- */
30
- this.toggleable = false;
31
- /**
32
- * Sets the selected state of the Button.
33
- */
34
- this.selected = false;
35
- /**
36
- * The fillMode property specifies the background and border styles of the Button.
37
- *
38
- * The available values are:
39
- * * `solid` (default)
40
- * * `flat`
41
- * * `outline`
42
- * * `link`
43
- * * `null`
44
- */
45
- this.fillMode = 'solid';
46
- /**
47
- * The Button allows you to specify predefined theme colors.
48
- * The theme color will be applied as a background and border color while also amending the text color accordingly
49
- * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
50
- *
51
- * The possible values are:
52
- * * `base` —Applies coloring based on the `base` theme color. (default)
53
- * * `primary` —Applies coloring based on the `primary` theme color.
54
- * * `secondary`—Applies coloring based on the `secondary` theme color.
55
- * * `tertiary`— Applies coloring based on the `tertiary` theme color.
56
- * * `info`—Applies coloring based on the `info` theme color.
57
- * * `success`— Applies coloring based on the `success` theme color.
58
- * * `warning`— Applies coloring based on the `warning` theme color.
59
- * * `error`— Applies coloring based on the `error` theme color.
60
- * * `dark`— Applies coloring based on the `dark` theme color.
61
- * * `light`— Applies coloring based on the `light` theme color.
62
- * * `inverse`— Applies coloring based on the `inverse` theme color.
63
- * * `null` —Removes the default CSS class (no class would be rendered).
64
- */
65
- this.themeColor = 'base';
66
- /**
67
- * Fires each time the Button is clicked.
68
- */
69
- this.click = new EventEmitter();
70
- /**
71
- * Fires when the Button [pointerdown](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event) event is triggered.
72
- */
73
- this.pointerdown = new EventEmitter();
74
- /**
75
- * Fires each time the selected state of a Toggle Button is changed.
76
- * The event argument is the new selected state (Boolean).
77
- */
78
- this.selectedChange = new EventEmitter();
79
- this.toolbarOptions = {
80
- text: '',
81
- icon: '',
82
- iconClass: '',
83
- svgIcon: null,
84
- imageUrl: ''
85
- };
86
- this.overflowOptions = {
87
- text: '',
88
- icon: '',
89
- iconClass: '',
90
- svgIcon: null,
91
- imageUrl: ''
92
- };
93
- this._showText = 'both';
94
- this.isBuiltInTool = true;
95
- }
17
+ element;
18
+ zone;
96
19
  // showText and showIcon showIcon should be declared first
97
20
  /**
98
21
  * Specifies where button text should be displayed
@@ -104,6 +27,10 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
104
27
  get showText() {
105
28
  return this._showText;
106
29
  }
30
+ /**
31
+ * Specifies where button icon should be displayed
32
+ */
33
+ showIcon = 'both';
107
34
  /**
108
35
  * Specifies the text of the Button ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
109
36
  */
@@ -114,6 +41,29 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
114
41
  get text() {
115
42
  return this._text;
116
43
  }
44
+ /**
45
+ * Specifies custom inline CSS styles of the Button.
46
+ */
47
+ style;
48
+ /**
49
+ * Specifies custom CSS class names that will be added to the Button.
50
+ */
51
+ className;
52
+ /**
53
+ * Specifies the title of the Button.
54
+ */
55
+ title;
56
+ /**
57
+ * If `disabled` is set to `true`, the Button is disabled
58
+ * ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
59
+ */
60
+ disabled;
61
+ /**
62
+ * Provides visual styling that indicates if the Button is active
63
+ * ([see example]({% slug controltypes_toolbar %}#toc-toggle-buttons)).
64
+ * By default, `toggleable` is set to `false`.
65
+ */
66
+ toggleable = false;
117
67
  /**
118
68
  * @hidden
119
69
  */
@@ -131,6 +81,41 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
131
81
  set togglable(value) {
132
82
  this.toggleable = value;
133
83
  }
84
+ /**
85
+ * Sets the selected state of the Button.
86
+ */
87
+ selected = false;
88
+ /**
89
+ * The fillMode property specifies the background and border styles of the Button.
90
+ *
91
+ * The available values are:
92
+ * * `solid` (default)
93
+ * * `flat`
94
+ * * `outline`
95
+ * * `link`
96
+ * * `null`
97
+ */
98
+ fillMode = 'solid';
99
+ /**
100
+ * The Button allows you to specify predefined theme colors.
101
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
102
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
103
+ *
104
+ * The possible values are:
105
+ * * `base` —Applies coloring based on the `base` theme color. (default)
106
+ * * `primary` —Applies coloring based on the `primary` theme color.
107
+ * * `secondary`—Applies coloring based on the `secondary` theme color.
108
+ * * `tertiary`— Applies coloring based on the `tertiary` theme color.
109
+ * * `info`—Applies coloring based on the `info` theme color.
110
+ * * `success`— Applies coloring based on the `success` theme color.
111
+ * * `warning`— Applies coloring based on the `warning` theme color.
112
+ * * `error`— Applies coloring based on the `error` theme color.
113
+ * * `dark`— Applies coloring based on the `dark` theme color.
114
+ * * `light`— Applies coloring based on the `light` theme color.
115
+ * * `inverse`— Applies coloring based on the `inverse` theme color.
116
+ * * `null` —Removes the default CSS class (no class would be rendered).
117
+ */
118
+ themeColor = 'base';
134
119
  /**
135
120
  * Defines the name for an existing icon in a Kendo UI theme
136
121
  * ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
@@ -172,6 +157,43 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
172
157
  this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
173
158
  this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
174
159
  }
160
+ /**
161
+ * Fires each time the Button is clicked.
162
+ */
163
+ click = new EventEmitter();
164
+ /**
165
+ * Fires when the Button [pointerdown](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event) event is triggered.
166
+ */
167
+ pointerdown = new EventEmitter();
168
+ /**
169
+ * Fires each time the selected state of a Toggle Button is changed.
170
+ * The event argument is the new selected state (Boolean).
171
+ */
172
+ selectedChange = new EventEmitter();
173
+ toolbarOptions = {
174
+ text: '',
175
+ icon: '',
176
+ iconClass: '',
177
+ svgIcon: null,
178
+ imageUrl: ''
179
+ };
180
+ overflowOptions = {
181
+ text: '',
182
+ icon: '',
183
+ iconClass: '',
184
+ svgIcon: null,
185
+ imageUrl: ''
186
+ };
187
+ toolbarButtonElement;
188
+ overflowButtonElement;
189
+ _showText = 'both';
190
+ _text;
191
+ constructor(element, zone) {
192
+ super();
193
+ this.element = element;
194
+ this.zone = zone;
195
+ this.isBuiltInTool = true;
196
+ }
175
197
  ngOnInit() {
176
198
  this.setTextDisplayMode();
177
199
  }
@@ -230,9 +252,8 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
230
252
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
231
253
  });
232
254
  }
233
- }
234
- ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
235
- ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
255
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
256
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
236
257
  <ng-template #toolbarTemplate>
237
258
  <button
238
259
  #toolbarButton
@@ -286,7 +307,8 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
286
307
  </div>
287
308
  </ng-template>
288
309
  `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
290
312
  type: Component,
291
313
  args: [{
292
314
  exportAs: 'kendoToolBarButton',
@@ -389,12 +411,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
389
411
  type: Output
390
412
  }], selectedChange: [{
391
413
  type: Output
392
- }], toolbarTemplate: [{
393
- type: ViewChild,
394
- args: ['toolbarTemplate', { static: true }]
395
- }], popupTemplate: [{
396
- type: ViewChild,
397
- args: ['popupTemplate', { static: true }]
398
414
  }], toolbarButtonElement: [{
399
415
  type: ViewChild,
400
416
  args: ['toolbarButton', { read: ElementRef }]
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, TemplateRef, forwardRef, ViewChild, ContentChildren, QueryList, Input, ViewChildren } from '@angular/core';
5
+ import { Component, forwardRef, ViewChild, ContentChildren, QueryList, Input, ViewChildren } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { ToolBarToolComponent } from './toolbar-tool.component';
8
8
  import { ToolBarButtonComponent } from './toolbar-button.component';
@@ -16,24 +16,33 @@ import * as i1 from "@progress/kendo-angular-l10n";
16
16
  * Represents the Kendo UI Toolbar ButtonGroup for Angular.
17
17
  */
18
18
  export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
19
- constructor(localization) {
20
- super();
21
- this.localization = localization;
22
- /**
23
- * @hidden
24
- *
25
- * Used to set different fillmode in Spreadsheet and Toolbar to comply with referent rendering.
26
- */
27
- this.fillMode = 'solid';
28
- /**
29
- * By default, the selection mode of the ButtonGroup is set to `multiple`.
30
- */
31
- this.selection = 'multiple';
32
- this.focusedIndex = -1;
33
- this.getNextKey = getNextKey(this.localization.rtl);
34
- this.getPrevKey = getPrevKey(this.localization.rtl);
35
- this.isBuiltInTool = true;
36
- }
19
+ localization;
20
+ /**
21
+ * By default, the ButtonGroup is enabled. To disable the whole group of buttons, set its `disabled`
22
+ * attribute to `true`. To disable a specific button, set the `disabled` attribute of the button to
23
+ * `true` and leave the `disabled` attribute of the ButtonGroup undefined. If you define the `disabled`
24
+ * attribute of the ButtonGroup, it will take precedence over the `disabled` attributes of the underlying
25
+ * buttons and they will be ignored.
26
+ */
27
+ disabled;
28
+ /**
29
+ * @hidden
30
+ *
31
+ * Used to set different fillmode in Spreadsheet and Toolbar to comply with referent rendering.
32
+ */
33
+ fillMode = 'solid';
34
+ /**
35
+ * By default, the selection mode of the ButtonGroup is set to `multiple`.
36
+ */
37
+ selection = 'multiple';
38
+ /**
39
+ * Sets the width of the ButtonGroup.
40
+ *
41
+ * If the width of the ButtonGroup is set:
42
+ * - The buttons resize automatically to fill the full width of the group wrapper.
43
+ * - The buttons acquire the same width.
44
+ */
45
+ width;
37
46
  /**
38
47
  * @hidden
39
48
  */
@@ -42,6 +51,9 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
42
51
  this.buttonComponents.forEach(b => b.fillMode = look === 'default' ? 'solid' : look);
43
52
  }
44
53
  }
54
+ toolbarButtonGroup;
55
+ overflowListItems;
56
+ buttonComponents;
45
57
  get buttonElements() {
46
58
  if (this.overflows) {
47
59
  return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
@@ -52,6 +64,16 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
52
64
  .map(b => b.element);
53
65
  }
54
66
  }
67
+ focusedIndex = -1;
68
+ getNextKey;
69
+ getPrevKey;
70
+ constructor(localization) {
71
+ super();
72
+ this.localization = localization;
73
+ this.getNextKey = getNextKey(this.localization.rtl);
74
+ this.getPrevKey = getPrevKey(this.localization.rtl);
75
+ this.isBuiltInTool = true;
76
+ }
55
77
  /**
56
78
  * @hidden
57
79
  */
@@ -148,9 +170,8 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
148
170
  this.buttonElements[index]?.focus();
149
171
  }
150
172
  }
151
- }
152
- ToolBarButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
153
- ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
173
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
174
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
154
175
  <ng-template #toolbarTemplate>
155
176
  <kendo-buttongroup
156
177
  class="k-toolbar-button-group k-button-group-{{fillMode}}"
@@ -213,7 +234,8 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
213
234
  </div>
214
235
  </ng-template>
215
236
  `, isInline: true, dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
237
+ }
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
217
239
  type: Component,
218
240
  args: [{
219
241
  exportAs: 'kendoToolBarButtonGroup',
@@ -295,12 +317,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
295
317
  type: Input
296
318
  }], look: [{
297
319
  type: Input
298
- }], toolbarTemplate: [{
299
- type: ViewChild,
300
- args: ['toolbarTemplate', { static: true }]
301
- }], popupTemplate: [{
302
- type: ViewChild,
303
- args: ['popupTemplate', { static: true }]
304
320
  }], toolbarButtonGroup: [{
305
321
  type: ViewChild,
306
322
  args: ['toolbarButtonGroup', { static: false }]
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, ElementRef, TemplateRef, forwardRef, ViewChild, Input, EventEmitter, Output, QueryList, ViewChildren, isDevMode, Renderer2 } from '@angular/core';
5
+ import { Component, ElementRef, forwardRef, ViewChild, Input, EventEmitter, Output, QueryList, ViewChildren, isDevMode, Renderer2 } from '@angular/core';
6
6
  import { ToolBarToolComponent } from './toolbar-tool.component';
7
7
  import { DropDownButtonComponent } from '@progress/kendo-angular-buttons';
8
8
  import { getValueForLocation, makePeeker, getIndexOfFocused, getPrevKey, getNextKey, seekFocusedIndex, areEqual } from '../util';
@@ -13,90 +13,17 @@ import * as i0 from "@angular/core";
13
13
  * Represents the [Kendo UI ToolBar DropDownButton for Angular]({% slug controltypes_toolbar %}#toc-dropdownbuttons).
14
14
  */
15
15
  export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
16
- constructor(renderer) {
17
- super();
18
- this.renderer = renderer;
19
- /**
20
- * Allows showing the default arrow icon or providing alternative one instead.
21
- * @default false
22
- */
23
- this.arrowIcon = false;
24
- /**
25
- * Sets the `title` attribute of the underlying button element.
26
- * @default ''
27
- */
28
- this.title = '';
29
- /**
30
- * Defines the location of the button icon that will be displayed.
31
- */
32
- this.showIcon = 'both';
33
- /**
34
- * The fillMode property specifies the background and border styles of the Button.
35
- *
36
- * The available values are:
37
- * * `solid` (default)
38
- * * `flat`
39
- * * `outline`
40
- * * `link`
41
- * * `null`
42
- */
43
- this.fillMode = 'solid';
44
- /**
45
- * The Button allows you to specify predefined theme colors.
46
- * The theme color will be applied as a background and border color while also amending the text color accordingly
47
- * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
48
- *
49
- * The possible values are:
50
- * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
51
- * * `primary` &mdash;Applies coloring based on the `primary` theme color.
52
- * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
53
- * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
54
- * * `info`&mdash;Applies coloring based on the `info` theme color.
55
- * * `success`&mdash; Applies coloring based on the `success` theme color.
56
- * * `warning`&mdash; Applies coloring based on the `warning` theme color.
57
- * * `error`&mdash; Applies coloring based on the `error` theme color.
58
- * * `dark`&mdash; Applies coloring based on the `dark` theme color.
59
- * * `light`&mdash; Applies coloring based on the `light` theme color.
60
- * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
61
- * * `null` &mdash;Removes the default CSS class (no class would be rendered).
62
- */
63
- this.themeColor = 'base';
64
- /**
65
- * Fires each time the user clicks a DropDownButton item.
66
- * The event data contains the data item that is bound to the clicked list item.
67
- */
68
- this.itemClick = new EventEmitter();
69
- /**
70
- * Fires each time the popup is about to open.
71
- * This event is preventable. If you cancel the event, the popup will remain closed.
72
- */
73
- this.open = new EventEmitter();
74
- /**
75
- * Fires each time the popup is about to close.
76
- * This event is preventable. If you cancel the event, the popup will remain open.
77
- */
78
- this.close = new EventEmitter();
79
- this.toolbarOptions = {
80
- text: '',
81
- icon: '',
82
- iconClass: '',
83
- svgIcon: null,
84
- imageUrl: ''
85
- };
86
- this.overflowOptions = {
87
- text: '',
88
- icon: '',
89
- iconClass: '',
90
- svgIcon: null,
91
- imageUrl: ''
92
- };
93
- this._popupSettings = { animate: true, popupClass: '' };
94
- this.focusedIndex = -1;
95
- this._showText = 'both';
96
- this.getNextKey = getNextKey();
97
- this.getPrevKey = getPrevKey();
98
- this.isBuiltInTool = true;
99
- }
16
+ renderer;
17
+ /**
18
+ * Allows showing the default arrow icon or providing alternative one instead.
19
+ * @default false
20
+ */
21
+ arrowIcon = false;
22
+ /**
23
+ * Sets the `title` attribute of the underlying button element.
24
+ * @default ''
25
+ */
26
+ title = '';
100
27
  // showText and showIcon showIcon should be declared first
101
28
  /**
102
29
  * Defines the location of the button text that will be displayed.
@@ -108,6 +35,10 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
108
35
  get showText() {
109
36
  return this._showText;
110
37
  }
38
+ /**
39
+ * Defines the location of the button icon that will be displayed.
40
+ */
41
+ showIcon = 'both';
111
42
  /**
112
43
  * Sets the text of the DropDownButton
113
44
  * ([see example](slug:controltypes_toolbar#toc-drop-down-buttons).
@@ -183,6 +114,51 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
183
114
  set primary(primary) {
184
115
  this.themeColor = primary ? 'primary' : 'base';
185
116
  }
117
+ /**
118
+ * The fillMode property specifies the background and border styles of the Button.
119
+ *
120
+ * The available values are:
121
+ * * `solid` (default)
122
+ * * `flat`
123
+ * * `outline`
124
+ * * `link`
125
+ * * `null`
126
+ */
127
+ fillMode = 'solid';
128
+ /**
129
+ * The Button allows you to specify predefined theme colors.
130
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
131
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
132
+ *
133
+ * The possible values are:
134
+ * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
135
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
136
+ * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
137
+ * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
138
+ * * `info`&mdash;Applies coloring based on the `info` theme color.
139
+ * * `success`&mdash; Applies coloring based on the `success` theme color.
140
+ * * `warning`&mdash; Applies coloring based on the `warning` theme color.
141
+ * * `error`&mdash; Applies coloring based on the `error` theme color.
142
+ * * `dark`&mdash; Applies coloring based on the `dark` theme color.
143
+ * * `light`&mdash; Applies coloring based on the `light` theme color.
144
+ * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
145
+ * * `null` &mdash;Removes the default CSS class (no class would be rendered).
146
+ */
147
+ themeColor = 'base';
148
+ /**
149
+ * The CSS classes that will be rendered on the main button.
150
+ * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
151
+ */
152
+ buttonClass;
153
+ /**
154
+ * Sets the data item field that represents the item text.
155
+ * If the data contains only primitive values, do not define it.
156
+ */
157
+ textField;
158
+ /**
159
+ * Sets the disabled state of the DropDownButton.
160
+ */
161
+ disabled;
186
162
  /**
187
163
  * Sets the data of the DropDownButton
188
164
  * ([see example]({% slug controltypes_toolbar %}#toc-dropdownbuttons)).
@@ -198,6 +174,38 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
198
174
  }
199
175
  return this._data;
200
176
  }
177
+ /**
178
+ * Fires each time the user clicks a DropDownButton item.
179
+ * The event data contains the data item that is bound to the clicked list item.
180
+ */
181
+ itemClick = new EventEmitter();
182
+ /**
183
+ * Fires each time the popup is about to open.
184
+ * This event is preventable. If you cancel the event, the popup will remain closed.
185
+ */
186
+ open = new EventEmitter();
187
+ /**
188
+ * Fires each time the popup is about to close.
189
+ * This event is preventable. If you cancel the event, the popup will remain open.
190
+ */
191
+ close = new EventEmitter();
192
+ dropdownButton;
193
+ dropDownButtonComponent;
194
+ overflowListItems;
195
+ toolbarOptions = {
196
+ text: '',
197
+ icon: '',
198
+ iconClass: '',
199
+ svgIcon: null,
200
+ imageUrl: ''
201
+ };
202
+ overflowOptions = {
203
+ text: '',
204
+ icon: '',
205
+ iconClass: '',
206
+ svgIcon: null,
207
+ imageUrl: ''
208
+ };
201
209
  ngOnInit() {
202
210
  this.setTextDisplayMode();
203
211
  }
@@ -207,6 +215,21 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
207
215
  get overflowButtons() {
208
216
  return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
209
217
  }
218
+ toolbarDropDownButton;
219
+ _data;
220
+ _popupSettings = { animate: true, popupClass: '' };
221
+ focusedIndex = -1;
222
+ _showText = 'both';
223
+ _text;
224
+ getNextKey;
225
+ getPrevKey;
226
+ constructor(renderer) {
227
+ super();
228
+ this.renderer = renderer;
229
+ this.getNextKey = getNextKey();
230
+ this.getPrevKey = getPrevKey();
231
+ this.isBuiltInTool = true;
232
+ }
210
233
  /**
211
234
  * @hidden
212
235
  */
@@ -279,9 +302,8 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
279
302
  this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
280
303
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
281
304
  }
282
- }
283
- ToolBarDropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
284
- ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
305
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
306
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
285
307
  <ng-template #toolbarTemplate>
286
308
  <kendo-dropdownbutton
287
309
  #toolbarDropDownButton
@@ -347,7 +369,8 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
347
369
  </ng-container>
348
370
  </ng-template>
349
371
  `, isInline: true, dependencies: [{ kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
372
+ }
373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
351
374
  type: Component,
352
375
  args: [{
353
376
  exportAs: 'kendoToolBarDropDownButton',
@@ -464,12 +487,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
464
487
  type: Output
465
488
  }], close: [{
466
489
  type: Output
467
- }], toolbarTemplate: [{
468
- type: ViewChild,
469
- args: ['toolbarTemplate', { static: true }]
470
- }], popupTemplate: [{
471
- type: ViewChild,
472
- args: ['popupTemplate', { static: true }]
473
490
  }], dropdownButton: [{
474
491
  type: ViewChild,
475
492
  args: ['dropdownButton', { read: ElementRef, static: true }]