react-native-inapp-inspector 1.1.24 โ 1.1.25
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/commonjs/components/AnalyticsEventCard.js +94 -88
- package/dist/commonjs/components/ConsoleLogCard.js +49 -25
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1002 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +637 -10
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +826 -406
- package/dist/commonjs/components/Inspector/InspectorContext.js +6 -1
- package/dist/commonjs/components/Inspector/InspectorHeader.js +13 -5
- package/dist/commonjs/components/Inspector/LogDetail.js +223 -111
- package/dist/commonjs/components/Inspector/MainScreen.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkDetail.js +131 -81
- package/dist/commonjs/components/Inspector/PerformanceTab.js +20 -10
- package/dist/commonjs/components/NetworkIcons.d.ts +14 -0
- package/dist/commonjs/components/NetworkIcons.js +93 -1
- package/dist/commonjs/components/SegmentedTabs.js +31 -22
- package/dist/commonjs/components/TreeNode.js +13 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +5 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +497 -126
- package/dist/commonjs/customHooks/consoleLogger.js +83 -45
- package/dist/commonjs/customHooks/networkLogger.js +10 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +8 -0
- package/dist/commonjs/customHooks/performanceTracker.js +44 -3
- package/dist/commonjs/decorators/index.d.ts +49 -0
- package/dist/commonjs/decorators/index.js +142 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +174 -0
- package/dist/commonjs/helpers/index.d.ts +7 -4
- package/dist/commonjs/helpers/index.js +102 -64
- package/dist/commonjs/i18n/locales/en.json +51 -4
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.js +216 -8
- package/dist/commonjs/styles/index.d.ts +4 -1
- package/dist/commonjs/styles/index.js +22 -19
- package/dist/commonjs/types/enums.d.ts +115 -9
- package/dist/commonjs/types/enums.js +103 -2
- package/dist/commonjs/types/interfaces.d.ts +19 -0
- package/dist/esm/components/AnalyticsEventCard.js +95 -89
- package/dist/esm/components/ConsoleLogCard.js +49 -25
- package/dist/esm/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +964 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +639 -12
- package/dist/esm/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +827 -407
- package/dist/esm/components/Inspector/InspectorContext.js +1 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +14 -6
- package/dist/esm/components/Inspector/LogDetail.js +223 -111
- package/dist/esm/components/Inspector/MainScreen.js +2 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +132 -49
- package/dist/esm/components/Inspector/PerformanceTab.js +20 -10
- package/dist/esm/components/NetworkIcons.d.ts +14 -0
- package/dist/esm/components/NetworkIcons.js +78 -0
- package/dist/esm/components/SegmentedTabs.js +31 -22
- package/dist/esm/components/TreeNode.js +13 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +5 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +493 -125
- package/dist/esm/customHooks/consoleLogger.js +83 -45
- package/dist/esm/customHooks/networkLogger.js +10 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +8 -0
- package/dist/esm/customHooks/performanceTracker.js +38 -1
- package/dist/esm/decorators/index.d.ts +49 -0
- package/dist/esm/decorators/index.js +137 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.js +169 -0
- package/dist/esm/helpers/index.d.ts +7 -4
- package/dist/esm/helpers/index.js +100 -63
- package/dist/esm/i18n/locales/en.json +51 -4
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +190 -8
- package/dist/esm/styles/index.d.ts +4 -1
- package/dist/esm/styles/index.js +22 -19
- package/dist/esm/types/enums.d.ts +115 -9
- package/dist/esm/types/enums.js +102 -3
- package/dist/esm/types/interfaces.d.ts +19 -0
- package/package.json +1 -1
|
@@ -53,6 +53,8 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
53
53
|
const userPropCount = event.userProperties
|
|
54
54
|
? Object.keys(event.userProperties).length
|
|
55
55
|
: 0;
|
|
56
|
+
const catKey = (0, helpers_1.getEventCategory)(event.name);
|
|
57
|
+
const tagColors = (0, helpers_1.getCategoryColors)(catKey);
|
|
56
58
|
// Flash animation for newly logged events
|
|
57
59
|
const flashOpacity = (0, react_1.useRef)(new react_native_1.Animated.Value(isNew ? 1 : 0)).current;
|
|
58
60
|
(0, react_1.useEffect)(() => {
|
|
@@ -65,20 +67,29 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
65
67
|
}
|
|
66
68
|
}, [isNew]);
|
|
67
69
|
const showGap = msSincePrev != null && msSincePrev >= 2000;
|
|
70
|
+
const categoryLabel = catKey === 'page_view'
|
|
71
|
+
? t('analytics.pageViewCategory')
|
|
72
|
+
: catKey === 'ecommerce'
|
|
73
|
+
? t('analytics.ecommerceCategory')
|
|
74
|
+
: catKey === 'system'
|
|
75
|
+
? t('analytics.systemCategory')
|
|
76
|
+
: t('analytics.customCategory');
|
|
68
77
|
return (<react_native_1.View style={cardStyles.container}>
|
|
69
78
|
{/* โโ Gap Indicator โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */}
|
|
70
79
|
{showGap && (<react_native_1.View style={cardStyles.gapContainer}>
|
|
80
|
+
<react_native_1.View style={cardStyles.gapLine}/>
|
|
71
81
|
<react_native_1.Text style={[cardStyles.gapText, { color: AppColors_1.AppColors.grayTextWeak }]}>
|
|
72
|
-
{(0, helpers_1.formatGap)(msSincePrev)}
|
|
82
|
+
+{(0, helpers_1.formatGap)(msSincePrev)}
|
|
73
83
|
</react_native_1.Text>
|
|
84
|
+
<react_native_1.View style={cardStyles.gapLine}/>
|
|
74
85
|
</react_native_1.View>)}
|
|
75
86
|
|
|
76
87
|
{/* โโ Main Card โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */}
|
|
77
88
|
<TouchableScale_1.default onPress={onPress} style={[
|
|
78
89
|
cardStyles.modernCard,
|
|
79
90
|
{
|
|
80
|
-
|
|
81
|
-
|
|
91
|
+
borderLeftWidth: 3.5,
|
|
92
|
+
borderLeftColor: tagColors.text,
|
|
82
93
|
},
|
|
83
94
|
]}>
|
|
84
95
|
<react_native_1.Animated.View style={[
|
|
@@ -92,37 +103,32 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
92
103
|
},
|
|
93
104
|
]}/>
|
|
94
105
|
|
|
95
|
-
{/* Top Row: Event Name & Timestamp */}
|
|
106
|
+
{/* Top Row: Icon Badge, Event Name, Category Badge & Timestamp */}
|
|
96
107
|
<react_native_1.View style={cardStyles.cardHeader}>
|
|
97
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap:
|
|
108
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 7, flex: 1 }}>
|
|
109
|
+
{/* Category Icon Badge */}
|
|
98
110
|
<react_native_1.View style={[
|
|
99
|
-
cardStyles.
|
|
100
|
-
{ backgroundColor:
|
|
111
|
+
cardStyles.iconBadge,
|
|
112
|
+
{ backgroundColor: tagColors.bg, borderColor: tagColors.border },
|
|
101
113
|
]}>
|
|
102
|
-
<
|
|
114
|
+
{catKey === 'ecommerce' ? (<NetworkIcons_1.CartIcon color={tagColors.text} size={12}/>) : catKey === 'page_view' ? (<NetworkIcons_1.GlobeIcon color={tagColors.text} size={12}/>) : catKey === 'system' ? (<NetworkIcons_1.BoltIcon color={tagColors.text} size={12}/>) : (<NetworkIcons_1.SparkleIcon color={tagColors.text} size={12}/>)}
|
|
103
115
|
</react_native_1.View>
|
|
104
116
|
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{ backgroundColor: tagColors.bg, borderColor: tagColors.border },
|
|
118
|
-
]}>
|
|
119
|
-
<react_native_1.Text style={[cardStyles.categoryText, { color: tagColors.text }]}>
|
|
120
|
-
{categoryLabel}
|
|
121
|
-
</react_native_1.Text>
|
|
122
|
-
</react_native_1.View>);
|
|
123
|
-
})()}
|
|
117
|
+
{/* Event Name */}
|
|
118
|
+
<HighlightText_1.default text={event.name} search={searchStr} style={[cardStyles.eventName, { color: AppColors_1.AppColors.primaryBlack }]} highlightStyle={cardStyles.highlight} numberOfLines={1}/>
|
|
119
|
+
|
|
120
|
+
{/* Category Pill Tag */}
|
|
121
|
+
<react_native_1.View style={[
|
|
122
|
+
cardStyles.categoryBadge,
|
|
123
|
+
{ backgroundColor: tagColors.bg, borderColor: tagColors.border },
|
|
124
|
+
]}>
|
|
125
|
+
<react_native_1.Text style={[cardStyles.categoryText, { color: tagColors.text }]}>
|
|
126
|
+
{categoryLabel}
|
|
127
|
+
</react_native_1.Text>
|
|
128
|
+
</react_native_1.View>
|
|
124
129
|
|
|
125
|
-
{
|
|
130
|
+
{/* Duplicate Multiplier */}
|
|
131
|
+
{event.count !== undefined && event.count > 0 ? (<react_native_1.View style={[
|
|
126
132
|
cardStyles.duplicateBadge,
|
|
127
133
|
event.count === 1 && {
|
|
128
134
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
@@ -134,16 +140,20 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
134
140
|
event.count === 1 && { color: AppColors_1.AppColors.grayTextStrong },
|
|
135
141
|
]}>
|
|
136
142
|
{event.count}ร
|
|
137
|
-
{event.count > 1 ? ` ${t('analytics.duplicate')}` : ''}
|
|
138
143
|
</react_native_1.Text>
|
|
139
144
|
</react_native_1.View>) : null}
|
|
140
145
|
</react_native_1.View>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
|
|
147
|
+
{/* Timestamp */}
|
|
148
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 3 }}>
|
|
149
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
|
|
150
|
+
<react_native_1.Text style={[cardStyles.timestamp, { color: AppColors_1.AppColors.grayTextWeak }]}>
|
|
151
|
+
{(0, helpers_1.formatTime)(event.timestamp)}
|
|
152
|
+
</react_native_1.Text>
|
|
153
|
+
</react_native_1.View>
|
|
144
154
|
</react_native_1.View>
|
|
145
155
|
|
|
146
|
-
{/* Bottom Row: Metadata Chips
|
|
156
|
+
{/* Bottom Row: Metadata Chips (Screen, Params, Value) */}
|
|
147
157
|
<react_native_1.View style={cardStyles.cardBody}>
|
|
148
158
|
<react_native_1.View style={cardStyles.chipsRow}>
|
|
149
159
|
{(() => {
|
|
@@ -160,12 +170,12 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
160
170
|
return (<react_native_1.View style={[
|
|
161
171
|
cardStyles.chip,
|
|
162
172
|
{
|
|
163
|
-
backgroundColor: AppColors_1.AppColors.
|
|
164
|
-
borderColor: AppColors_1.AppColors.
|
|
173
|
+
backgroundColor: `${AppColors_1.AppColors.amber500}12`,
|
|
174
|
+
borderColor: `${AppColors_1.AppColors.amber500}2E`,
|
|
165
175
|
},
|
|
166
176
|
]}>
|
|
167
|
-
<react_native_1.View style={[cardStyles.screenDot, { backgroundColor:
|
|
168
|
-
<react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.
|
|
177
|
+
<react_native_1.View style={[cardStyles.screenDot, { backgroundColor: AppColors_1.AppColors.amber500 }]}/>
|
|
178
|
+
<react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.amber700, fontFamily: AppFonts_1.AppFonts.interBold }]} numberOfLines={1}>
|
|
169
179
|
{screenNameStr}
|
|
170
180
|
</react_native_1.Text>
|
|
171
181
|
</react_native_1.View>);
|
|
@@ -186,11 +196,11 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
186
196
|
{userPropCount > 0 && (<react_native_1.View style={[
|
|
187
197
|
cardStyles.chip,
|
|
188
198
|
{
|
|
189
|
-
backgroundColor: AppColors_1.AppColors.
|
|
190
|
-
borderColor: AppColors_1.AppColors.
|
|
199
|
+
backgroundColor: `${AppColors_1.AppColors.brandPurple}10`,
|
|
200
|
+
borderColor: `${AppColors_1.AppColors.brandPurple}25`,
|
|
191
201
|
},
|
|
192
202
|
]}>
|
|
193
|
-
<react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.
|
|
203
|
+
<react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.brandPurple, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
194
204
|
โ
{userPropCount} {t('analytics.props')}
|
|
195
205
|
</react_native_1.Text>
|
|
196
206
|
</react_native_1.View>)}
|
|
@@ -205,7 +215,7 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
205
215
|
borderColor: AppColors_1.AppColors.amberBorder,
|
|
206
216
|
},
|
|
207
217
|
]}>
|
|
208
|
-
<NetworkIcons_1.CartIcon color={AppColors_1.AppColors.amber700} size={
|
|
218
|
+
<NetworkIcons_1.CartIcon color={AppColors_1.AppColors.amber700} size={11}/>
|
|
209
219
|
<react_native_1.Text style={[
|
|
210
220
|
cardStyles.chipText,
|
|
211
221
|
{
|
|
@@ -227,18 +237,18 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
227
237
|
const val = event.params?.value ?? event.params?.price;
|
|
228
238
|
const currency = event.params?.currency ?? '';
|
|
229
239
|
const isPrimitive = typeof val === 'string' || typeof val === 'number';
|
|
230
|
-
if (isPrimitive) {
|
|
231
|
-
const currencyStr = typeof currency === 'string'
|
|
232
|
-
?
|
|
240
|
+
if (val != null && isPrimitive && String(val).trim() !== '') {
|
|
241
|
+
const currencyStr = typeof currency === 'string' && currency.trim() !== ''
|
|
242
|
+
? currency.toUpperCase()
|
|
233
243
|
: '';
|
|
234
244
|
return (<react_native_1.View style={[
|
|
235
245
|
cardStyles.chip,
|
|
236
246
|
{
|
|
237
|
-
backgroundColor: AppColors_1.AppColors.
|
|
238
|
-
borderColor: AppColors_1.AppColors.
|
|
247
|
+
backgroundColor: `${AppColors_1.AppColors.emerald500}15`,
|
|
248
|
+
borderColor: `${AppColors_1.AppColors.emerald500}35`,
|
|
239
249
|
},
|
|
240
250
|
]}>
|
|
241
|
-
<NetworkIcons_1.MoneyIcon color={AppColors_1.AppColors.emerald600} size={
|
|
251
|
+
<NetworkIcons_1.MoneyIcon color={AppColors_1.AppColors.emerald600} size={11}/>
|
|
242
252
|
<react_native_1.Text style={[
|
|
243
253
|
cardStyles.chipText,
|
|
244
254
|
{
|
|
@@ -260,52 +270,63 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
260
270
|
// โโโ Styles โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
261
271
|
const cardStyles = react_native_1.StyleSheet.create({
|
|
262
272
|
container: {
|
|
263
|
-
paddingHorizontal:
|
|
273
|
+
paddingHorizontal: 10,
|
|
264
274
|
paddingVertical: 3,
|
|
265
275
|
},
|
|
266
276
|
gapContainer: {
|
|
277
|
+
flexDirection: 'row',
|
|
267
278
|
alignItems: 'center',
|
|
268
|
-
|
|
279
|
+
justifyContent: 'center',
|
|
280
|
+
marginVertical: 6,
|
|
281
|
+
gap: 8,
|
|
282
|
+
},
|
|
283
|
+
gapLine: {
|
|
284
|
+
flex: 1,
|
|
285
|
+
height: 1,
|
|
286
|
+
backgroundColor: `${AppColors_1.AppColors.dividerColor}`,
|
|
269
287
|
},
|
|
270
288
|
gapText: {
|
|
271
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
272
|
-
fontSize:
|
|
289
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
290
|
+
fontSize: 9.5,
|
|
273
291
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
274
292
|
letterSpacing: 0.5,
|
|
275
293
|
},
|
|
276
294
|
modernCard: {
|
|
277
295
|
backgroundColor: AppColors_1.AppColors.white,
|
|
278
|
-
borderRadius:
|
|
296
|
+
borderRadius: 10,
|
|
279
297
|
borderWidth: 1,
|
|
280
298
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
281
|
-
padding:
|
|
299
|
+
padding: 10,
|
|
282
300
|
shadowColor: AppColors_1.AppColors.black,
|
|
283
301
|
shadowOpacity: 0.03,
|
|
284
302
|
shadowRadius: 3,
|
|
285
303
|
shadowOffset: { width: 0, height: 1 },
|
|
286
304
|
elevation: 1,
|
|
287
305
|
overflow: 'hidden',
|
|
306
|
+
gap: 8,
|
|
288
307
|
},
|
|
289
308
|
cardHeader: {
|
|
290
309
|
flexDirection: 'row',
|
|
291
310
|
justifyContent: 'space-between',
|
|
292
311
|
alignItems: 'center',
|
|
293
|
-
marginBottom: 6,
|
|
294
312
|
},
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
313
|
+
iconBadge: {
|
|
314
|
+
width: 22,
|
|
315
|
+
height: 22,
|
|
298
316
|
borderRadius: 6,
|
|
299
317
|
borderWidth: 1,
|
|
318
|
+
alignItems: 'center',
|
|
319
|
+
justifyContent: 'center',
|
|
300
320
|
},
|
|
301
321
|
eventName: {
|
|
302
322
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
303
|
-
fontSize:
|
|
304
|
-
letterSpacing: 0.
|
|
323
|
+
fontSize: 13,
|
|
324
|
+
letterSpacing: 0.1,
|
|
325
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
305
326
|
},
|
|
306
327
|
timestamp: {
|
|
307
328
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
308
|
-
fontSize:
|
|
329
|
+
fontSize: 10,
|
|
309
330
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
310
331
|
},
|
|
311
332
|
highlight: {
|
|
@@ -315,25 +336,24 @@ const cardStyles = react_native_1.StyleSheet.create({
|
|
|
315
336
|
},
|
|
316
337
|
cardBody: {
|
|
317
338
|
flexDirection: 'row',
|
|
318
|
-
alignItems: '
|
|
339
|
+
alignItems: 'center',
|
|
319
340
|
justifyContent: 'space-between',
|
|
320
341
|
},
|
|
321
342
|
chipsRow: {
|
|
322
343
|
flexDirection: 'row',
|
|
323
344
|
alignItems: 'center',
|
|
324
345
|
flexWrap: 'wrap',
|
|
325
|
-
gap:
|
|
346
|
+
gap: 6,
|
|
326
347
|
flex: 1,
|
|
327
348
|
},
|
|
328
349
|
chip: {
|
|
329
350
|
flexDirection: 'row',
|
|
330
351
|
alignItems: 'center',
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
borderRadius: 4,
|
|
352
|
+
paddingHorizontal: 6,
|
|
353
|
+
paddingVertical: 2.5,
|
|
354
|
+
borderRadius: 5,
|
|
335
355
|
borderWidth: 1,
|
|
336
|
-
|
|
356
|
+
gap: 3.5,
|
|
337
357
|
},
|
|
338
358
|
chipText: {
|
|
339
359
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
@@ -341,17 +361,16 @@ const cardStyles = react_native_1.StyleSheet.create({
|
|
|
341
361
|
color: AppColors_1.AppColors.grayText,
|
|
342
362
|
},
|
|
343
363
|
screenDot: {
|
|
344
|
-
width:
|
|
345
|
-
height:
|
|
346
|
-
borderRadius:
|
|
347
|
-
marginRight: 4,
|
|
364
|
+
width: 5,
|
|
365
|
+
height: 5,
|
|
366
|
+
borderRadius: 2.5,
|
|
348
367
|
},
|
|
349
368
|
duplicateBadge: {
|
|
350
369
|
backgroundColor: AppColors_1.AppColors.roseBg,
|
|
351
370
|
borderColor: AppColors_1.AppColors.roseBorder,
|
|
352
371
|
borderWidth: 1,
|
|
353
372
|
paddingHorizontal: 5,
|
|
354
|
-
paddingVertical:
|
|
373
|
+
paddingVertical: 1.5,
|
|
355
374
|
borderRadius: 4,
|
|
356
375
|
},
|
|
357
376
|
duplicateText: {
|
|
@@ -359,31 +378,18 @@ const cardStyles = react_native_1.StyleSheet.create({
|
|
|
359
378
|
fontSize: 9,
|
|
360
379
|
color: AppColors_1.AppColors.rose600,
|
|
361
380
|
textTransform: 'uppercase',
|
|
362
|
-
letterSpacing: 0.5,
|
|
363
381
|
},
|
|
364
382
|
categoryBadge: {
|
|
365
383
|
borderWidth: 1,
|
|
366
384
|
paddingHorizontal: 5,
|
|
367
|
-
paddingVertical:
|
|
385
|
+
paddingVertical: 1.5,
|
|
368
386
|
borderRadius: 4,
|
|
369
387
|
},
|
|
370
388
|
categoryText: {
|
|
371
389
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
372
|
-
fontSize:
|
|
390
|
+
fontSize: 8.5,
|
|
373
391
|
textTransform: 'uppercase',
|
|
374
|
-
letterSpacing: 0.
|
|
375
|
-
},
|
|
376
|
-
miniGraphWrapper: {
|
|
377
|
-
flexDirection: 'row',
|
|
378
|
-
alignItems: 'flex-end',
|
|
379
|
-
height: 18,
|
|
380
|
-
gap: 2,
|
|
381
|
-
marginLeft: 12,
|
|
382
|
-
},
|
|
383
|
-
miniGraphBar: {
|
|
384
|
-
width: 4,
|
|
385
|
-
borderRadius: 2,
|
|
386
|
-
opacity: 0.7,
|
|
392
|
+
letterSpacing: 0.4,
|
|
387
393
|
},
|
|
388
394
|
});
|
|
389
395
|
exports.default = AnalyticsEventCard;
|
|
@@ -23,36 +23,57 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
23
23
|
const fullPrefix = match[1];
|
|
24
24
|
const remainingText = message.substring(fullPrefix.length);
|
|
25
25
|
const tags = fullPrefix.match(/\[[^\]]+\]/g) || [];
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
const getTagDecorator = (tag) => {
|
|
27
|
+
const clean = tag.replace(/[\[\]]/g, '').trim().toUpperCase();
|
|
28
|
+
if (clean === 'AXIOS') {
|
|
29
|
+
return { color: '#059669', icon: 'โก', label: 'AXIOS' };
|
|
30
|
+
}
|
|
31
|
+
if (clean === 'API' || clean === 'FETCH' || clean === 'HTTP' || clean === 'NETWORK') {
|
|
32
|
+
return { color: '#0284C7', icon: '๐', label: clean };
|
|
33
|
+
}
|
|
34
|
+
if (clean === 'SAMPLE' || clean === 'BATCH') {
|
|
35
|
+
return { color: '#4F46E5', icon: '๐ฒ', label: clean };
|
|
36
|
+
}
|
|
37
|
+
if (clean === 'REDUX' || clean === 'STORE' || clean === 'STATE') {
|
|
38
|
+
return { color: '#7C3AED', icon: 'โ๏ธ', label: clean };
|
|
39
|
+
}
|
|
40
|
+
if (clean === 'ANALYTICS' || clean === 'FIREBASE' || clean === 'GA4' || clean === 'GA') {
|
|
41
|
+
return { color: '#0D9488', icon: '๐', label: clean };
|
|
42
|
+
}
|
|
43
|
+
if (clean === 'AUTH' || clean === 'TOKEN' || clean === 'SESSION') {
|
|
44
|
+
return { color: '#D97706', icon: '๐', label: clean };
|
|
45
|
+
}
|
|
46
|
+
if (clean === 'APP') {
|
|
47
|
+
return { color: '#4F46E5', icon: '๐ฑ', label: 'APP' };
|
|
48
|
+
}
|
|
49
|
+
if (clean === 'TEST') {
|
|
50
|
+
return { color: '#10B981', icon: '๐งช', label: 'TEST' };
|
|
51
|
+
}
|
|
52
|
+
if (clean === 'WARN' || clean === 'WARNING') {
|
|
53
|
+
return { color: '#D97706', icon: 'โ ๏ธ', label: 'WARN' };
|
|
54
|
+
}
|
|
55
|
+
if (clean === 'ERROR' || clean === 'CRASH' || clean === 'BUG') {
|
|
56
|
+
return { color: '#DC2626', icon: '๐ฅ', label: 'ERROR' };
|
|
57
|
+
}
|
|
58
|
+
if (clean === 'PERF' || clean === 'RENDER') {
|
|
59
|
+
return { color: '#8B5CF6', icon: 'โก', label: clean };
|
|
60
|
+
}
|
|
61
|
+
return { color: AppColors_1.AppColors.slate600, icon: '๐ท๏ธ', label: clean };
|
|
42
62
|
};
|
|
43
63
|
return (<react_native_1.View style={{ flexDirection: 'column', gap: 6 }}>
|
|
44
|
-
<react_native_1.View style={{ flexDirection: 'row', flexWrap: 'wrap', gap:
|
|
64
|
+
<react_native_1.View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 5 }}>
|
|
45
65
|
{tags.map((tag, i) => {
|
|
46
|
-
const
|
|
66
|
+
const dec = getTagDecorator(tag);
|
|
47
67
|
return (<react_native_1.View key={i} style={[
|
|
48
68
|
styles.prefixTag,
|
|
49
69
|
{
|
|
50
|
-
backgroundColor: `${color}15`,
|
|
51
|
-
borderColor: `${color}35`,
|
|
70
|
+
backgroundColor: `${dec.color}15`,
|
|
71
|
+
borderColor: `${dec.color}35`,
|
|
52
72
|
},
|
|
53
73
|
]}>
|
|
54
|
-
<react_native_1.Text style={
|
|
55
|
-
|
|
74
|
+
<react_native_1.Text style={{ fontSize: 9.5 }}>{dec.icon}</react_native_1.Text>
|
|
75
|
+
<react_native_1.Text style={[styles.prefixTagText, { color: dec.color }]}>
|
|
76
|
+
{dec.label}
|
|
56
77
|
</react_native_1.Text>
|
|
57
78
|
</react_native_1.View>);
|
|
58
79
|
})}
|
|
@@ -416,9 +437,12 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
416
437
|
fontSize: 9,
|
|
417
438
|
},
|
|
418
439
|
prefixTag: {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
440
|
+
flexDirection: 'row',
|
|
441
|
+
alignItems: 'center',
|
|
442
|
+
gap: 3.5,
|
|
443
|
+
paddingHorizontal: 6.5,
|
|
444
|
+
paddingVertical: 2,
|
|
445
|
+
borderRadius: 5,
|
|
422
446
|
borderWidth: 1,
|
|
423
447
|
},
|
|
424
448
|
prefixTagText: {
|