react-native-inapp-inspector 1.1.11 → 1.1.12

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.
@@ -38,298 +38,83 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  const react_1 = __importStar(require("react"));
40
40
  const react_native_1 = require("react-native");
41
- const react_native_linear_gradient_1 = __importDefault(require("react-native-linear-gradient"));
42
41
  // Components
43
42
  const CopyButton_1 = __importDefault(require("./CopyButton"));
44
43
  const JsonViewer_1 = __importDefault(require("./JsonViewer"));
45
- // Icons
46
- const NetworkIcons_1 = require("./NetworkIcons");
44
+ const TouchableScale_1 = __importDefault(require("./TouchableScale"));
47
45
  // Utils
48
46
  const AppFonts_1 = require("../styles/AppFonts");
49
47
  // Stylesheet
50
48
  const AppColors_1 = require("../styles/AppColors");
51
- const styles_1 = __importDefault(require("../styles"));
52
- const AnalyticsEventCard_1 = require("./AnalyticsEventCard");
53
- // Helpers
54
- const helpers_1 = require("../helpers");
55
- // Sub Components
56
- const ParamRowItem = ({ paramKey, value, }) => {
57
- const isObject = typeof value === 'object' && value !== null;
58
- const valStr = isObject ? JSON.stringify(value, null, 2) : String(value);
59
- const [expanded, setExpanded] = (0, react_1.useState)(false);
60
- const isLong = valStr.length > 80 || valStr.includes('\n') || isObject;
61
- return (<react_native_1.View style={[detailStyles.dataBox, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
62
- <react_native_1.View style={detailStyles.dataBoxHeader}>
63
- <react_native_1.Text style={[detailStyles.dataBoxKey, { color: AppColors_1.AppColors.primaryBlack }]} numberOfLines={1}>
64
- {paramKey}
65
- </react_native_1.Text>
66
- <CopyButton_1.default value={valStr} label={paramKey}/>
67
- </react_native_1.View>
68
- {expanded && isObject ? (<react_native_1.View style={[detailStyles.jsonBlock, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
69
- <JsonViewer_1.default data={value}/>
70
- </react_native_1.View>) : (<react_native_1.Text style={[detailStyles.dataBoxVal, { color: AppColors_1.AppColors.primaryBlack }]} selectable numberOfLines={expanded ? undefined : 2}>
71
- {valStr}
72
- </react_native_1.Text>)}
73
- {isLong && (<react_native_1.Pressable onPress={() => setExpanded(!expanded)} style={[detailStyles.showMoreBtn, { backgroundColor: AppColors_1.AppColors.grayBackground }]}>
74
- <react_native_1.Text style={[detailStyles.showMoreText, { color: AppColors_1.AppColors.grayTextStrong }]}>
75
- {expanded ? 'Show Less' : 'Show More'}
76
- </react_native_1.Text>
77
- </react_native_1.Pressable>)}
78
- </react_native_1.View>);
79
- };
80
- const ParamTable = ({ data, emptyLabel, }) => {
81
- const entries = Object.keys(data).map(key => ({
82
- key,
83
- value: data[key],
84
- }));
85
- if (entries.length === 0) {
86
- return (<react_native_1.View style={[detailStyles.emptyParams, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
87
- <react_native_1.Text style={[detailStyles.emptyParamsText, { color: AppColors_1.AppColors.grayTextWeak }]}>
88
- {emptyLabel ?? 'No parameters'}
89
- </react_native_1.Text>
90
- </react_native_1.View>);
91
- }
92
- return (<react_native_1.View style={detailStyles.paramList}>
93
- {entries.map(({ key, value }) => (<ParamRowItem key={key} paramKey={key} value={value}/>))}
94
- </react_native_1.View>);
95
- };
96
- const SectionCard = ({ title, children, count, accentColor = AppColors_1.AppColors.purple, }) => {
97
- if (!title) {
98
- return (<react_native_1.View style={{ paddingHorizontal: 16, paddingTop: 12, paddingBottom: 20 }}>
99
- {children}
100
- </react_native_1.View>);
101
- }
102
- return (<react_native_1.View style={[detailStyles.sectionCard, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
103
- <react_native_1.View style={detailStyles.sectionHeader}>
104
- <react_native_1.View style={detailStyles.sectionTitleRow}>
105
- <react_native_1.View style={[
106
- detailStyles.sectionAccentDot,
107
- { backgroundColor: accentColor },
108
- ]}/>
109
- <react_native_1.Text style={[detailStyles.sectionTitle, { color: AppColors_1.AppColors.primaryBlack }]}>{title.toUpperCase()}</react_native_1.Text>
110
- </react_native_1.View>
111
- {typeof count === 'number' && (<react_native_1.View style={[
112
- detailStyles.countBadge,
113
- {
114
- borderColor: `${accentColor}55`,
115
- backgroundColor: `${accentColor}12`,
116
- },
117
- ]}>
118
- <react_native_1.Text style={[detailStyles.countBadgeText, { color: accentColor }]}>
119
- {count}
120
- </react_native_1.Text>
121
- </react_native_1.View>)}
122
- </react_native_1.View>
123
- <react_native_1.View style={{ paddingHorizontal: 14, paddingBottom: 14 }}>{children}</react_native_1.View>
124
- </react_native_1.View>);
125
- };
126
49
  const AnalyticsDetail = ({ event, }) => {
127
- const [search, setSearch] = (0, react_1.useState)('');
128
- const [activeTab, setActiveTab] = (0, react_1.useState)('unformatted');
129
- const SOURCE_COLORS = {
130
- firebase: '#E07B1A',
131
- manual: AppColors_1.AppColors.purple,
132
- };
50
+ const [expandDepth, setExpandDepth] = (0, react_1.useState)(1);
51
+ const [treeKey, setTreeKey] = (0, react_1.useState)(0);
133
52
  const params = event.params ?? {};
134
53
  const userProperties = event.userProperties ?? {};
135
- const eventColor = (0, AnalyticsEventCard_1.getEventColor)(event.name);
136
- const sourceColor = SOURCE_COLORS[event.source] ?? AppColors_1.AppColors.purple;
137
- const paramCount = Object.keys(params).length;
138
54
  const upCount = Object.keys(userProperties).length;
139
- const topMetrics = [];
140
- if (event.screenName) {
141
- topMetrics.push({
142
- key: 'Screen',
143
- value: event.screenName,
144
- color: AppColors_1.AppColors.skyBlue,
145
- });
146
- }
147
- if (event.userId) {
148
- topMetrics.push({
149
- key: 'User ID',
150
- value: event.userId,
151
- color: AppColors_1.AppColors.greenColor,
152
- });
153
- }
154
- if (event.pageTitle) {
155
- topMetrics.push({
156
- key: 'Page',
157
- value: event.pageTitle,
158
- color: AppColors_1.AppColors.purple,
159
- });
160
- }
161
- if (params?.primary_category) {
162
- topMetrics.push({
163
- key: 'Category',
164
- value: String(params.primary_category),
165
- color: AppColors_1.AppColors.purple,
166
- });
167
- }
168
- if (params?.flow) {
169
- topMetrics.push({
170
- key: 'Flow',
171
- value: String(params.flow),
172
- color: AppColors_1.AppColors.greenColor,
173
- });
174
- }
175
- if (params?.market_language) {
176
- topMetrics.push({
177
- key: 'Language',
178
- value: String(params.market_language),
179
- color: '#F59E0B',
180
- }); // Amber
181
- }
182
- if (params?.tripType) {
183
- topMetrics.push({
184
- key: 'Trip Type',
185
- value: String(params.tripType),
186
- color: '#3B82F6',
187
- }); // Blue
188
- }
189
- if (userProperties?.platform_type) {
190
- topMetrics.push({
191
- key: 'Platform',
192
- value: String(userProperties.platform_type),
193
- color: AppColors_1.AppColors.skyBlue,
194
- });
195
- }
196
- if (userProperties?.login_status) {
197
- topMetrics.push({
198
- key: 'Login Status',
199
- value: String(userProperties.login_status),
200
- color: '#64748B',
201
- });
202
- }
203
- topMetrics.unshift({
204
- key: 'Source',
205
- value: event.source,
206
- color: sourceColor,
207
- });
208
55
  return (<react_native_1.ScrollView style={[detailStyles.scroll, { backgroundColor: AppColors_1.AppColors.grayBackground }]} contentContainerStyle={detailStyles.content} showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never" automaticallyAdjustContentInsets={false}>
209
- <react_native_linear_gradient_1.default colors={[
210
- `${eventColor}18`,
211
- `${eventColor}06`,
212
- AppColors_1.AppColors.grayBackground,
213
- ]} style={detailStyles.hero}>
214
- <react_native_1.View style={{
56
+
57
+ {/* Clean Toolbar */}
58
+ <react_native_1.View style={{
215
59
  flexDirection: 'row',
216
- width: '100%',
217
60
  justifyContent: 'space-between',
218
- alignItems: 'flex-start',
61
+ alignItems: 'center',
219
62
  paddingHorizontal: 16,
220
- paddingTop: 14,
221
- marginBottom: 8,
63
+ paddingVertical: 12,
64
+ borderBottomWidth: 1,
65
+ borderBottomColor: AppColors_1.AppColors.grayBorderSecondary,
66
+ backgroundColor: AppColors_1.AppColors.primaryLight,
222
67
  }}>
223
- <react_native_1.View style={{ flex: 1, paddingRight: 10 }}>
224
- <react_native_1.Text style={{
68
+ <TouchableScale_1.default style={{
69
+ flexDirection: 'row',
70
+ alignItems: 'center',
71
+ gap: 6,
72
+ backgroundColor: AppColors_1.AppColors.grayBackground,
73
+ paddingHorizontal: 12,
74
+ paddingVertical: 6,
75
+ borderRadius: 8,
76
+ borderWidth: 1,
77
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
78
+ }} onPress={() => {
79
+ const nextDepth = expandDepth === 99 ? 1 : 99;
80
+ setExpandDepth(nextDepth);
81
+ setTreeKey(prev => prev + 1);
82
+ }}>
83
+ <react_native_1.Text style={{
225
84
  fontFamily: AppFonts_1.AppFonts.interBold,
226
- fontSize: 18,
227
- color: AppColors_1.AppColors.primaryBlack,
228
- marginBottom: 4,
229
- }} numberOfLines={2}>
230
- {event.name}
231
- </react_native_1.Text>
232
- <react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
233
- <react_native_1.View style={{
234
- width: 8,
235
- height: 8,
236
- borderRadius: 4,
237
- backgroundColor: sourceColor,
238
- }}/>
239
- <react_native_1.Text style={{
240
- fontFamily: AppFonts_1.AppFonts.interMedium,
241
85
  fontSize: 12,
242
- color: AppColors_1.AppColors.grayTextStrong,
86
+ color: AppColors_1.AppColors.purple,
243
87
  }}>
244
- {(0, helpers_1.formatDateTimeToAnalytics)(event.timestamp)}
245
- </react_native_1.Text>
246
- </react_native_1.View>
247
- </react_native_1.View>
248
- <CopyButton_1.default value={JSON.stringify({ name: event.name, params: params }, null, 2)} label="Copy JSON"/>
249
- </react_native_1.View>
88
+ {expandDepth === 99 ? 'Collapse All' : 'Expand All'}
89
+ </react_native_1.Text>
90
+ </TouchableScale_1.default>
250
91
 
251
- {topMetrics.length > 0 && (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={detailStyles.metricsScroll} contentContainerStyle={detailStyles.metricsGrid}>
252
- {topMetrics.map((item, idx) => (<react_native_1.View key={idx} style={[
253
- detailStyles.metricCard,
254
- {
255
- borderLeftColor: item.color,
256
- backgroundColor: AppColors_1.AppColors.primaryLight,
257
- },
258
- ]}>
259
- <react_native_1.Text style={[detailStyles.metricLabel, { color: AppColors_1.AppColors.grayTextWeak }]}>{item.key}</react_native_1.Text>
260
- <react_native_1.Text style={[detailStyles.metricValue, { color: item.color }]} numberOfLines={1}>
261
- {item.value}
262
- </react_native_1.Text>
263
- </react_native_1.View>))}
264
- </react_native_1.ScrollView>)}
265
- </react_native_linear_gradient_1.default>
92
+ <CopyButton_1.default value={JSON.stringify({
93
+ name: event.name,
94
+ params: params,
95
+ ...(upCount > 0 ? { userProperties } : {}),
96
+ }, null, 2)} label="Copy JSON"/>
97
+ </react_native_1.View>
266
98
 
267
- <react_native_1.View style={[detailStyles.tabRow, { backgroundColor: AppColors_1.AppColors.grayBackground }]}>
268
- <react_native_1.Pressable style={[
269
- detailStyles.tabButton,
270
- activeTab === 'unformatted' && [detailStyles.tabActive, { backgroundColor: AppColors_1.AppColors.primaryLight }],
271
- ]} onPress={() => setActiveTab('unformatted')}>
272
- <react_native_1.Text style={[
273
- detailStyles.tabText,
274
- { color: AppColors_1.AppColors.grayTextWeak },
275
- activeTab === 'unformatted' && [detailStyles.tabTextActive, { color: AppColors_1.AppColors.primaryBlack }],
99
+ {/* Direct JSON Viewer View */}
100
+ <react_native_1.View style={[
101
+ detailStyles.jsonBlockContainer,
102
+ {
103
+ backgroundColor: AppColors_1.AppColors.primaryLight,
104
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
105
+ marginTop: 16,
106
+ },
276
107
  ]}>
277
- JSON Viewer
278
- </react_native_1.Text>
279
- </react_native_1.Pressable>
280
- <react_native_1.Pressable style={[
281
- detailStyles.tabButton,
282
- activeTab === 'formatted' && [detailStyles.tabActive, { backgroundColor: AppColors_1.AppColors.primaryLight }],
283
- ]} onPress={() => setActiveTab('formatted')}>
284
- <react_native_1.Text style={[
285
- detailStyles.tabText,
286
- { color: AppColors_1.AppColors.grayTextWeak },
287
- activeTab === 'formatted' && [detailStyles.tabTextActive, { color: AppColors_1.AppColors.primaryBlack }],
288
- ]}>
289
- Tabular View
290
- </react_native_1.Text>
291
- </react_native_1.Pressable>
108
+ <JsonViewer_1.default key={treeKey} data={{
109
+ name: event.name,
110
+ params: params,
111
+ ...(upCount > 0
112
+ ? {
113
+ userProperties: userProperties,
114
+ }
115
+ : {}),
116
+ }} defaultExpandDepth={expandDepth}/>
292
117
  </react_native_1.View>
293
-
294
- {activeTab === 'unformatted' && (<react_native_1.View style={detailStyles.searchRow}>
295
- <react_native_1.View style={[styles_1.default.detailSearchBox, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
296
- <react_native_1.TextInput placeholder="Search JSON data..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={[styles_1.default.detailSearchInput, { color: AppColors_1.AppColors.primaryBlack }]} autoCorrect={false} autoCapitalize="none"/>
297
- {search.length > 0 && (<react_native_1.Pressable onPress={() => setSearch('')} hitSlop={10} style={{ padding: 8 }}>
298
- <NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
299
- </react_native_1.Pressable>)}
300
- </react_native_1.View>
301
- </react_native_1.View>)}
302
-
303
- {activeTab === 'formatted' && (<react_native_1.View style={{ gap: 10 }}>
304
- {paramCount > 0 && (<SectionCard title="Event Parameters" count={paramCount} accentColor={eventColor}>
305
- <ParamTable data={params} emptyLabel="No parameters"/>
306
- </SectionCard>)}
307
-
308
- {upCount > 0 && (<SectionCard title="User Properties" count={upCount} accentColor={AppColors_1.AppColors.greenColor}>
309
- <ParamTable data={userProperties} emptyLabel="No user properties"/>
310
- </SectionCard>)}
311
- </react_native_1.View>)}
312
-
313
- {activeTab === 'unformatted' && (<SectionCard accentColor={AppColors_1.AppColors.purple}>
314
- <react_native_1.View style={[detailStyles.jsonBlock, { marginLeft: 0, marginTop: 0, backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
315
- <JsonViewer_1.default data={{
316
- name: event.name,
317
- params: params,
318
- ...(upCount > 0
319
- ? {
320
- userProperties: userProperties,
321
- }
322
- : {}),
323
- }} search={search}/>
324
- </react_native_1.View>
325
- </SectionCard>)}
326
-
327
- {/* Empty state */}
328
- {paramCount === 0 && upCount === 0 && activeTab !== 'unformatted' && (<react_native_1.View style={[detailStyles.emptyParams, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
329
- <react_native_1.Text style={[detailStyles.emptyParamsText, { color: AppColors_1.AppColors.grayTextWeak }]}>
330
- No parameters recorded for this event
331
- </react_native_1.Text>
332
- </react_native_1.View>)}
333
118
  </react_native_1.ScrollView>);
334
119
  };
335
120
  const detailStyles = react_native_1.StyleSheet.create({
@@ -338,226 +123,12 @@ const detailStyles = react_native_1.StyleSheet.create({
338
123
  paddingTop: 0,
339
124
  paddingBottom: 40,
340
125
  },
341
- hero: {
342
- paddingTop: 0,
343
- paddingBottom: 16,
344
- paddingHorizontal: 0,
345
- gap: 8,
346
- marginTop: 0,
347
- marginBottom: 0,
348
- width: '100%',
349
- alignSelf: 'stretch',
350
- },
351
- searchRow: {
352
- paddingHorizontal: 16,
353
- marginVertical: 6,
354
- },
355
- sectionCard: {
356
- marginHorizontal: 0,
357
- borderRadius: 12,
358
- overflow: 'hidden',
359
- borderWidth: 1,
360
- borderColor: AppColors_1.AppColors.grayBorderSecondary,
361
- backgroundColor: AppColors_1.AppColors.primaryLight,
362
- shadowColor: '#000',
363
- shadowOpacity: 0.04,
364
- shadowRadius: 4,
365
- shadowOffset: { width: 0, height: 1 },
366
- elevation: 1,
367
- },
368
- sectionHeader: {
369
- flexDirection: 'row',
370
- alignItems: 'center',
371
- justifyContent: 'space-between',
372
- paddingHorizontal: 14,
373
- paddingVertical: 12,
374
- },
375
- sectionTitleRow: {
376
- flexDirection: 'row',
377
- alignItems: 'center',
378
- gap: 8,
379
- flex: 1,
380
- },
381
- sectionAccentDot: {
382
- width: 8,
383
- height: 8,
384
- borderRadius: 4,
385
- },
386
- sectionTitle: {
387
- fontFamily: AppFonts_1.AppFonts.interBold,
388
- fontSize: 13,
389
- color: AppColors_1.AppColors.primaryBlack,
390
- },
391
- sectionActions: {
392
- flexDirection: 'row',
393
- alignItems: 'center',
394
- gap: 6,
395
- },
396
- countBadge: {
397
- paddingHorizontal: 7,
398
- paddingVertical: 2,
399
- borderRadius: 8,
400
- borderWidth: 1,
401
- },
402
- countBadgeText: {
403
- fontFamily: AppFonts_1.AppFonts.interBold,
404
- fontSize: 10,
405
- },
406
- paramList: {
407
- gap: 8,
408
- },
409
- emptyParams: {
410
- marginVertical: 12,
411
- paddingVertical: 18,
412
- paddingHorizontal: 14,
413
- borderRadius: 10,
414
- borderWidth: 1,
415
- borderColor: AppColors_1.AppColors.grayBorderSecondary,
416
- backgroundColor: AppColors_1.AppColors.primaryLight,
417
- alignItems: 'center',
418
- justifyContent: 'center',
419
- },
420
- emptyParamsText: {
421
- fontFamily: AppFonts_1.AppFonts.interMedium,
422
- fontSize: 13,
423
- color: AppColors_1.AppColors.grayTextWeak,
424
- textAlign: 'center',
425
- lineHeight: 18,
426
- },
427
- dataBox: {
428
- backgroundColor: '#FFFFFF',
429
- borderRadius: 8,
430
- borderWidth: 1,
431
- borderColor: '#E5E7EB',
432
- padding: 12,
433
- },
434
- dataBoxHeader: {
435
- flexDirection: 'row',
436
- justifyContent: 'space-between',
437
- alignItems: 'center',
438
- marginBottom: 8,
439
- },
440
- dataBoxKey: {
441
- fontFamily: AppFonts_1.AppFonts.interBold,
442
- fontWeight: 'bold',
443
- fontSize: 13,
444
- color: AppColors_1.AppColors.primaryBlack,
445
- flex: 1,
446
- paddingRight: 8,
447
- },
448
- dataBoxVal: {
449
- fontFamily: AppFonts_1.AppFonts.interRegular,
450
- fontSize: 13,
451
- color: AppColors_1.AppColors.primaryBlack,
452
- lineHeight: 18,
453
- },
454
- showMoreBtn: {
126
+ jsonBlockContainer: {
127
+ marginHorizontal: 16,
455
128
  marginTop: 8,
456
- alignSelf: 'flex-start',
457
- backgroundColor: '#F3F4F6',
458
- paddingHorizontal: 10,
459
- paddingVertical: 4,
460
- borderRadius: 4,
461
- },
462
- showMoreText: {
463
- fontFamily: AppFonts_1.AppFonts.interMedium,
464
- fontSize: 11,
465
- color: '#4B5563', // matching previous UI color
466
- },
467
- jsonBlock: {
468
129
  padding: 12,
469
130
  borderWidth: 1,
470
- borderColor: '#E0E7FF',
471
- borderRadius: 8,
472
- backgroundColor: '#EEF2FF',
473
- },
474
- metricsScroll: {
475
- height: 92,
476
- overflow: 'visible',
477
- },
478
- metricsGrid: {
479
- gap: 8,
480
- marginTop: 4,
481
- paddingHorizontal: 16,
482
- paddingBottom: 14,
483
- },
484
- metricCard: {
485
- backgroundColor: '#FFFFFF',
486
- paddingVertical: 8,
487
- paddingHorizontal: 10,
488
- borderRadius: 6,
489
- borderLeftWidth: 3,
490
- width: 130, // fixed width for horizontal scrolling
491
- shadowColor: '#000',
492
- shadowOpacity: 0.04,
493
- shadowRadius: 4,
494
- shadowOffset: { width: 0, height: 2 },
495
- elevation: 2,
496
- alignItems: 'flex-start',
497
- },
498
- metricLabel: {
499
- fontFamily: AppFonts_1.AppFonts.interMedium,
500
- fontSize: 10,
501
- color: AppColors_1.AppColors.grayTextWeak,
502
- textTransform: 'uppercase',
503
- marginBottom: 4,
504
- },
505
- metricValue: {
506
- fontFamily: AppFonts_1.AppFonts.interBold,
507
- fontSize: 13,
508
- },
509
- tabRow: {
510
- flexDirection: 'row',
511
- marginHorizontal: 16,
512
- marginTop: 6,
513
- backgroundColor: '#E5E7EB',
514
- borderRadius: 8,
515
- padding: 4,
516
- },
517
- tabButton: {
518
- flex: 1,
519
- flexDirection: 'row',
520
- alignItems: 'center',
521
- justifyContent: 'center',
522
- paddingVertical: 8,
523
- borderRadius: 6,
524
- gap: 6,
525
- },
526
- tabActive: {
527
- backgroundColor: '#FFFFFF',
528
- shadowColor: '#000',
529
- shadowOpacity: 0.1,
530
- shadowRadius: 2,
531
- shadowOffset: { width: 0, height: 1 },
532
- elevation: 2,
533
- },
534
- tabText: {
535
- fontFamily: AppFonts_1.AppFonts.interMedium,
536
- fontSize: 13,
537
- color: AppColors_1.AppColors.grayTextWeak,
538
- },
539
- tabTextActive: {
540
- fontFamily: AppFonts_1.AppFonts.interBold,
541
- color: AppColors_1.AppColors.primaryBlack,
542
- },
543
- tabBadge: {
544
- backgroundColor: '#D1D5DB',
545
- paddingHorizontal: 6,
546
- paddingVertical: 2,
547
- borderRadius: 10,
548
- },
549
- tabBadgeActive: {
550
- backgroundColor: AppColors_1.AppColors.primaryLight,
551
- borderWidth: 1,
552
- borderColor: '#E5E7EB',
553
- },
554
- tabBadgeText: {
555
- fontFamily: AppFonts_1.AppFonts.interBold,
556
- fontSize: 10,
557
- color: '#6B7280',
558
- },
559
- tabBadgeTextActive: {
560
- color: AppColors_1.AppColors.primaryBlack,
131
+ borderRadius: 12,
561
132
  },
562
133
  });
563
134
  exports.default = AnalyticsDetail;
@@ -175,34 +175,34 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
175
175
  {userPropCount > 0 && (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
176
176
  <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]}>★ {userPropCount} props</react_native_1.Text>
177
177
  </react_native_1.View>)}
178
- </react_native_1.View>
179
178
 
180
- {/* Inline Mini Graph for E-commerce Items */}
181
- {(() => {
179
+ {(() => {
182
180
  const items = event.params?.items;
183
- if (!Array.isArray(items) || items.length === 0)
184
- return null;
185
- const prices = items
186
- .map((item) => parseFloat(item.price || item.value))
187
- .filter(p => !isNaN(p));
188
- if (prices.length === 0)
189
- return null;
190
- const max = Math.max(...prices);
191
- if (max === 0)
192
- return null;
193
- return (<react_native_1.View style={cardStyles.miniGraphWrapper}>
194
- {prices.map((val, idx) => {
195
- const hPct = (val / max) * 100;
196
- return (<react_native_1.View key={idx} style={[
197
- cardStyles.miniGraphBar,
198
- {
199
- height: `${Math.max(15, hPct)}%`,
200
- backgroundColor: color,
201
- },
202
- ]}/>);
203
- })}
204
- </react_native_1.View>);
181
+ if (Array.isArray(items) && items.length > 0) {
182
+ return (<react_native_1.View style={[cardStyles.chip, { backgroundColor: '#FEF3C7', borderColor: '#FDE68A' }]}>
183
+ <react_native_1.Text style={[cardStyles.chipText, { color: '#D97706', fontFamily: AppFonts_1.AppFonts.interBold }]}>
184
+ 🛒 {items.length} {items.length === 1 ? 'item' : 'items'}
185
+ </react_native_1.Text>
186
+ </react_native_1.View>);
187
+ }
188
+ return null;
189
+ })()}
190
+
191
+ {(() => {
192
+ const val = event.params?.value ?? event.params?.price;
193
+ const currency = event.params?.currency ?? '';
194
+ const isPrimitive = typeof val === 'string' || typeof val === 'number';
195
+ if (isPrimitive) {
196
+ const currencyStr = typeof currency === 'string' || typeof currency === 'number' ? String(currency) : '';
197
+ return (<react_native_1.View style={[cardStyles.chip, { backgroundColor: '#ECFDF5', borderColor: '#A7F3D0' }]}>
198
+ <react_native_1.Text style={[cardStyles.chipText, { color: '#059669', fontFamily: AppFonts_1.AppFonts.interBold }]}>
199
+ 💰 {String(val)} {currencyStr}
200
+ </react_native_1.Text>
201
+ </react_native_1.View>);
202
+ }
203
+ return null;
205
204
  })()}
205
+ </react_native_1.View>
206
206
  </react_native_1.View>
207
207
  </TouchableScale_1.default>
208
208
  </react_native_1.View>);
@@ -254,7 +254,9 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
254
254
  }).start();
255
255
  }, [chevronAnim, expanded]);
256
256
  const toggleExpanded = () => {
257
- react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
257
+ if (react_native_1.Platform.OS === 'ios') {
258
+ react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
259
+ }
258
260
  setExpanded(prev => !prev);
259
261
  };
260
262
  const chevronRotate = chevronAnim.interpolate({
@@ -1,21 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare const ReduxStoreIcon: ({ color, size, }: any) => React.JSX.Element;
3
- export declare const ReduxBoltIcon: ({ color, size, }: any) => React.JSX.Element;
4
- export declare const ReduxTimelineIcon: ({ color, size, }: any) => React.JSX.Element;
5
- export declare const ReduxTreeIcon: ({ color, size, }: any) => React.JSX.Element;
6
3
  export declare const ReduxTreeView: ({ state, lastActionMap, search, }: {
7
4
  state: any;
8
5
  lastActionMap: Record<string, any>;
9
6
  search?: string;
10
7
  }) => React.JSX.Element;
11
- export declare const ReduxActionTimeline: ({ history, onClear, search, }: {
12
- history: Array<{
13
- id: number;
14
- type: string;
15
- payload: any;
16
- timestamp: string;
17
- affectedSlices: string[];
18
- }>;
19
- onClear: () => void;
20
- search?: string;
21
- }) => React.JSX.Element;