@xyo-network/react-error 2.64.0-rc.3 → 2.64.0-rc.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.mts.map +1 -0
  2. package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.ts.map +1 -0
  3. package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js +39 -0
  4. package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -0
  5. package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.stories.js +26 -0
  6. package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.stories.js.map +1 -0
  7. package/dist/browser/components/ErrorBoundary/index.d.mts.map +1 -0
  8. package/dist/browser/components/ErrorBoundary/index.d.ts.map +1 -0
  9. package/dist/browser/components/ErrorBoundary/index.js +2 -0
  10. package/dist/browser/components/ErrorBoundary/index.js.map +1 -0
  11. package/dist/browser/components/ErrorRender/ErrorAlert.d.mts.map +1 -0
  12. package/dist/browser/components/ErrorRender/ErrorAlert.d.ts.map +1 -0
  13. package/dist/browser/components/ErrorRender/ErrorAlert.js +17 -0
  14. package/dist/browser/components/ErrorRender/ErrorAlert.js.map +1 -0
  15. package/dist/browser/components/ErrorRender/Props.d.mts.map +1 -0
  16. package/dist/browser/components/ErrorRender/Props.d.ts.map +1 -0
  17. package/dist/browser/components/ErrorRender/Props.js +1 -0
  18. package/dist/browser/components/ErrorRender/Props.js.map +1 -0
  19. package/dist/browser/components/ErrorRender/Render.d.mts.map +1 -0
  20. package/dist/browser/components/ErrorRender/Render.d.ts.map +1 -0
  21. package/dist/browser/components/ErrorRender/Render.js +32 -0
  22. package/dist/browser/components/ErrorRender/Render.js.map +1 -0
  23. package/dist/browser/components/ErrorRender/index.d.mts.map +1 -0
  24. package/dist/browser/components/ErrorRender/index.d.ts.map +1 -0
  25. package/dist/browser/components/ErrorRender/index.js +4 -0
  26. package/dist/browser/components/ErrorRender/index.js.map +1 -0
  27. package/dist/browser/components/index.d.mts.map +1 -0
  28. package/dist/browser/components/index.d.ts.map +1 -0
  29. package/dist/browser/components/index.js +3 -0
  30. package/dist/browser/components/index.js.map +1 -0
  31. package/dist/browser/contexts/ErrorReporter/Context.d.mts.map +1 -0
  32. package/dist/browser/contexts/ErrorReporter/Context.d.ts.map +1 -0
  33. package/dist/browser/contexts/ErrorReporter/Context.js +6 -0
  34. package/dist/browser/contexts/ErrorReporter/Context.js.map +1 -0
  35. package/dist/browser/contexts/ErrorReporter/Provider.d.mts.map +1 -0
  36. package/dist/browser/contexts/ErrorReporter/Provider.d.ts.map +1 -0
  37. package/dist/browser/contexts/ErrorReporter/Provider.js +16 -0
  38. package/dist/browser/contexts/ErrorReporter/Provider.js.map +1 -0
  39. package/dist/browser/contexts/ErrorReporter/Provider.stories.js +35 -0
  40. package/dist/browser/contexts/ErrorReporter/Provider.stories.js.map +1 -0
  41. package/dist/browser/contexts/ErrorReporter/State.d.mts.map +1 -0
  42. package/dist/browser/contexts/ErrorReporter/State.d.ts.map +1 -0
  43. package/dist/browser/contexts/ErrorReporter/State.js +1 -0
  44. package/dist/browser/contexts/ErrorReporter/State.js.map +1 -0
  45. package/dist/browser/contexts/ErrorReporter/index.d.mts.map +1 -0
  46. package/dist/browser/contexts/ErrorReporter/index.d.ts.map +1 -0
  47. package/dist/browser/contexts/ErrorReporter/index.js +4 -0
  48. package/dist/browser/contexts/ErrorReporter/index.js.map +1 -0
  49. package/dist/browser/contexts/ErrorReporter/useRollbar.d.mts.map +1 -0
  50. package/dist/browser/contexts/ErrorReporter/useRollbar.d.ts.map +1 -0
  51. package/dist/browser/contexts/ErrorReporter/useRollbar.js +13 -0
  52. package/dist/browser/contexts/ErrorReporter/useRollbar.js.map +1 -0
  53. package/dist/browser/contexts/index.d.mts.map +1 -0
  54. package/dist/browser/contexts/index.d.ts.map +1 -0
  55. package/dist/browser/contexts/index.js +2 -0
  56. package/dist/browser/contexts/index.js.map +1 -0
  57. package/dist/browser/index.d.mts.map +1 -0
  58. package/dist/browser/index.d.ts.map +1 -0
  59. package/dist/browser/index.js +3 -0
  60. package/dist/browser/index.js.map +1 -0
  61. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.mts +21 -0
  62. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.mts.map +1 -0
  63. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.ts +21 -0
  64. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.ts.map +1 -0
  65. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js +63 -0
  66. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -0
  67. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.mjs +39 -0
  68. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.mjs.map +1 -0
  69. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.js +51 -0
  70. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.js.map +1 -0
  71. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.mjs +26 -0
  72. package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.mjs.map +1 -0
  73. package/dist/node/components/ErrorBoundary/index.d.mts +2 -0
  74. package/dist/node/components/ErrorBoundary/index.d.mts.map +1 -0
  75. package/dist/node/components/ErrorBoundary/index.d.ts +2 -0
  76. package/dist/node/components/ErrorBoundary/index.d.ts.map +1 -0
  77. package/dist/node/components/ErrorBoundary/index.js +23 -0
  78. package/dist/node/components/ErrorBoundary/index.js.map +1 -0
  79. package/dist/node/components/ErrorBoundary/index.mjs +2 -0
  80. package/dist/node/components/ErrorBoundary/index.mjs.map +1 -0
  81. package/dist/node/components/ErrorRender/ErrorAlert.d.mts +10 -0
  82. package/dist/node/components/ErrorRender/ErrorAlert.d.mts.map +1 -0
  83. package/dist/node/components/ErrorRender/ErrorAlert.d.ts +10 -0
  84. package/dist/node/components/ErrorRender/ErrorAlert.d.ts.map +1 -0
  85. package/dist/node/components/ErrorRender/ErrorAlert.js +41 -0
  86. package/dist/node/components/ErrorRender/ErrorAlert.js.map +1 -0
  87. package/dist/node/components/ErrorRender/ErrorAlert.mjs +17 -0
  88. package/dist/node/components/ErrorRender/ErrorAlert.mjs.map +1 -0
  89. package/dist/node/components/ErrorRender/Props.d.mts +12 -0
  90. package/dist/node/components/ErrorRender/Props.d.mts.map +1 -0
  91. package/dist/node/components/ErrorRender/Props.d.ts +12 -0
  92. package/dist/node/components/ErrorRender/Props.d.ts.map +1 -0
  93. package/dist/node/components/ErrorRender/Props.js +17 -0
  94. package/dist/node/components/ErrorRender/Props.js.map +1 -0
  95. package/dist/node/components/ErrorRender/Props.mjs +1 -0
  96. package/dist/node/components/ErrorRender/Props.mjs.map +1 -0
  97. package/dist/node/components/ErrorRender/Render.d.mts +4 -0
  98. package/dist/node/components/ErrorRender/Render.d.mts.map +1 -0
  99. package/dist/node/components/ErrorRender/Render.d.ts +4 -0
  100. package/dist/node/components/ErrorRender/Render.d.ts.map +1 -0
  101. package/dist/node/components/ErrorRender/Render.js +56 -0
  102. package/dist/node/components/ErrorRender/Render.js.map +1 -0
  103. package/dist/node/components/ErrorRender/Render.mjs +32 -0
  104. package/dist/node/components/ErrorRender/Render.mjs.map +1 -0
  105. package/dist/node/components/ErrorRender/index.d.mts +4 -0
  106. package/dist/node/components/ErrorRender/index.d.mts.map +1 -0
  107. package/dist/node/components/ErrorRender/index.d.ts +4 -0
  108. package/dist/node/components/ErrorRender/index.d.ts.map +1 -0
  109. package/dist/node/components/ErrorRender/index.js +27 -0
  110. package/dist/node/components/ErrorRender/index.js.map +1 -0
  111. package/dist/node/components/ErrorRender/index.mjs +4 -0
  112. package/dist/node/components/ErrorRender/index.mjs.map +1 -0
  113. package/dist/node/components/index.d.mts +3 -0
  114. package/dist/node/components/index.d.mts.map +1 -0
  115. package/dist/node/components/index.d.ts +3 -0
  116. package/dist/node/components/index.d.ts.map +1 -0
  117. package/dist/node/components/index.js +25 -0
  118. package/dist/node/components/index.js.map +1 -0
  119. package/dist/node/components/index.mjs +3 -0
  120. package/dist/node/components/index.mjs.map +1 -0
  121. package/dist/node/contexts/ErrorReporter/Context.d.mts +4 -0
  122. package/dist/node/contexts/ErrorReporter/Context.d.mts.map +1 -0
  123. package/dist/node/contexts/ErrorReporter/Context.d.ts +4 -0
  124. package/dist/node/contexts/ErrorReporter/Context.d.ts.map +1 -0
  125. package/dist/node/contexts/ErrorReporter/Context.js +30 -0
  126. package/dist/node/contexts/ErrorReporter/Context.js.map +1 -0
  127. package/dist/node/contexts/ErrorReporter/Context.mjs +6 -0
  128. package/dist/node/contexts/ErrorReporter/Context.mjs.map +1 -0
  129. package/dist/node/contexts/ErrorReporter/Provider.d.mts +9 -0
  130. package/dist/node/contexts/ErrorReporter/Provider.d.mts.map +1 -0
  131. package/dist/node/contexts/ErrorReporter/Provider.d.ts +9 -0
  132. package/dist/node/contexts/ErrorReporter/Provider.d.ts.map +1 -0
  133. package/dist/node/contexts/ErrorReporter/Provider.js +40 -0
  134. package/dist/node/contexts/ErrorReporter/Provider.js.map +1 -0
  135. package/dist/node/contexts/ErrorReporter/Provider.mjs +16 -0
  136. package/dist/node/contexts/ErrorReporter/Provider.mjs.map +1 -0
  137. package/dist/node/contexts/ErrorReporter/Provider.stories.js +69 -0
  138. package/dist/node/contexts/ErrorReporter/Provider.stories.js.map +1 -0
  139. package/dist/node/contexts/ErrorReporter/Provider.stories.mjs +35 -0
  140. package/dist/node/contexts/ErrorReporter/Provider.stories.mjs.map +1 -0
  141. package/dist/node/contexts/ErrorReporter/State.d.mts +5 -0
  142. package/dist/node/contexts/ErrorReporter/State.d.mts.map +1 -0
  143. package/dist/node/contexts/ErrorReporter/State.d.ts +5 -0
  144. package/dist/node/contexts/ErrorReporter/State.d.ts.map +1 -0
  145. package/dist/node/contexts/ErrorReporter/State.js +17 -0
  146. package/dist/node/contexts/ErrorReporter/State.js.map +1 -0
  147. package/dist/node/contexts/ErrorReporter/State.mjs +1 -0
  148. package/dist/node/contexts/ErrorReporter/State.mjs.map +1 -0
  149. package/dist/node/contexts/ErrorReporter/index.d.mts +4 -0
  150. package/dist/node/contexts/ErrorReporter/index.d.mts.map +1 -0
  151. package/dist/node/contexts/ErrorReporter/index.d.ts +4 -0
  152. package/dist/node/contexts/ErrorReporter/index.d.ts.map +1 -0
  153. package/dist/node/contexts/ErrorReporter/index.js +27 -0
  154. package/dist/node/contexts/ErrorReporter/index.js.map +1 -0
  155. package/dist/node/contexts/ErrorReporter/index.mjs +4 -0
  156. package/dist/node/contexts/ErrorReporter/index.mjs.map +1 -0
  157. package/dist/node/contexts/ErrorReporter/useRollbar.d.mts +3 -0
  158. package/dist/node/contexts/ErrorReporter/useRollbar.d.mts.map +1 -0
  159. package/dist/node/contexts/ErrorReporter/useRollbar.d.ts +3 -0
  160. package/dist/node/contexts/ErrorReporter/useRollbar.d.ts.map +1 -0
  161. package/dist/node/contexts/ErrorReporter/useRollbar.js +37 -0
  162. package/dist/node/contexts/ErrorReporter/useRollbar.js.map +1 -0
  163. package/dist/node/contexts/ErrorReporter/useRollbar.mjs +13 -0
  164. package/dist/node/contexts/ErrorReporter/useRollbar.mjs.map +1 -0
  165. package/dist/node/contexts/index.d.mts +2 -0
  166. package/dist/node/contexts/index.d.mts.map +1 -0
  167. package/dist/node/contexts/index.d.ts +2 -0
  168. package/dist/node/contexts/index.d.ts.map +1 -0
  169. package/dist/node/contexts/index.js +23 -0
  170. package/dist/node/contexts/index.js.map +1 -0
  171. package/dist/node/contexts/index.mjs +2 -0
  172. package/dist/node/contexts/index.mjs.map +1 -0
  173. package/dist/node/index.d.mts +3 -0
  174. package/dist/node/index.d.mts.map +1 -0
  175. package/dist/node/index.d.ts +3 -0
  176. package/dist/node/index.d.ts.map +1 -0
  177. package/dist/node/index.js +25 -0
  178. package/dist/node/index.js.map +1 -0
  179. package/dist/node/index.mjs +3 -0
  180. package/dist/node/index.mjs.map +1 -0
  181. package/package.json +20 -20
  182. package/dist/components/ErrorBoundary/ThrownErrorBoundary.d.mts.map +0 -1
  183. package/dist/components/ErrorBoundary/ThrownErrorBoundary.d.ts.map +0 -1
  184. package/dist/components/ErrorBoundary/ThrownErrorBoundary.stories.d.mts +0 -7
  185. package/dist/components/ErrorBoundary/ThrownErrorBoundary.stories.d.mts.map +0 -1
  186. package/dist/components/ErrorBoundary/ThrownErrorBoundary.stories.d.ts +0 -7
  187. package/dist/components/ErrorBoundary/ThrownErrorBoundary.stories.d.ts.map +0 -1
  188. package/dist/components/ErrorBoundary/index.d.mts.map +0 -1
  189. package/dist/components/ErrorBoundary/index.d.ts.map +0 -1
  190. package/dist/components/ErrorRender/ErrorAlert.d.mts.map +0 -1
  191. package/dist/components/ErrorRender/ErrorAlert.d.ts.map +0 -1
  192. package/dist/components/ErrorRender/Props.d.mts.map +0 -1
  193. package/dist/components/ErrorRender/Props.d.ts.map +0 -1
  194. package/dist/components/ErrorRender/Render.d.mts.map +0 -1
  195. package/dist/components/ErrorRender/Render.d.ts.map +0 -1
  196. package/dist/components/ErrorRender/index.d.mts.map +0 -1
  197. package/dist/components/ErrorRender/index.d.ts.map +0 -1
  198. package/dist/components/index.d.mts.map +0 -1
  199. package/dist/components/index.d.ts.map +0 -1
  200. package/dist/contexts/ErrorReporter/Context.d.mts.map +0 -1
  201. package/dist/contexts/ErrorReporter/Context.d.ts.map +0 -1
  202. package/dist/contexts/ErrorReporter/Provider.d.mts.map +0 -1
  203. package/dist/contexts/ErrorReporter/Provider.d.ts.map +0 -1
  204. package/dist/contexts/ErrorReporter/Provider.stories.d.mts +0 -10
  205. package/dist/contexts/ErrorReporter/Provider.stories.d.mts.map +0 -1
  206. package/dist/contexts/ErrorReporter/Provider.stories.d.ts +0 -10
  207. package/dist/contexts/ErrorReporter/Provider.stories.d.ts.map +0 -1
  208. package/dist/contexts/ErrorReporter/State.d.mts.map +0 -1
  209. package/dist/contexts/ErrorReporter/State.d.ts.map +0 -1
  210. package/dist/contexts/ErrorReporter/index.d.mts.map +0 -1
  211. package/dist/contexts/ErrorReporter/index.d.ts.map +0 -1
  212. package/dist/contexts/ErrorReporter/useRollbar.d.mts.map +0 -1
  213. package/dist/contexts/ErrorReporter/useRollbar.d.ts.map +0 -1
  214. package/dist/contexts/index.d.mts.map +0 -1
  215. package/dist/contexts/index.d.ts.map +0 -1
  216. package/dist/index.d.mts.map +0 -1
  217. package/dist/index.d.ts.map +0 -1
  218. package/dist/index.js +0 -149
  219. package/dist/index.js.map +0 -1
  220. package/dist/index.mjs +0 -118
  221. package/dist/index.mjs.map +0 -1
  222. /package/dist/{components → browser/components}/ErrorBoundary/ThrownErrorBoundary.d.mts +0 -0
  223. /package/dist/{components → browser/components}/ErrorBoundary/ThrownErrorBoundary.d.ts +0 -0
  224. /package/dist/{components → browser/components}/ErrorBoundary/index.d.mts +0 -0
  225. /package/dist/{components → browser/components}/ErrorBoundary/index.d.ts +0 -0
  226. /package/dist/{components → browser/components}/ErrorRender/ErrorAlert.d.mts +0 -0
  227. /package/dist/{components → browser/components}/ErrorRender/ErrorAlert.d.ts +0 -0
  228. /package/dist/{components → browser/components}/ErrorRender/Props.d.mts +0 -0
  229. /package/dist/{components → browser/components}/ErrorRender/Props.d.ts +0 -0
  230. /package/dist/{components → browser/components}/ErrorRender/Render.d.mts +0 -0
  231. /package/dist/{components → browser/components}/ErrorRender/Render.d.ts +0 -0
  232. /package/dist/{components → browser/components}/ErrorRender/index.d.mts +0 -0
  233. /package/dist/{components → browser/components}/ErrorRender/index.d.ts +0 -0
  234. /package/dist/{components → browser/components}/index.d.mts +0 -0
  235. /package/dist/{components → browser/components}/index.d.ts +0 -0
  236. /package/dist/{contexts → browser/contexts}/ErrorReporter/Context.d.mts +0 -0
  237. /package/dist/{contexts → browser/contexts}/ErrorReporter/Context.d.ts +0 -0
  238. /package/dist/{contexts → browser/contexts}/ErrorReporter/Provider.d.mts +0 -0
  239. /package/dist/{contexts → browser/contexts}/ErrorReporter/Provider.d.ts +0 -0
  240. /package/dist/{contexts → browser/contexts}/ErrorReporter/State.d.mts +0 -0
  241. /package/dist/{contexts → browser/contexts}/ErrorReporter/State.d.ts +0 -0
  242. /package/dist/{contexts → browser/contexts}/ErrorReporter/index.d.mts +0 -0
  243. /package/dist/{contexts → browser/contexts}/ErrorReporter/index.d.ts +0 -0
  244. /package/dist/{contexts → browser/contexts}/ErrorReporter/useRollbar.d.mts +0 -0
  245. /package/dist/{contexts → browser/contexts}/ErrorReporter/useRollbar.d.ts +0 -0
  246. /package/dist/{contexts → browser/contexts}/index.d.mts +0 -0
  247. /package/dist/{contexts → browser/contexts}/index.d.ts +0 -0
  248. /package/dist/{index.d.mts → browser/index.d.mts} +0 -0
  249. /package/dist/{index.d.ts → browser/index.d.ts} +0 -0
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var ThrownErrorBoundary_stories_exports = {};
20
+ __export(ThrownErrorBoundary_stories_exports, {
21
+ CustomErrorComponent: () => CustomErrorComponent,
22
+ Default: () => Default,
23
+ default: () => ThrownErrorBoundary_stories_default
24
+ });
25
+ module.exports = __toCommonJS(ThrownErrorBoundary_stories_exports);
26
+ var import_jsx_runtime = require("react/jsx-runtime");
27
+ var import_material = require("@mui/material");
28
+ var import_ThrownErrorBoundary = require("./ThrownErrorBoundary");
29
+ const StorybookEntry = {
30
+ component: import_ThrownErrorBoundary.ThrownErrorBoundary,
31
+ title: "auth-service/ApiBoundary/ThrownErrorBoundary"
32
+ };
33
+ const Template = ({ errorComponent }) => {
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThrownErrorBoundary.ThrownErrorBoundary, { errorComponent, boundaryName: "StoryBook", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Alert, { severity: "info", children: "Use React Dev Tools to trigger and error within the boundary" }) });
35
+ };
36
+ const Default = Template.bind({});
37
+ Default.args = {};
38
+ const CustomErrorComponent = Template.bind({});
39
+ CustomErrorComponent.args = {
40
+ errorComponent: (e) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Alert, { severity: "error", children: [
41
+ "Using Custom Error Component with error: ",
42
+ e.message
43
+ ] })
44
+ };
45
+ var ThrownErrorBoundary_stories_default = StorybookEntry;
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ CustomErrorComponent,
49
+ Default
50
+ });
51
+ //# sourceMappingURL=ThrownErrorBoundary.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { Alert } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\n\nimport { ThrownErrorBoundary } from './ThrownErrorBoundary'\n\nconst StorybookEntry: Meta = {\n component: ThrownErrorBoundary,\n title: 'auth-service/ApiBoundary/ThrownErrorBoundary',\n}\n\nconst Template: StoryFn<typeof ThrownErrorBoundary> = ({ errorComponent }) => {\n return (\n <ThrownErrorBoundary errorComponent={errorComponent} boundaryName=\"StoryBook\">\n <Alert severity=\"info\">Use React Dev Tools to trigger and error within the boundary</Alert>\n </ThrownErrorBoundary>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst CustomErrorComponent = Template.bind({})\nCustomErrorComponent.args = {\n errorComponent: (e) => <Alert severity=\"error\">Using Custom Error Component with error: {e.message}</Alert>,\n}\n\nexport { CustomErrorComponent, Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcM;AAbN,sBAAsB;AAGtB,iCAAoC;AAEpC,MAAM,iBAAuB;AAAA,EAC3B,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAAgD,CAAC,EAAE,eAAe,MAAM;AAC5E,SACE,4CAAC,kDAAoB,gBAAgC,cAAa,aAChE,sDAAC,yBAAM,UAAS,QAAO,0EAA4D,GACrF;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,uBAAuB,SAAS,KAAK,CAAC,CAAC;AAC7C,qBAAqB,OAAO;AAAA,EAC1B,gBAAgB,CAAC,MAAM,6CAAC,yBAAM,UAAS,SAAQ;AAAA;AAAA,IAA0C,EAAE;AAAA,KAAQ;AACrG;AAKA,IAAO,sCAAQ;","names":[]}
@@ -0,0 +1,26 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Alert } from "@mui/material";
3
+ import { ThrownErrorBoundary } from "./ThrownErrorBoundary";
4
+ const StorybookEntry = {
5
+ component: ThrownErrorBoundary,
6
+ title: "auth-service/ApiBoundary/ThrownErrorBoundary"
7
+ };
8
+ const Template = ({ errorComponent }) => {
9
+ return /* @__PURE__ */ jsx(ThrownErrorBoundary, { errorComponent, boundaryName: "StoryBook", children: /* @__PURE__ */ jsx(Alert, { severity: "info", children: "Use React Dev Tools to trigger and error within the boundary" }) });
10
+ };
11
+ const Default = Template.bind({});
12
+ Default.args = {};
13
+ const CustomErrorComponent = Template.bind({});
14
+ CustomErrorComponent.args = {
15
+ errorComponent: (e) => /* @__PURE__ */ jsxs(Alert, { severity: "error", children: [
16
+ "Using Custom Error Component with error: ",
17
+ e.message
18
+ ] })
19
+ };
20
+ var ThrownErrorBoundary_stories_default = StorybookEntry;
21
+ export {
22
+ CustomErrorComponent,
23
+ Default,
24
+ ThrownErrorBoundary_stories_default as default
25
+ };
26
+ //# sourceMappingURL=ThrownErrorBoundary.stories.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { Alert } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\n\nimport { ThrownErrorBoundary } from './ThrownErrorBoundary'\n\nconst StorybookEntry: Meta = {\n component: ThrownErrorBoundary,\n title: 'auth-service/ApiBoundary/ThrownErrorBoundary',\n}\n\nconst Template: StoryFn<typeof ThrownErrorBoundary> = ({ errorComponent }) => {\n return (\n <ThrownErrorBoundary errorComponent={errorComponent} boundaryName=\"StoryBook\">\n <Alert severity=\"info\">Use React Dev Tools to trigger and error within the boundary</Alert>\n </ThrownErrorBoundary>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst CustomErrorComponent = Template.bind({})\nCustomErrorComponent.args = {\n errorComponent: (e) => <Alert severity=\"error\">Using Custom Error Component with error: {e.message}</Alert>,\n}\n\nexport { CustomErrorComponent, Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAcM,cAUmB,YAVnB;AAbN,SAAS,aAAa;AAGtB,SAAS,2BAA2B;AAEpC,MAAM,iBAAuB;AAAA,EAC3B,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAAgD,CAAC,EAAE,eAAe,MAAM;AAC5E,SACE,oBAAC,uBAAoB,gBAAgC,cAAa,aAChE,8BAAC,SAAM,UAAS,QAAO,0EAA4D,GACrF;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,uBAAuB,SAAS,KAAK,CAAC,CAAC;AAC7C,qBAAqB,OAAO;AAAA,EAC1B,gBAAgB,CAAC,MAAM,qBAAC,SAAM,UAAS,SAAQ;AAAA;AAAA,IAA0C,EAAE;AAAA,KAAQ;AACrG;AAKA,IAAO,sCAAQ;","names":[]}
@@ -0,0 +1,2 @@
1
+ export * from './ThrownErrorBoundary';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './ThrownErrorBoundary';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var ErrorBoundary_exports = {};
17
+ module.exports = __toCommonJS(ErrorBoundary_exports);
18
+ __reExport(ErrorBoundary_exports, require("./ThrownErrorBoundary"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("./ThrownErrorBoundary")
22
+ });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorBoundary/index.ts"],"sourcesContent":["export * from './ThrownErrorBoundary'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kCAAc,kCAAd;","names":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./ThrownErrorBoundary";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorBoundary/index.ts"],"sourcesContent":["export * from './ThrownErrorBoundary'\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AlertProps } from '@mui/material';
3
+ import { ModuleError } from '@xyo-network/payload-model';
4
+ export interface ErrorAlertProps extends AlertProps {
5
+ error?: ModuleError | Error;
6
+ errorContext?: string;
7
+ onCancel?: () => void;
8
+ }
9
+ export declare const ErrorAlert: React.FC<ErrorAlertProps>;
10
+ //# sourceMappingURL=ErrorAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/ErrorAlert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAS,UAAU,EAA0B,MAAM,eAAe,CAAA;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoBhD,CAAA"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AlertProps } from '@mui/material';
3
+ import { ModuleError } from '@xyo-network/payload-model';
4
+ export interface ErrorAlertProps extends AlertProps {
5
+ error?: ModuleError | Error;
6
+ errorContext?: string;
7
+ onCancel?: () => void;
8
+ }
9
+ export declare const ErrorAlert: React.FC<ErrorAlertProps>;
10
+ //# sourceMappingURL=ErrorAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/ErrorAlert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAS,UAAU,EAA0B,MAAM,eAAe,CAAA;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoBhD,CAAA"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var ErrorAlert_exports = {};
20
+ __export(ErrorAlert_exports, {
21
+ ErrorAlert: () => ErrorAlert
22
+ });
23
+ module.exports = __toCommonJS(ErrorAlert_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_icons_material = require("@mui/icons-material");
26
+ var import_material = require("@mui/material");
27
+ var import_react_button = require("@xylabs/react-button");
28
+ const ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Alert, { severity: "error", ...props, children: [
30
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.AlertTitle, { children: "Whoops! Something went wrong" }),
31
+ errorContext ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", my: 0.5, lineHeight: "1", display: "block", children: errorContext }) : null,
32
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", mr: 0.5, fontWeight: "bold", children: "Error:" }),
33
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", children: error?.message }),
34
+ onCancel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_button.ButtonEx, { variant: "outlined", size: "small", onClick: onCancel, position: "absolute", style: { right: 8, top: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.ExitToApp, { fontSize: "small" }) }) : null
35
+ ] });
36
+ };
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ ErrorAlert
40
+ });
41
+ //# sourceMappingURL=ErrorAlert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/ErrorAlert.tsx"],"sourcesContent":["import { ExitToApp as ExitIcon } from '@mui/icons-material'\nimport { Alert, AlertProps, AlertTitle, Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ModuleError } from '@xyo-network/payload-model'\n\nexport interface ErrorAlertProps extends AlertProps {\n error?: ModuleError | Error\n errorContext?: string\n onCancel?: () => void\n}\n\nexport const ErrorAlert: React.FC<ErrorAlertProps> = ({ onCancel, error, errorContext, ...props }) => {\n return (\n <Alert severity=\"error\" {...props}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {errorContext ? (\n <Typography variant=\"caption\" my={0.5} lineHeight=\"1\" display=\"block\">\n {errorContext}\n </Typography>\n ) : null}\n <Typography variant=\"caption\" mr={0.5} fontWeight=\"bold\">\n Error:\n </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n {onCancel ? (\n <ButtonEx variant=\"outlined\" size=\"small\" onClick={onCancel} position=\"absolute\" style={{ right: 8, top: 8 }}>\n <ExitIcon fontSize=\"small\" />\n </ButtonEx>\n ) : null}\n </Alert>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaI;AAbJ,4BAAsC;AACtC,sBAA0D;AAC1D,0BAAyB;AASlB,MAAM,aAAwC,CAAC,EAAE,UAAU,OAAO,cAAc,GAAG,MAAM,MAAM;AACpG,SACE,6CAAC,yBAAM,UAAS,SAAS,GAAG,OAC1B;AAAA,gDAAC,8BAAW,0CAA4B;AAAA,IACvC,eACC,4CAAC,8BAAW,SAAQ,WAAU,IAAI,KAAK,YAAW,KAAI,SAAQ,SAC3D,wBACH,IACE;AAAA,IACJ,4CAAC,8BAAW,SAAQ,WAAU,IAAI,KAAK,YAAW,QAAO,oBAEzD;AAAA,IACA,4CAAC,8BAAW,SAAQ,WAAW,iBAAO,SAAQ;AAAA,IAC7C,WACC,4CAAC,gCAAS,SAAQ,YAAW,MAAK,SAAQ,SAAS,UAAU,UAAS,YAAW,OAAO,EAAE,OAAO,GAAG,KAAK,EAAE,GACzG,sDAAC,sBAAAA,WAAA,EAAS,UAAS,SAAQ,GAC7B,IACE;AAAA,KACN;AAEJ;","names":["ExitIcon"]}
@@ -0,0 +1,17 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { ExitToApp as ExitIcon } from "@mui/icons-material";
3
+ import { Alert, AlertTitle, Typography } from "@mui/material";
4
+ import { ButtonEx } from "@xylabs/react-button";
5
+ const ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
6
+ return /* @__PURE__ */ jsxs(Alert, { severity: "error", ...props, children: [
7
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Whoops! Something went wrong" }),
8
+ errorContext ? /* @__PURE__ */ jsx(Typography, { variant: "caption", my: 0.5, lineHeight: "1", display: "block", children: errorContext }) : null,
9
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", mr: 0.5, fontWeight: "bold", children: "Error:" }),
10
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: error?.message }),
11
+ onCancel ? /* @__PURE__ */ jsx(ButtonEx, { variant: "outlined", size: "small", onClick: onCancel, position: "absolute", style: { right: 8, top: 8 }, children: /* @__PURE__ */ jsx(ExitIcon, { fontSize: "small" }) }) : null
12
+ ] });
13
+ };
14
+ export {
15
+ ErrorAlert
16
+ };
17
+ //# sourceMappingURL=ErrorAlert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/ErrorAlert.tsx"],"sourcesContent":["import { ExitToApp as ExitIcon } from '@mui/icons-material'\nimport { Alert, AlertProps, AlertTitle, Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ModuleError } from '@xyo-network/payload-model'\n\nexport interface ErrorAlertProps extends AlertProps {\n error?: ModuleError | Error\n errorContext?: string\n onCancel?: () => void\n}\n\nexport const ErrorAlert: React.FC<ErrorAlertProps> = ({ onCancel, error, errorContext, ...props }) => {\n return (\n <Alert severity=\"error\" {...props}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {errorContext ? (\n <Typography variant=\"caption\" my={0.5} lineHeight=\"1\" display=\"block\">\n {errorContext}\n </Typography>\n ) : null}\n <Typography variant=\"caption\" mr={0.5} fontWeight=\"bold\">\n Error:\n </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n {onCancel ? (\n <ButtonEx variant=\"outlined\" size=\"small\" onClick={onCancel} position=\"absolute\" style={{ right: 8, top: 8 }}>\n <ExitIcon fontSize=\"small\" />\n </ButtonEx>\n ) : null}\n </Alert>\n )\n}\n"],"mappings":"AAaI,SACE,KADF;AAbJ,SAAS,aAAa,gBAAgB;AACtC,SAAS,OAAmB,YAAY,kBAAkB;AAC1D,SAAS,gBAAgB;AASlB,MAAM,aAAwC,CAAC,EAAE,UAAU,OAAO,cAAc,GAAG,MAAM,MAAM;AACpG,SACE,qBAAC,SAAM,UAAS,SAAS,GAAG,OAC1B;AAAA,wBAAC,cAAW,0CAA4B;AAAA,IACvC,eACC,oBAAC,cAAW,SAAQ,WAAU,IAAI,KAAK,YAAW,KAAI,SAAQ,SAC3D,wBACH,IACE;AAAA,IACJ,oBAAC,cAAW,SAAQ,WAAU,IAAI,KAAK,YAAW,QAAO,oBAEzD;AAAA,IACA,oBAAC,cAAW,SAAQ,WAAW,iBAAO,SAAQ;AAAA,IAC7C,WACC,oBAAC,YAAS,SAAQ,YAAW,MAAK,SAAQ,SAAS,UAAU,UAAS,YAAW,OAAO,EAAE,OAAO,GAAG,KAAK,EAAE,GACzG,8BAAC,YAAS,UAAS,SAAQ,GAC7B,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -0,0 +1,12 @@
1
+ import { FlexBoxProps } from '@xylabs/react-flexbox';
2
+ import { ModuleError } from '@xyo-network/payload-model';
3
+ import { ReactNode } from 'react';
4
+ export interface ErrorRenderProps extends FlexBoxProps {
5
+ customError?: ReactNode;
6
+ error?: ModuleError | Error;
7
+ errorContext?: string;
8
+ noErrorDisplay?: boolean;
9
+ noReAuth?: boolean;
10
+ onCancel?: () => void;
11
+ }
12
+ //# sourceMappingURL=Props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/Props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB"}
@@ -0,0 +1,12 @@
1
+ import { FlexBoxProps } from '@xylabs/react-flexbox';
2
+ import { ModuleError } from '@xyo-network/payload-model';
3
+ import { ReactNode } from 'react';
4
+ export interface ErrorRenderProps extends FlexBoxProps {
5
+ customError?: ReactNode;
6
+ error?: ModuleError | Error;
7
+ errorContext?: string;
8
+ noErrorDisplay?: boolean;
9
+ noReAuth?: boolean;
10
+ onCancel?: () => void;
11
+ }
12
+ //# sourceMappingURL=Props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/Props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var Props_exports = {};
16
+ module.exports = __toCommonJS(Props_exports);
17
+ //# sourceMappingURL=Props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/Props.ts"],"sourcesContent":["import { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { ModuleError } from '@xyo-network/payload-model'\nimport { ReactNode } from 'react'\n\nexport interface ErrorRenderProps extends FlexBoxProps {\n customError?: ReactNode\n error?: ModuleError | Error\n errorContext?: string\n noErrorDisplay?: boolean\n noReAuth?: boolean\n onCancel?: () => void\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=Props.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ErrorRenderProps } from './Props';
3
+ export declare const ErrorRender: React.FC<ErrorRenderProps>;
4
+ //# sourceMappingURL=Render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Render.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/Render.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkClD,CAAA"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ErrorRenderProps } from './Props';
3
+ export declare const ErrorRender: React.FC<ErrorRenderProps>;
4
+ //# sourceMappingURL=Render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Render.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/Render.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkClD,CAAA"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var Render_exports = {};
20
+ __export(Render_exports, {
21
+ ErrorRender: () => ErrorRender
22
+ });
23
+ module.exports = __toCommonJS(Render_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_react_flexbox = require("@xylabs/react-flexbox");
26
+ var import_react = require("react");
27
+ var import_react_router_dom = require("react-router-dom");
28
+ var import_ErrorAlert = require("./ErrorAlert");
29
+ const ErrorRender = ({
30
+ onCancel,
31
+ error,
32
+ noErrorDisplay = false,
33
+ customError = null,
34
+ children,
35
+ errorContext,
36
+ ...props
37
+ }) => {
38
+ const location = (0, import_react_router_dom.useLocation)();
39
+ (0, import_react.useEffect)(() => {
40
+ location.state = {
41
+ from: {
42
+ pathname: window.location.pathname
43
+ }
44
+ };
45
+ }, [location]);
46
+ if (error) {
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexCol, { alignItems: "stretch", ...props, children: noErrorDisplay ? customError : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexCol, { alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ErrorAlert.ErrorAlert, { error, errorContext, onCancel }) }) });
48
+ } else {
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }) ?? null;
50
+ }
51
+ };
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ ErrorRender
55
+ });
56
+ //# sourceMappingURL=Render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\n\nimport { ErrorAlert } from './ErrorAlert'\nimport { ErrorRenderProps } from './Props'\n\nexport const ErrorRender: React.FC<ErrorRenderProps> = ({\n onCancel,\n error,\n noErrorDisplay = false,\n customError = null,\n children,\n errorContext,\n ...props\n}) => {\n const location = useLocation()\n useEffect(() => {\n // ensure we end up at the same place we are now after logging in\n location.state = {\n from: {\n pathname: window.location.pathname,\n },\n }\n }, [location])\n\n if (error) {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n {noErrorDisplay ? (\n customError\n ) : (\n <FlexCol alignItems=\"center\" {...props}>\n <ErrorAlert error={error} errorContext={errorContext} onCancel={onCancel} />\n </FlexCol>\n )}\n </FlexCol>\n )\n } else {\n return <>{children}</> ?? null\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCY;AAjCZ,2BAAwB;AACxB,mBAA0B;AAC1B,8BAA4B;AAE5B,wBAA2B;AAGpB,MAAM,cAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,eAAW,qCAAY;AAC7B,8BAAU,MAAM;AAEd,aAAS,QAAQ;AAAA,MACf,MAAM;AAAA,QACJ,UAAU,OAAO,SAAS;AAAA,MAC5B;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,MAAI,OAAO;AACT,WACE,4CAAC,gCAAQ,YAAW,WAAW,GAAG,OAC/B,2BACC,cAEA,4CAAC,gCAAQ,YAAW,UAAU,GAAG,OAC/B,sDAAC,gCAAW,OAAc,cAA4B,UAAoB,GAC5E,GAEJ;AAAA,EAEJ,OAAO;AACL,WAAO,2EAAG,UAAS,KAAO;AAAA,EAC5B;AACF;","names":[]}
@@ -0,0 +1,32 @@
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { FlexCol } from "@xylabs/react-flexbox";
3
+ import { useEffect } from "react";
4
+ import { useLocation } from "react-router-dom";
5
+ import { ErrorAlert } from "./ErrorAlert";
6
+ const ErrorRender = ({
7
+ onCancel,
8
+ error,
9
+ noErrorDisplay = false,
10
+ customError = null,
11
+ children,
12
+ errorContext,
13
+ ...props
14
+ }) => {
15
+ const location = useLocation();
16
+ useEffect(() => {
17
+ location.state = {
18
+ from: {
19
+ pathname: window.location.pathname
20
+ }
21
+ };
22
+ }, [location]);
23
+ if (error) {
24
+ return /* @__PURE__ */ jsx(FlexCol, { alignItems: "stretch", ...props, children: noErrorDisplay ? customError : /* @__PURE__ */ jsx(FlexCol, { alignItems: "center", ...props, children: /* @__PURE__ */ jsx(ErrorAlert, { error, errorContext, onCancel }) }) });
25
+ } else {
26
+ return /* @__PURE__ */ jsx(Fragment, { children }) ?? null;
27
+ }
28
+ };
29
+ export {
30
+ ErrorRender
31
+ };
32
+ //# sourceMappingURL=Render.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\n\nimport { ErrorAlert } from './ErrorAlert'\nimport { ErrorRenderProps } from './Props'\n\nexport const ErrorRender: React.FC<ErrorRenderProps> = ({\n onCancel,\n error,\n noErrorDisplay = false,\n customError = null,\n children,\n errorContext,\n ...props\n}) => {\n const location = useLocation()\n useEffect(() => {\n // ensure we end up at the same place we are now after logging in\n location.state = {\n from: {\n pathname: window.location.pathname,\n },\n }\n }, [location])\n\n if (error) {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n {noErrorDisplay ? (\n customError\n ) : (\n <FlexCol alignItems=\"center\" {...props}>\n <ErrorAlert error={error} errorContext={errorContext} onCancel={onCancel} />\n </FlexCol>\n )}\n </FlexCol>\n )\n } else {\n return <>{children}</> ?? null\n }\n}\n"],"mappings":"AAiCY,SAMD,UANC;AAjCZ,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAE5B,SAAS,kBAAkB;AAGpB,MAAM,cAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,WAAW,YAAY;AAC7B,YAAU,MAAM;AAEd,aAAS,QAAQ;AAAA,MACf,MAAM;AAAA,QACJ,UAAU,OAAO,SAAS;AAAA,MAC5B;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,MAAI,OAAO;AACT,WACE,oBAAC,WAAQ,YAAW,WAAW,GAAG,OAC/B,2BACC,cAEA,oBAAC,WAAQ,YAAW,UAAU,GAAG,OAC/B,8BAAC,cAAW,OAAc,cAA4B,UAAoB,GAC5E,GAEJ;AAAA,EAEJ,OAAO;AACL,WAAO,gCAAG,UAAS,KAAO;AAAA,EAC5B;AACF;","names":[]}
@@ -0,0 +1,4 @@
1
+ export * from './ErrorAlert';
2
+ export * from './Props';
3
+ export * from './Render';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './ErrorAlert';
2
+ export * from './Props';
3
+ export * from './Render';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var ErrorRender_exports = {};
17
+ module.exports = __toCommonJS(ErrorRender_exports);
18
+ __reExport(ErrorRender_exports, require("./ErrorAlert"), module.exports);
19
+ __reExport(ErrorRender_exports, require("./Props"), module.exports);
20
+ __reExport(ErrorRender_exports, require("./Render"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("./ErrorAlert"),
24
+ ...require("./Props"),
25
+ ...require("./Render")
26
+ });
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/index.ts"],"sourcesContent":["export * from './ErrorAlert'\nexport * from './Props'\nexport * from './Render'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gCAAc,yBAAd;AACA,gCAAc,oBADd;AAEA,gCAAc,qBAFd;","names":[]}
@@ -0,0 +1,4 @@
1
+ export * from "./ErrorAlert";
2
+ export * from "./Props";
3
+ export * from "./Render";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ErrorRender/index.ts"],"sourcesContent":["export * from './ErrorAlert'\nexport * from './Props'\nexport * from './Render'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,3 @@
1
+ export * from './ErrorBoundary';
2
+ export * from './ErrorRender';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './ErrorBoundary';
2
+ export * from './ErrorRender';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var components_exports = {};
17
+ module.exports = __toCommonJS(components_exports);
18
+ __reExport(components_exports, require("./ErrorBoundary"), module.exports);
19
+ __reExport(components_exports, require("./ErrorRender"), module.exports);
20
+ // Annotate the CommonJS export names for ESM import in node:
21
+ 0 && (module.exports = {
22
+ ...require("./ErrorBoundary"),
23
+ ...require("./ErrorRender")
24
+ });
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './ErrorBoundary'\nexport * from './ErrorRender'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,4BAAd;AACA,+BAAc,0BADd;","names":[]}
@@ -0,0 +1,3 @@
1
+ export * from "./ErrorBoundary";
2
+ export * from "./ErrorRender";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './ErrorBoundary'\nexport * from './ErrorRender'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ErrorReporterContextState } from './State';
3
+ export declare const ErrorReporterContext: import("react").Context<ErrorReporterContextState>;
4
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAEnD,eAAO,MAAM,oBAAoB,oDAA+C,CAAA"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ErrorReporterContextState } from './State';
3
+ export declare const ErrorReporterContext: import("react").Context<ErrorReporterContextState>;
4
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAEnD,eAAO,MAAM,oBAAoB,oDAA+C,CAAA"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var Context_exports = {};
20
+ __export(Context_exports, {
21
+ ErrorReporterContext: () => ErrorReporterContext
22
+ });
23
+ module.exports = __toCommonJS(Context_exports);
24
+ var import_react = require("react");
25
+ const ErrorReporterContext = (0, import_react.createContext)({});
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ ErrorReporterContext
29
+ });
30
+ //# sourceMappingURL=Context.js.map