@progress/kendo-angular-tooltip 17.0.0-develop.4 → 17.0.0-develop.41

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 (42) hide show
  1. package/README.md +32 -32
  2. package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +13 -8
  3. package/{esm2020 → esm2022}/models/events.mjs +24 -0
  4. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  5. package/{esm2020 → esm2022}/popover/anchor.directive.mjs +46 -41
  6. package/{esm2020 → esm2022}/popover/container.directive.mjs +58 -46
  7. package/{esm2020 → esm2022}/popover/directives-base.mjs +31 -15
  8. package/{esm2020 → esm2022}/popover/popover.component.mjs +145 -86
  9. package/{esm2020 → esm2022}/popover/popover.service.mjs +12 -8
  10. package/{esm2020 → esm2022}/popover/template-directives/actions-template.directive.mjs +4 -3
  11. package/{esm2020 → esm2022}/popover/template-directives/body-template.directive.mjs +4 -3
  12. package/{esm2020 → esm2022}/popover/template-directives/title-template.directive.mjs +4 -3
  13. package/{esm2020 → esm2022}/popover.module.mjs +4 -4
  14. package/{esm2020 → esm2022}/tooltip/tooltip.content.component.mjs +66 -48
  15. package/{esm2020 → esm2022}/tooltip/tooltip.directive.mjs +116 -62
  16. package/{esm2020 → esm2022}/tooltip/tooltip.settings.mjs +40 -3
  17. package/{esm2020 → esm2022}/tooltip.module.mjs +4 -4
  18. package/{esm2020 → esm2022}/tooltips.module.mjs +4 -4
  19. package/{fesm2020 → fesm2022}/progress-kendo-angular-tooltip.mjs +579 -342
  20. package/localization/localized-messages.directive.d.ts +1 -1
  21. package/models/animation.model.d.ts +1 -1
  22. package/models/functions.model.d.ts +2 -2
  23. package/models/popover-show-option.type.d.ts +1 -1
  24. package/models/position.type.d.ts +1 -1
  25. package/models/show.option.type.d.ts +1 -1
  26. package/package.json +14 -20
  27. package/popover/container.directive.d.ts +1 -1
  28. package/popover/directives-base.d.ts +1 -1
  29. package/popover/popover.component.d.ts +1 -1
  30. package/tooltip/tooltip.content.component.d.ts +1 -1
  31. package/tooltip/tooltip.directive.d.ts +1 -1
  32. package/fesm2015/progress-kendo-angular-tooltip.mjs +0 -2312
  33. /package/{esm2020 → esm2022}/constants.mjs +0 -0
  34. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  35. /package/{esm2020 → esm2022}/index.mjs +0 -0
  36. /package/{esm2020 → esm2022}/models/animation.model.mjs +0 -0
  37. /package/{esm2020 → esm2022}/models/functions.model.mjs +0 -0
  38. /package/{esm2020 → esm2022}/models/popover-show-option.type.mjs +0 -0
  39. /package/{esm2020 → esm2022}/models/position.type.mjs +0 -0
  40. /package/{esm2020 → esm2022}/models/show.option.type.mjs +0 -0
  41. /package/{esm2020 → esm2022}/progress-kendo-angular-tooltip.mjs +0 -0
  42. /package/{esm2020 → esm2022}/utils.mjs +0 -0
package/README.md CHANGED
@@ -2,55 +2,55 @@
2
2
  <img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg">
3
3
  </a>
4
4
 
5
- ## Kendo UI for Angular Tooltips Component
5
+ ## Kendo UI for Angular Tooltips Package (Tooltip and Popover Components)
6
6
 
7
- > **Important**
8
- > * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;a commercial library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Angular My License page](https://www.telerik.com/kendo-angular-ui/my-license?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip). Doing so indicates that you [accept the Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip).
7
+ > * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui)&mdash;a commercial library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
8
+ > * You must [install a license key](https://www.telerik.com/kendo-angular-ui/my-license) when adding the package to your project. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
11
9
  > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular dev team!
12
10
  >
13
- > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip) and speed up your development process!
11
+ > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui) and speed up your development process!
14
12
 
15
- The [Kendo UI for Angular Tooltips Package](https://www.telerik.com/kendo-angular-ui/components/tooltips/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip) contains two components, the Angular Tooltip and the Angular Popover. They both render popups with information related to UI elements and can be displayed when the element is focused or hovered over (or clicked in the Popover case). With tons of configuration options, they allow building custom tooltips in Angular.
13
+ The [Kendo UI for Angular Tooltips](https://www.telerik.com/kendo-angular-ui/components/tooltips/) package contains two components, the Angular Tooltip and the Angular Popover. They both render popups with information related to UI elements and can be displayed when the element is focused or hovered over (or clicked in the Popover case). With tons of configuration options, they allow building custom tooltips in Angular.
16
14
 
17
- ## Angular Tooltip Component
15
+ ## What's Included in the Angular Tooltips Package
18
16
 
19
- The [Angular Tooltip Component](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip) renders a customizable tooltip that can be used stand alone of with other Kendo UI for Angular components.
17
+ * [Angular Tooltip Component](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/)&mdash;Renders a customizable tooltip that can be used stand alone of with other Kendo UI for Angular components.
20
18
 
21
19
  <img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/component-pages/angular/angular-tooltip-overview.jpg" alt="Component for creating custom tooltips in Angular">
22
20
 
23
- * [Anchor Elements](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/anchor-elements/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Specify which elements (anchors) will render a tooltip.
24
- * [Programtic Opening](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/opening/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;The Tooltip provides options for consuming its API programmatically.
25
- * [Closable](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/closable-tooltip/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Optionally add a close button.
26
- * [Positioning](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/positioning/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Choose the position on the screen that the Tooltip appears.
27
- * [Templates](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/templates/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Provide your own layout and style templates for the Tooltop content.
21
+ * [Angular Popover Component](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/)&mdash;It is nearly identical to the Angular Tooltip component, except it is designed to display richer content and it can be opened via click. For example, it is possible to host a calendar or a grid in the Popover while the Tooltop is designed mostly for text.
28
22
 
29
- ## Angular Popover Component
23
+ <img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/component-pages/common/popover/popover_component_overview.jpg" alt="Angular Popover Example">
30
24
 
31
- The [Angular Popover Component](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/) is nearly identical to the Angular Tooltip component, except it is designed to display richer content and it can be opened via click. For example, it is possible to host a calendar or a grid in the Popover while the Tooltop is designed mostly for text.
25
+ ## Key Features
32
26
 
33
- <img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/component-pages/common/popover/popover_component_overview.jpg" alt="Angular Popover Example">
27
+ Among the many features which the Kendo UI for Angular Tooltips deliver are:
34
28
 
35
- * [Single or Multiple Anchor Elements](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/configuration/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Associate the Popover with a single element or associate one Popover with multiple elements.
36
- * [Programitic Control](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/programmatic-control/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;The Popover provides options for consuming its API programmatically.
37
- * [Positioning](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/positioning/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Choose the position on the screen that the Popover appears.
38
- * [Templates](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/templates/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Provide your own layout and style templates for the Popover content.
39
- * [Animations](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/animations/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)&mdash;Enable animations that will be applied on the opening of the Popover.
29
+ * [Anchor Elements](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/anchor-elements/)&mdash;Specify which elements (anchors) will render the popup element.
30
+ * [Programmatic Control](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/opening/)&mdash;The Tooltips provide options for consuming the components' API programmatically.
31
+ * [Closable](https://www.telerik.com/kendo-angular-ui/components/tooltips/tooltip/closable-tooltip/)&mdash;Optionally add a close button.
32
+ * [Positioning](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/positioning/)&mdash;Choose the position on the screen that the Tooltips appear.
33
+ * [Templates](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/templates/)&mdash;Provide your own layout and style templates for the Tooltips content.
34
+ * [Accessibility](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/accessibility/)&mdash;The Tooltips are accessible for screen readers and supports WAI-ARIA attributes.
35
+ * [Keyboard Navigation](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/keyboard-navigation/)&mdash;The Tooltips support a number of keyboard shortcuts which allows users to accomplish various commands.
40
36
 
41
- ## Resources
37
+ ## Support Options
42
38
 
43
- * [Get Started with Kendo UI for Angular (requires trial registration)](https://www.telerik.com/kendo-angular-ui/getting-started?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)
44
- * [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)
45
- * [Blogs](http://www.telerik.com/blogs/kendo-ui)
46
- * [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)
39
+ For any issues you might encounter while working with the Kendo UI for Angular Tooltips, you have the following support channels available:
47
40
 
48
- ## Questions and Feedback
41
+ * Industry-leading technical support&mdash;Kendo UI for Angular paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use the [dedicated Kendo UI for Angular support system](https://www.telerik.com/account/support-tickets).
42
+ * Product forums&mdash;The [Kendo UI for Angular forums](https://www.telerik.com/forums/kendo-angular-ui) are part of the free support you can get from the community and from the Kendo UI for Angular team.
43
+ * Feedback portal&mdash;The [Kendo UI for Angular feedback portal](https://feedback.telerik.com/kendo-angular-ui) is where you can request and vote for new features to be added.
44
+
45
+ ## Resources
49
46
 
50
- * [Official Forums](https://www.telerik.com/forums/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-tooltip)
51
- * [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
52
- * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
53
- * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
47
+ * [Getting Started with Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/getting-started)
48
+ * [Getting Started with the Kendo UI for Angular Tooltips](https://www.telerik.com/kendo-angular-ui/components/tooltips/installation/getting-started)
49
+ * [Tooltips Overview page](https://www.telerik.com/kendo-angular-ui/components/tooltips) and [Tooltips API reference](https://www.telerik.com/kendo-angular-ui/components/tooltips/api)
50
+ * [Kendo UI for Angular roadmap](https://www.telerik.com/kendo-angular-ui/roadmap)
51
+ * [Kendo UI for Angular Blog](https://www.telerik.com/blogs/tag/kendo-ui-for-angular)
52
+ * [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
53
+ * [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
54
54
 
55
55
  *Copyright © 2024 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
56
56
 
@@ -10,19 +10,24 @@ import * as i1 from "@progress/kendo-angular-l10n";
10
10
  * @hidden
11
11
  */
12
12
  export class LocalizedMessagesDirective extends ComponentMessages {
13
+ service;
14
+ /**
15
+ * The title of the close button.
16
+ */
17
+ closeTitle;
13
18
  constructor(service) {
14
19
  super();
15
20
  this.service = service;
16
21
  }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
23
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTooltipLocalizedMessages]", inputs: { closeTitle: "closeTitle" }, providers: [
24
+ {
25
+ provide: ComponentMessages,
26
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
27
+ }
28
+ ], usesInheritance: true, ngImport: i0 });
17
29
  }
18
- LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
19
- LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTooltipLocalizedMessages]", inputs: { closeTitle: "closeTitle" }, providers: [
20
- {
21
- provide: ComponentMessages,
22
- useExisting: forwardRef(() => LocalizedMessagesDirective)
23
- }
24
- ], usesInheritance: true, ngImport: i0 });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
26
31
  type: Directive,
27
32
  args: [{
28
33
  providers: [
@@ -8,6 +8,10 @@ import { PreventableEvent } from "@progress/kendo-angular-common";
8
8
  * to be opened. If you cancel the event, the opening is prevented.
9
9
  */
10
10
  export class PopoverShowEvent extends PreventableEvent {
11
+ /**
12
+ * The host element related to the popover.
13
+ */
14
+ anchor;
11
15
  /**
12
16
  * @hidden
13
17
  * Constructs the event arguments for the `show` event.
@@ -23,6 +27,14 @@ export class PopoverShowEvent extends PreventableEvent {
23
27
  * to be closed. If you cancel the event, the popover stays open.
24
28
  */
25
29
  export class PopoverHideEvent extends PreventableEvent {
30
+ /**
31
+ * The host element related to the popover.
32
+ */
33
+ anchor;
34
+ /**
35
+ * The popover element.
36
+ */
37
+ popover;
26
38
  /**
27
39
  * @hidden
28
40
  * Constructs the event arguments for the `hide` event.
@@ -39,6 +51,14 @@ export class PopoverHideEvent extends PreventableEvent {
39
51
  * Arguments for the `shown` event. The `shown` event fires after the popover has opened and its opening animation has finished.
40
52
  */
41
53
  export class PopoverShownEvent {
54
+ /**
55
+ * The host element related to the popover.
56
+ */
57
+ anchor;
58
+ /**
59
+ * The popover element.
60
+ */
61
+ popover;
42
62
  /**
43
63
  * @hidden
44
64
  * Constructs the event arguments for the `shown` event.
@@ -54,6 +74,10 @@ export class PopoverShownEvent {
54
74
  * Arguments for the `hidden` event. The `hidden` event fires after the popover has closed and its closing animation has finished.
55
75
  */
56
76
  export class PopoverHiddenEvent {
77
+ /**
78
+ * The host element related to the popover.
79
+ */
80
+ anchor;
57
81
  /**
58
82
  * @hidden
59
83
  * Constructs the event arguments for the `hidden` event.
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-tooltip',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1728985167,
13
- version: '17.0.0-develop.4',
12
+ publishDate: 1730818343,
13
+ version: '17.0.0-develop.41',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -23,6 +23,11 @@ import * as i2 from "./popover.service";
23
23
  * ```
24
24
  */
25
25
  export class PopoverAnchorDirective extends PopoverDirectivesBase {
26
+ hostEl;
27
+ ngZone;
28
+ popupService;
29
+ renderer;
30
+ popoverService;
26
31
  constructor(hostEl, ngZone, popupService, renderer, popoverService) {
27
32
  super(ngZone, popupService, renderer);
28
33
  this.hostEl = hostEl;
@@ -30,44 +35,6 @@ export class PopoverAnchorDirective extends PopoverDirectivesBase {
30
35
  this.popupService = popupService;
31
36
  this.renderer = renderer;
32
37
  this.popoverService = popoverService;
33
- this.mouseenterHandler = () => {
34
- this.controlVisibility(this.hostEl.nativeElement, true);
35
- };
36
- this.mouseleaveHandler = () => {
37
- if (this.isPrevented(this.hostEl.nativeElement, false)) {
38
- return;
39
- }
40
- if (!this._hideSub) {
41
- this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
42
- const [isPopoverHovered, isAnchorHovered] = val;
43
- if (!isPopoverHovered && !isAnchorHovered) {
44
- this.hide();
45
- }
46
- });
47
- }
48
- };
49
- this.focusHandler = () => {
50
- this.controlVisibility(this.hostEl.nativeElement, true);
51
- };
52
- this.blurHandler = (args) => {
53
- const event = args.domEvent;
54
- if (this.isPrevented(this.hostEl.nativeElement, false)) {
55
- return;
56
- }
57
- // from anchor to popup focus check
58
- const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
59
- if (!isFocusInside) {
60
- this.hide();
61
- }
62
- if (!this._focusInsideSub) {
63
- // inside popup focus check
64
- this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
65
- if (!val) {
66
- this.hide();
67
- }
68
- });
69
- }
70
- };
71
38
  this._popoverService = this.popoverService;
72
39
  }
73
40
  ngOnChanges(changes) {
@@ -124,6 +91,44 @@ export class PopoverAnchorDirective extends PopoverDirectivesBase {
124
91
  this.onClick(e);
125
92
  });
126
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
+ };
127
132
  /**
128
133
  * @hidden
129
134
  */
@@ -153,10 +158,10 @@ export class PopoverAnchorDirective extends PopoverDirectivesBase {
153
158
  this.hide();
154
159
  }
155
160
  }
161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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: "16.2.12", type: PopoverAnchorDirective, isStandalone: true, selector: "[kendoPopoverAnchor]", providers: [PopoverService], exportAs: ["kendoPopoverAnchor"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
156
163
  }
157
- PopoverAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }, { token: i2.PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
158
- PopoverAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverAnchorDirective, isStandalone: true, selector: "[kendoPopoverAnchor]", providers: [PopoverService], exportAs: ["kendoPopoverAnchor"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
160
165
  type: Directive,
161
166
  args: [{
162
167
  selector: '[kendoPopoverAnchor]',
@@ -27,6 +27,18 @@ import * as i2 from "./popover.service";
27
27
  * ```
28
28
  */
29
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 should display a popover.
37
+ *
38
+ * The possible values include any valid query selector.
39
+ * [See example](slug:configuration_popover#toc-popover-container)
40
+ */
41
+ filter;
30
42
  constructor(wrapperEl, ngZone, popupService, renderer, popoverService) {
31
43
  super(ngZone, popupService, renderer);
32
44
  this.wrapperEl = wrapperEl;
@@ -34,49 +46,6 @@ export class PopoverContainerDirective extends PopoverDirectivesBase {
34
46
  this.popupService = popupService;
35
47
  this.renderer = renderer;
36
48
  this.popoverService = popoverService;
37
- this.mouseenterHandler = (anchor) => {
38
- this.controlVisibility(anchor, true);
39
- };
40
- this.mouseleaveHandler = (args) => {
41
- const anchor = args.anchor;
42
- if (this.isPrevented(anchor, false)) {
43
- return;
44
- }
45
- if (!this._hideSub) {
46
- this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
47
- const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
48
- if (!isPopoverHovered && !isOriginAnchor) {
49
- this.hide();
50
- if (!isOriginAnchor && currentAnchor) {
51
- this.show(currentAnchor);
52
- }
53
- }
54
- });
55
- }
56
- };
57
- this.focusHandler = (anchor) => {
58
- this.controlVisibility(anchor, true);
59
- };
60
- this.blurHandler = (args) => {
61
- const anchor = args.anchor;
62
- const event = args.domEvent;
63
- if (this.isPrevented(anchor, false)) {
64
- return;
65
- }
66
- // from anchor to popup focus check
67
- const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
68
- if (!isFocusInside) {
69
- this.hide();
70
- }
71
- if (!this._focusInsideSub) {
72
- // inside popup focus check
73
- this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
74
- if (!val && !isFocusInside) {
75
- this.hide();
76
- }
77
- });
78
- }
79
- };
80
49
  this._popoverService = this.popoverService;
81
50
  }
82
51
  /**
@@ -121,6 +90,49 @@ export class PopoverContainerDirective extends PopoverDirectivesBase {
121
90
  this.clickHandler(filterElement, e);
122
91
  });
123
92
  }
93
+ mouseenterHandler = (anchor) => {
94
+ this.controlVisibility(anchor, true);
95
+ };
96
+ mouseleaveHandler = (args) => {
97
+ const anchor = args.anchor;
98
+ if (this.isPrevented(anchor, false)) {
99
+ return;
100
+ }
101
+ if (!this._hideSub) {
102
+ this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
103
+ const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
104
+ if (!isPopoverHovered && !isOriginAnchor) {
105
+ this.hide();
106
+ if (!isOriginAnchor && currentAnchor) {
107
+ this.show(currentAnchor);
108
+ }
109
+ }
110
+ });
111
+ }
112
+ };
113
+ focusHandler = (anchor) => {
114
+ this.controlVisibility(anchor, true);
115
+ };
116
+ blurHandler = (args) => {
117
+ const anchor = args.anchor;
118
+ const event = args.domEvent;
119
+ if (this.isPrevented(anchor, false)) {
120
+ return;
121
+ }
122
+ // from anchor to popup focus check
123
+ const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
124
+ if (!isFocusInside) {
125
+ this.hide();
126
+ }
127
+ if (!this._focusInsideSub) {
128
+ // inside popup focus check
129
+ this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
130
+ if (!val && !isFocusInside) {
131
+ this.hide();
132
+ }
133
+ });
134
+ }
135
+ };
124
136
  subscribeToShowEvents(arr) {
125
137
  const filteredElements = Array.from(document.querySelectorAll(this.filter));
126
138
  filteredElements.forEach((el) => {
@@ -164,10 +176,10 @@ export class PopoverContainerDirective extends PopoverDirectivesBase {
164
176
  this.hide();
165
177
  }
166
178
  }
179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverContainerDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }, { token: i2.PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
180
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverContainerDirective, isStandalone: true, selector: "[kendoPopoverContainer]", inputs: { filter: "filter" }, providers: [PopoverService], exportAs: ["kendoPopoverContainer"], usesInheritance: true, ngImport: i0 });
167
181
  }
168
- PopoverContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverContainerDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }, { token: i2.PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
169
- PopoverContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverContainerDirective, isStandalone: true, selector: "[kendoPopoverContainer]", inputs: { filter: "filter" }, providers: [PopoverService], exportAs: ["kendoPopoverContainer"], usesInheritance: true, ngImport: i0 });
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverContainerDirective, decorators: [{
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverContainerDirective, decorators: [{
171
183
  type: Directive,
172
184
  args: [{
173
185
  selector: '[kendoPopoverContainer]',
@@ -19,17 +19,9 @@ const validShowOptions = ['hover', 'click', 'none', 'focus'];
19
19
  * @hidden
20
20
  */
21
21
  export class PopoverDirectivesBase {
22
- constructor(ngZone, popupService, renderer) {
23
- this.ngZone = ngZone;
24
- this.popupService = popupService;
25
- this.renderer = renderer;
26
- /**
27
- * @hidden
28
- */
29
- this.anchor = null;
30
- this.subs = new Subscription();
31
- this._showOn = 'click';
32
- }
22
+ ngZone;
23
+ popupService;
24
+ renderer;
33
25
  /**
34
26
  * Specifies the popover instance that will be rendered.
35
27
  * Accepts a [`PopoverComponent`]({% slug api_tooltip_popovercomponent %}) instance or
@@ -69,6 +61,31 @@ export class PopoverDirectivesBase {
69
61
  get showOn() {
70
62
  return this._showOn;
71
63
  }
64
+ /**
65
+ * @hidden
66
+ */
67
+ anchor = null;
68
+ popupRef;
69
+ disposeHoverOverListener;
70
+ disposeHoverOutListener;
71
+ disposeClickListener;
72
+ disposePopupHoverOutListener;
73
+ disposePopupHoverInListener;
74
+ disposePopupFocusOutListener;
75
+ subs = new Subscription();
76
+ _popoverService;
77
+ _hideSub;
78
+ _focusInsideSub;
79
+ _popover;
80
+ _showOn = 'click';
81
+ _popupOpenSub;
82
+ _popupCloseSub;
83
+ _popupSubs;
84
+ constructor(ngZone, popupService, renderer) {
85
+ this.ngZone = ngZone;
86
+ this.popupService = popupService;
87
+ this.renderer = renderer;
88
+ }
72
89
  ngAfterViewInit() {
73
90
  if (!isDocumentAvailable()) {
74
91
  return;
@@ -147,7 +164,6 @@ export class PopoverDirectivesBase {
147
164
  popupAlign,
148
165
  anchorAlign,
149
166
  margin: popupMargin,
150
- popupClass: 'k-popup-transparent',
151
167
  collision: { horizontal: 'fit', vertical: 'fit' }
152
168
  });
153
169
  const popupInstance = this.popupRef.content.instance;
@@ -298,10 +314,10 @@ export class PopoverDirectivesBase {
298
314
  }
299
315
  return false;
300
316
  }
317
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverDirectivesBase, deps: [{ token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
318
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverDirectivesBase, inputs: { popover: "popover", showOn: "showOn" }, ngImport: i0 });
301
319
  }
302
- PopoverDirectivesBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverDirectivesBase, deps: [{ token: i0.NgZone }, { token: i1.PopupService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
303
- PopoverDirectivesBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverDirectivesBase, inputs: { popover: "popover", showOn: "showOn" }, ngImport: i0 });
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverDirectivesBase, decorators: [{
320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverDirectivesBase, decorators: [{
305
321
  type: Directive,
306
322
  args: [{}]
307
323
  }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.PopupService }, { type: i0.Renderer2 }]; }, propDecorators: { popover: [{