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.
- package/dist/commonjs/components/AnalyticsDetail.js +57 -486
- package/dist/commonjs/components/AnalyticsEventCard.js +25 -25
- package/dist/commonjs/components/ConsoleLogCard.js +3 -1
- package/dist/commonjs/components/ReduxTreeView.d.ts +0 -14
- package/dist/commonjs/components/ReduxTreeView.js +43 -448
- package/dist/commonjs/components/TouchableScale.js +8 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +2 -0
- package/dist/commonjs/helpers/index.js +89 -1
- package/dist/commonjs/index.js +299 -272
- package/dist/esm/components/AnalyticsDetail.js +58 -487
- package/dist/esm/components/AnalyticsEventCard.js +25 -25
- package/dist/esm/components/ConsoleLogCard.js +3 -1
- package/dist/esm/components/ReduxTreeView.d.ts +0 -14
- package/dist/esm/components/ReduxTreeView.js +43 -441
- package/dist/esm/components/TouchableScale.js +9 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +87 -1
- package/dist/esm/index.js +302 -275
- package/example/package-lock.json +33 -74
- package/example/package.json +1 -1
- package/package.json +1 -1
|
@@ -32,94 +32,25 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
36
|
+
exports.ReduxTreeView = exports.ReduxStoreIcon = void 0;
|
|
40
37
|
const react_1 = __importStar(require("react"));
|
|
41
38
|
const react_native_1 = require("react-native");
|
|
42
39
|
const AppColors_1 = require("../styles/AppColors");
|
|
43
40
|
const AppFonts_1 = require("../styles/AppFonts");
|
|
44
41
|
const NetworkIcons_1 = require("./NetworkIcons");
|
|
45
42
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
46
|
-
const AnimatedEntrance_1 = __importDefault(require("./AnimatedEntrance"));
|
|
47
|
-
const helpers_1 = require("../helpers");
|
|
48
|
-
// #15 — copy-to-clipboard control for a single dispatched action
|
|
49
|
-
const ActionCopyButton = ({ value }) => {
|
|
50
|
-
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
51
|
-
return (<react_native_1.Pressable hitSlop={10} onPress={() => {
|
|
52
|
-
(0, helpers_1.copyToClipboard)(value(), 'Action');
|
|
53
|
-
setCopied(true);
|
|
54
|
-
setTimeout(() => setCopied(false), 1200);
|
|
55
|
-
}} style={{
|
|
56
|
-
width: 26,
|
|
57
|
-
height: 26,
|
|
58
|
-
borderRadius: 7,
|
|
59
|
-
alignItems: 'center',
|
|
60
|
-
justifyContent: 'center',
|
|
61
|
-
backgroundColor: copied
|
|
62
|
-
? `${AppColors_1.AppColors.greenColor}1A`
|
|
63
|
-
: AppColors_1.AppColors.grayBackground,
|
|
64
|
-
borderWidth: 1,
|
|
65
|
-
borderColor: AppColors_1.AppColors.dividerColor,
|
|
66
|
-
}}>
|
|
67
|
-
{copied ? (<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor} size={13}/>) : (<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.grayTextWeak} size={13}/>)}
|
|
68
|
-
</react_native_1.Pressable>);
|
|
69
|
-
};
|
|
70
|
-
// #15 — derive the redux module / folder name from an action type.
|
|
71
|
-
// Supports RTK slice convention ("booking/setDate" -> "Booking") and
|
|
72
|
-
// falls back to the first affected slice.
|
|
73
|
-
const getActionModule = (type, affectedSlices) => {
|
|
74
|
-
if (type && type.includes('/')) {
|
|
75
|
-
const prefix = type.split('/')[0];
|
|
76
|
-
if (prefix)
|
|
77
|
-
return prefix.charAt(0).toUpperCase() + prefix.slice(1);
|
|
78
|
-
}
|
|
79
|
-
if (affectedSlices && affectedSlices.length > 0) {
|
|
80
|
-
const s = affectedSlices[0];
|
|
81
|
-
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
82
|
-
}
|
|
83
|
-
return null;
|
|
84
|
-
};
|
|
85
|
-
// Custom icons
|
|
86
|
-
const DatabaseIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
87
|
-
<react_native_svg_1.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"/>
|
|
88
|
-
<react_native_svg_1.Path d="M2 12c0 2.8 4.5 5 10 5s10-2.2 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
89
|
-
<react_native_svg_1.Path d="M2 7c0 2.8 4.5 5 10 5s10-2.2 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
90
|
-
</react_native_svg_1.default>);
|
|
91
|
-
const BoltIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
92
|
-
<react_native_svg_1.Path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" fill={color} stroke={color} strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
93
|
-
</react_native_svg_1.default>);
|
|
94
43
|
const FolderIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
95
44
|
<react_native_svg_1.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"/>
|
|
96
45
|
</react_native_svg_1.default>);
|
|
97
|
-
// Exported icons so the Redux tab's section headers and sub-tab buttons can
|
|
98
|
-
// render real vector icons instead of emoji (which fail to render on some
|
|
99
|
-
// Android/font setups).
|
|
100
46
|
const ReduxStoreIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
101
47
|
<react_native_svg_1.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"/>
|
|
102
48
|
</react_native_svg_1.default>);
|
|
103
49
|
exports.ReduxStoreIcon = ReduxStoreIcon;
|
|
104
|
-
const ReduxBoltIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
105
|
-
<react_native_svg_1.Path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" fill={color} stroke={color} strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
106
|
-
</react_native_svg_1.default>);
|
|
107
|
-
exports.ReduxBoltIcon = ReduxBoltIcon;
|
|
108
|
-
// Action Timeline — a history/clock icon reads as "sequence over time".
|
|
109
|
-
const ReduxTimelineIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
110
|
-
<react_native_svg_1.Path d="M3 3v5h5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
111
|
-
<react_native_svg_1.Path d="M3.05 13A9 9 0 1 0 6 5.3L3 8" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
112
|
-
<react_native_svg_1.Path d="M12 7v5l3 2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
113
|
-
</react_native_svg_1.default>);
|
|
114
|
-
exports.ReduxTimelineIcon = ReduxTimelineIcon;
|
|
115
|
-
// Store Tree — a node hierarchy icon reads as "nested tree structure".
|
|
116
|
-
const ReduxTreeIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
117
|
-
<react_native_svg_1.Path d="M9 4h6v4H9zM3 16h6v4H3zm12 0h6v4h-6z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
118
|
-
<react_native_svg_1.Path d="M12 8v4M6 16v-2h12v2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
119
|
-
</react_native_svg_1.default>);
|
|
120
|
-
exports.ReduxTreeIcon = ReduxTreeIcon;
|
|
121
50
|
const animateTreeLayout = () => {
|
|
122
|
-
|
|
51
|
+
if (react_native_1.Platform.OS === 'ios') {
|
|
52
|
+
react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
|
|
53
|
+
}
|
|
123
54
|
};
|
|
124
55
|
const AnimatedChevron = ({ color, expanded, size, style, }) => {
|
|
125
56
|
const progress = (0, react_1.useRef)(new react_native_1.Animated.Value(expanded ? 1 : 0)).current;
|
|
@@ -138,7 +69,7 @@ const AnimatedChevron = ({ color, expanded, size, style, }) => {
|
|
|
138
69
|
<NetworkIcons_1.ChevronIcon color={color} size={size}/>
|
|
139
70
|
</react_native_1.Animated.View>);
|
|
140
71
|
};
|
|
141
|
-
const ReduxValueNode = ({ name, value, level, search }) => {
|
|
72
|
+
const ReduxValueNode = ({ name, value, level, search, lastAction }) => {
|
|
142
73
|
const [expanded, setExpanded] = (0, react_1.useState)(level < 1);
|
|
143
74
|
const isObject = typeof value === 'object' && value !== null;
|
|
144
75
|
const isArray = Array.isArray(value);
|
|
@@ -166,7 +97,6 @@ const ReduxValueNode = ({ name, value, level, search }) => {
|
|
|
166
97
|
: value === undefined
|
|
167
98
|
? 'undefined'
|
|
168
99
|
: String(value);
|
|
169
|
-
// Pick different colors for primitives
|
|
170
100
|
let valColor = '#0D9488'; // String
|
|
171
101
|
if (value === null || value === undefined) {
|
|
172
102
|
valColor = AppColors_1.AppColors.grayTextWeak;
|
|
@@ -179,13 +109,20 @@ const ReduxValueNode = ({ name, value, level, search }) => {
|
|
|
179
109
|
}
|
|
180
110
|
return (<react_native_1.View style={[reduxValueStyles.treeRow, { paddingLeft: 12 }]}>
|
|
181
111
|
<react_native_1.View style={reduxValueStyles.treeLeafConnector}/>
|
|
182
|
-
<react_native_1.
|
|
183
|
-
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
{
|
|
112
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, flexWrap: 'wrap', gap: 6 }}>
|
|
113
|
+
<react_native_1.Text style={reduxValueStyles.keyText} selectable={true}>
|
|
114
|
+
{nameStr}
|
|
115
|
+
<react_native_1.Text style={reduxValueStyles.colonText}>: </react_native_1.Text>
|
|
116
|
+
<react_native_1.Text style={[reduxValueStyles.valText, { color: valColor }]} selectable={true}>
|
|
117
|
+
{valStr}
|
|
118
|
+
</react_native_1.Text>
|
|
187
119
|
</react_native_1.Text>
|
|
188
|
-
|
|
120
|
+
{lastAction && (<react_native_1.View style={styles.actionTypeBadge}>
|
|
121
|
+
<react_native_1.Text style={styles.actionTypeText} numberOfLines={1}>
|
|
122
|
+
{lastAction.type}
|
|
123
|
+
</react_native_1.Text>
|
|
124
|
+
</react_native_1.View>)}
|
|
125
|
+
</react_native_1.View>
|
|
189
126
|
</react_native_1.View>);
|
|
190
127
|
}
|
|
191
128
|
const keys = Object.keys(value);
|
|
@@ -199,11 +136,18 @@ const ReduxValueNode = ({ name, value, level, search }) => {
|
|
|
199
136
|
}} style={reduxValueStyles.treeRow}>
|
|
200
137
|
<react_native_1.View style={reduxValueStyles.treeLeafConnector}/>
|
|
201
138
|
<AnimatedChevron color={AppColors_1.AppColors.grayTextWeak} expanded={expanded} size={10} style={reduxValueStyles.chevronWrap}/>
|
|
202
|
-
<react_native_1.
|
|
203
|
-
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
139
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, flexWrap: 'wrap', gap: 6 }}>
|
|
140
|
+
<react_native_1.Text style={reduxValueStyles.keyText} selectable={true}>
|
|
141
|
+
{nameStr}
|
|
142
|
+
<react_native_1.Text style={reduxValueStyles.colonText}>: </react_native_1.Text>
|
|
143
|
+
<react_native_1.Text style={reduxValueStyles.summaryText}>{summaryText}</react_native_1.Text>
|
|
144
|
+
</react_native_1.Text>
|
|
145
|
+
{lastAction && (<react_native_1.View style={styles.actionTypeBadge}>
|
|
146
|
+
<react_native_1.Text style={styles.actionTypeText} numberOfLines={1}>
|
|
147
|
+
{lastAction.type}
|
|
148
|
+
</react_native_1.Text>
|
|
149
|
+
</react_native_1.View>)}
|
|
150
|
+
</react_native_1.View>
|
|
207
151
|
</react_native_1.Pressable>
|
|
208
152
|
{expanded && (<react_native_1.View style={reduxValueStyles.treeChildrenContainer}>
|
|
209
153
|
{keys.map(key => (<ReduxValueNode key={key} name={key} value={value[key]} level={level + 1} search={search}/>))}
|
|
@@ -248,7 +192,7 @@ const ReduxTreeView = ({ state, lastActionMap, search, }) => {
|
|
|
248
192
|
<react_native_1.Text style={styles.storeTitle}>Redux Store</react_native_1.Text>
|
|
249
193
|
</react_native_1.View>
|
|
250
194
|
<react_native_1.View style={styles.badge}>
|
|
251
|
-
<react_native_1.Text style={styles.badgeText}>{reducers.length}
|
|
195
|
+
<react_native_1.Text style={styles.badgeText}>{reducers.length} Slices</react_native_1.Text>
|
|
252
196
|
</react_native_1.View>
|
|
253
197
|
</react_native_1.Pressable>
|
|
254
198
|
|
|
@@ -262,7 +206,7 @@ const ReduxTreeView = ({ state, lastActionMap, search, }) => {
|
|
|
262
206
|
{/* Visual Branch Line for Reducer */}
|
|
263
207
|
<react_native_1.View style={[
|
|
264
208
|
styles.reducerVerticalLine,
|
|
265
|
-
isLastReducer && { bottom: '50%' },
|
|
209
|
+
isLastReducer && !isExpanded && { bottom: '50%' },
|
|
266
210
|
]}/>
|
|
267
211
|
|
|
268
212
|
{/* Reducer Header */}
|
|
@@ -272,57 +216,20 @@ const ReduxTreeView = ({ state, lastActionMap, search, }) => {
|
|
|
272
216
|
<react_native_1.View style={styles.iconWrap}>
|
|
273
217
|
<FolderIcon color={AppColors_1.AppColors.purple} size={11}/>
|
|
274
218
|
</react_native_1.View>
|
|
275
|
-
<react_native_1.
|
|
219
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, flexWrap: 'wrap', gap: 6 }}>
|
|
220
|
+
<react_native_1.Text style={styles.reducerText}>{reducerKey}</react_native_1.Text>
|
|
221
|
+
{lastAction && (<react_native_1.View style={styles.actionTypeBadge}>
|
|
222
|
+
<react_native_1.Text style={styles.actionTypeText} numberOfLines={1}>
|
|
223
|
+
{lastAction.type}
|
|
224
|
+
</react_native_1.Text>
|
|
225
|
+
</react_native_1.View>)}
|
|
226
|
+
</react_native_1.View>
|
|
276
227
|
</react_native_1.Pressable>
|
|
277
228
|
|
|
278
229
|
{isExpanded && (<react_native_1.View style={styles.reducerChildren}>
|
|
279
230
|
{/* Vertical line connecting children */}
|
|
280
231
|
<react_native_1.View style={styles.childrenVerticalLine}/>
|
|
281
|
-
|
|
282
|
-
{/* Node 1: Last Action */}
|
|
283
|
-
<react_native_1.View style={styles.childItem}>
|
|
284
|
-
<react_native_1.View style={styles.childHorizontalLine}/>
|
|
285
|
-
<react_native_1.View style={[styles.iconWrap, { backgroundColor: '#FDF2F8' }]}>
|
|
286
|
-
<BoltIcon color="#DB2777" size={11}/>
|
|
287
|
-
</react_native_1.View>
|
|
288
|
-
<react_native_1.View style={{ flex: 1 }}>
|
|
289
|
-
<react_native_1.View style={{
|
|
290
|
-
flexDirection: 'row',
|
|
291
|
-
alignItems: 'center',
|
|
292
|
-
flexWrap: 'wrap',
|
|
293
|
-
gap: 6,
|
|
294
|
-
}}>
|
|
295
|
-
<react_native_1.Text style={styles.childLabel}>Last Action:</react_native_1.Text>
|
|
296
|
-
{lastAction ? (<react_native_1.View style={styles.actionTypeBadge}>
|
|
297
|
-
<react_native_1.Text style={styles.actionTypeText}>
|
|
298
|
-
{lastAction.type}
|
|
299
|
-
</react_native_1.Text>
|
|
300
|
-
</react_native_1.View>) : (<react_native_1.Text style={styles.noActionText}>
|
|
301
|
-
None dispatched
|
|
302
|
-
</react_native_1.Text>)}
|
|
303
|
-
</react_native_1.View>
|
|
304
|
-
{lastAction && (<react_native_1.Text style={styles.timestampText}>
|
|
305
|
-
Dispatched: {lastAction.timestamp}
|
|
306
|
-
</react_native_1.Text>)}
|
|
307
|
-
{lastAction && lastAction.payload !== null && (<react_native_1.View style={{ marginTop: 6 }}>
|
|
308
|
-
<ReduxValueNode name="payload" value={lastAction.payload} level={0} search={search}/>
|
|
309
|
-
</react_native_1.View>)}
|
|
310
|
-
</react_native_1.View>
|
|
311
|
-
</react_native_1.View>
|
|
312
|
-
|
|
313
|
-
{/* Node 2: State Data */}
|
|
314
|
-
<react_native_1.View style={styles.childItem}>
|
|
315
|
-
<react_native_1.View style={[styles.childHorizontalLine, { bottom: '50%' }]}/>
|
|
316
|
-
<react_native_1.View style={[styles.iconWrap, { backgroundColor: '#ECFDF5' }]}>
|
|
317
|
-
<DatabaseIcon color="#059669" size={11}/>
|
|
318
|
-
</react_native_1.View>
|
|
319
|
-
<react_native_1.View style={{ flex: 1 }}>
|
|
320
|
-
<react_native_1.Text style={styles.childLabel}>State Slice Data</react_native_1.Text>
|
|
321
|
-
<react_native_1.View style={{ marginTop: 6 }}>
|
|
322
|
-
<ReduxValueNode name="state" value={sliceData} level={0} search={search}/>
|
|
323
|
-
</react_native_1.View>
|
|
324
|
-
</react_native_1.View>
|
|
325
|
-
</react_native_1.View>
|
|
232
|
+
{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}/>)}
|
|
326
233
|
</react_native_1.View>)}
|
|
327
234
|
</react_native_1.View>);
|
|
328
235
|
})}
|
|
@@ -330,135 +237,6 @@ const ReduxTreeView = ({ state, lastActionMap, search, }) => {
|
|
|
330
237
|
</react_native_1.View>);
|
|
331
238
|
};
|
|
332
239
|
exports.ReduxTreeView = ReduxTreeView;
|
|
333
|
-
const ReduxActionTimeline = ({ history, onClear, search, }) => {
|
|
334
|
-
const [expandedActionId, setExpandedActionId] = (0, react_1.useState)(null);
|
|
335
|
-
const toggleExpand = (id) => {
|
|
336
|
-
animateTreeLayout();
|
|
337
|
-
setExpandedActionId(prev => (prev === id ? null : id));
|
|
338
|
-
};
|
|
339
|
-
const filteredHistory = history.filter(action => {
|
|
340
|
-
if (!search)
|
|
341
|
-
return true;
|
|
342
|
-
const s = search.toLowerCase();
|
|
343
|
-
if (action.type.toLowerCase().includes(s))
|
|
344
|
-
return true;
|
|
345
|
-
if (action.affectedSlices.some(slice => slice.toLowerCase().includes(s)))
|
|
346
|
-
return true;
|
|
347
|
-
if (action.payload && typeof action.payload === 'object') {
|
|
348
|
-
return JSON.stringify(action.payload).toLowerCase().includes(s);
|
|
349
|
-
}
|
|
350
|
-
return false;
|
|
351
|
-
});
|
|
352
|
-
return (<react_native_1.View style={timelineStyles.container}>
|
|
353
|
-
<react_native_1.View style={timelineStyles.headerRow}>
|
|
354
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
355
|
-
<exports.ReduxBoltIcon color={AppColors_1.AppColors.purple} size={15}/>
|
|
356
|
-
<react_native_1.Text style={timelineStyles.headerTitle}>
|
|
357
|
-
Dispatched Actions ({filteredHistory.length})
|
|
358
|
-
</react_native_1.Text>
|
|
359
|
-
</react_native_1.View>
|
|
360
|
-
{history.length > 0 && (<react_native_1.Pressable onPress={onClear} style={timelineStyles.clearBtn}>
|
|
361
|
-
<react_native_1.Text style={timelineStyles.clearBtnText}>Clear Log</react_native_1.Text>
|
|
362
|
-
</react_native_1.Pressable>)}
|
|
363
|
-
</react_native_1.View>
|
|
364
|
-
|
|
365
|
-
{filteredHistory.length === 0 ? (<react_native_1.View style={timelineStyles.emptyContainer}>
|
|
366
|
-
<react_native_1.Text style={timelineStyles.emptyText}>
|
|
367
|
-
{history.length === 0
|
|
368
|
-
? 'No actions dispatched yet.\nDispatch actions in your application to see the timeline.'
|
|
369
|
-
: 'No matching actions found.'}
|
|
370
|
-
</react_native_1.Text>
|
|
371
|
-
</react_native_1.View>) : (<react_native_1.View style={timelineStyles.listContainer}>
|
|
372
|
-
{filteredHistory.map((item, index) => {
|
|
373
|
-
const isLast = index === filteredHistory.length - 1;
|
|
374
|
-
const isExpanded = expandedActionId === item.id;
|
|
375
|
-
return (<AnimatedEntrance_1.default key={item.id} index={index} distance={8} style={timelineStyles.timelineItem}>
|
|
376
|
-
{/* Visual Line */}
|
|
377
|
-
<react_native_1.View style={[
|
|
378
|
-
timelineStyles.verticalLine,
|
|
379
|
-
isLast && { bottom: '50%' },
|
|
380
|
-
]}/>
|
|
381
|
-
<react_native_1.View style={timelineStyles.circleIndicator}>
|
|
382
|
-
<react_native_1.View style={timelineStyles.circleInner}/>
|
|
383
|
-
</react_native_1.View>
|
|
384
|
-
|
|
385
|
-
{/* Card */}
|
|
386
|
-
<react_native_1.Pressable onPress={() => toggleExpand(item.id)} style={[
|
|
387
|
-
timelineStyles.card,
|
|
388
|
-
isExpanded && {
|
|
389
|
-
borderColor: AppColors_1.AppColors.purple,
|
|
390
|
-
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
391
|
-
},
|
|
392
|
-
]}>
|
|
393
|
-
<react_native_1.View style={timelineStyles.cardHeader}>
|
|
394
|
-
<react_native_1.View style={{
|
|
395
|
-
flexDirection: 'row',
|
|
396
|
-
alignItems: 'center',
|
|
397
|
-
gap: 6,
|
|
398
|
-
flex: 1,
|
|
399
|
-
}}>
|
|
400
|
-
{(() => {
|
|
401
|
-
const moduleName = getActionModule(item.type, item.affectedSlices);
|
|
402
|
-
return moduleName ? (<react_native_1.View style={{
|
|
403
|
-
paddingHorizontal: 7,
|
|
404
|
-
paddingVertical: 2,
|
|
405
|
-
borderRadius: 6,
|
|
406
|
-
backgroundColor: `${AppColors_1.AppColors.purple}14`,
|
|
407
|
-
borderWidth: 1,
|
|
408
|
-
borderColor: `${AppColors_1.AppColors.purple}33`,
|
|
409
|
-
}}>
|
|
410
|
-
<react_native_1.Text style={{
|
|
411
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
412
|
-
fontSize: 9.5,
|
|
413
|
-
color: AppColors_1.AppColors.purple,
|
|
414
|
-
letterSpacing: 0.2,
|
|
415
|
-
}}>
|
|
416
|
-
{moduleName}
|
|
417
|
-
</react_native_1.Text>
|
|
418
|
-
</react_native_1.View>) : null;
|
|
419
|
-
})()}
|
|
420
|
-
<react_native_1.View style={timelineStyles.typeBadge}>
|
|
421
|
-
<react_native_1.Text style={timelineStyles.typeText}>{item.type}</react_native_1.Text>
|
|
422
|
-
</react_native_1.View>
|
|
423
|
-
</react_native_1.View>
|
|
424
|
-
<react_native_1.View style={{
|
|
425
|
-
flexDirection: 'row',
|
|
426
|
-
alignItems: 'center',
|
|
427
|
-
gap: 8,
|
|
428
|
-
}}>
|
|
429
|
-
<react_native_1.Text style={timelineStyles.timestamp}>
|
|
430
|
-
{item.timestamp}
|
|
431
|
-
</react_native_1.Text>
|
|
432
|
-
<ActionCopyButton value={() => ({
|
|
433
|
-
type: item.type,
|
|
434
|
-
payload: item.payload,
|
|
435
|
-
})}/>
|
|
436
|
-
</react_native_1.View>
|
|
437
|
-
</react_native_1.View>
|
|
438
|
-
|
|
439
|
-
{item.affectedSlices.length > 0 && (<react_native_1.View style={timelineStyles.slicesRow}>
|
|
440
|
-
<react_native_1.Text style={timelineStyles.slicesLabel}>Affected:</react_native_1.Text>
|
|
441
|
-
{item.affectedSlices.map(slice => (<react_native_1.View key={slice} style={timelineStyles.slicePill}>
|
|
442
|
-
<react_native_1.Text style={timelineStyles.sliceText}>{slice}</react_native_1.Text>
|
|
443
|
-
</react_native_1.View>))}
|
|
444
|
-
</react_native_1.View>)}
|
|
445
|
-
|
|
446
|
-
{isExpanded && (<react_native_1.View style={timelineStyles.payloadContainer}>
|
|
447
|
-
<react_native_1.Text style={timelineStyles.payloadTitle}>Payload</react_native_1.Text>
|
|
448
|
-
{item.payload !== null &&
|
|
449
|
-
typeof item.payload === 'object' ? (<ReduxValueNode name="action.payload" value={item.payload} level={0} search={search}/>) : (<react_native_1.Text style={timelineStyles.primitivePayload}>
|
|
450
|
-
{item.payload === null
|
|
451
|
-
? 'null'
|
|
452
|
-
: String(item.payload)}
|
|
453
|
-
</react_native_1.Text>)}
|
|
454
|
-
</react_native_1.View>)}
|
|
455
|
-
</react_native_1.Pressable>
|
|
456
|
-
</AnimatedEntrance_1.default>);
|
|
457
|
-
})}
|
|
458
|
-
</react_native_1.View>)}
|
|
459
|
-
</react_native_1.View>);
|
|
460
|
-
};
|
|
461
|
-
exports.ReduxActionTimeline = ReduxActionTimeline;
|
|
462
240
|
const reduxValueStyles = react_native_1.StyleSheet.create({
|
|
463
241
|
treeNodeBlock: {
|
|
464
242
|
marginTop: 4,
|
|
@@ -510,158 +288,6 @@ const reduxValueStyles = react_native_1.StyleSheet.create({
|
|
|
510
288
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
511
289
|
},
|
|
512
290
|
});
|
|
513
|
-
const timelineStyles = react_native_1.StyleSheet.create({
|
|
514
|
-
container: {
|
|
515
|
-
flex: 1,
|
|
516
|
-
},
|
|
517
|
-
headerRow: {
|
|
518
|
-
flexDirection: 'row',
|
|
519
|
-
alignItems: 'center',
|
|
520
|
-
justifyContent: 'space-between',
|
|
521
|
-
marginBottom: 12,
|
|
522
|
-
},
|
|
523
|
-
headerTitle: {
|
|
524
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
525
|
-
fontSize: 14,
|
|
526
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
527
|
-
},
|
|
528
|
-
clearBtn: {
|
|
529
|
-
backgroundColor: 'rgba(239, 68, 68, 0.08)',
|
|
530
|
-
borderColor: 'rgba(239, 68, 68, 0.2)',
|
|
531
|
-
borderWidth: 1,
|
|
532
|
-
paddingHorizontal: 8,
|
|
533
|
-
paddingVertical: 4,
|
|
534
|
-
borderRadius: 6,
|
|
535
|
-
},
|
|
536
|
-
clearBtnText: {
|
|
537
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
538
|
-
fontSize: 10,
|
|
539
|
-
color: '#EF4444',
|
|
540
|
-
},
|
|
541
|
-
emptyContainer: {
|
|
542
|
-
paddingVertical: 32,
|
|
543
|
-
alignItems: 'center',
|
|
544
|
-
justifyContent: 'center',
|
|
545
|
-
},
|
|
546
|
-
emptyText: {
|
|
547
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
548
|
-
fontSize: 12,
|
|
549
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
550
|
-
textAlign: 'center',
|
|
551
|
-
lineHeight: 18,
|
|
552
|
-
},
|
|
553
|
-
listContainer: {
|
|
554
|
-
paddingLeft: 12,
|
|
555
|
-
},
|
|
556
|
-
timelineItem: {
|
|
557
|
-
position: 'relative',
|
|
558
|
-
paddingLeft: 20,
|
|
559
|
-
marginBottom: 12,
|
|
560
|
-
},
|
|
561
|
-
verticalLine: {
|
|
562
|
-
position: 'absolute',
|
|
563
|
-
left: 4,
|
|
564
|
-
top: 0,
|
|
565
|
-
bottom: -12,
|
|
566
|
-
width: 1,
|
|
567
|
-
backgroundColor: AppColors_1.AppColors.dividerColor,
|
|
568
|
-
},
|
|
569
|
-
circleIndicator: {
|
|
570
|
-
position: 'absolute',
|
|
571
|
-
left: 0,
|
|
572
|
-
top: 10,
|
|
573
|
-
width: 9,
|
|
574
|
-
height: 9,
|
|
575
|
-
borderRadius: 4.5,
|
|
576
|
-
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
577
|
-
borderWidth: 1,
|
|
578
|
-
borderColor: AppColors_1.AppColors.purple,
|
|
579
|
-
alignItems: 'center',
|
|
580
|
-
justifyContent: 'center',
|
|
581
|
-
},
|
|
582
|
-
circleInner: {
|
|
583
|
-
width: 3,
|
|
584
|
-
height: 3,
|
|
585
|
-
borderRadius: 1.5,
|
|
586
|
-
backgroundColor: AppColors_1.AppColors.purple,
|
|
587
|
-
},
|
|
588
|
-
card: {
|
|
589
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
590
|
-
borderWidth: 1,
|
|
591
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
592
|
-
borderRadius: 8,
|
|
593
|
-
padding: 10,
|
|
594
|
-
},
|
|
595
|
-
cardHeader: {
|
|
596
|
-
flexDirection: 'row',
|
|
597
|
-
alignItems: 'center',
|
|
598
|
-
justifyContent: 'space-between',
|
|
599
|
-
gap: 12,
|
|
600
|
-
},
|
|
601
|
-
typeBadge: {
|
|
602
|
-
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
603
|
-
borderColor: 'rgba(104,75,155,0.18)',
|
|
604
|
-
borderWidth: 1,
|
|
605
|
-
borderRadius: 6,
|
|
606
|
-
paddingHorizontal: 6,
|
|
607
|
-
paddingVertical: 2.5,
|
|
608
|
-
flexShrink: 1,
|
|
609
|
-
},
|
|
610
|
-
typeText: {
|
|
611
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
612
|
-
fontSize: 11,
|
|
613
|
-
color: AppColors_1.AppColors.purple,
|
|
614
|
-
},
|
|
615
|
-
timestamp: {
|
|
616
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
617
|
-
fontSize: 10,
|
|
618
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
619
|
-
},
|
|
620
|
-
slicesRow: {
|
|
621
|
-
flexDirection: 'row',
|
|
622
|
-
alignItems: 'center',
|
|
623
|
-
flexWrap: 'wrap',
|
|
624
|
-
gap: 4,
|
|
625
|
-
marginTop: 6,
|
|
626
|
-
},
|
|
627
|
-
slicesLabel: {
|
|
628
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
629
|
-
fontSize: 10,
|
|
630
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
631
|
-
marginRight: 2,
|
|
632
|
-
},
|
|
633
|
-
slicePill: {
|
|
634
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
635
|
-
borderColor: AppColors_1.AppColors.dividerColor,
|
|
636
|
-
borderWidth: 1,
|
|
637
|
-
borderRadius: 4,
|
|
638
|
-
paddingHorizontal: 4,
|
|
639
|
-
paddingVertical: 1,
|
|
640
|
-
},
|
|
641
|
-
sliceText: {
|
|
642
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
643
|
-
fontSize: 9,
|
|
644
|
-
color: AppColors_1.AppColors.grayText,
|
|
645
|
-
},
|
|
646
|
-
payloadContainer: {
|
|
647
|
-
marginTop: 10,
|
|
648
|
-
borderTopWidth: 1,
|
|
649
|
-
borderTopColor: AppColors_1.AppColors.dividerColor,
|
|
650
|
-
paddingTop: 8,
|
|
651
|
-
},
|
|
652
|
-
payloadTitle: {
|
|
653
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
654
|
-
fontSize: 10,
|
|
655
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
656
|
-
textTransform: 'uppercase',
|
|
657
|
-
marginBottom: 4,
|
|
658
|
-
},
|
|
659
|
-
primitivePayload: {
|
|
660
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
661
|
-
fontSize: 11,
|
|
662
|
-
color: AppColors_1.AppColors.grayTextStrong,
|
|
663
|
-
},
|
|
664
|
-
});
|
|
665
291
|
const styles = react_native_1.StyleSheet.create({
|
|
666
292
|
container: {
|
|
667
293
|
flex: 1,
|
|
@@ -756,27 +382,6 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
756
382
|
width: 1,
|
|
757
383
|
backgroundColor: AppColors_1.AppColors.dividerColor,
|
|
758
384
|
},
|
|
759
|
-
childItem: {
|
|
760
|
-
flexDirection: 'row',
|
|
761
|
-
alignItems: 'flex-start',
|
|
762
|
-
gap: 8,
|
|
763
|
-
position: 'relative',
|
|
764
|
-
paddingLeft: 12,
|
|
765
|
-
},
|
|
766
|
-
childHorizontalLine: {
|
|
767
|
-
position: 'absolute',
|
|
768
|
-
left: -12,
|
|
769
|
-
top: 10,
|
|
770
|
-
width: 12,
|
|
771
|
-
height: 1,
|
|
772
|
-
backgroundColor: AppColors_1.AppColors.dividerColor,
|
|
773
|
-
},
|
|
774
|
-
childLabel: {
|
|
775
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
776
|
-
fontSize: 11.5,
|
|
777
|
-
color: AppColors_1.AppColors.grayText,
|
|
778
|
-
marginTop: 2,
|
|
779
|
-
},
|
|
780
385
|
actionTypeBadge: {
|
|
781
386
|
backgroundColor: '#FCE7F3',
|
|
782
387
|
borderColor: '#FBCFE8',
|
|
@@ -784,21 +389,11 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
784
389
|
borderRadius: 6,
|
|
785
390
|
paddingHorizontal: 6,
|
|
786
391
|
paddingVertical: 2,
|
|
392
|
+
alignSelf: 'flex-start',
|
|
787
393
|
},
|
|
788
394
|
actionTypeText: {
|
|
789
395
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
790
|
-
fontSize: 10
|
|
396
|
+
fontSize: 10,
|
|
791
397
|
color: '#BE185D',
|
|
792
398
|
},
|
|
793
|
-
noActionText: {
|
|
794
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
795
|
-
fontSize: 11,
|
|
796
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
797
|
-
},
|
|
798
|
-
timestampText: {
|
|
799
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
800
|
-
fontSize: 9.5,
|
|
801
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
802
|
-
marginTop: 2,
|
|
803
|
-
},
|
|
804
399
|
});
|
|
@@ -36,6 +36,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const react_1 = __importStar(require("react"));
|
|
37
37
|
const react_native_1 = require("react-native");
|
|
38
38
|
const TouchableScale = ({ onPress, style, children, hitSlop, disabled, }) => {
|
|
39
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
40
|
+
return (<react_native_1.Pressable disabled={disabled} onPress={onPress} hitSlop={hitSlop} style={({ pressed }) => [
|
|
41
|
+
style,
|
|
42
|
+
{ opacity: pressed ? 0.75 : 1 },
|
|
43
|
+
]}>
|
|
44
|
+
{children}
|
|
45
|
+
</react_native_1.Pressable>);
|
|
46
|
+
}
|
|
39
47
|
const scale = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
40
48
|
const opacity = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
41
49
|
const animatePress = (pressed) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "1.1.
|
|
1
|
+
export declare const LIB_VERSION = "1.1.12";
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LIB_VERSION = void 0;
|
|
4
4
|
// AUTO-GENERATED FILE — do not edit by hand.
|
|
5
5
|
// Regenerated from package.json on every build by scripts/gen-version.js.
|
|
6
|
-
exports.LIB_VERSION = '1.1.
|
|
6
|
+
exports.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;
|