@microsoft/applicationinsights-clickanalytics-js 2.7.1-nightly.202110-07 → 2.7.1-nightly.202110-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.
Files changed (78) hide show
  1. package/browser/{ai.clck.2.7.1-nightly.202110-07.cjs.js → ai.clck.2.7.1-nightly.202110-16.cjs.js} +129 -120
  2. package/browser/ai.clck.2.7.1-nightly.202110-16.cjs.js.map +1 -0
  3. package/browser/ai.clck.2.7.1-nightly.202110-16.cjs.min.js +6 -0
  4. package/browser/ai.clck.2.7.1-nightly.202110-16.cjs.min.js.map +1 -0
  5. package/browser/{ai.clck.2.7.1-nightly.202110-07.gbl.js → ai.clck.2.7.1-nightly.202110-16.gbl.js} +129 -120
  6. package/browser/ai.clck.2.7.1-nightly.202110-16.gbl.js.map +1 -0
  7. package/browser/ai.clck.2.7.1-nightly.202110-16.gbl.min.js +6 -0
  8. package/browser/ai.clck.2.7.1-nightly.202110-16.gbl.min.js.map +1 -0
  9. package/browser/ai.clck.2.7.1-nightly.202110-16.integrity.json +66 -0
  10. package/browser/{ai.clck.2.7.1-nightly.202110-07.js → ai.clck.2.7.1-nightly.202110-16.js} +129 -120
  11. package/browser/ai.clck.2.7.1-nightly.202110-16.js.map +1 -0
  12. package/browser/ai.clck.2.7.1-nightly.202110-16.min.js +6 -0
  13. package/browser/ai.clck.2.7.1-nightly.202110-16.min.js.map +1 -0
  14. package/browser/ai.clck.2.cjs.js +128 -119
  15. package/browser/ai.clck.2.cjs.js.map +1 -1
  16. package/browser/ai.clck.2.cjs.min.js +2 -2
  17. package/browser/ai.clck.2.cjs.min.js.map +1 -1
  18. package/browser/ai.clck.2.gbl.js +128 -119
  19. package/browser/ai.clck.2.gbl.js.map +1 -1
  20. package/browser/ai.clck.2.gbl.min.js +2 -2
  21. package/browser/ai.clck.2.gbl.min.js.map +1 -1
  22. package/browser/ai.clck.2.js +128 -119
  23. package/browser/ai.clck.2.js.map +1 -1
  24. package/browser/ai.clck.2.min.js +2 -2
  25. package/browser/ai.clck.2.min.js.map +1 -1
  26. package/dist/applicationinsights-clickanalytics-js.api.json +1 -1
  27. package/dist/applicationinsights-clickanalytics-js.d.ts +1 -1
  28. package/dist/applicationinsights-clickanalytics-js.js +128 -119
  29. package/dist/applicationinsights-clickanalytics-js.js.map +1 -1
  30. package/dist/applicationinsights-clickanalytics-js.min.js +2 -2
  31. package/dist/applicationinsights-clickanalytics-js.min.js.map +1 -1
  32. package/dist/applicationinsights-clickanalytics-js.rollup.d.ts +1 -1
  33. package/dist-esm/Behaviours.js +1 -1
  34. package/dist-esm/ClickAnalyticsPlugin.js +5 -5
  35. package/dist-esm/ClickAnalyticsPlugin.js.map +1 -1
  36. package/dist-esm/DataCollector.js +16 -16
  37. package/dist-esm/DataCollector.js.map +1 -1
  38. package/dist-esm/Enums.js +10 -10
  39. package/dist-esm/Enums.js.map +1 -1
  40. package/dist-esm/Interfaces/Datamodel.js +1 -1
  41. package/dist-esm/applicationinsights-clickanalytics-js.js +1 -1
  42. package/dist-esm/common/Utils.js +25 -25
  43. package/dist-esm/common/Utils.js.map +1 -1
  44. package/dist-esm/events/PageAction.js +24 -24
  45. package/dist-esm/events/PageAction.js.map +1 -1
  46. package/dist-esm/events/WebEvent.js +8 -8
  47. package/dist-esm/events/WebEvent.js.map +1 -1
  48. package/dist-esm/handlers/AutoCaptureHandler.js +8 -8
  49. package/dist-esm/handlers/AutoCaptureHandler.js.map +1 -1
  50. package/dist-esm/handlers/DomContentHandler.js +26 -26
  51. package/dist-esm/handlers/DomContentHandler.js.map +1 -1
  52. package/package.json +4 -5
  53. package/src/ClickAnalyticsPlugin.ts +5 -5
  54. package/src/DataCollector.ts +16 -16
  55. package/src/Enums.ts +9 -9
  56. package/src/common/Utils.ts +25 -25
  57. package/src/events/PageAction.ts +25 -25
  58. package/src/events/WebEvent.ts +9 -9
  59. package/src/handlers/AutoCaptureHandler.ts +9 -9
  60. package/src/handlers/DomContentHandler.ts +26 -26
  61. package/types/ClickAnalyticsPlugin.d.ts +2 -2
  62. package/types/DataCollector.d.ts +1 -1
  63. package/types/common/Utils.d.ts +1 -1
  64. package/types/events/PageAction.d.ts +2 -2
  65. package/types/events/WebEvent.d.ts +3 -3
  66. package/types/handlers/AutoCaptureHandler.d.ts +2 -2
  67. package/types/handlers/DomContentHandler.d.ts +1 -1
  68. package/types/tsdoc-metadata.json +1 -1
  69. package/browser/ai.clck.2.7.1-nightly.202110-07.cjs.js.map +0 -1
  70. package/browser/ai.clck.2.7.1-nightly.202110-07.cjs.min.js +0 -6
  71. package/browser/ai.clck.2.7.1-nightly.202110-07.cjs.min.js.map +0 -1
  72. package/browser/ai.clck.2.7.1-nightly.202110-07.gbl.js.map +0 -1
  73. package/browser/ai.clck.2.7.1-nightly.202110-07.gbl.min.js +0 -6
  74. package/browser/ai.clck.2.7.1-nightly.202110-07.gbl.min.js.map +0 -1
  75. package/browser/ai.clck.2.7.1-nightly.202110-07.integrity.json +0 -66
  76. package/browser/ai.clck.2.7.1-nightly.202110-07.js.map +0 -1
  77. package/browser/ai.clck.2.7.1-nightly.202110-07.min.js +0 -6
  78. package/browser/ai.clck.2.7.1-nightly.202110-07.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Click Analytics, 2.7.1-nightly.202110-07
2
+ * Application Insights JavaScript SDK - Click Analytics, 2.7.1-nightly.202110-16
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  this.Microsoft = this.Microsoft || {};
@@ -46,7 +46,7 @@ this.Microsoft = this.Microsoft || {};
46
46
  }
47
47
  var type = typeof obj;
48
48
  if (type !== strShimObject && type !== strShimFunction) {
49
- throwTypeError('Object prototype may only be an Object:' + obj);
49
+ throwTypeError("Object prototype may only be an Object:" + obj);
50
50
  }
51
51
  function tmpFunc() { }
52
52
  tmpFunc[strShimPrototype] = obj;
@@ -612,12 +612,26 @@ this.Microsoft = this.Microsoft || {};
612
612
  var AiNonUserActionablePrefix = "AI (Internal): ";
613
613
  var AiUserActionablePrefix = "AI: ";
614
614
  var AIInternalMessagePrefix = "AITR_";
615
+ var strErrorToConsole = "errorToConsole";
616
+ var strWarnToConsole = "warnToConsole";
615
617
  function _sanitizeDiagnosticText(text) {
616
618
  if (text) {
617
619
  return "\"" + text.replace(/\"/g, "") + "\"";
618
620
  }
619
621
  return "";
620
622
  }
623
+ function _logToConsole(func, message) {
624
+ var theConsole = getConsole();
625
+ if (!!theConsole) {
626
+ var logFunc = "log";
627
+ if (theConsole[func]) {
628
+ logFunc = "func";
629
+ }
630
+ if (isFunction(theConsole[logFunc])) {
631
+ theConsole[logFunc](message);
632
+ }
633
+ }
634
+ }
621
635
  var _InternalLogMessage = /** @class */ (function () {
622
636
  function _InternalLogMessage(msgId, msg, isUserAct, properties) {
623
637
  if (isUserAct === void 0) { isUserAct = false; }
@@ -642,7 +656,7 @@ this.Microsoft = this.Microsoft || {};
642
656
  }
643
657
  var DiagnosticLogger = /** @class */ (function () {
644
658
  function DiagnosticLogger(config) {
645
- this.identifier = 'DiagnosticLogger';
659
+ this.identifier = "DiagnosticLogger";
646
660
  this.queue = [];
647
661
  var _messageCount = 0;
648
662
  var _messageLogged = {};
@@ -650,10 +664,10 @@ this.Microsoft = this.Microsoft || {};
650
664
  if (isNullOrUndefined(config)) {
651
665
  config = {};
652
666
  }
653
- _self.consoleLoggingLevel = function () { return _getConfigValue('loggingLevelConsole', 0); };
654
- _self.telemetryLoggingLevel = function () { return _getConfigValue('loggingLevelTelemetry', 1); };
655
- _self.maxInternalMessageLimit = function () { return _getConfigValue('maxMessageLimit', 25); };
656
- _self.enableDebugExceptions = function () { return _getConfigValue('enableDebugExceptions', false); };
667
+ _self.consoleLoggingLevel = function () { return _getConfigValue("loggingLevelConsole", 0); };
668
+ _self.telemetryLoggingLevel = function () { return _getConfigValue("loggingLevelTelemetry", 1); };
669
+ _self.maxInternalMessageLimit = function () { return _getConfigValue("maxMessageLimit", 25); };
670
+ _self.enableDebugExceptions = function () { return _getConfigValue("enableDebugExceptions", false); };
657
671
  _self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {
658
672
  if (isUserAct === void 0) { isUserAct = false; }
659
673
  var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
@@ -661,18 +675,19 @@ this.Microsoft = this.Microsoft || {};
661
675
  throw message;
662
676
  }
663
677
  else {
678
+ var logFunc = severity === LoggingSeverity.CRITICAL ? strErrorToConsole : strWarnToConsole;
664
679
  if (!isUndefined(message.message)) {
665
680
  var logLevel = _self.consoleLoggingLevel();
666
681
  if (isUserAct) {
667
682
  var messageKey = +message.messageId;
668
- if (!_messageLogged[messageKey] && logLevel >= LoggingSeverity.WARNING) {
669
- _self.warnToConsole(message.message);
683
+ if (!_messageLogged[messageKey] && logLevel >= severity) {
684
+ _self[logFunc](message.message);
670
685
  _messageLogged[messageKey] = true;
671
686
  }
672
687
  }
673
688
  else {
674
- if (logLevel >= LoggingSeverity.WARNING) {
675
- _self.warnToConsole(message.message);
689
+ if (logLevel >= severity) {
690
+ _self[logFunc](message.message);
676
691
  }
677
692
  }
678
693
  _self.logInternalMessage(severity, message);
@@ -680,16 +695,10 @@ this.Microsoft = this.Microsoft || {};
680
695
  }
681
696
  };
682
697
  _self.warnToConsole = function (message) {
683
- var theConsole = getConsole();
684
- if (!!theConsole) {
685
- var logFunc = 'log';
686
- if (theConsole.warn) {
687
- logFunc = 'warn';
688
- }
689
- if (isFunction(theConsole[logFunc])) {
690
- theConsole[logFunc](message);
691
- }
692
- }
698
+ _logToConsole("warn", message);
699
+ };
700
+ _self.errorToConsole = function (message) {
701
+ _logToConsole("error", message);
693
702
  };
694
703
  _self.resetInternalMessageCount = function () {
695
704
  _messageCount = 0;
@@ -746,7 +755,7 @@ this.Microsoft = this.Microsoft || {};
746
755
  _self.isChildEvt = function () { return false; };
747
756
  if (isFunction(payloadDetails)) {
748
757
  var theDetails_1;
749
- accessorDefined = objDefineAccessors(_self, 'payload', function () {
758
+ accessorDefined = objDefineAccessors(_self, "payload", function () {
750
759
  if (!theDetails_1 && isFunction(payloadDetails)) {
751
760
  theDetails_1 = payloadDetails();
752
761
  payloadDetails = null;
@@ -1098,17 +1107,17 @@ this.Microsoft = this.Microsoft || {};
1098
1107
 
1099
1108
  var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
1100
1109
 
1101
- var Prototype = 'prototype';
1102
- var DEFAULT_DONOT_TRACK_TAG = 'ai-dnt';
1103
- var DEFAULT_AI_BLOB_ATTRIBUTE_TAG = 'ai-blob';
1104
- var DEFAULT_DATA_PREFIX = 'data-';
1110
+ var Prototype = "prototype";
1111
+ var DEFAULT_DONOT_TRACK_TAG = "ai-dnt";
1112
+ var DEFAULT_AI_BLOB_ATTRIBUTE_TAG = "ai-blob";
1113
+ var DEFAULT_DATA_PREFIX = "data-";
1105
1114
  var _ExtendedInternalMessageId = __assignFn(__assignFn({}, _InternalMessageId), { CannotParseAiBlobValue: 101, InvalidContentBlob: 102, TrackPageActionEventFailed: 103 });
1106
1115
  function removeNonObjectsAndInvalidElements(overrideConfig, attributeNamesExpectedObjects) {
1107
1116
  removeInvalidElements(overrideConfig);
1108
1117
  for (var i in attributeNamesExpectedObjects) {
1109
1118
  if (attributeNamesExpectedObjects.hasOwnProperty(i)) {
1110
1119
  var objectName = attributeNamesExpectedObjects[i];
1111
- if (typeof overrideConfig[objectName] === 'object') {
1120
+ if (typeof overrideConfig[objectName] === "object") {
1112
1121
  removeInvalidElements(overrideConfig[objectName]);
1113
1122
  }
1114
1123
  else {
@@ -1120,20 +1129,20 @@ this.Microsoft = this.Microsoft || {};
1120
1129
  function removeInvalidElements(object) {
1121
1130
  for (var property in object) {
1122
1131
  if (!isValueAssigned(object[property]) ||
1123
- (JSON.stringify(object[property]) === '{}' && (property !== 'callback'))) {
1132
+ (JSON.stringify(object[property]) === "{}" && (property !== "callback"))) {
1124
1133
  delete object[property];
1125
1134
  }
1126
1135
  }
1127
1136
  }
1128
1137
  function isValueAssigned(value) {
1129
- return !(isNullOrUndefined(value) || value === '');
1138
+ return !(isNullOrUndefined(value) || value === "");
1130
1139
  }
1131
1140
  function isRightClick(evt) {
1132
1141
  try {
1133
- if ('which' in evt) {
1142
+ if ("which" in evt) {
1134
1143
  return (evt.which === 3);
1135
1144
  }
1136
- else if ('button' in evt) {
1145
+ else if ("button" in evt) {
1137
1146
  return (evt.button === 2);
1138
1147
  }
1139
1148
  }
@@ -1142,10 +1151,10 @@ this.Microsoft = this.Microsoft || {};
1142
1151
  }
1143
1152
  function isLeftClick(evt) {
1144
1153
  try {
1145
- if ('which' in evt) {
1154
+ if ("which" in evt) {
1146
1155
  return (evt.which === 1);
1147
1156
  }
1148
- else if ('button' in evt) {
1157
+ else if ("button" in evt) {
1149
1158
  return (evt.button === 1);
1150
1159
  }
1151
1160
  }
@@ -1154,10 +1163,10 @@ this.Microsoft = this.Microsoft || {};
1154
1163
  }
1155
1164
  function isMiddleClick(evt) {
1156
1165
  try {
1157
- if ('which' in evt) {
1166
+ if ("which" in evt) {
1158
1167
  return (evt.which === 2);
1159
1168
  }
1160
- else if ('button' in evt) {
1169
+ else if ("button" in evt) {
1161
1170
  return (evt.button === 4);
1162
1171
  }
1163
1172
  }
@@ -1166,7 +1175,7 @@ this.Microsoft = this.Microsoft || {};
1166
1175
  }
1167
1176
  function isKeyboardEnter(evt) {
1168
1177
  try {
1169
- if ('keyCode' in evt) {
1178
+ if ("keyCode" in evt) {
1170
1179
  return (evt.keyCode === 13);
1171
1180
  }
1172
1181
  }
@@ -1175,7 +1184,7 @@ this.Microsoft = this.Microsoft || {};
1175
1184
  }
1176
1185
  function isKeyboardSpace(evt) {
1177
1186
  try {
1178
- if ('keyCode' in evt) {
1187
+ if ("keyCode" in evt) {
1179
1188
  return (evt.keyCode === 32);
1180
1189
  }
1181
1190
  }
@@ -1209,7 +1218,7 @@ this.Microsoft = this.Microsoft || {};
1209
1218
  }
1210
1219
  }
1211
1220
  function isElementAnAnchor(element) {
1212
- return element.nodeName === 'A';
1221
+ return element.nodeName === "A";
1213
1222
  }
1214
1223
  function findClosestAnchor(element) {
1215
1224
  return walkUpDomChainWithElementValidation(element, isElementAnAnchor);
@@ -1223,7 +1232,7 @@ this.Microsoft = this.Microsoft || {};
1223
1232
  return fieldValue;
1224
1233
  }
1225
1234
  function bracketIt(str) {
1226
- return '[' + str + ']';
1235
+ return "[" + str + "]";
1227
1236
  }
1228
1237
  function extend(obj, obj2, obj3, obj4, obj5) {
1229
1238
  var extended = {};
@@ -1232,14 +1241,14 @@ this.Microsoft = this.Microsoft || {};
1232
1241
  var length = arguments.length;
1233
1242
  var objProto = Object[Prototype];
1234
1243
  var theArgs = arguments;
1235
- if (objProto.toString.call(theArgs[0]) === '[object Boolean]') {
1244
+ if (objProto.toString.call(theArgs[0]) === "[object Boolean]") {
1236
1245
  deep = theArgs[0];
1237
1246
  i++;
1238
1247
  }
1239
1248
  var merge = function (obj) {
1240
1249
  for (var prop in obj) {
1241
1250
  if (hasOwnProperty(obj, prop)) {
1242
- if (deep && objProto.toString.call(obj[prop]) === '[object Object]') {
1251
+ if (deep && objProto.toString.call(obj[prop]) === "[object Object]") {
1243
1252
  extended[prop] = extend(true, extended[prop], obj[prop]);
1244
1253
  }
1245
1254
  else {
@@ -1265,10 +1274,10 @@ this.Microsoft = this.Microsoft || {};
1265
1274
  },
1266
1275
  pageTags: {},
1267
1276
  coreData: {
1268
- referrerUri: hasDocument ? document.referrer : '',
1269
- requestUri: '',
1270
- pageName: '',
1271
- pageType: ''
1277
+ referrerUri: hasDocument ? document.referrer : "",
1278
+ requestUri: "",
1279
+ pageName: "",
1280
+ pageType: ""
1272
1281
  },
1273
1282
  dataTags: {
1274
1283
  useDefaultContentNameOrId: false,
@@ -1283,7 +1292,7 @@ this.Microsoft = this.Microsoft || {};
1283
1292
  };
1284
1293
  var attributesThatAreObjectsInConfig = [];
1285
1294
  for (var attribute in defaultConfig) {
1286
- if (typeof defaultConfig[attribute] === 'object') {
1295
+ if (typeof defaultConfig[attribute] === "object") {
1287
1296
  attributesThatAreObjectsInConfig.push(attribute);
1288
1297
  }
1289
1298
  }
@@ -1329,19 +1338,19 @@ this.Microsoft = this.Microsoft || {};
1329
1338
  }
1330
1339
  }
1331
1340
  }
1332
- return '';
1341
+ return "";
1333
1342
  }
1334
1343
  function getClickTarget(element) {
1335
- var clickTarget = '';
1344
+ var clickTarget = "";
1336
1345
  switch (element.tagName) {
1337
- case 'A':
1338
- case 'AREA':
1339
- clickTarget = element.href || '';
1346
+ case "A":
1347
+ case "AREA":
1348
+ clickTarget = element.href || "";
1340
1349
  break;
1341
- case 'IMG':
1350
+ case "IMG":
1342
1351
  clickTarget = getImageHref(element);
1343
1352
  break;
1344
- case 'INPUT':
1353
+ case "INPUT":
1345
1354
  var type = element.type;
1346
1355
  if (type && (clickCaptureInputTypes$1[type.toUpperCase()])) {
1347
1356
  var loc = getLocation() || {};
@@ -1375,13 +1384,13 @@ this.Microsoft = this.Microsoft || {};
1375
1384
  if (!location) {
1376
1385
  return null;
1377
1386
  }
1378
- var url = location.protocol + '//' + (location.hostname || location.host) +
1379
- (isValueAssigned(location.port) ? ':' + location.port : '') +
1387
+ var url = location.protocol + "//" + (location.hostname || location.host) +
1388
+ (isValueAssigned(location.port) ? ":" + location.port : "") +
1380
1389
  location.pathname;
1381
1390
  return url;
1382
1391
  }
1383
1392
  function getUri(config, location) {
1384
- if (config.coreData && config.coreData.requestUri && config.coreData.requestUri !== '') {
1393
+ if (config.coreData && config.coreData.requestUri && config.coreData.requestUri !== "") {
1385
1394
  return config.coreData.requestUri;
1386
1395
  }
1387
1396
  return sanitizeUrl(config, location);
@@ -1408,8 +1417,8 @@ this.Microsoft = this.Microsoft || {};
1408
1417
  WebEvent.prototype.setCommonProperties = function (event, overrideValues) {
1409
1418
  this.setBasicProperties(event, overrideValues);
1410
1419
  this._setPageTags(event, overrideValues);
1411
- this._pageTypeMetaTag = this._getMetaData(this._metaTags, this._config.coreData, 'pageType');
1412
- this._behaviorMetaTag = this._getMetaData(this._metaTags, this._config.coreData, 'behavior');
1420
+ this._pageTypeMetaTag = this._getMetaData(this._metaTags, this._config.coreData, "pageType");
1421
+ this._behaviorMetaTag = this._getMetaData(this._metaTags, this._config.coreData, "behavior");
1413
1422
  if (isValueAssigned(overrideValues.pageType)) {
1414
1423
  event.pageType = overrideValues.pageType;
1415
1424
  }
@@ -1427,13 +1436,13 @@ this.Microsoft = this.Microsoft || {};
1427
1436
  if (this._metaTags) {
1428
1437
  this._pageTags.metaTags = {};
1429
1438
  for (var metaTag in this._metaTags) {
1430
- if (metaTag != 'behavior' && metaTag != 'market' && metaTag != 'pageType') {
1439
+ if (metaTag != "behavior" && metaTag != "market" && metaTag != "pageType") {
1431
1440
  this._pageTags.metaTags[metaTag] = this._metaTags[metaTag];
1432
1441
  }
1433
1442
  }
1434
1443
  }
1435
1444
  event.properties = event.properties || {};
1436
- event.properties['pageTags'] = this._pageTags;
1445
+ event.properties["pageTags"] = this._pageTags;
1437
1446
  };
1438
1447
  WebEvent.prototype._getBehavior = function (overrideValues) {
1439
1448
  var behavior;
@@ -1468,28 +1477,28 @@ this.Microsoft = this.Microsoft || {};
1468
1477
  PageAction.prototype.trackPageAction = function (pageActionEvent, properties) {
1469
1478
  var _this = this;
1470
1479
  var ext = {};
1471
- ext['web'] = {};
1480
+ ext["web"] = {};
1472
1481
  var event = {
1473
1482
  name: "Microsoft.ApplicationInsights.{0}.Event",
1474
- baseType: 'EventData',
1483
+ baseType: "EventData",
1475
1484
  ext: ext,
1476
1485
  data: {},
1477
1486
  baseData: {}
1478
1487
  };
1479
- this._populateEventDataIfPresent(event.baseData, 'name', pageActionEvent.name);
1480
- this._populateEventDataIfPresent(event.data, 'baseTypeSource', 'ClickEvent');
1481
- this._populateEventDataIfPresent(event.data, 'uri', pageActionEvent.uri);
1482
- this._populateEventDataIfPresent(event.data, 'pageType', pageActionEvent.pageType);
1483
- this._populateEventDataIfPresent(event.data, 'properties', pageActionEvent.properties);
1484
- this._populateEventDataIfPresent(event.data, 'actionType', pageActionEvent.actionType);
1485
- this._populateEventDataIfPresent(event.data, 'behavior', pageActionEvent.behavior);
1486
- this._populateEventDataIfPresent(event.data, 'clickCoordinates', pageActionEvent.clickCoordinates);
1487
- this._populateEventDataIfPresent(event.data, 'content', pageActionEvent.content);
1488
- this._populateEventDataIfPresent(event.data, 'targetUri', pageActionEvent.targetUri);
1489
- this._populateEventDataIfPresent(event.data, 'timeToAction', pageActionEvent.timeToAction);
1490
- this._populateEventDataIfPresent(event.data, 'refUri', pageActionEvent.refUri);
1491
- this._populateEventDataIfPresent(event.data, 'pageName', pageActionEvent.pageName);
1492
- this._populateEventDataIfPresent(event.data, 'parentId', pageActionEvent.parentId);
1488
+ this._populateEventDataIfPresent(event.baseData, "name", pageActionEvent.name);
1489
+ this._populateEventDataIfPresent(event.data, "baseTypeSource", "ClickEvent");
1490
+ this._populateEventDataIfPresent(event.data, "uri", pageActionEvent.uri);
1491
+ this._populateEventDataIfPresent(event.data, "pageType", pageActionEvent.pageType);
1492
+ this._populateEventDataIfPresent(event.data, "properties", pageActionEvent.properties);
1493
+ this._populateEventDataIfPresent(event.data, "actionType", pageActionEvent.actionType);
1494
+ this._populateEventDataIfPresent(event.data, "behavior", pageActionEvent.behavior);
1495
+ this._populateEventDataIfPresent(event.data, "clickCoordinates", pageActionEvent.clickCoordinates);
1496
+ this._populateEventDataIfPresent(event.data, "content", pageActionEvent.content);
1497
+ this._populateEventDataIfPresent(event.data, "targetUri", pageActionEvent.targetUri);
1498
+ this._populateEventDataIfPresent(event.data, "timeToAction", pageActionEvent.timeToAction);
1499
+ this._populateEventDataIfPresent(event.data, "refUri", pageActionEvent.refUri);
1500
+ this._populateEventDataIfPresent(event.data, "pageName", pageActionEvent.pageName);
1501
+ this._populateEventDataIfPresent(event.data, "parentId", pageActionEvent.parentId);
1493
1502
  if (properties) {
1494
1503
  objForEachKey(properties, function (property, value) {
1495
1504
  if (!event.data[property]) {
@@ -1501,7 +1510,7 @@ this.Microsoft = this.Microsoft || {};
1501
1510
  };
1502
1511
  PageAction.prototype.capturePageAction = function (element, overrideValues, customProperties, isRightClick) {
1503
1512
  overrideValues = !isValueAssigned(overrideValues) ? {} : overrideValues;
1504
- var pageActionEvent = { name: '' };
1513
+ var pageActionEvent = { name: "" };
1505
1514
  var pageActionProperties = isValueAssigned(customProperties) ? customProperties : {};
1506
1515
  this.setCommonProperties(pageActionEvent, overrideValues);
1507
1516
  pageActionEvent.behavior = this._getBehavior(overrideValues);
@@ -1513,7 +1522,7 @@ this.Microsoft = this.Microsoft || {};
1513
1522
  pageActionEvent.targetUri = getClickTarget(element);
1514
1523
  elementContent = this._contentHandler.getElementContent(element);
1515
1524
  if (elementContent.bhvr && !isValueAssigned(overrideValues.behavior)) {
1516
- var currentBehavior = extractFieldFromObject(elementContent, 'bhvr');
1525
+ var currentBehavior = extractFieldFromObject(elementContent, "bhvr");
1517
1526
  pageActionEvent.behavior = this._getValidBehavior(currentBehavior);
1518
1527
  }
1519
1528
  if (!isValueAssigned(elementContent.id) && !isValueAssigned(elementContent.contentName)) {
@@ -1526,7 +1535,7 @@ this.Microsoft = this.Microsoft || {};
1526
1535
  pageActionEvent.actionType = overrideValues.actionType;
1527
1536
  }
1528
1537
  if (isValueAssigned(overrideValues.clickCoordinateX) && isValueAssigned(overrideValues.clickCoordinateY)) {
1529
- pageActionEvent.clickCoordinates = overrideValues.clickCoordinateX + 'X' + overrideValues.clickCoordinateY;
1538
+ pageActionEvent.clickCoordinates = overrideValues.clickCoordinateX + "X" + overrideValues.clickCoordinateY;
1530
1539
  }
1531
1540
  this._sanitizePageActionEventContent(elementContent);
1532
1541
  pageActionEvent.content = bracketIt(JSON.stringify(extend(elementContent, overrideValues && overrideValues.contentTags ? overrideValues.contentTags : {})));
@@ -1574,15 +1583,15 @@ this.Microsoft = this.Microsoft || {};
1574
1583
  }(WebEvent));
1575
1584
 
1576
1585
  var ActionType = {
1577
- CLICKLEFT: 'CL',
1578
- CLICKRIGHT: 'CR',
1579
- CLICKMIDDLE: 'CM',
1580
- SCROLL: 'S',
1581
- ZOOM: 'Z',
1582
- RESIZE: 'R',
1583
- KEYBOARDENTER: 'KE',
1584
- KEYBOARDSPACE: 'KS',
1585
- OTHER: 'O'
1586
+ CLICKLEFT: "CL",
1587
+ CLICKRIGHT: "CR",
1588
+ CLICKMIDDLE: "CM",
1589
+ SCROLL: "S",
1590
+ ZOOM: "Z",
1591
+ RESIZE: "R",
1592
+ KEYBOARDENTER: "KE",
1593
+ KEYBOARDSPACE: "KS",
1594
+ OTHER: "O"
1586
1595
  };
1587
1596
 
1588
1597
  var clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };
@@ -1598,13 +1607,13 @@ this.Microsoft = this.Microsoft || {};
1598
1607
  var win = getWindow();
1599
1608
  var doc = getDocument();
1600
1609
  if (win) {
1601
- var event_1 = (navigator.appVersion.indexOf('MSIE') !== -1) ? 'click' : 'mousedown';
1610
+ var event_1 = (navigator.appVersion.indexOf("MSIE") !== -1) ? "click" : "mousedown";
1602
1611
  attachEvent(win, event_1, function (evt) { _this._processClick(evt); });
1603
- attachEvent(win, 'keyup', function (evt) { _this._processClick(evt); });
1612
+ attachEvent(win, "keyup", function (evt) { _this._processClick(evt); });
1604
1613
  }
1605
1614
  else if (doc) {
1606
- attachEvent(doc, 'click', function (evt) { _this._processClick(evt); });
1607
- attachEvent(doc, 'keyup', function (evt) { _this._processClick(evt); });
1615
+ attachEvent(doc, "click", function (evt) { _this._processClick(evt); });
1616
+ attachEvent(doc, "keyup", function (evt) { _this._processClick(evt); });
1608
1617
  }
1609
1618
  };
1610
1619
  AutoCaptureHandler.prototype.capturePageAction = function (element, overrideValues, customProperties, isRightClick) {
@@ -1654,7 +1663,7 @@ this.Microsoft = this.Microsoft || {};
1654
1663
  continue;
1655
1664
  }
1656
1665
  else {
1657
- var sendEvent = tagNameUpperCased === 'INPUT' ? clickCaptureInputTypes[element.type.toUpperCase()] : true;
1666
+ var sendEvent = tagNameUpperCased === "INPUT" ? clickCaptureInputTypes[element.type.toUpperCase()] : true;
1658
1667
  if (sendEvent) {
1659
1668
  this.capturePageAction(element, overrideValues, {}, isRightClickObj);
1660
1669
  }
@@ -1676,7 +1685,7 @@ this.Microsoft = this.Microsoft || {};
1676
1685
  var metaTags = {};
1677
1686
  if (hasDocument) {
1678
1687
  metaTags = isValueAssigned(this._config.dataTags.metaDataPrefix) ? this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent, this._config.dataTags.metaDataPrefix, false) :
1679
- this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent, '', false);
1688
+ this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent, "", false);
1680
1689
  }
1681
1690
  return metaTags;
1682
1691
  };
@@ -1721,7 +1730,7 @@ this.Microsoft = this.Microsoft || {};
1721
1730
  if (attrib.name.indexOf(dataTagPrefix) !== 0) {
1722
1731
  continue;
1723
1732
  }
1724
- var attribName = attrib.name.replace(dataTagPrefix, '');
1733
+ var attribName = attrib.name.replace(dataTagPrefix, "");
1725
1734
  elementContent[attribName] = attrib.value;
1726
1735
  }
1727
1736
  };
@@ -1742,8 +1751,8 @@ this.Microsoft = this.Microsoft || {};
1742
1751
  if (attrib.name.indexOf(aiBlobAttributeTag) === 0) {
1743
1752
  continue;
1744
1753
  }
1745
- var attribName = attrib.name.replace(dataTagPrefix, '');
1746
- if (elementLevelFlag && attribName === 'id')
1754
+ var attribName = attrib.name.replace(dataTagPrefix, "");
1755
+ if (elementLevelFlag && attribName === "id")
1747
1756
  continue;
1748
1757
  if (!isValueAssigned(elementContent[attribName])) {
1749
1758
  elementContent[attribName] = attrib.value;
@@ -1762,15 +1771,15 @@ this.Microsoft = this.Microsoft || {};
1762
1771
  return elementContent;
1763
1772
  var htmlContent = this._getHtmlIdAndContentName(element);
1764
1773
  elementContent = {
1765
- id: htmlContent.id || '',
1766
- contentName: htmlContent.contentName || ''
1774
+ id: htmlContent.id || "",
1775
+ contentName: htmlContent.contentName || ""
1767
1776
  };
1768
1777
  if (isValueAssigned(parentDataTagPrefix)) {
1769
1778
  this._walkUpDomChainCaptureData(element, elementContent, dataTagPrefix, parentDataTagPrefix, aiBlobAttributeTag);
1770
1779
  }
1771
1780
  if (!elementContent.id && !elementContent.contentName) {
1772
- this._traceLogger.throwInternal(LoggingSeverity.WARNING, _ExtendedInternalMessageId.InvalidContentBlob, 'Invalid content blob. Missing required attributes (id, contentName. ' +
1773
- ' Content information will still be collected!');
1781
+ this._traceLogger.throwInternal(LoggingSeverity.WARNING, _ExtendedInternalMessageId.InvalidContentBlob, "Invalid content blob. Missing required attributes (id, contentName. " +
1782
+ " Content information will still be collected!");
1774
1783
  }
1775
1784
  return elementContent;
1776
1785
  };
@@ -1787,13 +1796,13 @@ this.Microsoft = this.Microsoft || {};
1787
1796
  }
1788
1797
  if (this._config.dataTags.useDefaultContentNameOrId) {
1789
1798
  if (!isValueAssigned(elementContent.id)) {
1790
- elementContent.id = htmlContent.id || '';
1799
+ elementContent.id = htmlContent.id || "";
1791
1800
  }
1792
- elementContent.contentName = htmlContent.contentName || '';
1801
+ elementContent.contentName = htmlContent.contentName || "";
1793
1802
  }
1794
1803
  if (!elementContent.id && !elementContent.contentName) {
1795
- this._traceLogger.throwInternal(LoggingSeverity.WARNING, _ExtendedInternalMessageId.InvalidContentBlob, 'Invalid content blob. Missing required attributes (id, contentName. ' +
1796
- ' Content information will still be collected!');
1804
+ this._traceLogger.throwInternal(LoggingSeverity.WARNING, _ExtendedInternalMessageId.InvalidContentBlob, "Invalid content blob. Missing required attributes (id, contentName. " +
1805
+ " Content information will still be collected!");
1797
1806
  }
1798
1807
  return elementContent;
1799
1808
  };
@@ -1801,12 +1810,12 @@ this.Microsoft = this.Microsoft || {};
1801
1810
  var metaElements;
1802
1811
  var metaData = {};
1803
1812
  if (hasDocument) {
1804
- metaElements = document.querySelectorAll('meta');
1813
+ metaElements = document.querySelectorAll("meta");
1805
1814
  for (var i = 0; i < metaElements.length; i++) {
1806
1815
  var meta = metaElements[i];
1807
1816
  if (meta.name) {
1808
1817
  if (captureAllMetaDataContent || meta.name.indexOf(prefix) === 0) {
1809
- var name_1 = removePrefix ? meta.name.replace(prefix, '') : meta.name;
1818
+ var name_1 = removePrefix ? meta.name.replace(prefix, "") : meta.name;
1810
1819
  metaData[name_1] = meta.content;
1811
1820
  }
1812
1821
  }
@@ -1816,16 +1825,16 @@ this.Microsoft = this.Microsoft || {};
1816
1825
  };
1817
1826
  DomContentHandler.prototype._getDefaultContentName = function (element, useDefaultContentName) {
1818
1827
  if (useDefaultContentName === false || !element.tagName) {
1819
- return '';
1828
+ return "";
1820
1829
  }
1821
1830
  var doc = getDocument() || {};
1822
1831
  var contentName;
1823
1832
  switch (element.tagName) {
1824
- case 'A':
1833
+ case "A":
1825
1834
  contentName = doc.all ? element.innerText || element.innerHTML : element.text || element.innerHTML;
1826
1835
  break;
1827
- case 'IMG':
1828
- case 'AREA':
1836
+ case "IMG":
1837
+ case "AREA":
1829
1838
  contentName = element.alt;
1830
1839
  break;
1831
1840
  default:
@@ -1856,14 +1865,14 @@ this.Microsoft = this.Microsoft || {};
1856
1865
  var defaultContentName = this._getDefaultContentName(element, this._config.dataTags.useDefaultContentNameOrId);
1857
1866
  htmlContent = {
1858
1867
  id: element.id,
1859
- contentName: customizedContentName || defaultContentName || element.getAttribute('alt')
1868
+ contentName: customizedContentName || defaultContentName || element.getAttribute("alt")
1860
1869
  };
1861
1870
  }
1862
1871
  return htmlContent;
1863
1872
  };
1864
1873
  DomContentHandler.prototype._getParentDetails = function (element, elementContent, dataTagPrefix, aiBlobAttributeTag) {
1865
- var parentId = elementContent['parentid'];
1866
- var parentName = elementContent['parentname'];
1874
+ var parentId = elementContent["parentid"];
1875
+ var parentName = elementContent["parentname"];
1867
1876
  var parentInfo = {};
1868
1877
  if (parentId || parentName || !element) {
1869
1878
  return parentInfo;
@@ -1892,12 +1901,12 @@ this.Microsoft = this.Microsoft || {};
1892
1901
  }
1893
1902
  }
1894
1903
  if (parentId) {
1895
- parentInfo['parentid'] = parentId;
1904
+ parentInfo["parentid"] = parentId;
1896
1905
  }
1897
1906
  else {
1898
1907
  var htmlContent = this._getHtmlIdAndContentName(element.parentElement);
1899
- parentInfo['parentid'] = htmlContent.id;
1900
- parentInfo['parentname'] = htmlContent.contentName;
1908
+ parentInfo["parentid"] = htmlContent.id;
1909
+ parentInfo["parentname"] = htmlContent.contentName;
1901
1910
  }
1902
1911
  return parentInfo;
1903
1912
  };
@@ -1908,7 +1917,7 @@ this.Microsoft = this.Microsoft || {};
1908
1917
  __extendsFn(ClickAnalyticsPlugin, _super);
1909
1918
  function ClickAnalyticsPlugin() {
1910
1919
  var _this = _super !== null && _super.apply(this, arguments) || this;
1911
- _this.identifier = 'ClickAnalyticsPlugin';
1920
+ _this.identifier = "ClickAnalyticsPlugin";
1912
1921
  _this.priority = 181;
1913
1922
  return _this;
1914
1923
  }
@@ -1949,7 +1958,7 @@ this.Microsoft = this.Microsoft || {};
1949
1958
  this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _ExtendedInternalMessageId.TrackPageActionEventFailed, "trackPageAction failed, page action event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
1950
1959
  }
1951
1960
  };
1952
- ClickAnalyticsPlugin.Version = "2.7.1-nightly.202110-07";
1961
+ ClickAnalyticsPlugin.Version = "2.7.1-nightly.202110-16";
1953
1962
  return ClickAnalyticsPlugin;
1954
1963
  }(BaseTelemetryPlugin));
1955
1964
 
@@ -1961,4 +1970,4 @@ this.Microsoft = this.Microsoft || {};
1961
1970
  (function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
1962
1971
 
1963
1972
  })(this.Microsoft.ApplicationInsights = this.Microsoft.ApplicationInsights || {});
1964
- //# sourceMappingURL=ai.clck.2.7.1-nightly.202110-07.gbl.js.map
1973
+ //# sourceMappingURL=ai.clck.2.7.1-nightly.202110-16.gbl.js.map