@ngneat/helipopper 13.0.0 → 13.1.1
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/fesm2022/ngneat-helipopper-config.mjs +23 -3
- package/fesm2022/ngneat-helipopper-config.mjs.map +1 -1
- package/fesm2022/ngneat-helipopper.mjs +194 -116
- package/fesm2022/ngneat-helipopper.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngneat-helipopper-config.d.ts +18 -8
- package/types/ngneat-helipopper.d.ts +20 -11
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionToken, makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { of } from 'rxjs';
|
|
2
3
|
|
|
3
4
|
const tooltipVariation = {
|
|
4
5
|
theme: undefined,
|
|
@@ -22,22 +23,41 @@ function withContextMenuVariation(baseVariation) {
|
|
|
22
23
|
trigger: 'manual',
|
|
23
24
|
arrow: false,
|
|
24
25
|
offset: [0, 0],
|
|
26
|
+
isContextMenu: true, // signals the directive to attach the right-click listener
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
const TIPPY_LOADER = new InjectionToken(ngDevMode ? 'TIPPY_LOADER' : '');
|
|
29
31
|
const TIPPY_CONFIG = new InjectionToken(ngDevMode ? 'TIPPY_CONFIG' : '');
|
|
32
|
+
const TIPPY_LOADER_COMPONENT = new InjectionToken(ngDevMode ? 'TIPPY_LOADER_COMPONENT' : '');
|
|
33
|
+
const TIPPY_LOADER_TIMING = new InjectionToken(ngDevMode ? 'TIPPY_LOADER_TIMING' : '', { factory: () => of(undefined) });
|
|
30
34
|
|
|
31
35
|
function provideTippyLoader(loader) {
|
|
32
36
|
return makeEnvironmentProviders([{ provide: TIPPY_LOADER, useValue: loader }]);
|
|
33
37
|
}
|
|
34
|
-
function provideTippyConfig(config) {
|
|
35
|
-
|
|
38
|
+
function provideTippyConfig(config, ...features) {
|
|
39
|
+
if (features.length) {
|
|
40
|
+
return makeEnvironmentProviders([
|
|
41
|
+
{ provide: TIPPY_CONFIG, useValue: config },
|
|
42
|
+
...features,
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return { provide: TIPPY_CONFIG, useValue: config };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function withTippyLoaderComponent(component) {
|
|
50
|
+
return makeEnvironmentProviders([
|
|
51
|
+
{ provide: TIPPY_LOADER_COMPONENT, useValue: component },
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
54
|
+
function withTippyLoaderTiming(timing) {
|
|
55
|
+
return makeEnvironmentProviders([{ provide: TIPPY_LOADER_TIMING, useValue: timing }]);
|
|
36
56
|
}
|
|
37
57
|
|
|
38
58
|
/**
|
|
39
59
|
* Generated bundle index. Do not edit.
|
|
40
60
|
*/
|
|
41
61
|
|
|
42
|
-
export { TIPPY_CONFIG, TIPPY_LOADER, popperVariation, provideTippyConfig, provideTippyLoader, tooltipVariation, withContextMenuVariation };
|
|
62
|
+
export { TIPPY_CONFIG, TIPPY_LOADER, TIPPY_LOADER_COMPONENT, TIPPY_LOADER_TIMING, popperVariation, provideTippyConfig, provideTippyLoader, tooltipVariation, withContextMenuVariation, withTippyLoaderComponent, withTippyLoaderTiming };
|
|
43
63
|
//# sourceMappingURL=ngneat-helipopper-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngneat-helipopper-config.mjs","sources":["../../../../projects/ngneat/helipopper/config/src/defaults.ts","../../../../projects/ngneat/helipopper/config/src/tippy.types.ts","../../../../projects/ngneat/helipopper/config/src/providers.ts","../../../../projects/ngneat/helipopper/config/src/ngneat-helipopper-config.ts"],"sourcesContent":["import type { TippyProps } from './tippy.types';\n\n// A variation is a set of predefined tippy properties.\ntype Variation = Partial<TippyProps>;\n\nexport const tooltipVariation: Variation = {\n theme: undefined,\n arrow: false,\n animation: 'scale',\n trigger: 'mouseenter focus',\n offset: [0, 5],\n};\n\nexport const popperVariation: Variation = {\n theme: 'light',\n arrow: true,\n offset: [0, 10],\n animation: undefined,\n trigger: 'click',\n interactive: true,\n};\n\nexport function withContextMenuVariation(baseVariation: Variation):
|
|
1
|
+
{"version":3,"file":"ngneat-helipopper-config.mjs","sources":["../../../../projects/ngneat/helipopper/config/src/defaults.ts","../../../../projects/ngneat/helipopper/config/src/tippy.types.ts","../../../../projects/ngneat/helipopper/config/src/providers.ts","../../../../projects/ngneat/helipopper/config/src/ngneat-helipopper-config.ts"],"sourcesContent":["import type { TippyProps, VariationConfig } from './tippy.types';\n\n// A variation is a set of predefined tippy properties.\ntype Variation = Partial<TippyProps>;\n\nexport const tooltipVariation: Variation = {\n theme: undefined,\n arrow: false,\n animation: 'scale',\n trigger: 'mouseenter focus',\n offset: [0, 5],\n};\n\nexport const popperVariation: Variation = {\n theme: 'light',\n arrow: true,\n offset: [0, 10],\n animation: undefined,\n trigger: 'click',\n interactive: true,\n};\n\nexport function withContextMenuVariation(baseVariation: Variation): VariationConfig {\n return {\n ...baseVariation,\n placement: 'right-start',\n trigger: 'manual',\n arrow: false,\n offset: [0, 0],\n isContextMenu: true, // signals the directive to attach the right-click listener\n };\n}\n","import type tippy from 'tippy.js';\nimport type { Instance, Props } from 'tippy.js';\nimport { ElementRef, InjectionToken, Type } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport type { Content, ResolveViewRef, ViewOptions } from '@ngneat/overview';\n\nexport interface CreateOptions extends Partial<TippyProps>, ViewOptions {\n variation: string;\n preserveView: boolean;\n className: string | string[];\n data: any;\n}\n\nexport interface TippyInstance extends Instance {\n data?: any;\n}\n\nexport type TippyProps = Props;\n\n// Extends tippy props with isContextMenu so any named variation (not just one\n// called 'contextMenu') can opt into right-click listener behaviour.\nexport type VariationConfig = Partial<TippyProps> & { isContextMenu?: boolean };\n\nexport interface ExtendedTippyProps extends TippyProps {\n variations: Record<string, VariationConfig>;\n defaultVariation: keyof ExtendedTippyProps['variations'];\n beforeRender?: (text: string) => string;\n zIndexGetter?(): number;\n}\n\nexport type TippyElement = ElementRef | Element;\n\nexport interface ExtendedTippyInstance<T> extends TippyInstance {\n view: ResolveViewRef<T> | null;\n $viewOptions: ViewOptions;\n context?: ViewOptions['context'];\n}\n\nexport type TippyConfig = Partial<ExtendedTippyProps>;\n\nexport type TippyContent = Content | (() => Promise<Type<any>>);\n\nexport type TippyLoader = () => typeof tippy | Promise<{ default: typeof tippy }>;\n\nexport const TIPPY_LOADER = new InjectionToken<TippyLoader>(\n ngDevMode ? 'TIPPY_LOADER' : '',\n);\n\nexport const TIPPY_CONFIG = new InjectionToken<TippyConfig>(\n ngDevMode ? 'TIPPY_CONFIG' : '',\n);\n\nexport const TIPPY_LOADER_COMPONENT = new InjectionToken<Type<unknown>>(\n ngDevMode ? 'TIPPY_LOADER_COMPONENT' : '',\n);\n\nexport type TippyLoaderTiming = Observable<void>;\n\nexport const TIPPY_LOADER_TIMING = new InjectionToken<TippyLoaderTiming>(\n ngDevMode ? 'TIPPY_LOADER_TIMING' : '',\n { factory: () => of(undefined) },\n);\n","import {\n EnvironmentProviders,\n makeEnvironmentProviders,\n Provider,\n Type,\n} from '@angular/core';\n\nimport {\n TIPPY_CONFIG,\n TIPPY_LOADER,\n TIPPY_LOADER_COMPONENT,\n TIPPY_LOADER_TIMING,\n type TippyLoader,\n type TippyConfig,\n type TippyLoaderTiming,\n} from './tippy.types';\n\nexport function provideTippyLoader(loader: TippyLoader) {\n return makeEnvironmentProviders([{ provide: TIPPY_LOADER, useValue: loader }]);\n}\n\nexport function provideTippyConfig(config: TippyConfig): Provider;\nexport function provideTippyConfig(\n config: TippyConfig,\n ...features: EnvironmentProviders[]\n): EnvironmentProviders;\nexport function provideTippyConfig(\n config: TippyConfig,\n ...features: EnvironmentProviders[]\n): Provider | EnvironmentProviders {\n if (features.length) {\n return makeEnvironmentProviders([\n { provide: TIPPY_CONFIG, useValue: config },\n ...features,\n ]);\n } else {\n return { provide: TIPPY_CONFIG, useValue: config };\n }\n}\n\nexport function withTippyLoaderComponent(component: Type<unknown>): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: TIPPY_LOADER_COMPONENT, useValue: component },\n ]);\n}\n\nexport function withTippyLoaderTiming(timing: TippyLoaderTiming): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: TIPPY_LOADER_TIMING, useValue: timing }]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAKO,MAAM,gBAAgB,GAAc;AACzC,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;;AAGT,MAAM,eAAe,GAAc;AACxC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;AACf,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,WAAW,EAAE,IAAI;;AAGb,SAAU,wBAAwB,CAAC,aAAwB,EAAA;IAC/D,OAAO;AACL,QAAA,GAAG,aAAa;AAChB,QAAA,SAAS,EAAE,aAAa;AACxB,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,KAAK,EAAE,KAAK;AACZ,QAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACd,aAAa,EAAE,IAAI;KACpB;AACH;;ACaO,MAAM,YAAY,GAAG,IAAI,cAAc,CAC5C,SAAS,GAAG,cAAc,GAAG,EAAE;AAG1B,MAAM,YAAY,GAAG,IAAI,cAAc,CAC5C,SAAS,GAAG,cAAc,GAAG,EAAE;AAG1B,MAAM,sBAAsB,GAAG,IAAI,cAAc,CACtD,SAAS,GAAG,wBAAwB,GAAG,EAAE;AAKpC,MAAM,mBAAmB,GAAG,IAAI,cAAc,CACnD,SAAS,GAAG,qBAAqB,GAAG,EAAE,EACtC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE;;AC3C5B,SAAU,kBAAkB,CAAC,MAAmB,EAAA;AACpD,IAAA,OAAO,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AAChF;SAOgB,kBAAkB,CAChC,MAAmB,EACnB,GAAG,QAAgC,EAAA;AAEnC,IAAA,IAAI,QAAQ,CAAC,MAAM,EAAE;AACnB,QAAA,OAAO,wBAAwB,CAAC;AAC9B,YAAA,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;AAC3C,YAAA,GAAG,QAAQ;AACZ,SAAA,CAAC;IACJ;SAAO;QACL,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;IACpD;AACF;AAEM,SAAU,wBAAwB,CAAC,SAAwB,EAAA;AAC/D,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,SAAS,EAAE;AACzD,KAAA,CAAC;AACJ;AAEM,SAAU,qBAAqB,CAAC,MAAyB,EAAA;AAC7D,IAAA,OAAO,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AACvF;;AChDA;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ElementRef, inject, NgZone, ɵisPromise as _isPromise, Injectable, InjectionToken, Injector, signal, booleanAttribute, input, output, model, computed, DestroyRef, PLATFORM_ID, ViewContainerRef, afterEveryRender, untracked, effect, Directive } from '@angular/core';
|
|
3
3
|
import { isPlatformServer } from '@angular/common';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import { Observable, defer, of, tap, map as map$1, Subject, merge } from 'rxjs';
|
|
6
|
-
import { auditTime, map, switchMap, takeUntil } from 'rxjs/operators';
|
|
5
|
+
import { Observable, defer, of, tap, map as map$1, Subject, firstValueFrom, combineLatest, from, merge } from 'rxjs';
|
|
6
|
+
import { auditTime, map, switchMap, takeUntil, filter } from 'rxjs/operators';
|
|
7
7
|
import { ViewService, isTemplateRef, isComponent, isString } from '@ngneat/overview';
|
|
8
|
-
import { TIPPY_LOADER, TIPPY_CONFIG } from '@ngneat/helipopper/config';
|
|
8
|
+
import { TIPPY_LOADER, TIPPY_CONFIG, TIPPY_LOADER_COMPONENT, TIPPY_LOADER_TIMING } from '@ngneat/helipopper/config';
|
|
9
9
|
|
|
10
10
|
// Let's retrieve the native `IntersectionObserver` implementation hidden by
|
|
11
11
|
// `__zone_symbol__IntersectionObserver`. This would be the unpatched version of
|
|
@@ -151,7 +151,7 @@ class TippyFactory {
|
|
|
151
151
|
* function, which may return a promise if the tippy.js library is to be
|
|
152
152
|
* loaded asynchronously.
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
getTippyImpl() {
|
|
155
155
|
this._tippyImpl$ ||= defer(() => {
|
|
156
156
|
if (this._tippy)
|
|
157
157
|
return of(this._tippy);
|
|
@@ -181,9 +181,7 @@ class TippyFactory {
|
|
|
181
181
|
this._tippy = tippy;
|
|
182
182
|
}));
|
|
183
183
|
});
|
|
184
|
-
return this._tippyImpl
|
|
185
|
-
return this._ngZone.runOutsideAngular(() => tippy(target, props));
|
|
186
|
-
}));
|
|
184
|
+
return this._tippyImpl$;
|
|
187
185
|
}
|
|
188
186
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
189
187
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyFactory, providedIn: 'root' }); }
|
|
@@ -209,6 +207,7 @@ function injectTippyRef() {
|
|
|
209
207
|
|
|
210
208
|
class TippyService {
|
|
211
209
|
constructor() {
|
|
210
|
+
this._ngZone = inject(NgZone);
|
|
212
211
|
this._injector = inject(Injector);
|
|
213
212
|
this._globalConfig = inject(TIPPY_CONFIG, { optional: true });
|
|
214
213
|
this._viewService = inject(ViewService);
|
|
@@ -278,7 +277,11 @@ class TippyService {
|
|
|
278
277
|
options.onCreate?.(instance);
|
|
279
278
|
},
|
|
280
279
|
};
|
|
281
|
-
return this._tippyFactory.
|
|
280
|
+
return this._tippyFactory.getTippyImpl().pipe(map$1((tippy) => {
|
|
281
|
+
return this._ngZone.runOutsideAngular(() => {
|
|
282
|
+
return tippy(host, config);
|
|
283
|
+
});
|
|
284
|
+
}));
|
|
282
285
|
}
|
|
283
286
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
284
287
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyService, providedIn: 'root' }); }
|
|
@@ -310,7 +313,7 @@ const appendTo = function appendTo() {
|
|
|
310
313
|
// We are providing them as default input values.
|
|
311
314
|
// The `tippy.js` repository has been archived and is unlikely to
|
|
312
315
|
// change in the future, so it is safe to use these values as defaults.
|
|
313
|
-
const defaultAppendTo = () => document.body;
|
|
316
|
+
const defaultAppendTo = (() => document.body);
|
|
314
317
|
const defaultDelay = 0;
|
|
315
318
|
const defaultDuration = [300, 250];
|
|
316
319
|
const defaultInteractiveBorder = 2;
|
|
@@ -366,10 +369,11 @@ class TippyDirective {
|
|
|
366
369
|
alias: 'tpUseHostWidth' });
|
|
367
370
|
this.hideOnEscape = input(false, { ...(ngDevMode ? { debugName: "hideOnEscape" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
368
371
|
alias: 'tpHideOnEscape' });
|
|
372
|
+
this.tippyProps = input(undefined, { ...(ngDevMode ? { debugName: "tippyProps" } : /* istanbul ignore next */ {}), alias: 'tpTippyProps' });
|
|
369
373
|
this.popperWidth = input(undefined, { ...(ngDevMode ? { debugName: "popperWidth" } : /* istanbul ignore next */ {}), alias: 'tpPopperWidth' });
|
|
370
374
|
this.customHost = input(undefined, { ...(ngDevMode ? { debugName: "customHost" } : /* istanbul ignore next */ {}), alias: 'tpHost' });
|
|
371
|
-
this.
|
|
372
|
-
this.
|
|
375
|
+
this.tpOnShow = output({ alias: 'tpOnShow' });
|
|
376
|
+
this.tpOnHide = output({ alias: 'tpOnHide' });
|
|
373
377
|
this.isVisible = model(false, { ...(ngDevMode ? { debugName: "isVisible" } : /* istanbul ignore next */ {}), alias: 'tpIsVisible' });
|
|
374
378
|
this.visible = output({ alias: 'tpVisible' });
|
|
375
379
|
this.viewRef = null;
|
|
@@ -401,6 +405,9 @@ class TippyDirective {
|
|
|
401
405
|
this.vcr = inject(ViewContainerRef);
|
|
402
406
|
this.ngZone = inject(NgZone);
|
|
403
407
|
this.hostRef = inject(ElementRef);
|
|
408
|
+
this.loaderViewRef = null;
|
|
409
|
+
this.globalLoaderComponent = inject(TIPPY_LOADER_COMPONENT, { optional: true });
|
|
410
|
+
this.loaderTiming = inject(TIPPY_LOADER_TIMING);
|
|
404
411
|
if (this.isServer)
|
|
405
412
|
return;
|
|
406
413
|
this.setupListeners();
|
|
@@ -427,10 +434,10 @@ class TippyDirective {
|
|
|
427
434
|
ngOnChanges(changes) {
|
|
428
435
|
if (this.isServer)
|
|
429
436
|
return;
|
|
430
|
-
// `isVisible`
|
|
431
|
-
//
|
|
437
|
+
// `isVisible` and `tippyProps` are not merged into `this.props`; they are
|
|
438
|
+
// handled separately (model signal and direct-spread effect respectively).
|
|
432
439
|
const changedProps = Object.keys(changes)
|
|
433
|
-
.filter((key) => key !== 'isVisible')
|
|
440
|
+
.filter((key) => key !== 'isVisible' && key !== 'tippyProps')
|
|
434
441
|
.reduce((accumulator, key) => ({ ...accumulator, [key]: changes[key].currentValue }), {});
|
|
435
442
|
// Variation defaults are applied only on the first call or when the variation
|
|
436
443
|
// input itself changes. Re-applying them on every ngOnChanges call would
|
|
@@ -452,9 +459,10 @@ class TippyDirective {
|
|
|
452
459
|
ngAfterViewInit() {
|
|
453
460
|
if (this.isServer)
|
|
454
461
|
return;
|
|
462
|
+
const onlyTextOverflow = this.onlyTextOverflow();
|
|
455
463
|
if (this.isLazy()) {
|
|
456
464
|
const hostInView$ = inView(this.host());
|
|
457
|
-
if (
|
|
465
|
+
if (onlyTextOverflow) {
|
|
458
466
|
hostInView$
|
|
459
467
|
.pipe(switchMap(() => this.isOverflowing$()), takeUntilDestroyed(this.destroyRef))
|
|
460
468
|
.subscribe((isElementOverflow) => {
|
|
@@ -467,7 +475,7 @@ class TippyDirective {
|
|
|
467
475
|
});
|
|
468
476
|
}
|
|
469
477
|
}
|
|
470
|
-
else if (
|
|
478
|
+
else if (onlyTextOverflow) {
|
|
471
479
|
this.isOverflowing$()
|
|
472
480
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
473
481
|
.subscribe((isElementOverflow) => {
|
|
@@ -482,6 +490,8 @@ class TippyDirective {
|
|
|
482
490
|
this.viewOptions$ = null;
|
|
483
491
|
this.viewRef?.destroy();
|
|
484
492
|
this.viewRef = null;
|
|
493
|
+
this.loaderViewRef?.destroy();
|
|
494
|
+
this.loaderViewRef = null;
|
|
485
495
|
}
|
|
486
496
|
/**
|
|
487
497
|
* This method is useful when you append to an element that you might remove from the DOM.
|
|
@@ -532,7 +542,7 @@ class TippyDirective {
|
|
|
532
542
|
}
|
|
533
543
|
setProps(props) {
|
|
534
544
|
this.props = props;
|
|
535
|
-
this.instance?.setProps(onlyTippyProps(props));
|
|
545
|
+
this.instance?.setProps({ ...onlyTippyProps(props), ...(this.tippyProps() ?? {}) });
|
|
536
546
|
}
|
|
537
547
|
setStatus(isEnabled) {
|
|
538
548
|
isEnabled ? this.instance?.enable() : this.instance?.disable();
|
|
@@ -540,92 +550,59 @@ class TippyDirective {
|
|
|
540
550
|
hasContent() {
|
|
541
551
|
return !!(this.content() || this.useTextContent());
|
|
542
552
|
}
|
|
543
|
-
createInstance() {
|
|
553
|
+
async createInstance() {
|
|
544
554
|
if (this.created || !this.hasContent()) {
|
|
545
555
|
return;
|
|
546
556
|
}
|
|
547
557
|
this.created = true;
|
|
548
|
-
this.
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
...(this.globalConfig.zIndexGetter
|
|
553
|
-
? { zIndex: this.globalConfig.zIndexGetter() }
|
|
554
|
-
: {}),
|
|
555
|
-
...onlyTippyProps(this.globalConfig),
|
|
556
|
-
...onlyTippyProps(this.props),
|
|
557
|
-
onMount: (instance) => {
|
|
558
|
-
const isVisible = true;
|
|
559
|
-
this.isVisible.set(isVisible);
|
|
560
|
-
this.visibleInternal.next(isVisible);
|
|
561
|
-
this.ngZone.run(() => this.visible.emit(isVisible));
|
|
562
|
-
this.useHostWidth() && this.listenToHostResize();
|
|
563
|
-
this.globalConfig.onMount?.(instance);
|
|
564
|
-
},
|
|
565
|
-
onCreate: (instance) => {
|
|
566
|
-
instance.popper.classList.add(`tippy-variation-${this.variation() || this.globalConfig.defaultVariation}`);
|
|
567
|
-
if (this.className()) {
|
|
568
|
-
for (const klass of normalizeClassName(this.className())) {
|
|
569
|
-
instance.popper.classList.add(klass);
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
this.globalConfig.onCreate?.(instance);
|
|
573
|
-
if (this.isVisible() === true) {
|
|
574
|
-
instance.show();
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
onShow: (instance) => {
|
|
578
|
-
// In onlyTextOverflow mode the tooltip must not appear when the host is
|
|
579
|
-
// not overflowing. Returning false from onShow prevents tippy from
|
|
580
|
-
// showing regardless of the instance's enabled/disabled state. This
|
|
581
|
-
// acts as a last-resort guard for cases where checkOverflow() hasn't
|
|
582
|
-
// been called yet (e.g. Angular's scheduler hasn't flushed CD between
|
|
583
|
-
// the content/width change and the trigger event).
|
|
584
|
-
if (this.onlyTextOverflow() && !isElementOverflow(this.host())) {
|
|
585
|
-
return false;
|
|
586
|
-
}
|
|
587
|
-
instance.reference.setAttribute('data-tippy-open', '');
|
|
588
|
-
// We're re-entering because we might create an Angular component,
|
|
589
|
-
// which should be done within the zone.
|
|
590
|
-
const content = this.ngZone.run(() => this.resolveContent(instance));
|
|
591
|
-
if (isString(content)) {
|
|
592
|
-
instance.setProps({ allowHTML: false });
|
|
593
|
-
if (!content?.trim()) {
|
|
594
|
-
this.disable();
|
|
595
|
-
}
|
|
596
|
-
else {
|
|
597
|
-
this.enable();
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
instance.setContent(content);
|
|
601
|
-
this.hideOnEscape() && this.handleEscapeButton();
|
|
602
|
-
this.clearInstanceWidth(instance);
|
|
603
|
-
if (this.useHostWidth()) {
|
|
604
|
-
this.setInstanceWidth(instance, this.hostWidth);
|
|
605
|
-
}
|
|
606
|
-
else if (this.popperWidth()) {
|
|
607
|
-
this.setInstanceWidth(instance, this.popperWidth());
|
|
608
|
-
}
|
|
609
|
-
this.globalConfig.onShow?.(instance);
|
|
610
|
-
this.onShow.emit();
|
|
611
|
-
},
|
|
612
|
-
onHide(instance) {
|
|
613
|
-
instance.reference.removeAttribute('data-tippy-open');
|
|
614
|
-
},
|
|
615
|
-
onHidden: (instance) => {
|
|
616
|
-
this.onHidden(instance);
|
|
617
|
-
},
|
|
618
|
-
})
|
|
619
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
620
|
-
.subscribe((instance) => {
|
|
621
|
-
this.instance = instance;
|
|
622
|
-
this.setStatus(this.isEnabled());
|
|
623
|
-
this.setProps(this.props);
|
|
624
|
-
this.variation() === 'contextMenu' && this.handleContextMenu();
|
|
558
|
+
const tippy = await this.ngZone.runOutsideAngular(() => {
|
|
559
|
+
return firstValueFrom(this.tippyFactory.getTippyImpl(), {
|
|
560
|
+
defaultValue: undefined,
|
|
561
|
+
});
|
|
625
562
|
});
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
563
|
+
if (tippy === undefined || this.destroyRef.destroyed) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
this.instance = this.ngZone.runOutsideAngular(() => {
|
|
567
|
+
return tippy(this.host(), {
|
|
568
|
+
appendTo,
|
|
569
|
+
allowHTML: true,
|
|
570
|
+
...(this.globalConfig.zIndexGetter
|
|
571
|
+
? { zIndex: this.globalConfig.zIndexGetter() }
|
|
572
|
+
: {}),
|
|
573
|
+
...onlyTippyProps(this.globalConfig),
|
|
574
|
+
...onlyTippyProps(this.props),
|
|
575
|
+
...(this.tippyProps() ?? {}),
|
|
576
|
+
// Arrow functions or inline callbacks close over the method's lexical scope,
|
|
577
|
+
// causing V8 to allocate a Context object that indirectly retains the directive
|
|
578
|
+
// instance inside tippy.js after destroy. A JSBoundFunction has no [[Context]]
|
|
579
|
+
// slot — only { bound_target_function, bound_this, bound_arguments } — so no
|
|
580
|
+
// closure context is created. onHide is bound to null because it needs no `this`
|
|
581
|
+
// at all, fully breaking the retention chain (same reasoning as `appendTo` above).
|
|
582
|
+
onMount: this.onMount.bind(this),
|
|
583
|
+
onCreate: this.onCreate.bind(this),
|
|
584
|
+
onShow: this.onShow.bind(this),
|
|
585
|
+
onHide: function (instance) {
|
|
586
|
+
instance.reference.removeAttribute('data-tippy-open');
|
|
587
|
+
}.bind(null),
|
|
588
|
+
onHidden: this.onHidden.bind(this),
|
|
589
|
+
});
|
|
590
|
+
});
|
|
591
|
+
this.setStatus(this.isEnabled());
|
|
592
|
+
this.setProps(this.props);
|
|
593
|
+
const variationName = this.variation() || this.globalConfig.defaultVariation || '';
|
|
594
|
+
const variationConfig = this.globalConfig.variations?.[variationName];
|
|
595
|
+
// Check the isContextMenu marker set by withContextMenuVariation so any
|
|
596
|
+
// variation name works. The 'contextMenu' name fallback preserves
|
|
597
|
+
// compatibility with manually-constructed variations that predate this flag.
|
|
598
|
+
(variationConfig?.isContextMenu || variationName === 'contextMenu') &&
|
|
599
|
+
this.handleContextMenu();
|
|
600
|
+
}
|
|
601
|
+
// `resolvedContent` is provided when the caller already awaited a lazy factory.
|
|
602
|
+
// Passing it here avoids re-reading `this.content()`, which would still carry
|
|
603
|
+
// the raw factory function type and require another cast.
|
|
604
|
+
resolveContent(instance, resolvedContent) {
|
|
605
|
+
const content = (resolvedContent ?? this.content());
|
|
629
606
|
if (!this.viewOptions$ && !isString(content)) {
|
|
630
607
|
const injector = Injector.create({
|
|
631
608
|
providers: [
|
|
@@ -655,22 +632,24 @@ class TippyDirective {
|
|
|
655
632
|
};
|
|
656
633
|
}
|
|
657
634
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
635
|
+
let newContent = this.ngZone.run(() => {
|
|
636
|
+
this.viewRef = this.viewService.createView(content, {
|
|
637
|
+
vcr: this.vcr,
|
|
638
|
+
...this.viewOptions$,
|
|
639
|
+
});
|
|
640
|
+
// We need to call `detectChanges` for OnPush components to update their content.
|
|
641
|
+
if (isComponent(content)) {
|
|
642
|
+
// `ɵcmp` is a component defition set for any component.
|
|
643
|
+
// Checking the `onPush` property of the component definition is a
|
|
644
|
+
// smarter way to determine whether we need to call `detectChanges()`,
|
|
645
|
+
// as users may be unaware of setting the binding.
|
|
646
|
+
const isOnPush = content.ɵcmp?.onPush;
|
|
647
|
+
if (isOnPush) {
|
|
648
|
+
this.viewRef.detectChanges();
|
|
649
|
+
}
|
|
671
650
|
}
|
|
672
|
-
|
|
673
|
-
|
|
651
|
+
return this.viewRef.getElement();
|
|
652
|
+
});
|
|
674
653
|
if (this.useTextContent()) {
|
|
675
654
|
newContent = instance.reference.textContent;
|
|
676
655
|
}
|
|
@@ -748,6 +727,26 @@ class TippyDirective {
|
|
|
748
727
|
instance.popper.style.maxWidth = inPixels;
|
|
749
728
|
instance.popper.firstElementChild.style.maxWidth = inPixels;
|
|
750
729
|
}
|
|
730
|
+
onMount(instance) {
|
|
731
|
+
const isVisible = true;
|
|
732
|
+
this.isVisible.set(isVisible);
|
|
733
|
+
this.visibleInternal.next(isVisible);
|
|
734
|
+
this.ngZone.run(() => this.visible.emit(isVisible));
|
|
735
|
+
this.useHostWidth() && this.listenToHostResize();
|
|
736
|
+
this.globalConfig.onMount?.(instance);
|
|
737
|
+
}
|
|
738
|
+
onCreate(instance) {
|
|
739
|
+
instance.popper.classList.add(`tippy-variation-${this.variation() || this.globalConfig.defaultVariation}`);
|
|
740
|
+
if (this.className()) {
|
|
741
|
+
for (const klass of normalizeClassName(this.className())) {
|
|
742
|
+
instance.popper.classList.add(klass);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
this.globalConfig.onCreate?.(instance);
|
|
746
|
+
if (this.isVisible() === true) {
|
|
747
|
+
instance.show();
|
|
748
|
+
}
|
|
749
|
+
}
|
|
751
750
|
onHidden(instance = this.instance) {
|
|
752
751
|
this.destroyView();
|
|
753
752
|
const isVisible = false;
|
|
@@ -757,11 +756,82 @@ class TippyDirective {
|
|
|
757
756
|
if (!this.destroyed) {
|
|
758
757
|
this.isVisible.set(isVisible);
|
|
759
758
|
this.ngZone.run(() => this.visible.emit(isVisible));
|
|
760
|
-
this.
|
|
759
|
+
this.tpOnHide.emit();
|
|
761
760
|
}
|
|
762
761
|
this.visibleInternal.next(isVisible);
|
|
763
762
|
this.globalConfig.onHidden?.(instance);
|
|
764
763
|
}
|
|
764
|
+
onShow(instance) {
|
|
765
|
+
// In onlyTextOverflow mode the tooltip must not appear when the host is
|
|
766
|
+
// not overflowing. Returning false from onShow prevents tippy from
|
|
767
|
+
// showing regardless of the instance's enabled/disabled state. This
|
|
768
|
+
// acts as a last-resort guard for cases where checkOverflow() hasn't
|
|
769
|
+
// been called yet (e.g. Angular's scheduler hasn't flushed CD between
|
|
770
|
+
// the content/width change and the trigger event).
|
|
771
|
+
if (this.onlyTextOverflow() && !isElementOverflow(this.host())) {
|
|
772
|
+
return false;
|
|
773
|
+
}
|
|
774
|
+
// The outer `onShow` must be synchronous so that `return false` above
|
|
775
|
+
// is seen as a boolean by tippy.js (an `async` function always returns
|
|
776
|
+
// a Promise, which is truthy and would never suppress the show).
|
|
777
|
+
this.handleOnShow(instance);
|
|
778
|
+
}
|
|
779
|
+
async handleOnShow(instance) {
|
|
780
|
+
instance.reference.setAttribute('data-tippy-open', '');
|
|
781
|
+
const maybeContent = this.content();
|
|
782
|
+
const isLazyFactory = !isComponentClass(maybeContent) && typeof maybeContent === 'function';
|
|
783
|
+
let resolvedContent;
|
|
784
|
+
if (isLazyFactory) {
|
|
785
|
+
const loaderComponent = this.globalLoaderComponent;
|
|
786
|
+
if (loaderComponent) {
|
|
787
|
+
const loaderElement = this.ngZone.run(() => {
|
|
788
|
+
this.loaderViewRef = this.viewService.createView(loaderComponent, {
|
|
789
|
+
vcr: this.vcr,
|
|
790
|
+
});
|
|
791
|
+
return this.loaderViewRef.getElement();
|
|
792
|
+
});
|
|
793
|
+
instance.setContent(loaderElement);
|
|
794
|
+
}
|
|
795
|
+
const cancelled = Symbol();
|
|
796
|
+
// combineLatest ensures we swap the loader only when both the component
|
|
797
|
+
// is ready AND the timing observable has emitted — guaranteeing the spinner
|
|
798
|
+
// is visible for at least the configured duration regardless of import speed.
|
|
799
|
+
// takeUntil + takeUntilDestroyed cancel if the tooltip hides or the
|
|
800
|
+
// directive is destroyed mid-flight.
|
|
801
|
+
const result = await firstValueFrom(combineLatest([
|
|
802
|
+
from(maybeContent()),
|
|
803
|
+
this.loaderTiming,
|
|
804
|
+
]).pipe(map(([component]) => component), takeUntil(this.visibleInternal.pipe(filter((v) => !v))), takeUntilDestroyed(this.destroyRef)), { defaultValue: cancelled });
|
|
805
|
+
this.loaderViewRef?.destroy();
|
|
806
|
+
this.loaderViewRef = null;
|
|
807
|
+
if (result === cancelled)
|
|
808
|
+
return;
|
|
809
|
+
resolvedContent = result;
|
|
810
|
+
}
|
|
811
|
+
// For non-lazy content this call is fully synchronous — skipping the
|
|
812
|
+
// await avoids a microtask tick that would otherwise cause a visible flicker.
|
|
813
|
+
const content = this.resolveContent(instance, resolvedContent);
|
|
814
|
+
if (isString(content)) {
|
|
815
|
+
instance.setProps({ allowHTML: false });
|
|
816
|
+
if (content?.trim()) {
|
|
817
|
+
this.enable();
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
this.disable();
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
instance.setContent(content);
|
|
824
|
+
this.hideOnEscape() && this.handleEscapeButton();
|
|
825
|
+
this.clearInstanceWidth(instance);
|
|
826
|
+
if (this.useHostWidth()) {
|
|
827
|
+
this.setInstanceWidth(instance, this.hostWidth);
|
|
828
|
+
}
|
|
829
|
+
else if (this.popperWidth()) {
|
|
830
|
+
this.setInstanceWidth(instance, this.popperWidth());
|
|
831
|
+
}
|
|
832
|
+
this.globalConfig.onShow?.(instance);
|
|
833
|
+
this.tpOnShow.emit();
|
|
834
|
+
}
|
|
765
835
|
isOverflowing$() {
|
|
766
836
|
const host = this.host();
|
|
767
837
|
const notifiers$ = [overflowChanges(host)];
|
|
@@ -808,9 +878,13 @@ class TippyDirective {
|
|
|
808
878
|
this.created = false;
|
|
809
879
|
}
|
|
810
880
|
});
|
|
881
|
+
effect(() => {
|
|
882
|
+
const tippyProps = this.tippyProps();
|
|
883
|
+
untracked(() => this.instance?.setProps(tippyProps ?? {}));
|
|
884
|
+
});
|
|
811
885
|
}
|
|
812
886
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
813
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: TippyDirective, isStandalone: true, selector: "[tp]", inputs: { appendTo: { classPropertyName: "appendTo", publicName: "tpAppendTo", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "tp", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "tpDelay", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "tpDuration", isSignal: true, isRequired: false, transformFunction: null }, hideOnClick: { classPropertyName: "hideOnClick", publicName: "tpHideOnClick", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "tpInteractive", isSignal: true, isRequired: false, transformFunction: null }, interactiveBorder: { classPropertyName: "interactiveBorder", publicName: "tpInteractiveBorder", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "tpMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "tpOffset", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "tpPlacement", isSignal: true, isRequired: false, transformFunction: null }, popperOptions: { classPropertyName: "popperOptions", publicName: "tpPopperOptions", isSignal: true, isRequired: false, transformFunction: null }, showOnCreate: { classPropertyName: "showOnCreate", publicName: "tpShowOnCreate", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "tpTrigger", isSignal: true, isRequired: false, transformFunction: null }, triggerTarget: { classPropertyName: "triggerTarget", publicName: "tpTriggerTarget", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "tpZIndex", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "tpAnimation", isSignal: true, isRequired: false, transformFunction: null }, useTextContent: { classPropertyName: "useTextContent", publicName: "tpUseTextContent", isSignal: true, isRequired: false, transformFunction: null }, isLazy: { classPropertyName: "isLazy", publicName: "tpIsLazy", isSignal: true, isRequired: false, transformFunction: null }, variation: { classPropertyName: "variation", publicName: "tpVariation", isSignal: true, isRequired: false, transformFunction: null }, isEnabled: { classPropertyName: "isEnabled", publicName: "tpIsEnabled", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "tpClassName", isSignal: true, isRequired: false, transformFunction: null }, onlyTextOverflow: { classPropertyName: "onlyTextOverflow", publicName: "tpOnlyTextOverflow", isSignal: true, isRequired: false, transformFunction: null }, staticWidthHost: { classPropertyName: "staticWidthHost", publicName: "tpStaticWidthHost", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "tpData", isSignal: true, isRequired: false, transformFunction: null }, bindings: { classPropertyName: "bindings", publicName: "tpBindings", isSignal: true, isRequired: false, transformFunction: null }, directives: { classPropertyName: "directives", publicName: "tpDirectives", isSignal: true, isRequired: false, transformFunction: null }, useHostWidth: { classPropertyName: "useHostWidth", publicName: "tpUseHostWidth", isSignal: true, isRequired: false, transformFunction: null }, hideOnEscape: { classPropertyName: "hideOnEscape", publicName: "tpHideOnEscape", isSignal: true, isRequired: false, transformFunction: null }, popperWidth: { classPropertyName: "popperWidth", publicName: "tpPopperWidth", isSignal: true, isRequired: false, transformFunction: null }, customHost: { classPropertyName: "customHost", publicName: "tpHost", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "tpIsVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: {
|
|
887
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: TippyDirective, isStandalone: true, selector: "[tp]", inputs: { appendTo: { classPropertyName: "appendTo", publicName: "tpAppendTo", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "tp", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "tpDelay", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "tpDuration", isSignal: true, isRequired: false, transformFunction: null }, hideOnClick: { classPropertyName: "hideOnClick", publicName: "tpHideOnClick", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "tpInteractive", isSignal: true, isRequired: false, transformFunction: null }, interactiveBorder: { classPropertyName: "interactiveBorder", publicName: "tpInteractiveBorder", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "tpMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "tpOffset", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "tpPlacement", isSignal: true, isRequired: false, transformFunction: null }, popperOptions: { classPropertyName: "popperOptions", publicName: "tpPopperOptions", isSignal: true, isRequired: false, transformFunction: null }, showOnCreate: { classPropertyName: "showOnCreate", publicName: "tpShowOnCreate", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "tpTrigger", isSignal: true, isRequired: false, transformFunction: null }, triggerTarget: { classPropertyName: "triggerTarget", publicName: "tpTriggerTarget", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "tpZIndex", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "tpAnimation", isSignal: true, isRequired: false, transformFunction: null }, useTextContent: { classPropertyName: "useTextContent", publicName: "tpUseTextContent", isSignal: true, isRequired: false, transformFunction: null }, isLazy: { classPropertyName: "isLazy", publicName: "tpIsLazy", isSignal: true, isRequired: false, transformFunction: null }, variation: { classPropertyName: "variation", publicName: "tpVariation", isSignal: true, isRequired: false, transformFunction: null }, isEnabled: { classPropertyName: "isEnabled", publicName: "tpIsEnabled", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "tpClassName", isSignal: true, isRequired: false, transformFunction: null }, onlyTextOverflow: { classPropertyName: "onlyTextOverflow", publicName: "tpOnlyTextOverflow", isSignal: true, isRequired: false, transformFunction: null }, staticWidthHost: { classPropertyName: "staticWidthHost", publicName: "tpStaticWidthHost", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "tpData", isSignal: true, isRequired: false, transformFunction: null }, bindings: { classPropertyName: "bindings", publicName: "tpBindings", isSignal: true, isRequired: false, transformFunction: null }, directives: { classPropertyName: "directives", publicName: "tpDirectives", isSignal: true, isRequired: false, transformFunction: null }, useHostWidth: { classPropertyName: "useHostWidth", publicName: "tpUseHostWidth", isSignal: true, isRequired: false, transformFunction: null }, hideOnEscape: { classPropertyName: "hideOnEscape", publicName: "tpHideOnEscape", isSignal: true, isRequired: false, transformFunction: null }, tippyProps: { classPropertyName: "tippyProps", publicName: "tpTippyProps", isSignal: true, isRequired: false, transformFunction: null }, popperWidth: { classPropertyName: "popperWidth", publicName: "tpPopperWidth", isSignal: true, isRequired: false, transformFunction: null }, customHost: { classPropertyName: "customHost", publicName: "tpHost", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "tpIsVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tpOnShow: "tpOnShow", tpOnHide: "tpOnHide", isVisible: "tpIsVisibleChange", visible: "tpVisible" }, exportAs: ["tippy"], usesOnChanges: true, ngImport: i0 }); }
|
|
814
888
|
}
|
|
815
889
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyDirective, decorators: [{
|
|
816
890
|
type: Directive,
|
|
@@ -819,7 +893,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
819
893
|
selector: '[tp]',
|
|
820
894
|
exportAs: 'tippy',
|
|
821
895
|
}]
|
|
822
|
-
}], ctorParameters: () => [], propDecorators: { appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpAppendTo", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "tp", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDelay", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDuration", required: false }] }], hideOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHideOnClick", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpInteractive", required: false }] }], interactiveBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpInteractiveBorder", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpMaxWidth", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpOffset", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPlacement", required: false }] }], popperOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPopperOptions", required: false }] }], showOnCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpShowOnCreate", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTrigger", required: false }] }], triggerTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTriggerTarget", required: false }] }], zIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpZIndex", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpAnimation", required: false }] }], useTextContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpUseTextContent", required: false }] }], isLazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsLazy", required: false }] }], variation: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpVariation", required: false }] }], isEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsEnabled", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpClassName", required: false }] }], onlyTextOverflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpOnlyTextOverflow", required: false }] }], staticWidthHost: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpStaticWidthHost", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpData", required: false }] }], bindings: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpBindings", required: false }] }], directives: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDirectives", required: false }] }], useHostWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpUseHostWidth", required: false }] }], hideOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHideOnEscape", required: false }] }], popperWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPopperWidth", required: false }] }], customHost: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHost", required: false }] }],
|
|
896
|
+
}], ctorParameters: () => [], propDecorators: { appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpAppendTo", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "tp", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDelay", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDuration", required: false }] }], hideOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHideOnClick", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpInteractive", required: false }] }], interactiveBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpInteractiveBorder", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpMaxWidth", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpOffset", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPlacement", required: false }] }], popperOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPopperOptions", required: false }] }], showOnCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpShowOnCreate", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTrigger", required: false }] }], triggerTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTriggerTarget", required: false }] }], zIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpZIndex", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpAnimation", required: false }] }], useTextContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpUseTextContent", required: false }] }], isLazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsLazy", required: false }] }], variation: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpVariation", required: false }] }], isEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsEnabled", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpClassName", required: false }] }], onlyTextOverflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpOnlyTextOverflow", required: false }] }], staticWidthHost: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpStaticWidthHost", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpData", required: false }] }], bindings: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpBindings", required: false }] }], directives: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDirectives", required: false }] }], useHostWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpUseHostWidth", required: false }] }], hideOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHideOnEscape", required: false }] }], tippyProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTippyProps", required: false }] }], popperWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPopperWidth", required: false }] }], customHost: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHost", required: false }] }], tpOnShow: [{ type: i0.Output, args: ["tpOnShow"] }], tpOnHide: [{ type: i0.Output, args: ["tpOnHide"] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsVisible", required: false }] }, { type: i0.Output, args: ["tpIsVisibleChange"] }], visible: [{ type: i0.Output, args: ["tpVisible"] }] } });
|
|
897
|
+
function isComponentClass(content) {
|
|
898
|
+
return (typeof content === 'function' &&
|
|
899
|
+
/^class\s/.test(Function.prototype.toString.call(content)));
|
|
900
|
+
}
|
|
823
901
|
|
|
824
902
|
/**
|
|
825
903
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngneat-helipopper.mjs","sources":["../../../../projects/ngneat/helipopper/src/lib/intersection-observer.ts","../../../../projects/ngneat/helipopper/src/lib/utils.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.factory.ts","../../../../projects/ngneat/helipopper/src/lib/inject-tippy.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.service.ts","../../../../projects/ngneat/helipopper/src/lib/coercion.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.directive.ts","../../../../projects/ngneat/helipopper/src/ngneat-helipopper.ts"],"sourcesContent":["// Let's retrieve the native `IntersectionObserver` implementation hidden by\n// `__zone_symbol__IntersectionObserver`. This would be the unpatched version of\n// the observer present in zone.js environments.\n// Otherwise, if the user is using zoneless change detection (and zone.js is not included),\n// we fall back to the native implementation. Accessing the native implementation\n// allows us to remove `runOutsideAngular` calls and reduce indentation,\n// making the code a bit more readable.\nexport const IntersectionObserver: typeof globalThis.IntersectionObserver =\n (globalThis as any)['__zone_symbol__IntersectionObserver'] ||\n globalThis.IntersectionObserver;\n","import { ElementRef } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { auditTime, map } from 'rxjs/operators';\nimport type { TippyElement } from '@ngneat/helipopper/config';\n\nimport { IntersectionObserver } from './intersection-observer';\n\nlet supportsIntersectionObserver = false;\nlet supportsResizeObserver = false;\n\nif (typeof window !== 'undefined') {\n supportsIntersectionObserver = 'IntersectionObserver' in window;\n supportsResizeObserver = 'ResizeObserver' in window;\n}\n\nexport const enum TippyErrorCode {\n TippyNotProvided = 1,\n}\n\nexport function inView(\n host: TippyElement,\n options: IntersectionObserverInit = {\n root: null,\n threshold: 0.3,\n },\n) {\n const element = coerceElement(host);\n\n return new Observable<void>((subscriber) => {\n if (!supportsIntersectionObserver) {\n subscriber.next();\n subscriber.complete();\n return;\n }\n\n const observer = new IntersectionObserver((entries) => {\n // Several changes may occur in the same tick, we want to check the latest entry state.\n const entry = entries[entries.length - 1];\n if (entry.isIntersecting) {\n subscriber.next();\n subscriber.complete();\n }\n }, options);\n\n observer.observe(element);\n\n return () => observer.disconnect();\n });\n}\n\nexport function isElementOverflow(host: HTMLElement): boolean {\n // Don't access the `offsetWidth`/`offsetHeight` multiple times since it triggers layout updates.\n const hostOffsetWidth = host.offsetWidth;\n const hostOffsetHeight = host.offsetHeight;\n\n return (\n hostOffsetWidth > host.parentElement!.offsetWidth ||\n hostOffsetWidth < host.scrollWidth ||\n hostOffsetHeight < host.scrollHeight\n );\n}\n\nexport function overflowChanges(host: TippyElement) {\n const element = coerceElement(host);\n\n return dimensionsChanges(element).pipe(\n auditTime(150),\n map(() => isElementOverflow(element)),\n );\n}\n\nexport function dimensionsChanges(target: HTMLElement) {\n return new Observable<void>((subscriber) => {\n if (!supportsResizeObserver) {\n subscriber.next();\n subscriber.complete();\n return;\n }\n\n const observer = new ResizeObserver(() => subscriber.next());\n observer.observe(target);\n return () => observer.disconnect();\n });\n}\n\nexport function onlyTippyProps(allProps: any) {\n const tippyProps: any = {};\n\n if (!allProps) {\n return tippyProps;\n }\n\n const ownProps = [\n 'useTextContent',\n 'variations',\n 'useHostWidth',\n 'defaultVariation',\n 'beforeRender',\n 'isLazy',\n 'variation',\n 'isEnabled',\n 'className',\n 'onlyTextOverflow',\n 'data',\n 'content',\n 'context',\n 'hideOnEscape',\n 'customHost',\n 'injector',\n 'preserveView',\n 'vcr',\n 'popperWidth',\n 'zIndexGetter',\n 'staticWidthHost',\n 'bindings',\n 'directives',\n ];\n\n const overriddenMethods = ['onShow', 'onHidden', 'onCreate'];\n\n Object.keys(allProps).forEach((prop) => {\n if (!ownProps.includes(prop) && !overriddenMethods.includes(prop)) {\n tippyProps[prop] = allProps[prop];\n }\n });\n\n return tippyProps;\n}\n\nexport function normalizeClassName(className: string | string[]): string[] {\n const classes = typeof className === 'string' ? className.split(' ') : className;\n\n return classes.map((klass) => klass?.trim()).filter(Boolean);\n}\n\nexport function coerceCssPixelValue<T>(value: T): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\n}\n\nfunction coerceElement(element: TippyElement) {\n return element instanceof ElementRef ? element.nativeElement : element;\n}\n\nlet observer: IntersectionObserver;\nconst elementHiddenHandlers = new WeakMap<Element, () => void>();\nexport function observeVisibility(host: Element, hiddenHandler: () => void) {\n observer ??= new IntersectionObserver((entries: IntersectionObserverEntry[]) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n elementHiddenHandlers.get(entry.target)!();\n }\n });\n });\n elementHiddenHandlers.set(host, hiddenHandler);\n observer.observe(host);\n\n return () => {\n elementHiddenHandlers.delete(host);\n observer.unobserve(host);\n };\n}\n","import type tippy from 'tippy.js';\nimport { inject, Injectable, NgZone, ɵisPromise as isPromise } from '@angular/core';\nimport { defer, map, Observable, of, tap } from 'rxjs';\nimport { TIPPY_LOADER, type TippyProps } from '@ngneat/helipopper/config';\n\n@Injectable({ providedIn: 'root' })\nexport class TippyFactory {\n private readonly _ngZone = inject(NgZone);\n\n private readonly _loader = inject(TIPPY_LOADER);\n\n private _tippyImpl$: Observable<typeof tippy> | null = null;\n private _tippy: typeof tippy | null = null;\n\n /**\n * This returns an observable because the user should provide a `loader`\n * function, which may return a promise if the tippy.js library is to be\n * loaded asynchronously.\n */\n create(target: HTMLElement, props?: Partial<TippyProps>) {\n this._tippyImpl$ ||= defer(() => {\n if (this._tippy) return of(this._tippy);\n\n // Call the `loader` function lazily — only when a subscriber\n // arrives — to avoid importing `tippy.js` on the server.\n const maybeTippy = this._ngZone.runOutsideAngular(() => this._loader());\n\n let tippy$: Observable<typeof tippy>;\n // We need to use `isPromise` instead of checking whether\n // `result instanceof Promise`. In zone.js patched environments, `global.Promise`\n // is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js\n // for certain reasons, might not work with `instanceof`. For instance, the dynamic\n // import `() => import('./chunk.js')` returns a native promise (not a `ZoneAwarePromise`),\n // causing this check to be falsy.\n if (isPromise(maybeTippy)) {\n // This pulls less RxJS symbols compared to using `from()` to resolve a promise value.\n tippy$ = new Observable((subscriber) => {\n maybeTippy.then((tippy) => {\n subscriber.next(tippy.default);\n subscriber.complete();\n });\n });\n } else {\n tippy$ = of(maybeTippy);\n }\n\n return tippy$.pipe(\n tap((tippy) => {\n this._tippy = tippy;\n })\n );\n });\n\n return this._tippyImpl$.pipe(\n map((tippy) => {\n return this._ngZone.runOutsideAngular(() => tippy(target, props));\n })\n );\n }\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport type { TippyInstance } from '@ngneat/helipopper/config';\n\nimport { TippyErrorCode } from './utils';\n\nexport const TIPPY_REF = /* @__PURE__ */ new InjectionToken<TippyInstance>(\n ngDevMode ? 'TIPPY_REF' : '',\n);\n\nexport function injectTippyRef(): TippyInstance {\n const instance = inject(TIPPY_REF, { optional: true });\n\n if (!instance) {\n if (ngDevMode) {\n throw new Error(\n 'tp is not provided in the current context or on one of its ancestors',\n );\n } else {\n throw new Error(`[tp]: ${TippyErrorCode.TippyNotProvided}`);\n }\n }\n\n return instance;\n}\n","import { inject, Injectable, Injector, signal } from '@angular/core';\nimport {\n isComponent,\n isTemplateRef,\n ResolveViewRef,\n ViewService,\n} from '@ngneat/overview';\nimport { Content } from '@ngneat/overview';\nimport type { Observable } from 'rxjs';\n\nimport {\n CreateOptions,\n ExtendedTippyInstance,\n TIPPY_CONFIG,\n TippyInstance,\n} from '@ngneat/helipopper/config';\n\nimport { TIPPY_REF } from './inject-tippy';\nimport { TippyFactory } from './tippy.factory';\nimport { normalizeClassName, onlyTippyProps } from './utils';\n\n@Injectable({ providedIn: 'root' })\nexport class TippyService {\n private readonly _injector = inject(Injector);\n private readonly _globalConfig = inject(TIPPY_CONFIG, { optional: true });\n private readonly _viewService = inject(ViewService);\n private readonly _tippyFactory = inject(TippyFactory);\n\n readonly enabled = signal(true);\n\n enableAll(): void {\n this.enabled.set(true);\n }\n\n disableAll(): void {\n this.enabled.set(false);\n }\n\n create<T extends Content>(\n host: HTMLElement,\n content: T,\n options: Partial<CreateOptions> = {},\n ): Observable<ExtendedTippyInstance<T>> {\n const variation = options.variation || this._globalConfig?.defaultVariation || '';\n const config = {\n onShow: (instance: ExtendedTippyInstance<T>) => {\n host.setAttribute('data-tippy-open', '');\n if (!instance.$viewOptions) {\n instance.$viewOptions = {\n injector: Injector.create({\n providers: [\n {\n provide: TIPPY_REF,\n useValue: instance,\n },\n ],\n parent: options.injector || this._injector,\n }),\n };\n\n if (isTemplateRef(content)) {\n instance.$viewOptions.context = {\n $implicit: instance.hide.bind(instance),\n ...options.context,\n };\n } else if (isComponent(content)) {\n instance.context = options.context;\n instance.data = options.data;\n }\n }\n\n instance.view ||= this._viewService.createView(content, {\n ...options,\n ...instance.$viewOptions,\n }) as ResolveViewRef<T>;\n\n instance.setContent(instance.view.getElement());\n options?.onShow?.(instance);\n },\n onHidden: (instance: ExtendedTippyInstance<T>) => {\n host.removeAttribute('data-tippy-open');\n\n if (!options.preserveView) {\n instance.view?.destroy();\n instance.view = null;\n }\n options?.onHidden?.(instance);\n },\n ...onlyTippyProps(this._globalConfig),\n ...this._globalConfig?.variations?.[variation],\n ...onlyTippyProps(options),\n onCreate: (instance: TippyInstance) => {\n instance.popper.classList.add(`tippy-variation-${variation}`);\n if (options.className) {\n for (const klass of normalizeClassName(options.className)) {\n instance.popper.classList.add(klass);\n }\n }\n this._globalConfig?.onCreate?.(instance);\n options.onCreate?.(instance);\n },\n };\n\n return this._tippyFactory.create(host, config) as Observable<\n ExtendedTippyInstance<T>\n >;\n }\n}\n","import { booleanAttribute as originalBooleanAttribute } from '@angular/core';\n\ntype BooleanInput = boolean | `${boolean}` | '' | null | undefined;\n\n/**\n * Transforms a value (typically a string) to a boolean.\n * Intended to be used as a transform function of an input.\n *\n * @see https://material.angular.io/cdk/coercion/overview\n */\nconst coerceBooleanAttribute: (value: BooleanInput) => boolean = originalBooleanAttribute;\n\nexport { coerceBooleanAttribute };\n","import {\n afterEveryRender,\n AfterViewInit,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n InputSignal,\n model,\n NgZone,\n OnChanges,\n output,\n PLATFORM_ID,\n SimpleChanges,\n untracked,\n ViewContainerRef,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Instance } from 'tippy.js';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { switchMap, takeUntil } from 'rxjs/operators';\nimport {\n Content,\n isComponent,\n isString,\n isTemplateRef,\n ViewOptions,\n ViewRef,\n ViewService,\n} from '@ngneat/overview';\n\nimport {\n coerceCssPixelValue,\n dimensionsChanges,\n inView,\n isElementOverflow,\n normalizeClassName,\n observeVisibility,\n onlyTippyProps,\n overflowChanges,\n} from './utils';\nimport {\n TIPPY_CONFIG,\n TippyConfig,\n TippyInstance,\n TippyProps,\n} from '@ngneat/helipopper/config';\nimport { TippyFactory } from './tippy.factory';\nimport { TippyService } from './tippy.service';\nimport { coerceBooleanAttribute } from './coercion';\nimport { TIPPY_REF } from './inject-tippy';\n\n// An arrow function defined inside a method closes over the method's lexical scope,\n// causing V8 to allocate a Context object that indirectly references the directive\n// instance — keeping it alive after destroy.\n//\n// A bound function (JSBoundFunction) has no [[context]] field in V8's heap layout;\n// it only stores { bound_target_function, bound_this, bound_arguments }.\n// Binding to `null` produces a context-free callable, breaking the retention chain.\nconst appendTo = function appendTo() {\n return document.fullscreenElement || document.body;\n}.bind(null);\n\n// These are the default values used by `tippy.js`.\n// We are providing them as default input values.\n// The `tippy.js` repository has been archived and is unlikely to\n// change in the future, so it is safe to use these values as defaults.\nconst defaultAppendTo: TippyProps['appendTo'] = () => document.body;\nconst defaultDelay: TippyProps['delay'] = 0;\nconst defaultDuration: TippyProps['duration'] = [300, 250];\nconst defaultInteractiveBorder: TippyProps['interactiveBorder'] = 2;\nconst defaultMaxWidth: TippyProps['maxWidth'] = 350;\nconst defaultOffset: TippyProps['offset'] = [0, 10];\nconst defaultPlacement: TippyProps['placement'] = 'top';\nconst defaultTrigger: TippyProps['trigger'] = 'mouseenter focus';\nconst defaultTriggerTarget: TippyProps['triggerTarget'] = null;\nconst defaultZIndex: TippyProps['zIndex'] = 9999;\nconst defaultAnimation: TippyProps['animation'] = 'fade';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tp]',\n exportAs: 'tippy',\n})\nexport class TippyDirective implements OnChanges, AfterViewInit {\n readonly appendTo = input(defaultAppendTo, {\n alias: 'tpAppendTo',\n });\n\n readonly content = input<Content | undefined | null>('', { alias: 'tp' });\n\n readonly delay = input(defaultDelay, {\n alias: 'tpDelay',\n });\n\n readonly duration = input(defaultDuration, {\n alias: 'tpDuration',\n });\n\n readonly hideOnClick = input(true, {\n alias: 'tpHideOnClick',\n });\n\n readonly interactive = input(false, {\n alias: 'tpInteractive',\n });\n\n readonly interactiveBorder = input(defaultInteractiveBorder, {\n alias: 'tpInteractiveBorder',\n });\n\n readonly maxWidth = input(defaultMaxWidth, {\n alias: 'tpMaxWidth',\n });\n\n // Note that some of the input signal types are declared explicitly because the compiler\n // also uses types from `@popperjs/core` and requires a type annotation.\n readonly offset: InputSignal<TippyProps['offset']> = input(defaultOffset, {\n alias: 'tpOffset',\n });\n\n readonly placement: InputSignal<TippyProps['placement']> = input(defaultPlacement, {\n alias: 'tpPlacement',\n });\n\n readonly popperOptions: InputSignal<TippyProps['popperOptions']> = input(\n {},\n {\n alias: 'tpPopperOptions',\n },\n );\n\n readonly showOnCreate = input(false, {\n alias: 'tpShowOnCreate',\n });\n\n readonly trigger = input(defaultTrigger, {\n alias: 'tpTrigger',\n });\n\n readonly triggerTarget = input(defaultTriggerTarget, {\n alias: 'tpTriggerTarget',\n });\n\n readonly zIndex = input(defaultZIndex, {\n alias: 'tpZIndex',\n });\n\n readonly animation = input(defaultAnimation, {\n alias: 'tpAnimation',\n });\n\n readonly useTextContent = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpUseTextContent',\n });\n\n readonly isLazy = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpIsLazy',\n });\n\n readonly variation = input<string | undefined>(undefined, { alias: 'tpVariation' });\n\n readonly isEnabled = input(true, { alias: 'tpIsEnabled' });\n\n readonly className = input<string | string[]>('', { alias: 'tpClassName' });\n\n readonly onlyTextOverflow = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpOnlyTextOverflow',\n });\n\n readonly staticWidthHost = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpStaticWidthHost',\n });\n\n readonly data = input<any>(undefined, { alias: 'tpData' });\n\n /** Angular `inputBinding`/`outputBinding`/`twoWayBinding` descriptors forwarded to `createComponent`. */\n readonly bindings = input<ViewOptions['bindings']>(undefined, { alias: 'tpBindings' });\n\n /** Host directives (with optional bindings) forwarded to `createComponent`. */\n readonly directives = input<ViewOptions['directives']>(undefined, {\n alias: 'tpDirectives',\n });\n\n readonly useHostWidth = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpUseHostWidth',\n });\n\n readonly hideOnEscape = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpHideOnEscape',\n });\n\n readonly popperWidth = input<number | string | undefined>(undefined, {\n alias: 'tpPopperWidth',\n });\n\n readonly customHost = input<HTMLElement | undefined>(undefined, { alias: 'tpHost' });\n\n readonly onShow = output<void>({ alias: 'tpOnShow' });\n\n readonly onHide = output<void>({ alias: 'tpOnHide' });\n\n readonly isVisible = model(false, { alias: 'tpIsVisible' });\n\n visible = output<boolean>({ alias: 'tpVisible' });\n\n protected instance!: TippyInstance;\n protected viewRef: ViewRef | null = null;\n protected props!: Partial<TippyConfig>;\n protected variationDefined = false;\n protected viewOptions$: ViewOptions | null = null;\n\n /**\n * We had use `visible` event emitter previously as a `takeUntil` subscriber in multiple places\n * within the directive.\n * This is for internal use only; thus we don't have to deal with the `visible` event emitter\n * and trigger change detections only when the `visible` event is being listened outside\n * in the template (`<button [tippy]=\"...\" (visible)=\"...\"></button>`).\n */\n protected visibleInternal = new Subject<boolean>();\n private visibilityObserverCleanup: VoidFunction | null = null;\n private contentChanged = new Subject<void>();\n\n private host = computed<HTMLElement>(\n () => this.customHost() || this.hostRef.nativeElement,\n );\n\n // It should be a getter because computations are cached until\n // any of the producers change.\n private get hostWidth() {\n return this.host().getBoundingClientRect().width;\n }\n\n private destroyRef = inject(DestroyRef);\n private tippyService = inject(TippyService);\n private isServer =\n // Drop `isPlatformServer` once `ngServeMode` is available during compilation.\n (typeof ngServerMode !== 'undefined' && ngServerMode) ||\n isPlatformServer(inject(PLATFORM_ID));\n private tippyFactory = inject(TippyFactory);\n private destroyed = false;\n private created = false;\n\n protected globalConfig = inject(TIPPY_CONFIG);\n protected injector = inject(Injector);\n protected viewService = inject(ViewService);\n protected vcr = inject(ViewContainerRef);\n protected ngZone = inject(NgZone);\n protected hostRef = inject(ElementRef);\n\n constructor() {\n if (this.isServer) return;\n\n this.setupListeners();\n\n // `afterEveryRender` fires synchronously within Angular's CD cycle.\n // This lets us update the enabled/disabled state of the instance BEFORE a\n // synthetic mouseenter event is dispatched, which fixes test timing when\n // Angular-triggered changes (content/style bindings) cause the overflow\n // state to change. ResizeObserver (`overflowChanges`) remains as a fallback\n // for non-Angular-triggered resize events (browser window resize, etc.).\n afterEveryRender({\n read: () => {\n if (!this.onlyTextOverflow()) return;\n untracked(() => this.checkOverflow(isElementOverflow(this.host())));\n },\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.instance?.destroy();\n this.destroyView();\n this.visibilityObserverCleanup?.();\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (this.isServer) return;\n\n // `isVisible` is not required as a prop since we update it manually\n // in an effect-like manner.\n const changedProps = Object.keys(changes)\n .filter((key) => key !== 'isVisible')\n .reduce(\n (accumulator, key) => ({ ...accumulator, [key]: changes[key].currentValue }),\n {} as Partial<TippyConfig>,\n );\n\n // Variation defaults are applied only on the first call or when the variation\n // input itself changes. Re-applying them on every ngOnChanges call would\n // overwrite explicitly-bound inputs (e.g. tpTrigger) with variation defaults\n // whenever any other input (e.g. tpData, tpIsEnabled) changes.\n if (!this.variationDefined || 'variation' in changes) {\n this.variationDefined = true;\n const variation = this.variation() || this.globalConfig.defaultVariation || '';\n this.setProps({\n ...this.globalConfig.variations?.[variation],\n ...this.props,\n ...changedProps,\n });\n } else {\n this.updateProps(changedProps);\n }\n }\n\n ngAfterViewInit() {\n if (this.isServer) return;\n\n if (this.isLazy()) {\n const hostInView$ = inView(this.host());\n\n if (this.onlyTextOverflow()) {\n hostInView$\n .pipe(\n switchMap(() => this.isOverflowing$()),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((isElementOverflow) => {\n this.checkOverflow(isElementOverflow);\n });\n } else {\n hostInView$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.createInstance();\n });\n }\n } else if (this.onlyTextOverflow()) {\n this.isOverflowing$()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((isElementOverflow) => {\n this.checkOverflow(isElementOverflow);\n });\n } else {\n this.createInstance();\n }\n }\n\n destroyView() {\n this.viewOptions$ = null;\n this.viewRef?.destroy();\n this.viewRef = null;\n }\n\n /**\n * This method is useful when you append to an element that you might remove from the DOM.\n * In such cases we want to hide the tooltip and let it go through the destroy lifecycle.\n * For example, if you have a grid row with an element that you toggle using the display CSS property on hover.\n */\n observeHostVisibility() {\n if (this.isServer) return;\n // We don't want to observe the host visibility if we are appending to the body.\n if (this.props.appendTo && this.props.appendTo !== document.body) {\n this.visibilityObserverCleanup?.();\n return this.visibleInternal\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((isVisible) => {\n if (isVisible) {\n this.visibilityObserverCleanup = observeVisibility(\n this.instance.reference,\n () => {\n this.hide();\n // Because we have animation on the popper it doesn't close immediately doesn't trigger the `tpVisible` event.\n // Tippy is relying on the transitionend event to trigger the `onHidden` callback.\n // https://github.com/atomiks/tippyjs/blob/master/src/dom-utils.ts#L117\n // This event never fires because the popper is removed from the DOM before the transition ends.\n if (this.props.animation) {\n this.onHidden();\n }\n },\n );\n } else {\n this.visibilityObserverCleanup?.();\n }\n });\n }\n }\n\n show() {\n this.instance?.show();\n }\n\n hide() {\n this.instance?.hide();\n }\n\n enable() {\n this.instance?.enable();\n }\n\n disable() {\n this.instance?.disable();\n }\n\n protected updateProps(props: Partial<TippyConfig>) {\n this.setProps({ ...this.props, ...props });\n }\n\n protected setProps(props: Partial<TippyConfig>) {\n this.props = props;\n this.instance?.setProps(onlyTippyProps(props));\n }\n\n protected setStatus(isEnabled: boolean) {\n isEnabled ? this.instance?.enable() : this.instance?.disable();\n }\n\n protected hasContent(): boolean {\n return !!(this.content() || this.useTextContent());\n }\n\n protected createInstance() {\n if (this.created || !this.hasContent()) {\n return;\n }\n\n this.created = true;\n\n this.tippyFactory\n .create(this.host(), {\n appendTo,\n allowHTML: true,\n ...(this.globalConfig.zIndexGetter\n ? { zIndex: this.globalConfig.zIndexGetter() }\n : {}),\n ...onlyTippyProps(this.globalConfig),\n ...onlyTippyProps(this.props),\n onMount: (instance) => {\n const isVisible = true;\n this.isVisible.set(isVisible);\n this.visibleInternal.next(isVisible);\n this.ngZone.run(() => this.visible.emit(isVisible));\n this.useHostWidth() && this.listenToHostResize();\n this.globalConfig.onMount?.(instance);\n },\n onCreate: (instance) => {\n instance.popper.classList.add(\n `tippy-variation-${this.variation() || this.globalConfig.defaultVariation}`,\n );\n if (this.className()) {\n for (const klass of normalizeClassName(this.className())) {\n instance.popper.classList.add(klass);\n }\n }\n this.globalConfig.onCreate?.(instance);\n if (this.isVisible() === true) {\n instance.show();\n }\n },\n onShow: (instance) => {\n // In onlyTextOverflow mode the tooltip must not appear when the host is\n // not overflowing. Returning false from onShow prevents tippy from\n // showing regardless of the instance's enabled/disabled state. This\n // acts as a last-resort guard for cases where checkOverflow() hasn't\n // been called yet (e.g. Angular's scheduler hasn't flushed CD between\n // the content/width change and the trigger event).\n if (this.onlyTextOverflow() && !isElementOverflow(this.host())) {\n return false;\n }\n\n instance.reference.setAttribute('data-tippy-open', '');\n\n // We're re-entering because we might create an Angular component,\n // which should be done within the zone.\n const content = this.ngZone.run(() => this.resolveContent(instance));\n\n if (isString(content)) {\n instance.setProps({ allowHTML: false });\n\n if (!content?.trim()) {\n this.disable();\n } else {\n this.enable();\n }\n }\n\n instance.setContent(content);\n this.hideOnEscape() && this.handleEscapeButton();\n\n this.clearInstanceWidth(instance);\n if (this.useHostWidth()) {\n this.setInstanceWidth(instance, this.hostWidth);\n } else if (this.popperWidth()) {\n this.setInstanceWidth(instance, this.popperWidth()!);\n }\n this.globalConfig.onShow?.(instance);\n this.onShow.emit();\n },\n onHide(instance) {\n instance.reference.removeAttribute('data-tippy-open');\n },\n onHidden: (instance) => {\n this.onHidden(instance);\n },\n })\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((instance) => {\n this.instance = instance;\n\n this.setStatus(this.isEnabled());\n this.setProps(this.props);\n\n this.variation() === 'contextMenu' && this.handleContextMenu();\n });\n }\n\n protected resolveContent(instance: TippyInstance) {\n const content = this.content();\n\n if (!this.viewOptions$ && !isString(content)) {\n const injector = Injector.create({\n providers: [\n {\n provide: TIPPY_REF,\n useValue: this.instance,\n },\n ],\n parent: this.injector,\n });\n\n const data = this.data();\n\n if (isComponent(content)) {\n this.instance.data = data;\n\n this.viewOptions$ = {\n injector,\n bindings: this.bindings(),\n directives: this.directives(),\n };\n } else if (isTemplateRef(content)) {\n this.viewOptions$ = {\n injector,\n context: {\n data,\n $implicit: this.hide.bind(this),\n },\n };\n }\n }\n\n this.viewRef = this.viewService.createView(content!, {\n vcr: this.vcr,\n ...this.viewOptions$,\n });\n\n // We need to call `detectChanges` for OnPush components to update their content.\n if (isComponent(content)) {\n // `ɵcmp` is a component defition set for any component.\n // Checking the `onPush` property of the component definition is a\n // smarter way to determine whether we need to call `detectChanges()`,\n // as users may be unaware of setting the binding.\n const isOnPush = (content as { ɵcmp?: { onPush: boolean } }).ɵcmp?.onPush;\n if (isOnPush) {\n this.viewRef.detectChanges();\n }\n }\n\n let newContent = this.viewRef.getElement();\n\n if (this.useTextContent()) {\n newContent = instance.reference.textContent!;\n }\n\n if (isString(newContent) && this.globalConfig.beforeRender) {\n newContent = this.globalConfig.beforeRender(newContent);\n }\n\n return newContent;\n }\n\n protected handleContextMenu() {\n const host = this.host();\n const onContextMenu = (event: MouseEvent) => {\n event.preventDefault();\n\n this.instance.setProps({\n getReferenceClientRect: () =>\n ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }) as DOMRectReadOnly,\n });\n\n this.instance.show();\n };\n\n host.addEventListener('contextmenu', onContextMenu);\n this.destroyRef.onDestroy(() =>\n host.removeEventListener('contextmenu', onContextMenu),\n );\n }\n\n protected handleEscapeButton(): void {\n const onKeydown = (event: KeyboardEvent) => {\n if (event.code === 'Escape') {\n this.hide();\n }\n };\n\n document.body.addEventListener('keydown', onKeydown);\n\n // Remove listener when `visibleInternal` becomes false.\n const visibleSubscription = this.visibleInternal.subscribe((v) => {\n if (!v) {\n document.body.removeEventListener('keydown', onKeydown);\n visibleSubscription.unsubscribe();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n document.body.removeEventListener('keydown', onKeydown);\n visibleSubscription.unsubscribe();\n });\n }\n\n protected checkOverflow(isElementOverflow: boolean) {\n if (isElementOverflow) {\n if (!this.instance) {\n this.createInstance();\n } else {\n this.instance.enable();\n }\n } else {\n this.instance?.disable();\n }\n }\n\n protected listenToHostResize() {\n dimensionsChanges(this.host())\n .pipe(takeUntil(this.visibleInternal), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.setInstanceWidth(this.instance, this.hostWidth);\n });\n }\n\n protected clearInstanceWidth(instance: Instance) {\n instance.popper.style.width = '';\n instance.popper.style.maxWidth = '';\n (instance.popper.firstElementChild as HTMLElement).style.maxWidth = '';\n }\n\n protected setInstanceWidth(instance: Instance, width: string | number) {\n const inPixels = coerceCssPixelValue(width);\n instance.popper.style.width = inPixels;\n instance.popper.style.maxWidth = inPixels;\n (instance.popper.firstElementChild as HTMLElement).style.maxWidth = inPixels;\n }\n\n private onHidden(instance: TippyInstance = this.instance) {\n this.destroyView();\n const isVisible = false;\n // `model()` uses `OutputEmitterRef` internally to emit events when the\n // signal changes. If the directive is destroyed, it will throw an error:\n // \"Unexpected emit for destroyed `OutputRef`\".\n if (!this.destroyed) {\n this.isVisible.set(isVisible);\n this.ngZone.run(() => this.visible.emit(isVisible));\n this.onHide.emit();\n }\n this.visibleInternal.next(isVisible);\n\n this.globalConfig.onHidden?.(instance);\n }\n\n private isOverflowing$() {\n const host = this.host();\n const notifiers$ = [overflowChanges(host)];\n\n // We need to handle cases where the host has a static width but the content might change\n if (this.staticWidthHost()) {\n notifiers$.push(\n this.contentChanged.pipe(\n // We need to wait for the content to be rendered before we can check if it's overflowing.\n switchMap(() => {\n return new Observable<boolean>((subscriber) => {\n const id = window.requestAnimationFrame(() => {\n subscriber.next(isElementOverflow(host));\n subscriber.complete();\n });\n\n return () => cancelAnimationFrame(id);\n });\n }),\n ),\n );\n }\n\n return merge(...notifiers$);\n }\n\n private setupListeners(): void {\n effect(() => {\n // Capture signal read to track its changes.\n this.content();\n untracked(() => this.contentChanged.next());\n });\n\n effect(() => this.setStatus(this.tippyService.enabled() && this.isEnabled()));\n\n effect(() => {\n const maxWidth = this.useHostWidth() ? this.hostWidth : defaultMaxWidth;\n untracked(() => this.setProps({ ...this.props, maxWidth }));\n });\n\n effect(() => {\n const isVisible = this.isVisible();\n isVisible ? this.show() : this.hide();\n });\n\n effect(() => {\n const hasContent = this.hasContent();\n\n if (hasContent && !this.instance && !this.isLazy() && !this.onlyTextOverflow()) {\n this.createInstance();\n } else if (!hasContent && this.instance) {\n this.instance.destroy();\n this.instance = null as any;\n this.destroyView();\n this.created = false;\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isPromise","map","originalBooleanAttribute"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAC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file":"ngneat-helipopper.mjs","sources":["../../../../projects/ngneat/helipopper/src/lib/intersection-observer.ts","../../../../projects/ngneat/helipopper/src/lib/utils.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.factory.ts","../../../../projects/ngneat/helipopper/src/lib/inject-tippy.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.service.ts","../../../../projects/ngneat/helipopper/src/lib/coercion.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.directive.ts","../../../../projects/ngneat/helipopper/src/ngneat-helipopper.ts"],"sourcesContent":["// Let's retrieve the native `IntersectionObserver` implementation hidden by\n// `__zone_symbol__IntersectionObserver`. This would be the unpatched version of\n// the observer present in zone.js environments.\n// Otherwise, if the user is using zoneless change detection (and zone.js is not included),\n// we fall back to the native implementation. Accessing the native implementation\n// allows us to remove `runOutsideAngular` calls and reduce indentation,\n// making the code a bit more readable.\nexport const IntersectionObserver: typeof globalThis.IntersectionObserver =\n (globalThis as any)['__zone_symbol__IntersectionObserver'] ||\n globalThis.IntersectionObserver;\n","import { ElementRef } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { auditTime, map } from 'rxjs/operators';\nimport type { TippyElement } from '@ngneat/helipopper/config';\n\nimport { IntersectionObserver } from './intersection-observer';\n\nlet supportsIntersectionObserver = false;\nlet supportsResizeObserver = false;\n\nif (typeof window !== 'undefined') {\n supportsIntersectionObserver = 'IntersectionObserver' in window;\n supportsResizeObserver = 'ResizeObserver' in window;\n}\n\nexport const enum TippyErrorCode {\n TippyNotProvided = 1,\n}\n\nexport function inView(\n host: TippyElement,\n options: IntersectionObserverInit = {\n root: null,\n threshold: 0.3,\n },\n) {\n const element = coerceElement(host);\n\n return new Observable<void>((subscriber) => {\n if (!supportsIntersectionObserver) {\n subscriber.next();\n subscriber.complete();\n return;\n }\n\n const observer = new IntersectionObserver((entries) => {\n // Several changes may occur in the same tick, we want to check the latest entry state.\n const entry = entries[entries.length - 1];\n if (entry.isIntersecting) {\n subscriber.next();\n subscriber.complete();\n }\n }, options);\n\n observer.observe(element);\n\n return () => observer.disconnect();\n });\n}\n\nexport function isElementOverflow(host: HTMLElement): boolean {\n // Don't access the `offsetWidth`/`offsetHeight` multiple times since it triggers layout updates.\n const hostOffsetWidth = host.offsetWidth;\n const hostOffsetHeight = host.offsetHeight;\n\n return (\n hostOffsetWidth > host.parentElement!.offsetWidth ||\n hostOffsetWidth < host.scrollWidth ||\n hostOffsetHeight < host.scrollHeight\n );\n}\n\nexport function overflowChanges(host: TippyElement) {\n const element = coerceElement(host);\n\n return dimensionsChanges(element).pipe(\n auditTime(150),\n map(() => isElementOverflow(element)),\n );\n}\n\nexport function dimensionsChanges(target: HTMLElement) {\n return new Observable<void>((subscriber) => {\n if (!supportsResizeObserver) {\n subscriber.next();\n subscriber.complete();\n return;\n }\n\n const observer = new ResizeObserver(() => subscriber.next());\n observer.observe(target);\n return () => observer.disconnect();\n });\n}\n\nexport function onlyTippyProps(allProps: any) {\n const tippyProps: any = {};\n\n if (!allProps) {\n return tippyProps;\n }\n\n const ownProps = [\n 'useTextContent',\n 'variations',\n 'useHostWidth',\n 'defaultVariation',\n 'beforeRender',\n 'isLazy',\n 'variation',\n 'isEnabled',\n 'className',\n 'onlyTextOverflow',\n 'data',\n 'content',\n 'context',\n 'hideOnEscape',\n 'customHost',\n 'injector',\n 'preserveView',\n 'vcr',\n 'popperWidth',\n 'zIndexGetter',\n 'staticWidthHost',\n 'bindings',\n 'directives',\n ];\n\n const overriddenMethods = ['onShow', 'onHidden', 'onCreate'];\n\n Object.keys(allProps).forEach((prop) => {\n if (!ownProps.includes(prop) && !overriddenMethods.includes(prop)) {\n tippyProps[prop] = allProps[prop];\n }\n });\n\n return tippyProps;\n}\n\nexport function normalizeClassName(className: string | string[]): string[] {\n const classes = typeof className === 'string' ? className.split(' ') : className;\n\n return classes.map((klass) => klass?.trim()).filter(Boolean);\n}\n\nexport function coerceCssPixelValue<T>(value: T): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\n}\n\nfunction coerceElement(element: TippyElement) {\n return element instanceof ElementRef ? element.nativeElement : element;\n}\n\nlet observer: IntersectionObserver;\nconst elementHiddenHandlers = new WeakMap<Element, () => void>();\nexport function observeVisibility(host: Element, hiddenHandler: () => void) {\n observer ??= new IntersectionObserver((entries: IntersectionObserverEntry[]) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n elementHiddenHandlers.get(entry.target)!();\n }\n });\n });\n elementHiddenHandlers.set(host, hiddenHandler);\n observer.observe(host);\n\n return () => {\n elementHiddenHandlers.delete(host);\n observer.unobserve(host);\n };\n}\n","import type tippy from 'tippy.js';\nimport { inject, Injectable, NgZone, ɵisPromise as isPromise } from '@angular/core';\nimport { defer, Observable, of, tap } from 'rxjs';\nimport { TIPPY_LOADER } from '@ngneat/helipopper/config';\n\n@Injectable({ providedIn: 'root' })\nexport class TippyFactory {\n private readonly _ngZone = inject(NgZone);\n\n private readonly _loader = inject(TIPPY_LOADER);\n\n private _tippyImpl$: Observable<typeof tippy> | null = null;\n private _tippy: typeof tippy | null = null;\n\n /**\n * This returns an observable because the user should provide a `loader`\n * function, which may return a promise if the tippy.js library is to be\n * loaded asynchronously.\n */\n getTippyImpl() {\n this._tippyImpl$ ||= defer(() => {\n if (this._tippy) return of(this._tippy);\n\n // Call the `loader` function lazily — only when a subscriber\n // arrives — to avoid importing `tippy.js` on the server.\n const maybeTippy = this._ngZone.runOutsideAngular(() => this._loader());\n\n let tippy$: Observable<typeof tippy>;\n // We need to use `isPromise` instead of checking whether\n // `result instanceof Promise`. In zone.js patched environments, `global.Promise`\n // is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js\n // for certain reasons, might not work with `instanceof`. For instance, the dynamic\n // import `() => import('./chunk.js')` returns a native promise (not a `ZoneAwarePromise`),\n // causing this check to be falsy.\n if (isPromise(maybeTippy)) {\n // This pulls less RxJS symbols compared to using `from()` to resolve a promise value.\n tippy$ = new Observable((subscriber) => {\n maybeTippy.then((tippy) => {\n subscriber.next(tippy.default);\n subscriber.complete();\n });\n });\n } else {\n tippy$ = of(maybeTippy);\n }\n\n return tippy$.pipe(\n tap((tippy) => {\n this._tippy = tippy;\n }),\n );\n });\n\n return this._tippyImpl$;\n }\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport type { TippyInstance } from '@ngneat/helipopper/config';\n\nimport { TippyErrorCode } from './utils';\n\nexport const TIPPY_REF = /* @__PURE__ */ new InjectionToken<TippyInstance>(\n ngDevMode ? 'TIPPY_REF' : '',\n);\n\nexport function injectTippyRef(): TippyInstance {\n const instance = inject(TIPPY_REF, { optional: true });\n\n if (!instance) {\n if (ngDevMode) {\n throw new Error(\n 'tp is not provided in the current context or on one of its ancestors',\n );\n } else {\n throw new Error(`[tp]: ${TippyErrorCode.TippyNotProvided}`);\n }\n }\n\n return instance;\n}\n","import { inject, Injectable, Injector, NgZone, signal } from '@angular/core';\nimport {\n isComponent,\n isTemplateRef,\n ResolveViewRef,\n ViewService,\n} from '@ngneat/overview';\nimport { Content } from '@ngneat/overview';\nimport { map, type Observable } from 'rxjs';\n\nimport {\n CreateOptions,\n ExtendedTippyInstance,\n TIPPY_CONFIG,\n TippyInstance,\n} from '@ngneat/helipopper/config';\n\nimport { TIPPY_REF } from './inject-tippy';\nimport { TippyFactory } from './tippy.factory';\nimport { normalizeClassName, onlyTippyProps } from './utils';\n\n@Injectable({ providedIn: 'root' })\nexport class TippyService {\n private readonly _ngZone = inject(NgZone);\n private readonly _injector = inject(Injector);\n private readonly _globalConfig = inject(TIPPY_CONFIG, { optional: true });\n private readonly _viewService = inject(ViewService);\n private readonly _tippyFactory = inject(TippyFactory);\n\n readonly enabled = signal(true);\n\n enableAll(): void {\n this.enabled.set(true);\n }\n\n disableAll(): void {\n this.enabled.set(false);\n }\n\n create<T extends Content>(\n host: HTMLElement,\n content: T,\n options: Partial<CreateOptions> = {},\n ): Observable<ExtendedTippyInstance<T>> {\n const variation = options.variation || this._globalConfig?.defaultVariation || '';\n const config = {\n onShow: (instance: ExtendedTippyInstance<T>) => {\n host.setAttribute('data-tippy-open', '');\n if (!instance.$viewOptions) {\n instance.$viewOptions = {\n injector: Injector.create({\n providers: [\n {\n provide: TIPPY_REF,\n useValue: instance,\n },\n ],\n parent: options.injector || this._injector,\n }),\n };\n\n if (isTemplateRef(content)) {\n instance.$viewOptions.context = {\n $implicit: instance.hide.bind(instance),\n ...options.context,\n };\n } else if (isComponent(content)) {\n instance.context = options.context;\n instance.data = options.data;\n }\n }\n\n instance.view ||= this._viewService.createView(content, {\n ...options,\n ...instance.$viewOptions,\n }) as ResolveViewRef<T>;\n\n instance.setContent(instance.view.getElement());\n options?.onShow?.(instance);\n },\n onHidden: (instance: ExtendedTippyInstance<T>) => {\n host.removeAttribute('data-tippy-open');\n\n if (!options.preserveView) {\n instance.view?.destroy();\n instance.view = null;\n }\n options?.onHidden?.(instance);\n },\n ...onlyTippyProps(this._globalConfig),\n ...this._globalConfig?.variations?.[variation],\n ...onlyTippyProps(options),\n onCreate: (instance: TippyInstance) => {\n instance.popper.classList.add(`tippy-variation-${variation}`);\n if (options.className) {\n for (const klass of normalizeClassName(options.className)) {\n instance.popper.classList.add(klass);\n }\n }\n this._globalConfig?.onCreate?.(instance);\n options.onCreate?.(instance);\n },\n };\n\n return this._tippyFactory.getTippyImpl().pipe(\n map((tippy) => {\n return this._ngZone.runOutsideAngular(() => {\n return tippy(host, config) as ExtendedTippyInstance<T>;\n });\n }),\n );\n }\n}\n","import { booleanAttribute as originalBooleanAttribute } from '@angular/core';\n\ntype BooleanInput = boolean | `${boolean}` | '' | null | undefined;\n\n/**\n * Transforms a value (typically a string) to a boolean.\n * Intended to be used as a transform function of an input.\n *\n * @see https://material.angular.io/cdk/coercion/overview\n */\nconst coerceBooleanAttribute: (value: BooleanInput) => boolean = originalBooleanAttribute;\n\nexport { coerceBooleanAttribute };\n","import {\n afterEveryRender,\n AfterViewInit,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n InputSignal,\n model,\n NgZone,\n OnChanges,\n output,\n PLATFORM_ID,\n SimpleChanges,\n untracked,\n ViewContainerRef,\n type Type,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Instance } from 'tippy.js';\nimport { combineLatest, firstValueFrom, from, merge, Observable, Subject } from 'rxjs';\nimport { filter, map, switchMap, takeUntil } from 'rxjs/operators';\nimport {\n Content,\n isComponent,\n isString,\n isTemplateRef,\n ViewOptions,\n ViewRef,\n ViewService,\n} from '@ngneat/overview';\n\nimport {\n coerceCssPixelValue,\n dimensionsChanges,\n inView,\n isElementOverflow,\n normalizeClassName,\n observeVisibility,\n onlyTippyProps,\n overflowChanges,\n} from './utils';\nimport {\n TIPPY_CONFIG,\n TIPPY_LOADER_COMPONENT,\n TIPPY_LOADER_TIMING,\n type TippyConfig,\n type TippyContent,\n type TippyInstance,\n type TippyProps,\n} from '@ngneat/helipopper/config';\nimport { TippyFactory } from './tippy.factory';\nimport { TippyService } from './tippy.service';\nimport { coerceBooleanAttribute } from './coercion';\nimport { TIPPY_REF } from './inject-tippy';\n\n// An arrow function defined inside a method closes over the method's lexical scope,\n// causing V8 to allocate a Context object that indirectly references the directive\n// instance — keeping it alive after destroy.\n//\n// A bound function (JSBoundFunction) has no [[context]] field in V8's heap layout;\n// it only stores { bound_target_function, bound_this, bound_arguments }.\n// Binding to `null` produces a context-free callable, breaking the retention chain.\nconst appendTo = function appendTo() {\n return document.fullscreenElement || document.body;\n}.bind(null);\n\n// These are the default values used by `tippy.js`.\n// We are providing them as default input values.\n// The `tippy.js` repository has been archived and is unlikely to\n// change in the future, so it is safe to use these values as defaults.\nconst defaultAppendTo = (() => document.body) as TippyProps['appendTo'];\nconst defaultDelay = 0 as TippyProps['delay'];\nconst defaultDuration = [300, 250] as TippyProps['duration'];\nconst defaultInteractiveBorder = 2 as TippyProps['interactiveBorder'];\nconst defaultMaxWidth = 350 as TippyProps['maxWidth'];\nconst defaultOffset = [0, 10] as TippyProps['offset'];\nconst defaultPlacement = 'top' as TippyProps['placement'];\nconst defaultTrigger = 'mouseenter focus' as TippyProps['trigger'];\nconst defaultTriggerTarget = null as TippyProps['triggerTarget'];\nconst defaultZIndex = 9999 as TippyProps['zIndex'];\nconst defaultAnimation = 'fade' as TippyProps['animation'];\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tp]',\n exportAs: 'tippy',\n})\nexport class TippyDirective implements OnChanges, AfterViewInit {\n readonly appendTo = input(defaultAppendTo, {\n alias: 'tpAppendTo',\n });\n\n readonly content = input<TippyContent | undefined | null>('', { alias: 'tp' });\n\n readonly delay = input(defaultDelay, {\n alias: 'tpDelay',\n });\n\n readonly duration = input(defaultDuration, {\n alias: 'tpDuration',\n });\n\n readonly hideOnClick = input(true, {\n alias: 'tpHideOnClick',\n });\n\n readonly interactive = input(false, {\n alias: 'tpInteractive',\n });\n\n readonly interactiveBorder = input(defaultInteractiveBorder, {\n alias: 'tpInteractiveBorder',\n });\n\n readonly maxWidth = input(defaultMaxWidth, {\n alias: 'tpMaxWidth',\n });\n\n // Note that some of the input signal types are declared explicitly because the compiler\n // also uses types from `@popperjs/core` and requires a type annotation.\n readonly offset: InputSignal<TippyProps['offset']> = input(defaultOffset, {\n alias: 'tpOffset',\n });\n\n readonly placement: InputSignal<TippyProps['placement']> = input(defaultPlacement, {\n alias: 'tpPlacement',\n });\n\n readonly popperOptions: InputSignal<TippyProps['popperOptions']> = input(\n {},\n {\n alias: 'tpPopperOptions',\n },\n );\n\n readonly showOnCreate = input(false, {\n alias: 'tpShowOnCreate',\n });\n\n readonly trigger = input(defaultTrigger, {\n alias: 'tpTrigger',\n });\n\n readonly triggerTarget = input(defaultTriggerTarget, {\n alias: 'tpTriggerTarget',\n });\n\n readonly zIndex = input(defaultZIndex, {\n alias: 'tpZIndex',\n });\n\n readonly animation = input(defaultAnimation, {\n alias: 'tpAnimation',\n });\n\n readonly useTextContent = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpUseTextContent',\n });\n\n readonly isLazy = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpIsLazy',\n });\n\n readonly variation = input<string | undefined>(undefined, { alias: 'tpVariation' });\n\n readonly isEnabled = input(true, { alias: 'tpIsEnabled' });\n\n readonly className = input<string | string[]>('', { alias: 'tpClassName' });\n\n readonly onlyTextOverflow = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpOnlyTextOverflow',\n });\n\n readonly staticWidthHost = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpStaticWidthHost',\n });\n\n readonly data = input<any>(undefined, { alias: 'tpData' });\n\n /** Angular `inputBinding`/`outputBinding`/`twoWayBinding` descriptors forwarded to `createComponent`. */\n readonly bindings = input<ViewOptions['bindings']>(undefined, { alias: 'tpBindings' });\n\n /** Host directives (with optional bindings) forwarded to `createComponent`. */\n readonly directives = input<ViewOptions['directives']>(undefined, {\n alias: 'tpDirectives',\n });\n\n readonly useHostWidth = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpUseHostWidth',\n });\n\n readonly hideOnEscape = input(false, {\n transform: coerceBooleanAttribute,\n alias: 'tpHideOnEscape',\n });\n\n readonly tippyProps = input<Record<string, unknown> | undefined>(undefined, {\n alias: 'tpTippyProps',\n });\n\n readonly popperWidth = input<number | string | undefined>(undefined, {\n alias: 'tpPopperWidth',\n });\n\n readonly customHost = input<HTMLElement | undefined>(undefined, { alias: 'tpHost' });\n\n readonly tpOnShow = output<void>({ alias: 'tpOnShow' });\n\n readonly tpOnHide = output<void>({ alias: 'tpOnHide' });\n\n readonly isVisible = model(false, { alias: 'tpIsVisible' });\n\n visible = output<boolean>({ alias: 'tpVisible' });\n\n protected instance!: TippyInstance;\n protected viewRef: ViewRef | null = null;\n protected props!: Partial<TippyConfig>;\n protected variationDefined = false;\n protected viewOptions$: ViewOptions | null = null;\n\n /**\n * We had use `visible` event emitter previously as a `takeUntil` subscriber in multiple places\n * within the directive.\n * This is for internal use only; thus we don't have to deal with the `visible` event emitter\n * and trigger change detections only when the `visible` event is being listened outside\n * in the template (`<button [tippy]=\"...\" (visible)=\"...\"></button>`).\n */\n protected visibleInternal = new Subject<boolean>();\n private visibilityObserverCleanup: VoidFunction | null = null;\n private contentChanged = new Subject<void>();\n\n private host = computed<HTMLElement>(\n () => this.customHost() || this.hostRef.nativeElement,\n );\n\n // It should be a getter because computations are cached until\n // any of the producers change.\n private get hostWidth() {\n return this.host().getBoundingClientRect().width;\n }\n\n private destroyRef = inject(DestroyRef);\n private tippyService = inject(TippyService);\n private isServer =\n // Drop `isPlatformServer` once `ngServeMode` is available during compilation.\n (typeof ngServerMode !== 'undefined' && ngServerMode) ||\n isPlatformServer(inject(PLATFORM_ID));\n private tippyFactory = inject(TippyFactory);\n private destroyed = false;\n private created = false;\n\n protected globalConfig = inject(TIPPY_CONFIG);\n protected injector = inject(Injector);\n protected viewService = inject(ViewService);\n protected vcr = inject(ViewContainerRef);\n protected ngZone = inject(NgZone);\n protected hostRef = inject(ElementRef);\n\n private loaderViewRef: ViewRef | null = null;\n private globalLoaderComponent = inject(TIPPY_LOADER_COMPONENT, { optional: true });\n private loaderTiming = inject(TIPPY_LOADER_TIMING);\n\n constructor() {\n if (this.isServer) return;\n\n this.setupListeners();\n\n // `afterEveryRender` fires synchronously within Angular's CD cycle.\n // This lets us update the enabled/disabled state of the instance BEFORE a\n // synthetic mouseenter event is dispatched, which fixes test timing when\n // Angular-triggered changes (content/style bindings) cause the overflow\n // state to change. ResizeObserver (`overflowChanges`) remains as a fallback\n // for non-Angular-triggered resize events (browser window resize, etc.).\n afterEveryRender({\n read: () => {\n if (!this.onlyTextOverflow()) return;\n untracked(() => this.checkOverflow(isElementOverflow(this.host())));\n },\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.instance?.destroy();\n this.destroyView();\n this.visibilityObserverCleanup?.();\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (this.isServer) return;\n\n // `isVisible` and `tippyProps` are not merged into `this.props`; they are\n // handled separately (model signal and direct-spread effect respectively).\n const changedProps = Object.keys(changes)\n .filter((key) => key !== 'isVisible' && key !== 'tippyProps')\n .reduce(\n (accumulator, key) => ({ ...accumulator, [key]: changes[key].currentValue }),\n {} as Partial<TippyConfig>,\n );\n\n // Variation defaults are applied only on the first call or when the variation\n // input itself changes. Re-applying them on every ngOnChanges call would\n // overwrite explicitly-bound inputs (e.g. tpTrigger) with variation defaults\n // whenever any other input (e.g. tpData, tpIsEnabled) changes.\n if (!this.variationDefined || 'variation' in changes) {\n this.variationDefined = true;\n const variation = this.variation() || this.globalConfig.defaultVariation || '';\n this.setProps({\n ...this.globalConfig.variations?.[variation],\n ...this.props,\n ...changedProps,\n });\n } else {\n this.updateProps(changedProps);\n }\n }\n\n ngAfterViewInit() {\n if (this.isServer) return;\n\n const onlyTextOverflow = this.onlyTextOverflow();\n if (this.isLazy()) {\n const hostInView$ = inView(this.host());\n\n if (onlyTextOverflow) {\n hostInView$\n .pipe(\n switchMap(() => this.isOverflowing$()),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((isElementOverflow) => {\n this.checkOverflow(isElementOverflow);\n });\n } else {\n hostInView$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.createInstance();\n });\n }\n } else if (onlyTextOverflow) {\n this.isOverflowing$()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((isElementOverflow) => {\n this.checkOverflow(isElementOverflow);\n });\n } else {\n this.createInstance();\n }\n }\n\n destroyView() {\n this.viewOptions$ = null;\n this.viewRef?.destroy();\n this.viewRef = null;\n this.loaderViewRef?.destroy();\n this.loaderViewRef = null;\n }\n\n /**\n * This method is useful when you append to an element that you might remove from the DOM.\n * In such cases we want to hide the tooltip and let it go through the destroy lifecycle.\n * For example, if you have a grid row with an element that you toggle using the display CSS property on hover.\n */\n observeHostVisibility() {\n if (this.isServer) return;\n // We don't want to observe the host visibility if we are appending to the body.\n if (this.props.appendTo && this.props.appendTo !== document.body) {\n this.visibilityObserverCleanup?.();\n return this.visibleInternal\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((isVisible) => {\n if (isVisible) {\n this.visibilityObserverCleanup = observeVisibility(\n this.instance.reference,\n () => {\n this.hide();\n // Because we have animation on the popper it doesn't close immediately doesn't trigger the `tpVisible` event.\n // Tippy is relying on the transitionend event to trigger the `onHidden` callback.\n // https://github.com/atomiks/tippyjs/blob/master/src/dom-utils.ts#L117\n // This event never fires because the popper is removed from the DOM before the transition ends.\n if (this.props.animation) {\n this.onHidden();\n }\n },\n );\n } else {\n this.visibilityObserverCleanup?.();\n }\n });\n }\n }\n\n show() {\n this.instance?.show();\n }\n\n hide() {\n this.instance?.hide();\n }\n\n enable() {\n this.instance?.enable();\n }\n\n disable() {\n this.instance?.disable();\n }\n\n protected updateProps(props: Partial<TippyConfig>) {\n this.setProps({ ...this.props, ...props });\n }\n\n protected setProps(props: Partial<TippyConfig>) {\n this.props = props;\n this.instance?.setProps({ ...onlyTippyProps(props), ...(this.tippyProps() ?? {}) });\n }\n\n protected setStatus(isEnabled: boolean) {\n isEnabled ? this.instance?.enable() : this.instance?.disable();\n }\n\n protected hasContent(): boolean {\n return !!(this.content() || this.useTextContent());\n }\n\n protected async createInstance() {\n if (this.created || !this.hasContent()) {\n return;\n }\n\n this.created = true;\n\n const tippy = await this.ngZone.runOutsideAngular(() => {\n return firstValueFrom(this.tippyFactory.getTippyImpl(), {\n defaultValue: undefined,\n });\n });\n\n if (tippy === undefined || this.destroyRef.destroyed) {\n return;\n }\n\n this.instance = this.ngZone.runOutsideAngular(() => {\n return tippy(this.host(), {\n appendTo,\n allowHTML: true,\n ...(this.globalConfig.zIndexGetter\n ? { zIndex: this.globalConfig.zIndexGetter() }\n : {}),\n ...onlyTippyProps(this.globalConfig),\n ...onlyTippyProps(this.props),\n ...(this.tippyProps() ?? {}),\n // Arrow functions or inline callbacks close over the method's lexical scope,\n // causing V8 to allocate a Context object that indirectly retains the directive\n // instance inside tippy.js after destroy. A JSBoundFunction has no [[Context]]\n // slot — only { bound_target_function, bound_this, bound_arguments } — so no\n // closure context is created. onHide is bound to null because it needs no `this`\n // at all, fully breaking the retention chain (same reasoning as `appendTo` above).\n onMount: this.onMount.bind(this),\n onCreate: this.onCreate.bind(this),\n onShow: this.onShow.bind(this),\n onHide: function (instance: TippyInstance) {\n instance.reference.removeAttribute('data-tippy-open');\n }.bind(null),\n onHidden: this.onHidden.bind(this),\n });\n });\n\n this.setStatus(this.isEnabled());\n this.setProps(this.props);\n\n const variationName = this.variation() || this.globalConfig.defaultVariation || '';\n const variationConfig = this.globalConfig.variations?.[variationName];\n // Check the isContextMenu marker set by withContextMenuVariation so any\n // variation name works. The 'contextMenu' name fallback preserves\n // compatibility with manually-constructed variations that predate this flag.\n (variationConfig?.isContextMenu || variationName === 'contextMenu') &&\n this.handleContextMenu();\n }\n\n // `resolvedContent` is provided when the caller already awaited a lazy factory.\n // Passing it here avoids re-reading `this.content()`, which would still carry\n // the raw factory function type and require another cast.\n protected resolveContent(instance: TippyInstance, resolvedContent?: Type<unknown>) {\n const content = (resolvedContent ?? this.content()) as Content | undefined | null;\n\n if (!this.viewOptions$ && !isString(content)) {\n const injector = Injector.create({\n providers: [\n {\n provide: TIPPY_REF,\n useValue: this.instance,\n },\n ],\n parent: this.injector,\n });\n\n const data = this.data();\n\n if (isComponent(content)) {\n this.instance.data = data;\n\n this.viewOptions$ = {\n injector,\n bindings: this.bindings(),\n directives: this.directives(),\n };\n } else if (isTemplateRef(content)) {\n this.viewOptions$ = {\n injector,\n context: {\n data,\n $implicit: this.hide.bind(this),\n },\n };\n }\n }\n\n let newContent = this.ngZone.run(() => {\n this.viewRef = this.viewService.createView(content!, {\n vcr: this.vcr,\n ...this.viewOptions$,\n });\n\n // We need to call `detectChanges` for OnPush components to update their content.\n if (isComponent(content)) {\n // `ɵcmp` is a component defition set for any component.\n // Checking the `onPush` property of the component definition is a\n // smarter way to determine whether we need to call `detectChanges()`,\n // as users may be unaware of setting the binding.\n const isOnPush = (content as { ɵcmp?: { onPush: boolean } }).ɵcmp?.onPush;\n if (isOnPush) {\n this.viewRef.detectChanges();\n }\n }\n\n return this.viewRef.getElement();\n });\n\n if (this.useTextContent()) {\n newContent = instance.reference.textContent!;\n }\n\n if (isString(newContent) && this.globalConfig.beforeRender) {\n newContent = this.globalConfig.beforeRender(newContent);\n }\n\n return newContent;\n }\n\n protected handleContextMenu() {\n const host = this.host();\n const onContextMenu = (event: MouseEvent) => {\n event.preventDefault();\n\n this.instance.setProps({\n getReferenceClientRect: () =>\n ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }) as DOMRectReadOnly,\n });\n\n this.instance.show();\n };\n\n host.addEventListener('contextmenu', onContextMenu);\n this.destroyRef.onDestroy(() =>\n host.removeEventListener('contextmenu', onContextMenu),\n );\n }\n\n protected handleEscapeButton(): void {\n const onKeydown = (event: KeyboardEvent) => {\n if (event.code === 'Escape') {\n this.hide();\n }\n };\n\n document.body.addEventListener('keydown', onKeydown);\n\n // Remove listener when `visibleInternal` becomes false.\n const visibleSubscription = this.visibleInternal.subscribe((v) => {\n if (!v) {\n document.body.removeEventListener('keydown', onKeydown);\n visibleSubscription.unsubscribe();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n document.body.removeEventListener('keydown', onKeydown);\n visibleSubscription.unsubscribe();\n });\n }\n\n protected checkOverflow(isElementOverflow: boolean) {\n if (isElementOverflow) {\n if (!this.instance) {\n this.createInstance();\n } else {\n this.instance.enable();\n }\n } else {\n this.instance?.disable();\n }\n }\n\n protected listenToHostResize() {\n dimensionsChanges(this.host())\n .pipe(takeUntil(this.visibleInternal), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.setInstanceWidth(this.instance, this.hostWidth);\n });\n }\n\n protected clearInstanceWidth(instance: Instance) {\n instance.popper.style.width = '';\n instance.popper.style.maxWidth = '';\n (instance.popper.firstElementChild as HTMLElement).style.maxWidth = '';\n }\n\n protected setInstanceWidth(instance: Instance, width: string | number) {\n const inPixels = coerceCssPixelValue(width);\n instance.popper.style.width = inPixels;\n instance.popper.style.maxWidth = inPixels;\n (instance.popper.firstElementChild as HTMLElement).style.maxWidth = inPixels;\n }\n\n private onMount(instance: TippyInstance) {\n const isVisible = true;\n this.isVisible.set(isVisible);\n this.visibleInternal.next(isVisible);\n this.ngZone.run(() => this.visible.emit(isVisible));\n this.useHostWidth() && this.listenToHostResize();\n this.globalConfig.onMount?.(instance);\n }\n\n private onCreate(instance: TippyInstance) {\n instance.popper.classList.add(\n `tippy-variation-${this.variation() || this.globalConfig.defaultVariation}`,\n );\n if (this.className()) {\n for (const klass of normalizeClassName(this.className())) {\n instance.popper.classList.add(klass);\n }\n }\n this.globalConfig.onCreate?.(instance);\n if (this.isVisible() === true) {\n instance.show();\n }\n }\n\n private onHidden(instance: TippyInstance = this.instance) {\n this.destroyView();\n const isVisible = false;\n // `model()` uses `OutputEmitterRef` internally to emit events when the\n // signal changes. If the directive is destroyed, it will throw an error:\n // \"Unexpected emit for destroyed `OutputRef`\".\n if (!this.destroyed) {\n this.isVisible.set(isVisible);\n this.ngZone.run(() => this.visible.emit(isVisible));\n this.tpOnHide.emit();\n }\n this.visibleInternal.next(isVisible);\n\n this.globalConfig.onHidden?.(instance);\n }\n\n private onShow(instance: TippyInstance) {\n // In onlyTextOverflow mode the tooltip must not appear when the host is\n // not overflowing. Returning false from onShow prevents tippy from\n // showing regardless of the instance's enabled/disabled state. This\n // acts as a last-resort guard for cases where checkOverflow() hasn't\n // been called yet (e.g. Angular's scheduler hasn't flushed CD between\n // the content/width change and the trigger event).\n if (this.onlyTextOverflow() && !isElementOverflow(this.host())) {\n return false;\n }\n\n // The outer `onShow` must be synchronous so that `return false` above\n // is seen as a boolean by tippy.js (an `async` function always returns\n // a Promise, which is truthy and would never suppress the show).\n this.handleOnShow(instance);\n }\n\n private async handleOnShow(instance: Instance) {\n instance.reference.setAttribute('data-tippy-open', '');\n\n const maybeContent = this.content();\n const isLazyFactory =\n !isComponentClass(maybeContent) && typeof maybeContent === 'function';\n\n let resolvedContent: Type<unknown> | undefined;\n if (isLazyFactory) {\n const loaderComponent = this.globalLoaderComponent;\n if (loaderComponent) {\n const loaderElement = this.ngZone.run(() => {\n this.loaderViewRef = this.viewService.createView(loaderComponent, {\n vcr: this.vcr,\n });\n return this.loaderViewRef.getElement();\n });\n instance.setContent(loaderElement);\n }\n\n const cancelled = Symbol();\n // combineLatest ensures we swap the loader only when both the component\n // is ready AND the timing observable has emitted — guaranteeing the spinner\n // is visible for at least the configured duration regardless of import speed.\n // takeUntil + takeUntilDestroyed cancel if the tooltip hides or the\n // directive is destroyed mid-flight.\n const result = await firstValueFrom(\n combineLatest([\n from((maybeContent as () => Promise<Type<unknown>>)()),\n this.loaderTiming,\n ]).pipe(\n map(([component]) => component),\n takeUntil(this.visibleInternal.pipe(filter((v) => !v))),\n takeUntilDestroyed(this.destroyRef),\n ),\n { defaultValue: cancelled },\n );\n\n this.loaderViewRef?.destroy();\n this.loaderViewRef = null;\n\n if (result === cancelled) return;\n resolvedContent = result as Type<unknown>;\n }\n\n // For non-lazy content this call is fully synchronous — skipping the\n // await avoids a microtask tick that would otherwise cause a visible flicker.\n const content = this.resolveContent(instance, resolvedContent);\n\n if (isString(content)) {\n instance.setProps({ allowHTML: false });\n\n if (content?.trim()) {\n this.enable();\n } else {\n this.disable();\n }\n }\n\n instance.setContent(content);\n this.hideOnEscape() && this.handleEscapeButton();\n\n this.clearInstanceWidth(instance);\n if (this.useHostWidth()) {\n this.setInstanceWidth(instance, this.hostWidth);\n } else if (this.popperWidth()) {\n this.setInstanceWidth(instance, this.popperWidth()!);\n }\n this.globalConfig.onShow?.(instance);\n this.tpOnShow.emit();\n }\n\n private isOverflowing$() {\n const host = this.host();\n const notifiers$ = [overflowChanges(host)];\n\n // We need to handle cases where the host has a static width but the content might change\n if (this.staticWidthHost()) {\n notifiers$.push(\n this.contentChanged.pipe(\n // We need to wait for the content to be rendered before we can check if it's overflowing.\n switchMap(() => {\n return new Observable<boolean>((subscriber) => {\n const id = window.requestAnimationFrame(() => {\n subscriber.next(isElementOverflow(host));\n subscriber.complete();\n });\n\n return () => cancelAnimationFrame(id);\n });\n }),\n ),\n );\n }\n\n return merge(...notifiers$);\n }\n\n private setupListeners(): void {\n effect(() => {\n // Capture signal read to track its changes.\n this.content();\n untracked(() => this.contentChanged.next());\n });\n\n effect(() => this.setStatus(this.tippyService.enabled() && this.isEnabled()));\n\n effect(() => {\n const maxWidth = this.useHostWidth() ? this.hostWidth : defaultMaxWidth;\n untracked(() => this.setProps({ ...this.props, maxWidth }));\n });\n\n effect(() => {\n const isVisible = this.isVisible();\n isVisible ? this.show() : this.hide();\n });\n\n effect(() => {\n const hasContent = this.hasContent();\n\n if (hasContent && !this.instance && !this.isLazy() && !this.onlyTextOverflow()) {\n this.createInstance();\n } else if (!hasContent && this.instance) {\n this.instance.destroy();\n this.instance = null as any;\n this.destroyView();\n this.created = false;\n }\n });\n\n effect(() => {\n const tippyProps = this.tippyProps();\n untracked(() => this.instance?.setProps(tippyProps ?? {}));\n });\n }\n}\n\nfunction isComponentClass(\n content: TippyContent | null | undefined,\n): content is Type<any> {\n return (\n typeof content === 'function' &&\n /^class\\s/.test(Function.prototype.toString.call(content))\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isPromise","map","originalBooleanAttribute"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,oBAAoB,GAC9B,UAAkB,CAAC,qCAAqC,CAAC;IAC1D,UAAU,CAAC,oBAAoB;;ACFjC,IAAI,4BAA4B,GAAG,KAAK;AACxC,IAAI,sBAAsB,GAAG,KAAK;AAElC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,IAAA,4BAA4B,GAAG,sBAAsB,IAAI,MAAM;AAC/D,IAAA,sBAAsB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A,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,MAAM;AAChB,oBAAA,QAAQ,EAAE,OAAO;AAClB,iBAAA;;AAwuBD,SAAS,gBAAgB,CACvB,OAAwC,EAAA;AAExC,IAAA,QACE,OAAO,OAAO,KAAK,UAAU;AAC7B,QAAA,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE9D;;AC30BA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import tippy, { Props, Instance } from 'tippy.js';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { ViewOptions, ResolveViewRef } from '@ngneat/overview';
|
|
2
|
+
import { InjectionToken, Type, ElementRef, Provider, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { ViewOptions, ResolveViewRef, Content } from '@ngneat/overview';
|
|
5
5
|
|
|
6
6
|
interface CreateOptions extends Partial<TippyProps>, ViewOptions {
|
|
7
7
|
variation: string;
|
|
@@ -13,8 +13,11 @@ interface TippyInstance extends Instance {
|
|
|
13
13
|
data?: any;
|
|
14
14
|
}
|
|
15
15
|
type TippyProps = Props;
|
|
16
|
+
type VariationConfig = Partial<TippyProps> & {
|
|
17
|
+
isContextMenu?: boolean;
|
|
18
|
+
};
|
|
16
19
|
interface ExtendedTippyProps extends TippyProps {
|
|
17
|
-
variations: Record<string,
|
|
20
|
+
variations: Record<string, VariationConfig>;
|
|
18
21
|
defaultVariation: keyof ExtendedTippyProps['variations'];
|
|
19
22
|
beforeRender?: (text: string) => string;
|
|
20
23
|
zIndexGetter?(): number;
|
|
@@ -26,19 +29,26 @@ interface ExtendedTippyInstance<T> extends TippyInstance {
|
|
|
26
29
|
context?: ViewOptions['context'];
|
|
27
30
|
}
|
|
28
31
|
type TippyConfig = Partial<ExtendedTippyProps>;
|
|
32
|
+
type TippyContent = Content | (() => Promise<Type<any>>);
|
|
29
33
|
type TippyLoader = () => typeof tippy | Promise<{
|
|
30
34
|
default: typeof tippy;
|
|
31
35
|
}>;
|
|
32
36
|
declare const TIPPY_LOADER: InjectionToken<TippyLoader>;
|
|
33
37
|
declare const TIPPY_CONFIG: InjectionToken<Partial<ExtendedTippyProps>>;
|
|
38
|
+
declare const TIPPY_LOADER_COMPONENT: InjectionToken<Type<unknown>>;
|
|
39
|
+
type TippyLoaderTiming = Observable<void>;
|
|
40
|
+
declare const TIPPY_LOADER_TIMING: InjectionToken<TippyLoaderTiming>;
|
|
34
41
|
|
|
35
42
|
type Variation = Partial<TippyProps>;
|
|
36
43
|
declare const tooltipVariation: Variation;
|
|
37
44
|
declare const popperVariation: Variation;
|
|
38
|
-
declare function withContextMenuVariation(baseVariation: Variation):
|
|
45
|
+
declare function withContextMenuVariation(baseVariation: Variation): VariationConfig;
|
|
39
46
|
|
|
40
|
-
declare function provideTippyLoader(loader: TippyLoader):
|
|
47
|
+
declare function provideTippyLoader(loader: TippyLoader): EnvironmentProviders;
|
|
41
48
|
declare function provideTippyConfig(config: TippyConfig): Provider;
|
|
49
|
+
declare function provideTippyConfig(config: TippyConfig, ...features: EnvironmentProviders[]): EnvironmentProviders;
|
|
50
|
+
declare function withTippyLoaderComponent(component: Type<unknown>): EnvironmentProviders;
|
|
51
|
+
declare function withTippyLoaderTiming(timing: TippyLoaderTiming): EnvironmentProviders;
|
|
42
52
|
|
|
43
|
-
export { TIPPY_CONFIG, TIPPY_LOADER, popperVariation, provideTippyConfig, provideTippyLoader, tooltipVariation, withContextMenuVariation };
|
|
44
|
-
export type { CreateOptions, ExtendedTippyInstance, ExtendedTippyProps, TippyConfig, TippyElement, TippyInstance, TippyLoader, TippyProps };
|
|
53
|
+
export { TIPPY_CONFIG, TIPPY_LOADER, TIPPY_LOADER_COMPONENT, TIPPY_LOADER_TIMING, popperVariation, provideTippyConfig, provideTippyLoader, tooltipVariation, withContextMenuVariation, withTippyLoaderComponent, withTippyLoaderTiming };
|
|
54
|
+
export type { CreateOptions, ExtendedTippyInstance, ExtendedTippyProps, TippyConfig, TippyContent, TippyElement, TippyInstance, TippyLoader, TippyLoaderTiming, TippyProps, VariationConfig };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Subject, Observable } from 'rxjs';
|
|
3
3
|
import * as _ngneat_helipopper_config from '@ngneat/helipopper/config';
|
|
4
|
-
import { TippyProps, TippyInstance, TippyConfig, CreateOptions, ExtendedTippyInstance, TippyElement } from '@ngneat/helipopper/config';
|
|
4
|
+
import { TippyContent, TippyProps, TippyInstance, TippyConfig, CreateOptions, ExtendedTippyInstance, TippyElement } from '@ngneat/helipopper/config';
|
|
5
5
|
import * as _angular_core from '@angular/core';
|
|
6
|
-
import { OnChanges, AfterViewInit, InputSignal, Injector, ViewContainerRef, NgZone, ElementRef, SimpleChanges, InjectionToken } from '@angular/core';
|
|
6
|
+
import { OnChanges, AfterViewInit, InputSignal, Type, Injector, ViewContainerRef, NgZone, ElementRef, SimpleChanges, InjectionToken } from '@angular/core';
|
|
7
7
|
import { Instance } from 'tippy.js';
|
|
8
|
-
import {
|
|
8
|
+
import { ViewRef, ViewOptions, ViewService, Content } from '@ngneat/overview';
|
|
9
9
|
|
|
10
10
|
declare class TippyDirective implements OnChanges, AfterViewInit {
|
|
11
|
-
readonly appendTo: InputSignal<
|
|
12
|
-
readonly content: InputSignal<
|
|
11
|
+
readonly appendTo: InputSignal<"parent" | Element | ((ref: Element) => Element)>;
|
|
12
|
+
readonly content: InputSignal<TippyContent | null | undefined>;
|
|
13
13
|
readonly delay: InputSignal<number | [number | null, number | null]>;
|
|
14
14
|
readonly duration: InputSignal<number | [number | null, number | null]>;
|
|
15
15
|
readonly hideOnClick: InputSignal<boolean>;
|
|
@@ -35,13 +35,14 @@ declare class TippyDirective implements OnChanges, AfterViewInit {
|
|
|
35
35
|
/** Angular `inputBinding`/`outputBinding`/`twoWayBinding` descriptors forwarded to `createComponent`. */
|
|
36
36
|
readonly bindings: InputSignal<_angular_core.Binding[] | undefined>;
|
|
37
37
|
/** Host directives (with optional bindings) forwarded to `createComponent`. */
|
|
38
|
-
readonly directives: InputSignal<(
|
|
38
|
+
readonly directives: InputSignal<(Type<unknown> | _angular_core.DirectiveWithBindings<unknown>)[] | undefined>;
|
|
39
39
|
readonly useHostWidth: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
|
|
40
40
|
readonly hideOnEscape: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
|
|
41
|
+
readonly tippyProps: InputSignal<Record<string, unknown> | undefined>;
|
|
41
42
|
readonly popperWidth: InputSignal<string | number | undefined>;
|
|
42
43
|
readonly customHost: InputSignal<HTMLElement | undefined>;
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
44
|
+
readonly tpOnShow: _angular_core.OutputEmitterRef<void>;
|
|
45
|
+
readonly tpOnHide: _angular_core.OutputEmitterRef<void>;
|
|
45
46
|
readonly isVisible: _angular_core.ModelSignal<boolean>;
|
|
46
47
|
visible: _angular_core.OutputEmitterRef<boolean>;
|
|
47
48
|
protected instance: TippyInstance;
|
|
@@ -73,6 +74,9 @@ declare class TippyDirective implements OnChanges, AfterViewInit {
|
|
|
73
74
|
protected vcr: ViewContainerRef;
|
|
74
75
|
protected ngZone: NgZone;
|
|
75
76
|
protected hostRef: ElementRef<any>;
|
|
77
|
+
private loaderViewRef;
|
|
78
|
+
private globalLoaderComponent;
|
|
79
|
+
private loaderTiming;
|
|
76
80
|
constructor();
|
|
77
81
|
ngOnChanges(changes: SimpleChanges): void;
|
|
78
82
|
ngAfterViewInit(): void;
|
|
@@ -91,22 +95,27 @@ declare class TippyDirective implements OnChanges, AfterViewInit {
|
|
|
91
95
|
protected setProps(props: Partial<TippyConfig>): void;
|
|
92
96
|
protected setStatus(isEnabled: boolean): void;
|
|
93
97
|
protected hasContent(): boolean;
|
|
94
|
-
protected createInstance(): void
|
|
95
|
-
protected resolveContent(instance: TippyInstance): string | Element;
|
|
98
|
+
protected createInstance(): Promise<void>;
|
|
99
|
+
protected resolveContent(instance: TippyInstance, resolvedContent?: Type<unknown>): string | Element;
|
|
96
100
|
protected handleContextMenu(): void;
|
|
97
101
|
protected handleEscapeButton(): void;
|
|
98
102
|
protected checkOverflow(isElementOverflow: boolean): void;
|
|
99
103
|
protected listenToHostResize(): void;
|
|
100
104
|
protected clearInstanceWidth(instance: Instance): void;
|
|
101
105
|
protected setInstanceWidth(instance: Instance, width: string | number): void;
|
|
106
|
+
private onMount;
|
|
107
|
+
private onCreate;
|
|
102
108
|
private onHidden;
|
|
109
|
+
private onShow;
|
|
110
|
+
private handleOnShow;
|
|
103
111
|
private isOverflowing$;
|
|
104
112
|
private setupListeners;
|
|
105
113
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TippyDirective, never>;
|
|
106
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TippyDirective, "[tp]", ["tippy"], { "appendTo": { "alias": "tpAppendTo"; "required": false; "isSignal": true; }; "content": { "alias": "tp"; "required": false; "isSignal": true; }; "delay": { "alias": "tpDelay"; "required": false; "isSignal": true; }; "duration": { "alias": "tpDuration"; "required": false; "isSignal": true; }; "hideOnClick": { "alias": "tpHideOnClick"; "required": false; "isSignal": true; }; "interactive": { "alias": "tpInteractive"; "required": false; "isSignal": true; }; "interactiveBorder": { "alias": "tpInteractiveBorder"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "tpMaxWidth"; "required": false; "isSignal": true; }; "offset": { "alias": "tpOffset"; "required": false; "isSignal": true; }; "placement": { "alias": "tpPlacement"; "required": false; "isSignal": true; }; "popperOptions": { "alias": "tpPopperOptions"; "required": false; "isSignal": true; }; "showOnCreate": { "alias": "tpShowOnCreate"; "required": false; "isSignal": true; }; "trigger": { "alias": "tpTrigger"; "required": false; "isSignal": true; }; "triggerTarget": { "alias": "tpTriggerTarget"; "required": false; "isSignal": true; }; "zIndex": { "alias": "tpZIndex"; "required": false; "isSignal": true; }; "animation": { "alias": "tpAnimation"; "required": false; "isSignal": true; }; "useTextContent": { "alias": "tpUseTextContent"; "required": false; "isSignal": true; }; "isLazy": { "alias": "tpIsLazy"; "required": false; "isSignal": true; }; "variation": { "alias": "tpVariation"; "required": false; "isSignal": true; }; "isEnabled": { "alias": "tpIsEnabled"; "required": false; "isSignal": true; }; "className": { "alias": "tpClassName"; "required": false; "isSignal": true; }; "onlyTextOverflow": { "alias": "tpOnlyTextOverflow"; "required": false; "isSignal": true; }; "staticWidthHost": { "alias": "tpStaticWidthHost"; "required": false; "isSignal": true; }; "data": { "alias": "tpData"; "required": false; "isSignal": true; }; "bindings": { "alias": "tpBindings"; "required": false; "isSignal": true; }; "directives": { "alias": "tpDirectives"; "required": false; "isSignal": true; }; "useHostWidth": { "alias": "tpUseHostWidth"; "required": false; "isSignal": true; }; "hideOnEscape": { "alias": "tpHideOnEscape"; "required": false; "isSignal": true; }; "popperWidth": { "alias": "tpPopperWidth"; "required": false; "isSignal": true; }; "customHost": { "alias": "tpHost"; "required": false; "isSignal": true; }; "isVisible": { "alias": "tpIsVisible"; "required": false; "isSignal": true; }; }, { "
|
|
114
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TippyDirective, "[tp]", ["tippy"], { "appendTo": { "alias": "tpAppendTo"; "required": false; "isSignal": true; }; "content": { "alias": "tp"; "required": false; "isSignal": true; }; "delay": { "alias": "tpDelay"; "required": false; "isSignal": true; }; "duration": { "alias": "tpDuration"; "required": false; "isSignal": true; }; "hideOnClick": { "alias": "tpHideOnClick"; "required": false; "isSignal": true; }; "interactive": { "alias": "tpInteractive"; "required": false; "isSignal": true; }; "interactiveBorder": { "alias": "tpInteractiveBorder"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "tpMaxWidth"; "required": false; "isSignal": true; }; "offset": { "alias": "tpOffset"; "required": false; "isSignal": true; }; "placement": { "alias": "tpPlacement"; "required": false; "isSignal": true; }; "popperOptions": { "alias": "tpPopperOptions"; "required": false; "isSignal": true; }; "showOnCreate": { "alias": "tpShowOnCreate"; "required": false; "isSignal": true; }; "trigger": { "alias": "tpTrigger"; "required": false; "isSignal": true; }; "triggerTarget": { "alias": "tpTriggerTarget"; "required": false; "isSignal": true; }; "zIndex": { "alias": "tpZIndex"; "required": false; "isSignal": true; }; "animation": { "alias": "tpAnimation"; "required": false; "isSignal": true; }; "useTextContent": { "alias": "tpUseTextContent"; "required": false; "isSignal": true; }; "isLazy": { "alias": "tpIsLazy"; "required": false; "isSignal": true; }; "variation": { "alias": "tpVariation"; "required": false; "isSignal": true; }; "isEnabled": { "alias": "tpIsEnabled"; "required": false; "isSignal": true; }; "className": { "alias": "tpClassName"; "required": false; "isSignal": true; }; "onlyTextOverflow": { "alias": "tpOnlyTextOverflow"; "required": false; "isSignal": true; }; "staticWidthHost": { "alias": "tpStaticWidthHost"; "required": false; "isSignal": true; }; "data": { "alias": "tpData"; "required": false; "isSignal": true; }; "bindings": { "alias": "tpBindings"; "required": false; "isSignal": true; }; "directives": { "alias": "tpDirectives"; "required": false; "isSignal": true; }; "useHostWidth": { "alias": "tpUseHostWidth"; "required": false; "isSignal": true; }; "hideOnEscape": { "alias": "tpHideOnEscape"; "required": false; "isSignal": true; }; "tippyProps": { "alias": "tpTippyProps"; "required": false; "isSignal": true; }; "popperWidth": { "alias": "tpPopperWidth"; "required": false; "isSignal": true; }; "customHost": { "alias": "tpHost"; "required": false; "isSignal": true; }; "isVisible": { "alias": "tpIsVisible"; "required": false; "isSignal": true; }; }, { "tpOnShow": "tpOnShow"; "tpOnHide": "tpOnHide"; "isVisible": "tpIsVisibleChange"; "visible": "tpVisible"; }, never, never, true, never>;
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
declare class TippyService {
|
|
118
|
+
private readonly _ngZone;
|
|
110
119
|
private readonly _injector;
|
|
111
120
|
private readonly _globalConfig;
|
|
112
121
|
private readonly _viewService;
|