ngx-pendo 2.3.0 → 2.4.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
CHANGED
|
@@ -110,8 +110,7 @@ import { NgxPendoService } from 'ngx-pendo';
|
|
|
110
110
|
@Component( ... )
|
|
111
111
|
export class AppComponent implements OnInit {
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
}
|
|
113
|
+
private ngxPendoService = inject(NgxPendoService);
|
|
115
114
|
|
|
116
115
|
ngOnInit() {
|
|
117
116
|
this.ngxPendoService.initialize({
|
|
@@ -132,13 +131,12 @@ export class AppComponent implements OnInit {
|
|
|
132
131
|
|
|
133
132
|
```ts
|
|
134
133
|
import { Component, OnInit } from '@angular/core';
|
|
135
|
-
import { NGX_PENDO_CONTEXT
|
|
134
|
+
import { NGX_PENDO_CONTEXT } from 'ngx-pendo';
|
|
136
135
|
|
|
137
136
|
@Component( ... )
|
|
138
137
|
export class AppComponent implements OnInit {
|
|
139
138
|
|
|
140
|
-
|
|
141
|
-
}
|
|
139
|
+
private pendo = inject(NGX_PENDO_CONTEXT);
|
|
142
140
|
|
|
143
141
|
ngOnInit() {
|
|
144
142
|
this.pendo.initialize({
|
package/fesm2022/ngx-pendo.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject,
|
|
2
|
+
import { InjectionToken, inject, Injectable, input, signal, computed, Directive, contentChildren, effect, APP_INITIALIZER, isDevMode, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
3
4
|
import { interval } from 'rxjs';
|
|
4
5
|
|
|
5
6
|
const NGX_PENDO_SETTINGS_TOKEN = new InjectionToken('ngx-pendo-settings', {
|
|
@@ -22,13 +23,9 @@ const NGX_PENDO_CONTEXT = new InjectionToken('ngx-pendo-context', {
|
|
|
22
23
|
});
|
|
23
24
|
|
|
24
25
|
class NgxPendoService {
|
|
25
|
-
/**
|
|
26
|
-
* Constructor
|
|
27
|
-
*/
|
|
28
26
|
constructor() {
|
|
29
27
|
this.pendo = inject(NGX_PENDO_CONTEXT);
|
|
30
|
-
|
|
31
|
-
this.pendoIdFormatter = settings.pendoIdFormatter;
|
|
28
|
+
this.pendoIdFormatter = inject(NGX_PENDO_SETTINGS_TOKEN).pendoIdFormatter;
|
|
32
29
|
}
|
|
33
30
|
initialize(optionsOrVisitor, account) {
|
|
34
31
|
if ('id' in optionsOrVisitor) {
|
|
@@ -94,21 +91,27 @@ class NgxPendoService {
|
|
|
94
91
|
disableDebugging() {
|
|
95
92
|
this.pendo?.disableDebugging();
|
|
96
93
|
}
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Method to manually track events. Requires a non-empty name string to collect event.
|
|
96
|
+
*/
|
|
97
|
+
track(trackType, metadata) {
|
|
98
|
+
this.pendo?.track(trackType, metadata);
|
|
99
|
+
}
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
101
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
|
|
99
102
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoService, decorators: [{
|
|
101
104
|
type: Injectable,
|
|
102
105
|
args: [{
|
|
103
106
|
providedIn: 'root'
|
|
104
107
|
}]
|
|
105
|
-
}]
|
|
108
|
+
}] });
|
|
106
109
|
|
|
107
110
|
class NgxPendoIdDirective {
|
|
108
111
|
constructor() {
|
|
109
|
-
this.pendoId = input('', { alias: 'ngx-pendo-id' });
|
|
110
|
-
this.inherit = input(true, { alias: 'ngx-pendo-inherit' });
|
|
111
|
-
this.parent = signal(undefined);
|
|
112
|
+
this.pendoId = input('', { ...(ngDevMode ? { debugName: "pendoId" } : {}), alias: 'ngx-pendo-id' });
|
|
113
|
+
this.inherit = input(true, { ...(ngDevMode ? { debugName: "inherit" } : {}), alias: 'ngx-pendo-inherit' });
|
|
114
|
+
this.parent = signal(undefined, { ...(ngDevMode ? { debugName: "parent" } : {}) });
|
|
112
115
|
this.mergedPendoId = computed(() => {
|
|
113
116
|
const pendoSections = [];
|
|
114
117
|
let cur = this.inherit() ? this.parent() : null;
|
|
@@ -117,14 +120,14 @@ class NgxPendoIdDirective {
|
|
|
117
120
|
cur = cur.inherit() ? cur.parent() : null;
|
|
118
121
|
}
|
|
119
122
|
return this.service.formatPendoId(...pendoSections, this.pendoId());
|
|
120
|
-
});
|
|
121
|
-
this.disableInherit = computed(() => (this.inherit() ? undefined : true));
|
|
123
|
+
}, { ...(ngDevMode ? { debugName: "mergedPendoId" } : {}) });
|
|
124
|
+
this.disableInherit = computed(() => (this.inherit() ? undefined : true), { ...(ngDevMode ? { debugName: "disableInherit" } : {}) });
|
|
122
125
|
this.service = inject(NgxPendoService);
|
|
123
126
|
}
|
|
124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
125
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoIdDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
128
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", 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 }); }
|
|
126
129
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
|
|
128
131
|
type: Directive,
|
|
129
132
|
args: [{
|
|
130
133
|
selector: '[ngx-pendo-id]',
|
|
@@ -134,16 +137,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImpor
|
|
|
134
137
|
'[attr.ngx-pendo-disable-inherit]': 'disableInherit()'
|
|
135
138
|
}
|
|
136
139
|
}]
|
|
137
|
-
}] });
|
|
140
|
+
}], propDecorators: { pendoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngx-pendo-id", required: false }] }], inherit: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngx-pendo-inherit", required: false }] }] } });
|
|
138
141
|
|
|
139
142
|
class NgxPendoSectionDirective {
|
|
140
143
|
constructor() {
|
|
141
|
-
this.pendoSection = input('', { alias: 'ngx-pendo-section' });
|
|
142
|
-
this.inherit = input(true, { alias: 'ngx-pendo-inherit' });
|
|
143
|
-
this.parent = signal(undefined);
|
|
144
|
-
this.idDirectives = contentChildren(NgxPendoIdDirective, { descendants: false });
|
|
145
|
-
this.sectionDirectivs = contentChildren(NgxPendoSectionDirective, { descendants: false });
|
|
146
|
-
this.disableInherit = computed(() => (this.inherit() ? undefined : true));
|
|
144
|
+
this.pendoSection = input('', { ...(ngDevMode ? { debugName: "pendoSection" } : {}), alias: 'ngx-pendo-section' });
|
|
145
|
+
this.inherit = input(true, { ...(ngDevMode ? { debugName: "inherit" } : {}), alias: 'ngx-pendo-inherit' });
|
|
146
|
+
this.parent = signal(undefined, { ...(ngDevMode ? { debugName: "parent" } : {}) });
|
|
147
|
+
this.idDirectives = contentChildren(NgxPendoIdDirective, { ...(ngDevMode ? { debugName: "idDirectives" } : {}), descendants: false });
|
|
148
|
+
this.sectionDirectivs = contentChildren(NgxPendoSectionDirective, { ...(ngDevMode ? { debugName: "sectionDirectivs" } : {}), descendants: false });
|
|
149
|
+
this.disableInherit = computed(() => (this.inherit() ? undefined : true), { ...(ngDevMode ? { debugName: "disableInherit" } : {}) });
|
|
147
150
|
effect(() => {
|
|
148
151
|
[...this.idDirectives(), ...this.sectionDirectivs()].forEach(item => {
|
|
149
152
|
if (item !== this) {
|
|
@@ -152,10 +155,10 @@ class NgxPendoSectionDirective {
|
|
|
152
155
|
});
|
|
153
156
|
});
|
|
154
157
|
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
156
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
159
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.0.1", 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 }); }
|
|
157
160
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
|
|
159
162
|
type: Directive,
|
|
160
163
|
args: [{
|
|
161
164
|
selector: '[ngx-pendo-section]',
|
|
@@ -165,7 +168,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImpor
|
|
|
165
168
|
'[attr.ngx-pendo-disable-inherit]': 'disableInherit()'
|
|
166
169
|
}
|
|
167
170
|
}]
|
|
168
|
-
}], ctorParameters: () => [] });
|
|
171
|
+
}], ctorParameters: () => [], propDecorators: { pendoSection: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngx-pendo-section", required: false }] }], inherit: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngx-pendo-inherit", required: false }] }], idDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgxPendoIdDirective), { ...{ descendants: false }, isSignal: true }] }], sectionDirectivs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgxPendoSectionDirective), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
169
172
|
|
|
170
173
|
const DEFAULT_PENDO_SCRIPT_ORIGIN = 'https://cdn.pendo.io';
|
|
171
174
|
// export const NGX_PENDO_INITIALIZER_PROVIDER = provideAppInitializer(() => {
|
|
@@ -212,7 +215,6 @@ function pendoInitializer($settings, window) {
|
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
215
|
-
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
216
218
|
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
217
219
|
|
|
218
220
|
class NgxPendoModule {
|
|
@@ -233,11 +235,11 @@ class NgxPendoModule {
|
|
|
233
235
|
ngModule: NgxPendoModule
|
|
234
236
|
};
|
|
235
237
|
}
|
|
236
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
237
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
238
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
239
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
|
|
240
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoModule }); }
|
|
239
241
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NgxPendoModule, decorators: [{
|
|
241
243
|
type: NgModule,
|
|
242
244
|
args: [{
|
|
243
245
|
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.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,GAA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;SACX;;8GAjBQ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,mBAAmB,EAAE,wBAAwB,CAC7C,EAAA,OAAA,EAAA,CAAA,mBAAmB,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA;+GAE5C,cAAc,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;;;;"}
|
|
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 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\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 pendo = inject(NGX_PENDO_CONTEXT);\n private pendoIdFormatter = inject(NGX_PENDO_SETTINGS_TOKEN).pendoIdFormatter;\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 /**\n * Method to manually track events. Requires a non-empty name string to collect event.\n */\n track(trackType: string, metadata?: Record<string, string | number | boolean | string[] | null>): void {\n this.pendo?.track(trackType, metadata);\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-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\n// The following interfaces and types are based on the Pendo documentation.\n// Please according to the Pendo documentation, here's the link: https://agent.pendo.io/\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 IPendoIdentity {\n visitor?: IVisitor;\n account?: IAccount;\n}\n\nexport interface IPendoOptions extends IPendoIdentity {\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 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 // Debugging\n addDebuggingFunctions(): void;\n disableDebugging(): void;\n disableLogging(): void;\n enableDebugging(): void;\n enableLogging(): void;\n isDebuggingEnabled(): void;\n logPublic(): void;\n\n // DOM\n dom(input: string): HTMLElement;\n\n // Events\n attachEvent(element: HTMLElement, evt: string, fn: (event: Event) => void, useCapture?: boolean): void;\n detachEvent(element: HTMLElement, evt: string, fn: (event: Event) => void, useCapture?: boolean): void;\n doNotProcess: string;\n flushNow(force?: boolean): void;\n isSendingEvents(): boolean;\n startSendingEvents(): boolean;\n stopSendingEvents(): boolean;\n stopSendingEvents(): boolean;\n track(trackType: string, metadata?: any): void;\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(): any;\n getVisitorId(): string;\n get_visitor_id(): string;\n identify(options: IPendoIdentity | 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":";;;;;MAKa,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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+1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-pendo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "A simple wrapper to load Pendo by angular way",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"save": true
|
|
34
34
|
},
|
|
35
35
|
"module": "fesm2022/ngx-pendo.mjs",
|
|
36
|
-
"typings": "
|
|
36
|
+
"typings": "types/ngx-pendo.d.ts",
|
|
37
37
|
"exports": {
|
|
38
38
|
"./package.json": {
|
|
39
39
|
"default": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
".": {
|
|
42
|
-
"types": "./
|
|
42
|
+
"types": "./types/ngx-pendo.d.ts",
|
|
43
43
|
"default": "./fesm2022/ngx-pendo.mjs"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -50,7 +50,7 @@ describe('ng add ngx pendo', () => {
|
|
|
50
50
|
const options = Object.assign({}, defaultOptions);
|
|
51
51
|
const projectPath = '/projects/bar';
|
|
52
52
|
const importRegex = /import { NgxPendoModule } from 'ngx-pendo';/gm;
|
|
53
|
-
const providerRegex = /NgxPendoModule.forRoot\({\n\W
|
|
53
|
+
const providerRegex = /NgxPendoModule.forRoot\({\n\W*pendoApiKey: 'pendo-api-key',\n\W*pendoIdFormatter: \(pendoId: string\) => pendoId.toLowerCase\(\)\n\W*\}\)/gm;
|
|
54
54
|
for (let i = 0; i < 2; i++) {
|
|
55
55
|
const tree = yield schematicRunner.runSchematic('ng-add', options, appTree);
|
|
56
56
|
const content = tree.readContent(`${projectPath}/src/app/app-module.ts`);
|
|
@@ -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,mEAA6F;AAE7F,6BAA6B;AAG7B,QAAQ,CAAC,kBA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AAC,CAAC;YAErD,yCAAyC;YACzC,MAAM,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -19,9 +19,11 @@ interface IAccount {
|
|
|
19
19
|
id: string;
|
|
20
20
|
[key: string]: string;
|
|
21
21
|
}
|
|
22
|
-
interface
|
|
22
|
+
interface IPendoIdentity {
|
|
23
23
|
visitor?: IVisitor;
|
|
24
24
|
account?: IAccount;
|
|
25
|
+
}
|
|
26
|
+
interface IPendoOptions extends IPendoIdentity {
|
|
25
27
|
additionalApiKeys?: string[];
|
|
26
28
|
annotateUrl?: Function;
|
|
27
29
|
apiKey?: string;
|
|
@@ -78,38 +80,46 @@ interface IPendoOptions {
|
|
|
78
80
|
};
|
|
79
81
|
preventCodeInjection?: boolean;
|
|
80
82
|
}
|
|
81
|
-
interface ISerializedMetadata {
|
|
82
|
-
}
|
|
83
83
|
interface IPendo {
|
|
84
84
|
additionalApiKeys: string[];
|
|
85
85
|
apiKey: string;
|
|
86
|
-
getVersion
|
|
87
|
-
initialize
|
|
88
|
-
isReady
|
|
89
|
-
teardown
|
|
90
|
-
hideLauncher
|
|
91
|
-
removeLauncher
|
|
92
|
-
showLauncher
|
|
93
|
-
toggleLauncher
|
|
94
|
-
addDebuggingFunctions
|
|
95
|
-
disableDebugging
|
|
96
|
-
disableLogging
|
|
97
|
-
enableDebugging
|
|
98
|
-
enableLogging
|
|
99
|
-
isDebuggingEnabled
|
|
100
|
-
logPublic
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
+
dom(input: string): HTMLElement;
|
|
102
|
+
attachEvent(element: HTMLElement, evt: string, fn: (event: Event) => void, useCapture?: boolean): void;
|
|
103
|
+
detachEvent(element: HTMLElement, evt: string, fn: (event: Event) => void, useCapture?: boolean): void;
|
|
104
|
+
doNotProcess: string;
|
|
105
|
+
flushNow(force?: boolean): void;
|
|
106
|
+
isSendingEvents(): boolean;
|
|
107
|
+
startSendingEvents(): boolean;
|
|
108
|
+
stopSendingEvents(): boolean;
|
|
109
|
+
stopSendingEvents(): boolean;
|
|
110
|
+
track(trackType: string, metadata?: any): void;
|
|
111
|
+
clearSession(): void;
|
|
112
|
+
generate_unique_id(prefix?: string): string;
|
|
113
|
+
getAccountId(): string | null;
|
|
114
|
+
get_account_id(): string | null;
|
|
115
|
+
getSerializedMetadata(): any;
|
|
116
|
+
getVisitorId(): string;
|
|
117
|
+
get_visitor_id(): string;
|
|
118
|
+
identify(options: IPendoIdentity | string, accountId?: string): void;
|
|
119
|
+
isAnonymousVisitor(visitorId?: string): boolean;
|
|
120
|
+
set_account_id(newAccountId?: string): void;
|
|
121
|
+
set_visitor_id(newVisitorId?: string): void;
|
|
122
|
+
updateOptions(options: IPendoOptions): void;
|
|
113
123
|
url: {
|
|
114
124
|
get: () => string;
|
|
115
125
|
};
|
|
@@ -120,12 +130,8 @@ interface IPendo {
|
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
declare class NgxPendoService {
|
|
123
|
-
private pendoIdFormatter?;
|
|
124
133
|
private pendo;
|
|
125
|
-
|
|
126
|
-
* Constructor
|
|
127
|
-
*/
|
|
128
|
-
constructor();
|
|
134
|
+
private pendoIdFormatter;
|
|
129
135
|
/**
|
|
130
136
|
* Completely re-initialize the Agent with new options
|
|
131
137
|
*
|
|
@@ -176,6 +182,10 @@ declare class NgxPendoService {
|
|
|
176
182
|
* Removes Pendo Debugger extension.
|
|
177
183
|
*/
|
|
178
184
|
disableDebugging(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Method to manually track events. Requires a non-empty name string to collect event.
|
|
187
|
+
*/
|
|
188
|
+
track(trackType: string, metadata?: Record<string, string | number | boolean | string[] | null>): void;
|
|
179
189
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxPendoService, never>;
|
|
180
190
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgxPendoService>;
|
|
181
191
|
}
|
|
@@ -225,4 +235,4 @@ declare const NGX_PENDO_WINDOW: InjectionToken<PendoWindow>;
|
|
|
225
235
|
declare const NGX_PENDO_CONTEXT: InjectionToken<IPendo>;
|
|
226
236
|
|
|
227
237
|
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,
|
|
238
|
+
export type { IAccount, IPendo, IPendoDirective, IPendoIdentity, IPendoOptions, IPendoSettings, IVisitor, PendoWindow };
|