@buoy-gg/redux 7.0.33 → 7.0.35
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/lib/commonjs/preset.js +14 -22
- package/lib/commonjs/redux/components/ReduxActionButton.js +1 -1
- package/lib/commonjs/redux/components/ReduxActionDetailContent.js +5 -5
- package/lib/commonjs/redux/components/ReduxActionDetailView.js +3 -3
- package/lib/commonjs/redux/components/ReduxActionInfoView.js +16 -68
- package/lib/commonjs/redux/components/ReduxActionItem.js +65 -119
- package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +15 -109
- package/lib/commonjs/redux/components/ReduxModal.js +25 -70
- package/lib/commonjs/redux/hooks/useReduxActions.js +16 -33
- package/lib/commonjs/redux/sync/reduxSyncAdapter.js +11 -29
- package/lib/commonjs/redux/utils/reduxActionStore.js +24 -94
- package/lib/commonjs/redux/utils/snapshotProvider.js +17 -80
- package/lib/module/preset.js +13 -20
- package/lib/module/redux/components/ReduxActionButton.js +2 -2
- package/lib/module/redux/components/ReduxActionDetailContent.js +6 -6
- package/lib/module/redux/components/ReduxActionDetailView.js +4 -4
- package/lib/module/redux/components/ReduxActionInfoView.js +9 -61
- package/lib/module/redux/components/ReduxActionItem.js +66 -120
- package/lib/module/redux/components/ReduxDetailViewToggle.js +17 -111
- package/lib/module/redux/components/ReduxModal.js +27 -72
- package/lib/module/redux/hooks/useReduxActions.js +17 -34
- package/lib/module/redux/sync/reduxSyncAdapter.js +12 -30
- package/lib/module/redux/utils/reduxActionStore.js +25 -95
- package/lib/module/redux/utils/snapshotProvider.js +18 -81
- package/lib/typescript/preset.d.ts +3 -9
- package/lib/typescript/preset.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts +2 -1
- package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxModal.d.ts.map +1 -1
- package/lib/typescript/redux/hooks/useReduxActions.d.ts +3 -0
- package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +1 -1
- package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts +68 -82
- package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/redux/utils/reduxActionStore.d.ts +2 -29
- package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +1 -1
- package/package.json +4 -4
package/lib/commonjs/preset.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createReduxTool =
|
|
7
|
-
exports.reduxToolPreset = void 0;
|
|
6
|
+
exports.reduxToolPreset = exports.createReduxTool = void 0;
|
|
8
7
|
var _ReduxModal = require("./redux/components/ReduxModal");
|
|
9
8
|
var _ReduxIcon = require("./redux/components/ReduxIcon");
|
|
9
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
/**
|
|
12
12
|
* Pre-configured Redux DevTools preset for FloatingDevTools
|
|
@@ -48,7 +48,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
48
48
|
* - State diff visualization
|
|
49
49
|
* - Filter by action type
|
|
50
50
|
*/
|
|
51
|
-
const reduxToolPreset = exports.reduxToolPreset = {
|
|
51
|
+
const reduxToolPreset = exports.reduxToolPreset = (0, _sharedUi.defineToolPreset)({
|
|
52
52
|
id: "redux",
|
|
53
53
|
name: "REDUX",
|
|
54
54
|
description: "Redux action & state inspector",
|
|
@@ -62,7 +62,7 @@ const reduxToolPreset = exports.reduxToolPreset = {
|
|
|
62
62
|
props: {
|
|
63
63
|
enableSharedModalDimensions: false
|
|
64
64
|
}
|
|
65
|
-
};
|
|
65
|
+
});
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Create a custom Redux DevTools configuration.
|
|
@@ -78,21 +78,13 @@ const reduxToolPreset = exports.reduxToolPreset = {
|
|
|
78
78
|
* });
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
color: options?.iconColor
|
|
92
|
-
}),
|
|
93
|
-
component: _ReduxModal.ReduxModal,
|
|
94
|
-
props: {
|
|
95
|
-
enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
81
|
+
const createReduxTool = exports.createReduxTool = (0, _sharedUi.createToolFactory)(reduxToolPreset, options => ({
|
|
82
|
+
enableSharedModalDimensions: options.enableSharedModalDimensions ?? false
|
|
83
|
+
}), options => ({
|
|
84
|
+
icon: ({
|
|
85
|
+
size
|
|
86
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxIcon.ReduxIcon, {
|
|
87
|
+
size: size,
|
|
88
|
+
color: options.iconColor
|
|
89
|
+
})
|
|
90
|
+
}));
|
|
@@ -359,7 +359,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
359
359
|
valueLabel: {
|
|
360
360
|
fontSize: 10,
|
|
361
361
|
color: _sharedUi.night.color.textSecondary,
|
|
362
|
-
fontFamily:
|
|
362
|
+
fontFamily: _sharedUi.monoFont,
|
|
363
363
|
letterSpacing: 0.5,
|
|
364
364
|
fontWeight: "600"
|
|
365
365
|
},
|
|
@@ -376,7 +376,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
376
376
|
actionText: {
|
|
377
377
|
fontSize: 9,
|
|
378
378
|
fontWeight: "700",
|
|
379
|
-
fontFamily:
|
|
379
|
+
fontFamily: _sharedUi.monoFont,
|
|
380
380
|
letterSpacing: 0.3
|
|
381
381
|
},
|
|
382
382
|
typeBadge: {
|
|
@@ -389,7 +389,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
389
389
|
fontSize: 9,
|
|
390
390
|
fontWeight: "600",
|
|
391
391
|
color: _sharedUi.night.color.textTertiary,
|
|
392
|
-
fontFamily:
|
|
392
|
+
fontFamily: _sharedUi.monoFont
|
|
393
393
|
},
|
|
394
394
|
valueBox: {
|
|
395
395
|
// Inset code box — darker than the card, the night track color.
|
|
@@ -407,7 +407,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
407
407
|
valueText: {
|
|
408
408
|
fontSize: 12,
|
|
409
409
|
color: _sharedUi.night.color.text,
|
|
410
|
-
fontFamily:
|
|
410
|
+
fontFamily: _sharedUi.monoFont,
|
|
411
411
|
lineHeight: 18
|
|
412
412
|
},
|
|
413
413
|
// Diff view styles
|
|
@@ -427,7 +427,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
427
427
|
actionTextSmall: {
|
|
428
428
|
fontSize: 8,
|
|
429
429
|
fontWeight: "700",
|
|
430
|
-
fontFamily:
|
|
430
|
+
fontFamily: _sharedUi.monoFont
|
|
431
431
|
},
|
|
432
432
|
dataViewerContainer: {
|
|
433
433
|
marginTop: -12,
|
|
@@ -302,7 +302,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
302
302
|
fontSize: 14,
|
|
303
303
|
fontWeight: "600",
|
|
304
304
|
color: _sharedUi.night.color.text,
|
|
305
|
-
fontFamily:
|
|
305
|
+
fontFamily: _sharedUi.monoFont,
|
|
306
306
|
marginBottom: 6
|
|
307
307
|
},
|
|
308
308
|
headerMeta: {
|
|
@@ -317,7 +317,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
317
317
|
durationText: {
|
|
318
318
|
fontSize: 11,
|
|
319
319
|
color: _sharedUi.night.color.textTertiary,
|
|
320
|
-
fontFamily:
|
|
320
|
+
fontFamily: _sharedUi.monoFont
|
|
321
321
|
},
|
|
322
322
|
changeBadge: {
|
|
323
323
|
backgroundColor: _sharedUi.macOSColors.semantic.warningBackground,
|
|
@@ -383,7 +383,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
383
383
|
diffPath: {
|
|
384
384
|
fontSize: 12,
|
|
385
385
|
color: _sharedUi.night.color.text,
|
|
386
|
-
fontFamily:
|
|
386
|
+
fontFamily: _sharedUi.monoFont
|
|
387
387
|
},
|
|
388
388
|
diffValues: {
|
|
389
389
|
padding: 8,
|
|
@@ -109,37 +109,6 @@ function SectionHeader({
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
/**
|
|
113
|
-
* Info row component for key-value display
|
|
114
|
-
*/
|
|
115
|
-
function InfoRow({
|
|
116
|
-
label,
|
|
117
|
-
value,
|
|
118
|
-
valueColor,
|
|
119
|
-
mono = false,
|
|
120
|
-
testID
|
|
121
|
-
}) {
|
|
122
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
123
|
-
style: styles.infoRow,
|
|
124
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
125
|
-
style: styles.infoLabel,
|
|
126
|
-
children: label
|
|
127
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
128
|
-
style: [styles.infoValue, mono && styles.infoValueMono, valueColor && {
|
|
129
|
-
color: valueColor
|
|
130
|
-
}]
|
|
131
|
-
// `ellipsizeMode="middle"` truncates the RENDERED text and iOS reports
|
|
132
|
-
// the truncated string back, so anything a test reads off one of these
|
|
133
|
-
// rows has to be short enough to fit on the line.
|
|
134
|
-
,
|
|
135
|
-
numberOfLines: 1,
|
|
136
|
-
ellipsizeMode: "middle",
|
|
137
|
-
testID: testID,
|
|
138
|
-
children: value
|
|
139
|
-
})]
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
112
|
/**
|
|
144
113
|
* Format timestamp for display
|
|
145
114
|
*/
|
|
@@ -229,17 +198,17 @@ const ReduxActionInfoView = exports.ReduxActionInfoView = /*#__PURE__*/(0, _reac
|
|
|
229
198
|
title: "ACTION INFO"
|
|
230
199
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
231
200
|
style: styles.cardContent,
|
|
232
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
201
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
233
202
|
label: "Type",
|
|
234
203
|
value: action.type,
|
|
235
204
|
mono: true,
|
|
236
205
|
testID: `${_testIDs.REDUX_TEST_ID}-info-type`
|
|
237
|
-
}), action.sliceName && /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
206
|
+
}), action.sliceName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
238
207
|
label: "Slice",
|
|
239
208
|
value: action.sliceName,
|
|
240
209
|
mono: true,
|
|
241
210
|
testID: `${_testIDs.REDUX_TEST_ID}-info-slice`
|
|
242
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
211
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
243
212
|
label: "Action",
|
|
244
213
|
value: action.actionName,
|
|
245
214
|
mono: true,
|
|
@@ -411,11 +380,11 @@ const ReduxActionInfoView = exports.ReduxActionInfoView = /*#__PURE__*/(0, _reac
|
|
|
411
380
|
})
|
|
412
381
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
413
382
|
style: styles.cardContent,
|
|
414
|
-
children: [action.meta?.requestId && /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
383
|
+
children: [action.meta?.requestId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
415
384
|
label: "Request ID",
|
|
416
385
|
value: action.meta.requestId,
|
|
417
386
|
mono: true
|
|
418
|
-
}), action.meta?.requestStatus && /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
387
|
+
}), action.meta?.requestStatus && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
419
388
|
label: "Status",
|
|
420
389
|
value: action.meta.requestStatus.toUpperCase(),
|
|
421
390
|
valueColor: categoryInfo.color,
|
|
@@ -438,15 +407,15 @@ const ReduxActionInfoView = exports.ReduxActionInfoView = /*#__PURE__*/(0, _reac
|
|
|
438
407
|
children: JSON.stringify(action.meta.arg)
|
|
439
408
|
})
|
|
440
409
|
})]
|
|
441
|
-
}), action.meta?.rejectedWithValue && /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
410
|
+
}), action.meta?.rejectedWithValue && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
442
411
|
label: "Rejected With Value",
|
|
443
412
|
value: "true",
|
|
444
413
|
valueColor: _sharedUi.buoyColors.error
|
|
445
|
-
}), action.meta?.aborted && /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
414
|
+
}), action.meta?.aborted && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
446
415
|
label: "Aborted",
|
|
447
416
|
value: "true",
|
|
448
417
|
valueColor: _sharedUi.buoyColors.warning
|
|
449
|
-
}), action.meta?.condition && /*#__PURE__*/(0, _jsxRuntime.jsx)(InfoRow, {
|
|
418
|
+
}), action.meta?.condition && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
|
|
450
419
|
label: "Condition",
|
|
451
420
|
value: "true",
|
|
452
421
|
valueColor: _sharedUi.night.color.textTertiary
|
|
@@ -603,33 +572,12 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
603
572
|
fontWeight: "600",
|
|
604
573
|
letterSpacing: 0.5,
|
|
605
574
|
color: _sharedUi.night.color.accent,
|
|
606
|
-
fontFamily:
|
|
575
|
+
fontFamily: _sharedUi.monoFont
|
|
607
576
|
},
|
|
608
577
|
cardContent: {
|
|
609
578
|
padding: 14,
|
|
610
579
|
gap: 10
|
|
611
580
|
},
|
|
612
|
-
infoRow: {
|
|
613
|
-
flexDirection: "row",
|
|
614
|
-
alignItems: "center",
|
|
615
|
-
justifyContent: "space-between"
|
|
616
|
-
},
|
|
617
|
-
infoLabel: {
|
|
618
|
-
fontSize: 11,
|
|
619
|
-
color: _sharedUi.night.color.textTertiary,
|
|
620
|
-
fontWeight: "500"
|
|
621
|
-
},
|
|
622
|
-
infoValue: {
|
|
623
|
-
fontSize: 11,
|
|
624
|
-
color: _sharedUi.night.color.text,
|
|
625
|
-
fontWeight: "500",
|
|
626
|
-
flex: 1,
|
|
627
|
-
textAlign: "right",
|
|
628
|
-
marginLeft: 12
|
|
629
|
-
},
|
|
630
|
-
infoValueMono: {
|
|
631
|
-
fontFamily: "monospace"
|
|
632
|
-
},
|
|
633
581
|
badgeRow: {
|
|
634
582
|
flexDirection: "row",
|
|
635
583
|
flexWrap: "wrap",
|
|
@@ -662,7 +610,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
662
610
|
fontSize: 9,
|
|
663
611
|
fontWeight: "600",
|
|
664
612
|
color: _sharedUi.night.color.textSecondary,
|
|
665
|
-
fontFamily:
|
|
613
|
+
fontFamily: _sharedUi.monoFont
|
|
666
614
|
},
|
|
667
615
|
durationTextSlow: {
|
|
668
616
|
color: _sharedUi.buoyColors.error
|
|
@@ -702,7 +650,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
702
650
|
fontSize: 8,
|
|
703
651
|
fontWeight: "600",
|
|
704
652
|
color: _sharedUi.night.color.textTertiary,
|
|
705
|
-
fontFamily:
|
|
653
|
+
fontFamily: _sharedUi.monoFont
|
|
706
654
|
},
|
|
707
655
|
dataViewerContainer: {
|
|
708
656
|
backgroundColor: _sharedUi.night.color.bg,
|
|
@@ -727,7 +675,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
727
675
|
argValue: {
|
|
728
676
|
fontSize: 11,
|
|
729
677
|
color: _sharedUi.night.color.text,
|
|
730
|
-
fontFamily:
|
|
678
|
+
fontFamily: _sharedUi.monoFont,
|
|
731
679
|
padding: 10
|
|
732
680
|
},
|
|
733
681
|
errorBadge: {
|
|
@@ -745,7 +693,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
745
693
|
errorText: {
|
|
746
694
|
fontSize: 12,
|
|
747
695
|
color: _sharedUi.buoyColors.error,
|
|
748
|
-
fontFamily:
|
|
696
|
+
fontFamily: _sharedUi.monoFont,
|
|
749
697
|
padding: 14
|
|
750
698
|
},
|
|
751
699
|
// Async Operation / Related Actions styles
|
|
@@ -765,7 +713,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
765
713
|
fontSize: 12,
|
|
766
714
|
fontWeight: "600",
|
|
767
715
|
color: _sharedUi.night.color.text,
|
|
768
|
-
fontFamily:
|
|
716
|
+
fontFamily: _sharedUi.monoFont,
|
|
769
717
|
marginBottom: 8
|
|
770
718
|
},
|
|
771
719
|
totalDurationRow: {
|
|
@@ -786,7 +734,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
786
734
|
fontSize: 14,
|
|
787
735
|
fontWeight: "700",
|
|
788
736
|
color: _sharedUi.buoyColors.success,
|
|
789
|
-
fontFamily:
|
|
737
|
+
fontFamily: _sharedUi.monoFont
|
|
790
738
|
},
|
|
791
739
|
timeline: {
|
|
792
740
|
gap: 0
|
|
@@ -852,7 +800,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
852
800
|
timelineTime: {
|
|
853
801
|
fontSize: 10,
|
|
854
802
|
color: _sharedUi.night.color.textTertiary,
|
|
855
|
-
fontFamily:
|
|
803
|
+
fontFamily: _sharedUi.monoFont
|
|
856
804
|
},
|
|
857
805
|
// Action footer - matches React Query DevTools
|
|
858
806
|
actionFooter: {
|
|
@@ -240,119 +240,76 @@ const ReduxActionItem = exports.ReduxActionItem = /*#__PURE__*/(0, _react.memo)(
|
|
|
240
240
|
// Get color for this operation's badge
|
|
241
241
|
const opColor = getOperationColor(operationIndex);
|
|
242
242
|
|
|
243
|
-
//
|
|
244
|
-
|
|
243
|
+
// The async-sequence chip ("1/2 #3") sits in front of whatever indicator
|
|
244
|
+
// the row shows; the ⚡ / 🕒 indicators and the mono action verb are drawn
|
|
245
|
+
// by the shared ChangeRow.
|
|
246
|
+
const sequenceChip = hasLinkedActions ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
247
|
+
style: [styles.asyncSequenceBadge, {
|
|
248
|
+
backgroundColor: opColor.bg
|
|
249
|
+
}],
|
|
250
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
251
|
+
style: [styles.asyncSequenceText, {
|
|
252
|
+
color: opColor.text
|
|
253
|
+
}],
|
|
254
|
+
testID: testID ? `${testID}-seq` : undefined,
|
|
255
|
+
children: [asyncPosition, "/", linkedCount, " #", operationIndex]
|
|
256
|
+
})
|
|
257
|
+
}) : undefined;
|
|
258
|
+
const common = {
|
|
259
|
+
statusColor,
|
|
260
|
+
statusLabel,
|
|
261
|
+
sublabel,
|
|
262
|
+
primaryText,
|
|
263
|
+
timestamp: action.timestamp,
|
|
264
|
+
onPress: () => onPress(action),
|
|
265
|
+
testID,
|
|
266
|
+
accessibilityLabel: `${primaryText}, ${statusLabel}, ${sublabel}`
|
|
267
|
+
};
|
|
245
268
|
if (action.isSlowAction) {
|
|
246
|
-
//
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
backgroundColor: opColor.bg
|
|
252
|
-
}],
|
|
253
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
254
|
-
style: [styles.asyncSequenceText, {
|
|
255
|
-
color: opColor.text
|
|
256
|
-
}],
|
|
257
|
-
testID: testID ? `${testID}-seq` : undefined,
|
|
258
|
-
children: [asyncPosition, "/", linkedCount, " #", operationIndex]
|
|
259
|
-
})
|
|
260
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
261
|
-
style: styles.slowBadge,
|
|
262
|
-
testID: testID ? `${testID}-slow` : undefined,
|
|
263
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Clock, {
|
|
264
|
-
size: 12,
|
|
265
|
-
color: _sharedUi.buoyColors.error
|
|
266
|
-
})
|
|
267
|
-
})]
|
|
269
|
+
// Slow action warning (with the sequence chip when part of a flow).
|
|
270
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
|
|
271
|
+
...common,
|
|
272
|
+
badgePrefix: sequenceChip,
|
|
273
|
+
slow: true
|
|
268
274
|
});
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
})
|
|
284
|
-
})
|
|
285
|
-
style: styles.errorBadge,
|
|
286
|
-
testID: testID ? `${testID}-error` : undefined,
|
|
287
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertCircle, {
|
|
288
|
-
size: 12,
|
|
289
|
-
color: _sharedUi.buoyColors.error
|
|
290
|
-
})
|
|
291
|
-
})]
|
|
275
|
+
}
|
|
276
|
+
if (action.category === "rejected") {
|
|
277
|
+
// Error badge for rejected actions.
|
|
278
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
|
|
279
|
+
...common,
|
|
280
|
+
customBadge: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
281
|
+
style: styles.badgeContainer,
|
|
282
|
+
children: [sequenceChip, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
283
|
+
style: styles.errorBadge,
|
|
284
|
+
testID: testID ? `${testID}-error` : undefined,
|
|
285
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertCircle, {
|
|
286
|
+
size: 12,
|
|
287
|
+
color: _sharedUi.buoyColors.error
|
|
288
|
+
})
|
|
289
|
+
})]
|
|
290
|
+
})
|
|
292
291
|
});
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}],
|
|
301
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
302
|
-
style: [styles.asyncSequenceText, {
|
|
303
|
-
color: opColor.text
|
|
304
|
-
}],
|
|
305
|
-
testID: testID ? `${testID}-seq` : undefined,
|
|
306
|
-
children: [asyncPosition, "/", linkedCount, " #", operationIndex]
|
|
307
|
-
})
|
|
308
|
-
}), action.hasStateChange && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
309
|
-
style: styles.changeBadge,
|
|
310
|
-
testID: testID ? `${testID}-change` : undefined,
|
|
311
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Zap, {
|
|
312
|
-
size: 12,
|
|
313
|
-
color: _sharedUi.buoyColors.warning
|
|
314
|
-
})
|
|
315
|
-
})]
|
|
292
|
+
}
|
|
293
|
+
if (hasLinkedActions) {
|
|
294
|
+
// Linked indicator for async actions.
|
|
295
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
|
|
296
|
+
...common,
|
|
297
|
+
badgePrefix: sequenceChip,
|
|
298
|
+
changed: action.hasStateChange
|
|
316
299
|
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}],
|
|
325
|
-
testID: testID ? `${testID}-badge` : undefined,
|
|
326
|
-
children: actionBadge
|
|
327
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
328
|
-
style: styles.changeBadge,
|
|
329
|
-
testID: testID ? `${testID}-change` : undefined,
|
|
330
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Zap, {
|
|
331
|
-
size: 12,
|
|
332
|
-
color: _sharedUi.buoyColors.warning
|
|
333
|
-
})
|
|
334
|
-
})]
|
|
300
|
+
}
|
|
301
|
+
if (action.hasStateChange) {
|
|
302
|
+
// State change indicator with the action verb.
|
|
303
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
|
|
304
|
+
...common,
|
|
305
|
+
badgeText: actionBadge,
|
|
306
|
+
changed: true
|
|
335
307
|
});
|
|
336
308
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
accessibilityLabel: `${primaryText}, ${statusLabel}, ${sublabel}`,
|
|
342
|
-
statusDotColor: statusColor,
|
|
343
|
-
statusLabel: statusLabel,
|
|
344
|
-
statusSublabel: sublabel,
|
|
345
|
-
primaryText: primaryText,
|
|
346
|
-
bottomRightText: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.RelativeTime, {
|
|
347
|
-
timestamp: action.timestamp
|
|
348
|
-
})
|
|
349
|
-
// Use customBadge if we have special indicators, otherwise show action badge as text
|
|
350
|
-
,
|
|
351
|
-
customBadge: customBadge,
|
|
352
|
-
badgeText: customBadge ? undefined : actionBadge,
|
|
353
|
-
badgeColor: statusColor,
|
|
354
|
-
showChevron: true,
|
|
355
|
-
onPress: () => onPress(action)
|
|
309
|
+
// Nothing special: CompactRow's plain badge with the action verb.
|
|
310
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
|
|
311
|
+
...common,
|
|
312
|
+
plainBadgeText: actionBadge
|
|
356
313
|
});
|
|
357
314
|
});
|
|
358
315
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -361,17 +318,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
361
318
|
alignItems: "center",
|
|
362
319
|
gap: 4
|
|
363
320
|
},
|
|
364
|
-
actionBadgeText: {
|
|
365
|
-
fontSize: 11,
|
|
366
|
-
fontWeight: "600",
|
|
367
|
-
fontFamily: "monospace"
|
|
368
|
-
},
|
|
369
|
-
changeBadge: {
|
|
370
|
-
paddingHorizontal: 4
|
|
371
|
-
},
|
|
372
|
-
slowBadge: {
|
|
373
|
-
paddingHorizontal: 4
|
|
374
|
-
},
|
|
375
321
|
errorBadge: {
|
|
376
322
|
paddingHorizontal: 4
|
|
377
323
|
},
|
|
@@ -383,6 +329,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
383
329
|
asyncSequenceText: {
|
|
384
330
|
fontSize: 10,
|
|
385
331
|
fontWeight: "600",
|
|
386
|
-
fontFamily:
|
|
332
|
+
fontFamily: _sharedUi.monoFont
|
|
387
333
|
}
|
|
388
334
|
});
|