@snokam/application-insights 1.2.12 → 1.2.14

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.2.14](https://github.com/snokam/components/compare/@snokam/application-insights@1.2.13...@snokam/application-insights@1.2.14) (2025-02-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add null check ([aefdf5f](https://github.com/snokam/components/commit/aefdf5fa39abcc3ff7a0301b6755181c0ffe344c))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.2.13](https://github.com/snokam/components/compare/@snokam/application-insights@1.2.12...@snokam/application-insights@1.2.13) (2025-02-28)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * use compat router ([517435f](https://github.com/snokam/components/commit/517435f5dc0549ec52ff85af813fc8863c231f3f))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.2.12](https://github.com/snokam/components/compare/@snokam/application-insights@1.2.11...@snokam/application-insights@1.2.12) (2025-02-15)
7
29
 
8
30
  **Note:** Version bump only for package @snokam/application-insights
package/lib/Provider.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Provider:()=>c,default:()=>a});const r=require("react/jsx-runtime"),n=require("next/router"),o=require("react"),i=require("history"),s=require("@microsoft/applicationinsights-react-js"),u=require("@microsoft/applicationinsights-web"),c=({children:e,config:t})=>{const c=(0,n.useRouter)(),a=(0,o.useRef)(!1),f=(0,o.useRef)(new s.ReactPlugin),l=(0,o.useRef)(null),d="undefined"!=typeof window?(0,i.createBrowserHistory)():void 0;return(0,o.useEffect)((()=>{l.current||(l.current=new u.ApplicationInsights({config:Object.assign({maxBatchSizeInBytes:1e4,maxBatchInterval:15e3,enableAutoRouteTracking:!0,extensions:[f.current],extensionConfig:{[f.current.identifier]:{history:d}}},t)}),l.current.loadAppInsights(),l.current.addTelemetryInitializer((e=>{const t=e.baseType||"",r=(e.baseData||{}).target||"",n="RemoteDependencyData"===t,o=r.includes("mux.com")||r.includes("litix.io");if(n&&o)return!1})),a.current=!0)}),[t]),(0,o.useEffect)((()=>{const e=e=>{var t;null===(t=l.current)||void 0===t||t.trackPageView({name:e})};return c.events.on("routeChangeComplete",e),()=>{c.events.off("routeChangeComplete",e)}}),[c.events]),(0,r.jsx)(s.AppInsightsContext.Provider,{value:f.current,children:e})},a=c;return t})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Provider:()=>a,default:()=>c});const r=require("react/jsx-runtime"),n=require("next/compat/router"),o=require("react"),i=require("history"),u=require("@microsoft/applicationinsights-react-js"),s=require("@microsoft/applicationinsights-web"),a=({children:e,config:t})=>{const a=(0,n.useRouter)(),c=(0,o.useRef)(!1),l=(0,o.useRef)(new u.ReactPlugin),d=(0,o.useRef)(null),f="undefined"!=typeof window?(0,i.createBrowserHistory)():void 0;return(0,o.useEffect)((()=>{d.current||(d.current=new s.ApplicationInsights({config:Object.assign({maxBatchSizeInBytes:1e4,maxBatchInterval:15e3,enableAutoRouteTracking:!0,extensions:[l.current],extensionConfig:{[l.current.identifier]:{history:f}}},t)}),d.current.loadAppInsights(),d.current.addTelemetryInitializer((e=>{const t=e.baseType||"",r=(e.baseData||{}).target||"",n="RemoteDependencyData"===t,o=r.includes("mux.com")||r.includes("litix.io");if(n&&o)return!1})),c.current=!0)}),[t]),(0,o.useEffect)((()=>{var e;const t=e=>{var t;null===(t=d.current)||void 0===t||t.trackPageView({name:e})};return null===(e=a.events)||void 0===e||e.on("routeChangeComplete",t),()=>{var e;null===(e=a.events)||void 0===e||e.off("routeChangeComplete",t)}}),[a.events]),(0,r.jsx)(u.AppInsightsContext.Provider,{value:l.current,children:e})},c=a;return t})()));
2
2
  //# sourceMappingURL=Provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV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CAC9D,GACF,CAAC/B,EAAOoC,UACH,SAAK,EAAAG,mBAAmB1C,SAAU,CAAEF,MAAOS,EAAeQ,QAASd,SAAUA,GAAY,EAErG,I","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/external commonjs \"react/jsx-runtime\"","webpack://snokam/external commonjs \"next/router\"","webpack://snokam/external commonjs \"react\"","webpack://snokam/external commonjs \"history\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-react-js\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-web\"","webpack://snokam/./src/Provider.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"next/router\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"history\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-react-js\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-web\");","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useRef } from \"react\";\nimport { createBrowserHistory } from \"history\";\nimport { AppInsightsContext, ReactPlugin, } from \"@microsoft/applicationinsights-react-js\";\nimport { ApplicationInsights, } from \"@microsoft/applicationinsights-web\";\nexport const Provider = ({ children, config }) => {\n const router = useRouter();\n const isAppInsightsLoaded = useRef(false);\n const reactPluginRef = useRef(new ReactPlugin());\n const appInsightsRef = useRef(null);\n const isBrowser = typeof window !== \"undefined\";\n const browserHistory = isBrowser ? createBrowserHistory() : undefined;\n useEffect(() => {\n if (!appInsightsRef.current) {\n appInsightsRef.current = new ApplicationInsights({\n config: Object.assign({ maxBatchSizeInBytes: 10000, maxBatchInterval: 15000, enableAutoRouteTracking: true, extensions: [reactPluginRef.current], extensionConfig: {\n [reactPluginRef.current.identifier]: { history: browserHistory },\n } }, config),\n });\n // Load Application Insights\n appInsightsRef.current.loadAppInsights();\n // Filter out telemetry from specific domains\n appInsightsRef.current.addTelemetryInitializer((envelope) => {\n const baseType = envelope.baseType || \"\";\n const telemetryItem = envelope.baseData || {};\n const target = telemetryItem.target || \"\";\n const isDependencyData = baseType === \"RemoteDependencyData\";\n // Video chunk telemetry\n const isVideo = target.includes(\"mux.com\") || target.includes(\"litix.io\");\n if (isDependencyData && isVideo) {\n return false;\n }\n });\n isAppInsightsLoaded.current = true;\n }\n }, [config]);\n useEffect(() => {\n const handleRouteChange = (url) => {\n var _a;\n (_a = appInsightsRef.current) === null || _a === void 0 ? void 0 : _a.trackPageView({ name: url });\n };\n router.events.on(\"routeChangeComplete\", handleRouteChange);\n return () => {\n router.events.off(\"routeChangeComplete\", handleRouteChange);\n };\n }, [router.events]);\n return (_jsx(AppInsightsContext.Provider, { value: reactPluginRef.current, children: children }));\n};\nexport default Provider;\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","Provider","children","config","router","useRouter","isAppInsightsLoaded","useRef","reactPluginRef","ReactPlugin","appInsightsRef","browserHistory","window","createBrowserHistory","undefined","useEffect","current","ApplicationInsights","assign","maxBatchSizeInBytes","maxBatchInterval","enableAutoRouteTracking","extensions","extensionConfig","identifier","history","loadAppInsights","addTelemetryInitializer","envelope","baseType","target","baseData","isDependencyData","isVideo","includes","handleRouteChange","url","_a","trackPageView","name","events","on","off","AppInsightsContext"],"sourceRoot":""}
1
+ {"version":3,"file":"Provider.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,kDCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,sBCAvC,EAA+BA,QAAQ,SCAvC,EAA+BA,QAAQ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,SAAUA,GAAY,EAErG,I","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/external commonjs \"react/jsx-runtime\"","webpack://snokam/external commonjs \"next/compat/router\"","webpack://snokam/external commonjs \"react\"","webpack://snokam/external commonjs \"history\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-react-js\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-web\"","webpack://snokam/./src/Provider.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"next/compat/router\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"history\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-react-js\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-web\");","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRouter } from \"next/compat/router\";\nimport { useEffect, useRef } from \"react\";\nimport { createBrowserHistory } from \"history\";\nimport { AppInsightsContext, ReactPlugin, } from \"@microsoft/applicationinsights-react-js\";\nimport { ApplicationInsights, } from \"@microsoft/applicationinsights-web\";\nexport const Provider = ({ children, config }) => {\n const router = useRouter();\n const isAppInsightsLoaded = useRef(false);\n const reactPluginRef = useRef(new ReactPlugin());\n const appInsightsRef = useRef(null);\n const isBrowser = typeof window !== \"undefined\";\n const browserHistory = isBrowser ? createBrowserHistory() : undefined;\n useEffect(() => {\n if (!appInsightsRef.current) {\n appInsightsRef.current = new ApplicationInsights({\n config: Object.assign({ maxBatchSizeInBytes: 10000, maxBatchInterval: 15000, enableAutoRouteTracking: true, extensions: [reactPluginRef.current], extensionConfig: {\n [reactPluginRef.current.identifier]: { history: browserHistory },\n } }, config),\n });\n // Load Application Insights\n appInsightsRef.current.loadAppInsights();\n // Filter out telemetry from specific domains\n appInsightsRef.current.addTelemetryInitializer((envelope) => {\n const baseType = envelope.baseType || \"\";\n const telemetryItem = envelope.baseData || {};\n const target = telemetryItem.target || \"\";\n const isDependencyData = baseType === \"RemoteDependencyData\";\n // Video chunk telemetry\n const isVideo = target.includes(\"mux.com\") || target.includes(\"litix.io\");\n if (isDependencyData && isVideo) {\n return false;\n }\n });\n isAppInsightsLoaded.current = true;\n }\n }, [config]);\n useEffect(() => {\n var _a;\n const handleRouteChange = (url) => {\n var _a;\n (_a = appInsightsRef.current) === null || _a === void 0 ? void 0 : _a.trackPageView({ name: url });\n };\n (_a = router.events) === null || _a === void 0 ? void 0 : _a.on(\"routeChangeComplete\", handleRouteChange);\n return () => {\n var _a;\n (_a = router.events) === null || _a === void 0 ? void 0 : _a.off(\"routeChangeComplete\", handleRouteChange);\n };\n }, [router.events]);\n return (_jsx(AppInsightsContext.Provider, { value: reactPluginRef.current, children: children }));\n};\nexport default Provider;\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","Provider","children","config","router","useRouter","isAppInsightsLoaded","useRef","reactPluginRef","ReactPlugin","appInsightsRef","browserHistory","window","createBrowserHistory","undefined","useEffect","current","ApplicationInsights","assign","maxBatchSizeInBytes","maxBatchInterval","enableAutoRouteTracking","extensions","extensionConfig","identifier","history","loadAppInsights","addTelemetryInitializer","envelope","baseType","target","baseData","isDependencyData","isVideo","includes","_a","handleRouteChange","url","trackPageView","name","events","on","off","AppInsightsContext"],"sourceRoot":""}
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={962:(e,t,r)=>{r.d(t,{Provider:()=>c});const n=require("react/jsx-runtime"),o=require("next/router"),i=require("react"),s=require("history"),u=require("@microsoft/applicationinsights-react-js"),a=require("@microsoft/applicationinsights-web"),c=({children:e,config:t})=>{const r=(0,o.useRouter)(),c=(0,i.useRef)(!1),d=(0,i.useRef)(new u.ReactPlugin),f=(0,i.useRef)(null),l="undefined"!=typeof window?(0,s.createBrowserHistory)():void 0;return(0,i.useEffect)((()=>{f.current||(f.current=new a.ApplicationInsights({config:Object.assign({maxBatchSizeInBytes:1e4,maxBatchInterval:15e3,enableAutoRouteTracking:!0,extensions:[d.current],extensionConfig:{[d.current.identifier]:{history:l}}},t)}),f.current.loadAppInsights(),f.current.addTelemetryInitializer((e=>{const t=e.baseType||"",r=(e.baseData||{}).target||"",n="RemoteDependencyData"===t,o=r.includes("mux.com")||r.includes("litix.io");if(n&&o)return!1})),c.current=!0)}),[t]),(0,i.useEffect)((()=>{const e=e=>{var t;null===(t=f.current)||void 0===t||t.trackPageView({name:e})};return r.events.on("routeChangeComplete",e),()=>{r.events.off("routeChangeComplete",e)}}),[r.events]),(0,n.jsx)(u.AppInsightsContext.Provider,{value:d.current,children:e})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{default:()=>o});const o={Provider:r(962).Provider};return n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={92:(e,t,r)=>{r.d(t,{Provider:()=>c});const n=require("react/jsx-runtime"),o=require("next/compat/router"),i=require("react"),s=require("history"),u=require("@microsoft/applicationinsights-react-js"),a=require("@microsoft/applicationinsights-web"),c=({children:e,config:t})=>{const r=(0,o.useRouter)(),c=(0,i.useRef)(!1),d=(0,i.useRef)(new u.ReactPlugin),l=(0,i.useRef)(null),f="undefined"!=typeof window?(0,s.createBrowserHistory)():void 0;return(0,i.useEffect)((()=>{l.current||(l.current=new a.ApplicationInsights({config:Object.assign({maxBatchSizeInBytes:1e4,maxBatchInterval:15e3,enableAutoRouteTracking:!0,extensions:[d.current],extensionConfig:{[d.current.identifier]:{history:f}}},t)}),l.current.loadAppInsights(),l.current.addTelemetryInitializer((e=>{const t=e.baseType||"",r=(e.baseData||{}).target||"",n="RemoteDependencyData"===t,o=r.includes("mux.com")||r.includes("litix.io");if(n&&o)return!1})),c.current=!0)}),[t]),(0,i.useEffect)((()=>{var e;const t=e=>{var t;null===(t=l.current)||void 0===t||t.trackPageView({name:e})};return null===(e=r.events)||void 0===e||e.on("routeChangeComplete",t),()=>{var e;null===(e=r.events)||void 0===e||e.off("routeChangeComplete",t)}}),[r.events]),(0,n.jsx)(u.AppInsightsContext.Provider,{value:d.current,children:e})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{default:()=>o});const o={Provider:r(92).Provider};return n})()));
2
2
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,I,gECTT,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,eCAvC,EAA+BA,QAAQ,SCAvC,EAA+BA,QAAQ,WCAvC,EAA+BA,QAAQ,2CCAvC,EAA+BA,QAAQ,sCCMhCC,EAAW,EAAGC,WAAUC,aACjC,MAAMC,GAAS,IAAAC,aACTC,GAAsB,IAAAC,SAAO,GAC7BC,GAAiB,IAAAD,QAAO,IAAI,EAAAE,aAC5BC,GAAiB,IAAAH,QAAO,MAExBI,EAD8B,oBAAXC,QACU,IAAAC,6BAAyBC,EAmC5D,OAlCA,IAAAC,YAAU,KACDL,EAAeM,UAChBN,EAAeM,QAAU,IAAI,EAAAC,o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EAAS0D,EAAK,CAAEG,YAAY,EAAMC,IAAKL,EAAWC,IAE1E,ECNDN,EAAoBO,EAAI,CAACI,EAAKC,IAAUzC,OAAO0C,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFZ,EAAoBgB,EAAKpE,IACH,oBAAXqE,QAA0BA,OAAOC,aAC1C/C,OAAOqC,eAAe5D,EAASqE,OAAOC,YAAa,CAAEpB,MAAO,WAE7D3B,OAAOqC,eAAe5D,EAAS,aAAc,CAAEkD,OAAO,GAAO,E,uCCJ9D,SAAiB5C,S,OAAQ,U","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/external commonjs \"react/jsx-runtime\"","webpack://snokam/external commonjs \"next/router\"","webpack://snokam/external commonjs \"react\"","webpack://snokam/external commonjs \"history\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-react-js\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-web\"","webpack://snokam/./src/Provider.tsx","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/./src/index.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"next/router\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"history\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-react-js\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-web\");","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useRef } from \"react\";\nimport { createBrowserHistory } from \"history\";\nimport { AppInsightsContext, ReactPlugin, } from \"@microsoft/applicationinsights-react-js\";\nimport { ApplicationInsights, } from \"@microsoft/applicationinsights-web\";\nexport const Provider = ({ children, config }) => {\n const router = useRouter();\n const isAppInsightsLoaded = useRef(false);\n const reactPluginRef = useRef(new ReactPlugin());\n const appInsightsRef = useRef(null);\n const isBrowser = typeof window !== \"undefined\";\n const browserHistory = isBrowser ? createBrowserHistory() : undefined;\n useEffect(() => {\n if (!appInsightsRef.current) {\n appInsightsRef.current = new ApplicationInsights({\n config: Object.assign({ maxBatchSizeInBytes: 10000, maxBatchInterval: 15000, enableAutoRouteTracking: true, extensions: [reactPluginRef.current], extensionConfig: {\n [reactPluginRef.current.identifier]: { history: browserHistory },\n } }, config),\n });\n // Load Application Insights\n appInsightsRef.current.loadAppInsights();\n // Filter out telemetry from specific domains\n appInsightsRef.current.addTelemetryInitializer((envelope) => {\n const baseType = envelope.baseType || \"\";\n const telemetryItem = envelope.baseData || {};\n const target = telemetryItem.target || \"\";\n const isDependencyData = baseType === \"RemoteDependencyData\";\n // Video chunk telemetry\n const isVideo = target.includes(\"mux.com\") || target.includes(\"litix.io\");\n if (isDependencyData && isVideo) {\n return false;\n }\n });\n isAppInsightsLoaded.current = true;\n }\n }, [config]);\n useEffect(() => {\n const handleRouteChange = (url) => {\n var _a;\n (_a = appInsightsRef.current) === null || _a === void 0 ? void 0 : _a.trackPageView({ name: url });\n };\n router.events.on(\"routeChangeComplete\", handleRouteChange);\n return () => {\n router.events.off(\"routeChangeComplete\", handleRouteChange);\n };\n }, [router.events]);\n return (_jsx(AppInsightsContext.Provider, { value: reactPluginRef.current, children: children }));\n};\nexport default Provider;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Provider } from \"./Provider\";\nexport default { Provider };\n"],"names":["root","factory","exports","module","define","amd","this","require","Provider","children","config","router","useRouter","isAppInsightsLoaded","useRef","reactPluginRef","ReactPlugin","appInsightsRef","browserHistory","window","createBrowserHistory","undefined","useEffect","current","ApplicationInsights","Object","assign","maxBatchSizeInBytes","maxBatchInterval","enableAutoRouteTracking","extensions","extensionConfig","identifier","history","loadAppInsights","addTelemetryInitializer","envelope","baseType","target","baseData","isDependencyData","isVideo","includes","handleRouteChange","url","_a","trackPageView","name","events","on","off","AppInsightsContext","value","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","key","o","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG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,EAAGM,GAAG,sBAAuBL,GAChF,KACH,IAAID,EACqB,QAAxBA,EAAKhC,EAAOqC,cAA2B,IAAPL,GAAyBA,EAAGO,IAAI,sBAAuBN,EAAkB,CAC7G,GACF,CAACjC,EAAOqC,UACH,SAAK,EAAAG,mBAAmB3C,SAAU,CAAE4C,MAAOrC,EAAeQ,QAASd,SAAUA,GAAY,C,GChDjG4C,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBlC,IAAjBmC,EACH,OAAOA,EAAatD,QAGrB,IAAIC,EAASkD,EAAyBE,GAAY,CAGjDrD,QAAS,CAAC,GAOX,OAHAuD,EAAoBF,GAAUpD,EAAQA,EAAOD,QAASoD,GAG/CnD,EAAOD,OACf,CCrBAoD,EAAoBI,EAAI,CAACxD,EAASyD,KACjC,IAAI,IAAIC,KAAOD,EACXL,EAAoBO,EAAEF,EAAYC,KAASN,EAAoBO,EAAE3D,EAAS0D,IAC5EnC,OAAOqC,eAAe5D,EAAS0D,EAAK,CAAEG,YAAY,EAAMC,IAAKL,EAAWC,IAE1E,ECNDN,EAAoBO,EAAI,CAACI,EAAKC,IAAUzC,OAAO0C,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFZ,EAAoBgB,EAAKpE,IACH,oBAAXqE,QAA0BA,OAAOC,aAC1C/C,OAAOqC,eAAe5D,EAASqE,OAAOC,YAAa,CAAEpB,MAAO,WAE7D3B,OAAOqC,eAAe5D,EAAS,aAAc,CAAEkD,OAAO,GAAO,E,uCCJ9D,SAAiB5C,S,MAAQ,U","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/external commonjs \"react/jsx-runtime\"","webpack://snokam/external commonjs \"next/compat/router\"","webpack://snokam/external commonjs \"react\"","webpack://snokam/external commonjs \"history\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-react-js\"","webpack://snokam/external commonjs \"@microsoft/applicationinsights-web\"","webpack://snokam/./src/Provider.tsx","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/./src/index.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"next/compat/router\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"history\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-react-js\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@microsoft/applicationinsights-web\");","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRouter } from \"next/compat/router\";\nimport { useEffect, useRef } from \"react\";\nimport { createBrowserHistory } from \"history\";\nimport { AppInsightsContext, ReactPlugin, } from \"@microsoft/applicationinsights-react-js\";\nimport { ApplicationInsights, } from \"@microsoft/applicationinsights-web\";\nexport const Provider = ({ children, config }) => {\n const router = useRouter();\n const isAppInsightsLoaded = useRef(false);\n const reactPluginRef = useRef(new ReactPlugin());\n const appInsightsRef = useRef(null);\n const isBrowser = typeof window !== \"undefined\";\n const browserHistory = isBrowser ? createBrowserHistory() : undefined;\n useEffect(() => {\n if (!appInsightsRef.current) {\n appInsightsRef.current = new ApplicationInsights({\n config: Object.assign({ maxBatchSizeInBytes: 10000, maxBatchInterval: 15000, enableAutoRouteTracking: true, extensions: [reactPluginRef.current], extensionConfig: {\n [reactPluginRef.current.identifier]: { history: browserHistory },\n } }, config),\n });\n // Load Application Insights\n appInsightsRef.current.loadAppInsights();\n // Filter out telemetry from specific domains\n appInsightsRef.current.addTelemetryInitializer((envelope) => {\n const baseType = envelope.baseType || \"\";\n const telemetryItem = envelope.baseData || {};\n const target = telemetryItem.target || \"\";\n const isDependencyData = baseType === \"RemoteDependencyData\";\n // Video chunk telemetry\n const isVideo = target.includes(\"mux.com\") || target.includes(\"litix.io\");\n if (isDependencyData && isVideo) {\n return false;\n }\n });\n isAppInsightsLoaded.current = true;\n }\n }, [config]);\n useEffect(() => {\n var _a;\n const handleRouteChange = (url) => {\n var _a;\n (_a = appInsightsRef.current) === null || _a === void 0 ? void 0 : _a.trackPageView({ name: url });\n };\n (_a = router.events) === null || _a === void 0 ? void 0 : _a.on(\"routeChangeComplete\", handleRouteChange);\n return () => {\n var _a;\n (_a = router.events) === null || _a === void 0 ? void 0 : _a.off(\"routeChangeComplete\", handleRouteChange);\n };\n }, [router.events]);\n return (_jsx(AppInsightsContext.Provider, { value: reactPluginRef.current, children: children }));\n};\nexport default Provider;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Provider } from \"./Provider\";\nexport default { Provider };\n"],"names":["root","factory","exports","module","define","amd","this","require","Provider","children","config","router","useRouter","isAppInsightsLoaded","useRef","reactPluginRef","ReactPlugin","appInsightsRef","browserHistory","window","createBrowserHistory","undefined","useEffect","current","ApplicationInsights","Object","assign","maxBatchSizeInBytes","maxBatchInterval","enableAutoRouteTracking","extensions","extensionConfig","identifier","history","loadAppInsights","addTelemetryInitializer","envelope","baseType","target","baseData","isDependencyData","isVideo","includes","_a","handleRouteChange","url","trackPageView","name","events","on","off","AppInsightsContext","value","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","key","o","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snokam/application-insights",
3
3
  "description": "Snøkam core components",
4
- "version": "1.2.12",
4
+ "version": "1.2.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -33,5 +33,5 @@
33
33
  "react": "*",
34
34
  "react-dom": "*"
35
35
  },
36
- "gitHead": "7746a0e050606fc1e7c3b154fe1e9bf316b4693a"
36
+ "gitHead": "186c5327b906bfa0605bdde9fa1aa739165d472e"
37
37
  }