@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,29 +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
- * @hidden
7
- */
8
- var PreventableEvent = /** @class */ (function () {
9
- function PreventableEvent() {
10
- this.prevented = false;
11
- }
12
- /**
13
- * Prevents the default action for a specified event.
14
- * In this way, the source component suppresses the built-in behavior that follows the event.
15
- */
16
- PreventableEvent.prototype.preventDefault = function () {
17
- this.prevented = true;
18
- };
19
- /**
20
- * If the event is prevented by any of its subscribers, returns `true`.
21
- *
22
- * @returns `true` if the default action was prevented. Otherwise, returns `false`.
23
- */
24
- PreventableEvent.prototype.isDefaultPrevented = function () {
25
- return this.prevented;
26
- };
27
- return PreventableEvent;
28
- }());
29
- export { PreventableEvent };
@@ -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,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,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
- *-------------------------------------------------------------------------------------------*/
package/dist/es/index.js DELETED
@@ -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';
@@ -1,43 +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, forwardRef } from '@angular/core';
7
- import { LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { ToolbarMessages } from './messages';
9
- /**
10
- * Custom component messages override default component messages.
11
- */
12
- var ToolbarCustomMessagesComponent = /** @class */ (function (_super) {
13
- tslib_1.__extends(ToolbarCustomMessagesComponent, _super);
14
- function ToolbarCustomMessagesComponent(service) {
15
- var _this = _super.call(this) || this;
16
- _this.service = service;
17
- return _this;
18
- }
19
- ToolbarCustomMessagesComponent_1 = ToolbarCustomMessagesComponent;
20
- Object.defineProperty(ToolbarCustomMessagesComponent.prototype, "override", {
21
- get: function () {
22
- return true;
23
- },
24
- enumerable: true,
25
- configurable: true
26
- });
27
- var ToolbarCustomMessagesComponent_1;
28
- ToolbarCustomMessagesComponent = ToolbarCustomMessagesComponent_1 = tslib_1.__decorate([
29
- Component({
30
- providers: [
31
- {
32
- provide: ToolbarMessages,
33
- useExisting: forwardRef(function () { return ToolbarCustomMessagesComponent_1; }) // tslint:disable-line:no-forward-ref
34
- }
35
- ],
36
- selector: 'kendo-toolbar-messages',
37
- template: ""
38
- }),
39
- tslib_1.__metadata("design:paramtypes", [LocalizationService])
40
- ], ToolbarCustomMessagesComponent);
41
- return ToolbarCustomMessagesComponent;
42
- }(ToolbarMessages));
43
- export { ToolbarCustomMessagesComponent };
@@ -1,35 +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 { Directive, forwardRef } from '@angular/core';
7
- import { LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { ToolbarMessages } from './messages';
9
- /**
10
- * @hidden
11
- */
12
- var LocalizedToolbarMessagesDirective = /** @class */ (function (_super) {
13
- tslib_1.__extends(LocalizedToolbarMessagesDirective, _super);
14
- function LocalizedToolbarMessagesDirective(service) {
15
- var _this = _super.call(this) || this;
16
- _this.service = service;
17
- return _this;
18
- }
19
- LocalizedToolbarMessagesDirective_1 = LocalizedToolbarMessagesDirective;
20
- var LocalizedToolbarMessagesDirective_1;
21
- LocalizedToolbarMessagesDirective = LocalizedToolbarMessagesDirective_1 = tslib_1.__decorate([
22
- Directive({
23
- providers: [
24
- {
25
- provide: ToolbarMessages,
26
- useExisting: forwardRef(function () { return LocalizedToolbarMessagesDirective_1; }) // tslint:disable-line:no-forward-ref
27
- }
28
- ],
29
- selector: '[kendoToolbarLocalizedMessages]'
30
- }),
31
- tslib_1.__metadata("design:paramtypes", [LocalizationService])
32
- ], LocalizedToolbarMessagesDirective);
33
- return LocalizedToolbarMessagesDirective;
34
- }(ToolbarMessages));
35
- export { LocalizedToolbarMessagesDirective };
@@ -1,22 +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 { Input } from '@angular/core';
7
- import { ComponentMessages } from '@progress/kendo-angular-l10n';
8
- /**
9
- * @hidden
10
- */
11
- var ToolbarMessages = /** @class */ (function (_super) {
12
- tslib_1.__extends(ToolbarMessages, _super);
13
- function ToolbarMessages() {
14
- return _super !== null && _super.apply(this, arguments) || this;
15
- }
16
- tslib_1.__decorate([
17
- Input(),
18
- tslib_1.__metadata("design:type", String)
19
- ], ToolbarMessages.prototype, "moreToolsTitle", void 0);
20
- return ToolbarMessages;
21
- }(ComponentMessages));
22
- export { ToolbarMessages };
@@ -1,130 +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 { Injectable, NgZone } from '@angular/core';
7
- import { take } from 'rxjs/operators';
8
- import { isPresent } from './util';
9
- /**
10
- * @hidden
11
- */
12
- var NavigationService = /** @class */ (function () {
13
- function NavigationService(zone) {
14
- this.zone = zone;
15
- this.focused = { renderedTool: null, index: -1 };
16
- this.renderedTools = [];
17
- this.isPopupFocused = false;
18
- this.isOverflowButtonFocused = false;
19
- }
20
- NavigationService.prototype.setRenderedTools = function (rts) {
21
- this.renderedTools = rts.slice();
22
- };
23
- NavigationService.prototype.click = function (_a) {
24
- var context = _a.context, ev = _a.event;
25
- if (this.focused.renderedTool !== context && ev) {
26
- this.focus(context, ev);
27
- }
28
- };
29
- NavigationService.prototype.moveFocusToToolBar = function () {
30
- this.isPopupFocused = false;
31
- this.focusOverflowButton();
32
- };
33
- NavigationService.prototype.moveFocusToPopup = function () {
34
- this.isPopupFocused = true;
35
- this.blurOverflowButton();
36
- this.focus();
37
- };
38
- NavigationService.prototype.focusNext = function (ev) {
39
- if (!this.isOverflowButtonFocused && this.focused.renderedTool && !this.focused.renderedTool.tool.handleKey(ev)) {
40
- var nextRT = this.getFocusableTools().slice(this.focused.index + 1)[0];
41
- if (nextRT) {
42
- this.focus(nextRT, ev);
43
- }
44
- else {
45
- if (this.isOverflowButtonVisible() && !this.isPopupFocused) {
46
- this.focusOverflowButton();
47
- }
48
- }
49
- }
50
- };
51
- NavigationService.prototype.focusPrev = function (ev) {
52
- if (this.isOverflowButtonFocused) {
53
- var lastFocusableRT = this.getFocusableTools().reverse()[0];
54
- this.focus(lastFocusableRT, ev);
55
- }
56
- else if (this.focused.renderedTool && !this.focused.renderedTool.tool.handleKey(ev)) {
57
- var prevRT = this.getFocusableTools()
58
- .slice(0, this.focused.index)
59
- .reverse()[0];
60
- if (prevRT) {
61
- this.focus(prevRT, ev);
62
- }
63
- }
64
- };
65
- NavigationService.prototype.resetNavigation = function () {
66
- this.blurOverflowButton();
67
- this.focused.renderedTool = null;
68
- this.focused.index = -1;
69
- };
70
- NavigationService.prototype.focusFirst = function (ev) {
71
- var firstTool = this.getFocusableTools()[0];
72
- var overFlowButton = this.overflowButton;
73
- if (firstTool) {
74
- this.focused.renderedTool = firstTool;
75
- this.focused.index = this.getFocusableTools().findIndex(function (rt) { return rt === firstTool; });
76
- this.focus(firstTool, ev);
77
- }
78
- else if (overFlowButton) {
79
- overFlowButton.nativeElement.focus();
80
- }
81
- };
82
- NavigationService.prototype.getFocusableTools = function () {
83
- var _this = this;
84
- return this.renderedTools.filter(function (rt) { return rt.tool.overflows === _this.isPopupFocused && rt.tool.canFocus(); });
85
- };
86
- NavigationService.prototype.focus = function (renderedTool, ev) {
87
- var _this = this;
88
- // running the code below in onStable fixes issue #2939
89
- this.zone.onStable.pipe(take(1)).subscribe(function () {
90
- if (!renderedTool) {
91
- var focusableRTs = _this.getFocusableTools();
92
- var lastFocusedRT_1 = focusableRTs.find(function (rt) { return rt === _this.focused.renderedTool; }) || focusableRTs[0];
93
- // guard against only disabled tools
94
- if (lastFocusedRT_1) {
95
- _this.focused.renderedTool = lastFocusedRT_1;
96
- _this.focused.index = _this.getFocusableTools().findIndex(function (rt) { return rt === lastFocusedRT_1; });
97
- // if event is undefined, then this means that the tool is the first one in the overflow popup
98
- lastFocusedRT_1.tool.focus(ev);
99
- }
100
- }
101
- else if (renderedTool.tool.canFocus && renderedTool.tool.canFocus()) {
102
- _this.focused.renderedTool = renderedTool;
103
- _this.focused.index = _this.getFocusableTools().findIndex(function (rt) { return rt === renderedTool; });
104
- renderedTool.tool.focus(ev);
105
- _this.blurOverflowButton();
106
- }
107
- });
108
- };
109
- NavigationService.prototype.blurOverflowButton = function () {
110
- if (this.overflowButton) {
111
- this.isOverflowButtonFocused = false;
112
- this.overflowButton.nativeElement.tabIndex = -1;
113
- }
114
- };
115
- NavigationService.prototype.focusOverflowButton = function () {
116
- this.isOverflowButtonFocused = true;
117
- this.overflowButton.nativeElement.tabIndex = 0;
118
- this.overflowButton.nativeElement.focus();
119
- };
120
- NavigationService.prototype.isOverflowButtonVisible = function () {
121
- return (isPresent(this.overflowButton) &&
122
- window.getComputedStyle(this.overflowButton.nativeElement).getPropertyValue('visibility') === 'visible');
123
- };
124
- NavigationService = tslib_1.__decorate([
125
- Injectable(),
126
- tslib_1.__metadata("design:paramtypes", [NgZone])
127
- ], NavigationService);
128
- return NavigationService;
129
- }());
130
- export { NavigationService };
@@ -1,15 +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
- * @hidden
7
- */
8
- export var packageMetadata = {
9
- name: '@progress/kendo-angular-toolbar',
10
- productName: 'Kendo UI for Angular',
11
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1648214206,
13
- version: '',
14
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
- };
@@ -1,22 +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 { Injectable, EventEmitter } from '@angular/core';
7
- /**
8
- * @hidden
9
- */
10
- var RefreshService = /** @class */ (function () {
11
- function RefreshService() {
12
- this.onRefresh = new EventEmitter();
13
- }
14
- RefreshService.prototype.refresh = function (tool) {
15
- this.onRefresh.emit(tool);
16
- };
17
- RefreshService = tslib_1.__decorate([
18
- Injectable()
19
- ], RefreshService);
20
- return RefreshService;
21
- }());
22
- export { RefreshService };
@@ -1,132 +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, ElementRef, Input, Renderer2 as Renderer, Output, EventEmitter, HostListener } from '@angular/core';
7
- import { outerWidth } from './util';
8
- import { ToolBarToolComponent } from './tools/toolbar-tool.component';
9
- import { RefreshService } from './refresh.service';
10
- import { RendererService } from './renderer.service';
11
- /**
12
- * @hidden
13
- */
14
- var ToolBarRendererComponent = /** @class */ (function () {
15
- function ToolBarRendererComponent(element, renderer, rendererService, refreshService) {
16
- var _this = this;
17
- this.element = element;
18
- this.renderer = renderer;
19
- this.rendererService = rendererService;
20
- this.refreshService = refreshService;
21
- this.rendererClick = new EventEmitter();
22
- this.rendererService.element = element;
23
- this.rendererService.renderer = this;
24
- this.refreshSubscription = this.refreshService.onRefresh.subscribe(function (tool) {
25
- if (_this.tool === tool) {
26
- _this.refresh();
27
- }
28
- });
29
- }
30
- ToolBarRendererComponent.prototype.onClick = function (ev) {
31
- this.rendererClick.emit({ context: this, event: ev });
32
- };
33
- ToolBarRendererComponent.prototype.ngOnInit = function () {
34
- if (this.resizable) {
35
- if (this.location === 'toolbar') {
36
- this.template = this.tool.toolbarTemplate;
37
- this.renderer.setStyle(this.element.nativeElement, 'visibility', 'hidden');
38
- this.renderer.setStyle(this.element.nativeElement, 'display', 'none');
39
- }
40
- else {
41
- this.template = this.tool.popupTemplate;
42
- this.renderer.setStyle(this.element.nativeElement, 'display', 'none');
43
- }
44
- }
45
- else {
46
- this.tool.overflows = false;
47
- this.template = this.tool.toolbarTemplate;
48
- this.renderer.setStyle(this.element.nativeElement, 'visibility', 'display');
49
- this.renderer.setStyle(this.element.nativeElement, 'display', 'inline-block');
50
- }
51
- };
52
- ToolBarRendererComponent.prototype.ngOnDestroy = function () {
53
- this.refreshSubscription.unsubscribe();
54
- };
55
- ToolBarRendererComponent.prototype.ngAfterViewInit = function () {
56
- if (this.resizable) {
57
- this.refresh();
58
- }
59
- };
60
- Object.defineProperty(ToolBarRendererComponent.prototype, "width", {
61
- /**
62
- * @hidden
63
- */
64
- get: function () {
65
- return this.tool.overflows ? 0 : outerWidth(this.element.nativeElement);
66
- },
67
- enumerable: true,
68
- configurable: true
69
- });
70
- /**
71
- * @hidden
72
- */
73
- ToolBarRendererComponent.prototype.isDisplayed = function () {
74
- return this.element.nativeElement.style.display !== 'none';
75
- };
76
- /**
77
- * @hidden
78
- */
79
- ToolBarRendererComponent.prototype.refresh = function () {
80
- if (this.resizable) {
81
- if (this.location === 'toolbar') {
82
- this.renderer.setStyle(this.element.nativeElement, 'visibility', this.tool.visibility);
83
- this.renderer.setStyle(this.element.nativeElement, 'display', this.tool.toolbarDisplay);
84
- }
85
- else {
86
- this.renderer.setStyle(this.element.nativeElement, 'display', this.tool.overflowDisplay);
87
- }
88
- }
89
- };
90
- /**
91
- * @hidden
92
- */
93
- ToolBarRendererComponent.prototype.setAttribute = function (element, attr, value) {
94
- this.renderer.setAttribute(element, attr, value);
95
- };
96
- tslib_1.__decorate([
97
- Input(),
98
- tslib_1.__metadata("design:type", ToolBarToolComponent)
99
- ], ToolBarRendererComponent.prototype, "tool", void 0);
100
- tslib_1.__decorate([
101
- Input(),
102
- tslib_1.__metadata("design:type", String)
103
- ], ToolBarRendererComponent.prototype, "location", void 0);
104
- tslib_1.__decorate([
105
- Input(),
106
- tslib_1.__metadata("design:type", Boolean)
107
- ], ToolBarRendererComponent.prototype, "resizable", void 0);
108
- tslib_1.__decorate([
109
- Output(),
110
- tslib_1.__metadata("design:type", EventEmitter)
111
- ], ToolBarRendererComponent.prototype, "rendererClick", void 0);
112
- tslib_1.__decorate([
113
- HostListener('click', ['$event']),
114
- tslib_1.__metadata("design:type", Function),
115
- tslib_1.__metadata("design:paramtypes", [Object]),
116
- tslib_1.__metadata("design:returntype", void 0)
117
- ], ToolBarRendererComponent.prototype, "onClick", null);
118
- ToolBarRendererComponent = tslib_1.__decorate([
119
- Component({
120
- exportAs: 'kendoToolBarRenderer',
121
- providers: [RendererService],
122
- selector: 'kendo-toolbar-renderer',
123
- template: "\n <ng-container *ngIf=\"location === 'toolbar'\">\n <ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"location === 'overflow' && tool.responsive\">\n <ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n </ng-container>\n "
124
- }),
125
- tslib_1.__metadata("design:paramtypes", [ElementRef,
126
- Renderer,
127
- RendererService,
128
- RefreshService])
129
- ], ToolBarRendererComponent);
130
- return ToolBarRendererComponent;
131
- }());
132
- export { ToolBarRendererComponent };
@@ -1,52 +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 { Injectable } from '@angular/core';
7
- import { findFocusable, findFocusableChild, findFocusableSibling } from './util';
8
- /**
9
- * @hidden
10
- */
11
- var RendererService = /** @class */ (function () {
12
- function RendererService() {
13
- }
14
- RendererService.prototype.getElement = function () {
15
- return this.element.nativeElement;
16
- };
17
- RendererService.prototype.querySelector = function (selector) {
18
- return this.element.nativeElement.querySelector(selector);
19
- };
20
- RendererService.prototype.querySelectorAll = function (selector) {
21
- return this.element.nativeElement.querySelectorAll(selector);
22
- };
23
- RendererService.prototype.findFocusable = function () {
24
- return findFocusable(this.element.nativeElement, false);
25
- };
26
- RendererService.prototype.findFocusableChild = function (element) {
27
- if (!element) {
28
- element = this.findFocusable();
29
- }
30
- return findFocusableChild(element, false);
31
- };
32
- RendererService.prototype.findNextFocusableSibling = function (element) {
33
- if (!element) {
34
- element = this.findFocusable();
35
- }
36
- return findFocusableSibling(element, false);
37
- };
38
- RendererService.prototype.findPrevFocusableSibling = function (element) {
39
- if (!element) {
40
- element = this.findFocusable();
41
- }
42
- return findFocusableSibling(element, false, true);
43
- };
44
- RendererService.prototype.setAttribute = function (element, attr, value) {
45
- this.renderer.setAttribute(element, attr, value);
46
- };
47
- RendererService = tslib_1.__decorate([
48
- Injectable()
49
- ], RendererService);
50
- return RendererService;
51
- }());
52
- export { RendererService };