@progress/kendo-angular-tooltip 21.4.1 → 22.0.0

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 (30) hide show
  1. package/fesm2022/progress-kendo-angular-tooltip.mjs +51 -51
  2. package/package.json +11 -19
  3. package/popover/directives-base.d.ts +1 -1
  4. package/esm2022/constants.mjs +0 -12
  5. package/esm2022/directives.mjs +0 -101
  6. package/esm2022/index.mjs +0 -22
  7. package/esm2022/localization/localized-messages.directive.mjs +0 -44
  8. package/esm2022/models/animation.model.mjs +0 -5
  9. package/esm2022/models/events.mjs +0 -87
  10. package/esm2022/models/functions.model.mjs +0 -5
  11. package/esm2022/models/popover-show-option.type.mjs +0 -5
  12. package/esm2022/models/position.type.mjs +0 -5
  13. package/esm2022/models/show.option.type.mjs +0 -5
  14. package/esm2022/package-metadata.mjs +0 -16
  15. package/esm2022/popover/anchor.directive.mjs +0 -172
  16. package/esm2022/popover/container.directive.mjs +0 -190
  17. package/esm2022/popover/directives-base.mjs +0 -319
  18. package/esm2022/popover/popover.component.mjs +0 -562
  19. package/esm2022/popover/popover.service.mjs +0 -71
  20. package/esm2022/popover/template-directives/actions-template.directive.mjs +0 -38
  21. package/esm2022/popover/template-directives/body-template.directive.mjs +0 -38
  22. package/esm2022/popover/template-directives/title-template.directive.mjs +0 -38
  23. package/esm2022/popover.module.mjs +0 -47
  24. package/esm2022/progress-kendo-angular-tooltip.mjs +0 -8
  25. package/esm2022/tooltip/tooltip.content.component.mjs +0 -293
  26. package/esm2022/tooltip/tooltip.directive.mjs +0 -490
  27. package/esm2022/tooltip/tooltip.settings.mjs +0 -70
  28. package/esm2022/tooltip.module.mjs +0 -44
  29. package/esm2022/tooltips.module.mjs +0 -51
  30. package/esm2022/utils.mjs +0 -153
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,16 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 const packageMetadata = {
9
- name: '@progress/kendo-angular-tooltip',
10
- productName: 'Kendo UI for Angular',
11
- productCode: 'KENDOUIANGULAR',
12
- productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1768393165,
14
- version: '21.4.1',
15
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
- };
@@ -1,172 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- import { Directive, ElementRef, NgZone, Renderer2 } from "@angular/core";
7
- import { closest } from "@progress/kendo-angular-common";
8
- import { PopupService } from "@progress/kendo-angular-popup";
9
- import { filter, take } from "rxjs/operators";
10
- import { PopoverDirectivesBase } from "./directives-base";
11
- import { PopoverService } from "./popover.service";
12
- import { Subscription } from "rxjs";
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "@progress/kendo-angular-popup";
15
- import * as i2 from "./popover.service";
16
- /**
17
- * Represents the [`kendoPopoverAnchor`](slug:configuration_popover#toc-popover-anchor) directive.
18
- * Targets an element to display a popover on user interaction.
19
- *
20
- * @example
21
- * ```html
22
- * <button kendoPopoverAnchor [popover]="myPopover">Show Popover</button>
23
- * ```
24
- */
25
- export class PopoverAnchorDirective extends PopoverDirectivesBase {
26
- hostEl;
27
- ngZone;
28
- popupService;
29
- renderer;
30
- popoverService;
31
- constructor(hostEl, ngZone, popupService, renderer, popoverService) {
32
- super(ngZone, popupService, renderer);
33
- this.hostEl = hostEl;
34
- this.ngZone = ngZone;
35
- this.popupService = popupService;
36
- this.renderer = renderer;
37
- this.popoverService = popoverService;
38
- this._popoverService = this.popoverService;
39
- }
40
- ngOnChanges(changes) {
41
- if (changes['showOn'] && !changes['showOn'].isFirstChange()) {
42
- this.subs.unsubscribe();
43
- if (this.disposeClickListener) {
44
- this.disposeClickListener();
45
- }
46
- this.subs = new Subscription();
47
- this.manageEvents();
48
- }
49
- }
50
- /**
51
- * Shows the Popover. [See example]({% slug programmaticcontrol_popover %})
52
- */
53
- show() {
54
- if (this.popupRef) {
55
- return;
56
- }
57
- this.ngZone.run(() => {
58
- this.openPopup(this.hostEl);
59
- });
60
- this.popupRef.popupAnchorViewportLeave
61
- .pipe(take(1))
62
- .subscribe(() => this.hide());
63
- }
64
- /**
65
- * Toggles the visibility of the Popover. [See example]({% slug programmaticcontrol_popover %})
66
- */
67
- toggle() {
68
- if (this.popupRef) {
69
- this.hide();
70
- }
71
- else {
72
- this.show();
73
- }
74
- }
75
- subscribeToShowEvents(arr) {
76
- const hostEl = this.hostEl.nativeElement;
77
- this.subs.add(this.renderer.listen(hostEl, arr[0].name, () => {
78
- this.popoverService.emitAnchorState(true, hostEl);
79
- arr[0].handler();
80
- }));
81
- this.subs.add(this.renderer.listen(hostEl, arr[1].name, (e) => {
82
- this.popoverService.emitAnchorState(false, null);
83
- arr[1].handler({ domEvent: e });
84
- }));
85
- }
86
- subscribeClick() {
87
- if (this.disposeClickListener) {
88
- this.disposeClickListener();
89
- }
90
- this.disposeClickListener = this.renderer.listen(document, 'click', (e) => {
91
- this.onClick(e);
92
- });
93
- }
94
- mouseenterHandler = () => {
95
- this.controlVisibility(this.hostEl.nativeElement, true);
96
- };
97
- mouseleaveHandler = () => {
98
- if (this.isPrevented(this.hostEl.nativeElement, false)) {
99
- return;
100
- }
101
- if (!this._hideSub) {
102
- this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
103
- const [isPopoverHovered, isAnchorHovered] = val;
104
- if (!isPopoverHovered && !isAnchorHovered) {
105
- this.hide();
106
- }
107
- });
108
- }
109
- };
110
- focusHandler = () => {
111
- this.controlVisibility(this.hostEl.nativeElement, true);
112
- };
113
- blurHandler = (args) => {
114
- const event = args.domEvent;
115
- if (this.isPrevented(this.hostEl.nativeElement, false)) {
116
- return;
117
- }
118
- // from anchor to popup focus check
119
- const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
120
- if (!isFocusInside) {
121
- this.hide();
122
- }
123
- if (!this._focusInsideSub) {
124
- // inside popup focus check
125
- this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
126
- if (!val) {
127
- this.hide();
128
- }
129
- });
130
- }
131
- };
132
- /**
133
- * @hidden
134
- */
135
- onClick(event) {
136
- const isInsidePopup = !!closest(event.target, (node) => node.classList && node.classList.contains('k-popup'));
137
- const isAnchor = !!closest(event.target, (node) => node === this.hostEl.nativeElement);
138
- if (isInsidePopup || (this.popupRef && isAnchor)) {
139
- return;
140
- }
141
- if (isAnchor) {
142
- // on opening
143
- this.controlVisibility(this.hostEl.nativeElement, true);
144
- }
145
- else {
146
- // on closing
147
- this.controlVisibility(this.hostEl.nativeElement, false);
148
- }
149
- }
150
- controlVisibility(anchor, show) {
151
- if (this.isPrevented(anchor, show)) {
152
- return;
153
- }
154
- if (show) {
155
- this.show();
156
- }
157
- else {
158
- this.hide();
159
- }
160
- }
161
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }, { token: i2.PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
162
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: PopoverAnchorDirective, isStandalone: true, selector: "[kendoPopoverAnchor]", providers: [PopoverService], exportAs: ["kendoPopoverAnchor"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
163
- }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
165
- type: Directive,
166
- args: [{
167
- selector: '[kendoPopoverAnchor]',
168
- exportAs: 'kendoPopoverAnchor',
169
- providers: [PopoverService],
170
- standalone: true
171
- }]
172
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PopupService }, { type: i0.Renderer2 }, { type: i2.PopoverService }] });
@@ -1,190 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- import { Directive, ElementRef, Input, NgZone, Renderer2 } from "@angular/core";
7
- import { closest } from "@progress/kendo-angular-common";
8
- import { PopupService } from "@progress/kendo-angular-popup";
9
- import { filter, take } from "rxjs/operators";
10
- import { closestBySelector } from "../utils";
11
- import { PopoverDirectivesBase } from './directives-base';
12
- import { PopoverService } from "./popover.service";
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "@progress/kendo-angular-popup";
15
- import * as i2 from "./popover.service";
16
- /**
17
- * Represents the [`kendoPopoverContainer`](slug:configuration_popover#toc-popover-container) directive.
18
- * Filters and targets multiple elements to display a popover on user interaction.
19
- *
20
- * @example
21
- * ```html
22
- * <div kendoPopoverContainer [popover]="myPopover" filter=".has-popover">
23
- * <button class="has-popover">Show Popover</button>
24
- * <button>Button Without Popover</button>
25
- * <button class="has-popover">Show Popover</button>
26
- * </div>
27
- * ```
28
- */
29
- export class PopoverContainerDirective extends PopoverDirectivesBase {
30
- wrapperEl;
31
- ngZone;
32
- popupService;
33
- renderer;
34
- popoverService;
35
- /**
36
- * Specifies a selector for the elements that display a popover. Accepts a CSS selector string similar to a [querySelector method](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector).
37
- * [See example](slug:configuration_popover#toc-popover-container).
38
- */
39
- filter;
40
- constructor(wrapperEl, ngZone, popupService, renderer, popoverService) {
41
- super(ngZone, popupService, renderer);
42
- this.wrapperEl = wrapperEl;
43
- this.ngZone = ngZone;
44
- this.popupService = popupService;
45
- this.renderer = renderer;
46
- this.popoverService = popoverService;
47
- this._popoverService = this.popoverService;
48
- }
49
- /**
50
- * Shows the Popover.
51
- *
52
- * @param anchor - The element used as an anchor. The Popover opens relative to this element. [See example]({% slug programmaticcontrol_popover %}).
53
- */
54
- show(anchor) {
55
- if (this.popupRef) {
56
- return;
57
- }
58
- this.ngZone.run(() => {
59
- this.openPopup(anchor);
60
- });
61
- this.popupRef.popupAnchorViewportLeave
62
- .pipe(take(1))
63
- .subscribe(() => this.hide());
64
- }
65
- /**
66
- * Toggles the visibility of the Popover. [See example]({% slug programmaticcontrol_popover %}).
67
- *
68
- * @param anchor - The element used as an anchor. The Popover opens relative to this element.
69
- */
70
- toggle(anchor) {
71
- const previousAnchor = this.popupRef && this.popupRef.content.instance.anchor;
72
- if (this.popupRef) {
73
- this.hide();
74
- if (previousAnchor !== anchor) {
75
- this.show(anchor);
76
- }
77
- }
78
- else {
79
- this.show(anchor);
80
- }
81
- }
82
- subscribeClick() {
83
- if (this.disposeClickListener) {
84
- this.disposeClickListener();
85
- }
86
- this.disposeClickListener = this.renderer.listen(document, 'click', (e) => {
87
- const filterElement = closestBySelector(e.target, this.filter);
88
- this.clickHandler(filterElement, e);
89
- });
90
- }
91
- mouseenterHandler = (anchor) => {
92
- this.controlVisibility(anchor, true);
93
- };
94
- mouseleaveHandler = (args) => {
95
- const anchor = args.anchor;
96
- if (this.isPrevented(anchor, false)) {
97
- return;
98
- }
99
- if (!this._hideSub) {
100
- this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
101
- const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
102
- if (!isPopoverHovered && !isOriginAnchor) {
103
- this.hide();
104
- if (!isOriginAnchor && currentAnchor) {
105
- this.show(currentAnchor);
106
- }
107
- }
108
- });
109
- }
110
- };
111
- focusHandler = (anchor) => {
112
- this.controlVisibility(anchor, true);
113
- };
114
- blurHandler = (args) => {
115
- const anchor = args.anchor;
116
- const event = args.domEvent;
117
- if (this.isPrevented(anchor, false)) {
118
- return;
119
- }
120
- // from anchor to popup focus check
121
- const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
122
- if (!isFocusInside) {
123
- this.hide();
124
- }
125
- if (!this._focusInsideSub) {
126
- // inside popup focus check
127
- this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
128
- if (!val && !isFocusInside) {
129
- this.hide();
130
- }
131
- });
132
- }
133
- };
134
- subscribeToShowEvents(arr) {
135
- const filteredElements = Array.from(document.querySelectorAll(this.filter));
136
- filteredElements.forEach((el) => {
137
- this.subs.add(this.renderer.listen(el, arr[0].name, () => {
138
- this.popoverService.emitAnchorState(true, el);
139
- arr[0].handler(el);
140
- }));
141
- this.subs.add(this.renderer.listen(el, arr[1].name, (e) => {
142
- this.popoverService.emitAnchorState(false, null);
143
- arr[1].handler({ anchor: el, domEvent: e });
144
- }));
145
- });
146
- }
147
- clickHandler(anchor, event) {
148
- const isInsidePopup = !!closest(event.target, (node) => node.classList && node.classList.contains('k-popup'));
149
- const popupRefAnchor = this.popupRef && this.popupRef.content.instance.anchor;
150
- const isOriginAnchor = !!closest(event.target, (node) => node === (popupRefAnchor ? popupRefAnchor : anchor));
151
- if (this.showOn !== 'click' || isInsidePopup || (this.popupRef && isOriginAnchor)) {
152
- return;
153
- }
154
- if (!anchor && this.popupRef) {
155
- this.controlVisibility(anchor, false);
156
- return;
157
- }
158
- if (isOriginAnchor) {
159
- this.controlVisibility(anchor, true);
160
- }
161
- else if (this.popupRef) {
162
- this.controlVisibility(anchor, false);
163
- this.controlVisibility(anchor, true);
164
- }
165
- }
166
- controlVisibility(anchor, show) {
167
- if (this.isPrevented(anchor, show)) {
168
- return;
169
- }
170
- if (show) {
171
- this.show(anchor);
172
- }
173
- else {
174
- this.hide();
175
- }
176
- }
177
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverContainerDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }, { token: i2.PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
178
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: PopoverContainerDirective, isStandalone: true, selector: "[kendoPopoverContainer]", inputs: { filter: "filter" }, providers: [PopoverService], exportAs: ["kendoPopoverContainer"], usesInheritance: true, ngImport: i0 });
179
- }
180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverContainerDirective, decorators: [{
181
- type: Directive,
182
- args: [{
183
- selector: '[kendoPopoverContainer]',
184
- exportAs: 'kendoPopoverContainer',
185
- providers: [PopoverService],
186
- standalone: true
187
- }]
188
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PopupService }, { type: i0.Renderer2 }, { type: i2.PopoverService }], propDecorators: { filter: [{
189
- type: Input
190
- }] } });