@progress/kendo-angular-toolbar 5.0.3 → 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 +158 -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} +1015 -890
  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} +24 -17
  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 -653
  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 -2677
  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 -655
  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,380 +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
- import * as tslib_1 from "tslib";
6
- import { Component, TemplateRef, forwardRef, ViewChild, Input, ElementRef, Output, EventEmitter } from '@angular/core';
7
- import { SplitButtonComponent } from '@progress/kendo-angular-buttons';
8
- import { ToolBarToolComponent } from './toolbar-tool.component';
9
- import { ToolBarButtonListComponent } from './toolbar-buttonlist.component';
10
- import { getValueForLocation, makePeeker, getIndexOfFocused, getPrevKey, getNextKey, seekFocusedIndex, areEqual } from '../util';
11
- /**
12
- * Represents the [Kendo UI ToolBar SplitButton for Angular]({% slug controltypes_toolbar %}#toc-splitbuttons).
13
- */
14
- var ToolBarSplitButtonComponent = /** @class */ (function (_super) {
15
- tslib_1.__extends(ToolBarSplitButtonComponent, _super);
16
- function ToolBarSplitButtonComponent() {
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
- * The fillMode property specifies the background and border styles of the Button.
29
- *
30
- * The available values are:
31
- * * `solid` (default)
32
- * * `flat`
33
- * * `outline`
34
- * * `link`
35
- * * `null`
36
- */
37
- _this.fillMode = 'solid';
38
- /**
39
- * The Button allows you to specify predefined theme colors.
40
- * The theme color will be applied as a background and border color while also amending the text color accordingly.
41
- *
42
- * The possible values are:
43
- * * `base` —Applies coloring based on the `base` theme color. (default)
44
- * * `primary` —Applies coloring based on the `primary` theme color.
45
- * * `secondary`—Applies coloring based on the `secondary` theme color.
46
- * * `tertiary`— Applies coloring based on the `tertiary` theme color.
47
- * * `info`—Applies coloring based on the `info` theme color.
48
- * * `success`— Applies coloring based on the `success` theme color.
49
- * * `warning`— Applies coloring based on the `warning` theme color.
50
- * * `error`— Applies coloring based on the `error` theme color.
51
- * * `dark`— Applies coloring based on the `dark` theme color.
52
- * * `light`— Applies coloring based on the `light` theme color.
53
- * * `inverse`— Applies coloring based on the `inverse` theme color.
54
- * * `null` —Removes the default CSS class (no class would be rendered).
55
- */
56
- _this.themeColor = 'base';
57
- /**
58
- * Specifies the name of the [font icon]({% slug icons %}#toc-list-of-font-icons) that will
59
- * be rendered for the button which opens the popup.
60
- */
61
- _this.arrowButtonIcon = 'arrow-s';
62
- /**
63
- * Configures the text field of the button-list popup.
64
- */
65
- _this.textField = 'text';
66
- /**
67
- * Fires each time the user clicks the main button.
68
- */
69
- _this.buttonClick = new EventEmitter();
70
- /**
71
- * Fires each time the user clicks the drop-down list.
72
- * The event data contains the data item that is bound to the clicked list item.
73
- */
74
- _this.itemClick = new EventEmitter();
75
- /**
76
- * Fires each time the popup is about to open.
77
- * This event is preventable. If you cancel the event, the popup will remain closed.
78
- */
79
- _this.open = new EventEmitter();
80
- /**
81
- * Fires each time the popup is about to close.
82
- * This event is preventable. If you cancel the event, the popup will remain open.
83
- */
84
- _this.close = new EventEmitter();
85
- _this.toolbarOptions = {
86
- text: '',
87
- icon: '',
88
- iconClass: '',
89
- imageUrl: ''
90
- };
91
- _this.overflowOptions = {
92
- text: '',
93
- icon: '',
94
- iconClass: '',
95
- imageUrl: ''
96
- };
97
- _this._popupSettings = { animate: true, popupClass: '' };
98
- _this.focusedIndex = -1;
99
- _this.getNextKey = getNextKey();
100
- _this.getPrevKey = getPrevKey();
101
- return _this;
102
- }
103
- ToolBarSplitButtonComponent_1 = ToolBarSplitButtonComponent;
104
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "text", {
105
- /**
106
- * Sets the text of the SplitButton ([see example]({% slug controltypes_toolbar %}#toc-splitbuttons).
107
- */
108
- set: function (text) {
109
- this.toolbarOptions.text = getValueForLocation(text, this.showText, false);
110
- this.overflowOptions.text = getValueForLocation(text, this.showText, true);
111
- },
112
- enumerable: true,
113
- configurable: true
114
- });
115
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "icon", {
116
- /**
117
- * Defines the icon that will be rendered next to the button text
118
- * ([see example]({% slug controltypes_toolbar %}#toc-splitbuttons)).
119
- */
120
- set: function (icon) {
121
- this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
122
- this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
123
- },
124
- enumerable: true,
125
- configurable: true
126
- });
127
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "iconClass", {
128
- /**
129
- * Defines an icon with a custom CSS class that will be rendered next to the button text.
130
- */
131
- set: function (iconClass) {
132
- this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
133
- this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
134
- },
135
- enumerable: true,
136
- configurable: true
137
- });
138
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "imageUrl", {
139
- /**
140
- * Defines the location of an image that will be displayed next to the button text.
141
- */
142
- set: function (imageUrl) {
143
- this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
144
- this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
145
- },
146
- enumerable: true,
147
- configurable: true
148
- });
149
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "popupSettings", {
150
- get: function () {
151
- if (!this._popupSettings) {
152
- this._popupSettings = { animate: true, popupClass: '' };
153
- }
154
- return this._popupSettings;
155
- },
156
- /**
157
- * Configures the popup of the SplitButton.
158
- *
159
- * The available options are:
160
- * - `animate:Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
161
- * - `popupClass:String`—Specifies a list of CSS classes that are used to style the popup.
162
- */
163
- set: function (value) {
164
- this._popupSettings = value;
165
- },
166
- enumerable: true,
167
- configurable: true
168
- });
169
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "look", {
170
- /**
171
- * @hidden
172
- */
173
- set: function (look) {
174
- if (look) {
175
- this.fillMode = look === 'default' ? 'solid' : look;
176
- }
177
- },
178
- enumerable: true,
179
- configurable: true
180
- });
181
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "data", {
182
- get: function () {
183
- if (!this._data) {
184
- this.data = [];
185
- }
186
- return this._data;
187
- },
188
- /**
189
- * Sets the data of the SplitButton ([see example]({% slug controltypes_toolbar %}#toc-splitbuttons)).
190
- *
191
- * > The data has to be provided in an array-like list.
192
- */
193
- set: function (data) {
194
- this._data = data || [];
195
- },
196
- enumerable: true,
197
- configurable: true
198
- });
199
- Object.defineProperty(ToolBarSplitButtonComponent.prototype, "overflowButtons", {
200
- get: function () {
201
- return [this.overflowSplitButton].concat(this.overflowSplitButtonButtonList.buttons.toArray().filter(function (b) { return !b.nativeElement.disabled; }));
202
- },
203
- enumerable: true,
204
- configurable: true
205
- });
206
- /**
207
- * @hidden
208
- */
209
- ToolBarSplitButtonComponent.prototype.onButtonListClick = function (ev) {
210
- this.focusedIndex = this.overflowButtons.findIndex(function (b) { return b.nativeElement.contains(ev.target); });
211
- };
212
- /**
213
- * @hidden
214
- */
215
- ToolBarSplitButtonComponent.prototype.onMainButtonClick = function (ev) {
216
- this.buttonClick.emit(ev);
217
- this.focusedIndex = 0;
218
- };
219
- /**
220
- * @hidden
221
- */
222
- ToolBarSplitButtonComponent.prototype.canFocus = function () {
223
- return !this.disabled;
224
- };
225
- /**
226
- * @hidden
227
- */
228
- ToolBarSplitButtonComponent.prototype.focus = function (ev) {
229
- if (ev === void 0) { ev = {}; }
230
- if (!this.overflows) {
231
- if (ev.type === 'focus' || ev.type === 'keydown') {
232
- this.toolbarSplitButton.focus();
233
- }
234
- }
235
- else if (this.overflowButtons.length > 0) {
236
- this.focusedIndex = getIndexOfFocused(this.getPrevKey(), this.getNextKey(), this.overflowButtons.map(function (ob) { return ob.nativeElement; }))(ev);
237
- this.focusButton(this.focusedIndex, ev);
238
- }
239
- };
240
- /**
241
- * @hidden
242
- */
243
- ToolBarSplitButtonComponent.prototype.handleKey = function (ev) {
244
- if (!this.overflows && (ev.keyCode === this.getPrevKey(this.overflows) || ev.keyCode === this.getNextKey(this.overflows))) {
245
- return false;
246
- }
247
- if (this.overflows) {
248
- var peekAtIndex = makePeeker(this.overflowButtons);
249
- var isUnmodified = areEqual(this.focusedIndex);
250
- this.focusedIndex = seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex, ev);
251
- this.focusButton(this.focusedIndex, ev);
252
- return !isUnmodified(this.focusedIndex);
253
- }
254
- };
255
- ToolBarSplitButtonComponent.prototype.focusButton = function (index, ev) {
256
- if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
257
- this.overflowButtons[index].nativeElement.focus();
258
- }
259
- };
260
- var ToolBarSplitButtonComponent_1;
261
- tslib_1.__decorate([
262
- Input(),
263
- tslib_1.__metadata("design:type", String)
264
- ], ToolBarSplitButtonComponent.prototype, "showText", void 0);
265
- tslib_1.__decorate([
266
- Input(),
267
- tslib_1.__metadata("design:type", String)
268
- ], ToolBarSplitButtonComponent.prototype, "showIcon", void 0);
269
- tslib_1.__decorate([
270
- Input(),
271
- tslib_1.__metadata("design:type", String),
272
- tslib_1.__metadata("design:paramtypes", [String])
273
- ], ToolBarSplitButtonComponent.prototype, "text", null);
274
- tslib_1.__decorate([
275
- Input(),
276
- tslib_1.__metadata("design:type", String),
277
- tslib_1.__metadata("design:paramtypes", [String])
278
- ], ToolBarSplitButtonComponent.prototype, "icon", null);
279
- tslib_1.__decorate([
280
- Input(),
281
- tslib_1.__metadata("design:type", String),
282
- tslib_1.__metadata("design:paramtypes", [String])
283
- ], ToolBarSplitButtonComponent.prototype, "iconClass", null);
284
- tslib_1.__decorate([
285
- Input(),
286
- tslib_1.__metadata("design:type", String),
287
- tslib_1.__metadata("design:paramtypes", [String])
288
- ], ToolBarSplitButtonComponent.prototype, "imageUrl", null);
289
- tslib_1.__decorate([
290
- Input(),
291
- tslib_1.__metadata("design:type", Boolean)
292
- ], ToolBarSplitButtonComponent.prototype, "disabled", void 0);
293
- tslib_1.__decorate([
294
- Input(),
295
- tslib_1.__metadata("design:type", Object),
296
- tslib_1.__metadata("design:paramtypes", [Object])
297
- ], ToolBarSplitButtonComponent.prototype, "popupSettings", null);
298
- tslib_1.__decorate([
299
- Input(),
300
- tslib_1.__metadata("design:type", String)
301
- ], ToolBarSplitButtonComponent.prototype, "fillMode", void 0);
302
- tslib_1.__decorate([
303
- Input(),
304
- tslib_1.__metadata("design:type", String)
305
- ], ToolBarSplitButtonComponent.prototype, "themeColor", void 0);
306
- tslib_1.__decorate([
307
- Input(),
308
- tslib_1.__metadata("design:type", String),
309
- tslib_1.__metadata("design:paramtypes", [String])
310
- ], ToolBarSplitButtonComponent.prototype, "look", null);
311
- tslib_1.__decorate([
312
- Input(),
313
- tslib_1.__metadata("design:type", String)
314
- ], ToolBarSplitButtonComponent.prototype, "buttonClass", void 0);
315
- tslib_1.__decorate([
316
- Input(),
317
- tslib_1.__metadata("design:type", Object)
318
- ], ToolBarSplitButtonComponent.prototype, "arrowButtonClass", void 0);
319
- tslib_1.__decorate([
320
- Input(),
321
- tslib_1.__metadata("design:type", String)
322
- ], ToolBarSplitButtonComponent.prototype, "arrowButtonIcon", void 0);
323
- tslib_1.__decorate([
324
- Input(),
325
- tslib_1.__metadata("design:type", String)
326
- ], ToolBarSplitButtonComponent.prototype, "textField", void 0);
327
- tslib_1.__decorate([
328
- Input(),
329
- tslib_1.__metadata("design:type", Array),
330
- tslib_1.__metadata("design:paramtypes", [Array])
331
- ], ToolBarSplitButtonComponent.prototype, "data", null);
332
- tslib_1.__decorate([
333
- Output(),
334
- tslib_1.__metadata("design:type", EventEmitter)
335
- ], ToolBarSplitButtonComponent.prototype, "buttonClick", void 0);
336
- tslib_1.__decorate([
337
- Output(),
338
- tslib_1.__metadata("design:type", EventEmitter)
339
- ], ToolBarSplitButtonComponent.prototype, "itemClick", void 0);
340
- tslib_1.__decorate([
341
- Output(),
342
- tslib_1.__metadata("design:type", EventEmitter)
343
- ], ToolBarSplitButtonComponent.prototype, "open", void 0);
344
- tslib_1.__decorate([
345
- Output(),
346
- tslib_1.__metadata("design:type", EventEmitter)
347
- ], ToolBarSplitButtonComponent.prototype, "close", void 0);
348
- tslib_1.__decorate([
349
- ViewChild('toolbarTemplate', { static: true }),
350
- tslib_1.__metadata("design:type", TemplateRef)
351
- ], ToolBarSplitButtonComponent.prototype, "toolbarTemplate", void 0);
352
- tslib_1.__decorate([
353
- ViewChild('popupTemplate', { static: true }),
354
- tslib_1.__metadata("design:type", TemplateRef)
355
- ], ToolBarSplitButtonComponent.prototype, "popupTemplate", void 0);
356
- tslib_1.__decorate([
357
- ViewChild('toolbarSplitButton', { static: false }),
358
- tslib_1.__metadata("design:type", SplitButtonComponent)
359
- ], ToolBarSplitButtonComponent.prototype, "toolbarSplitButton", void 0);
360
- tslib_1.__decorate([
361
- ViewChild('overflowSplitButton', { read: ElementRef, static: false }),
362
- tslib_1.__metadata("design:type", ElementRef)
363
- ], ToolBarSplitButtonComponent.prototype, "overflowSplitButton", void 0);
364
- tslib_1.__decorate([
365
- ViewChild('overflowSplitButtonButtonList', { static: false }),
366
- tslib_1.__metadata("design:type", ToolBarButtonListComponent)
367
- ], ToolBarSplitButtonComponent.prototype, "overflowSplitButtonButtonList", void 0);
368
- ToolBarSplitButtonComponent = ToolBarSplitButtonComponent_1 = tslib_1.__decorate([
369
- Component({
370
- exportAs: 'kendoToolBarSplitButton',
371
- // tslint:disable-next-line:no-forward-ref
372
- providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(function () { return ToolBarSplitButtonComponent_1; }) }],
373
- selector: 'kendo-toolbar-splitbutton',
374
- template: "\n <ng-template #toolbarTemplate>\n <kendo-splitbutton\n #toolbarSplitButton\n [data]=\"data\"\n [text]=\"toolbarOptions.text\"\n [icon]=\"toolbarOptions.icon\"\n [iconClass]=\"toolbarOptions.iconClass\"\n [imageUrl]=\"toolbarOptions.imageUrl\"\n [buttonClass]=\"buttonClass\"\n [arrowButtonClass]=\"arrowButtonClass\"\n [arrowButtonIcon]=\"arrowButtonIcon\"\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n [textField]=\"textField\"\n [popupSettings]=\"popupSettings\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n (buttonClick)=\"buttonClick.emit($event)\"\n (open)=\"open.emit($event)\"\n (close)=\"close.emit($event)\"\n (itemClick)=\"itemClick.emit($event)\"\n >\n </kendo-splitbutton>\n </ng-template>\n <ng-template #popupTemplate>\n <button\n #overflowSplitButton\n type=\"button\"\n tabindex=\"-1\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n kendoButton\n class=\"k-overflow-button\"\n [disabled]=\"disabled\"\n [icon]=\"overflowOptions.icon\"\n [iconClass]=\"overflowOptions.iconClass\"\n [imageUrl]=\"overflowOptions.imageUrl\"\n [ngClass]=\"buttonClass\"\n (click)=\"buttonClick.emit($event)\"\n (click)=\"onMainButtonClick($event)\"\n >\n {{ overflowOptions.text }}\n </button>\n <kendo-toolbar-buttonlist\n #overflowSplitButtonButtonList\n [data]=\"data\"\n [disabled]=\"disabled\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n [textField]=\"textField\"\n (itemClick)=\"itemClick.emit($event)\"\n (click)=\"onButtonListClick($event)\"\n >\n </kendo-toolbar-buttonlist>\n </ng-template>\n "
375
- }),
376
- tslib_1.__metadata("design:paramtypes", [])
377
- ], ToolBarSplitButtonComponent);
378
- return ToolBarSplitButtonComponent;
379
- }(ToolBarToolComponent));
380
- export { ToolBarSplitButtonComponent };
@@ -1,76 +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
- import * as tslib_1 from "tslib";
6
- import { Component, Input } from '@angular/core';
7
- /**
8
- * Represents the Base ToolBar Tool component for Angular.
9
- * Extend this class to create custom tools.
10
- */
11
- var ToolBarToolComponent = /** @class */ (function () {
12
- function ToolBarToolComponent() {
13
- this.tabIndex = -1; //Focus movement inside the toolbar is managed using roving tabindex.
14
- this.overflows = true;
15
- // this should be replaced with showTool: DisplayMode = 'both';
16
- /**
17
- * @hidden
18
- */
19
- this.responsive = true;
20
- }
21
- Object.defineProperty(ToolBarToolComponent.prototype, "toolbarDisplay", {
22
- get: function () {
23
- return this.overflows ? 'none' : 'inline-block';
24
- },
25
- enumerable: true,
26
- configurable: true
27
- });
28
- Object.defineProperty(ToolBarToolComponent.prototype, "overflowDisplay", {
29
- get: function () {
30
- return this.overflows ? 'block' : 'none';
31
- },
32
- enumerable: true,
33
- configurable: true
34
- });
35
- /**
36
- * Determines if the tool can be focused.
37
- * If the returned value is `false`, the tool will not be part of the keyboard navigation.
38
- * @returns `true` if the tool should take part in keyboard navigation.
39
- */
40
- ToolBarToolComponent.prototype.canFocus = function () {
41
- return false;
42
- };
43
- /**
44
- * Called when the tool is focused.
45
- * The method accepts as argument the original browser event, which can be a `KeyboardEvent`, `MouseEvent` or `FocusEvent`.
46
- * @param {Event} ev - This is the event that caused the tool to be focused.
47
- */
48
- // @ts-ignore
49
- ToolBarToolComponent.prototype.focus = function (ev) {
50
- /* noop */
51
- };
52
- /**
53
- * Called when the tool is focused and one of the arrow keys is pressed.
54
- * The returned boolean value determines whether the `ToolBarComponent` will move the focus to the next/previous `ToolBarToolComponent`
55
- * ([see example]({% slug customcontroltypes_toolbar %}#toc-adding-keyboard-navigation)).
56
- * @param {KeyboardEvent} ev - The last pressed arrow key
57
- * @returns
58
- */
59
- // @ts-ignore
60
- ToolBarToolComponent.prototype.handleKey = function (ev) {
61
- return false;
62
- };
63
- tslib_1.__decorate([
64
- Input(),
65
- tslib_1.__metadata("design:type", Boolean)
66
- ], ToolBarToolComponent.prototype, "responsive", void 0);
67
- ToolBarToolComponent = tslib_1.__decorate([
68
- Component({
69
- // tslint:disable-next-line:component-selector
70
- selector: 'toolbar-tool',
71
- template: ""
72
- })
73
- ], ToolBarToolComponent);
74
- return ToolBarToolComponent;
75
- }());
76
- export { ToolBarToolComponent };
package/dist/es/util.js DELETED
@@ -1,204 +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
- import { Keys } from '@progress/kendo-angular-common';
6
- /**
7
- * @hidden
8
- */
9
- var focusableRegex = /^(?:a|input|select|textarea|button|object)$/i;
10
- /**
11
- * @hidden
12
- */
13
- export function outerWidth(element) {
14
- var width = element.offsetWidth;
15
- var style = getComputedStyle(element);
16
- width += parseFloat(style.marginLeft) || 0 + parseFloat(style.marginRight) || 0;
17
- return width;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- export function innerWidth(element) {
23
- var width = element.offsetWidth;
24
- var style = getComputedStyle(element);
25
- width -= parseFloat(style.paddingLeft) || 0 + parseFloat(style.borderLeftWidth) || 0;
26
- width -= parseFloat(style.paddingRight) || 0 + parseFloat(style.borderRightWidth) || 0;
27
- return width;
28
- }
29
- /**
30
- * @hidden
31
- */
32
- export function outerHeight(element) {
33
- var width = element.offsetHeight;
34
- var style = getComputedStyle(element);
35
- width += parseFloat(style.marginTop) || 0 + parseFloat(style.marginBottom) || 0;
36
- return width;
37
- }
38
- /**
39
- * @hidden
40
- */
41
- export var closest = function (node, predicate) {
42
- while (node && !predicate(node)) {
43
- node = node.parentNode;
44
- }
45
- return node;
46
- };
47
- /**
48
- * @hidden
49
- */
50
- export var isVisible = function (element) {
51
- var rect = element.getBoundingClientRect();
52
- var hasSize = rect.width > 0 && rect.height > 0;
53
- var hasPosition = rect.x !== 0 && rect.y !== 0;
54
- // Elements can have zero size due to styling, but they should still count as visible.
55
- // For example, the selection checkbox has no size, but is made visible through styling.
56
- return (hasSize || hasPosition) && window.getComputedStyle(element).visibility !== 'hidden';
57
- };
58
- /**
59
- * @hidden
60
- */
61
- export var findElement = function (node, predicate, matchSelf) {
62
- if (matchSelf === void 0) { matchSelf = true; }
63
- if (!node) {
64
- return;
65
- }
66
- if (matchSelf && predicate(node)) {
67
- return node;
68
- }
69
- node = node.firstChild;
70
- while (node) {
71
- if (node.nodeType === 1) {
72
- var element = findElement(node, predicate);
73
- if (element) {
74
- return element;
75
- }
76
- }
77
- node = node.nextSibling;
78
- }
79
- };
80
- /**
81
- * @hidden
82
- */
83
- export var isFocusable = function (element, checkVisibility) {
84
- if (checkVisibility === void 0) { checkVisibility = true; }
85
- if (element.tagName) {
86
- var tagName = element.tagName.toLowerCase();
87
- var tabIndex = element.getAttribute('tabIndex');
88
- var focusable = tabIndex !== null;
89
- if (focusableRegex.test(tagName)) {
90
- focusable = !element.disabled;
91
- }
92
- return focusable && (!checkVisibility || isVisible(element));
93
- }
94
- return false;
95
- };
96
- /**
97
- * @hidden
98
- */
99
- export var findFocusable = function (element, checkVisibility) {
100
- if (checkVisibility === void 0) { checkVisibility = true; }
101
- return findElement(element, function (node) { return isFocusable(node, checkVisibility); });
102
- };
103
- /**
104
- * @hidden
105
- */
106
- export var findFocusableChild = function (element, checkVisibility) {
107
- if (checkVisibility === void 0) { checkVisibility = true; }
108
- return findElement(element, function (node) { return isFocusable(node, checkVisibility); }, false);
109
- };
110
- /**
111
- * @hidden
112
- */
113
- export var findFocusableSibling = function (element, checkVisibility, reverse) {
114
- if (checkVisibility === void 0) { checkVisibility = true; }
115
- var node = reverse ? element.prevSibling : element.nextSibling;
116
- while (node) {
117
- if (node.nodeType === 1) {
118
- var result = findElement(node, function (el) { return isFocusable(el, checkVisibility); });
119
- if (result) {
120
- return result;
121
- }
122
- }
123
- node = reverse ? node.prevSibling : node.nextSibling;
124
- }
125
- };
126
- /**
127
- * @hidden
128
- */
129
- export var isPresent = function (value) { return value !== null && value !== undefined; };
130
- /**
131
- * @hidden
132
- */
133
- export var makePeeker = function (collection) { return function (index) { return isPresent(collection[index]); }; };
134
- /**
135
- * @hidden
136
- */
137
- export var getIndexOfFocused = function (prevKeyCode, nextKeyCode, collection) { return function (ev) {
138
- switch (ev.type) {
139
- case 'keydown':
140
- if (ev.keyCode === prevKeyCode) {
141
- return collection.length - 1;
142
- }
143
- if (ev.keyCode === nextKeyCode) {
144
- return 0;
145
- }
146
- break;
147
- case 'click':
148
- return collection.findIndex(function (be) { return be === ev.target || be.contains(ev.target); });
149
- case 'focus':
150
- return 0;
151
- default:
152
- return 0;
153
- }
154
- }; };
155
- /**
156
- * @hidden
157
- */
158
- export var seekFocusedIndex = function (prevKeyCode, nextKeyCode, seeker) { return function (startIndex, ev) {
159
- switch (ev.keyCode) {
160
- case prevKeyCode:
161
- return seeker(startIndex - 1) ? startIndex - 1 : startIndex;
162
- case nextKeyCode:
163
- return seeker(startIndex + 1) ? startIndex + 1 : startIndex;
164
- default:
165
- return startIndex;
166
- }
167
- }; };
168
- /**
169
- * @hidden
170
- */
171
- export var areEqual = function (first) { return function (second) { return first === second; }; };
172
- /**
173
- * @hidden
174
- */
175
- export var getNextKey = function (rtl) {
176
- if (rtl === void 0) { rtl = false; }
177
- return function (overflows) {
178
- if (overflows === void 0) { overflows = true; }
179
- return overflows ? Keys.ArrowDown : rtl ? Keys.ArrowLeft : Keys.ArrowRight;
180
- };
181
- };
182
- /**
183
- * @hidden
184
- */
185
- export var getPrevKey = function (rtl) {
186
- if (rtl === void 0) { rtl = false; }
187
- return function (overflows) {
188
- if (overflows === void 0) { overflows = true; }
189
- return overflows ? Keys.ArrowUp : rtl ? Keys.ArrowRight : Keys.ArrowLeft;
190
- };
191
- };
192
- /**
193
- * @hidden
194
- */
195
- export var getValueForLocation = function (property, displayMode, overflows) {
196
- switch (displayMode) {
197
- case 'toolbar':
198
- return overflows ? undefined : property;
199
- case 'overflow':
200
- return overflows ? property : undefined;
201
- default:
202
- return property;
203
- }
204
- };
@@ -1,4 +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
- *-------------------------------------------------------------------------------------------*/
@@ -1,14 +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
- /**
6
- * Generated bundle index. Do not edit.
7
- */
8
- export * from './main';
9
- export { ToolbarMessages } from './localization/messages';
10
- export { NavigationService } from './navigation.service';
11
- export { RefreshService } from './refresh.service';
12
- export { ToolBarRendererComponent } from './renderer.component';
13
- export { RendererService } from './renderer.service';
14
- export { ToolBarButtonListComponent } from './tools/toolbar-buttonlist.component';