@microsoft/applicationinsights-core-js 3.0.0-beta.2208-03 → 3.0.0-beta.2208-16
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 +7 -0
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +2040 -2155
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +6998 -10817
- package/dist/applicationinsights-core-js.api.md +88 -177
- package/dist/applicationinsights-core-js.d.ts +94 -494
- package/dist/applicationinsights-core-js.js +2040 -2155
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +94 -494
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +2 -2
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +11 -12
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +3 -2
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +2 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +27 -26
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +8 -140
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +3 -3
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +4 -3
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +132 -136
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -3
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +23 -470
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +5 -5
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +4 -4
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +2 -2
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +4 -8
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +3 -3
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +2 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -3
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +2 -3
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +2 -2
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +5 -31
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +11 -13
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +6 -5
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +4 -3
- package/src/JavaScriptSDK/AppInsightsCore.ts +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +2 -4
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +2 -1
- package/src/JavaScriptSDK/ChannelController.ts +1 -1
- package/src/JavaScriptSDK/CookieMgr.ts +6 -5
- package/src/JavaScriptSDK/CoreUtils.ts +7 -423
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +2 -2
- package/src/JavaScriptSDK/DiagnosticLogger.ts +3 -2
- package/src/JavaScriptSDK/EnvUtils.ts +145 -148
- package/src/JavaScriptSDK/EventHelpers.ts +1 -2
- package/src/JavaScriptSDK/HelperFuncs.ts +22 -536
- package/src/JavaScriptSDK/InstrumentHooks.ts +4 -4
- package/src/JavaScriptSDK/InternalConstants.ts +3 -3
- package/src/JavaScriptSDK/NotificationManager.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +3 -7
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +4 -4
- package/src/JavaScriptSDK/TelemetryHelpers.ts +1 -1
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +1 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +1 -1
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +5 -36
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +7 -0
- package/tsconfig.json +1 -1
- package/types/JavaScriptSDK/CoreUtils.d.ts +0 -270
- package/types/JavaScriptSDK/EnvUtils.d.ts +0 -65
- package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -154
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +6 -18
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +6 -0
- package/types/__DynamicConstants.d.ts +2 -4
- package/types/applicationinsights-core-js.d.ts +5 -4
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2208-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2208-16
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -13,12 +13,53 @@
|
|
|
13
13
|
* ---------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { arrForEach } from '@nevware21/ts-utils';
|
|
17
|
+
import { arrIndexOf } from '@nevware21/ts-utils';
|
|
18
|
+
import { arrMap } from '@nevware21/ts-utils';
|
|
19
|
+
import { arrReduce } from '@nevware21/ts-utils';
|
|
20
|
+
import { objDeepFreeze as deepFreeze } from '@nevware21/ts-utils';
|
|
21
|
+
import { dumpObj } from '@nevware21/ts-utils';
|
|
22
|
+
import { EnumCls } from '@nevware21/ts-utils';
|
|
23
|
+
import { getDocument } from '@nevware21/ts-utils';
|
|
16
24
|
import { getGlobal } from '@microsoft/applicationinsights-shims';
|
|
25
|
+
import { getInst as getGlobalInst } from '@nevware21/ts-utils';
|
|
26
|
+
import { getHistory } from '@nevware21/ts-utils';
|
|
27
|
+
import { getNavigator } from '@nevware21/ts-utils';
|
|
28
|
+
import { getWindow } from '@nevware21/ts-utils';
|
|
29
|
+
import { hasDocument } from '@nevware21/ts-utils';
|
|
30
|
+
import { hasHistory } from '@nevware21/ts-utils';
|
|
31
|
+
import { hasNavigator } from '@nevware21/ts-utils';
|
|
32
|
+
import { objHasOwnProperty as hasOwnProperty } from '@nevware21/ts-utils';
|
|
33
|
+
import { hasWindow } from '@nevware21/ts-utils';
|
|
34
|
+
import { isArray } from '@nevware21/ts-utils';
|
|
35
|
+
import { isBoolean } from '@nevware21/ts-utils';
|
|
36
|
+
import { isDate } from '@nevware21/ts-utils';
|
|
37
|
+
import { isError } from '@nevware21/ts-utils';
|
|
38
|
+
import { isFunction } from '@nevware21/ts-utils';
|
|
39
|
+
import { isNotTruthy } from '@nevware21/ts-utils';
|
|
40
|
+
import { isNullOrUndefined } from '@nevware21/ts-utils';
|
|
41
|
+
import { isNumber } from '@nevware21/ts-utils';
|
|
42
|
+
import { isObject } from '@nevware21/ts-utils';
|
|
43
|
+
import { isString } from '@nevware21/ts-utils';
|
|
44
|
+
import { isSymbol } from '@nevware21/ts-utils';
|
|
45
|
+
import { isTruthy } from '@nevware21/ts-utils';
|
|
46
|
+
import { isTypeof } from '@nevware21/ts-utils';
|
|
47
|
+
import { isUndefined } from '@nevware21/ts-utils';
|
|
17
48
|
import { objCreateFn as objCreate } from '@microsoft/applicationinsights-shims';
|
|
49
|
+
import { objDefineAccessors } from '@nevware21/ts-utils';
|
|
50
|
+
import { objForEachKey } from '@nevware21/ts-utils';
|
|
51
|
+
import { objFreeze } from '@nevware21/ts-utils';
|
|
52
|
+
import { objKeys } from '@nevware21/ts-utils';
|
|
53
|
+
import { objSeal } from '@nevware21/ts-utils';
|
|
54
|
+
import { objToString } from '@nevware21/ts-utils';
|
|
55
|
+
import { strEndsWith } from '@nevware21/ts-utils';
|
|
18
56
|
import { strShimFunction as strFunction } from '@microsoft/applicationinsights-shims';
|
|
19
57
|
import { strShimObject as strObject } from '@microsoft/applicationinsights-shims';
|
|
20
58
|
import { strShimPrototype as strPrototype } from '@microsoft/applicationinsights-shims';
|
|
59
|
+
import { strStartsWith } from '@nevware21/ts-utils';
|
|
60
|
+
import { strTrim } from '@nevware21/ts-utils';
|
|
21
61
|
import { strShimUndefined as strUndefined } from '@microsoft/applicationinsights-shims';
|
|
62
|
+
import { throwError } from '@nevware21/ts-utils';
|
|
22
63
|
|
|
23
64
|
/**
|
|
24
65
|
* Get all of the registered events on the target object, this is primarily used for testing cleanup but may also be used by
|
|
@@ -97,45 +138,13 @@ export declare class AppInsightsCore extends BaseCore implements IAppInsightsCor
|
|
|
97
138
|
|
|
98
139
|
export declare function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
99
140
|
|
|
100
|
-
|
|
101
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
102
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
103
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
104
|
-
* cause a testing requirement to test with and without the implementations
|
|
105
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
106
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
107
|
-
*/
|
|
108
|
-
export declare function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
|
|
141
|
+
export { arrForEach }
|
|
109
142
|
|
|
110
|
-
|
|
111
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
112
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
113
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
114
|
-
* cause a testing requirement to test with and without the implementations
|
|
115
|
-
* @param searchElement The value to locate in the array.
|
|
116
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
117
|
-
*/
|
|
118
|
-
export declare function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number;
|
|
143
|
+
export { arrIndexOf }
|
|
119
144
|
|
|
120
|
-
|
|
121
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
122
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
123
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
124
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
125
|
-
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
126
|
-
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
127
|
-
*/
|
|
128
|
-
export declare function arrMap<T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any): R[];
|
|
145
|
+
export { arrMap }
|
|
129
146
|
|
|
130
|
-
|
|
131
|
-
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
|
|
132
|
-
* provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
|
|
133
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
134
|
-
* this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
135
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
136
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
137
|
-
*/
|
|
138
|
-
export declare function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R): R;
|
|
147
|
+
export { arrReduce }
|
|
139
148
|
|
|
140
149
|
/**
|
|
141
150
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
@@ -348,20 +357,6 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
348
357
|
protected _addHook(hooks: IInstrumentHook | IInstrumentHook[]): void;
|
|
349
358
|
}
|
|
350
359
|
|
|
351
|
-
/**
|
|
352
|
-
* @deprecated - Use the core.getCookieMgr().isEnabled()
|
|
353
|
-
* Helper method to tell if document.cookie object is available and whether it can be used.
|
|
354
|
-
*/
|
|
355
|
-
export declare function canUseCookies(logger: IDiagnosticLogger): any;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Provides a collection of utility functions, included for backward compatibility with previous releases.
|
|
359
|
-
* @deprecated Marking this instance as deprecated in favor of direct usage of the helper functions
|
|
360
|
-
* as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
|
|
361
|
-
* in your resulting code.
|
|
362
|
-
*/
|
|
363
|
-
export declare const CoreUtils: ICoreUtils;
|
|
364
|
-
|
|
365
360
|
/**
|
|
366
361
|
* Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.
|
|
367
362
|
* Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance
|
|
@@ -371,23 +366,14 @@ export declare function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
|
371
366
|
|
|
372
367
|
export declare function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
373
368
|
|
|
374
|
-
/**
|
|
375
|
-
* Create a 2 index map that maps an enum's key as both the key and value, X["key"] => "key" and X[0] => "keyof 0".
|
|
376
|
-
* @param values - The values to populate on the new object
|
|
377
|
-
* @returns
|
|
378
|
-
*/
|
|
379
|
-
export declare function createEnumMap<E, I = keyof E>(values: {
|
|
380
|
-
[key in keyof E]: E[keyof E];
|
|
381
|
-
}): EnumMap<E, I>;
|
|
382
|
-
|
|
383
369
|
/**
|
|
384
370
|
* Create an enum style object which has both the key => value and value => key mappings
|
|
385
371
|
* @param values - The values to populate on the new object
|
|
386
372
|
* @returns
|
|
387
373
|
*/
|
|
388
|
-
export declare
|
|
374
|
+
export declare const createEnumStyle: <E>(values: {
|
|
389
375
|
[key in keyof E]: E[keyof E];
|
|
390
|
-
})
|
|
376
|
+
}) => EnumValue<E>;
|
|
391
377
|
|
|
392
378
|
/**
|
|
393
379
|
* Creates a new Telemetry Item context with the current config, core and plugin execution chain
|
|
@@ -424,9 +410,9 @@ export declare function createUnloadHandlerContainer(): {
|
|
|
424
410
|
* @param values - The values to populate on the new object
|
|
425
411
|
* @returns
|
|
426
412
|
*/
|
|
427
|
-
export declare
|
|
413
|
+
export declare const createValueMap: <E, V = E>(values: {
|
|
428
414
|
[key in keyof E]: [E[keyof E], V[keyof V]];
|
|
429
|
-
})
|
|
415
|
+
}) => V;
|
|
430
416
|
|
|
431
417
|
/**
|
|
432
418
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
@@ -434,14 +420,7 @@ export declare function createValueMap<E, V = E>(values: {
|
|
|
434
420
|
*/
|
|
435
421
|
export declare function dateNow(): number;
|
|
436
422
|
|
|
437
|
-
export
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* @deprecated - Use the core.getCookieMgr().del()
|
|
441
|
-
* Deletes a cookie by setting it's expiration time in the past.
|
|
442
|
-
* @param name - The name of the cookie to delete.
|
|
443
|
-
*/
|
|
444
|
-
export declare function deleteCookie(logger: IDiagnosticLogger, name: string): boolean;
|
|
423
|
+
export { deepFreeze }
|
|
445
424
|
|
|
446
425
|
/**
|
|
447
426
|
* Removes an event handler for the specified event
|
|
@@ -510,12 +489,6 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
510
489
|
logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
511
490
|
}
|
|
512
491
|
|
|
513
|
-
/**
|
|
514
|
-
* @deprecated - Use the core.getCookieMgr().disable()
|
|
515
|
-
* Force the SDK not to store and read any data from cookies.
|
|
516
|
-
*/
|
|
517
|
-
export declare function disableCookies(): void;
|
|
518
|
-
|
|
519
492
|
/**
|
|
520
493
|
* Helper function to wrap a function with a perf event
|
|
521
494
|
* @param mgrSource - The Performance Manager or a Performance provider source (may be null)
|
|
@@ -526,10 +499,7 @@ export declare function disableCookies(): void;
|
|
|
526
499
|
*/
|
|
527
500
|
export declare function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSource: () => string, func: (perfEvt?: IPerfEvent) => T, details?: () => any, isAsync?: boolean): T;
|
|
528
501
|
|
|
529
|
-
|
|
530
|
-
* Returns string representation of an object suitable for diagnostics logging.
|
|
531
|
-
*/
|
|
532
|
-
export declare function dumpObj(object: any): string;
|
|
502
|
+
export { dumpObj }
|
|
533
503
|
|
|
534
504
|
/**
|
|
535
505
|
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
@@ -658,15 +628,7 @@ export declare const enum eLoggingSeverity {
|
|
|
658
628
|
WARNING = 2
|
|
659
629
|
}
|
|
660
630
|
|
|
661
|
-
export declare type
|
|
662
|
-
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
663
|
-
} & I;
|
|
664
|
-
|
|
665
|
-
export declare type EnumValue<E = any> = {
|
|
666
|
-
readonly [key in keyof E]: E[key];
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
export declare const EventHelper: IEventHelper;
|
|
631
|
+
export declare type EnumValue<E = any> = EnumCls<E>;
|
|
670
632
|
|
|
671
633
|
/**
|
|
672
634
|
* Removes an event handler for the specified event
|
|
@@ -740,12 +702,6 @@ export declare function generateW3CId(): string;
|
|
|
740
702
|
*/
|
|
741
703
|
export declare function getConsole(): Console | null;
|
|
742
704
|
|
|
743
|
-
/**
|
|
744
|
-
* @deprecated - Use the core.getCookieMgr().get()
|
|
745
|
-
* helper method to access userId and sessionId cookie
|
|
746
|
-
*/
|
|
747
|
-
export declare function getCookie(logger: IDiagnosticLogger, name: string): string;
|
|
748
|
-
|
|
749
705
|
/**
|
|
750
706
|
* Returns the crypto object if it is present otherwise null.
|
|
751
707
|
* This helper is used to access the crypto object from the current
|
|
@@ -757,12 +713,7 @@ export declare function getDebugExt(config: IConfiguration): IDbgExtension;
|
|
|
757
713
|
|
|
758
714
|
export declare function getDebugListener(config: IConfiguration): INotificationListener;
|
|
759
715
|
|
|
760
|
-
|
|
761
|
-
* Returns the global document object if it is present otherwise null.
|
|
762
|
-
* This helper is used to access the document object without causing an exception
|
|
763
|
-
* "Uncaught ReferenceError: document is not defined"
|
|
764
|
-
*/
|
|
765
|
-
export declare function getDocument(): Document | null;
|
|
716
|
+
export { getDocument }
|
|
766
717
|
|
|
767
718
|
/**
|
|
768
719
|
* Returns the name of object if it's an Error. Otherwise, returns empty string.
|
|
@@ -783,18 +734,9 @@ export declare function getGblPerfMgr(): IPerfManager;
|
|
|
783
734
|
|
|
784
735
|
export { getGlobal }
|
|
785
736
|
|
|
786
|
-
|
|
787
|
-
* Return the named global object if available, will return null if the object is not available.
|
|
788
|
-
* @param name The globally named object
|
|
789
|
-
*/
|
|
790
|
-
export declare function getGlobalInst<T>(name: string): T;
|
|
737
|
+
export { getGlobalInst }
|
|
791
738
|
|
|
792
|
-
|
|
793
|
-
* Returns the global history object if it is present otherwise null.
|
|
794
|
-
* This helper is used to access the history object without causing an exception
|
|
795
|
-
* "Uncaught ReferenceError: history is not defined"
|
|
796
|
-
*/
|
|
797
|
-
export declare function getHistory(): History | null;
|
|
739
|
+
export { getHistory }
|
|
798
740
|
|
|
799
741
|
/**
|
|
800
742
|
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
|
|
@@ -822,12 +764,7 @@ export declare function getLocation(checkForMock?: boolean): Location | null;
|
|
|
822
764
|
*/
|
|
823
765
|
export declare function getMsCrypto(): Crypto | null;
|
|
824
766
|
|
|
825
|
-
|
|
826
|
-
* Returns the global navigator object if it is present otherwise null.
|
|
827
|
-
* This helper is used to access the navigator object without causing an exception
|
|
828
|
-
* "Uncaught ReferenceError: navigator is not defined"
|
|
829
|
-
*/
|
|
830
|
-
export declare function getNavigator(): Navigator | null;
|
|
767
|
+
export { getNavigator }
|
|
831
768
|
|
|
832
769
|
/**
|
|
833
770
|
* Returns the performance object if it is present otherwise null.
|
|
@@ -844,30 +781,11 @@ export declare function getPerformance(): Performance | null;
|
|
|
844
781
|
*/
|
|
845
782
|
export declare function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
|
|
846
783
|
|
|
847
|
-
|
|
848
|
-
* Returns the global window object if it is present otherwise null.
|
|
849
|
-
* This helper is used to access the window object without causing an exception
|
|
850
|
-
* "Uncaught ReferenceError: window is not defined"
|
|
851
|
-
*/
|
|
852
|
-
export declare function getWindow(): Window | null;
|
|
784
|
+
export { getWindow }
|
|
853
785
|
|
|
854
|
-
|
|
855
|
-
* Checks if document object is available, this is required as we support the API running without a
|
|
856
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a document
|
|
857
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: document is not defined"
|
|
858
|
-
* exception will be thrown.
|
|
859
|
-
* Defined as a function to support lazy / late binding environments.
|
|
860
|
-
*/
|
|
861
|
-
export declare function hasDocument(): boolean;
|
|
786
|
+
export { hasDocument }
|
|
862
787
|
|
|
863
|
-
|
|
864
|
-
* Checks if history object is available, this is required as we support the API running without a
|
|
865
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a history
|
|
866
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: history is not defined"
|
|
867
|
-
* exception will be thrown.
|
|
868
|
-
* Defined as a function to support lazy / late binding environments.
|
|
869
|
-
*/
|
|
870
|
-
export declare function hasHistory(): boolean;
|
|
788
|
+
export { hasHistory }
|
|
871
789
|
|
|
872
790
|
/**
|
|
873
791
|
* Checks if JSON object is available, this is required as we support the API running without a
|
|
@@ -878,25 +796,11 @@ export declare function hasHistory(): boolean;
|
|
|
878
796
|
*/
|
|
879
797
|
export declare function hasJSON(): boolean;
|
|
880
798
|
|
|
881
|
-
|
|
882
|
-
* Checks if navigator object is available, this is required as we support the API running without a
|
|
883
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a navigator
|
|
884
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: navigator is not defined"
|
|
885
|
-
* exception will be thrown.
|
|
886
|
-
* Defined as a function to support lazy / late binding environments.
|
|
887
|
-
*/
|
|
888
|
-
export declare function hasNavigator(): boolean;
|
|
799
|
+
export { hasNavigator }
|
|
889
800
|
|
|
890
|
-
export
|
|
801
|
+
export { hasOwnProperty }
|
|
891
802
|
|
|
892
|
-
|
|
893
|
-
* Checks if window object is available, this is required as we support the API running without a
|
|
894
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a window
|
|
895
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: window is not defined"
|
|
896
|
-
* exception will be thrown.
|
|
897
|
-
* Defined as a function to support lazy / late binding environments.
|
|
898
|
-
*/
|
|
899
|
-
export declare function hasWindow(): boolean;
|
|
803
|
+
export { hasWindow }
|
|
900
804
|
|
|
901
805
|
export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
902
806
|
config: IConfiguration;
|
|
@@ -1314,195 +1218,6 @@ export declare interface ICookieMgrConfig {
|
|
|
1314
1218
|
delCookie?: (name: string, cookieValue: string) => void;
|
|
1315
1219
|
}
|
|
1316
1220
|
|
|
1317
|
-
/**
|
|
1318
|
-
* Provides a collection of utility functions, included for backward compatibility with previous releases.
|
|
1319
|
-
* @deprecated Marking this interface and instance as deprecated in favor of direct usage of the helper functions
|
|
1320
|
-
* as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
|
|
1321
|
-
* in your resulting code.
|
|
1322
|
-
*/
|
|
1323
|
-
export declare interface ICoreUtils {
|
|
1324
|
-
/**
|
|
1325
|
-
* Internal - Do not use directly.
|
|
1326
|
-
* @deprecated Direct usage of this property is not recommend
|
|
1327
|
-
*/
|
|
1328
|
-
_canUseCookies: boolean;
|
|
1329
|
-
isTypeof: (value: any, theType: string) => boolean;
|
|
1330
|
-
isUndefined: (value: any) => boolean;
|
|
1331
|
-
isNullOrUndefined: (value: any) => boolean;
|
|
1332
|
-
hasOwnProperty: (obj: any, prop: string) => boolean;
|
|
1333
|
-
/**
|
|
1334
|
-
* Checks if the passed of value is a function.
|
|
1335
|
-
* @param {any} value - Value to be checked.
|
|
1336
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1337
|
-
*/
|
|
1338
|
-
isFunction: (value: any) => value is Function;
|
|
1339
|
-
/**
|
|
1340
|
-
* Checks if the passed of value is a function.
|
|
1341
|
-
* @param {any} value - Value to be checked.
|
|
1342
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1343
|
-
*/
|
|
1344
|
-
isObject: (value: any) => boolean;
|
|
1345
|
-
/**
|
|
1346
|
-
* Check if an object is of type Date
|
|
1347
|
-
*/
|
|
1348
|
-
isDate: (obj: any) => obj is Date;
|
|
1349
|
-
/**
|
|
1350
|
-
* Check if an object is of type Array
|
|
1351
|
-
*/
|
|
1352
|
-
isArray: (obj: any) => boolean;
|
|
1353
|
-
/**
|
|
1354
|
-
* Check if an object is of type Error
|
|
1355
|
-
*/
|
|
1356
|
-
isError: (obj: any) => obj is Error;
|
|
1357
|
-
/**
|
|
1358
|
-
* Checks if the type of value is a string.
|
|
1359
|
-
* @param {any} value - Value to be checked.
|
|
1360
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
1361
|
-
*/
|
|
1362
|
-
isString: (value: any) => value is string;
|
|
1363
|
-
/**
|
|
1364
|
-
* Checks if the type of value is a number.
|
|
1365
|
-
* @param {any} value - Value to be checked.
|
|
1366
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
1367
|
-
*/
|
|
1368
|
-
isNumber: (value: any) => value is number;
|
|
1369
|
-
/**
|
|
1370
|
-
* Checks if the type of value is a boolean.
|
|
1371
|
-
* @param {any} value - Value to be checked.
|
|
1372
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1373
|
-
*/
|
|
1374
|
-
isBoolean: (value: any) => value is boolean;
|
|
1375
|
-
/**
|
|
1376
|
-
* Convert a date to I.S.O. format in IE8
|
|
1377
|
-
*/
|
|
1378
|
-
toISOString: (date: Date) => string;
|
|
1379
|
-
/**
|
|
1380
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
1381
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
1382
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
1383
|
-
* cause a testing requirement to test with and without the implementations
|
|
1384
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
1385
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1386
|
-
*/
|
|
1387
|
-
arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
|
|
1388
|
-
/**
|
|
1389
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
1390
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
1391
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
1392
|
-
* cause a testing requirement to test with and without the implementations
|
|
1393
|
-
* @param searchElement The value to locate in the array.
|
|
1394
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
1395
|
-
*/
|
|
1396
|
-
arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
|
|
1397
|
-
/**
|
|
1398
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
1399
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
1400
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
1401
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1402
|
-
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
1403
|
-
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1404
|
-
*/
|
|
1405
|
-
arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
|
|
1406
|
-
/**
|
|
1407
|
-
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
|
|
1408
|
-
* provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
|
|
1409
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
1410
|
-
* this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1411
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
1412
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
1413
|
-
*/
|
|
1414
|
-
arrReduce: <T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R) => R;
|
|
1415
|
-
/**
|
|
1416
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
1417
|
-
*/
|
|
1418
|
-
strTrim: (str: any) => string;
|
|
1419
|
-
/**
|
|
1420
|
-
* Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil
|
|
1421
|
-
* for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
1422
|
-
* Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1423
|
-
* @param obj Object to use as a prototype. May be null
|
|
1424
|
-
*/
|
|
1425
|
-
objCreate: (obj: object) => any;
|
|
1426
|
-
/**
|
|
1427
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
1428
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
1429
|
-
* Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1430
|
-
* @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
1431
|
-
*/
|
|
1432
|
-
objKeys: (obj: {}) => string[];
|
|
1433
|
-
/**
|
|
1434
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
1435
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
1436
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
1437
|
-
* @param target The object on which to define the property.
|
|
1438
|
-
* @param prop The name of the property to be defined or modified.
|
|
1439
|
-
* @param getProp The getter function to wire against the getter.
|
|
1440
|
-
* @param setProp The setter function to wire against the setter.
|
|
1441
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
1442
|
-
*/
|
|
1443
|
-
objDefineAccessors: <T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void) => boolean;
|
|
1444
|
-
/**
|
|
1445
|
-
* Trys to add an event handler for the specified event to the window, body and document
|
|
1446
|
-
* @param eventName {string} - The name of the event
|
|
1447
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1448
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1449
|
-
*/
|
|
1450
|
-
addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
|
|
1451
|
-
/**
|
|
1452
|
-
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
1453
|
-
* https://caniuse.com/#search=Date.now
|
|
1454
|
-
*/
|
|
1455
|
-
dateNow: () => number;
|
|
1456
|
-
/**
|
|
1457
|
-
* Identifies whether the current environment appears to be IE
|
|
1458
|
-
*/
|
|
1459
|
-
isIE: () => boolean;
|
|
1460
|
-
/**
|
|
1461
|
-
* @deprecated - Use the core.getCookieMgr().disable()
|
|
1462
|
-
* Force the SDK not to store and read any data from cookies.
|
|
1463
|
-
*/
|
|
1464
|
-
disableCookies: () => void;
|
|
1465
|
-
newGuid: () => string;
|
|
1466
|
-
/**
|
|
1467
|
-
* Return the current value of the Performance Api now() function (if available) and fallback to dateNow() if it is unavailable (IE9 or less)
|
|
1468
|
-
* https://caniuse.com/#search=performance.now
|
|
1469
|
-
*/
|
|
1470
|
-
perfNow: () => number;
|
|
1471
|
-
/**
|
|
1472
|
-
* Generate random base64 id string.
|
|
1473
|
-
* The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
|
|
1474
|
-
* @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
|
|
1475
|
-
*/
|
|
1476
|
-
newId: (maxLength?: number) => string;
|
|
1477
|
-
/**
|
|
1478
|
-
* Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.
|
|
1479
|
-
* So maxValue(16) will produce a number from 0..16 (range of 17)
|
|
1480
|
-
* @param maxValue
|
|
1481
|
-
*/
|
|
1482
|
-
randomValue: (maxValue: number) => number;
|
|
1483
|
-
/**
|
|
1484
|
-
* generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.
|
|
1485
|
-
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
1486
|
-
*/
|
|
1487
|
-
random32: (signed?: boolean) => number;
|
|
1488
|
-
/**
|
|
1489
|
-
* Seed the MWC random number generator with the specified seed or a random value
|
|
1490
|
-
* @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen
|
|
1491
|
-
*/
|
|
1492
|
-
mwcRandomSeed: (value?: number) => void;
|
|
1493
|
-
/**
|
|
1494
|
-
* Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)
|
|
1495
|
-
* instead of Math.random() defaults to un-signed.
|
|
1496
|
-
* Used as a replacement random generator for IE to avoid issues with older IE instances.
|
|
1497
|
-
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
1498
|
-
*/
|
|
1499
|
-
mwcRandom32: (signed?: boolean) => number;
|
|
1500
|
-
/**
|
|
1501
|
-
* generate W3C trace id
|
|
1502
|
-
*/
|
|
1503
|
-
generateW3CId: () => string;
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
1221
|
export declare interface ICustomProperties {
|
|
1507
1222
|
[key: string]: any;
|
|
1508
1223
|
}
|
|
@@ -1616,41 +1331,6 @@ export declare interface IDistributedTraceContext {
|
|
|
1616
1331
|
setTraceFlags(newValue?: number): void;
|
|
1617
1332
|
}
|
|
1618
1333
|
|
|
1619
|
-
export declare interface IEventHelper {
|
|
1620
|
-
/**
|
|
1621
|
-
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
1622
|
-
* @param obj Object to add the event too.
|
|
1623
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
|
|
1624
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
1625
|
-
* @returns True if the function was bound successfully to the event, otherwise false
|
|
1626
|
-
*/
|
|
1627
|
-
Attach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
|
|
1628
|
-
/**
|
|
1629
|
-
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
1630
|
-
* @deprecated Use {@link EventHelper#Attach} as we are already in a class call EventHelper the extra "Event" just causes a larger result
|
|
1631
|
-
* @param obj Object to add the event too.
|
|
1632
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
|
|
1633
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
1634
|
-
* @returns True if the function was bound successfully to the event, otherwise false
|
|
1635
|
-
*/
|
|
1636
|
-
AttachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
|
|
1637
|
-
/**
|
|
1638
|
-
* Removes an event handler for the specified event
|
|
1639
|
-
* @param eventName {string} - The name of the event
|
|
1640
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1641
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1642
|
-
*/
|
|
1643
|
-
Detach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
|
|
1644
|
-
/**
|
|
1645
|
-
* Removes an event handler for the specified event
|
|
1646
|
-
* @deprecated Use {@link EventHelper#Detach} as we are already in a class call EventHelper the extra "Event" just causes a larger result
|
|
1647
|
-
* @param eventName {string} - The name of the event
|
|
1648
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1649
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1650
|
-
*/
|
|
1651
|
-
DetachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
1334
|
export declare interface IInstrumentCallDetails {
|
|
1655
1335
|
name: string;
|
|
1656
1336
|
inst: any;
|
|
@@ -2028,6 +1708,12 @@ export declare interface IPlugin {
|
|
|
2028
1708
|
* Plugin version (available in data.properties.version in common schema)
|
|
2029
1709
|
*/
|
|
2030
1710
|
readonly version?: string;
|
|
1711
|
+
/**
|
|
1712
|
+
* The App Insights core to use for backward compatibility.
|
|
1713
|
+
* Therefore the interface will be able to access the core without needing to cast to "any".
|
|
1714
|
+
* [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
|
|
1715
|
+
*/
|
|
1716
|
+
core?: IAppInsightsCore;
|
|
2031
1717
|
}
|
|
2032
1718
|
|
|
2033
1719
|
/**
|
|
@@ -2098,11 +1784,7 @@ export declare interface _IRegisteredEvents {
|
|
|
2098
1784
|
handler: any;
|
|
2099
1785
|
}
|
|
2100
1786
|
|
|
2101
|
-
|
|
2102
|
-
* Check if an object is of type Array with optional generic T, the generic type is not validated
|
|
2103
|
-
* and exists to help with TypeScript validation only.
|
|
2104
|
-
*/
|
|
2105
|
-
export declare let isArray: <T = any>(obj: any) => obj is Array<T>;
|
|
1787
|
+
export { isArray }
|
|
2106
1788
|
|
|
2107
1789
|
/**
|
|
2108
1790
|
* Checks if HTML5 Beacons are supported in the current environment.
|
|
@@ -2110,22 +1792,11 @@ export declare let isArray: <T = any>(obj: any) => obj is Array<T>;
|
|
|
2110
1792
|
*/
|
|
2111
1793
|
export declare function isBeaconsSupported(): boolean;
|
|
2112
1794
|
|
|
2113
|
-
|
|
2114
|
-
* Checks if the type of value is a boolean.
|
|
2115
|
-
* @param {any} value - Value to be checked.
|
|
2116
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
2117
|
-
*/
|
|
2118
|
-
export declare function isBoolean(value: any): value is boolean;
|
|
1795
|
+
export { isBoolean }
|
|
2119
1796
|
|
|
2120
|
-
|
|
2121
|
-
* Check if an object is of type Date
|
|
2122
|
-
*/
|
|
2123
|
-
export declare function isDate(obj: any): obj is Date;
|
|
1797
|
+
export { isDate }
|
|
2124
1798
|
|
|
2125
|
-
|
|
2126
|
-
* Check if an object is of type Error
|
|
2127
|
-
*/
|
|
2128
|
-
export declare function isError(obj: any): obj is Error;
|
|
1799
|
+
export { isError }
|
|
2129
1800
|
|
|
2130
1801
|
/**
|
|
2131
1802
|
* Checks if the Fetch API is supported in the current environment.
|
|
@@ -2134,7 +1805,7 @@ export declare function isError(obj: any): obj is Error;
|
|
|
2134
1805
|
*/
|
|
2135
1806
|
export declare function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
2136
1807
|
|
|
2137
|
-
export
|
|
1808
|
+
export { isFunction }
|
|
2138
1809
|
|
|
2139
1810
|
/**
|
|
2140
1811
|
* Identifies whether the current environment appears to be IE
|
|
@@ -2143,20 +1814,15 @@ export declare function isIE(): boolean;
|
|
|
2143
1814
|
|
|
2144
1815
|
export declare function isNotNullOrUndefined<T>(value: T): value is T;
|
|
2145
1816
|
|
|
2146
|
-
export
|
|
1817
|
+
export { isNotTruthy }
|
|
2147
1818
|
|
|
2148
1819
|
export declare function isNotUndefined<T>(value: T): value is T;
|
|
2149
1820
|
|
|
2150
|
-
export
|
|
1821
|
+
export { isNullOrUndefined }
|
|
2151
1822
|
|
|
2152
|
-
|
|
2153
|
-
* Checks if the type of value is a number.
|
|
2154
|
-
* @param {any} value - Value to be checked.
|
|
2155
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
2156
|
-
*/
|
|
2157
|
-
export declare function isNumber(value: any): value is number;
|
|
1823
|
+
export { isNumber }
|
|
2158
1824
|
|
|
2159
|
-
export
|
|
1825
|
+
export { isObject }
|
|
2160
1826
|
|
|
2161
1827
|
/**
|
|
2162
1828
|
* Returns whether the environment is reporting that we are running in a React Native Environment
|
|
@@ -2172,26 +1838,15 @@ export declare function isSafari(userAgentStr?: string): boolean;
|
|
|
2172
1838
|
*/
|
|
2173
1839
|
export declare function isSampledFlag(value: ITraceParent): boolean;
|
|
2174
1840
|
|
|
2175
|
-
|
|
2176
|
-
* Checks if the type of value is a string.
|
|
2177
|
-
* @param {any} value - Value to be checked.
|
|
2178
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
2179
|
-
*/
|
|
2180
|
-
export declare function isString(value: any): value is string;
|
|
1841
|
+
export { isString }
|
|
2181
1842
|
|
|
2182
|
-
|
|
2183
|
-
* Checks if the type of value is a Symbol.
|
|
2184
|
-
* This only returns a boolean as returning value is Symbol will cause issues for older TypeScript consumers
|
|
2185
|
-
* @param {any} value - Value to be checked.
|
|
2186
|
-
* @return {boolean} True if the value is a Symbol, false otherwise.
|
|
2187
|
-
*/
|
|
2188
|
-
export declare function isSymbol(value: any): boolean;
|
|
1843
|
+
export { isSymbol }
|
|
2189
1844
|
|
|
2190
|
-
export
|
|
1845
|
+
export { isTruthy }
|
|
2191
1846
|
|
|
2192
|
-
export
|
|
1847
|
+
export { isTypeof }
|
|
2193
1848
|
|
|
2194
|
-
export
|
|
1849
|
+
export { isUndefined }
|
|
2195
1850
|
|
|
2196
1851
|
/**
|
|
2197
1852
|
* Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
|
|
@@ -2417,18 +2072,6 @@ export declare interface IUnloadHandlerContainer {
|
|
|
2417
2072
|
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2418
2073
|
}
|
|
2419
2074
|
|
|
2420
|
-
/**
|
|
2421
|
-
* Helper to support backward compatibility for users that use the legacy cookie handling functions and the use the internal
|
|
2422
|
-
* CoreUtils._canUseCookies global flag to enable/disable cookies usage.
|
|
2423
|
-
* Note: This has the following deliberate side-effects
|
|
2424
|
-
* - Creates the global (legacy) cookie manager if it does not already exist
|
|
2425
|
-
* - Attempts to add "listeners" to the CoreUtils._canUseCookies property to support the legacy usage
|
|
2426
|
-
* @param config
|
|
2427
|
-
* @param logger
|
|
2428
|
-
* @returns
|
|
2429
|
-
*/
|
|
2430
|
-
export declare function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
2431
|
-
|
|
2432
2075
|
export declare const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
2433
2076
|
|
|
2434
2077
|
export declare type LoggingSeverity = number | eLoggingSeverity;
|
|
@@ -2521,17 +2164,7 @@ export declare class NotificationManager implements INotificationManager {
|
|
|
2521
2164
|
|
|
2522
2165
|
export { objCreate }
|
|
2523
2166
|
|
|
2524
|
-
|
|
2525
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
2526
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
2527
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
2528
|
-
* @param target The object on which to define the property.
|
|
2529
|
-
* @param prop The name of the property to be defined or modified.
|
|
2530
|
-
* @param getProp The getter function to wire against the getter.
|
|
2531
|
-
* @param setProp The setter function to wire against the setter.
|
|
2532
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
2533
|
-
*/
|
|
2534
|
-
export declare function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
|
|
2167
|
+
export { objDefineAccessors }
|
|
2535
2168
|
|
|
2536
2169
|
/**
|
|
2537
2170
|
* Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
|
|
@@ -2547,27 +2180,15 @@ export declare function objExtend<T2, T3, T4, T5, T6>(deepExtend?: boolean, obj2
|
|
|
2547
2180
|
|
|
2548
2181
|
export declare function objExtend<T1, T2, T3, T4, T5, T6>(obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T1 & T2 & T3 & T4 & T5 & T6;
|
|
2549
2182
|
|
|
2550
|
-
|
|
2551
|
-
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
2552
|
-
* performance optimization to avoid the creation of a new array for large objects
|
|
2553
|
-
* @param target The target object to find and process the keys
|
|
2554
|
-
* @param callbackfn The function to call with the details
|
|
2555
|
-
*/
|
|
2556
|
-
export declare function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void): void;
|
|
2183
|
+
export { objForEachKey }
|
|
2557
2184
|
|
|
2558
|
-
export
|
|
2185
|
+
export { objFreeze }
|
|
2559
2186
|
|
|
2560
|
-
|
|
2561
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
2562
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
2563
|
-
* Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
2564
|
-
* @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
2565
|
-
*/
|
|
2566
|
-
export declare function objKeys(obj: {}): string[];
|
|
2187
|
+
export { objKeys }
|
|
2567
2188
|
|
|
2568
|
-
export
|
|
2189
|
+
export { objSeal }
|
|
2569
2190
|
|
|
2570
|
-
export
|
|
2191
|
+
export { objToString }
|
|
2571
2192
|
|
|
2572
2193
|
/**
|
|
2573
2194
|
* A helper function to assist with JIT performance for objects that have properties added / removed dynamically
|
|
@@ -2887,12 +2508,6 @@ export declare const enum SendRequestReason {
|
|
|
2887
2508
|
MaxQueuedEvents = 20
|
|
2888
2509
|
}
|
|
2889
2510
|
|
|
2890
|
-
/**
|
|
2891
|
-
* @deprecated - Use the core.getCookieMgr().set()
|
|
2892
|
-
* helper method to set userId and sessionId cookie
|
|
2893
|
-
*/
|
|
2894
|
-
export declare function setCookie(logger: IDiagnosticLogger, name: string, value: string, domain?: string): void;
|
|
2895
|
-
|
|
2896
2511
|
/**
|
|
2897
2512
|
* Enable the lookup of test mock objects if requested
|
|
2898
2513
|
* @param enabled
|
|
@@ -2926,13 +2541,7 @@ export declare function sortPlugins<T = IPlugin>(plugins: T[]): T[];
|
|
|
2926
2541
|
*/
|
|
2927
2542
|
export declare function strContains(value: string, search: string): boolean;
|
|
2928
2543
|
|
|
2929
|
-
|
|
2930
|
-
* The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
2931
|
-
* @param value - The value to check whether it ends with the search value.
|
|
2932
|
-
* @param search - The characters to be searched for at the end of the value.
|
|
2933
|
-
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
2934
|
-
*/
|
|
2935
|
-
export declare function strEndsWith(value: string, search: string): boolean;
|
|
2544
|
+
export { strEndsWith }
|
|
2936
2545
|
|
|
2937
2546
|
export { strFunction }
|
|
2938
2547
|
|
|
@@ -2940,18 +2549,9 @@ export { strObject }
|
|
|
2940
2549
|
|
|
2941
2550
|
export { strPrototype }
|
|
2942
2551
|
|
|
2943
|
-
|
|
2944
|
-
* The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
|
|
2945
|
-
* @param value - The value to check whether it ends with the search value.
|
|
2946
|
-
* @param checkValue - The characters to be searched for at the start of the value.
|
|
2947
|
-
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
2948
|
-
*/
|
|
2949
|
-
export declare function strStartsWith(value: string, checkValue: string): boolean;
|
|
2552
|
+
export { strStartsWith }
|
|
2950
2553
|
|
|
2951
|
-
|
|
2952
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
2953
|
-
*/
|
|
2954
|
-
export declare function strTrim(str: any): string;
|
|
2554
|
+
export { strTrim }
|
|
2955
2555
|
|
|
2956
2556
|
export { strUndefined }
|
|
2957
2557
|
|
|
@@ -3004,7 +2604,7 @@ export declare const enum TelemetryUpdateReason {
|
|
|
3004
2604
|
PluginRemoved = 32
|
|
3005
2605
|
}
|
|
3006
2606
|
|
|
3007
|
-
export
|
|
2607
|
+
export { throwError }
|
|
3008
2608
|
|
|
3009
2609
|
/**
|
|
3010
2610
|
* This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
|
|
@@ -3020,7 +2620,7 @@ export declare function _throwInternal(logger: IDiagnosticLogger, severity: Logg
|
|
|
3020
2620
|
/**
|
|
3021
2621
|
* Convert a date to I.S.O. format in IE8
|
|
3022
2622
|
*/
|
|
3023
|
-
export declare function toISOString(date: Date):
|
|
2623
|
+
export declare function toISOString(date: Date): any;
|
|
3024
2624
|
|
|
3025
2625
|
export declare function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
3026
2626
|
|