@progress/kendo-angular-tooltip 3.1.7-dev.202203090915 → 4.0.0-dev.202204191143
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/bundles/kendo-angular-tooltip.umd.js +5 -0
- package/{dist/es/constants.d.ts → constants.d.ts} +0 -0
- package/{dist/es2015 → esm2015}/constants.js +0 -0
- package/{dist/es/models/functions.model.js → esm2015/kendo-angular-tooltip.js} +4 -0
- package/esm2015/localization/localized-messages.directive.js +38 -0
- package/{dist/es → esm2015}/main.js +2 -0
- package/{dist/es2015 → esm2015}/models/animation.model.js +1 -0
- package/{dist/es2015 → esm2015}/models/events.js +0 -0
- package/{dist/es2015 → esm2015}/models/functions.model.js +1 -0
- package/{dist/es → esm2015}/models/popover-show-option.type.js +1 -0
- package/{dist/es2015 → esm2015}/models/position.type.js +1 -0
- package/{dist/es → esm2015}/models/show.option.type.js +1 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/popover/anchor.directive.js +22 -19
- package/{dist/es2015 → esm2015}/popover/container.directive.js +24 -23
- package/{dist/es2015 → esm2015}/popover/directives-base.js +13 -12
- package/{dist/es2015 → esm2015}/popover/popover.component.js +118 -108
- package/{dist/es2015 → esm2015}/popover/popover.service.js +9 -9
- package/esm2015/popover/template-directives/actions-template.directive.js +27 -0
- package/esm2015/popover/template-directives/body-template.directive.js +27 -0
- package/esm2015/popover/template-directives/title-template.directive.js +27 -0
- package/{dist/es2015 → esm2015}/popover.module.js +31 -16
- package/{dist/es2015 → esm2015}/tooltip/tooltip.content.component.js +95 -73
- package/{dist/es2015 → esm2015}/tooltip/tooltip.directive.js +57 -80
- package/{dist/es2015 → esm2015}/tooltip/tooltip.settings.js +12 -7
- package/{dist/es2015 → esm2015}/tooltip.module.js +15 -12
- package/{dist/es2015 → esm2015}/tooltips.module.js +12 -9
- package/{dist/es2015 → esm2015}/utils.js +0 -1
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-tooltip.js} +456 -399
- package/{dist/es2015/constants.d.ts → kendo-angular-tooltip.d.ts} +3 -6
- package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
- package/{dist/es/main.d.ts → main.d.ts} +3 -0
- package/{dist/es/models → models}/animation.model.d.ts +0 -0
- package/{dist/es/models → models}/events.d.ts +0 -0
- package/{dist/es/models → models}/functions.model.d.ts +0 -0
- package/{dist/es/models → models}/popover-show-option.type.d.ts +0 -0
- package/{dist/es/models → models}/position.type.d.ts +0 -0
- package/{dist/es/models → models}/show.option.type.d.ts +0 -0
- package/{dist/es/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +30 -111
- package/{dist/es2015/popover → popover}/anchor.directive.d.ts +3 -0
- package/{dist/es/popover → popover}/container.directive.d.ts +3 -0
- package/{dist/es2015/popover → popover}/directives-base.d.ts +9 -4
- package/{dist/es2015/popover → popover}/popover.component.d.ts +21 -8
- package/{dist/es/popover → popover}/popover.service.d.ts +7 -4
- package/{dist/es2015/popover → popover}/template-directives/actions-template.directive.d.ts +3 -0
- package/{dist/es2015/popover → popover}/template-directives/body-template.directive.d.ts +3 -0
- package/{dist/es2015/popover → popover}/template-directives/title-template.directive.d.ts +3 -0
- package/popover.module.d.ts +43 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es/tooltip → tooltip}/tooltip.content.component.d.ts +7 -4
- package/{dist/es/tooltip → tooltip}/tooltip.directive.d.ts +5 -1
- package/{dist/es/tooltip → tooltip}/tooltip.settings.d.ts +7 -0
- package/{dist/es2015/tooltip.module.d.ts → tooltip.module.d.ts} +9 -0
- package/{dist/es2015/tooltips.module.d.ts → tooltips.module.d.ts} +6 -0
- package/{dist/es/utils.d.ts → utils.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-tooltip.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/constants.js +0 -12
- package/dist/es/index.d.ts +0 -12
- package/dist/es/index.js +0 -12
- package/dist/es/index.metadata.json +0 -1
- package/dist/es/localization/localized-messages.directive.d.ts +0 -16
- package/dist/es/localization/localized-messages.directive.js +0 -38
- package/dist/es/models/animation.model.js +0 -4
- package/dist/es/models/events.js +0 -78
- package/dist/es/models/position.type.js +0 -4
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/popover/anchor.directive.d.ts +0 -44
- package/dist/es/popover/anchor.directive.js +0 -156
- package/dist/es/popover/container.directive.js +0 -182
- package/dist/es/popover/directives-base.d.ts +0 -90
- package/dist/es/popover/directives-base.js +0 -294
- package/dist/es/popover/popover.component.d.ts +0 -166
- package/dist/es/popover/popover.component.js +0 -300
- package/dist/es/popover/popover.service.js +0 -88
- package/dist/es/popover/template-directives/actions-template.directive.d.ts +0 -15
- package/dist/es/popover/template-directives/actions-template.directive.js +0 -26
- package/dist/es/popover/template-directives/body-template.directive.d.ts +0 -15
- package/dist/es/popover/template-directives/body-template.directive.js +0 -26
- package/dist/es/popover/template-directives/title-template.directive.d.ts +0 -15
- package/dist/es/popover/template-directives/title-template.directive.js +0 -26
- package/dist/es/popover.module.d.ts +0 -31
- package/dist/es/popover.module.js +0 -65
- package/dist/es/tooltip/tooltip.content.component.js +0 -192
- package/dist/es/tooltip/tooltip.directive.js +0 -452
- package/dist/es/tooltip/tooltip.settings.js +0 -46
- package/dist/es/tooltip.module.d.ts +0 -36
- package/dist/es/tooltip.module.js +0 -57
- package/dist/es/tooltips.module.d.ts +0 -32
- package/dist/es/tooltips.module.js +0 -45
- package/dist/es/utils.js +0 -113
- package/dist/es2015/index.d.ts +0 -12
- package/dist/es2015/index.js +0 -12
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/localized-messages.directive.js +0 -34
- package/dist/es2015/main.d.ts +0 -22
- package/dist/es2015/main.js +0 -18
- package/dist/es2015/models/animation.model.d.ts +0 -9
- package/dist/es2015/models/events.d.ts +0 -78
- package/dist/es2015/models/functions.model.d.ts +0 -17
- package/dist/es2015/models/popover-show-option.type.d.ts +0 -8
- package/dist/es2015/models/popover-show-option.type.js +0 -4
- package/dist/es2015/models/position.type.d.ts +0 -14
- package/dist/es2015/models/show.option.type.d.ts +0 -13
- package/dist/es2015/models/show.option.type.js +0 -4
- package/dist/es2015/package-metadata.d.ts +0 -9
- package/dist/es2015/popover/container.directive.d.ts +0 -56
- package/dist/es2015/popover/popover.service.d.ts +0 -30
- package/dist/es2015/popover/template-directives/actions-template.directive.js +0 -25
- package/dist/es2015/popover/template-directives/body-template.directive.js +0 -25
- package/dist/es2015/popover/template-directives/title-template.directive.js +0 -25
- package/dist/es2015/popover.module.d.ts +0 -31
- package/dist/es2015/tooltip/tooltip.content.component.d.ts +0 -41
- package/dist/es2015/tooltip/tooltip.directive.d.ts +0 -156
- package/dist/es2015/tooltip/tooltip.settings.d.ts +0 -72
- package/dist/es2015/utils.d.ts +0 -34
- package/dist/fesm5/index.js +0 -2071
- package/dist/npm/constants.js +0 -14
- package/dist/npm/index.js +0 -19
- package/dist/npm/localization/localized-messages.directive.js +0 -40
- package/dist/npm/main.js +0 -36
- package/dist/npm/models/animation.model.js +0 -6
- package/dist/npm/models/events.js +0 -80
- package/dist/npm/models/functions.model.js +0 -6
- package/dist/npm/models/popover-show-option.type.js +0 -6
- package/dist/npm/models/position.type.js +0 -6
- package/dist/npm/models/show.option.type.js +0 -6
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/popover/anchor.directive.js +0 -158
- package/dist/npm/popover/container.directive.js +0 -184
- package/dist/npm/popover/directives-base.js +0 -296
- package/dist/npm/popover/popover.component.js +0 -302
- package/dist/npm/popover/popover.service.js +0 -90
- package/dist/npm/popover/template-directives/actions-template.directive.js +0 -28
- package/dist/npm/popover/template-directives/body-template.directive.js +0 -28
- package/dist/npm/popover/template-directives/title-template.directive.js +0 -28
- package/dist/npm/popover.module.js +0 -67
- package/dist/npm/tooltip/tooltip.content.component.js +0 -194
- package/dist/npm/tooltip/tooltip.directive.js +0 -454
- package/dist/npm/tooltip/tooltip.settings.js +0 -48
- package/dist/npm/tooltip.module.js +0 -59
- package/dist/npm/tooltips.module.js +0 -47
- package/dist/npm/utils.js +0 -121
- package/dist/systemjs/kendo-angular-tooltip.js +0 -5
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, ContentChild, EventEmitter, HostBinding, Input, isDevMode, Output } from '@angular/core';
|
|
7
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { Subscription } from 'rxjs';
|
|
9
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
10
|
-
import { packageMetadata } from '../package-metadata';
|
|
11
|
-
import { ERRORS } from '../constants';
|
|
12
|
-
import { PopoverTitleTemplateDirective } from './template-directives/title-template.directive';
|
|
13
|
-
import { PopoverBodyTemplateDirective } from './template-directives/body-template.directive';
|
|
14
|
-
import { PopoverActionsTemplateDirective } from './template-directives/actions-template.directive';
|
|
15
|
-
/**
|
|
16
|
-
* Represents the [Kendo UI Popover component for Angular]({% slug overview_popover %}).
|
|
17
|
-
* Used to display additional information that is related to a target element.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts-no-run
|
|
21
|
-
* <kendo-popover>
|
|
22
|
-
* <ng-template kendoPopoverTitleTemplate>Foo Title</ng-template>
|
|
23
|
-
* <ng-template kendoPopoverBodyTemplate>Foo Body</ng-template>
|
|
24
|
-
* <ng-template kendoPopoverActionsTemplate>Foo Actions</ng-template>
|
|
25
|
-
* </kendo-popover>
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
var PopoverComponent = /** @class */ (function () {
|
|
29
|
-
function PopoverComponent(localization) {
|
|
30
|
-
this.localization = localization;
|
|
31
|
-
/**
|
|
32
|
-
* Specifies the position of the Popover in relation to its anchor element. [See example]({% slug positioning_popover %})
|
|
33
|
-
*
|
|
34
|
-
* The possible options are:
|
|
35
|
-
* `top`
|
|
36
|
-
* `bottom`
|
|
37
|
-
* `right` (Default)
|
|
38
|
-
* `left`
|
|
39
|
-
*/
|
|
40
|
-
this.position = 'right';
|
|
41
|
-
/**
|
|
42
|
-
* Determines whether a callout will be rendered along the Popover. [See example]({% slug callout_popover %})
|
|
43
|
-
*
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
this.callout = true;
|
|
47
|
-
/**
|
|
48
|
-
* Enables and configures the Popover animation. [See example]({% slug animations_popover %})
|
|
49
|
-
*
|
|
50
|
-
* The possible options are:
|
|
51
|
-
*
|
|
52
|
-
* * `boolean`—Enables the default animation
|
|
53
|
-
* * `PopoverAnimation`—A configuration object which allows setting the `direction`, `duration` and `type` of the animation.
|
|
54
|
-
*
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
this.animation = false;
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
* Determines the visibility of the Popover.
|
|
61
|
-
*/
|
|
62
|
-
this.visible = false;
|
|
63
|
-
/**
|
|
64
|
-
* Fires before the Popover is about to be shown ([see example]({% slug events_popover %})).
|
|
65
|
-
* The event is preventable. If canceled, the Popover will not be displayed. [See example]({% slug events_popover %})
|
|
66
|
-
*/
|
|
67
|
-
this.show = new EventEmitter();
|
|
68
|
-
/**
|
|
69
|
-
* Fires after the Popover has been shown and the animation has ended. [See example]({% slug events_popover %})
|
|
70
|
-
*/
|
|
71
|
-
this.shown = new EventEmitter();
|
|
72
|
-
/**
|
|
73
|
-
* Fires when the Popover is about to be hidden ([see example]({% slug events_popover %})).
|
|
74
|
-
* The event is preventable. If canceled, the Popover will remain visible.
|
|
75
|
-
*/
|
|
76
|
-
this.hide = new EventEmitter();
|
|
77
|
-
/**
|
|
78
|
-
* Fires after the Popover has been hidden and the animation has ended. [See example]({% slug events_popover %})
|
|
79
|
-
*/
|
|
80
|
-
this.hidden = new EventEmitter();
|
|
81
|
-
this._offset = 6;
|
|
82
|
-
this._width = 'auto';
|
|
83
|
-
this._height = 'auto';
|
|
84
|
-
this.subs = new Subscription();
|
|
85
|
-
/**
|
|
86
|
-
* @hidden
|
|
87
|
-
*/
|
|
88
|
-
this._templateData = function () { return null; };
|
|
89
|
-
validatePackage(packageMetadata);
|
|
90
|
-
}
|
|
91
|
-
Object.defineProperty(PopoverComponent.prototype, "offset", {
|
|
92
|
-
get: function () {
|
|
93
|
-
var calloutBuffer = 14;
|
|
94
|
-
return this.callout
|
|
95
|
-
? calloutBuffer + this._offset
|
|
96
|
-
: this._offset;
|
|
97
|
-
},
|
|
98
|
-
/**
|
|
99
|
-
* Specifies the distance from the Popover to its anchor element in pixels.
|
|
100
|
-
*
|
|
101
|
-
* @default `6`
|
|
102
|
-
*/
|
|
103
|
-
set: function (value) {
|
|
104
|
-
this._offset = value;
|
|
105
|
-
},
|
|
106
|
-
enumerable: true,
|
|
107
|
-
configurable: true
|
|
108
|
-
});
|
|
109
|
-
Object.defineProperty(PopoverComponent.prototype, "width", {
|
|
110
|
-
get: function () {
|
|
111
|
-
return this._width;
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* Determines the width of the popover. Numeric values are treated as pixels.
|
|
115
|
-
* @default 'auto'
|
|
116
|
-
*/
|
|
117
|
-
set: function (value) {
|
|
118
|
-
this._width = typeof value === 'number' ? value + "px" : value;
|
|
119
|
-
},
|
|
120
|
-
enumerable: true,
|
|
121
|
-
configurable: true
|
|
122
|
-
});
|
|
123
|
-
Object.defineProperty(PopoverComponent.prototype, "height", {
|
|
124
|
-
get: function () {
|
|
125
|
-
return this._height;
|
|
126
|
-
},
|
|
127
|
-
/**
|
|
128
|
-
* Determines the height of the popover. Numeric values are treated as pixels.
|
|
129
|
-
* @default 'auto'
|
|
130
|
-
*/
|
|
131
|
-
set: function (value) {
|
|
132
|
-
this._height = typeof value === 'number' ? value + "px" : value;
|
|
133
|
-
},
|
|
134
|
-
enumerable: true,
|
|
135
|
-
configurable: true
|
|
136
|
-
});
|
|
137
|
-
Object.defineProperty(PopoverComponent.prototype, "templateData", {
|
|
138
|
-
get: function () {
|
|
139
|
-
return this._templateData;
|
|
140
|
-
},
|
|
141
|
-
/**
|
|
142
|
-
* Defines a callback function which returns custom data passed to the Popover templates.
|
|
143
|
-
* It exposes the current anchor element as an argument. [See example]({% slug templates_popover %}#toc-popoverdatacallback)
|
|
144
|
-
*/
|
|
145
|
-
set: function (fn) {
|
|
146
|
-
if (isDevMode && typeof fn !== 'function') {
|
|
147
|
-
throw new Error(ERRORS.templateData + " " + JSON.stringify(fn) + ".");
|
|
148
|
-
}
|
|
149
|
-
this._templateData = fn;
|
|
150
|
-
},
|
|
151
|
-
enumerable: true,
|
|
152
|
-
configurable: true
|
|
153
|
-
});
|
|
154
|
-
Object.defineProperty(PopoverComponent.prototype, "isHidden", {
|
|
155
|
-
/**
|
|
156
|
-
* @hidden
|
|
157
|
-
*/
|
|
158
|
-
get: function () {
|
|
159
|
-
return !this.visible;
|
|
160
|
-
},
|
|
161
|
-
enumerable: true,
|
|
162
|
-
configurable: true
|
|
163
|
-
});
|
|
164
|
-
Object.defineProperty(PopoverComponent.prototype, "hasAttributeHidden", {
|
|
165
|
-
/**
|
|
166
|
-
* @hidden
|
|
167
|
-
*/
|
|
168
|
-
get: function () {
|
|
169
|
-
return !this.visible;
|
|
170
|
-
},
|
|
171
|
-
enumerable: true,
|
|
172
|
-
configurable: true
|
|
173
|
-
});
|
|
174
|
-
PopoverComponent.prototype.ngOnInit = function () {
|
|
175
|
-
var _this = this;
|
|
176
|
-
this.subs.add(this.localization.changes.subscribe(function (_a) {
|
|
177
|
-
var rtl = _a.rtl;
|
|
178
|
-
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
179
|
-
}));
|
|
180
|
-
};
|
|
181
|
-
PopoverComponent.prototype.ngOnDestroy = function () {
|
|
182
|
-
this.subs.unsubscribe();
|
|
183
|
-
};
|
|
184
|
-
/**
|
|
185
|
-
* @hidden
|
|
186
|
-
*/
|
|
187
|
-
PopoverComponent.prototype.getCalloutPosition = function () {
|
|
188
|
-
switch (this.position) {
|
|
189
|
-
case 'top': return { 'k-callout-s': true };
|
|
190
|
-
case 'bottom': return { 'k-callout-n': true };
|
|
191
|
-
case 'left': return { 'k-callout-e': true };
|
|
192
|
-
case 'right': return { 'k-callout-w': true };
|
|
193
|
-
default: return { 'k-callout-s': true };
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
tslib_1.__decorate([
|
|
197
|
-
Input(),
|
|
198
|
-
tslib_1.__metadata("design:type", String)
|
|
199
|
-
], PopoverComponent.prototype, "position", void 0);
|
|
200
|
-
tslib_1.__decorate([
|
|
201
|
-
Input(),
|
|
202
|
-
tslib_1.__metadata("design:type", Number),
|
|
203
|
-
tslib_1.__metadata("design:paramtypes", [Number])
|
|
204
|
-
], PopoverComponent.prototype, "offset", null);
|
|
205
|
-
tslib_1.__decorate([
|
|
206
|
-
HostBinding('style.width'),
|
|
207
|
-
Input(),
|
|
208
|
-
tslib_1.__metadata("design:type", Object),
|
|
209
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
210
|
-
], PopoverComponent.prototype, "width", null);
|
|
211
|
-
tslib_1.__decorate([
|
|
212
|
-
HostBinding('style.height'),
|
|
213
|
-
Input(),
|
|
214
|
-
tslib_1.__metadata("design:type", Object),
|
|
215
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
216
|
-
], PopoverComponent.prototype, "height", null);
|
|
217
|
-
tslib_1.__decorate([
|
|
218
|
-
HostBinding('attr.dir'),
|
|
219
|
-
tslib_1.__metadata("design:type", String)
|
|
220
|
-
], PopoverComponent.prototype, "direction", void 0);
|
|
221
|
-
tslib_1.__decorate([
|
|
222
|
-
Input(),
|
|
223
|
-
tslib_1.__metadata("design:type", String)
|
|
224
|
-
], PopoverComponent.prototype, "title", void 0);
|
|
225
|
-
tslib_1.__decorate([
|
|
226
|
-
Input(),
|
|
227
|
-
tslib_1.__metadata("design:type", String)
|
|
228
|
-
], PopoverComponent.prototype, "subtitle", void 0);
|
|
229
|
-
tslib_1.__decorate([
|
|
230
|
-
Input(),
|
|
231
|
-
tslib_1.__metadata("design:type", String)
|
|
232
|
-
], PopoverComponent.prototype, "body", void 0);
|
|
233
|
-
tslib_1.__decorate([
|
|
234
|
-
Input(),
|
|
235
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
236
|
-
], PopoverComponent.prototype, "callout", void 0);
|
|
237
|
-
tslib_1.__decorate([
|
|
238
|
-
Input(),
|
|
239
|
-
tslib_1.__metadata("design:type", Object)
|
|
240
|
-
], PopoverComponent.prototype, "animation", void 0);
|
|
241
|
-
tslib_1.__decorate([
|
|
242
|
-
Input(),
|
|
243
|
-
tslib_1.__metadata("design:type", Function),
|
|
244
|
-
tslib_1.__metadata("design:paramtypes", [Function])
|
|
245
|
-
], PopoverComponent.prototype, "templateData", null);
|
|
246
|
-
tslib_1.__decorate([
|
|
247
|
-
HostBinding('class.k-hidden'),
|
|
248
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
249
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
250
|
-
], PopoverComponent.prototype, "isHidden", null);
|
|
251
|
-
tslib_1.__decorate([
|
|
252
|
-
HostBinding('attr.aria-hidden'),
|
|
253
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
254
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
255
|
-
], PopoverComponent.prototype, "hasAttributeHidden", null);
|
|
256
|
-
tslib_1.__decorate([
|
|
257
|
-
Output(),
|
|
258
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
259
|
-
], PopoverComponent.prototype, "show", void 0);
|
|
260
|
-
tslib_1.__decorate([
|
|
261
|
-
Output(),
|
|
262
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
263
|
-
], PopoverComponent.prototype, "shown", void 0);
|
|
264
|
-
tslib_1.__decorate([
|
|
265
|
-
Output(),
|
|
266
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
267
|
-
], PopoverComponent.prototype, "hide", void 0);
|
|
268
|
-
tslib_1.__decorate([
|
|
269
|
-
Output(),
|
|
270
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
271
|
-
], PopoverComponent.prototype, "hidden", void 0);
|
|
272
|
-
tslib_1.__decorate([
|
|
273
|
-
ContentChild(PopoverTitleTemplateDirective, { static: false }),
|
|
274
|
-
tslib_1.__metadata("design:type", PopoverTitleTemplateDirective)
|
|
275
|
-
], PopoverComponent.prototype, "titleTemplate", void 0);
|
|
276
|
-
tslib_1.__decorate([
|
|
277
|
-
ContentChild(PopoverBodyTemplateDirective, { static: false }),
|
|
278
|
-
tslib_1.__metadata("design:type", PopoverBodyTemplateDirective)
|
|
279
|
-
], PopoverComponent.prototype, "bodyTemplate", void 0);
|
|
280
|
-
tslib_1.__decorate([
|
|
281
|
-
ContentChild(PopoverActionsTemplateDirective, { static: false }),
|
|
282
|
-
tslib_1.__metadata("design:type", PopoverActionsTemplateDirective)
|
|
283
|
-
], PopoverComponent.prototype, "actionsTemplate", void 0);
|
|
284
|
-
PopoverComponent = tslib_1.__decorate([
|
|
285
|
-
Component({
|
|
286
|
-
selector: 'kendo-popover',
|
|
287
|
-
providers: [
|
|
288
|
-
LocalizationService,
|
|
289
|
-
{
|
|
290
|
-
provide: L10N_PREFIX,
|
|
291
|
-
useValue: 'kendo.popover'
|
|
292
|
-
}
|
|
293
|
-
],
|
|
294
|
-
template: "\n <div *ngIf=\"visible\" role=\"tooltip\" class=\"k-popover\" [ngStyle]=\"{'width.px': width, 'height.px': height}\">\n <div class=\"k-popover-callout\" [ngClass]=\"getCalloutPosition()\" *ngIf=\"callout\"></div>\n\n <div *ngIf=\"titleTemplate || title\" class=\"k-popover-header\">\n <ng-template *ngIf=\"titleTemplate\"\n [ngTemplateOutlet]=\"titleTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: anchor, data: contextData }\">\n </ng-template>\n <ng-container *ngIf=\"title && !titleTemplate\">\n {{ title }}\n </ng-container>\n </div>\n\n <div *ngIf=\"bodyTemplate || body\" class=\"k-popover-body\">\n <ng-template *ngIf=\"bodyTemplate\"\n [ngTemplateOutlet]=\"bodyTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: anchor, data: contextData }\">\n </ng-template>\n <ng-container *ngIf=\"body && !bodyTemplate\">\n {{ body }}\n </ng-container>\n </div>\n\n <div *ngIf=\"actionsTemplate\" class=\"k-popover-actions k-actions k-hstack k-justify-content-between\">\n <ng-template *ngIf=\"actionsTemplate\"\n [ngTemplateOutlet]=\"actionsTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: anchor, data: contextData }\">\n </ng-template>\n </div>\n </div>\n "
|
|
295
|
-
}),
|
|
296
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
297
|
-
], PopoverComponent);
|
|
298
|
-
return PopoverComponent;
|
|
299
|
-
}());
|
|
300
|
-
export { PopoverComponent };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Injectable, NgZone } from '@angular/core';
|
|
7
|
-
import { BehaviorSubject, combineLatest, Subject, Subscription } from 'rxjs';
|
|
8
|
-
import { auditTime } from 'rxjs/operators';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var PopoverService = /** @class */ (function () {
|
|
13
|
-
function PopoverService(ngZone) {
|
|
14
|
-
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
|
-
this.monitor();
|
|
21
|
-
}
|
|
22
|
-
PopoverService.prototype.ngOnDestroy = function () {
|
|
23
|
-
this.subs.unsubscribe();
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(PopoverService.prototype, "isPopoverHovered", {
|
|
26
|
-
get: function () {
|
|
27
|
-
return this._pointerOverPopup.asObservable();
|
|
28
|
-
},
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
});
|
|
32
|
-
PopoverService.prototype.emitPopoverState = function (isHovered) {
|
|
33
|
-
var _this = this;
|
|
34
|
-
this.ngZone.run(function (_) { return _this._pointerOverPopup.next(isHovered); });
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(PopoverService.prototype, "isAnchorHovered", {
|
|
37
|
-
get: function () {
|
|
38
|
-
return this._pointerOverAnchor.asObservable();
|
|
39
|
-
},
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true
|
|
42
|
-
});
|
|
43
|
-
PopoverService.prototype.emitAnchorState = function (isHovered, anchor) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
this._isOrigin = this.originAnchor === anchor;
|
|
46
|
-
this.currentAnchor = anchor;
|
|
47
|
-
if (isHovered) {
|
|
48
|
-
this.originAnchor = anchor;
|
|
49
|
-
}
|
|
50
|
-
this.ngZone.run(function (_) { return _this._pointerOverAnchor.next(isHovered); });
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(PopoverService.prototype, "isFocusInsidePopover", {
|
|
53
|
-
get: function () {
|
|
54
|
-
return this._focusInsidePopover.asObservable();
|
|
55
|
-
},
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true
|
|
58
|
-
});
|
|
59
|
-
PopoverService.prototype.emitFocusInsidePopover = function (isFocused) {
|
|
60
|
-
var _this = this;
|
|
61
|
-
this.ngZone.run(function (_) { return _this._focusInsidePopover.next(isFocused); });
|
|
62
|
-
this._focusInsidePopover.next(null);
|
|
63
|
-
};
|
|
64
|
-
Object.defineProperty(PopoverService.prototype, "hidePopover", {
|
|
65
|
-
get: function () {
|
|
66
|
-
return this._hidePopover.asObservable();
|
|
67
|
-
},
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true
|
|
70
|
-
});
|
|
71
|
-
PopoverService.prototype.monitor = function () {
|
|
72
|
-
var _this = this;
|
|
73
|
-
this.subs.add(combineLatest(this.isPopoverHovered, this.isAnchorHovered).pipe(
|
|
74
|
-
// `auditTime` is used because the `mouseleave` event is emitted before `mouseenter`
|
|
75
|
-
// i.e. there is a millisecond in which the pointer leaves the first target (e.g. anchor) and hasn't reached the second one (e.g. popup)
|
|
76
|
-
// resulting in both observables emitting `false`
|
|
77
|
-
auditTime(20)).subscribe(function (val) {
|
|
78
|
-
var isPopoverHovered = val[0], isAnchorHovered = val[1];
|
|
79
|
-
_this._hidePopover.next([isPopoverHovered, isAnchorHovered, _this._isOrigin, _this.currentAnchor]);
|
|
80
|
-
}));
|
|
81
|
-
};
|
|
82
|
-
PopoverService = tslib_1.__decorate([
|
|
83
|
-
Injectable(),
|
|
84
|
-
tslib_1.__metadata("design:paramtypes", [NgZone])
|
|
85
|
-
], PopoverService);
|
|
86
|
-
return PopoverService;
|
|
87
|
-
}());
|
|
88
|
-
export { PopoverService };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TemplateRef } from '@angular/core';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a template that defines the content of the Popover actions.
|
|
8
|
-
*
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag
|
|
10
|
-
* with the `kendoPopoverActionsTemplate` directive inside the `<kendo-popover>` tag.
|
|
11
|
-
*/
|
|
12
|
-
export declare class PopoverActionsTemplateDirective {
|
|
13
|
-
templateRef: TemplateRef<any>;
|
|
14
|
-
constructor(templateRef: TemplateRef<any>);
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents a template that defines the content of the Popover actions.
|
|
9
|
-
*
|
|
10
|
-
* To define the template, nest an `<ng-template>` tag
|
|
11
|
-
* with the `kendoPopoverActionsTemplate` directive inside the `<kendo-popover>` tag.
|
|
12
|
-
*/
|
|
13
|
-
var PopoverActionsTemplateDirective = /** @class */ (function () {
|
|
14
|
-
function PopoverActionsTemplateDirective(templateRef) {
|
|
15
|
-
this.templateRef = templateRef;
|
|
16
|
-
}
|
|
17
|
-
PopoverActionsTemplateDirective = tslib_1.__decorate([
|
|
18
|
-
Directive({
|
|
19
|
-
selector: '[kendoPopoverActionsTemplate]'
|
|
20
|
-
}),
|
|
21
|
-
tslib_1.__param(0, Optional()),
|
|
22
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
23
|
-
], PopoverActionsTemplateDirective);
|
|
24
|
-
return PopoverActionsTemplateDirective;
|
|
25
|
-
}());
|
|
26
|
-
export { PopoverActionsTemplateDirective };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TemplateRef } from '@angular/core';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a template that defines the content of the Popover body.
|
|
8
|
-
*
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag
|
|
10
|
-
* with the `kendoPopoverBodyTemplate` directive inside the `<kendo-popover>` tag.
|
|
11
|
-
*/
|
|
12
|
-
export declare class PopoverBodyTemplateDirective {
|
|
13
|
-
templateRef: TemplateRef<any>;
|
|
14
|
-
constructor(templateRef: TemplateRef<any>);
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents a template that defines the content of the Popover body.
|
|
9
|
-
*
|
|
10
|
-
* To define the template, nest an `<ng-template>` tag
|
|
11
|
-
* with the `kendoPopoverBodyTemplate` directive inside the `<kendo-popover>` tag.
|
|
12
|
-
*/
|
|
13
|
-
var PopoverBodyTemplateDirective = /** @class */ (function () {
|
|
14
|
-
function PopoverBodyTemplateDirective(templateRef) {
|
|
15
|
-
this.templateRef = templateRef;
|
|
16
|
-
}
|
|
17
|
-
PopoverBodyTemplateDirective = tslib_1.__decorate([
|
|
18
|
-
Directive({
|
|
19
|
-
selector: '[kendoPopoverBodyTemplate]'
|
|
20
|
-
}),
|
|
21
|
-
tslib_1.__param(0, Optional()),
|
|
22
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
23
|
-
], PopoverBodyTemplateDirective);
|
|
24
|
-
return PopoverBodyTemplateDirective;
|
|
25
|
-
}());
|
|
26
|
-
export { PopoverBodyTemplateDirective };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TemplateRef } from '@angular/core';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a template that defines the content of the Popover title.
|
|
8
|
-
*
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag
|
|
10
|
-
* with the `kendoPopoverTitleTemplate` directive inside the `<kendo-popover>` tag.
|
|
11
|
-
*/
|
|
12
|
-
export declare class PopoverTitleTemplateDirective {
|
|
13
|
-
templateRef: TemplateRef<any>;
|
|
14
|
-
constructor(templateRef: TemplateRef<any>);
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents a template that defines the content of the Popover title.
|
|
9
|
-
*
|
|
10
|
-
* To define the template, nest an `<ng-template>` tag
|
|
11
|
-
* with the `kendoPopoverTitleTemplate` directive inside the `<kendo-popover>` tag.
|
|
12
|
-
*/
|
|
13
|
-
var PopoverTitleTemplateDirective = /** @class */ (function () {
|
|
14
|
-
function PopoverTitleTemplateDirective(templateRef) {
|
|
15
|
-
this.templateRef = templateRef;
|
|
16
|
-
}
|
|
17
|
-
PopoverTitleTemplateDirective = tslib_1.__decorate([
|
|
18
|
-
Directive({
|
|
19
|
-
selector: '[kendoPopoverTitleTemplate]'
|
|
20
|
-
}),
|
|
21
|
-
tslib_1.__param(0, Optional()),
|
|
22
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
23
|
-
], PopoverTitleTemplateDirective);
|
|
24
|
-
return PopoverTitleTemplateDirective;
|
|
25
|
-
}());
|
|
26
|
-
export { PopoverTitleTemplateDirective };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
7
|
-
* definition for the Popover component.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
*
|
|
11
|
-
* ```ts-no-run
|
|
12
|
-
* import { PopoverModule } from '@progress/kendo-angular-tooltip';
|
|
13
|
-
*
|
|
14
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
15
|
-
* import { NgModule } from '@angular/core';
|
|
16
|
-
*
|
|
17
|
-
* import { AppComponent } from './app.component';
|
|
18
|
-
*
|
|
19
|
-
* _@NgModule({
|
|
20
|
-
* declarations: [AppComponent],
|
|
21
|
-
* imports: [BrowserModule, PopoverModule],
|
|
22
|
-
* bootstrap: [AppComponent]
|
|
23
|
-
* })
|
|
24
|
-
* export class AppModule {}
|
|
25
|
-
*
|
|
26
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
27
|
-
*
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare class PopoverModule {
|
|
31
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { CommonModule } from "@angular/common";
|
|
7
|
-
import { NgModule } from "@angular/core";
|
|
8
|
-
import { PopupModule } from "@progress/kendo-angular-popup";
|
|
9
|
-
import { PopoverAnchorDirective } from "./popover/anchor.directive";
|
|
10
|
-
import { PopoverContainerDirective } from "./popover/container.directive";
|
|
11
|
-
import { PopoverComponent } from "./popover/popover.component";
|
|
12
|
-
import { PopoverTitleTemplateDirective } from './popover/template-directives/title-template.directive';
|
|
13
|
-
import { PopoverBodyTemplateDirective } from './popover/template-directives/body-template.directive';
|
|
14
|
-
import { PopoverActionsTemplateDirective } from './popover/template-directives/actions-template.directive';
|
|
15
|
-
var DIRECTIVES = [
|
|
16
|
-
PopoverActionsTemplateDirective,
|
|
17
|
-
PopoverBodyTemplateDirective,
|
|
18
|
-
PopoverTitleTemplateDirective,
|
|
19
|
-
PopoverAnchorDirective,
|
|
20
|
-
PopoverContainerDirective
|
|
21
|
-
];
|
|
22
|
-
/**
|
|
23
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
24
|
-
* definition for the Popover component.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
*
|
|
28
|
-
* ```ts-no-run
|
|
29
|
-
* import { PopoverModule } from '@progress/kendo-angular-tooltip';
|
|
30
|
-
*
|
|
31
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
32
|
-
* import { NgModule } from '@angular/core';
|
|
33
|
-
*
|
|
34
|
-
* import { AppComponent } from './app.component';
|
|
35
|
-
*
|
|
36
|
-
* _@NgModule({
|
|
37
|
-
* declarations: [AppComponent],
|
|
38
|
-
* imports: [BrowserModule, PopoverModule],
|
|
39
|
-
* bootstrap: [AppComponent]
|
|
40
|
-
* })
|
|
41
|
-
* export class AppModule {}
|
|
42
|
-
*
|
|
43
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
44
|
-
*
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
var PopoverModule = /** @class */ (function () {
|
|
48
|
-
function PopoverModule() {
|
|
49
|
-
}
|
|
50
|
-
PopoverModule = tslib_1.__decorate([
|
|
51
|
-
NgModule({
|
|
52
|
-
declarations: DIRECTIVES.concat([
|
|
53
|
-
PopoverComponent
|
|
54
|
-
]),
|
|
55
|
-
entryComponents: [PopoverComponent],
|
|
56
|
-
exports: DIRECTIVES.concat([PopoverComponent]),
|
|
57
|
-
imports: [
|
|
58
|
-
CommonModule,
|
|
59
|
-
PopupModule
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
], PopoverModule);
|
|
63
|
-
return PopoverModule;
|
|
64
|
-
}());
|
|
65
|
-
export { PopoverModule };
|