@anglr/common 12.0.0-beta.20220414093434 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/changelog.md +29 -1
  2. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +3 -1
  3. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  4. package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +5 -15
  5. package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
  6. package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +2 -2
  7. package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
  8. package/es2015/forms/src/components/index.js +1 -0
  9. package/es2015/forms/src/components/index.js.map +1 -1
  10. package/es2015/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +75 -0
  11. package/es2015/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -0
  12. package/es2015/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +31 -0
  13. package/es2015/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -0
  14. package/es2015/forms/src/directives/hasError/hasError.directive.js +25 -5
  15. package/es2015/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  16. package/es2015/forms/src/directives/index.js +3 -0
  17. package/es2015/forms/src/directives/index.js.map +1 -0
  18. package/es2015/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +24 -0
  19. package/es2015/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -0
  20. package/es2015/forms/src/index.js +1 -0
  21. package/es2015/forms/src/index.js.map +1 -1
  22. package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -2
  23. package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  24. package/es2015/forms/src/modules/hasError.module.js +14 -3
  25. package/es2015/forms/src/modules/hasError.module.js.map +1 -1
  26. package/es2015/positions/src/index.js +0 -7
  27. package/es2015/positions/src/index.js.map +1 -1
  28. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js +12 -8
  29. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
  30. package/es2015/src/services/position/position.interface.js.map +1 -1
  31. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +3 -1
  32. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  33. package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +5 -15
  34. package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
  35. package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +2 -2
  36. package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
  37. package/es2020/forms/src/components/index.js +1 -0
  38. package/es2020/forms/src/components/index.js.map +1 -1
  39. package/es2020/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +75 -0
  40. package/es2020/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -0
  41. package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +31 -0
  42. package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -0
  43. package/es2020/forms/src/directives/hasError/hasError.directive.js +25 -5
  44. package/es2020/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  45. package/es2020/forms/src/directives/index.js +3 -0
  46. package/es2020/forms/src/directives/index.js.map +1 -0
  47. package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +24 -0
  48. package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -0
  49. package/es2020/forms/src/index.js +1 -0
  50. package/es2020/forms/src/index.js.map +1 -1
  51. package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -2
  52. package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  53. package/es2020/forms/src/modules/hasError.module.js +14 -3
  54. package/es2020/forms/src/modules/hasError.module.js.map +1 -1
  55. package/es2020/positions/src/index.js +0 -7
  56. package/es2020/positions/src/index.js.map +1 -1
  57. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js +12 -8
  58. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
  59. package/es2020/src/services/position/position.interface.js.map +1 -1
  60. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
  61. package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
  62. package/forms/src/components/index.d.ts +1 -0
  63. package/forms/src/components/index.d.ts.map +1 -1
  64. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.css +4 -0
  65. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +53 -0
  66. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -0
  67. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.html +3 -0
  68. package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +10 -0
  69. package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -0
  70. package/forms/src/directives/hasError/hasError.directive.d.ts +16 -4
  71. package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
  72. package/forms/src/directives/index.d.ts +3 -0
  73. package/forms/src/directives/index.d.ts.map +1 -0
  74. package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +12 -0
  75. package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -0
  76. package/forms/src/index.d.ts +1 -0
  77. package/forms/src/index.d.ts.map +1 -1
  78. package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.d.ts.map +1 -1
  79. package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html +1 -1
  80. package/forms/src/modules/hasError.module.d.ts +7 -4
  81. package/forms/src/modules/hasError.module.d.ts.map +1 -1
  82. package/package.json +3 -3
  83. package/positions/src/index.d.ts +0 -7
  84. package/positions/src/index.d.ts.map +1 -1
  85. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts +6 -2
  86. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts.map +1 -1
  87. package/src/services/position/position.interface.d.ts +4 -0
  88. package/src/services/position/position.interface.d.ts.map +1 -1
  89. package/version.bak +1 -1
  90. package/es2015/positions/src/modules/positions/directives/positionTo/positionTo.directive.js +0 -58
  91. package/es2015/positions/src/modules/positions/directives/positionTo/positionTo.directive.js.map +0 -1
  92. package/es2015/positions/src/modules/positions/modules/positions.module.js +0 -24
  93. package/es2015/positions/src/modules/positions/modules/positions.module.js.map +0 -1
  94. package/es2015/positions/src/modules/tooltip/components/tooltip/tooltip.component.js +0 -98
  95. package/es2015/positions/src/modules/tooltip/components/tooltip/tooltip.component.js.map +0 -1
  96. package/es2015/positions/src/modules/tooltip/directives/tooltip/tooltip.directive.js +0 -230
  97. package/es2015/positions/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +0 -1
  98. package/es2015/positions/src/modules/tooltip/misc/tokens.js +0 -6
  99. package/es2015/positions/src/modules/tooltip/misc/tokens.js.map +0 -1
  100. package/es2015/positions/src/modules/tooltip/misc/tooltip.interface.js +0 -2
  101. package/es2015/positions/src/modules/tooltip/misc/tooltip.interface.js.map +0 -1
  102. package/es2015/positions/src/modules/tooltip/modules/tooltip.module.js +0 -32
  103. package/es2015/positions/src/modules/tooltip/modules/tooltip.module.js.map +0 -1
  104. package/es2020/positions/src/modules/positions/directives/positionTo/positionTo.directive.js +0 -58
  105. package/es2020/positions/src/modules/positions/directives/positionTo/positionTo.directive.js.map +0 -1
  106. package/es2020/positions/src/modules/positions/modules/positions.module.js +0 -24
  107. package/es2020/positions/src/modules/positions/modules/positions.module.js.map +0 -1
  108. package/es2020/positions/src/modules/tooltip/components/tooltip/tooltip.component.js +0 -98
  109. package/es2020/positions/src/modules/tooltip/components/tooltip/tooltip.component.js.map +0 -1
  110. package/es2020/positions/src/modules/tooltip/directives/tooltip/tooltip.directive.js +0 -229
  111. package/es2020/positions/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +0 -1
  112. package/es2020/positions/src/modules/tooltip/misc/tokens.js +0 -6
  113. package/es2020/positions/src/modules/tooltip/misc/tokens.js.map +0 -1
  114. package/es2020/positions/src/modules/tooltip/misc/tooltip.interface.js +0 -2
  115. package/es2020/positions/src/modules/tooltip/misc/tooltip.interface.js.map +0 -1
  116. package/es2020/positions/src/modules/tooltip/modules/tooltip.module.js +0 -32
  117. package/es2020/positions/src/modules/tooltip/modules/tooltip.module.js.map +0 -1
  118. package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.html +0 -0
  119. package/positions/src/modules/positions/directives/positionTo/positionTo.directive.d.ts +0 -34
  120. package/positions/src/modules/positions/directives/positionTo/positionTo.directive.d.ts.map +0 -1
  121. package/positions/src/modules/positions/modules/positions.module.d.ts +0 -11
  122. package/positions/src/modules/positions/modules/positions.module.d.ts.map +0 -1
  123. package/positions/src/modules/tooltip/components/tooltip/tooltip.component.css +0 -10
  124. package/positions/src/modules/tooltip/components/tooltip/tooltip.component.d.ts +0 -63
  125. package/positions/src/modules/tooltip/components/tooltip/tooltip.component.d.ts.map +0 -1
  126. package/positions/src/modules/tooltip/components/tooltip/tooltip.component.html +0 -6
  127. package/positions/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +0 -106
  128. package/positions/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +0 -1
  129. package/positions/src/modules/tooltip/misc/tokens.d.ts +0 -7
  130. package/positions/src/modules/tooltip/misc/tokens.d.ts.map +0 -1
  131. package/positions/src/modules/tooltip/misc/tooltip.interface.d.ts +0 -71
  132. package/positions/src/modules/tooltip/misc/tooltip.interface.d.ts.map +0 -1
  133. package/positions/src/modules/tooltip/modules/tooltip.module.d.ts +0 -13
  134. package/positions/src/modules/tooltip/modules/tooltip.module.d.ts.map +0 -1
@@ -1,229 +0,0 @@
1
- import { ApplicationRef, ComponentFactoryResolver, ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, TemplateRef } from '@angular/core';
2
- import { extend, isBlank, isPresent, nameof } from '@jscrpt/common';
3
- import { TooltipComponent } from '../../components/tooltip/tooltip.component';
4
- import { TOOLTIP_OPTIONS } from '../../misc/tokens';
5
- import { positionsWithFlip } from '../../../../misc/utils';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Default options for tooltip
9
- */
10
- const defaultOptions = {
11
- delay: 200,
12
- elementPositionAt: 'top left',
13
- tooltipPosition: 'bottom left',
14
- fixedPosition: false,
15
- allowSelection: false,
16
- tooltipRenderer: TooltipComponent,
17
- tooltipCssClass: null,
18
- stopPropagation: false
19
- };
20
- /**
21
- * Directive used for rendering tooltip
22
- */
23
- export class TooltipDirective {
24
- //######################### constructor #########################
25
- constructor(_componentFactoryResolver, _appRef, _injector, _element, options) {
26
- this._componentFactoryResolver = _componentFactoryResolver;
27
- this._appRef = _appRef;
28
- this._injector = _injector;
29
- this._element = _element;
30
- /**
31
- * Indication whether there is active show tooltip request
32
- */
33
- this._showRequest = false;
34
- /**
35
- * Indication whether keep open tooltip component
36
- */
37
- this._keepOpen = false;
38
- /**
39
- * Timeout that is used for handling mouse move
40
- */
41
- this._timeout = null;
42
- /**
43
- * Indication whether are html tags allowed in tooltip text
44
- */
45
- this.allowHtml = false;
46
- this._options = extend(true, {}, defaultOptions, options);
47
- }
48
- /**
49
- * Options used for displaying tooltip
50
- */
51
- get tooltipOptions() {
52
- return this._options;
53
- }
54
- set tooltipOptions(value) {
55
- this._options = extend(true, {}, this._options, value);
56
- }
57
- //######################### public methods - implementation of OnChanges #########################
58
- /**
59
- * Called when input value changes
60
- */
61
- ngOnChanges(changes) {
62
- if (nameof('tooltipVisible') in changes) {
63
- if (this.tooltipVisible) {
64
- this._showTooltip();
65
- }
66
- else {
67
- this._hideTooltip();
68
- }
69
- }
70
- }
71
- //######################### public methods - implementation of OnDestroy #########################
72
- /**
73
- * Called when component is destroyed
74
- */
75
- ngOnDestroy() {
76
- this._destroyTooltip();
77
- }
78
- //######################### public methods - host #########################
79
- /**
80
- * Handles mouse leave event, hover ends
81
- * @param event - Mouse event that occured
82
- * @internal
83
- */
84
- mouseLeave(event) {
85
- if (this._options.stopPropagation) {
86
- event.stopPropagation();
87
- }
88
- if (isBlank(this.tooltipVisible)) {
89
- setTimeout(() => {
90
- if (!this._keepOpen) {
91
- this._showRequest = false;
92
- this._hideTooltip();
93
- }
94
- }, 10);
95
- }
96
- }
97
- /**
98
- * Handles mouse move event, displaying tooltip
99
- * @param event - Mouse event that occured
100
- * @internal
101
- */
102
- mouseMove(event) {
103
- if (this._options.stopPropagation) {
104
- event.stopPropagation();
105
- }
106
- this._showRequest = true;
107
- //do nothing if tooltip is visible
108
- if (this._tooltipComponent || isPresent(this.tooltipVisible)) {
109
- return;
110
- }
111
- if (isPresent(this._timeout)) {
112
- clearTimeout(this._timeout);
113
- }
114
- this._timeout = setTimeout(() => {
115
- this._timeout = null;
116
- if (this._showRequest) {
117
- this._showTooltip(event.clientX);
118
- this._showRequest = false;
119
- }
120
- }, this._options.delay);
121
- }
122
- //######################### protected methods #########################
123
- /**
124
- * Shows tooltip
125
- * @param xCoordinate - X coordinate of mouse event in viewport
126
- */
127
- _showTooltip(xCoordinate) {
128
- this._createTooltip();
129
- this._showData();
130
- positionsWithFlip(this._tooltipElement, this._options.tooltipPosition, this._element.nativeElement, this._options.elementPositionAt);
131
- if (xCoordinate && !this._options.fixedPosition) {
132
- this._tooltipElement.style.left = `${xCoordinate}px`;
133
- }
134
- }
135
- /**
136
- * Hides tooltip
137
- */
138
- _hideTooltip() {
139
- this._destroyTooltip();
140
- }
141
- /**
142
- * Destroys tooltip component
143
- */
144
- _destroyTooltip() {
145
- if (this._tooltipComponent) {
146
- this._appRef.detachView(this._tooltipComponent.hostView);
147
- this._tooltipComponent.destroy();
148
- this._tooltipComponent = null;
149
- this._tooltipElement = null;
150
- }
151
- }
152
- /**
153
- * Creates tooltip renderer component
154
- */
155
- _createTooltip() {
156
- // 0. Destroyes absolute popup if it exists
157
- this._destroyTooltip();
158
- // 1. Create a component reference from the component
159
- this._tooltipComponent = this._componentFactoryResolver
160
- .resolveComponentFactory(this._options.tooltipRenderer)
161
- .create(this._injector);
162
- // 2. Attach component to the appRef so that it's inside the ng component tree
163
- this._appRef.attachView(this._tooltipComponent.hostView);
164
- // 3. Get DOM element from component
165
- this._tooltipElement = this._tooltipComponent.hostView
166
- .rootNodes[0];
167
- // 4. Append DOM element to the body
168
- document.body.appendChild(this._tooltipElement);
169
- }
170
- /**
171
- * Sets data to tooltip component and shows them
172
- */
173
- _showData() {
174
- if (this._tooltipComponent) {
175
- this._tooltipComponent.instance.allowHtml = this.allowHtml;
176
- this._tooltipComponent.instance.data = this.tooltip;
177
- this._tooltipComponent.instance.template = this.tooltipTemplate ?? this.tooltipTemplateChild;
178
- this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;
179
- this._tooltipComponent.instance.registerHoverEvents(() => {
180
- if (this._options.allowSelection) {
181
- this._keepOpen = true;
182
- this._showRequest = false;
183
- }
184
- }, () => {
185
- setTimeout(() => {
186
- this._keepOpen = false;
187
- if (!this._showRequest) {
188
- this._hideTooltip();
189
- }
190
- this._showRequest = false;
191
- }, 5);
192
- });
193
- this._tooltipComponent.instance.invalidateVisuals();
194
- }
195
- }
196
- }
197
- TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
198
- TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: TooltipDirective, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", tooltipTemplate: "tooltipTemplate", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: ["tooltipTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0 });
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TooltipDirective, decorators: [{
200
- type: Directive,
201
- args: [{
202
- selector: '[tooltip]'
203
- }]
204
- }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ElementRef }, { type: undefined, decorators: [{
205
- type: Optional
206
- }, {
207
- type: Inject,
208
- args: [TOOLTIP_OPTIONS]
209
- }] }]; }, propDecorators: { tooltip: [{
210
- type: Input
211
- }], allowHtml: [{
212
- type: Input
213
- }], tooltipTemplate: [{
214
- type: Input
215
- }], tooltipOptions: [{
216
- type: Input
217
- }], tooltipVisible: [{
218
- type: Input
219
- }], tooltipTemplateChild: [{
220
- type: ContentChild,
221
- args: ['tooltipTemplate']
222
- }], mouseLeave: [{
223
- type: HostListener,
224
- args: ['mouseleave', ['$event']]
225
- }], mouseMove: [{
226
- type: HostListener,
227
- args: ['mousemove', ['$event']]
228
- }] } });
229
- //# sourceMappingURL=tooltip.directive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../../positions/src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":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,IAAI,CAAC;oBACtB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;iBAC7B;YACL,CAAC,EACD,GAAG,EAAE;gBAED,UAAU,CAAC,GAAG,EAAE;oBAEZ,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;oBAEvB,IAAG,CAAC,IAAI,CAAC,YAAY,EACrB;wBACI,IAAI,CAAC,YAAY,EAAE,CAAC;qBACvB;oBAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;gBAC9B,CAAC,EAAE,CAAC,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;YAEvD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;SACvD;IACL,CAAC;;6GAjSQ,gBAAgB,0IAsFO,eAAe;iGAtFtC,gBAAgB;2FAAhB,gBAAgB;kBAJ5B,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;iBACxB;;0BAuFgB,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;4CA9CxC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,eAAe;sBADrB,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAcC,cAAc;sBADpB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,iBAAiB;gBAmDxB,UAAU;sBADhB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA2B/B,SAAS;sBADf,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ApplicationRef, ComponentFactoryResolver, ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, TemplateRef} from '@angular/core';\nimport {extend, isBlank, isPresent, nameof} from '@jscrpt/common';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {positionsWithFlip} from '../../../../misc/utils';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n elementPositionAt: 'top left',\n tooltipPosition: 'bottom left',\n fixedPosition: false,\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]'\n})\nexport class TooltipDirective<TData = any> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData|string;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public tooltipTemplate?: TemplateRef<any>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): TooltipOptions\n {\n return this._options;\n }\n public set tooltipOptions(value: TooltipOptions)\n {\n this._options = extend(true, {}, this._options, value);\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild('tooltipTemplate')\n public tooltipTemplateChild?: TemplateRef<any>;\n\n //######################### constructor #########################\n constructor(protected _componentFactoryResolver: ComponentFactoryResolver,\n protected _appRef: ApplicationRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n @Optional() @Inject(TOOLTIP_OPTIONS) options: TooltipOptions)\n {\n this._options = extend(true, {}, defaultOptions, options);\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\n }\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._destroyTooltip();\n }\n\n //######################### public methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mouseleave', ['$event'])\n public mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mousemove', ['$event'])\n public mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event.clientX);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param xCoordinate - X coordinate of mouse event in viewport\n */\n protected _showTooltip(xCoordinate?: number): void\n {\n this._createTooltip();\n this._showData();\n positionsWithFlip(this._tooltipElement, this._options.tooltipPosition, this._element.nativeElement, this._options.elementPositionAt);\n\n if(xCoordinate && !this._options.fixedPosition)\n {\n this._tooltipElement.style.left = `${xCoordinate}px`;\n }\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n this._appRef.detachView(this._tooltipComponent.hostView);\n this._tooltipComponent.destroy();\n this._tooltipComponent = null;\n this._tooltipElement = null;\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroyes absolute popup if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._componentFactoryResolver\n .resolveComponentFactory(this._options.tooltipRenderer)\n .create(this._injector);\n\n // 2. Attach component to the appRef so that it's inside the ng component tree\n this._appRef.attachView(this._tooltipComponent.hostView);\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n document.body.appendChild(this._tooltipElement);\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.tooltipTemplate ?? this.tooltipTemplateChild;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n}"]}
@@ -1,6 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- /**
3
- * Injection token used for injecting tooltip options
4
- */
5
- export const TOOLTIP_OPTIONS = new InjectionToken('TOOLTIP_OPTIONS');
6
- //# sourceMappingURL=tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../../positions/src/modules/tooltip/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,IAAI,cAAc,CAAiB,iBAAiB,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {TooltipOptions} from './tooltip.interface';\n\n/**\n * Injection token used for injecting tooltip options\n */\nexport const TOOLTIP_OPTIONS: InjectionToken<TooltipOptions> = new InjectionToken<TooltipOptions>('TOOLTIP_OPTIONS');"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tooltip.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.interface.js","sourceRoot":"","sources":["../../../../../../positions/src/modules/tooltip/misc/tooltip.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {TemplateRef, Type} from '@angular/core';\nimport type {PositionsCoordinates} from 'positions';\n\n/**\n * Represents component that is used for rendering tooltip\n */\nexport interface TooltipRenderer<TData = any>\n{\n //######################### properties #########################\n\n /**\n * Data that are rendered in tooltip\n */\n data: TData|null;\n\n /**\n * Template used for rendering tooltip\n */\n template: TemplateRef<TData>|null;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n allowHtml: boolean;\n\n /**\n * Css class that is applied to tooltip renderer component\n */\n cssClass: string|null;\n\n //######################### methods #########################\n\n /**\n * Registers handlers that allows reaction to entering or leaving tooltip\n * @param enter - Called when mouse enter tooltip component, hover\n * @param leave - Called when mouse leaves tooltip component\n */\n registerHoverEvents(enter: () => void, leave: () => void): void;\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n invalidateVisuals(): void;\n}\n\n/**\n * Options used for tooltip directive\n */\nexport interface TooltipOptions\n{\n /**\n * Delay for displaying of tooltip on hover\n */\n delay?: number;\n\n /**\n * Indication whether is tooltip displayed at fixed position, or if it is displayed where cursor enters element\n */\n fixedPosition?: boolean;\n\n /**\n * Position where should be tooltip displayed at element\n */\n elementPositionAt?: PositionsCoordinates;\n\n /**\n * Position of tooltip where should placed at\n */\n tooltipPosition?: PositionsCoordinates;\n\n /**\n * Allows selection of text in tooltip\n */\n allowSelection?: boolean|null;\n\n /**\n * Css class that is applied to tooltip renderer component\n */\n tooltipCssClass?: string|null;\n\n /**\n * Indication whether stop propagation of \"hover\" event\n */\n stopPropagation?: boolean|null;\n\n /**\n * Type of tooltip renderer that is used for rendering tooltip\n */\n tooltipRenderer?: Type<TooltipRenderer>;\n}"]}
@@ -1,32 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { TooltipComponent } from '../components/tooltip/tooltip.component';
4
- import { TooltipDirective } from '../directives/tooltip/tooltip.directive';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Module for rendering tooltips
8
- */
9
- export class TooltipModule {
10
- }
11
- TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
- TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TooltipModule, declarations: [TooltipDirective,
13
- TooltipComponent], imports: [CommonModule], exports: [TooltipDirective] });
14
- TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TooltipModule, imports: [[
15
- CommonModule
16
- ]] });
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TooltipModule, decorators: [{
18
- type: NgModule,
19
- args: [{
20
- imports: [
21
- CommonModule
22
- ],
23
- declarations: [
24
- TooltipDirective,
25
- TooltipComponent
26
- ],
27
- exports: [
28
- TooltipDirective
29
- ]
30
- }]
31
- }] });
32
- //# sourceMappingURL=tooltip.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.module.js","sourceRoot":"","sources":["../../../../../../positions/src/modules/tooltip/modules/tooltip.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,yCAAyC,CAAC;;AAEzE;;GAEG;AAiBH,MAAM,OAAO,aAAa;;0GAAb,aAAa;2GAAb,aAAa,iBARlB,gBAAgB;QAChB,gBAAgB,aALhB,YAAY,aASZ,gBAAgB;2GAGX,aAAa,YAbtB;YACI,YAAY;SACf;2FAWQ,aAAa;kBAhBzB,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;qBACf;oBACD,YAAY,EACZ;wBACI,gBAAgB;wBAChB,gBAAgB;qBACnB;oBACD,OAAO,EACP;wBACI,gBAAgB;qBACnB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {TooltipComponent} from '../components/tooltip/tooltip.component';\nimport {TooltipDirective} from '../directives/tooltip/tooltip.directive';\n\n/**\n * Module for rendering tooltips\n */\n@NgModule(\n{\n imports:\n [\n CommonModule\n ],\n declarations:\n [\n TooltipDirective,\n TooltipComponent\n ],\n exports:\n [\n TooltipDirective\n ]\n})\nexport class TooltipModule\n{\n}\n"]}
@@ -1,34 +0,0 @@
1
- import { ElementRef, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
2
- import type { PositionsCoordinates } from 'positions';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Sets position of attached element relative to provided element
6
- */
7
- export declare class PositionToDirective implements OnChanges {
8
- private _element;
9
- private _document;
10
- /**
11
- * Html element which is used as target for positioning against it
12
- */
13
- target: HTMLElement;
14
- /**
15
- * Relative coordinates of element
16
- */
17
- elementCoordinates: PositionsCoordinates;
18
- /**
19
- * Relative coordinates of target element
20
- */
21
- targetCoordinates: PositionsCoordinates;
22
- /**
23
- * Occurs when flip occurs during positioning
24
- */
25
- flip: EventEmitter<void>;
26
- constructor(_element: ElementRef<HTMLElement>, _document: Document);
27
- /**
28
- * Called when input value changes
29
- */
30
- ngOnChanges(changes: SimpleChanges): void;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<PositionToDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<PositionToDirective, "[positionTo]", never, { "target": "positionTo"; "elementCoordinates": "elementCoordinates"; "targetCoordinates": "targetCoordinates"; }, { "flip": "flip"; }, never>;
33
- }
34
- //# sourceMappingURL=positionTo.directive.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"positionTo.directive.d.ts","sourceRoot":"","sources":["positionTo.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAE,aAAa,EAAkB,YAAY,EAAC,MAAM,eAAe,CAAC;AAGnH,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;;AAIpD;;GAEG;AACH,qBAIa,mBAAoB,YAAW,SAAS;IA+BrC,OAAO,CAAC,QAAQ;IACE,OAAO,CAAC,SAAS;IA5B/C;;OAEG;IAEI,MAAM,EAAE,WAAW,CAAC;IAE3B;;OAEG;IAEI,kBAAkB,EAAE,oBAAoB,CAAc;IAE7D;;OAEG;IAEI,iBAAiB,EAAE,oBAAoB,CAAiB;IAI/D;;OAEG;IAEI,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAA4B;gBAGvC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,EACf,SAAS,EAAE,QAAQ;IAMzD;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;yCAzCvC,mBAAmB;2CAAnB,mBAAmB;CAgD/B"}
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "../directives/positionTo/positionTo.directive";
3
- /**
4
- * Module for position to directive
5
- */
6
- export declare class PositionsModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<PositionsModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<PositionsModule, [typeof i1.PositionToDirective], never, [typeof i1.PositionToDirective]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<PositionsModule>;
10
- }
11
- //# sourceMappingURL=positions.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"positions.module.d.ts","sourceRoot":"","sources":["positions.module.ts"],"names":[],"mappings":";;AAIA;;GAEG;AACH,qBAca,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAE3B"}
@@ -1,10 +0,0 @@
1
- :host
2
- {
3
- display: block;
4
- position: absolute;
5
- padding: 2px 4px;
6
- border-radius: 3px;
7
- font-size: 0.9em;
8
- max-width: 300px;
9
- user-select: text;
10
- }
@@ -1,63 +0,0 @@
1
- import { TemplateRef, ChangeDetectorRef, ElementRef } from '@angular/core';
2
- import { TooltipRenderer } from '../../misc/tooltip.interface';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Component used for displaying tooltip content
6
- */
7
- export declare class TooltipComponent<TData = any> implements TooltipRenderer<TData> {
8
- protected _changeDetector: ChangeDetectorRef;
9
- protected _element: ElementRef<HTMLElement>;
10
- /**
11
- * Called when mouse enter tooltip component, hover
12
- */
13
- protected _enterFn: () => void;
14
- /**
15
- * Called when mouse leaves tooltip component
16
- */
17
- protected _leaveFn: () => void;
18
- /**
19
- * Data that are rendered in tooltip
20
- */
21
- data: TData | null;
22
- /**
23
- * Template used for rendering tooltip
24
- */
25
- template: TemplateRef<TData> | null;
26
- /**
27
- * Indication whether are html tags allowed in tooltip text
28
- */
29
- allowHtml: boolean;
30
- /**
31
- * Css class that is applied to tooltip renderer component
32
- */
33
- cssClass: string | null;
34
- /**
35
- * Attach fade in/out animation to element
36
- * @internal
37
- */
38
- animation: boolean;
39
- constructor(_changeDetector: ChangeDetectorRef, _element: ElementRef<HTMLElement>);
40
- /**
41
- * Registers handlers that allows reaction to entering or leaving tooltip
42
- * @param enter - Called when mouse enter tooltip component, hover
43
- * @param leave - Called when mouse leaves tooltip component
44
- */
45
- registerHoverEvents(enter: () => void, leave: () => void): void;
46
- /**
47
- * Explicitly runs invalidation of content (change detection)
48
- */
49
- invalidateVisuals(): void;
50
- /**
51
- * Handles mouse enter event over tooltip
52
- * @internal
53
- */
54
- mouseEnter(): void;
55
- /**
56
- * Handles mouse leave event over tooltip
57
- * @internal
58
- */
59
- mouseLeave(): void;
60
- static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent<any>, never>;
61
- static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent<any>, "tooltip-popup", never, {}, {}, never, never>;
62
- }
63
- //# sourceMappingURL=tooltip.component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.component.d.ts","sourceRoot":"","sources":["tooltip.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,WAAW,EAAE,iBAAiB,EAAe,UAAU,EAAe,MAAM,eAAe,CAAC;AAIxI,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;;AAE7D;;GAEG;AACH,qBAqBa,gBAAgB,CAAC,KAAK,GAAG,GAAG,CAAE,YAAW,eAAe,CAAC,KAAK,CAAC;IA8C5D,SAAS,CAAC,eAAe,EAAE,iBAAiB;IAC5C,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IA3CvD;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAc;IAE5C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAc;IAI5C;;OAEG;IACI,IAAI,EAAE,KAAK,GAAC,IAAI,CAAC;IAExB;;OAEG;IACI,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,GAAC,IAAI,CAAC;IAEzC;;OAEG;IACI,SAAS,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACI,QAAQ,EAAE,MAAM,GAAC,IAAI,CAAC;IAI7B;;;OAGG;IAEI,SAAS,EAAE,OAAO,CAAQ;gBAGX,eAAe,EAAE,iBAAiB,EAClC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAMvD;;;;OAIG;IACI,mBAAmB,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI;IAMtE;;OAEG;IACI,iBAAiB,IAAI,IAAI;IAYhC;;;OAGG;IAEI,UAAU,IAAI,IAAI;IAKzB;;;OAGG;IAEI,UAAU,IAAI,IAAI;yCA9FhB,gBAAgB;2CAAhB,gBAAgB;CAkG5B"}
@@ -1,6 +0,0 @@
1
- <div *ngIf="!template && !allowHtml">{{data}}</div>
2
- <div *ngIf="!template && allowHtml" [innerHTML]="data"></div>
3
-
4
- <ng-template [ngIf]="template">
5
- <ng-container *ngTemplateOutlet="template; context: {$implicit: data}"></ng-container>
6
- </ng-template>
@@ -1,106 +0,0 @@
1
- import { ApplicationRef, ComponentFactoryResolver, ComponentRef, ElementRef, Injector, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { TooltipOptions, TooltipRenderer } from '../../misc/tooltip.interface';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive used for rendering tooltip
6
- */
7
- export declare class TooltipDirective<TData = any> implements OnChanges, OnDestroy {
8
- protected _componentFactoryResolver: ComponentFactoryResolver;
9
- protected _appRef: ApplicationRef;
10
- protected _injector: Injector;
11
- protected _element: ElementRef<HTMLElement>;
12
- /**
13
- * Instance of component used for rendering tooltip
14
- */
15
- protected _tooltipComponent?: ComponentRef<TooltipRenderer>;
16
- /**
17
- * Instance of HTML element for tooltip renderer
18
- */
19
- protected _tooltipElement?: HTMLElement;
20
- /**
21
- * Instance of options provided for this tooltip
22
- */
23
- protected _options: TooltipOptions;
24
- /**
25
- * Indication whether there is active show tooltip request
26
- */
27
- protected _showRequest: boolean;
28
- /**
29
- * Indication whether keep open tooltip component
30
- */
31
- protected _keepOpen: boolean;
32
- /**
33
- * Timeout that is used for handling mouse move
34
- */
35
- protected _timeout: number | null;
36
- /**
37
- * Tooltip text that is displayed, or any data that could be passed to template
38
- */
39
- tooltip?: TData | string;
40
- /**
41
- * Indication whether are html tags allowed in tooltip text
42
- */
43
- allowHtml: boolean;
44
- /**
45
- * Instance of tooltip template that is used for rendering
46
- */
47
- tooltipTemplate?: TemplateRef<any>;
48
- /**
49
- * Options used for displaying tooltip
50
- */
51
- get tooltipOptions(): TooltipOptions;
52
- set tooltipOptions(value: TooltipOptions);
53
- /**
54
- * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this
55
- */
56
- tooltipVisible?: boolean;
57
- /**
58
- * Instance of template from element content, used for rendering
59
- */
60
- tooltipTemplateChild?: TemplateRef<any>;
61
- constructor(_componentFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef, _injector: Injector, _element: ElementRef<HTMLElement>, options: TooltipOptions);
62
- /**
63
- * Called when input value changes
64
- */
65
- ngOnChanges(changes: SimpleChanges): void;
66
- /**
67
- * Called when component is destroyed
68
- */
69
- ngOnDestroy(): void;
70
- /**
71
- * Handles mouse leave event, hover ends
72
- * @param event - Mouse event that occured
73
- * @internal
74
- */
75
- mouseLeave(event: MouseEvent): void;
76
- /**
77
- * Handles mouse move event, displaying tooltip
78
- * @param event - Mouse event that occured
79
- * @internal
80
- */
81
- mouseMove(event: MouseEvent): void;
82
- /**
83
- * Shows tooltip
84
- * @param xCoordinate - X coordinate of mouse event in viewport
85
- */
86
- protected _showTooltip(xCoordinate?: number): void;
87
- /**
88
- * Hides tooltip
89
- */
90
- protected _hideTooltip(): void;
91
- /**
92
- * Destroys tooltip component
93
- */
94
- protected _destroyTooltip(): void;
95
- /**
96
- * Creates tooltip renderer component
97
- */
98
- protected _createTooltip(): void;
99
- /**
100
- * Sets data to tooltip component and shows them
101
- */
102
- protected _showData(): void;
103
- static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective<any>, [null, null, null, null, { optional: true; }]>;
104
- static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective<any>, "[tooltip]", never, { "tooltip": "tooltip"; "allowHtml": "allowHtml"; "tooltipTemplate": "tooltipTemplate"; "tooltipOptions": "tooltipOptions"; "tooltipVisible": "tooltipVisible"; }, {}, ["tooltipTemplateChild"]>;
105
- }
106
- //# sourceMappingURL=tooltip.directive.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.directive.d.ts","sourceRoot":"","sources":["tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAE,YAAY,EAA2B,UAAU,EAAyC,QAAQ,EAAS,SAAS,EAAE,SAAS,EAAY,aAAa,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAI9O,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;;AAmB7E;;GAEG;AACH,qBAIa,gBAAgB,CAAC,KAAK,GAAG,GAAG,CAAE,YAAW,SAAS,EAAE,SAAS;IAkF1D,SAAS,CAAC,yBAAyB,EAAE,wBAAwB;IAC7D,SAAS,CAAC,OAAO,EAAE,cAAc;IACjC,SAAS,CAAC,SAAS,EAAE,QAAQ;IAC7B,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAjFvD;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAE5D;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,cAAc,CAAC;IAEnC;;OAEG;IACH,SAAS,CAAC,Y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kS5B"}
@@ -1,7 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { TooltipOptions } from './tooltip.interface';
3
- /**
4
- * Injection token used for injecting tooltip options
5
- */
6
- export declare const TOOLTIP_OPTIONS: InjectionToken<TooltipOptions>;
7
- //# sourceMappingURL=tokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,cAAc,CAAyD,CAAC"}