@progress/kendo-angular-tooltip 25.0.0-develop.22 → 25.0.0-develop.23
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.
|
@@ -302,8 +302,8 @@ const packageMetadata = {
|
|
|
302
302
|
productName: 'Kendo UI for Angular',
|
|
303
303
|
productCode: 'KENDOUIANGULAR',
|
|
304
304
|
productCodes: ['KENDOUIANGULAR'],
|
|
305
|
-
publishDate:
|
|
306
|
-
version: '25.0.0-develop.
|
|
305
|
+
publishDate: 1785940435,
|
|
306
|
+
version: '25.0.0-develop.23',
|
|
307
307
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
308
308
|
};
|
|
309
309
|
|
|
@@ -427,6 +427,32 @@ class PopoverComponent {
|
|
|
427
427
|
* @hidden
|
|
428
428
|
*/
|
|
429
429
|
anchor;
|
|
430
|
+
/**
|
|
431
|
+
* Specifies CSS classes to apply to the Popover element.
|
|
432
|
+
* Supports the same values as [ngClass](https://angular.dev/api/common/NgClass).
|
|
433
|
+
*/
|
|
434
|
+
popupClass;
|
|
435
|
+
/**
|
|
436
|
+
* Provides screen boundary detection when the Popover is shown.
|
|
437
|
+
*/
|
|
438
|
+
set collision(value) {
|
|
439
|
+
this._collision.set(value);
|
|
440
|
+
}
|
|
441
|
+
get collision() {
|
|
442
|
+
return this._collision();
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Configures the popup settings for the Popover.
|
|
446
|
+
* Accepts a `PopupSettings` object with `popupClass` and `collision` properties.
|
|
447
|
+
*/
|
|
448
|
+
set popupSettings(value) {
|
|
449
|
+
if (value?.popupClass !== undefined) {
|
|
450
|
+
this.popupClass = value.popupClass;
|
|
451
|
+
}
|
|
452
|
+
if (value?.collision !== undefined) {
|
|
453
|
+
this._collision.set(value.collision);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
430
456
|
/**
|
|
431
457
|
* Specifies the position of the Popover relative to its anchor element. [See example](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/positioning).
|
|
432
458
|
*
|
|
@@ -631,6 +657,7 @@ class PopoverComponent {
|
|
|
631
657
|
* @hidden
|
|
632
658
|
*/
|
|
633
659
|
popoverId = '';
|
|
660
|
+
_collision = signal(null, ...(ngDevMode ? [{ debugName: "_collision" }] : []));
|
|
634
661
|
_position = signal('right', ...(ngDevMode ? [{ debugName: "_position" }] : []));
|
|
635
662
|
_offset = signal(6, ...(ngDevMode ? [{ debugName: "_offset" }] : []));
|
|
636
663
|
_widthValue = signal('auto', ...(ngDevMode ? [{ debugName: "_widthValue" }] : []));
|
|
@@ -727,7 +754,7 @@ class PopoverComponent {
|
|
|
727
754
|
this.renderer.setAttribute(wrapper, 'role', focusablePopoverChildren.length > 0 ? 'dialog' : 'tooltip');
|
|
728
755
|
}
|
|
729
756
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: PopoverComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
730
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.26", 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: [
|
|
757
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.26", type: PopoverComponent, isStandalone: true, selector: "kendo-popover", inputs: { popupClass: "popupClass", collision: "collision", popupSettings: "popupSettings", 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: [
|
|
731
758
|
LocalizationService,
|
|
732
759
|
{
|
|
733
760
|
provide: L10N_PREFIX,
|
|
@@ -735,7 +762,7 @@ class PopoverComponent {
|
|
|
735
762
|
}
|
|
736
763
|
], 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: `
|
|
737
764
|
@if (visible) {
|
|
738
|
-
<div #popoverWrapper class="k-popover k-popup" [ngStyle]="{'width': width, 'height': height}">
|
|
765
|
+
<div #popoverWrapper class="k-popover k-popup" [ngClass]="popupClass" [ngStyle]="{'width': width, 'height': height}">
|
|
739
766
|
@if (callout) {
|
|
740
767
|
<div class="k-popover-callout" [ngClass]="getCalloutPosition()"></div>
|
|
741
768
|
}
|
|
@@ -836,7 +863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImpo
|
|
|
836
863
|
],
|
|
837
864
|
template: `
|
|
838
865
|
@if (visible) {
|
|
839
|
-
<div #popoverWrapper class="k-popover k-popup" [ngStyle]="{'width': width, 'height': height}">
|
|
866
|
+
<div #popoverWrapper class="k-popover k-popup" [ngClass]="popupClass" [ngStyle]="{'width': width, 'height': height}">
|
|
840
867
|
@if (callout) {
|
|
841
868
|
<div class="k-popover-callout" [ngClass]="getCalloutPosition()"></div>
|
|
842
869
|
}
|
|
@@ -927,7 +954,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImpo
|
|
|
927
954
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
928
955
|
imports: [NgStyle, NgClass, NgTemplateOutlet]
|
|
929
956
|
}]
|
|
930
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: {
|
|
957
|
+
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { popupClass: [{
|
|
958
|
+
type: Input
|
|
959
|
+
}], collision: [{
|
|
960
|
+
type: Input
|
|
961
|
+
}], popupSettings: [{
|
|
962
|
+
type: Input
|
|
963
|
+
}], position: [{
|
|
931
964
|
type: Input
|
|
932
965
|
}], offset: [{
|
|
933
966
|
type: Input
|
|
@@ -993,6 +1026,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImpo
|
|
|
993
1026
|
}] } });
|
|
994
1027
|
|
|
995
1028
|
const validShowOptions = ['hover', 'click', 'none', 'focus'];
|
|
1029
|
+
const flipMap = {
|
|
1030
|
+
top: { vertical: 'bottom', horizontal: 'top' },
|
|
1031
|
+
bottom: { vertical: 'top', horizontal: 'bottom' },
|
|
1032
|
+
left: { horizontal: 'right', vertical: 'left' },
|
|
1033
|
+
right: { horizontal: 'left', vertical: 'right' }
|
|
1034
|
+
};
|
|
996
1035
|
/**
|
|
997
1036
|
* @hidden
|
|
998
1037
|
*/
|
|
@@ -1125,6 +1164,7 @@ class PopoverDirectivesBase {
|
|
|
1125
1164
|
const popupAlign = alignSettings.popupAlign;
|
|
1126
1165
|
const popupMargin = alignSettings.popupMargin;
|
|
1127
1166
|
const _animation = popoverComp.animation;
|
|
1167
|
+
const _collision = (popoverComp.collision || { horizontal: 'flip', vertical: 'flip' });
|
|
1128
1168
|
this.popupRef = this.popupService.open({
|
|
1129
1169
|
anchor: { nativeElement: this.anchor },
|
|
1130
1170
|
animate: _animation,
|
|
@@ -1132,7 +1172,7 @@ class PopoverDirectivesBase {
|
|
|
1132
1172
|
popupAlign,
|
|
1133
1173
|
anchorAlign,
|
|
1134
1174
|
margin: popupMargin,
|
|
1135
|
-
collision:
|
|
1175
|
+
collision: _collision
|
|
1136
1176
|
});
|
|
1137
1177
|
const popupInstance = this.popupRef.content.instance;
|
|
1138
1178
|
// Avoid adding the default k-popup class which leads to visual and rendering discrepancies
|
|
@@ -1154,6 +1194,20 @@ class PopoverDirectivesBase {
|
|
|
1154
1194
|
this.hide();
|
|
1155
1195
|
}));
|
|
1156
1196
|
this.applySettings(this.popupRef.content, popoverComp);
|
|
1197
|
+
this._popupSubs.add(this.popupRef.popupPositionChange.subscribe(({ flip }) => {
|
|
1198
|
+
const configuredPos = popoverComp.position;
|
|
1199
|
+
let actualPos = configuredPos;
|
|
1200
|
+
if (flip.horizontal) {
|
|
1201
|
+
actualPos = flipMap[actualPos].horizontal;
|
|
1202
|
+
}
|
|
1203
|
+
if (flip.vertical) {
|
|
1204
|
+
actualPos = flipMap[actualPos].vertical;
|
|
1205
|
+
}
|
|
1206
|
+
if (actualPos !== popupInstance.position) {
|
|
1207
|
+
popupInstance.position = actualPos;
|
|
1208
|
+
this.popupRef.content.changeDetectorRef.detectChanges();
|
|
1209
|
+
}
|
|
1210
|
+
}));
|
|
1157
1211
|
this.monitorPopup();
|
|
1158
1212
|
this.initializeCompletionEvents(popoverComp, this.anchor);
|
|
1159
1213
|
}
|
|
@@ -1198,6 +1252,7 @@ class PopoverDirectivesBase {
|
|
|
1198
1252
|
content.visible = true;
|
|
1199
1253
|
content.anchor = this.anchor;
|
|
1200
1254
|
content.position = popover.position;
|
|
1255
|
+
content.popupClass = popover.popupClass;
|
|
1201
1256
|
content.offset = popover.offset;
|
|
1202
1257
|
content.width = popover.width;
|
|
1203
1258
|
content.height = popover.height;
|
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ComponentMessages, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { TemplateRef, OnInit, OnDestroy, EventEmitter, ElementRef, Renderer2, NgZone, ComponentRef, SimpleChanges, ChangeDetectorRef, InjectionToken, OnChanges, AfterViewChecked, Injector } from '@angular/core';
|
|
8
|
-
import { PopupRef, PopupAnimation,
|
|
8
|
+
import { PopupRef, PopupAnimation, Collision, PopupService } from '@progress/kendo-angular-popup';
|
|
9
9
|
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
10
10
|
import { Observable, Subscription } from 'rxjs';
|
|
11
11
|
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
@@ -177,6 +177,21 @@ declare class PopoverHiddenEvent {
|
|
|
177
177
|
*/
|
|
178
178
|
type PopoverAnimation = PopupAnimation | boolean;
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Configures the popup settings for the Popover component.
|
|
182
|
+
*/
|
|
183
|
+
interface PopupSettings {
|
|
184
|
+
/**
|
|
185
|
+
* Specifies CSS classes to apply to the Popup element of the Popover.
|
|
186
|
+
* Supports the same values as [ngClass](https://angular.dev/api/common/NgClass).
|
|
187
|
+
*/
|
|
188
|
+
popupClass?: string | string[] | Set<string>;
|
|
189
|
+
/**
|
|
190
|
+
* Provides screen boundary detection when the Popover is shown.
|
|
191
|
+
*/
|
|
192
|
+
collision?: Collision;
|
|
193
|
+
}
|
|
194
|
+
|
|
180
195
|
/**
|
|
181
196
|
* Represents the [Kendo UI Popover component for Angular](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover).
|
|
182
197
|
* Displays additional information related to a target element.
|
|
@@ -198,6 +213,21 @@ declare class PopoverComponent implements OnInit, OnDestroy {
|
|
|
198
213
|
* @hidden
|
|
199
214
|
*/
|
|
200
215
|
anchor: Element;
|
|
216
|
+
/**
|
|
217
|
+
* Specifies CSS classes to apply to the Popover element.
|
|
218
|
+
* Supports the same values as [ngClass](https://angular.dev/api/common/NgClass).
|
|
219
|
+
*/
|
|
220
|
+
popupClass: string | string[] | Set<string>;
|
|
221
|
+
/**
|
|
222
|
+
* Provides screen boundary detection when the Popover is shown.
|
|
223
|
+
*/
|
|
224
|
+
set collision(value: Collision);
|
|
225
|
+
get collision(): Collision;
|
|
226
|
+
/**
|
|
227
|
+
* Configures the popup settings for the Popover.
|
|
228
|
+
* Accepts a `PopupSettings` object with `popupClass` and `collision` properties.
|
|
229
|
+
*/
|
|
230
|
+
set popupSettings(value: PopupSettings);
|
|
201
231
|
/**
|
|
202
232
|
* Specifies the position of the Popover relative to its anchor element. [See example](https://www.telerik.com/kendo-angular-ui/components/tooltips/popover/positioning).
|
|
203
233
|
*
|
|
@@ -344,6 +374,7 @@ declare class PopoverComponent implements OnInit, OnDestroy {
|
|
|
344
374
|
* @hidden
|
|
345
375
|
*/
|
|
346
376
|
popoverId: string;
|
|
377
|
+
private _collision;
|
|
347
378
|
private _position;
|
|
348
379
|
private _offset;
|
|
349
380
|
private _widthValue;
|
|
@@ -370,7 +401,7 @@ declare class PopoverComponent implements OnInit, OnDestroy {
|
|
|
370
401
|
private keepFocusWithinComponent;
|
|
371
402
|
private setAriaAttributes;
|
|
372
403
|
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverComponent, never>;
|
|
373
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PopoverComponent, "kendo-popover", never, { "position": { "alias": "position"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "body": { "alias": "body"; "required": false; }; "callout": { "alias": "callout"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "templateData": { "alias": "templateData"; "required": false; }; }, { "show": "show"; "shown": "shown"; "hide": "hide"; "hidden": "hidden"; "closeOnKeyDown": "closeOnKeyDown"; }, ["titleTemplate", "bodyTemplate", "actionsTemplate"], never, true, never>;
|
|
404
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PopoverComponent, "kendo-popover", never, { "popupClass": { "alias": "popupClass"; "required": false; }; "collision": { "alias": "collision"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "position": { "alias": "position"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "body": { "alias": "body"; "required": false; }; "callout": { "alias": "callout"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "templateData": { "alias": "templateData"; "required": false; }; }, { "show": "show"; "shown": "shown"; "hide": "hide"; "hidden": "hidden"; "closeOnKeyDown": "closeOnKeyDown"; }, ["titleTemplate", "bodyTemplate", "actionsTemplate"], never, true, never>;
|
|
374
405
|
}
|
|
375
406
|
|
|
376
407
|
/**
|
|
@@ -1068,4 +1099,4 @@ declare class TooltipsModule {
|
|
|
1068
1099
|
}
|
|
1069
1100
|
|
|
1070
1101
|
export { KENDO_POPOVER, KENDO_TOOLTIP, KENDO_TOOLTIPS, LocalizedMessagesDirective, PopoverActionsTemplateDirective, PopoverAnchorDirective, PopoverBodyTemplateDirective, PopoverComponent, PopoverContainerDirective, PopoverHiddenEvent, PopoverHideEvent, PopoverModule, PopoverShowEvent, PopoverShownEvent, PopoverTitleTemplateDirective, TOOLTIP_SETTINGS, TooltipContentComponent, TooltipDirective, TooltipModule, TooltipSettings, TooltipsModule };
|
|
1071
|
-
export type { PopoverAnimation, PopoverDataFn, PopoverFn, PopoverShowOption, Position, ShowOption, TooltipThemeColor };
|
|
1102
|
+
export type { PopoverAnimation, PopoverDataFn, PopoverFn, PopoverShowOption, PopupSettings, Position, ShowOption, TooltipThemeColor };
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "25.0.0-develop.
|
|
10
|
+
"publishDate": 1785940435,
|
|
11
|
+
"version": "25.0.0-develop.23",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-tooltip",
|
|
3
|
-
"version": "25.0.0-develop.
|
|
3
|
+
"version": "25.0.0-develop.23",
|
|
4
4
|
"description": "Kendo UI Tooltip for Angular - A highly customizable and easily themeable tooltip from the creators developers trust for professional Angular components.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"package": {
|
|
37
37
|
"productName": "Kendo UI for Angular",
|
|
38
38
|
"productCode": "KENDOUIANGULAR",
|
|
39
|
-
"publishDate":
|
|
39
|
+
"publishDate": 1785940435,
|
|
40
40
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"@angular/core": "20 - 22",
|
|
47
47
|
"@angular/platform-browser": "20 - 22",
|
|
48
48
|
"@progress/kendo-licensing": "^1.11.0",
|
|
49
|
-
"@progress/kendo-angular-common": "25.0.0-develop.
|
|
50
|
-
"@progress/kendo-angular-l10n": "25.0.0-develop.
|
|
51
|
-
"@progress/kendo-angular-popup": "25.0.0-develop.
|
|
52
|
-
"@progress/kendo-angular-icons": "25.0.0-develop.
|
|
49
|
+
"@progress/kendo-angular-common": "25.0.0-develop.23",
|
|
50
|
+
"@progress/kendo-angular-l10n": "25.0.0-develop.23",
|
|
51
|
+
"@progress/kendo-angular-popup": "25.0.0-develop.23",
|
|
52
|
+
"@progress/kendo-angular-icons": "25.0.0-develop.23",
|
|
53
53
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"tslib": "^2.3.1",
|
|
57
|
-
"@progress/kendo-angular-schematics": "25.0.0-develop.
|
|
57
|
+
"@progress/kendo-angular-schematics": "25.0.0-develop.23"
|
|
58
58
|
},
|
|
59
59
|
"schematics": "./schematics/collection.json",
|
|
60
60
|
"module": "fesm2022/progress-kendo-angular-tooltip.mjs",
|