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