@ngneat/helipopper 4.2.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +2 -1
  2. package/esm2020/lib/defaults.mjs +25 -0
  3. package/esm2020/lib/tippy.directive.mjs +347 -0
  4. package/esm2020/lib/tippy.module.mjs +28 -0
  5. package/esm2020/lib/tippy.service.mjs +73 -0
  6. package/esm2020/lib/tippy.types.mjs +12 -0
  7. package/{esm2015/lib/utils.js → esm2020/lib/utils.mjs} +3 -2
  8. package/{esm2015/ngneat-helipopper.js → esm2020/ngneat-helipopper.mjs} +1 -1
  9. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  10. package/fesm2015/{ngneat-helipopper.js → ngneat-helipopper.mjs} +116 -66
  11. package/fesm2015/ngneat-helipopper.mjs.map +1 -0
  12. package/fesm2020/ngneat-helipopper.mjs +564 -0
  13. package/fesm2020/ngneat-helipopper.mjs.map +1 -0
  14. package/lib/tippy.directive.d.ts +3 -0
  15. package/lib/tippy.module.d.ts +5 -0
  16. package/lib/tippy.service.d.ts +3 -0
  17. package/lib/tippy.types.d.ts +5 -2
  18. package/ngneat-helipopper.d.ts +1 -1
  19. package/package.json +23 -11
  20. package/bundles/ngneat-helipopper.umd.js +0 -898
  21. package/bundles/ngneat-helipopper.umd.js.map +0 -1
  22. package/esm2015/lib/defaults.js +0 -19
  23. package/esm2015/lib/tippy.directive.js +0 -308
  24. package/esm2015/lib/tippy.module.js +0 -23
  25. package/esm2015/lib/tippy.service.js +0 -61
  26. package/esm2015/lib/tippy.types.js +0 -12
  27. package/fesm2015/ngneat-helipopper.js.map +0 -1
  28. package/ngneat-helipopper.metadata.json +0 -1
  29. package/schematics/collection.json +0 -12
  30. package/schematics/ng-add/index.js +0 -73
  31. package/schematics/ng-add/index.js.map +0 -1
  32. package/schematics/ng-add/index.ts +0 -79
  33. package/schematics/ng-add/schema.js +0 -3
  34. package/schematics/ng-add/schema.js.map +0 -1
  35. package/schematics/ng-add/schema.json +0 -18
  36. package/schematics/ng-add/schema.ts +0 -10
  37. package/schematics/schematics.consts.js +0 -5
  38. package/schematics/schematics.consts.js.map +0 -1
  39. package/schematics/schematics.consts.ts +0 -1
  40. package/schematics/utils/ast-utils.js +0 -500
  41. package/schematics/utils/ast-utils.js.map +0 -1
  42. package/schematics/utils/ast-utils.ts +0 -596
  43. package/schematics/utils/change.js +0 -127
  44. package/schematics/utils/change.js.map +0 -1
  45. package/schematics/utils/change.ts +0 -162
  46. package/schematics/utils/find-module.js +0 -113
  47. package/schematics/utils/find-module.js.map +0 -1
  48. package/schematics/utils/find-module.ts +0 -125
  49. package/schematics/utils/package.js +0 -22
  50. package/schematics/utils/package.js.map +0 -1
  51. package/schematics/utils/package.ts +0 -22
  52. package/schematics/utils/projects.js +0 -31
  53. package/schematics/utils/projects.js.map +0 -1
  54. package/schematics/utils/projects.ts +0 -31
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, ElementRef, EventEmitter, Injector, Directive, Inject, PLATFORM_ID, ViewContainerRef, NgZone, Input, Output, NgModule, Injectable } from '@angular/core';
2
+ import { InjectionToken, ElementRef, EventEmitter, Injector, PLATFORM_ID, Directive, Inject, Input, Output, NgModule, Injectable } from '@angular/core';
3
3
  import { isPlatformServer } from '@angular/common';
4
4
  import tippy from 'tippy.js';
5
5
  import { Observable, Subject, fromEvent, merge } from 'rxjs';
6
6
  import { auditTime, map, switchMap, takeUntil, filter } from 'rxjs/operators';
7
- import * as i2 from '@ngneat/overview';
8
- import { isString as isString$1, isComponent, isTemplateRef, ViewService } from '@ngneat/overview';
7
+ import * as i1 from '@ngneat/overview';
8
+ import { isString as isString$1, isComponent, isTemplateRef } from '@ngneat/overview';
9
9
 
10
10
  const TIPPY_CONFIG = new InjectionToken('Tippy config', {
11
11
  providedIn: 'root',
@@ -85,6 +85,7 @@ function onlyTippyProps(allProps) {
85
85
  'onlyTextOverflow',
86
86
  'data',
87
87
  'content',
88
+ 'context',
88
89
  'hideOnEscape',
89
90
  'customHost'
90
91
  ];
@@ -149,7 +150,7 @@ class TippyDirective {
149
150
  if (isChanged('isVisible', changes)) {
150
151
  this.isVisible ? this.show() : this.hide();
151
152
  }
152
- this.setProps(props);
153
+ this.setProps(Object.assign(Object.assign({}, this.props), props));
153
154
  }
154
155
  ngOnInit() {
155
156
  if (this.useHostWidth) {
@@ -157,6 +158,8 @@ class TippyDirective {
157
158
  }
158
159
  }
159
160
  ngAfterViewInit() {
161
+ if (isPlatformServer(this.platformId))
162
+ return;
160
163
  this.zone.runOutsideAngular(() => {
161
164
  if (this.lazy) {
162
165
  if (this.onlyTextOverflow) {
@@ -194,6 +197,7 @@ class TippyDirective {
194
197
  }
195
198
  destroyView() {
196
199
  var _a;
200
+ this.viewOptions$ = null;
197
201
  (_a = this.viewRef) === null || _a === void 0 ? void 0 : _a.destroy();
198
202
  this.viewRef = null;
199
203
  }
@@ -284,9 +288,15 @@ class TippyDirective {
284
288
  resolveContent() {
285
289
  if (!this.viewOptions$ && !isString$1(this.content)) {
286
290
  if (isComponent(this.content)) {
291
+ this.instance.data = this.data;
287
292
  this.viewOptions$ = {
288
293
  injector: Injector.create({
289
- providers: [{ provide: TIPPY_REF, useValue: this.instance }],
294
+ providers: [
295
+ {
296
+ provide: TIPPY_REF,
297
+ useValue: this.instance
298
+ }
299
+ ],
290
300
  parent: this.injector
291
301
  })
292
302
  };
@@ -355,50 +365,78 @@ class TippyDirective {
355
365
  });
356
366
  }
357
367
  }
358
- TippyDirective.decorators = [
359
- { type: Directive, args: [{
360
- // eslint-disable-next-line @angular-eslint/directive-selector
361
- selector: '[tippy]',
362
- exportAs: 'tippy'
363
- },] }
364
- ];
365
- TippyDirective.ctorParameters = () => [
366
- { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
367
- { type: undefined, decorators: [{ type: Inject, args: [TIPPY_CONFIG,] }] },
368
- { type: Injector },
369
- { type: ViewService },
370
- { type: ViewContainerRef },
371
- { type: NgZone },
372
- { type: ElementRef }
373
- ];
374
- TippyDirective.propDecorators = {
375
- appendTo: [{ type: Input }],
376
- delay: [{ type: Input }],
377
- duration: [{ type: Input }],
378
- hideOnClick: [{ type: Input }],
379
- interactive: [{ type: Input }],
380
- interactiveBorder: [{ type: Input }],
381
- maxWidth: [{ type: Input }],
382
- offset: [{ type: Input }],
383
- placement: [{ type: Input }],
384
- popperOptions: [{ type: Input }],
385
- showOnCreate: [{ type: Input }],
386
- trigger: [{ type: Input }],
387
- triggerTarget: [{ type: Input }],
388
- zIndex: [{ type: Input }],
389
- lazy: [{ type: Input }],
390
- variation: [{ type: Input }],
391
- isEnabled: [{ type: Input }],
392
- className: [{ type: Input }],
393
- onlyTextOverflow: [{ type: Input }],
394
- data: [{ type: Input }],
395
- useHostWidth: [{ type: Input }],
396
- hideOnEscape: [{ type: Input }],
397
- content: [{ type: Input, args: ['tippy',] }],
398
- customHost: [{ type: Input, args: ['tippyHost',] }],
399
- visible: [{ type: Output }],
400
- isVisible: [{ type: Input }]
401
- };
368
+ TippyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyDirective, deps: [{ token: PLATFORM_ID }, { token: TIPPY_CONFIG }, { token: i0.Injector }, { token: i1.ViewService }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
369
+ TippyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.2", type: TippyDirective, selector: "[tippy]", inputs: { appendTo: "appendTo", delay: "delay", duration: "duration", hideOnClick: "hideOnClick", interactive: "interactive", interactiveBorder: "interactiveBorder", maxWidth: "maxWidth", offset: "offset", placement: "placement", popperOptions: "popperOptions", showOnCreate: "showOnCreate", trigger: "trigger", triggerTarget: "triggerTarget", zIndex: "zIndex", lazy: "lazy", variation: "variation", isEnabled: "isEnabled", className: "className", onlyTextOverflow: "onlyTextOverflow", data: "data", useHostWidth: "useHostWidth", hideOnEscape: "hideOnEscape", content: ["tippy", "content"], customHost: ["tippyHost", "customHost"], isVisible: "isVisible" }, outputs: { visible: "visible" }, exportAs: ["tippy"], usesOnChanges: true, ngImport: i0 });
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyDirective, decorators: [{
371
+ type: Directive,
372
+ args: [{
373
+ // eslint-disable-next-line @angular-eslint/directive-selector
374
+ selector: '[tippy]',
375
+ exportAs: 'tippy'
376
+ }]
377
+ }], ctorParameters: function () {
378
+ return [{ type: undefined, decorators: [{
379
+ type: Inject,
380
+ args: [PLATFORM_ID]
381
+ }] }, { type: undefined, decorators: [{
382
+ type: Inject,
383
+ args: [TIPPY_CONFIG]
384
+ }] }, { type: i0.Injector }, { type: i1.ViewService }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.ElementRef }];
385
+ }, propDecorators: { appendTo: [{
386
+ type: Input
387
+ }], delay: [{
388
+ type: Input
389
+ }], duration: [{
390
+ type: Input
391
+ }], hideOnClick: [{
392
+ type: Input
393
+ }], interactive: [{
394
+ type: Input
395
+ }], interactiveBorder: [{
396
+ type: Input
397
+ }], maxWidth: [{
398
+ type: Input
399
+ }], offset: [{
400
+ type: Input
401
+ }], placement: [{
402
+ type: Input
403
+ }], popperOptions: [{
404
+ type: Input
405
+ }], showOnCreate: [{
406
+ type: Input
407
+ }], trigger: [{
408
+ type: Input
409
+ }], triggerTarget: [{
410
+ type: Input
411
+ }], zIndex: [{
412
+ type: Input
413
+ }], lazy: [{
414
+ type: Input
415
+ }], variation: [{
416
+ type: Input
417
+ }], isEnabled: [{
418
+ type: Input
419
+ }], className: [{
420
+ type: Input
421
+ }], onlyTextOverflow: [{
422
+ type: Input
423
+ }], data: [{
424
+ type: Input
425
+ }], useHostWidth: [{
426
+ type: Input
427
+ }], hideOnEscape: [{
428
+ type: Input
429
+ }], content: [{
430
+ type: Input,
431
+ args: ['tippy']
432
+ }], customHost: [{
433
+ type: Input,
434
+ args: ['tippyHost']
435
+ }], visible: [{
436
+ type: Output
437
+ }], isVisible: [{
438
+ type: Input
439
+ }] } });
402
440
  function isChanged(key, changes) {
403
441
  return key in changes;
404
442
  }
@@ -416,12 +454,16 @@ class TippyModule {
416
454
  };
417
455
  }
418
456
  }
419
- TippyModule.decorators = [
420
- { type: NgModule, args: [{
421
- declarations: [TippyDirective],
422
- exports: [TippyDirective]
423
- },] }
424
- ];
457
+ TippyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
458
+ TippyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyModule, declarations: [TippyDirective], exports: [TippyDirective] });
459
+ TippyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyModule });
460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyModule, decorators: [{
461
+ type: NgModule,
462
+ args: [{
463
+ declarations: [TippyDirective],
464
+ exports: [TippyDirective]
465
+ }]
466
+ }] });
425
467
 
426
468
  const tooltipVariation = {
427
469
  theme: null,
@@ -458,8 +500,14 @@ class TippyService {
458
500
  }
459
501
  else if (isComponent(content)) {
460
502
  instance.context = options.context;
503
+ instance.data = options.data;
461
504
  instance.$viewOptions.injector = Injector.create({
462
- providers: [{ provide: TIPPY_REF, useValue: instance }],
505
+ providers: [
506
+ {
507
+ provide: TIPPY_REF,
508
+ useValue: instance
509
+ }
510
+ ],
463
511
  parent: options.injector || this.injector
464
512
  });
465
513
  }
@@ -485,19 +533,21 @@ class TippyService {
485
533
  return tippy(host, config);
486
534
  }
487
535
  }
488
- TippyService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TippyService_Factory() { return new TippyService(i0.ɵɵinject(TIPPY_CONFIG), i0.ɵɵinject(i2.ViewService), i0.ɵɵinject(i0.INJECTOR)); }, token: TippyService, providedIn: "root" });
489
- TippyService.decorators = [
490
- { type: Injectable, args: [{ providedIn: 'root' },] }
491
- ];
492
- TippyService.ctorParameters = () => [
493
- { type: undefined, decorators: [{ type: Inject, args: [TIPPY_CONFIG,] }] },
494
- { type: ViewService },
495
- { type: Injector }
496
- ];
536
+ TippyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyService, deps: [{ token: TIPPY_CONFIG }, { token: i1.ViewService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
537
+ TippyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyService, providedIn: 'root' });
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TippyService, decorators: [{
539
+ type: Injectable,
540
+ args: [{ providedIn: 'root' }]
541
+ }], ctorParameters: function () {
542
+ return [{ type: undefined, decorators: [{
543
+ type: Inject,
544
+ args: [TIPPY_CONFIG]
545
+ }] }, { type: i1.ViewService }, { type: i0.Injector }];
546
+ } });
497
547
 
498
548
  /**
499
549
  * Generated bundle index. Do not edit.
500
550
  */
501
551
 
502
552
  export { TIPPY_CONFIG, TIPPY_REF, TippyDirective, TippyModule, TippyService, inView, overflowChanges, popperVariation, tooltipVariation, withContextMenuVariation };
503
- //# sourceMappingURL=ngneat-helipopper.js.map
553
+ //# sourceMappingURL=ngneat-helipopper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneat-helipopper.mjs","sources":["../../../../projects/ngneat/helipopper/src/lib/tippy.types.ts","../../../../projects/ngneat/helipopper/src/lib/utils.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.directive.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.module.ts","../../../../projects/ngneat/helipopper/src/lib/defaults.ts","../../../../projects/ngneat/helipopper/src/lib/tippy.service.ts","../../../../projects/ngneat/helipopper/src/ngneat-helipopper.ts"],"sourcesContent":["import { Instance, Props } from 'tippy.js';\nimport { ElementRef, InjectionToken } from '@angular/core';\nimport { ViewOptions } from '@ngneat/overview';\n\nexport interface CreateOptions extends Partial<TippyProps>, ViewOptions {\n variation: string;\n className: string | string[];\n data: any;\n}\n\nexport type NgChanges<Component extends object, Props = ExcludeFunctions<Component>> = {\n [Key in keyof Props]: {\n previousValue: Props[Key];\n currentValue: Props[Key];\n firstChange: boolean;\n isFirstChange(): boolean;\n };\n};\n\ntype MarkFunctionPropertyNames<Component> = {\n [Key in keyof Component]: Component[Key] extends Function ? never : Key;\n}[keyof Component];\n\ntype ExcludeFunctions<T extends object> = Pick<T, MarkFunctionPropertyNames<T>>;\n\nexport const TIPPY_CONFIG = new InjectionToken<Partial<TippyConfig>>('Tippy config', {\n providedIn: 'root',\n factory() {\n return {};\n }\n});\nexport const TIPPY_REF = new InjectionToken<TippyInstance>('TIPPY_REF');\n\nexport interface TippyInstance extends Instance {\n data?: any;\n}\n\nexport type TippyProps = Props;\n\nexport interface TippyConfig extends TippyProps {\n variations: Record<string, Partial<TippyProps>>;\n defaultVariation: keyof TippyConfig['variations'];\n beforeRender?: (text: string) => string;\n}\n\nexport function coerceElement(element: TippyElement) {\n return element instanceof ElementRef ? element.nativeElement : element;\n}\n\nexport type TippyElement = ElementRef | Element;\n","import { Observable } from 'rxjs';\nimport { auditTime, map } from 'rxjs/operators';\nimport { coerceElement, TippyElement } from './tippy.types';\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 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\nfunction isElementOverflow(host: HTMLElement): boolean {\n // Don't access the `offsetWidth` multipe times since it triggers layout updates.\n const hostOffsetWidth = host.offsetWidth;\n return hostOffsetWidth > host.parentElement.offsetWidth || hostOffsetWidth < host.scrollWidth;\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 resizeObserverStrategy(target);\n}\n\nfunction resizeObserverStrategy(target: HTMLElement): Observable<boolean> {\n return new Observable(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 = {};\n\n const ownProps = [\n 'variations',\n 'useHostWidth',\n 'defaultVariation',\n 'beforeRender',\n 'lazy',\n 'variation',\n 'isEnabled',\n 'className',\n 'onlyTextOverflow',\n 'data',\n 'content',\n 'context',\n 'hideOnEscape',\n 'customHost'\n ];\n\n Object.keys(allProps).forEach(prop => {\n if (!ownProps.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 = isString(className) ? className.split(' ') : className;\n\n return classes.map(klass => klass?.trim()).filter(Boolean);\n}\n\nfunction isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Injector,\n Input,\n NgZone,\n Output,\n PLATFORM_ID,\n ViewContainerRef,\n AfterViewInit,\n OnChanges,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport tippy from 'tippy.js';\nimport { fromEvent, merge, Subject } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\nimport { isComponent, isString, isTemplateRef, ViewService, ViewOptions, ViewRef, Content } from '@ngneat/overview';\n\nimport { dimensionsChanges, inView, normalizeClassName, onlyTippyProps, overflowChanges } from './utils';\nimport { NgChanges, TIPPY_CONFIG, TIPPY_REF, TippyConfig, TippyInstance, TippyProps } from './tippy.types';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tippy]',\n exportAs: 'tippy'\n})\nexport class TippyDirective implements OnChanges, AfterViewInit, OnDestroy, OnInit {\n @Input() appendTo: TippyProps['appendTo'];\n @Input() delay: TippyProps['delay'];\n @Input() duration: TippyProps['duration'];\n @Input() hideOnClick: TippyProps['hideOnClick'];\n @Input() interactive: TippyProps['interactive'];\n @Input() interactiveBorder: TippyProps['interactiveBorder'];\n @Input() maxWidth: TippyProps['maxWidth'];\n @Input() offset: TippyProps['offset'];\n @Input() placement: TippyProps['placement'];\n @Input() popperOptions: TippyProps['popperOptions'];\n @Input() showOnCreate: TippyProps['showOnCreate'];\n @Input() trigger: TippyProps['trigger'];\n @Input() triggerTarget: TippyProps['triggerTarget'];\n @Input() zIndex: TippyProps['zIndex'];\n\n @Input() lazy: boolean;\n @Input() variation: string;\n @Input() isEnabled: boolean;\n @Input() className: string | string[];\n @Input() onlyTextOverflow = false;\n @Input() data: any;\n @Input() useHostWidth = false;\n @Input() hideOnEscape = false;\n @Input('tippy') content: Content;\n @Input('tippyHost') customHost: HTMLElement;\n\n @Output() visible = new EventEmitter<boolean>();\n @Input() public isVisible = false;\n\n private instance: TippyInstance;\n private viewRef: ViewRef;\n private destroyed = new Subject<void>();\n private props: Partial<TippyConfig>;\n private enabled = true;\n private variationDefined = false;\n private viewOptions$: ViewOptions;\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n @Inject(TIPPY_CONFIG) private globalConfig: TippyConfig,\n private injector: Injector,\n private viewService: ViewService,\n private vcr: ViewContainerRef,\n private zone: NgZone,\n private hostRef: ElementRef\n ) {}\n\n ngOnChanges(changes: NgChanges<TippyDirective>) {\n if (isPlatformServer(this.platformId)) return;\n\n let props: Partial<TippyConfig> = Object.keys(changes).reduce((acc, change) => {\n if (change === 'isVisible') return acc;\n\n acc[change] = changes[change].currentValue;\n\n return acc;\n }, {});\n\n let variation: string;\n\n if (isChanged<NgChanges<TippyDirective>>('variation', changes)) {\n variation = changes.variation.currentValue;\n this.variationDefined = true;\n } else if (!this.variationDefined) {\n variation = this.globalConfig.defaultVariation;\n this.variationDefined = true;\n }\n\n if (variation) {\n props = {\n ...this.globalConfig.variations[variation],\n ...props\n };\n }\n\n if (isChanged<NgChanges<TippyDirective>>('isEnabled', changes)) {\n this.enabled = changes.isEnabled.currentValue;\n this.setStatus();\n }\n\n if (isChanged<NgChanges<TippyDirective>>('isVisible', changes)) {\n this.isVisible ? this.show() : this.hide();\n }\n\n this.setProps({ ...this.props, ...props });\n }\n\n ngOnInit() {\n if (this.useHostWidth) {\n this.props.maxWidth = this.hostWidth;\n }\n }\n\n ngAfterViewInit() {\n if (isPlatformServer(this.platformId)) return;\n\n this.zone.runOutsideAngular(() => {\n if (this.lazy) {\n if (this.onlyTextOverflow) {\n inView(this.host)\n .pipe(\n switchMap(() => overflowChanges(this.host)),\n takeUntil(this.destroyed)\n )\n .subscribe(isElementOverflow => {\n this.checkOverflow(isElementOverflow);\n });\n } else {\n inView(this.host)\n .pipe(takeUntil(this.destroyed))\n .subscribe(() => {\n this.createInstance();\n });\n }\n } else if (this.onlyTextOverflow) {\n overflowChanges(this.host)\n .pipe(takeUntil(this.destroyed))\n .subscribe(isElementOverflow => {\n this.checkOverflow(isElementOverflow);\n });\n } else {\n this.createInstance();\n }\n });\n }\n\n ngOnDestroy() {\n this.destroyed.next();\n this.instance?.destroy();\n this.destroyView();\n }\n\n destroyView() {\n this.viewOptions$ = null;\n this.viewRef?.destroy();\n this.viewRef = null;\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 private setProps(props: Partial<TippyConfig>) {\n this.props = props;\n this.instance?.setProps(onlyTippyProps(props));\n }\n\n private setStatus() {\n this.enabled ? this.instance?.enable() : this.instance?.disable();\n }\n\n private get host(): HTMLElement {\n return this.customHost || this.hostRef.nativeElement;\n }\n\n private get hostWidth(): string {\n return `${this.host.getBoundingClientRect().width}px`;\n }\n\n private createInstance() {\n if (this.content == null) {\n return;\n }\n\n this.zone.runOutsideAngular(() => {\n this.instance = tippy(this.host, {\n allowHTML: true,\n appendTo: document.body,\n ...onlyTippyProps(this.globalConfig),\n ...onlyTippyProps(this.props),\n onMount: instance => {\n this.isVisible = true;\n this.visible.next(true);\n this.useHostWidth && this.listenToHostResize();\n this.globalConfig.onMount?.(instance);\n },\n onCreate: instance => {\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 this.zone.run(() => {\n const content = this.resolveContent();\n if (isString(content)) {\n instance.setProps({ allowHTML: false });\n }\n instance.setContent(content);\n this.hideOnEscape && this.handleEscapeButton();\n });\n if (this.useHostWidth) {\n // Don't access `hostWidth` multiple times since it's a getter that calls `getBoundingClientRect()`,\n // which triggers the whole layout update.\n const hostWidth = this.hostWidth;\n instance.popper.style.width = hostWidth;\n instance.popper.style.maxWidth = hostWidth;\n (instance.popper.firstElementChild as HTMLElement).style.maxWidth = hostWidth;\n }\n this.globalConfig.onShow?.(instance);\n },\n onHidden: instance => {\n this.destroyView();\n this.isVisible = false;\n this.visible.next(false);\n this.globalConfig.onHidden?.(instance);\n }\n });\n\n this.setStatus();\n this.setProps(this.props);\n\n this.variation === 'contextMenu' && this.handleContextMenu();\n });\n }\n\n private resolveContent() {\n if (!this.viewOptions$ && !isString(this.content)) {\n if (isComponent(this.content)) {\n this.instance.data = this.data;\n this.viewOptions$ = {\n injector: Injector.create({\n providers: [\n {\n provide: TIPPY_REF,\n useValue: this.instance\n }\n ],\n parent: this.injector\n })\n };\n } else if (isTemplateRef(this.content)) {\n this.viewOptions$ = {\n context: {\n $implicit: this.hide.bind(this),\n data: this.data\n }\n };\n }\n }\n\n this.viewRef = this.viewService.createView(this.content, {\n vcr: this.vcr,\n ...this.viewOptions$\n });\n\n let content = this.viewRef.getElement();\n\n if (isString(content) && this.globalConfig.beforeRender) {\n content = this.globalConfig.beforeRender(content);\n }\n\n return content;\n }\n\n private handleContextMenu() {\n fromEvent(this.host, 'contextmenu')\n .pipe(takeUntil(this.destroyed))\n .subscribe((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 any)\n });\n\n this.instance.show();\n });\n }\n\n private handleEscapeButton() {\n this.pressButton$(document.body, 'Escape')\n .pipe(takeUntil(merge(this.destroyed, this.visible.pipe(filter(v => !v)))))\n .subscribe(() => this.hide());\n }\n\n private pressButton$(element: HTMLElement, codeButton: string) {\n return fromEvent(element, 'keydown').pipe(filter(({ code }: KeyboardEvent) => codeButton === code));\n }\n\n private 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 private listenToHostResize() {\n dimensionsChanges(this.host)\n .pipe(takeUntil(merge(this.destroyed, this.visible)))\n .subscribe(() => {\n this.instance.popper.style.width = this.hostWidth;\n });\n }\n}\n\nfunction isChanged<T>(key: keyof T, changes: T) {\n return key in changes;\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { TippyDirective } from './tippy.directive';\nimport { TIPPY_CONFIG, TippyConfig } from './tippy.types';\n\n@NgModule({\n declarations: [TippyDirective],\n exports: [TippyDirective]\n})\nexport class TippyModule {\n static forRoot(config: Partial<TippyConfig> = {}): ModuleWithProviders<TippyModule> {\n return {\n ngModule: TippyModule,\n providers: [\n {\n provide: TIPPY_CONFIG,\n useValue: config\n }\n ]\n };\n }\n}\n","import { TippyConfig } from './tippy.types';\n\ntype Variation = TippyConfig['variations'][0];\n\nexport const tooltipVariation: Variation = {\n theme: null,\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: null,\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 { Inject, Injectable, Injector } from '@angular/core';\nimport tippy from 'tippy.js';\nimport { isComponent, isTemplateRef, ViewService } from '@ngneat/overview';\nimport { Content } from '@ngneat/overview';\nimport { CreateOptions, TIPPY_CONFIG, TIPPY_REF, TippyConfig, TippyInstance } from './tippy.types';\nimport { normalizeClassName, onlyTippyProps } from './utils';\n\n@Injectable({ providedIn: 'root' })\nexport class TippyService {\n constructor(\n @Inject(TIPPY_CONFIG) private globalConfig: TippyConfig,\n private view: ViewService,\n private injector: Injector\n ) {}\n\n create(host: Element, content: Content, options: Partial<CreateOptions> = {}): TippyInstance {\n const config = {\n onShow: instance => {\n if (!instance.$viewOptions) {\n instance.$viewOptions = {};\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 instance.$viewOptions.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 instance.view = this.view.createView(content, { ...options, ...instance.$viewOptions });\n instance.setContent(instance.view.getElement());\n options?.onShow?.(instance);\n },\n onHidden: instance => {\n instance.view.destroy();\n options?.onHidden?.(instance);\n instance.view = null;\n },\n ...onlyTippyProps(this.globalConfig),\n ...this.globalConfig.variations[options.variation || this.globalConfig.defaultVariation],\n ...onlyTippyProps(options),\n onCreate: instance => {\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 tippy(host, config);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isString"],"mappings":";;;;;;;;;MAyBa,YAAY,GAAG,IAAI,cAAc,CAAuB,cAAc,EAAE;IACnF,UAAU,EAAE,MAAM;IAClB,OAAO;QACL,OAAO,EAAE,CAAC;KACX;CACF,EAAE;MACU,SAAS,GAAG,IAAI,cAAc,CAAgB,WAAW,EAAE;SAcxD,aAAa,CAAC,OAAqB;IACjD,OAAO,OAAO,YAAY,UAAU,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC;AACzE;;ACzCA,IAAI,4BAA4B,GAAG,KAAK,CAAC;AACzC,IAAI,sBAAsB,GAAG,KAAK,CAAC;AAEnC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,4BAA4B,GAAG,sBAAsB,IAAI,MAAM,CAAC;IAChE,sBAAsB,GAAG,gBAAgB,IAAI,MAAM,CAAC;CACrD;SAEe,MAAM,CACpB,IAAkB,EAClB,UAAoC;IAClC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,GAAG;CACf;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpC,OAAO,IAAI,UAAU,CAAC,UAAU;QAC9B,IAAI,CAAC,4BAA4B,EAAE;YACjC,UAAU,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