@xyo-network/react-error 2.64.0-rc.7 → 2.64.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.cjs +106 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.cjs.map +1 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.cts +21 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.cts.map +1 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js +52 -6
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -1
- package/dist/browser/components/ErrorBoundary/index.cjs +108 -0
- package/dist/browser/components/ErrorBoundary/index.cjs.map +1 -0
- package/dist/browser/components/ErrorBoundary/index.d.cts +2 -0
- package/dist/browser/components/ErrorBoundary/index.d.cts.map +1 -0
- package/dist/browser/components/ErrorBoundary/index.js +84 -1
- package/dist/browser/components/ErrorBoundary/index.js.map +1 -1
- package/dist/browser/components/ErrorRender/ErrorAlert.cjs +39 -0
- package/dist/{node/components/ErrorRender/ErrorAlert.mjs.map → browser/components/ErrorRender/ErrorAlert.cjs.map} +1 -1
- package/dist/browser/components/ErrorRender/ErrorAlert.d.cts +10 -0
- package/dist/browser/components/ErrorRender/ErrorAlert.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/ErrorAlert.js +3 -2
- package/dist/browser/components/ErrorRender/ErrorAlert.js.map +1 -1
- package/dist/browser/components/ErrorRender/Props.cjs +19 -0
- package/dist/browser/components/ErrorRender/Props.cjs.map +1 -0
- package/dist/browser/components/ErrorRender/Props.d.cts +12 -0
- package/dist/browser/components/ErrorRender/Props.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/Render.cjs +70 -0
- package/dist/browser/components/ErrorRender/Render.cjs.map +1 -0
- package/dist/browser/components/ErrorRender/Render.d.cts +4 -0
- package/dist/browser/components/ErrorRender/Render.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/Render.js +22 -5
- package/dist/browser/components/ErrorRender/Render.js.map +1 -1
- package/dist/browser/components/ErrorRender/index.cjs +71 -0
- package/dist/browser/components/ErrorRender/index.cjs.map +1 -0
- package/dist/browser/components/ErrorRender/index.d.cts +4 -0
- package/dist/browser/components/ErrorRender/index.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/index.js +47 -3
- package/dist/browser/components/ErrorRender/index.js.map +1 -1
- package/dist/browser/components/index.cjs +110 -0
- package/dist/browser/components/index.cjs.map +1 -0
- package/dist/browser/components/index.d.cts +3 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/components/index.js +86 -2
- package/dist/browser/components/index.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/Context.cjs +28 -0
- package/dist/{node/contexts/ErrorReporter/Context.mjs.map → browser/contexts/ErrorReporter/Context.cjs.map} +1 -1
- package/dist/browser/contexts/ErrorReporter/Context.d.cts +4 -0
- package/dist/browser/contexts/ErrorReporter/Context.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/Context.js +2 -1
- package/dist/browser/contexts/ErrorReporter/Context.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/Provider.cjs +43 -0
- package/dist/browser/contexts/ErrorReporter/Provider.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/Provider.d.cts +9 -0
- package/dist/browser/contexts/ErrorReporter/Provider.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/Provider.js +9 -3
- package/dist/browser/contexts/ErrorReporter/Provider.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/State.cjs +19 -0
- package/dist/browser/contexts/ErrorReporter/State.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/State.d.cts +5 -0
- package/dist/browser/contexts/ErrorReporter/State.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/index.cjs +56 -0
- package/dist/browser/contexts/ErrorReporter/index.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/index.d.cts +4 -0
- package/dist/browser/contexts/ErrorReporter/index.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/index.js +32 -3
- package/dist/browser/contexts/ErrorReporter/index.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/useRollbar.cjs +40 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.d.cts +3 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.js +8 -2
- package/dist/browser/contexts/ErrorReporter/useRollbar.js.map +1 -1
- package/dist/browser/contexts/index.cjs +56 -0
- package/dist/browser/contexts/index.cjs.map +1 -0
- package/dist/browser/contexts/index.d.cts +2 -0
- package/dist/browser/contexts/index.d.cts.map +1 -0
- package/dist/browser/contexts/index.js +32 -1
- package/dist/browser/contexts/index.js.map +1 -1
- package/dist/browser/index.cjs +141 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +3 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +117 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +25215 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.cjs +110 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.cjs.map +1 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.cts +21 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.cts.map +1 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js +55 -33
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -1
- package/dist/node/components/ErrorBoundary/index.cjs +112 -0
- package/dist/node/components/ErrorBoundary/index.cjs.map +1 -0
- package/dist/node/components/ErrorBoundary/index.d.cts +2 -0
- package/dist/node/components/ErrorBoundary/index.d.cts.map +1 -0
- package/dist/node/components/ErrorBoundary/index.js +82 -20
- package/dist/node/components/ErrorBoundary/index.js.map +1 -1
- package/dist/node/components/ErrorRender/ErrorAlert.cjs +43 -0
- package/dist/node/components/ErrorRender/ErrorAlert.cjs.map +1 -0
- package/dist/node/components/ErrorRender/ErrorAlert.d.cts +10 -0
- package/dist/node/components/ErrorRender/ErrorAlert.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/ErrorAlert.js +14 -37
- package/dist/node/components/ErrorRender/ErrorAlert.js.map +1 -1
- package/dist/node/components/ErrorRender/Props.cjs +19 -0
- package/dist/node/components/ErrorRender/Props.cjs.map +1 -0
- package/dist/node/components/ErrorRender/Props.d.cts +12 -0
- package/dist/node/components/ErrorRender/Props.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/Props.js +0 -16
- package/dist/node/components/ErrorRender/Props.js.map +1 -1
- package/dist/node/components/ErrorRender/Render.cjs +74 -0
- package/dist/node/components/ErrorRender/Render.cjs.map +1 -0
- package/dist/node/components/ErrorRender/Render.d.cts +4 -0
- package/dist/node/components/ErrorRender/Render.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/Render.js +28 -35
- package/dist/node/components/ErrorRender/Render.js.map +1 -1
- package/dist/node/components/ErrorRender/index.cjs +76 -0
- package/dist/node/components/ErrorRender/index.cjs.map +1 -0
- package/dist/node/components/ErrorRender/index.d.cts +4 -0
- package/dist/node/components/ErrorRender/index.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/index.js +45 -24
- package/dist/node/components/ErrorRender/index.js.map +1 -1
- package/dist/node/components/index.cjs +116 -0
- package/dist/node/components/index.cjs.map +1 -0
- package/dist/node/components/index.d.cts +3 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.js +84 -22
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/Context.cjs +32 -0
- package/dist/node/contexts/ErrorReporter/Context.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/Context.d.cts +4 -0
- package/dist/node/contexts/ErrorReporter/Context.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/Context.js +5 -28
- package/dist/node/contexts/ErrorReporter/Context.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/Provider.cjs +47 -0
- package/dist/node/contexts/ErrorReporter/Provider.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/Provider.d.cts +9 -0
- package/dist/node/contexts/ErrorReporter/Provider.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/Provider.js +15 -33
- package/dist/node/contexts/ErrorReporter/Provider.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/State.cjs +19 -0
- package/dist/node/contexts/ErrorReporter/State.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/State.d.cts +5 -0
- package/dist/node/contexts/ErrorReporter/State.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/State.js +0 -16
- package/dist/node/contexts/ErrorReporter/State.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/index.cjs +61 -0
- package/dist/node/contexts/ErrorReporter/index.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/index.d.cts +4 -0
- package/dist/node/contexts/ErrorReporter/index.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/index.js +30 -24
- package/dist/node/contexts/ErrorReporter/index.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/useRollbar.cjs +44 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.d.cts +3 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.js +12 -30
- package/dist/node/contexts/ErrorReporter/useRollbar.js.map +1 -1
- package/dist/node/contexts/index.cjs +61 -0
- package/dist/node/contexts/index.cjs.map +1 -0
- package/dist/node/contexts/index.d.cts +2 -0
- package/dist/node/contexts/index.d.cts.map +1 -0
- package/dist/node/contexts/index.js +30 -20
- package/dist/node/contexts/index.js.map +1 -1
- package/dist/node/index.cjs +149 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +3 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +115 -22
- package/dist/node/index.js.map +1 -1
- package/package.json +17 -17
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.stories.js +0 -26
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.stories.js.map +0 -1
- package/dist/browser/contexts/ErrorReporter/Provider.stories.js +0 -35
- package/dist/browser/contexts/ErrorReporter/Provider.stories.js.map +0 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.mjs +0 -39
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.mjs.map +0 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.js +0 -51
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.js.map +0 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.mjs +0 -26
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.mjs.map +0 -1
- package/dist/node/components/ErrorBoundary/index.mjs +0 -2
- package/dist/node/components/ErrorBoundary/index.mjs.map +0 -1
- package/dist/node/components/ErrorRender/ErrorAlert.mjs +0 -17
- package/dist/node/components/ErrorRender/Props.mjs +0 -1
- package/dist/node/components/ErrorRender/Props.mjs.map +0 -1
- package/dist/node/components/ErrorRender/Render.mjs +0 -32
- package/dist/node/components/ErrorRender/Render.mjs.map +0 -1
- package/dist/node/components/ErrorRender/index.mjs +0 -4
- package/dist/node/components/ErrorRender/index.mjs.map +0 -1
- package/dist/node/components/index.mjs +0 -3
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/Context.mjs +0 -6
- package/dist/node/contexts/ErrorReporter/Provider.mjs +0 -16
- package/dist/node/contexts/ErrorReporter/Provider.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/Provider.stories.js +0 -69
- package/dist/node/contexts/ErrorReporter/Provider.stories.js.map +0 -1
- package/dist/node/contexts/ErrorReporter/Provider.stories.mjs +0 -35
- package/dist/node/contexts/ErrorReporter/Provider.stories.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/State.mjs +0 -1
- package/dist/node/contexts/ErrorReporter/State.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/index.mjs +0 -4
- package/dist/node/contexts/ErrorReporter/index.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/useRollbar.mjs +0 -13
- package/dist/node/contexts/ErrorReporter/useRollbar.mjs.map +0 -1
- package/dist/node/contexts/index.mjs +0 -2
- package/dist/node/contexts/index.mjs.map +0 -1
- package/dist/node/index.mjs +0 -3
- package/dist/node/index.mjs.map +0 -1
@@ -1,69 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __create = Object.create;
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
-
var __export = (target, all) => {
|
9
|
-
for (var name in all)
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
-
};
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
-
for (let key of __getOwnPropNames(from))
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
-
}
|
18
|
-
return to;
|
19
|
-
};
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
-
mod
|
27
|
-
));
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var Provider_stories_exports = {};
|
30
|
-
__export(Provider_stories_exports, {
|
31
|
-
Default: () => Default,
|
32
|
-
default: () => Provider_stories_default
|
33
|
-
});
|
34
|
-
module.exports = __toCommonJS(Provider_stories_exports);
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
36
|
-
var import_material = require("@mui/material");
|
37
|
-
var import_rollbar = __toESM(require("rollbar"));
|
38
|
-
var import_Provider = require("./Provider");
|
39
|
-
var import_useRollbar = require("./useRollbar");
|
40
|
-
const StorybookEntry = {
|
41
|
-
argTypes: {},
|
42
|
-
component: import_Provider.ErrorReporterProvider,
|
43
|
-
parameters: {
|
44
|
-
docs: {
|
45
|
-
page: null
|
46
|
-
}
|
47
|
-
},
|
48
|
-
title: "auth-service/ErrorReporterProvider"
|
49
|
-
};
|
50
|
-
const RollbarComponent = () => {
|
51
|
-
const { rollbar } = (0, import_useRollbar.useRollbar)();
|
52
|
-
const rollbarFound = typeof rollbar?.error === "function";
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { color: rollbarFound ? "green" : "red", children: [
|
54
|
-
"Rollbar instance ",
|
55
|
-
rollbarFound ? "" : "NOT",
|
56
|
-
" found from context!"
|
57
|
-
] });
|
58
|
-
};
|
59
|
-
const Template = () => {
|
60
|
-
const rollbar = new import_rollbar.default();
|
61
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Provider.ErrorReporterProvider, { rollbar, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RollbarComponent, {}) });
|
62
|
-
};
|
63
|
-
const Default = Template.bind({});
|
64
|
-
var Provider_stories_default = StorybookEntry;
|
65
|
-
// Annotate the CommonJS export names for ESM import in node:
|
66
|
-
0 && (module.exports = {
|
67
|
-
Default
|
68
|
-
});
|
69
|
-
//# sourceMappingURL=Provider.stories.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/Provider.stories.tsx"],"sourcesContent":["import { Typography } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterProvider } from './Provider'\nimport { useRollbar } from './useRollbar'\n\nconst StorybookEntry = {\n argTypes: {},\n component: ErrorReporterProvider,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'auth-service/ErrorReporterProvider',\n} as Meta<typeof ErrorReporterProvider>\n\nconst RollbarComponent = () => {\n const { rollbar } = useRollbar()\n const rollbarFound = typeof rollbar?.error === 'function'\n\n return <Typography color={rollbarFound ? 'green' : 'red'}>Rollbar instance {rollbarFound ? '' : 'NOT'} found from context!</Typography>\n}\n\nconst Template: StoryFn<typeof ErrorReporterProvider> = () => {\n const rollbar = new Rollbar()\n return (\n <ErrorReporterProvider rollbar={rollbar}>\n <RollbarComponent />\n </ErrorReporterProvider>\n )\n}\n\nconst Default = Template.bind({})\n\nexport { Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBS;AAtBT,sBAA2B;AAE3B,qBAAoB;AAEpB,sBAAsC;AACtC,wBAA2B;AAE3B,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,mBAAmB,MAAM;AAC7B,QAAM,EAAE,QAAQ,QAAI,8BAAW;AAC/B,QAAM,eAAe,OAAO,SAAS,UAAU;AAE/C,SAAO,6CAAC,8BAAW,OAAO,eAAe,UAAU,OAAO;AAAA;AAAA,IAAkB,eAAe,KAAK;AAAA,IAAM;AAAA,KAAoB;AAC5H;AAEA,MAAM,WAAkD,MAAM;AAC5D,QAAM,UAAU,IAAI,eAAAA,QAAQ;AAC5B,SACE,4CAAC,yCAAsB,SACrB,sDAAC,oBAAiB,GACpB;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAKhC,IAAO,2BAAQ;","names":["Rollbar"]}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
2
|
-
import { Typography } from "@mui/material";
|
3
|
-
import Rollbar from "rollbar";
|
4
|
-
import { ErrorReporterProvider } from "./Provider";
|
5
|
-
import { useRollbar } from "./useRollbar";
|
6
|
-
const StorybookEntry = {
|
7
|
-
argTypes: {},
|
8
|
-
component: ErrorReporterProvider,
|
9
|
-
parameters: {
|
10
|
-
docs: {
|
11
|
-
page: null
|
12
|
-
}
|
13
|
-
},
|
14
|
-
title: "auth-service/ErrorReporterProvider"
|
15
|
-
};
|
16
|
-
const RollbarComponent = () => {
|
17
|
-
const { rollbar } = useRollbar();
|
18
|
-
const rollbarFound = typeof rollbar?.error === "function";
|
19
|
-
return /* @__PURE__ */ jsxs(Typography, { color: rollbarFound ? "green" : "red", children: [
|
20
|
-
"Rollbar instance ",
|
21
|
-
rollbarFound ? "" : "NOT",
|
22
|
-
" found from context!"
|
23
|
-
] });
|
24
|
-
};
|
25
|
-
const Template = () => {
|
26
|
-
const rollbar = new Rollbar();
|
27
|
-
return /* @__PURE__ */ jsx(ErrorReporterProvider, { rollbar, children: /* @__PURE__ */ jsx(RollbarComponent, {}) });
|
28
|
-
};
|
29
|
-
const Default = Template.bind({});
|
30
|
-
var Provider_stories_default = StorybookEntry;
|
31
|
-
export {
|
32
|
-
Default,
|
33
|
-
Provider_stories_default as default
|
34
|
-
};
|
35
|
-
//# sourceMappingURL=Provider.stories.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/Provider.stories.tsx"],"sourcesContent":["import { Typography } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterProvider } from './Provider'\nimport { useRollbar } from './useRollbar'\n\nconst StorybookEntry = {\n argTypes: {},\n component: ErrorReporterProvider,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'auth-service/ErrorReporterProvider',\n} as Meta<typeof ErrorReporterProvider>\n\nconst RollbarComponent = () => {\n const { rollbar } = useRollbar()\n const rollbarFound = typeof rollbar?.error === 'function'\n\n return <Typography color={rollbarFound ? 'green' : 'red'}>Rollbar instance {rollbarFound ? '' : 'NOT'} found from context!</Typography>\n}\n\nconst Template: StoryFn<typeof ErrorReporterProvider> = () => {\n const rollbar = new Rollbar()\n return (\n <ErrorReporterProvider rollbar={rollbar}>\n <RollbarComponent />\n </ErrorReporterProvider>\n )\n}\n\nconst Default = Template.bind({})\n\nexport { Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAsBS,SAOH,KAPG;AAtBT,SAAS,kBAAkB;AAE3B,OAAO,aAAa;AAEpB,SAAS,6BAA6B;AACtC,SAAS,kBAAkB;AAE3B,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,mBAAmB,MAAM;AAC7B,QAAM,EAAE,QAAQ,IAAI,WAAW;AAC/B,QAAM,eAAe,OAAO,SAAS,UAAU;AAE/C,SAAO,qBAAC,cAAW,OAAO,eAAe,UAAU,OAAO;AAAA;AAAA,IAAkB,eAAe,KAAK;AAAA,IAAM;AAAA,KAAoB;AAC5H;AAEA,MAAM,WAAkD,MAAM;AAC5D,QAAM,UAAU,IAAI,QAAQ;AAC5B,SACE,oBAAC,yBAAsB,SACrB,8BAAC,oBAAiB,GACpB;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAKhC,IAAO,2BAAQ;","names":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
//# sourceMappingURL=State.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/index.ts"],"sourcesContent":["export * from './Provider'\nexport * from './State'\nexport * from './useRollbar'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { useContext } from "react";
|
2
|
-
import { ErrorReporterContext } from "./Context";
|
3
|
-
const useRollbar = () => {
|
4
|
-
const context = useContext(ErrorReporterContext);
|
5
|
-
if (context === void 0) {
|
6
|
-
console.warn("useRollbar must be used within a ErrorReporterContext");
|
7
|
-
}
|
8
|
-
return context ?? {};
|
9
|
-
};
|
10
|
-
export {
|
11
|
-
useRollbar
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=useRollbar.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/useRollbar.tsx"],"sourcesContent":["import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":"AAAA,SAAS,kBAAkB;AAE3B,SAAS,4BAA4B;AAErC,MAAM,aAAa,MAAM;AACvB,QAAM,UAAU,WAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/contexts/index.ts"],"sourcesContent":["export * from './ErrorReporter'\n"],"mappings":"AAAA,cAAc;","names":[]}
|
package/dist/node/index.mjs
DELETED
package/dist/node/index.mjs.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\nexport * from './contexts'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|