ngx-pendo 2.1.0 → 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.
Files changed (41) hide show
  1. package/fesm2022/ngx-pendo.mjs +32 -32
  2. package/fesm2022/ngx-pendo.mjs.map +1 -1
  3. package/index.d.ts +228 -5
  4. package/package.json +1 -3
  5. package/schematics/ng-add/index.js +1 -1
  6. package/schematics/ng-add/index.js.map +1 -1
  7. package/schematics/ng-add/index.spec.js +3 -2
  8. package/schematics/ng-add/index.spec.js.map +1 -1
  9. package/schematics/ng-add/package-config.js +2 -3
  10. package/schematics/ng-add/package-config.js.map +1 -1
  11. package/schematics/utils/ast.d.ts +2 -2
  12. package/schematics/utils/ast.js +4 -5
  13. package/schematics/utils/ast.js.map +1 -1
  14. package/schematics/utils/change.js +2 -3
  15. package/schematics/utils/change.js.map +1 -1
  16. package/schematics/utils/project.d.ts +7 -6
  17. package/schematics/utils/project.js +5 -6
  18. package/schematics/utils/project.js.map +1 -1
  19. package/schematics/utils/standalone.js +5 -6
  20. package/schematics/utils/standalone.js.map +1 -1
  21. package/esm2022/lib/ngx-pendo-id.directive.mjs +0 -35
  22. package/esm2022/lib/ngx-pendo-section.directive.mjs +0 -34
  23. package/esm2022/lib/ngx-pendo.injectors.mjs +0 -42
  24. package/esm2022/lib/ngx-pendo.interfaces.mjs +0 -2
  25. package/esm2022/lib/ngx-pendo.module.mjs +0 -36
  26. package/esm2022/lib/ngx-pendo.provide.mjs +0 -13
  27. package/esm2022/lib/ngx-pendo.service.mjs +0 -94
  28. package/esm2022/lib/ngx-pendo.tokens.mjs +0 -21
  29. package/esm2022/lib/ngx-pendo.types.mjs +0 -2
  30. package/esm2022/ngx-pendo.mjs +0 -5
  31. package/esm2022/public-api.mjs +0 -13
  32. package/lib/ngx-pendo-id.directive.d.ts +0 -15
  33. package/lib/ngx-pendo-section.directive.d.ts +0 -14
  34. package/lib/ngx-pendo.injectors.d.ts +0 -5
  35. package/lib/ngx-pendo.interfaces.d.ts +0 -118
  36. package/lib/ngx-pendo.module.d.ts +0 -12
  37. package/lib/ngx-pendo.provide.d.ts +0 -2
  38. package/lib/ngx-pendo.service.d.ts +0 -65
  39. package/lib/ngx-pendo.tokens.d.ts +0 -6
  40. package/lib/ngx-pendo.types.d.ts +0 -4
  41. package/public-api.d.ts +0 -9
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, Inject, input, signal, computed, Directive, contentChildren, effect, APP_INITIALIZER, isDevMode, NgModule, makeEnvironmentProviders } from '@angular/core';
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(settings, pendo) {
33
- this.pendo = 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: "18.0.1", ngImport: i0, type: NgxPendoService, deps: [{ token: NGX_PENDO_SETTINGS_TOKEN }, { token: NGX_PENDO_CONTEXT }], target: i0.ɵɵFactoryTarget.Injectable }); }
101
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
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: "18.0.1", ngImport: i0, type: NgxPendoService, decorators: [{
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: () => [{ type: undefined, decorators: [{
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(service) {
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: "18.0.1", ngImport: i0, type: NgxPendoIdDirective, deps: [{ token: NgxPendoService }], target: i0.ɵɵFactoryTarget.Directive }); }
134
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.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 }); }
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: "18.0.1", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
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: "18.0.1", ngImpor
143
134
  '[attr.ngx-pendo-disable-inherit]': 'disableInherit()'
144
135
  }
145
136
  }]
146
- }], ctorParameters: () => [{ type: NgxPendoService }] });
137
+ }] });
147
138
 
148
139
  class NgxPendoSectionDirective {
149
140
  constructor() {
@@ -159,12 +150,12 @@ class NgxPendoSectionDirective {
159
150
  item.parent.set(this);
160
151
  }
161
152
  });
162
- }, { allowSignalWrites: true });
153
+ });
163
154
  }
164
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
165
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.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 }); }
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: "18.0.1", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
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]',
@@ -177,6 +168,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
177
168
  }], ctorParameters: () => [] });
178
169
 
179
170
  const DEFAULT_PENDO_SCRIPT_ORIGIN = 'https://cdn.pendo.io';
171
+ // export const NGX_PENDO_INITIALIZER_PROVIDER = provideAppInitializer(() => {
172
+ // const initializerFn = pendoInitializer(inject(NGX_PENDO_SETTINGS_TOKEN), inject(NGX_PENDO_WINDOW));
173
+ // return initializerFn();
174
+ // });
175
+ // Keep the `APP_INITIALIZER` to support angular 17 and 18 version
180
176
  const NGX_PENDO_INITIALIZER_PROVIDER = {
181
177
  provide: APP_INITIALIZER,
182
178
  multi: true,
@@ -199,7 +195,7 @@ function pendoInitializer($settings, window) {
199
195
  document.head.appendChild(script);
200
196
  script.onerror = async () => {
201
197
  // The script may have been blocked by an ad blocker
202
- console.error('The pendo script may have been blocked,');
198
+ console.error('The pendo script may have been blocked.');
203
199
  resolve();
204
200
  };
205
201
  script.onload = async () => {
@@ -215,6 +211,10 @@ function pendoInitializer($settings, window) {
215
211
  };
216
212
  }
217
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
+
218
218
  class NgxPendoModule {
219
219
  static forRoot(settings) {
220
220
  return {
@@ -233,11 +233,11 @@ class NgxPendoModule {
233
233
  ngModule: NgxPendoModule
234
234
  };
235
235
  }
236
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
237
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
238
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NgxPendoModule }); }
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 }); }
239
239
  }
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NgxPendoModule, decorators: [{
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgxPendoModule, decorators: [{
241
241
  type: NgModule,
242
242
  args: [{
243
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 () => {\n [...this.idDirectives(), ...this.sectionDirectivs()].forEach(item => {\n if (item !== this) {\n item.parent.set(this);\n }\n });\n },\n { allowSignalWrites: true }\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\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';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgxPendoService"],"mappings":";;;;;MAKa,wBAAwB,GAAG,IAAI,cAAc,CAAiB,oBAAoB,EAAE;AAC/F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;AACrC,CAAA,EAAE;MAEU,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,CAAC;QAEzC,IAAI,CAAC,WAAW,EAAE;AAChB,YAA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EAAA,cAAc,YAHf,mBAAmB,EAAE,wBAAwB,CAC7C,EAAA,OAAA,EAAA,CAAA,mBAAmB,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAE5C,cAAc,EAAA,CAAA,CAAA,EAAA;;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,CAAC;AACzD,iBAAA,CAAA;;;ACLK,SAAU,eAAe,CAAC,QAAwB,EAAA;AACtD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,wBAAwB;AACjC,YAAA,QAAQ,EAAE,QAAQ;AACnB,SAAA;QACD,QAAQ,CAAC,wBAAwB,IAAI,8BAA8B;AACpE,KAAA,CAAC,CAAC;AACL;;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,gBA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A,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;;;;"}
package/index.d.ts CHANGED
@@ -1,5 +1,228 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngx-pendo" />
5
- export * from './public-api';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-pendo",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "A simple wrapper to load Pendo by angular way",
5
5
  "contributors": [
6
6
  {
@@ -40,8 +40,6 @@
40
40
  },
41
41
  ".": {
42
42
  "types": "./index.d.ts",
43
- "esm2022": "./esm2022/ngx-pendo.mjs",
44
- "esm": "./esm2022/ngx-pendo.mjs",
45
43
  "default": "./fesm2022/ngx-pendo.mjs"
46
44
  }
47
45
  }
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.default = default_1;
12
13
  const schematics_1 = require("@angular-devkit/schematics");
13
14
  const utility_1 = require("@schematics/angular/utility");
14
15
  const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
@@ -76,5 +77,4 @@ function default_1(options) {
76
77
  })
77
78
  ]);
78
79
  }
79
- exports.default = default_1;
80
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAiF;AACjF,yDAA8D;AAC9D,qEAAkG;AAClG,2EAA6F;AAC7F,qEAAqE;AACrE,mFAA2E;AAC3E,qDAA2D;AAE3D,sCAA+C;AAC/C,4CAAqD;AACrD,8CAA+E;AAC/E,oDAA6D;AAE7D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,SAAS,mBAAmB,CAAC,QAAgB,EAAE,OAAe;IAC5D,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,aAAa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ACX,wBAAwB,EAAE;QAC1B,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;YAC9C,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;YAC3C,MAAM,OAAO,GAAG,IAAA,iCAAuB,EAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACpE,MAAM,QAAQ,GAAG,IAAA,4BAAkB,EAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,8BAAW,CAAC,WAAW,EAAE,CAAC;gBAClE,IAAI,IAAA,8BAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC;oBACpC,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAChD,CAAC;qBAAM,CAAC;oBACN,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAChD,CAAC;YACH,CAAC;YAED,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,4EAA4E;gBAC1E,+DAA+D;gBAC/D,oFAAoF;gBACpF,SAAS,CACZ,CAAC;YACF,OAAO;QACT,CAAC,CAAA;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -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('/projects/bar/src/app/app.module.ts');
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,6BAA6B;AAC7B,mEAA6F;AAI7F,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;Q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,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPackageVersionFromPackageJson = exports.addPackageToPackageJson = void 0;
3
+ exports.addPackageToPackageJson = addPackageToPackageJson;
4
+ exports.getPackageVersionFromPackageJson = getPackageVersionFromPackageJson;
4
5
  /**
5
6
  * Sorts the keys of the given object.
6
7
  * @returns A new object instance with sorted keys
@@ -29,7 +30,6 @@ function addPackageToPackageJson(host, pkg, version) {
29
30
  }
30
31
  return host;
31
32
  }
32
- exports.addPackageToPackageJson = addPackageToPackageJson;
33
33
  /** Gets the version of the specified package by looking at the package.json in the given tree. */
34
34
  function getPackageVersionFromPackageJson(tree, name) {
35
35
  if (!tree.exists('package.json')) {
@@ -41,5 +41,4 @@ function getPackageVersionFromPackageJson(tree, name) {
41
41
  }
42
42
  return null;
43
43
  }
44
- exports.getPackageVersionFromPackageJson = getPackageVersionFromPackageJson;
45
44
  //# sourceMappingURL=package-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-config.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/package-config.ts"],"names":[],"mappings":";;;AAMA;;;GAGG;AACH,SAAS,gBAAgB,CAAC,GAA2B;IACnD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SACpB,IAAI,EAAE;SACN,MAAM,CACL,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACd,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,EAA4B,CAC7B,CAAC;AACN,CAAC;AAED,iEAAiE;AACjE,SAAgB,uBAAuB,CAAC,IAAU,EAAE,GAAW,EAAE,OAAe;IAC9E,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAgB,CAAC;QAEnD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACzB,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAlBD,0DAkBC;AAED,kGAAkG;AAClG,SAAgB,gCAAgC,CAAC,IAAU,EAAE,IAAY;IACvE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAgB,CAAC;IAE3F,IAAI,WAAW,CAAC,YAAY,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/D,OAAO,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAZD,4EAYC"}
1
+ {"version":3,"file":"package-config.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/package-config.ts"],"names":[],"mappings":";;AAuBA,0DAkBC;AAGD,4EAYC;AAlDD;;;GAGG;AACH,SAAS,gBAAgB,CAAC,GAA2B;IACnD,OA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,CAAC,IAAI,CAAC,cAAc,CAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAgB,CAAC;IAE3F,IAAI,WAAW,CAAC,YAAY,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/D,OAAO,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { Tree } from '@angular-devkit/schematics';
2
2
  import { Schema as ComponentOptions } from '@schematics/angular/component/schema';
3
- import { workspaces } from '@angular-devkit/core';
3
+ import { ProjectDefinition } from '@schematics/angular/utility/workspace';
4
4
  import * as ts from 'typescript';
5
5
  /** Reads file given path and returns TypeScript source file. */
6
6
  export declare function parseSourceFile(host: Tree, path: string): ts.SourceFile;
7
7
  /** Import and add module to root app module. */
8
- export declare function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project: workspaces.ProjectDefinition): void;
8
+ export declare function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project: ProjectDefinition): void;
9
9
  /**
10
10
  * Import and add module to specific module path.
11
11
  * @param host the tree we are updating