@progress/kendo-angular-tooltip 4.1.1 → 11.0.0-develop.80

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 (61) hide show
  1. package/NOTICE.txt +3 -3
  2. package/README.md +3 -3
  3. package/constants.d.ts +1 -1
  4. package/{esm2015/constants.js → esm2020/constants.mjs} +1 -1
  5. package/{esm2015/main.js → esm2020/index.mjs} +1 -1
  6. package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -5
  7. package/{esm2015/models/animation.model.js → esm2020/models/animation.model.mjs} +1 -1
  8. package/{esm2015/models/events.js → esm2020/models/events.mjs} +1 -1
  9. package/{esm2015/models/popover-show-option.type.js → esm2020/models/functions.model.mjs} +1 -1
  10. package/{esm2015/models/position.type.js → esm2020/models/popover-show-option.type.mjs} +1 -1
  11. package/{esm2015/models/functions.model.js → esm2020/models/position.type.mjs} +1 -1
  12. package/esm2020/models/show.option.type.mjs +5 -0
  13. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
  14. package/{esm2015/popover/anchor.directive.js → esm2020/popover/anchor.directive.mjs} +7 -6
  15. package/{esm2015/popover/container.directive.js → esm2020/popover/container.directive.mjs} +7 -6
  16. package/{esm2015/popover/directives-base.js → esm2020/popover/directives-base.mjs} +7 -5
  17. package/{esm2015/popover/popover.component.js → esm2020/popover/popover.component.mjs} +4 -4
  18. package/{esm2015/popover/popover.service.js → esm2020/popover/popover.service.mjs} +5 -5
  19. package/{esm2015/popover/template-directives/actions-template.directive.js → esm2020/popover/template-directives/actions-template.directive.mjs} +5 -5
  20. package/{esm2015/popover/template-directives/body-template.directive.js → esm2020/popover/template-directives/body-template.directive.mjs} +5 -5
  21. package/{esm2015/popover/template-directives/title-template.directive.js → esm2020/popover/template-directives/title-template.directive.mjs} +5 -5
  22. package/{esm2015/popover.module.js → esm2020/popover.module.mjs} +5 -5
  23. package/{esm2015/kendo-angular-tooltip.js → esm2020/progress-kendo-angular-tooltip.mjs} +2 -2
  24. package/{esm2015/tooltip/tooltip.content.component.js → esm2020/tooltip/tooltip.content.component.mjs} +5 -5
  25. package/{esm2015/tooltip/tooltip.directive.js → esm2020/tooltip/tooltip.directive.mjs} +9 -8
  26. package/{esm2015/tooltip/tooltip.settings.js → esm2020/tooltip/tooltip.settings.mjs} +5 -4
  27. package/{esm2015/tooltip.module.js → esm2020/tooltip.module.mjs} +5 -5
  28. package/{esm2015/tooltips.module.js → esm2020/tooltips.module.mjs} +5 -5
  29. package/{esm2015/utils.js → esm2020/utils.mjs} +1 -1
  30. package/fesm2015/progress-kendo-angular-tooltip.mjs +2128 -0
  31. package/{fesm2015/kendo-angular-tooltip.js → fesm2020/progress-kendo-angular-tooltip.mjs} +59 -57
  32. package/{main.d.ts → index.d.ts} +1 -1
  33. package/localization/localized-messages.directive.d.ts +1 -1
  34. package/models/animation.model.d.ts +1 -1
  35. package/models/events.d.ts +1 -1
  36. package/models/functions.model.d.ts +1 -1
  37. package/models/popover-show-option.type.d.ts +1 -1
  38. package/models/position.type.d.ts +1 -1
  39. package/models/show.option.type.d.ts +1 -1
  40. package/package-metadata.d.ts +1 -1
  41. package/package.json +28 -54
  42. package/popover/anchor.directive.d.ts +1 -1
  43. package/popover/container.directive.d.ts +1 -1
  44. package/popover/directives-base.d.ts +1 -1
  45. package/popover/popover.component.d.ts +1 -1
  46. package/popover/popover.service.d.ts +1 -1
  47. package/popover/template-directives/actions-template.directive.d.ts +1 -1
  48. package/popover/template-directives/body-template.directive.d.ts +1 -1
  49. package/popover/template-directives/title-template.directive.d.ts +1 -1
  50. package/popover.module.d.ts +1 -1
  51. package/{kendo-angular-tooltip.d.ts → progress-kendo-angular-tooltip.d.ts} +2 -2
  52. package/schematics/ngAdd/index.js +1 -5
  53. package/tooltip/tooltip.content.component.d.ts +1 -1
  54. package/tooltip/tooltip.directive.d.ts +1 -1
  55. package/tooltip/tooltip.settings.d.ts +1 -1
  56. package/tooltip.module.d.ts +1 -1
  57. package/tooltips.module.d.ts +1 -1
  58. package/utils.d.ts +1 -1
  59. package/bundles/kendo-angular-tooltip.umd.js +0 -5
  60. package/esm2015/models/show.option.type.js +0 -5
  61. package/schematics/ngAdd/index.js.map +0 -1
@@ -0,0 +1,2128 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2022 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 i0 from '@angular/core';
6
+ import { InjectionToken, Injectable, forwardRef, Directive, Input, EventEmitter, Component, HostBinding, Output, isDevMode, Optional, Inject, ContentChild, ElementRef, NgModule } from '@angular/core';
7
+ import { filter, take, auditTime } from 'rxjs/operators';
8
+ import { Subscription, fromEvent, BehaviorSubject, Subject, combineLatest } from 'rxjs';
9
+ import { validatePackage } from '@progress/kendo-licensing';
10
+ import * as i1 from '@progress/kendo-angular-l10n';
11
+ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
12
+ import * as i2 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
14
+ import { isDocumentAvailable, Keys, PreventableEvent, closest, hasObservers } from '@progress/kendo-angular-common';
15
+ import * as i1$1 from '@progress/kendo-angular-popup';
16
+ import { PopupModule } from '@progress/kendo-angular-popup';
17
+
18
+ /**
19
+ * @hidden
20
+ */
21
+ const packageMetadata = {
22
+ name: '@progress/kendo-angular-tooltip',
23
+ productName: 'Kendo UI for Angular',
24
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
25
+ publishDate: 1672394472,
26
+ version: '',
27
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
28
+ };
29
+
30
+ /**
31
+ * Obsolete. Provide the TooltipSettings class instead.
32
+ *
33
+ * @hidden
34
+ */
35
+ const TOOLTIP_SETTINGS = new InjectionToken('kendo-ui-tooltip-settings');
36
+ /**
37
+ * Provides a global configuration for the Kendo UI Tooltip. Once injected through
38
+ * the `AppComponent` constructor, the configuration properties can be overridden.
39
+ *
40
+ * @example
41
+ * ```ts-no-run
42
+ * import { TooltipSettings } from '@progress/kendo-angular-tooltip';
43
+ *
44
+ * _@Component({
45
+ * selector: 'my-app',
46
+ * template: `
47
+ * <div kendoTooltip>
48
+ * <button title="Saves the current document">Save</button>
49
+ * </div>`,
50
+ * providers: [{
51
+ * provide: TooltipSettings,
52
+ * useFactory: (): TooltipSettings => ({
53
+ * // Override default values of tooltips if wanted
54
+ * position: 'right'
55
+ * })
56
+ * }]
57
+ * })
58
+ * export class AppComponent { }
59
+ * ```
60
+ */
61
+ class TooltipSettings {
62
+ /**
63
+ * @hidden
64
+ */
65
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
66
+ constructor() { }
67
+ }
68
+ TooltipSettings.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipSettings, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
69
+ TooltipSettings.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipSettings });
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipSettings, decorators: [{
71
+ type: Injectable
72
+ }], ctorParameters: function () { return []; } });
73
+
74
+ /**
75
+ * @hidden
76
+ */
77
+ let idx = 0;
78
+ /**
79
+ * @hidden
80
+ */
81
+ const getId = (prefix) => {
82
+ return `${prefix}-${++idx}`;
83
+ };
84
+ /**
85
+ * @hidden
86
+ */
87
+ function align(position, offset) {
88
+ let anchorAlign = {};
89
+ let popupAlign = {};
90
+ let popupMargin = {};
91
+ switch (position) {
92
+ case 'top':
93
+ anchorAlign = { horizontal: 'center', vertical: 'top' };
94
+ popupAlign = { horizontal: 'center', vertical: 'bottom' };
95
+ popupMargin = { horizontal: 0, vertical: offset };
96
+ break;
97
+ case 'bottom':
98
+ anchorAlign = { horizontal: 'center', vertical: 'bottom' };
99
+ popupAlign = { horizontal: 'center', vertical: 'top' };
100
+ popupMargin = { horizontal: 0, vertical: offset };
101
+ break;
102
+ case 'right':
103
+ anchorAlign = { horizontal: 'right', vertical: 'center' };
104
+ popupAlign = { horizontal: 'left', vertical: 'center' };
105
+ popupMargin = { horizontal: offset, vertical: 0 };
106
+ break;
107
+ case 'left':
108
+ anchorAlign = { horizontal: 'left', vertical: 'center' };
109
+ popupAlign = { horizontal: 'right', vertical: 'center' };
110
+ popupMargin = { horizontal: offset, vertical: 0 };
111
+ break;
112
+ default: break;
113
+ }
114
+ return {
115
+ anchorAlign,
116
+ popupAlign,
117
+ popupMargin
118
+ };
119
+ }
120
+ /**
121
+ * @hidden
122
+ */
123
+ function collision(inputcollision, position) {
124
+ if (inputcollision) {
125
+ return inputcollision;
126
+ }
127
+ if (position === 'top' || position === 'bottom') {
128
+ return { horizontal: 'fit', vertical: 'flip' };
129
+ }
130
+ return { horizontal: 'flip', vertical: 'fit' };
131
+ }
132
+ function isDocumentNode(container) {
133
+ return container.nodeType === 9;
134
+ }
135
+ /**
136
+ * @hidden
137
+ */
138
+ function closestBySelector(element, selector) {
139
+ if (element.closest) {
140
+ return element.closest(selector);
141
+ }
142
+ const matches = Element.prototype.matches ?
143
+ (el, sel) => el.matches(sel)
144
+ : (el, sel) => el.msMatchesSelector(sel);
145
+ let node = element;
146
+ while (node && !isDocumentNode(node)) {
147
+ if (matches(node, selector)) {
148
+ return node;
149
+ }
150
+ node = node.parentNode;
151
+ }
152
+ }
153
+ /**
154
+ * @hidden
155
+ */
156
+ function contains(container, child) {
157
+ if (!container) {
158
+ return false;
159
+ }
160
+ if (isDocumentNode(container)) {
161
+ return false;
162
+ }
163
+ if (container.contains) {
164
+ return container.contains(child);
165
+ }
166
+ if (container.compareDocumentPosition) {
167
+ return !!(container.compareDocumentPosition(child) & Node.DOCUMENT_POSITION_CONTAINED_BY);
168
+ }
169
+ }
170
+ /**
171
+ * @hidden
172
+ */
173
+ const hasParent = (node, parent) => {
174
+ while (node && node !== parent) {
175
+ node = node.parentNode;
176
+ }
177
+ return node;
178
+ };
179
+ /**
180
+ * @hidden
181
+ */
182
+ function getCenterOffset(item, dir, size) {
183
+ const rect = item.getBoundingClientRect();
184
+ return rect[dir] + (rect[size] / 2);
185
+ }
186
+ /**
187
+ * @hidden
188
+ */
189
+ function containsItem(collection, item) {
190
+ return collection.indexOf(item) !== -1;
191
+ }
192
+
193
+ /**
194
+ * @hidden
195
+ */
196
+ class LocalizedMessagesDirective extends ComponentMessages {
197
+ constructor(service) {
198
+ super();
199
+ this.service = service;
200
+ }
201
+ }
202
+ LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
203
+ LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "[kendoTooltipLocalizedMessages]", inputs: { closeTitle: "closeTitle" }, providers: [
204
+ {
205
+ provide: ComponentMessages,
206
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
207
+ }
208
+ ], usesInheritance: true, ngImport: i0 });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
210
+ type: Directive,
211
+ args: [{
212
+ providers: [
213
+ {
214
+ provide: ComponentMessages,
215
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
216
+ }
217
+ ],
218
+ selector: `[kendoTooltipLocalizedMessages]`
219
+ }]
220
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { closeTitle: [{
221
+ type: Input
222
+ }] } });
223
+
224
+ /**
225
+ * @hidden
226
+ */
227
+ class TooltipContentComponent {
228
+ constructor(content, localizationService) {
229
+ this.content = content;
230
+ this.localizationService = localizationService;
231
+ this.close = new EventEmitter();
232
+ this.hostRole = 'tooltip';
233
+ this.tooltipWidth = null;
234
+ this.tooltipHeight = null;
235
+ this.callout = true;
236
+ this.calloutStyles = (position, calloutSize, isFlip) => {
237
+ const styles = {};
238
+ const isVertical = position === 'top' || position === 'bottom';
239
+ const flipDeg = '180deg';
240
+ const zeroDeg = '0deg';
241
+ if (!isFlip) {
242
+ styles.transform = isVertical ? `rotateX(${zeroDeg})` : `rotateY(${zeroDeg})`;
243
+ return styles;
244
+ }
245
+ if (position === 'top') {
246
+ styles.bottom = 'unset';
247
+ }
248
+ else if (position === 'bottom') {
249
+ styles.top = 'unset';
250
+ }
251
+ else if (position === 'left') {
252
+ styles.right = 'unset';
253
+ }
254
+ else if (position === 'right') {
255
+ styles.left = 'unset';
256
+ }
257
+ styles[position] = `${-calloutSize}px`;
258
+ styles.transform = isVertical ? `rotateX(${flipDeg})` : `rotateY(${flipDeg})`;
259
+ return styles;
260
+ };
261
+ this.direction = localizationService.rtl ? 'rtl' : 'ltr';
262
+ }
263
+ get cssClasses() {
264
+ return 'k-tooltip';
265
+ }
266
+ get hostId() {
267
+ return this.tooltipId;
268
+ }
269
+ get className() {
270
+ return this.closable;
271
+ }
272
+ get cssPosition() {
273
+ return 'relative';
274
+ }
275
+ ngOnInit() {
276
+ this.tooltipId = getId('tooltip');
277
+ this.dynamicRTLSubscription = this.localizationService.changes
278
+ .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
279
+ }
280
+ ngOnDestroy() {
281
+ if (this.dynamicRTLSubscription) {
282
+ this.dynamicRTLSubscription.unsubscribe();
283
+ }
284
+ }
285
+ get closeButtonTitle() {
286
+ return this.closeTitle || this.localizationService.get('closeTitle');
287
+ }
288
+ calloutPositionClass() {
289
+ return {
290
+ 'top': 'k-callout-s',
291
+ 'left': 'k-callout-e',
292
+ 'bottom': 'k-callout-n',
293
+ 'right': 'k-callout-w'
294
+ }[this.position];
295
+ }
296
+ onCloseClick(event) {
297
+ event.preventDefault();
298
+ this.close.emit();
299
+ }
300
+ updateCalloutPosition(position, isFlip) {
301
+ if (!this.callout) {
302
+ return;
303
+ }
304
+ const callout = this.content.nativeElement.querySelector('.k-callout');
305
+ const isVertical = position === 'top' || position === 'bottom';
306
+ const size = isVertical ? 'width' : 'height';
307
+ const dir = isVertical ? 'left' : 'top';
308
+ const offsetProperty = isVertical ? 'marginLeft' : 'marginTop';
309
+ const calloutSize = callout.getBoundingClientRect()[size];
310
+ const anchorCenter = getCenterOffset(this.anchor.nativeElement, dir, size);
311
+ const contentCenter = getCenterOffset(this.content.nativeElement, dir, size);
312
+ const diff = Math.abs(contentCenter - anchorCenter);
313
+ if (diff > 1 || diff === 0 || Math.round(diff) === 0) {
314
+ const newMargin = contentCenter - anchorCenter + (calloutSize / 2);
315
+ callout.style[offsetProperty] = `${-newMargin}px`;
316
+ }
317
+ const calloutStyles = this.calloutStyles(position, calloutSize, isFlip);
318
+ Object.keys(calloutStyles).forEach((style) => {
319
+ callout.style[style] = calloutStyles[style];
320
+ });
321
+ }
322
+ }
323
+ TooltipContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipContentComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
324
+ TooltipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TooltipContentComponent, selector: "kendo-tooltip", inputs: { tooltipWidth: "tooltipWidth", tooltipHeight: "tooltipHeight", titleTemplate: "titleTemplate", anchor: "anchor", closable: "closable", templateRef: "templateRef", templateString: "templateString" }, outputs: { close: "close" }, host: { properties: { "attr.dir": "this.direction", "class": "this.cssClasses", "attr.role": "this.hostRole", "attr.id": "this.hostId", "class.k-tooltip-closable": "this.className", "style.position": "this.cssPosition", "style.width.px": "this.tooltipWidth", "style.height.px": "this.tooltipHeight" } }, providers: [
325
+ LocalizationService,
326
+ {
327
+ provide: L10N_PREFIX,
328
+ useValue: 'kendo.tooltip'
329
+ }
330
+ ], ngImport: i0, template: `
331
+ <ng-container kendoTooltipLocalizedMessages
332
+ i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"
333
+ closeTitle="Close"
334
+ >
335
+ </ng-container>
336
+
337
+ <div class="k-tooltip-content">
338
+ <div class="k-tooltip-title" *ngIf="titleTemplate">
339
+ <ng-template
340
+ [ngIf]="titleTemplate"
341
+ [ngTemplateOutlet]="titleTemplate"
342
+ [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">
343
+ </ng-template>
344
+ </div>
345
+
346
+ <ng-template
347
+ [ngIf]="templateRef"
348
+ [ngTemplateOutlet]="templateRef"
349
+ [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">
350
+ </ng-template>
351
+ <ng-template
352
+ [ngIf]="templateString">
353
+ {{ templateString }}
354
+ </ng-template>
355
+ </div>
356
+
357
+ <div *ngIf="closable" [attr.aria-hidden]="true" class="k-tooltip-button" (click)="onCloseClick($event)">
358
+ <a href="#" class="k-icon k-i-x" [attr.title]="closeButtonTitle"></a>
359
+ </div>
360
+
361
+ <div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>
362
+ `, isInline: true, directives: [{ type: LocalizedMessagesDirective, selector: "[kendoTooltipLocalizedMessages]", inputs: ["closeTitle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipContentComponent, decorators: [{
364
+ type: Component,
365
+ args: [{
366
+ selector: 'kendo-tooltip',
367
+ template: `
368
+ <ng-container kendoTooltipLocalizedMessages
369
+ i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"
370
+ closeTitle="Close"
371
+ >
372
+ </ng-container>
373
+
374
+ <div class="k-tooltip-content">
375
+ <div class="k-tooltip-title" *ngIf="titleTemplate">
376
+ <ng-template
377
+ [ngIf]="titleTemplate"
378
+ [ngTemplateOutlet]="titleTemplate"
379
+ [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">
380
+ </ng-template>
381
+ </div>
382
+
383
+ <ng-template
384
+ [ngIf]="templateRef"
385
+ [ngTemplateOutlet]="templateRef"
386
+ [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">
387
+ </ng-template>
388
+ <ng-template
389
+ [ngIf]="templateString">
390
+ {{ templateString }}
391
+ </ng-template>
392
+ </div>
393
+
394
+ <div *ngIf="closable" [attr.aria-hidden]="true" class="k-tooltip-button" (click)="onCloseClick($event)">
395
+ <a href="#" class="k-icon k-i-x" [attr.title]="closeButtonTitle"></a>
396
+ </div>
397
+
398
+ <div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>
399
+ `,
400
+ providers: [
401
+ LocalizationService,
402
+ {
403
+ provide: L10N_PREFIX,
404
+ useValue: 'kendo.tooltip'
405
+ }
406
+ ]
407
+ }]
408
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.LocalizationService }]; }, propDecorators: { direction: [{
409
+ type: HostBinding,
410
+ args: ['attr.dir']
411
+ }], close: [{
412
+ type: Output
413
+ }], cssClasses: [{
414
+ type: HostBinding,
415
+ args: ['class']
416
+ }], hostRole: [{
417
+ type: HostBinding,
418
+ args: ['attr.role']
419
+ }], hostId: [{
420
+ type: HostBinding,
421
+ args: ['attr.id']
422
+ }], className: [{
423
+ type: HostBinding,
424
+ args: ['class.k-tooltip-closable']
425
+ }], cssPosition: [{
426
+ type: HostBinding,
427
+ args: ['style.position']
428
+ }], tooltipWidth: [{
429
+ type: HostBinding,
430
+ args: ['style.width.px']
431
+ }, {
432
+ type: Input
433
+ }], tooltipHeight: [{
434
+ type: HostBinding,
435
+ args: ['style.height.px']
436
+ }, {
437
+ type: Input
438
+ }], titleTemplate: [{
439
+ type: Input
440
+ }], anchor: [{
441
+ type: Input
442
+ }], closable: [{
443
+ type: Input
444
+ }], templateRef: [{
445
+ type: Input
446
+ }], templateString: [{
447
+ type: Input
448
+ }] } });
449
+
450
+ /**
451
+ * Represents the [Kendo UI Tooltip directive for Angular]({% slug overview_tooltip %}).
452
+ * Used to display additional information that is related to an element.
453
+ *
454
+ * @example
455
+ * ```ts-no-run
456
+ * <div kendoTooltip>
457
+ * <a title="Tooltip title" href="foo">foo</a>
458
+ * </div>
459
+ * ```
460
+ */
461
+ class TooltipDirective {
462
+ constructor(tooltipWrapper, ngZone, renderer, popupService, settings, legacySettings) {
463
+ this.tooltipWrapper = tooltipWrapper;
464
+ this.ngZone = ngZone;
465
+ this.renderer = renderer;
466
+ this.popupService = popupService;
467
+ /**
468
+ * Specifies a selector for elements within a container which will display a tooltip
469
+ * ([see example]({% slug anchorelements_tooltip %})). The possible values include any
470
+ * DOM `selector`. The default value is `[title]`.
471
+ */
472
+ this.filter = '[title]';
473
+ /**
474
+ * Specifies the position of the Tooltip that is relative to the
475
+ * anchor element ([see example]({% slug positioning_tooltip %})).
476
+ *
477
+ * The possible values are:
478
+ * * `top` (default)
479
+ * * `bottom`
480
+ * * `left`
481
+ * * `right`
482
+ */
483
+ this.position = 'top';
484
+ /**
485
+ * Specifies the delay in milliseconds before the Tooltip is shown.
486
+ * * `100` (default) milliseconds.
487
+ */
488
+ this.showAfter = 100;
489
+ /**
490
+ * Specifies if the Тooltip will display a callout arrow.
491
+ *
492
+ * The possible values are:
493
+ * * `true` (default)
494
+ * * `false`
495
+ */
496
+ this.callout = true;
497
+ /**
498
+ * Specifies if the Тooltip will display a **Close** button
499
+ * ([see example]({% slug closable_tooltip %})).
500
+ *
501
+ * The possible values are:
502
+ * * `true`
503
+ * * `false`
504
+ */
505
+ this.closable = false;
506
+ /**
507
+ * Specifies the offset in pixels between the Tooltip and the anchor. Defaults to `6` pixels.
508
+ * If the `callout` property is set to `true`, the offset is rendered from the callout arrow.
509
+ * If the `callout` property is set to `false`, the offset is rendered from the content of the Tooltip.
510
+ */
511
+ this.offset = 6;
512
+ this.anchor = null;
513
+ this.keyboardNavigationSubscription = new Subscription();
514
+ this.validPositions = ['top', 'bottom', 'right', 'left'];
515
+ this.validShowOptions = ['hover', 'click', 'none'];
516
+ validatePackage(packageMetadata);
517
+ Object.assign(this, settings, legacySettings);
518
+ this.ngZone.runOutsideAngular(() => {
519
+ const wrapper = this.tooltipWrapper.nativeElement;
520
+ this.anchorTitleSubscription = fromEvent(wrapper, 'mouseover')
521
+ .pipe(filter(() => this.filter !== ''))
522
+ .subscribe((e) => {
523
+ const filterElement = closestBySelector(e.target, this.filter);
524
+ if (filterElement) {
525
+ this.hideElementTitle({ nativeElement: filterElement });
526
+ }
527
+ });
528
+ this.mouseOverSubscription = fromEvent(wrapper, 'mouseover')
529
+ .pipe(filter(() => this.filter !== ''))
530
+ .subscribe(e => this.onMouseOver(e));
531
+ this.mouseOutSubscription = fromEvent(wrapper, 'mouseout')
532
+ .subscribe(e => this.onMouseOut(e));
533
+ });
534
+ }
535
+ /**
536
+ * Sets the content of the Tooltip as a template reference
537
+ * ([see example]({% slug templates_tooltip %})).
538
+ */
539
+ set tooltipTemplate(value) {
540
+ this.template = value;
541
+ }
542
+ get tooltipTemplate() {
543
+ return this.template;
544
+ }
545
+ /**
546
+ * Shows the Tooltip.
547
+ * @param anchor&mdash; ElementRef|Element.
548
+ * Specifies the element that will be used as an anchor. The Tooltip opens relative to that element.
549
+ */
550
+ show(anchor) {
551
+ if (this.popupRef) {
552
+ return;
553
+ }
554
+ if (anchor instanceof Element) {
555
+ anchor = { nativeElement: anchor };
556
+ }
557
+ this.anchor = anchor;
558
+ if (this.showOn === 'hover') {
559
+ if (this.popupRef) {
560
+ return;
561
+ }
562
+ clearTimeout(this.showTimeout);
563
+ this.showTimeout = setTimeout(() => this.showContent(this.anchor), this.showAfter);
564
+ }
565
+ else {
566
+ this.hideElementTitle(this.anchor);
567
+ this.showContent(this.anchor);
568
+ }
569
+ }
570
+ /**
571
+ * Hides the Tooltip.
572
+ */
573
+ hide() {
574
+ clearTimeout(this.showTimeout);
575
+ const anchor = this.anchor && this.anchor.nativeElement;
576
+ if (anchor && anchor.getAttribute('data-title')) {
577
+ if (!anchor.getAttribute('title') && anchor.hasAttribute('title')) {
578
+ anchor.setAttribute('title', anchor.getAttribute('data-title'));
579
+ }
580
+ anchor.setAttribute('data-title', '');
581
+ }
582
+ if (this.popupMouseOutSubscription) {
583
+ this.popupMouseOutSubscription.unsubscribe();
584
+ }
585
+ if (this.closeClickSubscription) {
586
+ this.closeClickSubscription.unsubscribe();
587
+ }
588
+ this.closePopup();
589
+ }
590
+ /**
591
+ * Toggle visibility of the Tooltip.
592
+ *
593
+ * @param anchor&mdash; ElementRef|Element. Specifies the element that will be used as an anchor.
594
+ * @param show&mdash; Optional. Boolean. Specifies if the Tooltip will be rendered.
595
+ */
596
+ toggle(anchor, show) {
597
+ const previousAnchor = this.anchor && this.anchor.nativeElement;
598
+ if (anchor instanceof Element) {
599
+ anchor = { nativeElement: anchor };
600
+ }
601
+ if (previousAnchor !== anchor.nativeElement) {
602
+ this.hide();
603
+ }
604
+ if (previousAnchor === anchor.nativeElement && this.showOn === 'click') {
605
+ this.hide();
606
+ }
607
+ if (typeof show === 'undefined') {
608
+ show = !this.popupRef;
609
+ }
610
+ if (show) {
611
+ this.show(anchor);
612
+ }
613
+ else {
614
+ this.hide();
615
+ }
616
+ }
617
+ ngOnInit() {
618
+ if (this.showOn === undefined) {
619
+ this.showOn = 'hover';
620
+ }
621
+ this.keyboardNavigationSubscription.add(this.renderer.listen(this.tooltipWrapper.nativeElement, 'keydown', event => this.onKeyDown(event)));
622
+ this.verifyProperties();
623
+ }
624
+ ngOnChanges(changes) {
625
+ if (changes.showOn && isDocumentAvailable()) {
626
+ this.subscribeClick();
627
+ }
628
+ }
629
+ ngAfterViewChecked() {
630
+ if (!this.popupRef) {
631
+ return;
632
+ }
633
+ if (this.anchor &&
634
+ !hasParent(this.anchor.nativeElement || this.anchor, this.tooltipWrapper.nativeElement)) {
635
+ this.anchor = null;
636
+ this.hide();
637
+ }
638
+ }
639
+ ngOnDestroy() {
640
+ this.hide();
641
+ this.template = null;
642
+ this.anchorTitleSubscription.unsubscribe();
643
+ this.mouseOverSubscription.unsubscribe();
644
+ this.mouseOutSubscription.unsubscribe();
645
+ this.keyboardNavigationSubscription.unsubscribe();
646
+ if (this.mouseClickSubscription) {
647
+ this.mouseClickSubscription.unsubscribe();
648
+ }
649
+ if (this.popupPositionChangeSubscription) {
650
+ this.popupPositionChangeSubscription.unsubscribe();
651
+ }
652
+ if (this.popupMouseOutSubscription) {
653
+ this.popupMouseOutSubscription.unsubscribe();
654
+ }
655
+ }
656
+ showContent(anchorRef) {
657
+ if (!anchorRef.nativeElement.getAttribute('data-title') && !this.template) {
658
+ return;
659
+ }
660
+ this.ngZone.run(() => {
661
+ this.openPopup(anchorRef);
662
+ this.bindContent(this.popupRef.content, anchorRef);
663
+ });
664
+ this.popupRef.popupAnchorViewportLeave
665
+ .pipe(take(1))
666
+ .subscribe(() => this.hide());
667
+ }
668
+ bindContent(contentComponent, anchorRef) {
669
+ const content = contentComponent.instance;
670
+ this.closeClickSubscription = content.close
671
+ .subscribe(() => {
672
+ this.hide();
673
+ });
674
+ if (!this.template) {
675
+ content.templateString = this.anchor.nativeElement.getAttribute('data-title');
676
+ }
677
+ else {
678
+ content.templateRef = this.template;
679
+ }
680
+ if (this.titleTemplate) {
681
+ content.titleTemplate = this.titleTemplate;
682
+ }
683
+ content.closeTitle = this.closeTitle;
684
+ content.anchor = anchorRef;
685
+ content.callout = this.callout;
686
+ content.closable = this.closable;
687
+ content.position = this.position;
688
+ content.tooltipWidth = this.tooltipWidth;
689
+ content.tooltipHeight = this.tooltipHeight;
690
+ this.popupRef.content.changeDetectorRef.detectChanges();
691
+ }
692
+ hideElementTitle(elementRef) {
693
+ const element = elementRef.nativeElement;
694
+ if (element.getAttribute('title')) {
695
+ element.setAttribute('data-title', element.getAttribute('title'));
696
+ element.setAttribute('title', '');
697
+ }
698
+ }
699
+ openPopup(anchorRef) {
700
+ const alignSettings = align(this.position, this.offset);
701
+ const anchorAlign = alignSettings.anchorAlign;
702
+ const popupAlign = alignSettings.popupAlign;
703
+ const popupMargin = alignSettings.popupMargin;
704
+ this.popupRef = this.popupService.open({
705
+ anchor: anchorRef,
706
+ anchorAlign,
707
+ animate: false,
708
+ content: TooltipContentComponent,
709
+ collision: collision(this.collision, this.position),
710
+ margin: popupMargin,
711
+ popupAlign,
712
+ popupClass: 'k-popup-transparent'
713
+ });
714
+ this.renderer.addClass(this.popupRef.popupElement, 'k-tooltip-wrapper');
715
+ if (this.tooltipClass) {
716
+ this.renderer.addClass(this.popupRef.popupElement, this.tooltipClass);
717
+ }
718
+ const popupInstance = this.popupRef.content.instance;
719
+ if (anchorRef) {
720
+ this.renderer.setAttribute(anchorRef.nativeElement, 'aria-labelledby', popupInstance.tooltipId);
721
+ }
722
+ if (popupInstance.callout) {
723
+ this.popupPositionChangeSubscription = this.popupRef.popupPositionChange
724
+ .subscribe(({ flip }) => {
725
+ const isFlip = flip.horizontal === true || flip.vertical === true;
726
+ popupInstance.updateCalloutPosition(this.position, isFlip);
727
+ });
728
+ }
729
+ if (this.showOn === 'hover') {
730
+ this.ngZone.runOutsideAngular(() => {
731
+ const popup = this.popupRef.popupElement;
732
+ this.popupMouseOutSubscription = fromEvent(popup, 'mouseout')
733
+ .subscribe((e) => this.onMouseOut(e));
734
+ });
735
+ }
736
+ }
737
+ closePopup() {
738
+ if (this.popupRef) {
739
+ if (this.anchor) {
740
+ this.renderer.removeAttribute(this.anchor.nativeElement, 'aria-labelledby');
741
+ }
742
+ this.popupRef.close();
743
+ this.popupRef = null;
744
+ }
745
+ if (this.popupPositionChangeSubscription) {
746
+ this.popupPositionChangeSubscription.unsubscribe();
747
+ }
748
+ }
749
+ subscribeClick() {
750
+ if (this.mouseClickSubscription) {
751
+ this.mouseClickSubscription.unsubscribe();
752
+ }
753
+ if (this.showOn === 'click') {
754
+ this.mouseClickSubscription = fromEvent(document, 'click')
755
+ .pipe(filter(() => this.filter !== ''))
756
+ .subscribe(e => this.onMouseClick(e, this.tooltipWrapper.nativeElement));
757
+ }
758
+ }
759
+ onMouseClick(e, wrapper) {
760
+ const target = e.target;
761
+ const filterElement = closestBySelector(target, this.filter);
762
+ const popup = this.popupRef && this.popupRef.popupElement;
763
+ if (popup) {
764
+ if (popup.contains(target)) {
765
+ return;
766
+ }
767
+ if (this.closable) {
768
+ return;
769
+ }
770
+ }
771
+ if (wrapper.contains(target) && filterElement) {
772
+ this.toggle(filterElement, true);
773
+ }
774
+ else if (popup) {
775
+ this.hide();
776
+ }
777
+ }
778
+ onKeyDown(event) {
779
+ const keyCode = event.keyCode;
780
+ const target = event.target;
781
+ if (this.popupRef) {
782
+ const tooltipId = this.popupRef.content.location.nativeElement.getAttribute('id');
783
+ const anchorLabelledBy = target.getAttribute('aria-labelledby');
784
+ if (keyCode === Keys.Escape && this.canCloseTooltip(target, tooltipId, anchorLabelledBy)) {
785
+ this.closePopup();
786
+ }
787
+ }
788
+ }
789
+ canCloseTooltip(target, tooltipId, anchorLabelledBy) {
790
+ const isIdEqualsLabel = tooltipId === anchorLabelledBy;
791
+ const filterElement = closestBySelector(target, this.filter);
792
+ const isTargetFocused = target === document.activeElement;
793
+ const isTargetInsideWrapper = this.tooltipWrapper.nativeElement.contains(target);
794
+ return isTargetInsideWrapper && filterElement && isTargetFocused && isIdEqualsLabel;
795
+ }
796
+ onMouseOver(e) {
797
+ const filterElement = closestBySelector(e.target, this.filter);
798
+ if (this.showOn !== 'hover') {
799
+ return;
800
+ }
801
+ if (filterElement) {
802
+ this.toggle(filterElement, true);
803
+ }
804
+ }
805
+ onMouseOut(e) {
806
+ if (this.showOn !== 'hover') {
807
+ return;
808
+ }
809
+ if (this.closable) {
810
+ return;
811
+ }
812
+ const popup = this.popupRef && this.popupRef.popupElement;
813
+ const relatedTarget = e.relatedTarget;
814
+ if (relatedTarget && this.anchor && contains(this.anchor.nativeElement, relatedTarget)) {
815
+ return;
816
+ }
817
+ if (relatedTarget && contains(popup, relatedTarget)) {
818
+ return;
819
+ }
820
+ this.hide();
821
+ }
822
+ verifyProperties() {
823
+ if (!isDevMode()) {
824
+ return;
825
+ }
826
+ if (!containsItem(this.validPositions, this.position)) {
827
+ throw new Error(`Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.`);
828
+ }
829
+ if (!containsItem(this.validShowOptions, this.showOn)) {
830
+ throw new Error(`Invalid value provided for showOn property.The available options are 'hover' or 'none'.`);
831
+ }
832
+ }
833
+ }
834
+ TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1$1.PopupService }, { token: TooltipSettings, optional: true }, { token: TOOLTIP_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
835
+ TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: TooltipDirective, selector: "[kendoTooltip]", inputs: { filter: "filter", position: "position", titleTemplate: "titleTemplate", showOn: "showOn", showAfter: "showAfter", callout: "callout", closable: "closable", offset: "offset", tooltipWidth: "tooltipWidth", tooltipHeight: "tooltipHeight", tooltipClass: "tooltipClass", collision: "collision", closeTitle: "closeTitle", tooltipTemplate: "tooltipTemplate" }, exportAs: ["kendoTooltip"], usesOnChanges: true, ngImport: i0 });
836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipDirective, decorators: [{
837
+ type: Directive,
838
+ args: [{
839
+ selector: '[kendoTooltip]',
840
+ exportAs: 'kendoTooltip'
841
+ }]
842
+ }], ctorParameters: function () {
843
+ return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1$1.PopupService }, { type: TooltipSettings, decorators: [{
844
+ type: Optional
845
+ }] }, { type: TooltipSettings, decorators: [{
846
+ type: Optional
847
+ }, {
848
+ type: Inject,
849
+ args: [TOOLTIP_SETTINGS]
850
+ }] }];
851
+ }, propDecorators: { filter: [{
852
+ type: Input
853
+ }], position: [{
854
+ type: Input
855
+ }], titleTemplate: [{
856
+ type: Input
857
+ }], showOn: [{
858
+ type: Input
859
+ }], showAfter: [{
860
+ type: Input
861
+ }], callout: [{
862
+ type: Input
863
+ }], closable: [{
864
+ type: Input
865
+ }], offset: [{
866
+ type: Input
867
+ }], tooltipWidth: [{
868
+ type: Input
869
+ }], tooltipHeight: [{
870
+ type: Input
871
+ }], tooltipClass: [{
872
+ type: Input
873
+ }], collision: [{
874
+ type: Input
875
+ }], closeTitle: [{
876
+ type: Input
877
+ }], tooltipTemplate: [{
878
+ type: Input
879
+ }] } });
880
+
881
+ /**
882
+ * @hidden
883
+ */
884
+ const ERRORS = {
885
+ popover: `Invalid value provided for the 'popover' property. The accepted data types are 'PopoverComponent' or 'PopoverFn'.`,
886
+ templateData: `templateData must be a function, but received`,
887
+ showOn: `Invalid value provided for the 'showOn' property. The available options are 'click', 'hover', 'focus' or 'none'.`
888
+ };
889
+
890
+ /**
891
+ * Represents a template that defines the content of the Popover title.
892
+ *
893
+ * To define the template, nest an `<ng-template>` tag
894
+ * with the `kendoPopoverTitleTemplate` directive inside the `<kendo-popover>` tag.
895
+ */
896
+ class PopoverTitleTemplateDirective {
897
+ constructor(templateRef) {
898
+ this.templateRef = templateRef;
899
+ }
900
+ }
901
+ PopoverTitleTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverTitleTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
902
+ PopoverTitleTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PopoverTitleTemplateDirective, selector: "[kendoPopoverTitleTemplate]", ngImport: i0 });
903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverTitleTemplateDirective, decorators: [{
904
+ type: Directive,
905
+ args: [{
906
+ selector: '[kendoPopoverTitleTemplate]'
907
+ }]
908
+ }], ctorParameters: function () {
909
+ return [{ type: i0.TemplateRef, decorators: [{
910
+ type: Optional
911
+ }] }];
912
+ } });
913
+
914
+ /**
915
+ * Represents a template that defines the content of the Popover body.
916
+ *
917
+ * To define the template, nest an `<ng-template>` tag
918
+ * with the `kendoPopoverBodyTemplate` directive inside the `<kendo-popover>` tag.
919
+ */
920
+ class PopoverBodyTemplateDirective {
921
+ constructor(templateRef) {
922
+ this.templateRef = templateRef;
923
+ }
924
+ }
925
+ PopoverBodyTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverBodyTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
926
+ PopoverBodyTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PopoverBodyTemplateDirective, selector: "[kendoPopoverBodyTemplate]", ngImport: i0 });
927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverBodyTemplateDirective, decorators: [{
928
+ type: Directive,
929
+ args: [{
930
+ selector: '[kendoPopoverBodyTemplate]'
931
+ }]
932
+ }], ctorParameters: function () {
933
+ return [{ type: i0.TemplateRef, decorators: [{
934
+ type: Optional
935
+ }] }];
936
+ } });
937
+
938
+ /**
939
+ * Represents a template that defines the content of the Popover actions.
940
+ *
941
+ * To define the template, nest an `<ng-template>` tag
942
+ * with the `kendoPopoverActionsTemplate` directive inside the `<kendo-popover>` tag.
943
+ */
944
+ class PopoverActionsTemplateDirective {
945
+ constructor(templateRef) {
946
+ this.templateRef = templateRef;
947
+ }
948
+ }
949
+ PopoverActionsTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverActionsTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
950
+ PopoverActionsTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PopoverActionsTemplateDirective, selector: "[kendoPopoverActionsTemplate]", ngImport: i0 });
951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverActionsTemplateDirective, decorators: [{
952
+ type: Directive,
953
+ args: [{
954
+ selector: '[kendoPopoverActionsTemplate]'
955
+ }]
956
+ }], ctorParameters: function () {
957
+ return [{ type: i0.TemplateRef, decorators: [{
958
+ type: Optional
959
+ }] }];
960
+ } });
961
+
962
+ /**
963
+ * Represents the [Kendo UI Popover component for Angular]({% slug overview_popover %}).
964
+ * Used to display additional information that is related to a target element.
965
+ *
966
+ * @example
967
+ * ```ts-no-run
968
+ * <kendo-popover>
969
+ * <ng-template kendoPopoverTitleTemplate>Foo Title</ng-template>
970
+ * <ng-template kendoPopoverBodyTemplate>Foo Body</ng-template>
971
+ * <ng-template kendoPopoverActionsTemplate>Foo Actions</ng-template>
972
+ * </kendo-popover>
973
+ * ```
974
+ */
975
+ class PopoverComponent {
976
+ constructor(localization) {
977
+ this.localization = localization;
978
+ /**
979
+ * Specifies the position of the Popover in relation to its anchor element. [See example]({% slug positioning_popover %})
980
+ *
981
+ * The possible options are:
982
+ * `top`
983
+ * `bottom`
984
+ * `right` (Default)
985
+ * `left`
986
+ */
987
+ this.position = 'right';
988
+ /**
989
+ * Determines whether a callout will be rendered along the Popover. [See example]({% slug callout_popover %})
990
+ *
991
+ * @default true
992
+ */
993
+ this.callout = true;
994
+ /**
995
+ * Enables and configures the Popover animation. [See example]({% slug animations_popover %})
996
+ *
997
+ * The possible options are:
998
+ *
999
+ * * `boolean`&mdash;Enables the default animation
1000
+ * * `PopoverAnimation`&mdash;A configuration object which allows setting the `direction`, `duration` and `type` of the animation.
1001
+ *
1002
+ * @default false
1003
+ */
1004
+ this.animation = false;
1005
+ /**
1006
+ * @hidden
1007
+ * Determines the visibility of the Popover.
1008
+ */
1009
+ this.visible = false;
1010
+ /**
1011
+ * Fires before the Popover is about to be shown ([see example]({% slug events_popover %})).
1012
+ * The event is preventable. If canceled, the Popover will not be displayed. [See example]({% slug events_popover %})
1013
+ */
1014
+ this.show = new EventEmitter();
1015
+ /**
1016
+ * Fires after the Popover has been shown and the animation has ended. [See example]({% slug events_popover %})
1017
+ */
1018
+ this.shown = new EventEmitter();
1019
+ /**
1020
+ * Fires when the Popover is about to be hidden ([see example]({% slug events_popover %})).
1021
+ * The event is preventable. If canceled, the Popover will remain visible.
1022
+ */
1023
+ this.hide = new EventEmitter();
1024
+ /**
1025
+ * Fires after the Popover has been hidden and the animation has ended. [See example]({% slug events_popover %})
1026
+ */
1027
+ this.hidden = new EventEmitter();
1028
+ /**
1029
+ * @hidden
1030
+ */
1031
+ this._width = 'auto';
1032
+ /**
1033
+ * @hidden
1034
+ */
1035
+ this._height = 'auto';
1036
+ this._offset = 6;
1037
+ this.subs = new Subscription();
1038
+ /**
1039
+ * @hidden
1040
+ */
1041
+ this._templateData = () => null;
1042
+ validatePackage(packageMetadata);
1043
+ }
1044
+ /**
1045
+ * Specifies the distance from the Popover to its anchor element in pixels.
1046
+ *
1047
+ * @default `6`
1048
+ */
1049
+ set offset(value) {
1050
+ this._offset = value;
1051
+ }
1052
+ get offset() {
1053
+ const calloutBuffer = 14;
1054
+ return this.callout
1055
+ ? calloutBuffer + this._offset
1056
+ : this._offset;
1057
+ }
1058
+ /**
1059
+ * Determines the width of the popover. Numeric values are treated as pixels.
1060
+ * @default 'auto'
1061
+ */
1062
+ set width(value) {
1063
+ this._width = typeof value === 'number' ? `${value}px` : value;
1064
+ }
1065
+ get width() {
1066
+ return this._width;
1067
+ }
1068
+ /**
1069
+ * Determines the height of the popover. Numeric values are treated as pixels.
1070
+ * @default 'auto'
1071
+ */
1072
+ set height(value) {
1073
+ this._height = typeof value === 'number' ? `${value}px` : value;
1074
+ }
1075
+ get height() {
1076
+ return this._height;
1077
+ }
1078
+ /**
1079
+ * Defines a callback function which returns custom data passed to the Popover templates.
1080
+ * It exposes the current anchor element as an argument. [See example]({% slug templates_popover %}#toc-popoverdatacallback)
1081
+ */
1082
+ set templateData(fn) {
1083
+ if (isDevMode && typeof fn !== 'function') {
1084
+ throw new Error(`${ERRORS.templateData} ${JSON.stringify(fn)}.`);
1085
+ }
1086
+ this._templateData = fn;
1087
+ }
1088
+ get templateData() {
1089
+ return this._templateData;
1090
+ }
1091
+ /**
1092
+ * @hidden
1093
+ */
1094
+ get isHidden() {
1095
+ return !this.visible;
1096
+ }
1097
+ /**
1098
+ * @hidden
1099
+ */
1100
+ get hasAttributeHidden() {
1101
+ return !this.visible;
1102
+ }
1103
+ ngOnInit() {
1104
+ this.subs.add(this.localization.changes.subscribe(({ rtl }) => {
1105
+ this.direction = rtl ? 'rtl' : 'ltr';
1106
+ }));
1107
+ }
1108
+ ngOnDestroy() {
1109
+ this.subs.unsubscribe();
1110
+ }
1111
+ /**
1112
+ * @hidden
1113
+ */
1114
+ getCalloutPosition() {
1115
+ switch (this.position) {
1116
+ case 'top': return { 'k-callout-s': true };
1117
+ case 'bottom': return { 'k-callout-n': true };
1118
+ case 'left': return { 'k-callout-e': true };
1119
+ case 'right': return { 'k-callout-w': true };
1120
+ default: return { 'k-callout-s': true };
1121
+ }
1122
+ }
1123
+ }
1124
+ PopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1125
+ PopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PopoverComponent, selector: "kendo-popover", inputs: { position: "position", offset: "offset", width: "width", height: "height", title: "title", subtitle: "subtitle", body: "body", callout: "callout", animation: "animation", templateData: "templateData" }, outputs: { show: "show", shown: "shown", hide: "hide", hidden: "hidden" }, host: { properties: { "attr.dir": "this.direction", "class.k-hidden": "this.isHidden", "attr.aria-hidden": "this.hasAttributeHidden", "style.width": "this._width", "style.height": "this._height" } }, providers: [
1126
+ LocalizationService,
1127
+ {
1128
+ provide: L10N_PREFIX,
1129
+ useValue: 'kendo.popover'
1130
+ }
1131
+ ], queries: [{ propertyName: "titleTemplate", first: true, predicate: PopoverTitleTemplateDirective, descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: PopoverBodyTemplateDirective, descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: PopoverActionsTemplateDirective, descendants: true }], ngImport: i0, template: `
1132
+ <div *ngIf="visible" role="tooltip" class="k-popover" [ngStyle]="{'width': width, 'height': height}">
1133
+ <div class="k-popover-callout" [ngClass]="getCalloutPosition()" *ngIf="callout"></div>
1134
+
1135
+ <div class="k-popover-inner" *ngIf="callout; else noCallout">
1136
+ <ng-container *ngTemplateOutlet="noCallout"></ng-container>
1137
+ </div>
1138
+
1139
+ <ng-template #noCallout>
1140
+ <div *ngIf="titleTemplate || title" class="k-popover-header">
1141
+ <ng-template *ngIf="titleTemplate"
1142
+ [ngTemplateOutlet]="titleTemplate?.templateRef"
1143
+ [ngTemplateOutletContext]="{ $implicit: anchor, data: contextData }">
1144
+ </ng-template>
1145
+ <ng-container *ngIf="title && !titleTemplate">
1146
+ {{ title }}
1147
+ </ng-container>
1148
+ </div>
1149
+
1150
+ <div *ngIf="bodyTemplate || body" class="k-popover-body">
1151
+ <ng-template *ngIf="bodyTemplate"
1152
+ [ngTemplateOutlet]="bodyTemplate?.templateRef"
1153
+ [ngTemplateOutletContext]="{ $implicit: anchor, data: contextData }">
1154
+ </ng-template>
1155
+ <ng-container *ngIf="body && !bodyTemplate">
1156
+ {{ body }}
1157
+ </ng-container>
1158
+ </div>
1159
+
1160
+ <div *ngIf="actionsTemplate" class="k-popover-actions k-actions k-hstack k-justify-content-between">
1161
+ <ng-template *ngIf="actionsTemplate"
1162
+ [ngTemplateOutlet]="actionsTemplate?.templateRef"
1163
+ [ngTemplateOutletContext]="{ $implicit: anchor, data: contextData }">
1164
+ </ng-template>
1165
+ </div>
1166
+ </ng-template>
1167
+ </div>
1168
+ `, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
1169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverComponent, decorators: [{
1170
+ type: Component,
1171
+ args: [{
1172
+ selector: 'kendo-popover',
1173
+ providers: [
1174
+ LocalizationService,
1175
+ {
1176
+ provide: L10N_PREFIX,
1177
+ useValue: 'kendo.popover'
1178
+ }
1179
+ ],
1180
+ template: `
1181
+ <div *ngIf="visible" role="tooltip" class="k-popover" [ngStyle]="{'width': width, 'height': height}">
1182
+ <div class="k-popover-callout" [ngClass]="getCalloutPosition()" *ngIf="callout"></div>
1183
+
1184
+ <div class="k-popover-inner" *ngIf="callout; else noCallout">
1185
+ <ng-container *ngTemplateOutlet="noCallout"></ng-container>
1186
+ </div>
1187
+
1188
+ <ng-template #noCallout>
1189
+ <div *ngIf="titleTemplate || title" class="k-popover-header">
1190
+ <ng-template *ngIf="titleTemplate"
1191
+ [ngTemplateOutlet]="titleTemplate?.templateRef"
1192
+ [ngTemplateOutletContext]="{ $implicit: anchor, data: contextData }">
1193
+ </ng-template>
1194
+ <ng-container *ngIf="title && !titleTemplate">
1195
+ {{ title }}
1196
+ </ng-container>
1197
+ </div>
1198
+
1199
+ <div *ngIf="bodyTemplate || body" class="k-popover-body">
1200
+ <ng-template *ngIf="bodyTemplate"
1201
+ [ngTemplateOutlet]="bodyTemplate?.templateRef"
1202
+ [ngTemplateOutletContext]="{ $implicit: anchor, data: contextData }">
1203
+ </ng-template>
1204
+ <ng-container *ngIf="body && !bodyTemplate">
1205
+ {{ body }}
1206
+ </ng-container>
1207
+ </div>
1208
+
1209
+ <div *ngIf="actionsTemplate" class="k-popover-actions k-actions k-hstack k-justify-content-between">
1210
+ <ng-template *ngIf="actionsTemplate"
1211
+ [ngTemplateOutlet]="actionsTemplate?.templateRef"
1212
+ [ngTemplateOutletContext]="{ $implicit: anchor, data: contextData }">
1213
+ </ng-template>
1214
+ </div>
1215
+ </ng-template>
1216
+ </div>
1217
+ `
1218
+ }]
1219
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { position: [{
1220
+ type: Input
1221
+ }], offset: [{
1222
+ type: Input
1223
+ }], width: [{
1224
+ type: Input
1225
+ }], height: [{
1226
+ type: Input
1227
+ }], direction: [{
1228
+ type: HostBinding,
1229
+ args: ['attr.dir']
1230
+ }], title: [{
1231
+ type: Input
1232
+ }], subtitle: [{
1233
+ type: Input
1234
+ }], body: [{
1235
+ type: Input
1236
+ }], callout: [{
1237
+ type: Input
1238
+ }], animation: [{
1239
+ type: Input
1240
+ }], templateData: [{
1241
+ type: Input
1242
+ }], isHidden: [{
1243
+ type: HostBinding,
1244
+ args: ['class.k-hidden']
1245
+ }], hasAttributeHidden: [{
1246
+ type: HostBinding,
1247
+ args: ['attr.aria-hidden']
1248
+ }], show: [{
1249
+ type: Output
1250
+ }], shown: [{
1251
+ type: Output
1252
+ }], hide: [{
1253
+ type: Output
1254
+ }], hidden: [{
1255
+ type: Output
1256
+ }], titleTemplate: [{
1257
+ type: ContentChild,
1258
+ args: [PopoverTitleTemplateDirective, { static: false }]
1259
+ }], bodyTemplate: [{
1260
+ type: ContentChild,
1261
+ args: [PopoverBodyTemplateDirective, { static: false }]
1262
+ }], actionsTemplate: [{
1263
+ type: ContentChild,
1264
+ args: [PopoverActionsTemplateDirective, { static: false }]
1265
+ }], _width: [{
1266
+ type: HostBinding,
1267
+ args: ['style.width']
1268
+ }], _height: [{
1269
+ type: HostBinding,
1270
+ args: ['style.height']
1271
+ }] } });
1272
+
1273
+ /**
1274
+ * Arguments for the `show` event. The `show` event fires when a popover is about
1275
+ * to be opened. If you cancel the event, the opening is prevented.
1276
+ */
1277
+ class PopoverShowEvent extends PreventableEvent {
1278
+ /**
1279
+ * @hidden
1280
+ * Constructs the event arguments for the `show` event.
1281
+ * @param anchor - The host element related to the popover.
1282
+ */
1283
+ constructor(anchor) {
1284
+ super();
1285
+ this.anchor = anchor;
1286
+ }
1287
+ }
1288
+ /**
1289
+ * Arguments for the `hide` event. The `hide` event fires when a popover is about
1290
+ * to be closed. If you cancel the event, the popover stays open.
1291
+ */
1292
+ class PopoverHideEvent extends PreventableEvent {
1293
+ /**
1294
+ * @hidden
1295
+ * Constructs the event arguments for the `hide` event.
1296
+ * @param anchor - The host element related to the popover.
1297
+ * @param popover - The popover element.
1298
+ */
1299
+ constructor(anchor, popover) {
1300
+ super();
1301
+ this.anchor = anchor;
1302
+ this.popover = popover;
1303
+ }
1304
+ }
1305
+ /**
1306
+ * Arguments for the `shown` event. The `shown` event fires after the popover has opened and its opening animation has finished.
1307
+ */
1308
+ class PopoverShownEvent {
1309
+ /**
1310
+ * @hidden
1311
+ * Constructs the event arguments for the `shown` event.
1312
+ * @param anchor - The host element related to the popover.
1313
+ * @param popover - The popover element.
1314
+ */
1315
+ constructor(anchor, popover) {
1316
+ this.anchor = anchor;
1317
+ this.popover = popover;
1318
+ }
1319
+ }
1320
+ /**
1321
+ * Arguments for the `hidden` event. The `hidden` event fires after the popover has closed and its closing animation has finished.
1322
+ */
1323
+ class PopoverHiddenEvent {
1324
+ /**
1325
+ * @hidden
1326
+ * Constructs the event arguments for the `hidden` event.
1327
+ * @param anchor - The host element related to the popover.
1328
+ */
1329
+ constructor(anchor) {
1330
+ this.anchor = anchor;
1331
+ }
1332
+ }
1333
+
1334
+ const validShowOptions = ['hover', 'click', 'none', 'focus'];
1335
+ /**
1336
+ * @hidden
1337
+ */
1338
+ class PopoverDirectivesBase {
1339
+ constructor(ngZone, popupService, renderer) {
1340
+ this.ngZone = ngZone;
1341
+ this.popupService = popupService;
1342
+ this.renderer = renderer;
1343
+ this.subs = new Subscription();
1344
+ this._showOn = 'click';
1345
+ }
1346
+ /**
1347
+ * Specifies the popover instance that will be rendered.
1348
+ * Accepts a [`PopoverComponent`]({% slug api_tooltip_popovercomponent %}) instance or
1349
+ * a [`PopoverFn`]({% slug api_tooltip_popoverfn %}) callback which returns a [`PopoverComponent`]({% slug api_tooltip_popovercomponent %}) instance
1350
+ * depending on the current anchor element.
1351
+ *
1352
+ * [See example]({% slug templates_popover %}#toc-popovercallback)
1353
+ */
1354
+ set popover(value) {
1355
+ if (value instanceof PopoverComponent || typeof value === `function`) {
1356
+ this._popover = value;
1357
+ }
1358
+ else {
1359
+ if (isDevMode) {
1360
+ throw new Error(ERRORS.popover);
1361
+ }
1362
+ }
1363
+ }
1364
+ get popover() {
1365
+ return this._popover;
1366
+ }
1367
+ /**
1368
+ * The event on which the Popover will be shown
1369
+ *
1370
+ * The supported values are:
1371
+ * - `click` (default) &mdash;The Popover will be shown when its `anchor` element is clicked.
1372
+ * - `hover`&mdash;The Popover will be shown when its `anchor` element is hovered.
1373
+ * - `focus`&mdash;The Popover will be shown when its `anchor` element is focused.
1374
+ * - `none`&mdash;The Popover will not be shown on user interaction. It could be rendered via the Popover API methods.
1375
+ */
1376
+ set showOn(value) {
1377
+ if (isDevMode && !containsItem(validShowOptions, value)) {
1378
+ throw new Error(ERRORS.showOn);
1379
+ }
1380
+ this._showOn = value;
1381
+ }
1382
+ get showOn() {
1383
+ return this._showOn;
1384
+ }
1385
+ ngAfterViewInit() {
1386
+ if (!isDocumentAvailable()) {
1387
+ return;
1388
+ }
1389
+ this.ngZone.runOutsideAngular(() => {
1390
+ switch (this.showOn) {
1391
+ case 'hover':
1392
+ this.subscribeToEvents([{
1393
+ name: 'mouseenter', handler: this.mouseenterHandler
1394
+ }, {
1395
+ name: 'mouseleave', handler: this.mouseleaveHandler
1396
+ }]);
1397
+ break;
1398
+ case 'focus':
1399
+ this.subscribeToEvents([{
1400
+ name: 'focus', handler: this.focusHandler
1401
+ }, {
1402
+ name: 'blur', handler: this.blurHandler
1403
+ }]);
1404
+ break;
1405
+ case 'click':
1406
+ this.subscribeClick();
1407
+ break;
1408
+ default:
1409
+ break;
1410
+ }
1411
+ });
1412
+ }
1413
+ ngOnDestroy() {
1414
+ this.closePopup();
1415
+ if (this.disposeHoverOverListener) {
1416
+ this.disposeHoverOverListener();
1417
+ }
1418
+ if (this.disposeHoverOutListener) {
1419
+ this.disposeHoverOutListener();
1420
+ }
1421
+ if (this.disposeClickListener) {
1422
+ this.disposeClickListener();
1423
+ }
1424
+ if (this._focusInsideSub) {
1425
+ this._focusInsideSub.unsubscribe();
1426
+ }
1427
+ if (this._hideSub) {
1428
+ this._hideSub.unsubscribe();
1429
+ }
1430
+ if (this.subs) {
1431
+ this.subs.unsubscribe();
1432
+ }
1433
+ if (this._popupOpenSub) {
1434
+ this._popupOpenSub.unsubscribe();
1435
+ }
1436
+ if (this._popupCloseSub) {
1437
+ this._popupCloseSub.unsubscribe();
1438
+ }
1439
+ }
1440
+ /**
1441
+ * Hides the Popover ([See example]({% slug programmaticcontrol_popover %})).
1442
+ */
1443
+ hide() {
1444
+ this.closePopup();
1445
+ }
1446
+ /**
1447
+ * @hidden
1448
+ */
1449
+ closePopup() {
1450
+ if (this.popupRef) {
1451
+ this.popupRef.close();
1452
+ this.popupRef = null;
1453
+ if (this.disposePopupHoverOutListener) {
1454
+ this.disposePopupHoverOutListener();
1455
+ }
1456
+ if (this.disposePopupHoverInListener) {
1457
+ this.disposePopupHoverInListener();
1458
+ }
1459
+ if (this.disposePopupFocusOutListener) {
1460
+ this.disposePopupFocusOutListener();
1461
+ }
1462
+ }
1463
+ }
1464
+ /**
1465
+ * @hidden
1466
+ */
1467
+ openPopup(anchor) {
1468
+ const _anchor = anchor instanceof ElementRef ? anchor.nativeElement : anchor;
1469
+ const popoverComp = this.popover instanceof PopoverComponent ? this.popover : this.popover(_anchor);
1470
+ const alignSettings = align(popoverComp.position, popoverComp.offset);
1471
+ const anchorAlign = alignSettings.anchorAlign;
1472
+ const popupAlign = alignSettings.popupAlign;
1473
+ const popupMargin = alignSettings.popupMargin;
1474
+ const _animation = popoverComp.animation;
1475
+ this.popupRef = this.popupService.open({
1476
+ anchor: { nativeElement: _anchor },
1477
+ animate: _animation,
1478
+ content: PopoverComponent,
1479
+ popupAlign,
1480
+ anchorAlign,
1481
+ margin: popupMargin,
1482
+ popupClass: 'k-popup-transparent',
1483
+ collision: { horizontal: 'fit', vertical: 'fit' }
1484
+ });
1485
+ this.applySettings(this.popupRef.content, popoverComp, anchor);
1486
+ this.monitorPopup();
1487
+ this.initializeCompletionEvents(popoverComp, _anchor);
1488
+ }
1489
+ /**
1490
+ * @hidden
1491
+ */
1492
+ isPrevented(anchorElement, show) {
1493
+ const popoverComp = this.popover instanceof PopoverComponent ? this.popover : this.popover(anchorElement);
1494
+ let eventArgs;
1495
+ // eslint-disable-next-line prefer-const
1496
+ eventArgs = this.initializeEvents(popoverComp, eventArgs, show, anchorElement);
1497
+ return eventArgs.isDefaultPrevented();
1498
+ }
1499
+ /**
1500
+ * @hidden
1501
+ */
1502
+ monitorPopup() {
1503
+ if (this.showOn === 'hover') {
1504
+ this.ngZone.runOutsideAngular(() => {
1505
+ const popup = this.popupRef.popupElement;
1506
+ this.disposePopupHoverInListener = this.renderer.listen(popup, 'mouseenter', _ => {
1507
+ this.ngZone.run(_ => this._popoverService.emitPopoverState(true));
1508
+ });
1509
+ this.disposePopupHoverOutListener = this.renderer.listen(popup, 'mouseleave', _ => {
1510
+ this.ngZone.run(_ => this._popoverService.emitPopoverState(false));
1511
+ });
1512
+ });
1513
+ }
1514
+ if (this.showOn === 'focus') {
1515
+ this.ngZone.runOutsideAngular(() => {
1516
+ const popup = this.popupRef.popupElement;
1517
+ this.disposePopupFocusOutListener = this.renderer.listen(popup, 'focusout', (e) => {
1518
+ const isInsidePopover = closest(e.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
1519
+ if (!isInsidePopover) {
1520
+ this.ngZone.run(_ => this._popoverService.emitFocusInsidePopover(false));
1521
+ }
1522
+ });
1523
+ });
1524
+ }
1525
+ }
1526
+ applySettings(contentComponent, popover, anchor) {
1527
+ const content = contentComponent.instance;
1528
+ const _anchor = anchor instanceof ElementRef ? anchor.nativeElement : anchor;
1529
+ content.visible = true;
1530
+ content.anchor = _anchor;
1531
+ content.position = popover.position;
1532
+ content.offset = popover.offset;
1533
+ content.width = popover.width;
1534
+ content.height = popover.height;
1535
+ content.title = popover.title;
1536
+ content.body = popover.body;
1537
+ content.callout = popover.callout;
1538
+ content.animation = popover.animation;
1539
+ content.contextData = popover.templateData(_anchor);
1540
+ content.titleTemplate = popover.titleTemplate;
1541
+ content.bodyTemplate = popover.bodyTemplate;
1542
+ content.actionsTemplate = popover.actionsTemplate;
1543
+ this.popupRef.content.changeDetectorRef.detectChanges();
1544
+ }
1545
+ /**
1546
+ * @hidden
1547
+ */
1548
+ initializeEvents(popoverComp, eventArgs, show, anchorElement) {
1549
+ if (show) {
1550
+ eventArgs = new PopoverShowEvent(anchorElement);
1551
+ if (this.shouldEmitEvent(!!this.popupRef, 'show', popoverComp)) {
1552
+ this.ngZone.run(() => popoverComp.show.emit(eventArgs));
1553
+ }
1554
+ }
1555
+ else {
1556
+ eventArgs = new PopoverHideEvent(anchorElement, this.popupRef);
1557
+ if (this.shouldEmitEvent(!!this.popupRef, 'hide', popoverComp)) {
1558
+ this.ngZone.run(() => popoverComp.hide.emit(eventArgs));
1559
+ }
1560
+ }
1561
+ return eventArgs;
1562
+ }
1563
+ initializeCompletionEvents(popoverComp, _anchor) {
1564
+ if (this.shouldEmitCompletionEvents('shown', popoverComp)) {
1565
+ this.popupRef.popupOpen.subscribe(() => {
1566
+ const eventArgs = new PopoverShownEvent(_anchor, this.popupRef);
1567
+ popoverComp.shown.emit(eventArgs);
1568
+ });
1569
+ }
1570
+ if (this.shouldEmitCompletionEvents('hidden', popoverComp)) {
1571
+ this.popupRef.popupClose.subscribe(() => {
1572
+ this.ngZone.run(_ => {
1573
+ const eventArgs = new PopoverHiddenEvent(_anchor);
1574
+ popoverComp.hidden.emit(eventArgs);
1575
+ });
1576
+ });
1577
+ }
1578
+ }
1579
+ shouldEmitEvent(hasPopup, event, popoverComp) {
1580
+ if ((event === 'show' && !hasPopup && hasObservers(popoverComp[event]))
1581
+ || (event === 'hide' && hasPopup && hasObservers(popoverComp[event]))) {
1582
+ return true;
1583
+ }
1584
+ return false;
1585
+ }
1586
+ shouldEmitCompletionEvents(event, popoverComp) {
1587
+ if ((hasObservers(popoverComp[event]) && !this._popupOpenSub)
1588
+ || (hasObservers(popoverComp[event]) && !this._popupCloseSub)) {
1589
+ return true;
1590
+ }
1591
+ return false;
1592
+ }
1593
+ }
1594
+ PopoverDirectivesBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverDirectivesBase, deps: [{ token: i0.NgZone }, { token: i1$1.PopupService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1595
+ PopoverDirectivesBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PopoverDirectivesBase, inputs: { popover: "popover", showOn: "showOn" }, ngImport: i0 });
1596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverDirectivesBase, decorators: [{
1597
+ type: Directive,
1598
+ args: [{}]
1599
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.PopupService }, { type: i0.Renderer2 }]; }, propDecorators: { popover: [{
1600
+ type: Input
1601
+ }], showOn: [{
1602
+ type: Input
1603
+ }] } });
1604
+
1605
+ /**
1606
+ * @hidden
1607
+ */
1608
+ class PopoverService {
1609
+ constructor(ngZone) {
1610
+ this.ngZone = ngZone;
1611
+ this._pointerOverPopup = new BehaviorSubject(null);
1612
+ this._pointerOverAnchor = new BehaviorSubject(null);
1613
+ this._focusInsidePopover = new BehaviorSubject(null);
1614
+ this._hidePopover = new Subject();
1615
+ this.subs = new Subscription();
1616
+ this.monitor();
1617
+ }
1618
+ ngOnDestroy() {
1619
+ this.subs.unsubscribe();
1620
+ }
1621
+ get isPopoverHovered() {
1622
+ return this._pointerOverPopup.asObservable();
1623
+ }
1624
+ emitPopoverState(isHovered) {
1625
+ this.ngZone.run(_ => this._pointerOverPopup.next(isHovered));
1626
+ }
1627
+ get isAnchorHovered() {
1628
+ return this._pointerOverAnchor.asObservable();
1629
+ }
1630
+ emitAnchorState(isHovered, anchor) {
1631
+ this._isOrigin = this.originAnchor === anchor;
1632
+ this.currentAnchor = anchor;
1633
+ if (isHovered) {
1634
+ this.originAnchor = anchor;
1635
+ }
1636
+ this.ngZone.run(_ => this._pointerOverAnchor.next(isHovered));
1637
+ }
1638
+ get isFocusInsidePopover() {
1639
+ return this._focusInsidePopover.asObservable();
1640
+ }
1641
+ emitFocusInsidePopover(isFocused) {
1642
+ this.ngZone.run(_ => this._focusInsidePopover.next(isFocused));
1643
+ this._focusInsidePopover.next(null);
1644
+ }
1645
+ get hidePopover() {
1646
+ return this._hidePopover.asObservable();
1647
+ }
1648
+ monitor() {
1649
+ this.subs.add(combineLatest(this.isPopoverHovered, this.isAnchorHovered).pipe(
1650
+ // `auditTime` is used because the `mouseleave` event is emitted before `mouseenter`
1651
+ // i.e. there is a millisecond in which the pointer leaves the first target (e.g. anchor) and hasn't reached the second one (e.g. popup)
1652
+ // resulting in both observables emitting `false`
1653
+ auditTime(20)).subscribe(val => {
1654
+ const [isPopoverHovered, isAnchorHovered] = val;
1655
+ this._hidePopover.next([isPopoverHovered, isAnchorHovered, this._isOrigin, this.currentAnchor]);
1656
+ }));
1657
+ }
1658
+ }
1659
+ PopoverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
1660
+ PopoverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverService });
1661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverService, decorators: [{
1662
+ type: Injectable
1663
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
1664
+
1665
+ /**
1666
+ * Represents the [`kendoPopoverContainer`]({% slug configuration_popover %}#toc-containerdirective) directive.
1667
+ * It is used to filter and target multiple elements, which should display a popover on interaction.
1668
+ *
1669
+ * @example
1670
+ * ```ts-no-run
1671
+ * <div kendoPopoverContainer [popover]="myPopover" filter=".has-popover">
1672
+ * <button class="has-popover">Show Popover</button>
1673
+ * <button>Button Without Popover</button>
1674
+ * <button class="has-popover">Show Popover</button>
1675
+ * </div>
1676
+ * ```
1677
+ */
1678
+ class PopoverContainerDirective extends PopoverDirectivesBase {
1679
+ constructor(wrapperEl, ngZone, popupService, renderer, popoverService) {
1680
+ super(ngZone, popupService, renderer);
1681
+ this.wrapperEl = wrapperEl;
1682
+ this.ngZone = ngZone;
1683
+ this.popupService = popupService;
1684
+ this.renderer = renderer;
1685
+ this.popoverService = popoverService;
1686
+ this.mouseenterHandler = (anchor) => {
1687
+ this.controlVisibility(anchor, true);
1688
+ };
1689
+ this.mouseleaveHandler = (args) => {
1690
+ const anchor = args.anchor;
1691
+ if (this.isPrevented(anchor, false)) {
1692
+ return;
1693
+ }
1694
+ if (!this._hideSub) {
1695
+ this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
1696
+ const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
1697
+ if (!isPopoverHovered && !isOriginAnchor) {
1698
+ this.hide();
1699
+ if (!isOriginAnchor && currentAnchor) {
1700
+ this.show(currentAnchor);
1701
+ }
1702
+ }
1703
+ });
1704
+ }
1705
+ };
1706
+ this.focusHandler = (anchor) => {
1707
+ this.controlVisibility(anchor, true);
1708
+ };
1709
+ this.blurHandler = (args) => {
1710
+ const anchor = args.anchor;
1711
+ const event = args.domEvent;
1712
+ if (this.isPrevented(anchor, false)) {
1713
+ return;
1714
+ }
1715
+ // from anchor to popup focus check
1716
+ const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
1717
+ if (!isFocusInside) {
1718
+ this.hide();
1719
+ }
1720
+ if (!this._focusInsideSub) {
1721
+ // inside popup focus check
1722
+ this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
1723
+ if (!val && !isFocusInside) {
1724
+ this.hide();
1725
+ }
1726
+ });
1727
+ }
1728
+ };
1729
+ this._popoverService = this.popoverService;
1730
+ }
1731
+ /**
1732
+ * Shows the Popover.
1733
+ *
1734
+ * @param anchor&mdash;Specifies the element that will be used as an anchor. The Popover opens relative to that element. [See example]({% slug programmaticcontrol_popover %})
1735
+ */
1736
+ show(anchor) {
1737
+ if (this.popupRef) {
1738
+ return;
1739
+ }
1740
+ this.ngZone.run(() => {
1741
+ this.openPopup(anchor);
1742
+ });
1743
+ this.popupRef.popupAnchorViewportLeave
1744
+ .pipe(take(1))
1745
+ .subscribe(() => this.hide());
1746
+ }
1747
+ /**
1748
+ * Toggles the visibility of the Popover. [See example]({% slug programmaticcontrol_popover %})
1749
+ *
1750
+ * @param anchor&mdash;Specifies the element that will be used as an anchor. The Popover opens relative to that element.
1751
+ */
1752
+ toggle(anchor) {
1753
+ const previousAnchor = this.popupRef && this.popupRef.content.instance.anchor;
1754
+ if (this.popupRef) {
1755
+ this.hide();
1756
+ if (previousAnchor !== anchor) {
1757
+ this.show(anchor);
1758
+ }
1759
+ }
1760
+ else {
1761
+ this.show(anchor);
1762
+ }
1763
+ }
1764
+ subscribeClick() {
1765
+ if (this.disposeClickListener) {
1766
+ this.disposeClickListener();
1767
+ }
1768
+ this.disposeClickListener = this.renderer.listen(document, 'click', (e) => {
1769
+ const filterElement = closestBySelector(e.target, this.filter);
1770
+ this.clickHandler(filterElement, e);
1771
+ });
1772
+ }
1773
+ subscribeToEvents(arr) {
1774
+ const filteredElements = Array.from(document.querySelectorAll(this.filter));
1775
+ filteredElements.forEach((el) => {
1776
+ this.subs.add(this.renderer.listen(el, arr[0].name, () => {
1777
+ this.popoverService.emitAnchorState(true, el);
1778
+ arr[0].handler(el);
1779
+ }));
1780
+ this.subs.add(this.renderer.listen(el, arr[1].name, (e) => {
1781
+ this.popoverService.emitAnchorState(false, null);
1782
+ arr[1].handler({ anchor: el, domEvent: e });
1783
+ }));
1784
+ });
1785
+ }
1786
+ clickHandler(anchor, event) {
1787
+ const isInsidePopup = !!closest(event.target, (node) => node.classList && node.classList.contains('k-popup'));
1788
+ const popupRefAnchor = this.popupRef && this.popupRef.content.instance.anchor;
1789
+ const isOriginAnchor = !!closest(event.target, (node) => node === (popupRefAnchor ? popupRefAnchor : anchor));
1790
+ if (this.showOn !== 'click' || isInsidePopup || (this.popupRef && isOriginAnchor)) {
1791
+ return;
1792
+ }
1793
+ if (!anchor && this.popupRef) {
1794
+ this.controlVisibility(anchor, false);
1795
+ return;
1796
+ }
1797
+ if (isOriginAnchor) {
1798
+ this.controlVisibility(anchor, true);
1799
+ }
1800
+ else if (this.popupRef) {
1801
+ this.controlVisibility(anchor, false);
1802
+ this.controlVisibility(anchor, true);
1803
+ }
1804
+ }
1805
+ controlVisibility(anchor, show) {
1806
+ if (this.isPrevented(anchor, show)) {
1807
+ return;
1808
+ }
1809
+ if (show) {
1810
+ this.show(anchor);
1811
+ }
1812
+ else {
1813
+ this.hide();
1814
+ }
1815
+ }
1816
+ }
1817
+ PopoverContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverContainerDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1$1.PopupService }, { token: i0.Renderer2 }, { token: PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
1818
+ PopoverContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PopoverContainerDirective, selector: "[kendoPopoverContainer]", inputs: { filter: "filter" }, providers: [PopoverService], exportAs: ["kendoPopoverContainer"], usesInheritance: true, ngImport: i0 });
1819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverContainerDirective, decorators: [{
1820
+ type: Directive,
1821
+ args: [{
1822
+ selector: '[kendoPopoverContainer]',
1823
+ exportAs: 'kendoPopoverContainer',
1824
+ providers: [PopoverService]
1825
+ }]
1826
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$1.PopupService }, { type: i0.Renderer2 }, { type: PopoverService }]; }, propDecorators: { filter: [{
1827
+ type: Input
1828
+ }] } });
1829
+
1830
+ /**
1831
+ * Represents the [`kendoPopoverAnchor`]({% slug configuration_popover %}#toc-anchordirective) directive.
1832
+ * It is used to target an element, which should display a popover on interaction.
1833
+ *
1834
+ * @example
1835
+ * ```ts-no-run
1836
+ * <button kendoPopoverAnchor [popover]="myPopover">Show Popover</button>
1837
+ * ```
1838
+ */
1839
+ class PopoverAnchorDirective extends PopoverDirectivesBase {
1840
+ constructor(hostEl, ngZone, popupService, renderer, popoverService) {
1841
+ super(ngZone, popupService, renderer);
1842
+ this.hostEl = hostEl;
1843
+ this.ngZone = ngZone;
1844
+ this.popupService = popupService;
1845
+ this.renderer = renderer;
1846
+ this.popoverService = popoverService;
1847
+ this.mouseenterHandler = () => {
1848
+ this.controlVisibility(this.hostEl.nativeElement, true);
1849
+ };
1850
+ this.mouseleaveHandler = () => {
1851
+ if (this.isPrevented(this.hostEl.nativeElement, false)) {
1852
+ return;
1853
+ }
1854
+ if (!this._hideSub) {
1855
+ this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
1856
+ const [isPopoverHovered, isAnchorHovered] = val;
1857
+ if (!isPopoverHovered && !isAnchorHovered) {
1858
+ this.hide();
1859
+ }
1860
+ });
1861
+ }
1862
+ };
1863
+ this.focusHandler = () => {
1864
+ this.controlVisibility(this.hostEl.nativeElement, true);
1865
+ };
1866
+ this.blurHandler = (args) => {
1867
+ const event = args.domEvent;
1868
+ if (this.isPrevented(this.hostEl.nativeElement, false)) {
1869
+ return;
1870
+ }
1871
+ // from anchor to popup focus check
1872
+ const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
1873
+ if (!isFocusInside) {
1874
+ this.hide();
1875
+ }
1876
+ if (!this._focusInsideSub) {
1877
+ // inside popup focus check
1878
+ this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
1879
+ if (!val) {
1880
+ this.hide();
1881
+ }
1882
+ });
1883
+ }
1884
+ };
1885
+ this._popoverService = this.popoverService;
1886
+ }
1887
+ /**
1888
+ * Shows the Popover. [See example]({% slug programmaticcontrol_popover %})
1889
+ */
1890
+ show() {
1891
+ if (this.popupRef) {
1892
+ return;
1893
+ }
1894
+ this.ngZone.run(() => {
1895
+ this.openPopup(this.hostEl);
1896
+ });
1897
+ this.popupRef.popupAnchorViewportLeave
1898
+ .pipe(take(1))
1899
+ .subscribe(() => this.hide());
1900
+ }
1901
+ /**
1902
+ * Toggles the visibility of the Popover. [See example]({% slug programmaticcontrol_popover %})
1903
+ */
1904
+ toggle() {
1905
+ if (this.popupRef) {
1906
+ this.hide();
1907
+ }
1908
+ else {
1909
+ this.show();
1910
+ }
1911
+ }
1912
+ subscribeToEvents(arr) {
1913
+ this.subs.add(this.renderer.listen(this.hostEl.nativeElement, arr[0].name, () => {
1914
+ this.popoverService.emitAnchorState(true, this.hostEl.nativeElement);
1915
+ arr[0].handler();
1916
+ }));
1917
+ this.subs.add(this.renderer.listen(this.hostEl.nativeElement, arr[1].name, (e) => {
1918
+ this.popoverService.emitAnchorState(false, null);
1919
+ arr[1].handler({ domEvent: e });
1920
+ }));
1921
+ }
1922
+ subscribeClick() {
1923
+ if (this.disposeClickListener) {
1924
+ this.disposeClickListener();
1925
+ }
1926
+ this.disposeClickListener = this.renderer.listen(document, 'click', (e) => {
1927
+ this.onClick(e);
1928
+ });
1929
+ }
1930
+ /**
1931
+ * @hidden
1932
+ */
1933
+ onClick(event) {
1934
+ const isInsidePopup = !!closest(event.target, (node) => node.classList && node.classList.contains('k-popup'));
1935
+ const isAnchor = !!closest(event.target, (node) => node === this.hostEl.nativeElement);
1936
+ if (isInsidePopup || (this.popupRef && isAnchor)) {
1937
+ return;
1938
+ }
1939
+ if (isAnchor) {
1940
+ // on opening
1941
+ this.controlVisibility(this.hostEl.nativeElement, true);
1942
+ }
1943
+ else {
1944
+ // on closing
1945
+ this.controlVisibility(this.hostEl.nativeElement, false);
1946
+ }
1947
+ }
1948
+ controlVisibility(anchor, show) {
1949
+ if (this.isPrevented(anchor, show)) {
1950
+ return;
1951
+ }
1952
+ if (show) {
1953
+ this.show();
1954
+ }
1955
+ else {
1956
+ this.hide();
1957
+ }
1958
+ }
1959
+ }
1960
+ PopoverAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1$1.PopupService }, { token: i0.Renderer2 }, { token: PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
1961
+ PopoverAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PopoverAnchorDirective, selector: "[kendoPopoverAnchor]", providers: [PopoverService], exportAs: ["kendoPopoverAnchor"], usesInheritance: true, ngImport: i0 });
1962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
1963
+ type: Directive,
1964
+ args: [{
1965
+ selector: '[kendoPopoverAnchor]',
1966
+ exportAs: 'kendoPopoverAnchor',
1967
+ providers: [PopoverService]
1968
+ }]
1969
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$1.PopupService }, { type: i0.Renderer2 }, { type: PopoverService }]; } });
1970
+
1971
+ const COMPONENT_DIRECTIVES = [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective];
1972
+ const COMPONENT_MODULES = [PopupModule];
1973
+ /**
1974
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
1975
+ * definition for the Tooltip component.
1976
+ *
1977
+ * The package exports:
1978
+ * - `KendoTooltipDirective`&mdash;The Tooltip directive class.
1979
+ *
1980
+ * @example
1981
+ *
1982
+ * ```ts-no-run
1983
+ * // Import the Tooltip module
1984
+ * import { TooltipModule } from '@progress/kendo-angular-tooltip';
1985
+ *
1986
+ * // The browser platform with a compiler
1987
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1988
+ *
1989
+ * import { NgModule } from '@angular/core';
1990
+ *
1991
+ * // Import the app component
1992
+ * _@NgModule{{
1993
+ * declarations: [AppComponent], // declare app component
1994
+ * imports: [BrowserModule, TooltipModule], // import TooltipModule module
1995
+ * bootstrap: [AppComponent]
1996
+ * }}
1997
+ * export class AppModule {}
1998
+ *
1999
+ * // Compile and launch the module
2000
+ * platformBrowserDynamic().bootstrapModule(AppModule);
2001
+ * ```
2002
+ */
2003
+ class TooltipModule {
2004
+ }
2005
+ TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2006
+ TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipModule, declarations: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective], imports: [CommonModule, PopupModule], exports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective] });
2007
+ TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipModule, imports: [[CommonModule, ...COMPONENT_MODULES]] });
2008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipModule, decorators: [{
2009
+ type: NgModule,
2010
+ args: [{
2011
+ declarations: [COMPONENT_DIRECTIVES],
2012
+ entryComponents: [TooltipContentComponent],
2013
+ imports: [CommonModule, ...COMPONENT_MODULES],
2014
+ exports: [COMPONENT_DIRECTIVES]
2015
+ }]
2016
+ }] });
2017
+
2018
+ const DIRECTIVES = [
2019
+ PopoverActionsTemplateDirective,
2020
+ PopoverBodyTemplateDirective,
2021
+ PopoverTitleTemplateDirective,
2022
+ PopoverAnchorDirective,
2023
+ PopoverContainerDirective
2024
+ ];
2025
+ /**
2026
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
2027
+ * definition for the Popover component.
2028
+ *
2029
+ * @example
2030
+ *
2031
+ * ```ts-no-run
2032
+ * import { PopoverModule } from '@progress/kendo-angular-tooltip';
2033
+ *
2034
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2035
+ * import { NgModule } from '@angular/core';
2036
+ *
2037
+ * import { AppComponent } from './app.component';
2038
+ *
2039
+ * _@NgModule({
2040
+ * declarations: [AppComponent],
2041
+ * imports: [BrowserModule, PopoverModule],
2042
+ * bootstrap: [AppComponent]
2043
+ * })
2044
+ * export class AppModule {}
2045
+ *
2046
+ * platformBrowserDynamic().bootstrapModule(AppModule);
2047
+ *
2048
+ * ```
2049
+ */
2050
+ class PopoverModule {
2051
+ }
2052
+ PopoverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2053
+ PopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverModule, declarations: [PopoverActionsTemplateDirective,
2054
+ PopoverBodyTemplateDirective,
2055
+ PopoverTitleTemplateDirective,
2056
+ PopoverAnchorDirective,
2057
+ PopoverContainerDirective, PopoverComponent], imports: [CommonModule,
2058
+ PopupModule], exports: [PopoverActionsTemplateDirective,
2059
+ PopoverBodyTemplateDirective,
2060
+ PopoverTitleTemplateDirective,
2061
+ PopoverAnchorDirective,
2062
+ PopoverContainerDirective, PopoverComponent] });
2063
+ PopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverModule, imports: [[
2064
+ CommonModule,
2065
+ PopupModule
2066
+ ]] });
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PopoverModule, decorators: [{
2068
+ type: NgModule,
2069
+ args: [{
2070
+ declarations: [
2071
+ ...DIRECTIVES,
2072
+ PopoverComponent
2073
+ ],
2074
+ entryComponents: [PopoverComponent],
2075
+ exports: [...DIRECTIVES, PopoverComponent],
2076
+ imports: [
2077
+ CommonModule,
2078
+ PopupModule
2079
+ ]
2080
+ }]
2081
+ }] });
2082
+
2083
+ /**
2084
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
2085
+ * definition for the Tooltips components.
2086
+ *
2087
+ * @example
2088
+ *
2089
+ * ```ts-no-run
2090
+ * import { TooltipsModule } from '@progress/kendo-angular-tooltip';
2091
+ *
2092
+ * // The browser platform with a compiler
2093
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2094
+ *
2095
+ * import { NgModule } from '@angular/core';
2096
+ *
2097
+ * // Import the app component
2098
+ * _@NgModule{{
2099
+ * declarations: [AppComponent], // declare app component
2100
+ * imports: [BrowserModule, TooltipsModule], // import TooltipsModule module
2101
+ * bootstrap: [AppComponent]
2102
+ * }}
2103
+ * export class AppModule {}
2104
+ *
2105
+ * // Compile and launch the module
2106
+ * platformBrowserDynamic().bootstrapModule(AppModule);
2107
+ * ```
2108
+ */
2109
+ class TooltipsModule {
2110
+ }
2111
+ TooltipsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2112
+ TooltipsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipsModule, exports: [TooltipModule, PopoverModule] });
2113
+ TooltipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipsModule, imports: [TooltipModule, PopoverModule] });
2114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipsModule, decorators: [{
2115
+ type: NgModule,
2116
+ args: [{
2117
+ exports: [TooltipModule, PopoverModule]
2118
+ }]
2119
+ }] });
2120
+
2121
+ // Tooltip
2122
+
2123
+ /**
2124
+ * Generated bundle index. Do not edit.
2125
+ */
2126
+
2127
+ export { LocalizedMessagesDirective, PopoverActionsTemplateDirective, PopoverAnchorDirective, PopoverBodyTemplateDirective, PopoverComponent, PopoverContainerDirective, PopoverHiddenEvent, PopoverHideEvent, PopoverModule, PopoverShowEvent, PopoverShownEvent, PopoverTitleTemplateDirective, TOOLTIP_SETTINGS, TooltipContentComponent, TooltipDirective, TooltipModule, TooltipSettings, TooltipsModule };
2128
+