@microsoft/applicationinsights-react-js 3.3.0-nightly.2204-04 → 3.3.0-nightly.2204-07

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.3.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - React Plugin, 3.3.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -683,6 +683,16 @@
683
683
  function _doNothing(value) {
684
684
  return value;
685
685
  }
686
+ function deepFreeze(obj) {
687
+ if (_objFreeze) {
688
+ objForEachKey(obj, function (name, value) {
689
+ if (isArray(value) || isObject(value)) {
690
+ _objFreeze(value);
691
+ }
692
+ });
693
+ }
694
+ return objFreeze(obj);
695
+ }
686
696
  var objFreeze = _objFreeze || _doNothing;
687
697
  function dateNow() {
688
698
  var dt = Date;
@@ -708,9 +718,6 @@
708
718
  function isTruthy(value) {
709
719
  return !!value;
710
720
  }
711
- function throwError(message) {
712
- throw new Error(message);
713
- }
714
721
  function _createProxyFunction(source, funcName) {
715
722
  var srcFunc = null;
716
723
  var src = null;
@@ -731,15 +738,13 @@
731
738
  };
732
739
  }
733
740
  function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
734
- if (overwriteTarget === void 0) { overwriteTarget = true; }
735
741
  if (target && name && source) {
736
- if (overwriteTarget || isUndefined(target[name])) {
742
+ if (overwriteTarget !== false || isUndefined(target[name])) {
737
743
  target[name] = _createProxyFunction(source, theFunc);
738
744
  }
739
745
  }
740
746
  }
741
747
  function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
742
- if (overwriteTarget === void 0) { overwriteTarget = true; }
743
748
  if (target && source && isObject(target) && isArray(functionsToProxy)) {
744
749
  arrForEach(functionsToProxy, function (theFuncName) {
745
750
  if (isString(theFuncName)) {
@@ -749,17 +754,6 @@
749
754
  }
750
755
  return target;
751
756
  }
752
- function createEnumStyle(values) {
753
- var enumClass = {};
754
- objForEachKey(values, function (field, value) {
755
- enumClass[field] = value;
756
- if (!isUndefined(enumClass[value])) {
757
- throwError("[" + value + "] exists for " + field);
758
- }
759
- enumClass[value] = field;
760
- });
761
- return objFreeze(enumClass);
762
- }
763
757
  function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
764
758
  var theArgs = arguments;
765
759
  var extended = theArgs[0] || {};
@@ -805,6 +799,15 @@
805
799
  return extended;
806
800
  }
807
801
 
802
+ function createEnumStyle(values) {
803
+ var enumClass = {};
804
+ objForEachKey(values, function (field, value) {
805
+ enumClass[field] = value;
806
+ enumClass[value] = field;
807
+ });
808
+ return deepFreeze(enumClass);
809
+ }
810
+
808
811
  var strWindow = "window";
809
812
  var strDocument = "document";
810
813
  var strNavigator = "navigator";
@@ -1280,7 +1283,7 @@
1280
1283
  }
1281
1284
 
1282
1285
  var _objDefineProperty = ObjDefineProperty;
1283
- var version = "2.8.0-nightly.2204-04";
1286
+ var version = "2.8.0-nightly.2204-07";
1284
1287
  var instanceName = "." + newId(6);
1285
1288
  var _dataUid = 0;
1286
1289
  function _createAccessor(target, prop, value) {
@@ -2327,95 +2330,6 @@
2327
2330
  _legacyCookieMgr().setEnabled(false);
2328
2331
  }
2329
2332
 
2330
- var LoggingSeverity = createEnumStyle({
2331
- CRITICAL: 1 ,
2332
- WARNING: 2
2333
- });
2334
- var _InternalMessageId = createEnumStyle({
2335
- BrowserDoesNotSupportLocalStorage: 0 ,
2336
- BrowserCannotReadLocalStorage: 1 ,
2337
- BrowserCannotReadSessionStorage: 2 ,
2338
- BrowserCannotWriteLocalStorage: 3 ,
2339
- BrowserCannotWriteSessionStorage: 4 ,
2340
- BrowserFailedRemovalFromLocalStorage: 5 ,
2341
- BrowserFailedRemovalFromSessionStorage: 6 ,
2342
- CannotSendEmptyTelemetry: 7 ,
2343
- ClientPerformanceMathError: 8 ,
2344
- ErrorParsingAISessionCookie: 9 ,
2345
- ErrorPVCalc: 10 ,
2346
- ExceptionWhileLoggingError: 11 ,
2347
- FailedAddingTelemetryToBuffer: 12 ,
2348
- FailedMonitorAjaxAbort: 13 ,
2349
- FailedMonitorAjaxDur: 14 ,
2350
- FailedMonitorAjaxOpen: 15 ,
2351
- FailedMonitorAjaxRSC: 16 ,
2352
- FailedMonitorAjaxSend: 17 ,
2353
- FailedMonitorAjaxGetCorrelationHeader: 18 ,
2354
- FailedToAddHandlerForOnBeforeUnload: 19 ,
2355
- FailedToSendQueuedTelemetry: 20 ,
2356
- FailedToReportDataLoss: 21 ,
2357
- FlushFailed: 22 ,
2358
- MessageLimitPerPVExceeded: 23 ,
2359
- MissingRequiredFieldSpecification: 24 ,
2360
- NavigationTimingNotSupported: 25 ,
2361
- OnError: 26 ,
2362
- SessionRenewalDateIsZero: 27 ,
2363
- SenderNotInitialized: 28 ,
2364
- StartTrackEventFailed: 29 ,
2365
- StopTrackEventFailed: 30 ,
2366
- StartTrackFailed: 31 ,
2367
- StopTrackFailed: 32 ,
2368
- TelemetrySampledAndNotSent: 33 ,
2369
- TrackEventFailed: 34 ,
2370
- TrackExceptionFailed: 35 ,
2371
- TrackMetricFailed: 36 ,
2372
- TrackPVFailed: 37 ,
2373
- TrackPVFailedCalc: 38 ,
2374
- TrackTraceFailed: 39 ,
2375
- TransmissionFailed: 40 ,
2376
- FailedToSetStorageBuffer: 41 ,
2377
- FailedToRestoreStorageBuffer: 42 ,
2378
- InvalidBackendResponse: 43 ,
2379
- FailedToFixDepricatedValues: 44 ,
2380
- InvalidDurationValue: 45 ,
2381
- TelemetryEnvelopeInvalid: 46 ,
2382
- CreateEnvelopeError: 47 ,
2383
- CannotSerializeObject: 48 ,
2384
- CannotSerializeObjectNonSerializable: 49 ,
2385
- CircularReferenceDetected: 50 ,
2386
- ClearAuthContextFailed: 51 ,
2387
- ExceptionTruncated: 52 ,
2388
- IllegalCharsInName: 53 ,
2389
- ItemNotInArray: 54 ,
2390
- MaxAjaxPerPVExceeded: 55 ,
2391
- MessageTruncated: 56 ,
2392
- NameTooLong: 57 ,
2393
- SampleRateOutOfRange: 58 ,
2394
- SetAuthContextFailed: 59 ,
2395
- SetAuthContextFailedAccountName: 60 ,
2396
- StringValueTooLong: 61 ,
2397
- StartCalledMoreThanOnce: 62 ,
2398
- StopCalledWithoutStart: 63 ,
2399
- TelemetryInitializerFailed: 64 ,
2400
- TrackArgumentsNotSpecified: 65 ,
2401
- UrlTooLong: 66 ,
2402
- SessionStorageBufferFull: 67 ,
2403
- CannotAccessCookie: 68 ,
2404
- IdTooLong: 69 ,
2405
- InvalidEvent: 70 ,
2406
- FailedMonitorAjaxSetRequestHeader: 71 ,
2407
- SendBrowserInfoOnUserInit: 72 ,
2408
- PluginException: 73 ,
2409
- NotificationException: 74 ,
2410
- SnippetScriptLoadFailure: 99 ,
2411
- InvalidInstrumentationKey: 100 ,
2412
- CannotParseAiBlobValue: 101 ,
2413
- InvalidContentBlob: 102 ,
2414
- TrackPageActionEventFailed: 103 ,
2415
- FailedAddingCustomDefinedRequestContext: 104 ,
2416
- InMemoryStorageBufferFull: 105
2417
- });
2418
-
2419
2333
  var ReactPlugin = /** @class */ (function (_super) {
2420
2334
  __extendsFn(ReactPlugin, _super);
2421
2335
  function ReactPlugin() {
@@ -2479,7 +2393,7 @@
2479
2393
  }
2480
2394
  function _getAnalytics() {
2481
2395
  if (!_analyticsPlugin) {
2482
- _self.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, "Analytics plugin is not available, React plugin telemetry will not be sent: ");
2396
+ _throwInternal(_self.diagLog(), 1 , 64 , "Analytics plugin is not available, React plugin telemetry will not be sent: ");
2483
2397
  }
2484
2398
  return _analyticsPlugin;
2485
2399
  }
@@ -2590,14 +2504,13 @@
2590
2504
  }(React__namespace.Component));
2591
2505
  }
2592
2506
 
2593
- var SeverityLevel;
2594
- (function (SeverityLevel) {
2595
- SeverityLevel[SeverityLevel["Verbose"] = 0] = "Verbose";
2596
- SeverityLevel[SeverityLevel["Information"] = 1] = "Information";
2597
- SeverityLevel[SeverityLevel["Warning"] = 2] = "Warning";
2598
- SeverityLevel[SeverityLevel["Error"] = 3] = "Error";
2599
- SeverityLevel[SeverityLevel["Critical"] = 4] = "Critical";
2600
- })(SeverityLevel || (SeverityLevel = {}));
2507
+ var SeverityLevel = createEnumStyle({
2508
+ Verbose: 0 ,
2509
+ Information: 1 ,
2510
+ Warning: 2 ,
2511
+ Error: 3 ,
2512
+ Critical: 4
2513
+ });
2601
2514
 
2602
2515
  var AppInsightsErrorBoundary = /** @class */ (function (_super) {
2603
2516
  __extendsFn(AppInsightsErrorBoundary, _super);