@progress/kendo-angular-tooltip 17.0.0-develop.3 → 17.0.0-develop.31
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.
- package/README.md +32 -32
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +13 -8
- package/{esm2020 → esm2022}/models/events.mjs +24 -0
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/popover/anchor.directive.mjs +46 -41
- package/{esm2020 → esm2022}/popover/container.directive.mjs +58 -46
- package/{esm2020 → esm2022}/popover/directives-base.mjs +31 -14
- package/{esm2020 → esm2022}/popover/popover.component.mjs +145 -86
- package/{esm2020 → esm2022}/popover/popover.service.mjs +12 -8
- package/{esm2020 → esm2022}/popover/template-directives/actions-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/popover/template-directives/body-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/popover/template-directives/title-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/popover.module.mjs +4 -4
- package/{esm2020 → esm2022}/tooltip/tooltip.content.component.mjs +66 -48
- package/{esm2020 → esm2022}/tooltip/tooltip.directive.mjs +116 -62
- package/{esm2020 → esm2022}/tooltip/tooltip.settings.mjs +40 -3
- package/{esm2020 → esm2022}/tooltip.module.mjs +4 -4
- package/{esm2020 → esm2022}/tooltips.module.mjs +4 -4
- package/{fesm2020 → fesm2022}/progress-kendo-angular-tooltip.mjs +579 -341
- package/localization/localized-messages.directive.d.ts +1 -1
- package/models/animation.model.d.ts +1 -1
- package/models/functions.model.d.ts +2 -2
- package/models/popover-show-option.type.d.ts +1 -1
- package/models/position.type.d.ts +1 -1
- package/models/show.option.type.d.ts +1 -1
- package/package.json +14 -20
- package/popover/container.directive.d.ts +1 -1
- package/popover/directives-base.d.ts +1 -1
- package/popover/popover.component.d.ts +1 -1
- package/tooltip/tooltip.content.component.d.ts +1 -1
- package/tooltip/tooltip.directive.d.ts +1 -1
- package/fesm2015/progress-kendo-angular-tooltip.mjs +0 -2312
- /package/{esm2020 → esm2022}/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/animation.model.mjs +0 -0
- /package/{esm2020 → esm2022}/models/functions.model.mjs +0 -0
- /package/{esm2020 → esm2022}/models/popover-show-option.type.mjs +0 -0
- /package/{esm2020 → esm2022}/models/position.type.mjs +0 -0
- /package/{esm2020 → esm2022}/models/show.option.type.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-tooltip.mjs +0 -0
- /package/{esm2020 → esm2022}/utils.mjs +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { forwardRef, Directive, Input, Optional,
|
|
6
|
+
import { forwardRef, Directive, Input, Optional, isDevMode, EventEmitter, Component, HostBinding, Output, ViewChild, ContentChild, ElementRef, Injectable, InjectionToken, Inject, NgModule } from '@angular/core';
|
|
7
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { PreventableEvent, focusableSelector, Keys, isDocumentAvailable, closest, hasObservers, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
@@ -20,19 +20,24 @@ import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icon
|
|
|
20
20
|
* @hidden
|
|
21
21
|
*/
|
|
22
22
|
class LocalizedMessagesDirective extends ComponentMessages {
|
|
23
|
+
service;
|
|
24
|
+
/**
|
|
25
|
+
* The title of the close button.
|
|
26
|
+
*/
|
|
27
|
+
closeTitle;
|
|
23
28
|
constructor(service) {
|
|
24
29
|
super();
|
|
25
30
|
this.service = service;
|
|
26
31
|
}
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTooltipLocalizedMessages]", inputs: { closeTitle: "closeTitle" }, providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: ComponentMessages,
|
|
36
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
37
|
+
}
|
|
38
|
+
], usesInheritance: true, ngImport: i0 });
|
|
27
39
|
}
|
|
28
|
-
|
|
29
|
-
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTooltipLocalizedMessages]", inputs: { closeTitle: "closeTitle" }, providers: [
|
|
30
|
-
{
|
|
31
|
-
provide: ComponentMessages,
|
|
32
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
33
|
-
}
|
|
34
|
-
], usesInheritance: true, ngImport: i0 });
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
36
41
|
type: Directive,
|
|
37
42
|
args: [{
|
|
38
43
|
providers: [
|
|
@@ -62,6 +67,10 @@ const ERRORS = {
|
|
|
62
67
|
* to be opened. If you cancel the event, the opening is prevented.
|
|
63
68
|
*/
|
|
64
69
|
class PopoverShowEvent extends PreventableEvent {
|
|
70
|
+
/**
|
|
71
|
+
* The host element related to the popover.
|
|
72
|
+
*/
|
|
73
|
+
anchor;
|
|
65
74
|
/**
|
|
66
75
|
* @hidden
|
|
67
76
|
* Constructs the event arguments for the `show` event.
|
|
@@ -77,6 +86,14 @@ class PopoverShowEvent extends PreventableEvent {
|
|
|
77
86
|
* to be closed. If you cancel the event, the popover stays open.
|
|
78
87
|
*/
|
|
79
88
|
class PopoverHideEvent extends PreventableEvent {
|
|
89
|
+
/**
|
|
90
|
+
* The host element related to the popover.
|
|
91
|
+
*/
|
|
92
|
+
anchor;
|
|
93
|
+
/**
|
|
94
|
+
* The popover element.
|
|
95
|
+
*/
|
|
96
|
+
popover;
|
|
80
97
|
/**
|
|
81
98
|
* @hidden
|
|
82
99
|
* Constructs the event arguments for the `hide` event.
|
|
@@ -93,6 +110,14 @@ class PopoverHideEvent extends PreventableEvent {
|
|
|
93
110
|
* Arguments for the `shown` event. The `shown` event fires after the popover has opened and its opening animation has finished.
|
|
94
111
|
*/
|
|
95
112
|
class PopoverShownEvent {
|
|
113
|
+
/**
|
|
114
|
+
* The host element related to the popover.
|
|
115
|
+
*/
|
|
116
|
+
anchor;
|
|
117
|
+
/**
|
|
118
|
+
* The popover element.
|
|
119
|
+
*/
|
|
120
|
+
popover;
|
|
96
121
|
/**
|
|
97
122
|
* @hidden
|
|
98
123
|
* Constructs the event arguments for the `shown` event.
|
|
@@ -108,6 +133,10 @@ class PopoverShownEvent {
|
|
|
108
133
|
* Arguments for the `hidden` event. The `hidden` event fires after the popover has closed and its closing animation has finished.
|
|
109
134
|
*/
|
|
110
135
|
class PopoverHiddenEvent {
|
|
136
|
+
/**
|
|
137
|
+
* The host element related to the popover.
|
|
138
|
+
*/
|
|
139
|
+
anchor;
|
|
111
140
|
/**
|
|
112
141
|
* @hidden
|
|
113
142
|
* Constructs the event arguments for the `hidden` event.
|
|
@@ -274,8 +303,8 @@ const packageMetadata = {
|
|
|
274
303
|
name: '@progress/kendo-angular-tooltip',
|
|
275
304
|
productName: 'Kendo UI for Angular',
|
|
276
305
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
277
|
-
publishDate:
|
|
278
|
-
version: '17.0.0-develop.
|
|
306
|
+
publishDate: 1730478748,
|
|
307
|
+
version: '17.0.0-develop.31',
|
|
279
308
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
280
309
|
};
|
|
281
310
|
|
|
@@ -286,13 +315,14 @@ const packageMetadata = {
|
|
|
286
315
|
* with the `kendoPopoverTitleTemplate` directive inside the `<kendo-popover>` tag.
|
|
287
316
|
*/
|
|
288
317
|
class PopoverTitleTemplateDirective {
|
|
318
|
+
templateRef;
|
|
289
319
|
constructor(templateRef) {
|
|
290
320
|
this.templateRef = templateRef;
|
|
291
321
|
}
|
|
322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverTitleTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
323
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverTitleTemplateDirective, isStandalone: true, selector: "[kendoPopoverTitleTemplate]", ngImport: i0 });
|
|
292
324
|
}
|
|
293
|
-
|
|
294
|
-
PopoverTitleTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverTitleTemplateDirective, isStandalone: true, selector: "[kendoPopoverTitleTemplate]", ngImport: i0 });
|
|
295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverTitleTemplateDirective, decorators: [{
|
|
325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverTitleTemplateDirective, decorators: [{
|
|
296
326
|
type: Directive,
|
|
297
327
|
args: [{
|
|
298
328
|
selector: '[kendoPopoverTitleTemplate]',
|
|
@@ -309,13 +339,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
309
339
|
* with the `kendoPopoverBodyTemplate` directive inside the `<kendo-popover>` tag.
|
|
310
340
|
*/
|
|
311
341
|
class PopoverBodyTemplateDirective {
|
|
342
|
+
templateRef;
|
|
312
343
|
constructor(templateRef) {
|
|
313
344
|
this.templateRef = templateRef;
|
|
314
345
|
}
|
|
346
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverBodyTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
347
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverBodyTemplateDirective, isStandalone: true, selector: "[kendoPopoverBodyTemplate]", ngImport: i0 });
|
|
315
348
|
}
|
|
316
|
-
|
|
317
|
-
PopoverBodyTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverBodyTemplateDirective, isStandalone: true, selector: "[kendoPopoverBodyTemplate]", ngImport: i0 });
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverBodyTemplateDirective, decorators: [{
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverBodyTemplateDirective, decorators: [{
|
|
319
350
|
type: Directive,
|
|
320
351
|
args: [{
|
|
321
352
|
selector: '[kendoPopoverBodyTemplate]',
|
|
@@ -332,13 +363,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
332
363
|
* with the `kendoPopoverActionsTemplate` directive inside the `<kendo-popover>` tag.
|
|
333
364
|
*/
|
|
334
365
|
class PopoverActionsTemplateDirective {
|
|
366
|
+
templateRef;
|
|
335
367
|
constructor(templateRef) {
|
|
336
368
|
this.templateRef = templateRef;
|
|
337
369
|
}
|
|
370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverActionsTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
371
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverActionsTemplateDirective, isStandalone: true, selector: "[kendoPopoverActionsTemplate]", ngImport: i0 });
|
|
338
372
|
}
|
|
339
|
-
|
|
340
|
-
PopoverActionsTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverActionsTemplateDirective, isStandalone: true, selector: "[kendoPopoverActionsTemplate]", ngImport: i0 });
|
|
341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverActionsTemplateDirective, decorators: [{
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverActionsTemplateDirective, decorators: [{
|
|
342
374
|
type: Directive,
|
|
343
375
|
args: [{
|
|
344
376
|
selector: '[kendoPopoverActionsTemplate]',
|
|
@@ -363,82 +395,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
363
395
|
* ```
|
|
364
396
|
*/
|
|
365
397
|
class PopoverComponent {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
* @default true
|
|
385
|
-
*/
|
|
386
|
-
this.callout = true;
|
|
387
|
-
/**
|
|
388
|
-
* Enables and configures the Popover animation. [See example]({% slug animations_popover %})
|
|
389
|
-
*
|
|
390
|
-
* The possible options are:
|
|
391
|
-
*
|
|
392
|
-
* * `boolean`—Enables the default animation
|
|
393
|
-
* * `PopoverAnimation`—A configuration object which allows setting the `direction`, `duration` and `type` of the animation.
|
|
394
|
-
*
|
|
395
|
-
* @default false
|
|
396
|
-
*/
|
|
397
|
-
this.animation = false;
|
|
398
|
-
/**
|
|
399
|
-
* @hidden
|
|
400
|
-
* Determines the visibility of the Popover.
|
|
401
|
-
*/
|
|
402
|
-
this.visible = false;
|
|
403
|
-
/**
|
|
404
|
-
* Fires before the Popover is about to be shown ([see example]({% slug events_popover %})).
|
|
405
|
-
* The event is preventable. If canceled, the Popover will not be displayed. [See example]({% slug events_popover %})
|
|
406
|
-
*/
|
|
407
|
-
this.show = new EventEmitter();
|
|
408
|
-
/**
|
|
409
|
-
* Fires after the Popover has been shown and the animation has ended. [See example]({% slug events_popover %})
|
|
410
|
-
*/
|
|
411
|
-
this.shown = new EventEmitter();
|
|
412
|
-
/**
|
|
413
|
-
* Fires when the Popover is about to be hidden ([see example]({% slug events_popover %})).
|
|
414
|
-
* The event is preventable. If canceled, the Popover will remain visible.
|
|
415
|
-
*/
|
|
416
|
-
this.hide = new EventEmitter();
|
|
417
|
-
/**
|
|
418
|
-
* Fires after the Popover has been hidden and the animation has ended. [See example]({% slug events_popover %})
|
|
419
|
-
*/
|
|
420
|
-
this.hidden = new EventEmitter();
|
|
421
|
-
/**
|
|
422
|
-
* @hidden
|
|
423
|
-
*/
|
|
424
|
-
this.closeOnKeyDown = new EventEmitter();
|
|
425
|
-
/**
|
|
426
|
-
* @hidden
|
|
427
|
-
*/
|
|
428
|
-
this._width = 'auto';
|
|
429
|
-
/**
|
|
430
|
-
* @hidden
|
|
431
|
-
*/
|
|
432
|
-
this._height = 'auto';
|
|
433
|
-
/**
|
|
434
|
-
* @hidden
|
|
435
|
-
*/
|
|
436
|
-
this.popoverId = '';
|
|
437
|
-
this._offset = 6;
|
|
438
|
-
this.subs = new Subscription();
|
|
439
|
-
this._templateData = () => null;
|
|
440
|
-
validatePackage(packageMetadata);
|
|
441
|
-
}
|
|
398
|
+
localization;
|
|
399
|
+
renderer;
|
|
400
|
+
element;
|
|
401
|
+
zone;
|
|
402
|
+
/**
|
|
403
|
+
* @hidden
|
|
404
|
+
*/
|
|
405
|
+
anchor;
|
|
406
|
+
/**
|
|
407
|
+
* Specifies the position of the Popover in relation to its anchor element. [See example]({% slug positioning_popover %})
|
|
408
|
+
*
|
|
409
|
+
* The possible options are:
|
|
410
|
+
* `top`
|
|
411
|
+
* `bottom`
|
|
412
|
+
* `right` (Default)
|
|
413
|
+
* `left`
|
|
414
|
+
*/
|
|
415
|
+
position = 'right';
|
|
442
416
|
/**
|
|
443
417
|
* Specifies the distance from the Popover to its anchor element in pixels.
|
|
444
418
|
*
|
|
@@ -473,6 +447,46 @@ class PopoverComponent {
|
|
|
473
447
|
get height() {
|
|
474
448
|
return this._height;
|
|
475
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* @hidden
|
|
452
|
+
*/
|
|
453
|
+
direction;
|
|
454
|
+
/**
|
|
455
|
+
* Specifies the main header text of the Popover.
|
|
456
|
+
*
|
|
457
|
+
* If a `titleTemplate` is provided it would take precedence over the title.
|
|
458
|
+
*/
|
|
459
|
+
title;
|
|
460
|
+
/**
|
|
461
|
+
* @hidden
|
|
462
|
+
* Specifies the secondary header text of the Popover.
|
|
463
|
+
*
|
|
464
|
+
* If a `titleTemplate` is provided it would take precedence over the subtitle.
|
|
465
|
+
*/
|
|
466
|
+
subtitle;
|
|
467
|
+
/**
|
|
468
|
+
* Represents the text that will be rendered in the Popover body section.
|
|
469
|
+
*
|
|
470
|
+
* If a `bodyTemplate` is provided it would take precedence over this text.
|
|
471
|
+
*/
|
|
472
|
+
body;
|
|
473
|
+
/**
|
|
474
|
+
* Determines whether a callout will be rendered along the Popover. [See example]({% slug callout_popover %})
|
|
475
|
+
*
|
|
476
|
+
* @default true
|
|
477
|
+
*/
|
|
478
|
+
callout = true;
|
|
479
|
+
/**
|
|
480
|
+
* Enables and configures the Popover animation. [See example]({% slug animations_popover %})
|
|
481
|
+
*
|
|
482
|
+
* The possible options are:
|
|
483
|
+
*
|
|
484
|
+
* * `boolean`—Enables the default animation
|
|
485
|
+
* * `PopoverAnimation`—A configuration object which allows setting the `direction`, `duration` and `type` of the animation.
|
|
486
|
+
*
|
|
487
|
+
* @default false
|
|
488
|
+
*/
|
|
489
|
+
animation = false;
|
|
476
490
|
/**
|
|
477
491
|
* Defines a callback function which returns custom data passed to the Popover templates.
|
|
478
492
|
* It exposes the current anchor element as an argument. [See example](slug:templates_popover#toc-passing-data-to-templates)
|
|
@@ -486,6 +500,11 @@ class PopoverComponent {
|
|
|
486
500
|
get templateData() {
|
|
487
501
|
return this._templateData;
|
|
488
502
|
}
|
|
503
|
+
/**
|
|
504
|
+
* @hidden
|
|
505
|
+
* Determines the visibility of the Popover.
|
|
506
|
+
*/
|
|
507
|
+
visible = false;
|
|
489
508
|
/**
|
|
490
509
|
* @hidden
|
|
491
510
|
*/
|
|
@@ -498,6 +517,77 @@ class PopoverComponent {
|
|
|
498
517
|
get hasAttributeHidden() {
|
|
499
518
|
return !this.visible;
|
|
500
519
|
}
|
|
520
|
+
/**
|
|
521
|
+
* Fires before the Popover is about to be shown ([see example]({% slug events_popover %})).
|
|
522
|
+
* The event is preventable. If canceled, the Popover will not be displayed. [See example]({% slug events_popover %})
|
|
523
|
+
*/
|
|
524
|
+
show = new EventEmitter();
|
|
525
|
+
/**
|
|
526
|
+
* Fires after the Popover has been shown and the animation has ended. [See example]({% slug events_popover %})
|
|
527
|
+
*/
|
|
528
|
+
shown = new EventEmitter();
|
|
529
|
+
/**
|
|
530
|
+
* Fires when the Popover is about to be hidden ([see example]({% slug events_popover %})).
|
|
531
|
+
* The event is preventable. If canceled, the Popover will remain visible.
|
|
532
|
+
*/
|
|
533
|
+
hide = new EventEmitter();
|
|
534
|
+
/**
|
|
535
|
+
* Fires after the Popover has been hidden and the animation has ended. [See example]({% slug events_popover %})
|
|
536
|
+
*/
|
|
537
|
+
hidden = new EventEmitter();
|
|
538
|
+
/**
|
|
539
|
+
* @hidden
|
|
540
|
+
*/
|
|
541
|
+
closeOnKeyDown = new EventEmitter();
|
|
542
|
+
/**
|
|
543
|
+
* @hidden
|
|
544
|
+
*/
|
|
545
|
+
popoverWrapper;
|
|
546
|
+
/**
|
|
547
|
+
* @hidden
|
|
548
|
+
*/
|
|
549
|
+
titleTemplateWrapper;
|
|
550
|
+
/**
|
|
551
|
+
* @hidden
|
|
552
|
+
*/
|
|
553
|
+
bodyTemplateWrapper;
|
|
554
|
+
/**
|
|
555
|
+
* @hidden
|
|
556
|
+
*/
|
|
557
|
+
titleTemplate;
|
|
558
|
+
/**
|
|
559
|
+
* @hidden
|
|
560
|
+
*/
|
|
561
|
+
bodyTemplate;
|
|
562
|
+
/**
|
|
563
|
+
* @hidden
|
|
564
|
+
*/
|
|
565
|
+
actionsTemplate;
|
|
566
|
+
/**
|
|
567
|
+
* @hidden
|
|
568
|
+
*/
|
|
569
|
+
contextData;
|
|
570
|
+
/**
|
|
571
|
+
* @hidden
|
|
572
|
+
*/
|
|
573
|
+
_width = 'auto';
|
|
574
|
+
/**
|
|
575
|
+
* @hidden
|
|
576
|
+
*/
|
|
577
|
+
_height = 'auto';
|
|
578
|
+
/**
|
|
579
|
+
* @hidden
|
|
580
|
+
*/
|
|
581
|
+
popoverId = '';
|
|
582
|
+
_offset = 6;
|
|
583
|
+
subs = new Subscription();
|
|
584
|
+
constructor(localization, renderer, element, zone) {
|
|
585
|
+
this.localization = localization;
|
|
586
|
+
this.renderer = renderer;
|
|
587
|
+
this.element = element;
|
|
588
|
+
this.zone = zone;
|
|
589
|
+
validatePackage(packageMetadata);
|
|
590
|
+
}
|
|
501
591
|
ngOnInit() {
|
|
502
592
|
this.popoverId = getId('k-popover');
|
|
503
593
|
this.subs.add(this.localization.changes.subscribe(({ rtl }) => { this.direction = rtl ? 'rtl' : 'ltr'; }));
|
|
@@ -543,6 +633,7 @@ class PopoverComponent {
|
|
|
543
633
|
this.closeOnKeyDown.emit();
|
|
544
634
|
}
|
|
545
635
|
}
|
|
636
|
+
_templateData = () => null;
|
|
546
637
|
keepFocusWithinComponent(target, event) {
|
|
547
638
|
const wrapper = this.popoverWrapper.nativeElement;
|
|
548
639
|
const [firstFocusable, lastFocusable] = getFirstAndLastFocusable(wrapper);
|
|
@@ -579,15 +670,14 @@ class PopoverComponent {
|
|
|
579
670
|
this.renderer.setAttribute(wrapper, 'id', this.popoverId);
|
|
580
671
|
this.renderer.setAttribute(wrapper, 'role', focusablePopoverChildren.length > 0 ? 'dialog' : 'tooltip');
|
|
581
672
|
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
590
|
-
], 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 }], viewQueries: [{ propertyName: "popoverWrapper", first: true, predicate: ["popoverWrapper"], descendants: true }, { propertyName: "titleTemplateWrapper", first: true, predicate: ["titleTemplateWrapper"], descendants: true }, { propertyName: "bodyTemplateWrapper", first: true, predicate: ["bodyTemplateWrapper"], descendants: true }], ngImport: i0, template: `
|
|
673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
674
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PopoverComponent, isStandalone: true, 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", closeOnKeyDown: "closeOnKeyDown" }, 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: [
|
|
675
|
+
LocalizationService,
|
|
676
|
+
{
|
|
677
|
+
provide: L10N_PREFIX,
|
|
678
|
+
useValue: 'kendo.popover'
|
|
679
|
+
}
|
|
680
|
+
], 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 }], viewQueries: [{ propertyName: "popoverWrapper", first: true, predicate: ["popoverWrapper"], descendants: true }, { propertyName: "titleTemplateWrapper", first: true, predicate: ["titleTemplateWrapper"], descendants: true }, { propertyName: "bodyTemplateWrapper", first: true, predicate: ["bodyTemplateWrapper"], descendants: true }], ngImport: i0, template: `
|
|
591
681
|
<div #popoverWrapper *ngIf="visible" class="k-popover k-popup" [ngStyle]="{'width': width, 'height': height}">
|
|
592
682
|
<div class="k-popover-callout" [ngClass]="getCalloutPosition()" *ngIf="callout"></div>
|
|
593
683
|
|
|
@@ -625,7 +715,8 @@ PopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
|
625
715
|
</ng-template>
|
|
626
716
|
</div>
|
|
627
717
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
628
|
-
|
|
718
|
+
}
|
|
719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
629
720
|
type: Component,
|
|
630
721
|
args: [{
|
|
631
722
|
selector: 'kendo-popover',
|
|
@@ -749,17 +840,9 @@ const validShowOptions = ['hover', 'click', 'none', 'focus'];
|
|
|
749
840
|
* @hidden
|
|
750
841
|
*/
|
|
751
842
|
class PopoverDirectivesBase {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
this.renderer = renderer;
|
|
756
|
-
/**
|
|
757
|
-
* @hidden
|
|
758
|
-
*/
|
|
759
|
-
this.anchor = null;
|
|
760
|
-
this.subs = new Subscription();
|
|
761
|
-
this._showOn = 'click';
|
|
762
|
-
}
|
|
843
|
+
ngZone;
|
|
844
|
+
popupService;
|
|
845
|
+
renderer;
|
|
763
846
|
/**
|
|
764
847
|
* Specifies the popover instance that will be rendered.
|
|
765
848
|
* Accepts a [`PopoverComponent`]({% slug api_tooltip_popovercomponent %}) instance or
|
|
@@ -799,6 +882,31 @@ class PopoverDirectivesBase {
|
|
|
799
882
|
get showOn() {
|
|
800
883
|
return this._showOn;
|
|
801
884
|
}
|
|
885
|
+
/**
|
|
886
|
+
* @hidden
|
|
887
|
+
*/
|
|
888
|
+
anchor = null;
|
|
889
|
+
popupRef;
|
|
890
|
+
disposeHoverOverListener;
|
|
891
|
+
disposeHoverOutListener;
|
|
892
|
+
disposeClickListener;
|
|
893
|
+
disposePopupHoverOutListener;
|
|
894
|
+
disposePopupHoverInListener;
|
|
895
|
+
disposePopupFocusOutListener;
|
|
896
|
+
subs = new Subscription();
|
|
897
|
+
_popoverService;
|
|
898
|
+
_hideSub;
|
|
899
|
+
_focusInsideSub;
|
|
900
|
+
_popover;
|
|
901
|
+
_showOn = 'click';
|
|
902
|
+
_popupOpenSub;
|
|
903
|
+
_popupCloseSub;
|
|
904
|
+
_popupSubs;
|
|
905
|
+
constructor(ngZone, popupService, renderer) {
|
|
906
|
+
this.ngZone = ngZone;
|
|
907
|
+
this.popupService = popupService;
|
|
908
|
+
this.renderer = renderer;
|
|
909
|
+
}
|
|
802
910
|
ngAfterViewInit() {
|
|
803
911
|
if (!isDocumentAvailable()) {
|
|
804
912
|
return;
|
|
@@ -1028,10 +1136,10 @@ class PopoverDirectivesBase {
|
|
|
1028
1136
|
}
|
|
1029
1137
|
return false;
|
|
1030
1138
|
}
|
|
1139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverDirectivesBase, deps: [{ token: i0.NgZone }, { token: i1$1.PopupService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1140
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverDirectivesBase, inputs: { popover: "popover", showOn: "showOn" }, ngImport: i0 });
|
|
1031
1141
|
}
|
|
1032
|
-
|
|
1033
|
-
PopoverDirectivesBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverDirectivesBase, inputs: { popover: "popover", showOn: "showOn" }, ngImport: i0 });
|
|
1034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverDirectivesBase, decorators: [{
|
|
1142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverDirectivesBase, decorators: [{
|
|
1035
1143
|
type: Directive,
|
|
1036
1144
|
args: [{}]
|
|
1037
1145
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.PopupService }, { type: i0.Renderer2 }]; }, propDecorators: { popover: [{
|
|
@@ -1044,13 +1152,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1044
1152
|
* @hidden
|
|
1045
1153
|
*/
|
|
1046
1154
|
class PopoverService {
|
|
1155
|
+
ngZone;
|
|
1156
|
+
_pointerOverPopup = new BehaviorSubject(null);
|
|
1157
|
+
_pointerOverAnchor = new BehaviorSubject(null);
|
|
1158
|
+
_focusInsidePopover = new BehaviorSubject(null);
|
|
1159
|
+
_hidePopover = new Subject();
|
|
1160
|
+
_isOrigin;
|
|
1161
|
+
originAnchor;
|
|
1162
|
+
currentAnchor;
|
|
1163
|
+
subs = new Subscription();
|
|
1047
1164
|
constructor(ngZone) {
|
|
1048
1165
|
this.ngZone = ngZone;
|
|
1049
|
-
this._pointerOverPopup = new BehaviorSubject(null);
|
|
1050
|
-
this._pointerOverAnchor = new BehaviorSubject(null);
|
|
1051
|
-
this._focusInsidePopover = new BehaviorSubject(null);
|
|
1052
|
-
this._hidePopover = new Subject();
|
|
1053
|
-
this.subs = new Subscription();
|
|
1054
1166
|
this.monitor();
|
|
1055
1167
|
}
|
|
1056
1168
|
ngOnDestroy() {
|
|
@@ -1093,10 +1205,10 @@ class PopoverService {
|
|
|
1093
1205
|
this._hidePopover.next([isPopoverHovered, isAnchorHovered, this._isOrigin, this.currentAnchor]);
|
|
1094
1206
|
}));
|
|
1095
1207
|
}
|
|
1208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1209
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService });
|
|
1096
1210
|
}
|
|
1097
|
-
|
|
1098
|
-
PopoverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverService });
|
|
1099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverService, decorators: [{
|
|
1211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService, decorators: [{
|
|
1100
1212
|
type: Injectable
|
|
1101
1213
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
1102
1214
|
|
|
@@ -1111,6 +1223,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1111
1223
|
* ```
|
|
1112
1224
|
*/
|
|
1113
1225
|
class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
1226
|
+
hostEl;
|
|
1227
|
+
ngZone;
|
|
1228
|
+
popupService;
|
|
1229
|
+
renderer;
|
|
1230
|
+
popoverService;
|
|
1114
1231
|
constructor(hostEl, ngZone, popupService, renderer, popoverService) {
|
|
1115
1232
|
super(ngZone, popupService, renderer);
|
|
1116
1233
|
this.hostEl = hostEl;
|
|
@@ -1118,44 +1235,6 @@ class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
|
1118
1235
|
this.popupService = popupService;
|
|
1119
1236
|
this.renderer = renderer;
|
|
1120
1237
|
this.popoverService = popoverService;
|
|
1121
|
-
this.mouseenterHandler = () => {
|
|
1122
|
-
this.controlVisibility(this.hostEl.nativeElement, true);
|
|
1123
|
-
};
|
|
1124
|
-
this.mouseleaveHandler = () => {
|
|
1125
|
-
if (this.isPrevented(this.hostEl.nativeElement, false)) {
|
|
1126
|
-
return;
|
|
1127
|
-
}
|
|
1128
|
-
if (!this._hideSub) {
|
|
1129
|
-
this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
|
|
1130
|
-
const [isPopoverHovered, isAnchorHovered] = val;
|
|
1131
|
-
if (!isPopoverHovered && !isAnchorHovered) {
|
|
1132
|
-
this.hide();
|
|
1133
|
-
}
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
};
|
|
1137
|
-
this.focusHandler = () => {
|
|
1138
|
-
this.controlVisibility(this.hostEl.nativeElement, true);
|
|
1139
|
-
};
|
|
1140
|
-
this.blurHandler = (args) => {
|
|
1141
|
-
const event = args.domEvent;
|
|
1142
|
-
if (this.isPrevented(this.hostEl.nativeElement, false)) {
|
|
1143
|
-
return;
|
|
1144
|
-
}
|
|
1145
|
-
// from anchor to popup focus check
|
|
1146
|
-
const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
|
|
1147
|
-
if (!isFocusInside) {
|
|
1148
|
-
this.hide();
|
|
1149
|
-
}
|
|
1150
|
-
if (!this._focusInsideSub) {
|
|
1151
|
-
// inside popup focus check
|
|
1152
|
-
this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
|
|
1153
|
-
if (!val) {
|
|
1154
|
-
this.hide();
|
|
1155
|
-
}
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
};
|
|
1159
1238
|
this._popoverService = this.popoverService;
|
|
1160
1239
|
}
|
|
1161
1240
|
ngOnChanges(changes) {
|
|
@@ -1212,6 +1291,44 @@ class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
|
1212
1291
|
this.onClick(e);
|
|
1213
1292
|
});
|
|
1214
1293
|
}
|
|
1294
|
+
mouseenterHandler = () => {
|
|
1295
|
+
this.controlVisibility(this.hostEl.nativeElement, true);
|
|
1296
|
+
};
|
|
1297
|
+
mouseleaveHandler = () => {
|
|
1298
|
+
if (this.isPrevented(this.hostEl.nativeElement, false)) {
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
if (!this._hideSub) {
|
|
1302
|
+
this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
|
|
1303
|
+
const [isPopoverHovered, isAnchorHovered] = val;
|
|
1304
|
+
if (!isPopoverHovered && !isAnchorHovered) {
|
|
1305
|
+
this.hide();
|
|
1306
|
+
}
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
focusHandler = () => {
|
|
1311
|
+
this.controlVisibility(this.hostEl.nativeElement, true);
|
|
1312
|
+
};
|
|
1313
|
+
blurHandler = (args) => {
|
|
1314
|
+
const event = args.domEvent;
|
|
1315
|
+
if (this.isPrevented(this.hostEl.nativeElement, false)) {
|
|
1316
|
+
return;
|
|
1317
|
+
}
|
|
1318
|
+
// from anchor to popup focus check
|
|
1319
|
+
const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
|
|
1320
|
+
if (!isFocusInside) {
|
|
1321
|
+
this.hide();
|
|
1322
|
+
}
|
|
1323
|
+
if (!this._focusInsideSub) {
|
|
1324
|
+
// inside popup focus check
|
|
1325
|
+
this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
|
|
1326
|
+
if (!val) {
|
|
1327
|
+
this.hide();
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
};
|
|
1215
1332
|
/**
|
|
1216
1333
|
* @hidden
|
|
1217
1334
|
*/
|
|
@@ -1241,10 +1358,10 @@ class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
|
1241
1358
|
this.hide();
|
|
1242
1359
|
}
|
|
1243
1360
|
}
|
|
1361
|
+
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$1.PopupService }, { token: i0.Renderer2 }, { token: PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1362
|
+
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 });
|
|
1244
1363
|
}
|
|
1245
|
-
|
|
1246
|
-
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 });
|
|
1247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
|
|
1364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
|
|
1248
1365
|
type: Directive,
|
|
1249
1366
|
args: [{
|
|
1250
1367
|
selector: '[kendoPopoverAnchor]',
|
|
@@ -1269,6 +1386,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1269
1386
|
* ```
|
|
1270
1387
|
*/
|
|
1271
1388
|
class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
1389
|
+
wrapperEl;
|
|
1390
|
+
ngZone;
|
|
1391
|
+
popupService;
|
|
1392
|
+
renderer;
|
|
1393
|
+
popoverService;
|
|
1394
|
+
/**
|
|
1395
|
+
* Specifies a selector for the elements that should display a popover.
|
|
1396
|
+
*
|
|
1397
|
+
* The possible values include any valid query selector.
|
|
1398
|
+
* [See example](slug:configuration_popover#toc-popover-container)
|
|
1399
|
+
*/
|
|
1400
|
+
filter;
|
|
1272
1401
|
constructor(wrapperEl, ngZone, popupService, renderer, popoverService) {
|
|
1273
1402
|
super(ngZone, popupService, renderer);
|
|
1274
1403
|
this.wrapperEl = wrapperEl;
|
|
@@ -1276,49 +1405,6 @@ class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
|
1276
1405
|
this.popupService = popupService;
|
|
1277
1406
|
this.renderer = renderer;
|
|
1278
1407
|
this.popoverService = popoverService;
|
|
1279
|
-
this.mouseenterHandler = (anchor) => {
|
|
1280
|
-
this.controlVisibility(anchor, true);
|
|
1281
|
-
};
|
|
1282
|
-
this.mouseleaveHandler = (args) => {
|
|
1283
|
-
const anchor = args.anchor;
|
|
1284
|
-
if (this.isPrevented(anchor, false)) {
|
|
1285
|
-
return;
|
|
1286
|
-
}
|
|
1287
|
-
if (!this._hideSub) {
|
|
1288
|
-
this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
|
|
1289
|
-
const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
|
|
1290
|
-
if (!isPopoverHovered && !isOriginAnchor) {
|
|
1291
|
-
this.hide();
|
|
1292
|
-
if (!isOriginAnchor && currentAnchor) {
|
|
1293
|
-
this.show(currentAnchor);
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
});
|
|
1297
|
-
}
|
|
1298
|
-
};
|
|
1299
|
-
this.focusHandler = (anchor) => {
|
|
1300
|
-
this.controlVisibility(anchor, true);
|
|
1301
|
-
};
|
|
1302
|
-
this.blurHandler = (args) => {
|
|
1303
|
-
const anchor = args.anchor;
|
|
1304
|
-
const event = args.domEvent;
|
|
1305
|
-
if (this.isPrevented(anchor, false)) {
|
|
1306
|
-
return;
|
|
1307
|
-
}
|
|
1308
|
-
// from anchor to popup focus check
|
|
1309
|
-
const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
|
|
1310
|
-
if (!isFocusInside) {
|
|
1311
|
-
this.hide();
|
|
1312
|
-
}
|
|
1313
|
-
if (!this._focusInsideSub) {
|
|
1314
|
-
// inside popup focus check
|
|
1315
|
-
this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
|
|
1316
|
-
if (!val && !isFocusInside) {
|
|
1317
|
-
this.hide();
|
|
1318
|
-
}
|
|
1319
|
-
});
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
1408
|
this._popoverService = this.popoverService;
|
|
1323
1409
|
}
|
|
1324
1410
|
/**
|
|
@@ -1363,6 +1449,49 @@ class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
|
1363
1449
|
this.clickHandler(filterElement, e);
|
|
1364
1450
|
});
|
|
1365
1451
|
}
|
|
1452
|
+
mouseenterHandler = (anchor) => {
|
|
1453
|
+
this.controlVisibility(anchor, true);
|
|
1454
|
+
};
|
|
1455
|
+
mouseleaveHandler = (args) => {
|
|
1456
|
+
const anchor = args.anchor;
|
|
1457
|
+
if (this.isPrevented(anchor, false)) {
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
if (!this._hideSub) {
|
|
1461
|
+
this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
|
|
1462
|
+
const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
|
|
1463
|
+
if (!isPopoverHovered && !isOriginAnchor) {
|
|
1464
|
+
this.hide();
|
|
1465
|
+
if (!isOriginAnchor && currentAnchor) {
|
|
1466
|
+
this.show(currentAnchor);
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
focusHandler = (anchor) => {
|
|
1473
|
+
this.controlVisibility(anchor, true);
|
|
1474
|
+
};
|
|
1475
|
+
blurHandler = (args) => {
|
|
1476
|
+
const anchor = args.anchor;
|
|
1477
|
+
const event = args.domEvent;
|
|
1478
|
+
if (this.isPrevented(anchor, false)) {
|
|
1479
|
+
return;
|
|
1480
|
+
}
|
|
1481
|
+
// from anchor to popup focus check
|
|
1482
|
+
const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
|
|
1483
|
+
if (!isFocusInside) {
|
|
1484
|
+
this.hide();
|
|
1485
|
+
}
|
|
1486
|
+
if (!this._focusInsideSub) {
|
|
1487
|
+
// inside popup focus check
|
|
1488
|
+
this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
|
|
1489
|
+
if (!val && !isFocusInside) {
|
|
1490
|
+
this.hide();
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1366
1495
|
subscribeToShowEvents(arr) {
|
|
1367
1496
|
const filteredElements = Array.from(document.querySelectorAll(this.filter));
|
|
1368
1497
|
filteredElements.forEach((el) => {
|
|
@@ -1406,10 +1535,10 @@ class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
|
1406
1535
|
this.hide();
|
|
1407
1536
|
}
|
|
1408
1537
|
}
|
|
1538
|
+
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$1.PopupService }, { token: i0.Renderer2 }, { token: PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1539
|
+
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 });
|
|
1409
1540
|
}
|
|
1410
|
-
|
|
1411
|
-
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 });
|
|
1412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverContainerDirective, decorators: [{
|
|
1541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverContainerDirective, decorators: [{
|
|
1413
1542
|
type: Directive,
|
|
1414
1543
|
args: [{
|
|
1415
1544
|
selector: '[kendoPopoverContainer]',
|
|
@@ -1425,48 +1554,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1425
1554
|
* @hidden
|
|
1426
1555
|
*/
|
|
1427
1556
|
class TooltipContentComponent {
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
this.callout = true;
|
|
1440
|
-
this.calloutStyles = (position, calloutSize, isFlip) => {
|
|
1441
|
-
const styles = {};
|
|
1442
|
-
const isVertical = position === 'top' || position === 'bottom';
|
|
1443
|
-
const flipDeg = '180deg';
|
|
1444
|
-
const zeroDeg = '0deg';
|
|
1445
|
-
if (!isFlip) {
|
|
1446
|
-
styles.transform = isVertical ? `rotateX(${zeroDeg})` : `rotateY(${zeroDeg})`;
|
|
1447
|
-
return styles;
|
|
1448
|
-
}
|
|
1449
|
-
if (position === 'top') {
|
|
1450
|
-
styles.bottom = 'unset';
|
|
1451
|
-
}
|
|
1452
|
-
else if (position === 'bottom') {
|
|
1453
|
-
styles.top = 'unset';
|
|
1454
|
-
}
|
|
1455
|
-
else if (position === 'left') {
|
|
1456
|
-
styles.right = 'unset';
|
|
1457
|
-
}
|
|
1458
|
-
else if (position === 'right') {
|
|
1459
|
-
styles.left = 'unset';
|
|
1460
|
-
}
|
|
1461
|
-
styles[position] = `${-calloutSize}px`;
|
|
1462
|
-
styles.transform = isVertical ? `rotateX(${flipDeg})` : `rotateY(${flipDeg})`;
|
|
1463
|
-
return styles;
|
|
1464
|
-
};
|
|
1465
|
-
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
1466
|
-
}
|
|
1557
|
+
content;
|
|
1558
|
+
localizationService;
|
|
1559
|
+
/**
|
|
1560
|
+
* @hidden
|
|
1561
|
+
*/
|
|
1562
|
+
xIcon = xIcon;
|
|
1563
|
+
/**
|
|
1564
|
+
* @hidden
|
|
1565
|
+
*/
|
|
1566
|
+
direction;
|
|
1567
|
+
close = new EventEmitter();
|
|
1467
1568
|
get cssClasses() {
|
|
1468
1569
|
return 'k-tooltip';
|
|
1469
1570
|
}
|
|
1571
|
+
hostRole = 'tooltip';
|
|
1470
1572
|
get hostId() {
|
|
1471
1573
|
return this.tooltipId;
|
|
1472
1574
|
}
|
|
@@ -1476,6 +1578,26 @@ class TooltipContentComponent {
|
|
|
1476
1578
|
get cssPosition() {
|
|
1477
1579
|
return 'relative';
|
|
1478
1580
|
}
|
|
1581
|
+
tooltipWidth = null;
|
|
1582
|
+
tooltipHeight = null;
|
|
1583
|
+
titleTemplate;
|
|
1584
|
+
anchor;
|
|
1585
|
+
closable;
|
|
1586
|
+
templateRef;
|
|
1587
|
+
templateString;
|
|
1588
|
+
closeTitle;
|
|
1589
|
+
callout = true;
|
|
1590
|
+
position;
|
|
1591
|
+
/**
|
|
1592
|
+
* @hidden
|
|
1593
|
+
*/
|
|
1594
|
+
tooltipId;
|
|
1595
|
+
dynamicRTLSubscription;
|
|
1596
|
+
constructor(content, localizationService) {
|
|
1597
|
+
this.content = content;
|
|
1598
|
+
this.localizationService = localizationService;
|
|
1599
|
+
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
1600
|
+
}
|
|
1479
1601
|
ngOnInit() {
|
|
1480
1602
|
this.tooltipId = getId('tooltip');
|
|
1481
1603
|
this.dynamicRTLSubscription = this.localizationService.changes
|
|
@@ -1523,15 +1645,39 @@ class TooltipContentComponent {
|
|
|
1523
1645
|
callout.style[style] = calloutStyles[style];
|
|
1524
1646
|
});
|
|
1525
1647
|
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1648
|
+
calloutStyles = (position, calloutSize, isFlip) => {
|
|
1649
|
+
const styles = {};
|
|
1650
|
+
const isVertical = position === 'top' || position === 'bottom';
|
|
1651
|
+
const flipDeg = '180deg';
|
|
1652
|
+
const zeroDeg = '0deg';
|
|
1653
|
+
if (!isFlip) {
|
|
1654
|
+
styles.transform = isVertical ? `rotateX(${zeroDeg})` : `rotateY(${zeroDeg})`;
|
|
1655
|
+
return styles;
|
|
1656
|
+
}
|
|
1657
|
+
if (position === 'top') {
|
|
1658
|
+
styles.bottom = 'unset';
|
|
1659
|
+
}
|
|
1660
|
+
else if (position === 'bottom') {
|
|
1661
|
+
styles.top = 'unset';
|
|
1662
|
+
}
|
|
1663
|
+
else if (position === 'left') {
|
|
1664
|
+
styles.right = 'unset';
|
|
1665
|
+
}
|
|
1666
|
+
else if (position === 'right') {
|
|
1667
|
+
styles.left = 'unset';
|
|
1668
|
+
}
|
|
1669
|
+
styles[position] = `${-calloutSize}px`;
|
|
1670
|
+
styles.transform = isVertical ? `rotateX(${flipDeg})` : `rotateY(${flipDeg})`;
|
|
1671
|
+
return styles;
|
|
1672
|
+
};
|
|
1673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipContentComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1674
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TooltipContentComponent, isStandalone: true, 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: [
|
|
1675
|
+
LocalizationService,
|
|
1676
|
+
{
|
|
1677
|
+
provide: L10N_PREFIX,
|
|
1678
|
+
useValue: 'kendo.tooltip'
|
|
1679
|
+
}
|
|
1680
|
+
], ngImport: i0, template: `
|
|
1535
1681
|
<ng-container kendoTooltipLocalizedMessages
|
|
1536
1682
|
i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"
|
|
1537
1683
|
closeTitle="Close"
|
|
@@ -1569,7 +1715,8 @@ TooltipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1569
1715
|
|
|
1570
1716
|
<div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>
|
|
1571
1717
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoTooltipLocalizedMessages]", inputs: ["closeTitle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1572
|
-
|
|
1718
|
+
}
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipContentComponent, decorators: [{
|
|
1573
1720
|
type: Component,
|
|
1574
1721
|
args: [{
|
|
1575
1722
|
selector: 'kendo-tooltip',
|
|
@@ -1695,15 +1842,52 @@ const TOOLTIP_SETTINGS = new InjectionToken('kendo-ui-tooltip-settings');
|
|
|
1695
1842
|
* ```
|
|
1696
1843
|
*/
|
|
1697
1844
|
class TooltipSettings {
|
|
1845
|
+
/**
|
|
1846
|
+
* Specifies if the Тooltip will display a callout arrow.
|
|
1847
|
+
*
|
|
1848
|
+
* The possible values are:
|
|
1849
|
+
* * `true` (default)
|
|
1850
|
+
* * `false`
|
|
1851
|
+
*/
|
|
1852
|
+
callout;
|
|
1853
|
+
/**
|
|
1854
|
+
* Specifies the title of the close button.
|
|
1855
|
+
*/
|
|
1856
|
+
closeTitle;
|
|
1857
|
+
/**
|
|
1858
|
+
* Specifies the position of the Tooltip that is
|
|
1859
|
+
* relative to the anchor element.
|
|
1860
|
+
*
|
|
1861
|
+
* The possible values are:
|
|
1862
|
+
* * `top` (default)
|
|
1863
|
+
* * `bottom`
|
|
1864
|
+
* * `left`
|
|
1865
|
+
* * `right`
|
|
1866
|
+
*/
|
|
1867
|
+
position;
|
|
1868
|
+
/**
|
|
1869
|
+
* Specifies when the Тooltip will be rendered.
|
|
1870
|
+
*
|
|
1871
|
+
* The possible values are:
|
|
1872
|
+
* * `hover` (default)
|
|
1873
|
+
* * `click`
|
|
1874
|
+
* * `none`
|
|
1875
|
+
*/
|
|
1876
|
+
showOn;
|
|
1877
|
+
/**
|
|
1878
|
+
* Specifies the delay in milliseconds before the Tooltip is shown.
|
|
1879
|
+
* * `100` (default) milliseconds.
|
|
1880
|
+
*/
|
|
1881
|
+
showAfter;
|
|
1698
1882
|
/**
|
|
1699
1883
|
* @hidden
|
|
1700
1884
|
*/
|
|
1701
1885
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1702
1886
|
constructor() { }
|
|
1887
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipSettings, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1888
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipSettings });
|
|
1703
1889
|
}
|
|
1704
|
-
|
|
1705
|
-
TooltipSettings.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipSettings });
|
|
1706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipSettings, decorators: [{
|
|
1890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipSettings, decorators: [{
|
|
1707
1891
|
type: Injectable
|
|
1708
1892
|
}], ctorParameters: function () { return []; } });
|
|
1709
1893
|
|
|
@@ -1719,60 +1903,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1719
1903
|
* ```
|
|
1720
1904
|
*/
|
|
1721
1905
|
class TooltipDirective {
|
|
1906
|
+
tooltipWrapper;
|
|
1907
|
+
ngZone;
|
|
1908
|
+
renderer;
|
|
1909
|
+
popupService;
|
|
1910
|
+
/**
|
|
1911
|
+
* Specifies a selector for elements within a container which will display a tooltip
|
|
1912
|
+
* ([see example]({% slug anchorelements_tooltip %})). The possible values include any
|
|
1913
|
+
* DOM `selector`. The default value is `[title]`.
|
|
1914
|
+
*/
|
|
1915
|
+
filter = '[title]';
|
|
1916
|
+
/**
|
|
1917
|
+
* Specifies the position of the Tooltip that is relative to the
|
|
1918
|
+
* anchor element ([see example]({% slug positioning_tooltip %})).
|
|
1919
|
+
*
|
|
1920
|
+
* The possible values are:
|
|
1921
|
+
* * `top` (default)
|
|
1922
|
+
* * `bottom`
|
|
1923
|
+
* * `left`
|
|
1924
|
+
* * `right`
|
|
1925
|
+
*/
|
|
1926
|
+
position = 'top';
|
|
1927
|
+
/**
|
|
1928
|
+
* Renders the passed template as a header title of the Tooltip
|
|
1929
|
+
* ([see example]({% slug anchorelements_tooltip %})).
|
|
1930
|
+
*/
|
|
1931
|
+
titleTemplate;
|
|
1932
|
+
/**
|
|
1933
|
+
* Specifies when the Тooltip will be rendered
|
|
1934
|
+
* ([see example]({% slug programmaticopening_tooltip %})).
|
|
1935
|
+
*
|
|
1936
|
+
* The possible values are:
|
|
1937
|
+
* * `hover` (default)
|
|
1938
|
+
* * `click`
|
|
1939
|
+
* * `none`
|
|
1940
|
+
*/
|
|
1941
|
+
showOn;
|
|
1942
|
+
/**
|
|
1943
|
+
* Specifies the delay in milliseconds before the Tooltip is shown.
|
|
1944
|
+
* * `100` (default) milliseconds.
|
|
1945
|
+
*/
|
|
1946
|
+
showAfter = 100;
|
|
1947
|
+
/**
|
|
1948
|
+
* Specifies if the Тooltip will display a callout arrow.
|
|
1949
|
+
*
|
|
1950
|
+
* The possible values are:
|
|
1951
|
+
* * `true` (default)
|
|
1952
|
+
* * `false`
|
|
1953
|
+
*/
|
|
1954
|
+
callout = true;
|
|
1955
|
+
/**
|
|
1956
|
+
* Specifies if the Тooltip will display a **Close** button
|
|
1957
|
+
* ([see example]({% slug closable_tooltip %})).
|
|
1958
|
+
*
|
|
1959
|
+
* The possible values are:
|
|
1960
|
+
* * `true`
|
|
1961
|
+
* * `false`
|
|
1962
|
+
*/
|
|
1963
|
+
closable = false;
|
|
1964
|
+
/**
|
|
1965
|
+
* Specifies the offset in pixels between the Tooltip and the anchor. Defaults to `6` pixels.
|
|
1966
|
+
* If the `callout` property is set to `true`, the offset is rendered from the callout arrow.
|
|
1967
|
+
* If the `callout` property is set to `false`, the offset is rendered from the content of the Tooltip.
|
|
1968
|
+
*/
|
|
1969
|
+
offset = 6;
|
|
1970
|
+
/**
|
|
1971
|
+
* Specifies the width of the Тooltip ([see example]({% slug anchorelements_tooltip %})).
|
|
1972
|
+
*/
|
|
1973
|
+
tooltipWidth;
|
|
1974
|
+
/**
|
|
1975
|
+
* Specifies the height of the Тooltip.
|
|
1976
|
+
*/
|
|
1977
|
+
tooltipHeight;
|
|
1978
|
+
/**
|
|
1979
|
+
* Specifies a CSS class that will be added to the Tooltip.
|
|
1980
|
+
*/
|
|
1981
|
+
tooltipClass;
|
|
1982
|
+
/**
|
|
1983
|
+
* @hidden
|
|
1984
|
+
* Specifies a CSS class that will be added to the kendo-tooltip element.
|
|
1985
|
+
*/
|
|
1986
|
+
tooltipContentClass;
|
|
1987
|
+
/**
|
|
1988
|
+
* Provides screen boundary detection when the Тooltip is shown.
|
|
1989
|
+
*/
|
|
1990
|
+
collision;
|
|
1991
|
+
/**
|
|
1992
|
+
* Specifies the title of the close button.
|
|
1993
|
+
*/
|
|
1994
|
+
closeTitle;
|
|
1995
|
+
/**
|
|
1996
|
+
* Sets the content of the Tooltip as a template reference
|
|
1997
|
+
* ([see example]({% slug templates_tooltip %})).
|
|
1998
|
+
*/
|
|
1999
|
+
set tooltipTemplate(value) {
|
|
2000
|
+
this.template = value;
|
|
2001
|
+
}
|
|
2002
|
+
get tooltipTemplate() {
|
|
2003
|
+
return this.template;
|
|
2004
|
+
}
|
|
2005
|
+
popupRef;
|
|
2006
|
+
template;
|
|
2007
|
+
showTimeout;
|
|
2008
|
+
anchor = null;
|
|
2009
|
+
mouseOverSubscription;
|
|
2010
|
+
mouseOutSubscription;
|
|
2011
|
+
mouseClickSubscription;
|
|
2012
|
+
anchorTitleSubscription;
|
|
2013
|
+
popupPositionChangeSubscription;
|
|
2014
|
+
popupMouseOutSubscription;
|
|
2015
|
+
keyboardNavigationSubscription = new Subscription();
|
|
2016
|
+
closeClickSubscription;
|
|
2017
|
+
validPositions = ['top', 'bottom', 'right', 'left'];
|
|
2018
|
+
validShowOptions = ['hover', 'click', 'none'];
|
|
1722
2019
|
constructor(tooltipWrapper, ngZone, renderer, popupService, settings, legacySettings) {
|
|
1723
2020
|
this.tooltipWrapper = tooltipWrapper;
|
|
1724
2021
|
this.ngZone = ngZone;
|
|
1725
2022
|
this.renderer = renderer;
|
|
1726
2023
|
this.popupService = popupService;
|
|
1727
|
-
/**
|
|
1728
|
-
* Specifies a selector for elements within a container which will display a tooltip
|
|
1729
|
-
* ([see example]({% slug anchorelements_tooltip %})). The possible values include any
|
|
1730
|
-
* DOM `selector`. The default value is `[title]`.
|
|
1731
|
-
*/
|
|
1732
|
-
this.filter = '[title]';
|
|
1733
|
-
/**
|
|
1734
|
-
* Specifies the position of the Tooltip that is relative to the
|
|
1735
|
-
* anchor element ([see example]({% slug positioning_tooltip %})).
|
|
1736
|
-
*
|
|
1737
|
-
* The possible values are:
|
|
1738
|
-
* * `top` (default)
|
|
1739
|
-
* * `bottom`
|
|
1740
|
-
* * `left`
|
|
1741
|
-
* * `right`
|
|
1742
|
-
*/
|
|
1743
|
-
this.position = 'top';
|
|
1744
|
-
/**
|
|
1745
|
-
* Specifies the delay in milliseconds before the Tooltip is shown.
|
|
1746
|
-
* * `100` (default) milliseconds.
|
|
1747
|
-
*/
|
|
1748
|
-
this.showAfter = 100;
|
|
1749
|
-
/**
|
|
1750
|
-
* Specifies if the Тooltip will display a callout arrow.
|
|
1751
|
-
*
|
|
1752
|
-
* The possible values are:
|
|
1753
|
-
* * `true` (default)
|
|
1754
|
-
* * `false`
|
|
1755
|
-
*/
|
|
1756
|
-
this.callout = true;
|
|
1757
|
-
/**
|
|
1758
|
-
* Specifies if the Тooltip will display a **Close** button
|
|
1759
|
-
* ([see example]({% slug closable_tooltip %})).
|
|
1760
|
-
*
|
|
1761
|
-
* The possible values are:
|
|
1762
|
-
* * `true`
|
|
1763
|
-
* * `false`
|
|
1764
|
-
*/
|
|
1765
|
-
this.closable = false;
|
|
1766
|
-
/**
|
|
1767
|
-
* Specifies the offset in pixels between the Tooltip and the anchor. Defaults to `6` pixels.
|
|
1768
|
-
* If the `callout` property is set to `true`, the offset is rendered from the callout arrow.
|
|
1769
|
-
* If the `callout` property is set to `false`, the offset is rendered from the content of the Tooltip.
|
|
1770
|
-
*/
|
|
1771
|
-
this.offset = 6;
|
|
1772
|
-
this.anchor = null;
|
|
1773
|
-
this.keyboardNavigationSubscription = new Subscription();
|
|
1774
|
-
this.validPositions = ['top', 'bottom', 'right', 'left'];
|
|
1775
|
-
this.validShowOptions = ['hover', 'click', 'none'];
|
|
1776
2024
|
validatePackage(packageMetadata);
|
|
1777
2025
|
Object.assign(this, settings, legacySettings);
|
|
1778
2026
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -1792,16 +2040,6 @@ class TooltipDirective {
|
|
|
1792
2040
|
.subscribe(e => this.onMouseOut(e));
|
|
1793
2041
|
});
|
|
1794
2042
|
}
|
|
1795
|
-
/**
|
|
1796
|
-
* Sets the content of the Tooltip as a template reference
|
|
1797
|
-
* ([see example]({% slug templates_tooltip %})).
|
|
1798
|
-
*/
|
|
1799
|
-
set tooltipTemplate(value) {
|
|
1800
|
-
this.template = value;
|
|
1801
|
-
}
|
|
1802
|
-
get tooltipTemplate() {
|
|
1803
|
-
return this.template;
|
|
1804
|
-
}
|
|
1805
2043
|
/**
|
|
1806
2044
|
* Shows the Tooltip.
|
|
1807
2045
|
* @param anchor— ElementRef|Element.
|
|
@@ -2092,10 +2330,10 @@ class TooltipDirective {
|
|
|
2092
2330
|
throw new Error(`Invalid value provided for showOn property.The available options are 'hover' or 'none'.`);
|
|
2093
2331
|
}
|
|
2094
2332
|
}
|
|
2333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 });
|
|
2334
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TooltipDirective, isStandalone: true, 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", tooltipContentClass: "tooltipContentClass", collision: "collision", closeTitle: "closeTitle", tooltipTemplate: "tooltipTemplate" }, exportAs: ["kendoTooltip"], usesOnChanges: true, ngImport: i0 });
|
|
2095
2335
|
}
|
|
2096
|
-
|
|
2097
|
-
TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TooltipDirective, isStandalone: true, 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", tooltipContentClass: "tooltipContentClass", collision: "collision", closeTitle: "closeTitle", tooltipTemplate: "tooltipTemplate" }, exportAs: ["kendoTooltip"], usesOnChanges: true, ngImport: i0 });
|
|
2098
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
2336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
2099
2337
|
type: Directive,
|
|
2100
2338
|
args: [{
|
|
2101
2339
|
selector: '[kendoTooltip]',
|
|
@@ -2200,11 +2438,11 @@ const KENDO_TOOLTIPS = [
|
|
|
2200
2438
|
* ```
|
|
2201
2439
|
*/
|
|
2202
2440
|
class TooltipModule {
|
|
2441
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2442
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, imports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective], exports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective] });
|
|
2443
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, providers: [PopupService, ResizeBatchService, IconsService], imports: [TooltipContentComponent] });
|
|
2203
2444
|
}
|
|
2204
|
-
|
|
2205
|
-
TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TooltipModule, imports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective], exports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective] });
|
|
2206
|
-
TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipModule, providers: [PopupService, ResizeBatchService, IconsService], imports: [TooltipContentComponent] });
|
|
2207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipModule, decorators: [{
|
|
2445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, decorators: [{
|
|
2208
2446
|
type: NgModule,
|
|
2209
2447
|
args: [{
|
|
2210
2448
|
imports: [...KENDO_TOOLTIP],
|
|
@@ -2240,11 +2478,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2240
2478
|
* ```
|
|
2241
2479
|
*/
|
|
2242
2480
|
class PopoverModule {
|
|
2481
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2482
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, imports: [PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective], exports: [PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective] });
|
|
2483
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, providers: [PopupService, ResizeBatchService] });
|
|
2243
2484
|
}
|
|
2244
|
-
|
|
2245
|
-
PopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PopoverModule, imports: [PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective], exports: [PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective] });
|
|
2246
|
-
PopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverModule, providers: [PopupService, ResizeBatchService], imports: [PopoverComponent] });
|
|
2247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverModule, decorators: [{
|
|
2485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, decorators: [{
|
|
2248
2486
|
type: NgModule,
|
|
2249
2487
|
args: [{
|
|
2250
2488
|
exports: [...KENDO_POPOVER],
|
|
@@ -2281,11 +2519,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2281
2519
|
* ```
|
|
2282
2520
|
*/
|
|
2283
2521
|
class TooltipsModule {
|
|
2522
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2523
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, imports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective, PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective], exports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective, PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective] });
|
|
2524
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, providers: [PopupService, ResizeBatchService, IconsService], imports: [TooltipContentComponent] });
|
|
2284
2525
|
}
|
|
2285
|
-
|
|
2286
|
-
TooltipsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TooltipsModule, imports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective, PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective], exports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective, PopoverComponent, PopoverActionsTemplateDirective, PopoverBodyTemplateDirective, PopoverTitleTemplateDirective, PopoverAnchorDirective, PopoverContainerDirective] });
|
|
2287
|
-
TooltipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipsModule, providers: [PopupService, ResizeBatchService, IconsService], imports: [TooltipContentComponent, PopoverComponent] });
|
|
2288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TooltipsModule, decorators: [{
|
|
2526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, decorators: [{
|
|
2289
2527
|
type: NgModule,
|
|
2290
2528
|
args: [{
|
|
2291
2529
|
imports: [...KENDO_TOOLTIPS],
|