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.
@@ -2,81 +2,18 @@ import React, { useEffect, useRef, useState } from 'react';
2
2
  import { Animated, LayoutAnimation, Platform, Pressable, StyleSheet, Text, UIManager, View, } from 'react-native';
3
3
  import { AppColors } from '../styles/AppColors';
4
4
  import { AppFonts } from '../styles/AppFonts';
5
- import { ChevronIcon, CopyIcon, CheckIcon } from './NetworkIcons';
5
+ import { ChevronIcon } from './NetworkIcons';
6
6
  import Svg, { Path } from 'react-native-svg';
7
- import AnimatedEntrance from './AnimatedEntrance';
8
- import { copyToClipboard } from '../helpers';
9
- // #15 — copy-to-clipboard control for a single dispatched action
10
- const ActionCopyButton = ({ value }) => {
11
- const [copied, setCopied] = useState(false);
12
- return (<Pressable hitSlop={10} onPress={() => {
13
- copyToClipboard(value(), 'Action');
14
- setCopied(true);
15
- setTimeout(() => setCopied(false), 1200);
16
- }} style={{
17
- width: 26,
18
- height: 26,
19
- borderRadius: 7,
20
- alignItems: 'center',
21
- justifyContent: 'center',
22
- backgroundColor: copied
23
- ? `${AppColors.greenColor}1A`
24
- : AppColors.grayBackground,
25
- borderWidth: 1,
26
- borderColor: AppColors.dividerColor,
27
- }}>
28
- {copied ? (<CheckIcon color={AppColors.greenColor} size={13}/>) : (<CopyIcon color={AppColors.grayTextWeak} size={13}/>)}
29
- </Pressable>);
30
- };
31
- // #15 — derive the redux module / folder name from an action type.
32
- // Supports RTK slice convention ("booking/setDate" -> "Booking") and
33
- // falls back to the first affected slice.
34
- const getActionModule = (type, affectedSlices) => {
35
- if (type && type.includes('/')) {
36
- const prefix = type.split('/')[0];
37
- if (prefix)
38
- return prefix.charAt(0).toUpperCase() + prefix.slice(1);
39
- }
40
- if (affectedSlices && affectedSlices.length > 0) {
41
- const s = affectedSlices[0];
42
- return s.charAt(0).toUpperCase() + s.slice(1);
43
- }
44
- return null;
45
- };
46
- // Custom icons
47
- const DatabaseIcon = ({ color = AppColors.grayTextWeak, size = 12 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
48
- <Path d="M12 2C6.5 2 2 4.2 2 7v10c0 2.8 4.5 5 10 5s10-2.2 10-5V7c0-2.8-4.5-5-10-5z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
49
- <Path d="M2 12c0 2.8 4.5 5 10 5s10-2.2 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
50
- <Path d="M2 7c0 2.8 4.5 5 10 5s10-2.2 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
51
- </Svg>);
52
- const BoltIcon = ({ color = AppColors.grayTextWeak, size = 12 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
53
- <Path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" fill={color} stroke={color} strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
54
- </Svg>);
55
7
  const FolderIcon = ({ color = AppColors.grayTextWeak, size = 12 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
56
8
  <Path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
57
9
  </Svg>);
58
- // Exported icons so the Redux tab's section headers and sub-tab buttons can
59
- // render real vector icons instead of emoji (which fail to render on some
60
- // Android/font setups).
61
10
  export const ReduxStoreIcon = ({ color = AppColors.grayTextWeak, size = 12, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
62
11
  <Path d="M3 9l1.5-5h15L21 9M3 9v10a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V9M3 9h18M7 9v3a2 2 0 0 0 4 0V9m2 0v3a2 2 0 0 0 4 0V9" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
63
12
  </Svg>);
64
- export const ReduxBoltIcon = ({ color = AppColors.grayTextWeak, size = 12, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
65
- <Path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" fill={color} stroke={color} strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
66
- </Svg>);
67
- // Action Timeline — a history/clock icon reads as "sequence over time".
68
- export const ReduxTimelineIcon = ({ color = AppColors.grayTextWeak, size = 12, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
69
- <Path d="M3 3v5h5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
70
- <Path d="M3.05 13A9 9 0 1 0 6 5.3L3 8" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
71
- <Path d="M12 7v5l3 2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
72
- </Svg>);
73
- // Store Tree — a node hierarchy icon reads as "nested tree structure".
74
- export const ReduxTreeIcon = ({ color = AppColors.grayTextWeak, size = 12, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
75
- <Path d="M9 4h6v4H9zM3 16h6v4H3zm12 0h6v4h-6z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
76
- <Path d="M12 8v4M6 16v-2h12v2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
77
- </Svg>);
78
13
  const animateTreeLayout = () => {
79
- LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
14
+ if (Platform.OS === 'ios') {
15
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
16
+ }
80
17
  };
81
18
  const AnimatedChevron = ({ color, expanded, size, style, }) => {
82
19
  const progress = useRef(new Animated.Value(expanded ? 1 : 0)).current;
@@ -95,7 +32,7 @@ const AnimatedChevron = ({ color, expanded, size, style, }) => {
95
32
  <ChevronIcon color={color} size={size}/>
96
33
  </Animated.View>);
97
34
  };
98
- const ReduxValueNode = ({ name, value, level, search }) => {
35
+ const ReduxValueNode = ({ name, value, level, search, lastAction }) => {
99
36
  const [expanded, setExpanded] = useState(level < 1);
100
37
  const isObject = typeof value === 'object' && value !== null;
101
38
  const isArray = Array.isArray(value);
@@ -123,7 +60,6 @@ const ReduxValueNode = ({ name, value, level, search }) => {
123
60
  : value === undefined
124
61
  ? 'undefined'
125
62
  : String(value);
126
- // Pick different colors for primitives
127
63
  let valColor = '#0D9488'; // String
128
64
  if (value === null || value === undefined) {
129
65
  valColor = AppColors.grayTextWeak;
@@ -136,13 +72,20 @@ const ReduxValueNode = ({ name, value, level, search }) => {
136
72
  }
137
73
  return (<View style={[reduxValueStyles.treeRow, { paddingLeft: 12 }]}>
138
74
  <View style={reduxValueStyles.treeLeafConnector}/>
139
- <Text style={reduxValueStyles.keyText} selectable={true}>
140
- {nameStr}
141
- <Text style={reduxValueStyles.colonText}>: </Text>
142
- <Text style={[reduxValueStyles.valText, { color: valColor }]} selectable={true}>
143
- {valStr}
75
+ <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, flexWrap: 'wrap', gap: 6 }}>
76
+ <Text style={reduxValueStyles.keyText} selectable={true}>
77
+ {nameStr}
78
+ <Text style={reduxValueStyles.colonText}>: </Text>
79
+ <Text style={[reduxValueStyles.valText, { color: valColor }]} selectable={true}>
80
+ {valStr}
81
+ </Text>
144
82
  </Text>
145
- </Text>
83
+ {lastAction && (<View style={styles.actionTypeBadge}>
84
+ <Text style={styles.actionTypeText} numberOfLines={1}>
85
+ {lastAction.type}
86
+ </Text>
87
+ </View>)}
88
+ </View>
146
89
  </View>);
147
90
  }
148
91
  const keys = Object.keys(value);
@@ -156,11 +99,18 @@ const ReduxValueNode = ({ name, value, level, search }) => {
156
99
  }} style={reduxValueStyles.treeRow}>
157
100
  <View style={reduxValueStyles.treeLeafConnector}/>
158
101
  <AnimatedChevron color={AppColors.grayTextWeak} expanded={expanded} size={10} style={reduxValueStyles.chevronWrap}/>
159
- <Text style={reduxValueStyles.keyText} selectable={true}>
160
- {nameStr}
161
- <Text style={reduxValueStyles.colonText}>: </Text>
162
- <Text style={reduxValueStyles.summaryText}>{summaryText}</Text>
163
- </Text>
102
+ <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, flexWrap: 'wrap', gap: 6 }}>
103
+ <Text style={reduxValueStyles.keyText} selectable={true}>
104
+ {nameStr}
105
+ <Text style={reduxValueStyles.colonText}>: </Text>
106
+ <Text style={reduxValueStyles.summaryText}>{summaryText}</Text>
107
+ </Text>
108
+ {lastAction && (<View style={styles.actionTypeBadge}>
109
+ <Text style={styles.actionTypeText} numberOfLines={1}>
110
+ {lastAction.type}
111
+ </Text>
112
+ </View>)}
113
+ </View>
164
114
  </Pressable>
165
115
  {expanded && (<View style={reduxValueStyles.treeChildrenContainer}>
166
116
  {keys.map(key => (<ReduxValueNode key={key} name={key} value={value[key]} level={level + 1} search={search}/>))}
@@ -205,7 +155,7 @@ export const ReduxTreeView = ({ state, lastActionMap, search, }) => {
205
155
  <Text style={styles.storeTitle}>Redux Store</Text>
206
156
  </View>
207
157
  <View style={styles.badge}>
208
- <Text style={styles.badgeText}>{reducers.length} Reducers</Text>
158
+ <Text style={styles.badgeText}>{reducers.length} Slices</Text>
209
159
  </View>
210
160
  </Pressable>
211
161
 
@@ -219,7 +169,7 @@ export const ReduxTreeView = ({ state, lastActionMap, search, }) => {
219
169
  {/* Visual Branch Line for Reducer */}
220
170
  <View style={[
221
171
  styles.reducerVerticalLine,
222
- isLastReducer && { bottom: '50%' },
172
+ isLastReducer && !isExpanded && { bottom: '50%' },
223
173
  ]}/>
224
174
 
225
175
  {/* Reducer Header */}
@@ -229,191 +179,26 @@ export const ReduxTreeView = ({ state, lastActionMap, search, }) => {
229
179
  <View style={styles.iconWrap}>
230
180
  <FolderIcon color={AppColors.purple} size={11}/>
231
181
  </View>
232
- <Text style={styles.reducerText}>{reducerKey}</Text>
182
+ <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, flexWrap: 'wrap', gap: 6 }}>
183
+ <Text style={styles.reducerText}>{reducerKey}</Text>
184
+ {lastAction && (<View style={styles.actionTypeBadge}>
185
+ <Text style={styles.actionTypeText} numberOfLines={1}>
186
+ {lastAction.type}
187
+ </Text>
188
+ </View>)}
189
+ </View>
233
190
  </Pressable>
234
191
 
235
192
  {isExpanded && (<View style={styles.reducerChildren}>
236
193
  {/* Vertical line connecting children */}
237
194
  <View style={styles.childrenVerticalLine}/>
238
-
239
- {/* Node 1: Last Action */}
240
- <View style={styles.childItem}>
241
- <View style={styles.childHorizontalLine}/>
242
- <View style={[styles.iconWrap, { backgroundColor: '#FDF2F8' }]}>
243
- <BoltIcon color="#DB2777" size={11}/>
244
- </View>
245
- <View style={{ flex: 1 }}>
246
- <View style={{
247
- flexDirection: 'row',
248
- alignItems: 'center',
249
- flexWrap: 'wrap',
250
- gap: 6,
251
- }}>
252
- <Text style={styles.childLabel}>Last Action:</Text>
253
- {lastAction ? (<View style={styles.actionTypeBadge}>
254
- <Text style={styles.actionTypeText}>
255
- {lastAction.type}
256
- </Text>
257
- </View>) : (<Text style={styles.noActionText}>
258
- None dispatched
259
- </Text>)}
260
- </View>
261
- {lastAction && (<Text style={styles.timestampText}>
262
- Dispatched: {lastAction.timestamp}
263
- </Text>)}
264
- {lastAction && lastAction.payload !== null && (<View style={{ marginTop: 6 }}>
265
- <ReduxValueNode name="payload" value={lastAction.payload} level={0} search={search}/>
266
- </View>)}
267
- </View>
268
- </View>
269
-
270
- {/* Node 2: State Data */}
271
- <View style={styles.childItem}>
272
- <View style={[styles.childHorizontalLine, { bottom: '50%' }]}/>
273
- <View style={[styles.iconWrap, { backgroundColor: '#ECFDF5' }]}>
274
- <DatabaseIcon color="#059669" size={11}/>
275
- </View>
276
- <View style={{ flex: 1 }}>
277
- <Text style={styles.childLabel}>State Slice Data</Text>
278
- <View style={{ marginTop: 6 }}>
279
- <ReduxValueNode name="state" value={sliceData} level={0} search={search}/>
280
- </View>
281
- </View>
282
- </View>
195
+ {typeof sliceData === 'object' && sliceData !== null ? (Object.keys(sliceData).map(k => (<ReduxValueNode key={k} name={k} value={sliceData[k]} level={0} search={search}/>))) : (<ReduxValueNode name={reducerKey} value={sliceData} level={0} search={search} lastAction={lastAction}/>)}
283
196
  </View>)}
284
197
  </View>);
285
198
  })}
286
199
  </View>)}
287
200
  </View>);
288
201
  };
289
- export const ReduxActionTimeline = ({ history, onClear, search, }) => {
290
- const [expandedActionId, setExpandedActionId] = useState(null);
291
- const toggleExpand = (id) => {
292
- animateTreeLayout();
293
- setExpandedActionId(prev => (prev === id ? null : id));
294
- };
295
- const filteredHistory = history.filter(action => {
296
- if (!search)
297
- return true;
298
- const s = search.toLowerCase();
299
- if (action.type.toLowerCase().includes(s))
300
- return true;
301
- if (action.affectedSlices.some(slice => slice.toLowerCase().includes(s)))
302
- return true;
303
- if (action.payload && typeof action.payload === 'object') {
304
- return JSON.stringify(action.payload).toLowerCase().includes(s);
305
- }
306
- return false;
307
- });
308
- return (<View style={timelineStyles.container}>
309
- <View style={timelineStyles.headerRow}>
310
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
311
- <ReduxBoltIcon color={AppColors.purple} size={15}/>
312
- <Text style={timelineStyles.headerTitle}>
313
- Dispatched Actions ({filteredHistory.length})
314
- </Text>
315
- </View>
316
- {history.length > 0 && (<Pressable onPress={onClear} style={timelineStyles.clearBtn}>
317
- <Text style={timelineStyles.clearBtnText}>Clear Log</Text>
318
- </Pressable>)}
319
- </View>
320
-
321
- {filteredHistory.length === 0 ? (<View style={timelineStyles.emptyContainer}>
322
- <Text style={timelineStyles.emptyText}>
323
- {history.length === 0
324
- ? 'No actions dispatched yet.\nDispatch actions in your application to see the timeline.'
325
- : 'No matching actions found.'}
326
- </Text>
327
- </View>) : (<View style={timelineStyles.listContainer}>
328
- {filteredHistory.map((item, index) => {
329
- const isLast = index === filteredHistory.length - 1;
330
- const isExpanded = expandedActionId === item.id;
331
- return (<AnimatedEntrance key={item.id} index={index} distance={8} style={timelineStyles.timelineItem}>
332
- {/* Visual Line */}
333
- <View style={[
334
- timelineStyles.verticalLine,
335
- isLast && { bottom: '50%' },
336
- ]}/>
337
- <View style={timelineStyles.circleIndicator}>
338
- <View style={timelineStyles.circleInner}/>
339
- </View>
340
-
341
- {/* Card */}
342
- <Pressable onPress={() => toggleExpand(item.id)} style={[
343
- timelineStyles.card,
344
- isExpanded && {
345
- borderColor: AppColors.purple,
346
- backgroundColor: AppColors.purpleShade50,
347
- },
348
- ]}>
349
- <View style={timelineStyles.cardHeader}>
350
- <View style={{
351
- flexDirection: 'row',
352
- alignItems: 'center',
353
- gap: 6,
354
- flex: 1,
355
- }}>
356
- {(() => {
357
- const moduleName = getActionModule(item.type, item.affectedSlices);
358
- return moduleName ? (<View style={{
359
- paddingHorizontal: 7,
360
- paddingVertical: 2,
361
- borderRadius: 6,
362
- backgroundColor: `${AppColors.purple}14`,
363
- borderWidth: 1,
364
- borderColor: `${AppColors.purple}33`,
365
- }}>
366
- <Text style={{
367
- fontFamily: AppFonts.interBold,
368
- fontSize: 9.5,
369
- color: AppColors.purple,
370
- letterSpacing: 0.2,
371
- }}>
372
- {moduleName}
373
- </Text>
374
- </View>) : null;
375
- })()}
376
- <View style={timelineStyles.typeBadge}>
377
- <Text style={timelineStyles.typeText}>{item.type}</Text>
378
- </View>
379
- </View>
380
- <View style={{
381
- flexDirection: 'row',
382
- alignItems: 'center',
383
- gap: 8,
384
- }}>
385
- <Text style={timelineStyles.timestamp}>
386
- {item.timestamp}
387
- </Text>
388
- <ActionCopyButton value={() => ({
389
- type: item.type,
390
- payload: item.payload,
391
- })}/>
392
- </View>
393
- </View>
394
-
395
- {item.affectedSlices.length > 0 && (<View style={timelineStyles.slicesRow}>
396
- <Text style={timelineStyles.slicesLabel}>Affected:</Text>
397
- {item.affectedSlices.map(slice => (<View key={slice} style={timelineStyles.slicePill}>
398
- <Text style={timelineStyles.sliceText}>{slice}</Text>
399
- </View>))}
400
- </View>)}
401
-
402
- {isExpanded && (<View style={timelineStyles.payloadContainer}>
403
- <Text style={timelineStyles.payloadTitle}>Payload</Text>
404
- {item.payload !== null &&
405
- typeof item.payload === 'object' ? (<ReduxValueNode name="action.payload" value={item.payload} level={0} search={search}/>) : (<Text style={timelineStyles.primitivePayload}>
406
- {item.payload === null
407
- ? 'null'
408
- : String(item.payload)}
409
- </Text>)}
410
- </View>)}
411
- </Pressable>
412
- </AnimatedEntrance>);
413
- })}
414
- </View>)}
415
- </View>);
416
- };
417
202
  const reduxValueStyles = StyleSheet.create({
418
203
  treeNodeBlock: {
419
204
  marginTop: 4,
@@ -465,158 +250,6 @@ const reduxValueStyles = StyleSheet.create({
465
250
  color: AppColors.grayTextWeak,
466
251
  },
467
252
  });
468
- const timelineStyles = StyleSheet.create({
469
- container: {
470
- flex: 1,
471
- },
472
- headerRow: {
473
- flexDirection: 'row',
474
- alignItems: 'center',
475
- justifyContent: 'space-between',
476
- marginBottom: 12,
477
- },
478
- headerTitle: {
479
- fontFamily: AppFonts.interBold,
480
- fontSize: 14,
481
- color: AppColors.primaryBlack,
482
- },
483
- clearBtn: {
484
- backgroundColor: 'rgba(239, 68, 68, 0.08)',
485
- borderColor: 'rgba(239, 68, 68, 0.2)',
486
- borderWidth: 1,
487
- paddingHorizontal: 8,
488
- paddingVertical: 4,
489
- borderRadius: 6,
490
- },
491
- clearBtnText: {
492
- fontFamily: AppFonts.interBold,
493
- fontSize: 10,
494
- color: '#EF4444',
495
- },
496
- emptyContainer: {
497
- paddingVertical: 32,
498
- alignItems: 'center',
499
- justifyContent: 'center',
500
- },
501
- emptyText: {
502
- fontFamily: AppFonts.interRegular,
503
- fontSize: 12,
504
- color: AppColors.grayTextWeak,
505
- textAlign: 'center',
506
- lineHeight: 18,
507
- },
508
- listContainer: {
509
- paddingLeft: 12,
510
- },
511
- timelineItem: {
512
- position: 'relative',
513
- paddingLeft: 20,
514
- marginBottom: 12,
515
- },
516
- verticalLine: {
517
- position: 'absolute',
518
- left: 4,
519
- top: 0,
520
- bottom: -12,
521
- width: 1,
522
- backgroundColor: AppColors.dividerColor,
523
- },
524
- circleIndicator: {
525
- position: 'absolute',
526
- left: 0,
527
- top: 10,
528
- width: 9,
529
- height: 9,
530
- borderRadius: 4.5,
531
- backgroundColor: AppColors.purpleShade50,
532
- borderWidth: 1,
533
- borderColor: AppColors.purple,
534
- alignItems: 'center',
535
- justifyContent: 'center',
536
- },
537
- circleInner: {
538
- width: 3,
539
- height: 3,
540
- borderRadius: 1.5,
541
- backgroundColor: AppColors.purple,
542
- },
543
- card: {
544
- backgroundColor: AppColors.primaryLight,
545
- borderWidth: 1,
546
- borderColor: AppColors.grayBorderSecondary,
547
- borderRadius: 8,
548
- padding: 10,
549
- },
550
- cardHeader: {
551
- flexDirection: 'row',
552
- alignItems: 'center',
553
- justifyContent: 'space-between',
554
- gap: 12,
555
- },
556
- typeBadge: {
557
- backgroundColor: 'rgba(104,75,155,0.08)',
558
- borderColor: 'rgba(104,75,155,0.18)',
559
- borderWidth: 1,
560
- borderRadius: 6,
561
- paddingHorizontal: 6,
562
- paddingVertical: 2.5,
563
- flexShrink: 1,
564
- },
565
- typeText: {
566
- fontFamily: AppFonts.interBold,
567
- fontSize: 11,
568
- color: AppColors.purple,
569
- },
570
- timestamp: {
571
- fontFamily: AppFonts.interRegular,
572
- fontSize: 10,
573
- color: AppColors.grayTextWeak,
574
- },
575
- slicesRow: {
576
- flexDirection: 'row',
577
- alignItems: 'center',
578
- flexWrap: 'wrap',
579
- gap: 4,
580
- marginTop: 6,
581
- },
582
- slicesLabel: {
583
- fontFamily: AppFonts.interMedium,
584
- fontSize: 10,
585
- color: AppColors.grayTextWeak,
586
- marginRight: 2,
587
- },
588
- slicePill: {
589
- backgroundColor: AppColors.grayBackground,
590
- borderColor: AppColors.dividerColor,
591
- borderWidth: 1,
592
- borderRadius: 4,
593
- paddingHorizontal: 4,
594
- paddingVertical: 1,
595
- },
596
- sliceText: {
597
- fontFamily: AppFonts.interMedium,
598
- fontSize: 9,
599
- color: AppColors.grayText,
600
- },
601
- payloadContainer: {
602
- marginTop: 10,
603
- borderTopWidth: 1,
604
- borderTopColor: AppColors.dividerColor,
605
- paddingTop: 8,
606
- },
607
- payloadTitle: {
608
- fontFamily: AppFonts.interBold,
609
- fontSize: 10,
610
- color: AppColors.grayTextWeak,
611
- textTransform: 'uppercase',
612
- marginBottom: 4,
613
- },
614
- primitivePayload: {
615
- fontFamily: AppFonts.interRegular,
616
- fontSize: 11,
617
- color: AppColors.grayTextStrong,
618
- },
619
- });
620
253
  const styles = StyleSheet.create({
621
254
  container: {
622
255
  flex: 1,
@@ -711,27 +344,6 @@ const styles = StyleSheet.create({
711
344
  width: 1,
712
345
  backgroundColor: AppColors.dividerColor,
713
346
  },
714
- childItem: {
715
- flexDirection: 'row',
716
- alignItems: 'flex-start',
717
- gap: 8,
718
- position: 'relative',
719
- paddingLeft: 12,
720
- },
721
- childHorizontalLine: {
722
- position: 'absolute',
723
- left: -12,
724
- top: 10,
725
- width: 12,
726
- height: 1,
727
- backgroundColor: AppColors.dividerColor,
728
- },
729
- childLabel: {
730
- fontFamily: AppFonts.interBold,
731
- fontSize: 11.5,
732
- color: AppColors.grayText,
733
- marginTop: 2,
734
- },
735
347
  actionTypeBadge: {
736
348
  backgroundColor: '#FCE7F3',
737
349
  borderColor: '#FBCFE8',
@@ -739,21 +351,11 @@ const styles = StyleSheet.create({
739
351
  borderRadius: 6,
740
352
  paddingHorizontal: 6,
741
353
  paddingVertical: 2,
354
+ alignSelf: 'flex-start',
742
355
  },
743
356
  actionTypeText: {
744
357
  fontFamily: AppFonts.interBold,
745
- fontSize: 10.5,
358
+ fontSize: 10,
746
359
  color: '#BE185D',
747
360
  },
748
- noActionText: {
749
- fontFamily: AppFonts.interRegular,
750
- fontSize: 11,
751
- color: AppColors.grayTextWeak,
752
- },
753
- timestampText: {
754
- fontFamily: AppFonts.interRegular,
755
- fontSize: 9.5,
756
- color: AppColors.grayTextWeak,
757
- marginTop: 2,
758
- },
759
361
  });
@@ -1,6 +1,14 @@
1
1
  import React, { useRef } from 'react';
2
- import { Animated, Pressable, StyleSheet } from 'react-native';
2
+ import { Animated, Pressable, StyleSheet, Platform } from 'react-native';
3
3
  const TouchableScale = ({ onPress, style, children, hitSlop, disabled, }) => {
4
+ if (Platform.OS === 'android') {
5
+ return (<Pressable disabled={disabled} onPress={onPress} hitSlop={hitSlop} style={({ pressed }) => [
6
+ style,
7
+ { opacity: pressed ? 0.75 : 1 },
8
+ ]}>
9
+ {children}
10
+ </Pressable>);
11
+ }
4
12
  const scale = useRef(new Animated.Value(1)).current;
5
13
  const opacity = useRef(new Animated.Value(1)).current;
6
14
  const animatePress = (pressed) => {
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "1.1.11";
1
+ export declare const LIB_VERSION = "1.1.12";
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED FILE — do not edit by hand.
2
2
  // Regenerated from package.json on every build by scripts/gen-version.js.
3
- export const LIB_VERSION = '1.1.11';
3
+ export const LIB_VERSION = '1.1.12';
@@ -19,3 +19,5 @@ export declare const getLocalizedFilePath: (path: string | any, country: string
19
19
  export declare const getLocalizedFilePathWithSlash: (path: string | any, country: string | any, language: string | any) => any;
20
20
  export declare const isAllValuesEmpty: (obj: Record<string, any>) => boolean;
21
21
  export declare const formatDateTimeToAnalytics: (ts: number) => string;
22
+ export declare const getBundleIdentifier: () => string;
23
+ export declare const getAppName: () => string;