@bbearai/react-native 0.5.1 → 0.5.3
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +546 -58
- package/dist/index.mjs +532 -44
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12214,6 +12214,72 @@ var BugBearClient = class {
|
|
|
12214
12214
|
return null;
|
|
12215
12215
|
}
|
|
12216
12216
|
}
|
|
12217
|
+
/**
|
|
12218
|
+
* Get issue counts for the tester (Open, Done, Reopened)
|
|
12219
|
+
* Used by the widget HomeScreen cards
|
|
12220
|
+
*/
|
|
12221
|
+
async getIssueCounts() {
|
|
12222
|
+
try {
|
|
12223
|
+
const testerInfo = await this.getTesterInfo();
|
|
12224
|
+
if (!testerInfo) return { open: 0, done: 0, reopened: 0 };
|
|
12225
|
+
const { data, error } = await this.supabase.rpc("get_tester_issue_counts", {
|
|
12226
|
+
p_project_id: this.config.projectId,
|
|
12227
|
+
p_tester_id: testerInfo.id
|
|
12228
|
+
});
|
|
12229
|
+
if (error) {
|
|
12230
|
+
console.error("BugBear: Failed to fetch issue counts", formatPgError(error));
|
|
12231
|
+
return { open: 0, done: 0, reopened: 0 };
|
|
12232
|
+
}
|
|
12233
|
+
return {
|
|
12234
|
+
open: data?.open ?? 0,
|
|
12235
|
+
done: data?.done ?? 0,
|
|
12236
|
+
reopened: data?.reopened ?? 0
|
|
12237
|
+
};
|
|
12238
|
+
} catch (err) {
|
|
12239
|
+
console.error("BugBear: Error fetching issue counts", err);
|
|
12240
|
+
return { open: 0, done: 0, reopened: 0 };
|
|
12241
|
+
}
|
|
12242
|
+
}
|
|
12243
|
+
/**
|
|
12244
|
+
* Get issues for the tester by category.
|
|
12245
|
+
* Returns enriched data: done issues include verification proof,
|
|
12246
|
+
* reopened issues include original bug context.
|
|
12247
|
+
*/
|
|
12248
|
+
async getIssues(category) {
|
|
12249
|
+
try {
|
|
12250
|
+
const testerInfo = await this.getTesterInfo();
|
|
12251
|
+
if (!testerInfo) return [];
|
|
12252
|
+
const { data, error } = await this.supabase.rpc("get_tester_issues", {
|
|
12253
|
+
p_project_id: this.config.projectId,
|
|
12254
|
+
p_tester_id: testerInfo.id,
|
|
12255
|
+
p_category: category
|
|
12256
|
+
});
|
|
12257
|
+
if (error) {
|
|
12258
|
+
console.error("BugBear: Failed to fetch issues", formatPgError(error));
|
|
12259
|
+
return [];
|
|
12260
|
+
}
|
|
12261
|
+
return (data || []).map((row) => ({
|
|
12262
|
+
id: row.id,
|
|
12263
|
+
title: row.title || "Untitled",
|
|
12264
|
+
description: row.description,
|
|
12265
|
+
reportType: row.report_type,
|
|
12266
|
+
severity: row.severity || null,
|
|
12267
|
+
status: row.status,
|
|
12268
|
+
screenshotUrls: row.screenshot_urls || [],
|
|
12269
|
+
route: row.app_context?.currentRoute || void 0,
|
|
12270
|
+
reporterName: row.reporter_name || void 0,
|
|
12271
|
+
createdAt: row.created_at,
|
|
12272
|
+
updatedAt: row.updated_at,
|
|
12273
|
+
verifiedByName: row.verified_by_name || void 0,
|
|
12274
|
+
verifiedAt: row.verified_at || void 0,
|
|
12275
|
+
originalBugId: row.original_bug_id || void 0,
|
|
12276
|
+
originalBugTitle: row.original_bug_title || void 0
|
|
12277
|
+
}));
|
|
12278
|
+
} catch (err) {
|
|
12279
|
+
console.error("BugBear: Error fetching issues", err);
|
|
12280
|
+
return [];
|
|
12281
|
+
}
|
|
12282
|
+
}
|
|
12217
12283
|
/**
|
|
12218
12284
|
* Basic email format validation (defense in depth)
|
|
12219
12285
|
*/
|
|
@@ -13020,6 +13086,10 @@ var BugBearContext = createContext({
|
|
|
13020
13086
|
updateTesterProfile: async () => ({ success: false }),
|
|
13021
13087
|
refreshTesterInfo: async () => {
|
|
13022
13088
|
},
|
|
13089
|
+
// Issue tracking
|
|
13090
|
+
issueCounts: { open: 0, done: 0, reopened: 0 },
|
|
13091
|
+
refreshIssueCounts: async () => {
|
|
13092
|
+
},
|
|
13023
13093
|
dashboardUrl: void 0,
|
|
13024
13094
|
onError: void 0
|
|
13025
13095
|
});
|
|
@@ -13035,6 +13105,7 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13035
13105
|
const [isLoading, setIsLoading] = useState(true);
|
|
13036
13106
|
const [threads, setThreads] = useState([]);
|
|
13037
13107
|
const [unreadCount, setUnreadCount] = useState(0);
|
|
13108
|
+
const [issueCounts, setIssueCounts] = useState({ open: 0, done: 0, reopened: 0 });
|
|
13038
13109
|
const [activeSession, setActiveSession] = useState(null);
|
|
13039
13110
|
const [sessionFindings, setSessionFindings] = useState([]);
|
|
13040
13111
|
const hasInitialized = useRef(false);
|
|
@@ -13141,6 +13212,11 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13141
13212
|
if (!client) return null;
|
|
13142
13213
|
return client.uploadImageFromUri(uri, void 0, bucket);
|
|
13143
13214
|
}, [client]);
|
|
13215
|
+
const refreshIssueCounts = useCallback(async () => {
|
|
13216
|
+
if (!client) return;
|
|
13217
|
+
const counts = await client.getIssueCounts();
|
|
13218
|
+
setIssueCounts(counts);
|
|
13219
|
+
}, [client]);
|
|
13144
13220
|
const initializeBugBear = useCallback(async (bugBearClient) => {
|
|
13145
13221
|
setIsLoading(true);
|
|
13146
13222
|
try {
|
|
@@ -13153,16 +13229,18 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13153
13229
|
setTesterInfo(info);
|
|
13154
13230
|
setIsTester(!!info);
|
|
13155
13231
|
if (info && qaEnabled) {
|
|
13156
|
-
const [newAssignments, newThreads, session] = await Promise.all([
|
|
13232
|
+
const [newAssignments, newThreads, session, counts] = await Promise.all([
|
|
13157
13233
|
bugBearClient.getAssignedTests(),
|
|
13158
13234
|
bugBearClient.getThreadsForTester(),
|
|
13159
|
-
bugBearClient.getActiveSession()
|
|
13235
|
+
bugBearClient.getActiveSession(),
|
|
13236
|
+
bugBearClient.getIssueCounts()
|
|
13160
13237
|
]);
|
|
13161
13238
|
setAssignments(newAssignments);
|
|
13162
13239
|
setThreads(newThreads);
|
|
13163
13240
|
const totalUnread = newThreads.reduce((sum, t) => sum + t.unreadCount, 0);
|
|
13164
13241
|
setUnreadCount(totalUnread);
|
|
13165
13242
|
setActiveSession(session);
|
|
13243
|
+
setIssueCounts(counts);
|
|
13166
13244
|
if (session) {
|
|
13167
13245
|
const findings = await bugBearClient.getSessionFindings(session.id);
|
|
13168
13246
|
setSessionFindings(findings);
|
|
@@ -13230,6 +13308,9 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13230
13308
|
refreshTesterStatus,
|
|
13231
13309
|
updateTesterProfile,
|
|
13232
13310
|
refreshTesterInfo,
|
|
13311
|
+
// Issue tracking
|
|
13312
|
+
issueCounts,
|
|
13313
|
+
refreshIssueCounts,
|
|
13233
13314
|
dashboardUrl: config.dashboardUrl,
|
|
13234
13315
|
onError: config.onError
|
|
13235
13316
|
}
|
|
@@ -13239,21 +13320,21 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13239
13320
|
}
|
|
13240
13321
|
|
|
13241
13322
|
// src/BugBearButton.tsx
|
|
13242
|
-
import
|
|
13323
|
+
import React16, { useState as useState11, useRef as useRef3 } from "react";
|
|
13243
13324
|
import {
|
|
13244
|
-
View as
|
|
13245
|
-
Text as
|
|
13246
|
-
Image as
|
|
13247
|
-
TouchableOpacity as
|
|
13325
|
+
View as View15,
|
|
13326
|
+
Text as Text15,
|
|
13327
|
+
Image as Image4,
|
|
13328
|
+
TouchableOpacity as TouchableOpacity14,
|
|
13248
13329
|
Modal as Modal2,
|
|
13249
13330
|
ScrollView as ScrollView3,
|
|
13250
|
-
StyleSheet as
|
|
13331
|
+
StyleSheet as StyleSheet16,
|
|
13251
13332
|
Dimensions as Dimensions2,
|
|
13252
13333
|
KeyboardAvoidingView,
|
|
13253
13334
|
Platform as Platform4,
|
|
13254
13335
|
PanResponder,
|
|
13255
13336
|
Animated,
|
|
13256
|
-
ActivityIndicator as
|
|
13337
|
+
ActivityIndicator as ActivityIndicator3,
|
|
13257
13338
|
Keyboard as Keyboard2
|
|
13258
13339
|
} from "react-native";
|
|
13259
13340
|
|
|
@@ -13476,10 +13557,11 @@ var templateInfo = {
|
|
|
13476
13557
|
import React2, { useEffect as useEffect2 } from "react";
|
|
13477
13558
|
import { View, Text, TouchableOpacity, StyleSheet as StyleSheet2, Linking } from "react-native";
|
|
13478
13559
|
function HomeScreen({ nav }) {
|
|
13479
|
-
const { assignments, unreadCount, threads, refreshAssignments, refreshThreads, dashboardUrl } = useBugBear();
|
|
13560
|
+
const { assignments, unreadCount, threads, refreshAssignments, refreshThreads, issueCounts, refreshIssueCounts, dashboardUrl } = useBugBear();
|
|
13480
13561
|
useEffect2(() => {
|
|
13481
13562
|
refreshAssignments();
|
|
13482
13563
|
refreshThreads();
|
|
13564
|
+
refreshIssueCounts();
|
|
13483
13565
|
}, []);
|
|
13484
13566
|
const pendingAssignments = assignments.filter((a) => a.status === "pending" || a.status === "in_progress");
|
|
13485
13567
|
const pendingCount = pendingAssignments.length;
|
|
@@ -13545,6 +13627,33 @@ function HomeScreen({ nav }) {
|
|
|
13545
13627
|
/* @__PURE__ */ React2.createElement(Text, { style: styles.actionIcon }, "\u{1F4AC}"),
|
|
13546
13628
|
/* @__PURE__ */ React2.createElement(Text, { style: styles.actionLabel }, "Messages"),
|
|
13547
13629
|
unreadCount > 0 && /* @__PURE__ */ React2.createElement(View, { style: [styles.actionBadge, styles.actionBadgeMsg] }, /* @__PURE__ */ React2.createElement(Text, { style: styles.actionBadgeText }, unreadCount))
|
|
13630
|
+
)), /* @__PURE__ */ React2.createElement(View, { style: styles.issueGrid }, /* @__PURE__ */ React2.createElement(
|
|
13631
|
+
TouchableOpacity,
|
|
13632
|
+
{
|
|
13633
|
+
style: [styles.issueCard, styles.issueCardOpen],
|
|
13634
|
+
onPress: () => nav.push({ name: "ISSUE_LIST", category: "open" }),
|
|
13635
|
+
activeOpacity: 0.7
|
|
13636
|
+
},
|
|
13637
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueCountOpen }, issueCounts.open),
|
|
13638
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueLabel }, "Open")
|
|
13639
|
+
), /* @__PURE__ */ React2.createElement(
|
|
13640
|
+
TouchableOpacity,
|
|
13641
|
+
{
|
|
13642
|
+
style: [styles.issueCard, styles.issueCardDone],
|
|
13643
|
+
onPress: () => nav.push({ name: "ISSUE_LIST", category: "done" }),
|
|
13644
|
+
activeOpacity: 0.7
|
|
13645
|
+
},
|
|
13646
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueCountDone }, issueCounts.done),
|
|
13647
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueLabel }, "Done")
|
|
13648
|
+
), /* @__PURE__ */ React2.createElement(
|
|
13649
|
+
TouchableOpacity,
|
|
13650
|
+
{
|
|
13651
|
+
style: [styles.issueCard, styles.issueCardReopened],
|
|
13652
|
+
onPress: () => nav.push({ name: "ISSUE_LIST", category: "reopened" }),
|
|
13653
|
+
activeOpacity: 0.7
|
|
13654
|
+
},
|
|
13655
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueCountReopened }, issueCounts.reopened),
|
|
13656
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueLabel }, "Reopened")
|
|
13548
13657
|
)), totalTests > 0 && /* @__PURE__ */ React2.createElement(View, { style: styles.progressSection }, /* @__PURE__ */ React2.createElement(View, { style: styles.progressBar }, /* @__PURE__ */ React2.createElement(View, { style: [styles.progressFill, { width: `${Math.round(completedCount / totalTests * 100)}%` }] })), /* @__PURE__ */ React2.createElement(Text, { style: styles.progressText }, completedCount, "/", totalTests, " tests completed")), dashboardUrl && /* @__PURE__ */ React2.createElement(
|
|
13549
13658
|
TouchableOpacity,
|
|
13550
13659
|
{
|
|
@@ -13562,6 +13671,7 @@ function HomeScreen({ nav }) {
|
|
|
13562
13671
|
onPress: () => {
|
|
13563
13672
|
refreshAssignments();
|
|
13564
13673
|
refreshThreads();
|
|
13674
|
+
refreshIssueCounts();
|
|
13565
13675
|
}
|
|
13566
13676
|
},
|
|
13567
13677
|
/* @__PURE__ */ React2.createElement(Text, { style: styles.refreshText }, "\u21BB Refresh")
|
|
@@ -13732,6 +13842,54 @@ var styles = StyleSheet2.create({
|
|
|
13732
13842
|
color: colors.textMuted,
|
|
13733
13843
|
marginLeft: 8
|
|
13734
13844
|
},
|
|
13845
|
+
issueGrid: {
|
|
13846
|
+
flexDirection: "row",
|
|
13847
|
+
gap: 10,
|
|
13848
|
+
marginBottom: 20
|
|
13849
|
+
},
|
|
13850
|
+
issueCard: {
|
|
13851
|
+
flex: 1,
|
|
13852
|
+
backgroundColor: colors.card,
|
|
13853
|
+
borderWidth: 1,
|
|
13854
|
+
borderColor: colors.border,
|
|
13855
|
+
borderRadius: 10,
|
|
13856
|
+
paddingVertical: 12,
|
|
13857
|
+
paddingHorizontal: 8,
|
|
13858
|
+
alignItems: "center"
|
|
13859
|
+
},
|
|
13860
|
+
issueCardOpen: {
|
|
13861
|
+
borderTopWidth: 3,
|
|
13862
|
+
borderTopColor: "#f97316"
|
|
13863
|
+
},
|
|
13864
|
+
issueCardDone: {
|
|
13865
|
+
borderTopWidth: 3,
|
|
13866
|
+
borderTopColor: "#22c55e"
|
|
13867
|
+
},
|
|
13868
|
+
issueCardReopened: {
|
|
13869
|
+
borderTopWidth: 3,
|
|
13870
|
+
borderTopColor: "#ef4444"
|
|
13871
|
+
},
|
|
13872
|
+
issueCountOpen: {
|
|
13873
|
+
fontSize: 22,
|
|
13874
|
+
fontWeight: "700",
|
|
13875
|
+
color: "#f97316"
|
|
13876
|
+
},
|
|
13877
|
+
issueCountDone: {
|
|
13878
|
+
fontSize: 22,
|
|
13879
|
+
fontWeight: "700",
|
|
13880
|
+
color: "#22c55e"
|
|
13881
|
+
},
|
|
13882
|
+
issueCountReopened: {
|
|
13883
|
+
fontSize: 22,
|
|
13884
|
+
fontWeight: "700",
|
|
13885
|
+
color: "#ef4444"
|
|
13886
|
+
},
|
|
13887
|
+
issueLabel: {
|
|
13888
|
+
fontSize: 11,
|
|
13889
|
+
fontWeight: "600",
|
|
13890
|
+
color: colors.textSecondary,
|
|
13891
|
+
marginTop: 2
|
|
13892
|
+
},
|
|
13735
13893
|
refreshButton: {
|
|
13736
13894
|
alignItems: "center",
|
|
13737
13895
|
paddingVertical: 8
|
|
@@ -14087,10 +14245,16 @@ function TestListScreen({ nav }) {
|
|
|
14087
14245
|
const filterAssignment = (a) => {
|
|
14088
14246
|
if (roleFilter && a.testCase.role?.id !== roleFilter) return false;
|
|
14089
14247
|
if (filter === "pending") return a.status === "pending" || a.status === "in_progress";
|
|
14090
|
-
if (filter === "
|
|
14248
|
+
if (filter === "done") return a.status === "passed";
|
|
14249
|
+
if (filter === "reopened") return a.status === "failed";
|
|
14091
14250
|
return true;
|
|
14092
14251
|
};
|
|
14093
|
-
return /* @__PURE__ */ React4.createElement(View3, null, /* @__PURE__ */ React4.createElement(View3, { style: styles3.filterBar }, [
|
|
14252
|
+
return /* @__PURE__ */ React4.createElement(View3, null, /* @__PURE__ */ React4.createElement(View3, { style: styles3.filterBar }, [
|
|
14253
|
+
{ key: "all", label: "All", count: assignments.length },
|
|
14254
|
+
{ key: "pending", label: "To Do", count: assignments.filter((a) => a.status === "pending" || a.status === "in_progress").length },
|
|
14255
|
+
{ key: "done", label: "Done", count: assignments.filter((a) => a.status === "passed").length },
|
|
14256
|
+
{ key: "reopened", label: "Re Opened", count: assignments.filter((a) => a.status === "failed").length }
|
|
14257
|
+
].map((f) => /* @__PURE__ */ React4.createElement(TouchableOpacity3, { key: f.key, style: [styles3.filterBtn, filter === f.key && styles3.filterBtnActive], onPress: () => setFilter(f.key) }, /* @__PURE__ */ React4.createElement(Text3, { style: [styles3.filterBtnText, filter === f.key && styles3.filterBtnTextActive] }, f.label, " (", f.count, ")")))), availableRoles.length >= 2 && /* @__PURE__ */ React4.createElement(View3, { style: styles3.roleSection }, /* @__PURE__ */ React4.createElement(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles3.roleBar }, /* @__PURE__ */ React4.createElement(
|
|
14094
14258
|
TouchableOpacity3,
|
|
14095
14259
|
{
|
|
14096
14260
|
style: [styles3.roleBtn, !roleFilter && styles3.roleBtnActive],
|
|
@@ -14128,7 +14292,19 @@ function TestListScreen({ nav }) {
|
|
|
14128
14292
|
onPress: () => nav.push({ name: "TEST_DETAIL", testId: assignment.id })
|
|
14129
14293
|
},
|
|
14130
14294
|
/* @__PURE__ */ React4.createElement(Text3, { style: styles3.testBadge }, badge.icon),
|
|
14131
|
-
/* @__PURE__ */ React4.createElement(View3, { style: styles3.testInfo }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.testTitle, numberOfLines: 1 }, assignment.testCase.title), /* @__PURE__ */ React4.createElement(View3, { style: styles3.testMetaRow }, assignment.isVerification && /* @__PURE__ */ React4.createElement(View3, { style: styles3.retestTag }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.retestTagText }, "Retest")), /* @__PURE__ */ React4.createElement(Text3, { style: styles3.testMeta }, assignment.testCase.testKey, " \xB7 ", assignment.testCase.priority), assignment.testCase.role && /* @__PURE__ */ React4.createElement(View3, { style: styles3.roleBadgeRow }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.testMeta }, " \xB7 "), /* @__PURE__ */ React4.createElement(View3, { style: [styles3.roleBadgeDot, { backgroundColor: assignment.testCase.role.color }] }), /* @__PURE__ */ React4.createElement(Text3, { style: [styles3.testMeta, { color: assignment.testCase.role.color, fontWeight: "500" }] }, assignment.testCase.role.name))))
|
|
14295
|
+
/* @__PURE__ */ React4.createElement(View3, { style: styles3.testInfo }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.testTitle, numberOfLines: 1 }, assignment.testCase.title), /* @__PURE__ */ React4.createElement(View3, { style: styles3.testMetaRow }, assignment.isVerification && /* @__PURE__ */ React4.createElement(View3, { style: styles3.retestTag }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.retestTagText }, "Retest")), /* @__PURE__ */ React4.createElement(Text3, { style: styles3.testMeta }, assignment.testCase.testKey, " \xB7 ", assignment.testCase.priority), assignment.testCase.role && /* @__PURE__ */ React4.createElement(View3, { style: styles3.roleBadgeRow }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.testMeta }, " \xB7 "), /* @__PURE__ */ React4.createElement(View3, { style: [styles3.roleBadgeDot, { backgroundColor: assignment.testCase.role.color }] }), /* @__PURE__ */ React4.createElement(Text3, { style: [styles3.testMeta, { color: assignment.testCase.role.color, fontWeight: "500" }] }, assignment.testCase.role.name)))),
|
|
14296
|
+
/* @__PURE__ */ React4.createElement(View3, { style: [
|
|
14297
|
+
styles3.statusPill,
|
|
14298
|
+
{
|
|
14299
|
+
backgroundColor: assignment.status === "passed" ? "#14532d" : assignment.status === "failed" ? "#450a0a" : assignment.status === "in_progress" ? "#172554" : "#27272a",
|
|
14300
|
+
borderColor: assignment.status === "passed" ? "#166534" : assignment.status === "failed" ? "#7f1d1d" : assignment.status === "in_progress" ? "#1e3a5f" : "#3f3f46"
|
|
14301
|
+
}
|
|
14302
|
+
] }, /* @__PURE__ */ React4.createElement(Text3, { style: [
|
|
14303
|
+
styles3.statusPillText,
|
|
14304
|
+
{
|
|
14305
|
+
color: assignment.status === "passed" ? "#4ade80" : assignment.status === "failed" ? "#f87171" : assignment.status === "in_progress" ? "#60a5fa" : "#d4d4d8"
|
|
14306
|
+
}
|
|
14307
|
+
] }, badge.label))
|
|
14132
14308
|
);
|
|
14133
14309
|
}));
|
|
14134
14310
|
}), /* @__PURE__ */ React4.createElement(TouchableOpacity3, { style: styles3.refreshBtn, onPress: refreshAssignments }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.refreshText }, "\u21BB", " Refresh")));
|
|
@@ -14166,6 +14342,8 @@ var styles3 = StyleSheet4.create({
|
|
|
14166
14342
|
retestTag: { backgroundColor: "#422006", borderWidth: 1, borderColor: "#854d0e", borderRadius: 4, paddingHorizontal: 5, paddingVertical: 1 },
|
|
14167
14343
|
retestTagText: { fontSize: 10, fontWeight: "600", color: "#fbbf24" },
|
|
14168
14344
|
testMeta: { fontSize: 11, color: colors.textDim },
|
|
14345
|
+
statusPill: { paddingHorizontal: 8, paddingVertical: 3, borderRadius: 6, borderWidth: 1, marginLeft: 8 },
|
|
14346
|
+
statusPillText: { fontSize: 10, fontWeight: "600" },
|
|
14169
14347
|
refreshBtn: { alignItems: "center", paddingVertical: 12 },
|
|
14170
14348
|
refreshText: { fontSize: 13, color: colors.blue }
|
|
14171
14349
|
});
|
|
@@ -15050,6 +15228,308 @@ var styles12 = StyleSheet13.create({
|
|
|
15050
15228
|
platformTextActive: { color: colors.blueLight }
|
|
15051
15229
|
});
|
|
15052
15230
|
|
|
15231
|
+
// src/widget/screens/IssueListScreen.tsx
|
|
15232
|
+
import React14, { useState as useState10, useEffect as useEffect8 } from "react";
|
|
15233
|
+
import { View as View13, Text as Text13, TouchableOpacity as TouchableOpacity12, StyleSheet as StyleSheet14, ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
15234
|
+
var CATEGORY_CONFIG = {
|
|
15235
|
+
open: { label: "Open Issues", accent: "#f97316", emptyIcon: "\u2705", emptyText: "No open issues" },
|
|
15236
|
+
done: { label: "Done", accent: "#22c55e", emptyIcon: "\u{1F389}", emptyText: "No completed issues yet" },
|
|
15237
|
+
reopened: { label: "Reopened", accent: "#ef4444", emptyIcon: "\u{1F44D}", emptyText: "No reopened issues" }
|
|
15238
|
+
};
|
|
15239
|
+
var SEVERITY_COLORS = {
|
|
15240
|
+
critical: "#ef4444",
|
|
15241
|
+
high: "#f97316",
|
|
15242
|
+
medium: "#eab308",
|
|
15243
|
+
low: "#71717a"
|
|
15244
|
+
};
|
|
15245
|
+
function IssueListScreen({ nav, category }) {
|
|
15246
|
+
const { client } = useBugBear();
|
|
15247
|
+
const [issues, setIssues] = useState10([]);
|
|
15248
|
+
const [loading, setLoading] = useState10(true);
|
|
15249
|
+
const config = CATEGORY_CONFIG[category];
|
|
15250
|
+
useEffect8(() => {
|
|
15251
|
+
let cancelled = false;
|
|
15252
|
+
setLoading(true);
|
|
15253
|
+
(async () => {
|
|
15254
|
+
if (!client) return;
|
|
15255
|
+
const data = await client.getIssues(category);
|
|
15256
|
+
if (!cancelled) {
|
|
15257
|
+
setIssues(data);
|
|
15258
|
+
setLoading(false);
|
|
15259
|
+
}
|
|
15260
|
+
})();
|
|
15261
|
+
return () => {
|
|
15262
|
+
cancelled = true;
|
|
15263
|
+
};
|
|
15264
|
+
}, [client, category]);
|
|
15265
|
+
if (loading) {
|
|
15266
|
+
return /* @__PURE__ */ React14.createElement(View13, { style: styles13.emptyContainer }, /* @__PURE__ */ React14.createElement(ActivityIndicator2, { size: "small", color: colors.textMuted }), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.emptyText }, "Loading..."));
|
|
15267
|
+
}
|
|
15268
|
+
if (issues.length === 0) {
|
|
15269
|
+
return /* @__PURE__ */ React14.createElement(View13, { style: styles13.emptyContainer }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.emptyIcon }, config.emptyIcon), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.emptyText }, config.emptyText));
|
|
15270
|
+
}
|
|
15271
|
+
return /* @__PURE__ */ React14.createElement(View13, null, issues.map((issue) => /* @__PURE__ */ React14.createElement(
|
|
15272
|
+
TouchableOpacity12,
|
|
15273
|
+
{
|
|
15274
|
+
key: issue.id,
|
|
15275
|
+
style: styles13.issueCard,
|
|
15276
|
+
onPress: () => nav.push({ name: "ISSUE_DETAIL", issue }),
|
|
15277
|
+
activeOpacity: 0.7
|
|
15278
|
+
},
|
|
15279
|
+
/* @__PURE__ */ React14.createElement(View13, { style: styles13.topRow }, issue.severity && /* @__PURE__ */ React14.createElement(View13, { style: [styles13.severityDot, { backgroundColor: SEVERITY_COLORS[issue.severity] || colors.textDim }] }), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.issueTitle, numberOfLines: 1 }, issue.title)),
|
|
15280
|
+
/* @__PURE__ */ React14.createElement(View13, { style: styles13.bottomRow }, issue.route && /* @__PURE__ */ React14.createElement(Text13, { style: styles13.routeText, numberOfLines: 1 }, issue.route), /* @__PURE__ */ React14.createElement(Text13, { style: styles13.timeText }, formatRelativeTime(issue.updatedAt))),
|
|
15281
|
+
category === "done" && issue.verifiedByName && /* @__PURE__ */ React14.createElement(View13, { style: styles13.verifiedBadge }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.verifiedBadgeText }, "\u2714", " Verified by ", issue.verifiedByName)),
|
|
15282
|
+
category === "reopened" && issue.originalBugTitle && /* @__PURE__ */ React14.createElement(View13, { style: styles13.reopenedBadge }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.reopenedBadgeText, numberOfLines: 1 }, "\u{1F504}", " Retest of: ", issue.originalBugTitle))
|
|
15283
|
+
)));
|
|
15284
|
+
}
|
|
15285
|
+
var styles13 = StyleSheet14.create({
|
|
15286
|
+
emptyContainer: {
|
|
15287
|
+
alignItems: "center",
|
|
15288
|
+
paddingVertical: 40
|
|
15289
|
+
},
|
|
15290
|
+
emptyIcon: {
|
|
15291
|
+
fontSize: 36,
|
|
15292
|
+
marginBottom: 8
|
|
15293
|
+
},
|
|
15294
|
+
emptyText: {
|
|
15295
|
+
color: colors.textMuted,
|
|
15296
|
+
fontSize: 14,
|
|
15297
|
+
marginTop: 4
|
|
15298
|
+
},
|
|
15299
|
+
issueCard: {
|
|
15300
|
+
backgroundColor: colors.card,
|
|
15301
|
+
borderWidth: 1,
|
|
15302
|
+
borderColor: colors.border,
|
|
15303
|
+
borderRadius: 10,
|
|
15304
|
+
padding: 14,
|
|
15305
|
+
marginBottom: 8
|
|
15306
|
+
},
|
|
15307
|
+
topRow: {
|
|
15308
|
+
flexDirection: "row",
|
|
15309
|
+
alignItems: "flex-start",
|
|
15310
|
+
gap: 8
|
|
15311
|
+
},
|
|
15312
|
+
severityDot: {
|
|
15313
|
+
width: 8,
|
|
15314
|
+
height: 8,
|
|
15315
|
+
borderRadius: 4,
|
|
15316
|
+
marginTop: 5
|
|
15317
|
+
},
|
|
15318
|
+
issueTitle: {
|
|
15319
|
+
fontSize: 13,
|
|
15320
|
+
fontWeight: "600",
|
|
15321
|
+
color: colors.textPrimary,
|
|
15322
|
+
flex: 1
|
|
15323
|
+
},
|
|
15324
|
+
bottomRow: {
|
|
15325
|
+
flexDirection: "row",
|
|
15326
|
+
justifyContent: "space-between",
|
|
15327
|
+
marginTop: 6
|
|
15328
|
+
},
|
|
15329
|
+
routeText: {
|
|
15330
|
+
fontSize: 11,
|
|
15331
|
+
color: colors.textDim,
|
|
15332
|
+
maxWidth: "60%"
|
|
15333
|
+
},
|
|
15334
|
+
timeText: {
|
|
15335
|
+
fontSize: 11,
|
|
15336
|
+
color: colors.textDim,
|
|
15337
|
+
marginLeft: "auto"
|
|
15338
|
+
},
|
|
15339
|
+
verifiedBadge: {
|
|
15340
|
+
flexDirection: "row",
|
|
15341
|
+
alignItems: "center",
|
|
15342
|
+
backgroundColor: "#14532d",
|
|
15343
|
+
borderWidth: 1,
|
|
15344
|
+
borderColor: "#166534",
|
|
15345
|
+
borderRadius: 6,
|
|
15346
|
+
paddingHorizontal: 8,
|
|
15347
|
+
paddingVertical: 2,
|
|
15348
|
+
marginTop: 6,
|
|
15349
|
+
alignSelf: "flex-start"
|
|
15350
|
+
},
|
|
15351
|
+
verifiedBadgeText: {
|
|
15352
|
+
fontSize: 10,
|
|
15353
|
+
fontWeight: "600",
|
|
15354
|
+
color: "#4ade80"
|
|
15355
|
+
},
|
|
15356
|
+
reopenedBadge: {
|
|
15357
|
+
flexDirection: "row",
|
|
15358
|
+
alignItems: "center",
|
|
15359
|
+
backgroundColor: "#422006",
|
|
15360
|
+
borderWidth: 1,
|
|
15361
|
+
borderColor: "#854d0e",
|
|
15362
|
+
borderRadius: 6,
|
|
15363
|
+
paddingHorizontal: 8,
|
|
15364
|
+
paddingVertical: 2,
|
|
15365
|
+
marginTop: 6,
|
|
15366
|
+
alignSelf: "flex-start"
|
|
15367
|
+
},
|
|
15368
|
+
reopenedBadgeText: {
|
|
15369
|
+
fontSize: 10,
|
|
15370
|
+
fontWeight: "600",
|
|
15371
|
+
color: "#fbbf24"
|
|
15372
|
+
}
|
|
15373
|
+
});
|
|
15374
|
+
|
|
15375
|
+
// src/widget/screens/IssueDetailScreen.tsx
|
|
15376
|
+
import React15 from "react";
|
|
15377
|
+
import { View as View14, Text as Text14, Image as Image3, StyleSheet as StyleSheet15, Linking as Linking2, TouchableOpacity as TouchableOpacity13 } from "react-native";
|
|
15378
|
+
var STATUS_LABELS = {
|
|
15379
|
+
new: { label: "New", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15380
|
+
triaging: { label: "Triaging", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15381
|
+
confirmed: { label: "Confirmed", bg: "#422006", color: "#fbbf24" },
|
|
15382
|
+
in_progress: { label: "In Progress", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15383
|
+
fixed: { label: "Fixed", bg: "#14532d", color: "#4ade80" },
|
|
15384
|
+
ready_to_test: { label: "Ready to Test", bg: "#422006", color: "#fbbf24" },
|
|
15385
|
+
verified: { label: "Verified", bg: "#14532d", color: "#4ade80" },
|
|
15386
|
+
resolved: { label: "Resolved", bg: "#14532d", color: "#4ade80" },
|
|
15387
|
+
reviewed: { label: "Reviewed", bg: "#14532d", color: "#4ade80" },
|
|
15388
|
+
closed: { label: "Closed", bg: "#27272a", color: "#71717a" },
|
|
15389
|
+
wont_fix: { label: "Won't Fix", bg: "#27272a", color: "#71717a" },
|
|
15390
|
+
duplicate: { label: "Duplicate", bg: "#27272a", color: "#71717a" }
|
|
15391
|
+
};
|
|
15392
|
+
var SEVERITY_CONFIG = {
|
|
15393
|
+
critical: { label: "Critical", color: "#ef4444", bg: "#7f1d1d" },
|
|
15394
|
+
high: { label: "High", color: "#f97316", bg: "#431407" },
|
|
15395
|
+
medium: { label: "Medium", color: "#eab308", bg: "#422006" },
|
|
15396
|
+
low: { label: "Low", color: "#71717a", bg: "#27272a" }
|
|
15397
|
+
};
|
|
15398
|
+
function IssueDetailScreen({ nav, issue }) {
|
|
15399
|
+
const statusConfig = STATUS_LABELS[issue.status] || { label: issue.status, bg: "#27272a", color: "#a1a1aa" };
|
|
15400
|
+
const severityConfig = issue.severity ? SEVERITY_CONFIG[issue.severity] : null;
|
|
15401
|
+
return /* @__PURE__ */ React15.createElement(View14, null, /* @__PURE__ */ React15.createElement(View14, { style: styles14.badgeRow }, /* @__PURE__ */ React15.createElement(View14, { style: [styles14.badge, { backgroundColor: statusConfig.bg }] }, /* @__PURE__ */ React15.createElement(Text14, { style: [styles14.badgeText, { color: statusConfig.color }] }, statusConfig.label)), severityConfig && /* @__PURE__ */ React15.createElement(View14, { style: [styles14.badge, { backgroundColor: severityConfig.bg }] }, /* @__PURE__ */ React15.createElement(Text14, { style: [styles14.badgeText, { color: severityConfig.color }] }, severityConfig.label))), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.title }, issue.title), issue.route && /* @__PURE__ */ React15.createElement(Text14, { style: styles14.route }, issue.route), issue.description && /* @__PURE__ */ React15.createElement(View14, { style: styles14.descriptionCard }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.descriptionText }, issue.description)), issue.verifiedByName && /* @__PURE__ */ React15.createElement(View14, { style: styles14.verifiedCard }, /* @__PURE__ */ React15.createElement(View14, { style: styles14.verifiedHeader }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.verifiedIcon }, "\u2705"), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.verifiedTitle }, "Retesting Proof")), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.verifiedBody }, "Verified by ", issue.verifiedByName, issue.verifiedAt && ` on ${new Date(issue.verifiedAt).toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" })}`)), issue.originalBugTitle && /* @__PURE__ */ React15.createElement(View14, { style: styles14.originalBugCard }, /* @__PURE__ */ React15.createElement(View14, { style: styles14.originalBugHeader }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.originalBugIcon }, "\u{1F504}"), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.originalBugTitle }, "Original Bug")), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.originalBugBody }, "Retest of: ", issue.originalBugTitle)), issue.screenshotUrls && issue.screenshotUrls.length > 0 && /* @__PURE__ */ React15.createElement(View14, { style: styles14.screenshotSection }, /* @__PURE__ */ React15.createElement(Text14, { style: styles14.screenshotLabel }, "Screenshots (", issue.screenshotUrls.length, ")"), /* @__PURE__ */ React15.createElement(View14, { style: styles14.screenshotRow }, issue.screenshotUrls.map((url, i) => /* @__PURE__ */ React15.createElement(TouchableOpacity13, { key: i, onPress: () => Linking2.openURL(url), activeOpacity: 0.7 }, /* @__PURE__ */ React15.createElement(Image3, { source: { uri: url }, style: styles14.screenshotThumb }))))), /* @__PURE__ */ React15.createElement(View14, { style: styles14.metaSection }, issue.reporterName && /* @__PURE__ */ React15.createElement(Text14, { style: styles14.metaText }, "Reported by ", issue.reporterName), /* @__PURE__ */ React15.createElement(Text14, { style: styles14.metaTextSmall }, "Created ", formatRelativeTime(issue.createdAt), " ", "\xB7", " Updated ", formatRelativeTime(issue.updatedAt))));
|
|
15402
|
+
}
|
|
15403
|
+
var styles14 = StyleSheet15.create({
|
|
15404
|
+
badgeRow: {
|
|
15405
|
+
flexDirection: "row",
|
|
15406
|
+
gap: 8,
|
|
15407
|
+
flexWrap: "wrap",
|
|
15408
|
+
marginBottom: 12
|
|
15409
|
+
},
|
|
15410
|
+
badge: {
|
|
15411
|
+
paddingHorizontal: 10,
|
|
15412
|
+
paddingVertical: 3,
|
|
15413
|
+
borderRadius: 6
|
|
15414
|
+
},
|
|
15415
|
+
badgeText: {
|
|
15416
|
+
fontSize: 11,
|
|
15417
|
+
fontWeight: "600"
|
|
15418
|
+
},
|
|
15419
|
+
title: {
|
|
15420
|
+
fontSize: 16,
|
|
15421
|
+
fontWeight: "700",
|
|
15422
|
+
color: colors.textPrimary,
|
|
15423
|
+
marginBottom: 8,
|
|
15424
|
+
lineHeight: 21
|
|
15425
|
+
},
|
|
15426
|
+
route: {
|
|
15427
|
+
fontSize: 12,
|
|
15428
|
+
color: colors.textDim,
|
|
15429
|
+
marginBottom: 12
|
|
15430
|
+
},
|
|
15431
|
+
descriptionCard: {
|
|
15432
|
+
backgroundColor: colors.card,
|
|
15433
|
+
borderWidth: 1,
|
|
15434
|
+
borderColor: colors.border,
|
|
15435
|
+
borderRadius: 8,
|
|
15436
|
+
padding: 12,
|
|
15437
|
+
marginBottom: 12
|
|
15438
|
+
},
|
|
15439
|
+
descriptionText: {
|
|
15440
|
+
fontSize: 13,
|
|
15441
|
+
color: colors.textSecondary,
|
|
15442
|
+
lineHeight: 19
|
|
15443
|
+
},
|
|
15444
|
+
verifiedCard: {
|
|
15445
|
+
backgroundColor: "#14532d",
|
|
15446
|
+
borderWidth: 1,
|
|
15447
|
+
borderColor: "#166534",
|
|
15448
|
+
borderRadius: 8,
|
|
15449
|
+
padding: 12,
|
|
15450
|
+
marginBottom: 12
|
|
15451
|
+
},
|
|
15452
|
+
verifiedHeader: {
|
|
15453
|
+
flexDirection: "row",
|
|
15454
|
+
alignItems: "center",
|
|
15455
|
+
gap: 8,
|
|
15456
|
+
marginBottom: 4
|
|
15457
|
+
},
|
|
15458
|
+
verifiedIcon: {
|
|
15459
|
+
fontSize: 16
|
|
15460
|
+
},
|
|
15461
|
+
verifiedTitle: {
|
|
15462
|
+
fontSize: 13,
|
|
15463
|
+
fontWeight: "600",
|
|
15464
|
+
color: "#4ade80"
|
|
15465
|
+
},
|
|
15466
|
+
verifiedBody: {
|
|
15467
|
+
fontSize: 12,
|
|
15468
|
+
color: "#86efac"
|
|
15469
|
+
},
|
|
15470
|
+
originalBugCard: {
|
|
15471
|
+
backgroundColor: "#422006",
|
|
15472
|
+
borderWidth: 1,
|
|
15473
|
+
borderColor: "#854d0e",
|
|
15474
|
+
borderRadius: 8,
|
|
15475
|
+
padding: 12,
|
|
15476
|
+
marginBottom: 12
|
|
15477
|
+
},
|
|
15478
|
+
originalBugHeader: {
|
|
15479
|
+
flexDirection: "row",
|
|
15480
|
+
alignItems: "center",
|
|
15481
|
+
gap: 8,
|
|
15482
|
+
marginBottom: 4
|
|
15483
|
+
},
|
|
15484
|
+
originalBugIcon: {
|
|
15485
|
+
fontSize: 16
|
|
15486
|
+
},
|
|
15487
|
+
originalBugTitle: {
|
|
15488
|
+
fontSize: 13,
|
|
15489
|
+
fontWeight: "600",
|
|
15490
|
+
color: "#fbbf24"
|
|
15491
|
+
},
|
|
15492
|
+
originalBugBody: {
|
|
15493
|
+
fontSize: 12,
|
|
15494
|
+
color: "#fde68a"
|
|
15495
|
+
},
|
|
15496
|
+
screenshotSection: {
|
|
15497
|
+
marginBottom: 12
|
|
15498
|
+
},
|
|
15499
|
+
screenshotLabel: {
|
|
15500
|
+
fontSize: 12,
|
|
15501
|
+
fontWeight: "600",
|
|
15502
|
+
color: colors.textMuted,
|
|
15503
|
+
marginBottom: 8
|
|
15504
|
+
},
|
|
15505
|
+
screenshotRow: {
|
|
15506
|
+
flexDirection: "row",
|
|
15507
|
+
gap: 8
|
|
15508
|
+
},
|
|
15509
|
+
screenshotThumb: {
|
|
15510
|
+
width: 80,
|
|
15511
|
+
height: 60,
|
|
15512
|
+
borderRadius: 6,
|
|
15513
|
+
borderWidth: 1,
|
|
15514
|
+
borderColor: colors.border
|
|
15515
|
+
},
|
|
15516
|
+
metaSection: {
|
|
15517
|
+
borderTopWidth: 1,
|
|
15518
|
+
borderTopColor: colors.border,
|
|
15519
|
+
paddingTop: 12,
|
|
15520
|
+
marginTop: 4
|
|
15521
|
+
},
|
|
15522
|
+
metaText: {
|
|
15523
|
+
fontSize: 12,
|
|
15524
|
+
color: colors.textDim,
|
|
15525
|
+
marginBottom: 4
|
|
15526
|
+
},
|
|
15527
|
+
metaTextSmall: {
|
|
15528
|
+
fontSize: 11,
|
|
15529
|
+
color: colors.textDim
|
|
15530
|
+
}
|
|
15531
|
+
});
|
|
15532
|
+
|
|
15053
15533
|
// src/BugBearButton.tsx
|
|
15054
15534
|
var screenWidth = Dimensions2.get("window").width;
|
|
15055
15535
|
var screenHeight = Dimensions2.get("window").height;
|
|
@@ -15064,7 +15544,7 @@ function BugBearButton({
|
|
|
15064
15544
|
}) {
|
|
15065
15545
|
const { shouldShowWidget, testerInfo, isLoading, unreadCount, assignments } = useBugBear();
|
|
15066
15546
|
const { currentScreen, canGoBack, push, pop, replace, reset } = useNavigation();
|
|
15067
|
-
const [modalVisible, setModalVisible] =
|
|
15547
|
+
const [modalVisible, setModalVisible] = useState11(false);
|
|
15068
15548
|
const getInitialPosition = () => {
|
|
15069
15549
|
const buttonSize = 56;
|
|
15070
15550
|
const margin = 16;
|
|
@@ -15143,6 +15623,10 @@ function BugBearButton({
|
|
|
15143
15623
|
return currentScreen.thread.subject || "Thread";
|
|
15144
15624
|
case "COMPOSE_MESSAGE":
|
|
15145
15625
|
return "New Message";
|
|
15626
|
+
case "ISSUE_LIST":
|
|
15627
|
+
return currentScreen.category === "open" ? "Open Issues" : currentScreen.category === "done" ? "Done" : "Reopened";
|
|
15628
|
+
case "ISSUE_DETAIL":
|
|
15629
|
+
return "Issue Detail";
|
|
15146
15630
|
case "PROFILE":
|
|
15147
15631
|
return "Profile";
|
|
15148
15632
|
default:
|
|
@@ -15176,46 +15660,50 @@ function BugBearButton({
|
|
|
15176
15660
|
const renderScreen = () => {
|
|
15177
15661
|
switch (currentScreen.name) {
|
|
15178
15662
|
case "HOME":
|
|
15179
|
-
return /* @__PURE__ */
|
|
15663
|
+
return /* @__PURE__ */ React16.createElement(HomeScreen, { nav });
|
|
15180
15664
|
case "TEST_DETAIL":
|
|
15181
|
-
return /* @__PURE__ */
|
|
15665
|
+
return /* @__PURE__ */ React16.createElement(TestDetailScreen, { testId: currentScreen.testId, nav });
|
|
15182
15666
|
case "TEST_LIST":
|
|
15183
|
-
return /* @__PURE__ */
|
|
15667
|
+
return /* @__PURE__ */ React16.createElement(TestListScreen, { nav });
|
|
15184
15668
|
case "TEST_FEEDBACK":
|
|
15185
|
-
return /* @__PURE__ */
|
|
15669
|
+
return /* @__PURE__ */ React16.createElement(TestFeedbackScreen, { status: currentScreen.status, assignmentId: currentScreen.assignmentId, nav });
|
|
15186
15670
|
case "REPORT":
|
|
15187
|
-
return /* @__PURE__ */
|
|
15671
|
+
return /* @__PURE__ */ React16.createElement(ReportScreen, { nav, prefill: currentScreen.prefill });
|
|
15188
15672
|
case "REPORT_SUCCESS":
|
|
15189
|
-
return /* @__PURE__ */
|
|
15673
|
+
return /* @__PURE__ */ React16.createElement(ReportSuccessScreen, { nav });
|
|
15190
15674
|
case "MESSAGE_LIST":
|
|
15191
|
-
return /* @__PURE__ */
|
|
15675
|
+
return /* @__PURE__ */ React16.createElement(MessageListScreen, { nav });
|
|
15192
15676
|
case "THREAD_DETAIL":
|
|
15193
|
-
return /* @__PURE__ */
|
|
15677
|
+
return /* @__PURE__ */ React16.createElement(ThreadDetailScreen, { thread: currentScreen.thread, nav });
|
|
15194
15678
|
case "COMPOSE_MESSAGE":
|
|
15195
|
-
return /* @__PURE__ */
|
|
15679
|
+
return /* @__PURE__ */ React16.createElement(ComposeMessageScreen, { nav });
|
|
15680
|
+
case "ISSUE_LIST":
|
|
15681
|
+
return /* @__PURE__ */ React16.createElement(IssueListScreen, { nav, category: currentScreen.category });
|
|
15682
|
+
case "ISSUE_DETAIL":
|
|
15683
|
+
return /* @__PURE__ */ React16.createElement(IssueDetailScreen, { nav, issue: currentScreen.issue });
|
|
15196
15684
|
case "PROFILE":
|
|
15197
|
-
return /* @__PURE__ */
|
|
15685
|
+
return /* @__PURE__ */ React16.createElement(ProfileScreen, { nav });
|
|
15198
15686
|
default:
|
|
15199
|
-
return /* @__PURE__ */
|
|
15687
|
+
return /* @__PURE__ */ React16.createElement(HomeScreen, { nav });
|
|
15200
15688
|
}
|
|
15201
15689
|
};
|
|
15202
|
-
return /* @__PURE__ */
|
|
15690
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
15203
15691
|
Animated.View,
|
|
15204
15692
|
{
|
|
15205
|
-
style: [
|
|
15693
|
+
style: [styles15.fabContainer, { transform: pan.getTranslateTransform() }, buttonStyle],
|
|
15206
15694
|
...panResponder.panHandlers
|
|
15207
15695
|
},
|
|
15208
|
-
/* @__PURE__ */
|
|
15209
|
-
|
|
15696
|
+
/* @__PURE__ */ React16.createElement(
|
|
15697
|
+
TouchableOpacity14,
|
|
15210
15698
|
{
|
|
15211
|
-
style:
|
|
15699
|
+
style: styles15.fab,
|
|
15212
15700
|
onPress: () => setModalVisible(true),
|
|
15213
15701
|
activeOpacity: draggable ? 1 : 0.7
|
|
15214
15702
|
},
|
|
15215
|
-
/* @__PURE__ */
|
|
15216
|
-
badgeCount > 0 && /* @__PURE__ */
|
|
15703
|
+
/* @__PURE__ */ React16.createElement(Image4, { source: { uri: BUGBEAR_LOGO_BASE64 }, style: styles15.fabIcon }),
|
|
15704
|
+
badgeCount > 0 && /* @__PURE__ */ React16.createElement(View15, { style: styles15.badge }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.badgeText }, badgeCount > 9 ? "9+" : badgeCount))
|
|
15217
15705
|
)
|
|
15218
|
-
), /* @__PURE__ */
|
|
15706
|
+
), /* @__PURE__ */ React16.createElement(
|
|
15219
15707
|
Modal2,
|
|
15220
15708
|
{
|
|
15221
15709
|
visible: modalVisible,
|
|
@@ -15223,26 +15711,26 @@ function BugBearButton({
|
|
|
15223
15711
|
transparent: true,
|
|
15224
15712
|
onRequestClose: handleClose
|
|
15225
15713
|
},
|
|
15226
|
-
/* @__PURE__ */
|
|
15714
|
+
/* @__PURE__ */ React16.createElement(
|
|
15227
15715
|
KeyboardAvoidingView,
|
|
15228
15716
|
{
|
|
15229
15717
|
behavior: Platform4.OS === "ios" ? "padding" : "height",
|
|
15230
|
-
style:
|
|
15718
|
+
style: styles15.modalOverlay
|
|
15231
15719
|
},
|
|
15232
|
-
/* @__PURE__ */
|
|
15720
|
+
/* @__PURE__ */ React16.createElement(View15, { style: styles15.modalContainer }, /* @__PURE__ */ React16.createElement(View15, { style: styles15.header }, /* @__PURE__ */ React16.createElement(View15, { style: styles15.headerLeft }, canGoBack ? /* @__PURE__ */ React16.createElement(View15, { style: styles15.headerNavRow }, /* @__PURE__ */ React16.createElement(TouchableOpacity14, { onPress: () => nav.pop(), style: styles15.backButton }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.backText }, "\u2190 Back")), /* @__PURE__ */ React16.createElement(TouchableOpacity14, { onPress: () => nav.reset(), style: styles15.homeButton }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.homeText }, "\u{1F3E0}"))) : /* @__PURE__ */ React16.createElement(View15, { style: styles15.headerTitleRow }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.headerTitle }, "BugBear"), testerInfo && /* @__PURE__ */ React16.createElement(TouchableOpacity14, { onPress: () => push({ name: "PROFILE" }) }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.headerName }, testerInfo.name, " \u270E")))), getHeaderTitle() ? /* @__PURE__ */ React16.createElement(Text15, { style: styles15.headerScreenTitle, numberOfLines: 1 }, getHeaderTitle()) : null, /* @__PURE__ */ React16.createElement(TouchableOpacity14, { onPress: handleClose, style: styles15.closeButton }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.closeText }, "\u2715"))), /* @__PURE__ */ React16.createElement(
|
|
15233
15721
|
ScrollView3,
|
|
15234
15722
|
{
|
|
15235
|
-
style:
|
|
15236
|
-
contentContainerStyle:
|
|
15723
|
+
style: styles15.content,
|
|
15724
|
+
contentContainerStyle: styles15.contentContainer,
|
|
15237
15725
|
keyboardShouldPersistTaps: "handled",
|
|
15238
15726
|
showsVerticalScrollIndicator: false
|
|
15239
15727
|
},
|
|
15240
|
-
isLoading ? /* @__PURE__ */
|
|
15728
|
+
isLoading ? /* @__PURE__ */ React16.createElement(View15, { style: styles15.loadingContainer }, /* @__PURE__ */ React16.createElement(ActivityIndicator3, { size: "large", color: colors.blue }), /* @__PURE__ */ React16.createElement(Text15, { style: styles15.loadingText }, "Loading...")) : renderScreen()
|
|
15241
15729
|
))
|
|
15242
15730
|
)
|
|
15243
15731
|
));
|
|
15244
15732
|
}
|
|
15245
|
-
var
|
|
15733
|
+
var styles15 = StyleSheet16.create({
|
|
15246
15734
|
// FAB
|
|
15247
15735
|
fabContainer: {
|
|
15248
15736
|
position: "absolute",
|
|
@@ -15384,8 +15872,8 @@ var styles13 = StyleSheet14.create({
|
|
|
15384
15872
|
});
|
|
15385
15873
|
|
|
15386
15874
|
// src/BugBearErrorBoundary.tsx
|
|
15387
|
-
import
|
|
15388
|
-
import { View as
|
|
15875
|
+
import React17, { Component } from "react";
|
|
15876
|
+
import { View as View16, Text as Text16, TouchableOpacity as TouchableOpacity15, StyleSheet as StyleSheet17 } from "react-native";
|
|
15389
15877
|
var BugBearErrorBoundary = class extends Component {
|
|
15390
15878
|
constructor(props) {
|
|
15391
15879
|
super(props);
|
|
@@ -15430,7 +15918,7 @@ var BugBearErrorBoundary = class extends Component {
|
|
|
15430
15918
|
if (fallback) {
|
|
15431
15919
|
return fallback;
|
|
15432
15920
|
}
|
|
15433
|
-
return /* @__PURE__ */
|
|
15921
|
+
return /* @__PURE__ */ React17.createElement(View16, { style: styles16.container }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.title }, "Something went wrong"), /* @__PURE__ */ React17.createElement(Text16, { style: styles16.message }, error.message), /* @__PURE__ */ React17.createElement(TouchableOpacity15, { style: styles16.button, onPress: this.reset }, /* @__PURE__ */ React17.createElement(Text16, { style: styles16.buttonText }, "Try Again")), /* @__PURE__ */ React17.createElement(Text16, { style: styles16.caption }, "The error has been captured by BugBear"));
|
|
15434
15922
|
}
|
|
15435
15923
|
return children;
|
|
15436
15924
|
}
|
|
@@ -15441,7 +15929,7 @@ function useErrorContext() {
|
|
|
15441
15929
|
getEnhancedContext: () => contextCapture.getEnhancedContext()
|
|
15442
15930
|
};
|
|
15443
15931
|
}
|
|
15444
|
-
var
|
|
15932
|
+
var styles16 = StyleSheet17.create({
|
|
15445
15933
|
container: {
|
|
15446
15934
|
padding: 20,
|
|
15447
15935
|
margin: 20,
|