@equinor/subsurface-app-management 3.1.1 → 3.1.2
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 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as i,useEffect as n,useCallback as t}from"react";import{ClickAnalyticsPlugin as o}from"@microsoft/applicationinsights-clickanalytics-js";import{ReactPlugin as r,AppInsightsContext as s}from"@microsoft/applicationinsights-react-js";import{ApplicationInsights as a}from"@microsoft/applicationinsights-web";import{getApplicationInsightsInstrumentationKey as c}from"../utils/environment.js";import{l as m}from"../_virtual/lodash.js";const d=new r,p=new o,l={autoCapture:!0,dropInvalidEvents:!0},w=12e5,u=({children:o})=>{const r=i(new a({config:{connectionString:c(import.meta.env.VITE_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY),extensions:[d,p],extensionConfig:{[p.identifier]:l},autoTrackPageVisitTime:!0,enableAutoRouteTracking:!0,sessionRenewalMs:w,sessionExpirationMs:w}})),u=i(!1);n((()=>{u.current||(u.current=!0,r.current.loadAppInsights())}),[]);const f=t(m.debounce((()=>{r.current.trackEvent({name:"Resolution",properties:{"Window Resolution":window.innerWidth+"x"+window.innerHeight,"Screen Resolution":screen.width+"x"+screen.height}})}),5e3),[]);return n((()=>(window.addEventListener("load",f),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f),window.removeEventListener("load",f)})),[f]),e(s,{value:d,children:o})};export{u as ApplicationInsightsProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/subsurface-app-management",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "React Typescript components/hooks to communicate with equinor/sam",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"@equinor/eds-icons": "*",
|
|
110
110
|
"@tanstack/react-query": "*",
|
|
111
111
|
"framer-motion": "*",
|
|
112
|
-
"react": "^
|
|
113
|
-
"react-dom": "^
|
|
112
|
+
"react": "^19.0.0",
|
|
113
|
+
"react-dom": "^19.0.0",
|
|
114
114
|
"react-router": "^6.11.1",
|
|
115
115
|
"react-router-dom": "^6.11.1",
|
|
116
116
|
"styled-components": "^6.1.8"
|