@microsoft/applicationinsights-clickanalytics-js 2.8.0-beta.2203-04 → 2.8.0-beta.2203-05
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.2.8.0-beta.2203-04.cjs.js → ai.clck.2.8.0-beta.2203-05.cjs.js} +81 -12
- package/browser/ai.clck.2.8.0-beta.2203-05.cjs.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.cjs.min.js +6 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.cjs.min.js.map +1 -0
- package/browser/{ai.clck.2.8.0-beta.2203-04.gbl.js → ai.clck.2.8.0-beta.2203-05.gbl.js} +81 -12
- package/browser/ai.clck.2.8.0-beta.2203-05.gbl.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.gbl.min.js +6 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.gbl.min.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.integrity.json +66 -0
- package/browser/{ai.clck.2.8.0-beta.2203-04.js → ai.clck.2.8.0-beta.2203-05.js} +81 -12
- package/browser/ai.clck.2.8.0-beta.2203-05.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.min.js +6 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.min.js.map +1 -0
- package/browser/ai.clck.2.cjs.js +80 -11
- package/browser/ai.clck.2.cjs.js.map +1 -1
- package/browser/ai.clck.2.cjs.min.js +2 -2
- package/browser/ai.clck.2.cjs.min.js.map +1 -1
- package/browser/ai.clck.2.gbl.js +80 -11
- package/browser/ai.clck.2.gbl.js.map +1 -1
- package/browser/ai.clck.2.gbl.min.js +2 -2
- package/browser/ai.clck.2.gbl.min.js.map +1 -1
- package/browser/ai.clck.2.js +80 -11
- package/browser/ai.clck.2.js.map +1 -1
- package/browser/ai.clck.2.min.js +2 -2
- package/browser/ai.clck.2.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.d.ts +1 -1
- package/dist/applicationinsights-clickanalytics-js.js +80 -11
- 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/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 +4 -4
- package/src/ClickAnalyticsPlugin.ts +1 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.cjs.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.cjs.min.js +0 -6
- package/browser/ai.clck.2.8.0-beta.2203-04.cjs.min.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.gbl.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.gbl.min.js +0 -6
- package/browser/ai.clck.2.8.0-beta.2203-04.gbl.min.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.integrity.json +0 -66
- package/browser/ai.clck.2.8.0-beta.2203-04.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.min.js +0 -6
- package/browser/ai.clck.2.8.0-beta.2203-04.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 2.8.0-beta.2203-05
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -338,6 +338,7 @@ var strSetNextPlugin = "setNextPlugin";
|
|
|
338
338
|
var strIsInitialized = "isInitialized";
|
|
339
339
|
var strTeardown = "teardown";
|
|
340
340
|
var strCore = "core";
|
|
341
|
+
var strUpdate = "update";
|
|
341
342
|
var strDisabled = "disabled";
|
|
342
343
|
var strDoTeardown = "_doTeardown";
|
|
343
344
|
|
|
@@ -539,7 +540,7 @@ function createEnumStyle(values) {
|
|
|
539
540
|
});
|
|
540
541
|
return objFreeze(enumClass);
|
|
541
542
|
}
|
|
542
|
-
function objExtend(
|
|
543
|
+
function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
|
|
543
544
|
var theArgs = arguments;
|
|
544
545
|
var extended = theArgs[0] || {};
|
|
545
546
|
var argLen = theArgs.length;
|
|
@@ -859,6 +860,10 @@ var DiagnosticLogger = /** @class */ (function () {
|
|
|
859
860
|
}
|
|
860
861
|
return DiagnosticLogger;
|
|
861
862
|
}());
|
|
863
|
+
function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
|
|
864
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
865
|
+
(logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
|
|
866
|
+
}
|
|
862
867
|
|
|
863
868
|
var strExecutionContextKey = "ctx";
|
|
864
869
|
var PerfEvent = /** @class */ (function () {
|
|
@@ -1185,7 +1190,7 @@ function _createInternalContext(telemetryChain, config, core, startAt) {
|
|
|
1185
1190
|
completeDetails.func.call(completeDetails.self, completeDetails.args);
|
|
1186
1191
|
}
|
|
1187
1192
|
catch (e) {
|
|
1188
|
-
core.logger
|
|
1193
|
+
_throwInternal(core.logger, 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
|
|
1189
1194
|
}
|
|
1190
1195
|
});
|
|
1191
1196
|
_onComplete = [];
|
|
@@ -1284,6 +1289,27 @@ function createProcessTelemetryUnloadContext(telemetryChain, config, core, start
|
|
|
1284
1289
|
context.createNew = _createNew;
|
|
1285
1290
|
return context;
|
|
1286
1291
|
}
|
|
1292
|
+
function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {
|
|
1293
|
+
var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
|
|
1294
|
+
var context = internalContext.ctx;
|
|
1295
|
+
function _processNext(updateState) {
|
|
1296
|
+
return context.iterate(function (plugin) {
|
|
1297
|
+
if (isFunction(plugin[strUpdate])) {
|
|
1298
|
+
plugin[strUpdate](context, updateState);
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
function _createNew(plugins, startAt) {
|
|
1303
|
+
if (plugins === void 0) { plugins = null; }
|
|
1304
|
+
if (isArray(plugins)) {
|
|
1305
|
+
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1306
|
+
}
|
|
1307
|
+
return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);
|
|
1308
|
+
}
|
|
1309
|
+
context.processNext = _processNext;
|
|
1310
|
+
context.createNew = _createNew;
|
|
1311
|
+
return context;
|
|
1312
|
+
}
|
|
1287
1313
|
function createTelemetryProxyChain(plugins, config, core, startAt) {
|
|
1288
1314
|
var firstProxy = null;
|
|
1289
1315
|
var add = startAt ? false : true;
|
|
@@ -1330,6 +1356,7 @@ function createTelemetryPluginProxy(plugin, config, core) {
|
|
|
1330
1356
|
},
|
|
1331
1357
|
processTelemetry: _processTelemetry,
|
|
1332
1358
|
unload: _unloadPlugin,
|
|
1359
|
+
update: _updatePlugin,
|
|
1333
1360
|
_id: chainId,
|
|
1334
1361
|
_setNext: function (nextPlugin) {
|
|
1335
1362
|
nextProxy = nextPlugin;
|
|
@@ -1369,7 +1396,7 @@ function createTelemetryPluginProxy(plugin, config, core) {
|
|
|
1369
1396
|
hasRun = true;
|
|
1370
1397
|
}
|
|
1371
1398
|
if (!nextProxy || !hasNextRun) {
|
|
1372
|
-
itemCtx.diagLog()
|
|
1399
|
+
_throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
|
|
1373
1400
|
}
|
|
1374
1401
|
}
|
|
1375
1402
|
}, details, isAsync);
|
|
@@ -1417,6 +1444,24 @@ function createTelemetryPluginProxy(plugin, config, core) {
|
|
|
1417
1444
|
unloadCtx.processNext(unloadState);
|
|
1418
1445
|
}
|
|
1419
1446
|
}
|
|
1447
|
+
function _updatePlugin(updateCtx, updateState) {
|
|
1448
|
+
function _callUpdate() {
|
|
1449
|
+
var hasRun = false;
|
|
1450
|
+
if (plugin) {
|
|
1451
|
+
var pluginState = _getPluginState(plugin);
|
|
1452
|
+
var pluginCore = plugin[strCore] || pluginState.core;
|
|
1453
|
+
if (plugin && (!pluginCore || pluginCore === updateCtx[strCore]()) && !pluginState[strTeardown]) {
|
|
1454
|
+
if (plugin[strUpdate] && plugin[strUpdate](updateCtx, updateState) === true) {
|
|
1455
|
+
hasRun = true;
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
return hasRun;
|
|
1460
|
+
}
|
|
1461
|
+
if (!_processChain(updateCtx, _callUpdate, "update", function () { }, false)) {
|
|
1462
|
+
updateCtx.processNext(updateState);
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1420
1465
|
return objFreeze(proxyChain);
|
|
1421
1466
|
}
|
|
1422
1467
|
|
|
@@ -1435,7 +1480,7 @@ function createUnloadHandlerContainer() {
|
|
|
1435
1480
|
handler(unloadCtx, unloadState);
|
|
1436
1481
|
}
|
|
1437
1482
|
catch (e) {
|
|
1438
|
-
unloadCtx.diagLog()
|
|
1483
|
+
_throwInternal(unloadCtx.diagLog(), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
|
|
1439
1484
|
}
|
|
1440
1485
|
});
|
|
1441
1486
|
handlers = [];
|
|
@@ -1494,6 +1539,30 @@ var BaseTelemetryPlugin = /** @class */ (function () {
|
|
|
1494
1539
|
}
|
|
1495
1540
|
return result;
|
|
1496
1541
|
};
|
|
1542
|
+
_self.update = function (updateCtx, updateState) {
|
|
1543
|
+
if (!_self.core || (updateCtx && _self.core !== updateCtx.core())) {
|
|
1544
|
+
return;
|
|
1545
|
+
}
|
|
1546
|
+
var result;
|
|
1547
|
+
var updateDone = false;
|
|
1548
|
+
var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
|
|
1549
|
+
var theUpdateState = updateState || {
|
|
1550
|
+
reason: 0
|
|
1551
|
+
};
|
|
1552
|
+
function _updateCallback() {
|
|
1553
|
+
if (!updateDone) {
|
|
1554
|
+
updateDone = true;
|
|
1555
|
+
_setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx.getNext());
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {
|
|
1559
|
+
_updateCallback();
|
|
1560
|
+
}
|
|
1561
|
+
else {
|
|
1562
|
+
result = true;
|
|
1563
|
+
}
|
|
1564
|
+
return result;
|
|
1565
|
+
};
|
|
1497
1566
|
_self._addHook = function (hooks) {
|
|
1498
1567
|
if (hooks) {
|
|
1499
1568
|
if (isArray(hooks)) {
|
|
@@ -1582,12 +1651,12 @@ function _normalizeNamespace(name) {
|
|
|
1582
1651
|
}
|
|
1583
1652
|
return name;
|
|
1584
1653
|
}
|
|
1585
|
-
function _getEvtNamespace(eventName,
|
|
1586
|
-
if (
|
|
1654
|
+
function _getEvtNamespace(eventName, evtNamespace) {
|
|
1655
|
+
if (evtNamespace) {
|
|
1587
1656
|
var theNamespace_1 = "";
|
|
1588
|
-
if (isArray(
|
|
1657
|
+
if (isArray(evtNamespace)) {
|
|
1589
1658
|
theNamespace_1 = "";
|
|
1590
|
-
arrForEach(
|
|
1659
|
+
arrForEach(evtNamespace, function (name) {
|
|
1591
1660
|
name = _normalizeNamespace(name);
|
|
1592
1661
|
if (name) {
|
|
1593
1662
|
if (name[0] !== ".") {
|
|
@@ -1598,7 +1667,7 @@ function _getEvtNamespace(eventName, namespaces) {
|
|
|
1598
1667
|
});
|
|
1599
1668
|
}
|
|
1600
1669
|
else {
|
|
1601
|
-
theNamespace_1 = _normalizeNamespace(
|
|
1670
|
+
theNamespace_1 = _normalizeNamespace(evtNamespace);
|
|
1602
1671
|
}
|
|
1603
1672
|
if (theNamespace_1) {
|
|
1604
1673
|
if (theNamespace_1[0] !== ".") {
|
|
@@ -2607,7 +2676,7 @@ var ClickAnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
2607
2676
|
this.diagLog().throwInternal(LoggingSeverity.CRITICAL, _ExtendedInternalMessageId.TrackPageActionEventFailed, "trackPageAction failed, page action event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
2608
2677
|
}
|
|
2609
2678
|
};
|
|
2610
|
-
ClickAnalyticsPlugin.Version = "2.8.0-beta.2203-
|
|
2679
|
+
ClickAnalyticsPlugin.Version = "2.8.0-beta.2203-05";
|
|
2611
2680
|
return ClickAnalyticsPlugin;
|
|
2612
2681
|
}(BaseTelemetryPlugin));
|
|
2613
2682
|
|
|
@@ -2615,4 +2684,4 @@ exports.BehaviorEnumValidator = BehaviorEnumValidator;
|
|
|
2615
2684
|
exports.BehaviorMapValidator = BehaviorMapValidator;
|
|
2616
2685
|
exports.BehaviorValueValidator = BehaviorValueValidator;
|
|
2617
2686
|
exports.ClickAnalyticsPlugin = ClickAnalyticsPlugin;
|
|
2618
|
-
//# sourceMappingURL=ai.clck.2.8.0-beta.2203-
|
|
2687
|
+
//# sourceMappingURL=ai.clck.2.8.0-beta.2203-05.cjs.js.map
|