@sentry/react-native 6.14.0 → 6.15.1

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.
Files changed (96) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +10 -0
  3. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  4. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +5 -0
  5. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +5 -0
  6. package/dist/js/NativeRNSentry.d.ts +1 -0
  7. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  8. package/dist/js/NativeRNSentry.js.map +1 -1
  9. package/dist/js/feedback/FeedbackButton.d.ts +23 -0
  10. package/dist/js/feedback/FeedbackButton.d.ts.map +1 -0
  11. package/dist/js/feedback/FeedbackButton.js +51 -0
  12. package/dist/js/feedback/FeedbackButton.js.map +1 -0
  13. package/dist/js/feedback/FeedbackWidget.d.ts +13 -1
  14. package/dist/js/feedback/FeedbackWidget.d.ts.map +1 -1
  15. package/dist/js/feedback/FeedbackWidget.js +89 -16
  16. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  17. package/dist/js/feedback/FeedbackWidget.styles.d.ts +6 -3
  18. package/dist/js/feedback/FeedbackWidget.styles.d.ts.map +1 -1
  19. package/dist/js/feedback/FeedbackWidget.styles.js +155 -106
  20. package/dist/js/feedback/FeedbackWidget.styles.js.map +1 -1
  21. package/dist/js/feedback/FeedbackWidget.theme.d.ts +37 -0
  22. package/dist/js/feedback/FeedbackWidget.theme.d.ts.map +1 -0
  23. package/dist/js/feedback/FeedbackWidget.theme.js +31 -0
  24. package/dist/js/feedback/FeedbackWidget.theme.js.map +1 -0
  25. package/dist/js/feedback/FeedbackWidget.types.d.ts +71 -2
  26. package/dist/js/feedback/FeedbackWidget.types.d.ts.map +1 -1
  27. package/dist/js/feedback/FeedbackWidget.types.js.map +1 -1
  28. package/dist/js/feedback/FeedbackWidgetManager.d.ts +43 -23
  29. package/dist/js/feedback/FeedbackWidgetManager.d.ts.map +1 -1
  30. package/dist/js/feedback/FeedbackWidgetManager.js +62 -138
  31. package/dist/js/feedback/FeedbackWidgetManager.js.map +1 -1
  32. package/dist/js/feedback/FeedbackWidgetProvider.d.ts +48 -0
  33. package/dist/js/feedback/FeedbackWidgetProvider.d.ts.map +1 -0
  34. package/dist/js/feedback/FeedbackWidgetProvider.js +177 -0
  35. package/dist/js/feedback/FeedbackWidgetProvider.js.map +1 -0
  36. package/dist/js/feedback/ScreenshotButton.d.ts +25 -0
  37. package/dist/js/feedback/ScreenshotButton.d.ts.map +1 -0
  38. package/dist/js/feedback/ScreenshotButton.js +80 -0
  39. package/dist/js/feedback/ScreenshotButton.js.map +1 -0
  40. package/dist/js/feedback/defaults.d.ts +3 -1
  41. package/dist/js/feedback/defaults.d.ts.map +1 -1
  42. package/dist/js/feedback/defaults.js +15 -0
  43. package/dist/js/feedback/defaults.js.map +1 -1
  44. package/dist/js/feedback/icons.d.ts +30 -0
  45. package/dist/js/feedback/icons.d.ts.map +1 -0
  46. package/dist/js/feedback/icons.js +30 -0
  47. package/dist/js/feedback/icons.js.map +1 -0
  48. package/dist/js/feedback/integration.d.ts +19 -2
  49. package/dist/js/feedback/integration.d.ts.map +1 -1
  50. package/dist/js/feedback/integration.js +58 -3
  51. package/dist/js/feedback/integration.js.map +1 -1
  52. package/dist/js/feedback/lazy.d.ts +10 -0
  53. package/dist/js/feedback/lazy.d.ts.map +1 -1
  54. package/dist/js/feedback/lazy.js +24 -0
  55. package/dist/js/feedback/lazy.js.map +1 -1
  56. package/dist/js/index.d.ts +3 -2
  57. package/dist/js/index.d.ts.map +1 -1
  58. package/dist/js/index.js +2 -1
  59. package/dist/js/index.js.map +1 -1
  60. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  61. package/dist/js/integrations/reactnativeerrorhandlers.js +65 -31
  62. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  63. package/dist/js/sdk.js +1 -1
  64. package/dist/js/sdk.js.map +1 -1
  65. package/dist/js/utils/worldwide.d.ts +7 -0
  66. package/dist/js/utils/worldwide.d.ts.map +1 -1
  67. package/dist/js/utils/worldwide.js.map +1 -1
  68. package/dist/js/version.d.ts +1 -1
  69. package/dist/js/version.js +1 -1
  70. package/dist/js/version.js.map +1 -1
  71. package/dist/js/wrapper.d.ts +1 -0
  72. package/dist/js/wrapper.d.ts.map +1 -1
  73. package/dist/js/wrapper.js +17 -1
  74. package/dist/js/wrapper.js.map +1 -1
  75. package/ios/RNSentry.mm +24 -0
  76. package/ios/RNSentryOnDrawReporter.m +4 -0
  77. package/ios/RNSentryVersion.m +1 -1
  78. package/package.json +4 -4
  79. package/src/js/NativeRNSentry.ts +1 -0
  80. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -0
  81. package/ts3.8/dist/js/feedback/FeedbackButton.d.ts +23 -0
  82. package/ts3.8/dist/js/feedback/FeedbackWidget.d.ts +13 -1
  83. package/ts3.8/dist/js/feedback/FeedbackWidget.styles.d.ts +6 -3
  84. package/ts3.8/dist/js/feedback/FeedbackWidget.theme.d.ts +37 -0
  85. package/ts3.8/dist/js/feedback/FeedbackWidget.types.d.ts +71 -2
  86. package/ts3.8/dist/js/feedback/FeedbackWidgetManager.d.ts +43 -23
  87. package/ts3.8/dist/js/feedback/FeedbackWidgetProvider.d.ts +48 -0
  88. package/ts3.8/dist/js/feedback/ScreenshotButton.d.ts +25 -0
  89. package/ts3.8/dist/js/feedback/defaults.d.ts +3 -1
  90. package/ts3.8/dist/js/feedback/icons.d.ts +30 -0
  91. package/ts3.8/dist/js/feedback/integration.d.ts +19 -2
  92. package/ts3.8/dist/js/feedback/lazy.d.ts +10 -0
  93. package/ts3.8/dist/js/index.d.ts +3 -2
  94. package/ts3.8/dist/js/utils/worldwide.d.ts +7 -0
  95. package/ts3.8/dist/js/version.d.ts +1 -1
  96. package/ts3.8/dist/js/wrapper.d.ts +1 -0
@@ -1,98 +1,145 @@
1
- const PURPLE = 'rgba(88, 74, 192, 1)';
2
- const FOREGROUND_COLOR = '#2b2233';
3
- const BACKGROUND_COLOR = '#ffffff';
4
- const BORDER_COLOR = 'rgba(41, 35, 47, 0.13)';
5
- const defaultStyles = {
6
- container: {
7
- flex: 1,
8
- padding: 20,
9
- backgroundColor: BACKGROUND_COLOR,
10
- },
11
- title: {
12
- fontSize: 24,
13
- fontWeight: 'bold',
14
- marginBottom: 20,
15
- textAlign: 'left',
16
- flex: 1,
17
- color: FOREGROUND_COLOR,
18
- },
19
- label: {
20
- marginBottom: 4,
21
- fontSize: 16,
22
- color: FOREGROUND_COLOR,
23
- },
24
- input: {
25
- height: 50,
26
- borderColor: BORDER_COLOR,
27
- borderWidth: 1,
28
- borderRadius: 5,
29
- paddingHorizontal: 10,
30
- marginBottom: 15,
31
- fontSize: 16,
32
- color: FOREGROUND_COLOR,
33
- },
34
- textArea: {
35
- height: 100,
36
- textAlignVertical: 'top',
37
- color: FOREGROUND_COLOR,
38
- },
39
- screenshotButton: {
40
- backgroundColor: BACKGROUND_COLOR,
41
- padding: 15,
42
- borderRadius: 5,
43
- alignItems: 'center',
44
- flex: 1,
45
- borderWidth: 1,
46
- borderColor: BORDER_COLOR,
47
- },
48
- screenshotContainer: {
49
- flexDirection: 'row',
50
- alignItems: 'center',
51
- width: '100%',
52
- marginBottom: 20,
53
- },
54
- screenshotThumbnail: {
55
- width: 50,
56
- height: 50,
57
- borderRadius: 5,
58
- marginRight: 10,
59
- },
60
- screenshotText: {
61
- color: FOREGROUND_COLOR,
62
- fontSize: 16,
63
- },
64
- submitButton: {
65
- backgroundColor: PURPLE,
66
- paddingVertical: 15,
67
- borderRadius: 5,
68
- alignItems: 'center',
69
- marginBottom: 10,
70
- },
71
- submitText: {
72
- color: BACKGROUND_COLOR,
73
- fontSize: 18,
74
- },
75
- cancelButton: {
76
- backgroundColor: BACKGROUND_COLOR,
77
- padding: 15,
78
- borderRadius: 5,
79
- alignItems: 'center',
80
- borderWidth: 1,
81
- borderColor: BORDER_COLOR,
82
- },
83
- cancelText: {
84
- color: FOREGROUND_COLOR,
85
- fontSize: 16,
86
- },
87
- titleContainer: {
88
- flexDirection: 'row',
89
- width: '100%',
90
- },
91
- sentryLogo: {
92
- width: 40,
93
- height: 40,
94
- },
1
+ const defaultStyles = (theme) => {
2
+ return {
3
+ container: {
4
+ flex: 1,
5
+ padding: 20,
6
+ backgroundColor: theme.background,
7
+ },
8
+ title: {
9
+ fontSize: 24,
10
+ fontWeight: 'bold',
11
+ marginBottom: 20,
12
+ textAlign: 'left',
13
+ flex: 1,
14
+ color: theme.foreground,
15
+ },
16
+ label: {
17
+ marginBottom: 4,
18
+ fontSize: 16,
19
+ color: theme.foreground,
20
+ },
21
+ input: {
22
+ height: 50,
23
+ borderColor: theme.border,
24
+ borderWidth: 1,
25
+ borderRadius: 5,
26
+ paddingHorizontal: 10,
27
+ marginBottom: 15,
28
+ fontSize: 16,
29
+ color: theme.foreground,
30
+ },
31
+ textArea: {
32
+ height: 100,
33
+ textAlignVertical: 'top',
34
+ color: theme.foreground,
35
+ },
36
+ screenshotButton: {
37
+ backgroundColor: theme.background,
38
+ padding: 15,
39
+ borderRadius: 5,
40
+ alignItems: 'center',
41
+ flex: 1,
42
+ borderWidth: 1,
43
+ borderColor: theme.border,
44
+ },
45
+ screenshotContainer: {
46
+ flexDirection: 'row',
47
+ alignItems: 'center',
48
+ width: '100%',
49
+ marginBottom: 20,
50
+ },
51
+ screenshotThumbnail: {
52
+ width: 50,
53
+ height: 50,
54
+ borderRadius: 5,
55
+ marginRight: 10,
56
+ },
57
+ screenshotText: {
58
+ color: theme.foreground,
59
+ fontSize: 16,
60
+ },
61
+ takeScreenshotButton: {
62
+ backgroundColor: theme.background,
63
+ padding: 15,
64
+ borderRadius: 5,
65
+ alignItems: 'center',
66
+ borderWidth: 1,
67
+ borderColor: theme.border,
68
+ marginTop: -10,
69
+ marginBottom: 20,
70
+ },
71
+ takeScreenshotText: {
72
+ color: theme.foreground,
73
+ fontSize: 16,
74
+ },
75
+ submitButton: {
76
+ backgroundColor: theme.accentBackground,
77
+ paddingVertical: 15,
78
+ borderRadius: 5,
79
+ alignItems: 'center',
80
+ marginBottom: 10,
81
+ },
82
+ submitText: {
83
+ color: theme.accentForeground,
84
+ fontSize: 18,
85
+ },
86
+ cancelButton: {
87
+ backgroundColor: theme.background,
88
+ padding: 15,
89
+ borderRadius: 5,
90
+ alignItems: 'center',
91
+ borderWidth: 1,
92
+ borderColor: theme.border,
93
+ },
94
+ cancelText: {
95
+ color: theme.foreground,
96
+ fontSize: 16,
97
+ },
98
+ titleContainer: {
99
+ flexDirection: 'row',
100
+ width: '100%',
101
+ },
102
+ sentryLogo: {
103
+ width: 40,
104
+ height: 40,
105
+ tintColor: theme.sentryLogo,
106
+ },
107
+ };
95
108
  };
109
+ export const defaultButtonStyles = (theme) => {
110
+ return {
111
+ triggerButton: {
112
+ position: 'absolute',
113
+ bottom: 30,
114
+ right: 30,
115
+ backgroundColor: theme.background,
116
+ padding: 15,
117
+ borderRadius: 40,
118
+ justifyContent: 'center',
119
+ alignItems: 'center',
120
+ elevation: 5,
121
+ shadowColor: theme.border,
122
+ shadowOffset: { width: 1, height: 2 },
123
+ shadowOpacity: 0.5,
124
+ shadowRadius: 3,
125
+ flexDirection: 'row',
126
+ borderWidth: 1,
127
+ borderColor: theme.border,
128
+ },
129
+ triggerText: {
130
+ color: theme.foreground,
131
+ fontSize: 18,
132
+ },
133
+ triggerIcon: {
134
+ width: 24,
135
+ height: 24,
136
+ padding: 2,
137
+ marginEnd: 6,
138
+ tintColor: theme.sentryLogo,
139
+ },
140
+ };
141
+ };
142
+ export const defaultScreenshotButtonStyles = defaultButtonStyles;
96
143
  export const modalWrapper = {
97
144
  position: 'absolute',
98
145
  top: 0,
@@ -100,18 +147,20 @@ export const modalWrapper = {
100
147
  right: 0,
101
148
  bottom: 0,
102
149
  };
103
- export const modalSheetContainer = {
104
- backgroundColor: '#ffffff',
105
- borderTopLeftRadius: 16,
106
- borderTopRightRadius: 16,
107
- overflow: 'hidden',
108
- alignSelf: 'stretch',
109
- shadowColor: '#000',
110
- shadowOffset: { width: 0, height: -3 },
111
- shadowOpacity: 0.1,
112
- shadowRadius: 4,
113
- elevation: 5,
114
- flex: 1,
150
+ export const modalSheetContainer = (theme) => {
151
+ return {
152
+ backgroundColor: theme.background,
153
+ borderTopLeftRadius: 16,
154
+ borderTopRightRadius: 16,
155
+ overflow: 'hidden',
156
+ alignSelf: 'stretch',
157
+ shadowColor: '#000',
158
+ shadowOffset: { width: 0, height: -3 },
159
+ shadowOpacity: 0.1,
160
+ shadowRadius: 4,
161
+ elevation: 5,
162
+ flex: 1,
163
+ };
115
164
  };
116
165
  export const topSpacer = {
117
166
  height: 64, // magic number
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackWidget.styles.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.styles.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,GAAG,sBAAsB,CAAC;AACtC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAE9C,MAAM,aAAa,GAAyB;IAC1C,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,gBAAgB;KAClC;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,MAAM;QACjB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,YAAY,EAAE,CAAC;QACf,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,C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K;QACpB,KAAK,EAAE,MAAM;KACd;IACD,UAAU,EAAE;QACV,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;KACX;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAc;IAC5C,eAAe,EAAE,SAAS;IAC1B,mBAAmB,EAAE,EAAE;IACvB,oBAAoB,EAAE,EAAE;IACxB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;IACtC,aAAa,EAAE,GAAG;IAClB,YAAY,EAAE,CAAC;IACf,SAAS,EAAE,CAAC;IACZ,IAAI,EAAE,CAAC;CACR,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,MAAM,EAAE,EAAE,EAAE,eAAe;CAC5B,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { ViewStyle } from 'react-native';\n\nimport type { FeedbackWidgetStyles } from './FeedbackWidget.types';\n\nconst PURPLE = 'rgba(88, 74, 192, 1)';\nconst FOREGROUND_COLOR = '#2b2233';\nconst BACKGROUND_COLOR = '#ffffff';\nconst BORDER_COLOR = 'rgba(41, 35, 47, 0.13)';\n\nconst defaultStyles: FeedbackWidgetStyles = {\n container: {\n flex: 1,\n padding: 20,\n backgroundColor: BACKGROUND_COLOR,\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n marginBottom: 20,\n textAlign: 'left',\n flex: 1,\n color: FOREGROUND_COLOR,\n },\n label: {\n marginBottom: 4,\n fontSize: 16,\n color: FOREGROUND_COLOR,\n },\n input: {\n height: 50,\n borderColor: BORDER_COLOR,\n borderWidth: 1,\n borderRadius: 5,\n paddingHorizontal: 10,\n marginBottom: 15,\n fontSize: 16,\n color: FOREGROUND_COLOR,\n },\n textArea: {\n height: 100,\n textAlignVertical: 'top',\n color: FOREGROUND_COLOR,\n },\n screenshotButton: {\n backgroundColor: BACKGROUND_COLOR,\n padding: 15,\n borderRadius: 5,\n alignItems: 'center',\n flex: 1,\n borderWidth: 1,\n borderColor: BORDER_COLOR,\n },\n screenshotContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '100%',\n marginBottom: 20,\n },\n screenshotThumbnail: {\n width: 50,\n height: 50,\n borderRadius: 5,\n marginRight: 10,\n },\n screenshotText: {\n color: FOREGROUND_COLOR,\n fontSize: 16,\n },\n submitButton: {\n backgroundColor: PURPLE,\n paddingVertical: 15,\n borderRadius: 5,\n alignItems: 'center',\n marginBottom: 10,\n },\n submitText: {\n color: BACKGROUND_COLOR,\n fontSize: 18,\n },\n cancelButton: {\n backgroundColor: BACKGROUND_COLOR,\n padding: 15,\n borderRadius: 5,\n alignItems: 'center',\n borderWidth: 1,\n borderColor: BORDER_COLOR,\n },\n cancelText: {\n color: FOREGROUND_COLOR,\n fontSize: 16,\n },\n titleContainer: {\n flexDirection: 'row',\n width: '100%',\n },\n sentryLogo: {\n width: 40,\n height: 40,\n },\n};\n\nexport const modalWrapper: ViewStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n};\n\nexport const modalSheetContainer: ViewStyle = {\n backgroundColor: '#ffffff',\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n overflow: 'hidden',\n alignSelf: 'stretch',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: -3 },\n shadowOpacity: 0.1,\n shadowRadius: 4,\n elevation: 5,\n flex: 1,\n};\n\nexport const topSpacer: ViewStyle = {\n height: 64, // magic number\n};\n\nexport default defaultStyles;\n"]}
1
+ {"version":3,"file":"FeedbackWidget.styles.js","sourceRoot":"","sources":["../../../src/js/feed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MAAM;QACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;QACtC,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,CAAC;QACZ,IAAI,EAAE,CAAC;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,MAAM,EAAE,EAAE,EAAE,eAAe;CAC5B,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { ViewStyle } from 'react-native';\n\nimport type { FeedbackWidgetTheme } from './FeedbackWidget.theme';\nimport type { FeedbackButtonStyles, FeedbackWidgetStyles } from './FeedbackWidget.types';\n\nconst defaultStyles = (theme: FeedbackWidgetTheme): FeedbackWidgetStyles => {\n return {\n container: {\n flex: 1,\n padding: 20,\n backgroundColor: theme.background,\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n marginBottom: 20,\n textAlign: 'left',\n flex: 1,\n color: theme.foreground,\n },\n label: {\n marginBottom: 4,\n fontSize: 16,\n color: theme.foreground,\n },\n input: {\n height: 50,\n borderColor: theme.border,\n borderWidth: 1,\n borderRadius: 5,\n paddingHorizontal: 10,\n marginBottom: 15,\n fontSize: 16,\n color: theme.foreground,\n },\n textArea: {\n height: 100,\n textAlignVertical: 'top',\n color: theme.foreground,\n },\n screenshotButton: {\n backgroundColor: theme.background,\n padding: 15,\n borderRadius: 5,\n alignItems: 'center',\n flex: 1,\n borderWidth: 1,\n borderColor: theme.border,\n },\n screenshotContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '100%',\n marginBottom: 20,\n },\n screenshotThumbnail: {\n width: 50,\n height: 50,\n borderRadius: 5,\n marginRight: 10,\n },\n screenshotText: {\n color: theme.foreground,\n fontSize: 16,\n },\n takeScreenshotButton: {\n backgroundColor: theme.background,\n padding: 15,\n borderRadius: 5,\n alignItems: 'center',\n borderWidth: 1,\n borderColor: theme.border,\n marginTop: -10,\n marginBottom: 20,\n },\n takeScreenshotText: {\n color: theme.foreground,\n fontSize: 16,\n },\n submitButton: {\n backgroundColor: theme.accentBackground,\n paddingVertical: 15,\n borderRadius: 5,\n alignItems: 'center',\n marginBottom: 10,\n },\n submitText: {\n color: theme.accentForeground,\n fontSize: 18,\n },\n cancelButton: {\n backgroundColor: theme.background,\n padding: 15,\n borderRadius: 5,\n alignItems: 'center',\n borderWidth: 1,\n borderColor: theme.border,\n },\n cancelText: {\n color: theme.foreground,\n fontSize: 16,\n },\n titleContainer: {\n flexDirection: 'row',\n width: '100%',\n },\n sentryLogo: {\n width: 40,\n height: 40,\n tintColor: theme.sentryLogo,\n },\n };\n};\n\nexport const defaultButtonStyles = (theme: FeedbackWidgetTheme): FeedbackButtonStyles => {\n return {\n triggerButton: {\n position: 'absolute',\n bottom: 30,\n right: 30,\n backgroundColor: theme.background,\n padding: 15,\n borderRadius: 40,\n justifyContent: 'center',\n alignItems: 'center',\n elevation: 5,\n shadowColor: theme.border,\n shadowOffset: { width: 1, height: 2 },\n shadowOpacity: 0.5,\n shadowRadius: 3,\n flexDirection: 'row',\n borderWidth: 1,\n borderColor: theme.border,\n },\n triggerText: {\n color: theme.foreground,\n fontSize: 18,\n },\n triggerIcon: {\n width: 24,\n height: 24,\n padding: 2,\n marginEnd: 6,\n tintColor: theme.sentryLogo,\n },\n };\n};\n\nexport const defaultScreenshotButtonStyles = defaultButtonStyles;\n\nexport const modalWrapper: ViewStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n};\n\nexport const modalSheetContainer = (theme: FeedbackWidgetTheme): ViewStyle => {\n return {\n backgroundColor: theme.background,\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n overflow: 'hidden',\n alignSelf: 'stretch',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: -3 },\n shadowOpacity: 0.1,\n shadowRadius: 4,\n elevation: 5,\n flex: 1,\n };\n};\n\nexport const topSpacer: ViewStyle = {\n height: 64, // magic number\n};\n\nexport default defaultStyles;\n"]}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Get the theme for the feedback widget based on the current color scheme
3
+ */
4
+ export declare function getTheme(): FeedbackWidgetTheme;
5
+ export interface FeedbackWidgetTheme {
6
+ /**
7
+ * Background color for surfaces
8
+ */
9
+ background: string;
10
+ /**
11
+ * Foreground color (i.e. text color)
12
+ */
13
+ foreground: string;
14
+ /**
15
+ * Foreground color for accented elements
16
+ */
17
+ accentForeground?: string;
18
+ /**
19
+ * Background color for accented elements
20
+ */
21
+ accentBackground?: string;
22
+ /**
23
+ * Border color
24
+ */
25
+ border?: string;
26
+ /**
27
+ * Color for feedback icon
28
+ */
29
+ feedbackIcon?: string;
30
+ /**
31
+ * Color for Sentry logo
32
+ */
33
+ sentryLogo?: string;
34
+ }
35
+ export declare const LightTheme: FeedbackWidgetTheme;
36
+ export declare const DarkTheme: FeedbackWidgetTheme;
37
+ //# sourceMappingURL=FeedbackWidget.theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeedbackWidget.theme.d.ts","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.theme.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,QAAQ,IAAI,mBAAmB,CAM9C;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,mBAQxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,mBAQvB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { Appearance } from 'react-native';
2
+ import { getColorScheme, getFeedbackDarkTheme, getFeedbackLightTheme } from './integration';
3
+ /**
4
+ * Get the theme for the feedback widget based on the current color scheme
5
+ */
6
+ export function getTheme() {
7
+ const userTheme = getColorScheme();
8
+ const colorScheme = userTheme === 'system' ? Appearance.getColorScheme() : userTheme;
9
+ const lightTheme = Object.assign(Object.assign({}, LightTheme), getFeedbackLightTheme());
10
+ const darkTheme = Object.assign(Object.assign({}, DarkTheme), getFeedbackDarkTheme());
11
+ return colorScheme === 'dark' ? darkTheme : lightTheme;
12
+ }
13
+ export const LightTheme = {
14
+ accentBackground: 'rgba(88, 74, 192, 1)',
15
+ accentForeground: '#ffffff',
16
+ foreground: '#2b2233',
17
+ background: '#ffffff',
18
+ border: 'rgba(41, 35, 47, 0.13)',
19
+ feedbackIcon: 'rgba(54, 45, 89, 1)',
20
+ sentryLogo: 'rgba(54, 45, 89, 1)',
21
+ };
22
+ export const DarkTheme = {
23
+ accentBackground: 'rgba(88, 74, 192, 1)',
24
+ accentForeground: '#ffffff',
25
+ foreground: '#ebe6ef',
26
+ background: '#29232f',
27
+ border: 'rgba(235, 230, 239, 0.15)',
28
+ feedbackIcon: '#ffffff',
29
+ sentryLogo: '#ffffff',
30
+ };
31
+ //# sourceMappingURL=FeedbackWidget.theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeedbackWidget.theme.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE5F;;GAEG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,SAAS,GAAG,cAAc,EAAE,CAAC;IACnC,MAAM,WAAW,GAAG,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,MAAM,UAAU,mCAAQ,UAAU,GAAK,qBAAqB,EAAE,CAAE,CAAC;IACjE,MAAM,SAAS,mCAAQ,SAAS,GAAK,oBAAoB,EAAE,CAAE,CAAC;IAC9D,OAAO,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;AACzD,CAAC;AAuCD,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC7C,gBAAgB,EAAE,sBAAsB;IACxC,gBAAgB,EAAE,SAAS;IAC3B,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,wBAAwB;IAChC,YAAY,EAAE,qBAAqB;IACnC,UAAU,EAAE,qBAAqB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAwB;IAC5C,gBAAgB,EAAE,sBAAsB;IACxC,gBAAgB,EAAE,SAAS;IAC3B,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,2BAA2B;IACnC,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS;CACtB,CAAC","sourcesContent":["import { Appearance } from 'react-native';\n\nimport { getColorScheme, getFeedbackDarkTheme, getFeedbackLightTheme } from './integration';\n\n/**\n * Get the theme for the feedback widget based on the current color scheme\n */\nexport function getTheme(): FeedbackWidgetTheme {\n const userTheme = getColorScheme();\n const colorScheme = userTheme === 'system' ? Appearance.getColorScheme() : userTheme;\n const lightTheme = { ...LightTheme, ...getFeedbackLightTheme() };\n const darkTheme = { ...DarkTheme, ...getFeedbackDarkTheme() };\n return colorScheme === 'dark' ? darkTheme : lightTheme;\n}\n\nexport interface FeedbackWidgetTheme {\n /**\n * Background color for surfaces\n */\n background: string;\n\n /**\n * Foreground color (i.e. text color)\n */\n foreground: string;\n\n /**\n * Foreground color for accented elements\n */\n accentForeground?: string;\n\n /**\n * Background color for accented elements\n */\n accentBackground?: string;\n\n /**\n * Border color\n */\n border?: string;\n\n /**\n * Color for feedback icon\n */\n feedbackIcon?: string;\n\n /**\n * Color for Sentry logo\n */\n sentryLogo?: string;\n}\n\nexport const LightTheme: FeedbackWidgetTheme = {\n accentBackground: 'rgba(88, 74, 192, 1)',\n accentForeground: '#ffffff',\n foreground: '#2b2233',\n background: '#ffffff',\n border: 'rgba(41, 35, 47, 0.13)',\n feedbackIcon: 'rgba(54, 45, 89, 1)',\n sentryLogo: 'rgba(54, 45, 89, 1)',\n};\n\nexport const DarkTheme: FeedbackWidgetTheme = {\n accentBackground: 'rgba(88, 74, 192, 1)',\n accentForeground: '#ffffff',\n foreground: '#ebe6ef',\n background: '#29232f',\n border: 'rgba(235, 230, 239, 0.15)',\n feedbackIcon: '#ffffff',\n sentryLogo: '#ffffff',\n};\n"]}
@@ -41,6 +41,11 @@ export interface FeedbackGeneralConfiguration {
41
41
  * @default false
42
42
  */
43
43
  enableScreenshot?: boolean;
44
+ /**
45
+ * This flag determines whether the "Take Screenshot" button is displayed
46
+ * @default false
47
+ */
48
+ enableTakeScreenshot?: boolean;
44
49
  /**
45
50
  * Fill in email/name input fields with Sentry user context if it exists.
46
51
  * The value of the email/name keys represent the properties of your user context.
@@ -99,13 +104,17 @@ export interface FeedbackTextConfiguration {
99
104
  */
100
105
  isRequiredLabel?: string;
101
106
  /**
102
- * The label for the button that adds a screenshot and renders the image editor
107
+ * The label for the button that adds a screenshot
103
108
  */
104
109
  addScreenshotButtonLabel?: string;
105
110
  /**
106
- * The label for the button that removes a screenshot and hides the image editor
111
+ * The label for the button that removes a screenshot
107
112
  */
108
113
  removeScreenshotButtonLabel?: string;
114
+ /**
115
+ * The label for the button that shows the capture screenshot button
116
+ */
117
+ captureScreenshotButtonLabel?: string;
109
118
  /**
110
119
  * The title of the error dialog
111
120
  */
@@ -118,11 +127,41 @@ export interface FeedbackTextConfiguration {
118
127
  * The error message when the email is invalid
119
128
  */
120
129
  emailError?: string;
130
+ /**
131
+ * The error message when the capture screenshot fails
132
+ */
133
+ captureScreenshotError?: string;
121
134
  /**
122
135
  * Message when there is a generic error
123
136
  */
124
137
  genericError?: string;
125
138
  }
139
+ /**
140
+ * The FeedbackButton text labels that can be customized
141
+ */
142
+ export interface FeedbackButtonTextConfiguration {
143
+ /**
144
+ * The label for the Feedback widget button that opens the dialog
145
+ */
146
+ triggerLabel?: string;
147
+ /**
148
+ * The aria label for the Feedback widget button that opens the dialog
149
+ */
150
+ triggerAriaLabel?: string;
151
+ }
152
+ /**
153
+ * The ScreenshotButton text labels that can be customized
154
+ */
155
+ export interface ScreenshotButtonTextConfiguration {
156
+ /**
157
+ * The label for the Screenshot button
158
+ */
159
+ triggerLabel?: string;
160
+ /**
161
+ * The aria label for the Screenshot button
162
+ */
163
+ triggerAriaLabel?: string;
164
+ }
126
165
  /**
127
166
  * The public callbacks available for the feedback integration
128
167
  */
@@ -199,9 +238,39 @@ export interface FeedbackWidgetStyles {
199
238
  screenshotContainer?: ViewStyle;
200
239
  screenshotThumbnail?: ImageStyle;
201
240
  screenshotText?: TextStyle;
241
+ takeScreenshotButton?: ViewStyle;
242
+ takeScreenshotText?: TextStyle;
202
243
  titleContainer?: ViewStyle;
203
244
  sentryLogo?: ImageStyle;
204
245
  }
246
+ /**
247
+ * The props for the feedback button
248
+ */
249
+ export interface FeedbackButtonProps extends FeedbackButtonTextConfiguration {
250
+ styles?: FeedbackButtonStyles;
251
+ }
252
+ /**
253
+ * The styles for the feedback button
254
+ */
255
+ export interface FeedbackButtonStyles {
256
+ triggerButton?: ViewStyle;
257
+ triggerText?: TextStyle;
258
+ triggerIcon?: ImageStyle;
259
+ }
260
+ /**
261
+ * The props for the screenshot button
262
+ */
263
+ export interface ScreenshotButtonProps extends ScreenshotButtonTextConfiguration {
264
+ styles?: ScreenshotButtonStyles;
265
+ }
266
+ /**
267
+ * The styles for the screenshot button
268
+ */
269
+ export interface ScreenshotButtonStyles {
270
+ triggerButton?: ViewStyle;
271
+ triggerText?: TextStyle;
272
+ triggerIcon?: ImageStyle;
273
+ }
205
274
  /**
206
275
  * The state of the feedback form
207
276
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackWidget.types.d.ts","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,mBACf,SAAQ,4BAA4B,EAClC,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB;IAC1B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,gBAAg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,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"FeedbackWidget.types.d.ts","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,mBACf,SAAQ,4BAA4B,EAClC,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB;IAC1B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,iBAAiB,C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AAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackWidget.types.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FeedbackFormData } from '@sentry/core';\nimport type { ImageStyle, TextStyle, ViewStyle } from 'react-native';\n\n/**\n * The props for the feedback form\n */\nexport interface FeedbackWidgetProps\n extends FeedbackGeneralConfiguration,\n FeedbackTextConfiguration,\n FeedbackCallbacks,\n ImagePickerConfiguration {\n styles?: FeedbackWidgetStyles;\n}\n\n/**\n * General feedback configuration\n */\nexport interface FeedbackGeneralConfiguration {\n /**\n * Show the Sentry branding\n *\n * @default true\n */\n showBranding?: boolean;\n\n /**\n * Should the email field be required?\n */\n isEmailRequired?: boolean;\n\n /**\n * Should the email field be validated?\n */\n shouldValidateEmail?: boolean;\n\n /**\n * Should the name field be required?\n */\n isNameRequired?: boolean;\n\n /**\n * Should the email input field be visible? Note: email will still be collected if set via `Sentry.setUser()`\n */\n showEmail?: boolean;\n\n /**\n * Should the name input field be visible? Note: name will still be collected if set via `Sentry.setUser()`\n */\n showName?: boolean;\n\n /**\n * This flag determines whether the \"Add Screenshot\" button is displayed\n * @default false\n */\n enableScreenshot?: boolean;\n\n /**\n * Fill in email/name input fields with Sentry user context if it exists.\n * The value of the email/name keys represent the properties of your user context.\n */\n useSentryUser?: {\n email: string;\n name: string;\n };\n}\n\n/**\n * All of the different text labels that can be customized\n */\nexport interface FeedbackTextConfiguration {\n /**\n * The label for the Feedback form cancel button that closes dialog\n */\n cancelButtonLabel?: string;\n\n /**\n * The label for the Feedback form submit button that sends feedback\n */\n submitButtonLabel?: string;\n\n /**\n * The title of the Feedback form\n */\n formTitle?: string;\n\n /**\n * Label for the email input\n */\n emailLabel?: string;\n\n /**\n * Placeholder text for Feedback email input\n */\n emailPlaceholder?: string;\n\n /**\n * Label for the message input\n */\n messageLabel?: string;\n\n /**\n * Placeholder text for Feedback message input\n */\n messagePlaceholder?: string;\n\n /**\n * Label for the name input\n */\n nameLabel?: string;\n\n /**\n * Message after feedback was sent successfully\n */\n successMessageText?: string;\n\n /**\n * Placeholder text for Feedback name input\n */\n namePlaceholder?: string;\n\n /**\n * Text which indicates that a field is required\n */\n isRequiredLabel?: string;\n\n /**\n * The label for the button that adds a screenshot and renders the image editor\n */\n addScreenshotButtonLabel?: string;\n\n /**\n * The label for the button that removes a screenshot and hides the image editor\n */\n removeScreenshotButtonLabel?: string;\n\n /**\n * The title of the error dialog\n */\n errorTitle?: string;\n\n /**\n * The error message when the form is invalid\n */\n formError?: string;\n\n /**\n * The error message when the email is invalid\n */\n emailError?: string;\n\n /**\n * Message when there is a generic error\n */\n genericError?: string;\n}\n\n/**\n * The public callbacks available for the feedback integration\n */\nexport interface FeedbackCallbacks {\n /**\n * Callback when form is opened\n */\n onFormOpen?: () => void;\n\n /**\n * Callback when form is closed and not submitted\n */\n onFormClose?: () => void;\n\n /**\n * Callback when a screenshot is added\n */\n onAddScreenshot?: (addScreenshot: (uri: string) => void) => void;\n\n /**\n * Callback when feedback is successfully submitted\n *\n * After this you'll see a SuccessMessage on the screen for a moment.\n */\n onSubmitSuccess?: (data: FeedbackFormData) => void;\n\n /**\n * Callback when feedback is unsuccessfully submitted\n */\n onSubmitError?: (error: Error) => void;\n\n /**\n * Callback when the feedback form is submitted successfully, and the SuccessMessage is complete, or dismissed\n */\n onFormSubmitted?: () => void;\n}\n\n/**\n * Image Picker configuration interface compatible with:\n * - `react-native-image-picker`: 7.2, 8.0\n * - `expo-image-picker`: 16.0`\n */\nexport interface ImagePickerConfiguration {\n imagePicker?: ImagePicker;\n}\n\ninterface ImagePickerResponse {\n assets?: ImagePickerAsset[];\n}\n\ninterface ImagePickerAsset {\n fileName?: string;\n uri?: string;\n base64?: string;\n}\n\ninterface ExpoImageLibraryOptions {\n mediaTypes?: 'images'[];\n base64?: boolean;\n}\n\ninterface ReactNativeImageLibraryOptions {\n mediaType: 'photo';\n includeBase64?: boolean;\n}\n\nexport interface ImagePicker {\n launchImageLibraryAsync?: (options?: ExpoImageLibraryOptions) => Promise<ImagePickerResponse>;\n\n launchImageLibrary?: (options: ReactNativeImageLibraryOptions) => Promise<ImagePickerResponse>;\n}\n\n/**\n * The styles for the feedback form\n */\nexport interface FeedbackWidgetStyles {\n container?: ViewStyle;\n title?: TextStyle;\n label?: TextStyle;\n input?: TextStyle;\n textArea?: TextStyle;\n submitButton?: ViewStyle;\n submitText?: TextStyle;\n cancelButton?: ViewStyle;\n cancelText?: TextStyle;\n screenshotButton?: ViewStyle;\n screenshotContainer?: ViewStyle;\n screenshotThumbnail?: ImageStyle;\n screenshotText?: TextStyle;\n titleContainer?: ViewStyle;\n sentryLogo?: ImageStyle;\n}\n\n/**\n * The state of the feedback form\n */\nexport interface FeedbackWidgetState {\n isVisible: boolean;\n name: string;\n email: string;\n description: string;\n filename?: string;\n attachment?: string | Uint8Array;\n attachmentUri?: string;\n}\n"]}
1
+ {"version":3,"file":"FeedbackWidget.types.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidget.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FeedbackFormData } from '@sentry/core';\nimport type { ImageStyle, TextStyle, ViewStyle } from 'react-native';\n\n/**\n * The props for the feedback form\n */\nexport interface FeedbackWidgetProps\n extends FeedbackGeneralConfiguration,\n FeedbackTextConfiguration,\n FeedbackCallbacks,\n ImagePickerConfiguration {\n styles?: FeedbackWidgetStyles;\n}\n\n/**\n * General feedback configuration\n */\nexport interface FeedbackGeneralConfiguration {\n /**\n * Show the Sentry branding\n *\n * @default true\n */\n showBranding?: boolean;\n\n /**\n * Should the email field be required?\n */\n isEmailRequired?: boolean;\n\n /**\n * Should the email field be validated?\n */\n shouldValidateEmail?: boolean;\n\n /**\n * Should the name field be required?\n */\n isNameRequired?: boolean;\n\n /**\n * Should the email input field be visible? Note: email will still be collected if set via `Sentry.setUser()`\n */\n showEmail?: boolean;\n\n /**\n * Should the name input field be visible? Note: name will still be collected if set via `Sentry.setUser()`\n */\n showName?: boolean;\n\n /**\n * This flag determines whether the \"Add Screenshot\" button is displayed\n * @default false\n */\n enableScreenshot?: boolean;\n\n /**\n * This flag determines whether the \"Take Screenshot\" button is displayed\n * @default false\n */\n enableTakeScreenshot?: boolean;\n\n /**\n * Fill in email/name input fields with Sentry user context if it exists.\n * The value of the email/name keys represent the properties of your user context.\n */\n useSentryUser?: {\n email: string;\n name: string;\n };\n}\n\n/**\n * All of the different text labels that can be customized\n */\nexport interface FeedbackTextConfiguration {\n /**\n * The label for the Feedback form cancel button that closes dialog\n */\n cancelButtonLabel?: string;\n\n /**\n * The label for the Feedback form submit button that sends feedback\n */\n submitButtonLabel?: string;\n\n /**\n * The title of the Feedback form\n */\n formTitle?: string;\n\n /**\n * Label for the email input\n */\n emailLabel?: string;\n\n /**\n * Placeholder text for Feedback email input\n */\n emailPlaceholder?: string;\n\n /**\n * Label for the message input\n */\n messageLabel?: string;\n\n /**\n * Placeholder text for Feedback message input\n */\n messagePlaceholder?: string;\n\n /**\n * Label for the name input\n */\n nameLabel?: string;\n\n /**\n * Message after feedback was sent successfully\n */\n successMessageText?: string;\n\n /**\n * Placeholder text for Feedback name input\n */\n namePlaceholder?: string;\n\n /**\n * Text which indicates that a field is required\n */\n isRequiredLabel?: string;\n\n /**\n * The label for the button that adds a screenshot\n */\n addScreenshotButtonLabel?: string;\n\n /**\n * The label for the button that removes a screenshot\n */\n removeScreenshotButtonLabel?: string;\n\n /**\n * The label for the button that shows the capture screenshot button\n */\n captureScreenshotButtonLabel?: string;\n\n /**\n * The title of the error dialog\n */\n errorTitle?: string;\n\n /**\n * The error message when the form is invalid\n */\n formError?: string;\n\n /**\n * The error message when the email is invalid\n */\n emailError?: string;\n\n /**\n * The error message when the capture screenshot fails\n */\n captureScreenshotError?: string;\n\n /**\n * Message when there is a generic error\n */\n genericError?: string;\n}\n\n/**\n * The FeedbackButton text labels that can be customized\n */\nexport interface FeedbackButtonTextConfiguration {\n /**\n * The label for the Feedback widget button that opens the dialog\n */\n triggerLabel?: string;\n\n /**\n * The aria label for the Feedback widget button that opens the dialog\n */\n triggerAriaLabel?: string;\n}\n\n/**\n * The ScreenshotButton text labels that can be customized\n */\nexport interface ScreenshotButtonTextConfiguration {\n /**\n * The label for the Screenshot button\n */\n triggerLabel?: string;\n\n /**\n * The aria label for the Screenshot button\n */\n triggerAriaLabel?: string;\n}\n\n/**\n * The public callbacks available for the feedback integration\n */\nexport interface FeedbackCallbacks {\n /**\n * Callback when form is opened\n */\n onFormOpen?: () => void;\n\n /**\n * Callback when form is closed and not submitted\n */\n onFormClose?: () => void;\n\n /**\n * Callback when a screenshot is added\n */\n onAddScreenshot?: (addScreenshot: (uri: string) => void) => void;\n\n /**\n * Callback when feedback is successfully submitted\n *\n * After this you'll see a SuccessMessage on the screen for a moment.\n */\n onSubmitSuccess?: (data: FeedbackFormData) => void;\n\n /**\n * Callback when feedback is unsuccessfully submitted\n */\n onSubmitError?: (error: Error) => void;\n\n /**\n * Callback when the feedback form is submitted successfully, and the SuccessMessage is complete, or dismissed\n */\n onFormSubmitted?: () => void;\n}\n\n/**\n * Image Picker configuration interface compatible with:\n * - `react-native-image-picker`: 7.2, 8.0\n * - `expo-image-picker`: 16.0`\n */\nexport interface ImagePickerConfiguration {\n imagePicker?: ImagePicker;\n}\n\ninterface ImagePickerResponse {\n assets?: ImagePickerAsset[];\n}\n\ninterface ImagePickerAsset {\n fileName?: string;\n uri?: string;\n base64?: string;\n}\n\ninterface ExpoImageLibraryOptions {\n mediaTypes?: 'images'[];\n base64?: boolean;\n}\n\ninterface ReactNativeImageLibraryOptions {\n mediaType: 'photo';\n includeBase64?: boolean;\n}\n\nexport interface ImagePicker {\n launchImageLibraryAsync?: (options?: ExpoImageLibraryOptions) => Promise<ImagePickerResponse>;\n\n launchImageLibrary?: (options: ReactNativeImageLibraryOptions) => Promise<ImagePickerResponse>;\n}\n\n/**\n * The styles for the feedback form\n */\nexport interface FeedbackWidgetStyles {\n container?: ViewStyle;\n title?: TextStyle;\n label?: TextStyle;\n input?: TextStyle;\n textArea?: TextStyle;\n submitButton?: ViewStyle;\n submitText?: TextStyle;\n cancelButton?: ViewStyle;\n cancelText?: TextStyle;\n screenshotButton?: ViewStyle;\n screenshotContainer?: ViewStyle;\n screenshotThumbnail?: ImageStyle;\n screenshotText?: TextStyle;\n takeScreenshotButton?: ViewStyle;\n takeScreenshotText?: TextStyle;\n titleContainer?: ViewStyle;\n sentryLogo?: ImageStyle;\n}\n\n/**\n * The props for the feedback button\n */\nexport interface FeedbackButtonProps extends FeedbackButtonTextConfiguration {\n styles?: FeedbackButtonStyles;\n}\n\n/**\n * The styles for the feedback button\n */\nexport interface FeedbackButtonStyles {\n triggerButton?: ViewStyle;\n triggerText?: TextStyle;\n triggerIcon?: ImageStyle;\n}\n\n/**\n * The props for the screenshot button\n */\nexport interface ScreenshotButtonProps extends ScreenshotButtonTextConfiguration {\n styles?: ScreenshotButtonStyles;\n}\n\n/**\n * The styles for the screenshot button\n */\nexport interface ScreenshotButtonStyles {\n triggerButton?: ViewStyle;\n triggerText?: TextStyle;\n triggerIcon?: ImageStyle;\n}\n\n/**\n * The state of the feedback form\n */\nexport interface FeedbackWidgetState {\n isVisible: boolean;\n name: string;\n email: string;\n description: string;\n filename?: string;\n attachment?: string | Uint8Array;\n attachmentUri?: string;\n}\n"]}
@@ -1,33 +1,53 @@
1
- import * as React from 'react';
2
- import { Animated } from 'react-native';
3
- import type { FeedbackWidgetStyles } from './FeedbackWidget.types';
4
- interface FeedbackWidgetProviderProps {
5
- children: React.ReactNode;
6
- styles?: FeedbackWidgetStyles;
1
+ export declare const PULL_DOWN_CLOSE_THRESHOLD = 200;
2
+ export declare const SLIDE_ANIMATION_DURATION = 200;
3
+ export declare const BACKGROUND_ANIMATION_DURATION = 200;
4
+ declare abstract class FeedbackManager {
5
+ protected static _isVisible: boolean;
6
+ protected static _setVisibility: (visible: boolean) => void;
7
+ protected static get _feedbackComponentName(): string;
8
+ static initialize(setVisibility: (visible: boolean) => void): void;
9
+ /**
10
+ * For testing purposes only.
11
+ */
12
+ static reset(): void;
13
+ static show(): void;
14
+ static hide(): void;
15
+ static isFormVisible(): boolean;
7
16
  }
8
- interface FeedbackWidgetProviderState {
9
- isVisible: boolean;
10
- backgroundOpacity: Animated.Value;
11
- panY: Animated.Value;
12
- isScrollAtTop: boolean;
17
+ /**
18
+ * Provides functionality to show and hide the feedback widget.
19
+ */
20
+ export declare class FeedbackWidgetManager extends FeedbackManager {
21
+ /**
22
+ * Returns the name of the feedback component.
23
+ */
24
+ protected static get _feedbackComponentName(): string;
13
25
  }
14
- declare class FeedbackWidgetProvider extends React.Component<FeedbackWidgetProviderProps> {
15
- state: FeedbackWidgetProviderState;
16
- private _panResponder;
17
- constructor(props: FeedbackWidgetProviderProps);
26
+ /**
27
+ * Provides functionality to show and hide the feedback button.
28
+ */
29
+ export declare class FeedbackButtonManager extends FeedbackManager {
18
30
  /**
19
- * Animates the background opacity when the modal is shown.
31
+ * Returns the name of the feedback component.
20
32
  */
21
- componentDidUpdate(_prevProps: any, prevState: FeedbackWidgetProviderState): void;
33
+ protected static get _feedbackComponentName(): string;
34
+ }
35
+ /**
36
+ * Provides functionality to show and hide the screenshot button.
37
+ */
38
+ export declare class ScreenshotButtonManager extends FeedbackManager {
22
39
  /**
23
- * Renders the feedback form modal.
40
+ * Returns the name of the feedback component.
24
41
  */
25
- render(): React.ReactNode;
26
- private _handleScroll;
27
- private _setVisibilityFunction;
28
- private _handleClose;
42
+ protected static get _feedbackComponentName(): string;
29
43
  }
30
44
  declare const showFeedbackWidget: () => void;
31
45
  declare const resetFeedbackWidgetManager: () => void;
32
- export { showFeedbackWidget, FeedbackWidgetProvider, resetFeedbackWidgetManager };
46
+ declare const showFeedbackButton: () => void;
47
+ declare const hideFeedbackButton: () => void;
48
+ declare const resetFeedbackButtonManager: () => void;
49
+ declare const showScreenshotButton: () => void;
50
+ declare const hideScreenshotButton: () => void;
51
+ declare const resetScreenshotButtonManager: () => void;
52
+ export { showFeedbackButton, hideFeedbackButton, showFeedbackWidget, showScreenshotButton, hideScreenshotButton, resetFeedbackButtonManager, resetFeedbackWidgetManager, resetScreenshotButtonManager };
33
53
  //# sourceMappingURL=FeedbackWidgetManager.d.ts.map