@microsoft/applicationinsights-clickanalytics-js 3.0.0-beta.2302-01 → 3.0.0-beta.2302-03
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/browser/{ai.clck.3.0.0-beta.2302-01.cjs.js → ai.clck.3.0.0-beta.2302-03.cjs.js} +59 -17
- package/browser/ai.clck.3.0.0-beta.2302-03.cjs.js.map +1 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.cjs.min.js +6 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.cjs.min.js.map +1 -0
- package/browser/{ai.clck.3.0.0-beta.2302-01.gbl.js → ai.clck.3.0.0-beta.2302-03.gbl.js} +59 -17
- package/browser/ai.clck.3.0.0-beta.2302-03.gbl.js.map +1 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.gbl.min.js +6 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.gbl.min.js.map +1 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.integrity.json +66 -0
- package/browser/{ai.clck.3.0.0-beta.2302-01.js → ai.clck.3.0.0-beta.2302-03.js} +59 -17
- package/browser/ai.clck.3.0.0-beta.2302-03.js.map +1 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.min.js +6 -0
- package/browser/ai.clck.3.0.0-beta.2302-03.min.js.map +1 -0
- package/browser/ai.clck.3.cjs.js +58 -16
- package/browser/ai.clck.3.cjs.js.map +1 -1
- package/browser/ai.clck.3.cjs.min.js +2 -2
- package/browser/ai.clck.3.cjs.min.js.map +1 -1
- package/browser/ai.clck.3.gbl.js +58 -16
- package/browser/ai.clck.3.gbl.js.map +1 -1
- package/browser/ai.clck.3.gbl.min.js +2 -2
- package/browser/ai.clck.3.gbl.min.js.map +1 -1
- package/browser/ai.clck.3.js +58 -16
- package/browser/ai.clck.3.js.map +1 -1
- package/browser/ai.clck.3.min.js +2 -2
- package/browser/ai.clck.3.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.d.ts +1 -1
- package/dist/applicationinsights-clickanalytics-js.js +58 -16
- package/dist/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.min.js +2 -2
- package/dist/applicationinsights-clickanalytics-js.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.rollup.d.ts +1 -1
- package/dist-esm/Behaviours.js +1 -1
- package/dist-esm/ClickAnalyticsPlugin.js +2 -2
- package/dist-esm/ClickAnalyticsPlugin.js.map +1 -1
- package/dist-esm/DataCollector.js +1 -1
- package/dist-esm/Enums.js +1 -1
- package/dist-esm/Interfaces/Datamodel.js +1 -1
- package/dist-esm/__DynamicConstants.js +4 -4
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-clickanalytics-js.js +1 -1
- package/dist-esm/common/Utils.js +1 -1
- package/dist-esm/events/PageAction.js +1 -1
- package/dist-esm/events/WebEvent.js +1 -1
- package/dist-esm/handlers/AutoCaptureHandler.js +1 -1
- package/dist-esm/handlers/DomContentHandler.js +1 -1
- package/package.json +7 -7
- package/src/ClickAnalyticsPlugin.ts +26 -26
- package/src/DataCollector.ts +10 -10
- package/src/__DynamicConstants.ts +59 -59
- package/src/common/Utils.ts +9 -9
- package/src/events/PageAction.ts +17 -17
- package/src/events/WebEvent.ts +16 -16
- package/src/handlers/AutoCaptureHandler.ts +16 -16
- package/src/handlers/DomContentHandler.ts +12 -12
- package/types/common/Utils.d.ts +1 -1
- package/browser/ai.clck.3.0.0-beta.2302-01.cjs.js.map +0 -1
- package/browser/ai.clck.3.0.0-beta.2302-01.cjs.min.js +0 -6
- package/browser/ai.clck.3.0.0-beta.2302-01.cjs.min.js.map +0 -1
- package/browser/ai.clck.3.0.0-beta.2302-01.gbl.js.map +0 -1
- package/browser/ai.clck.3.0.0-beta.2302-01.gbl.min.js +0 -6
- package/browser/ai.clck.3.0.0-beta.2302-01.gbl.min.js.map +0 -1
- package/browser/ai.clck.3.0.0-beta.2302-01.integrity.json +0 -66
- package/browser/ai.clck.3.0.0-beta.2302-01.js.map +0 -1
- package/browser/ai.clck.3.0.0-beta.2302-01.min.js +0 -6
- package/browser/ai.clck.3.0.0-beta.2302-01.min.js.map +0 -1
package/dist-esm/Behaviours.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.0.0-beta.2302-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -157,7 +157,7 @@ var ClickAnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
157
157
|
// Removed Stub for ClickAnalyticsPlugin.prototype.initialize.
|
|
158
158
|
// Removed Stub for ClickAnalyticsPlugin.prototype.processTelemetry.
|
|
159
159
|
// Removed Stub for ClickAnalyticsPlugin.prototype.trackPageAction.
|
|
160
|
-
ClickAnalyticsPlugin.Version = "3.0.0-beta.2302-
|
|
160
|
+
ClickAnalyticsPlugin.Version = "3.0.0-beta.2302-03";
|
|
161
161
|
return ClickAnalyticsPlugin;
|
|
162
162
|
}(BaseTelemetryPlugin));
|
|
163
163
|
export { ClickAnalyticsPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickAnalyticsPlugin.js.map","sources":["ClickAnalyticsPlugin.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nvar _a, _b, _c;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { PropertiesPluginIdentifier } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, arrForEach, createProcessTelemetryContext, dumpObj, getExceptionName, isNullOrUndefined, onConfigChange, throwError, unloadComponents } from \"@microsoft/applicationinsights-core-js\";\r\nimport { hasDocument, isObject, objDeepFreeze, objDefineProp, objForEachKey } from \"@nevware21/ts-utils\";\r\nimport { _DYN_BEHAVIOR_VALIDATOR, _DYN_CAPTURE_ALL_META_DAT2, _DYN_CONTENT_NAME, _DYN_INDEX_OF, _DYN_PAGE_ACTION_PAGE_TAG0, _DYN_PAGE_NAME, _DYN_TRACK_PAGE_ACTION, _DYN_USE_DEFAULT_CONTENT_1, _DYN__DO_UNLOAD } from \"./__DynamicConstants\";\r\nimport { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, DEFAULT_AI_BLOB_ATTRIBUTE_TAG, DEFAULT_DATA_PREFIX, DEFAULT_DONOT_TRACK_TAG } from \"./common/Utils\";\r\nimport { PageAction } from \"./events/PageAction\";\r\nimport { AutoCaptureHandler } from \"./handlers/AutoCaptureHandler\";\r\nimport { DomContentHandler } from \"./handlers/DomContentHandler\";\r\nexport { BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };\r\nvar dataTagsDefault = (_a = {},\r\n _a[_DYN_USE_DEFAULT_CONTENT_1 /* @min:useDefaultContentNameOrId */] = false,\r\n _a.aiBlobAttributeTag = DEFAULT_AI_BLOB_ATTRIBUTE_TAG,\r\n _a.customDataPrefix = DEFAULT_DATA_PREFIX,\r\n _a[_DYN_CAPTURE_ALL_META_DAT2 /* @min:captureAllMetaDataContent */] = false,\r\n _a.dntDataTag = DEFAULT_DONOT_TRACK_TAG,\r\n _a.metaDataPrefix = \"\",\r\n _a.parentDataTag = \"\",\r\n _a);\r\nvar coreDataDefault = {\r\n eferrerUri: hasDocument ? document.referrer : \"\",\r\n requestUri: \"\",\r\n pageName: \"\",\r\n pageType: \"\"\r\n};\r\nvar defaultValues = objDeepFreeze((_b = {\r\n autoCapture: true,\r\n callback: (_c = {},\r\n _c[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:pageActionPageTags */] = null,\r\n _c[_DYN_PAGE_NAME /* @min:pageName */] = null,\r\n _c[_DYN_CONTENT_NAME /* @min:contentName */] = null,\r\n _c),\r\n pageTags: {},\r\n coreData: { set: _setProp, v: coreDataDefault },\r\n dataTags: { set: _setProp, v: dataTagsDefault }\r\n },\r\n _b[_DYN_BEHAVIOR_VALIDATOR /* @min:behaviorValidator */] = function (key) { return key || \"\"; },\r\n _b.defaultRightClickBhvr = \"\",\r\n _b.dropInvalidEvents = false,\r\n _b.urlCollectHash = false,\r\n _b.urlCollectQuery = false,\r\n _b));\r\nfunction _setProp(val, def) {\r\n if (def && isObject(def)) {\r\n objForEachKey(def, function (key, obj) {\r\n val[key] = val[key] || obj;\r\n if (key === \"customDataPrefix\") {\r\n var prefix = val[key];\r\n val[key] = prefix && prefix[_DYN_INDEX_OF /* @min:%2eindexOf */](DEFAULT_DATA_PREFIX) === 0 ? prefix : DEFAULT_DATA_PREFIX;\r\n }\r\n });\r\n }\r\n return val;\r\n}\r\nvar ClickAnalyticsPlugin = /** @class */ (function (_super) {\r\n __extends(ClickAnalyticsPlugin, _super);\r\n function ClickAnalyticsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"ClickAnalyticsPlugin\";\r\n _this.priority = 181;\r\n var _config;\r\n var _pageAction;\r\n var _autoCaptureHandler;\r\n var _contentHandler;\r\n var _autoCapture;\r\n dynamicProto(ClickAnalyticsPlugin, _this, function (_self, _base) {\r\n var _identifier = _self.identifier;\r\n _initDefaults();\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (isNullOrUndefined(core)) {\r\n throwError(\"Error initializing\");\r\n }\r\n _super.prototype.initialize.call(_this, config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n // Find the properties plugin.\r\n var _propertiesExtension;\r\n arrForEach(extensions, function (extension) {\r\n if (extension.identifier === PropertiesPluginIdentifier) {\r\n _propertiesExtension = extension;\r\n }\r\n });\r\n // Append Click Analytics Plugin Version to SDK version.\r\n if (_propertiesExtension && _propertiesExtension.context &&\r\n _propertiesExtension.context.internal && _propertiesExtension.context.internal.sdkVersion) {\r\n _propertiesExtension.context.internal.sdkVersion += \"_ClickPlugin\" + ClickAnalyticsPlugin.Version;\r\n }\r\n };\r\n _self.processTelemetry = function (env, itemCtx) {\r\n _self.processNext(env, itemCtx);\r\n };\r\n _self[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */] = function (pageAction, customProperties) {\r\n try {\r\n _pageAction[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */](pageAction, customProperties);\r\n }\r\n catch (e) {\r\n _throwInternal(_self.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, 103 /* _eInternalMessageId.TrackPageActionEventFailed */, \"trackPageAction failed, page action event will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {\r\n return unloadComponents([\r\n _autoCaptureHandler,\r\n _contentHandler,\r\n _pageAction\r\n ], unloadCtx, unloadState, function () {\r\n _initDefaults();\r\n asyncCallback && asyncCallback();\r\n });\r\n };\r\n function _populateDefaults(config) {\r\n var _this = this;\r\n var core = _self.core;\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var config = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n var _config = ctx.getExtCfg(_identifier, defaultValues);\r\n var logger = _self.diagLog();\r\n _contentHandler = new DomContentHandler(_config, logger);\r\n var metaTags = _contentHandler.getMetadata();\r\n _pageAction = new PageAction(_this, _config, _contentHandler, _config.callback[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:%2epageActionPageTags */], metaTags, logger);\r\n // Default to DOM autoCapture handler\r\n if (_autoCaptureHandler) {\r\n _autoCaptureHandler[_DYN__DO_UNLOAD /* @min:%2e_doUnload */]();\r\n }\r\n _autoCaptureHandler = new AutoCaptureHandler(_self, _config, _pageAction, logger);\r\n var autoCapture = !!_config.autoCapture;\r\n if (!_autoCapture && autoCapture) {\r\n _autoCaptureHandler.click();\r\n }\r\n _autoCapture = autoCapture;\r\n }));\r\n }\r\n });\r\n function _initDefaults() {\r\n _config = null;\r\n _pageAction = null;\r\n _autoCaptureHandler = null;\r\n _contentHandler = null;\r\n _autoCapture = false;\r\n // Define _self.config\r\n objDefineProp(self, \"config\", {\r\n configurable: true,\r\n enumerable: true,\r\n get: function () { return _config; }\r\n });\r\n }\r\n return _this;\r\n }\r\n ClickAnalyticsPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs a page action event.\r\n * @param IPageActionTelemetry\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n */\r\n ClickAnalyticsPlugin.prototype.trackPageAction = function (pageAction, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.Version = \"3.0.0-beta.2302-01\";\r\n return ClickAnalyticsPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { ClickAnalyticsPlugin };\r\n//# sourceMappingURL=ClickAnalyticsPlugin.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;mEAaM;AACN;AACA;AACA;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"ClickAnalyticsPlugin.js.map","sources":["ClickAnalyticsPlugin.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nvar _a, _b, _c;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { PropertiesPluginIdentifier } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, arrForEach, createProcessTelemetryContext, dumpObj, getExceptionName, isNullOrUndefined, onConfigChange, throwError, unloadComponents } from \"@microsoft/applicationinsights-core-js\";\r\nimport { hasDocument, isObject, objDeepFreeze, objDefineProp, objForEachKey } from \"@nevware21/ts-utils\";\r\nimport { _DYN_BEHAVIOR_VALIDATOR, _DYN_CAPTURE_ALL_META_DAT2, _DYN_CONTENT_NAME, _DYN_INDEX_OF, _DYN_PAGE_ACTION_PAGE_TAG0, _DYN_PAGE_NAME, _DYN_TRACK_PAGE_ACTION, _DYN_USE_DEFAULT_CONTENT_1, _DYN__DO_UNLOAD } from \"./__DynamicConstants\";\r\nimport { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, DEFAULT_AI_BLOB_ATTRIBUTE_TAG, DEFAULT_DATA_PREFIX, DEFAULT_DONOT_TRACK_TAG } from \"./common/Utils\";\r\nimport { PageAction } from \"./events/PageAction\";\r\nimport { AutoCaptureHandler } from \"./handlers/AutoCaptureHandler\";\r\nimport { DomContentHandler } from \"./handlers/DomContentHandler\";\r\nexport { BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };\r\nvar dataTagsDefault = (_a = {},\r\n _a[_DYN_USE_DEFAULT_CONTENT_1 /* @min:useDefaultContentNameOrId */] = false,\r\n _a.aiBlobAttributeTag = DEFAULT_AI_BLOB_ATTRIBUTE_TAG,\r\n _a.customDataPrefix = DEFAULT_DATA_PREFIX,\r\n _a[_DYN_CAPTURE_ALL_META_DAT2 /* @min:captureAllMetaDataContent */] = false,\r\n _a.dntDataTag = DEFAULT_DONOT_TRACK_TAG,\r\n _a.metaDataPrefix = \"\",\r\n _a.parentDataTag = \"\",\r\n _a);\r\nvar coreDataDefault = {\r\n eferrerUri: hasDocument ? document.referrer : \"\",\r\n requestUri: \"\",\r\n pageName: \"\",\r\n pageType: \"\"\r\n};\r\nvar defaultValues = objDeepFreeze((_b = {\r\n autoCapture: true,\r\n callback: (_c = {},\r\n _c[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:pageActionPageTags */] = null,\r\n _c[_DYN_PAGE_NAME /* @min:pageName */] = null,\r\n _c[_DYN_CONTENT_NAME /* @min:contentName */] = null,\r\n _c),\r\n pageTags: {},\r\n coreData: { set: _setProp, v: coreDataDefault },\r\n dataTags: { set: _setProp, v: dataTagsDefault }\r\n },\r\n _b[_DYN_BEHAVIOR_VALIDATOR /* @min:behaviorValidator */] = function (key) { return key || \"\"; },\r\n _b.defaultRightClickBhvr = \"\",\r\n _b.dropInvalidEvents = false,\r\n _b.urlCollectHash = false,\r\n _b.urlCollectQuery = false,\r\n _b));\r\nfunction _setProp(val, def) {\r\n if (def && isObject(def)) {\r\n objForEachKey(def, function (key, obj) {\r\n val[key] = val[key] || obj;\r\n if (key === \"customDataPrefix\") {\r\n var prefix = val[key];\r\n val[key] = prefix && prefix[_DYN_INDEX_OF /* @min:%2eindexOf */](DEFAULT_DATA_PREFIX) === 0 ? prefix : DEFAULT_DATA_PREFIX;\r\n }\r\n });\r\n }\r\n return val;\r\n}\r\nvar ClickAnalyticsPlugin = /** @class */ (function (_super) {\r\n __extends(ClickAnalyticsPlugin, _super);\r\n function ClickAnalyticsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"ClickAnalyticsPlugin\";\r\n _this.priority = 181;\r\n var _config;\r\n var _pageAction;\r\n var _autoCaptureHandler;\r\n var _contentHandler;\r\n var _autoCapture;\r\n dynamicProto(ClickAnalyticsPlugin, _this, function (_self, _base) {\r\n var _identifier = _self.identifier;\r\n _initDefaults();\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (isNullOrUndefined(core)) {\r\n throwError(\"Error initializing\");\r\n }\r\n _super.prototype.initialize.call(_this, config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n // Find the properties plugin.\r\n var _propertiesExtension;\r\n arrForEach(extensions, function (extension) {\r\n if (extension.identifier === PropertiesPluginIdentifier) {\r\n _propertiesExtension = extension;\r\n }\r\n });\r\n // Append Click Analytics Plugin Version to SDK version.\r\n if (_propertiesExtension && _propertiesExtension.context &&\r\n _propertiesExtension.context.internal && _propertiesExtension.context.internal.sdkVersion) {\r\n _propertiesExtension.context.internal.sdkVersion += \"_ClickPlugin\" + ClickAnalyticsPlugin.Version;\r\n }\r\n };\r\n _self.processTelemetry = function (env, itemCtx) {\r\n _self.processNext(env, itemCtx);\r\n };\r\n _self[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */] = function (pageAction, customProperties) {\r\n try {\r\n _pageAction[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */](pageAction, customProperties);\r\n }\r\n catch (e) {\r\n _throwInternal(_self.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, 103 /* _eInternalMessageId.TrackPageActionEventFailed */, \"trackPageAction failed, page action event will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {\r\n return unloadComponents([\r\n _autoCaptureHandler,\r\n _contentHandler,\r\n _pageAction\r\n ], unloadCtx, unloadState, function () {\r\n _initDefaults();\r\n asyncCallback && asyncCallback();\r\n });\r\n };\r\n function _populateDefaults(config) {\r\n var _this = this;\r\n var core = _self.core;\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var config = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n var _config = ctx.getExtCfg(_identifier, defaultValues);\r\n var logger = _self.diagLog();\r\n _contentHandler = new DomContentHandler(_config, logger);\r\n var metaTags = _contentHandler.getMetadata();\r\n _pageAction = new PageAction(_this, _config, _contentHandler, _config.callback[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:%2epageActionPageTags */], metaTags, logger);\r\n // Default to DOM autoCapture handler\r\n if (_autoCaptureHandler) {\r\n _autoCaptureHandler[_DYN__DO_UNLOAD /* @min:%2e_doUnload */]();\r\n }\r\n _autoCaptureHandler = new AutoCaptureHandler(_self, _config, _pageAction, logger);\r\n var autoCapture = !!_config.autoCapture;\r\n if (!_autoCapture && autoCapture) {\r\n _autoCaptureHandler.click();\r\n }\r\n _autoCapture = autoCapture;\r\n }));\r\n }\r\n });\r\n function _initDefaults() {\r\n _config = null;\r\n _pageAction = null;\r\n _autoCaptureHandler = null;\r\n _contentHandler = null;\r\n _autoCapture = false;\r\n // Define _self.config\r\n objDefineProp(self, \"config\", {\r\n configurable: true,\r\n enumerable: true,\r\n get: function () { return _config; }\r\n });\r\n }\r\n return _this;\r\n }\r\n ClickAnalyticsPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs a page action event.\r\n * @param IPageActionTelemetry\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n */\r\n ClickAnalyticsPlugin.prototype.trackPageAction = function (pageAction, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.Version = \"3.0.0-beta.2302-03\";\r\n return ClickAnalyticsPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { ClickAnalyticsPlugin };\r\n//# sourceMappingURL=ClickAnalyticsPlugin.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;mEAaM;AACN;AACA;AACA;AACA;AACA"}
|
package/dist-esm/Enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.0.0-beta.2302-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// ##############################################################
|
|
9
9
|
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
10
10
|
// ##############################################################
|
|
11
|
-
//
|
|
12
|
-
// Note: DON'T Export these const from the package as we are still targeting
|
|
13
|
-
//
|
|
11
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
+
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
13
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
14
|
export var _DYN_INDEX_OF = "indexOf"; // Count: 9
|
|
15
15
|
export var _DYN_TRACK_PAGE_ACTION = "trackPageAction"; // Count: 4
|
|
16
16
|
export var _DYN_PAGE_ACTION_PAGE_TAG0 = "pageActionPageTags"; // Count: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n//
|
|
1
|
+
{"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_INDEX_OF = \"indexOf\"; // Count: 9\r\nexport var _DYN_TRACK_PAGE_ACTION = \"trackPageAction\"; // Count: 4\r\nexport var _DYN_PAGE_ACTION_PAGE_TAG0 = \"pageActionPageTags\"; // Count: 2\r\nexport var _DYN__DO_UNLOAD = \"_doUnload\"; // Count: 3\r\nexport var _DYN_USE_DEFAULT_CONTENT_1 = \"useDefaultContentNameOrId\"; // Count: 5\r\nexport var _DYN_CAPTURE_ALL_META_DAT2 = \"captureAllMetaDataContent\"; // Count: 3\r\nexport var _DYN_PAGE_NAME = \"pageName\"; // Count: 9\r\nexport var _DYN_CONTENT_NAME = \"contentName\"; // Count: 13\r\nexport var _DYN_BEHAVIOR_VALIDATOR = \"behaviorValidator\"; // Count: 2\r\nexport var _DYN_LENGTH = \"length\"; // Count: 5\r\nexport var _DYN_TAG_NAME = \"tagName\"; // Count: 4\r\nexport var _DYN_TO_UPPER_CASE = \"toUpperCase\"; // Count: 4\r\nexport var _DYN_PATHNAME = \"pathname\"; // Count: 3\r\nexport var _DYN_ADD_EVENT_LISTENER = \"addEventListener\"; // Count: 2\r\nexport var _DYN_CORE_DATA = \"coreData\"; // Count: 4\r\nexport var _DYN_REQUEST_URI = \"requestUri\"; // Count: 3\r\nexport var _DYN_GET_ATTRIBUTE = \"getAttribute\"; // Count: 6\r\nexport var _DYN_PARENT_NODE = \"parentNode\"; // Count: 3\r\nexport var _DYN_CUSTOM_DATA_PREFIX = \"customDataPrefix\"; // Count: 3\r\nexport var _DYN_NAME = \"name\"; // Count: 8\r\nexport var _DYN_DATA = \"data\"; // Count: 15\r\nexport var _DYN_PAGE_TYPE = \"pageType\"; // Count: 6\r\nexport var _DYN_PROPERTIES = \"properties\"; // Count: 4\r\nexport var _DYN_ACTION_TYPE = \"actionType\"; // Count: 9\r\nexport var _DYN_BEHAVIOR = \"behavior\"; // Count: 7\r\nexport var _DYN_CLICK_COORDINATES = \"clickCoordinates\"; // Count: 2\r\nexport var _DYN_CONTENT = \"content\"; // Count: 4\r\nexport var _DYN_REF_URI = \"refUri\"; // Count: 4\r\nexport var _DYN_PARENT_ID = \"parentId\"; // Count: 3\r\nexport var _DYN_CAPTURE_PAGE_ACTION = \"capturePageAction\"; // Count: 2\r\nexport var _DYN_SET_COMMON_PROPERTIE3 = \"setCommonProperties\"; // Count: 2\r\nexport var _DYN_GET_ELEMENT_CONTENT = \"getElementContent\"; // Count: 2\r\nexport var _DYN__GET_VALID_BEHAVIOR = \"_getValidBehavior\"; // Count: 3\r\nexport var _DYN__TRACE_LOGGER = \"_traceLogger\"; // Count: 3\r\nexport var _DYN_CLICK_COORDINATE_X = \"clickCoordinateX\"; // Count: 3\r\nexport var _DYN_CLICK_COORDINATE_Y = \"clickCoordinateY\"; // Count: 3\r\nexport var _DYN__CONFIG = \"_config\"; // Count: 9\r\nexport var _DYN_DATA_TAGS = \"dataTags\"; // Count: 6\r\nexport var _DYN_PARENT_DATA_TAG = \"parentDataTag\"; // Count: 3\r\nexport var _DYN__PAGE_TAGS = \"_pageTags\"; // Count: 6\r\nexport var _DYN__PAGE_TAGS_CALLBACK = \"_pageTagsCallback\"; // Count: 3\r\nexport var _DYN__META_TAGS = \"_metaTags\"; // Count: 6\r\nexport var _DYN_SET_BASIC_PROPERTIES = \"setBasicProperties\"; // Count: 2\r\nexport var _DYN__PAGE_TYPE_META_TAG = \"_pageTypeMetaTag\"; // Count: 3\r\nexport var _DYN__BEHAVIOR_META_TAG = \"_behaviorMetaTag\"; // Count: 3\r\nexport var _DYN_PARENT_ELEMENT = \"parentElement\"; // Count: 3\r\nexport var _DYN_ATTRIBUTES = \"attributes\"; // Count: 4\r\n//# sourceMappingURL=__DynamicConstants.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-esm/common/Utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-clickanalytics-js",
|
|
3
|
-
"version": "3.0.0-beta.2302-
|
|
3
|
+
"version": "3.0.0-beta.2302-03",
|
|
4
4
|
"description": "Microsoft Application Insights Click Analytics extension",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
27
27
|
"@microsoft/applicationinsights-rollup-es5": "1.0.0",
|
|
28
28
|
"@microsoft/api-extractor": "^7.18.1",
|
|
29
|
-
"typescript": "^4.3
|
|
29
|
+
"typescript": "^4.9.3",
|
|
30
30
|
"tslib": "^2.0.0",
|
|
31
31
|
"globby": "^11.0.0",
|
|
32
32
|
"magic-string": "^0.25.7",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"rollup": "^2.32.0",
|
|
38
38
|
"grunt": "^1.5.3",
|
|
39
39
|
"grunt-cli": "^1.4.3",
|
|
40
|
-
"grunt-contrib-qunit": "^
|
|
40
|
+
"grunt-contrib-qunit": "^6.2.1",
|
|
41
41
|
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
42
42
|
"@nevware21/grunt-eslint-ts": "^0.2.2"
|
|
43
43
|
},
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@microsoft/dynamicproto-js": "^1.1.7",
|
|
49
49
|
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
50
|
-
"@microsoft/applicationinsights-core-js": "3.0.0-beta.2302-
|
|
51
|
-
"@microsoft/applicationinsights-common": "3.0.0-beta.2302-
|
|
52
|
-
"@microsoft/applicationinsights-properties-js": "3.0.0-beta.2302-
|
|
53
|
-
"@nevware21/ts-utils": "^0.
|
|
50
|
+
"@microsoft/applicationinsights-core-js": "3.0.0-beta.2302-03",
|
|
51
|
+
"@microsoft/applicationinsights-common": "3.0.0-beta.2302-03",
|
|
52
|
+
"@microsoft/applicationinsights-properties-js": "3.0.0-beta.2302-03",
|
|
53
|
+
"@nevware21/ts-utils": "^0.7.0"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Microsoft 2020
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
-
import { IConfig, IPropertiesPlugin, PropertiesPluginIdentifier } from "@microsoft/applicationinsights-common";
|
|
7
|
-
import {
|
|
8
|
-
BaseTelemetryPlugin, IAppInsightsCore, IConfigDefaults, IConfiguration, ICustomProperties, IPlugin, IProcessTelemetryContext,
|
|
9
|
-
IProcessTelemetryUnloadContext, ITelemetryItem, ITelemetryPluginChain, ITelemetryUnloadState, _eInternalMessageId, _throwInternal,
|
|
10
|
-
arrForEach, createProcessTelemetryContext, dumpObj, eLoggingSeverity, getExceptionName, isNullOrUndefined, onConfigChange, throwError,
|
|
11
|
-
unloadComponents
|
|
12
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
13
|
-
import { PropertiesPlugin } from "@microsoft/applicationinsights-properties-js";
|
|
14
|
-
import { hasDocument, isObject, objDeepFreeze, objDefineProp, objForEachKey } from "@nevware21/ts-utils";
|
|
15
|
-
import {
|
|
16
|
-
IAutoCaptureHandler, IClickAnalyticsConfiguration, IContentHandler, ICoreData, ICustomDataTags, IPageActionTelemetry
|
|
17
|
-
} from "./Interfaces/Datamodel";
|
|
18
|
-
import {
|
|
19
|
-
BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, DEFAULT_AI_BLOB_ATTRIBUTE_TAG, DEFAULT_DATA_PREFIX,
|
|
20
|
-
DEFAULT_DONOT_TRACK_TAG
|
|
21
|
-
} from "./common/Utils";
|
|
22
|
-
import { PageAction } from "./events/PageAction";
|
|
23
|
-
import { AutoCaptureHandler } from "./handlers/AutoCaptureHandler";
|
|
24
|
-
import { DomContentHandler } from "./handlers/DomContentHandler";
|
|
25
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Microsoft 2020
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
+
import { IConfig, IPropertiesPlugin, PropertiesPluginIdentifier } from "@microsoft/applicationinsights-common";
|
|
7
|
+
import {
|
|
8
|
+
BaseTelemetryPlugin, IAppInsightsCore, IConfigDefaults, IConfiguration, ICustomProperties, IPlugin, IProcessTelemetryContext,
|
|
9
|
+
IProcessTelemetryUnloadContext, ITelemetryItem, ITelemetryPluginChain, ITelemetryUnloadState, _eInternalMessageId, _throwInternal,
|
|
10
|
+
arrForEach, createProcessTelemetryContext, dumpObj, eLoggingSeverity, getExceptionName, isNullOrUndefined, onConfigChange, throwError,
|
|
11
|
+
unloadComponents
|
|
12
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
13
|
+
import { PropertiesPlugin } from "@microsoft/applicationinsights-properties-js";
|
|
14
|
+
import { hasDocument, isObject, objDeepFreeze, objDefineProp, objForEachKey } from "@nevware21/ts-utils";
|
|
15
|
+
import {
|
|
16
|
+
IAutoCaptureHandler, IClickAnalyticsConfiguration, IContentHandler, ICoreData, ICustomDataTags, IPageActionTelemetry
|
|
17
|
+
} from "./Interfaces/Datamodel";
|
|
18
|
+
import {
|
|
19
|
+
BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, DEFAULT_AI_BLOB_ATTRIBUTE_TAG, DEFAULT_DATA_PREFIX,
|
|
20
|
+
DEFAULT_DONOT_TRACK_TAG
|
|
21
|
+
} from "./common/Utils";
|
|
22
|
+
import { PageAction } from "./events/PageAction";
|
|
23
|
+
import { AutoCaptureHandler } from "./handlers/AutoCaptureHandler";
|
|
24
|
+
import { DomContentHandler } from "./handlers/DomContentHandler";
|
|
25
|
+
|
|
26
26
|
export { BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator }
|
|
27
27
|
|
|
28
28
|
const dataTagsDefault = {
|
|
@@ -200,4 +200,4 @@ export class ClickAnalyticsPlugin extends BaseTelemetryPlugin {
|
|
|
200
200
|
public trackPageAction(pageAction?: IPageActionTelemetry, customProperties?: ICustomProperties) {
|
|
201
201
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
202
202
|
}
|
|
203
|
-
}
|
|
203
|
+
}
|
package/src/DataCollector.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Microsoft 2020
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { getDocument, getLocation, getWindow, hasDocument, isFunction } from "@microsoft/applicationinsights-core-js";
|
|
6
|
-
import { scheduleTimeout } from "@nevware21/ts-utils";
|
|
7
|
-
import { IClickAnalyticsConfiguration, IOverrideValues } from "./Interfaces/Datamodel";
|
|
8
|
-
import { findClosestAnchor, isValueAssigned } from "./common/Utils";
|
|
9
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Microsoft 2020
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { getDocument, getLocation, getWindow, hasDocument, isFunction } from "@microsoft/applicationinsights-core-js";
|
|
6
|
+
import { scheduleTimeout } from "@nevware21/ts-utils";
|
|
7
|
+
import { IClickAnalyticsConfiguration, IOverrideValues } from "./Interfaces/Datamodel";
|
|
8
|
+
import { findClosestAnchor, isValueAssigned } from "./common/Utils";
|
|
9
|
+
|
|
10
10
|
var clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };
|
|
11
11
|
|
|
12
12
|
|
|
@@ -156,4 +156,4 @@ export function getUri(config: IClickAnalyticsConfiguration, location: any): str
|
|
|
156
156
|
return config.coreData.requestUri;
|
|
157
157
|
}
|
|
158
158
|
return sanitizeUrl(config, location);
|
|
159
|
-
}
|
|
159
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
// @skip-file-minify
|
|
4
|
-
|
|
5
|
-
// ##############################################################
|
|
6
|
-
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
7
|
-
// ##############################################################
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
// Note: DON'T Export these const from the package as we are still targeting
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
export const _DYN_INDEX_OF = "indexOf"; // Count: 9
|
|
14
|
-
export const _DYN_TRACK_PAGE_ACTION = "trackPageAction"; // Count: 4
|
|
15
|
-
export const _DYN_PAGE_ACTION_PAGE_TAG0 = "pageActionPageTags"; // Count: 2
|
|
16
|
-
export const _DYN__DO_UNLOAD = "_doUnload"; // Count: 3
|
|
17
|
-
export const _DYN_USE_DEFAULT_CONTENT_1 = "useDefaultContentNameOrId"; // Count: 5
|
|
18
|
-
export const _DYN_CAPTURE_ALL_META_DAT2 = "captureAllMetaDataContent"; // Count: 3
|
|
19
|
-
export const _DYN_PAGE_NAME = "pageName"; // Count: 9
|
|
20
|
-
export const _DYN_CONTENT_NAME = "contentName"; // Count: 13
|
|
21
|
-
export const _DYN_BEHAVIOR_VALIDATOR = "behaviorValidator"; // Count: 2
|
|
22
|
-
export const _DYN_LENGTH = "length"; // Count: 5
|
|
23
|
-
export const _DYN_TAG_NAME = "tagName"; // Count: 4
|
|
24
|
-
export const _DYN_TO_UPPER_CASE = "toUpperCase"; // Count: 4
|
|
25
|
-
export const _DYN_PATHNAME = "pathname"; // Count: 3
|
|
26
|
-
export const _DYN_ADD_EVENT_LISTENER = "addEventListener"; // Count: 2
|
|
27
|
-
export const _DYN_CORE_DATA = "coreData"; // Count: 4
|
|
28
|
-
export const _DYN_REQUEST_URI = "requestUri"; // Count: 3
|
|
29
|
-
export const _DYN_GET_ATTRIBUTE = "getAttribute"; // Count: 6
|
|
30
|
-
export const _DYN_PARENT_NODE = "parentNode"; // Count: 3
|
|
31
|
-
export const _DYN_CUSTOM_DATA_PREFIX = "customDataPrefix"; // Count: 3
|
|
32
|
-
export const _DYN_NAME = "name"; // Count: 8
|
|
33
|
-
export const _DYN_DATA = "data"; // Count: 15
|
|
34
|
-
export const _DYN_PAGE_TYPE = "pageType"; // Count: 6
|
|
35
|
-
export const _DYN_PROPERTIES = "properties"; // Count: 4
|
|
36
|
-
export const _DYN_ACTION_TYPE = "actionType"; // Count: 9
|
|
37
|
-
export const _DYN_BEHAVIOR = "behavior"; // Count: 7
|
|
38
|
-
export const _DYN_CLICK_COORDINATES = "clickCoordinates"; // Count: 2
|
|
39
|
-
export const _DYN_CONTENT = "content"; // Count: 4
|
|
40
|
-
export const _DYN_REF_URI = "refUri"; // Count: 4
|
|
41
|
-
export const _DYN_PARENT_ID = "parentId"; // Count: 3
|
|
42
|
-
export const _DYN_CAPTURE_PAGE_ACTION = "capturePageAction"; // Count: 2
|
|
43
|
-
export const _DYN_SET_COMMON_PROPERTIE3 = "setCommonProperties"; // Count: 2
|
|
44
|
-
export const _DYN_GET_ELEMENT_CONTENT = "getElementContent"; // Count: 2
|
|
45
|
-
export const _DYN__GET_VALID_BEHAVIOR = "_getValidBehavior"; // Count: 3
|
|
46
|
-
export const _DYN__TRACE_LOGGER = "_traceLogger"; // Count: 3
|
|
47
|
-
export const _DYN_CLICK_COORDINATE_X = "clickCoordinateX"; // Count: 3
|
|
48
|
-
export const _DYN_CLICK_COORDINATE_Y = "clickCoordinateY"; // Count: 3
|
|
49
|
-
export const _DYN__CONFIG = "_config"; // Count: 9
|
|
50
|
-
export const _DYN_DATA_TAGS = "dataTags"; // Count: 6
|
|
51
|
-
export const _DYN_PARENT_DATA_TAG = "parentDataTag"; // Count: 3
|
|
52
|
-
export const _DYN__PAGE_TAGS = "_pageTags"; // Count: 6
|
|
53
|
-
export const _DYN__PAGE_TAGS_CALLBACK = "_pageTagsCallback"; // Count: 3
|
|
54
|
-
export const _DYN__META_TAGS = "_metaTags"; // Count: 6
|
|
55
|
-
export const _DYN_SET_BASIC_PROPERTIES = "setBasicProperties"; // Count: 2
|
|
56
|
-
export const _DYN__PAGE_TYPE_META_TAG = "_pageTypeMetaTag"; // Count: 3
|
|
57
|
-
export const _DYN__BEHAVIOR_META_TAG = "_behaviorMetaTag"; // Count: 3
|
|
58
|
-
export const _DYN_PARENT_ELEMENT = "parentElement"; // Count: 3
|
|
59
|
-
export const _DYN_ATTRIBUTES = "attributes"; // Count: 4
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
// @skip-file-minify
|
|
4
|
+
|
|
5
|
+
// ##############################################################
|
|
6
|
+
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
7
|
+
// ##############################################################
|
|
8
|
+
|
|
9
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
+
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
11
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
+
|
|
13
|
+
export const _DYN_INDEX_OF = "indexOf"; // Count: 9
|
|
14
|
+
export const _DYN_TRACK_PAGE_ACTION = "trackPageAction"; // Count: 4
|
|
15
|
+
export const _DYN_PAGE_ACTION_PAGE_TAG0 = "pageActionPageTags"; // Count: 2
|
|
16
|
+
export const _DYN__DO_UNLOAD = "_doUnload"; // Count: 3
|
|
17
|
+
export const _DYN_USE_DEFAULT_CONTENT_1 = "useDefaultContentNameOrId"; // Count: 5
|
|
18
|
+
export const _DYN_CAPTURE_ALL_META_DAT2 = "captureAllMetaDataContent"; // Count: 3
|
|
19
|
+
export const _DYN_PAGE_NAME = "pageName"; // Count: 9
|
|
20
|
+
export const _DYN_CONTENT_NAME = "contentName"; // Count: 13
|
|
21
|
+
export const _DYN_BEHAVIOR_VALIDATOR = "behaviorValidator"; // Count: 2
|
|
22
|
+
export const _DYN_LENGTH = "length"; // Count: 5
|
|
23
|
+
export const _DYN_TAG_NAME = "tagName"; // Count: 4
|
|
24
|
+
export const _DYN_TO_UPPER_CASE = "toUpperCase"; // Count: 4
|
|
25
|
+
export const _DYN_PATHNAME = "pathname"; // Count: 3
|
|
26
|
+
export const _DYN_ADD_EVENT_LISTENER = "addEventListener"; // Count: 2
|
|
27
|
+
export const _DYN_CORE_DATA = "coreData"; // Count: 4
|
|
28
|
+
export const _DYN_REQUEST_URI = "requestUri"; // Count: 3
|
|
29
|
+
export const _DYN_GET_ATTRIBUTE = "getAttribute"; // Count: 6
|
|
30
|
+
export const _DYN_PARENT_NODE = "parentNode"; // Count: 3
|
|
31
|
+
export const _DYN_CUSTOM_DATA_PREFIX = "customDataPrefix"; // Count: 3
|
|
32
|
+
export const _DYN_NAME = "name"; // Count: 8
|
|
33
|
+
export const _DYN_DATA = "data"; // Count: 15
|
|
34
|
+
export const _DYN_PAGE_TYPE = "pageType"; // Count: 6
|
|
35
|
+
export const _DYN_PROPERTIES = "properties"; // Count: 4
|
|
36
|
+
export const _DYN_ACTION_TYPE = "actionType"; // Count: 9
|
|
37
|
+
export const _DYN_BEHAVIOR = "behavior"; // Count: 7
|
|
38
|
+
export const _DYN_CLICK_COORDINATES = "clickCoordinates"; // Count: 2
|
|
39
|
+
export const _DYN_CONTENT = "content"; // Count: 4
|
|
40
|
+
export const _DYN_REF_URI = "refUri"; // Count: 4
|
|
41
|
+
export const _DYN_PARENT_ID = "parentId"; // Count: 3
|
|
42
|
+
export const _DYN_CAPTURE_PAGE_ACTION = "capturePageAction"; // Count: 2
|
|
43
|
+
export const _DYN_SET_COMMON_PROPERTIE3 = "setCommonProperties"; // Count: 2
|
|
44
|
+
export const _DYN_GET_ELEMENT_CONTENT = "getElementContent"; // Count: 2
|
|
45
|
+
export const _DYN__GET_VALID_BEHAVIOR = "_getValidBehavior"; // Count: 3
|
|
46
|
+
export const _DYN__TRACE_LOGGER = "_traceLogger"; // Count: 3
|
|
47
|
+
export const _DYN_CLICK_COORDINATE_X = "clickCoordinateX"; // Count: 3
|
|
48
|
+
export const _DYN_CLICK_COORDINATE_Y = "clickCoordinateY"; // Count: 3
|
|
49
|
+
export const _DYN__CONFIG = "_config"; // Count: 9
|
|
50
|
+
export const _DYN_DATA_TAGS = "dataTags"; // Count: 6
|
|
51
|
+
export const _DYN_PARENT_DATA_TAG = "parentDataTag"; // Count: 3
|
|
52
|
+
export const _DYN__PAGE_TAGS = "_pageTags"; // Count: 6
|
|
53
|
+
export const _DYN__PAGE_TAGS_CALLBACK = "_pageTagsCallback"; // Count: 3
|
|
54
|
+
export const _DYN__META_TAGS = "_metaTags"; // Count: 6
|
|
55
|
+
export const _DYN_SET_BASIC_PROPERTIES = "setBasicProperties"; // Count: 2
|
|
56
|
+
export const _DYN__PAGE_TYPE_META_TAG = "_pageTypeMetaTag"; // Count: 3
|
|
57
|
+
export const _DYN__BEHAVIOR_META_TAG = "_behaviorMetaTag"; // Count: 3
|
|
58
|
+
export const _DYN_PARENT_ELEMENT = "parentElement"; // Count: 3
|
|
59
|
+
export const _DYN_ATTRIBUTES = "attributes"; // Count: 4
|
package/src/common/Utils.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Microsoft 2020
|
|
3
|
-
* File containing utility functions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { _eInternalMessageId, arrForEach, isNullOrUndefined } from "@microsoft/applicationinsights-core-js";
|
|
7
|
-
import { IClickAnalyticsConfiguration } from "../Interfaces/Datamodel";
|
|
8
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Microsoft 2020
|
|
3
|
+
* File containing utility functions.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { _eInternalMessageId, arrForEach, isNullOrUndefined } from "@microsoft/applicationinsights-core-js";
|
|
7
|
+
import { IClickAnalyticsConfiguration } from "../Interfaces/Datamodel";
|
|
8
|
+
|
|
9
9
|
export const DEFAULT_DONOT_TRACK_TAG = "ai-dnt";
|
|
10
10
|
export const DEFAULT_AI_BLOB_ATTRIBUTE_TAG = "ai-blob";
|
|
11
11
|
export const DEFAULT_DATA_PREFIX = "data-";
|
|
@@ -278,4 +278,4 @@ export function BehaviorValueValidator (behaviorArray: string[]) {
|
|
|
278
278
|
|
|
279
279
|
export function BehaviorEnumValidator (enumObj: any) {
|
|
280
280
|
return (key: string) => enumObj[key] || "";
|
|
281
|
-
}
|
|
281
|
+
}
|
package/src/events/PageAction.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Microsoft 2020
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
-
import { strNotSpecified } from "@microsoft/applicationinsights-common";
|
|
7
|
-
import {
|
|
8
|
-
ICustomProperties, IDiagnosticLogger, ITelemetryItem, _eInternalMessageId, _throwInternal, eLoggingSeverity, getPerformance, objExtend,
|
|
9
|
-
objForEachKey
|
|
10
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
11
|
-
import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
|
|
12
|
-
import { getClickTarget } from "../DataCollector";
|
|
13
|
-
import { IClickAnalyticsConfiguration, IContentHandler, IPageActionOverrideValues, IPageActionTelemetry } from "../Interfaces/Datamodel";
|
|
14
|
-
import { bracketIt, extractFieldFromObject, isValueAssigned } from "../common/Utils";
|
|
15
|
-
import { WebEvent } from "./WebEvent";
|
|
16
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Microsoft 2020
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
+
import { strNotSpecified } from "@microsoft/applicationinsights-common";
|
|
7
|
+
import {
|
|
8
|
+
ICustomProperties, IDiagnosticLogger, ITelemetryItem, _eInternalMessageId, _throwInternal, eLoggingSeverity, getPerformance, objExtend,
|
|
9
|
+
objForEachKey
|
|
10
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
11
|
+
import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
|
|
12
|
+
import { getClickTarget } from "../DataCollector";
|
|
13
|
+
import { IClickAnalyticsConfiguration, IContentHandler, IPageActionOverrideValues, IPageActionTelemetry } from "../Interfaces/Datamodel";
|
|
14
|
+
import { bracketIt, extractFieldFromObject, isValueAssigned } from "../common/Utils";
|
|
15
|
+
import { WebEvent } from "./WebEvent";
|
|
16
|
+
|
|
17
17
|
export class PageAction extends WebEvent {
|
|
18
18
|
|
|
19
19
|
constructor(
|
|
@@ -194,4 +194,4 @@ export class PageAction extends WebEvent {
|
|
|
194
194
|
public capturePageAction(element: Element, overrideValues?: IPageActionOverrideValues, customProperties?: { [name: string]: string | number | boolean | string[] | number[] | boolean[] | object }, isRightClick?: boolean): void {
|
|
195
195
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
196
196
|
}
|
|
197
|
-
}
|
|
197
|
+
}
|
package/src/events/WebEvent.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Microsoft 2020
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
-
import {
|
|
7
|
-
IDiagnosticLogger, IProcessTelemetryUnloadContext, ITelemetryUnloadState, IUnloadableComponent, getLocation, hasWindow, objExtend
|
|
8
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
9
|
-
import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
|
|
10
|
-
import { getPageName, getUri } from "../DataCollector";
|
|
11
|
-
import {
|
|
12
|
-
IClickAnalyticsConfiguration, IContentHandler, ICoreData, IOverrideValues, IPageActionTelemetry, IPageTags
|
|
13
|
-
} from "../Interfaces/Datamodel";
|
|
14
|
-
import { isValueAssigned } from "../common/Utils";
|
|
15
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Microsoft 2020
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
+
import {
|
|
7
|
+
IDiagnosticLogger, IProcessTelemetryUnloadContext, ITelemetryUnloadState, IUnloadableComponent, getLocation, hasWindow, objExtend
|
|
8
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
9
|
+
import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
|
|
10
|
+
import { getPageName, getUri } from "../DataCollector";
|
|
11
|
+
import {
|
|
12
|
+
IClickAnalyticsConfiguration, IContentHandler, ICoreData, IOverrideValues, IPageActionTelemetry, IPageTags
|
|
13
|
+
} from "../Interfaces/Datamodel";
|
|
14
|
+
import { isValueAssigned } from "../common/Utils";
|
|
15
|
+
|
|
16
16
|
export class WebEvent implements IUnloadableComponent {
|
|
17
17
|
|
|
18
18
|
protected _pageTags: IPageTags;
|
|
@@ -199,4 +199,4 @@ export class WebEvent implements IUnloadableComponent {
|
|
|
199
199
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
200
200
|
return null;
|
|
201
201
|
}
|
|
202
|
-
}
|
|
202
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Microsoft 2020
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
-
import {
|
|
7
|
-
IDiagnosticLogger, IProcessTelemetryUnloadContext, ITelemetryUnloadState, createUniqueNamespace, eventOff, eventOn, getDocument,
|
|
8
|
-
getWindow, isNullOrUndefined, mergeEvtNamespace
|
|
9
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
10
|
-
import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
|
|
11
|
-
import { ActionType } from "../Enums";
|
|
12
|
-
import { IAutoCaptureHandler, IClickAnalyticsConfiguration, IPageActionOverrideValues } from "../Interfaces/Datamodel";
|
|
13
|
-
import { isElementDnt, isKeyboardEnter, isKeyboardSpace, isLeftClick, isMiddleClick, isRightClick } from "../common/Utils";
|
|
14
|
-
import { PageAction } from "../events/PageAction";
|
|
15
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Microsoft 2020
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
|
+
import {
|
|
7
|
+
IDiagnosticLogger, IProcessTelemetryUnloadContext, ITelemetryUnloadState, createUniqueNamespace, eventOff, eventOn, getDocument,
|
|
8
|
+
getWindow, isNullOrUndefined, mergeEvtNamespace
|
|
9
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
10
|
+
import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
|
|
11
|
+
import { ActionType } from "../Enums";
|
|
12
|
+
import { IAutoCaptureHandler, IClickAnalyticsConfiguration, IPageActionOverrideValues } from "../Interfaces/Datamodel";
|
|
13
|
+
import { isElementDnt, isKeyboardEnter, isKeyboardSpace, isLeftClick, isMiddleClick, isRightClick } from "../common/Utils";
|
|
14
|
+
import { PageAction } from "../events/PageAction";
|
|
15
|
+
|
|
16
16
|
const clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };
|
|
17
17
|
|
|
18
18
|
export class AutoCaptureHandler implements IAutoCaptureHandler {
|
|
@@ -118,4 +118,4 @@ export class AutoCaptureHandler implements IAutoCaptureHandler {
|
|
|
118
118
|
public _doUnload(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean {
|
|
119
119
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
120
120
|
}
|
|
121
|
-
}
|
|
121
|
+
}
|