@progress/kendo-angular-tooltip 3.1.7-dev.202203280924 → 4.0.0-dev.202204131841

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.
Files changed (146) hide show
  1. package/bundles/kendo-angular-tooltip.umd.js +5 -0
  2. package/{dist/es/constants.d.ts → constants.d.ts} +0 -0
  3. package/{dist/es2015 → esm2015}/constants.js +0 -0
  4. package/{dist/es/models/functions.model.js → esm2015/kendo-angular-tooltip.js} +4 -0
  5. package/esm2015/localization/localized-messages.directive.js +38 -0
  6. package/{dist/es → esm2015}/main.js +2 -0
  7. package/{dist/es2015 → esm2015}/models/animation.model.js +1 -0
  8. package/{dist/es2015 → esm2015}/models/events.js +0 -0
  9. package/{dist/es2015 → esm2015}/models/functions.model.js +1 -0
  10. package/{dist/es → esm2015}/models/popover-show-option.type.js +1 -0
  11. package/{dist/es2015 → esm2015}/models/position.type.js +1 -0
  12. package/{dist/es → esm2015}/models/show.option.type.js +1 -0
  13. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  14. package/{dist/es2015 → esm2015}/popover/anchor.directive.js +22 -19
  15. package/{dist/es2015 → esm2015}/popover/container.directive.js +24 -23
  16. package/{dist/es2015 → esm2015}/popover/directives-base.js +13 -12
  17. package/{dist/es2015 → esm2015}/popover/popover.component.js +110 -112
  18. package/{dist/es2015 → esm2015}/popover/popover.service.js +9 -9
  19. package/esm2015/popover/template-directives/actions-template.directive.js +27 -0
  20. package/esm2015/popover/template-directives/body-template.directive.js +27 -0
  21. package/esm2015/popover/template-directives/title-template.directive.js +27 -0
  22. package/{dist/es2015 → esm2015}/popover.module.js +31 -16
  23. package/{dist/es2015 → esm2015}/tooltip/tooltip.content.component.js +95 -73
  24. package/{dist/es2015 → esm2015}/tooltip/tooltip.directive.js +57 -80
  25. package/{dist/es2015 → esm2015}/tooltip/tooltip.settings.js +12 -7
  26. package/{dist/es2015 → esm2015}/tooltip.module.js +15 -12
  27. package/{dist/es2015 → esm2015}/tooltips.module.js +12 -9
  28. package/{dist/es2015 → esm2015}/utils.js +0 -1
  29. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-tooltip.js} +448 -403
  30. package/{dist/es2015/constants.d.ts → kendo-angular-tooltip.d.ts} +3 -6
  31. package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
  32. package/{dist/es/main.d.ts → main.d.ts} +3 -0
  33. package/{dist/es/models → models}/animation.model.d.ts +0 -0
  34. package/{dist/es/models → models}/events.d.ts +0 -0
  35. package/{dist/es/models → models}/functions.model.d.ts +0 -0
  36. package/{dist/es/models → models}/popover-show-option.type.d.ts +0 -0
  37. package/{dist/es/models → models}/position.type.d.ts +0 -0
  38. package/{dist/es/models → models}/show.option.type.d.ts +0 -0
  39. package/{dist/es/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  40. package/package.json +34 -113
  41. package/{dist/es2015/popover → popover}/anchor.directive.d.ts +3 -0
  42. package/{dist/es/popover → popover}/container.directive.d.ts +3 -0
  43. package/{dist/es2015/popover → popover}/directives-base.d.ts +9 -4
  44. package/{dist/es2015/popover → popover}/popover.component.d.ts +13 -6
  45. package/{dist/es/popover → popover}/popover.service.d.ts +7 -4
  46. package/{dist/es2015/popover → popover}/template-directives/actions-template.directive.d.ts +3 -0
  47. package/{dist/es2015/popover → popover}/template-directives/body-template.directive.d.ts +3 -0
  48. package/{dist/es2015/popover → popover}/template-directives/title-template.directive.d.ts +3 -0
  49. package/popover.module.d.ts +43 -0
  50. package/schematics/ngAdd/index.js +5 -2
  51. package/schematics/ngAdd/index.js.map +1 -1
  52. package/{dist/es/tooltip → tooltip}/tooltip.content.component.d.ts +7 -4
  53. package/{dist/es/tooltip → tooltip}/tooltip.directive.d.ts +5 -1
  54. package/{dist/es/tooltip → tooltip}/tooltip.settings.d.ts +7 -0
  55. package/{dist/es2015/tooltip.module.d.ts → tooltip.module.d.ts} +9 -0
  56. package/{dist/es2015/tooltips.module.d.ts → tooltips.module.d.ts} +6 -0
  57. package/{dist/es/utils.d.ts → utils.d.ts} +0 -0
  58. package/dist/cdn/js/kendo-angular-tooltip.js +0 -20
  59. package/dist/cdn/main.js +0 -5
  60. package/dist/es/constants.js +0 -12
  61. package/dist/es/index.d.ts +0 -12
  62. package/dist/es/index.js +0 -12
  63. package/dist/es/index.metadata.json +0 -1
  64. package/dist/es/localization/localized-messages.directive.d.ts +0 -16
  65. package/dist/es/localization/localized-messages.directive.js +0 -38
  66. package/dist/es/models/animation.model.js +0 -4
  67. package/dist/es/models/events.js +0 -78
  68. package/dist/es/models/position.type.js +0 -4
  69. package/dist/es/package-metadata.js +0 -15
  70. package/dist/es/popover/anchor.directive.d.ts +0 -44
  71. package/dist/es/popover/anchor.directive.js +0 -156
  72. package/dist/es/popover/container.directive.js +0 -182
  73. package/dist/es/popover/directives-base.d.ts +0 -90
  74. package/dist/es/popover/directives-base.js +0 -294
  75. package/dist/es/popover/popover.component.d.ts +0 -172
  76. package/dist/es/popover/popover.component.js +0 -312
  77. package/dist/es/popover/popover.service.js +0 -88
  78. package/dist/es/popover/template-directives/actions-template.directive.d.ts +0 -15
  79. package/dist/es/popover/template-directives/actions-template.directive.js +0 -26
  80. package/dist/es/popover/template-directives/body-template.directive.d.ts +0 -15
  81. package/dist/es/popover/template-directives/body-template.directive.js +0 -26
  82. package/dist/es/popover/template-directives/title-template.directive.d.ts +0 -15
  83. package/dist/es/popover/template-directives/title-template.directive.js +0 -26
  84. package/dist/es/popover.module.d.ts +0 -31
  85. package/dist/es/popover.module.js +0 -65
  86. package/dist/es/tooltip/tooltip.content.component.js +0 -192
  87. package/dist/es/tooltip/tooltip.directive.js +0 -452
  88. package/dist/es/tooltip/tooltip.settings.js +0 -46
  89. package/dist/es/tooltip.module.d.ts +0 -36
  90. package/dist/es/tooltip.module.js +0 -57
  91. package/dist/es/tooltips.module.d.ts +0 -32
  92. package/dist/es/tooltips.module.js +0 -45
  93. package/dist/es/utils.js +0 -113
  94. package/dist/es2015/index.d.ts +0 -12
  95. package/dist/es2015/index.js +0 -12
  96. package/dist/es2015/index.metadata.json +0 -1
  97. package/dist/es2015/localization/localized-messages.directive.js +0 -34
  98. package/dist/es2015/main.d.ts +0 -22
  99. package/dist/es2015/main.js +0 -18
  100. package/dist/es2015/models/animation.model.d.ts +0 -9
  101. package/dist/es2015/models/events.d.ts +0 -78
  102. package/dist/es2015/models/functions.model.d.ts +0 -17
  103. package/dist/es2015/models/popover-show-option.type.d.ts +0 -8
  104. package/dist/es2015/models/popover-show-option.type.js +0 -4
  105. package/dist/es2015/models/position.type.d.ts +0 -14
  106. package/dist/es2015/models/show.option.type.d.ts +0 -13
  107. package/dist/es2015/models/show.option.type.js +0 -4
  108. package/dist/es2015/package-metadata.d.ts +0 -9
  109. package/dist/es2015/popover/container.directive.d.ts +0 -56
  110. package/dist/es2015/popover/popover.service.d.ts +0 -30
  111. package/dist/es2015/popover/template-directives/actions-template.directive.js +0 -25
  112. package/dist/es2015/popover/template-directives/body-template.directive.js +0 -25
  113. package/dist/es2015/popover/template-directives/title-template.directive.js +0 -25
  114. package/dist/es2015/popover.module.d.ts +0 -31
  115. package/dist/es2015/tooltip/tooltip.content.component.d.ts +0 -41
  116. package/dist/es2015/tooltip/tooltip.directive.d.ts +0 -156
  117. package/dist/es2015/tooltip/tooltip.settings.d.ts +0 -72
  118. package/dist/es2015/utils.d.ts +0 -34
  119. package/dist/fesm5/index.js +0 -2083
  120. package/dist/npm/constants.js +0 -14
  121. package/dist/npm/index.js +0 -19
  122. package/dist/npm/localization/localized-messages.directive.js +0 -40
  123. package/dist/npm/main.js +0 -36
  124. package/dist/npm/models/animation.model.js +0 -6
  125. package/dist/npm/models/events.js +0 -80
  126. package/dist/npm/models/functions.model.js +0 -6
  127. package/dist/npm/models/popover-show-option.type.js +0 -6
  128. package/dist/npm/models/position.type.js +0 -6
  129. package/dist/npm/models/show.option.type.js +0 -6
  130. package/dist/npm/package-metadata.js +0 -17
  131. package/dist/npm/popover/anchor.directive.js +0 -158
  132. package/dist/npm/popover/container.directive.js +0 -184
  133. package/dist/npm/popover/directives-base.js +0 -296
  134. package/dist/npm/popover/popover.component.js +0 -314
  135. package/dist/npm/popover/popover.service.js +0 -90
  136. package/dist/npm/popover/template-directives/actions-template.directive.js +0 -28
  137. package/dist/npm/popover/template-directives/body-template.directive.js +0 -28
  138. package/dist/npm/popover/template-directives/title-template.directive.js +0 -28
  139. package/dist/npm/popover.module.js +0 -67
  140. package/dist/npm/tooltip/tooltip.content.component.js +0 -194
  141. package/dist/npm/tooltip/tooltip.directive.js +0 -454
  142. package/dist/npm/tooltip/tooltip.settings.js +0 -48
  143. package/dist/npm/tooltip.module.js +0 -59
  144. package/dist/npm/tooltips.module.js +0 -47
  145. package/dist/npm/utils.js +0 -121
  146. package/dist/systemjs/kendo-angular-tooltip.js +0 -5
@@ -1,312 +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`&mdash;Enables the default animation
53
- * * `PopoverAnimation`&mdash;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
- /**
82
- * @hidden
83
- */
84
- this._width = 'auto';
85
- /**
86
- * @hidden
87
- */
88
- this._height = 'auto';
89
- this._offset = 6;
90
- this.subs = new Subscription();
91
- /**
92
- * @hidden
93
- */
94
- this._templateData = function () { return null; };
95
- validatePackage(packageMetadata);
96
- }
97
- Object.defineProperty(PopoverComponent.prototype, "offset", {
98
- get: function () {
99
- var calloutBuffer = 14;
100
- return this.callout
101
- ? calloutBuffer + this._offset
102
- : this._offset;
103
- },
104
- /**
105
- * Specifies the distance from the Popover to its anchor element in pixels.
106
- *
107
- * @default `6`
108
- */
109
- set: function (value) {
110
- this._offset = value;
111
- },
112
- enumerable: true,
113
- configurable: true
114
- });
115
- Object.defineProperty(PopoverComponent.prototype, "width", {
116
- get: function () {
117
- return this._width;
118
- },
119
- /**
120
- * Determines the width of the popover. Numeric values are treated as pixels.
121
- * @default 'auto'
122
- */
123
- set: function (value) {
124
- this._width = typeof value === 'number' ? value + "px" : value;
125
- },
126
- enumerable: true,
127
- configurable: true
128
- });
129
- Object.defineProperty(PopoverComponent.prototype, "height", {
130
- get: function () {
131
- return this._height;
132
- },
133
- /**
134
- * Determines the height of the popover. Numeric values are treated as pixels.
135
- * @default 'auto'
136
- */
137
- set: function (value) {
138
- this._height = typeof value === 'number' ? value + "px" : value;
139
- },
140
- enumerable: true,
141
- configurable: true
142
- });
143
- Object.defineProperty(PopoverComponent.prototype, "templateData", {
144
- get: function () {
145
- return this._templateData;
146
- },
147
- /**
148
- * Defines a callback function which returns custom data passed to the Popover templates.
149
- * It exposes the current anchor element as an argument. [See example]({% slug templates_popover %}#toc-popoverdatacallback)
150
- */
151
- set: function (fn) {
152
- if (isDevMode && typeof fn !== 'function') {
153
- throw new Error(ERRORS.templateData + " " + JSON.stringify(fn) + ".");
154
- }
155
- this._templateData = fn;
156
- },
157
- enumerable: true,
158
- configurable: true
159
- });
160
- Object.defineProperty(PopoverComponent.prototype, "isHidden", {
161
- /**
162
- * @hidden
163
- */
164
- get: function () {
165
- return !this.visible;
166
- },
167
- enumerable: true,
168
- configurable: true
169
- });
170
- Object.defineProperty(PopoverComponent.prototype, "hasAttributeHidden", {
171
- /**
172
- * @hidden
173
- */
174
- get: function () {
175
- return !this.visible;
176
- },
177
- enumerable: true,
178
- configurable: true
179
- });
180
- PopoverComponent.prototype.ngOnInit = function () {
181
- var _this = this;
182
- this.subs.add(this.localization.changes.subscribe(function (_a) {
183
- var rtl = _a.rtl;
184
- _this.direction = rtl ? 'rtl' : 'ltr';
185
- }));
186
- };
187
- PopoverComponent.prototype.ngOnDestroy = function () {
188
- this.subs.unsubscribe();
189
- };
190
- /**
191
- * @hidden
192
- */
193
- PopoverComponent.prototype.getCalloutPosition = function () {
194
- switch (this.position) {
195
- case 'top': return { 'k-callout-s': true };
196
- case 'bottom': return { 'k-callout-n': true };
197
- case 'left': return { 'k-callout-e': true };
198
- case 'right': return { 'k-callout-w': true };
199
- default: return { 'k-callout-s': true };
200
- }
201
- };
202
- tslib_1.__decorate([
203
- Input(),
204
- tslib_1.__metadata("design:type", String)
205
- ], PopoverComponent.prototype, "position", void 0);
206
- tslib_1.__decorate([
207
- Input(),
208
- tslib_1.__metadata("design:type", Number),
209
- tslib_1.__metadata("design:paramtypes", [Number])
210
- ], PopoverComponent.prototype, "offset", null);
211
- tslib_1.__decorate([
212
- Input(),
213
- tslib_1.__metadata("design:type", Object),
214
- tslib_1.__metadata("design:paramtypes", [Object])
215
- ], PopoverComponent.prototype, "width", null);
216
- tslib_1.__decorate([
217
- Input(),
218
- tslib_1.__metadata("design:type", Object),
219
- tslib_1.__metadata("design:paramtypes", [Object])
220
- ], PopoverComponent.prototype, "height", null);
221
- tslib_1.__decorate([
222
- HostBinding('attr.dir'),
223
- tslib_1.__metadata("design:type", String)
224
- ], PopoverComponent.prototype, "direction", void 0);
225
- tslib_1.__decorate([
226
- Input(),
227
- tslib_1.__metadata("design:type", String)
228
- ], PopoverComponent.prototype, "title", void 0);
229
- tslib_1.__decorate([
230
- Input(),
231
- tslib_1.__metadata("design:type", String)
232
- ], PopoverComponent.prototype, "subtitle", void 0);
233
- tslib_1.__decorate([
234
- Input(),
235
- tslib_1.__metadata("design:type", String)
236
- ], PopoverComponent.prototype, "body", void 0);
237
- tslib_1.__decorate([
238
- Input(),
239
- tslib_1.__metadata("design:type", Boolean)
240
- ], PopoverComponent.prototype, "callout", void 0);
241
- tslib_1.__decorate([
242
- Input(),
243
- tslib_1.__metadata("design:type", Object)
244
- ], PopoverComponent.prototype, "animation", void 0);
245
- tslib_1.__decorate([
246
- Input(),
247
- tslib_1.__metadata("design:type", Function),
248
- tslib_1.__metadata("design:paramtypes", [Function])
249
- ], PopoverComponent.prototype, "templateData", null);
250
- tslib_1.__decorate([
251
- HostBinding('class.k-hidden'),
252
- tslib_1.__metadata("design:type", Boolean),
253
- tslib_1.__metadata("design:paramtypes", [])
254
- ], PopoverComponent.prototype, "isHidden", null);
255
- tslib_1.__decorate([
256
- HostBinding('attr.aria-hidden'),
257
- tslib_1.__metadata("design:type", Boolean),
258
- tslib_1.__metadata("design:paramtypes", [])
259
- ], PopoverComponent.prototype, "hasAttributeHidden", null);
260
- tslib_1.__decorate([
261
- Output(),
262
- tslib_1.__metadata("design:type", EventEmitter)
263
- ], PopoverComponent.prototype, "show", void 0);
264
- tslib_1.__decorate([
265
- Output(),
266
- tslib_1.__metadata("design:type", EventEmitter)
267
- ], PopoverComponent.prototype, "shown", void 0);
268
- tslib_1.__decorate([
269
- Output(),
270
- tslib_1.__metadata("design:type", EventEmitter)
271
- ], PopoverComponent.prototype, "hide", void 0);
272
- tslib_1.__decorate([
273
- Output(),
274
- tslib_1.__metadata("design:type", EventEmitter)
275
- ], PopoverComponent.prototype, "hidden", void 0);
276
- tslib_1.__decorate([
277
- ContentChild(PopoverTitleTemplateDirective, { static: false }),
278
- tslib_1.__metadata("design:type", PopoverTitleTemplateDirective)
279
- ], PopoverComponent.prototype, "titleTemplate", void 0);
280
- tslib_1.__decorate([
281
- ContentChild(PopoverBodyTemplateDirective, { static: false }),
282
- tslib_1.__metadata("design:type", PopoverBodyTemplateDirective)
283
- ], PopoverComponent.prototype, "bodyTemplate", void 0);
284
- tslib_1.__decorate([
285
- ContentChild(PopoverActionsTemplateDirective, { static: false }),
286
- tslib_1.__metadata("design:type", PopoverActionsTemplateDirective)
287
- ], PopoverComponent.prototype, "actionsTemplate", void 0);
288
- tslib_1.__decorate([
289
- HostBinding('style.width'),
290
- tslib_1.__metadata("design:type", String)
291
- ], PopoverComponent.prototype, "_width", void 0);
292
- tslib_1.__decorate([
293
- HostBinding('style.height'),
294
- tslib_1.__metadata("design:type", String)
295
- ], PopoverComponent.prototype, "_height", void 0);
296
- PopoverComponent = tslib_1.__decorate([
297
- Component({
298
- selector: 'kendo-popover',
299
- providers: [
300
- LocalizationService,
301
- {
302
- provide: L10N_PREFIX,
303
- useValue: 'kendo.popover'
304
- }
305
- ],
306
- template: "\n <div *ngIf=\"visible\" role=\"tooltip\" class=\"k-popover\" [ngStyle]=\"{'width': width, 'height': 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 "
307
- }),
308
- tslib_1.__metadata("design:paramtypes", [LocalizationService])
309
- ], PopoverComponent);
310
- return PopoverComponent;
311
- }());
312
- 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 };