@progress/kendo-angular-tooltip 17.0.0-develop.9 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -32,82 +32,24 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
export class PopoverComponent {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
* @default true
|
|
54
|
-
*/
|
|
55
|
-
this.callout = true;
|
|
56
|
-
/**
|
|
57
|
-
* Enables and configures the Popover animation. [See example]({% slug animations_popover %})
|
|
58
|
-
*
|
|
59
|
-
* The possible options are:
|
|
60
|
-
*
|
|
61
|
-
* * `boolean`—Enables the default animation
|
|
62
|
-
* * `PopoverAnimation`—A configuration object which allows setting the `direction`, `duration` and `type` of the animation.
|
|
63
|
-
*
|
|
64
|
-
* @default false
|
|
65
|
-
*/
|
|
66
|
-
this.animation = false;
|
|
67
|
-
/**
|
|
68
|
-
* @hidden
|
|
69
|
-
* Determines the visibility of the Popover.
|
|
70
|
-
*/
|
|
71
|
-
this.visible = false;
|
|
72
|
-
/**
|
|
73
|
-
* Fires before the Popover is about to be shown ([see example]({% slug events_popover %})).
|
|
74
|
-
* The event is preventable. If canceled, the Popover will not be displayed. [See example]({% slug events_popover %})
|
|
75
|
-
*/
|
|
76
|
-
this.show = new EventEmitter();
|
|
77
|
-
/**
|
|
78
|
-
* Fires after the Popover has been shown and the animation has ended. [See example]({% slug events_popover %})
|
|
79
|
-
*/
|
|
80
|
-
this.shown = new EventEmitter();
|
|
81
|
-
/**
|
|
82
|
-
* Fires when the Popover is about to be hidden ([see example]({% slug events_popover %})).
|
|
83
|
-
* The event is preventable. If canceled, the Popover will remain visible.
|
|
84
|
-
*/
|
|
85
|
-
this.hide = new EventEmitter();
|
|
86
|
-
/**
|
|
87
|
-
* Fires after the Popover has been hidden and the animation has ended. [See example]({% slug events_popover %})
|
|
88
|
-
*/
|
|
89
|
-
this.hidden = new EventEmitter();
|
|
90
|
-
/**
|
|
91
|
-
* @hidden
|
|
92
|
-
*/
|
|
93
|
-
this.closeOnKeyDown = new EventEmitter();
|
|
94
|
-
/**
|
|
95
|
-
* @hidden
|
|
96
|
-
*/
|
|
97
|
-
this._width = 'auto';
|
|
98
|
-
/**
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
this._height = 'auto';
|
|
102
|
-
/**
|
|
103
|
-
* @hidden
|
|
104
|
-
*/
|
|
105
|
-
this.popoverId = '';
|
|
106
|
-
this._offset = 6;
|
|
107
|
-
this.subs = new Subscription();
|
|
108
|
-
this._templateData = () => null;
|
|
109
|
-
validatePackage(packageMetadata);
|
|
110
|
-
}
|
|
35
|
+
localization;
|
|
36
|
+
renderer;
|
|
37
|
+
element;
|
|
38
|
+
zone;
|
|
39
|
+
/**
|
|
40
|
+
* @hidden
|
|
41
|
+
*/
|
|
42
|
+
anchor;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the position of the Popover in relation to its anchor element. [See example]({% slug positioning_popover %})
|
|
45
|
+
*
|
|
46
|
+
* The possible options are:
|
|
47
|
+
* `top`
|
|
48
|
+
* `bottom`
|
|
49
|
+
* `right` (Default)
|
|
50
|
+
* `left`
|
|
51
|
+
*/
|
|
52
|
+
position = 'right';
|
|
111
53
|
/**
|
|
112
54
|
* Specifies the distance from the Popover to its anchor element in pixels.
|
|
113
55
|
*
|
|
@@ -142,6 +84,46 @@ export class PopoverComponent {
|
|
|
142
84
|
get height() {
|
|
143
85
|
return this._height;
|
|
144
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* @hidden
|
|
89
|
+
*/
|
|
90
|
+
direction;
|
|
91
|
+
/**
|
|
92
|
+
* Specifies the main header text of the Popover.
|
|
93
|
+
*
|
|
94
|
+
* If a `titleTemplate` is provided it would take precedence over the title.
|
|
95
|
+
*/
|
|
96
|
+
title;
|
|
97
|
+
/**
|
|
98
|
+
* @hidden
|
|
99
|
+
* Specifies the secondary header text of the Popover.
|
|
100
|
+
*
|
|
101
|
+
* If a `titleTemplate` is provided it would take precedence over the subtitle.
|
|
102
|
+
*/
|
|
103
|
+
subtitle;
|
|
104
|
+
/**
|
|
105
|
+
* Represents the text that will be rendered in the Popover body section.
|
|
106
|
+
*
|
|
107
|
+
* If a `bodyTemplate` is provided it would take precedence over this text.
|
|
108
|
+
*/
|
|
109
|
+
body;
|
|
110
|
+
/**
|
|
111
|
+
* Determines whether a callout will be rendered along the Popover. [See example]({% slug callout_popover %})
|
|
112
|
+
*
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
callout = true;
|
|
116
|
+
/**
|
|
117
|
+
* Enables and configures the Popover animation. [See example]({% slug animations_popover %})
|
|
118
|
+
*
|
|
119
|
+
* The possible options are:
|
|
120
|
+
*
|
|
121
|
+
* * `boolean`—Enables the default animation
|
|
122
|
+
* * `PopoverAnimation`—A configuration object which allows setting the `direction`, `duration` and `type` of the animation.
|
|
123
|
+
*
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
animation = false;
|
|
145
127
|
/**
|
|
146
128
|
* Defines a callback function which returns custom data passed to the Popover templates.
|
|
147
129
|
* It exposes the current anchor element as an argument. [See example](slug:templates_popover#toc-passing-data-to-templates)
|
|
@@ -155,6 +137,11 @@ export class PopoverComponent {
|
|
|
155
137
|
get templateData() {
|
|
156
138
|
return this._templateData;
|
|
157
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* @hidden
|
|
142
|
+
* Determines the visibility of the Popover.
|
|
143
|
+
*/
|
|
144
|
+
visible = false;
|
|
158
145
|
/**
|
|
159
146
|
* @hidden
|
|
160
147
|
*/
|
|
@@ -167,6 +154,77 @@ export class PopoverComponent {
|
|
|
167
154
|
get hasAttributeHidden() {
|
|
168
155
|
return !this.visible;
|
|
169
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Fires before the Popover is about to be shown ([see example]({% slug events_popover %})).
|
|
159
|
+
* The event is preventable. If canceled, the Popover will not be displayed. [See example]({% slug events_popover %})
|
|
160
|
+
*/
|
|
161
|
+
show = new EventEmitter();
|
|
162
|
+
/**
|
|
163
|
+
* Fires after the Popover has been shown and the animation has ended. [See example]({% slug events_popover %})
|
|
164
|
+
*/
|
|
165
|
+
shown = new EventEmitter();
|
|
166
|
+
/**
|
|
167
|
+
* Fires when the Popover is about to be hidden ([see example]({% slug events_popover %})).
|
|
168
|
+
* The event is preventable. If canceled, the Popover will remain visible.
|
|
169
|
+
*/
|
|
170
|
+
hide = new EventEmitter();
|
|
171
|
+
/**
|
|
172
|
+
* Fires after the Popover has been hidden and the animation has ended. [See example]({% slug events_popover %})
|
|
173
|
+
*/
|
|
174
|
+
hidden = new EventEmitter();
|
|
175
|
+
/**
|
|
176
|
+
* @hidden
|
|
177
|
+
*/
|
|
178
|
+
closeOnKeyDown = new EventEmitter();
|
|
179
|
+
/**
|
|
180
|
+
* @hidden
|
|
181
|
+
*/
|
|
182
|
+
popoverWrapper;
|
|
183
|
+
/**
|
|
184
|
+
* @hidden
|
|
185
|
+
*/
|
|
186
|
+
titleTemplateWrapper;
|
|
187
|
+
/**
|
|
188
|
+
* @hidden
|
|
189
|
+
*/
|
|
190
|
+
bodyTemplateWrapper;
|
|
191
|
+
/**
|
|
192
|
+
* @hidden
|
|
193
|
+
*/
|
|
194
|
+
titleTemplate;
|
|
195
|
+
/**
|
|
196
|
+
* @hidden
|
|
197
|
+
*/
|
|
198
|
+
bodyTemplate;
|
|
199
|
+
/**
|
|
200
|
+
* @hidden
|
|
201
|
+
*/
|
|
202
|
+
actionsTemplate;
|
|
203
|
+
/**
|
|
204
|
+
* @hidden
|
|
205
|
+
*/
|
|
206
|
+
contextData;
|
|
207
|
+
/**
|
|
208
|
+
* @hidden
|
|
209
|
+
*/
|
|
210
|
+
_width = 'auto';
|
|
211
|
+
/**
|
|
212
|
+
* @hidden
|
|
213
|
+
*/
|
|
214
|
+
_height = 'auto';
|
|
215
|
+
/**
|
|
216
|
+
* @hidden
|
|
217
|
+
*/
|
|
218
|
+
popoverId = '';
|
|
219
|
+
_offset = 6;
|
|
220
|
+
subs = new Subscription();
|
|
221
|
+
constructor(localization, renderer, element, zone) {
|
|
222
|
+
this.localization = localization;
|
|
223
|
+
this.renderer = renderer;
|
|
224
|
+
this.element = element;
|
|
225
|
+
this.zone = zone;
|
|
226
|
+
validatePackage(packageMetadata);
|
|
227
|
+
}
|
|
170
228
|
ngOnInit() {
|
|
171
229
|
this.popoverId = getId('k-popover');
|
|
172
230
|
this.subs.add(this.localization.changes.subscribe(({ rtl }) => { this.direction = rtl ? 'rtl' : 'ltr'; }));
|
|
@@ -212,6 +270,7 @@ export class PopoverComponent {
|
|
|
212
270
|
this.closeOnKeyDown.emit();
|
|
213
271
|
}
|
|
214
272
|
}
|
|
273
|
+
_templateData = () => null;
|
|
215
274
|
keepFocusWithinComponent(target, event) {
|
|
216
275
|
const wrapper = this.popoverWrapper.nativeElement;
|
|
217
276
|
const [firstFocusable, lastFocusable] = getFirstAndLastFocusable(wrapper);
|
|
@@ -248,15 +307,14 @@ export class PopoverComponent {
|
|
|
248
307
|
this.renderer.setAttribute(wrapper, 'id', this.popoverId);
|
|
249
308
|
this.renderer.setAttribute(wrapper, 'role', focusablePopoverChildren.length > 0 ? 'dialog' : 'tooltip');
|
|
250
309
|
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
], 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: `
|
|
310
|
+
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 });
|
|
311
|
+
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: [
|
|
312
|
+
LocalizationService,
|
|
313
|
+
{
|
|
314
|
+
provide: L10N_PREFIX,
|
|
315
|
+
useValue: 'kendo.popover'
|
|
316
|
+
}
|
|
317
|
+
], 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: `
|
|
260
318
|
<div #popoverWrapper *ngIf="visible" class="k-popover k-popup" [ngStyle]="{'width': width, 'height': height}">
|
|
261
319
|
<div class="k-popover-callout" [ngClass]="getCalloutPosition()" *ngIf="callout"></div>
|
|
262
320
|
|
|
@@ -294,7 +352,8 @@ PopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
|
294
352
|
</ng-template>
|
|
295
353
|
</div>
|
|
296
354
|
`, 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"] }] });
|
|
297
|
-
|
|
355
|
+
}
|
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
298
357
|
type: Component,
|
|
299
358
|
args: [{
|
|
300
359
|
selector: 'kendo-popover',
|
|
@@ -10,13 +10,17 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
export class PopoverService {
|
|
13
|
+
ngZone;
|
|
14
|
+
_pointerOverPopup = new BehaviorSubject(null);
|
|
15
|
+
_pointerOverAnchor = new BehaviorSubject(null);
|
|
16
|
+
_focusInsidePopover = new BehaviorSubject(null);
|
|
17
|
+
_hidePopover = new Subject();
|
|
18
|
+
_isOrigin;
|
|
19
|
+
originAnchor;
|
|
20
|
+
currentAnchor;
|
|
21
|
+
subs = new Subscription();
|
|
13
22
|
constructor(ngZone) {
|
|
14
23
|
this.ngZone = ngZone;
|
|
15
|
-
this._pointerOverPopup = new BehaviorSubject(null);
|
|
16
|
-
this._pointerOverAnchor = new BehaviorSubject(null);
|
|
17
|
-
this._focusInsidePopover = new BehaviorSubject(null);
|
|
18
|
-
this._hidePopover = new Subject();
|
|
19
|
-
this.subs = new Subscription();
|
|
20
24
|
this.monitor();
|
|
21
25
|
}
|
|
22
26
|
ngOnDestroy() {
|
|
@@ -59,9 +63,9 @@ export class PopoverService {
|
|
|
59
63
|
this._hidePopover.next([isPopoverHovered, isAnchorHovered, this._isOrigin, this.currentAnchor]);
|
|
60
64
|
}));
|
|
61
65
|
}
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
67
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService });
|
|
62
68
|
}
|
|
63
|
-
|
|
64
|
-
PopoverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverService });
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverService, decorators: [{
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverService, decorators: [{
|
|
66
70
|
type: Injectable
|
|
67
71
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
@@ -11,13 +11,14 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* with the `kendoPopoverActionsTemplate` directive inside the `<kendo-popover>` tag.
|
|
12
12
|
*/
|
|
13
13
|
export class PopoverActionsTemplateDirective {
|
|
14
|
+
templateRef;
|
|
14
15
|
constructor(templateRef) {
|
|
15
16
|
this.templateRef = templateRef;
|
|
16
17
|
}
|
|
18
|
+
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 });
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverActionsTemplateDirective, isStandalone: true, selector: "[kendoPopoverActionsTemplate]", ngImport: i0 });
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
PopoverActionsTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverActionsTemplateDirective, isStandalone: true, selector: "[kendoPopoverActionsTemplate]", ngImport: i0 });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverActionsTemplateDirective, decorators: [{
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverActionsTemplateDirective, decorators: [{
|
|
21
22
|
type: Directive,
|
|
22
23
|
args: [{
|
|
23
24
|
selector: '[kendoPopoverActionsTemplate]',
|
|
@@ -11,13 +11,14 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* with the `kendoPopoverBodyTemplate` directive inside the `<kendo-popover>` tag.
|
|
12
12
|
*/
|
|
13
13
|
export class PopoverBodyTemplateDirective {
|
|
14
|
+
templateRef;
|
|
14
15
|
constructor(templateRef) {
|
|
15
16
|
this.templateRef = templateRef;
|
|
16
17
|
}
|
|
18
|
+
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 });
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverBodyTemplateDirective, isStandalone: true, selector: "[kendoPopoverBodyTemplate]", ngImport: i0 });
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
PopoverBodyTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverBodyTemplateDirective, isStandalone: true, selector: "[kendoPopoverBodyTemplate]", ngImport: i0 });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverBodyTemplateDirective, decorators: [{
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverBodyTemplateDirective, decorators: [{
|
|
21
22
|
type: Directive,
|
|
22
23
|
args: [{
|
|
23
24
|
selector: '[kendoPopoverBodyTemplate]',
|
|
@@ -11,13 +11,14 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* with the `kendoPopoverTitleTemplate` directive inside the `<kendo-popover>` tag.
|
|
12
12
|
*/
|
|
13
13
|
export class PopoverTitleTemplateDirective {
|
|
14
|
+
templateRef;
|
|
14
15
|
constructor(templateRef) {
|
|
15
16
|
this.templateRef = templateRef;
|
|
16
17
|
}
|
|
18
|
+
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 });
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PopoverTitleTemplateDirective, isStandalone: true, selector: "[kendoPopoverTitleTemplate]", ngImport: i0 });
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
PopoverTitleTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PopoverTitleTemplateDirective, isStandalone: true, selector: "[kendoPopoverTitleTemplate]", ngImport: i0 });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverTitleTemplateDirective, decorators: [{
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverTitleTemplateDirective, decorators: [{
|
|
21
22
|
type: Directive,
|
|
22
23
|
args: [{
|
|
23
24
|
selector: '[kendoPopoverTitleTemplate]',
|
|
@@ -40,11 +40,11 @@ import * as i6 from "./popover/container.directive";
|
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
export class PopoverModule {
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
44
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, imports: [i1.PopoverComponent, i2.PopoverActionsTemplateDirective, i3.PopoverBodyTemplateDirective, i4.PopoverTitleTemplateDirective, i5.PopoverAnchorDirective, i6.PopoverContainerDirective], exports: [i1.PopoverComponent, i2.PopoverActionsTemplateDirective, i3.PopoverBodyTemplateDirective, i4.PopoverTitleTemplateDirective, i5.PopoverAnchorDirective, i6.PopoverContainerDirective] });
|
|
45
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, providers: [PopupService, ResizeBatchService] });
|
|
43
46
|
}
|
|
44
|
-
|
|
45
|
-
PopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PopoverModule, imports: [i1.PopoverComponent, i2.PopoverActionsTemplateDirective, i3.PopoverBodyTemplateDirective, i4.PopoverTitleTemplateDirective, i5.PopoverAnchorDirective, i6.PopoverContainerDirective], exports: [i1.PopoverComponent, i2.PopoverActionsTemplateDirective, i3.PopoverBodyTemplateDirective, i4.PopoverTitleTemplateDirective, i5.PopoverAnchorDirective, i6.PopoverContainerDirective] });
|
|
46
|
-
PopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverModule, providers: [PopupService, ResizeBatchService], imports: [i1.PopoverComponent] });
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PopoverModule, decorators: [{
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverModule, decorators: [{
|
|
48
48
|
type: NgModule,
|
|
49
49
|
args: [{
|
|
50
50
|
exports: [...KENDO_POPOVER],
|
|
@@ -15,48 +15,21 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
|
15
15
|
* @hidden
|
|
16
16
|
*/
|
|
17
17
|
export class TooltipContentComponent {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.callout = true;
|
|
30
|
-
this.calloutStyles = (position, calloutSize, isFlip) => {
|
|
31
|
-
const styles = {};
|
|
32
|
-
const isVertical = position === 'top' || position === 'bottom';
|
|
33
|
-
const flipDeg = '180deg';
|
|
34
|
-
const zeroDeg = '0deg';
|
|
35
|
-
if (!isFlip) {
|
|
36
|
-
styles.transform = isVertical ? `rotateX(${zeroDeg})` : `rotateY(${zeroDeg})`;
|
|
37
|
-
return styles;
|
|
38
|
-
}
|
|
39
|
-
if (position === 'top') {
|
|
40
|
-
styles.bottom = 'unset';
|
|
41
|
-
}
|
|
42
|
-
else if (position === 'bottom') {
|
|
43
|
-
styles.top = 'unset';
|
|
44
|
-
}
|
|
45
|
-
else if (position === 'left') {
|
|
46
|
-
styles.right = 'unset';
|
|
47
|
-
}
|
|
48
|
-
else if (position === 'right') {
|
|
49
|
-
styles.left = 'unset';
|
|
50
|
-
}
|
|
51
|
-
styles[position] = `${-calloutSize}px`;
|
|
52
|
-
styles.transform = isVertical ? `rotateX(${flipDeg})` : `rotateY(${flipDeg})`;
|
|
53
|
-
return styles;
|
|
54
|
-
};
|
|
55
|
-
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
56
|
-
}
|
|
18
|
+
content;
|
|
19
|
+
localizationService;
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
xIcon = xIcon;
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
direction;
|
|
28
|
+
close = new EventEmitter();
|
|
57
29
|
get cssClasses() {
|
|
58
30
|
return 'k-tooltip';
|
|
59
31
|
}
|
|
32
|
+
hostRole = 'tooltip';
|
|
60
33
|
get hostId() {
|
|
61
34
|
return this.tooltipId;
|
|
62
35
|
}
|
|
@@ -66,6 +39,26 @@ export class TooltipContentComponent {
|
|
|
66
39
|
get cssPosition() {
|
|
67
40
|
return 'relative';
|
|
68
41
|
}
|
|
42
|
+
tooltipWidth = null;
|
|
43
|
+
tooltipHeight = null;
|
|
44
|
+
titleTemplate;
|
|
45
|
+
anchor;
|
|
46
|
+
closable;
|
|
47
|
+
templateRef;
|
|
48
|
+
templateString;
|
|
49
|
+
closeTitle;
|
|
50
|
+
callout = true;
|
|
51
|
+
position;
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
tooltipId;
|
|
56
|
+
dynamicRTLSubscription;
|
|
57
|
+
constructor(content, localizationService) {
|
|
58
|
+
this.content = content;
|
|
59
|
+
this.localizationService = localizationService;
|
|
60
|
+
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
61
|
+
}
|
|
69
62
|
ngOnInit() {
|
|
70
63
|
this.tooltipId = getId('tooltip');
|
|
71
64
|
this.dynamicRTLSubscription = this.localizationService.changes
|
|
@@ -113,15 +106,39 @@ export class TooltipContentComponent {
|
|
|
113
106
|
callout.style[style] = calloutStyles[style];
|
|
114
107
|
});
|
|
115
108
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
calloutStyles = (position, calloutSize, isFlip) => {
|
|
110
|
+
const styles = {};
|
|
111
|
+
const isVertical = position === 'top' || position === 'bottom';
|
|
112
|
+
const flipDeg = '180deg';
|
|
113
|
+
const zeroDeg = '0deg';
|
|
114
|
+
if (!isFlip) {
|
|
115
|
+
styles.transform = isVertical ? `rotateX(${zeroDeg})` : `rotateY(${zeroDeg})`;
|
|
116
|
+
return styles;
|
|
123
117
|
}
|
|
124
|
-
|
|
118
|
+
if (position === 'top') {
|
|
119
|
+
styles.bottom = 'unset';
|
|
120
|
+
}
|
|
121
|
+
else if (position === 'bottom') {
|
|
122
|
+
styles.top = 'unset';
|
|
123
|
+
}
|
|
124
|
+
else if (position === 'left') {
|
|
125
|
+
styles.right = 'unset';
|
|
126
|
+
}
|
|
127
|
+
else if (position === 'right') {
|
|
128
|
+
styles.left = 'unset';
|
|
129
|
+
}
|
|
130
|
+
styles[position] = `${-calloutSize}px`;
|
|
131
|
+
styles.transform = isVertical ? `rotateX(${flipDeg})` : `rotateY(${flipDeg})`;
|
|
132
|
+
return styles;
|
|
133
|
+
};
|
|
134
|
+
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 });
|
|
135
|
+
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: [
|
|
136
|
+
LocalizationService,
|
|
137
|
+
{
|
|
138
|
+
provide: L10N_PREFIX,
|
|
139
|
+
useValue: 'kendo.tooltip'
|
|
140
|
+
}
|
|
141
|
+
], ngImport: i0, template: `
|
|
125
142
|
<ng-container kendoTooltipLocalizedMessages
|
|
126
143
|
i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"
|
|
127
144
|
closeTitle="Close"
|
|
@@ -159,7 +176,8 @@ TooltipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
159
176
|
|
|
160
177
|
<div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>
|
|
161
178
|
`, 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"] }] });
|
|
162
|
-
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipContentComponent, decorators: [{
|
|
163
181
|
type: Component,
|
|
164
182
|
args: [{
|
|
165
183
|
selector: 'kendo-tooltip',
|