@xyo-network/react-error 2.64.7 → 2.64.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.cjs +2 -2
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.cjs.map +1 -1
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js +1 -1
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -1
- package/dist/browser/components/ErrorBoundary/index.cjs +2 -2
- package/dist/browser/components/ErrorBoundary/index.cjs.map +1 -1
- package/dist/browser/components/ErrorBoundary/index.js +1 -1
- package/dist/browser/components/ErrorBoundary/index.js.map +1 -1
- package/dist/browser/components/ErrorRender/Render.cjs +2 -2
- package/dist/browser/components/ErrorRender/Render.cjs.map +1 -1
- package/dist/browser/components/ErrorRender/Render.js +1 -1
- package/dist/browser/components/ErrorRender/Render.js.map +1 -1
- package/dist/browser/components/ErrorRender/index.cjs +2 -2
- package/dist/browser/components/ErrorRender/index.cjs.map +1 -1
- package/dist/browser/components/ErrorRender/index.js +1 -1
- package/dist/browser/components/ErrorRender/index.js.map +1 -1
- package/dist/browser/components/index.cjs +2 -2
- package/dist/browser/components/index.cjs.map +1 -1
- package/dist/browser/components/index.js +1 -1
- package/dist/browser/components/index.js.map +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +44 -44
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.cjs +2 -2
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.cjs.map +1 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js +1 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -1
- package/dist/node/components/ErrorBoundary/index.cjs +2 -2
- package/dist/node/components/ErrorBoundary/index.cjs.map +1 -1
- package/dist/node/components/ErrorBoundary/index.js +1 -1
- package/dist/node/components/ErrorBoundary/index.js.map +1 -1
- package/dist/node/components/ErrorRender/Render.cjs +2 -2
- package/dist/node/components/ErrorRender/Render.cjs.map +1 -1
- package/dist/node/components/ErrorRender/Render.js +1 -1
- package/dist/node/components/ErrorRender/Render.js.map +1 -1
- package/dist/node/components/ErrorRender/index.cjs +2 -2
- package/dist/node/components/ErrorRender/index.cjs.map +1 -1
- package/dist/node/components/ErrorRender/index.js +1 -1
- package/dist/node/components/ErrorRender/index.js.map +1 -1
- package/dist/node/components/index.cjs +2 -2
- package/dist/node/components/index.cjs.map +1 -1
- package/dist/node/components/index.js +1 -1
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/ErrorRender/Render.tsx +1 -1
package/dist/docs.json
CHANGED
@@ -194,7 +194,7 @@
|
|
194
194
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
195
195
|
"line": 20,
|
196
196
|
"character": 18,
|
197
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
197
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L20"
|
198
198
|
}
|
199
199
|
],
|
200
200
|
"type": {
|
@@ -223,7 +223,7 @@
|
|
223
223
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
224
224
|
"line": 34,
|
225
225
|
"character": 18,
|
226
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
226
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L34"
|
227
227
|
}
|
228
228
|
],
|
229
229
|
"signatures": [
|
@@ -238,7 +238,7 @@
|
|
238
238
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
239
239
|
"line": 34,
|
240
240
|
"character": 18,
|
241
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
241
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L34"
|
242
242
|
}
|
243
243
|
],
|
244
244
|
"parameters": [
|
@@ -306,7 +306,7 @@
|
|
306
306
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
307
307
|
"line": 46,
|
308
308
|
"character": 18,
|
309
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
309
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L46"
|
310
310
|
}
|
311
311
|
],
|
312
312
|
"signatures": [
|
@@ -321,7 +321,7 @@
|
|
321
321
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
322
322
|
"line": 46,
|
323
323
|
"character": 18,
|
324
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
324
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L46"
|
325
325
|
}
|
326
326
|
],
|
327
327
|
"type": {
|
@@ -406,7 +406,7 @@
|
|
406
406
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
407
407
|
"line": 24,
|
408
408
|
"character": 9,
|
409
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
409
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L24"
|
410
410
|
}
|
411
411
|
],
|
412
412
|
"signatures": [
|
@@ -421,7 +421,7 @@
|
|
421
421
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
422
422
|
"line": 24,
|
423
423
|
"character": 9,
|
424
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
424
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L24"
|
425
425
|
}
|
426
426
|
],
|
427
427
|
"parameters": [
|
@@ -465,7 +465,7 @@
|
|
465
465
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
466
466
|
"line": 28,
|
467
467
|
"character": 16,
|
468
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
468
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L28"
|
469
469
|
}
|
470
470
|
],
|
471
471
|
"signatures": [
|
@@ -480,7 +480,7 @@
|
|
480
480
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
481
481
|
"line": 28,
|
482
482
|
"character": 16,
|
483
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
483
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L28"
|
484
484
|
}
|
485
485
|
],
|
486
486
|
"parameters": [
|
@@ -618,7 +618,7 @@
|
|
618
618
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
619
619
|
"line": 19,
|
620
620
|
"character": 13,
|
621
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
621
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L19"
|
622
622
|
}
|
623
623
|
],
|
624
624
|
"extendedTypes": [
|
@@ -668,7 +668,7 @@
|
|
668
668
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
669
669
|
"line": 7,
|
670
670
|
"character": 2,
|
671
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
671
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L7"
|
672
672
|
}
|
673
673
|
],
|
674
674
|
"type": {
|
@@ -739,7 +739,7 @@
|
|
739
739
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
740
740
|
"line": 8,
|
741
741
|
"character": 2,
|
742
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
742
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L8"
|
743
743
|
}
|
744
744
|
],
|
745
745
|
"type": {
|
@@ -760,7 +760,7 @@
|
|
760
760
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
761
761
|
"line": 9,
|
762
762
|
"character": 2,
|
763
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
763
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L9"
|
764
764
|
}
|
765
765
|
],
|
766
766
|
"type": {
|
@@ -776,7 +776,7 @@
|
|
776
776
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
777
777
|
"line": 9,
|
778
778
|
"character": 13,
|
779
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
779
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L9"
|
780
780
|
}
|
781
781
|
],
|
782
782
|
"signatures": [
|
@@ -791,7 +791,7 @@
|
|
791
791
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
792
792
|
"line": 9,
|
793
793
|
"character": 13,
|
794
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
794
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L9"
|
795
795
|
}
|
796
796
|
],
|
797
797
|
"type": {
|
@@ -819,7 +819,7 @@
|
|
819
819
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
820
820
|
"line": 6,
|
821
821
|
"character": 17,
|
822
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
822
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L6"
|
823
823
|
}
|
824
824
|
],
|
825
825
|
"extendedTypes": [
|
@@ -5544,7 +5544,7 @@
|
|
5544
5544
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
5545
5545
|
"line": 6,
|
5546
5546
|
"character": 2,
|
5547
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
5547
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L6"
|
5548
5548
|
}
|
5549
5549
|
],
|
5550
5550
|
"type": {
|
@@ -5855,7 +5855,7 @@
|
|
5855
5855
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
5856
5856
|
"line": 7,
|
5857
5857
|
"character": 2,
|
5858
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
5858
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L7"
|
5859
5859
|
}
|
5860
5860
|
],
|
5861
5861
|
"type": {
|
@@ -5926,7 +5926,7 @@
|
|
5926
5926
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
5927
5927
|
"line": 8,
|
5928
5928
|
"character": 2,
|
5929
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
5929
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L8"
|
5930
5930
|
}
|
5931
5931
|
],
|
5932
5932
|
"type": {
|
@@ -16111,7 +16111,7 @@
|
|
16111
16111
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
16112
16112
|
"line": 9,
|
16113
16113
|
"character": 2,
|
16114
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
16114
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L9"
|
16115
16115
|
}
|
16116
16116
|
],
|
16117
16117
|
"type": {
|
@@ -16132,7 +16132,7 @@
|
|
16132
16132
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
16133
16133
|
"line": 10,
|
16134
16134
|
"character": 2,
|
16135
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
16135
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L10"
|
16136
16136
|
}
|
16137
16137
|
],
|
16138
16138
|
"type": {
|
@@ -16153,7 +16153,7 @@
|
|
16153
16153
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
16154
16154
|
"line": 11,
|
16155
16155
|
"character": 2,
|
16156
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
16156
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L11"
|
16157
16157
|
}
|
16158
16158
|
],
|
16159
16159
|
"type": {
|
@@ -16169,7 +16169,7 @@
|
|
16169
16169
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
16170
16170
|
"line": 11,
|
16171
16171
|
"character": 13,
|
16172
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
16172
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L11"
|
16173
16173
|
}
|
16174
16174
|
],
|
16175
16175
|
"signatures": [
|
@@ -16184,7 +16184,7 @@
|
|
16184
16184
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
16185
16185
|
"line": 11,
|
16186
16186
|
"character": 13,
|
16187
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
16187
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L11"
|
16188
16188
|
}
|
16189
16189
|
],
|
16190
16190
|
"type": {
|
@@ -22634,7 +22634,7 @@
|
|
22634
22634
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Props.ts",
|
22635
22635
|
"line": 5,
|
22636
22636
|
"character": 17,
|
22637
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22637
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Props.ts#L5"
|
22638
22638
|
}
|
22639
22639
|
],
|
22640
22640
|
"extendedTypes": [
|
@@ -22669,7 +22669,7 @@
|
|
22669
22669
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/State.ts",
|
22670
22670
|
"line": 4,
|
22671
22671
|
"character": 2,
|
22672
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22672
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/State.ts#L4"
|
22673
22673
|
}
|
22674
22674
|
],
|
22675
22675
|
"type": {
|
@@ -22696,7 +22696,7 @@
|
|
22696
22696
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/State.ts",
|
22697
22697
|
"line": 3,
|
22698
22698
|
"character": 17,
|
22699
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22699
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/State.ts#L3"
|
22700
22700
|
}
|
22701
22701
|
]
|
22702
22702
|
},
|
@@ -22718,7 +22718,7 @@
|
|
22718
22718
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/Provider.tsx",
|
22719
22719
|
"line": 8,
|
22720
22720
|
"character": 2,
|
22721
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22721
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/Provider.tsx#L8"
|
22722
22722
|
}
|
22723
22723
|
],
|
22724
22724
|
"type": {
|
@@ -22745,7 +22745,7 @@
|
|
22745
22745
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/Provider.tsx",
|
22746
22746
|
"line": 7,
|
22747
22747
|
"character": 17,
|
22748
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22748
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/Provider.tsx#L7"
|
22749
22749
|
}
|
22750
22750
|
]
|
22751
22751
|
},
|
@@ -22769,7 +22769,7 @@
|
|
22769
22769
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22770
22770
|
"line": 8,
|
22771
22771
|
"character": 2,
|
22772
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22772
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L8"
|
22773
22773
|
}
|
22774
22774
|
],
|
22775
22775
|
"type": {
|
@@ -22788,7 +22788,7 @@
|
|
22788
22788
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22789
22789
|
"line": 9,
|
22790
22790
|
"character": 2,
|
22791
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22791
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L9"
|
22792
22792
|
}
|
22793
22793
|
],
|
22794
22794
|
"type": {
|
@@ -22815,7 +22815,7 @@
|
|
22815
22815
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22816
22816
|
"line": 10,
|
22817
22817
|
"character": 2,
|
22818
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22818
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L10"
|
22819
22819
|
}
|
22820
22820
|
],
|
22821
22821
|
"type": {
|
@@ -22831,7 +22831,7 @@
|
|
22831
22831
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22832
22832
|
"line": 10,
|
22833
22833
|
"character": 19,
|
22834
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22834
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L10"
|
22835
22835
|
}
|
22836
22836
|
],
|
22837
22837
|
"signatures": [
|
@@ -22846,7 +22846,7 @@
|
|
22846
22846
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22847
22847
|
"line": 10,
|
22848
22848
|
"character": 19,
|
22849
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22849
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L10"
|
22850
22850
|
}
|
22851
22851
|
],
|
22852
22852
|
"parameters": [
|
@@ -22939,7 +22939,7 @@
|
|
22939
22939
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22940
22940
|
"line": 11,
|
22941
22941
|
"character": 2,
|
22942
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22942
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L11"
|
22943
22943
|
}
|
22944
22944
|
],
|
22945
22945
|
"type": {
|
@@ -22960,7 +22960,7 @@
|
|
22960
22960
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22961
22961
|
"line": 12,
|
22962
22962
|
"character": 2,
|
22963
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22963
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L12"
|
22964
22964
|
}
|
22965
22965
|
],
|
22966
22966
|
"type": {
|
@@ -22991,7 +22991,7 @@
|
|
22991
22991
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
22992
22992
|
"line": 7,
|
22993
22993
|
"character": 17,
|
22994
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
22994
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L7"
|
22995
22995
|
}
|
22996
22996
|
]
|
22997
22997
|
},
|
@@ -23015,7 +23015,7 @@
|
|
23015
23015
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
23016
23016
|
"line": 16,
|
23017
23017
|
"character": 2,
|
23018
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23018
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L16"
|
23019
23019
|
}
|
23020
23020
|
],
|
23021
23021
|
"type": {
|
@@ -23073,7 +23073,7 @@
|
|
23073
23073
|
"fileName": "packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx",
|
23074
23074
|
"line": 15,
|
23075
23075
|
"character": 17,
|
23076
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23076
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorBoundary/ThrownErrorBoundary.tsx#L15"
|
23077
23077
|
}
|
23078
23078
|
]
|
23079
23079
|
},
|
@@ -23088,7 +23088,7 @@
|
|
23088
23088
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx",
|
23089
23089
|
"line": 12,
|
23090
23090
|
"character": 13,
|
23091
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23091
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/ErrorAlert.tsx#L12"
|
23092
23092
|
}
|
23093
23093
|
],
|
23094
23094
|
"signatures": [
|
@@ -23176,7 +23176,7 @@
|
|
23176
23176
|
"fileName": "packages/sdk/packages/error/src/components/ErrorRender/Render.tsx",
|
23177
23177
|
"line": 8,
|
23178
23178
|
"character": 13,
|
23179
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23179
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/components/ErrorRender/Render.tsx#L8"
|
23180
23180
|
}
|
23181
23181
|
],
|
23182
23182
|
"signatures": [
|
@@ -23264,7 +23264,7 @@
|
|
23264
23264
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/Provider.tsx",
|
23265
23265
|
"line": 11,
|
23266
23266
|
"character": 6,
|
23267
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23267
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/Provider.tsx#L11"
|
23268
23268
|
}
|
23269
23269
|
],
|
23270
23270
|
"signatures": [
|
@@ -23363,7 +23363,7 @@
|
|
23363
23363
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/useRollbar.tsx",
|
23364
23364
|
"line": 5,
|
23365
23365
|
"character": 6,
|
23366
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23366
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/useRollbar.tsx#L5"
|
23367
23367
|
}
|
23368
23368
|
],
|
23369
23369
|
"signatures": [
|
@@ -23378,7 +23378,7 @@
|
|
23378
23378
|
"fileName": "packages/sdk/packages/error/src/contexts/ErrorReporter/useRollbar.tsx",
|
23379
23379
|
"line": 5,
|
23380
23380
|
"character": 19,
|
23381
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
23381
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/b21883567/packages/sdk/packages/error/src/contexts/ErrorReporter/useRollbar.tsx#L5"
|
23382
23382
|
}
|
23383
23383
|
],
|
23384
23384
|
"type": {
|
@@ -44,7 +44,7 @@ var ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
|
|
44
44
|
// src/components/ErrorRender/Render.tsx
|
45
45
|
var import_react_flexbox = require("@xylabs/react-flexbox");
|
46
46
|
var import_react = require("react");
|
47
|
-
var
|
47
|
+
var import_react_router_dom = require("react-router-dom");
|
48
48
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
49
49
|
var ErrorRender = ({
|
50
50
|
onCancel,
|
@@ -55,7 +55,7 @@ var ErrorRender = ({
|
|
55
55
|
errorContext,
|
56
56
|
...props
|
57
57
|
}) => {
|
58
|
-
const location = (0,
|
58
|
+
const location = (0, import_react_router_dom.useLocation)();
|
59
59
|
(0, import_react.useEffect)(() => {
|
60
60
|
location.state = {
|
61
61
|
from: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom
|
1
|
+
{"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","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 {\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AG,OAC/B,uDAAC,cAAW,OAAc,cAA4B,UAAoB,GAC5E,GAEJ;AAAA,EAEJ,OAAO;AACL,WAAO,6EAAG,UAAS,KAAO;AAAA,EAC5B;AACF;;;AFWa,IAAAC,sBAAA;AAlCN,IAAM,sBAAN,MAAM,6BAA4B,wBAA8D;AAAA,EACrF,QAAkC;AAAA,IAChD,UAAU;AAAA,EACZ;AAAA,EAEA,OAAO,yBAAyB,OAAc;AAC5C,WAAO,EAAE,UAAU,MAAM,UAAU,qBAAoB,eAAe,KAAK,EAAE;AAAA,EAC/E;AAAA,EAEA,OAAc,eAAe,OAAyC;AACpE,WACG,MAAsB,WAAW,yCAAoB,QAAQ,EAAE,SAAS,MAAM,SAAS,QAAQ,wCAAmB,SAAS,CAAC,EAAE;AAAA,EAEnI;AAAA,EAEgB,kBAAkB,OAAc,WAAsB;AACpE,UAAM,EAAE,SAAS,QAAQ,IAAI,KAAK;AAClC,UAAM,EAAE,SAAS,IAAI,KAAK;AAE1B,uCAAS,MAAM;AAEf,YAAQ,MAAM,UAAU,UAAU,SAAS;AAC3C,QAAI,SAAS;AACX,YAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEgB,SAAS;AACvB,UAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,UAAM,EAAE,UAAU,cAAc,eAAe,IAAI,KAAK;AACxD,QAAI,UAAU;AACZ,UAAI,gBAAgB;AAClB,eAAO,eAAe,QAAQ;AAAA,MAChC;AACA,aAAO,6CAAC,eAAY,OAAO,UAAU,cAAc,GAAG,YAAY,aAAa;AAAA,IACjF;AAEA,WAAO;AAAA,EACT;AACF;","names":["import_react","ExitIcon","import_jsx_runtime","import_jsx_runtime"]}
|
@@ -20,7 +20,7 @@ var ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
|
|
20
20
|
// src/components/ErrorRender/Render.tsx
|
21
21
|
import { FlexCol } from "@xylabs/react-flexbox";
|
22
22
|
import { useEffect } from "react";
|
23
|
-
import { useLocation } from "react-router-dom
|
23
|
+
import { useLocation } from "react-router-dom";
|
24
24
|
import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
|
25
25
|
var ErrorRender = ({
|
26
26
|
onCancel,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom
|
1
|
+
{"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","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,SAAsB,yBAAyB;AAC/C,SAAS,iBAAuC;;;ACDhD,SAAS,aAAa,gBAAgB;AACtC,SAAS,OAAmB,YAAY,kBAAkB;AAC1D,SAAS,gBAAgB;AAWrB,SACE,KADF;AAFG,IAAM,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,yCAAO,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;;;AC/BA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AA+BhB,SAMD,UANC,OAAA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1B,UAAM,EAAE,UAAU,cAAc,eAAe,IAAI,KAAK;AACxD,QAAI,UAAU;AACZ,UAAI,gBAAgB;AAClB,eAAO,eAAe,QAAQ;AAAA,MAChC;AACA,aAAO,gBAAAA,KAAC,eAAY,OAAO,UAAU,cAAc,GAAG,YAAY,aAAa;AAAA,IACjF;AAEA,WAAO;AAAA,EACT;AACF;","names":["jsx","jsx"]}
|
@@ -46,7 +46,7 @@ var ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
|
|
46
46
|
// src/components/ErrorRender/Render.tsx
|
47
47
|
var import_react_flexbox = require("@xylabs/react-flexbox");
|
48
48
|
var import_react = require("react");
|
49
|
-
var
|
49
|
+
var import_react_router_dom = require("react-router-dom");
|
50
50
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
51
51
|
var ErrorRender = ({
|
52
52
|
onCancel,
|
@@ -57,7 +57,7 @@ var ErrorRender = ({
|
|
57
57
|
errorContext,
|
58
58
|
...props
|
59
59
|
}) => {
|
60
|
-
const location = (0,
|
60
|
+
const location = (0, import_react_router_dom.useLocation)();
|
61
61
|
(0, import_react.useEffect)(() => {
|
62
62
|
location.state = {
|
63
63
|
from: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ErrorBoundary/index.ts","../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["export * from './ThrownErrorBoundary'\n","import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom
|
1
|
+
{"version":3,"sources":["../../../../src/components/ErrorBoundary/index.ts","../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["export * from './ThrownErrorBoundary'\n","import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","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;;;ACA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AAG,UAAS,KAAO;AAAA,EAC5B;AACF;;;AFWa,IAAAC,sBAAA;AAlCN,IAAM,sBAAN,MAAM,6BAA4B,wBAA8D;AAAA,EACrF,QAAkC;AAAA,IAChD,UAAU;AAAA,EACZ;AAAA,EAEA,OAAO,yBAAyB,OAAc;AAC5C,WAAO,EAAE,UAAU,MAAM,UAAU,qBAAoB,eAAe,KAAK,EAAE;AAAA,EAC/E;AAAA,EAEA,OAAc,eAAe,OAAyC;AACpE,WACG,MAAsB,WAAW,yCAAoB,QAAQ,EAAE,SAAS,MAAM,SAAS,QAAQ,wCAAmB,SAAS,CAAC,EAAE;AAAA,EAEnI;AAAA,EAEgB,kBAAkB,OAAc,WAAsB;AACpE,UAAM,EAAE,SAAS,QAAQ,IAAI,KAAK;AAClC,UAAM,EAAE,SAAS,IAAI,KAAK;AAE1B,uCAAS,MAAM;AAEf,YAAQ,MAAM,UAAU,UAAU,SAAS;AAC3C,QAAI,SAAS;AACX,YAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEgB,SAAS;AACvB,UAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,UAAM,EAAE,UAAU,cAAc,eAAe,IAAI,KAAK;AACxD,QAAI,UAAU;AACZ,UAAI,gBAAgB;AAClB,eAAO,eAAe,QAAQ;AAAA,MAChC;AACA,aAAO,6CAAC,eAAY,OAAO,UAAU,cAAc,GAAG,YAAY,aAAa;AAAA,IACjF;AAEA,WAAO;AAAA,EACT;AACF;","names":["import_react","ExitIcon","import_jsx_runtime","import_jsx_runtime"]}
|
@@ -20,7 +20,7 @@ var ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
|
|
20
20
|
// src/components/ErrorRender/Render.tsx
|
21
21
|
import { FlexCol } from "@xylabs/react-flexbox";
|
22
22
|
import { useEffect } from "react";
|
23
|
-
import { useLocation } from "react-router-dom
|
23
|
+
import { useLocation } from "react-router-dom";
|
24
24
|
import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
|
25
25
|
var ErrorRender = ({
|
26
26
|
onCancel,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom
|
1
|
+
{"version":3,"sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx","../../../../src/components/ErrorRender/ErrorAlert.tsx","../../../../src/components/ErrorRender/Render.tsx"],"sourcesContent":["import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","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","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,SAAsB,yBAAyB;AAC/C,SAAS,iBAAuC;;;ACDhD,SAAS,aAAa,gBAAgB;AACtC,SAAS,OAAmB,YAAY,kBAAkB;AAC1D,SAAS,gBAAgB;AAWrB,SACE,KADF;AAFG,IAAM,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,yCAAO,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;;;AC/BA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AA+BhB,SAMD,UANC,OAAAA,YAAA;AA1BL,IAAM,cAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,cA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AAO,eAAe,QAAQ;AAAA,MAChC;AACA,aAAO,gBAAAA,KAAC,eAAY,OAAO,UAAU,cAAc,GAAG,YAAY,aAAa;AAAA,IACjF;AAEA,WAAO;AAAA,EACT;AACF;","names":["jsx","jsx"]}
|
@@ -25,7 +25,7 @@ __export(Render_exports, {
|
|
25
25
|
module.exports = __toCommonJS(Render_exports);
|
26
26
|
var import_react_flexbox = require("@xylabs/react-flexbox");
|
27
27
|
var import_react = require("react");
|
28
|
-
var
|
28
|
+
var import_react_router_dom = require("react-router-dom");
|
29
29
|
|
30
30
|
// src/components/ErrorRender/ErrorAlert.tsx
|
31
31
|
var import_icons_material = require("@mui/icons-material");
|
@@ -53,7 +53,7 @@ var ErrorRender = ({
|
|
53
53
|
errorContext,
|
54
54
|
...props
|
55
55
|
}) => {
|
56
|
-
const location = (0,
|
56
|
+
const location = (0, import_react_router_dom.useLocation)();
|
57
57
|
(0, import_react.useEffect)(() => {
|
58
58
|
location.state = {
|
59
59
|
from: {
|