@microsoft/applicationinsights-angularplugin-js 2.6.2 → 2.8.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 +120 -13
- package/esm2020/lib/IErrorService.mjs +2 -0
- package/esm2020/lib/applicationinsights-angularplugin-error.service.mjs +39 -0
- package/esm2020/lib/applicationinsights-angularplugin-js.component.mjs +93 -0
- package/esm2020/lib/applicationinsights-angularplugin-js.module.mjs +23 -0
- package/{esm2015/microsoft-applicationinsights-angularplugin-js.js → esm2020/microsoft-applicationinsights-angularplugin-js.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +2 -1
- package/fesm2015/microsoft-applicationinsights-angularplugin-js.mjs +158 -0
- package/fesm2015/microsoft-applicationinsights-angularplugin-js.mjs.map +1 -0
- package/fesm2020/microsoft-applicationinsights-angularplugin-js.mjs +158 -0
- package/fesm2020/microsoft-applicationinsights-angularplugin-js.mjs.map +1 -0
- package/lib/IErrorService.d.ts +4 -0
- package/lib/applicationinsights-angularplugin-error.service.d.ts +8 -3
- package/lib/applicationinsights-angularplugin-js.component.d.ts +4 -0
- package/lib/applicationinsights-angularplugin-js.module.d.ts +5 -0
- package/microsoft-applicationinsights-angularplugin-js-2.8.0.tgz +0 -0
- package/microsoft-applicationinsights-angularplugin-js.d.ts +1 -0
- package/package.json +24 -12
- package/public-api.d.ts +1 -0
- package/bundles/microsoft-applicationinsights-angularplugin-js.umd.js +0 -455
- package/bundles/microsoft-applicationinsights-angularplugin-js.umd.js.map +0 -1
- package/bundles/microsoft-applicationinsights-angularplugin-js.umd.min.js +0 -16
- package/bundles/microsoft-applicationinsights-angularplugin-js.umd.min.js.map +0 -1
- package/esm2015/lib/applicationinsights-angularplugin-error.service.js +0 -26
- package/esm2015/lib/applicationinsights-angularplugin-js.component.js +0 -79
- package/esm2015/lib/applicationinsights-angularplugin-js.module.js +0 -16
- package/fesm2015/microsoft-applicationinsights-angularplugin-js.js +0 -126
- package/fesm2015/microsoft-applicationinsights-angularplugin-js.js.map +0 -1
- package/microsoft-applicationinsights-angularplugin-js-2.6.2.tgz +0 -0
- package/microsoft-applicationinsights-angularplugin-js.metadata.json +0 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { PropertiesPluginIdentifier, Util } from '@microsoft/applicationinsights-common';
|
|
4
|
+
import { arrForEach, BaseTelemetryPlugin, getLocation, LoggingSeverity, _InternalMessageId } from '@microsoft/applicationinsights-core-js';
|
|
5
|
+
import { NavigationEnd } from '@angular/router';
|
|
6
|
+
|
|
7
|
+
class ApplicationinsightsAngularpluginErrorService {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.errorServices = [];
|
|
10
|
+
if (ApplicationinsightsAngularpluginErrorService.instance === null) {
|
|
11
|
+
ApplicationinsightsAngularpluginErrorService.instance = this;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
set plugin(analyticsPlugin) {
|
|
15
|
+
this.analyticsPlugin = analyticsPlugin;
|
|
16
|
+
}
|
|
17
|
+
addErrorHandler(errorService) {
|
|
18
|
+
this.errorServices.push(errorService);
|
|
19
|
+
}
|
|
20
|
+
handleError(error) {
|
|
21
|
+
if (this.analyticsPlugin) {
|
|
22
|
+
this.analyticsPlugin.trackException({ exception: error });
|
|
23
|
+
}
|
|
24
|
+
if (this.errorServices && this.errorServices.length > 0) {
|
|
25
|
+
arrForEach(this.errorServices, errorService => {
|
|
26
|
+
if (errorService.handleError && typeof errorService.handleError === 'function') {
|
|
27
|
+
errorService.handleError(error);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
ApplicationinsightsAngularpluginErrorService.instance = null;
|
|
34
|
+
ApplicationinsightsAngularpluginErrorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginErrorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35
|
+
ApplicationinsightsAngularpluginErrorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginErrorService, providedIn: 'root' });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginErrorService, decorators: [{
|
|
37
|
+
type: Injectable,
|
|
38
|
+
args: [{
|
|
39
|
+
providedIn: 'root'
|
|
40
|
+
}]
|
|
41
|
+
}], ctorParameters: function () { return []; } });
|
|
42
|
+
|
|
43
|
+
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
44
|
+
class AngularPlugin extends BaseTelemetryPlugin {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
|
+
this.priority = 186;
|
|
48
|
+
this.identifier = 'AngularPlugin';
|
|
49
|
+
}
|
|
50
|
+
initialize(config, core, extensions, pluginChain) {
|
|
51
|
+
super.initialize(config, core, extensions, pluginChain);
|
|
52
|
+
const self = this;
|
|
53
|
+
const ctx = self._getTelCtx();
|
|
54
|
+
const extConfig = ctx.getExtCfg(self.identifier, { router: null, errorServices: null });
|
|
55
|
+
arrForEach(extensions, ext => {
|
|
56
|
+
const identifier = ext.identifier;
|
|
57
|
+
if (identifier === 'ApplicationInsightsAnalytics') {
|
|
58
|
+
self.analyticsPlugin = ext;
|
|
59
|
+
if (ApplicationinsightsAngularpluginErrorService.instance !== null) {
|
|
60
|
+
ApplicationinsightsAngularpluginErrorService.instance.plugin = self.analyticsPlugin;
|
|
61
|
+
if (extConfig.errorServices && Array.isArray(extConfig.errorServices)) {
|
|
62
|
+
arrForEach(extConfig.errorServices, (errorService) => {
|
|
63
|
+
ApplicationinsightsAngularpluginErrorService.instance.addErrorHandler(errorService);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (identifier === PropertiesPluginIdentifier) {
|
|
69
|
+
self.propertiesPlugin = ext;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
if (extConfig.router) {
|
|
73
|
+
let isPageInitialLoad = true;
|
|
74
|
+
const pageViewTelemetry = {
|
|
75
|
+
uri: extConfig.router.url
|
|
76
|
+
};
|
|
77
|
+
self.trackPageView(pageViewTelemetry);
|
|
78
|
+
extConfig.router.events.subscribe(event => {
|
|
79
|
+
if (event instanceof NavigationEnd) {
|
|
80
|
+
// for page initial load, do not call trackPageView twice
|
|
81
|
+
if (isPageInitialLoad) {
|
|
82
|
+
isPageInitialLoad = false;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const pvt = {
|
|
86
|
+
uri: extConfig.router.url,
|
|
87
|
+
properties: { duration: 0 } // SPA route change loading durations are undefined, so send 0
|
|
88
|
+
};
|
|
89
|
+
self.trackPageView(pvt);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Add Part A fields to the event
|
|
96
|
+
*
|
|
97
|
+
* @param event The event that needs to be processed
|
|
98
|
+
*/
|
|
99
|
+
processTelemetry(event, itemCtx) {
|
|
100
|
+
this.processNext(event, itemCtx);
|
|
101
|
+
}
|
|
102
|
+
trackPageView(pageView) {
|
|
103
|
+
const self = this;
|
|
104
|
+
if (self.analyticsPlugin) {
|
|
105
|
+
const location = getLocation();
|
|
106
|
+
if (self.propertiesPlugin && self.propertiesPlugin.context && self.propertiesPlugin.context.telemetryTrace) {
|
|
107
|
+
self.propertiesPlugin.context.telemetryTrace.traceID = Util.generateW3CId();
|
|
108
|
+
self.propertiesPlugin.context.telemetryTrace.name = location && location.pathname || '_unknown_';
|
|
109
|
+
}
|
|
110
|
+
self.analyticsPlugin.trackPageView(pageView);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
self.diagLog().throwInternal(
|
|
114
|
+
// eslint-disable-next-line max-len
|
|
115
|
+
LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, 'Analytics plugin is not available, Angular plugin telemetry will not be sent: ');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
AngularPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AngularPlugin, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
+
AngularPlugin.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: AngularPlugin, selector: "lib-applicationinsights-angularplugin-js", usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AngularPlugin, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{
|
|
124
|
+
selector: 'lib-applicationinsights-angularplugin-js',
|
|
125
|
+
template: ``,
|
|
126
|
+
styles: []
|
|
127
|
+
}]
|
|
128
|
+
}] });
|
|
129
|
+
|
|
130
|
+
class ApplicationinsightsAngularpluginJsModule {
|
|
131
|
+
}
|
|
132
|
+
ApplicationinsightsAngularpluginJsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginJsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
133
|
+
ApplicationinsightsAngularpluginJsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginJsModule, declarations: [AngularPlugin], exports: [AngularPlugin] });
|
|
134
|
+
ApplicationinsightsAngularpluginJsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginJsModule, providers: [
|
|
135
|
+
ApplicationinsightsAngularpluginErrorService
|
|
136
|
+
], imports: [[]] });
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ApplicationinsightsAngularpluginJsModule, decorators: [{
|
|
138
|
+
type: NgModule,
|
|
139
|
+
args: [{
|
|
140
|
+
declarations: [AngularPlugin],
|
|
141
|
+
imports: [],
|
|
142
|
+
exports: [AngularPlugin],
|
|
143
|
+
providers: [
|
|
144
|
+
ApplicationinsightsAngularpluginErrorService
|
|
145
|
+
]
|
|
146
|
+
}]
|
|
147
|
+
}] });
|
|
148
|
+
|
|
149
|
+
/*
|
|
150
|
+
* Public API Surface of applicationinsights-angularplugin-js
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Generated bundle index. Do not edit.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
export { AngularPlugin, ApplicationinsightsAngularpluginErrorService, ApplicationinsightsAngularpluginJsModule };
|
|
158
|
+
//# sourceMappingURL=microsoft-applicationinsights-angularplugin-js.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microsoft-applicationinsights-angularplugin-js.mjs","sources":["../../../projects/applicationinsights-angularplugin-js/src/lib/applicationinsights-angularplugin-error.service.ts","../../../projects/applicationinsights-angularplugin-js/src/lib/applicationinsights-angularplugin-js.component.ts","../../../projects/applicationinsights-angularplugin-js/src/lib/applicationinsights-angularplugin-js.module.ts","../../../projects/applicationinsights-angularplugin-js/src/public-api.ts","../../../projects/applicationinsights-angularplugin-js/src/microsoft-applicationinsights-angularplugin-js.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { IAppInsights } from '@microsoft/applicationinsights-common';\r\nimport { arrForEach } from '@microsoft/applicationinsights-core-js';\r\nimport { IErrorService } from './IErrorService';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ApplicationinsightsAngularpluginErrorService implements IErrorService {\r\n public static instance: ApplicationinsightsAngularpluginErrorService = null;\r\n private analyticsPlugin: IAppInsights;\r\n private errorServices: IErrorService[] = [];\r\n\r\n constructor() {\r\n if (ApplicationinsightsAngularpluginErrorService.instance === null) {\r\n ApplicationinsightsAngularpluginErrorService.instance = this;\r\n }\r\n }\r\n\r\n public set plugin(analyticsPlugin: IAppInsights) {\r\n this.analyticsPlugin = analyticsPlugin;\r\n }\r\n\r\n public addErrorHandler(errorService: IErrorService): void {\r\n this.errorServices.push(errorService);\r\n }\r\n\r\n handleError(error: any): void {\r\n if (this.analyticsPlugin) {\r\n this.analyticsPlugin.trackException({ exception: error });\r\n }\r\n\r\n if (this.errorServices && this.errorServices.length > 0) {\r\n arrForEach(this.errorServices, errorService => {\r\n if (errorService.handleError && typeof errorService.handleError === 'function') {\r\n errorService.handleError(error);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\n","import { Component } from '@angular/core';\r\nimport {\r\n IConfig, IPageViewTelemetry, IAppInsights, PropertiesPluginIdentifier, Util\r\n} from '@microsoft/applicationinsights-common';\r\nimport {\r\n IPlugin, IConfiguration, IAppInsightsCore,\r\n ITelemetryPlugin, BaseTelemetryPlugin, arrForEach, ITelemetryItem, ITelemetryPluginChain,\r\n IProcessTelemetryContext, _InternalMessageId, LoggingSeverity, getLocation\r\n} from '@microsoft/applicationinsights-core-js';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\n// For types only\r\nimport * as properties from '@microsoft/applicationinsights-properties-js';\r\nimport { ApplicationinsightsAngularpluginErrorService } from './applicationinsights-angularplugin-error.service';\r\nimport { IErrorService } from './IErrorService';\r\n\r\ninterface IAngularExtensionConfig {\r\n /**\r\n * Angular router for enabling Application Insights PageView tracking.\r\n */\r\n router?: Router;\r\n\r\n /**\r\n * Custom error service for global error handling.\r\n */\r\n errorServices?: IErrorService[];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-applicationinsights-angularplugin-js',\r\n template: ``,\r\n styles: []\r\n})\r\n// eslint-disable-next-line @angular-eslint/component-class-suffix\r\nexport class AngularPlugin extends BaseTelemetryPlugin {\r\n public priority = 186;\r\n public identifier = 'AngularPlugin';\r\n\r\n private analyticsPlugin: IAppInsights;\r\n private propertiesPlugin: properties.PropertiesPlugin;\r\n\r\n initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) {\r\n super.initialize(config, core, extensions, pluginChain);\r\n const self = this;\r\n const ctx = self._getTelCtx();\r\n const extConfig = ctx.getExtCfg<IAngularExtensionConfig>(self.identifier, { router: null, errorServices: null });\r\n arrForEach(extensions, ext => {\r\n const identifier = (ext as ITelemetryPlugin).identifier;\r\n if (identifier === 'ApplicationInsightsAnalytics') {\r\n self.analyticsPlugin = (ext as any) as IAppInsights;\r\n if (ApplicationinsightsAngularpluginErrorService.instance !== null) {\r\n ApplicationinsightsAngularpluginErrorService.instance.plugin = self.analyticsPlugin;\r\n if (extConfig.errorServices && Array.isArray(extConfig.errorServices)) {\r\n arrForEach(extConfig.errorServices, (errorService: IErrorService) => {\r\n ApplicationinsightsAngularpluginErrorService.instance.addErrorHandler(errorService);\r\n });\r\n }\r\n }\r\n }\r\n if (identifier === PropertiesPluginIdentifier) {\r\n self.propertiesPlugin = (ext as any) as properties.PropertiesPlugin;\r\n }\r\n });\r\n\r\n if (extConfig.router) {\r\n let isPageInitialLoad = true;\r\n const pageViewTelemetry: IPageViewTelemetry = {\r\n uri: extConfig.router.url\r\n };\r\n self.trackPageView(pageViewTelemetry);\r\n extConfig.router.events.subscribe(event => {\r\n if (event instanceof NavigationEnd) {\r\n // for page initial load, do not call trackPageView twice\r\n if (isPageInitialLoad) {\r\n isPageInitialLoad = false;\r\n return;\r\n }\r\n const pvt: IPageViewTelemetry = {\r\n uri: extConfig.router.url,\r\n properties: { duration: 0 } // SPA route change loading durations are undefined, so send 0\r\n };\r\n self.trackPageView(pvt);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Add Part A fields to the event\r\n *\r\n * @param event The event that needs to be processed\r\n */\r\n processTelemetry(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext) {\r\n this.processNext(event, itemCtx);\r\n }\r\n\r\n trackPageView(pageView: IPageViewTelemetry) {\r\n const self = this;\r\n\r\n if (self.analyticsPlugin) {\r\n const location = getLocation();\r\n if (self.propertiesPlugin && self.propertiesPlugin.context && self.propertiesPlugin.context.telemetryTrace) {\r\n self.propertiesPlugin.context.telemetryTrace.traceID = Util.generateW3CId();\r\n self.propertiesPlugin.context.telemetryTrace.name = location && location.pathname || '_unknown_';\r\n }\r\n self.analyticsPlugin.trackPageView(pageView);\r\n } else {\r\n self.diagLog().throwInternal(\r\n // eslint-disable-next-line max-len\r\n LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, 'Analytics plugin is not available, Angular plugin telemetry will not be sent: ');\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AngularPlugin } from './applicationinsights-angularplugin-js.component';\r\nimport { ApplicationinsightsAngularpluginErrorService } from './applicationinsights-angularplugin-error.service';\r\n\r\n@NgModule({\r\n declarations: [AngularPlugin],\r\n imports: [\r\n ],\r\n exports: [AngularPlugin],\r\n providers: [\r\n ApplicationinsightsAngularpluginErrorService\r\n ]\r\n})\r\nexport class ApplicationinsightsAngularpluginJsModule { }\r\n","/*\r\n * Public API Surface of applicationinsights-angularplugin-js\r\n */\r\n\r\nexport * from './lib/applicationinsights-angularplugin-js.component';\r\nexport * from './lib/applicationinsights-angularplugin-js.module';\r\nexport * from './lib/applicationinsights-angularplugin-error.service';\r\nexport * from './lib/IErrorService';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAQa,4CAA4C;IAKvD;QAFQ,kBAAa,GAAoB,EAAE,CAAC;QAG1C,IAAI,4CAA4C,CAAC,QAAQ,KAAK,IAAI,EAAE;YAClE,4CAA4C,CAAC,QAAQ,GAAG,IAAI,CAAC;SAC9D;KACF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oBACR,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT,4CAA4C;qBAC7C;iBACF;;;ACZD;;;;ACAA;;;;;;"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { ErrorHandler } from '@angular/core';
|
|
2
1
|
import { IAppInsights } from '@microsoft/applicationinsights-common';
|
|
3
|
-
|
|
2
|
+
import { IErrorService } from './IErrorService';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ApplicationinsightsAngularpluginErrorService implements IErrorService {
|
|
4
5
|
static instance: ApplicationinsightsAngularpluginErrorService;
|
|
5
6
|
private analyticsPlugin;
|
|
6
|
-
|
|
7
|
+
private errorServices;
|
|
7
8
|
constructor();
|
|
9
|
+
set plugin(analyticsPlugin: IAppInsights);
|
|
10
|
+
addErrorHandler(errorService: IErrorService): void;
|
|
8
11
|
handleError(error: any): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationinsightsAngularpluginErrorService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationinsightsAngularpluginErrorService>;
|
|
9
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IConfig, IPageViewTelemetry } from '@microsoft/applicationinsights-common';
|
|
2
2
|
import { IPlugin, IConfiguration, IAppInsightsCore, BaseTelemetryPlugin, ITelemetryItem, ITelemetryPluginChain, IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class AngularPlugin extends BaseTelemetryPlugin {
|
|
4
5
|
priority: number;
|
|
5
6
|
identifier: string;
|
|
@@ -8,8 +9,11 @@ export declare class AngularPlugin extends BaseTelemetryPlugin {
|
|
|
8
9
|
initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
9
10
|
/**
|
|
10
11
|
* Add Part A fields to the event
|
|
12
|
+
*
|
|
11
13
|
* @param event The event that needs to be processed
|
|
12
14
|
*/
|
|
13
15
|
processTelemetry(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
14
16
|
trackPageView(pageView: IPageViewTelemetry): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularPlugin, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularPlugin, "lib-applicationinsights-angularplugin-js", never, {}, {}, never, never>;
|
|
15
19
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./applicationinsights-angularplugin-js.component";
|
|
1
3
|
export declare class ApplicationinsightsAngularpluginJsModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationinsightsAngularpluginJsModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ApplicationinsightsAngularpluginJsModule, [typeof i1.AngularPlugin], never, [typeof i1.AngularPlugin]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ApplicationinsightsAngularpluginJsModule>;
|
|
2
7
|
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-angularplugin-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^13.0.3",
|
|
6
|
+
"@angular/core": "^13.0.3"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@microsoft/applicationinsights-common": "^2.
|
|
10
|
-
"@microsoft/applicationinsights-core-js": "^2.
|
|
11
|
-
"@microsoft/applicationinsights-properties-js": "^2.
|
|
9
|
+
"@microsoft/applicationinsights-common": "^2.7.3",
|
|
10
|
+
"@microsoft/applicationinsights-core-js": "^2.7.3",
|
|
11
|
+
"@microsoft/applicationinsights-properties-js": "^2.7.3",
|
|
12
12
|
"@microsoft/applicationinsights-rollup-es3": "^1.1.3",
|
|
13
13
|
"@microsoft/applicationinsights-shims": "^1.0.3",
|
|
14
14
|
"tslib": "^2.0.0"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"fesm2015": "fesm2015/microsoft-applicationinsights-angularplugin-js.
|
|
16
|
+
"module": "fesm2015/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
17
|
+
"es2020": "fesm2020/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
18
|
+
"esm2020": "esm2020/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
19
|
+
"fesm2020": "fesm2020/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
20
|
+
"fesm2015": "fesm2015/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
21
21
|
"typings": "microsoft-applicationinsights-angularplugin-js.d.ts",
|
|
22
|
-
"
|
|
22
|
+
"exports": {
|
|
23
|
+
"./package.json": {
|
|
24
|
+
"default": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./microsoft-applicationinsights-angularplugin-js.d.ts",
|
|
28
|
+
"esm2020": "./esm2020/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
29
|
+
"es2020": "./fesm2020/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
30
|
+
"es2015": "./fesm2015/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
31
|
+
"node": "./fesm2015/microsoft-applicationinsights-angularplugin-js.mjs",
|
|
32
|
+
"default": "./fesm2020/microsoft-applicationinsights-angularplugin-js.mjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
23
35
|
"sideEffects": false
|
|
24
36
|
}
|
package/public-api.d.ts
CHANGED