@grafana/faro-react 2.13.0 → 2.14.0
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/dist/bundle/faro-react.iife.js +1 -1
- package/dist/bundle/faro-react.iife.js.map +1 -1
- package/dist/cjs/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/defineProperty.js +1 -2
- package/dist/cjs/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/objectSpread2.js +1 -2
- package/dist/cjs/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPrimitive.js +1 -2
- package/dist/cjs/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPropertyKey.js +1 -2
- package/dist/cjs/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/typeof.js +1 -2
- package/dist/cjs/_virtual/_rolldown/runtime.js +1 -2
- package/dist/cjs/dependencies.js +1 -2
- package/dist/cjs/errorBoundary/FaroErrorBoundary.js +3 -4
- package/dist/cjs/errorBoundary/const.js +1 -2
- package/dist/cjs/errorBoundary/withFaroErrorBoundary.js +1 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/instrumentation.js +1 -2
- package/dist/cjs/profiler/FaroProfiler.js +2 -3
- package/dist/cjs/profiler/withFaroProfiler.js +1 -2
- package/dist/cjs/router/index.js +3 -3
- package/dist/cjs/router/initialize.js +1 -2
- package/dist/cjs/router/types.js +1 -2
- package/dist/cjs/router/v4v5/FaroRoute.js +1 -2
- package/dist/cjs/router/v4v5/activeEvent.js +1 -2
- package/dist/cjs/router/v4v5/index.js +1 -1
- package/dist/cjs/router/v4v5/initialize.js +2 -3
- package/dist/cjs/router/v4v5/routerDependencies.js +1 -2
- package/dist/cjs/router/v6v7/FaroRoutes.js +2 -3
- package/dist/cjs/router/v6v7/index.js +1 -1
- package/dist/cjs/router/v6v7/initialize.js +2 -3
- package/dist/cjs/router/v6v7/routerDependencies.js +1 -2
- package/dist/cjs/router/v6v7/utils.js +1 -2
- package/dist/cjs/router/v6v7/withFaroRouterInstrumentation.js +2 -3
- package/dist/cjs/utils/reactVersion.js +1 -2
- package/dist/cjs/utils/reactVersion.js.map +1 -1
- package/dist/esm/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/defineProperty.js +1 -2
- package/dist/esm/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/objectSpread2.js +1 -2
- package/dist/esm/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPrimitive.js +1 -2
- package/dist/esm/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPropertyKey.js +1 -2
- package/dist/esm/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/typeof.js +1 -2
- package/dist/esm/dependencies.js +1 -2
- package/dist/esm/errorBoundary/FaroErrorBoundary.js +3 -4
- package/dist/esm/errorBoundary/const.js +1 -2
- package/dist/esm/errorBoundary/withFaroErrorBoundary.js +1 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/instrumentation.js +1 -2
- package/dist/esm/profiler/FaroProfiler.js +2 -3
- package/dist/esm/profiler/withFaroProfiler.js +1 -2
- package/dist/esm/router/index.js +3 -3
- package/dist/esm/router/initialize.js +1 -2
- package/dist/esm/router/types.js +1 -2
- package/dist/esm/router/v4v5/FaroRoute.js +1 -2
- package/dist/esm/router/v4v5/activeEvent.js +1 -2
- package/dist/esm/router/v4v5/index.js +1 -1
- package/dist/esm/router/v4v5/initialize.js +2 -3
- package/dist/esm/router/v4v5/routerDependencies.js +1 -2
- package/dist/esm/router/v6v7/FaroRoutes.js +2 -3
- package/dist/esm/router/v6v7/index.js +1 -1
- package/dist/esm/router/v6v7/initialize.js +2 -3
- package/dist/esm/router/v6v7/routerDependencies.js +1 -2
- package/dist/esm/router/v6v7/utils.js +1 -2
- package/dist/esm/router/v6v7/withFaroRouterInstrumentation.js +2 -3
- package/dist/esm/utils/reactVersion.js +1 -2
- package/dist/types/dependencies.d.ts +1 -3
- package/dist/types/errorBoundary/FaroErrorBoundary.d.ts +1 -3
- package/dist/types/errorBoundary/const.d.ts +1 -3
- package/dist/types/errorBoundary/index.d.ts +2 -2
- package/dist/types/errorBoundary/types.d.ts +1 -3
- package/dist/types/errorBoundary/withFaroErrorBoundary.d.ts +1 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/instrumentation.d.ts +1 -3
- package/dist/types/profiler/FaroProfiler.d.ts +1 -3
- package/dist/types/profiler/withFaroProfiler.d.ts +1 -3
- package/dist/types/router/initialize.d.ts +1 -3
- package/dist/types/router/types.d.ts +1 -3
- package/dist/types/router/v4v5/FaroRoute.d.ts +1 -3
- package/dist/types/router/v4v5/activeEvent.d.ts +1 -3
- package/dist/types/router/v4v5/index.d.ts +1 -1
- package/dist/types/router/v4v5/initialize.d.ts +2 -4
- package/dist/types/router/v4v5/routerDependencies.d.ts +1 -3
- package/dist/types/router/v4v5/types.d.ts +1 -3
- package/dist/types/router/v6v7/FaroRoutes.d.ts +1 -3
- package/dist/types/router/v6v7/index.d.ts +1 -1
- package/dist/types/router/v6v7/initialize.d.ts +2 -4
- package/dist/types/router/v6v7/routerDependencies.d.ts +1 -3
- package/dist/types/router/v6v7/types.d.ts +0 -2
- package/dist/types/router/v6v7/utils.d.ts +1 -3
- package/dist/types/router/v6v7/withFaroRouterInstrumentation.d.ts +0 -2
- package/dist/types/types.d.ts +1 -3
- package/dist/types/utils/reactVersion.d.ts +1 -3
- package/package.json +4 -4
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
|
|
4
4
|
require("../types.js");
|
|
5
5
|
const require_router_v4v5_activeEvent = require("./activeEvent.js");
|
|
6
|
-
const require_router_v4v5_routerDependencies = require("./routerDependencies.js");
|
|
7
6
|
const require_router_v4v5_FaroRoute = require("./FaroRoute.js");
|
|
7
|
+
const require_router_v4v5_routerDependencies = require("./routerDependencies.js");
|
|
8
8
|
let _grafana_faro_web_sdk = require("@grafana/faro-web-sdk");
|
|
9
9
|
let hoist_non_react_statics = require("hoist-non-react-statics");
|
|
10
10
|
hoist_non_react_statics = require_runtime.__toESM(hoist_non_react_statics);
|
|
11
|
-
|
|
11
|
+
// src/router/v4v5/initialize.ts
|
|
12
12
|
function initializeReactRouterV4V5Instrumentation(dependencies) {
|
|
13
13
|
var _Route$displayName, _globalObject$locatio, _dependencies$history, _dependencies$history2;
|
|
14
14
|
const Route = dependencies.Route;
|
|
@@ -37,7 +37,6 @@ function createReactRouterV5Options(dependencies) {
|
|
|
37
37
|
dependencies
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
exports.createReactRouterV4Options = createReactRouterV4Options;
|
|
42
41
|
exports.createReactRouterV5Options = createReactRouterV5Options;
|
|
43
42
|
exports.initializeReactRouterV4V5Instrumentation = initializeReactRouterV4V5Instrumentation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
// src/router/v4v5/routerDependencies.ts
|
|
4
4
|
let isInitialized = false;
|
|
5
5
|
let history;
|
|
6
6
|
let Route;
|
|
@@ -12,7 +12,6 @@ function setReactRouterV4V5Dependencies(dependencies) {
|
|
|
12
12
|
function setReactRouterV4V5SSRDependencies(newDependencies) {
|
|
13
13
|
Route = newDependencies.Route;
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
Object.defineProperty(exports, "Route", {
|
|
17
16
|
enumerable: true,
|
|
18
17
|
get: function() {
|
|
@@ -5,11 +5,11 @@ const require_dependencies = require("../../dependencies.js");
|
|
|
5
5
|
require("../types.js");
|
|
6
6
|
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
7
7
|
const require_router_v6v7_utils = require("./utils.js");
|
|
8
|
-
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.
|
|
8
|
+
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js");
|
|
9
9
|
let react = require("react");
|
|
10
10
|
react = require_runtime.__toESM(react);
|
|
11
11
|
let _grafana_faro_web_sdk = require("@grafana/faro-web-sdk");
|
|
12
|
-
|
|
12
|
+
// src/router/v6v7/FaroRoutes.tsx
|
|
13
13
|
function FaroRoutes(props) {
|
|
14
14
|
var _props$routesComponen;
|
|
15
15
|
const location = require_router_v6v7_routerDependencies.useLocation === null || require_router_v6v7_routerDependencies.useLocation === void 0 ? void 0 : require_router_v6v7_routerDependencies.useLocation();
|
|
@@ -41,7 +41,6 @@ function FaroRoutes(props) {
|
|
|
41
41
|
const ActualRoutes = (_props$routesComponen = props.routesComponent) !== null && _props$routesComponen !== void 0 ? _props$routesComponen : require_router_v6v7_routerDependencies.Routes;
|
|
42
42
|
return /* @__PURE__ */ react.default.createElement(ActualRoutes, props);
|
|
43
43
|
}
|
|
44
|
-
//#endregion
|
|
45
44
|
exports.FaroRoutes = FaroRoutes;
|
|
46
45
|
|
|
47
46
|
//# sourceMappingURL=FaroRoutes.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
4
3
|
const require_router_v6v7_FaroRoutes = require("./FaroRoutes.js");
|
|
5
4
|
const require_router_v6v7_initialize = require("./initialize.js");
|
|
5
|
+
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
6
6
|
const require_router_v6v7_withFaroRouterInstrumentation = require("./withFaroRouterInstrumentation.js");
|
|
7
7
|
exports.FaroRoutes = require_router_v6v7_FaroRoutes.FaroRoutes;
|
|
8
8
|
exports.createReactRouterV6DataOptions = require_router_v6v7_initialize.createReactRouterV6DataOptions;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
|
|
4
4
|
require("../types.js");
|
|
5
|
-
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
6
5
|
const require_router_v6v7_FaroRoutes = require("./FaroRoutes.js");
|
|
6
|
+
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
7
7
|
let hoist_non_react_statics = require("hoist-non-react-statics");
|
|
8
8
|
hoist_non_react_statics = require_runtime.__toESM(hoist_non_react_statics);
|
|
9
|
-
|
|
9
|
+
// src/router/v6v7/initialize.ts
|
|
10
10
|
function initializeReactRouterV6Instrumentation(dependencies) {
|
|
11
11
|
(0, hoist_non_react_statics.default)(require_router_v6v7_FaroRoutes.FaroRoutes, dependencies.Routes);
|
|
12
12
|
require_router_v6v7_routerDependencies.setReactRouterV6Dependencies(dependencies);
|
|
@@ -38,7 +38,6 @@ function createReactRouterV7DataOptions(dependencies) {
|
|
|
38
38
|
dependencies
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
exports.createReactRouterV6DataOptions = createReactRouterV6DataOptions;
|
|
43
42
|
exports.createReactRouterV6Options = createReactRouterV6Options;
|
|
44
43
|
exports.createReactRouterV7DataOptions = createReactRouterV7DataOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
// src/router/v6v7/routerDependencies.ts
|
|
4
4
|
let isInitialized = false;
|
|
5
5
|
let createRoutesFromChildren;
|
|
6
6
|
let matchRoutes;
|
|
@@ -25,7 +25,6 @@ function setReactRouterV6DataRouterDependencies(newDependencies) {
|
|
|
25
25
|
function setReactRouterV7SSRDependencies(newDependencies) {
|
|
26
26
|
Routes = newDependencies.Routes;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
Object.defineProperty(exports, "Routes", {
|
|
30
29
|
enumerable: true,
|
|
31
30
|
get: function() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
4
|
-
|
|
4
|
+
// src/router/v6v7/utils.ts
|
|
5
5
|
function getNumberOfUrlSegments(url) {
|
|
6
6
|
return url.split(/\\?\//).filter((currentSegment) => currentSegment.length > 0 && currentSegment !== ",").length;
|
|
7
7
|
}
|
|
@@ -27,7 +27,6 @@ function getRouteFromLocation(routes, location) {
|
|
|
27
27
|
}
|
|
28
28
|
return location.pathname;
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
exports.getNumberOfUrlSegments = getNumberOfUrlSegments;
|
|
32
31
|
exports.getRouteFromLocation = getRouteFromLocation;
|
|
33
32
|
|
|
@@ -4,9 +4,9 @@ const require_dependencies = require("../../dependencies.js");
|
|
|
4
4
|
require("../types.js");
|
|
5
5
|
const require_router_v6v7_routerDependencies = require("./routerDependencies.js");
|
|
6
6
|
const require_router_v6v7_utils = require("./utils.js");
|
|
7
|
-
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.
|
|
7
|
+
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js");
|
|
8
8
|
let _grafana_faro_web_sdk = require("@grafana/faro-web-sdk");
|
|
9
|
-
|
|
9
|
+
// src/router/v6v7/withFaroRouterInstrumentation.ts
|
|
10
10
|
/**
|
|
11
11
|
* To use with React Router 6.4 data APIs.
|
|
12
12
|
*/
|
|
@@ -32,7 +32,6 @@ function withFaroRouterInstrumentation(router) {
|
|
|
32
32
|
});
|
|
33
33
|
return router;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.withFaroRouterInstrumentation = withFaroRouterInstrumentation;
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=withFaroRouterInstrumentation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
// src/utils/reactVersion.ts
|
|
4
4
|
const reactVersion = require("react").version;
|
|
5
5
|
const reactVersionMajor = getMajorReactVersion();
|
|
6
6
|
const isReactVersionAtLeast19 = isReactVersionAtLeast(19);
|
|
@@ -18,7 +18,6 @@ function getMajorReactVersion() {
|
|
|
18
18
|
function isReactVersionAtLeast(version) {
|
|
19
19
|
return reactVersionMajor === null ? false : reactVersionMajor >= version;
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
exports.getMajorReactVersion = getMajorReactVersion;
|
|
23
22
|
exports.isReactVersionAtLeast = isReactVersionAtLeast;
|
|
24
23
|
exports.isReactVersionAtLeast16 = isReactVersionAtLeast16;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactVersion.js","names":["version"],"sources":["../../../src/utils/reactVersion.ts"],"sourcesContent":["import { version } from 'react';\n\nexport const reactVersion: string = version;\nexport const reactVersionMajor: number | null = getMajorReactVersion();\nexport const isReactVersionAtLeast19: boolean = isReactVersionAtLeast(19);\nexport const isReactVersionAtLeast18: boolean = isReactVersionAtLeast(18);\nexport const isReactVersionAtLeast17: boolean = isReactVersionAtLeast(17);\nexport const isReactVersionAtLeast16: boolean = isReactVersionAtLeast(16);\n\nexport function getMajorReactVersion(): number | null {\n const major = reactVersion.split('.');\n\n try {\n return major[0] ? parseInt(major[0], 10) : null;\n } catch (_err) {\n return null;\n }\n}\n\nexport function isReactVersionAtLeast(version: number): boolean {\n return reactVersionMajor === null ? false : reactVersionMajor >= version;\n}\n"],"mappings":";;;AAEA,MAAa,
|
|
1
|
+
{"version":3,"file":"reactVersion.js","names":["version"],"sources":["../../../src/utils/reactVersion.ts"],"sourcesContent":["import { version } from 'react';\n\nexport const reactVersion: string = version;\nexport const reactVersionMajor: number | null = getMajorReactVersion();\nexport const isReactVersionAtLeast19: boolean = isReactVersionAtLeast(19);\nexport const isReactVersionAtLeast18: boolean = isReactVersionAtLeast(18);\nexport const isReactVersionAtLeast17: boolean = isReactVersionAtLeast(17);\nexport const isReactVersionAtLeast16: boolean = isReactVersionAtLeast(16);\n\nexport function getMajorReactVersion(): number | null {\n const major = reactVersion.split('.');\n\n try {\n return major[0] ? parseInt(major[0], 10) : null;\n } catch (_err) {\n return null;\n }\n}\n\nexport function isReactVersionAtLeast(version: number): boolean {\n return reactVersionMajor === null ? false : reactVersionMajor >= version;\n}\n"],"mappings":";;;AAEA,MAAa,e,eAAuBA,CAAAA,CAAAA;AACpC,MAAa,oBAAmC,qBAAqB;AACrE,MAAa,0BAAmC,sBAAsB,EAAE;AACxE,MAAa,0BAAmC,sBAAsB,EAAE;AACxE,MAAa,0BAAmC,sBAAsB,EAAE;AACxE,MAAa,0BAAmC,sBAAsB,EAAE;AAExE,SAAgB,uBAAsC;CACpD,MAAM,QAAQ,aAAa,MAAM,GAAG;CAEpC,IAAI;EACF,OAAO,MAAM,KAAK,SAAS,MAAM,IAAI,EAAE,IAAI;CAC7C,SAAS,MAAM;EACb,OAAO;CACT;AACF;AAEA,SAAgB,sBAAsB,SAA0B;CAC9D,OAAO,sBAAsB,OAAO,QAAQ,qBAAqB;AACnE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import toPropertyKey from "./toPropertyKey.js";
|
|
2
|
-
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
|
|
3
3
|
function _defineProperty(e, r, t) {
|
|
4
4
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
5
5
|
value: t,
|
|
@@ -8,5 +8,4 @@ function _defineProperty(e, r, t) {
|
|
|
8
8
|
writable: !0
|
|
9
9
|
}) : e[r] = t, e;
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { _defineProperty as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "./defineProperty.js";
|
|
2
|
-
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectSpread2.js
|
|
3
3
|
function ownKeys(e, r) {
|
|
4
4
|
var t = Object.keys(e);
|
|
5
5
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -21,5 +21,4 @@ function _objectSpread2(e) {
|
|
|
21
21
|
}
|
|
22
22
|
return e;
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { _objectSpread2 as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _typeof from "./typeof.js";
|
|
2
|
-
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
|
|
3
3
|
function toPrimitive(t, r) {
|
|
4
4
|
if ("object" != _typeof(t) || !t) return t;
|
|
5
5
|
var e = t[Symbol.toPrimitive];
|
|
@@ -10,5 +10,4 @@ function toPrimitive(t, r) {
|
|
|
10
10
|
}
|
|
11
11
|
return ("string" === r ? String : Number)(t);
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { toPrimitive as default };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _typeof from "./typeof.js";
|
|
2
2
|
import toPrimitive from "./toPrimitive.js";
|
|
3
|
-
|
|
3
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
|
|
4
4
|
function toPropertyKey(t) {
|
|
5
5
|
var i = toPrimitive(t, "string");
|
|
6
6
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { toPropertyKey as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
|
|
2
2
|
function _typeof(o) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -7,5 +7,4 @@ function _typeof(o) {
|
|
|
7
7
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8
8
|
}, _typeof(o);
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { _typeof as default };
|
package/dist/esm/dependencies.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// src/dependencies.ts
|
|
2
2
|
let internalLogger;
|
|
3
3
|
let api;
|
|
4
4
|
function setDependencies(newInternalLogger, newApi) {
|
|
5
5
|
internalLogger = newInternalLogger;
|
|
6
6
|
api = newApi;
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { api, internalLogger, setDependencies };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=dependencies.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { api, internalLogger } from "../dependencies.js";
|
|
2
|
-
import { faroErrorBoundaryInitialState } from "./const.js";
|
|
3
|
-
import { isReactVersionAtLeast17 } from "../utils/reactVersion.js";
|
|
4
2
|
import "../utils/index.js";
|
|
3
|
+
import { isReactVersionAtLeast17 } from "../utils/reactVersion.js";
|
|
4
|
+
import { faroErrorBoundaryInitialState } from "./const.js";
|
|
5
5
|
import { Component, isValidElement } from "react";
|
|
6
6
|
import { isFunction } from "@grafana/faro-web-sdk";
|
|
7
|
-
|
|
7
|
+
// src/errorBoundary/FaroErrorBoundary.tsx
|
|
8
8
|
var FaroErrorBoundary = class extends Component {
|
|
9
9
|
constructor(props) {
|
|
10
10
|
super(props);
|
|
@@ -56,7 +56,6 @@ var FaroErrorBoundary = class extends Component {
|
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { FaroErrorBoundary };
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=FaroErrorBoundary.js.map
|
|
@@ -2,7 +2,7 @@ import { FaroErrorBoundary } from "./FaroErrorBoundary.js";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { unknownString } from "@grafana/faro-web-sdk";
|
|
4
4
|
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
5
|
-
|
|
5
|
+
// src/errorBoundary/withFaroErrorBoundary.tsx
|
|
6
6
|
function withFaroErrorBoundary(WrappedComponent, errorBoundaryProps) {
|
|
7
7
|
var _ref, _WrappedComponent$dis;
|
|
8
8
|
const componentDisplayName = (_ref = (_WrappedComponent$dis = WrappedComponent.displayName) !== null && _WrappedComponent$dis !== void 0 ? _WrappedComponent$dis : WrappedComponent.name) !== null && _ref !== void 0 ? _ref : unknownString;
|
|
@@ -11,7 +11,6 @@ function withFaroErrorBoundary(WrappedComponent, errorBoundaryProps) {
|
|
|
11
11
|
hoistNonReactStatics(Component, WrappedComponent);
|
|
12
12
|
return Component;
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { withFaroErrorBoundary };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=withFaroErrorBoundary.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { faroErrorBoundaryInitialState } from "./errorBoundary/const.js";
|
|
2
2
|
import { getMajorReactVersion, isReactVersionAtLeast, isReactVersionAtLeast16, isReactVersionAtLeast17, isReactVersionAtLeast18, isReactVersionAtLeast19, reactVersion, reactVersionMajor } from "./utils/reactVersion.js";
|
|
3
|
-
import "./
|
|
3
|
+
import "./errorBoundary/index.js";
|
|
4
4
|
import { FaroErrorBoundary } from "./errorBoundary/FaroErrorBoundary.js";
|
|
5
5
|
import { withFaroErrorBoundary } from "./errorBoundary/withFaroErrorBoundary.js";
|
|
6
|
-
import "./
|
|
6
|
+
import { ReactIntegration } from "./instrumentation.js";
|
|
7
7
|
import { NavigationType, ReactRouterVersion } from "./router/types.js";
|
|
8
8
|
import { setReactRouterV4V5SSRDependencies } from "./router/v4v5/routerDependencies.js";
|
|
9
9
|
import { FaroRoute } from "./router/v4v5/FaroRoute.js";
|
|
@@ -12,10 +12,10 @@ import { setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies } from
|
|
|
12
12
|
import { FaroRoutes } from "./router/v6v7/FaroRoutes.js";
|
|
13
13
|
import { createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options } from "./router/v6v7/initialize.js";
|
|
14
14
|
import { withFaroRouterInstrumentation } from "./router/v6v7/withFaroRouterInstrumentation.js";
|
|
15
|
+
import "./profiler/index.js";
|
|
15
16
|
import "./router/index.js";
|
|
16
|
-
import { ReactIntegration } from "./instrumentation.js";
|
|
17
17
|
import { FaroProfiler } from "./profiler/FaroProfiler.js";
|
|
18
18
|
import { withFaroProfiler } from "./profiler/withFaroProfiler.js";
|
|
19
|
-
import "./
|
|
19
|
+
import "./utils/index.js";
|
|
20
20
|
import { BaseExtension, BaseInstrumentation, BaseTransport, ConsoleInstrumentation, ConsoleTransport, ErrorsInstrumentation, FetchTransport, InternalLoggerLevel, LogLevel, TransportItemType, VERSION, ViewInstrumentation, WebVitalsInstrumentation, allLogLevels, browserMeta, buildStackFrame, createInternalLogger, createPromiseBuffer, createSession, deepEqual, defaultEventDomain, defaultExceptionType, defaultGlobalObjectKey, defaultInternalLoggerLevel, defaultLogLevel, faro, genShortID, getCurrentTimestamp, getDataFromSafariExtensions, getInternalFaroFromGlobalObject, getStackFramesFromError, getTransportBody, getWebInstrumentations, globalObject, initializeFaro, internalGlobalObjectKey, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isInternalFaroOnGlobalObject, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, makeCoreConfig, noop, parseStacktrace, setInternalFaroOnGlobalObject, transportItemTypeToBodyKey, userActionDataAttribute, userActionTimeoutDataAttribute } from "@grafana/faro-web-sdk";
|
|
21
21
|
export { BaseExtension, BaseInstrumentation, BaseTransport, ConsoleInstrumentation, ConsoleTransport, ErrorsInstrumentation, FaroErrorBoundary, FaroProfiler, FaroRoute, FaroRoutes, FetchTransport, InternalLoggerLevel, LogLevel, NavigationType, ReactIntegration, ReactRouterVersion, TransportItemType, VERSION, ViewInstrumentation, WebVitalsInstrumentation, allLogLevels, browserMeta, buildStackFrame, createInternalLogger, createPromiseBuffer, createReactRouterV4Options, createReactRouterV5Options, createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options, createSession, deepEqual, defaultEventDomain, defaultExceptionType, defaultGlobalObjectKey, defaultInternalLoggerLevel, defaultLogLevel, faro, faroErrorBoundaryInitialState, genShortID, getCurrentTimestamp, getDataFromSafariExtensions, getInternalFaroFromGlobalObject, getMajorReactVersion, getStackFramesFromError, getTransportBody, getWebInstrumentations, globalObject, initializeFaro, internalGlobalObjectKey, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isInternalFaroOnGlobalObject, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isReactVersionAtLeast, isReactVersionAtLeast16, isReactVersionAtLeast17, isReactVersionAtLeast18, isReactVersionAtLeast19, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, makeCoreConfig, noop, parseStacktrace, reactVersion, reactVersionMajor, setInternalFaroOnGlobalObject, setReactRouterV4V5SSRDependencies, setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies, transportItemTypeToBodyKey, userActionDataAttribute, userActionTimeoutDataAttribute, withFaroErrorBoundary, withFaroProfiler, withFaroRouterInstrumentation };
|
|
@@ -2,7 +2,7 @@ import { setDependencies } from "./dependencies.js";
|
|
|
2
2
|
import { initializeReactRouterInstrumentation } from "./router/initialize.js";
|
|
3
3
|
import "./router/index.js";
|
|
4
4
|
import { BaseInstrumentation, VERSION } from "@grafana/faro-web-sdk";
|
|
5
|
-
|
|
5
|
+
// src/instrumentation.ts
|
|
6
6
|
var ReactIntegration = class extends BaseInstrumentation {
|
|
7
7
|
constructor(options = {}) {
|
|
8
8
|
super();
|
|
@@ -15,7 +15,6 @@ var ReactIntegration = class extends BaseInstrumentation {
|
|
|
15
15
|
initializeReactRouterInstrumentation(this.options);
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { ReactIntegration };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { api, internalLogger } from "../dependencies.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { Component } from "react";
|
|
4
4
|
import { VERSION } from "@grafana/faro-web-sdk";
|
|
5
|
-
|
|
5
|
+
// src/profiler/FaroProfiler.tsx
|
|
6
6
|
var FaroProfiler = class extends Component {
|
|
7
7
|
get isOtelInitialized() {
|
|
8
8
|
return !!(api === null || api === void 0 ? void 0 : api.isOTELInitialized());
|
|
@@ -69,7 +69,6 @@ var FaroProfiler = class extends Component {
|
|
|
69
69
|
return this.props.children;
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
//#endregion
|
|
73
72
|
export { FaroProfiler };
|
|
74
73
|
|
|
75
74
|
//# sourceMappingURL=FaroProfiler.js.map
|
|
@@ -2,7 +2,7 @@ import { FaroProfiler } from "./FaroProfiler.js";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { unknownString } from "@grafana/faro-web-sdk";
|
|
4
4
|
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
5
|
-
|
|
5
|
+
// src/profiler/withFaroProfiler.tsx
|
|
6
6
|
function withFaroProfiler(WrappedComponent, options) {
|
|
7
7
|
var _ref, _ref2, _options$name;
|
|
8
8
|
const componentDisplayName = (_ref = (_ref2 = (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : WrappedComponent.displayName) !== null && _ref2 !== void 0 ? _ref2 : WrappedComponent.name) !== null && _ref !== void 0 ? _ref : unknownString;
|
|
@@ -14,7 +14,6 @@ function withFaroProfiler(WrappedComponent, options) {
|
|
|
14
14
|
hoistNonReactStatics(Component, WrappedComponent);
|
|
15
15
|
return Component;
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { withFaroProfiler };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=withFaroProfiler.js.map
|
package/dist/esm/router/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { initializeReactRouterInstrumentation } from "./initialize.js";
|
|
2
2
|
import { setReactRouterV4V5SSRDependencies } from "./v4v5/routerDependencies.js";
|
|
3
3
|
import { FaroRoute } from "./v4v5/FaroRoute.js";
|
|
4
4
|
import { createReactRouterV4Options, createReactRouterV5Options } from "./v4v5/initialize.js";
|
|
5
|
-
import "./
|
|
5
|
+
import { NavigationType, ReactRouterVersion } from "./types.js";
|
|
6
6
|
import { setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies } from "./v6v7/routerDependencies.js";
|
|
7
7
|
import { FaroRoutes } from "./v6v7/FaroRoutes.js";
|
|
8
8
|
import { createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options } from "./v6v7/initialize.js";
|
|
9
9
|
import { withFaroRouterInstrumentation } from "./v6v7/withFaroRouterInstrumentation.js";
|
|
10
|
+
import "./v4v5/index.js";
|
|
10
11
|
import "./v6v7/index.js";
|
|
11
|
-
import { initializeReactRouterInstrumentation } from "./initialize.js";
|
|
12
12
|
export { FaroRoute, FaroRoutes, NavigationType, ReactRouterVersion, createReactRouterV4Options, createReactRouterV5Options, createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options, initializeReactRouterInstrumentation, setReactRouterV4V5SSRDependencies, setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies, withFaroRouterInstrumentation };
|
|
@@ -4,7 +4,7 @@ import { initializeReactRouterV4V5Instrumentation } from "./v4v5/initialize.js";
|
|
|
4
4
|
import "./v4v5/index.js";
|
|
5
5
|
import { initializeReactRouterV6DataRouterInstrumentation, initializeReactRouterV6Instrumentation } from "./v6v7/initialize.js";
|
|
6
6
|
import "./v6v7/index.js";
|
|
7
|
-
|
|
7
|
+
// src/router/initialize.ts
|
|
8
8
|
function initializeReactRouterInstrumentation(options) {
|
|
9
9
|
var _options$router;
|
|
10
10
|
const initMessage = "Initializing React Router";
|
|
@@ -27,7 +27,6 @@ function initializeReactRouterInstrumentation(options) {
|
|
|
27
27
|
default: internalLogger.debug("Skipping initialization of React Router instrumentation");
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { initializeReactRouterInstrumentation };
|
|
32
31
|
|
|
33
32
|
//# sourceMappingURL=initialize.js.map
|
package/dist/esm/router/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/router/types.ts
|
|
2
2
|
let ReactRouterVersion = /* @__PURE__ */ function(ReactRouterVersion) {
|
|
3
3
|
ReactRouterVersion["V4"] = "v4";
|
|
4
4
|
ReactRouterVersion["V5"] = "v5";
|
|
@@ -14,7 +14,6 @@ let NavigationType = /* @__PURE__ */ function(NavigationType) {
|
|
|
14
14
|
NavigationType["Replace"] = "REPLACE";
|
|
15
15
|
return NavigationType;
|
|
16
16
|
}({});
|
|
17
|
-
//#endregion
|
|
18
17
|
export { NavigationType, ReactRouterVersion };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { setActiveEventRoute } from "./activeEvent.js";
|
|
2
2
|
import { Route } from "./routerDependencies.js";
|
|
3
3
|
import React from "react";
|
|
4
|
-
|
|
4
|
+
// src/router/v4v5/FaroRoute.tsx
|
|
5
5
|
function FaroRoute(props) {
|
|
6
6
|
var _props$computedMatch;
|
|
7
7
|
if (props === null || props === void 0 || (_props$computedMatch = props.computedMatch) === null || _props$computedMatch === void 0 ? void 0 : _props$computedMatch.isExact) setActiveEventRoute(props.computedMatch.path);
|
|
8
8
|
return /* @__PURE__ */ React.createElement(Route, props);
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { FaroRoute };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=FaroRoute.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { api } from "../../dependencies.js";
|
|
2
2
|
import { EVENT_ROUTE_CHANGE } from "@grafana/faro-web-sdk";
|
|
3
|
-
|
|
3
|
+
// src/router/v4v5/activeEvent.ts
|
|
4
4
|
let activeEvent = void 0;
|
|
5
5
|
function createNewActiveEvent(url) {
|
|
6
6
|
activeEvent = {
|
|
@@ -16,7 +16,6 @@ function sendActiveEvent() {
|
|
|
16
16
|
api.pushEvent(EVENT_ROUTE_CHANGE, activeEvent, void 0, { skipDedupe: true });
|
|
17
17
|
activeEvent = void 0;
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { activeEvent, createNewActiveEvent, sendActiveEvent, setActiveEventRoute };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=activeEvent.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setReactRouterV4V5SSRDependencies } from "./routerDependencies.js";
|
|
2
1
|
import { FaroRoute } from "./FaroRoute.js";
|
|
3
2
|
import { createReactRouterV4Options, createReactRouterV5Options, initializeReactRouterV4V5Instrumentation } from "./initialize.js";
|
|
3
|
+
import { setReactRouterV4V5SSRDependencies } from "./routerDependencies.js";
|
|
4
4
|
export { FaroRoute, createReactRouterV4Options, createReactRouterV5Options, initializeReactRouterV4V5Instrumentation, setReactRouterV4V5SSRDependencies };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../types.js";
|
|
2
2
|
import { createNewActiveEvent, sendActiveEvent } from "./activeEvent.js";
|
|
3
|
-
import { setReactRouterV4V5Dependencies } from "./routerDependencies.js";
|
|
4
3
|
import { FaroRoute } from "./FaroRoute.js";
|
|
4
|
+
import { setReactRouterV4V5Dependencies } from "./routerDependencies.js";
|
|
5
5
|
import { globalObject } from "@grafana/faro-web-sdk";
|
|
6
6
|
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
7
|
-
|
|
7
|
+
// src/router/v4v5/initialize.ts
|
|
8
8
|
function initializeReactRouterV4V5Instrumentation(dependencies) {
|
|
9
9
|
var _Route$displayName, _globalObject$locatio, _dependencies$history, _dependencies$history2;
|
|
10
10
|
const Route = dependencies.Route;
|
|
@@ -33,7 +33,6 @@ function createReactRouterV5Options(dependencies) {
|
|
|
33
33
|
dependencies
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { createReactRouterV4Options, createReactRouterV5Options, initializeReactRouterV4V5Instrumentation };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=initialize.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/router/v4v5/routerDependencies.ts
|
|
2
2
|
let isInitialized = false;
|
|
3
3
|
let history;
|
|
4
4
|
let Route;
|
|
@@ -10,7 +10,6 @@ function setReactRouterV4V5Dependencies(dependencies) {
|
|
|
10
10
|
function setReactRouterV4V5SSRDependencies(newDependencies) {
|
|
11
11
|
Route = newDependencies.Route;
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { Route, history, isInitialized, setReactRouterV4V5Dependencies, setReactRouterV4V5SSRDependencies };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=routerDependencies.js.map
|
|
@@ -2,10 +2,10 @@ import { api } from "../../dependencies.js";
|
|
|
2
2
|
import "../types.js";
|
|
3
3
|
import { Routes, createRoutesFromChildren, isInitialized, useLocation, useNavigationType } from "./routerDependencies.js";
|
|
4
4
|
import { getRouteFromLocation } from "./utils.js";
|
|
5
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
5
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js";
|
|
6
6
|
import React, { useEffect, useMemo, useRef } from "react";
|
|
7
7
|
import { EVENT_ROUTE_CHANGE, globalObject } from "@grafana/faro-web-sdk";
|
|
8
|
-
|
|
8
|
+
// src/router/v6v7/FaroRoutes.tsx
|
|
9
9
|
function FaroRoutes(props) {
|
|
10
10
|
var _props$routesComponen;
|
|
11
11
|
const location = useLocation === null || useLocation === void 0 ? void 0 : useLocation();
|
|
@@ -37,7 +37,6 @@ function FaroRoutes(props) {
|
|
|
37
37
|
const ActualRoutes = (_props$routesComponen = props.routesComponent) !== null && _props$routesComponen !== void 0 ? _props$routesComponen : Routes;
|
|
38
38
|
return /* @__PURE__ */ React.createElement(ActualRoutes, props);
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { FaroRoutes };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=FaroRoutes.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies } from "./routerDependencies.js";
|
|
2
1
|
import { FaroRoutes } from "./FaroRoutes.js";
|
|
3
2
|
import { createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options, initializeReactRouterV6DataRouterInstrumentation, initializeReactRouterV6Instrumentation } from "./initialize.js";
|
|
3
|
+
import { setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies } from "./routerDependencies.js";
|
|
4
4
|
import { withFaroRouterInstrumentation } from "./withFaroRouterInstrumentation.js";
|
|
5
5
|
export { FaroRoutes, createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options, initializeReactRouterV6DataRouterInstrumentation, initializeReactRouterV6Instrumentation, setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies, withFaroRouterInstrumentation };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../types.js";
|
|
2
|
-
import { setReactRouterV6DataRouterDependencies, setReactRouterV6Dependencies } from "./routerDependencies.js";
|
|
3
2
|
import { FaroRoutes } from "./FaroRoutes.js";
|
|
3
|
+
import { setReactRouterV6DataRouterDependencies, setReactRouterV6Dependencies } from "./routerDependencies.js";
|
|
4
4
|
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
5
|
-
|
|
5
|
+
// src/router/v6v7/initialize.ts
|
|
6
6
|
function initializeReactRouterV6Instrumentation(dependencies) {
|
|
7
7
|
hoistNonReactStatics(FaroRoutes, dependencies.Routes);
|
|
8
8
|
setReactRouterV6Dependencies(dependencies);
|
|
@@ -34,7 +34,6 @@ function createReactRouterV7DataOptions(dependencies) {
|
|
|
34
34
|
dependencies
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
//#endregion
|
|
38
37
|
export { createReactRouterV6DataOptions, createReactRouterV6Options, createReactRouterV7DataOptions, createReactRouterV7Options, initializeReactRouterV6DataRouterInstrumentation, initializeReactRouterV6Instrumentation };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=initialize.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/router/v6v7/routerDependencies.ts
|
|
2
2
|
let isInitialized = false;
|
|
3
3
|
let createRoutesFromChildren;
|
|
4
4
|
let matchRoutes;
|
|
@@ -23,7 +23,6 @@ function setReactRouterV6DataRouterDependencies(newDependencies) {
|
|
|
23
23
|
function setReactRouterV7SSRDependencies(newDependencies) {
|
|
24
24
|
Routes = newDependencies.Routes;
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { Routes, createRoutesFromChildren, isInitialized, matchRoutes, setReactRouterV6DataRouterDependencies, setReactRouterV6Dependencies, setReactRouterV6SSRDependencies, setReactRouterV7SSRDependencies, useLocation, useNavigationType };
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=routerDependencies.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { matchRoutes } from "./routerDependencies.js";
|
|
2
|
-
|
|
2
|
+
// src/router/v6v7/utils.ts
|
|
3
3
|
function getNumberOfUrlSegments(url) {
|
|
4
4
|
return url.split(/\\?\//).filter((currentSegment) => currentSegment.length > 0 && currentSegment !== ",").length;
|
|
5
5
|
}
|
|
@@ -25,7 +25,6 @@ function getRouteFromLocation(routes, location) {
|
|
|
25
25
|
}
|
|
26
26
|
return location.pathname;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { getNumberOfUrlSegments, getRouteFromLocation };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=utils.js.map
|
|
@@ -2,9 +2,9 @@ import { api } from "../../dependencies.js";
|
|
|
2
2
|
import "../types.js";
|
|
3
3
|
import { isInitialized } from "./routerDependencies.js";
|
|
4
4
|
import { getRouteFromLocation } from "./utils.js";
|
|
5
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
5
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js";
|
|
6
6
|
import { EVENT_ROUTE_CHANGE, globalObject } from "@grafana/faro-web-sdk";
|
|
7
|
-
|
|
7
|
+
// src/router/v6v7/withFaroRouterInstrumentation.ts
|
|
8
8
|
/**
|
|
9
9
|
* To use with React Router 6.4 data APIs.
|
|
10
10
|
*/
|
|
@@ -30,7 +30,6 @@ function withFaroRouterInstrumentation(router) {
|
|
|
30
30
|
});
|
|
31
31
|
return router;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { withFaroRouterInstrumentation };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=withFaroRouterInstrumentation.js.map
|