@diegotsi/flint-react 0.5.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +618 -667
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -8
- package/dist/index.d.ts +38 -8
- package/dist/index.js +603 -662
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
export { flint } from '@flint/core';
|
|
2
3
|
|
|
3
4
|
type Severity = "P1" | "P2" | "P3" | "P4";
|
|
4
5
|
interface EnvironmentInfo {
|
|
@@ -33,6 +34,7 @@ interface ThemeOverride {
|
|
|
33
34
|
interface FlintUser {
|
|
34
35
|
id: string;
|
|
35
36
|
name: string;
|
|
37
|
+
email?: string;
|
|
36
38
|
}
|
|
37
39
|
interface FlintExtraFields {
|
|
38
40
|
/** Session replay URL from Datadog RUM, FullStory, LogRocket, etc. Pass a function for lazy evaluation. */
|
|
@@ -58,10 +60,38 @@ interface FlintWidgetProps {
|
|
|
58
60
|
theme?: Theme;
|
|
59
61
|
/** Custom z-index for the widget. Default: 9999 */
|
|
60
62
|
zIndex?: number;
|
|
63
|
+
/** URL of the admin/status page for reporters to track their bugs */
|
|
64
|
+
statusPageUrl?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Datadog site hostname for auto-generating RUM Session Replay deep links.
|
|
67
|
+
* When set, the widget auto-detects `window.DD_RUM` and generates a direct
|
|
68
|
+
* link to the session replay at the exact moment the bug was reported.
|
|
69
|
+
* Examples: "app.datadoghq.com", "app.datadoghq.eu", "app.us5.datadoghq.com"
|
|
70
|
+
*/
|
|
71
|
+
datadogSite?: string;
|
|
72
|
+
/** Enable session replay recording. Default: true */
|
|
73
|
+
enableReplay?: boolean;
|
|
74
|
+
/** Enable screenshot capture. Default: true */
|
|
75
|
+
enableScreenshot?: boolean;
|
|
76
|
+
/** Enable console log collection. Default: true */
|
|
77
|
+
enableConsole?: boolean;
|
|
78
|
+
/** Enable network error collection. Default: true */
|
|
79
|
+
enableNetwork?: boolean;
|
|
80
|
+
/** Called before report submission. Return false to cancel. */
|
|
81
|
+
onBeforeSubmit?: (payload: ReportPayload) => boolean | Promise<boolean>;
|
|
82
|
+
/** Called after successful submission */
|
|
83
|
+
onSuccess?: (result: ReportResult) => void;
|
|
84
|
+
/** Called when submission fails */
|
|
85
|
+
onError?: (error: Error) => void;
|
|
86
|
+
/** Called when the modal opens */
|
|
87
|
+
onOpen?: () => void;
|
|
88
|
+
/** Called when the modal closes */
|
|
89
|
+
onClose?: () => void;
|
|
61
90
|
}
|
|
62
91
|
interface ReportPayload {
|
|
63
92
|
reporterId: string;
|
|
64
93
|
reporterName: string;
|
|
94
|
+
reporterEmail?: string;
|
|
65
95
|
description: string;
|
|
66
96
|
expectedBehavior?: string;
|
|
67
97
|
stepsToReproduce?: {
|
|
@@ -84,8 +114,6 @@ interface ReportResult {
|
|
|
84
114
|
duplicateOfId?: string | null;
|
|
85
115
|
}
|
|
86
116
|
|
|
87
|
-
declare function FlintWidget(props: FlintWidgetProps): react_jsx_runtime.JSX.Element;
|
|
88
|
-
|
|
89
117
|
declare type addedNodeMutation = {
|
|
90
118
|
parentId: number;
|
|
91
119
|
previousId?: number | null;
|
|
@@ -517,12 +545,14 @@ interface Props {
|
|
|
517
545
|
getReplayEvents: () => eventWithTime[];
|
|
518
546
|
getExternalReplayUrl: () => string | undefined;
|
|
519
547
|
initialSelection?: string;
|
|
548
|
+
enableScreenshot?: boolean;
|
|
549
|
+
statusPageUrl?: string;
|
|
550
|
+
onBeforeSubmit?: (payload: ReportPayload) => boolean | Promise<boolean>;
|
|
551
|
+
onSuccess?: (result: ReportResult) => void;
|
|
552
|
+
onError?: (error: Error) => void;
|
|
520
553
|
}
|
|
521
|
-
declare function FlintModal({ projectKey, serverUrl, user, meta, theme, zIndex, onClose, getEnvironment, getConsoleLogs, getNetworkErrors, getReplayEvents, getExternalReplayUrl, initialSelection, }: Props): react_jsx_runtime.JSX.Element;
|
|
554
|
+
declare function FlintModal({ projectKey, serverUrl, user, meta, theme, zIndex, onClose, getEnvironment, getConsoleLogs, getNetworkErrors, getReplayEvents, getExternalReplayUrl, initialSelection, enableScreenshot, statusPageUrl, onBeforeSubmit, onSuccess, onError, }: Props): react_jsx_runtime.JSX.Element;
|
|
522
555
|
|
|
523
|
-
declare
|
|
524
|
-
setUser(user: FlintUser | null): void;
|
|
525
|
-
setSessionReplay(url: string | (() => string)): void;
|
|
526
|
-
};
|
|
556
|
+
declare function FlintWidget(props: FlintWidgetProps): react_jsx_runtime.JSX.Element;
|
|
527
557
|
|
|
528
|
-
export { FlintModal, type FlintUser, FlintWidget, type FlintWidgetProps, type Locale, type ReportPayload, type ReportResult, type Severity, type Theme, type ThemeOverride
|
|
558
|
+
export { FlintModal, type FlintUser, FlintWidget, type FlintWidgetProps, type Locale, type ReportPayload, type ReportResult, type Severity, type Theme, type ThemeOverride };
|