@progress/kendo-angular-tooltip 17.0.0-develop.9 → 17.0.1-develop.1
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/{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 -15
- 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 -342
- 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/schematics/ngAdd/index.js +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.
|
|
306
|
+
publishDate: 1731429770,
|
|
307
|
+
version: '17.0.1-develop.1',
|
|
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;
|
|
@@ -877,7 +985,6 @@ class PopoverDirectivesBase {
|
|
|
877
985
|
popupAlign,
|
|
878
986
|
anchorAlign,
|
|
879
987
|
margin: popupMargin,
|
|
880
|
-
popupClass: 'k-popup-transparent',
|
|
881
988
|
collision: { horizontal: 'fit', vertical: 'fit' }
|
|
882
989
|
});
|
|
883
990
|
const popupInstance = this.popupRef.content.instance;
|
|
@@ -1028,10 +1135,10 @@ class PopoverDirectivesBase {
|
|
|
1028
1135
|
}
|
|
1029
1136
|
return false;
|
|
1030
1137
|
}
|
|
1138
|
+
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 });
|
|
1139
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverDirectivesBase, inputs: { popover: "popover", showOn: "showOn" }, ngImport: i0 });
|
|
1031
1140
|
}
|
|
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: [{
|
|
1141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverDirectivesBase, decorators: [{
|
|
1035
1142
|
type: Directive,
|
|
1036
1143
|
args: [{}]
|
|
1037
1144
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.PopupService }, { type: i0.Renderer2 }]; }, propDecorators: { popover: [{
|
|
@@ -1044,13 +1151,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1044
1151
|
* @hidden
|
|
1045
1152
|
*/
|
|
1046
1153
|
class PopoverService {
|
|
1154
|
+
ngZone;
|
|
1155
|
+
_pointerOverPopup = new BehaviorSubject(null);
|
|
1156
|
+
_pointerOverAnchor = new BehaviorSubject(null);
|
|
1157
|
+
_focusInsidePopover = new BehaviorSubject(null);
|
|
1158
|
+
_hidePopover = new Subject();
|
|
1159
|
+
_isOrigin;
|
|
1160
|
+
originAnchor;
|
|
1161
|
+
currentAnchor;
|
|
1162
|
+
subs = new Subscription();
|
|
1047
1163
|
constructor(ngZone) {
|
|
1048
1164
|
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
1165
|
this.monitor();
|
|
1055
1166
|
}
|
|
1056
1167
|
ngOnDestroy() {
|
|
@@ -1093,10 +1204,10 @@ class PopoverService {
|
|
|
1093
1204
|
this._hidePopover.next([isPopoverHovered, isAnchorHovered, this._isOrigin, this.currentAnchor]);
|
|
1094
1205
|
}));
|
|
1095
1206
|
}
|
|
1207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1208
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService });
|
|
1096
1209
|
}
|
|
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: [{
|
|
1210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService, decorators: [{
|
|
1100
1211
|
type: Injectable
|
|
1101
1212
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
1102
1213
|
|
|
@@ -1111,6 +1222,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1111
1222
|
* ```
|
|
1112
1223
|
*/
|
|
1113
1224
|
class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
1225
|
+
hostEl;
|
|
1226
|
+
ngZone;
|
|
1227
|
+
popupService;
|
|
1228
|
+
renderer;
|
|
1229
|
+
popoverService;
|
|
1114
1230
|
constructor(hostEl, ngZone, popupService, renderer, popoverService) {
|
|
1115
1231
|
super(ngZone, popupService, renderer);
|
|
1116
1232
|
this.hostEl = hostEl;
|
|
@@ -1118,44 +1234,6 @@ class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
|
1118
1234
|
this.popupService = popupService;
|
|
1119
1235
|
this.renderer = renderer;
|
|
1120
1236
|
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
1237
|
this._popoverService = this.popoverService;
|
|
1160
1238
|
}
|
|
1161
1239
|
ngOnChanges(changes) {
|
|
@@ -1212,6 +1290,44 @@ class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
|
1212
1290
|
this.onClick(e);
|
|
1213
1291
|
});
|
|
1214
1292
|
}
|
|
1293
|
+
mouseenterHandler = () => {
|
|
1294
|
+
this.controlVisibility(this.hostEl.nativeElement, true);
|
|
1295
|
+
};
|
|
1296
|
+
mouseleaveHandler = () => {
|
|
1297
|
+
if (this.isPrevented(this.hostEl.nativeElement, false)) {
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
if (!this._hideSub) {
|
|
1301
|
+
this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
|
|
1302
|
+
const [isPopoverHovered, isAnchorHovered] = val;
|
|
1303
|
+
if (!isPopoverHovered && !isAnchorHovered) {
|
|
1304
|
+
this.hide();
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1309
|
+
focusHandler = () => {
|
|
1310
|
+
this.controlVisibility(this.hostEl.nativeElement, true);
|
|
1311
|
+
};
|
|
1312
|
+
blurHandler = (args) => {
|
|
1313
|
+
const event = args.domEvent;
|
|
1314
|
+
if (this.isPrevented(this.hostEl.nativeElement, false)) {
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
// from anchor to popup focus check
|
|
1318
|
+
const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
|
|
1319
|
+
if (!isFocusInside) {
|
|
1320
|
+
this.hide();
|
|
1321
|
+
}
|
|
1322
|
+
if (!this._focusInsideSub) {
|
|
1323
|
+
// inside popup focus check
|
|
1324
|
+
this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
|
|
1325
|
+
if (!val) {
|
|
1326
|
+
this.hide();
|
|
1327
|
+
}
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1215
1331
|
/**
|
|
1216
1332
|
* @hidden
|
|
1217
1333
|
*/
|
|
@@ -1241,10 +1357,10 @@ class PopoverAnchorDirective extends PopoverDirectivesBase {
|
|
|
1241
1357
|
this.hide();
|
|
1242
1358
|
}
|
|
1243
1359
|
}
|
|
1360
|
+
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 });
|
|
1361
|
+
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
1362
|
}
|
|
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: [{
|
|
1363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverAnchorDirective, decorators: [{
|
|
1248
1364
|
type: Directive,
|
|
1249
1365
|
args: [{
|
|
1250
1366
|
selector: '[kendoPopoverAnchor]',
|
|
@@ -1269,6 +1385,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1269
1385
|
* ```
|
|
1270
1386
|
*/
|
|
1271
1387
|
class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
1388
|
+
wrapperEl;
|
|
1389
|
+
ngZone;
|
|
1390
|
+
popupService;
|
|
1391
|
+
renderer;
|
|
1392
|
+
popoverService;
|
|
1393
|
+
/**
|
|
1394
|
+
* Specifies a selector for the elements that should display a popover.
|
|
1395
|
+
*
|
|
1396
|
+
* The possible values include any valid query selector.
|
|
1397
|
+
* [See example](slug:configuration_popover#toc-popover-container)
|
|
1398
|
+
*/
|
|
1399
|
+
filter;
|
|
1272
1400
|
constructor(wrapperEl, ngZone, popupService, renderer, popoverService) {
|
|
1273
1401
|
super(ngZone, popupService, renderer);
|
|
1274
1402
|
this.wrapperEl = wrapperEl;
|
|
@@ -1276,49 +1404,6 @@ class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
|
1276
1404
|
this.popupService = popupService;
|
|
1277
1405
|
this.renderer = renderer;
|
|
1278
1406
|
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
1407
|
this._popoverService = this.popoverService;
|
|
1323
1408
|
}
|
|
1324
1409
|
/**
|
|
@@ -1363,6 +1448,49 @@ class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
|
1363
1448
|
this.clickHandler(filterElement, e);
|
|
1364
1449
|
});
|
|
1365
1450
|
}
|
|
1451
|
+
mouseenterHandler = (anchor) => {
|
|
1452
|
+
this.controlVisibility(anchor, true);
|
|
1453
|
+
};
|
|
1454
|
+
mouseleaveHandler = (args) => {
|
|
1455
|
+
const anchor = args.anchor;
|
|
1456
|
+
if (this.isPrevented(anchor, false)) {
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
if (!this._hideSub) {
|
|
1460
|
+
this._hideSub = this.popoverService.hidePopover.subscribe((val) => {
|
|
1461
|
+
const [isPopoverHovered, , isOriginAnchor, currentAnchor] = val;
|
|
1462
|
+
if (!isPopoverHovered && !isOriginAnchor) {
|
|
1463
|
+
this.hide();
|
|
1464
|
+
if (!isOriginAnchor && currentAnchor) {
|
|
1465
|
+
this.show(currentAnchor);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
focusHandler = (anchor) => {
|
|
1472
|
+
this.controlVisibility(anchor, true);
|
|
1473
|
+
};
|
|
1474
|
+
blurHandler = (args) => {
|
|
1475
|
+
const anchor = args.anchor;
|
|
1476
|
+
const event = args.domEvent;
|
|
1477
|
+
if (this.isPrevented(anchor, false)) {
|
|
1478
|
+
return;
|
|
1479
|
+
}
|
|
1480
|
+
// from anchor to popup focus check
|
|
1481
|
+
const isFocusInside = !!closest(event.relatedTarget, (node) => node.classList && node.classList.contains('k-popover'));
|
|
1482
|
+
if (!isFocusInside) {
|
|
1483
|
+
this.hide();
|
|
1484
|
+
}
|
|
1485
|
+
if (!this._focusInsideSub) {
|
|
1486
|
+
// inside popup focus check
|
|
1487
|
+
this._focusInsideSub = this.popoverService.isFocusInsidePopover.pipe(filter(v => v !== null)).subscribe((val) => {
|
|
1488
|
+
if (!val && !isFocusInside) {
|
|
1489
|
+
this.hide();
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1366
1494
|
subscribeToShowEvents(arr) {
|
|
1367
1495
|
const filteredElements = Array.from(document.querySelectorAll(this.filter));
|
|
1368
1496
|
filteredElements.forEach((el) => {
|
|
@@ -1406,10 +1534,10 @@ class PopoverContainerDirective extends PopoverDirectivesBase {
|
|
|
1406
1534
|
this.hide();
|
|
1407
1535
|
}
|
|
1408
1536
|
}
|
|
1537
|
+
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 });
|
|
1538
|
+
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
1539
|
}
|
|
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: [{
|
|
1540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverContainerDirective, decorators: [{
|
|
1413
1541
|
type: Directive,
|
|
1414
1542
|
args: [{
|
|
1415
1543
|
selector: '[kendoPopoverContainer]',
|
|
@@ -1425,48 +1553,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1425
1553
|
* @hidden
|
|
1426
1554
|
*/
|
|
1427
1555
|
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
|
-
}
|
|
1556
|
+
content;
|
|
1557
|
+
localizationService;
|
|
1558
|
+
/**
|
|
1559
|
+
* @hidden
|
|
1560
|
+
*/
|
|
1561
|
+
xIcon = xIcon;
|
|
1562
|
+
/**
|
|
1563
|
+
* @hidden
|
|
1564
|
+
*/
|
|
1565
|
+
direction;
|
|
1566
|
+
close = new EventEmitter();
|
|
1467
1567
|
get cssClasses() {
|
|
1468
1568
|
return 'k-tooltip';
|
|
1469
1569
|
}
|
|
1570
|
+
hostRole = 'tooltip';
|
|
1470
1571
|
get hostId() {
|
|
1471
1572
|
return this.tooltipId;
|
|
1472
1573
|
}
|
|
@@ -1476,6 +1577,26 @@ class TooltipContentComponent {
|
|
|
1476
1577
|
get cssPosition() {
|
|
1477
1578
|
return 'relative';
|
|
1478
1579
|
}
|
|
1580
|
+
tooltipWidth = null;
|
|
1581
|
+
tooltipHeight = null;
|
|
1582
|
+
titleTemplate;
|
|
1583
|
+
anchor;
|
|
1584
|
+
closable;
|
|
1585
|
+
templateRef;
|
|
1586
|
+
templateString;
|
|
1587
|
+
closeTitle;
|
|
1588
|
+
callout = true;
|
|
1589
|
+
position;
|
|
1590
|
+
/**
|
|
1591
|
+
* @hidden
|
|
1592
|
+
*/
|
|
1593
|
+
tooltipId;
|
|
1594
|
+
dynamicRTLSubscription;
|
|
1595
|
+
constructor(content, localizationService) {
|
|
1596
|
+
this.content = content;
|
|
1597
|
+
this.localizationService = localizationService;
|
|
1598
|
+
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
1599
|
+
}
|
|
1479
1600
|
ngOnInit() {
|
|
1480
1601
|
this.tooltipId = getId('tooltip');
|
|
1481
1602
|
this.dynamicRTLSubscription = this.localizationService.changes
|
|
@@ -1523,15 +1644,39 @@ class TooltipContentComponent {
|
|
|
1523
1644
|
callout.style[style] = calloutStyles[style];
|
|
1524
1645
|
});
|
|
1525
1646
|
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1647
|
+
calloutStyles = (position, calloutSize, isFlip) => {
|
|
1648
|
+
const styles = {};
|
|
1649
|
+
const isVertical = position === 'top' || position === 'bottom';
|
|
1650
|
+
const flipDeg = '180deg';
|
|
1651
|
+
const zeroDeg = '0deg';
|
|
1652
|
+
if (!isFlip) {
|
|
1653
|
+
styles.transform = isVertical ? `rotateX(${zeroDeg})` : `rotateY(${zeroDeg})`;
|
|
1654
|
+
return styles;
|
|
1655
|
+
}
|
|
1656
|
+
if (position === 'top') {
|
|
1657
|
+
styles.bottom = 'unset';
|
|
1658
|
+
}
|
|
1659
|
+
else if (position === 'bottom') {
|
|
1660
|
+
styles.top = 'unset';
|
|
1661
|
+
}
|
|
1662
|
+
else if (position === 'left') {
|
|
1663
|
+
styles.right = 'unset';
|
|
1664
|
+
}
|
|
1665
|
+
else if (position === 'right') {
|
|
1666
|
+
styles.left = 'unset';
|
|
1667
|
+
}
|
|
1668
|
+
styles[position] = `${-calloutSize}px`;
|
|
1669
|
+
styles.transform = isVertical ? `rotateX(${flipDeg})` : `rotateY(${flipDeg})`;
|
|
1670
|
+
return styles;
|
|
1671
|
+
};
|
|
1672
|
+
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 });
|
|
1673
|
+
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: [
|
|
1674
|
+
LocalizationService,
|
|
1675
|
+
{
|
|
1676
|
+
provide: L10N_PREFIX,
|
|
1677
|
+
useValue: 'kendo.tooltip'
|
|
1678
|
+
}
|
|
1679
|
+
], ngImport: i0, template: `
|
|
1535
1680
|
<ng-container kendoTooltipLocalizedMessages
|
|
1536
1681
|
i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"
|
|
1537
1682
|
closeTitle="Close"
|
|
@@ -1569,7 +1714,8 @@ TooltipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1569
1714
|
|
|
1570
1715
|
<div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>
|
|
1571
1716
|
`, 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
|
-
|
|
1717
|
+
}
|
|
1718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipContentComponent, decorators: [{
|
|
1573
1719
|
type: Component,
|
|
1574
1720
|
args: [{
|
|
1575
1721
|
selector: 'kendo-tooltip',
|
|
@@ -1695,15 +1841,52 @@ const TOOLTIP_SETTINGS = new InjectionToken('kendo-ui-tooltip-settings');
|
|
|
1695
1841
|
* ```
|
|
1696
1842
|
*/
|
|
1697
1843
|
class TooltipSettings {
|
|
1844
|
+
/**
|
|
1845
|
+
* Specifies if the Тooltip will display a callout arrow.
|
|
1846
|
+
*
|
|
1847
|
+
* The possible values are:
|
|
1848
|
+
* * `true` (default)
|
|
1849
|
+
* * `false`
|
|
1850
|
+
*/
|
|
1851
|
+
callout;
|
|
1852
|
+
/**
|
|
1853
|
+
* Specifies the title of the close button.
|
|
1854
|
+
*/
|
|
1855
|
+
closeTitle;
|
|
1856
|
+
/**
|
|
1857
|
+
* Specifies the position of the Tooltip that is
|
|
1858
|
+
* relative to the anchor element.
|
|
1859
|
+
*
|
|
1860
|
+
* The possible values are:
|
|
1861
|
+
* * `top` (default)
|
|
1862
|
+
* * `bottom`
|
|
1863
|
+
* * `left`
|
|
1864
|
+
* * `right`
|
|
1865
|
+
*/
|
|
1866
|
+
position;
|
|
1867
|
+
/**
|
|
1868
|
+
* Specifies when the Тooltip will be rendered.
|
|
1869
|
+
*
|
|
1870
|
+
* The possible values are:
|
|
1871
|
+
* * `hover` (default)
|
|
1872
|
+
* * `click`
|
|
1873
|
+
* * `none`
|
|
1874
|
+
*/
|
|
1875
|
+
showOn;
|
|
1876
|
+
/**
|
|
1877
|
+
* Specifies the delay in milliseconds before the Tooltip is shown.
|
|
1878
|
+
* * `100` (default) milliseconds.
|
|
1879
|
+
*/
|
|
1880
|
+
showAfter;
|
|
1698
1881
|
/**
|
|
1699
1882
|
* @hidden
|
|
1700
1883
|
*/
|
|
1701
1884
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1702
1885
|
constructor() { }
|
|
1886
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipSettings, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1887
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipSettings });
|
|
1703
1888
|
}
|
|
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: [{
|
|
1889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipSettings, decorators: [{
|
|
1707
1890
|
type: Injectable
|
|
1708
1891
|
}], ctorParameters: function () { return []; } });
|
|
1709
1892
|
|
|
@@ -1719,60 +1902,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1719
1902
|
* ```
|
|
1720
1903
|
*/
|
|
1721
1904
|
class TooltipDirective {
|
|
1905
|
+
tooltipWrapper;
|
|
1906
|
+
ngZone;
|
|
1907
|
+
renderer;
|
|
1908
|
+
popupService;
|
|
1909
|
+
/**
|
|
1910
|
+
* Specifies a selector for elements within a container which will display a tooltip
|
|
1911
|
+
* ([see example]({% slug anchorelements_tooltip %})). The possible values include any
|
|
1912
|
+
* DOM `selector`. The default value is `[title]`.
|
|
1913
|
+
*/
|
|
1914
|
+
filter = '[title]';
|
|
1915
|
+
/**
|
|
1916
|
+
* Specifies the position of the Tooltip that is relative to the
|
|
1917
|
+
* anchor element ([see example]({% slug positioning_tooltip %})).
|
|
1918
|
+
*
|
|
1919
|
+
* The possible values are:
|
|
1920
|
+
* * `top` (default)
|
|
1921
|
+
* * `bottom`
|
|
1922
|
+
* * `left`
|
|
1923
|
+
* * `right`
|
|
1924
|
+
*/
|
|
1925
|
+
position = 'top';
|
|
1926
|
+
/**
|
|
1927
|
+
* Renders the passed template as a header title of the Tooltip
|
|
1928
|
+
* ([see example]({% slug anchorelements_tooltip %})).
|
|
1929
|
+
*/
|
|
1930
|
+
titleTemplate;
|
|
1931
|
+
/**
|
|
1932
|
+
* Specifies when the Тooltip will be rendered
|
|
1933
|
+
* ([see example]({% slug programmaticopening_tooltip %})).
|
|
1934
|
+
*
|
|
1935
|
+
* The possible values are:
|
|
1936
|
+
* * `hover` (default)
|
|
1937
|
+
* * `click`
|
|
1938
|
+
* * `none`
|
|
1939
|
+
*/
|
|
1940
|
+
showOn;
|
|
1941
|
+
/**
|
|
1942
|
+
* Specifies the delay in milliseconds before the Tooltip is shown.
|
|
1943
|
+
* * `100` (default) milliseconds.
|
|
1944
|
+
*/
|
|
1945
|
+
showAfter = 100;
|
|
1946
|
+
/**
|
|
1947
|
+
* Specifies if the Тooltip will display a callout arrow.
|
|
1948
|
+
*
|
|
1949
|
+
* The possible values are:
|
|
1950
|
+
* * `true` (default)
|
|
1951
|
+
* * `false`
|
|
1952
|
+
*/
|
|
1953
|
+
callout = true;
|
|
1954
|
+
/**
|
|
1955
|
+
* Specifies if the Тooltip will display a **Close** button
|
|
1956
|
+
* ([see example]({% slug closable_tooltip %})).
|
|
1957
|
+
*
|
|
1958
|
+
* The possible values are:
|
|
1959
|
+
* * `true`
|
|
1960
|
+
* * `false`
|
|
1961
|
+
*/
|
|
1962
|
+
closable = false;
|
|
1963
|
+
/**
|
|
1964
|
+
* Specifies the offset in pixels between the Tooltip and the anchor. Defaults to `6` pixels.
|
|
1965
|
+
* If the `callout` property is set to `true`, the offset is rendered from the callout arrow.
|
|
1966
|
+
* If the `callout` property is set to `false`, the offset is rendered from the content of the Tooltip.
|
|
1967
|
+
*/
|
|
1968
|
+
offset = 6;
|
|
1969
|
+
/**
|
|
1970
|
+
* Specifies the width of the Тooltip ([see example]({% slug anchorelements_tooltip %})).
|
|
1971
|
+
*/
|
|
1972
|
+
tooltipWidth;
|
|
1973
|
+
/**
|
|
1974
|
+
* Specifies the height of the Тooltip.
|
|
1975
|
+
*/
|
|
1976
|
+
tooltipHeight;
|
|
1977
|
+
/**
|
|
1978
|
+
* Specifies a CSS class that will be added to the Tooltip.
|
|
1979
|
+
*/
|
|
1980
|
+
tooltipClass;
|
|
1981
|
+
/**
|
|
1982
|
+
* @hidden
|
|
1983
|
+
* Specifies a CSS class that will be added to the kendo-tooltip element.
|
|
1984
|
+
*/
|
|
1985
|
+
tooltipContentClass;
|
|
1986
|
+
/**
|
|
1987
|
+
* Provides screen boundary detection when the Тooltip is shown.
|
|
1988
|
+
*/
|
|
1989
|
+
collision;
|
|
1990
|
+
/**
|
|
1991
|
+
* Specifies the title of the close button.
|
|
1992
|
+
*/
|
|
1993
|
+
closeTitle;
|
|
1994
|
+
/**
|
|
1995
|
+
* Sets the content of the Tooltip as a template reference
|
|
1996
|
+
* ([see example]({% slug templates_tooltip %})).
|
|
1997
|
+
*/
|
|
1998
|
+
set tooltipTemplate(value) {
|
|
1999
|
+
this.template = value;
|
|
2000
|
+
}
|
|
2001
|
+
get tooltipTemplate() {
|
|
2002
|
+
return this.template;
|
|
2003
|
+
}
|
|
2004
|
+
popupRef;
|
|
2005
|
+
template;
|
|
2006
|
+
showTimeout;
|
|
2007
|
+
anchor = null;
|
|
2008
|
+
mouseOverSubscription;
|
|
2009
|
+
mouseOutSubscription;
|
|
2010
|
+
mouseClickSubscription;
|
|
2011
|
+
anchorTitleSubscription;
|
|
2012
|
+
popupPositionChangeSubscription;
|
|
2013
|
+
popupMouseOutSubscription;
|
|
2014
|
+
keyboardNavigationSubscription = new Subscription();
|
|
2015
|
+
closeClickSubscription;
|
|
2016
|
+
validPositions = ['top', 'bottom', 'right', 'left'];
|
|
2017
|
+
validShowOptions = ['hover', 'click', 'none'];
|
|
1722
2018
|
constructor(tooltipWrapper, ngZone, renderer, popupService, settings, legacySettings) {
|
|
1723
2019
|
this.tooltipWrapper = tooltipWrapper;
|
|
1724
2020
|
this.ngZone = ngZone;
|
|
1725
2021
|
this.renderer = renderer;
|
|
1726
2022
|
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
2023
|
validatePackage(packageMetadata);
|
|
1777
2024
|
Object.assign(this, settings, legacySettings);
|
|
1778
2025
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -1792,16 +2039,6 @@ class TooltipDirective {
|
|
|
1792
2039
|
.subscribe(e => this.onMouseOut(e));
|
|
1793
2040
|
});
|
|
1794
2041
|
}
|
|
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
2042
|
/**
|
|
1806
2043
|
* Shows the Tooltip.
|
|
1807
2044
|
* @param anchor— ElementRef|Element.
|
|
@@ -2092,10 +2329,10 @@ class TooltipDirective {
|
|
|
2092
2329
|
throw new Error(`Invalid value provided for showOn property.The available options are 'hover' or 'none'.`);
|
|
2093
2330
|
}
|
|
2094
2331
|
}
|
|
2332
|
+
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 });
|
|
2333
|
+
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
2334
|
}
|
|
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: [{
|
|
2335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
2099
2336
|
type: Directive,
|
|
2100
2337
|
args: [{
|
|
2101
2338
|
selector: '[kendoTooltip]',
|
|
@@ -2200,11 +2437,11 @@ const KENDO_TOOLTIPS = [
|
|
|
2200
2437
|
* ```
|
|
2201
2438
|
*/
|
|
2202
2439
|
class TooltipModule {
|
|
2440
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2441
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, imports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective], exports: [TooltipDirective, TooltipContentComponent, LocalizedMessagesDirective] });
|
|
2442
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, providers: [PopupService, ResizeBatchService, IconsService], imports: [TooltipContentComponent] });
|
|
2203
2443
|
}
|
|
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: [{
|
|
2444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, decorators: [{
|
|
2208
2445
|
type: NgModule,
|
|
2209
2446
|
args: [{
|
|
2210
2447
|
imports: [...KENDO_TOOLTIP],
|
|
@@ -2240,11 +2477,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2240
2477
|
* ```
|
|
2241
2478
|
*/
|
|
2242
2479
|
class PopoverModule {
|
|
2480
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2481
|
+
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] });
|
|
2482
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, providers: [PopupService, ResizeBatchService] });
|
|
2243
2483
|
}
|
|
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: [{
|
|
2484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, decorators: [{
|
|
2248
2485
|
type: NgModule,
|
|
2249
2486
|
args: [{
|
|
2250
2487
|
exports: [...KENDO_POPOVER],
|
|
@@ -2281,11 +2518,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2281
2518
|
* ```
|
|
2282
2519
|
*/
|
|
2283
2520
|
class TooltipsModule {
|
|
2521
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2522
|
+
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] });
|
|
2523
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, providers: [PopupService, ResizeBatchService, IconsService], imports: [TooltipContentComponent] });
|
|
2284
2524
|
}
|
|
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: [{
|
|
2525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipsModule, decorators: [{
|
|
2289
2526
|
type: NgModule,
|
|
2290
2527
|
args: [{
|
|
2291
2528
|
imports: [...KENDO_TOOLTIPS],
|