@ngneat/helipopper 11.1.4 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config/index.d.ts CHANGED
@@ -1,5 +1,44 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@ngneat/helipopper/config" />
5
- export * from './public-api';
1
+ import tippy, { Props, Instance } from 'tippy.js';
2
+ import * as _angular_core from '@angular/core';
3
+ import { ElementRef, InjectionToken, Provider } from '@angular/core';
4
+ import { ViewOptions, ResolveViewRef } from '@ngneat/overview';
5
+
6
+ interface CreateOptions extends Partial<TippyProps>, ViewOptions {
7
+ variation: string;
8
+ preserveView: boolean;
9
+ className: string | string[];
10
+ data: any;
11
+ }
12
+ interface TippyInstance extends Instance {
13
+ data?: any;
14
+ }
15
+ type TippyProps = Props;
16
+ interface ExtendedTippyProps extends TippyProps {
17
+ variations: Record<string, Partial<TippyProps>>;
18
+ defaultVariation: keyof ExtendedTippyProps['variations'];
19
+ beforeRender?: (text: string) => string;
20
+ zIndexGetter?(): number;
21
+ }
22
+ type TippyElement = ElementRef | Element;
23
+ interface ExtendedTippyInstance<T> extends TippyInstance {
24
+ view: ResolveViewRef<T> | null;
25
+ $viewOptions: ViewOptions;
26
+ context?: ViewOptions['context'];
27
+ }
28
+ type TippyConfig = Partial<ExtendedTippyProps>;
29
+ type TippyLoader = () => typeof tippy | Promise<{
30
+ default: typeof tippy;
31
+ }>;
32
+ declare const TIPPY_LOADER: InjectionToken<TippyLoader>;
33
+ declare const TIPPY_CONFIG: InjectionToken<Partial<ExtendedTippyProps>>;
34
+
35
+ type Variation = Partial<TippyProps>;
36
+ declare const tooltipVariation: Variation;
37
+ declare const popperVariation: Variation;
38
+ declare function withContextMenuVariation(baseVariation: Variation): Variation;
39
+
40
+ declare function provideTippyLoader(loader: TippyLoader): _angular_core.EnvironmentProviders;
41
+ declare function provideTippyConfig(config: TippyConfig): Provider;
42
+
43
+ export { TIPPY_CONFIG, TIPPY_LOADER, popperVariation, provideTippyConfig, provideTippyLoader, tooltipVariation, withContextMenuVariation };
44
+ export type { CreateOptions, ExtendedTippyInstance, ExtendedTippyProps, TippyConfig, TippyElement, TippyInstance, TippyLoader, TippyProps };
@@ -1,4 +1,4 @@
1
- import { InjectionToken, isDevMode, makeEnvironmentProviders } from '@angular/core';
1
+ import { InjectionToken, makeEnvironmentProviders } from '@angular/core';
2
2
 
3
3
  const tooltipVariation = {
4
4
  theme: undefined,
@@ -25,8 +25,8 @@ function withContextMenuVariation(baseVariation) {
25
25
  };
26
26
  }
27
27
 
28
- const TIPPY_LOADER = new InjectionToken(isDevMode() ? 'TIPPY_LOADER' : '');
29
- const TIPPY_CONFIG = new InjectionToken(isDevMode() ? 'TIPPY_CONFIG' : '');
28
+ const TIPPY_LOADER = new InjectionToken(ngDevMode ? 'TIPPY_LOADER' : '');
29
+ const TIPPY_CONFIG = new InjectionToken(ngDevMode ? 'TIPPY_CONFIG' : '');
30
30
 
31
31
  function provideTippyLoader(loader) {
32
32
  return makeEnvironmentProviders([{ provide: TIPPY_LOADER, useValue: loader }]);
@@ -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',\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): Variation {\n return {\n ...baseVariation,\n placement: 'right-start',\n trigger: 'manual',\n arrow: false,\n offset: [0, 0],\n };\n}\n","import type tippy from 'tippy.js';\nimport type { Instance, Props } from 'tippy.js';\nimport { ElementRef, InjectionToken, isDevMode } from '@angular/core';\nimport type { 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\nexport interface ExtendedTippyProps extends TippyProps {\n variations: Record<string, Partial<TippyProps>>;\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 TippyLoader = () => typeof tippy | Promise<{ default: typeof tippy }>;\n\nexport const TIPPY_LOADER = new InjectionToken<TippyLoader>(\n isDevMode() ? 'TIPPY_LOADER' : ''\n);\n\nexport const TIPPY_CONFIG = new InjectionToken<TippyConfig>(\n isDevMode() ? 'TIPPY_CONFIG' : ''\n);\n","import { makeEnvironmentProviders, type Provider } from '@angular/core';\n\nimport {\n TIPPY_CONFIG,\n TIPPY_LOADER,\n type TippyLoader,\n type TippyConfig,\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 {\n return { provide: TIPPY_CONFIG, useValue: config };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAKa,MAAA,gBAAgB,GAAc;AACzC,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;;AAGH,MAAA,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;KACf;AACH;;ACOa,MAAA,YAAY,GAAG,IAAI,cAAc,CAC5C,SAAS,EAAE,GAAG,cAAc,GAAG,EAAE;AAGtB,MAAA,YAAY,GAAG,IAAI,cAAc,CAC5C,SAAS,EAAE,GAAG,cAAc,GAAG,EAAE;;ACjC7B,SAAU,kBAAkB,CAAC,MAAmB,EAAA;AACpD,IAAA,OAAO,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AAChF;AAEM,SAAU,kBAAkB,CAAC,MAAmB,EAAA;IACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;AACpD;;ACfA;;AAEG;;;;"}
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',\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): Variation {\n return {\n ...baseVariation,\n placement: 'right-start',\n trigger: 'manual',\n arrow: false,\n offset: [0, 0],\n };\n}\n","import type tippy from 'tippy.js';\nimport type { Instance, Props } from 'tippy.js';\nimport { ElementRef, InjectionToken } from '@angular/core';\nimport type { 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\nexport interface ExtendedTippyProps extends TippyProps {\n variations: Record<string, Partial<TippyProps>>;\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 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","import { makeEnvironmentProviders, type Provider } from '@angular/core';\n\nimport {\n TIPPY_CONFIG,\n TIPPY_LOADER,\n type TippyLoader,\n type TippyConfig,\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 {\n return { provide: TIPPY_CONFIG, useValue: config };\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,YAAY;AACrB,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;KACf;AACH;;ACOO,MAAM,YAAY,GAAG,IAAI,cAAc,CAC5C,SAAS,GAAG,cAAc,GAAG,EAAE;AAG1B,MAAM,YAAY,GAAG,IAAI,cAAc,CAC5C,SAAS,GAAG,cAAc,GAAG,EAAE;;ACjC3B,SAAU,kBAAkB,CAAC,MAAmB,EAAA;AACpD,IAAA,OAAO,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AAChF;AAEM,SAAU,kBAAkB,CAAC,MAAmB,EAAA;IACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;AACpD;;ACfA;;AAEG;;;;"}
@@ -1,10 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ElementRef, inject, NgZone, ɵisPromise as _isPromise, Injectable, booleanAttribute, InjectionToken, isDevMode, input, output, model, computed, DestroyRef, PLATFORM_ID, Injector, ViewContainerRef, effect, untracked, Directive, Inject } from '@angular/core';
2
+ import { ElementRef, inject, NgZone, ɵisPromise as _isPromise, Injectable, booleanAttribute, InjectionToken, input, output, model, computed, DestroyRef, PLATFORM_ID, Injector, ViewContainerRef, effect, untracked, Directive } from '@angular/core';
3
3
  import { isPlatformServer } from '@angular/common';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { Observable, defer, of, tap, map as map$1, Subject, merge } from 'rxjs';
6
6
  import { auditTime, map, switchMap, takeUntil } from 'rxjs/operators';
7
- import * as i1 from '@ngneat/overview';
8
7
  import { ViewService, isString, isComponent, isTemplateRef } from '@ngneat/overview';
9
8
  import { TIPPY_LOADER, TIPPY_CONFIG } from '@ngneat/helipopper/config';
10
9
 
@@ -71,6 +70,9 @@ function dimensionsChanges(target) {
71
70
  }
72
71
  function onlyTippyProps(allProps) {
73
72
  const tippyProps = {};
73
+ if (!allProps) {
74
+ return tippyProps;
75
+ }
74
76
  const ownProps = [
75
77
  'useTextContent',
76
78
  'variations',
@@ -179,10 +181,10 @@ class TippyFactory {
179
181
  return this._ngZone.runOutsideAngular(() => tippy(target, props));
180
182
  }));
181
183
  }
182
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
183
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyFactory, providedIn: 'root' }); }
184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
185
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyFactory, providedIn: 'root' }); }
184
186
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyFactory, decorators: [{
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyFactory, decorators: [{
186
188
  type: Injectable,
187
189
  args: [{ providedIn: 'root' }]
188
190
  }] });
@@ -195,11 +197,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
195
197
  */
196
198
  const coerceBooleanAttribute = booleanAttribute;
197
199
 
198
- const TIPPY_REF = /* @__PURE__ */ new InjectionToken(isDevMode() ? 'TIPPY_REF' : '');
200
+ const TIPPY_REF = /* @__PURE__ */ new InjectionToken(ngDevMode ? 'TIPPY_REF' : '');
199
201
  function injectTippyRef() {
200
202
  const instance = inject(TIPPY_REF, { optional: true });
201
203
  if (!instance) {
202
- if (isDevMode()) {
204
+ if (ngDevMode) {
203
205
  throw new Error('tp is not provided in the current context or on one of its ancestors');
204
206
  }
205
207
  else {
@@ -231,89 +233,95 @@ class TippyDirective {
231
233
  return this.host().getBoundingClientRect().width;
232
234
  }
233
235
  constructor() {
234
- this.appendTo = input(defaultAppendTo, {
235
- alias: 'tpAppendTo',
236
- });
237
- this.content = input('', { alias: 'tp' });
238
- this.delay = input(defaultDelay, {
239
- alias: 'tpDelay',
240
- });
241
- this.duration = input(defaultDuration, {
242
- alias: 'tpDuration',
243
- });
244
- this.hideOnClick = input(true, {
245
- alias: 'tpHideOnClick',
246
- });
247
- this.interactive = input(false, {
248
- alias: 'tpInteractive',
249
- });
250
- this.interactiveBorder = input(defaultInteractiveBorder, {
251
- alias: 'tpInteractiveBorder',
252
- });
253
- this.maxWidth = input(defaultMaxWidth, {
254
- alias: 'tpMaxWidth',
255
- });
236
+ this.appendTo = input(defaultAppendTo, ...(ngDevMode ? [{ debugName: "appendTo", alias: 'tpAppendTo' }] : [{
237
+ alias: 'tpAppendTo',
238
+ }]));
239
+ this.content = input('', ...(ngDevMode ? [{ debugName: "content", alias: 'tp' }] : [{ alias: 'tp' }]));
240
+ this.delay = input(defaultDelay, ...(ngDevMode ? [{ debugName: "delay", alias: 'tpDelay' }] : [{
241
+ alias: 'tpDelay',
242
+ }]));
243
+ this.duration = input(defaultDuration, ...(ngDevMode ? [{ debugName: "duration", alias: 'tpDuration' }] : [{
244
+ alias: 'tpDuration',
245
+ }]));
246
+ this.hideOnClick = input(true, ...(ngDevMode ? [{ debugName: "hideOnClick", alias: 'tpHideOnClick' }] : [{
247
+ alias: 'tpHideOnClick',
248
+ }]));
249
+ this.interactive = input(false, ...(ngDevMode ? [{ debugName: "interactive", alias: 'tpInteractive' }] : [{
250
+ alias: 'tpInteractive',
251
+ }]));
252
+ this.interactiveBorder = input(defaultInteractiveBorder, ...(ngDevMode ? [{ debugName: "interactiveBorder", alias: 'tpInteractiveBorder' }] : [{
253
+ alias: 'tpInteractiveBorder',
254
+ }]));
255
+ this.maxWidth = input(defaultMaxWidth, ...(ngDevMode ? [{ debugName: "maxWidth", alias: 'tpMaxWidth' }] : [{
256
+ alias: 'tpMaxWidth',
257
+ }]));
256
258
  // Note that some of the input signal types are declared explicitly because the compiler
257
259
  // also uses types from `@popperjs/core` and requires a type annotation.
258
- this.offset = input(defaultOffset, {
259
- alias: 'tpOffset',
260
- });
261
- this.placement = input(defaultPlacement, {
262
- alias: 'tpPlacement',
263
- });
264
- this.popperOptions = input({}, {
265
- alias: 'tpPopperOptions',
266
- });
267
- this.showOnCreate = input(false, {
268
- alias: 'tpShowOnCreate',
269
- });
270
- this.trigger = input(defaultTrigger, {
271
- alias: 'tpTrigger',
272
- });
273
- this.triggerTarget = input(defaultTriggerTarget, {
274
- alias: 'tpTriggerTarget',
275
- });
276
- this.zIndex = input(defaultZIndex, {
277
- alias: 'tpZIndex',
278
- });
279
- this.animation = input(defaultAnimation, {
280
- alias: 'tpAnimation',
281
- });
282
- this.useTextContent = input(false, {
283
- transform: coerceBooleanAttribute,
284
- alias: 'tpUseTextContent',
285
- });
286
- this.isLazy = input(false, {
287
- transform: coerceBooleanAttribute,
288
- alias: 'tpIsLazy',
289
- });
290
- this.variation = input(undefined, { alias: 'tpVariation' });
291
- this.isEnabled = input(true, { alias: 'tpIsEnabled' });
292
- this.className = input('', { alias: 'tpClassName' });
293
- this.onlyTextOverflow = input(false, {
294
- transform: coerceBooleanAttribute,
295
- alias: 'tpOnlyTextOverflow',
296
- });
297
- this.staticWidthHost = input(false, {
298
- transform: coerceBooleanAttribute,
299
- alias: 'tpStaticWidthHost',
300
- });
301
- this.data = input(undefined, { alias: 'tpData' });
302
- this.useHostWidth = input(false, {
303
- transform: coerceBooleanAttribute,
304
- alias: 'tpUseHostWidth',
305
- });
306
- this.hideOnEscape = input(false, {
307
- transform: coerceBooleanAttribute,
308
- alias: 'tpHideOnEscape',
309
- });
310
- this.popperWidth = input(undefined, {
311
- alias: 'tpPopperWidth',
312
- });
313
- this.customHost = input(undefined, { alias: 'tpHost' });
260
+ this.offset = input(defaultOffset, ...(ngDevMode ? [{ debugName: "offset", alias: 'tpOffset' }] : [{
261
+ alias: 'tpOffset',
262
+ }]));
263
+ this.placement = input(defaultPlacement, ...(ngDevMode ? [{ debugName: "placement", alias: 'tpPlacement' }] : [{
264
+ alias: 'tpPlacement',
265
+ }]));
266
+ this.popperOptions = input({}, ...(ngDevMode ? [{ debugName: "popperOptions", alias: 'tpPopperOptions' }] : [{
267
+ alias: 'tpPopperOptions',
268
+ }]));
269
+ this.showOnCreate = input(false, ...(ngDevMode ? [{ debugName: "showOnCreate", alias: 'tpShowOnCreate' }] : [{
270
+ alias: 'tpShowOnCreate',
271
+ }]));
272
+ this.trigger = input(defaultTrigger, ...(ngDevMode ? [{ debugName: "trigger", alias: 'tpTrigger' }] : [{
273
+ alias: 'tpTrigger',
274
+ }]));
275
+ this.triggerTarget = input(defaultTriggerTarget, ...(ngDevMode ? [{ debugName: "triggerTarget", alias: 'tpTriggerTarget' }] : [{
276
+ alias: 'tpTriggerTarget',
277
+ }]));
278
+ this.zIndex = input(defaultZIndex, ...(ngDevMode ? [{ debugName: "zIndex", alias: 'tpZIndex' }] : [{
279
+ alias: 'tpZIndex',
280
+ }]));
281
+ this.animation = input(defaultAnimation, ...(ngDevMode ? [{ debugName: "animation", alias: 'tpAnimation' }] : [{
282
+ alias: 'tpAnimation',
283
+ }]));
284
+ this.useTextContent = input(false, ...(ngDevMode ? [{ debugName: "useTextContent", transform: coerceBooleanAttribute,
285
+ alias: 'tpUseTextContent' }] : [{
286
+ transform: coerceBooleanAttribute,
287
+ alias: 'tpUseTextContent',
288
+ }]));
289
+ this.isLazy = input(false, ...(ngDevMode ? [{ debugName: "isLazy", transform: coerceBooleanAttribute,
290
+ alias: 'tpIsLazy' }] : [{
291
+ transform: coerceBooleanAttribute,
292
+ alias: 'tpIsLazy',
293
+ }]));
294
+ this.variation = input(undefined, ...(ngDevMode ? [{ debugName: "variation", alias: 'tpVariation' }] : [{ alias: 'tpVariation' }]));
295
+ this.isEnabled = input(true, ...(ngDevMode ? [{ debugName: "isEnabled", alias: 'tpIsEnabled' }] : [{ alias: 'tpIsEnabled' }]));
296
+ this.className = input('', ...(ngDevMode ? [{ debugName: "className", alias: 'tpClassName' }] : [{ alias: 'tpClassName' }]));
297
+ this.onlyTextOverflow = input(false, ...(ngDevMode ? [{ debugName: "onlyTextOverflow", transform: coerceBooleanAttribute,
298
+ alias: 'tpOnlyTextOverflow' }] : [{
299
+ transform: coerceBooleanAttribute,
300
+ alias: 'tpOnlyTextOverflow',
301
+ }]));
302
+ this.staticWidthHost = input(false, ...(ngDevMode ? [{ debugName: "staticWidthHost", transform: coerceBooleanAttribute,
303
+ alias: 'tpStaticWidthHost' }] : [{
304
+ transform: coerceBooleanAttribute,
305
+ alias: 'tpStaticWidthHost',
306
+ }]));
307
+ this.data = input(undefined, ...(ngDevMode ? [{ debugName: "data", alias: 'tpData' }] : [{ alias: 'tpData' }]));
308
+ this.useHostWidth = input(false, ...(ngDevMode ? [{ debugName: "useHostWidth", transform: coerceBooleanAttribute,
309
+ alias: 'tpUseHostWidth' }] : [{
310
+ transform: coerceBooleanAttribute,
311
+ alias: 'tpUseHostWidth',
312
+ }]));
313
+ this.hideOnEscape = input(false, ...(ngDevMode ? [{ debugName: "hideOnEscape", transform: coerceBooleanAttribute,
314
+ alias: 'tpHideOnEscape' }] : [{
315
+ transform: coerceBooleanAttribute,
316
+ alias: 'tpHideOnEscape',
317
+ }]));
318
+ this.popperWidth = input(undefined, ...(ngDevMode ? [{ debugName: "popperWidth", alias: 'tpPopperWidth' }] : [{
319
+ alias: 'tpPopperWidth',
320
+ }]));
321
+ this.customHost = input(undefined, ...(ngDevMode ? [{ debugName: "customHost", alias: 'tpHost' }] : [{ alias: 'tpHost' }]));
314
322
  this.onShow = output({ alias: 'tpOnShow' });
315
323
  this.onHide = output({ alias: 'tpOnHide' });
316
- this.isVisible = model(false, { alias: 'tpIsVisible' });
324
+ this.isVisible = model(false, ...(ngDevMode ? [{ debugName: "isVisible", alias: 'tpIsVisible' }] : [{ alias: 'tpIsVisible' }]));
317
325
  this.visible = output({ alias: 'tpVisible' });
318
326
  this.viewRef = null;
319
327
  this.variationDefined = false;
@@ -328,7 +336,7 @@ class TippyDirective {
328
336
  this.visibleInternal = new Subject();
329
337
  this.visibilityObserverCleanup = null;
330
338
  this.contentChanged = new Subject();
331
- this.host = computed(() => this.customHost() || this.hostRef.nativeElement);
339
+ this.host = computed(() => this.customHost() || this.hostRef.nativeElement, ...(ngDevMode ? [{ debugName: "host" }] : []));
332
340
  this.destroyRef = inject(DestroyRef);
333
341
  this.isServer =
334
342
  // Drop `isPlatformServer` once `ngServeMode` is available during compilation.
@@ -708,10 +716,10 @@ class TippyDirective {
708
716
  }
709
717
  });
710
718
  }
711
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
712
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0", 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 }, 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: { onShow: "tpOnShow", onHide: "tpOnHide", isVisible: "tpIsVisibleChange", visible: "tpVisible" }, exportAs: ["tippy"], usesOnChanges: true, ngImport: i0 }); }
719
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
720
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", 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 }, 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: { onShow: "tpOnShow", onHide: "tpOnHide", isVisible: "tpIsVisibleChange", visible: "tpVisible" }, exportAs: ["tippy"], usesOnChanges: true, ngImport: i0 }); }
713
721
  }
714
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyDirective, decorators: [{
722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyDirective, decorators: [{
715
723
  type: Directive,
716
724
  args: [{
717
725
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -722,14 +730,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
722
730
  }], ctorParameters: () => [] });
723
731
 
724
732
  class TippyService {
725
- constructor(globalConfig, view, injector) {
726
- this.globalConfig = globalConfig;
727
- this.view = view;
728
- this.injector = injector;
733
+ constructor() {
734
+ this._injector = inject(Injector);
735
+ this._globalConfig = inject(TIPPY_CONFIG, { optional: true });
736
+ this._viewService = inject(ViewService);
729
737
  this._tippyFactory = inject(TippyFactory);
730
738
  }
731
739
  create(host, content, options = {}) {
732
- const variation = options.variation || this.globalConfig.defaultVariation || '';
740
+ const variation = options.variation || this._globalConfig?.defaultVariation || '';
733
741
  const config = {
734
742
  onShow: (instance) => {
735
743
  host.setAttribute('data-tippy-open', '');
@@ -742,7 +750,7 @@ class TippyService {
742
750
  useValue: instance,
743
751
  },
744
752
  ],
745
- parent: options.injector || this.injector,
753
+ parent: options.injector || this._injector,
746
754
  }),
747
755
  };
748
756
  if (isTemplateRef(content)) {
@@ -756,7 +764,7 @@ class TippyService {
756
764
  instance.data = options.data;
757
765
  }
758
766
  }
759
- instance.view ||= this.view.createView(content, {
767
+ instance.view ||= this._viewService.createView(content, {
760
768
  ...options,
761
769
  ...instance.$viewOptions,
762
770
  });
@@ -771,8 +779,8 @@ class TippyService {
771
779
  }
772
780
  options?.onHidden?.(instance);
773
781
  },
774
- ...onlyTippyProps(this.globalConfig),
775
- ...this.globalConfig.variations?.[variation],
782
+ ...onlyTippyProps(this._globalConfig),
783
+ ...this._globalConfig?.variations?.[variation],
776
784
  ...onlyTippyProps(options),
777
785
  onCreate: (instance) => {
778
786
  instance.popper.classList.add(`tippy-variation-${variation}`);
@@ -781,22 +789,19 @@ class TippyService {
781
789
  instance.popper.classList.add(klass);
782
790
  }
783
791
  }
784
- this.globalConfig.onCreate?.(instance);
792
+ this._globalConfig?.onCreate?.(instance);
785
793
  options.onCreate?.(instance);
786
794
  },
787
795
  };
788
796
  return this._tippyFactory.create(host, config);
789
797
  }
790
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyService, deps: [{ token: TIPPY_CONFIG }, { token: i1.ViewService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
791
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyService, providedIn: 'root' }); }
798
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
799
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyService, providedIn: 'root' }); }
792
800
  }
793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TippyService, decorators: [{
801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TippyService, decorators: [{
794
802
  type: Injectable,
795
803
  args: [{ providedIn: 'root' }]
796
- }], ctorParameters: () => [{ type: undefined, decorators: [{
797
- type: Inject,
798
- args: [TIPPY_CONFIG]
799
- }] }, { type: i1.ViewService }, { type: i0.Injector }] });
804
+ }] });
800
805
 
801
806
  /**
802
807
  * 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/coercion.ts","../../../../projects/ngneat/helipopper/src/lib/inject-tippy.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.directive.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.service.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\ndeclare const ResizeObserver: any;\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((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` multiple times since it triggers layout updates.\n const hostOffsetWidth = host.offsetWidth;\n\n return (\n hostOffsetWidth > host.parentElement!.offsetWidth ||\n hostOffsetWidth < host.scrollWidth\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<boolean>((subscriber) => {\n if (!supportsResizeObserver) {\n subscriber.next();\n subscriber.complete();\n return;\n }\n\n const observer = new ResizeObserver(() => subscriber.next(true));\n observer.observe(target);\n return () => observer.disconnect();\n });\n}\n\nexport function onlyTippyProps(allProps: any) {\n const tippyProps: any = {};\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 ];\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 { 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 { inject, InjectionToken, isDevMode } 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 isDevMode() ? 'TIPPY_REF' : ''\n);\n\nexport function injectTippyRef(): TippyInstance {\n const instance = inject(TIPPY_REF, { optional: true });\n\n if (!instance) {\n if (isDevMode()) {\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 {\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 OnInit,\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 { coerceBooleanAttribute } from './coercion';\nimport { TIPPY_REF } from './inject-tippy';\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// Available since Angular 20.\ndeclare const ngServerMode: boolean;\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tp]',\n exportAs: 'tippy',\n standalone: true,\n})\nexport class TippyDirective implements OnChanges, AfterViewInit, OnInit {\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 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 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 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 const variation = this.variation() || this.globalConfig.defaultVariation || '';\n const props = Object.keys(changes)\n // `isVisible` is not required as a prop since we update it manually\n // in an effect-like manner.\n .filter((key) => key !== 'isVisible')\n .reduce(\n (accumulator, key) => ({ ...accumulator, [key]: changes[key].currentValue }),\n { ...this.globalConfig.variations?.[variation] }\n );\n\n this.updateProps(props);\n }\n\n ngOnInit() {\n if (this.useHostWidth()) {\n this.props.maxWidth = this.hostWidth;\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 allowHTML: true,\n appendTo: () => document.fullscreenElement || document.body,\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 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 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 };\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 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.isEnabled()));\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","import { inject, Inject, Injectable, Injector } 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 TippyConfig,\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 _tippyFactory = inject(TippyFactory);\n\n constructor(\n @Inject(TIPPY_CONFIG) private globalConfig: TippyConfig,\n private view: ViewService,\n private injector: Injector\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.view.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","/**\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;;ACAjC,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,GAAG,gBAAgB,IAAI,MAAM;AACrD;AAMgB,SAAA,MAAM,CACpB,IAAkB,EAClB,OAAoC,GAAA;AAClC,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,GAAG;AACf,CAAA,EAAA;AAED,IAAA,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC;AAEnC,IAAA,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,KAAI;QACnC,IAAI,CAAC,4BAA4B,EAAE;YACjC,UAAU,CAAC,IAAI,EAAE;YACjB,UAAU,CAAC,QAAQ,EAAE;YACrB;;QAGF,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,KAAI;;YAEpD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AACzC,YAAA,IAAI,KAAK,CAAC,cAAc,EAAE;gBACxB,UAAU,CAA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A,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAK7B,MAAM;2BAAC,YAAY;;;AC3BxB;;AAEG;;;;"}
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/coercion.ts","../../../../projects/ngneat/helipopper/src/lib/inject-tippy.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.directive.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.service.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((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` multiple times since it triggers layout updates.\n const hostOffsetWidth = host.offsetWidth;\n\n return (\n hostOffsetWidth > host.parentElement!.offsetWidth ||\n hostOffsetWidth < host.scrollWidth\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<boolean>((subscriber) => {\n if (!supportsResizeObserver) {\n subscriber.next();\n subscriber.complete();\n return;\n }\n\n const observer = new ResizeObserver(() => subscriber.next(true));\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 ];\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 { 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 { inject, InjectionToken, isDevMode } 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 {\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 OnInit,\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 { coerceBooleanAttribute } from './coercion';\nimport { TIPPY_REF } from './inject-tippy';\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 standalone: true,\n})\nexport class TippyDirective implements OnChanges, AfterViewInit, OnInit {\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 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 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 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 const variation = this.variation() || this.globalConfig.defaultVariation || '';\n const props = Object.keys(changes)\n // `isVisible` is not required as a prop since we update it manually\n // in an effect-like manner.\n .filter((key) => key !== 'isVisible')\n .reduce(\n (accumulator, key) => ({ ...accumulator, [key]: changes[key].currentValue }),\n { ...this.globalConfig.variations?.[variation] },\n );\n\n this.updateProps(props);\n }\n\n ngOnInit() {\n if (this.useHostWidth()) {\n this.props.maxWidth = this.hostWidth;\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 allowHTML: true,\n appendTo: () => document.fullscreenElement || document.body,\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 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 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 };\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 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.isEnabled()));\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","import { inject, Injectable, Injector } 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 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","/**\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,GA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import * as rxjs from 'rxjs';
2
+ import { Subject, Observable } from 'rxjs';
3
+ import * as _ngneat_helipopper_config from '@ngneat/helipopper/config';
4
+ import { TippyProps, TippyInstance, TippyConfig, CreateOptions, ExtendedTippyInstance, TippyElement } from '@ngneat/helipopper/config';
5
+ import * as _angular_core from '@angular/core';
6
+ import { OnChanges, AfterViewInit, OnInit, InputSignal, Injector, ViewContainerRef, NgZone, ElementRef, SimpleChanges, InjectionToken } from '@angular/core';
7
+ import { Instance } from 'tippy.js';
8
+ import { Content, ViewRef, ViewOptions, ViewService } from '@ngneat/overview';
9
+
10
+ declare class TippyDirective implements OnChanges, AfterViewInit, OnInit {
11
+ readonly appendTo: InputSignal<"parent" | Element | ((ref: Element) => Element)>;
12
+ readonly content: InputSignal<Content | null | undefined>;
13
+ readonly delay: InputSignal<number | [number | null, number | null]>;
14
+ readonly duration: InputSignal<number | [number | null, number | null]>;
15
+ readonly hideOnClick: InputSignal<boolean>;
16
+ readonly interactive: InputSignal<boolean>;
17
+ readonly interactiveBorder: InputSignal<number>;
18
+ readonly maxWidth: InputSignal<string | number>;
19
+ readonly offset: InputSignal<TippyProps['offset']>;
20
+ readonly placement: InputSignal<TippyProps['placement']>;
21
+ readonly popperOptions: InputSignal<TippyProps['popperOptions']>;
22
+ readonly showOnCreate: InputSignal<boolean>;
23
+ readonly trigger: InputSignal<string>;
24
+ readonly triggerTarget: InputSignal<Element | Element[] | null>;
25
+ readonly zIndex: InputSignal<number>;
26
+ readonly animation: InputSignal<string | boolean>;
27
+ readonly useTextContent: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
28
+ readonly isLazy: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
29
+ readonly variation: InputSignal<string | undefined>;
30
+ readonly isEnabled: InputSignal<boolean>;
31
+ readonly className: InputSignal<string | string[]>;
32
+ readonly onlyTextOverflow: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
33
+ readonly staticWidthHost: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
34
+ readonly data: InputSignal<any>;
35
+ readonly useHostWidth: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
36
+ readonly hideOnEscape: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
37
+ readonly popperWidth: InputSignal<string | number | undefined>;
38
+ readonly customHost: InputSignal<HTMLElement | undefined>;
39
+ readonly onShow: _angular_core.OutputEmitterRef<void>;
40
+ readonly onHide: _angular_core.OutputEmitterRef<void>;
41
+ readonly isVisible: _angular_core.ModelSignal<boolean>;
42
+ visible: _angular_core.OutputEmitterRef<boolean>;
43
+ protected instance: TippyInstance;
44
+ protected viewRef: ViewRef | null;
45
+ protected props: Partial<TippyConfig>;
46
+ protected variationDefined: boolean;
47
+ protected viewOptions$: ViewOptions | null;
48
+ /**
49
+ * We had use `visible` event emitter previously as a `takeUntil` subscriber in multiple places
50
+ * within the directive.
51
+ * This is for internal use only; thus we don't have to deal with the `visible` event emitter
52
+ * and trigger change detections only when the `visible` event is being listened outside
53
+ * in the template (`<button [tippy]="..." (visible)="..."></button>`).
54
+ */
55
+ protected visibleInternal: Subject<boolean>;
56
+ private visibilityObserverCleanup;
57
+ private contentChanged;
58
+ private host;
59
+ private get hostWidth();
60
+ private destroyRef;
61
+ private isServer;
62
+ private tippyFactory;
63
+ private destroyed;
64
+ private created;
65
+ protected globalConfig: Partial<_ngneat_helipopper_config.ExtendedTippyProps>;
66
+ protected injector: Injector;
67
+ protected viewService: ViewService;
68
+ protected vcr: ViewContainerRef;
69
+ protected ngZone: NgZone;
70
+ protected hostRef: ElementRef<any>;
71
+ constructor();
72
+ ngOnChanges(changes: SimpleChanges): void;
73
+ ngOnInit(): void;
74
+ ngAfterViewInit(): void;
75
+ destroyView(): void;
76
+ /**
77
+ * This method is useful when you append to an element that you might remove from the DOM.
78
+ * In such cases we want to hide the tooltip and let it go through the destroy lifecycle.
79
+ * For example, if you have a grid row with an element that you toggle using the display CSS property on hover.
80
+ */
81
+ observeHostVisibility(): rxjs.Subscription | undefined;
82
+ show(): void;
83
+ hide(): void;
84
+ enable(): void;
85
+ disable(): void;
86
+ protected updateProps(props: Partial<TippyConfig>): void;
87
+ protected setProps(props: Partial<TippyConfig>): void;
88
+ protected setStatus(isEnabled: boolean): void;
89
+ protected hasContent(): boolean;
90
+ protected createInstance(): void;
91
+ protected resolveContent(instance: TippyInstance): string | Element;
92
+ protected handleContextMenu(): void;
93
+ protected handleEscapeButton(): void;
94
+ protected checkOverflow(isElementOverflow: boolean): void;
95
+ protected listenToHostResize(): void;
96
+ protected setInstanceWidth(instance: Instance, width: string | number): void;
97
+ private onHidden;
98
+ private isOverflowing$;
99
+ private setupListeners;
100
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TippyDirective, never>;
101
+ 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; }; "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; }; }, { "onShow": "tpOnShow"; "onHide": "tpOnHide"; "isVisible": "tpIsVisibleChange"; "visible": "tpVisible"; }, never, never, true, never>;
102
+ }
103
+
104
+ declare class TippyService {
105
+ private readonly _injector;
106
+ private readonly _globalConfig;
107
+ private readonly _viewService;
108
+ private readonly _tippyFactory;
109
+ create<T extends Content>(host: HTMLElement, content: T, options?: Partial<CreateOptions>): Observable<ExtendedTippyInstance<T>>;
110
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TippyService, never>;
111
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TippyService>;
112
+ }
113
+
114
+ declare function inView(host: TippyElement, options?: IntersectionObserverInit): Observable<unknown>;
115
+ declare function overflowChanges(host: TippyElement): Observable<boolean>;
116
+
117
+ declare const TIPPY_REF: InjectionToken<TippyInstance>;
118
+ declare function injectTippyRef(): TippyInstance;
119
+
120
+ export { TIPPY_REF, TippyDirective, TippyService, inView, injectTippyRef, overflowChanges };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngneat/helipopper",
3
- "version": "11.1.4",
3
+ "version": "12.0.0",
4
4
  "description": "A Powerful Tooltip and Popover for Angular Applications",
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0",
@@ -8,7 +8,7 @@
8
8
  "tippy.js": "6.3.7"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/core": ">=17.0.0"
11
+ "@angular/core": ">=20.0.0"
12
12
  },
13
13
  "keywords": [
14
14
  "angular",
@@ -1,6 +0,0 @@
1
- import type { TippyProps } from './tippy.types';
2
- type Variation = Partial<TippyProps>;
3
- export declare const tooltipVariation: Variation;
4
- export declare const popperVariation: Variation;
5
- export declare function withContextMenuVariation(baseVariation: Variation): Variation;
6
- export {};
@@ -1,4 +0,0 @@
1
- import { type Provider } from '@angular/core';
2
- import { type TippyLoader, type TippyConfig } from './tippy.types';
3
- export declare function provideTippyLoader(loader: TippyLoader): import("@angular/core").EnvironmentProviders;
4
- export declare function provideTippyConfig(config: TippyConfig): Provider;
@@ -1,3 +0,0 @@
1
- export { tooltipVariation, popperVariation, withContextMenuVariation } from './defaults';
2
- export { CreateOptions, TippyInstance, TippyProps, ExtendedTippyProps, TippyElement, ExtendedTippyInstance, TippyConfig, TippyLoader, TIPPY_LOADER, TIPPY_CONFIG, } from './tippy.types';
3
- export { provideTippyLoader, provideTippyConfig } from './providers';
@@ -1,32 +0,0 @@
1
- import type tippy from 'tippy.js';
2
- import type { Instance, Props } from 'tippy.js';
3
- import { ElementRef, InjectionToken } from '@angular/core';
4
- import type { ResolveViewRef, ViewOptions } from '@ngneat/overview';
5
- export interface CreateOptions extends Partial<TippyProps>, ViewOptions {
6
- variation: string;
7
- preserveView: boolean;
8
- className: string | string[];
9
- data: any;
10
- }
11
- export interface TippyInstance extends Instance {
12
- data?: any;
13
- }
14
- export type TippyProps = Props;
15
- export interface ExtendedTippyProps extends TippyProps {
16
- variations: Record<string, Partial<TippyProps>>;
17
- defaultVariation: keyof ExtendedTippyProps['variations'];
18
- beforeRender?: (text: string) => string;
19
- zIndexGetter?(): number;
20
- }
21
- export type TippyElement = ElementRef | Element;
22
- export interface ExtendedTippyInstance<T> extends TippyInstance {
23
- view: ResolveViewRef<T> | null;
24
- $viewOptions: ViewOptions;
25
- context?: ViewOptions['context'];
26
- }
27
- export type TippyConfig = Partial<ExtendedTippyProps>;
28
- export type TippyLoader = () => typeof tippy | Promise<{
29
- default: typeof tippy;
30
- }>;
31
- export declare const TIPPY_LOADER: InjectionToken<TippyLoader>;
32
- export declare const TIPPY_CONFIG: InjectionToken<Partial<ExtendedTippyProps>>;
package/lib/coercion.d.ts DELETED
@@ -1,9 +0,0 @@
1
- type BooleanInput = boolean | `${boolean}` | '' | null | undefined;
2
- /**
3
- * Transforms a value (typically a string) to a boolean.
4
- * Intended to be used as a transform function of an input.
5
- *
6
- * @see https://material.angular.io/cdk/coercion/overview
7
- */
8
- declare const coerceBooleanAttribute: (value: BooleanInput) => boolean;
9
- export { coerceBooleanAttribute };
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { TippyInstance } from '@ngneat/helipopper/config';
3
- export declare const TIPPY_REF: InjectionToken<TippyInstance>;
4
- export declare function injectTippyRef(): TippyInstance;
@@ -1 +0,0 @@
1
- export declare const IntersectionObserver: typeof globalThis.IntersectionObserver;
@@ -1,99 +0,0 @@
1
- import { AfterViewInit, ElementRef, Injector, InputSignal, NgZone, OnChanges, OnInit, SimpleChanges, ViewContainerRef } from '@angular/core';
2
- import type { Instance } from 'tippy.js';
3
- import { Subject } from 'rxjs';
4
- import { Content, ViewOptions, ViewRef, ViewService } from '@ngneat/overview';
5
- import { TippyConfig, TippyInstance, TippyProps } from '@ngneat/helipopper/config';
6
- import * as i0 from "@angular/core";
7
- export declare class TippyDirective implements OnChanges, AfterViewInit, OnInit {
8
- readonly appendTo: InputSignal<Element | "parent" | ((ref: Element) => Element)>;
9
- readonly content: InputSignal<Content | null | undefined>;
10
- readonly delay: InputSignal<number | [number | null, number | null]>;
11
- readonly duration: InputSignal<number | [number | null, number | null]>;
12
- readonly hideOnClick: InputSignal<boolean>;
13
- readonly interactive: InputSignal<boolean>;
14
- readonly interactiveBorder: InputSignal<number>;
15
- readonly maxWidth: InputSignal<string | number>;
16
- readonly offset: InputSignal<TippyProps['offset']>;
17
- readonly placement: InputSignal<TippyProps['placement']>;
18
- readonly popperOptions: InputSignal<TippyProps['popperOptions']>;
19
- readonly showOnCreate: InputSignal<boolean>;
20
- readonly trigger: InputSignal<string>;
21
- readonly triggerTarget: InputSignal<Element | Element[] | null>;
22
- readonly zIndex: InputSignal<number>;
23
- readonly animation: InputSignal<string | boolean>;
24
- readonly useTextContent: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
25
- readonly isLazy: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
26
- readonly variation: InputSignal<string | undefined>;
27
- readonly isEnabled: InputSignal<boolean>;
28
- readonly className: InputSignal<string | string[]>;
29
- readonly onlyTextOverflow: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
30
- readonly staticWidthHost: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
31
- readonly data: InputSignal<any>;
32
- readonly useHostWidth: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
33
- readonly hideOnEscape: import("@angular/core").InputSignalWithTransform<boolean, boolean | "" | "false" | "true" | null | undefined>;
34
- readonly popperWidth: InputSignal<string | number | undefined>;
35
- readonly customHost: InputSignal<HTMLElement | undefined>;
36
- readonly onShow: import("@angular/core").OutputEmitterRef<void>;
37
- readonly onHide: import("@angular/core").OutputEmitterRef<void>;
38
- readonly isVisible: import("@angular/core").ModelSignal<boolean>;
39
- visible: import("@angular/core").OutputEmitterRef<boolean>;
40
- protected instance: TippyInstance;
41
- protected viewRef: ViewRef | null;
42
- protected props: Partial<TippyConfig>;
43
- protected variationDefined: boolean;
44
- protected viewOptions$: ViewOptions | null;
45
- /**
46
- * We had use `visible` event emitter previously as a `takeUntil` subscriber in multiple places
47
- * within the directive.
48
- * This is for internal use only; thus we don't have to deal with the `visible` event emitter
49
- * and trigger change detections only when the `visible` event is being listened outside
50
- * in the template (`<button [tippy]="..." (visible)="..."></button>`).
51
- */
52
- protected visibleInternal: Subject<boolean>;
53
- private visibilityObserverCleanup;
54
- private contentChanged;
55
- private host;
56
- private get hostWidth();
57
- private destroyRef;
58
- private isServer;
59
- private tippyFactory;
60
- private destroyed;
61
- private created;
62
- protected globalConfig: Partial<import("@ngneat/helipopper/config").ExtendedTippyProps>;
63
- protected injector: Injector;
64
- protected viewService: ViewService;
65
- protected vcr: ViewContainerRef;
66
- protected ngZone: NgZone;
67
- protected hostRef: ElementRef<any>;
68
- constructor();
69
- ngOnChanges(changes: SimpleChanges): void;
70
- ngOnInit(): void;
71
- ngAfterViewInit(): void;
72
- destroyView(): void;
73
- /**
74
- * This method is useful when you append to an element that you might remove from the DOM.
75
- * In such cases we want to hide the tooltip and let it go through the destroy lifecycle.
76
- * For example, if you have a grid row with an element that you toggle using the display CSS property on hover.
77
- */
78
- observeHostVisibility(): import("rxjs").Subscription | undefined;
79
- show(): void;
80
- hide(): void;
81
- enable(): void;
82
- disable(): void;
83
- protected updateProps(props: Partial<TippyConfig>): void;
84
- protected setProps(props: Partial<TippyConfig>): void;
85
- protected setStatus(isEnabled: boolean): void;
86
- protected hasContent(): boolean;
87
- protected createInstance(): void;
88
- protected resolveContent(instance: TippyInstance): string | Element;
89
- protected handleContextMenu(): void;
90
- protected handleEscapeButton(): void;
91
- protected checkOverflow(isElementOverflow: boolean): void;
92
- protected listenToHostResize(): void;
93
- protected setInstanceWidth(instance: Instance, width: string | number): void;
94
- private onHidden;
95
- private isOverflowing$;
96
- private setupListeners;
97
- static ɵfac: i0.ɵɵFactoryDeclaration<TippyDirective, never>;
98
- static ɵdir: i0.ɵɵ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; }; "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; }; }, { "onShow": "tpOnShow"; "onHide": "tpOnHide"; "isVisible": "tpIsVisibleChange"; "visible": "tpVisible"; }, never, never, true, never>;
99
- }
@@ -1,17 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { type TippyProps } from '@ngneat/helipopper/config';
3
- import * as i0 from "@angular/core";
4
- export declare class TippyFactory {
5
- private readonly _ngZone;
6
- private readonly _loader;
7
- private _tippyImpl$;
8
- private _tippy;
9
- /**
10
- * This returns an observable because the user should provide a `loader`
11
- * function, which may return a promise if the tippy.js library is to be
12
- * loaded asynchronously.
13
- */
14
- create(target: HTMLElement, props?: Partial<TippyProps>): Observable<import("tippy.js").Instance<import("tippy.js").Props>>;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<TippyFactory, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<TippyFactory>;
17
- }
@@ -1,16 +0,0 @@
1
- import { Injector } from '@angular/core';
2
- import { ViewService } from '@ngneat/overview';
3
- import { Content } from '@ngneat/overview';
4
- import type { Observable } from 'rxjs';
5
- import { CreateOptions, ExtendedTippyInstance, TippyConfig } from '@ngneat/helipopper/config';
6
- import * as i0 from "@angular/core";
7
- export declare class TippyService {
8
- private globalConfig;
9
- private view;
10
- private injector;
11
- private readonly _tippyFactory;
12
- constructor(globalConfig: TippyConfig, view: ViewService, injector: Injector);
13
- create<T extends Content>(host: HTMLElement, content: T, options?: Partial<CreateOptions>): Observable<ExtendedTippyInstance<T>>;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<TippyService, never>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<TippyService>;
16
- }
package/lib/utils.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import type { TippyElement } from '@ngneat/helipopper/config';
3
- export declare const enum TippyErrorCode {
4
- TippyNotProvided = 1
5
- }
6
- export declare function inView(host: TippyElement, options?: IntersectionObserverInit): Observable<unknown>;
7
- export declare function isElementOverflow(host: HTMLElement): boolean;
8
- export declare function overflowChanges(host: TippyElement): Observable<boolean>;
9
- export declare function dimensionsChanges(target: HTMLElement): Observable<boolean>;
10
- export declare function onlyTippyProps(allProps: any): any;
11
- export declare function normalizeClassName(className: string | string[]): string[];
12
- export declare function coerceCssPixelValue<T>(value: T): string;
13
- export declare function observeVisibility(host: Element, hiddenHandler: () => void): () => void;
package/public-api.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export { TippyDirective } from './lib/tippy.directive';
2
- export { TippyService } from './lib/tippy.service';
3
- export { inView, overflowChanges } from './lib/utils';
4
- export { TIPPY_REF, injectTippyRef } from './lib/inject-tippy';