@progress/kendo-angular-toolbar 17.0.0-develop.9 → 17.0.1-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +28 -20
  2. package/common/fillmode.d.ts +8 -0
  3. package/common/size.d.ts +1 -1
  4. package/direction.d.ts +1 -1
  5. package/display-mode.d.ts +1 -1
  6. package/{esm2020 → esm2022}/common/preventable-event.mjs +1 -3
  7. package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
  8. package/{esm2020 → esm2022}/localization/localized-toolbar-messages.directive.mjs +9 -8
  9. package/{esm2020 → esm2022}/localization/messages.mjs +7 -3
  10. package/{esm2020 → esm2022}/navigation.service.mjs +9 -7
  11. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  12. package/{esm2020 → esm2022}/refresh.service.mjs +4 -6
  13. package/{esm2020 → esm2022}/renderer.component.mjs +22 -10
  14. package/{esm2020 → esm2022}/renderer.service.mjs +5 -3
  15. package/esm2022/tool-options.mjs +5 -0
  16. package/{esm2020 → esm2022}/toolbar.component.mjs +104 -64
  17. package/{esm2020 → esm2022}/toolbar.module.mjs +4 -4
  18. package/{esm2020 → esm2022}/tools/toolbar-button.component.mjs +110 -98
  19. package/{esm2020 → esm2022}/tools/toolbar-buttongroup.component.mjs +49 -25
  20. package/{esm2020 → esm2022}/tools/toolbar-dropdownbutton.component.mjs +112 -95
  21. package/{esm2020 → esm2022}/tools/toolbar-separator.component.mjs +7 -12
  22. package/{esm2020 → esm2022}/tools/toolbar-spacer.component.mjs +10 -16
  23. package/{esm2020 → esm2022}/tools/toolbar-splitbutton.component.mjs +117 -102
  24. package/{esm2020 → esm2022}/tools/toolbar-tool.component.mjs +23 -13
  25. package/{esm2020 → esm2022}/tools/tools.service.mjs +8 -10
  26. package/{esm2020 → esm2022}/util.mjs +5 -0
  27. package/{fesm2020 → fesm2022}/progress-kendo-angular-toolbar.mjs +612 -484
  28. package/group-selection-settings.d.ts +1 -1
  29. package/index.d.ts +1 -0
  30. package/localization/messages.d.ts +1 -1
  31. package/package.json +15 -21
  32. package/render-location.d.ts +1 -1
  33. package/renderer.component.d.ts +1 -1
  34. package/schematics/ngAdd/index.js +1 -1
  35. package/toolbar.component.d.ts +11 -1
  36. package/tools/toolbar-button.component.d.ts +2 -8
  37. package/tools/toolbar-buttongroup.component.d.ts +8 -4
  38. package/tools/toolbar-dropdownbutton.component.d.ts +2 -4
  39. package/tools/toolbar-separator.component.d.ts +1 -3
  40. package/tools/toolbar-spacer.component.d.ts +1 -3
  41. package/tools/toolbar-splitbutton.component.d.ts +2 -4
  42. package/tools/toolbar-tool.component.d.ts +3 -3
  43. package/fesm2015/progress-kendo-angular-toolbar.mjs +0 -3374
  44. /package/{esm2020/common/renderer-click.mjs → esm2022/common/fillmode.mjs} +0 -0
  45. /package/{esm2020/common/size.mjs → esm2022/common/renderer-click.mjs} +0 -0
  46. /package/{esm2020/direction.mjs → esm2022/common/size.mjs} +0 -0
  47. /package/{esm2020/display-mode.mjs → esm2022/direction.mjs} +0 -0
  48. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  49. /package/{esm2020/group-selection-settings.mjs → esm2022/display-mode.mjs} +0 -0
  50. /package/{esm2020/popup-settings.mjs → esm2022/group-selection-settings.mjs} +0 -0
  51. /package/{esm2020 → esm2022}/index.mjs +0 -0
  52. /package/{esm2020/render-location.mjs → esm2022/popup-settings.mjs} +0 -0
  53. /package/{esm2020 → esm2022}/progress-kendo-angular-toolbar.mjs +0 -0
  54. /package/{esm2020/tool-options.mjs → esm2022/render-location.mjs} +0 -0
@@ -31,11 +31,11 @@ import * as i9 from "./tools/toolbar-tool.component";
31
31
  * - `ToolBarSeparatorComponent`—The Separator Tool component class.
32
32
  */
33
33
  export class ToolBarModule {
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
35
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ToolBarModule, imports: [i1.ToolBarComponent, i2.ToolbarCustomMessagesComponent, i3.ToolBarButtonComponent, i4.ToolBarButtonGroupComponent, i5.ToolBarDropDownButtonComponent, i6.ToolBarSeparatorComponent, i7.ToolBarSpacerComponent, i8.ToolBarSplitButtonComponent, i9.ToolBarToolComponent], exports: [i1.ToolBarComponent, i2.ToolbarCustomMessagesComponent, i3.ToolBarButtonComponent, i4.ToolBarButtonGroupComponent, i5.ToolBarDropDownButtonComponent, i6.ToolBarSeparatorComponent, i7.ToolBarSpacerComponent, i8.ToolBarSplitButtonComponent, i9.ToolBarToolComponent] });
36
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [i1.ToolBarComponent, i3.ToolBarButtonComponent, i4.ToolBarButtonGroupComponent, i5.ToolBarDropDownButtonComponent, i8.ToolBarSplitButtonComponent] });
34
37
  }
35
- ToolBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
36
- ToolBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ToolBarModule, imports: [i1.ToolBarComponent, i2.ToolbarCustomMessagesComponent, i3.ToolBarButtonComponent, i4.ToolBarButtonGroupComponent, i5.ToolBarDropDownButtonComponent, i6.ToolBarSeparatorComponent, i7.ToolBarSpacerComponent, i8.ToolBarSplitButtonComponent, i9.ToolBarToolComponent], exports: [i1.ToolBarComponent, i2.ToolbarCustomMessagesComponent, i3.ToolBarButtonComponent, i4.ToolBarButtonGroupComponent, i5.ToolBarDropDownButtonComponent, i6.ToolBarSeparatorComponent, i7.ToolBarSpacerComponent, i8.ToolBarSplitButtonComponent, i9.ToolBarToolComponent] });
37
- ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [i1.ToolBarComponent, i2.ToolbarCustomMessagesComponent, i3.ToolBarButtonComponent, i4.ToolBarButtonGroupComponent, i5.ToolBarDropDownButtonComponent, i6.ToolBarSeparatorComponent, i7.ToolBarSpacerComponent, i8.ToolBarSplitButtonComponent] });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarModule, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarModule, decorators: [{
39
39
  type: NgModule,
40
40
  args: [{
41
41
  exports: [...KENDO_TOOLBAR],
@@ -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
  }
@@ -204,12 +226,6 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
204
226
  this.getButton().tabIndex = -1;
205
227
  return false;
206
228
  }
207
- /**
208
- * @hidden
209
- */
210
- get toolbarButtonClass() {
211
- return this.toggleable ? 'k-toolbar-toggle-button' : 'k-toolbar-button';
212
- }
213
229
  /**
214
230
  * @hidden
215
231
  */
@@ -236,13 +252,13 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
236
252
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
237
253
  });
238
254
  }
239
- }
240
- 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 });
241
- 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: `
242
257
  <ng-template #toolbarTemplate>
243
258
  <button
244
259
  #toolbarButton
245
- [class]="toolbarButtonClass"
260
+ [class.k-toolbar-button]="!toggleable"
261
+ [class.k-toolbar-toggle-button]="toggleable"
246
262
  [tabindex]="tabIndex"
247
263
  type="button"
248
264
  kendoButton
@@ -291,7 +307,8 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
291
307
  </div>
292
308
  </ng-template>
293
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"] }] });
294
- 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: [{
295
312
  type: Component,
296
313
  args: [{
297
314
  exportAs: 'kendoToolBarButton',
@@ -301,7 +318,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
301
318
  <ng-template #toolbarTemplate>
302
319
  <button
303
320
  #toolbarButton
304
- [class]="toolbarButtonClass"
321
+ [class.k-toolbar-button]="!toggleable"
322
+ [class.k-toolbar-toggle-button]="toggleable"
305
323
  [tabindex]="tabIndex"
306
324
  type="button"
307
325
  kendoButton
@@ -393,12 +411,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
393
411
  type: Output
394
412
  }], selectedChange: [{
395
413
  type: Output
396
- }], toolbarTemplate: [{
397
- type: ViewChild,
398
- args: ['toolbarTemplate', { static: true }]
399
- }], popupTemplate: [{
400
- type: ViewChild,
401
- args: ['popupTemplate', { static: true }]
402
414
  }], toolbarButtonElement: [{
403
415
  type: ViewChild,
404
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,18 +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
- * By default, the selection mode of the ButtonGroup is set to `multiple`.
24
- */
25
- this.selection = 'multiple';
26
- this.focusedIndex = -1;
27
- this.getNextKey = getNextKey(this.localization.rtl);
28
- this.getPrevKey = getPrevKey(this.localization.rtl);
29
- this.isBuiltInTool = true;
30
- }
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;
31
46
  /**
32
47
  * @hidden
33
48
  */
@@ -36,6 +51,9 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
36
51
  this.buttonComponents.forEach(b => b.fillMode = look === 'default' ? 'solid' : look);
37
52
  }
38
53
  }
54
+ toolbarButtonGroup;
55
+ overflowListItems;
56
+ buttonComponents;
39
57
  get buttonElements() {
40
58
  if (this.overflows) {
41
59
  return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
@@ -46,6 +64,16 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
46
64
  .map(b => b.element);
47
65
  }
48
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
+ }
49
77
  /**
50
78
  * @hidden
51
79
  */
@@ -142,12 +170,11 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
142
170
  this.buttonElements[index]?.focus();
143
171
  }
144
172
  }
145
- }
146
- ToolBarButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
147
- ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", 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: `
148
175
  <ng-template #toolbarTemplate>
149
176
  <kendo-buttongroup
150
- class="k-toolbar-button-group k-button-group-solid"
177
+ class="k-toolbar-button-group k-button-group-{{fillMode}}"
151
178
  #toolbarButtonGroup
152
179
  [tabIndex]="-1"
153
180
  [selection]="selection"
@@ -207,7 +234,8 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
207
234
  </div>
208
235
  </ng-template>
209
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"] }] });
210
- 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: [{
211
239
  type: Component,
212
240
  args: [{
213
241
  exportAs: 'kendoToolBarButtonGroup',
@@ -216,7 +244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
216
244
  template: `
217
245
  <ng-template #toolbarTemplate>
218
246
  <kendo-buttongroup
219
- class="k-toolbar-button-group k-button-group-solid"
247
+ class="k-toolbar-button-group k-button-group-{{fillMode}}"
220
248
  #toolbarButtonGroup
221
249
  [tabIndex]="-1"
222
250
  [selection]="selection"
@@ -281,18 +309,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
281
309
  }]
282
310
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { disabled: [{
283
311
  type: Input
312
+ }], fillMode: [{
313
+ type: Input
284
314
  }], selection: [{
285
315
  type: Input
286
316
  }], width: [{
287
317
  type: Input
288
318
  }], look: [{
289
319
  type: Input
290
- }], toolbarTemplate: [{
291
- type: ViewChild,
292
- args: ['toolbarTemplate', { static: true }]
293
- }], popupTemplate: [{
294
- type: ViewChild,
295
- args: ['popupTemplate', { static: true }]
296
320
  }], toolbarButtonGroup: [{
297
321
  type: ViewChild,
298
322
  args: ['toolbarButtonGroup', { static: false }]