@bbearai/react-native 0.5.2 → 0.5.4
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/README.md +5 -3
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +488 -58
- package/dist/index.mjs +474 -44
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13086,6 +13086,10 @@ var BugBearContext = createContext({
|
|
|
13086
13086
|
updateTesterProfile: async () => ({ success: false }),
|
|
13087
13087
|
refreshTesterInfo: async () => {
|
|
13088
13088
|
},
|
|
13089
|
+
// Issue tracking
|
|
13090
|
+
issueCounts: { open: 0, done: 0, reopened: 0 },
|
|
13091
|
+
refreshIssueCounts: async () => {
|
|
13092
|
+
},
|
|
13089
13093
|
dashboardUrl: void 0,
|
|
13090
13094
|
onError: void 0
|
|
13091
13095
|
});
|
|
@@ -13101,6 +13105,7 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13101
13105
|
const [isLoading, setIsLoading] = useState(true);
|
|
13102
13106
|
const [threads, setThreads] = useState([]);
|
|
13103
13107
|
const [unreadCount, setUnreadCount] = useState(0);
|
|
13108
|
+
const [issueCounts, setIssueCounts] = useState({ open: 0, done: 0, reopened: 0 });
|
|
13104
13109
|
const [activeSession, setActiveSession] = useState(null);
|
|
13105
13110
|
const [sessionFindings, setSessionFindings] = useState([]);
|
|
13106
13111
|
const hasInitialized = useRef(false);
|
|
@@ -13207,6 +13212,11 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13207
13212
|
if (!client) return null;
|
|
13208
13213
|
return client.uploadImageFromUri(uri, void 0, bucket);
|
|
13209
13214
|
}, [client]);
|
|
13215
|
+
const refreshIssueCounts = useCallback(async () => {
|
|
13216
|
+
if (!client) return;
|
|
13217
|
+
const counts = await client.getIssueCounts();
|
|
13218
|
+
setIssueCounts(counts);
|
|
13219
|
+
}, [client]);
|
|
13210
13220
|
const initializeBugBear = useCallback(async (bugBearClient) => {
|
|
13211
13221
|
setIsLoading(true);
|
|
13212
13222
|
try {
|
|
@@ -13219,16 +13229,18 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13219
13229
|
setTesterInfo(info);
|
|
13220
13230
|
setIsTester(!!info);
|
|
13221
13231
|
if (info && qaEnabled) {
|
|
13222
|
-
const [newAssignments, newThreads, session] = await Promise.all([
|
|
13232
|
+
const [newAssignments, newThreads, session, counts] = await Promise.all([
|
|
13223
13233
|
bugBearClient.getAssignedTests(),
|
|
13224
13234
|
bugBearClient.getThreadsForTester(),
|
|
13225
|
-
bugBearClient.getActiveSession()
|
|
13235
|
+
bugBearClient.getActiveSession(),
|
|
13236
|
+
bugBearClient.getIssueCounts()
|
|
13226
13237
|
]);
|
|
13227
13238
|
setAssignments(newAssignments);
|
|
13228
13239
|
setThreads(newThreads);
|
|
13229
13240
|
const totalUnread = newThreads.reduce((sum, t) => sum + t.unreadCount, 0);
|
|
13230
13241
|
setUnreadCount(totalUnread);
|
|
13231
13242
|
setActiveSession(session);
|
|
13243
|
+
setIssueCounts(counts);
|
|
13232
13244
|
if (session) {
|
|
13233
13245
|
const findings = await bugBearClient.getSessionFindings(session.id);
|
|
13234
13246
|
setSessionFindings(findings);
|
|
@@ -13257,6 +13269,14 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13257
13269
|
initializeBugBear(newClient);
|
|
13258
13270
|
}
|
|
13259
13271
|
}, [enabled, config, initializeBugBear]);
|
|
13272
|
+
useEffect(() => {
|
|
13273
|
+
if (!client || !isTester || !isQAEnabled) return;
|
|
13274
|
+
const interval = setInterval(() => {
|
|
13275
|
+
refreshThreads();
|
|
13276
|
+
refreshIssueCounts();
|
|
13277
|
+
}, 3e4);
|
|
13278
|
+
return () => clearInterval(interval);
|
|
13279
|
+
}, [client, isTester, isQAEnabled, refreshThreads, refreshIssueCounts]);
|
|
13260
13280
|
const currentAssignment = assignments.find(
|
|
13261
13281
|
(a) => a.status === "in_progress"
|
|
13262
13282
|
) || assignments.find(
|
|
@@ -13296,6 +13316,9 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13296
13316
|
refreshTesterStatus,
|
|
13297
13317
|
updateTesterProfile,
|
|
13298
13318
|
refreshTesterInfo,
|
|
13319
|
+
// Issue tracking
|
|
13320
|
+
issueCounts,
|
|
13321
|
+
refreshIssueCounts,
|
|
13299
13322
|
dashboardUrl: config.dashboardUrl,
|
|
13300
13323
|
onError: config.onError
|
|
13301
13324
|
}
|
|
@@ -13305,21 +13328,21 @@ function BugBearProvider({ config, children, appVersion, enabled = true }) {
|
|
|
13305
13328
|
}
|
|
13306
13329
|
|
|
13307
13330
|
// src/BugBearButton.tsx
|
|
13308
|
-
import
|
|
13331
|
+
import React16, { useState as useState11, useRef as useRef3 } from "react";
|
|
13309
13332
|
import {
|
|
13310
|
-
View as
|
|
13311
|
-
Text as
|
|
13312
|
-
Image as
|
|
13313
|
-
TouchableOpacity as
|
|
13333
|
+
View as View15,
|
|
13334
|
+
Text as Text15,
|
|
13335
|
+
Image as Image4,
|
|
13336
|
+
TouchableOpacity as TouchableOpacity14,
|
|
13314
13337
|
Modal as Modal2,
|
|
13315
13338
|
ScrollView as ScrollView3,
|
|
13316
|
-
StyleSheet as
|
|
13339
|
+
StyleSheet as StyleSheet16,
|
|
13317
13340
|
Dimensions as Dimensions2,
|
|
13318
13341
|
KeyboardAvoidingView,
|
|
13319
13342
|
Platform as Platform4,
|
|
13320
13343
|
PanResponder,
|
|
13321
13344
|
Animated,
|
|
13322
|
-
ActivityIndicator as
|
|
13345
|
+
ActivityIndicator as ActivityIndicator3,
|
|
13323
13346
|
Keyboard as Keyboard2
|
|
13324
13347
|
} from "react-native";
|
|
13325
13348
|
|
|
@@ -13542,10 +13565,11 @@ var templateInfo = {
|
|
|
13542
13565
|
import React2, { useEffect as useEffect2 } from "react";
|
|
13543
13566
|
import { View, Text, TouchableOpacity, StyleSheet as StyleSheet2, Linking } from "react-native";
|
|
13544
13567
|
function HomeScreen({ nav }) {
|
|
13545
|
-
const { assignments, unreadCount, threads, refreshAssignments, refreshThreads, dashboardUrl } = useBugBear();
|
|
13568
|
+
const { assignments, unreadCount, threads, refreshAssignments, refreshThreads, issueCounts, refreshIssueCounts, dashboardUrl } = useBugBear();
|
|
13546
13569
|
useEffect2(() => {
|
|
13547
13570
|
refreshAssignments();
|
|
13548
13571
|
refreshThreads();
|
|
13572
|
+
refreshIssueCounts();
|
|
13549
13573
|
}, []);
|
|
13550
13574
|
const pendingAssignments = assignments.filter((a) => a.status === "pending" || a.status === "in_progress");
|
|
13551
13575
|
const pendingCount = pendingAssignments.length;
|
|
@@ -13611,6 +13635,33 @@ function HomeScreen({ nav }) {
|
|
|
13611
13635
|
/* @__PURE__ */ React2.createElement(Text, { style: styles.actionIcon }, "\u{1F4AC}"),
|
|
13612
13636
|
/* @__PURE__ */ React2.createElement(Text, { style: styles.actionLabel }, "Messages"),
|
|
13613
13637
|
unreadCount > 0 && /* @__PURE__ */ React2.createElement(View, { style: [styles.actionBadge, styles.actionBadgeMsg] }, /* @__PURE__ */ React2.createElement(Text, { style: styles.actionBadgeText }, unreadCount))
|
|
13638
|
+
)), /* @__PURE__ */ React2.createElement(View, { style: styles.issueGrid }, /* @__PURE__ */ React2.createElement(
|
|
13639
|
+
TouchableOpacity,
|
|
13640
|
+
{
|
|
13641
|
+
style: [styles.issueCard, styles.issueCardOpen],
|
|
13642
|
+
onPress: () => nav.push({ name: "ISSUE_LIST", category: "open" }),
|
|
13643
|
+
activeOpacity: 0.7
|
|
13644
|
+
},
|
|
13645
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueCountOpen }, issueCounts.open),
|
|
13646
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueLabel }, "Open")
|
|
13647
|
+
), /* @__PURE__ */ React2.createElement(
|
|
13648
|
+
TouchableOpacity,
|
|
13649
|
+
{
|
|
13650
|
+
style: [styles.issueCard, styles.issueCardDone],
|
|
13651
|
+
onPress: () => nav.push({ name: "ISSUE_LIST", category: "done" }),
|
|
13652
|
+
activeOpacity: 0.7
|
|
13653
|
+
},
|
|
13654
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueCountDone }, issueCounts.done),
|
|
13655
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueLabel }, "Done")
|
|
13656
|
+
), /* @__PURE__ */ React2.createElement(
|
|
13657
|
+
TouchableOpacity,
|
|
13658
|
+
{
|
|
13659
|
+
style: [styles.issueCard, styles.issueCardReopened],
|
|
13660
|
+
onPress: () => nav.push({ name: "ISSUE_LIST", category: "reopened" }),
|
|
13661
|
+
activeOpacity: 0.7
|
|
13662
|
+
},
|
|
13663
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueCountReopened }, issueCounts.reopened),
|
|
13664
|
+
/* @__PURE__ */ React2.createElement(Text, { style: styles.issueLabel }, "Reopened")
|
|
13614
13665
|
)), 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(
|
|
13615
13666
|
TouchableOpacity,
|
|
13616
13667
|
{
|
|
@@ -13628,6 +13679,7 @@ function HomeScreen({ nav }) {
|
|
|
13628
13679
|
onPress: () => {
|
|
13629
13680
|
refreshAssignments();
|
|
13630
13681
|
refreshThreads();
|
|
13682
|
+
refreshIssueCounts();
|
|
13631
13683
|
}
|
|
13632
13684
|
},
|
|
13633
13685
|
/* @__PURE__ */ React2.createElement(Text, { style: styles.refreshText }, "\u21BB Refresh")
|
|
@@ -13798,6 +13850,54 @@ var styles = StyleSheet2.create({
|
|
|
13798
13850
|
color: colors.textMuted,
|
|
13799
13851
|
marginLeft: 8
|
|
13800
13852
|
},
|
|
13853
|
+
issueGrid: {
|
|
13854
|
+
flexDirection: "row",
|
|
13855
|
+
gap: 10,
|
|
13856
|
+
marginBottom: 20
|
|
13857
|
+
},
|
|
13858
|
+
issueCard: {
|
|
13859
|
+
flex: 1,
|
|
13860
|
+
backgroundColor: colors.card,
|
|
13861
|
+
borderWidth: 1,
|
|
13862
|
+
borderColor: colors.border,
|
|
13863
|
+
borderRadius: 10,
|
|
13864
|
+
paddingVertical: 12,
|
|
13865
|
+
paddingHorizontal: 8,
|
|
13866
|
+
alignItems: "center"
|
|
13867
|
+
},
|
|
13868
|
+
issueCardOpen: {
|
|
13869
|
+
borderTopWidth: 3,
|
|
13870
|
+
borderTopColor: "#f97316"
|
|
13871
|
+
},
|
|
13872
|
+
issueCardDone: {
|
|
13873
|
+
borderTopWidth: 3,
|
|
13874
|
+
borderTopColor: "#22c55e"
|
|
13875
|
+
},
|
|
13876
|
+
issueCardReopened: {
|
|
13877
|
+
borderTopWidth: 3,
|
|
13878
|
+
borderTopColor: "#ef4444"
|
|
13879
|
+
},
|
|
13880
|
+
issueCountOpen: {
|
|
13881
|
+
fontSize: 22,
|
|
13882
|
+
fontWeight: "700",
|
|
13883
|
+
color: "#f97316"
|
|
13884
|
+
},
|
|
13885
|
+
issueCountDone: {
|
|
13886
|
+
fontSize: 22,
|
|
13887
|
+
fontWeight: "700",
|
|
13888
|
+
color: "#22c55e"
|
|
13889
|
+
},
|
|
13890
|
+
issueCountReopened: {
|
|
13891
|
+
fontSize: 22,
|
|
13892
|
+
fontWeight: "700",
|
|
13893
|
+
color: "#ef4444"
|
|
13894
|
+
},
|
|
13895
|
+
issueLabel: {
|
|
13896
|
+
fontSize: 11,
|
|
13897
|
+
fontWeight: "600",
|
|
13898
|
+
color: colors.textSecondary,
|
|
13899
|
+
marginTop: 2
|
|
13900
|
+
},
|
|
13801
13901
|
refreshButton: {
|
|
13802
13902
|
alignItems: "center",
|
|
13803
13903
|
paddingVertical: 8
|
|
@@ -14153,10 +14253,16 @@ function TestListScreen({ nav }) {
|
|
|
14153
14253
|
const filterAssignment = (a) => {
|
|
14154
14254
|
if (roleFilter && a.testCase.role?.id !== roleFilter) return false;
|
|
14155
14255
|
if (filter === "pending") return a.status === "pending" || a.status === "in_progress";
|
|
14156
|
-
if (filter === "
|
|
14256
|
+
if (filter === "done") return a.status === "passed";
|
|
14257
|
+
if (filter === "reopened") return a.status === "failed";
|
|
14157
14258
|
return true;
|
|
14158
14259
|
};
|
|
14159
|
-
return /* @__PURE__ */ React4.createElement(View3, null, /* @__PURE__ */ React4.createElement(View3, { style: styles3.filterBar }, [
|
|
14260
|
+
return /* @__PURE__ */ React4.createElement(View3, null, /* @__PURE__ */ React4.createElement(View3, { style: styles3.filterBar }, [
|
|
14261
|
+
{ key: "all", label: "All", count: assignments.length },
|
|
14262
|
+
{ key: "pending", label: "To Do", count: assignments.filter((a) => a.status === "pending" || a.status === "in_progress").length },
|
|
14263
|
+
{ key: "done", label: "Done", count: assignments.filter((a) => a.status === "passed").length },
|
|
14264
|
+
{ key: "reopened", label: "Re Opened", count: assignments.filter((a) => a.status === "failed").length }
|
|
14265
|
+
].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(
|
|
14160
14266
|
TouchableOpacity3,
|
|
14161
14267
|
{
|
|
14162
14268
|
style: [styles3.roleBtn, !roleFilter && styles3.roleBtnActive],
|
|
@@ -14194,7 +14300,19 @@ function TestListScreen({ nav }) {
|
|
|
14194
14300
|
onPress: () => nav.push({ name: "TEST_DETAIL", testId: assignment.id })
|
|
14195
14301
|
},
|
|
14196
14302
|
/* @__PURE__ */ React4.createElement(Text3, { style: styles3.testBadge }, badge.icon),
|
|
14197
|
-
/* @__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))))
|
|
14303
|
+
/* @__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)))),
|
|
14304
|
+
/* @__PURE__ */ React4.createElement(View3, { style: [
|
|
14305
|
+
styles3.statusPill,
|
|
14306
|
+
{
|
|
14307
|
+
backgroundColor: assignment.status === "passed" ? "#14532d" : assignment.status === "failed" ? "#450a0a" : assignment.status === "in_progress" ? "#172554" : "#27272a",
|
|
14308
|
+
borderColor: assignment.status === "passed" ? "#166534" : assignment.status === "failed" ? "#7f1d1d" : assignment.status === "in_progress" ? "#1e3a5f" : "#3f3f46"
|
|
14309
|
+
}
|
|
14310
|
+
] }, /* @__PURE__ */ React4.createElement(Text3, { style: [
|
|
14311
|
+
styles3.statusPillText,
|
|
14312
|
+
{
|
|
14313
|
+
color: assignment.status === "passed" ? "#4ade80" : assignment.status === "failed" ? "#f87171" : assignment.status === "in_progress" ? "#60a5fa" : "#d4d4d8"
|
|
14314
|
+
}
|
|
14315
|
+
] }, badge.label))
|
|
14198
14316
|
);
|
|
14199
14317
|
}));
|
|
14200
14318
|
}), /* @__PURE__ */ React4.createElement(TouchableOpacity3, { style: styles3.refreshBtn, onPress: refreshAssignments }, /* @__PURE__ */ React4.createElement(Text3, { style: styles3.refreshText }, "\u21BB", " Refresh")));
|
|
@@ -14232,6 +14350,8 @@ var styles3 = StyleSheet4.create({
|
|
|
14232
14350
|
retestTag: { backgroundColor: "#422006", borderWidth: 1, borderColor: "#854d0e", borderRadius: 4, paddingHorizontal: 5, paddingVertical: 1 },
|
|
14233
14351
|
retestTagText: { fontSize: 10, fontWeight: "600", color: "#fbbf24" },
|
|
14234
14352
|
testMeta: { fontSize: 11, color: colors.textDim },
|
|
14353
|
+
statusPill: { paddingHorizontal: 8, paddingVertical: 3, borderRadius: 6, borderWidth: 1, marginLeft: 8 },
|
|
14354
|
+
statusPillText: { fontSize: 10, fontWeight: "600" },
|
|
14235
14355
|
refreshBtn: { alignItems: "center", paddingVertical: 12 },
|
|
14236
14356
|
refreshText: { fontSize: 13, color: colors.blue }
|
|
14237
14357
|
});
|
|
@@ -15116,6 +15236,308 @@ var styles12 = StyleSheet13.create({
|
|
|
15116
15236
|
platformTextActive: { color: colors.blueLight }
|
|
15117
15237
|
});
|
|
15118
15238
|
|
|
15239
|
+
// src/widget/screens/IssueListScreen.tsx
|
|
15240
|
+
import React14, { useState as useState10, useEffect as useEffect8 } from "react";
|
|
15241
|
+
import { View as View13, Text as Text13, TouchableOpacity as TouchableOpacity12, StyleSheet as StyleSheet14, ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
15242
|
+
var CATEGORY_CONFIG = {
|
|
15243
|
+
open: { label: "Open Issues", accent: "#f97316", emptyIcon: "\u2705", emptyText: "No open issues" },
|
|
15244
|
+
done: { label: "Done", accent: "#22c55e", emptyIcon: "\u{1F389}", emptyText: "No completed issues yet" },
|
|
15245
|
+
reopened: { label: "Reopened", accent: "#ef4444", emptyIcon: "\u{1F44D}", emptyText: "No reopened issues" }
|
|
15246
|
+
};
|
|
15247
|
+
var SEVERITY_COLORS = {
|
|
15248
|
+
critical: "#ef4444",
|
|
15249
|
+
high: "#f97316",
|
|
15250
|
+
medium: "#eab308",
|
|
15251
|
+
low: "#71717a"
|
|
15252
|
+
};
|
|
15253
|
+
function IssueListScreen({ nav, category }) {
|
|
15254
|
+
const { client } = useBugBear();
|
|
15255
|
+
const [issues, setIssues] = useState10([]);
|
|
15256
|
+
const [loading, setLoading] = useState10(true);
|
|
15257
|
+
const config = CATEGORY_CONFIG[category];
|
|
15258
|
+
useEffect8(() => {
|
|
15259
|
+
let cancelled = false;
|
|
15260
|
+
setLoading(true);
|
|
15261
|
+
(async () => {
|
|
15262
|
+
if (!client) return;
|
|
15263
|
+
const data = await client.getIssues(category);
|
|
15264
|
+
if (!cancelled) {
|
|
15265
|
+
setIssues(data);
|
|
15266
|
+
setLoading(false);
|
|
15267
|
+
}
|
|
15268
|
+
})();
|
|
15269
|
+
return () => {
|
|
15270
|
+
cancelled = true;
|
|
15271
|
+
};
|
|
15272
|
+
}, [client, category]);
|
|
15273
|
+
if (loading) {
|
|
15274
|
+
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..."));
|
|
15275
|
+
}
|
|
15276
|
+
if (issues.length === 0) {
|
|
15277
|
+
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));
|
|
15278
|
+
}
|
|
15279
|
+
return /* @__PURE__ */ React14.createElement(View13, null, issues.map((issue) => /* @__PURE__ */ React14.createElement(
|
|
15280
|
+
TouchableOpacity12,
|
|
15281
|
+
{
|
|
15282
|
+
key: issue.id,
|
|
15283
|
+
style: styles13.issueCard,
|
|
15284
|
+
onPress: () => nav.push({ name: "ISSUE_DETAIL", issue }),
|
|
15285
|
+
activeOpacity: 0.7
|
|
15286
|
+
},
|
|
15287
|
+
/* @__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)),
|
|
15288
|
+
/* @__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))),
|
|
15289
|
+
category === "done" && issue.verifiedByName && /* @__PURE__ */ React14.createElement(View13, { style: styles13.verifiedBadge }, /* @__PURE__ */ React14.createElement(Text13, { style: styles13.verifiedBadgeText }, "\u2714", " Verified by ", issue.verifiedByName)),
|
|
15290
|
+
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))
|
|
15291
|
+
)));
|
|
15292
|
+
}
|
|
15293
|
+
var styles13 = StyleSheet14.create({
|
|
15294
|
+
emptyContainer: {
|
|
15295
|
+
alignItems: "center",
|
|
15296
|
+
paddingVertical: 40
|
|
15297
|
+
},
|
|
15298
|
+
emptyIcon: {
|
|
15299
|
+
fontSize: 36,
|
|
15300
|
+
marginBottom: 8
|
|
15301
|
+
},
|
|
15302
|
+
emptyText: {
|
|
15303
|
+
color: colors.textMuted,
|
|
15304
|
+
fontSize: 14,
|
|
15305
|
+
marginTop: 4
|
|
15306
|
+
},
|
|
15307
|
+
issueCard: {
|
|
15308
|
+
backgroundColor: colors.card,
|
|
15309
|
+
borderWidth: 1,
|
|
15310
|
+
borderColor: colors.border,
|
|
15311
|
+
borderRadius: 10,
|
|
15312
|
+
padding: 14,
|
|
15313
|
+
marginBottom: 8
|
|
15314
|
+
},
|
|
15315
|
+
topRow: {
|
|
15316
|
+
flexDirection: "row",
|
|
15317
|
+
alignItems: "flex-start",
|
|
15318
|
+
gap: 8
|
|
15319
|
+
},
|
|
15320
|
+
severityDot: {
|
|
15321
|
+
width: 8,
|
|
15322
|
+
height: 8,
|
|
15323
|
+
borderRadius: 4,
|
|
15324
|
+
marginTop: 5
|
|
15325
|
+
},
|
|
15326
|
+
issueTitle: {
|
|
15327
|
+
fontSize: 13,
|
|
15328
|
+
fontWeight: "600",
|
|
15329
|
+
color: colors.textPrimary,
|
|
15330
|
+
flex: 1
|
|
15331
|
+
},
|
|
15332
|
+
bottomRow: {
|
|
15333
|
+
flexDirection: "row",
|
|
15334
|
+
justifyContent: "space-between",
|
|
15335
|
+
marginTop: 6
|
|
15336
|
+
},
|
|
15337
|
+
routeText: {
|
|
15338
|
+
fontSize: 11,
|
|
15339
|
+
color: colors.textDim,
|
|
15340
|
+
maxWidth: "60%"
|
|
15341
|
+
},
|
|
15342
|
+
timeText: {
|
|
15343
|
+
fontSize: 11,
|
|
15344
|
+
color: colors.textDim,
|
|
15345
|
+
marginLeft: "auto"
|
|
15346
|
+
},
|
|
15347
|
+
verifiedBadge: {
|
|
15348
|
+
flexDirection: "row",
|
|
15349
|
+
alignItems: "center",
|
|
15350
|
+
backgroundColor: "#14532d",
|
|
15351
|
+
borderWidth: 1,
|
|
15352
|
+
borderColor: "#166534",
|
|
15353
|
+
borderRadius: 6,
|
|
15354
|
+
paddingHorizontal: 8,
|
|
15355
|
+
paddingVertical: 2,
|
|
15356
|
+
marginTop: 6,
|
|
15357
|
+
alignSelf: "flex-start"
|
|
15358
|
+
},
|
|
15359
|
+
verifiedBadgeText: {
|
|
15360
|
+
fontSize: 10,
|
|
15361
|
+
fontWeight: "600",
|
|
15362
|
+
color: "#4ade80"
|
|
15363
|
+
},
|
|
15364
|
+
reopenedBadge: {
|
|
15365
|
+
flexDirection: "row",
|
|
15366
|
+
alignItems: "center",
|
|
15367
|
+
backgroundColor: "#422006",
|
|
15368
|
+
borderWidth: 1,
|
|
15369
|
+
borderColor: "#854d0e",
|
|
15370
|
+
borderRadius: 6,
|
|
15371
|
+
paddingHorizontal: 8,
|
|
15372
|
+
paddingVertical: 2,
|
|
15373
|
+
marginTop: 6,
|
|
15374
|
+
alignSelf: "flex-start"
|
|
15375
|
+
},
|
|
15376
|
+
reopenedBadgeText: {
|
|
15377
|
+
fontSize: 10,
|
|
15378
|
+
fontWeight: "600",
|
|
15379
|
+
color: "#fbbf24"
|
|
15380
|
+
}
|
|
15381
|
+
});
|
|
15382
|
+
|
|
15383
|
+
// src/widget/screens/IssueDetailScreen.tsx
|
|
15384
|
+
import React15 from "react";
|
|
15385
|
+
import { View as View14, Text as Text14, Image as Image3, StyleSheet as StyleSheet15, Linking as Linking2, TouchableOpacity as TouchableOpacity13 } from "react-native";
|
|
15386
|
+
var STATUS_LABELS = {
|
|
15387
|
+
new: { label: "New", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15388
|
+
triaging: { label: "Triaging", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15389
|
+
confirmed: { label: "Confirmed", bg: "#422006", color: "#fbbf24" },
|
|
15390
|
+
in_progress: { label: "In Progress", bg: "#1e3a5f", color: "#60a5fa" },
|
|
15391
|
+
fixed: { label: "Fixed", bg: "#14532d", color: "#4ade80" },
|
|
15392
|
+
ready_to_test: { label: "Ready to Test", bg: "#422006", color: "#fbbf24" },
|
|
15393
|
+
verified: { label: "Verified", bg: "#14532d", color: "#4ade80" },
|
|
15394
|
+
resolved: { label: "Resolved", bg: "#14532d", color: "#4ade80" },
|
|
15395
|
+
reviewed: { label: "Reviewed", bg: "#14532d", color: "#4ade80" },
|
|
15396
|
+
closed: { label: "Closed", bg: "#27272a", color: "#71717a" },
|
|
15397
|
+
wont_fix: { label: "Won't Fix", bg: "#27272a", color: "#71717a" },
|
|
15398
|
+
duplicate: { label: "Duplicate", bg: "#27272a", color: "#71717a" }
|
|
15399
|
+
};
|
|
15400
|
+
var SEVERITY_CONFIG = {
|
|
15401
|
+
critical: { label: "Critical", color: "#ef4444", bg: "#7f1d1d" },
|
|
15402
|
+
high: { label: "High", color: "#f97316", bg: "#431407" },
|
|
15403
|
+
medium: { label: "Medium", color: "#eab308", bg: "#422006" },
|
|
15404
|
+
low: { label: "Low", color: "#71717a", bg: "#27272a" }
|
|
15405
|
+
};
|
|
15406
|
+
function IssueDetailScreen({ nav, issue }) {
|
|
15407
|
+
const statusConfig = STATUS_LABELS[issue.status] || { label: issue.status, bg: "#27272a", color: "#a1a1aa" };
|
|
15408
|
+
const severityConfig = issue.severity ? SEVERITY_CONFIG[issue.severity] : null;
|
|
15409
|
+
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))));
|
|
15410
|
+
}
|
|
15411
|
+
var styles14 = StyleSheet15.create({
|
|
15412
|
+
badgeRow: {
|
|
15413
|
+
flexDirection: "row",
|
|
15414
|
+
gap: 8,
|
|
15415
|
+
flexWrap: "wrap",
|
|
15416
|
+
marginBottom: 12
|
|
15417
|
+
},
|
|
15418
|
+
badge: {
|
|
15419
|
+
paddingHorizontal: 10,
|
|
15420
|
+
paddingVertical: 3,
|
|
15421
|
+
borderRadius: 6
|
|
15422
|
+
},
|
|
15423
|
+
badgeText: {
|
|
15424
|
+
fontSize: 11,
|
|
15425
|
+
fontWeight: "600"
|
|
15426
|
+
},
|
|
15427
|
+
title: {
|
|
15428
|
+
fontSize: 16,
|
|
15429
|
+
fontWeight: "700",
|
|
15430
|
+
color: colors.textPrimary,
|
|
15431
|
+
marginBottom: 8,
|
|
15432
|
+
lineHeight: 21
|
|
15433
|
+
},
|
|
15434
|
+
route: {
|
|
15435
|
+
fontSize: 12,
|
|
15436
|
+
color: colors.textDim,
|
|
15437
|
+
marginBottom: 12
|
|
15438
|
+
},
|
|
15439
|
+
descriptionCard: {
|
|
15440
|
+
backgroundColor: colors.card,
|
|
15441
|
+
borderWidth: 1,
|
|
15442
|
+
borderColor: colors.border,
|
|
15443
|
+
borderRadius: 8,
|
|
15444
|
+
padding: 12,
|
|
15445
|
+
marginBottom: 12
|
|
15446
|
+
},
|
|
15447
|
+
descriptionText: {
|
|
15448
|
+
fontSize: 13,
|
|
15449
|
+
color: colors.textSecondary,
|
|
15450
|
+
lineHeight: 19
|
|
15451
|
+
},
|
|
15452
|
+
verifiedCard: {
|
|
15453
|
+
backgroundColor: "#14532d",
|
|
15454
|
+
borderWidth: 1,
|
|
15455
|
+
borderColor: "#166534",
|
|
15456
|
+
borderRadius: 8,
|
|
15457
|
+
padding: 12,
|
|
15458
|
+
marginBottom: 12
|
|
15459
|
+
},
|
|
15460
|
+
verifiedHeader: {
|
|
15461
|
+
flexDirection: "row",
|
|
15462
|
+
alignItems: "center",
|
|
15463
|
+
gap: 8,
|
|
15464
|
+
marginBottom: 4
|
|
15465
|
+
},
|
|
15466
|
+
verifiedIcon: {
|
|
15467
|
+
fontSize: 16
|
|
15468
|
+
},
|
|
15469
|
+
verifiedTitle: {
|
|
15470
|
+
fontSize: 13,
|
|
15471
|
+
fontWeight: "600",
|
|
15472
|
+
color: "#4ade80"
|
|
15473
|
+
},
|
|
15474
|
+
verifiedBody: {
|
|
15475
|
+
fontSize: 12,
|
|
15476
|
+
color: "#86efac"
|
|
15477
|
+
},
|
|
15478
|
+
originalBugCard: {
|
|
15479
|
+
backgroundColor: "#422006",
|
|
15480
|
+
borderWidth: 1,
|
|
15481
|
+
borderColor: "#854d0e",
|
|
15482
|
+
borderRadius: 8,
|
|
15483
|
+
padding: 12,
|
|
15484
|
+
marginBottom: 12
|
|
15485
|
+
},
|
|
15486
|
+
originalBugHeader: {
|
|
15487
|
+
flexDirection: "row",
|
|
15488
|
+
alignItems: "center",
|
|
15489
|
+
gap: 8,
|
|
15490
|
+
marginBottom: 4
|
|
15491
|
+
},
|
|
15492
|
+
originalBugIcon: {
|
|
15493
|
+
fontSize: 16
|
|
15494
|
+
},
|
|
15495
|
+
originalBugTitle: {
|
|
15496
|
+
fontSize: 13,
|
|
15497
|
+
fontWeight: "600",
|
|
15498
|
+
color: "#fbbf24"
|
|
15499
|
+
},
|
|
15500
|
+
originalBugBody: {
|
|
15501
|
+
fontSize: 12,
|
|
15502
|
+
color: "#fde68a"
|
|
15503
|
+
},
|
|
15504
|
+
screenshotSection: {
|
|
15505
|
+
marginBottom: 12
|
|
15506
|
+
},
|
|
15507
|
+
screenshotLabel: {
|
|
15508
|
+
fontSize: 12,
|
|
15509
|
+
fontWeight: "600",
|
|
15510
|
+
color: colors.textMuted,
|
|
15511
|
+
marginBottom: 8
|
|
15512
|
+
},
|
|
15513
|
+
screenshotRow: {
|
|
15514
|
+
flexDirection: "row",
|
|
15515
|
+
gap: 8
|
|
15516
|
+
},
|
|
15517
|
+
screenshotThumb: {
|
|
15518
|
+
width: 80,
|
|
15519
|
+
height: 60,
|
|
15520
|
+
borderRadius: 6,
|
|
15521
|
+
borderWidth: 1,
|
|
15522
|
+
borderColor: colors.border
|
|
15523
|
+
},
|
|
15524
|
+
metaSection: {
|
|
15525
|
+
borderTopWidth: 1,
|
|
15526
|
+
borderTopColor: colors.border,
|
|
15527
|
+
paddingTop: 12,
|
|
15528
|
+
marginTop: 4
|
|
15529
|
+
},
|
|
15530
|
+
metaText: {
|
|
15531
|
+
fontSize: 12,
|
|
15532
|
+
color: colors.textDim,
|
|
15533
|
+
marginBottom: 4
|
|
15534
|
+
},
|
|
15535
|
+
metaTextSmall: {
|
|
15536
|
+
fontSize: 11,
|
|
15537
|
+
color: colors.textDim
|
|
15538
|
+
}
|
|
15539
|
+
});
|
|
15540
|
+
|
|
15119
15541
|
// src/BugBearButton.tsx
|
|
15120
15542
|
var screenWidth = Dimensions2.get("window").width;
|
|
15121
15543
|
var screenHeight = Dimensions2.get("window").height;
|
|
@@ -15130,7 +15552,7 @@ function BugBearButton({
|
|
|
15130
15552
|
}) {
|
|
15131
15553
|
const { shouldShowWidget, testerInfo, isLoading, unreadCount, assignments } = useBugBear();
|
|
15132
15554
|
const { currentScreen, canGoBack, push, pop, replace, reset } = useNavigation();
|
|
15133
|
-
const [modalVisible, setModalVisible] =
|
|
15555
|
+
const [modalVisible, setModalVisible] = useState11(false);
|
|
15134
15556
|
const getInitialPosition = () => {
|
|
15135
15557
|
const buttonSize = 56;
|
|
15136
15558
|
const margin = 16;
|
|
@@ -15209,6 +15631,10 @@ function BugBearButton({
|
|
|
15209
15631
|
return currentScreen.thread.subject || "Thread";
|
|
15210
15632
|
case "COMPOSE_MESSAGE":
|
|
15211
15633
|
return "New Message";
|
|
15634
|
+
case "ISSUE_LIST":
|
|
15635
|
+
return currentScreen.category === "open" ? "Open Issues" : currentScreen.category === "done" ? "Done" : "Reopened";
|
|
15636
|
+
case "ISSUE_DETAIL":
|
|
15637
|
+
return "Issue Detail";
|
|
15212
15638
|
case "PROFILE":
|
|
15213
15639
|
return "Profile";
|
|
15214
15640
|
default:
|
|
@@ -15242,46 +15668,50 @@ function BugBearButton({
|
|
|
15242
15668
|
const renderScreen = () => {
|
|
15243
15669
|
switch (currentScreen.name) {
|
|
15244
15670
|
case "HOME":
|
|
15245
|
-
return /* @__PURE__ */
|
|
15671
|
+
return /* @__PURE__ */ React16.createElement(HomeScreen, { nav });
|
|
15246
15672
|
case "TEST_DETAIL":
|
|
15247
|
-
return /* @__PURE__ */
|
|
15673
|
+
return /* @__PURE__ */ React16.createElement(TestDetailScreen, { testId: currentScreen.testId, nav });
|
|
15248
15674
|
case "TEST_LIST":
|
|
15249
|
-
return /* @__PURE__ */
|
|
15675
|
+
return /* @__PURE__ */ React16.createElement(TestListScreen, { nav });
|
|
15250
15676
|
case "TEST_FEEDBACK":
|
|
15251
|
-
return /* @__PURE__ */
|
|
15677
|
+
return /* @__PURE__ */ React16.createElement(TestFeedbackScreen, { status: currentScreen.status, assignmentId: currentScreen.assignmentId, nav });
|
|
15252
15678
|
case "REPORT":
|
|
15253
|
-
return /* @__PURE__ */
|
|
15679
|
+
return /* @__PURE__ */ React16.createElement(ReportScreen, { nav, prefill: currentScreen.prefill });
|
|
15254
15680
|
case "REPORT_SUCCESS":
|
|
15255
|
-
return /* @__PURE__ */
|
|
15681
|
+
return /* @__PURE__ */ React16.createElement(ReportSuccessScreen, { nav });
|
|
15256
15682
|
case "MESSAGE_LIST":
|
|
15257
|
-
return /* @__PURE__ */
|
|
15683
|
+
return /* @__PURE__ */ React16.createElement(MessageListScreen, { nav });
|
|
15258
15684
|
case "THREAD_DETAIL":
|
|
15259
|
-
return /* @__PURE__ */
|
|
15685
|
+
return /* @__PURE__ */ React16.createElement(ThreadDetailScreen, { thread: currentScreen.thread, nav });
|
|
15260
15686
|
case "COMPOSE_MESSAGE":
|
|
15261
|
-
return /* @__PURE__ */
|
|
15687
|
+
return /* @__PURE__ */ React16.createElement(ComposeMessageScreen, { nav });
|
|
15688
|
+
case "ISSUE_LIST":
|
|
15689
|
+
return /* @__PURE__ */ React16.createElement(IssueListScreen, { nav, category: currentScreen.category });
|
|
15690
|
+
case "ISSUE_DETAIL":
|
|
15691
|
+
return /* @__PURE__ */ React16.createElement(IssueDetailScreen, { nav, issue: currentScreen.issue });
|
|
15262
15692
|
case "PROFILE":
|
|
15263
|
-
return /* @__PURE__ */
|
|
15693
|
+
return /* @__PURE__ */ React16.createElement(ProfileScreen, { nav });
|
|
15264
15694
|
default:
|
|
15265
|
-
return /* @__PURE__ */
|
|
15695
|
+
return /* @__PURE__ */ React16.createElement(HomeScreen, { nav });
|
|
15266
15696
|
}
|
|
15267
15697
|
};
|
|
15268
|
-
return /* @__PURE__ */
|
|
15698
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
15269
15699
|
Animated.View,
|
|
15270
15700
|
{
|
|
15271
|
-
style: [
|
|
15701
|
+
style: [styles15.fabContainer, { transform: pan.getTranslateTransform() }, buttonStyle],
|
|
15272
15702
|
...panResponder.panHandlers
|
|
15273
15703
|
},
|
|
15274
|
-
/* @__PURE__ */
|
|
15275
|
-
|
|
15704
|
+
/* @__PURE__ */ React16.createElement(
|
|
15705
|
+
TouchableOpacity14,
|
|
15276
15706
|
{
|
|
15277
|
-
style:
|
|
15707
|
+
style: styles15.fab,
|
|
15278
15708
|
onPress: () => setModalVisible(true),
|
|
15279
15709
|
activeOpacity: draggable ? 1 : 0.7
|
|
15280
15710
|
},
|
|
15281
|
-
/* @__PURE__ */
|
|
15282
|
-
badgeCount > 0 && /* @__PURE__ */
|
|
15711
|
+
/* @__PURE__ */ React16.createElement(Image4, { source: { uri: BUGBEAR_LOGO_BASE64 }, style: styles15.fabIcon }),
|
|
15712
|
+
badgeCount > 0 && /* @__PURE__ */ React16.createElement(View15, { style: styles15.badge }, /* @__PURE__ */ React16.createElement(Text15, { style: styles15.badgeText }, badgeCount > 9 ? "9+" : badgeCount))
|
|
15283
15713
|
)
|
|
15284
|
-
), /* @__PURE__ */
|
|
15714
|
+
), /* @__PURE__ */ React16.createElement(
|
|
15285
15715
|
Modal2,
|
|
15286
15716
|
{
|
|
15287
15717
|
visible: modalVisible,
|
|
@@ -15289,26 +15719,26 @@ function BugBearButton({
|
|
|
15289
15719
|
transparent: true,
|
|
15290
15720
|
onRequestClose: handleClose
|
|
15291
15721
|
},
|
|
15292
|
-
/* @__PURE__ */
|
|
15722
|
+
/* @__PURE__ */ React16.createElement(
|
|
15293
15723
|
KeyboardAvoidingView,
|
|
15294
15724
|
{
|
|
15295
15725
|
behavior: Platform4.OS === "ios" ? "padding" : "height",
|
|
15296
|
-
style:
|
|
15726
|
+
style: styles15.modalOverlay
|
|
15297
15727
|
},
|
|
15298
|
-
/* @__PURE__ */
|
|
15728
|
+
/* @__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(
|
|
15299
15729
|
ScrollView3,
|
|
15300
15730
|
{
|
|
15301
|
-
style:
|
|
15302
|
-
contentContainerStyle:
|
|
15731
|
+
style: styles15.content,
|
|
15732
|
+
contentContainerStyle: styles15.contentContainer,
|
|
15303
15733
|
keyboardShouldPersistTaps: "handled",
|
|
15304
15734
|
showsVerticalScrollIndicator: false
|
|
15305
15735
|
},
|
|
15306
|
-
isLoading ? /* @__PURE__ */
|
|
15736
|
+
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()
|
|
15307
15737
|
))
|
|
15308
15738
|
)
|
|
15309
15739
|
));
|
|
15310
15740
|
}
|
|
15311
|
-
var
|
|
15741
|
+
var styles15 = StyleSheet16.create({
|
|
15312
15742
|
// FAB
|
|
15313
15743
|
fabContainer: {
|
|
15314
15744
|
position: "absolute",
|
|
@@ -15450,8 +15880,8 @@ var styles13 = StyleSheet14.create({
|
|
|
15450
15880
|
});
|
|
15451
15881
|
|
|
15452
15882
|
// src/BugBearErrorBoundary.tsx
|
|
15453
|
-
import
|
|
15454
|
-
import { View as
|
|
15883
|
+
import React17, { Component } from "react";
|
|
15884
|
+
import { View as View16, Text as Text16, TouchableOpacity as TouchableOpacity15, StyleSheet as StyleSheet17 } from "react-native";
|
|
15455
15885
|
var BugBearErrorBoundary = class extends Component {
|
|
15456
15886
|
constructor(props) {
|
|
15457
15887
|
super(props);
|
|
@@ -15496,7 +15926,7 @@ var BugBearErrorBoundary = class extends Component {
|
|
|
15496
15926
|
if (fallback) {
|
|
15497
15927
|
return fallback;
|
|
15498
15928
|
}
|
|
15499
|
-
return /* @__PURE__ */
|
|
15929
|
+
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"));
|
|
15500
15930
|
}
|
|
15501
15931
|
return children;
|
|
15502
15932
|
}
|
|
@@ -15507,7 +15937,7 @@ function useErrorContext() {
|
|
|
15507
15937
|
getEnhancedContext: () => contextCapture.getEnhancedContext()
|
|
15508
15938
|
};
|
|
15509
15939
|
}
|
|
15510
|
-
var
|
|
15940
|
+
var styles16 = StyleSheet17.create({
|
|
15511
15941
|
container: {
|
|
15512
15942
|
padding: 20,
|
|
15513
15943
|
margin: 20,
|