@ngneat/helipopper 12.2.0 → 13.1.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/README.md +59 -2
- package/fesm2022/ngneat-helipopper-config.mjs +17 -3
- package/fesm2022/ngneat-helipopper-config.mjs.map +1 -1
- package/fesm2022/ngneat-helipopper.mjs +256 -204
- package/fesm2022/ngneat-helipopper.mjs.map +1 -1
- package/package.json +8 -7
- package/{config/index.d.ts → types/ngneat-helipopper-config.d.ts} +13 -7
- package/{index.d.ts → types/ngneat-helipopper.d.ts} +24 -11
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, inject, NgZone, ɵisPromise as _isPromise, Injectable, InjectionToken, Injector, signal, booleanAttribute, input, output, model, computed, DestroyRef, PLATFORM_ID, ViewContainerRef,
|
|
2
|
+
import { ElementRef, inject, NgZone, ɵisPromise as _isPromise, Injectable, InjectionToken, Injector, signal, booleanAttribute, input, output, model, computed, DestroyRef, PLATFORM_ID, ViewContainerRef, afterEveryRender, untracked, effect, Directive } from '@angular/core';
|
|
3
3
|
import { isPlatformServer } from '@angular/common';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import { Observable, defer, of, tap, map as map$1, Subject, merge } from 'rxjs';
|
|
6
|
-
import { auditTime, map, switchMap, takeUntil } from 'rxjs/operators';
|
|
5
|
+
import { Observable, defer, of, tap, map as map$1, Subject, firstValueFrom, combineLatest, from, merge } from 'rxjs';
|
|
6
|
+
import { auditTime, map, switchMap, takeUntil, filter } from 'rxjs/operators';
|
|
7
7
|
import { ViewService, isTemplateRef, isComponent, isString } from '@ngneat/overview';
|
|
8
|
-
import { TIPPY_LOADER, TIPPY_CONFIG } from '@ngneat/helipopper/config';
|
|
8
|
+
import { TIPPY_LOADER, TIPPY_CONFIG, TIPPY_LOADER_COMPONENT, TIPPY_LOADER_TIMING } from '@ngneat/helipopper/config';
|
|
9
9
|
|
|
10
10
|
// Let's retrieve the native `IntersectionObserver` implementation hidden by
|
|
11
11
|
// `__zone_symbol__IntersectionObserver`. This would be the unpatched version of
|
|
@@ -65,7 +65,7 @@ function dimensionsChanges(target) {
|
|
|
65
65
|
subscriber.complete();
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
const observer = new ResizeObserver(() => subscriber.next(
|
|
68
|
+
const observer = new ResizeObserver(() => subscriber.next());
|
|
69
69
|
observer.observe(target);
|
|
70
70
|
return () => observer.disconnect();
|
|
71
71
|
});
|
|
@@ -97,6 +97,8 @@ function onlyTippyProps(allProps) {
|
|
|
97
97
|
'popperWidth',
|
|
98
98
|
'zIndexGetter',
|
|
99
99
|
'staticWidthHost',
|
|
100
|
+
'bindings',
|
|
101
|
+
'directives',
|
|
100
102
|
];
|
|
101
103
|
const overriddenMethods = ['onShow', 'onHidden', 'onCreate'];
|
|
102
104
|
Object.keys(allProps).forEach((prop) => {
|
|
@@ -149,7 +151,7 @@ class TippyFactory {
|
|
|
149
151
|
* function, which may return a promise if the tippy.js library is to be
|
|
150
152
|
* loaded asynchronously.
|
|
151
153
|
*/
|
|
152
|
-
|
|
154
|
+
getTippyImpl() {
|
|
153
155
|
this._tippyImpl$ ||= defer(() => {
|
|
154
156
|
if (this._tippy)
|
|
155
157
|
return of(this._tippy);
|
|
@@ -179,14 +181,12 @@ class TippyFactory {
|
|
|
179
181
|
this._tippy = tippy;
|
|
180
182
|
}));
|
|
181
183
|
});
|
|
182
|
-
return this._tippyImpl
|
|
183
|
-
return this._ngZone.runOutsideAngular(() => tippy(target, props));
|
|
184
|
-
}));
|
|
184
|
+
return this._tippyImpl$;
|
|
185
185
|
}
|
|
186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
187
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
187
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyFactory, providedIn: 'root' }); }
|
|
188
188
|
}
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyFactory, decorators: [{
|
|
190
190
|
type: Injectable,
|
|
191
191
|
args: [{ providedIn: 'root' }]
|
|
192
192
|
}] });
|
|
@@ -207,11 +207,12 @@ function injectTippyRef() {
|
|
|
207
207
|
|
|
208
208
|
class TippyService {
|
|
209
209
|
constructor() {
|
|
210
|
+
this._ngZone = inject(NgZone);
|
|
210
211
|
this._injector = inject(Injector);
|
|
211
212
|
this._globalConfig = inject(TIPPY_CONFIG, { optional: true });
|
|
212
213
|
this._viewService = inject(ViewService);
|
|
213
214
|
this._tippyFactory = inject(TippyFactory);
|
|
214
|
-
this.enabled = signal(true, ...(ngDevMode ? [{ debugName: "enabled" }] : []));
|
|
215
|
+
this.enabled = signal(true, ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
|
|
215
216
|
}
|
|
216
217
|
enableAll() {
|
|
217
218
|
this.enabled.set(true);
|
|
@@ -276,12 +277,16 @@ class TippyService {
|
|
|
276
277
|
options.onCreate?.(instance);
|
|
277
278
|
},
|
|
278
279
|
};
|
|
279
|
-
return this._tippyFactory.
|
|
280
|
+
return this._tippyFactory.getTippyImpl().pipe(map$1((tippy) => {
|
|
281
|
+
return this._ngZone.runOutsideAngular(() => {
|
|
282
|
+
return tippy(host, config);
|
|
283
|
+
});
|
|
284
|
+
}));
|
|
280
285
|
}
|
|
281
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
282
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
286
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
287
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyService, providedIn: 'root' }); }
|
|
283
288
|
}
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyService, decorators: [{
|
|
285
290
|
type: Injectable,
|
|
286
291
|
args: [{ providedIn: 'root' }]
|
|
287
292
|
}] });
|
|
@@ -308,7 +313,7 @@ const appendTo = function appendTo() {
|
|
|
308
313
|
// We are providing them as default input values.
|
|
309
314
|
// The `tippy.js` repository has been archived and is unlikely to
|
|
310
315
|
// change in the future, so it is safe to use these values as defaults.
|
|
311
|
-
const defaultAppendTo = () => document.body;
|
|
316
|
+
const defaultAppendTo = (() => document.body);
|
|
312
317
|
const defaultDelay = 0;
|
|
313
318
|
const defaultDuration = [300, 250];
|
|
314
319
|
const defaultInteractiveBorder = 2;
|
|
@@ -326,95 +331,50 @@ class TippyDirective {
|
|
|
326
331
|
return this.host().getBoundingClientRect().width;
|
|
327
332
|
}
|
|
328
333
|
constructor() {
|
|
329
|
-
this.appendTo = input(defaultAppendTo, ...(ngDevMode ?
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this.
|
|
333
|
-
this.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.
|
|
337
|
-
alias: 'tpDuration',
|
|
338
|
-
}]));
|
|
339
|
-
this.hideOnClick = input(true, ...(ngDevMode ? [{ debugName: "hideOnClick", alias: 'tpHideOnClick' }] : [{
|
|
340
|
-
alias: 'tpHideOnClick',
|
|
341
|
-
}]));
|
|
342
|
-
this.interactive = input(false, ...(ngDevMode ? [{ debugName: "interactive", alias: 'tpInteractive' }] : [{
|
|
343
|
-
alias: 'tpInteractive',
|
|
344
|
-
}]));
|
|
345
|
-
this.interactiveBorder = input(defaultInteractiveBorder, ...(ngDevMode ? [{ debugName: "interactiveBorder", alias: 'tpInteractiveBorder' }] : [{
|
|
346
|
-
alias: 'tpInteractiveBorder',
|
|
347
|
-
}]));
|
|
348
|
-
this.maxWidth = input(defaultMaxWidth, ...(ngDevMode ? [{ debugName: "maxWidth", alias: 'tpMaxWidth' }] : [{
|
|
349
|
-
alias: 'tpMaxWidth',
|
|
350
|
-
}]));
|
|
334
|
+
this.appendTo = input(defaultAppendTo, { ...(ngDevMode ? { debugName: "appendTo" } : /* istanbul ignore next */ {}), alias: 'tpAppendTo' });
|
|
335
|
+
this.content = input('', { ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'tp' });
|
|
336
|
+
this.delay = input(defaultDelay, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), alias: 'tpDelay' });
|
|
337
|
+
this.duration = input(defaultDuration, { ...(ngDevMode ? { debugName: "duration" } : /* istanbul ignore next */ {}), alias: 'tpDuration' });
|
|
338
|
+
this.hideOnClick = input(true, { ...(ngDevMode ? { debugName: "hideOnClick" } : /* istanbul ignore next */ {}), alias: 'tpHideOnClick' });
|
|
339
|
+
this.interactive = input(false, { ...(ngDevMode ? { debugName: "interactive" } : /* istanbul ignore next */ {}), alias: 'tpInteractive' });
|
|
340
|
+
this.interactiveBorder = input(defaultInteractiveBorder, { ...(ngDevMode ? { debugName: "interactiveBorder" } : /* istanbul ignore next */ {}), alias: 'tpInteractiveBorder' });
|
|
341
|
+
this.maxWidth = input(defaultMaxWidth, { ...(ngDevMode ? { debugName: "maxWidth" } : /* istanbul ignore next */ {}), alias: 'tpMaxWidth' });
|
|
351
342
|
// Note that some of the input signal types are declared explicitly because the compiler
|
|
352
343
|
// also uses types from `@popperjs/core` and requires a type annotation.
|
|
353
|
-
this.offset = input(defaultOffset, ...(ngDevMode ?
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
this.
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
this.
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
this.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
this.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
this.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
this.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
this.
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
this.variation = input(undefined, ...(ngDevMode ? [{ debugName: "variation", alias: 'tpVariation' }] : [{ alias: 'tpVariation' }]));
|
|
388
|
-
this.isEnabled = input(true, ...(ngDevMode ? [{ debugName: "isEnabled", alias: 'tpIsEnabled' }] : [{ alias: 'tpIsEnabled' }]));
|
|
389
|
-
this.className = input('', ...(ngDevMode ? [{ debugName: "className", alias: 'tpClassName' }] : [{ alias: 'tpClassName' }]));
|
|
390
|
-
this.onlyTextOverflow = input(false, ...(ngDevMode ? [{ debugName: "onlyTextOverflow", transform: coerceBooleanAttribute,
|
|
391
|
-
alias: 'tpOnlyTextOverflow' }] : [{
|
|
392
|
-
transform: coerceBooleanAttribute,
|
|
393
|
-
alias: 'tpOnlyTextOverflow',
|
|
394
|
-
}]));
|
|
395
|
-
this.staticWidthHost = input(false, ...(ngDevMode ? [{ debugName: "staticWidthHost", transform: coerceBooleanAttribute,
|
|
396
|
-
alias: 'tpStaticWidthHost' }] : [{
|
|
397
|
-
transform: coerceBooleanAttribute,
|
|
398
|
-
alias: 'tpStaticWidthHost',
|
|
399
|
-
}]));
|
|
400
|
-
this.data = input(undefined, ...(ngDevMode ? [{ debugName: "data", alias: 'tpData' }] : [{ alias: 'tpData' }]));
|
|
401
|
-
this.useHostWidth = input(false, ...(ngDevMode ? [{ debugName: "useHostWidth", transform: coerceBooleanAttribute,
|
|
402
|
-
alias: 'tpUseHostWidth' }] : [{
|
|
403
|
-
transform: coerceBooleanAttribute,
|
|
404
|
-
alias: 'tpUseHostWidth',
|
|
405
|
-
}]));
|
|
406
|
-
this.hideOnEscape = input(false, ...(ngDevMode ? [{ debugName: "hideOnEscape", transform: coerceBooleanAttribute,
|
|
407
|
-
alias: 'tpHideOnEscape' }] : [{
|
|
408
|
-
transform: coerceBooleanAttribute,
|
|
409
|
-
alias: 'tpHideOnEscape',
|
|
410
|
-
}]));
|
|
411
|
-
this.popperWidth = input(undefined, ...(ngDevMode ? [{ debugName: "popperWidth", alias: 'tpPopperWidth' }] : [{
|
|
412
|
-
alias: 'tpPopperWidth',
|
|
413
|
-
}]));
|
|
414
|
-
this.customHost = input(undefined, ...(ngDevMode ? [{ debugName: "customHost", alias: 'tpHost' }] : [{ alias: 'tpHost' }]));
|
|
415
|
-
this.onShow = output({ alias: 'tpOnShow' });
|
|
416
|
-
this.onHide = output({ alias: 'tpOnHide' });
|
|
417
|
-
this.isVisible = model(false, ...(ngDevMode ? [{ debugName: "isVisible", alias: 'tpIsVisible' }] : [{ alias: 'tpIsVisible' }]));
|
|
344
|
+
this.offset = input(defaultOffset, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), alias: 'tpOffset' });
|
|
345
|
+
this.placement = input(defaultPlacement, { ...(ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {}), alias: 'tpPlacement' });
|
|
346
|
+
this.popperOptions = input({}, { ...(ngDevMode ? { debugName: "popperOptions" } : /* istanbul ignore next */ {}), alias: 'tpPopperOptions' });
|
|
347
|
+
this.showOnCreate = input(false, { ...(ngDevMode ? { debugName: "showOnCreate" } : /* istanbul ignore next */ {}), alias: 'tpShowOnCreate' });
|
|
348
|
+
this.trigger = input(defaultTrigger, { ...(ngDevMode ? { debugName: "trigger" } : /* istanbul ignore next */ {}), alias: 'tpTrigger' });
|
|
349
|
+
this.triggerTarget = input(defaultTriggerTarget, { ...(ngDevMode ? { debugName: "triggerTarget" } : /* istanbul ignore next */ {}), alias: 'tpTriggerTarget' });
|
|
350
|
+
this.zIndex = input(defaultZIndex, { ...(ngDevMode ? { debugName: "zIndex" } : /* istanbul ignore next */ {}), alias: 'tpZIndex' });
|
|
351
|
+
this.animation = input(defaultAnimation, { ...(ngDevMode ? { debugName: "animation" } : /* istanbul ignore next */ {}), alias: 'tpAnimation' });
|
|
352
|
+
this.useTextContent = input(false, { ...(ngDevMode ? { debugName: "useTextContent" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
353
|
+
alias: 'tpUseTextContent' });
|
|
354
|
+
this.isLazy = input(false, { ...(ngDevMode ? { debugName: "isLazy" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
355
|
+
alias: 'tpIsLazy' });
|
|
356
|
+
this.variation = input(undefined, { ...(ngDevMode ? { debugName: "variation" } : /* istanbul ignore next */ {}), alias: 'tpVariation' });
|
|
357
|
+
this.isEnabled = input(true, { ...(ngDevMode ? { debugName: "isEnabled" } : /* istanbul ignore next */ {}), alias: 'tpIsEnabled' });
|
|
358
|
+
this.className = input('', { ...(ngDevMode ? { debugName: "className" } : /* istanbul ignore next */ {}), alias: 'tpClassName' });
|
|
359
|
+
this.onlyTextOverflow = input(false, { ...(ngDevMode ? { debugName: "onlyTextOverflow" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
360
|
+
alias: 'tpOnlyTextOverflow' });
|
|
361
|
+
this.staticWidthHost = input(false, { ...(ngDevMode ? { debugName: "staticWidthHost" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
362
|
+
alias: 'tpStaticWidthHost' });
|
|
363
|
+
this.data = input(undefined, { ...(ngDevMode ? { debugName: "data" } : /* istanbul ignore next */ {}), alias: 'tpData' });
|
|
364
|
+
/** Angular `inputBinding`/`outputBinding`/`twoWayBinding` descriptors forwarded to `createComponent`. */
|
|
365
|
+
this.bindings = input(undefined, { ...(ngDevMode ? { debugName: "bindings" } : /* istanbul ignore next */ {}), alias: 'tpBindings' });
|
|
366
|
+
/** Host directives (with optional bindings) forwarded to `createComponent`. */
|
|
367
|
+
this.directives = input(undefined, { ...(ngDevMode ? { debugName: "directives" } : /* istanbul ignore next */ {}), alias: 'tpDirectives' });
|
|
368
|
+
this.useHostWidth = input(false, { ...(ngDevMode ? { debugName: "useHostWidth" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
369
|
+
alias: 'tpUseHostWidth' });
|
|
370
|
+
this.hideOnEscape = input(false, { ...(ngDevMode ? { debugName: "hideOnEscape" } : /* istanbul ignore next */ {}), transform: coerceBooleanAttribute,
|
|
371
|
+
alias: 'tpHideOnEscape' });
|
|
372
|
+
this.tippyProps = input(undefined, { ...(ngDevMode ? { debugName: "tippyProps" } : /* istanbul ignore next */ {}), alias: 'tpTippyProps' });
|
|
373
|
+
this.popperWidth = input(undefined, { ...(ngDevMode ? { debugName: "popperWidth" } : /* istanbul ignore next */ {}), alias: 'tpPopperWidth' });
|
|
374
|
+
this.customHost = input(undefined, { ...(ngDevMode ? { debugName: "customHost" } : /* istanbul ignore next */ {}), alias: 'tpHost' });
|
|
375
|
+
this.tpOnShow = output({ alias: 'tpOnShow' });
|
|
376
|
+
this.tpOnHide = output({ alias: 'tpOnHide' });
|
|
377
|
+
this.isVisible = model(false, { ...(ngDevMode ? { debugName: "isVisible" } : /* istanbul ignore next */ {}), alias: 'tpIsVisible' });
|
|
418
378
|
this.visible = output({ alias: 'tpVisible' });
|
|
419
379
|
this.viewRef = null;
|
|
420
380
|
this.variationDefined = false;
|
|
@@ -429,7 +389,7 @@ class TippyDirective {
|
|
|
429
389
|
this.visibleInternal = new Subject();
|
|
430
390
|
this.visibilityObserverCleanup = null;
|
|
431
391
|
this.contentChanged = new Subject();
|
|
432
|
-
this.host = computed(() => this.customHost() || this.hostRef.nativeElement, ...(ngDevMode ? [{ debugName: "host" }] : []));
|
|
392
|
+
this.host = computed(() => this.customHost() || this.hostRef.nativeElement, ...(ngDevMode ? [{ debugName: "host" }] : /* istanbul ignore next */ []));
|
|
433
393
|
this.destroyRef = inject(DestroyRef);
|
|
434
394
|
this.tippyService = inject(TippyService);
|
|
435
395
|
this.isServer =
|
|
@@ -445,9 +405,25 @@ class TippyDirective {
|
|
|
445
405
|
this.vcr = inject(ViewContainerRef);
|
|
446
406
|
this.ngZone = inject(NgZone);
|
|
447
407
|
this.hostRef = inject(ElementRef);
|
|
408
|
+
this.loaderViewRef = null;
|
|
409
|
+
this.globalLoaderComponent = inject(TIPPY_LOADER_COMPONENT, { optional: true });
|
|
410
|
+
this.loaderTiming = inject(TIPPY_LOADER_TIMING);
|
|
448
411
|
if (this.isServer)
|
|
449
412
|
return;
|
|
450
413
|
this.setupListeners();
|
|
414
|
+
// `afterEveryRender` fires synchronously within Angular's CD cycle.
|
|
415
|
+
// This lets us update the enabled/disabled state of the instance BEFORE a
|
|
416
|
+
// synthetic mouseenter event is dispatched, which fixes test timing when
|
|
417
|
+
// Angular-triggered changes (content/style bindings) cause the overflow
|
|
418
|
+
// state to change. ResizeObserver (`overflowChanges`) remains as a fallback
|
|
419
|
+
// for non-Angular-triggered resize events (browser window resize, etc.).
|
|
420
|
+
afterEveryRender({
|
|
421
|
+
read: () => {
|
|
422
|
+
if (!this.onlyTextOverflow())
|
|
423
|
+
return;
|
|
424
|
+
untracked(() => this.checkOverflow(isElementOverflow(this.host())));
|
|
425
|
+
},
|
|
426
|
+
});
|
|
451
427
|
this.destroyRef.onDestroy(() => {
|
|
452
428
|
this.destroyed = true;
|
|
453
429
|
this.instance?.destroy();
|
|
@@ -458,10 +434,10 @@ class TippyDirective {
|
|
|
458
434
|
ngOnChanges(changes) {
|
|
459
435
|
if (this.isServer)
|
|
460
436
|
return;
|
|
461
|
-
// `isVisible`
|
|
462
|
-
//
|
|
437
|
+
// `isVisible` and `tippyProps` are not merged into `this.props`; they are
|
|
438
|
+
// handled separately (model signal and direct-spread effect respectively).
|
|
463
439
|
const changedProps = Object.keys(changes)
|
|
464
|
-
.filter((key) => key !== 'isVisible')
|
|
440
|
+
.filter((key) => key !== 'isVisible' && key !== 'tippyProps')
|
|
465
441
|
.reduce((accumulator, key) => ({ ...accumulator, [key]: changes[key].currentValue }), {});
|
|
466
442
|
// Variation defaults are applied only on the first call or when the variation
|
|
467
443
|
// input itself changes. Re-applying them on every ngOnChanges call would
|
|
@@ -483,9 +459,10 @@ class TippyDirective {
|
|
|
483
459
|
ngAfterViewInit() {
|
|
484
460
|
if (this.isServer)
|
|
485
461
|
return;
|
|
462
|
+
const onlyTextOverflow = this.onlyTextOverflow();
|
|
486
463
|
if (this.isLazy()) {
|
|
487
464
|
const hostInView$ = inView(this.host());
|
|
488
|
-
if (
|
|
465
|
+
if (onlyTextOverflow) {
|
|
489
466
|
hostInView$
|
|
490
467
|
.pipe(switchMap(() => this.isOverflowing$()), takeUntilDestroyed(this.destroyRef))
|
|
491
468
|
.subscribe((isElementOverflow) => {
|
|
@@ -498,7 +475,7 @@ class TippyDirective {
|
|
|
498
475
|
});
|
|
499
476
|
}
|
|
500
477
|
}
|
|
501
|
-
else if (
|
|
478
|
+
else if (onlyTextOverflow) {
|
|
502
479
|
this.isOverflowing$()
|
|
503
480
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
504
481
|
.subscribe((isElementOverflow) => {
|
|
@@ -513,6 +490,8 @@ class TippyDirective {
|
|
|
513
490
|
this.viewOptions$ = null;
|
|
514
491
|
this.viewRef?.destroy();
|
|
515
492
|
this.viewRef = null;
|
|
493
|
+
this.loaderViewRef?.destroy();
|
|
494
|
+
this.loaderViewRef = null;
|
|
516
495
|
}
|
|
517
496
|
/**
|
|
518
497
|
* This method is useful when you append to an element that you might remove from the DOM.
|
|
@@ -563,7 +542,7 @@ class TippyDirective {
|
|
|
563
542
|
}
|
|
564
543
|
setProps(props) {
|
|
565
544
|
this.props = props;
|
|
566
|
-
this.instance?.setProps(onlyTippyProps(props));
|
|
545
|
+
this.instance?.setProps({ ...onlyTippyProps(props), ...(this.tippyProps() ?? {}) });
|
|
567
546
|
}
|
|
568
547
|
setStatus(isEnabled) {
|
|
569
548
|
isEnabled ? this.instance?.enable() : this.instance?.disable();
|
|
@@ -571,83 +550,53 @@ class TippyDirective {
|
|
|
571
550
|
hasContent() {
|
|
572
551
|
return !!(this.content() || this.useTextContent());
|
|
573
552
|
}
|
|
574
|
-
createInstance() {
|
|
553
|
+
async createInstance() {
|
|
575
554
|
if (this.created || !this.hasContent()) {
|
|
576
555
|
return;
|
|
577
556
|
}
|
|
578
557
|
this.created = true;
|
|
579
|
-
this.
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
...(this.globalConfig.zIndexGetter
|
|
584
|
-
? { zIndex: this.globalConfig.zIndexGetter() }
|
|
585
|
-
: {}),
|
|
586
|
-
...onlyTippyProps(this.globalConfig),
|
|
587
|
-
...onlyTippyProps(this.props),
|
|
588
|
-
onMount: (instance) => {
|
|
589
|
-
const isVisible = true;
|
|
590
|
-
this.isVisible.set(isVisible);
|
|
591
|
-
this.visibleInternal.next(isVisible);
|
|
592
|
-
this.ngZone.run(() => this.visible.emit(isVisible));
|
|
593
|
-
this.useHostWidth() && this.listenToHostResize();
|
|
594
|
-
this.globalConfig.onMount?.(instance);
|
|
595
|
-
},
|
|
596
|
-
onCreate: (instance) => {
|
|
597
|
-
instance.popper.classList.add(`tippy-variation-${this.variation() || this.globalConfig.defaultVariation}`);
|
|
598
|
-
if (this.className()) {
|
|
599
|
-
for (const klass of normalizeClassName(this.className())) {
|
|
600
|
-
instance.popper.classList.add(klass);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
this.globalConfig.onCreate?.(instance);
|
|
604
|
-
if (this.isVisible() === true) {
|
|
605
|
-
instance.show();
|
|
606
|
-
}
|
|
607
|
-
},
|
|
608
|
-
onShow: (instance) => {
|
|
609
|
-
instance.reference.setAttribute('data-tippy-open', '');
|
|
610
|
-
// We're re-entering because we might create an Angular component,
|
|
611
|
-
// which should be done within the zone.
|
|
612
|
-
const content = this.ngZone.run(() => this.resolveContent(instance));
|
|
613
|
-
if (isString(content)) {
|
|
614
|
-
instance.setProps({ allowHTML: false });
|
|
615
|
-
if (!content?.trim()) {
|
|
616
|
-
this.disable();
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
-
this.enable();
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
instance.setContent(content);
|
|
623
|
-
this.hideOnEscape() && this.handleEscapeButton();
|
|
624
|
-
this.clearInstanceWidth(instance);
|
|
625
|
-
if (this.useHostWidth()) {
|
|
626
|
-
this.setInstanceWidth(instance, this.hostWidth);
|
|
627
|
-
}
|
|
628
|
-
else if (this.popperWidth()) {
|
|
629
|
-
this.setInstanceWidth(instance, this.popperWidth());
|
|
630
|
-
}
|
|
631
|
-
this.globalConfig.onShow?.(instance);
|
|
632
|
-
this.onShow.emit();
|
|
633
|
-
},
|
|
634
|
-
onHide(instance) {
|
|
635
|
-
instance.reference.removeAttribute('data-tippy-open');
|
|
636
|
-
},
|
|
637
|
-
onHidden: (instance) => {
|
|
638
|
-
this.onHidden(instance);
|
|
639
|
-
},
|
|
640
|
-
})
|
|
641
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
642
|
-
.subscribe((instance) => {
|
|
643
|
-
this.instance = instance;
|
|
644
|
-
this.setStatus(this.isEnabled());
|
|
645
|
-
this.setProps(this.props);
|
|
646
|
-
this.variation() === 'contextMenu' && this.handleContextMenu();
|
|
558
|
+
const tippy = await this.ngZone.runOutsideAngular(() => {
|
|
559
|
+
return firstValueFrom(this.tippyFactory.getTippyImpl(), {
|
|
560
|
+
defaultValue: undefined,
|
|
561
|
+
});
|
|
647
562
|
});
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
563
|
+
if (tippy === undefined || this.destroyRef.destroyed) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
this.instance = this.ngZone.runOutsideAngular(() => {
|
|
567
|
+
return tippy(this.host(), {
|
|
568
|
+
appendTo,
|
|
569
|
+
allowHTML: true,
|
|
570
|
+
...(this.globalConfig.zIndexGetter
|
|
571
|
+
? { zIndex: this.globalConfig.zIndexGetter() }
|
|
572
|
+
: {}),
|
|
573
|
+
...onlyTippyProps(this.globalConfig),
|
|
574
|
+
...onlyTippyProps(this.props),
|
|
575
|
+
...(this.tippyProps() ?? {}),
|
|
576
|
+
// Arrow functions or inline callbacks close over the method's lexical scope,
|
|
577
|
+
// causing V8 to allocate a Context object that indirectly retains the directive
|
|
578
|
+
// instance inside tippy.js after destroy. A JSBoundFunction has no [[Context]]
|
|
579
|
+
// slot — only { bound_target_function, bound_this, bound_arguments } — so no
|
|
580
|
+
// closure context is created. onHide is bound to null because it needs no `this`
|
|
581
|
+
// at all, fully breaking the retention chain (same reasoning as `appendTo` above).
|
|
582
|
+
onMount: this.onMount.bind(this),
|
|
583
|
+
onCreate: this.onCreate.bind(this),
|
|
584
|
+
onShow: this.onShow.bind(this),
|
|
585
|
+
onHide: function (instance) {
|
|
586
|
+
instance.reference.removeAttribute('data-tippy-open');
|
|
587
|
+
}.bind(null),
|
|
588
|
+
onHidden: this.onHidden.bind(this),
|
|
589
|
+
});
|
|
590
|
+
});
|
|
591
|
+
this.setStatus(this.isEnabled());
|
|
592
|
+
this.setProps(this.props);
|
|
593
|
+
this.variation() === 'contextMenu' && this.handleContextMenu();
|
|
594
|
+
}
|
|
595
|
+
// `resolvedContent` is provided when the caller already awaited a lazy factory.
|
|
596
|
+
// Passing it here avoids re-reading `this.content()`, which would still carry
|
|
597
|
+
// the raw factory function type and require another cast.
|
|
598
|
+
resolveContent(instance, resolvedContent) {
|
|
599
|
+
const content = (resolvedContent ?? this.content());
|
|
651
600
|
if (!this.viewOptions$ && !isString(content)) {
|
|
652
601
|
const injector = Injector.create({
|
|
653
602
|
providers: [
|
|
@@ -663,6 +612,8 @@ class TippyDirective {
|
|
|
663
612
|
this.instance.data = data;
|
|
664
613
|
this.viewOptions$ = {
|
|
665
614
|
injector,
|
|
615
|
+
bindings: this.bindings(),
|
|
616
|
+
directives: this.directives(),
|
|
666
617
|
};
|
|
667
618
|
}
|
|
668
619
|
else if (isTemplateRef(content)) {
|
|
@@ -675,22 +626,24 @@ class TippyDirective {
|
|
|
675
626
|
};
|
|
676
627
|
}
|
|
677
628
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
629
|
+
let newContent = this.ngZone.run(() => {
|
|
630
|
+
this.viewRef = this.viewService.createView(content, {
|
|
631
|
+
vcr: this.vcr,
|
|
632
|
+
...this.viewOptions$,
|
|
633
|
+
});
|
|
634
|
+
// We need to call `detectChanges` for OnPush components to update their content.
|
|
635
|
+
if (isComponent(content)) {
|
|
636
|
+
// `ɵcmp` is a component defition set for any component.
|
|
637
|
+
// Checking the `onPush` property of the component definition is a
|
|
638
|
+
// smarter way to determine whether we need to call `detectChanges()`,
|
|
639
|
+
// as users may be unaware of setting the binding.
|
|
640
|
+
const isOnPush = content.ɵcmp?.onPush;
|
|
641
|
+
if (isOnPush) {
|
|
642
|
+
this.viewRef.detectChanges();
|
|
643
|
+
}
|
|
691
644
|
}
|
|
692
|
-
|
|
693
|
-
|
|
645
|
+
return this.viewRef.getElement();
|
|
646
|
+
});
|
|
694
647
|
if (this.useTextContent()) {
|
|
695
648
|
newContent = instance.reference.textContent;
|
|
696
649
|
}
|
|
@@ -768,6 +721,26 @@ class TippyDirective {
|
|
|
768
721
|
instance.popper.style.maxWidth = inPixels;
|
|
769
722
|
instance.popper.firstElementChild.style.maxWidth = inPixels;
|
|
770
723
|
}
|
|
724
|
+
onMount(instance) {
|
|
725
|
+
const isVisible = true;
|
|
726
|
+
this.isVisible.set(isVisible);
|
|
727
|
+
this.visibleInternal.next(isVisible);
|
|
728
|
+
this.ngZone.run(() => this.visible.emit(isVisible));
|
|
729
|
+
this.useHostWidth() && this.listenToHostResize();
|
|
730
|
+
this.globalConfig.onMount?.(instance);
|
|
731
|
+
}
|
|
732
|
+
onCreate(instance) {
|
|
733
|
+
instance.popper.classList.add(`tippy-variation-${this.variation() || this.globalConfig.defaultVariation}`);
|
|
734
|
+
if (this.className()) {
|
|
735
|
+
for (const klass of normalizeClassName(this.className())) {
|
|
736
|
+
instance.popper.classList.add(klass);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
this.globalConfig.onCreate?.(instance);
|
|
740
|
+
if (this.isVisible() === true) {
|
|
741
|
+
instance.show();
|
|
742
|
+
}
|
|
743
|
+
}
|
|
771
744
|
onHidden(instance = this.instance) {
|
|
772
745
|
this.destroyView();
|
|
773
746
|
const isVisible = false;
|
|
@@ -777,11 +750,82 @@ class TippyDirective {
|
|
|
777
750
|
if (!this.destroyed) {
|
|
778
751
|
this.isVisible.set(isVisible);
|
|
779
752
|
this.ngZone.run(() => this.visible.emit(isVisible));
|
|
780
|
-
this.
|
|
753
|
+
this.tpOnHide.emit();
|
|
781
754
|
}
|
|
782
755
|
this.visibleInternal.next(isVisible);
|
|
783
756
|
this.globalConfig.onHidden?.(instance);
|
|
784
757
|
}
|
|
758
|
+
onShow(instance) {
|
|
759
|
+
// In onlyTextOverflow mode the tooltip must not appear when the host is
|
|
760
|
+
// not overflowing. Returning false from onShow prevents tippy from
|
|
761
|
+
// showing regardless of the instance's enabled/disabled state. This
|
|
762
|
+
// acts as a last-resort guard for cases where checkOverflow() hasn't
|
|
763
|
+
// been called yet (e.g. Angular's scheduler hasn't flushed CD between
|
|
764
|
+
// the content/width change and the trigger event).
|
|
765
|
+
if (this.onlyTextOverflow() && !isElementOverflow(this.host())) {
|
|
766
|
+
return false;
|
|
767
|
+
}
|
|
768
|
+
// The outer `onShow` must be synchronous so that `return false` above
|
|
769
|
+
// is seen as a boolean by tippy.js (an `async` function always returns
|
|
770
|
+
// a Promise, which is truthy and would never suppress the show).
|
|
771
|
+
this.handleOnShow(instance);
|
|
772
|
+
}
|
|
773
|
+
async handleOnShow(instance) {
|
|
774
|
+
instance.reference.setAttribute('data-tippy-open', '');
|
|
775
|
+
const maybeContent = this.content();
|
|
776
|
+
const isLazyFactory = !isComponentClass(maybeContent) && typeof maybeContent === 'function';
|
|
777
|
+
let resolvedContent;
|
|
778
|
+
if (isLazyFactory) {
|
|
779
|
+
const loaderComponent = this.globalLoaderComponent;
|
|
780
|
+
if (loaderComponent) {
|
|
781
|
+
const loaderElement = this.ngZone.run(() => {
|
|
782
|
+
this.loaderViewRef = this.viewService.createView(loaderComponent, {
|
|
783
|
+
vcr: this.vcr,
|
|
784
|
+
});
|
|
785
|
+
return this.loaderViewRef.getElement();
|
|
786
|
+
});
|
|
787
|
+
instance.setContent(loaderElement);
|
|
788
|
+
}
|
|
789
|
+
const cancelled = Symbol();
|
|
790
|
+
// combineLatest ensures we swap the loader only when both the component
|
|
791
|
+
// is ready AND the timing observable has emitted — guaranteeing the spinner
|
|
792
|
+
// is visible for at least the configured duration regardless of import speed.
|
|
793
|
+
// takeUntil + takeUntilDestroyed cancel if the tooltip hides or the
|
|
794
|
+
// directive is destroyed mid-flight.
|
|
795
|
+
const result = await firstValueFrom(combineLatest([
|
|
796
|
+
from(maybeContent()),
|
|
797
|
+
this.loaderTiming,
|
|
798
|
+
]).pipe(map(([component]) => component), takeUntil(this.visibleInternal.pipe(filter((v) => !v))), takeUntilDestroyed(this.destroyRef)), { defaultValue: cancelled });
|
|
799
|
+
this.loaderViewRef?.destroy();
|
|
800
|
+
this.loaderViewRef = null;
|
|
801
|
+
if (result === cancelled)
|
|
802
|
+
return;
|
|
803
|
+
resolvedContent = result;
|
|
804
|
+
}
|
|
805
|
+
// For non-lazy content this call is fully synchronous — skipping the
|
|
806
|
+
// await avoids a microtask tick that would otherwise cause a visible flicker.
|
|
807
|
+
const content = this.resolveContent(instance, resolvedContent);
|
|
808
|
+
if (isString(content)) {
|
|
809
|
+
instance.setProps({ allowHTML: false });
|
|
810
|
+
if (content?.trim()) {
|
|
811
|
+
this.enable();
|
|
812
|
+
}
|
|
813
|
+
else {
|
|
814
|
+
this.disable();
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
instance.setContent(content);
|
|
818
|
+
this.hideOnEscape() && this.handleEscapeButton();
|
|
819
|
+
this.clearInstanceWidth(instance);
|
|
820
|
+
if (this.useHostWidth()) {
|
|
821
|
+
this.setInstanceWidth(instance, this.hostWidth);
|
|
822
|
+
}
|
|
823
|
+
else if (this.popperWidth()) {
|
|
824
|
+
this.setInstanceWidth(instance, this.popperWidth());
|
|
825
|
+
}
|
|
826
|
+
this.globalConfig.onShow?.(instance);
|
|
827
|
+
this.tpOnShow.emit();
|
|
828
|
+
}
|
|
785
829
|
isOverflowing$() {
|
|
786
830
|
const host = this.host();
|
|
787
831
|
const notifiers$ = [overflowChanges(host)];
|
|
@@ -828,18 +872,26 @@ class TippyDirective {
|
|
|
828
872
|
this.created = false;
|
|
829
873
|
}
|
|
830
874
|
});
|
|
875
|
+
effect(() => {
|
|
876
|
+
const tippyProps = this.tippyProps();
|
|
877
|
+
untracked(() => this.instance?.setProps(tippyProps ?? {}));
|
|
878
|
+
});
|
|
831
879
|
}
|
|
832
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
833
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
880
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
881
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: TippyDirective, isStandalone: true, selector: "[tp]", inputs: { appendTo: { classPropertyName: "appendTo", publicName: "tpAppendTo", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "tp", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "tpDelay", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "tpDuration", isSignal: true, isRequired: false, transformFunction: null }, hideOnClick: { classPropertyName: "hideOnClick", publicName: "tpHideOnClick", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "tpInteractive", isSignal: true, isRequired: false, transformFunction: null }, interactiveBorder: { classPropertyName: "interactiveBorder", publicName: "tpInteractiveBorder", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "tpMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "tpOffset", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "tpPlacement", isSignal: true, isRequired: false, transformFunction: null }, popperOptions: { classPropertyName: "popperOptions", publicName: "tpPopperOptions", isSignal: true, isRequired: false, transformFunction: null }, showOnCreate: { classPropertyName: "showOnCreate", publicName: "tpShowOnCreate", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "tpTrigger", isSignal: true, isRequired: false, transformFunction: null }, triggerTarget: { classPropertyName: "triggerTarget", publicName: "tpTriggerTarget", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "tpZIndex", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "tpAnimation", isSignal: true, isRequired: false, transformFunction: null }, useTextContent: { classPropertyName: "useTextContent", publicName: "tpUseTextContent", isSignal: true, isRequired: false, transformFunction: null }, isLazy: { classPropertyName: "isLazy", publicName: "tpIsLazy", isSignal: true, isRequired: false, transformFunction: null }, variation: { classPropertyName: "variation", publicName: "tpVariation", isSignal: true, isRequired: false, transformFunction: null }, isEnabled: { classPropertyName: "isEnabled", publicName: "tpIsEnabled", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "tpClassName", isSignal: true, isRequired: false, transformFunction: null }, onlyTextOverflow: { classPropertyName: "onlyTextOverflow", publicName: "tpOnlyTextOverflow", isSignal: true, isRequired: false, transformFunction: null }, staticWidthHost: { classPropertyName: "staticWidthHost", publicName: "tpStaticWidthHost", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "tpData", isSignal: true, isRequired: false, transformFunction: null }, bindings: { classPropertyName: "bindings", publicName: "tpBindings", isSignal: true, isRequired: false, transformFunction: null }, directives: { classPropertyName: "directives", publicName: "tpDirectives", isSignal: true, isRequired: false, transformFunction: null }, useHostWidth: { classPropertyName: "useHostWidth", publicName: "tpUseHostWidth", isSignal: true, isRequired: false, transformFunction: null }, hideOnEscape: { classPropertyName: "hideOnEscape", publicName: "tpHideOnEscape", isSignal: true, isRequired: false, transformFunction: null }, tippyProps: { classPropertyName: "tippyProps", publicName: "tpTippyProps", isSignal: true, isRequired: false, transformFunction: null }, popperWidth: { classPropertyName: "popperWidth", publicName: "tpPopperWidth", isSignal: true, isRequired: false, transformFunction: null }, customHost: { classPropertyName: "customHost", publicName: "tpHost", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "tpIsVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tpOnShow: "tpOnShow", tpOnHide: "tpOnHide", isVisible: "tpIsVisibleChange", visible: "tpVisible" }, exportAs: ["tippy"], usesOnChanges: true, ngImport: i0 }); }
|
|
834
882
|
}
|
|
835
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TippyDirective, decorators: [{
|
|
836
884
|
type: Directive,
|
|
837
885
|
args: [{
|
|
838
886
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
839
887
|
selector: '[tp]',
|
|
840
888
|
exportAs: 'tippy',
|
|
841
889
|
}]
|
|
842
|
-
}], ctorParameters: () => [] });
|
|
890
|
+
}], ctorParameters: () => [], propDecorators: { appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpAppendTo", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "tp", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDelay", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDuration", required: false }] }], hideOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHideOnClick", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpInteractive", required: false }] }], interactiveBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpInteractiveBorder", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpMaxWidth", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpOffset", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPlacement", required: false }] }], popperOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPopperOptions", required: false }] }], showOnCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpShowOnCreate", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTrigger", required: false }] }], triggerTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTriggerTarget", required: false }] }], zIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpZIndex", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpAnimation", required: false }] }], useTextContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpUseTextContent", required: false }] }], isLazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsLazy", required: false }] }], variation: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpVariation", required: false }] }], isEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsEnabled", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpClassName", required: false }] }], onlyTextOverflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpOnlyTextOverflow", required: false }] }], staticWidthHost: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpStaticWidthHost", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpData", required: false }] }], bindings: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpBindings", required: false }] }], directives: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpDirectives", required: false }] }], useHostWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpUseHostWidth", required: false }] }], hideOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHideOnEscape", required: false }] }], tippyProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpTippyProps", required: false }] }], popperWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpPopperWidth", required: false }] }], customHost: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpHost", required: false }] }], tpOnShow: [{ type: i0.Output, args: ["tpOnShow"] }], tpOnHide: [{ type: i0.Output, args: ["tpOnHide"] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "tpIsVisible", required: false }] }, { type: i0.Output, args: ["tpIsVisibleChange"] }], visible: [{ type: i0.Output, args: ["tpVisible"] }] } });
|
|
891
|
+
function isComponentClass(content) {
|
|
892
|
+
return (typeof content === 'function' &&
|
|
893
|
+
/^class\s/.test(Function.prototype.toString.call(content)));
|
|
894
|
+
}
|
|
843
895
|
|
|
844
896
|
/**
|
|
845
897
|
* Generated bundle index. Do not edit.
|