@microsoft/applicationinsights-properties-js 3.3.10-nightly3.2507-29 → 3.3.10-nightly3.2508-01
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/es5/{ai.props.3.3.10-nightly3.2507-29.js → ai.props.3.3.10-nightly3.2508-01.cjs.js} +134 -78
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.gbl.js.map → ai.props.3.3.10-nightly3.2508-01.cjs.js.map} +1 -1
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.cjs.min.js → ai.props.3.3.10-nightly3.2508-01.cjs.min.js} +3 -3
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.cjs.min.js.map → ai.props.3.3.10-nightly3.2508-01.cjs.min.js.map} +1 -1
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.gbl.js → ai.props.3.3.10-nightly3.2508-01.gbl.js} +136 -53
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.cjs.js.map → ai.props.3.3.10-nightly3.2508-01.gbl.js.map} +1 -1
- package/browser/es5/ai.props.3.3.10-nightly3.2508-01.gbl.min.js +6 -0
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.gbl.min.js.map → ai.props.3.3.10-nightly3.2508-01.gbl.min.js.map} +1 -1
- package/browser/es5/ai.props.3.3.10-nightly3.2508-01.integrity.json +66 -0
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.cjs.js → ai.props.3.3.10-nightly3.2508-01.js} +161 -51
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.js.map → ai.props.3.3.10-nightly3.2508-01.js.map} +1 -1
- package/browser/es5/ai.props.3.3.10-nightly3.2508-01.min.js +6 -0
- package/browser/es5/{ai.props.3.3.10-nightly3.2507-29.min.js.map → ai.props.3.3.10-nightly3.2508-01.min.js.map} +1 -1
- package/browser/es5/ai.props.3.cjs.js +133 -50
- package/browser/es5/ai.props.3.cjs.js.map +1 -1
- package/browser/es5/ai.props.3.cjs.min.js +2 -2
- package/browser/es5/ai.props.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.props.3.gbl.js +135 -52
- package/browser/es5/ai.props.3.gbl.js.map +1 -1
- package/browser/es5/ai.props.3.gbl.min.js +2 -2
- package/browser/es5/ai.props.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.props.3.integrity.json +25 -25
- package/browser/es5/ai.props.3.js +135 -52
- package/browser/es5/ai.props.3.js.map +1 -1
- package/browser/es5/ai.props.3.min.js +2 -2
- package/browser/es5/ai.props.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-properties-js.js +133 -50
- package/dist/es5/applicationinsights-properties-js.js.map +1 -1
- package/dist/es5/applicationinsights-properties-js.min.js +2 -2
- package/dist/es5/applicationinsights-properties-js.min.js.map +1 -1
- package/dist-es5/Context/Application.js +1 -1
- package/dist-es5/Context/Device.js +1 -1
- package/dist-es5/Context/Internal.js +2 -2
- package/dist-es5/Context/Internal.js.map +1 -1
- package/dist-es5/Context/Location.js +1 -1
- package/dist-es5/Context/Session.js +1 -1
- package/dist-es5/Context/TelemetryTrace.js +1 -1
- package/dist-es5/Context/User.js +1 -1
- package/dist-es5/Interfaces/IPropTelemetryContext.js +1 -1
- package/dist-es5/Interfaces/IPropertiesConfig.js +1 -1
- package/dist-es5/PropertiesPlugin.js +1 -1
- package/dist-es5/TelemetryContext.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-properties-js.js +1 -1
- package/package.json +3 -3
- package/types/applicationinsights-properties-js.d.ts +1 -1
- package/types/applicationinsights-properties-js.namespaced.d.ts +9 -1
- package/browser/es5/ai.props.3.3.10-nightly3.2507-29.gbl.min.js +0 -6
- package/browser/es5/ai.props.3.3.10-nightly3.2507-29.integrity.json +0 -66
- package/browser/es5/ai.props.3.3.10-nightly3.2507-29.min.js +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Properties Plugin, 3.3.10-nightly3.
|
|
2
|
+
* Application Insights JavaScript SDK - Properties Plugin, 3.3.10-nightly3.2508-01
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -1523,7 +1523,7 @@ function newId(maxLength) {
|
|
|
1523
1523
|
return result;
|
|
1524
1524
|
}
|
|
1525
1525
|
|
|
1526
|
-
var version = '3.3.10-nightly3.
|
|
1526
|
+
var version = '3.3.10-nightly3.2508-01';
|
|
1527
1527
|
var instanceName = "." + newId(6);
|
|
1528
1528
|
var _dataUid = 0;
|
|
1529
1529
|
function _canAcceptData(target) {
|
|
@@ -2418,6 +2418,7 @@ var rootDefaultConfig = (_a$2 = {
|
|
|
2418
2418
|
_b.enabled = UNDEFINED_VALUE,
|
|
2419
2419
|
_b.ignoreCookies = UNDEFINED_VALUE,
|
|
2420
2420
|
_b.blockedCookies = UNDEFINED_VALUE,
|
|
2421
|
+
_b.disableCookieDefer = false,
|
|
2421
2422
|
_b)),
|
|
2422
2423
|
cookieDomain: UNDEFINED_VALUE,
|
|
2423
2424
|
cookiePath: UNDEFINED_VALUE
|
|
@@ -2497,16 +2498,99 @@ function createCookieMgr(rootConfig, logger) {
|
|
|
2497
2498
|
var _getCookieFn;
|
|
2498
2499
|
var _setCookieFn;
|
|
2499
2500
|
var _delCookieFn;
|
|
2501
|
+
var _pendingCookies = [];
|
|
2502
|
+
function _formatDeletionValue(path) {
|
|
2503
|
+
var _a;
|
|
2504
|
+
var values = (_a = {},
|
|
2505
|
+
_a[STR_PATH] = path ? path : "/",
|
|
2506
|
+
_a[strExpires] = "Thu, 01 Jan 1970 00:00:01 GMT",
|
|
2507
|
+
_a);
|
|
2508
|
+
if (!isIE()) {
|
|
2509
|
+
values["max-age"] = "0";
|
|
2510
|
+
}
|
|
2511
|
+
return _formatCookieValue(STR_EMPTY, values);
|
|
2512
|
+
}
|
|
2513
|
+
function _formatSetCookieValue(value, maxAgeSec, domain, path) {
|
|
2514
|
+
var values = {};
|
|
2515
|
+
var theValue = strTrim(value || STR_EMPTY);
|
|
2516
|
+
var idx = strIndexOf(theValue, ";");
|
|
2517
|
+
if (idx !== -1) {
|
|
2518
|
+
theValue = strTrim(strLeft(value, idx));
|
|
2519
|
+
values = _extractParts(strSubstring(value, idx + 1));
|
|
2520
|
+
}
|
|
2521
|
+
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
2522
|
+
if (!isNullOrUndefined(maxAgeSec)) {
|
|
2523
|
+
var _isIE = isIE();
|
|
2524
|
+
if (isUndefined(values[strExpires])) {
|
|
2525
|
+
var nowMs = utcNow();
|
|
2526
|
+
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
2527
|
+
if (expireMs > 0) {
|
|
2528
|
+
var expiry = new Date();
|
|
2529
|
+
expiry.setTime(expireMs);
|
|
2530
|
+
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY, isTruthy);
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
if (!_isIE) {
|
|
2534
|
+
setValue(values, "max-age", STR_EMPTY + maxAgeSec, null, isUndefined);
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
var location = getLocation();
|
|
2538
|
+
if (location && location.protocol === "https:") {
|
|
2539
|
+
setValue(values, "secure", null, null, isUndefined);
|
|
2540
|
+
if (_allowUaSameSite === null) {
|
|
2541
|
+
_allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})[_DYN_USER_AGENT ]);
|
|
2542
|
+
}
|
|
2543
|
+
if (_allowUaSameSite) {
|
|
2544
|
+
setValue(values, "SameSite", "None", null, isUndefined);
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
setValue(values, STR_PATH, path || _path, null, isUndefined);
|
|
2548
|
+
return _formatCookieValue(theValue, values);
|
|
2549
|
+
}
|
|
2550
|
+
function _removePendingCookie(name) {
|
|
2551
|
+
if (_pendingCookies) {
|
|
2552
|
+
for (var i = _pendingCookies[_DYN_LENGTH$1 ] - 1; i >= 0; i--) {
|
|
2553
|
+
if (_pendingCookies[i].n === name) {
|
|
2554
|
+
_pendingCookies[_DYN_SPLICE ](i, 1);
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
function _flushPendingCookies() {
|
|
2560
|
+
if (areCookiesSupported(logger) && _pendingCookies) {
|
|
2561
|
+
arrForEach(_pendingCookies, function (pendingData) {
|
|
2562
|
+
if (!_isBlockedCookie(cookieMgrConfig, pendingData.n)) {
|
|
2563
|
+
if (pendingData.o === 0 ) {
|
|
2564
|
+
_setCookieFn(pendingData.n, pendingData.v);
|
|
2565
|
+
}
|
|
2566
|
+
else if (pendingData.o === 1 ) {
|
|
2567
|
+
_delCookieFn(pendingData.n, pendingData.v);
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
});
|
|
2571
|
+
_pendingCookies = [];
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2500
2574
|
rootConfig = createDynamicConfig(rootConfig || _globalCookieConfig, null, logger).cfg;
|
|
2501
2575
|
unloadHandler = onConfigChange(rootConfig, function (details) {
|
|
2502
2576
|
details.setDf(details.cfg, rootDefaultConfig);
|
|
2503
2577
|
cookieMgrConfig = details.ref(details.cfg, "cookieCfg");
|
|
2504
2578
|
_path = cookieMgrConfig[STR_PATH ] || "/";
|
|
2505
2579
|
_domain = cookieMgrConfig[STR_DOMAIN ];
|
|
2580
|
+
if (cookieMgrConfig.disableCookieDefer) {
|
|
2581
|
+
_pendingCookies = null;
|
|
2582
|
+
}
|
|
2583
|
+
else if (_pendingCookies === null) {
|
|
2584
|
+
_pendingCookies = [];
|
|
2585
|
+
}
|
|
2586
|
+
var wasEnabled = _enabled;
|
|
2506
2587
|
_enabled = _isCfgEnabled(rootConfig, cookieMgrConfig) !== false;
|
|
2507
2588
|
_getCookieFn = cookieMgrConfig.getCookie || _getCookieValue;
|
|
2508
2589
|
_setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;
|
|
2509
2590
|
_delCookieFn = cookieMgrConfig.delCookie || _setCookieValue;
|
|
2591
|
+
if (!wasEnabled && _enabled && _pendingCookies) {
|
|
2592
|
+
_flushPendingCookies();
|
|
2593
|
+
}
|
|
2510
2594
|
}, logger);
|
|
2511
2595
|
var cookieMgr = {
|
|
2512
2596
|
isEnabled: function () {
|
|
@@ -2518,55 +2602,52 @@ function createCookieMgr(rootConfig, logger) {
|
|
|
2518
2602
|
return enabled;
|
|
2519
2603
|
},
|
|
2520
2604
|
setEnabled: function (value) {
|
|
2521
|
-
_enabled = value !== false;
|
|
2522
2605
|
cookieMgrConfig[_DYN_ENABLED ] = value;
|
|
2606
|
+
if (!isUndefined(rootConfig[strDisableCookiesUsage])) {
|
|
2607
|
+
rootConfig[strDisableCookiesUsage] = !value;
|
|
2608
|
+
}
|
|
2523
2609
|
},
|
|
2524
2610
|
set: function (name, value, maxAgeSec, domain, path) {
|
|
2525
2611
|
var result = false;
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
var
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
values = _extractParts(strSubstring(value, idx + 1));
|
|
2533
|
-
}
|
|
2534
|
-
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
2535
|
-
if (!isNullOrUndefined(maxAgeSec)) {
|
|
2536
|
-
var _isIE = isIE();
|
|
2537
|
-
if (isUndefined(values[strExpires])) {
|
|
2538
|
-
var nowMs = utcNow();
|
|
2539
|
-
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
2540
|
-
if (expireMs > 0) {
|
|
2541
|
-
var expiry = new Date();
|
|
2542
|
-
expiry.setTime(expireMs);
|
|
2543
|
-
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY, isTruthy);
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
if (!_isIE) {
|
|
2547
|
-
setValue(values, "max-age", STR_EMPTY + maxAgeSec, null, isUndefined);
|
|
2548
|
-
}
|
|
2612
|
+
var isBlocked = _isBlockedCookie(cookieMgrConfig, name);
|
|
2613
|
+
if (!isBlocked) {
|
|
2614
|
+
var cookieValue = _formatSetCookieValue(value, maxAgeSec, domain, path);
|
|
2615
|
+
if (_isMgrEnabled(cookieMgr)) {
|
|
2616
|
+
_setCookieFn(name, cookieValue);
|
|
2617
|
+
result = true;
|
|
2549
2618
|
}
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
}
|
|
2619
|
+
else if (_pendingCookies) {
|
|
2620
|
+
_removePendingCookie(name);
|
|
2621
|
+
_pendingCookies[_DYN_PUSH ]({
|
|
2622
|
+
n: name,
|
|
2623
|
+
o: 0 ,
|
|
2624
|
+
v: cookieValue
|
|
2625
|
+
});
|
|
2626
|
+
result = true;
|
|
2559
2627
|
}
|
|
2560
|
-
setValue(values, STR_PATH, path || _path, null, isUndefined);
|
|
2561
|
-
_setCookieFn(name, _formatCookieValue(theValue, values));
|
|
2562
|
-
result = true;
|
|
2563
2628
|
}
|
|
2564
2629
|
return result;
|
|
2565
2630
|
},
|
|
2566
2631
|
get: function (name) {
|
|
2567
2632
|
var value = STR_EMPTY;
|
|
2568
|
-
|
|
2569
|
-
|
|
2633
|
+
var isIgnored = _isIgnoredCookie(cookieMgrConfig, name);
|
|
2634
|
+
if (!isIgnored) {
|
|
2635
|
+
if (_isMgrEnabled(cookieMgr)) {
|
|
2636
|
+
value = _getCookieFn(name);
|
|
2637
|
+
}
|
|
2638
|
+
else if (_pendingCookies) {
|
|
2639
|
+
for (var i = _pendingCookies[_DYN_LENGTH$1 ] - 1; i >= 0; i--) {
|
|
2640
|
+
var pendingData = _pendingCookies[i];
|
|
2641
|
+
if (pendingData.n === name) {
|
|
2642
|
+
if (pendingData.o === 0 ) {
|
|
2643
|
+
var cookieValue = pendingData.v;
|
|
2644
|
+
var idx = strIndexOf(cookieValue, ";");
|
|
2645
|
+
value = idx !== -1 ? strTrim(strLeft(cookieValue, idx)) : strTrim(cookieValue);
|
|
2646
|
+
}
|
|
2647
|
+
break;
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2570
2651
|
}
|
|
2571
2652
|
return value;
|
|
2572
2653
|
},
|
|
@@ -2575,20 +2656,21 @@ function createCookieMgr(rootConfig, logger) {
|
|
|
2575
2656
|
if (_isMgrEnabled(cookieMgr)) {
|
|
2576
2657
|
result = cookieMgr.purge(name, path);
|
|
2577
2658
|
}
|
|
2659
|
+
else if (_pendingCookies) {
|
|
2660
|
+
_removePendingCookie(name);
|
|
2661
|
+
_pendingCookies[_DYN_PUSH ]({
|
|
2662
|
+
n: name,
|
|
2663
|
+
o: 1 ,
|
|
2664
|
+
v: _formatDeletionValue(path)
|
|
2665
|
+
});
|
|
2666
|
+
result = true;
|
|
2667
|
+
}
|
|
2578
2668
|
return result;
|
|
2579
2669
|
},
|
|
2580
2670
|
purge: function (name, path) {
|
|
2581
|
-
var _a;
|
|
2582
2671
|
var result = false;
|
|
2583
2672
|
if (areCookiesSupported(logger)) {
|
|
2584
|
-
|
|
2585
|
-
_a[STR_PATH] = path ? path : "/",
|
|
2586
|
-
_a[strExpires] = "Thu, 01 Jan 1970 00:00:01 GMT",
|
|
2587
|
-
_a);
|
|
2588
|
-
if (!isIE()) {
|
|
2589
|
-
values["max-age"] = "0";
|
|
2590
|
-
}
|
|
2591
|
-
_delCookieFn(name, _formatCookieValue(STR_EMPTY, values));
|
|
2673
|
+
_delCookieFn(name, _formatDeletionValue(path));
|
|
2592
2674
|
result = true;
|
|
2593
2675
|
}
|
|
2594
2676
|
return result;
|
|
@@ -2596,6 +2678,7 @@ function createCookieMgr(rootConfig, logger) {
|
|
|
2596
2678
|
unload: function (isAsync) {
|
|
2597
2679
|
unloadHandler && unloadHandler.rm();
|
|
2598
2680
|
unloadHandler = null;
|
|
2681
|
+
_pendingCookies = null;
|
|
2599
2682
|
}
|
|
2600
2683
|
};
|
|
2601
2684
|
cookieMgr[strConfigCookieMgr] = cookieMgr;
|
|
@@ -3770,7 +3853,7 @@ var Device = /** @class */ (function () {
|
|
|
3770
3853
|
return Device;
|
|
3771
3854
|
}());
|
|
3772
3855
|
|
|
3773
|
-
var Version = '3.3.10-nightly3.
|
|
3856
|
+
var Version = '3.3.10-nightly3.2508-01';
|
|
3774
3857
|
var Internal = /** @class */ (function () {
|
|
3775
3858
|
function Internal(config, unloadHookContainer) {
|
|
3776
3859
|
var _this = this;
|