ngx-pendo 2.2.1 → 2.3.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/fesm2022/ngx-pendo.mjs +25 -30
- package/fesm2022/ngx-pendo.mjs.map +1 -1
- package/index.d.ts +228 -5
- package/package.json +1 -1
- package/schematics/ng-add/index.spec.js +3 -2
- package/schematics/ng-add/index.spec.js.map +1 -1
- package/lib/ngx-pendo-id.directive.d.ts +0 -15
- package/lib/ngx-pendo-section.directive.d.ts +0 -14
- package/lib/ngx-pendo.injectors.d.ts +0 -5
- package/lib/ngx-pendo.interfaces.d.ts +0 -118
- package/lib/ngx-pendo.module.d.ts +0 -12
- package/lib/ngx-pendo.provide.d.ts +0 -2
- package/lib/ngx-pendo.service.d.ts +0 -65
- package/lib/ngx-pendo.tokens.d.ts +0 -6
- package/lib/ngx-pendo.types.d.ts +0 -4
- package/public-api.d.ts +0 -9
package/fesm2022/ngx-pendo.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject,
|
|
3
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { InjectionToken, inject, DOCUMENT, Injectable, input, signal, computed, Directive, contentChildren, effect, APP_INITIALIZER, isDevMode, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
4
3
|
import { interval } from 'rxjs';
|
|
5
4
|
|
|
6
5
|
const NGX_PENDO_SETTINGS_TOKEN = new InjectionToken('ngx-pendo-settings', {
|
|
@@ -25,12 +24,10 @@ const NGX_PENDO_CONTEXT = new InjectionToken('ngx-pendo-context', {
|
|
|
25
24
|
class NgxPendoService {
|
|
26
25
|
/**
|
|
27
26
|
* Constructor
|
|
28
|
-
*
|
|
29
|
-
* @param settings IPendoSettings
|
|
30
|
-
* @param pendo IPendo
|
|
31
27
|
*/
|
|
32
|
-
constructor(
|
|
33
|
-
this.pendo =
|
|
28
|
+
constructor() {
|
|
29
|
+
this.pendo = inject(NGX_PENDO_CONTEXT);
|
|
30
|
+
const settings = inject(NGX_PENDO_SETTINGS_TOKEN);
|
|
34
31
|
this.pendoIdFormatter = settings.pendoIdFormatter;
|
|
35
32
|
}
|
|
36
33
|
initialize(optionsOrVisitor, account) {
|
|
@@ -97,25 +94,18 @@ class NgxPendoService {
|
|
|
97
94
|
disableDebugging() {
|
|
98
95
|
this.pendo?.disableDebugging();
|
|
99
96
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
98
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
|
|
102
99
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoService, decorators: [{
|
|
104
101
|
type: Injectable,
|
|
105
102
|
args: [{
|
|
106
103
|
providedIn: 'root'
|
|
107
104
|
}]
|
|
108
|
-
}], ctorParameters: () => [
|
|
109
|
-
type: Inject,
|
|
110
|
-
args: [NGX_PENDO_SETTINGS_TOKEN]
|
|
111
|
-
}] }, { type: undefined, decorators: [{
|
|
112
|
-
type: Inject,
|
|
113
|
-
args: [NGX_PENDO_CONTEXT]
|
|
114
|
-
}] }] });
|
|
105
|
+
}], ctorParameters: () => [] });
|
|
115
106
|
|
|
116
107
|
class NgxPendoIdDirective {
|
|
117
|
-
constructor(
|
|
118
|
-
this.service = service;
|
|
108
|
+
constructor() {
|
|
119
109
|
this.pendoId = input('', { alias: 'ngx-pendo-id' });
|
|
120
110
|
this.inherit = input(true, { alias: 'ngx-pendo-inherit' });
|
|
121
111
|
this.parent = signal(undefined);
|
|
@@ -129,11 +119,12 @@ class NgxPendoIdDirective {
|
|
|
129
119
|
return this.service.formatPendoId(...pendoSections, this.pendoId());
|
|
130
120
|
});
|
|
131
121
|
this.disableInherit = computed(() => (this.inherit() ? undefined : true));
|
|
122
|
+
this.service = inject(NgxPendoService);
|
|
132
123
|
}
|
|
133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
134
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoIdDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
125
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.3", type: NgxPendoIdDirective, isStandalone: true, selector: "[ngx-pendo-id]", inputs: { pendoId: { classPropertyName: "pendoId", publicName: "ngx-pendo-id", isSignal: true, isRequired: false, transformFunction: null }, inherit: { classPropertyName: "inherit", publicName: "ngx-pendo-inherit", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-pendo-id": "mergedPendoId()", "attr.ngx-pendo-disable-inherit": "disableInherit()" } }, ngImport: i0 }); }
|
|
135
126
|
}
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
|
|
137
128
|
type: Directive,
|
|
138
129
|
args: [{
|
|
139
130
|
selector: '[ngx-pendo-id]',
|
|
@@ -143,7 +134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
143
134
|
'[attr.ngx-pendo-disable-inherit]': 'disableInherit()'
|
|
144
135
|
}
|
|
145
136
|
}]
|
|
146
|
-
}]
|
|
137
|
+
}] });
|
|
147
138
|
|
|
148
139
|
class NgxPendoSectionDirective {
|
|
149
140
|
constructor() {
|
|
@@ -161,10 +152,10 @@ class NgxPendoSectionDirective {
|
|
|
161
152
|
});
|
|
162
153
|
});
|
|
163
154
|
}
|
|
164
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
165
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
156
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.0.3", type: NgxPendoSectionDirective, isStandalone: true, selector: "[ngx-pendo-section]", inputs: { pendoSection: { classPropertyName: "pendoSection", publicName: "ngx-pendo-section", isSignal: true, isRequired: false, transformFunction: null }, inherit: { classPropertyName: "inherit", publicName: "ngx-pendo-inherit", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-pendo-section": "pendoSection()", "attr.ngx-pendo-disable-inherit": "disableInherit()" } }, queries: [{ propertyName: "idDirectives", predicate: NgxPendoIdDirective, isSignal: true }, { propertyName: "sectionDirectivs", predicate: NgxPendoSectionDirective, isSignal: true }], ngImport: i0 }); }
|
|
166
157
|
}
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
|
|
168
159
|
type: Directive,
|
|
169
160
|
args: [{
|
|
170
161
|
selector: '[ngx-pendo-section]',
|
|
@@ -220,6 +211,10 @@ function pendoInitializer($settings, window) {
|
|
|
220
211
|
};
|
|
221
212
|
}
|
|
222
213
|
|
|
214
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
215
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
216
|
+
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
217
|
+
|
|
223
218
|
class NgxPendoModule {
|
|
224
219
|
static forRoot(settings) {
|
|
225
220
|
return {
|
|
@@ -238,11 +233,11 @@ class NgxPendoModule {
|
|
|
238
233
|
ngModule: NgxPendoModule
|
|
239
234
|
};
|
|
240
235
|
}
|
|
241
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
242
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
243
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
236
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
237
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
|
|
238
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoModule }); }
|
|
244
239
|
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoModule, decorators: [{
|
|
246
241
|
type: NgModule,
|
|
247
242
|
args: [{
|
|
248
243
|
imports: [NgxPendoIdDirective, NgxPendoSectionDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-pendo.mjs","sources":["../../../projects/ngx-pendo/src/lib/ngx-pendo.tokens.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.service.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo-id.directive.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo-section.directive.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.injectors.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.module.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.provide.ts","../../../projects/ngx-pendo/src/public-api.ts","../../../projects/ngx-pendo/src/ngx-pendo.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { InjectionToken, inject } from '@angular/core';\nimport { PendoWindow } from './ngx-pendo.types';\nimport { IPendo, IPendoSettings } from './ngx-pendo.interfaces';\n\nexport const NGX_PENDO_SETTINGS_TOKEN = new InjectionToken<IPendoSettings>('ngx-pendo-settings', {\n providedIn: 'root',\n factory: () => ({ pendoApiKey: '' })\n});\n\nexport const NGX_PENDO_WINDOW = new InjectionToken<PendoWindow>('ngx-pendo-window', {\n providedIn: 'root',\n factory: () => {\n const { defaultView } = inject(DOCUMENT);\n\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n\n return defaultView;\n }\n});\n\nexport const NGX_PENDO_CONTEXT = new InjectionToken<IPendo>('ngx-pendo-context', {\n providedIn: 'root',\n factory: () => inject(NGX_PENDO_WINDOW).pendo!\n});\n","import { Injectable, Inject } from '@angular/core';\nimport { NGX_PENDO_CONTEXT, NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\nimport { IAccount, IPendo, IPendoOptions, IPendoSettings, IVisitor } from './ngx-pendo.interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxPendoService {\n private pendoIdFormatter?: (pendoId: string) => string;\n\n /**\n * Constructor\n *\n * @param settings IPendoSettings\n * @param pendo IPendo\n */\n constructor(\n @Inject(NGX_PENDO_SETTINGS_TOKEN) settings: IPendoSettings,\n @Inject(NGX_PENDO_CONTEXT) private pendo: IPendo\n ) {\n this.pendoIdFormatter = settings.pendoIdFormatter;\n }\n\n /**\n * Completely re-initialize the Agent with new options\n *\n * @param optionsOrVisitor IPendoOptions | IVisitor\n * @param account IAccount\n */\n initialize(options: IPendoOptions): void;\n initialize(visitor: IVisitor, account?: IAccount): void;\n initialize(optionsOrVisitor: IPendoOptions | IVisitor, account?: IAccount): void {\n if ('id' in optionsOrVisitor) {\n this.pendo?.initialize({ visitor: optionsOrVisitor, account });\n } else {\n this.pendo?.initialize(optionsOrVisitor);\n }\n }\n\n /**\n * Send an identify event and a meta event.\n *\n * @param visitor IVisitor | string\n * @param account IAccount | string\n */\n identify(visitor: string, account?: string): void;\n identify(visitor: IVisitor, account?: IAccount): void;\n identify(visitor: IVisitor | string, account?: IAccount | string): void {\n if (typeof visitor === 'string' && (!account || typeof account === 'string')) {\n this.pendo?.identify(visitor, account);\n } else {\n this.pendo?.identify({ visitor: <IVisitor>visitor, account: <IAccount>account });\n }\n }\n\n /**\n * Updates metadata object for the Pendo agent.\n *\n * @param options IPendoOptions\n */\n updateOptions(options: IPendoOptions): void {\n this.pendo?.updateOptions(options);\n }\n\n /**\n * Format Pendo\n *\n * @param ids string[]\n */\n formatPendoId(...ids: string[]): string {\n return (this.pendoIdFormatter ? ids.map(id => this.pendoIdFormatter!(id)) : ids).join('.');\n }\n\n /**\n * Shuts down the agent and cleans up all timers and listeners.\n */\n teardown(): void {\n this.pendo?.teardown();\n }\n\n /**\n * Checks if a given visitor id string is anonymous.\n * If no argument is given, calls with pendo.getVisitorId() to check current visitor status.\n */\n isAnonymousVisitor(visitorId?: string): boolean {\n return this.pendo?.isAnonymousVisitor(visitorId);\n }\n\n /**\n * Removes current visitor id and account id.\n * Triggers an identify event and reloads with a new anonymous visitor.\n */\n clearSession(): void {\n this.pendo?.clearSession();\n }\n\n /**\n * Loads Pendo Debugger and extends the global pendo object with additional functionality for debugging purposes.\n */\n enableDebugging(): void {\n this.pendo?.enableDebugging();\n }\n\n /**\n * Removes Pendo Debugger extension.\n */\n disableDebugging(): void {\n this.pendo?.disableDebugging();\n }\n}\n","import { Directive, input, computed, signal } from '@angular/core';\nimport { IPendoDirective } from './ngx-pendo.interfaces';\nimport { NgxPendoService } from './ngx-pendo.service';\nimport { NgxPendoSectionDirective } from './ngx-pendo-section.directive';\n\n@Directive({\n selector: '[ngx-pendo-id]',\n standalone: true,\n host: {\n '[attr.data-pendo-id]': 'mergedPendoId()',\n '[attr.ngx-pendo-disable-inherit]': 'disableInherit()'\n }\n})\nexport class NgxPendoIdDirective implements IPendoDirective {\n pendoId = input<string>('', { alias: 'ngx-pendo-id' });\n\n inherit = input<boolean>(true, { alias: 'ngx-pendo-inherit' });\n\n parent = signal<NgxPendoSectionDirective | undefined>(undefined);\n\n mergedPendoId = computed<string>(() => {\n const pendoSections = [];\n\n let cur = this.inherit() ? this.parent() : null;\n while (cur) {\n pendoSections.unshift(cur.pendoSection());\n cur = cur.inherit() ? cur.parent() : null;\n }\n\n return this.service.formatPendoId(...pendoSections, this.pendoId());\n });\n\n disableInherit = computed<boolean | undefined>(() => (this.inherit() ? undefined : true));\n\n constructor(private service: NgxPendoService) {}\n}\n","import { Directive, input, computed, signal, contentChildren, effect } from '@angular/core';\nimport { IPendoDirective } from './ngx-pendo.interfaces';\nimport { NgxPendoIdDirective } from './ngx-pendo-id.directive';\n\n@Directive({\n selector: '[ngx-pendo-section]',\n standalone: true,\n host: {\n '[attr.data-pendo-section]': 'pendoSection()',\n '[attr.ngx-pendo-disable-inherit]': 'disableInherit()'\n }\n})\nexport class NgxPendoSectionDirective implements IPendoDirective {\n pendoSection = input<string>('', { alias: 'ngx-pendo-section' });\n\n inherit = input<boolean>(true, { alias: 'ngx-pendo-inherit' });\n\n parent = signal<NgxPendoSectionDirective | undefined>(undefined);\n\n idDirectives = contentChildren(NgxPendoIdDirective, { descendants: false });\n\n sectionDirectivs = contentChildren(NgxPendoSectionDirective, { descendants: false });\n\n disableInherit = computed<boolean | undefined>(() => (this.inherit() ? undefined : true));\n\n constructor() {\n effect(() => {\n [...this.idDirectives(), ...this.sectionDirectivs()].forEach(item => {\n if (item !== this) {\n item.parent.set(this);\n }\n });\n });\n }\n}\n","import { APP_INITIALIZER, isDevMode, Provider } from '@angular/core';\nimport { interval } from 'rxjs';\nimport { IPendoSettings } from './ngx-pendo.interfaces';\nimport { NGX_PENDO_WINDOW, NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\nimport { PendoWindow } from './ngx-pendo.types';\n\nconst DEFAULT_PENDO_SCRIPT_ORIGIN = 'https://cdn.pendo.io';\n\n// export const NGX_PENDO_INITIALIZER_PROVIDER = provideAppInitializer(() => {\n// const initializerFn = pendoInitializer(inject(NGX_PENDO_SETTINGS_TOKEN), inject(NGX_PENDO_WINDOW));\n// return initializerFn();\n// });\n\n// Keep the `APP_INITIALIZER` to support angular 17 and 18 version\nexport const NGX_PENDO_INITIALIZER_PROVIDER: Provider = {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: pendoInitializer,\n deps: [NGX_PENDO_SETTINGS_TOKEN, NGX_PENDO_WINDOW]\n};\n\nexport function pendoInitializer($settings: IPendoSettings, window: PendoWindow): () => Promise<void> {\n return async () => {\n const { pendoApiKey, pendoScriptOrigin } = $settings;\n if (!pendoApiKey) {\n if (isDevMode()) {\n console.error('Empty api key for Pendo. Make sure to provide one when initializing NgxPendoModule.');\n }\n\n return;\n }\n\n await new Promise<void>(resolve => {\n const script = document.createElement('script');\n script.async = true;\n script.src = `${pendoScriptOrigin || DEFAULT_PENDO_SCRIPT_ORIGIN}/agent/static/${pendoApiKey}/pendo.js`;\n document.head.appendChild(script);\n script.onerror = async () => {\n // The script may have been blocked by an ad blocker\n console.error('The pendo script may have been blocked.');\n resolve();\n };\n script.onload = async () => {\n // when enableDebugging should load extra js\n const sub = interval(100).subscribe(() => {\n if (window.pendo) {\n sub.unsubscribe();\n resolve();\n }\n });\n };\n });\n };\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { NgxPendoIdDirective } from './ngx-pendo-id.directive';\nimport { NgxPendoSectionDirective } from './ngx-pendo-section.directive';\nimport { NGX_PENDO_INITIALIZER_PROVIDER } from './ngx-pendo.injectors';\nimport { IPendoSettings } from './ngx-pendo.interfaces';\nimport { NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\n\n@NgModule({\n imports: [NgxPendoIdDirective, NgxPendoSectionDirective],\n exports: [NgxPendoIdDirective, NgxPendoSectionDirective]\n})\nexport class NgxPendoModule {\n static forRoot(settings: IPendoSettings): ModuleWithProviders<NgxPendoModule> {\n return {\n ngModule: NgxPendoModule,\n providers: [\n {\n provide: NGX_PENDO_SETTINGS_TOKEN,\n useValue: settings\n },\n settings.pendoInitializerProvider || NGX_PENDO_INITIALIZER_PROVIDER\n ]\n };\n }\n\n static forChild(): ModuleWithProviders<NgxPendoModule> {\n return {\n ngModule: NgxPendoModule\n };\n }\n}\n","import { makeEnvironmentProviders } from '@angular/core';\nimport { NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\nimport { NGX_PENDO_INITIALIZER_PROVIDER } from './ngx-pendo.injectors';\nimport { IPendoSettings } from './ngx-pendo.interfaces';\n\nexport function provideNgxPendo(settings: IPendoSettings) {\n return makeEnvironmentProviders([\n {\n provide: NGX_PENDO_SETTINGS_TOKEN,\n useValue: settings\n },\n settings.pendoInitializerProvider || NGX_PENDO_INITIALIZER_PROVIDER\n ]);\n}\n","/*\n * Public API Surface of ngx-pendo\n */\n\nexport * from './lib/ngx-pendo-id.directive';\nexport * from './lib/ngx-pendo-section.directive';\nexport * from './lib/ngx-pendo.service';\nexport * from './lib/ngx-pendo.injectors';\nexport * from './lib/ngx-pendo.interfaces';\nexport * from './lib/ngx-pendo.module';\nexport * from './lib/ngx-pendo.provide';\nexport * from './lib/ngx-pendo.tokens';\nexport * from './lib/ngx-pendo.types';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AA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;AACxD,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,wBAAwB;AACxD,iBAAA;;;ACLK,SAAU,eAAe,CAAC,QAAwB,EAAA;AACtD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,wBAAwB;AACjC,YAAA,QAAQ,EAAE;AACX,SAAA;QACD,QAAQ,CAAC,wBAAwB,IAAI;AACtC,KAAA,CAAC;AACJ;;ACbA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-pendo.mjs","sources":["../../../projects/ngx-pendo/src/lib/ngx-pendo.tokens.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.service.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo-id.directive.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo-section.directive.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.injectors.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.interfaces.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.module.ts","../../../projects/ngx-pendo/src/lib/ngx-pendo.provide.ts","../../../projects/ngx-pendo/src/public-api.ts","../../../projects/ngx-pendo/src/ngx-pendo.ts"],"sourcesContent":["import { InjectionToken, inject, DOCUMENT } from '@angular/core';\nimport { PendoWindow } from './ngx-pendo.types';\nimport { IPendo, IPendoSettings } from './ngx-pendo.interfaces';\n\nexport const NGX_PENDO_SETTINGS_TOKEN = new InjectionToken<IPendoSettings>('ngx-pendo-settings', {\n providedIn: 'root',\n factory: () => ({ pendoApiKey: '' })\n});\n\nexport const NGX_PENDO_WINDOW = new InjectionToken<PendoWindow>('ngx-pendo-window', {\n providedIn: 'root',\n factory: () => {\n const { defaultView } = inject(DOCUMENT);\n\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n\n return defaultView;\n }\n});\n\nexport const NGX_PENDO_CONTEXT = new InjectionToken<IPendo>('ngx-pendo-context', {\n providedIn: 'root',\n factory: () => inject(NGX_PENDO_WINDOW).pendo!\n});\n","import { Injectable, inject } from '@angular/core';\nimport { NGX_PENDO_CONTEXT, NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\nimport { IAccount, IPendoOptions, IVisitor } from './ngx-pendo.interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxPendoService {\n private pendoIdFormatter?: (pendoId: string) => string;\n\n private pendo = inject(NGX_PENDO_CONTEXT);\n\n /**\n * Constructor\n */\n constructor() {\n const settings = inject(NGX_PENDO_SETTINGS_TOKEN);\n this.pendoIdFormatter = settings.pendoIdFormatter;\n }\n\n /**\n * Completely re-initialize the Agent with new options\n *\n * @param optionsOrVisitor IPendoOptions | IVisitor\n * @param account IAccount\n */\n initialize(options: IPendoOptions): void;\n initialize(visitor: IVisitor, account?: IAccount): void;\n initialize(optionsOrVisitor: IPendoOptions | IVisitor, account?: IAccount): void {\n if ('id' in optionsOrVisitor) {\n this.pendo?.initialize({ visitor: optionsOrVisitor, account });\n } else {\n this.pendo?.initialize(optionsOrVisitor);\n }\n }\n\n /**\n * Send an identify event and a meta event.\n *\n * @param visitor IVisitor | string\n * @param account IAccount | string\n */\n identify(visitor: string, account?: string): void;\n identify(visitor: IVisitor, account?: IAccount): void;\n identify(visitor: IVisitor | string, account?: IAccount | string): void {\n if (typeof visitor === 'string' && (!account || typeof account === 'string')) {\n this.pendo?.identify(visitor, account);\n } else {\n this.pendo?.identify({ visitor: visitor as IVisitor, account: account as IAccount });\n }\n }\n\n /**\n * Updates metadata object for the Pendo agent.\n *\n * @param options IPendoOptions\n */\n updateOptions(options: IPendoOptions): void {\n this.pendo?.updateOptions(options);\n }\n\n /**\n * Format Pendo\n *\n * @param ids string[]\n */\n formatPendoId(...ids: string[]): string {\n return (this.pendoIdFormatter ? ids.map(id => this.pendoIdFormatter!(id)) : ids).join('.');\n }\n\n /**\n * Shuts down the agent and cleans up all timers and listeners.\n */\n teardown(): void {\n this.pendo?.teardown();\n }\n\n /**\n * Checks if a given visitor id string is anonymous.\n * If no argument is given, calls with pendo.getVisitorId() to check current visitor status.\n */\n isAnonymousVisitor(visitorId?: string): boolean {\n return this.pendo?.isAnonymousVisitor(visitorId);\n }\n\n /**\n * Removes current visitor id and account id.\n * Triggers an identify event and reloads with a new anonymous visitor.\n */\n clearSession(): void {\n this.pendo?.clearSession();\n }\n\n /**\n * Loads Pendo Debugger and extends the global pendo object with additional functionality for debugging purposes.\n */\n enableDebugging(): void {\n this.pendo?.enableDebugging();\n }\n\n /**\n * Removes Pendo Debugger extension.\n */\n disableDebugging(): void {\n this.pendo?.disableDebugging();\n }\n}\n","import { Directive, inject, input, computed, signal } from '@angular/core';\nimport { IPendoDirective } from './ngx-pendo.interfaces';\nimport { NgxPendoService } from './ngx-pendo.service';\nimport { NgxPendoSectionDirective } from './ngx-pendo-section.directive';\n\n@Directive({\n selector: '[ngx-pendo-id]',\n standalone: true,\n host: {\n '[attr.data-pendo-id]': 'mergedPendoId()',\n '[attr.ngx-pendo-disable-inherit]': 'disableInherit()'\n }\n})\nexport class NgxPendoIdDirective implements IPendoDirective {\n pendoId = input<string>('', { alias: 'ngx-pendo-id' });\n\n inherit = input<boolean>(true, { alias: 'ngx-pendo-inherit' });\n\n parent = signal<NgxPendoSectionDirective | undefined>(undefined);\n\n mergedPendoId = computed<string>(() => {\n const pendoSections = [];\n\n let cur = this.inherit() ? this.parent() : null;\n while (cur) {\n pendoSections.unshift(cur.pendoSection());\n cur = cur.inherit() ? cur.parent() : null;\n }\n\n return this.service.formatPendoId(...pendoSections, this.pendoId());\n });\n\n disableInherit = computed<boolean | undefined>(() => (this.inherit() ? undefined : true));\n\n service = inject(NgxPendoService);\n}\n","import { Directive, input, computed, signal, contentChildren, effect } from '@angular/core';\nimport { IPendoDirective } from './ngx-pendo.interfaces';\nimport { NgxPendoIdDirective } from './ngx-pendo-id.directive';\n\n@Directive({\n selector: '[ngx-pendo-section]',\n standalone: true,\n host: {\n '[attr.data-pendo-section]': 'pendoSection()',\n '[attr.ngx-pendo-disable-inherit]': 'disableInherit()'\n }\n})\nexport class NgxPendoSectionDirective implements IPendoDirective {\n pendoSection = input<string>('', { alias: 'ngx-pendo-section' });\n\n inherit = input<boolean>(true, { alias: 'ngx-pendo-inherit' });\n\n parent = signal<NgxPendoSectionDirective | undefined>(undefined);\n\n idDirectives = contentChildren(NgxPendoIdDirective, { descendants: false });\n\n sectionDirectivs = contentChildren(NgxPendoSectionDirective, { descendants: false });\n\n disableInherit = computed<boolean | undefined>(() => (this.inherit() ? undefined : true));\n\n constructor() {\n effect(() => {\n [...this.idDirectives(), ...this.sectionDirectivs()].forEach(item => {\n if (item !== this) {\n item.parent.set(this);\n }\n });\n });\n }\n}\n","import { APP_INITIALIZER, isDevMode, Provider } from '@angular/core';\nimport { interval } from 'rxjs';\nimport { IPendoSettings } from './ngx-pendo.interfaces';\nimport { NGX_PENDO_WINDOW, NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\nimport { PendoWindow } from './ngx-pendo.types';\n\nconst DEFAULT_PENDO_SCRIPT_ORIGIN = 'https://cdn.pendo.io';\n\n// export const NGX_PENDO_INITIALIZER_PROVIDER = provideAppInitializer(() => {\n// const initializerFn = pendoInitializer(inject(NGX_PENDO_SETTINGS_TOKEN), inject(NGX_PENDO_WINDOW));\n// return initializerFn();\n// });\n\n// Keep the `APP_INITIALIZER` to support angular 17 and 18 version\nexport const NGX_PENDO_INITIALIZER_PROVIDER: Provider = {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: pendoInitializer,\n deps: [NGX_PENDO_SETTINGS_TOKEN, NGX_PENDO_WINDOW]\n};\n\nexport function pendoInitializer($settings: IPendoSettings, window: PendoWindow): () => Promise<void> {\n return async () => {\n const { pendoApiKey, pendoScriptOrigin } = $settings;\n if (!pendoApiKey) {\n if (isDevMode()) {\n console.error('Empty api key for Pendo. Make sure to provide one when initializing NgxPendoModule.');\n }\n\n return;\n }\n\n await new Promise<void>(resolve => {\n const script = document.createElement('script');\n script.async = true;\n script.src = `${pendoScriptOrigin || DEFAULT_PENDO_SCRIPT_ORIGIN}/agent/static/${pendoApiKey}/pendo.js`;\n document.head.appendChild(script);\n script.onerror = async () => {\n // The script may have been blocked by an ad blocker\n console.error('The pendo script may have been blocked.');\n resolve();\n };\n script.onload = async () => {\n // when enableDebugging should load extra js\n const sub = interval(100).subscribe(() => {\n if (window.pendo) {\n sub.unsubscribe();\n resolve();\n }\n });\n };\n });\n };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\n\nimport { InputSignal, WritableSignal, Provider } from '@angular/core';\n\nexport interface IPendoSettings {\n pendoApiKey: string;\n pendoScriptOrigin?: string;\n pendoIdFormatter?: (pendoId: string) => string;\n pendoInitializerProvider?: Provider;\n}\n\nexport interface IPendoDirective {\n inherit: InputSignal<boolean>;\n parent: WritableSignal<IPendoDirective | undefined>;\n}\n\nexport interface IVisitor {\n id: string;\n [key: string]: string;\n}\n\nexport interface IAccount {\n id: string;\n [key: string]: string;\n}\n\nexport interface IPendoOptions {\n visitor?: IVisitor;\n account?: IAccount;\n // Core\n additionalApiKeys?: string[];\n annotateUrl?: Function;\n apiKey?: string;\n appAutoOrdering?: string[];\n autoFrameInstall?: boolean;\n contentHost?: string;\n cookieDomain?: string;\n dataHost?: string;\n disableCookies?: boolean;\n disableFeedback?: boolean;\n disablePendo?: boolean;\n disablePersistence?: boolean;\n frameIdentitySync?: boolean;\n ignoreHashRouting?: boolean;\n initializeImmediately?: boolean;\n observeShadowRoots?: boolean;\n leaderKey?: string[];\n localStorageOnly?: boolean;\n preferBroadcastChannel?: boolean;\n preferMutationObserver?: boolean;\n preventUnloadListener?: boolean;\n queryStringWhitelist?: string[] | Function;\n sanitizeUrl?: Function;\n selfHostedAgentUrl?: string;\n sendEventsWithPostOnly?: boolean;\n // Analytics\n allowedText?: string[];\n analytics?: {\n excludeEvents?: string[];\n };\n enableDebugEvents?: boolean;\n eventPropertyMatchParents?: boolean;\n excludeAllText?: boolean;\n excludeNonGuideAnalytics?: boolean;\n syntheticClicks?: {\n elementRemoval?: boolean;\n targetChanged?: boolean;\n };\n // Guides\n disableGlobalCSS?: boolean;\n disableGuidePseudoStyles?: boolean;\n disablePrefetch?: boolean;\n enableDesignerKeyboardShortcut?: boolean;\n enableGuideTimeout?: boolean;\n guideSeenTimeoutLength?: number;\n guideValidation?: boolean;\n guides?: {\n attachPoint?: string | Function;\n delay?: boolean;\n disabled?: boolean;\n globalScripts?: any[];\n timeout?: number;\n tooltip?: {\n arrowSize?: number;\n };\n };\n preventCodeInjection?: boolean;\n}\n\nexport interface ISerializedMetadata {}\n\nexport interface IPendo {\n // Agent\n additionalApiKeys: string[];\n apiKey: string;\n getVersion: () => string;\n initialize: (options: IPendoOptions) => void;\n isReady: () => boolean;\n teardown: () => void;\n\n // Classic Guides\n hideLauncher: () => void;\n removeLauncher: () => void;\n showLauncher: () => void;\n toggleLauncher: () => void;\n\n // TODO: DOM\n\n // TODO: DOMQuery\n\n // Debugging\n addDebuggingFunctions: () => void;\n disableDebugging: () => void;\n disableLogging: () => void;\n enableDebugging: () => void;\n enableLogging: () => void;\n isDebuggingEnabled: () => void;\n logPublic: () => void;\n\n // TODO: Events\n\n // TODO: Guides\n\n // Identity\n clearSession: () => void;\n generate_unique_id: (prefix?: string) => string;\n getAccountId: () => string | null;\n get_account_id: () => string | null;\n getSerializedMetadata: () => ISerializedMetadata;\n getVisitorId: () => string;\n get_visitor_id: () => string;\n identify: (options: Pick<IPendoOptions, 'visitor' | 'account'> | string, accountId?: string) => void;\n isAnonymousVisitor: (visitorId?: string) => boolean;\n set_account_id: (newAccountId?: string) => void;\n set_visitor_id: (newVisitorId?: string) => void;\n updateOptions: (options: IPendoOptions) => void;\n\n // URL\n url: {\n get: () => string;\n };\n normalizedUrl: string;\n getCurrentUrl: () => string;\n getNormalizedUrl: () => string;\n pageLoad: (url: string) => void;\n\n // TODO: Utility\n\n // TODO: Validation\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { NgxPendoIdDirective } from './ngx-pendo-id.directive';\nimport { NgxPendoSectionDirective } from './ngx-pendo-section.directive';\nimport { NGX_PENDO_INITIALIZER_PROVIDER } from './ngx-pendo.injectors';\nimport { IPendoSettings } from './ngx-pendo.interfaces';\nimport { NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\n\n@NgModule({\n imports: [NgxPendoIdDirective, NgxPendoSectionDirective],\n exports: [NgxPendoIdDirective, NgxPendoSectionDirective]\n})\nexport class NgxPendoModule {\n static forRoot(settings: IPendoSettings): ModuleWithProviders<NgxPendoModule> {\n return {\n ngModule: NgxPendoModule,\n providers: [\n {\n provide: NGX_PENDO_SETTINGS_TOKEN,\n useValue: settings\n },\n settings.pendoInitializerProvider || NGX_PENDO_INITIALIZER_PROVIDER\n ]\n };\n }\n\n static forChild(): ModuleWithProviders<NgxPendoModule> {\n return {\n ngModule: NgxPendoModule\n };\n }\n}\n","import { makeEnvironmentProviders } from '@angular/core';\nimport { NGX_PENDO_SETTINGS_TOKEN } from './ngx-pendo.tokens';\nimport { NGX_PENDO_INITIALIZER_PROVIDER } from './ngx-pendo.injectors';\nimport { IPendoSettings } from './ngx-pendo.interfaces';\n\nexport function provideNgxPendo(settings: IPendoSettings) {\n return makeEnvironmentProviders([\n {\n provide: NGX_PENDO_SETTINGS_TOKEN,\n useValue: settings\n },\n settings.pendoInitializerProvider || NGX_PENDO_INITIALIZER_PROVIDER\n ]);\n}\n","/*\n * Public API Surface of ngx-pendo\n */\n\nexport * from './lib/ngx-pendo-id.directive';\nexport * from './lib/ngx-pendo-section.directive';\nexport * from './lib/ngx-pendo.service';\nexport * from './lib/ngx-pendo.injectors';\nexport * from './lib/ngx-pendo.interfaces';\nexport * from './lib/ngx-pendo.module';\nexport * from './lib/ngx-pendo.provide';\nexport * from './lib/ngx-pendo.tokens';\nexport * from './lib/ngx-pendo.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIa,wBAAwB,GAAG,IAAI,cAAc,CAAiB,oBAAoB,EAAE;AAC/F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE;AACpC,CAAA;MAEY,gBAAgB,GAAG,IAAI,cAAc,CAAc,kBAAkB,EAAE;AAClF,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;QACZ,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;QAExC,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;;AAG5C,QAAA,OAAO,WAAW;;AAErB,CAAA;MAEY,iBAAiB,GAAG,IAAI,cAAc,CAAS,mBAAmB,EAAE;AAC/E,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACzC,CAAA;;MClBY,eAAe,CAAA;AAK1B;;AAEG;AACH,IAAA,WAAA,GAAA;AALQ,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAMvC,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACjD,QAAA,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB;;IAWnD,UAAU,CAAC,gBAA0C,EAAE,OAAkB,EAAA;AACvE,QAAA,IAAI,IAAI,IAAI,gBAAgB,EAAE;AAC5B,YAAA,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;;aACzD;AACL,YAAA,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Ac,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;AACxD,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,wBAAwB;AACxD,iBAAA;;;ACLK,SAAU,eAAe,CAAC,QAAwB,EAAA;AACtD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,wBAAwB;AACjC,YAAA,QAAQ,EAAE;AACX,SAAA;QACD,QAAQ,CAAC,wBAAwB,IAAI;AACtC,KAAA,CAAC;AACJ;;ACbA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,228 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InputSignal, WritableSignal, Provider, ModuleWithProviders, InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
interface IPendoSettings {
|
|
5
|
+
pendoApiKey: string;
|
|
6
|
+
pendoScriptOrigin?: string;
|
|
7
|
+
pendoIdFormatter?: (pendoId: string) => string;
|
|
8
|
+
pendoInitializerProvider?: Provider;
|
|
9
|
+
}
|
|
10
|
+
interface IPendoDirective {
|
|
11
|
+
inherit: InputSignal<boolean>;
|
|
12
|
+
parent: WritableSignal<IPendoDirective | undefined>;
|
|
13
|
+
}
|
|
14
|
+
interface IVisitor {
|
|
15
|
+
id: string;
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
}
|
|
18
|
+
interface IAccount {
|
|
19
|
+
id: string;
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
}
|
|
22
|
+
interface IPendoOptions {
|
|
23
|
+
visitor?: IVisitor;
|
|
24
|
+
account?: IAccount;
|
|
25
|
+
additionalApiKeys?: string[];
|
|
26
|
+
annotateUrl?: Function;
|
|
27
|
+
apiKey?: string;
|
|
28
|
+
appAutoOrdering?: string[];
|
|
29
|
+
autoFrameInstall?: boolean;
|
|
30
|
+
contentHost?: string;
|
|
31
|
+
cookieDomain?: string;
|
|
32
|
+
dataHost?: string;
|
|
33
|
+
disableCookies?: boolean;
|
|
34
|
+
disableFeedback?: boolean;
|
|
35
|
+
disablePendo?: boolean;
|
|
36
|
+
disablePersistence?: boolean;
|
|
37
|
+
frameIdentitySync?: boolean;
|
|
38
|
+
ignoreHashRouting?: boolean;
|
|
39
|
+
initializeImmediately?: boolean;
|
|
40
|
+
observeShadowRoots?: boolean;
|
|
41
|
+
leaderKey?: string[];
|
|
42
|
+
localStorageOnly?: boolean;
|
|
43
|
+
preferBroadcastChannel?: boolean;
|
|
44
|
+
preferMutationObserver?: boolean;
|
|
45
|
+
preventUnloadListener?: boolean;
|
|
46
|
+
queryStringWhitelist?: string[] | Function;
|
|
47
|
+
sanitizeUrl?: Function;
|
|
48
|
+
selfHostedAgentUrl?: string;
|
|
49
|
+
sendEventsWithPostOnly?: boolean;
|
|
50
|
+
allowedText?: string[];
|
|
51
|
+
analytics?: {
|
|
52
|
+
excludeEvents?: string[];
|
|
53
|
+
};
|
|
54
|
+
enableDebugEvents?: boolean;
|
|
55
|
+
eventPropertyMatchParents?: boolean;
|
|
56
|
+
excludeAllText?: boolean;
|
|
57
|
+
excludeNonGuideAnalytics?: boolean;
|
|
58
|
+
syntheticClicks?: {
|
|
59
|
+
elementRemoval?: boolean;
|
|
60
|
+
targetChanged?: boolean;
|
|
61
|
+
};
|
|
62
|
+
disableGlobalCSS?: boolean;
|
|
63
|
+
disableGuidePseudoStyles?: boolean;
|
|
64
|
+
disablePrefetch?: boolean;
|
|
65
|
+
enableDesignerKeyboardShortcut?: boolean;
|
|
66
|
+
enableGuideTimeout?: boolean;
|
|
67
|
+
guideSeenTimeoutLength?: number;
|
|
68
|
+
guideValidation?: boolean;
|
|
69
|
+
guides?: {
|
|
70
|
+
attachPoint?: string | Function;
|
|
71
|
+
delay?: boolean;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
globalScripts?: any[];
|
|
74
|
+
timeout?: number;
|
|
75
|
+
tooltip?: {
|
|
76
|
+
arrowSize?: number;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
preventCodeInjection?: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface ISerializedMetadata {
|
|
82
|
+
}
|
|
83
|
+
interface IPendo {
|
|
84
|
+
additionalApiKeys: string[];
|
|
85
|
+
apiKey: string;
|
|
86
|
+
getVersion: () => string;
|
|
87
|
+
initialize: (options: IPendoOptions) => void;
|
|
88
|
+
isReady: () => boolean;
|
|
89
|
+
teardown: () => void;
|
|
90
|
+
hideLauncher: () => void;
|
|
91
|
+
removeLauncher: () => void;
|
|
92
|
+
showLauncher: () => void;
|
|
93
|
+
toggleLauncher: () => void;
|
|
94
|
+
addDebuggingFunctions: () => void;
|
|
95
|
+
disableDebugging: () => void;
|
|
96
|
+
disableLogging: () => void;
|
|
97
|
+
enableDebugging: () => void;
|
|
98
|
+
enableLogging: () => void;
|
|
99
|
+
isDebuggingEnabled: () => void;
|
|
100
|
+
logPublic: () => void;
|
|
101
|
+
clearSession: () => void;
|
|
102
|
+
generate_unique_id: (prefix?: string) => string;
|
|
103
|
+
getAccountId: () => string | null;
|
|
104
|
+
get_account_id: () => string | null;
|
|
105
|
+
getSerializedMetadata: () => ISerializedMetadata;
|
|
106
|
+
getVisitorId: () => string;
|
|
107
|
+
get_visitor_id: () => string;
|
|
108
|
+
identify: (options: Pick<IPendoOptions, 'visitor' | 'account'> | string, accountId?: string) => void;
|
|
109
|
+
isAnonymousVisitor: (visitorId?: string) => boolean;
|
|
110
|
+
set_account_id: (newAccountId?: string) => void;
|
|
111
|
+
set_visitor_id: (newVisitorId?: string) => void;
|
|
112
|
+
updateOptions: (options: IPendoOptions) => void;
|
|
113
|
+
url: {
|
|
114
|
+
get: () => string;
|
|
115
|
+
};
|
|
116
|
+
normalizedUrl: string;
|
|
117
|
+
getCurrentUrl: () => string;
|
|
118
|
+
getNormalizedUrl: () => string;
|
|
119
|
+
pageLoad: (url: string) => void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare class NgxPendoService {
|
|
123
|
+
private pendoIdFormatter?;
|
|
124
|
+
private pendo;
|
|
125
|
+
/**
|
|
126
|
+
* Constructor
|
|
127
|
+
*/
|
|
128
|
+
constructor();
|
|
129
|
+
/**
|
|
130
|
+
* Completely re-initialize the Agent with new options
|
|
131
|
+
*
|
|
132
|
+
* @param optionsOrVisitor IPendoOptions | IVisitor
|
|
133
|
+
* @param account IAccount
|
|
134
|
+
*/
|
|
135
|
+
initialize(options: IPendoOptions): void;
|
|
136
|
+
initialize(visitor: IVisitor, account?: IAccount): void;
|
|
137
|
+
/**
|
|
138
|
+
* Send an identify event and a meta event.
|
|
139
|
+
*
|
|
140
|
+
* @param visitor IVisitor | string
|
|
141
|
+
* @param account IAccount | string
|
|
142
|
+
*/
|
|
143
|
+
identify(visitor: string, account?: string): void;
|
|
144
|
+
identify(visitor: IVisitor, account?: IAccount): void;
|
|
145
|
+
/**
|
|
146
|
+
* Updates metadata object for the Pendo agent.
|
|
147
|
+
*
|
|
148
|
+
* @param options IPendoOptions
|
|
149
|
+
*/
|
|
150
|
+
updateOptions(options: IPendoOptions): void;
|
|
151
|
+
/**
|
|
152
|
+
* Format Pendo
|
|
153
|
+
*
|
|
154
|
+
* @param ids string[]
|
|
155
|
+
*/
|
|
156
|
+
formatPendoId(...ids: string[]): string;
|
|
157
|
+
/**
|
|
158
|
+
* Shuts down the agent and cleans up all timers and listeners.
|
|
159
|
+
*/
|
|
160
|
+
teardown(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Checks if a given visitor id string is anonymous.
|
|
163
|
+
* If no argument is given, calls with pendo.getVisitorId() to check current visitor status.
|
|
164
|
+
*/
|
|
165
|
+
isAnonymousVisitor(visitorId?: string): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Removes current visitor id and account id.
|
|
168
|
+
* Triggers an identify event and reloads with a new anonymous visitor.
|
|
169
|
+
*/
|
|
170
|
+
clearSession(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Loads Pendo Debugger and extends the global pendo object with additional functionality for debugging purposes.
|
|
173
|
+
*/
|
|
174
|
+
enableDebugging(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Removes Pendo Debugger extension.
|
|
177
|
+
*/
|
|
178
|
+
disableDebugging(): void;
|
|
179
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxPendoService, never>;
|
|
180
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgxPendoService>;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare class NgxPendoSectionDirective implements IPendoDirective {
|
|
184
|
+
pendoSection: _angular_core.InputSignal<string>;
|
|
185
|
+
inherit: _angular_core.InputSignal<boolean>;
|
|
186
|
+
parent: _angular_core.WritableSignal<NgxPendoSectionDirective | undefined>;
|
|
187
|
+
idDirectives: _angular_core.Signal<readonly NgxPendoIdDirective[]>;
|
|
188
|
+
sectionDirectivs: _angular_core.Signal<readonly NgxPendoSectionDirective[]>;
|
|
189
|
+
disableInherit: _angular_core.Signal<boolean | undefined>;
|
|
190
|
+
constructor();
|
|
191
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxPendoSectionDirective, never>;
|
|
192
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxPendoSectionDirective, "[ngx-pendo-section]", never, { "pendoSection": { "alias": "ngx-pendo-section"; "required": false; "isSignal": true; }; "inherit": { "alias": "ngx-pendo-inherit"; "required": false; "isSignal": true; }; }, {}, ["idDirectives", "sectionDirectivs"], never, true, never>;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare class NgxPendoIdDirective implements IPendoDirective {
|
|
196
|
+
pendoId: _angular_core.InputSignal<string>;
|
|
197
|
+
inherit: _angular_core.InputSignal<boolean>;
|
|
198
|
+
parent: _angular_core.WritableSignal<NgxPendoSectionDirective | undefined>;
|
|
199
|
+
mergedPendoId: _angular_core.Signal<string>;
|
|
200
|
+
disableInherit: _angular_core.Signal<boolean | undefined>;
|
|
201
|
+
service: NgxPendoService;
|
|
202
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxPendoIdDirective, never>;
|
|
203
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxPendoIdDirective, "[ngx-pendo-id]", never, { "pendoId": { "alias": "ngx-pendo-id"; "required": false; "isSignal": true; }; "inherit": { "alias": "ngx-pendo-inherit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
type PendoWindow = Window & {
|
|
207
|
+
pendo?: IPendo;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
declare const NGX_PENDO_INITIALIZER_PROVIDER: Provider;
|
|
211
|
+
declare function pendoInitializer($settings: IPendoSettings, window: PendoWindow): () => Promise<void>;
|
|
212
|
+
|
|
213
|
+
declare class NgxPendoModule {
|
|
214
|
+
static forRoot(settings: IPendoSettings): ModuleWithProviders<NgxPendoModule>;
|
|
215
|
+
static forChild(): ModuleWithProviders<NgxPendoModule>;
|
|
216
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxPendoModule, never>;
|
|
217
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<NgxPendoModule, never, [typeof NgxPendoIdDirective, typeof NgxPendoSectionDirective], [typeof NgxPendoIdDirective, typeof NgxPendoSectionDirective]>;
|
|
218
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<NgxPendoModule>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare function provideNgxPendo(settings: IPendoSettings): _angular_core.EnvironmentProviders;
|
|
222
|
+
|
|
223
|
+
declare const NGX_PENDO_SETTINGS_TOKEN: InjectionToken<IPendoSettings>;
|
|
224
|
+
declare const NGX_PENDO_WINDOW: InjectionToken<PendoWindow>;
|
|
225
|
+
declare const NGX_PENDO_CONTEXT: InjectionToken<IPendo>;
|
|
226
|
+
|
|
227
|
+
export { NGX_PENDO_CONTEXT, NGX_PENDO_INITIALIZER_PROVIDER, NGX_PENDO_SETTINGS_TOKEN, NGX_PENDO_WINDOW, NgxPendoIdDirective, NgxPendoModule, NgxPendoSectionDirective, NgxPendoService, pendoInitializer, provideNgxPendo };
|
|
228
|
+
export type { IAccount, IPendo, IPendoDirective, IPendoOptions, IPendoSettings, ISerializedMetadata, IVisitor, PendoWindow };
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
13
|
-
const path = require("path");
|
|
14
13
|
const schema_1 = require("@schematics/angular/application/schema");
|
|
14
|
+
const path = require("path");
|
|
15
15
|
describe('ng add ngx pendo', () => {
|
|
16
16
|
const schematicRunner = new testing_1.SchematicTestRunner('ngx-pendo', path.join(__dirname, '../collection.json'));
|
|
17
17
|
const defaultOptions = {
|
|
@@ -48,11 +48,12 @@ describe('ng add ngx pendo', () => {
|
|
|
48
48
|
}));
|
|
49
49
|
it('should update app module', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
50
50
|
const options = Object.assign({}, defaultOptions);
|
|
51
|
+
const projectPath = '/projects/bar';
|
|
51
52
|
const importRegex = /import { NgxPendoModule } from 'ngx-pendo';/gm;
|
|
52
53
|
const providerRegex = /NgxPendoModule.forRoot\({\n\W{2,}pendoApiKey: 'pendo-api-key',\n\W{2,}pendoIdFormatter: \(pendoId: string\) => pendoId.toLowerCase\(\)\n\W{2,}\}\)/gm;
|
|
53
54
|
for (let i = 0; i < 2; i++) {
|
|
54
55
|
const tree = yield schematicRunner.runSchematic('ng-add', options, appTree);
|
|
55
|
-
const content = tree.readContent(
|
|
56
|
+
const content = tree.readContent(`${projectPath}/src/app/app-module.ts`);
|
|
56
57
|
const importMatches = content.match(importRegex);
|
|
57
58
|
const providerMatches = content.match(providerRegex);
|
|
58
59
|
// check config import and not duplicated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AACvF,
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AACvF,mEAA6F;AAE7F,6BAA6B;AAG7B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,eAAe,GAAG,IAAI,6BAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACzG,MAAM,cAAc,GAAoB;QACtC,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,eAAe;KAC7B,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,cAAc,EAAE,UAAU;QAC1B,OAAO,EAAE,OAAO;KACjB,CAAC;IACF,MAAM,UAAU,GAAuB;QACrC,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,cAAK,CAAC,IAAI;QACjB,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;QACtB,UAAU,EAAE,KAAK;KAClB,CAAC;IACF,IAAI,OAAiC,CAAC;IAEtC,UAAU,CAAC,GAAS,EAAE;QACpB,OAAO,GAAG,MAAM,eAAe,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAC3G,OAAO,GAAG,MAA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CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IPendoDirective } from './ngx-pendo.interfaces';
|
|
2
|
-
import { NgxPendoService } from './ngx-pendo.service';
|
|
3
|
-
import { NgxPendoSectionDirective } from './ngx-pendo-section.directive';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgxPendoIdDirective implements IPendoDirective {
|
|
6
|
-
private service;
|
|
7
|
-
pendoId: import("@angular/core").InputSignal<string>;
|
|
8
|
-
inherit: import("@angular/core").InputSignal<boolean>;
|
|
9
|
-
parent: import("@angular/core").WritableSignal<NgxPendoSectionDirective | undefined>;
|
|
10
|
-
mergedPendoId: import("@angular/core").Signal<string>;
|
|
11
|
-
disableInherit: import("@angular/core").Signal<boolean | undefined>;
|
|
12
|
-
constructor(service: NgxPendoService);
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxPendoIdDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxPendoIdDirective, "[ngx-pendo-id]", never, { "pendoId": { "alias": "ngx-pendo-id"; "required": false; "isSignal": true; }; "inherit": { "alias": "ngx-pendo-inherit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IPendoDirective } from './ngx-pendo.interfaces';
|
|
2
|
-
import { NgxPendoIdDirective } from './ngx-pendo-id.directive';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgxPendoSectionDirective implements IPendoDirective {
|
|
5
|
-
pendoSection: import("@angular/core").InputSignal<string>;
|
|
6
|
-
inherit: import("@angular/core").InputSignal<boolean>;
|
|
7
|
-
parent: import("@angular/core").WritableSignal<NgxPendoSectionDirective | undefined>;
|
|
8
|
-
idDirectives: import("@angular/core").Signal<readonly NgxPendoIdDirective[]>;
|
|
9
|
-
sectionDirectivs: import("@angular/core").Signal<readonly NgxPendoSectionDirective[]>;
|
|
10
|
-
disableInherit: import("@angular/core").Signal<boolean | undefined>;
|
|
11
|
-
constructor();
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxPendoSectionDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxPendoSectionDirective, "[ngx-pendo-section]", never, { "pendoSection": { "alias": "ngx-pendo-section"; "required": false; "isSignal": true; }; "inherit": { "alias": "ngx-pendo-inherit"; "required": false; "isSignal": true; }; }, {}, ["idDirectives", "sectionDirectivs"], never, true, never>;
|
|
14
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Provider } from '@angular/core';
|
|
2
|
-
import { IPendoSettings } from './ngx-pendo.interfaces';
|
|
3
|
-
import { PendoWindow } from './ngx-pendo.types';
|
|
4
|
-
export declare const NGX_PENDO_INITIALIZER_PROVIDER: Provider;
|
|
5
|
-
export declare function pendoInitializer($settings: IPendoSettings, window: PendoWindow): () => Promise<void>;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { InputSignal, WritableSignal, Provider } from '@angular/core';
|
|
2
|
-
export interface IPendoSettings {
|
|
3
|
-
pendoApiKey: string;
|
|
4
|
-
pendoScriptOrigin?: string;
|
|
5
|
-
pendoIdFormatter?: (pendoId: string) => string;
|
|
6
|
-
pendoInitializerProvider?: Provider;
|
|
7
|
-
}
|
|
8
|
-
export interface IPendoDirective {
|
|
9
|
-
inherit: InputSignal<boolean>;
|
|
10
|
-
parent: WritableSignal<IPendoDirective | undefined>;
|
|
11
|
-
}
|
|
12
|
-
export interface IVisitor {
|
|
13
|
-
id: string;
|
|
14
|
-
[key: string]: string;
|
|
15
|
-
}
|
|
16
|
-
export interface IAccount {
|
|
17
|
-
id: string;
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
}
|
|
20
|
-
export interface IPendoOptions {
|
|
21
|
-
visitor?: IVisitor;
|
|
22
|
-
account?: IAccount;
|
|
23
|
-
additionalApiKeys?: string[];
|
|
24
|
-
annotateUrl?: Function;
|
|
25
|
-
apiKey?: string;
|
|
26
|
-
appAutoOrdering?: string[];
|
|
27
|
-
autoFrameInstall?: boolean;
|
|
28
|
-
contentHost?: string;
|
|
29
|
-
cookieDomain?: string;
|
|
30
|
-
dataHost?: string;
|
|
31
|
-
disableCookies?: boolean;
|
|
32
|
-
disableFeedback?: boolean;
|
|
33
|
-
disablePendo?: boolean;
|
|
34
|
-
disablePersistence?: boolean;
|
|
35
|
-
frameIdentitySync?: boolean;
|
|
36
|
-
ignoreHashRouting?: boolean;
|
|
37
|
-
initializeImmediately?: boolean;
|
|
38
|
-
observeShadowRoots?: boolean;
|
|
39
|
-
leaderKey?: string[];
|
|
40
|
-
localStorageOnly?: boolean;
|
|
41
|
-
preferBroadcastChannel?: boolean;
|
|
42
|
-
preferMutationObserver?: boolean;
|
|
43
|
-
preventUnloadListener?: boolean;
|
|
44
|
-
queryStringWhitelist?: string[] | Function;
|
|
45
|
-
sanitizeUrl?: Function;
|
|
46
|
-
selfHostedAgentUrl?: string;
|
|
47
|
-
sendEventsWithPostOnly?: boolean;
|
|
48
|
-
allowedText?: string[];
|
|
49
|
-
analytics?: {
|
|
50
|
-
excludeEvents?: string[];
|
|
51
|
-
};
|
|
52
|
-
enableDebugEvents?: boolean;
|
|
53
|
-
eventPropertyMatchParents?: boolean;
|
|
54
|
-
excludeAllText?: boolean;
|
|
55
|
-
excludeNonGuideAnalytics?: boolean;
|
|
56
|
-
syntheticClicks?: {
|
|
57
|
-
elementRemoval?: boolean;
|
|
58
|
-
targetChanged?: boolean;
|
|
59
|
-
};
|
|
60
|
-
disableGlobalCSS?: boolean;
|
|
61
|
-
disableGuidePseudoStyles?: boolean;
|
|
62
|
-
disablePrefetch?: boolean;
|
|
63
|
-
enableDesignerKeyboardShortcut?: boolean;
|
|
64
|
-
enableGuideTimeout?: boolean;
|
|
65
|
-
guideSeenTimeoutLength?: number;
|
|
66
|
-
guideValidation?: boolean;
|
|
67
|
-
guides?: {
|
|
68
|
-
attachPoint?: string | Function;
|
|
69
|
-
delay?: boolean;
|
|
70
|
-
disabled?: boolean;
|
|
71
|
-
globalScripts?: any[];
|
|
72
|
-
timeout?: number;
|
|
73
|
-
tooltip?: {
|
|
74
|
-
arrowSize?: number;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
preventCodeInjection?: boolean;
|
|
78
|
-
}
|
|
79
|
-
export interface ISerializedMetadata {
|
|
80
|
-
}
|
|
81
|
-
export interface IPendo {
|
|
82
|
-
additionalApiKeys: string[];
|
|
83
|
-
apiKey: string;
|
|
84
|
-
getVersion: () => string;
|
|
85
|
-
initialize: (options: IPendoOptions) => void;
|
|
86
|
-
isReady: () => boolean;
|
|
87
|
-
teardown: () => void;
|
|
88
|
-
hideLauncher: () => void;
|
|
89
|
-
removeLauncher: () => void;
|
|
90
|
-
showLauncher: () => void;
|
|
91
|
-
toggleLauncher: () => void;
|
|
92
|
-
addDebuggingFunctions: () => void;
|
|
93
|
-
disableDebugging: () => void;
|
|
94
|
-
disableLogging: () => void;
|
|
95
|
-
enableDebugging: () => void;
|
|
96
|
-
enableLogging: () => void;
|
|
97
|
-
isDebuggingEnabled: () => void;
|
|
98
|
-
logPublic: () => void;
|
|
99
|
-
clearSession: () => void;
|
|
100
|
-
generate_unique_id: (prefix?: string) => string;
|
|
101
|
-
getAccountId: () => string | null;
|
|
102
|
-
get_account_id: () => string | null;
|
|
103
|
-
getSerializedMetadata: () => ISerializedMetadata;
|
|
104
|
-
getVisitorId: () => string;
|
|
105
|
-
get_visitor_id: () => string;
|
|
106
|
-
identify: (options: Pick<IPendoOptions, 'visitor' | 'account'> | string, accountId?: string) => void;
|
|
107
|
-
isAnonymousVisitor: (visitorId?: string) => boolean;
|
|
108
|
-
set_account_id: (newAccountId?: string) => void;
|
|
109
|
-
set_visitor_id: (newVisitorId?: string) => void;
|
|
110
|
-
updateOptions: (options: IPendoOptions) => void;
|
|
111
|
-
url: {
|
|
112
|
-
get: () => string;
|
|
113
|
-
};
|
|
114
|
-
normalizedUrl: string;
|
|
115
|
-
getCurrentUrl: () => string;
|
|
116
|
-
getNormalizedUrl: () => string;
|
|
117
|
-
pageLoad: (url: string) => void;
|
|
118
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { IPendoSettings } from './ngx-pendo.interfaces';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./ngx-pendo-id.directive";
|
|
5
|
-
import * as i2 from "./ngx-pendo-section.directive";
|
|
6
|
-
export declare class NgxPendoModule {
|
|
7
|
-
static forRoot(settings: IPendoSettings): ModuleWithProviders<NgxPendoModule>;
|
|
8
|
-
static forChild(): ModuleWithProviders<NgxPendoModule>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxPendoModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxPendoModule, never, [typeof i1.NgxPendoIdDirective, typeof i2.NgxPendoSectionDirective], [typeof i1.NgxPendoIdDirective, typeof i2.NgxPendoSectionDirective]>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgxPendoModule>;
|
|
12
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { IAccount, IPendo, IPendoOptions, IPendoSettings, IVisitor } from './ngx-pendo.interfaces';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NgxPendoService {
|
|
4
|
-
private pendo;
|
|
5
|
-
private pendoIdFormatter?;
|
|
6
|
-
/**
|
|
7
|
-
* Constructor
|
|
8
|
-
*
|
|
9
|
-
* @param settings IPendoSettings
|
|
10
|
-
* @param pendo IPendo
|
|
11
|
-
*/
|
|
12
|
-
constructor(settings: IPendoSettings, pendo: IPendo);
|
|
13
|
-
/**
|
|
14
|
-
* Completely re-initialize the Agent with new options
|
|
15
|
-
*
|
|
16
|
-
* @param optionsOrVisitor IPendoOptions | IVisitor
|
|
17
|
-
* @param account IAccount
|
|
18
|
-
*/
|
|
19
|
-
initialize(options: IPendoOptions): void;
|
|
20
|
-
initialize(visitor: IVisitor, account?: IAccount): void;
|
|
21
|
-
/**
|
|
22
|
-
* Send an identify event and a meta event.
|
|
23
|
-
*
|
|
24
|
-
* @param visitor IVisitor | string
|
|
25
|
-
* @param account IAccount | string
|
|
26
|
-
*/
|
|
27
|
-
identify(visitor: string, account?: string): void;
|
|
28
|
-
identify(visitor: IVisitor, account?: IAccount): void;
|
|
29
|
-
/**
|
|
30
|
-
* Updates metadata object for the Pendo agent.
|
|
31
|
-
*
|
|
32
|
-
* @param options IPendoOptions
|
|
33
|
-
*/
|
|
34
|
-
updateOptions(options: IPendoOptions): void;
|
|
35
|
-
/**
|
|
36
|
-
* Format Pendo
|
|
37
|
-
*
|
|
38
|
-
* @param ids string[]
|
|
39
|
-
*/
|
|
40
|
-
formatPendoId(...ids: string[]): string;
|
|
41
|
-
/**
|
|
42
|
-
* Shuts down the agent and cleans up all timers and listeners.
|
|
43
|
-
*/
|
|
44
|
-
teardown(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Checks if a given visitor id string is anonymous.
|
|
47
|
-
* If no argument is given, calls with pendo.getVisitorId() to check current visitor status.
|
|
48
|
-
*/
|
|
49
|
-
isAnonymousVisitor(visitorId?: string): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Removes current visitor id and account id.
|
|
52
|
-
* Triggers an identify event and reloads with a new anonymous visitor.
|
|
53
|
-
*/
|
|
54
|
-
clearSession(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Loads Pendo Debugger and extends the global pendo object with additional functionality for debugging purposes.
|
|
57
|
-
*/
|
|
58
|
-
enableDebugging(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Removes Pendo Debugger extension.
|
|
61
|
-
*/
|
|
62
|
-
disableDebugging(): void;
|
|
63
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxPendoService, never>;
|
|
64
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxPendoService>;
|
|
65
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { PendoWindow } from './ngx-pendo.types';
|
|
3
|
-
import { IPendo, IPendoSettings } from './ngx-pendo.interfaces';
|
|
4
|
-
export declare const NGX_PENDO_SETTINGS_TOKEN: InjectionToken<IPendoSettings>;
|
|
5
|
-
export declare const NGX_PENDO_WINDOW: InjectionToken<PendoWindow>;
|
|
6
|
-
export declare const NGX_PENDO_CONTEXT: InjectionToken<IPendo>;
|
package/lib/ngx-pendo.types.d.ts
DELETED
package/public-api.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './lib/ngx-pendo-id.directive';
|
|
2
|
-
export * from './lib/ngx-pendo-section.directive';
|
|
3
|
-
export * from './lib/ngx-pendo.service';
|
|
4
|
-
export * from './lib/ngx-pendo.injectors';
|
|
5
|
-
export * from './lib/ngx-pendo.interfaces';
|
|
6
|
-
export * from './lib/ngx-pendo.module';
|
|
7
|
-
export * from './lib/ngx-pendo.provide';
|
|
8
|
-
export * from './lib/ngx-pendo.tokens';
|
|
9
|
-
export * from './lib/ngx-pendo.types';
|