@bbearai/react-native 0.5.4 → 0.5.5
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.js +366 -198
- package/dist/index.mjs +346 -178
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11713,6 +11713,8 @@ var BugBearClient = class {
|
|
|
11713
11713
|
title: report.title || this.generateTitle(report),
|
|
11714
11714
|
description: report.description,
|
|
11715
11715
|
severity: report.severity,
|
|
11716
|
+
category: report.category,
|
|
11717
|
+
// Bug category (ui, performance, crash, etc.)
|
|
11716
11718
|
failed_at_step: report.failedAtStep,
|
|
11717
11719
|
voice_audio_url: report.voiceAudioUrl,
|
|
11718
11720
|
voice_transcript: report.voiceTranscript,
|
|
@@ -13328,15 +13330,15 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13328
13330
|
}
|
|
13329
13331
|
|
|
13330
13332
|
// src/BugBearButton.tsx
|
|
13331
|
-
import
|
|
13333
|
+
import React17, { useState as useState12, useRef as useRef3 } from "react";
|
|
13332
13334
|
import {
|
|
13333
|
-
View as
|
|
13334
|
-
Text as
|
|
13335
|
+
View as View16,
|
|
13336
|
+
Text as Text16,
|
|
13335
13337
|
Image as Image4,
|
|
13336
|
-
TouchableOpacity as
|
|
13337
|
-
Modal as
|
|
13338
|
+
TouchableOpacity as TouchableOpacity15,
|
|
13339
|
+
Modal as Modal3,
|
|
13338
13340
|
ScrollView as ScrollView3,
|
|
13339
|
-
StyleSheet as
|
|
13341
|
+
StyleSheet as StyleSheet17,
|
|
13340
13342
|
Dimensions as Dimensions2,
|
|
13341
13343
|
KeyboardAvoidingView,
|
|
13342
13344
|
Platform as Platform4,
|
|
@@ -14680,20 +14682,185 @@ var styles6 = StyleSheet7.create({
|
|
|
14680
14682
|
});
|
|
14681
14683
|
|
|
14682
14684
|
// src/widget/screens/ReportScreen.tsx
|
|
14683
|
-
import
|
|
14684
|
-
import { View as
|
|
14685
|
+
import React9, { useState as useState7, useRef as useRef2, useEffect as useEffect5 } from "react";
|
|
14686
|
+
import { View as View8, Text as Text8, TouchableOpacity as TouchableOpacity8, TextInput as TextInput3, StyleSheet as StyleSheet9 } from "react-native";
|
|
14687
|
+
|
|
14688
|
+
// src/widget/CategoryPicker.tsx
|
|
14689
|
+
import React8, { useState as useState6 } from "react";
|
|
14690
|
+
import { View as View7, Text as Text7, TouchableOpacity as TouchableOpacity7, Modal as Modal2, StyleSheet as StyleSheet8 } from "react-native";
|
|
14691
|
+
var categoryOptions = [
|
|
14692
|
+
{ value: "ui_ux", label: "UI/UX", icon: "\u{1F3A8}" },
|
|
14693
|
+
{ value: "functional", label: "Functional", icon: "\u2699\uFE0F" },
|
|
14694
|
+
{ value: "crash", label: "Crash", icon: "\u{1F4A5}" },
|
|
14695
|
+
{ value: "security", label: "Security", icon: "\u{1F510}" },
|
|
14696
|
+
{ value: "other", label: "Other", icon: "\u{1F4DD}" }
|
|
14697
|
+
];
|
|
14698
|
+
function CategoryPicker({ value, onChange, optional = true }) {
|
|
14699
|
+
const [modalVisible, setModalVisible] = useState6(false);
|
|
14700
|
+
const selectedOption = value ? categoryOptions.find((o) => o.value === value) : null;
|
|
14701
|
+
const handleSelect = (category) => {
|
|
14702
|
+
onChange(category);
|
|
14703
|
+
setModalVisible(false);
|
|
14704
|
+
};
|
|
14705
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
14706
|
+
TouchableOpacity7,
|
|
14707
|
+
{
|
|
14708
|
+
style: styles7.trigger,
|
|
14709
|
+
onPress: () => setModalVisible(true)
|
|
14710
|
+
},
|
|
14711
|
+
/* @__PURE__ */ React8.createElement(Text7, { style: selectedOption ? styles7.triggerTextSelected : styles7.triggerTextPlaceholder }, selectedOption ? `${selectedOption.icon} ${selectedOption.label}` : optional ? "Select category (optional)" : "Select category"),
|
|
14712
|
+
/* @__PURE__ */ React8.createElement(Text7, { style: styles7.chevron }, "\u25BC")
|
|
14713
|
+
), /* @__PURE__ */ React8.createElement(
|
|
14714
|
+
Modal2,
|
|
14715
|
+
{
|
|
14716
|
+
visible: modalVisible,
|
|
14717
|
+
transparent: true,
|
|
14718
|
+
animationType: "fade",
|
|
14719
|
+
onRequestClose: () => setModalVisible(false)
|
|
14720
|
+
},
|
|
14721
|
+
/* @__PURE__ */ React8.createElement(
|
|
14722
|
+
TouchableOpacity7,
|
|
14723
|
+
{
|
|
14724
|
+
style: styles7.overlay,
|
|
14725
|
+
activeOpacity: 1,
|
|
14726
|
+
onPress: () => setModalVisible(false)
|
|
14727
|
+
},
|
|
14728
|
+
/* @__PURE__ */ React8.createElement(View7, { style: styles7.modal, onStartShouldSetResponder: () => true }, /* @__PURE__ */ React8.createElement(Text7, { style: styles7.modalTitle }, "Select Category"), optional && /* @__PURE__ */ React8.createElement(
|
|
14729
|
+
TouchableOpacity7,
|
|
14730
|
+
{
|
|
14731
|
+
style: [styles7.option, !value && styles7.optionSelected],
|
|
14732
|
+
onPress: () => handleSelect(null)
|
|
14733
|
+
},
|
|
14734
|
+
/* @__PURE__ */ React8.createElement(Text7, { style: styles7.optionText }, "\u2014 None \u2014")
|
|
14735
|
+
), categoryOptions.map(({ value: optValue, label, icon }) => /* @__PURE__ */ React8.createElement(
|
|
14736
|
+
TouchableOpacity7,
|
|
14737
|
+
{
|
|
14738
|
+
key: optValue,
|
|
14739
|
+
style: [styles7.option, value === optValue && styles7.optionSelected],
|
|
14740
|
+
onPress: () => handleSelect(optValue)
|
|
14741
|
+
},
|
|
14742
|
+
/* @__PURE__ */ React8.createElement(Text7, { style: styles7.optionIcon }, icon),
|
|
14743
|
+
/* @__PURE__ */ React8.createElement(Text7, { style: styles7.optionText }, label),
|
|
14744
|
+
value === optValue && /* @__PURE__ */ React8.createElement(Text7, { style: styles7.checkmark }, "\u2713")
|
|
14745
|
+
)), /* @__PURE__ */ React8.createElement(
|
|
14746
|
+
TouchableOpacity7,
|
|
14747
|
+
{
|
|
14748
|
+
style: styles7.cancelButton,
|
|
14749
|
+
onPress: () => setModalVisible(false)
|
|
14750
|
+
},
|
|
14751
|
+
/* @__PURE__ */ React8.createElement(Text7, { style: styles7.cancelText }, "Cancel")
|
|
14752
|
+
))
|
|
14753
|
+
)
|
|
14754
|
+
));
|
|
14755
|
+
}
|
|
14756
|
+
var styles7 = StyleSheet8.create({
|
|
14757
|
+
trigger: {
|
|
14758
|
+
flexDirection: "row",
|
|
14759
|
+
alignItems: "center",
|
|
14760
|
+
justifyContent: "space-between",
|
|
14761
|
+
backgroundColor: colors.card,
|
|
14762
|
+
borderWidth: 1,
|
|
14763
|
+
borderColor: colors.border,
|
|
14764
|
+
borderRadius: 8,
|
|
14765
|
+
paddingHorizontal: 12,
|
|
14766
|
+
paddingVertical: 10
|
|
14767
|
+
},
|
|
14768
|
+
triggerTextSelected: {
|
|
14769
|
+
fontSize: 14,
|
|
14770
|
+
color: colors.textPrimary
|
|
14771
|
+
},
|
|
14772
|
+
triggerTextPlaceholder: {
|
|
14773
|
+
fontSize: 14,
|
|
14774
|
+
color: colors.textMuted
|
|
14775
|
+
},
|
|
14776
|
+
chevron: {
|
|
14777
|
+
fontSize: 10,
|
|
14778
|
+
color: colors.textMuted
|
|
14779
|
+
},
|
|
14780
|
+
overlay: {
|
|
14781
|
+
flex: 1,
|
|
14782
|
+
backgroundColor: "rgba(0, 0, 0, 0.6)",
|
|
14783
|
+
justifyContent: "center",
|
|
14784
|
+
alignItems: "center",
|
|
14785
|
+
padding: 24
|
|
14786
|
+
},
|
|
14787
|
+
modal: {
|
|
14788
|
+
width: "100%",
|
|
14789
|
+
maxWidth: 300,
|
|
14790
|
+
backgroundColor: colors.card,
|
|
14791
|
+
borderRadius: 16,
|
|
14792
|
+
padding: 8,
|
|
14793
|
+
borderWidth: 1,
|
|
14794
|
+
borderColor: colors.border
|
|
14795
|
+
},
|
|
14796
|
+
modalTitle: {
|
|
14797
|
+
fontSize: 16,
|
|
14798
|
+
fontWeight: "600",
|
|
14799
|
+
color: colors.textPrimary,
|
|
14800
|
+
textAlign: "center",
|
|
14801
|
+
paddingVertical: 12,
|
|
14802
|
+
borderBottomWidth: 1,
|
|
14803
|
+
borderBottomColor: colors.border,
|
|
14804
|
+
marginBottom: 4
|
|
14805
|
+
},
|
|
14806
|
+
option: {
|
|
14807
|
+
flexDirection: "row",
|
|
14808
|
+
alignItems: "center",
|
|
14809
|
+
paddingVertical: 14,
|
|
14810
|
+
paddingHorizontal: 16,
|
|
14811
|
+
borderRadius: 8
|
|
14812
|
+
},
|
|
14813
|
+
optionSelected: {
|
|
14814
|
+
backgroundColor: colors.blue + "20"
|
|
14815
|
+
},
|
|
14816
|
+
optionIcon: {
|
|
14817
|
+
fontSize: 18,
|
|
14818
|
+
marginRight: 12
|
|
14819
|
+
},
|
|
14820
|
+
optionText: {
|
|
14821
|
+
flex: 1,
|
|
14822
|
+
fontSize: 15,
|
|
14823
|
+
color: colors.textPrimary
|
|
14824
|
+
},
|
|
14825
|
+
checkmark: {
|
|
14826
|
+
fontSize: 16,
|
|
14827
|
+
color: colors.blue,
|
|
14828
|
+
fontWeight: "600"
|
|
14829
|
+
},
|
|
14830
|
+
cancelButton: {
|
|
14831
|
+
marginTop: 8,
|
|
14832
|
+
paddingVertical: 12,
|
|
14833
|
+
borderTopWidth: 1,
|
|
14834
|
+
borderTopColor: colors.border
|
|
14835
|
+
},
|
|
14836
|
+
cancelText: {
|
|
14837
|
+
fontSize: 15,
|
|
14838
|
+
color: colors.textMuted,
|
|
14839
|
+
textAlign: "center"
|
|
14840
|
+
}
|
|
14841
|
+
});
|
|
14842
|
+
|
|
14843
|
+
// src/widget/screens/ReportScreen.tsx
|
|
14685
14844
|
function ReportScreen({ nav, prefill }) {
|
|
14686
14845
|
const { client, getDeviceInfo, uploadImage, refreshAssignments } = useBugBear();
|
|
14687
|
-
const [reportType, setReportType] =
|
|
14688
|
-
const [severity, setSeverity] =
|
|
14689
|
-
const [
|
|
14690
|
-
const [
|
|
14691
|
-
const [
|
|
14692
|
-
const [
|
|
14846
|
+
const [reportType, setReportType] = useState7(prefill?.type || "bug");
|
|
14847
|
+
const [severity, setSeverity] = useState7("medium");
|
|
14848
|
+
const [category, setCategory] = useState7(null);
|
|
14849
|
+
const [description, setDescription] = useState7("");
|
|
14850
|
+
const [affectedScreen, setAffectedScreen] = useState7("");
|
|
14851
|
+
const [submitting, setSubmitting] = useState7(false);
|
|
14852
|
+
const [error, setError] = useState7(null);
|
|
14693
14853
|
const submittingRef = useRef2(false);
|
|
14694
14854
|
const images = useImageAttachments(uploadImage, 5, "screenshots");
|
|
14695
14855
|
const isRetestFailure = prefill?.type === "test_fail";
|
|
14696
14856
|
const isBugType = reportType === "bug" || reportType === "test_fail";
|
|
14857
|
+
useEffect5(() => {
|
|
14858
|
+
if (reportType === "feedback" || reportType === "suggestion") {
|
|
14859
|
+
setCategory("other");
|
|
14860
|
+
} else {
|
|
14861
|
+
setCategory(null);
|
|
14862
|
+
}
|
|
14863
|
+
}, [reportType]);
|
|
14697
14864
|
const handleSubmit = async () => {
|
|
14698
14865
|
if (!client || !description.trim()) return;
|
|
14699
14866
|
if (submittingRef.current) return;
|
|
@@ -14711,6 +14878,7 @@ function ReportScreen({ nav, prefill }) {
|
|
|
14711
14878
|
type: reportType,
|
|
14712
14879
|
description: description.trim(),
|
|
14713
14880
|
severity: isBugType ? severity : void 0,
|
|
14881
|
+
category: category || void 0,
|
|
14714
14882
|
assignmentId: prefill?.assignmentId,
|
|
14715
14883
|
testCaseId: prefill?.testCaseId,
|
|
14716
14884
|
appContext,
|
|
@@ -14735,23 +14903,23 @@ function ReportScreen({ nav, prefill }) {
|
|
|
14735
14903
|
submittingRef.current = false;
|
|
14736
14904
|
}
|
|
14737
14905
|
};
|
|
14738
|
-
return /* @__PURE__ */
|
|
14906
|
+
return /* @__PURE__ */ React9.createElement(View8, null, isRetestFailure ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(View8, { style: styles8.retestBanner }, /* @__PURE__ */ React9.createElement(Text8, { style: styles8.retestIcon }, "\u{1F504}"), /* @__PURE__ */ React9.createElement(View8, null, /* @__PURE__ */ React9.createElement(Text8, { style: styles8.retestTitle }, "Bug Still Present"), /* @__PURE__ */ React9.createElement(Text8, { style: styles8.retestSubtitle }, "The fix did not resolve this issue"))), /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "Severity"), /* @__PURE__ */ React9.createElement(View8, { style: styles8.severityRow }, [
|
|
14739
14907
|
{ sev: "critical", color: "#ef4444" },
|
|
14740
14908
|
{ sev: "high", color: "#f97316" },
|
|
14741
14909
|
{ sev: "medium", color: "#eab308" },
|
|
14742
14910
|
{ sev: "low", color: "#6b7280" }
|
|
14743
|
-
].map(({ sev, color }) => /* @__PURE__ */
|
|
14744
|
-
|
|
14911
|
+
].map(({ sev, color }) => /* @__PURE__ */ React9.createElement(
|
|
14912
|
+
TouchableOpacity8,
|
|
14745
14913
|
{
|
|
14746
14914
|
key: sev,
|
|
14747
|
-
style: [
|
|
14915
|
+
style: [styles8.sevButton, severity === sev && { backgroundColor: `${color}30`, borderColor: color }],
|
|
14748
14916
|
onPress: () => setSeverity(sev)
|
|
14749
14917
|
},
|
|
14750
|
-
/* @__PURE__ */
|
|
14751
|
-
)))), /* @__PURE__ */
|
|
14918
|
+
/* @__PURE__ */ React9.createElement(Text8, { style: [styles8.sevText, severity === sev && { color }] }, sev)
|
|
14919
|
+
)))), /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "Category (optional)"), /* @__PURE__ */ React9.createElement(CategoryPicker, { value: category, onChange: setCategory, optional: true })), /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "What went wrong?"), /* @__PURE__ */ React9.createElement(
|
|
14752
14920
|
TextInput3,
|
|
14753
14921
|
{
|
|
14754
|
-
style:
|
|
14922
|
+
style: styles8.descInput,
|
|
14755
14923
|
value: description,
|
|
14756
14924
|
onChangeText: setDescription,
|
|
14757
14925
|
placeholder: "Describe what you observed. What still doesn't work?",
|
|
@@ -14760,7 +14928,7 @@ function ReportScreen({ nav, prefill }) {
|
|
|
14760
14928
|
numberOfLines: 4,
|
|
14761
14929
|
textAlignVertical: "top"
|
|
14762
14930
|
}
|
|
14763
|
-
)), /* @__PURE__ */
|
|
14931
|
+
)), /* @__PURE__ */ React9.createElement(
|
|
14764
14932
|
ImagePickerButtons,
|
|
14765
14933
|
{
|
|
14766
14934
|
images: images.images,
|
|
@@ -14770,44 +14938,44 @@ function ReportScreen({ nav, prefill }) {
|
|
|
14770
14938
|
onRemove: images.removeImage,
|
|
14771
14939
|
label: "Attachments (optional)"
|
|
14772
14940
|
}
|
|
14773
|
-
), error && /* @__PURE__ */
|
|
14774
|
-
|
|
14941
|
+
), error && /* @__PURE__ */ React9.createElement(View8, { style: styles8.errorBanner }, /* @__PURE__ */ React9.createElement(Text8, { style: styles8.errorText }, error)), /* @__PURE__ */ React9.createElement(
|
|
14942
|
+
TouchableOpacity8,
|
|
14775
14943
|
{
|
|
14776
|
-
style: [shared.primaryButton,
|
|
14944
|
+
style: [shared.primaryButton, styles8.retestSubmitButton, (!description.trim() || submitting || images.isUploading) && shared.primaryButtonDisabled, { marginTop: 20 }],
|
|
14777
14945
|
onPress: handleSubmit,
|
|
14778
14946
|
disabled: !description.trim() || submitting || images.isUploading
|
|
14779
14947
|
},
|
|
14780
|
-
/* @__PURE__ */
|
|
14781
|
-
)) : /* @__PURE__ */
|
|
14948
|
+
/* @__PURE__ */ React9.createElement(Text8, { style: shared.primaryButtonText }, images.isUploading ? "Uploading images..." : submitting ? "Submitting..." : error ? "Retry" : "Submit Failed Retest")
|
|
14949
|
+
)) : /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "What are you reporting?"), /* @__PURE__ */ React9.createElement(View8, { style: styles8.typeRow }, [
|
|
14782
14950
|
{ type: "bug", label: "Bug", icon: "\u{1F41B}" },
|
|
14783
14951
|
{ type: "feedback", label: "Feedback", icon: "\u{1F4A1}" },
|
|
14784
14952
|
{ type: "suggestion", label: "Idea", icon: "\u2728" }
|
|
14785
|
-
].map(({ type, label, icon }) => /* @__PURE__ */
|
|
14786
|
-
|
|
14953
|
+
].map(({ type, label, icon }) => /* @__PURE__ */ React9.createElement(
|
|
14954
|
+
TouchableOpacity8,
|
|
14787
14955
|
{
|
|
14788
14956
|
key: type,
|
|
14789
|
-
style: [
|
|
14957
|
+
style: [styles8.typeCard, reportType === type && styles8.typeCardActive],
|
|
14790
14958
|
onPress: () => setReportType(type)
|
|
14791
14959
|
},
|
|
14792
|
-
/* @__PURE__ */
|
|
14793
|
-
/* @__PURE__ */
|
|
14794
|
-
))), isBugType && /* @__PURE__ */
|
|
14960
|
+
/* @__PURE__ */ React9.createElement(Text8, { style: styles8.typeIcon }, icon),
|
|
14961
|
+
/* @__PURE__ */ React9.createElement(Text8, { style: [styles8.typeLabel, reportType === type && styles8.typeLabelActive] }, label)
|
|
14962
|
+
))), isBugType && /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "Severity"), /* @__PURE__ */ React9.createElement(View8, { style: styles8.severityRow }, [
|
|
14795
14963
|
{ sev: "critical", color: "#ef4444" },
|
|
14796
14964
|
{ sev: "high", color: "#f97316" },
|
|
14797
14965
|
{ sev: "medium", color: "#eab308" },
|
|
14798
14966
|
{ sev: "low", color: "#6b7280" }
|
|
14799
|
-
].map(({ sev, color }) => /* @__PURE__ */
|
|
14800
|
-
|
|
14967
|
+
].map(({ sev, color }) => /* @__PURE__ */ React9.createElement(
|
|
14968
|
+
TouchableOpacity8,
|
|
14801
14969
|
{
|
|
14802
14970
|
key: sev,
|
|
14803
|
-
style: [
|
|
14971
|
+
style: [styles8.sevButton, severity === sev && { backgroundColor: `${color}30`, borderColor: color }],
|
|
14804
14972
|
onPress: () => setSeverity(sev)
|
|
14805
14973
|
},
|
|
14806
|
-
/* @__PURE__ */
|
|
14807
|
-
)))), /* @__PURE__ */
|
|
14974
|
+
/* @__PURE__ */ React9.createElement(Text8, { style: [styles8.sevText, severity === sev && { color }] }, sev)
|
|
14975
|
+
)))), isBugType && /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "Category (optional)"), /* @__PURE__ */ React9.createElement(CategoryPicker, { value: category, onChange: setCategory, optional: true })), /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "What happened?"), /* @__PURE__ */ React9.createElement(
|
|
14808
14976
|
TextInput3,
|
|
14809
14977
|
{
|
|
14810
|
-
style:
|
|
14978
|
+
style: styles8.descInput,
|
|
14811
14979
|
value: description,
|
|
14812
14980
|
onChangeText: setDescription,
|
|
14813
14981
|
placeholder: "Describe the issue...",
|
|
@@ -14816,16 +14984,16 @@ function ReportScreen({ nav, prefill }) {
|
|
|
14816
14984
|
numberOfLines: 4,
|
|
14817
14985
|
textAlignVertical: "top"
|
|
14818
14986
|
}
|
|
14819
|
-
)), isBugType && /* @__PURE__ */
|
|
14987
|
+
)), isBugType && /* @__PURE__ */ React9.createElement(View8, { style: styles8.section }, /* @__PURE__ */ React9.createElement(Text8, { style: shared.label }, "Which screen?"), /* @__PURE__ */ React9.createElement(
|
|
14820
14988
|
TextInput3,
|
|
14821
14989
|
{
|
|
14822
|
-
style:
|
|
14990
|
+
style: styles8.screenInput,
|
|
14823
14991
|
value: affectedScreen,
|
|
14824
14992
|
onChangeText: setAffectedScreen,
|
|
14825
14993
|
placeholder: "e.g. Reservations, Settings...",
|
|
14826
14994
|
placeholderTextColor: colors.textMuted
|
|
14827
14995
|
}
|
|
14828
|
-
), /* @__PURE__ */
|
|
14996
|
+
), /* @__PURE__ */ React9.createElement(Text8, { style: styles8.screenHint }, "Which screen or area was the bug on? (optional)")), /* @__PURE__ */ React9.createElement(
|
|
14829
14997
|
ImagePickerButtons,
|
|
14830
14998
|
{
|
|
14831
14999
|
images: images.images,
|
|
@@ -14835,17 +15003,17 @@ function ReportScreen({ nav, prefill }) {
|
|
|
14835
15003
|
onRemove: images.removeImage,
|
|
14836
15004
|
label: "Screenshots (optional)"
|
|
14837
15005
|
}
|
|
14838
|
-
), error && /* @__PURE__ */
|
|
14839
|
-
|
|
15006
|
+
), error && /* @__PURE__ */ React9.createElement(View8, { style: styles8.errorBanner }, /* @__PURE__ */ React9.createElement(Text8, { style: styles8.errorText }, error)), /* @__PURE__ */ React9.createElement(
|
|
15007
|
+
TouchableOpacity8,
|
|
14840
15008
|
{
|
|
14841
15009
|
style: [shared.primaryButton, (!description.trim() || submitting || images.isUploading) && shared.primaryButtonDisabled, { marginTop: 20 }],
|
|
14842
15010
|
onPress: handleSubmit,
|
|
14843
15011
|
disabled: !description.trim() || submitting || images.isUploading
|
|
14844
15012
|
},
|
|
14845
|
-
/* @__PURE__ */
|
|
15013
|
+
/* @__PURE__ */ React9.createElement(Text8, { style: shared.primaryButtonText }, images.isUploading ? "Uploading images..." : submitting ? "Submitting..." : error ? "Retry" : "Submit Report")
|
|
14846
15014
|
)));
|
|
14847
15015
|
}
|
|
14848
|
-
var
|
|
15016
|
+
var styles8 = StyleSheet9.create({
|
|
14849
15017
|
typeRow: { flexDirection: "row", gap: 10, marginBottom: 20 },
|
|
14850
15018
|
typeCard: { flex: 1, alignItems: "center", paddingVertical: 16, borderRadius: 12, backgroundColor: colors.card, borderWidth: 1, borderColor: colors.border },
|
|
14851
15019
|
typeCardActive: { borderColor: colors.blue, backgroundColor: "#172554" },
|
|
@@ -14869,16 +15037,16 @@ var styles7 = StyleSheet8.create({
|
|
|
14869
15037
|
});
|
|
14870
15038
|
|
|
14871
15039
|
// src/widget/screens/ReportSuccessScreen.tsx
|
|
14872
|
-
import
|
|
14873
|
-
import { View as
|
|
15040
|
+
import React10, { useEffect as useEffect6 } from "react";
|
|
15041
|
+
import { View as View9, Text as Text9, StyleSheet as StyleSheet10 } from "react-native";
|
|
14874
15042
|
function ReportSuccessScreen({ nav }) {
|
|
14875
|
-
|
|
15043
|
+
useEffect6(() => {
|
|
14876
15044
|
const timer = setTimeout(() => nav.reset(), 2e3);
|
|
14877
15045
|
return () => clearTimeout(timer);
|
|
14878
15046
|
}, [nav]);
|
|
14879
|
-
return /* @__PURE__ */
|
|
15047
|
+
return /* @__PURE__ */ React10.createElement(View9, { style: styles9.container }, /* @__PURE__ */ React10.createElement(Text9, { style: styles9.emoji }, "\u{1F389}"), /* @__PURE__ */ React10.createElement(Text9, { style: styles9.title }, "Report submitted!"), /* @__PURE__ */ React10.createElement(Text9, { style: styles9.subtitle }, "Thank you for your feedback"));
|
|
14880
15048
|
}
|
|
14881
|
-
var
|
|
15049
|
+
var styles9 = StyleSheet10.create({
|
|
14882
15050
|
container: { alignItems: "center", paddingVertical: 60 },
|
|
14883
15051
|
emoji: { fontSize: 48, marginBottom: 16 },
|
|
14884
15052
|
title: { fontSize: 22, fontWeight: "700", color: colors.textPrimary, marginBottom: 6 },
|
|
@@ -14886,29 +15054,29 @@ var styles8 = StyleSheet9.create({
|
|
|
14886
15054
|
});
|
|
14887
15055
|
|
|
14888
15056
|
// src/widget/screens/MessageListScreen.tsx
|
|
14889
|
-
import
|
|
14890
|
-
import { View as
|
|
15057
|
+
import React11 from "react";
|
|
15058
|
+
import { View as View10, Text as Text10, TouchableOpacity as TouchableOpacity9, StyleSheet as StyleSheet11 } from "react-native";
|
|
14891
15059
|
function MessageListScreen({ nav }) {
|
|
14892
15060
|
const { threads, unreadCount, refreshThreads } = useBugBear();
|
|
14893
|
-
return /* @__PURE__ */
|
|
14894
|
-
|
|
15061
|
+
return /* @__PURE__ */ React11.createElement(View10, null, /* @__PURE__ */ React11.createElement(
|
|
15062
|
+
TouchableOpacity9,
|
|
14895
15063
|
{
|
|
14896
|
-
style:
|
|
15064
|
+
style: styles10.newMsgButton,
|
|
14897
15065
|
onPress: () => nav.push({ name: "COMPOSE_MESSAGE" })
|
|
14898
15066
|
},
|
|
14899
|
-
/* @__PURE__ */
|
|
14900
|
-
), threads.length === 0 ? /* @__PURE__ */
|
|
14901
|
-
|
|
15067
|
+
/* @__PURE__ */ React11.createElement(Text10, { style: styles10.newMsgText }, "\u2709\uFE0F New Message")
|
|
15068
|
+
), threads.length === 0 ? /* @__PURE__ */ React11.createElement(View10, { style: shared.emptyState }, /* @__PURE__ */ React11.createElement(Text10, { style: shared.emptyEmoji }, "\u{1F4AC}"), /* @__PURE__ */ React11.createElement(Text10, { style: shared.emptyTitle }, "No messages yet"), /* @__PURE__ */ React11.createElement(Text10, { style: shared.emptySubtitle }, "Start a conversation or wait for messages from admins")) : /* @__PURE__ */ React11.createElement(View10, null, threads.map((thread) => /* @__PURE__ */ React11.createElement(
|
|
15069
|
+
TouchableOpacity9,
|
|
14902
15070
|
{
|
|
14903
15071
|
key: thread.id,
|
|
14904
|
-
style: [
|
|
15072
|
+
style: [styles10.threadItem, thread.unreadCount > 0 && styles10.threadItemUnread],
|
|
14905
15073
|
onPress: () => nav.push({ name: "THREAD_DETAIL", thread })
|
|
14906
15074
|
},
|
|
14907
|
-
/* @__PURE__ */
|
|
14908
|
-
/* @__PURE__ */
|
|
14909
|
-
))), /* @__PURE__ */
|
|
15075
|
+
/* @__PURE__ */ React11.createElement(View10, { style: styles10.threadLeft }, /* @__PURE__ */ React11.createElement(Text10, { style: styles10.threadIcon }, getThreadTypeIcon(thread.threadType)), /* @__PURE__ */ React11.createElement(View10, { style: styles10.threadInfo }, /* @__PURE__ */ React11.createElement(View10, { style: styles10.threadTitleRow }, thread.isPinned && /* @__PURE__ */ React11.createElement(Text10, { style: styles10.pinIcon }, "\u{1F4CC}"), /* @__PURE__ */ React11.createElement(Text10, { style: styles10.threadSubject, numberOfLines: 1 }, thread.subject || "No subject")), thread.lastMessage && /* @__PURE__ */ React11.createElement(Text10, { style: styles10.threadPreview, numberOfLines: 1 }, thread.lastMessage.senderName, ": ", thread.lastMessage.content))),
|
|
15076
|
+
/* @__PURE__ */ React11.createElement(View10, { style: styles10.threadRight }, /* @__PURE__ */ React11.createElement(Text10, { style: styles10.threadTime }, formatRelativeTime(thread.lastMessageAt)), thread.unreadCount > 0 && /* @__PURE__ */ React11.createElement(View10, { style: styles10.unreadBadge }, /* @__PURE__ */ React11.createElement(Text10, { style: styles10.unreadText }, thread.unreadCount)), thread.priority !== "normal" && /* @__PURE__ */ React11.createElement(View10, { style: [styles10.priorityDot, { backgroundColor: getPriorityColor(thread.priority) }] }))
|
|
15077
|
+
))), /* @__PURE__ */ React11.createElement(View10, { style: styles10.footer }, /* @__PURE__ */ React11.createElement(Text10, { style: styles10.footerText }, threads.length, " thread", threads.length !== 1 ? "s" : "", " \xB7 ", unreadCount, " unread"), /* @__PURE__ */ React11.createElement(TouchableOpacity9, { onPress: refreshThreads }, /* @__PURE__ */ React11.createElement(Text10, { style: styles10.refreshText }, "\u21BB Refresh"))));
|
|
14910
15078
|
}
|
|
14911
|
-
var
|
|
15079
|
+
var styles10 = StyleSheet11.create({
|
|
14912
15080
|
newMsgButton: { backgroundColor: colors.blue, paddingVertical: 12, borderRadius: 12, alignItems: "center", marginBottom: 16 },
|
|
14913
15081
|
newMsgText: { fontSize: 15, fontWeight: "600", color: "#fff" },
|
|
14914
15082
|
threadItem: { flexDirection: "row", justifyContent: "space-between", paddingVertical: 12, paddingHorizontal: 12, borderRadius: 10, marginBottom: 4, backgroundColor: colors.card },
|
|
@@ -14931,17 +15099,17 @@ var styles9 = StyleSheet10.create({
|
|
|
14931
15099
|
});
|
|
14932
15100
|
|
|
14933
15101
|
// src/widget/screens/ThreadDetailScreen.tsx
|
|
14934
|
-
import
|
|
14935
|
-
import { View as
|
|
15102
|
+
import React12, { useState as useState8, useEffect as useEffect7 } from "react";
|
|
15103
|
+
import { View as View11, Text as Text11, TouchableOpacity as TouchableOpacity10, TextInput as TextInput4, StyleSheet as StyleSheet12, Image as Image2 } from "react-native";
|
|
14936
15104
|
function ThreadDetailScreen({ thread, nav }) {
|
|
14937
15105
|
const { getThreadMessages, sendMessage, markAsRead, uploadImage } = useBugBear();
|
|
14938
|
-
const [messages, setMessages] =
|
|
14939
|
-
const [loading, setLoading] =
|
|
14940
|
-
const [replyText, setReplyText] =
|
|
14941
|
-
const [sending, setSending] =
|
|
14942
|
-
const [sendError, setSendError] =
|
|
15106
|
+
const [messages, setMessages] = useState8([]);
|
|
15107
|
+
const [loading, setLoading] = useState8(true);
|
|
15108
|
+
const [replyText, setReplyText] = useState8("");
|
|
15109
|
+
const [sending, setSending] = useState8(false);
|
|
15110
|
+
const [sendError, setSendError] = useState8(false);
|
|
14943
15111
|
const replyImages = useImageAttachments(uploadImage, 3, "discussion-attachments");
|
|
14944
|
-
|
|
15112
|
+
useEffect7(() => {
|
|
14945
15113
|
(async () => {
|
|
14946
15114
|
setLoading(true);
|
|
14947
15115
|
const msgs = await getThreadMessages(thread.id);
|
|
@@ -14973,20 +15141,20 @@ function ThreadDetailScreen({ thread, nav }) {
|
|
|
14973
15141
|
}
|
|
14974
15142
|
setSending(false);
|
|
14975
15143
|
};
|
|
14976
|
-
return /* @__PURE__ */
|
|
14977
|
-
|
|
15144
|
+
return /* @__PURE__ */ React12.createElement(View11, { style: styles11.container }, /* @__PURE__ */ React12.createElement(View11, { style: styles11.header }, /* @__PURE__ */ React12.createElement(Text11, { style: styles11.headerIcon }, getThreadTypeIcon(thread.threadType)), /* @__PURE__ */ React12.createElement(Text11, { style: styles11.headerSubject, numberOfLines: 2 }, thread.subject || "No subject")), loading ? /* @__PURE__ */ React12.createElement(View11, { style: styles11.loadingContainer }, /* @__PURE__ */ React12.createElement(Text11, { style: styles11.loadingText }, "Loading messages...")) : /* @__PURE__ */ React12.createElement(View11, { style: styles11.messagesContainer }, messages.map((msg) => /* @__PURE__ */ React12.createElement(
|
|
15145
|
+
View11,
|
|
14978
15146
|
{
|
|
14979
15147
|
key: msg.id,
|
|
14980
|
-
style: [
|
|
15148
|
+
style: [styles11.bubble, msg.senderType === "tester" ? styles11.bubbleTester : styles11.bubbleAdmin]
|
|
14981
15149
|
},
|
|
14982
|
-
/* @__PURE__ */
|
|
14983
|
-
/* @__PURE__ */
|
|
14984
|
-
msg.attachments && msg.attachments.length > 0 && /* @__PURE__ */
|
|
14985
|
-
/* @__PURE__ */
|
|
14986
|
-
))), sendError && /* @__PURE__ */
|
|
15150
|
+
/* @__PURE__ */ React12.createElement(Text11, { style: [styles11.sender, msg.senderType === "tester" && styles11.senderTester] }, msg.senderType === "tester" ? "You" : msg.senderName),
|
|
15151
|
+
/* @__PURE__ */ React12.createElement(Text11, { style: [styles11.content, msg.senderType === "tester" && styles11.contentTester] }, msg.content),
|
|
15152
|
+
msg.attachments && msg.attachments.length > 0 && /* @__PURE__ */ React12.createElement(View11, { style: styles11.attachments }, msg.attachments.filter((a) => a.type === "image").map((att, idx) => /* @__PURE__ */ React12.createElement(Image2, { key: idx, source: { uri: att.url }, style: styles11.attachmentImage, resizeMode: "cover" }))),
|
|
15153
|
+
/* @__PURE__ */ React12.createElement(Text11, { style: [styles11.time, msg.senderType === "tester" && styles11.timeTester] }, formatMessageTime(msg.createdAt))
|
|
15154
|
+
))), sendError && /* @__PURE__ */ React12.createElement(View11, { style: styles11.errorBar }, /* @__PURE__ */ React12.createElement(Text11, { style: styles11.errorText }, "Failed to send. Tap Send to retry.")), replyImages.images.length > 0 && /* @__PURE__ */ React12.createElement(View11, { style: styles11.replyPreview }, /* @__PURE__ */ React12.createElement(ImagePreviewStrip, { images: replyImages.images, onRemove: replyImages.removeImage })), /* @__PURE__ */ React12.createElement(View11, { style: styles11.composer }, IMAGE_PICKER_AVAILABLE && /* @__PURE__ */ React12.createElement(TouchableOpacity10, { style: styles11.attachBtn, onPress: replyImages.pickFromGallery, disabled: replyImages.images.length >= 3 }, /* @__PURE__ */ React12.createElement(Text11, { style: styles11.attachBtnText }, "\u{1F4CE}")), /* @__PURE__ */ React12.createElement(
|
|
14987
15155
|
TextInput4,
|
|
14988
15156
|
{
|
|
14989
|
-
style:
|
|
15157
|
+
style: styles11.replyInput,
|
|
14990
15158
|
value: replyText,
|
|
14991
15159
|
onChangeText: setReplyText,
|
|
14992
15160
|
placeholder: "Type a reply...",
|
|
@@ -14994,17 +15162,17 @@ function ThreadDetailScreen({ thread, nav }) {
|
|
|
14994
15162
|
multiline: true,
|
|
14995
15163
|
maxLength: 1e3
|
|
14996
15164
|
}
|
|
14997
|
-
), /* @__PURE__ */
|
|
14998
|
-
|
|
15165
|
+
), /* @__PURE__ */ React12.createElement(
|
|
15166
|
+
TouchableOpacity10,
|
|
14999
15167
|
{
|
|
15000
|
-
style: [
|
|
15168
|
+
style: [styles11.sendBtn, (!replyText.trim() || sending || replyImages.isUploading) && styles11.sendBtnDisabled],
|
|
15001
15169
|
onPress: handleSend,
|
|
15002
15170
|
disabled: !replyText.trim() || sending || replyImages.isUploading
|
|
15003
15171
|
},
|
|
15004
|
-
/* @__PURE__ */
|
|
15172
|
+
/* @__PURE__ */ React12.createElement(Text11, { style: styles11.sendBtnText }, sending ? "..." : "Send")
|
|
15005
15173
|
)));
|
|
15006
15174
|
}
|
|
15007
|
-
var
|
|
15175
|
+
var styles11 = StyleSheet12.create({
|
|
15008
15176
|
container: { flex: 1 },
|
|
15009
15177
|
header: { flexDirection: "row", alignItems: "center", gap: 8, marginBottom: 16, paddingBottom: 12, borderBottomWidth: 1, borderBottomColor: colors.border },
|
|
15010
15178
|
headerIcon: { fontSize: 20 },
|
|
@@ -15036,13 +15204,13 @@ var styles10 = StyleSheet11.create({
|
|
|
15036
15204
|
});
|
|
15037
15205
|
|
|
15038
15206
|
// src/widget/screens/ComposeMessageScreen.tsx
|
|
15039
|
-
import
|
|
15040
|
-
import { View as
|
|
15207
|
+
import React13, { useState as useState9 } from "react";
|
|
15208
|
+
import { View as View12, Text as Text12, TextInput as TextInput5, TouchableOpacity as TouchableOpacity11, StyleSheet as StyleSheet13 } from "react-native";
|
|
15041
15209
|
function ComposeMessageScreen({ nav }) {
|
|
15042
15210
|
const { createThread, uploadImage } = useBugBear();
|
|
15043
|
-
const [subject, setSubject] =
|
|
15044
|
-
const [message, setMessage] =
|
|
15045
|
-
const [sending, setSending] =
|
|
15211
|
+
const [subject, setSubject] = useState9("");
|
|
15212
|
+
const [message, setMessage] = useState9("");
|
|
15213
|
+
const [sending, setSending] = useState9(false);
|
|
15046
15214
|
const images = useImageAttachments(uploadImage, 3, "discussion-attachments");
|
|
15047
15215
|
const handleSend = async () => {
|
|
15048
15216
|
if (!subject.trim() || !message.trim()) return;
|
|
@@ -15058,20 +15226,20 @@ function ComposeMessageScreen({ nav }) {
|
|
|
15058
15226
|
nav.pop();
|
|
15059
15227
|
}
|
|
15060
15228
|
};
|
|
15061
|
-
return /* @__PURE__ */
|
|
15229
|
+
return /* @__PURE__ */ React13.createElement(View12, null, /* @__PURE__ */ React13.createElement(View12, { style: styles12.header }, /* @__PURE__ */ React13.createElement(Text12, { style: styles12.title }, "New Message"), /* @__PURE__ */ React13.createElement(Text12, { style: styles12.subtitle }, "Send a message to the QA team")), /* @__PURE__ */ React13.createElement(View12, { style: styles12.form }, /* @__PURE__ */ React13.createElement(Text12, { style: shared.label }, "Subject"), /* @__PURE__ */ React13.createElement(
|
|
15062
15230
|
TextInput5,
|
|
15063
15231
|
{
|
|
15064
|
-
style:
|
|
15232
|
+
style: styles12.subjectInput,
|
|
15065
15233
|
value: subject,
|
|
15066
15234
|
onChangeText: setSubject,
|
|
15067
15235
|
placeholder: "What's this about?",
|
|
15068
15236
|
placeholderTextColor: colors.textMuted,
|
|
15069
15237
|
maxLength: 100
|
|
15070
15238
|
}
|
|
15071
|
-
), /* @__PURE__ */
|
|
15239
|
+
), /* @__PURE__ */ React13.createElement(Text12, { style: [shared.label, { marginTop: 16 }] }, "Message"), /* @__PURE__ */ React13.createElement(
|
|
15072
15240
|
TextInput5,
|
|
15073
15241
|
{
|
|
15074
|
-
style:
|
|
15242
|
+
style: styles12.messageInput,
|
|
15075
15243
|
value: message,
|
|
15076
15244
|
onChangeText: setMessage,
|
|
15077
15245
|
placeholder: "Write your message...",
|
|
@@ -15081,7 +15249,7 @@ function ComposeMessageScreen({ nav }) {
|
|
|
15081
15249
|
textAlignVertical: "top",
|
|
15082
15250
|
maxLength: 2e3
|
|
15083
15251
|
}
|
|
15084
|
-
), /* @__PURE__ */
|
|
15252
|
+
), /* @__PURE__ */ React13.createElement(
|
|
15085
15253
|
ImagePickerButtons,
|
|
15086
15254
|
{
|
|
15087
15255
|
images: images.images,
|
|
@@ -15090,17 +15258,17 @@ function ComposeMessageScreen({ nav }) {
|
|
|
15090
15258
|
onPickCamera: images.pickFromCamera,
|
|
15091
15259
|
onRemove: images.removeImage
|
|
15092
15260
|
}
|
|
15093
|
-
), /* @__PURE__ */
|
|
15094
|
-
|
|
15261
|
+
), /* @__PURE__ */ React13.createElement(
|
|
15262
|
+
TouchableOpacity11,
|
|
15095
15263
|
{
|
|
15096
15264
|
style: [shared.primaryButton, (!subject.trim() || !message.trim() || sending || images.isUploading) && shared.primaryButtonDisabled, { marginTop: 20 }],
|
|
15097
15265
|
onPress: handleSend,
|
|
15098
15266
|
disabled: !subject.trim() || !message.trim() || sending || images.isUploading
|
|
15099
15267
|
},
|
|
15100
|
-
/* @__PURE__ */
|
|
15268
|
+
/* @__PURE__ */ React13.createElement(Text12, { style: shared.primaryButtonText }, images.isUploading ? "Uploading..." : sending ? "Sending..." : "Send Message")
|
|
15101
15269
|
)));
|
|
15102
15270
|
}
|
|
15103
|
-
var
|
|
15271
|
+
var styles12 = StyleSheet13.create({
|
|
15104
15272
|
header: { marginBottom: 20 },
|
|
15105
15273
|
title: { fontSize: 20, fontWeight: "600", color: colors.textPrimary, marginBottom: 4 },
|
|
15106
15274
|
subtitle: { fontSize: 14, color: colors.textMuted },
|
|
@@ -15110,20 +15278,20 @@ var styles11 = StyleSheet12.create({
|
|
|
15110
15278
|
});
|
|
15111
15279
|
|
|
15112
15280
|
// src/widget/screens/ProfileScreen.tsx
|
|
15113
|
-
import
|
|
15114
|
-
import { View as
|
|
15281
|
+
import React14, { useState as useState10, useEffect as useEffect8 } from "react";
|
|
15282
|
+
import { View as View13, Text as Text13, TouchableOpacity as TouchableOpacity12, TextInput as TextInput6, StyleSheet as StyleSheet14 } from "react-native";
|
|
15115
15283
|
function ProfileScreen({ nav }) {
|
|
15116
15284
|
const { testerInfo, assignments, updateTesterProfile, refreshTesterInfo } = useBugBear();
|
|
15117
|
-
const [editing, setEditing] =
|
|
15118
|
-
const [name, setName] =
|
|
15119
|
-
const [additionalEmails, setAdditionalEmails] =
|
|
15120
|
-
const [newEmailInput, setNewEmailInput] =
|
|
15121
|
-
const [platforms, setPlatforms] =
|
|
15122
|
-
const [saving, setSaving] =
|
|
15123
|
-
const [saved, setSaved] =
|
|
15124
|
-
const [showDetails, setShowDetails] =
|
|
15285
|
+
const [editing, setEditing] = useState10(false);
|
|
15286
|
+
const [name, setName] = useState10(testerInfo?.name || "");
|
|
15287
|
+
const [additionalEmails, setAdditionalEmails] = useState10(testerInfo?.additionalEmails || []);
|
|
15288
|
+
const [newEmailInput, setNewEmailInput] = useState10("");
|
|
15289
|
+
const [platforms, setPlatforms] = useState10(testerInfo?.platforms || []);
|
|
15290
|
+
const [saving, setSaving] = useState10(false);
|
|
15291
|
+
const [saved, setSaved] = useState10(false);
|
|
15292
|
+
const [showDetails, setShowDetails] = useState10(false);
|
|
15125
15293
|
const completedCount = assignments.filter((a) => a.status === "passed" || a.status === "failed").length;
|
|
15126
|
-
|
|
15294
|
+
useEffect8(() => {
|
|
15127
15295
|
if (testerInfo) {
|
|
15128
15296
|
setName(testerInfo.name);
|
|
15129
15297
|
setAdditionalEmails(testerInfo.additionalEmails || []);
|
|
@@ -15157,19 +15325,19 @@ function ProfileScreen({ nav }) {
|
|
|
15157
15325
|
}
|
|
15158
15326
|
};
|
|
15159
15327
|
if (saved) {
|
|
15160
|
-
return /* @__PURE__ */
|
|
15328
|
+
return /* @__PURE__ */ React14.createElement(View13, { style: shared.emptyState }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.emptyEmoji }, "\u2705"), /* @__PURE__ */ React14.createElement(Text13, { style: shared.emptyTitle }, "Profile saved!"));
|
|
15161
15329
|
}
|
|
15162
15330
|
if (!testerInfo) {
|
|
15163
|
-
return /* @__PURE__ */
|
|
15331
|
+
return /* @__PURE__ */ React14.createElement(View13, { style: shared.emptyState }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.emptyEmoji }, "\u{1F464}"), /* @__PURE__ */ React14.createElement(Text13, { style: shared.emptyTitle }, "No profile found"));
|
|
15164
15332
|
}
|
|
15165
15333
|
if (editing) {
|
|
15166
|
-
return /* @__PURE__ */
|
|
15334
|
+
return /* @__PURE__ */ React14.createElement(View13, null, /* @__PURE__ */ React14.createElement(View13, { style: styles13.editHeader }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.editTitle }, "Edit Profile"), /* @__PURE__ */ React14.createElement(TouchableOpacity12, { onPress: () => {
|
|
15167
15335
|
setEditing(false);
|
|
15168
15336
|
setNewEmailInput("");
|
|
15169
|
-
} }, /* @__PURE__ */
|
|
15337
|
+
} }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.cancelText }, "Cancel"))), /* @__PURE__ */ React14.createElement(View13, { style: styles13.field }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.label }, "Name"), /* @__PURE__ */ React14.createElement(TextInput6, { style: styles13.input, value: name, onChangeText: setName, placeholder: "Your name", placeholderTextColor: colors.textMuted })), /* @__PURE__ */ React14.createElement(View13, { style: styles13.field }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.label }, "Primary Email"), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.emailFixed }, testerInfo.email)), /* @__PURE__ */ React14.createElement(View13, { style: styles13.field }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.label }, "Additional Emails"), additionalEmails.map((email) => /* @__PURE__ */ React14.createElement(View13, { key: email, style: styles13.emailRow }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.emailText }, email), /* @__PURE__ */ React14.createElement(TouchableOpacity12, { onPress: () => setAdditionalEmails(additionalEmails.filter((e) => e !== email)) }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.removeEmail }, "\u2715")))), /* @__PURE__ */ React14.createElement(View13, { style: styles13.addEmailRow }, /* @__PURE__ */ React14.createElement(
|
|
15170
15338
|
TextInput6,
|
|
15171
15339
|
{
|
|
15172
|
-
style: [
|
|
15340
|
+
style: [styles13.input, { flex: 1, marginRight: 8 }],
|
|
15173
15341
|
value: newEmailInput,
|
|
15174
15342
|
onChangeText: setNewEmailInput,
|
|
15175
15343
|
placeholder: "Add email",
|
|
@@ -15177,26 +15345,26 @@ function ProfileScreen({ nav }) {
|
|
|
15177
15345
|
keyboardType: "email-address",
|
|
15178
15346
|
autoCapitalize: "none"
|
|
15179
15347
|
}
|
|
15180
|
-
), /* @__PURE__ */
|
|
15181
|
-
|
|
15348
|
+
), /* @__PURE__ */ React14.createElement(TouchableOpacity12, { style: styles13.addButton, onPress: handleAddEmail }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.addButtonText }, "Add")))), /* @__PURE__ */ React14.createElement(View13, { style: styles13.field }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.label }, "Testing Platforms"), /* @__PURE__ */ React14.createElement(View13, { style: styles13.platformRow }, [{ key: "ios", label: "\u{1F4F1} iOS" }, { key: "android", label: "\u{1F916} Android" }, { key: "web", label: "\u{1F310} Web" }].map(({ key, label }) => /* @__PURE__ */ React14.createElement(
|
|
15349
|
+
TouchableOpacity12,
|
|
15182
15350
|
{
|
|
15183
15351
|
key,
|
|
15184
|
-
style: [
|
|
15352
|
+
style: [styles13.platformBtn, platforms.includes(key) && styles13.platformBtnActive],
|
|
15185
15353
|
onPress: () => setPlatforms((prev) => prev.includes(key) ? prev.filter((p) => p !== key) : [...prev, key])
|
|
15186
15354
|
},
|
|
15187
|
-
/* @__PURE__ */
|
|
15188
|
-
)))), /* @__PURE__ */
|
|
15355
|
+
/* @__PURE__ */ React14.createElement(Text13, { style: [styles13.platformText, platforms.includes(key) && styles13.platformTextActive] }, label)
|
|
15356
|
+
)))), /* @__PURE__ */ React14.createElement(TouchableOpacity12, { style: [shared.primaryButton, { marginTop: 20 }], onPress: handleSave, disabled: saving }, /* @__PURE__ */ React14.createElement(Text13, { style: shared.primaryButtonText }, saving ? "Saving..." : "Save Profile")));
|
|
15189
15357
|
}
|
|
15190
|
-
return /* @__PURE__ */
|
|
15191
|
-
|
|
15358
|
+
return /* @__PURE__ */ React14.createElement(View13, null, /* @__PURE__ */ React14.createElement(View13, { style: styles13.profileCard }, /* @__PURE__ */ React14.createElement(View13, { style: styles13.avatar }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.avatarText }, testerInfo.name.charAt(0).toUpperCase())), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.profileName }, testerInfo.name), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.profileEmail }, testerInfo.email)), /* @__PURE__ */ React14.createElement(View13, { style: styles13.statsRow }, /* @__PURE__ */ React14.createElement(View13, { style: styles13.statItem }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.statNumber }, completedCount), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.statLabel }, "Completed")), /* @__PURE__ */ React14.createElement(View13, { style: styles13.statDivider }), /* @__PURE__ */ React14.createElement(View13, { style: styles13.statItem }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.statNumber }, assignments.length), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.statLabel }, "Total Assigned"))), /* @__PURE__ */ React14.createElement(TouchableOpacity12, { onPress: () => setShowDetails(!showDetails), style: styles13.detailsToggle }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.detailsToggleText }, showDetails ? "\u25BC" : "\u25B6", " Details")), showDetails && /* @__PURE__ */ React14.createElement(View13, { style: styles13.detailsSection }, additionalEmails.length > 0 && /* @__PURE__ */ React14.createElement(View13, { style: styles13.detailBlock }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.detailLabel }, "Additional Emails"), additionalEmails.map((e) => /* @__PURE__ */ React14.createElement(Text13, { key: e, style: styles13.detailValue }, e))), platforms.length > 0 && /* @__PURE__ */ React14.createElement(View13, { style: styles13.detailBlock }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.detailLabel }, "Platforms"), /* @__PURE__ */ React14.createElement(View13, { style: styles13.platformTags }, platforms.map((p) => /* @__PURE__ */ React14.createElement(View13, { key: p, style: styles13.platformTag }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.platformTagText }, p === "ios" ? "\u{1F4F1} iOS" : p === "android" ? "\u{1F916} Android" : "\u{1F310} Web")))))), /* @__PURE__ */ React14.createElement(
|
|
15359
|
+
TouchableOpacity12,
|
|
15192
15360
|
{
|
|
15193
15361
|
style: [shared.primaryButton, { marginTop: 20 }],
|
|
15194
15362
|
onPress: () => setEditing(true)
|
|
15195
15363
|
},
|
|
15196
|
-
/* @__PURE__ */
|
|
15364
|
+
/* @__PURE__ */ React14.createElement(Text13, { style: shared.primaryButtonText }, "Edit Profile")
|
|
15197
15365
|
));
|
|
15198
15366
|
}
|
|
15199
|
-
var
|
|
15367
|
+
var styles13 = StyleSheet14.create({
|
|
15200
15368
|
profileCard: { alignItems: "center", backgroundColor: colors.card, borderRadius: 16, padding: 24, marginBottom: 16 },
|
|
15201
15369
|
avatar: { width: 64, height: 64, borderRadius: 32, backgroundColor: colors.blue, justifyContent: "center", alignItems: "center", marginBottom: 12 },
|
|
15202
15370
|
avatarText: { fontSize: 28, fontWeight: "700", color: "#fff" },
|
|
@@ -15237,8 +15405,8 @@ var styles12 = StyleSheet13.create({
|
|
|
15237
15405
|
});
|
|
15238
15406
|
|
|
15239
15407
|
// src/widget/screens/IssueListScreen.tsx
|
|
15240
|
-
import
|
|
15241
|
-
import { View as
|
|
15408
|
+
import React15, { useState as useState11, useEffect as useEffect9 } from "react";
|
|
15409
|
+
import { View as View14, Text as Text14, TouchableOpacity as TouchableOpacity13, StyleSheet as StyleSheet15, ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
15242
15410
|
var CATEGORY_CONFIG = {
|
|
15243
15411
|
open: { label: "Open Issues", accent: "#f97316", emptyIcon: "\u2705", emptyText: "No open issues" },
|
|
15244
15412
|
done: { label: "Done", accent: "#22c55e", emptyIcon: "\u{1F389}", emptyText: "No completed issues yet" },
|
|
@@ -15252,10 +15420,10 @@ var SEVERITY_COLORS = {
|
|
|
15252
15420
|
};
|
|
15253
15421
|
function IssueListScreen({ nav, category }) {
|
|
15254
15422
|
const { client } = useBugBear();
|
|
15255
|
-
const [issues, setIssues] =
|
|
15256
|
-
const [loading, setLoading] =
|
|
15423
|
+
const [issues, setIssues] = useState11([]);
|
|
15424
|
+
const [loading, setLoading] = useState11(true);
|
|
15257
15425
|
const config = CATEGORY_CONFIG[category];
|
|
15258
|
-
|
|
15426
|
+
useEffect9(() => {
|
|
15259
15427
|
let cancelled = false;
|
|
15260
15428
|
setLoading(true);
|
|
15261
15429
|
(async () => {
|
|
@@ -15271,26 +15439,26 @@ function IssueListScreen({ nav, category }) {
|
|
|
15271
15439
|
};
|
|
15272
15440
|
}, [client, category]);
|
|
15273
15441
|
if (loading) {
|
|
15274
|
-
return /* @__PURE__ */
|
|
15442
|
+
return /* @__PURE__ */ React15.createElement(View14, { style: styles14.emptyContainer }, /* @__PURE__ */ React15.createElement(ActivityIndicator2, { size: "small", color: colors.textMuted }), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.emptyText }, "Loading..."));
|
|
15275
15443
|
}
|
|
15276
15444
|
if (issues.length === 0) {
|
|
15277
|
-
return /* @__PURE__ */
|
|
15445
|
+
return /* @__PURE__ */ React15.createElement(View14, { style: styles14.emptyContainer }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.emptyIcon }, config.emptyIcon), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.emptyText }, config.emptyText));
|
|
15278
15446
|
}
|
|
15279
|
-
return /* @__PURE__ */
|
|
15280
|
-
|
|
15447
|
+
return /* @__PURE__ */ React15.createElement(View14, null, issues.map((issue) => /* @__PURE__ */ React15.createElement(
|
|
15448
|
+
TouchableOpacity13,
|
|
15281
15449
|
{
|
|
15282
15450
|
key: issue.id,
|
|
15283
|
-
style:
|
|
15451
|
+
style: styles14.issueCard,
|
|
15284
15452
|
onPress: () => nav.push({ name: "ISSUE_DETAIL", issue }),
|
|
15285
15453
|
activeOpacity: 0.7
|
|
15286
15454
|
},
|
|
15287
|
-
/* @__PURE__ */
|
|
15288
|
-
/* @__PURE__ */
|
|
15289
|
-
category === "done" && issue.verifiedByName && /* @__PURE__ */
|
|
15290
|
-
category === "reopened" && issue.originalBugTitle && /* @__PURE__ */
|
|
15455
|
+
/* @__PURE__ */ React15.createElement(View14, { style: styles14.topRow }, issue.severity && /* @__PURE__ */ React15.createElement(View14, { style: [styles14.severityDot, { backgroundColor: SEVERITY_COLORS[issue.severity] || colors.textDim }] }), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.issueTitle, numberOfLines: 1 }, issue.title)),
|
|
15456
|
+
/* @__PURE__ */ React15.createElement(View14, { style: styles14.bottomRow }, issue.route && /* @__PURE__ */ React15.createElement(Text14, { style: styles14.routeText, numberOfLines: 1 }, issue.route), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.timeText }, formatRelativeTime(issue.updatedAt))),
|
|
15457
|
+
category === "done" && issue.verifiedByName && /* @__PURE__ */ React15.createElement(View14, { style: styles14.verifiedBadge }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.verifiedBadgeText }, "\u2714", " Verified by ", issue.verifiedByName)),
|
|
15458
|
+
category === "reopened" && issue.originalBugTitle && /* @__PURE__ */ React15.createElement(View14, { style: styles14.reopenedBadge }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.reopenedBadgeText, numberOfLines: 1 }, "\u{1F504}", " Retest of: ", issue.originalBugTitle))
|
|
15291
15459
|
)));
|
|
15292
15460
|
}
|
|
15293
|
-
var
|
|
15461
|
+
var styles14 = StyleSheet15.create({
|
|
15294
15462
|
emptyContainer: {
|
|
15295
15463
|
alignItems: "center",
|
|
15296
15464
|
paddingVertical: 40
|
|
@@ -15381,8 +15549,8 @@ var styles13 = StyleSheet14.create({
|
|
|
15381
15549
|
});
|
|
15382
15550
|
|
|
15383
15551
|
// src/widget/screens/IssueDetailScreen.tsx
|
|
15384
|
-
import
|
|
15385
|
-
import { View as
|
|
15552
|
+
import React16 from "react";
|
|
15553
|
+
import { View as View15, Text as Text15, Image as Image3, StyleSheet as StyleSheet16, Linking as Linking2, TouchableOpacity as TouchableOpacity14 } from "react-native";
|
|
15386
15554
|
var STATUS_LABELS = {
|
|
15387
15555
|
new: { label: "New", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15388
15556
|
triaging: { label: "Triaging", bg: "#1e3a5f", color: "#60a5fa" },
|
|
@@ -15406,9 +15574,9 @@ var SEVERITY_CONFIG = {
|
|
|
15406
15574
|
function IssueDetailScreen({ nav, issue }) {
|
|
15407
15575
|
const statusConfig = STATUS_LABELS[issue.status] || { label: issue.status, bg: "#27272a", color: "#a1a1aa" };
|
|
15408
15576
|
const severityConfig = issue.severity ? SEVERITY_CONFIG[issue.severity] : null;
|
|
15409
|
-
return /* @__PURE__ */
|
|
15577
|
+
return /* @__PURE__ */ React16.createElement(View15, null, /* @__PURE__ */ React16.createElement(View15, { style: styles15.badgeRow }, /* @__PURE__ */ React16.createElement(View15, { style: [styles15.badge, { backgroundColor: statusConfig.bg }] }, /* @__PURE__ */ React16.createElement(Text15, { style: [styles15.badgeText, { color: statusConfig.color }] }, statusConfig.label)), severityConfig && /* @__PURE__ */ React16.createElement(View15, { style: [styles15.badge, { backgroundColor: severityConfig.bg }] }, /* @__PURE__ */ React16.createElement(Text15, { style: [styles15.badgeText, { color: severityConfig.color }] }, severityConfig.label))), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.title }, issue.title), issue.route && /* @__PURE__ */ React16.createElement(Text15, { style: styles15.route }, issue.route), issue.description && /* @__PURE__ */ React16.createElement(View15, { style: styles15.descriptionCard }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.descriptionText }, issue.description)), issue.verifiedByName && /* @__PURE__ */ React16.createElement(View15, { style: styles15.verifiedCard }, /* @__PURE__ */ React16.createElement(View15, { style: styles15.verifiedHeader }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.verifiedIcon }, "\u2705"), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.verifiedTitle }, "Retesting Proof")), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.verifiedBody }, "Verified by ", issue.verifiedByName, issue.verifiedAt && ` on ${new Date(issue.verifiedAt).toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" })}`)), issue.originalBugTitle && /* @__PURE__ */ React16.createElement(View15, { style: styles15.originalBugCard }, /* @__PURE__ */ React16.createElement(View15, { style: styles15.originalBugHeader }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.originalBugIcon }, "\u{1F504}"), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.originalBugTitle }, "Original Bug")), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.originalBugBody }, "Retest of: ", issue.originalBugTitle)), issue.screenshotUrls && issue.screenshotUrls.length > 0 && /* @__PURE__ */ React16.createElement(View15, { style: styles15.screenshotSection }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.screenshotLabel }, "Screenshots (", issue.screenshotUrls.length, ")"), /* @__PURE__ */ React16.createElement(View15, { style: styles15.screenshotRow }, issue.screenshotUrls.map((url, i) => /* @__PURE__ */ React16.createElement(TouchableOpacity14, { key: i, onPress: () => Linking2.openURL(url), activeOpacity: 0.7 }, /* @__PURE__ */ React16.createElement(Image3, { source: { uri: url }, style: styles15.screenshotThumb }))))), /* @__PURE__ */ React16.createElement(View15, { style: styles15.metaSection }, issue.reporterName && /* @__PURE__ */ React16.createElement(Text15, { style: styles15.metaText }, "Reported by ", issue.reporterName), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.metaTextSmall }, "Created ", formatRelativeTime(issue.createdAt), " ", "\xB7", " Updated ", formatRelativeTime(issue.updatedAt))));
|
|
15410
15578
|
}
|
|
15411
|
-
var
|
|
15579
|
+
var styles15 = StyleSheet16.create({
|
|
15412
15580
|
badgeRow: {
|
|
15413
15581
|
flexDirection: "row",
|
|
15414
15582
|
gap: 8,
|
|
@@ -15552,7 +15720,7 @@ function BugBearButton({
|
|
|
15552
15720
|
}) {
|
|
15553
15721
|
const { shouldShowWidget, testerInfo, isLoading, unreadCount, assignments } = useBugBear();
|
|
15554
15722
|
const { currentScreen, canGoBack, push, pop, replace, reset } = useNavigation();
|
|
15555
|
-
const [modalVisible, setModalVisible] =
|
|
15723
|
+
const [modalVisible, setModalVisible] = useState12(false);
|
|
15556
15724
|
const getInitialPosition = () => {
|
|
15557
15725
|
const buttonSize = 56;
|
|
15558
15726
|
const margin = 16;
|
|
@@ -15668,77 +15836,77 @@ function BugBearButton({
|
|
|
15668
15836
|
const renderScreen = () => {
|
|
15669
15837
|
switch (currentScreen.name) {
|
|
15670
15838
|
case "HOME":
|
|
15671
|
-
return /* @__PURE__ */
|
|
15839
|
+
return /* @__PURE__ */ React17.createElement(HomeScreen, { nav });
|
|
15672
15840
|
case "TEST_DETAIL":
|
|
15673
|
-
return /* @__PURE__ */
|
|
15841
|
+
return /* @__PURE__ */ React17.createElement(TestDetailScreen, { testId: currentScreen.testId, nav });
|
|
15674
15842
|
case "TEST_LIST":
|
|
15675
|
-
return /* @__PURE__ */
|
|
15843
|
+
return /* @__PURE__ */ React17.createElement(TestListScreen, { nav });
|
|
15676
15844
|
case "TEST_FEEDBACK":
|
|
15677
|
-
return /* @__PURE__ */
|
|
15845
|
+
return /* @__PURE__ */ React17.createElement(TestFeedbackScreen, { status: currentScreen.status, assignmentId: currentScreen.assignmentId, nav });
|
|
15678
15846
|
case "REPORT":
|
|
15679
|
-
return /* @__PURE__ */
|
|
15847
|
+
return /* @__PURE__ */ React17.createElement(ReportScreen, { nav, prefill: currentScreen.prefill });
|
|
15680
15848
|
case "REPORT_SUCCESS":
|
|
15681
|
-
return /* @__PURE__ */
|
|
15849
|
+
return /* @__PURE__ */ React17.createElement(ReportSuccessScreen, { nav });
|
|
15682
15850
|
case "MESSAGE_LIST":
|
|
15683
|
-
return /* @__PURE__ */
|
|
15851
|
+
return /* @__PURE__ */ React17.createElement(MessageListScreen, { nav });
|
|
15684
15852
|
case "THREAD_DETAIL":
|
|
15685
|
-
return /* @__PURE__ */
|
|
15853
|
+
return /* @__PURE__ */ React17.createElement(ThreadDetailScreen, { thread: currentScreen.thread, nav });
|
|
15686
15854
|
case "COMPOSE_MESSAGE":
|
|
15687
|
-
return /* @__PURE__ */
|
|
15855
|
+
return /* @__PURE__ */ React17.createElement(ComposeMessageScreen, { nav });
|
|
15688
15856
|
case "ISSUE_LIST":
|
|
15689
|
-
return /* @__PURE__ */
|
|
15857
|
+
return /* @__PURE__ */ React17.createElement(IssueListScreen, { nav, category: currentScreen.category });
|
|
15690
15858
|
case "ISSUE_DETAIL":
|
|
15691
|
-
return /* @__PURE__ */
|
|
15859
|
+
return /* @__PURE__ */ React17.createElement(IssueDetailScreen, { nav, issue: currentScreen.issue });
|
|
15692
15860
|
case "PROFILE":
|
|
15693
|
-
return /* @__PURE__ */
|
|
15861
|
+
return /* @__PURE__ */ React17.createElement(ProfileScreen, { nav });
|
|
15694
15862
|
default:
|
|
15695
|
-
return /* @__PURE__ */
|
|
15863
|
+
return /* @__PURE__ */ React17.createElement(HomeScreen, { nav });
|
|
15696
15864
|
}
|
|
15697
15865
|
};
|
|
15698
|
-
return /* @__PURE__ */
|
|
15866
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
15699
15867
|
Animated.View,
|
|
15700
15868
|
{
|
|
15701
|
-
style: [
|
|
15869
|
+
style: [styles16.fabContainer, { transform: pan.getTranslateTransform() }, buttonStyle],
|
|
15702
15870
|
...panResponder.panHandlers
|
|
15703
15871
|
},
|
|
15704
|
-
/* @__PURE__ */
|
|
15705
|
-
|
|
15872
|
+
/* @__PURE__ */ React17.createElement(
|
|
15873
|
+
TouchableOpacity15,
|
|
15706
15874
|
{
|
|
15707
|
-
style:
|
|
15875
|
+
style: styles16.fab,
|
|
15708
15876
|
onPress: () => setModalVisible(true),
|
|
15709
15877
|
activeOpacity: draggable ? 1 : 0.7
|
|
15710
15878
|
},
|
|
15711
|
-
/* @__PURE__ */
|
|
15712
|
-
badgeCount > 0 && /* @__PURE__ */
|
|
15879
|
+
/* @__PURE__ */ React17.createElement(Image4, { source: { uri: BUGBEAR_LOGO_BASE64 }, style: styles16.fabIcon }),
|
|
15880
|
+
badgeCount > 0 && /* @__PURE__ */ React17.createElement(View16, { style: styles16.badge }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.badgeText }, badgeCount > 9 ? "9+" : badgeCount))
|
|
15713
15881
|
)
|
|
15714
|
-
), /* @__PURE__ */
|
|
15715
|
-
|
|
15882
|
+
), /* @__PURE__ */ React17.createElement(
|
|
15883
|
+
Modal3,
|
|
15716
15884
|
{
|
|
15717
15885
|
visible: modalVisible,
|
|
15718
15886
|
animationType: "slide",
|
|
15719
15887
|
transparent: true,
|
|
15720
15888
|
onRequestClose: handleClose
|
|
15721
15889
|
},
|
|
15722
|
-
/* @__PURE__ */
|
|
15890
|
+
/* @__PURE__ */ React17.createElement(
|
|
15723
15891
|
KeyboardAvoidingView,
|
|
15724
15892
|
{
|
|
15725
15893
|
behavior: Platform4.OS === "ios" ? "padding" : "height",
|
|
15726
|
-
style:
|
|
15894
|
+
style: styles16.modalOverlay
|
|
15727
15895
|
},
|
|
15728
|
-
/* @__PURE__ */
|
|
15896
|
+
/* @__PURE__ */ React17.createElement(View16, { style: styles16.modalContainer }, /* @__PURE__ */ React17.createElement(View16, { style: styles16.header }, /* @__PURE__ */ React17.createElement(View16, { style: styles16.headerLeft }, canGoBack ? /* @__PURE__ */ React17.createElement(View16, { style: styles16.headerNavRow }, /* @__PURE__ */ React17.createElement(TouchableOpacity15, { onPress: () => nav.pop(), style: styles16.backButton }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.backText }, "\u2190 Back")), /* @__PURE__ */ React17.createElement(TouchableOpacity15, { onPress: () => nav.reset(), style: styles16.homeButton }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.homeText }, "\u{1F3E0}"))) : /* @__PURE__ */ React17.createElement(View16, { style: styles16.headerTitleRow }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.headerTitle }, "BugBear"), testerInfo && /* @__PURE__ */ React17.createElement(TouchableOpacity15, { onPress: () => push({ name: "PROFILE" }) }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.headerName }, testerInfo.name, " \u270E")))), getHeaderTitle() ? /* @__PURE__ */ React17.createElement(Text16, { style: styles16.headerScreenTitle, numberOfLines: 1 }, getHeaderTitle()) : null, /* @__PURE__ */ React17.createElement(TouchableOpacity15, { onPress: handleClose, style: styles16.closeButton }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.closeText }, "\u2715"))), /* @__PURE__ */ React17.createElement(
|
|
15729
15897
|
ScrollView3,
|
|
15730
15898
|
{
|
|
15731
|
-
style:
|
|
15732
|
-
contentContainerStyle:
|
|
15899
|
+
style: styles16.content,
|
|
15900
|
+
contentContainerStyle: styles16.contentContainer,
|
|
15733
15901
|
keyboardShouldPersistTaps: "handled",
|
|
15734
15902
|
showsVerticalScrollIndicator: false
|
|
15735
15903
|
},
|
|
15736
|
-
isLoading ? /* @__PURE__ */
|
|
15904
|
+
isLoading ? /* @__PURE__ */ React17.createElement(View16, { style: styles16.loadingContainer }, /* @__PURE__ */ React17.createElement(ActivityIndicator3, { size: "large", color: colors.blue }), /* @__PURE__ */ React17.createElement(Text16, { style: styles16.loadingText }, "Loading...")) : renderScreen()
|
|
15737
15905
|
))
|
|
15738
15906
|
)
|
|
15739
15907
|
));
|
|
15740
15908
|
}
|
|
15741
|
-
var
|
|
15909
|
+
var styles16 = StyleSheet17.create({
|
|
15742
15910
|
// FAB
|
|
15743
15911
|
fabContainer: {
|
|
15744
15912
|
position: "absolute",
|
|
@@ -15880,8 +16048,8 @@ var styles15 = StyleSheet16.create({
|
|
|
15880
16048
|
});
|
|
15881
16049
|
|
|
15882
16050
|
// src/BugBearErrorBoundary.tsx
|
|
15883
|
-
import
|
|
15884
|
-
import { View as
|
|
16051
|
+
import React18, { Component } from "react";
|
|
16052
|
+
import { View as View17, Text as Text17, TouchableOpacity as TouchableOpacity16, StyleSheet as StyleSheet18 } from "react-native";
|
|
15885
16053
|
var BugBearErrorBoundary = class extends Component {
|
|
15886
16054
|
constructor(props) {
|
|
15887
16055
|
super(props);
|
|
@@ -15926,7 +16094,7 @@ var BugBearErrorBoundary = class extends Component {
|
|
|
15926
16094
|
if (fallback) {
|
|
15927
16095
|
return fallback;
|
|
15928
16096
|
}
|
|
15929
|
-
return /* @__PURE__ */
|
|
16097
|
+
return /* @__PURE__ */ React18.createElement(View17, { style: styles17.container }, /* @__PURE__ */ React18.createElement(Text17, { style: styles17.title }, "Something went wrong"), /* @__PURE__ */ React18.createElement(Text17, { style: styles17.message }, error.message), /* @__PURE__ */ React18.createElement(TouchableOpacity16, { style: styles17.button, onPress: this.reset }, /* @__PURE__ */ React18.createElement(Text17, { style: styles17.buttonText }, "Try Again")), /* @__PURE__ */ React18.createElement(Text17, { style: styles17.caption }, "The error has been captured by BugBear"));
|
|
15930
16098
|
}
|
|
15931
16099
|
return children;
|
|
15932
16100
|
}
|
|
@@ -15937,7 +16105,7 @@ function useErrorContext() {
|
|
|
15937
16105
|
getEnhancedContext: () => contextCapture.getEnhancedContext()
|
|
15938
16106
|
};
|
|
15939
16107
|
}
|
|
15940
|
-
var
|
|
16108
|
+
var styles17 = StyleSheet18.create({
|
|
15941
16109
|
container: {
|
|
15942
16110
|
padding: 20,
|
|
15943
16111
|
margin: 20,
|