@progress/kendo-angular-toolbar 5.0.2 → 6.0.0-dev.202204131416

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 (134) hide show
  1. package/bundles/kendo-angular-toolbar.umd.js +5 -0
  2. package/{dist/es2015/common → common}/constants.d.ts +0 -0
  3. package/{dist/es2015/common → common}/preventable-event.d.ts +0 -0
  4. package/{dist/es2015/common → common}/renderer-click.d.ts +0 -0
  5. package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
  6. package/{dist/es2015/display-mode.d.ts → display-mode.d.ts} +0 -0
  7. package/{dist/es2015 → esm2015}/common/constants.js +0 -0
  8. package/{dist/es2015 → esm2015}/common/preventable-event.js +0 -0
  9. package/{dist/es → esm2015}/common/renderer-click.js +1 -0
  10. package/{dist/es2015 → esm2015}/direction.js +1 -0
  11. package/{dist/es2015 → esm2015}/display-mode.js +1 -0
  12. package/{dist/es2015 → esm2015}/group-selection-settings.js +1 -0
  13. package/{dist/es/common/constants.js → esm2015/kendo-angular-toolbar.js} +2 -2
  14. package/esm2015/localization/custom-messages.component.js +40 -0
  15. package/esm2015/localization/localized-toolbar-messages.directive.js +36 -0
  16. package/esm2015/localization/messages.js +23 -0
  17. package/{dist/es → esm2015}/main.js +0 -0
  18. package/{dist/es2015 → esm2015}/navigation.service.js +9 -9
  19. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  20. package/{dist/es → esm2015}/popup-settings.js +1 -0
  21. package/{dist/es2015 → esm2015}/refresh.service.js +8 -10
  22. package/{dist/es → esm2015}/render-location.js +1 -0
  23. package/{dist/es2015 → esm2015}/renderer.component.js +36 -41
  24. package/{dist/es2015 → esm2015}/renderer.service.js +8 -7
  25. package/{dist/es → esm2015}/tool-options.js +1 -0
  26. package/{dist/es2015 → esm2015}/toolbar.component.js +166 -135
  27. package/{dist/es2015 → esm2015}/toolbar.module.js +27 -11
  28. package/{dist/es2015 → esm2015}/tools/toolbar-button.component.js +117 -114
  29. package/esm2015/tools/toolbar-buttongroup.component.js +267 -0
  30. package/esm2015/tools/toolbar-buttonlist.component.js +94 -0
  31. package/{dist/es2015 → esm2015}/tools/toolbar-dropdownbutton.component.js +119 -121
  32. package/esm2015/tools/toolbar-separator.component.js +68 -0
  33. package/{dist/es2015 → esm2015}/tools/toolbar-splitbutton.component.js +129 -125
  34. package/{dist/es2015 → esm2015}/tools/toolbar-tool.component.js +15 -19
  35. package/{dist/es2015 → esm2015}/util.js +0 -0
  36. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-toolbar.js} +1019 -886
  37. package/{dist/es2015/group-selection-settings.d.ts → group-selection-settings.d.ts} +0 -0
  38. package/kendo-angular-toolbar.d.ts +9 -0
  39. package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
  40. package/{dist/es2015/localization → localization}/localized-toolbar-messages.directive.d.ts +3 -0
  41. package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
  42. package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
  43. package/{dist/es2015/navigation.service.d.ts → navigation.service.d.ts} +3 -0
  44. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  45. package/package.json +34 -102
  46. package/{dist/es2015/popup-settings.d.ts → popup-settings.d.ts} +0 -0
  47. package/{dist/es2015/refresh.service.d.ts → refresh.service.d.ts} +3 -0
  48. package/{dist/es2015/render-location.d.ts → render-location.d.ts} +0 -0
  49. package/{dist/es2015/renderer.component.d.ts → renderer.component.d.ts} +4 -1
  50. package/{dist/es2015/renderer.service.d.ts → renderer.service.d.ts} +3 -0
  51. package/schematics/ngAdd/index.js +5 -2
  52. package/schematics/ngAdd/index.js.map +1 -1
  53. package/{dist/es2015/tool-options.d.ts → tool-options.d.ts} +0 -0
  54. package/{dist/es2015/toolbar.component.d.ts → toolbar.component.d.ts} +30 -18
  55. package/toolbar.module.d.ts +37 -0
  56. package/{dist/es2015/tools → tools}/toolbar-button.component.d.ts +10 -6
  57. package/{dist/es2015/tools → tools}/toolbar-buttongroup.component.d.ts +7 -5
  58. package/{dist/es2015/tools → tools}/toolbar-buttonlist.component.d.ts +3 -0
  59. package/{dist/es2015/tools → tools}/toolbar-dropdownbutton.component.d.ts +15 -10
  60. package/{dist/es2015/tools → tools}/toolbar-separator.component.d.ts +3 -0
  61. package/{dist/es2015/tools → tools}/toolbar-splitbutton.component.d.ts +14 -9
  62. package/{dist/es2015/tools → tools}/toolbar-tool.component.d.ts +5 -2
  63. package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
  64. package/dist/cdn/js/kendo-angular-toolbar.js +0 -20
  65. package/dist/cdn/main.js +0 -5
  66. package/dist/es/common/preventable-event.js +0 -29
  67. package/dist/es/direction.js +0 -4
  68. package/dist/es/display-mode.js +0 -4
  69. package/dist/es/group-selection-settings.js +0 -4
  70. package/dist/es/index.js +0 -14
  71. package/dist/es/localization/custom-messages.component.js +0 -43
  72. package/dist/es/localization/localized-toolbar-messages.directive.js +0 -35
  73. package/dist/es/localization/messages.js +0 -22
  74. package/dist/es/navigation.service.js +0 -130
  75. package/dist/es/package-metadata.js +0 -15
  76. package/dist/es/refresh.service.js +0 -22
  77. package/dist/es/renderer.component.js +0 -132
  78. package/dist/es/renderer.service.js +0 -52
  79. package/dist/es/toolbar.component.js +0 -641
  80. package/dist/es/toolbar.module.js +0 -60
  81. package/dist/es/tools/toolbar-button.component.js +0 -310
  82. package/dist/es/tools/toolbar-buttongroup.component.js +0 -165
  83. package/dist/es/tools/toolbar-buttonlist.component.js +0 -66
  84. package/dist/es/tools/toolbar-dropdownbutton.component.js +0 -368
  85. package/dist/es/tools/toolbar-separator.component.js +0 -67
  86. package/dist/es/tools/toolbar-splitbutton.component.js +0 -380
  87. package/dist/es/tools/toolbar-tool.component.js +0 -76
  88. package/dist/es/util.js +0 -204
  89. package/dist/es2015/common/renderer-click.js +0 -4
  90. package/dist/es2015/index.d.ts +0 -14
  91. package/dist/es2015/index.js +0 -14
  92. package/dist/es2015/index.metadata.json +0 -1
  93. package/dist/es2015/localization/custom-messages.component.js +0 -35
  94. package/dist/es2015/localization/localized-toolbar-messages.directive.js +0 -31
  95. package/dist/es2015/localization/messages.js +0 -16
  96. package/dist/es2015/main.js +0 -14
  97. package/dist/es2015/popup-settings.js +0 -4
  98. package/dist/es2015/render-location.js +0 -4
  99. package/dist/es2015/tool-options.js +0 -4
  100. package/dist/es2015/toolbar.module.d.ts +0 -18
  101. package/dist/es2015/tools/toolbar-buttongroup.component.js +0 -216
  102. package/dist/es2015/tools/toolbar-buttonlist.component.js +0 -87
  103. package/dist/es2015/tools/toolbar-separator.component.js +0 -68
  104. package/dist/fesm5/index.js +0 -2665
  105. package/dist/npm/common/constants.js +0 -10
  106. package/dist/npm/common/preventable-event.js +0 -31
  107. package/dist/npm/common/renderer-click.js +0 -6
  108. package/dist/npm/direction.js +0 -6
  109. package/dist/npm/display-mode.js +0 -6
  110. package/dist/npm/group-selection-settings.js +0 -6
  111. package/dist/npm/index.js +0 -23
  112. package/dist/npm/localization/custom-messages.component.js +0 -45
  113. package/dist/npm/localization/localized-toolbar-messages.directive.js +0 -37
  114. package/dist/npm/localization/messages.js +0 -24
  115. package/dist/npm/main.js +0 -26
  116. package/dist/npm/navigation.service.js +0 -132
  117. package/dist/npm/package-metadata.js +0 -17
  118. package/dist/npm/popup-settings.js +0 -6
  119. package/dist/npm/refresh.service.js +0 -24
  120. package/dist/npm/render-location.js +0 -6
  121. package/dist/npm/renderer.component.js +0 -134
  122. package/dist/npm/renderer.service.js +0 -54
  123. package/dist/npm/tool-options.js +0 -6
  124. package/dist/npm/toolbar.component.js +0 -643
  125. package/dist/npm/toolbar.module.js +0 -62
  126. package/dist/npm/tools/toolbar-button.component.js +0 -312
  127. package/dist/npm/tools/toolbar-buttongroup.component.js +0 -167
  128. package/dist/npm/tools/toolbar-buttonlist.component.js +0 -68
  129. package/dist/npm/tools/toolbar-dropdownbutton.component.js +0 -370
  130. package/dist/npm/tools/toolbar-separator.component.js +0 -69
  131. package/dist/npm/tools/toolbar-splitbutton.component.js +0 -382
  132. package/dist/npm/tools/toolbar-tool.component.js +0 -78
  133. package/dist/npm/util.js +0 -209
  134. package/dist/systemjs/kendo-angular-toolbar.js +0 -5
@@ -1,62 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var common_1 = require("@angular/common");
10
- var kendo_angular_buttons_1 = require("@progress/kendo-angular-buttons");
11
- var kendo_angular_popup_1 = require("@progress/kendo-angular-popup");
12
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
13
- var toolbar_component_1 = require("./toolbar.component");
14
- var toolbar_tool_component_1 = require("./tools/toolbar-tool.component");
15
- var toolbar_button_component_1 = require("./tools/toolbar-button.component");
16
- var toolbar_buttongroup_component_1 = require("./tools/toolbar-buttongroup.component");
17
- var toolbar_dropdownbutton_component_1 = require("./tools/toolbar-dropdownbutton.component");
18
- var toolbar_splitbutton_component_1 = require("./tools/toolbar-splitbutton.component");
19
- var toolbar_separator_component_1 = require("./tools/toolbar-separator.component");
20
- var renderer_component_1 = require("./renderer.component");
21
- var toolbar_buttonlist_component_1 = require("./tools/toolbar-buttonlist.component");
22
- var localized_toolbar_messages_directive_1 = require("./localization/localized-toolbar-messages.directive");
23
- var custom_messages_component_1 = require("./localization/custom-messages.component");
24
- var TOOLBAR_TOOLS = [
25
- toolbar_tool_component_1.ToolBarToolComponent,
26
- toolbar_button_component_1.ToolBarButtonComponent,
27
- toolbar_buttongroup_component_1.ToolBarButtonGroupComponent,
28
- toolbar_dropdownbutton_component_1.ToolBarDropDownButtonComponent,
29
- toolbar_splitbutton_component_1.ToolBarSplitButtonComponent,
30
- toolbar_separator_component_1.ToolBarSeparatorComponent
31
- ];
32
- var TOOLBAR_COMMON = [
33
- renderer_component_1.ToolBarRendererComponent,
34
- toolbar_buttonlist_component_1.ToolBarButtonListComponent,
35
- custom_messages_component_1.ToolbarCustomMessagesComponent,
36
- localized_toolbar_messages_directive_1.LocalizedToolbarMessagesDirective
37
- ];
38
- /**
39
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }}) definition for the ToolBar component.
40
- *
41
- * The package exports:
42
- * - `ToolBarComponent`—The ToolBarComponent class.
43
- * - `ToolBarToolComponent`—The base Tool component class.
44
- * - `ToolBarButtonComponent`—The Button Tool component class.
45
- * - `ToolBarButtonGroupComponent`—The ButtonGroup Tool component class.
46
- * - `ToolBarDropDownButtonComponent`—The DropDownButton Tool component class.
47
- * - `ToolBarSplitButtonComponent`—The SplitButton Tool component class.
48
- * - `ToolBarSeparatorComponent`—The Separator Tool component class.
49
- */
50
- var ToolBarModule = /** @class */ (function () {
51
- function ToolBarModule() {
52
- }
53
- ToolBarModule = tslib_1.__decorate([
54
- core_1.NgModule({
55
- declarations: [toolbar_component_1.ToolBarComponent, TOOLBAR_TOOLS, TOOLBAR_COMMON],
56
- exports: [toolbar_component_1.ToolBarComponent, TOOLBAR_TOOLS, custom_messages_component_1.ToolbarCustomMessagesComponent, localized_toolbar_messages_directive_1.LocalizedToolbarMessagesDirective],
57
- imports: [common_1.CommonModule, kendo_angular_buttons_1.ButtonsModule, kendo_angular_popup_1.PopupModule, kendo_angular_common_1.ResizeSensorModule]
58
- })
59
- ], ToolBarModule);
60
- return ToolBarModule;
61
- }());
62
- exports.ToolBarModule = ToolBarModule;
@@ -1,312 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var toolbar_tool_component_1 = require("./toolbar-tool.component");
10
- var util_1 = require("../util");
11
- /**
12
- * Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
13
- */
14
- var ToolBarButtonComponent = /** @class */ (function (_super) {
15
- tslib_1.__extends(ToolBarButtonComponent, _super);
16
- function ToolBarButtonComponent() {
17
- var _this = _super.call(this) || this;
18
- // showText and showIcon showIcon should be declared first
19
- /**
20
- * Specifies where button text should be displayed
21
- */
22
- _this.showText = 'both';
23
- /**
24
- * Specifies where button icon should be displayed
25
- */
26
- _this.showIcon = 'both';
27
- /**
28
- * Provides visual styling that indicates if the Button is active
29
- * ([see example]({% slug controltypes_toolbar %}#toc-toggle-buttons)).
30
- * By default, `toggleable` is set to `false`.
31
- */
32
- _this.toggleable = false;
33
- /**
34
- * Sets the selected state of the Button.
35
- */
36
- _this.selected = false;
37
- /**
38
- * The fillMode property specifies the background and border styles of the Button.
39
- *
40
- * The available values are:
41
- * * `solid` (default)
42
- * * `flat`
43
- * * `outline`
44
- * * `link`
45
- * * `null`
46
- */
47
- _this.fillMode = 'solid';
48
- /**
49
- * The Button allows you to specify predefined theme colors.
50
- * The theme color will be applied as a background and border color while also amending the text color accordingly
51
- * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
52
- *
53
- * The possible values are:
54
- * * `base` —Applies coloring based on the `base` theme color. (default)
55
- * * `primary` —Applies coloring based on the `primary` theme color.
56
- * * `secondary`—Applies coloring based on the `secondary` theme color.
57
- * * `tertiary`— Applies coloring based on the `tertiary` theme color.
58
- * * `info`—Applies coloring based on the `info` theme color.
59
- * * `success`— Applies coloring based on the `success` theme color.
60
- * * `warning`— Applies coloring based on the `warning` theme color.
61
- * * `error`— Applies coloring based on the `error` theme color.
62
- * * `dark`— Applies coloring based on the `dark` theme color.
63
- * * `light`— Applies coloring based on the `light` theme color.
64
- * * `inverse`— Applies coloring based on the `inverse` theme color.
65
- * * `null` —Removes the default CSS class (no class would be rendered).
66
- */
67
- _this.themeColor = 'base';
68
- /**
69
- * Fires each time the Button is clicked.
70
- */
71
- _this.click = new core_1.EventEmitter();
72
- /**
73
- * Fires when the Button [pointerdown](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event) event is triggered.
74
- */
75
- _this.pointerdown = new core_1.EventEmitter();
76
- /**
77
- * Fires each time the selected state of a Toggle Button is changed.
78
- * The event argument is the new selected state (Boolean).
79
- */
80
- _this.selectedChange = new core_1.EventEmitter();
81
- _this.toolbarOptions = {
82
- text: '',
83
- icon: '',
84
- iconClass: '',
85
- imageUrl: ''
86
- };
87
- _this.overflowOptions = {
88
- text: '',
89
- icon: '',
90
- iconClass: '',
91
- imageUrl: ''
92
- };
93
- return _this;
94
- }
95
- ToolBarButtonComponent_1 = ToolBarButtonComponent;
96
- Object.defineProperty(ToolBarButtonComponent.prototype, "text", {
97
- /**
98
- * Specifies the text of the Button ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
99
- */
100
- set: function (text) {
101
- this.toolbarOptions.text = util_1.getValueForLocation(text, this.showText, false);
102
- this.overflowOptions.text = util_1.getValueForLocation(text, this.showText, true);
103
- },
104
- enumerable: true,
105
- configurable: true
106
- });
107
- Object.defineProperty(ToolBarButtonComponent.prototype, "look", {
108
- /**
109
- * @hidden
110
- */
111
- set: function (look) {
112
- if (look) {
113
- this.fillMode = look === 'default' ? 'solid' : look;
114
- }
115
- },
116
- enumerable: true,
117
- configurable: true
118
- });
119
- Object.defineProperty(ToolBarButtonComponent.prototype, "togglable", {
120
- /**
121
- * @hidden
122
- */
123
- get: function () {
124
- return this.toggleable;
125
- },
126
- set: function (value) {
127
- this.toggleable = value;
128
- },
129
- enumerable: true,
130
- configurable: true
131
- });
132
- Object.defineProperty(ToolBarButtonComponent.prototype, "icon", {
133
- /**
134
- * Defines the name for an existing icon in a Kendo UI theme
135
- * ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
136
- * The icon is rendered inside the Button by a `span.k-icon` element.
137
- */
138
- set: function (icon) {
139
- this.toolbarOptions.icon = util_1.getValueForLocation(icon, this.showIcon, false);
140
- this.overflowOptions.icon = util_1.getValueForLocation(icon, this.showIcon, true);
141
- },
142
- enumerable: true,
143
- configurable: true
144
- });
145
- Object.defineProperty(ToolBarButtonComponent.prototype, "iconClass", {
146
- /**
147
- * Defines a CSS class—or multiple classes separated by spaces—
148
- * which are applied to a `span` element inside the Button. Allows the usage of custom icons.
149
- */
150
- set: function (iconClass) {
151
- this.toolbarOptions.iconClass = util_1.getValueForLocation(iconClass, this.showIcon, false);
152
- this.overflowOptions.iconClass = util_1.getValueForLocation(iconClass, this.showIcon, true);
153
- },
154
- enumerable: true,
155
- configurable: true
156
- });
157
- Object.defineProperty(ToolBarButtonComponent.prototype, "imageUrl", {
158
- /**
159
- * Defines a URL which is used for an `img` element inside the Button.
160
- * The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
161
- */
162
- set: function (imageUrl) {
163
- this.toolbarOptions.imageUrl = util_1.getValueForLocation(imageUrl, this.showIcon, false);
164
- this.overflowOptions.imageUrl = util_1.getValueForLocation(imageUrl, this.showIcon, true);
165
- },
166
- enumerable: true,
167
- configurable: true
168
- });
169
- /**
170
- * @hidden
171
- */
172
- ToolBarButtonComponent.prototype.onBlur = function () {
173
- this.getButton().tabIndex = -1;
174
- };
175
- /**
176
- * @hidden
177
- */
178
- ToolBarButtonComponent.prototype.canFocus = function () {
179
- return !this.disabled;
180
- };
181
- /**
182
- * @hidden
183
- */
184
- ToolBarButtonComponent.prototype.focus = function (ev) {
185
- // guard against focusing twice on mousedown.
186
- if (!ev || ev.type === 'focus' || ev.type === 'keydown') {
187
- this.getButton().focus();
188
- }
189
- this.getButton().tabIndex = 0;
190
- };
191
- /**
192
- * @hidden
193
- */
194
- ToolBarButtonComponent.prototype.handleKey = function () {
195
- this.getButton().tabIndex = -1;
196
- return false;
197
- };
198
- ToolBarButtonComponent.prototype.getButton = function () {
199
- return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
200
- };
201
- var ToolBarButtonComponent_1;
202
- tslib_1.__decorate([
203
- core_1.Input(),
204
- tslib_1.__metadata("design:type", String)
205
- ], ToolBarButtonComponent.prototype, "showText", void 0);
206
- tslib_1.__decorate([
207
- core_1.Input(),
208
- tslib_1.__metadata("design:type", String)
209
- ], ToolBarButtonComponent.prototype, "showIcon", void 0);
210
- tslib_1.__decorate([
211
- core_1.Input(),
212
- tslib_1.__metadata("design:type", String),
213
- tslib_1.__metadata("design:paramtypes", [String])
214
- ], ToolBarButtonComponent.prototype, "text", null);
215
- tslib_1.__decorate([
216
- core_1.Input(),
217
- tslib_1.__metadata("design:type", Object)
218
- ], ToolBarButtonComponent.prototype, "style", void 0);
219
- tslib_1.__decorate([
220
- core_1.Input(),
221
- tslib_1.__metadata("design:type", Object)
222
- ], ToolBarButtonComponent.prototype, "className", void 0);
223
- tslib_1.__decorate([
224
- core_1.Input(),
225
- tslib_1.__metadata("design:type", String)
226
- ], ToolBarButtonComponent.prototype, "title", void 0);
227
- tslib_1.__decorate([
228
- core_1.Input(),
229
- tslib_1.__metadata("design:type", Boolean)
230
- ], ToolBarButtonComponent.prototype, "disabled", void 0);
231
- tslib_1.__decorate([
232
- core_1.Input(),
233
- tslib_1.__metadata("design:type", Boolean)
234
- ], ToolBarButtonComponent.prototype, "toggleable", void 0);
235
- tslib_1.__decorate([
236
- core_1.Input(),
237
- tslib_1.__metadata("design:type", String),
238
- tslib_1.__metadata("design:paramtypes", [String])
239
- ], ToolBarButtonComponent.prototype, "look", null);
240
- tslib_1.__decorate([
241
- core_1.Input(),
242
- tslib_1.__metadata("design:type", Boolean),
243
- tslib_1.__metadata("design:paramtypes", [Boolean])
244
- ], ToolBarButtonComponent.prototype, "togglable", null);
245
- tslib_1.__decorate([
246
- core_1.Input(),
247
- tslib_1.__metadata("design:type", Boolean)
248
- ], ToolBarButtonComponent.prototype, "selected", void 0);
249
- tslib_1.__decorate([
250
- core_1.Input(),
251
- tslib_1.__metadata("design:type", String)
252
- ], ToolBarButtonComponent.prototype, "fillMode", void 0);
253
- tslib_1.__decorate([
254
- core_1.Input(),
255
- tslib_1.__metadata("design:type", String)
256
- ], ToolBarButtonComponent.prototype, "themeColor", void 0);
257
- tslib_1.__decorate([
258
- core_1.Input(),
259
- tslib_1.__metadata("design:type", String),
260
- tslib_1.__metadata("design:paramtypes", [String])
261
- ], ToolBarButtonComponent.prototype, "icon", null);
262
- tslib_1.__decorate([
263
- core_1.Input(),
264
- tslib_1.__metadata("design:type", String),
265
- tslib_1.__metadata("design:paramtypes", [String])
266
- ], ToolBarButtonComponent.prototype, "iconClass", null);
267
- tslib_1.__decorate([
268
- core_1.Input(),
269
- tslib_1.__metadata("design:type", String),
270
- tslib_1.__metadata("design:paramtypes", [String])
271
- ], ToolBarButtonComponent.prototype, "imageUrl", null);
272
- tslib_1.__decorate([
273
- core_1.Output(),
274
- tslib_1.__metadata("design:type", core_1.EventEmitter)
275
- ], ToolBarButtonComponent.prototype, "click", void 0);
276
- tslib_1.__decorate([
277
- core_1.Output(),
278
- tslib_1.__metadata("design:type", core_1.EventEmitter)
279
- ], ToolBarButtonComponent.prototype, "pointerdown", void 0);
280
- tslib_1.__decorate([
281
- core_1.Output(),
282
- tslib_1.__metadata("design:type", core_1.EventEmitter)
283
- ], ToolBarButtonComponent.prototype, "selectedChange", void 0);
284
- tslib_1.__decorate([
285
- core_1.ViewChild('toolbarTemplate', { static: true }),
286
- tslib_1.__metadata("design:type", core_1.TemplateRef)
287
- ], ToolBarButtonComponent.prototype, "toolbarTemplate", void 0);
288
- tslib_1.__decorate([
289
- core_1.ViewChild('popupTemplate', { static: true }),
290
- tslib_1.__metadata("design:type", core_1.TemplateRef)
291
- ], ToolBarButtonComponent.prototype, "popupTemplate", void 0);
292
- tslib_1.__decorate([
293
- core_1.ViewChild('toolbarButton', { read: core_1.ElementRef, static: false }),
294
- tslib_1.__metadata("design:type", core_1.ElementRef)
295
- ], ToolBarButtonComponent.prototype, "toolbarButtonElement", void 0);
296
- tslib_1.__decorate([
297
- core_1.ViewChild('overflowButton', { read: core_1.ElementRef, static: false }),
298
- tslib_1.__metadata("design:type", core_1.ElementRef)
299
- ], ToolBarButtonComponent.prototype, "overflowButtonElement", void 0);
300
- ToolBarButtonComponent = ToolBarButtonComponent_1 = tslib_1.__decorate([
301
- core_1.Component({
302
- exportAs: 'kendoToolBarButton',
303
- // tslint:disable-next-line:no-forward-ref
304
- providers: [{ provide: toolbar_tool_component_1.ToolBarToolComponent, useExisting: core_1.forwardRef(function () { return ToolBarButtonComponent_1; }) }],
305
- selector: 'kendo-toolbar-button',
306
- template: "\n <ng-template #toolbarTemplate>\n <button\n #toolbarButton\n [tabindex]=\"tabIndex\"\n type=\"button\"\n kendoButton\n [ngStyle]=\"style\"\n [ngClass]=\"className\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [toggleable]=\"toggleable\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n [selected]=\"selected\"\n [icon]=\"toolbarOptions.icon\"\n [iconClass]=\"toolbarOptions.iconClass\"\n [imageUrl]=\"toolbarOptions.imageUrl\"\n (click)=\"click.emit($event)\"\n (pointerdown)=\"pointerdown.emit($event)\"\n (selectedChange)=\"selectedChange.emit($event)\"\n (blur)=\"onBlur()\"\n >\n {{ toolbarOptions.text }}\n </button>\n </ng-template>\n <ng-template #popupTemplate>\n <button\n #overflowButton\n tabindex=\"-1\"\n type=\"button\"\n kendoButton\n class=\"k-overflow-button\"\n [ngStyle]=\"style\"\n [ngClass]=\"className\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [toggleable]=\"toggleable\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n [selected]=\"selected\"\n [icon]=\"overflowOptions.icon\"\n [iconClass]=\"overflowOptions.iconClass\"\n [imageUrl]=\"overflowOptions.imageUrl\"\n (click)=\"click.emit($event)\"\n (selectedChange)=\"selectedChange.emit($event)\"\n >\n {{ overflowOptions.text }}\n </button>\n </ng-template>\n "
307
- }),
308
- tslib_1.__metadata("design:paramtypes", [])
309
- ], ToolBarButtonComponent);
310
- return ToolBarButtonComponent;
311
- }(toolbar_tool_component_1.ToolBarToolComponent));
312
- exports.ToolBarButtonComponent = ToolBarButtonComponent;
@@ -1,167 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
10
- var toolbar_tool_component_1 = require("./toolbar-tool.component");
11
- var toolbar_button_component_1 = require("./toolbar-button.component");
12
- var kendo_angular_buttons_1 = require("@progress/kendo-angular-buttons");
13
- var util_1 = require("../util");
14
- /**
15
- * Represents the Kendo UI Toolbar ButtonGroup for Angular.
16
- */
17
- var ToolBarButtonGroupComponent = /** @class */ (function (_super) {
18
- tslib_1.__extends(ToolBarButtonGroupComponent, _super);
19
- function ToolBarButtonGroupComponent(localization) {
20
- var _this = _super.call(this) || this;
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 = util_1.getNextKey(_this.localization.rtl);
28
- _this.getPrevKey = util_1.getPrevKey(_this.localization.rtl);
29
- return _this;
30
- }
31
- ToolBarButtonGroupComponent_1 = ToolBarButtonGroupComponent;
32
- Object.defineProperty(ToolBarButtonGroupComponent.prototype, "look", {
33
- /**
34
- * @hidden
35
- */
36
- set: function (look) {
37
- if (look) {
38
- this.buttonComponents.forEach(function (b) { return b.fillMode = look === 'default' ? 'solid' : look; });
39
- }
40
- },
41
- enumerable: true,
42
- configurable: true
43
- });
44
- Object.defineProperty(ToolBarButtonGroupComponent.prototype, "buttonElements", {
45
- get: function () {
46
- return this.getButtonGroup()
47
- .buttons.filter(function (b) { return !b.isDisabled; })
48
- .map(function (b) { return b.element; });
49
- },
50
- enumerable: true,
51
- configurable: true
52
- });
53
- /**
54
- * @hidden
55
- */
56
- ToolBarButtonGroupComponent.prototype.onFocus = function () {
57
- // triggered on tabin
58
- this.focusedIndex = 0;
59
- };
60
- /**
61
- * @hidden
62
- */
63
- ToolBarButtonGroupComponent.prototype.onNavigate = function (ev) {
64
- ev.preventDefault();
65
- };
66
- /**
67
- * @hidden
68
- */
69
- ToolBarButtonGroupComponent.prototype.selectedChangeHandler = function (state, button) {
70
- button.selected = state;
71
- button.selectedChange.emit(state);
72
- };
73
- /**
74
- * @hidden
75
- */
76
- ToolBarButtonGroupComponent.prototype.onButtonClick = function (ev) {
77
- this.focusedIndex = this.buttonElements.findIndex(function (be) { return be === ev.target || be.contains(ev.target); });
78
- this.focusButton(this.focusedIndex, ev);
79
- };
80
- /**
81
- * @hidden
82
- */
83
- ToolBarButtonGroupComponent.prototype.canFocus = function () {
84
- return !(this.disabled || this.buttonElements.length === 0);
85
- };
86
- /**
87
- * @hidden
88
- */
89
- ToolBarButtonGroupComponent.prototype.focus = function (ev) {
90
- if (ev === void 0) { ev = {}; }
91
- var nextKey = this.getNextKey(this.overflows);
92
- var prevKey = this.getPrevKey(this.overflows);
93
- this.focusedIndex = util_1.getIndexOfFocused(prevKey, nextKey, this.buttonElements)(ev);
94
- this.focusButton(this.focusedIndex, ev);
95
- };
96
- /**
97
- * @hidden
98
- */
99
- ToolBarButtonGroupComponent.prototype.handleKey = function (ev) {
100
- var nextKey = this.getNextKey(this.overflows);
101
- var prevKey = this.getPrevKey(this.overflows);
102
- var peekAtIndex = util_1.makePeeker(this.buttonElements);
103
- var isUnmodified = util_1.areEqual(this.focusedIndex);
104
- this.focusedIndex = util_1.seekFocusedIndex(prevKey, nextKey, peekAtIndex)(this.focusedIndex, ev);
105
- this.focusButton(this.focusedIndex, ev);
106
- return !isUnmodified(this.focusedIndex);
107
- };
108
- ToolBarButtonGroupComponent.prototype.getButtonGroup = function () {
109
- return this.overflows ? this.overflowButtonGroup : this.toolbarButtonGroup;
110
- };
111
- ToolBarButtonGroupComponent.prototype.focusButton = function (index, ev) {
112
- // Guard against focusing twice on mousedown.
113
- if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
114
- this.buttonElements[index].focus();
115
- }
116
- };
117
- var ToolBarButtonGroupComponent_1;
118
- tslib_1.__decorate([
119
- core_1.Input(),
120
- tslib_1.__metadata("design:type", Boolean)
121
- ], ToolBarButtonGroupComponent.prototype, "disabled", void 0);
122
- tslib_1.__decorate([
123
- core_1.Input(),
124
- tslib_1.__metadata("design:type", String)
125
- ], ToolBarButtonGroupComponent.prototype, "selection", void 0);
126
- tslib_1.__decorate([
127
- core_1.Input(),
128
- tslib_1.__metadata("design:type", String)
129
- ], ToolBarButtonGroupComponent.prototype, "width", void 0);
130
- tslib_1.__decorate([
131
- core_1.Input(),
132
- tslib_1.__metadata("design:type", String),
133
- tslib_1.__metadata("design:paramtypes", [String])
134
- ], ToolBarButtonGroupComponent.prototype, "look", null);
135
- tslib_1.__decorate([
136
- core_1.ViewChild('toolbarTemplate', { static: true }),
137
- tslib_1.__metadata("design:type", core_1.TemplateRef)
138
- ], ToolBarButtonGroupComponent.prototype, "toolbarTemplate", void 0);
139
- tslib_1.__decorate([
140
- core_1.ViewChild('popupTemplate', { static: true }),
141
- tslib_1.__metadata("design:type", core_1.TemplateRef)
142
- ], ToolBarButtonGroupComponent.prototype, "popupTemplate", void 0);
143
- tslib_1.__decorate([
144
- core_1.ContentChildren(core_1.forwardRef(function () { return toolbar_button_component_1.ToolBarButtonComponent; })),
145
- tslib_1.__metadata("design:type", core_1.QueryList)
146
- ], ToolBarButtonGroupComponent.prototype, "buttonComponents", void 0);
147
- tslib_1.__decorate([
148
- core_1.ViewChild('toolbarButtonGroup', { static: false }),
149
- tslib_1.__metadata("design:type", kendo_angular_buttons_1.ButtonGroupComponent)
150
- ], ToolBarButtonGroupComponent.prototype, "toolbarButtonGroup", void 0);
151
- tslib_1.__decorate([
152
- core_1.ViewChild('overflowButtonGroup', { static: false }),
153
- tslib_1.__metadata("design:type", kendo_angular_buttons_1.ButtonGroupComponent)
154
- ], ToolBarButtonGroupComponent.prototype, "overflowButtonGroup", void 0);
155
- ToolBarButtonGroupComponent = ToolBarButtonGroupComponent_1 = tslib_1.__decorate([
156
- core_1.Component({
157
- exportAs: 'kendoToolBarButtonGroup',
158
- // tslint:disable-next-line:no-forward-ref
159
- providers: [kendo_angular_l10n_1.LocalizationService, { provide: toolbar_tool_component_1.ToolBarToolComponent, useExisting: core_1.forwardRef(function () { return ToolBarButtonGroupComponent_1; }) }],
160
- selector: 'kendo-toolbar-buttongroup',
161
- template: "\n <ng-template #toolbarTemplate>\n <kendo-buttongroup\n #toolbarButtonGroup\n [tabIndex]=\"-1\"\n [selection]=\"selection\"\n [disabled]=\"disabled\"\n [width]=\"width\"\n (navigate)=\"onNavigate($event)\"\n (focus)=\"onFocus()\"\n >\n <span\n kendoButton\n *ngFor=\"let button of buttonComponents\"\n [ngStyle]=\"button.style\"\n [ngClass]=\"button.className\"\n [attr.title]=\"button.title\"\n [disabled]=\"button.disabled\"\n [togglable]=\"button.togglable\"\n [selected]=\"button.selected\"\n [fillMode]=\"button.fillMode\"\n [themeColor]=\"button.fillMode ? button.themeColor : null\"\n [icon]=\"button.toolbarOptions.icon\"\n [iconClass]=\"button.toolbarOptions.iconClass\"\n [imageUrl]=\"button.toolbarOptions.imageUrl\"\n (click)=\"button.click.emit($event); onButtonClick($event)\"\n (pointerdown)=\"button.pointerdown.emit($event)\"\n (selectedChange)=\"selectedChangeHandler($event, button)\"\n >\n {{ button.toolbarOptions.text }}\n </span>\n </kendo-buttongroup>\n </ng-template>\n <ng-template #popupTemplate>\n <kendo-buttongroup\n #overflowButtonGroup\n class=\"k-overflow-button\"\n [tabIndex]=\"-1\"\n [selection]=\"selection\"\n [disabled]=\"disabled\"\n [width]=\"width\"\n >\n <span\n kendoButton\n class=\"k-overflow-button\"\n *ngFor=\"let button of buttonComponents\"\n [ngStyle]=\"button.style\"\n [ngClass]=\"button.className\"\n [attr.title]=\"button.title\"\n [disabled]=\"button.disabled\"\n [togglable]=\"button.togglable\"\n [selected]=\"button.selected\"\n [fillMode]=\"button.fillMode\"\n [themeColor]=\"button.fillMode ? button.themeColor : null\"\n [icon]=\"button.overflowOptions.icon\"\n [iconClass]=\"button.overflowOptions.iconClass\"\n [imageUrl]=\"button.overflowOptions.imageUrl\"\n (click)=\"button.click.emit($event); onButtonClick($event)\"\n (selectedChange)=\"selectedChangeHandler($event, button)\"\n >\n {{ button.overflowOptions.text }}\n </span>\n </kendo-buttongroup>\n </ng-template>\n "
162
- }),
163
- tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService])
164
- ], ToolBarButtonGroupComponent);
165
- return ToolBarButtonGroupComponent;
166
- }(toolbar_tool_component_1.ToolBarToolComponent));
167
- exports.ToolBarButtonGroupComponent = ToolBarButtonGroupComponent;
@@ -1,68 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * @hidden
11
- */
12
- var ToolBarButtonListComponent = /** @class */ (function () {
13
- function ToolBarButtonListComponent() {
14
- this.disabled = false;
15
- this.fillMode = 'solid';
16
- this.themeColor = 'base';
17
- this.itemClick = new core_1.EventEmitter();
18
- }
19
- ToolBarButtonListComponent.prototype.getText = function (dataItem) {
20
- if (dataItem) {
21
- return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
22
- }
23
- return undefined;
24
- };
25
- ToolBarButtonListComponent.prototype.onClick = function (item, index) {
26
- var dataItem = this.data[index];
27
- if (item.click) {
28
- item.click(dataItem);
29
- }
30
- this.itemClick.emit(dataItem);
31
- };
32
- tslib_1.__decorate([
33
- core_1.Input(),
34
- tslib_1.__metadata("design:type", Array)
35
- ], ToolBarButtonListComponent.prototype, "data", void 0);
36
- tslib_1.__decorate([
37
- core_1.Input(),
38
- tslib_1.__metadata("design:type", String)
39
- ], ToolBarButtonListComponent.prototype, "textField", void 0);
40
- tslib_1.__decorate([
41
- core_1.Input(),
42
- tslib_1.__metadata("design:type", Boolean)
43
- ], ToolBarButtonListComponent.prototype, "disabled", void 0);
44
- tslib_1.__decorate([
45
- core_1.Input(),
46
- tslib_1.__metadata("design:type", String)
47
- ], ToolBarButtonListComponent.prototype, "fillMode", void 0);
48
- tslib_1.__decorate([
49
- core_1.Input(),
50
- tslib_1.__metadata("design:type", String)
51
- ], ToolBarButtonListComponent.prototype, "themeColor", void 0);
52
- tslib_1.__decorate([
53
- core_1.Output(),
54
- tslib_1.__metadata("design:type", core_1.EventEmitter)
55
- ], ToolBarButtonListComponent.prototype, "itemClick", void 0);
56
- tslib_1.__decorate([
57
- core_1.ViewChildren('button'),
58
- tslib_1.__metadata("design:type", core_1.QueryList)
59
- ], ToolBarButtonListComponent.prototype, "buttons", void 0);
60
- ToolBarButtonListComponent = tslib_1.__decorate([
61
- core_1.Component({
62
- selector: 'kendo-toolbar-buttonlist',
63
- template: "\n <button\n #button\n type=\"button\"\n tabindex=\"-1\"\n kendoButton\n style=\"padding-left: 16px\"\n class=\"k-overflow-button\"\n *ngFor=\"let item of data; let i = index\"\n [disabled]=\"disabled || item.disabled\"\n [icon]=\"item.icon\"\n [iconClass]=\"item.iconClass\"\n [imageUrl]=\"item.imageUrl\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n (click)=\"onClick(item, i)\"\n >\n {{ getText(item) }}\n </button>\n "
64
- })
65
- ], ToolBarButtonListComponent);
66
- return ToolBarButtonListComponent;
67
- }());
68
- exports.ToolBarButtonListComponent = ToolBarButtonListComponent;