@buoy-gg/react-query 7.0.40 → 7.0.42
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/README.md +11 -69
- package/lib/commonjs/checkPeer.js +1 -0
- package/lib/commonjs/checkPeer.web.js +1 -0
- package/lib/commonjs/index.js +1 -736
- package/lib/commonjs/preset.js +1 -243
- package/lib/commonjs/react-query/components/DataEditorMode.js +1 -317
- package/lib/commonjs/react-query/components/FilterStatusBadge.js +1 -55
- package/lib/commonjs/react-query/components/MutationBrowserMode.js +1 -52
- package/lib/commonjs/react-query/components/MutationEditorMode.js +1 -276
- package/lib/commonjs/react-query/components/QueryBrowserMode.js +1 -99
- package/lib/commonjs/react-query/components/QueryDebugInfo.js +1 -107
- package/lib/commonjs/react-query/components/QueryFilterViewV3.js +1 -224
- package/lib/commonjs/react-query/components/QuerySelector.js +1 -209
- package/lib/commonjs/react-query/components/ReactQueryDevToolsModal.js +1 -91
- package/lib/commonjs/react-query/components/ReactQuerySection.js +1 -47
- package/lib/commonjs/react-query/components/ReactQueryTracker.js +1 -38
- package/lib/commonjs/react-query/components/WifiToggle.js +1 -51
- package/lib/commonjs/react-query/components/modals/DataEditorModal.js +1 -103
- package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +1 -61
- package/lib/commonjs/react-query/components/modals/MutationBrowserModal.js +1 -164
- package/lib/commonjs/react-query/components/modals/MutationEditorModal.js +1 -106
- package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +1 -56
- package/lib/commonjs/react-query/components/modals/QueryBrowserModal.js +1 -254
- package/lib/commonjs/react-query/components/modals/ReactQueryModal.js +1 -83
- package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +1 -194
- package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +1 -204
- package/lib/commonjs/react-query/components/query-browser/ActionButton.js +1 -100
- package/lib/commonjs/react-query/components/query-browser/ClearCacheButton.js +1 -53
- package/lib/commonjs/react-query/components/query-browser/Explorer.js +1 -75
- package/lib/commonjs/react-query/components/query-browser/MutationButton.js +1 -190
- package/lib/commonjs/react-query/components/query-browser/MutationDetails.js +1 -124
- package/lib/commonjs/react-query/components/query-browser/MutationDetailsChips.js +1 -68
- package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +1 -118
- package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +1 -84
- package/lib/commonjs/react-query/components/query-browser/MutationsList.js +1 -220
- package/lib/commonjs/react-query/components/query-browser/NetworkToggleButton.js +1 -54
- package/lib/commonjs/react-query/components/query-browser/QueryActions.js +1 -124
- package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +1 -181
- package/lib/commonjs/react-query/components/query-browser/QueryDetails.js +1 -141
- package/lib/commonjs/react-query/components/query-browser/QueryDetailsChip.js +1 -78
- package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +1 -95
- package/lib/commonjs/react-query/components/query-browser/QueryRow.js +1 -96
- package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +1 -167
- package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +1 -100
- package/lib/commonjs/react-query/components/query-browser/StorageStatusCount.js +1 -61
- package/lib/commonjs/react-query/components/query-browser/index.js +1 -170
- package/lib/commonjs/react-query/components/query-browser/svgs.js +1 -72
- package/lib/commonjs/react-query/hooks/useActionButtons.js +1 -51
- package/lib/commonjs/react-query/hooks/useAllMutations.js +1 -85
- package/lib/commonjs/react-query/hooks/useAllQueries.js +1 -117
- package/lib/commonjs/react-query/hooks/useModalManager.js +1 -178
- package/lib/commonjs/react-query/hooks/useModalPersistence.js +1 -71
- package/lib/commonjs/react-query/hooks/useMutationActionButtons.js +1 -21
- package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +1 -114
- package/lib/commonjs/react-query/hooks/useReactQueryState.js +1 -24
- package/lib/commonjs/react-query/hooks/useSelectedMutation.js +1 -30
- package/lib/commonjs/react-query/hooks/useSelectedQuery.js +1 -96
- package/lib/commonjs/react-query/hooks/useStorageQueryCounts.js +1 -28
- package/lib/commonjs/react-query/hooks/useWifiState.js +1 -67
- package/lib/commonjs/react-query/stores/reactQueryEventStore.js +1 -302
- package/lib/commonjs/react-query/sync/dehydrate.js +1 -166
- package/lib/commonjs/react-query/sync/reactQuerySyncAdapter.js +1 -593
- package/lib/commonjs/react-query/sync/snapshotProvider.js +1 -289
- package/lib/commonjs/react-query/sync/useReactQuerySyncAdapter.js +1 -34
- package/lib/commonjs/react-query/types/types.js +1 -14
- package/lib/commonjs/react-query/utils/actions/deleteItem.js +1 -23
- package/lib/commonjs/react-query/utils/actions/emitDevToolsEvent.js +1 -40
- package/lib/commonjs/react-query/utils/actions/invalidate.js +1 -15
- package/lib/commonjs/react-query/utils/actions/refetch.js +1 -17
- package/lib/commonjs/react-query/utils/actions/remove.js +1 -15
- package/lib/commonjs/react-query/utils/actions/reset.js +1 -17
- package/lib/commonjs/react-query/utils/actions/triggerError.js +1 -33
- package/lib/commonjs/react-query/utils/actions/triggerLoading.js +1 -54
- package/lib/commonjs/react-query/utils/deleteNestedDataByPath.js +1 -56
- package/lib/commonjs/react-query/utils/getQueryStatusColor.js +1 -16
- package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +1 -23
- package/lib/commonjs/react-query/utils/getStorageQueryCounts.js +1 -35
- package/lib/commonjs/react-query/utils/modalStorageOperations.js +1 -127
- package/lib/commonjs/react-query/utils/storageQueryUtils.js +1 -149
- package/lib/commonjs/react-query/utils/testIDs.js +1 -61
- package/lib/commonjs/react-query/utils/updateNestedDataByPath.js +1 -61
- package/lib/module/checkPeer.js +1 -0
- package/lib/module/checkPeer.web.js +1 -0
- package/lib/module/index.js +1 -135
- package/lib/module/preset.js +1 -239
- package/lib/module/react-query/components/DataEditorMode.js +1 -311
- package/lib/module/react-query/components/FilterStatusBadge.js +1 -51
- package/lib/module/react-query/components/MutationBrowserMode.js +1 -47
- package/lib/module/react-query/components/MutationEditorMode.js +1 -270
- package/lib/module/react-query/components/QueryBrowserMode.js +1 -94
- package/lib/module/react-query/components/QueryDebugInfo.js +1 -104
- package/lib/module/react-query/components/QueryFilterViewV3.js +1 -221
- package/lib/module/react-query/components/QuerySelector.js +1 -205
- package/lib/module/react-query/components/ReactQueryDevToolsModal.js +1 -87
- package/lib/module/react-query/components/ReactQuerySection.js +1 -43
- package/lib/module/react-query/components/ReactQueryTracker.js +1 -35
- package/lib/module/react-query/components/WifiToggle.js +1 -48
- package/lib/module/react-query/components/modals/DataEditorModal.js +1 -99
- package/lib/module/react-query/components/modals/MutationBrowserFooter.js +1 -56
- package/lib/module/react-query/components/modals/MutationBrowserModal.js +1 -161
- package/lib/module/react-query/components/modals/MutationEditorModal.js +1 -102
- package/lib/module/react-query/components/modals/QueryBrowserFooter.js +1 -51
- package/lib/module/react-query/components/modals/QueryBrowserModal.js +1 -250
- package/lib/module/react-query/components/modals/ReactQueryModal.js +1 -79
- package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +1 -190
- package/lib/module/react-query/components/modals/SwipeIndicator.js +1 -201
- package/lib/module/react-query/components/query-browser/ActionButton.js +1 -96
- package/lib/module/react-query/components/query-browser/ClearCacheButton.js +1 -49
- package/lib/module/react-query/components/query-browser/Explorer.js +1 -70
- package/lib/module/react-query/components/query-browser/MutationButton.js +1 -186
- package/lib/module/react-query/components/query-browser/MutationDetails.js +1 -119
- package/lib/module/react-query/components/query-browser/MutationDetailsChips.js +1 -64
- package/lib/module/react-query/components/query-browser/MutationInformation.js +1 -113
- package/lib/module/react-query/components/query-browser/MutationStatusCount.js +1 -79
- package/lib/module/react-query/components/query-browser/MutationsList.js +1 -215
- package/lib/module/react-query/components/query-browser/NetworkToggleButton.js +1 -50
- package/lib/module/react-query/components/query-browser/QueryActions.js +1 -119
- package/lib/module/react-query/components/query-browser/QueryBrowser.js +1 -176
- package/lib/module/react-query/components/query-browser/QueryDetails.js +1 -136
- package/lib/module/react-query/components/query-browser/QueryDetailsChip.js +1 -74
- package/lib/module/react-query/components/query-browser/QueryInformation.js +1 -90
- package/lib/module/react-query/components/query-browser/QueryRow.js +1 -92
- package/lib/module/react-query/components/query-browser/QueryStatus.js +1 -163
- package/lib/module/react-query/components/query-browser/QueryStatusCount.js +1 -95
- package/lib/module/react-query/components/query-browser/StorageStatusCount.js +1 -56
- package/lib/module/react-query/components/query-browser/index.js +1 -22
- package/lib/module/react-query/components/query-browser/svgs.js +1 -64
- package/lib/module/react-query/hooks/useActionButtons.js +1 -46
- package/lib/module/react-query/hooks/useAllMutations.js +1 -82
- package/lib/module/react-query/hooks/useAllQueries.js +1 -114
- package/lib/module/react-query/hooks/useModalManager.js +1 -175
- package/lib/module/react-query/hooks/useModalPersistence.js +1 -67
- package/lib/module/react-query/hooks/useMutationActionButtons.js +1 -17
- package/lib/module/react-query/hooks/useQueryStatusCounts.js +1 -112
- package/lib/module/react-query/hooks/useReactQueryState.js +1 -20
- package/lib/module/react-query/hooks/useSelectedMutation.js +1 -27
- package/lib/module/react-query/hooks/useSelectedQuery.js +1 -92
- package/lib/module/react-query/hooks/useStorageQueryCounts.js +1 -25
- package/lib/module/react-query/hooks/useWifiState.js +1 -64
- package/lib/module/react-query/stores/reactQueryEventStore.js +1 -293
- package/lib/module/react-query/sync/dehydrate.js +1 -156
- package/lib/module/react-query/sync/reactQuerySyncAdapter.js +1 -589
- package/lib/module/react-query/sync/snapshotProvider.js +1 -284
- package/lib/module/react-query/sync/useReactQuerySyncAdapter.js +1 -31
- package/lib/module/react-query/types/types.js +1 -10
- package/lib/module/react-query/utils/actions/deleteItem.js +1 -19
- package/lib/module/react-query/utils/actions/emitDevToolsEvent.js +1 -36
- package/lib/module/react-query/utils/actions/invalidate.js +1 -11
- package/lib/module/react-query/utils/actions/refetch.js +1 -13
- package/lib/module/react-query/utils/actions/remove.js +1 -11
- package/lib/module/react-query/utils/actions/reset.js +1 -13
- package/lib/module/react-query/utils/actions/triggerError.js +1 -29
- package/lib/module/react-query/utils/actions/triggerLoading.js +1 -50
- package/lib/module/react-query/utils/deleteNestedDataByPath.js +1 -51
- package/lib/module/react-query/utils/getQueryStatusColor.js +1 -12
- package/lib/module/react-query/utils/getQueryStatusLabel.js +1 -19
- package/lib/module/react-query/utils/getStorageQueryCounts.js +1 -31
- package/lib/module/react-query/utils/modalStorageOperations.js +1 -117
- package/lib/module/react-query/utils/storageQueryUtils.js +1 -140
- package/lib/module/react-query/utils/testIDs.js +1 -54
- package/lib/module/react-query/utils/updateNestedDataByPath.js +1 -56
- package/lib/typescript/checkPeer.d.ts +1 -0
- package/lib/typescript/checkPeer.web.d.ts +2 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/web/index.mjs +11 -0
- package/package.json +36 -12
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/react-query/components/DataEditorMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/FilterStatusBadge.d.ts.map +0 -1
- package/lib/typescript/react-query/components/MutationBrowserMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/MutationEditorMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QueryBrowserMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QueryDebugInfo.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QuerySelector.d.ts.map +0 -1
- package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/ReactQuerySection.d.ts.map +0 -1
- package/lib/typescript/react-query/components/ReactQueryTracker.d.ts.map +0 -1
- package/lib/typescript/react-query/components/WifiToggle.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/Explorer.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/index.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/svgs.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useActionButtons.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useAllMutations.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useAllQueries.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useModalManager.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useModalPersistence.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useReactQueryState.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useWifiState.d.ts.map +0 -1
- package/lib/typescript/react-query/stores/reactQueryEventStore.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/dehydrate.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/reactQuerySyncAdapter.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/snapshotProvider.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/useReactQuerySyncAdapter.d.ts.map +0 -1
- package/lib/typescript/react-query/types/types.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/deleteItem.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/emitDevToolsEvent.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/invalidate.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/refetch.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/remove.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/reset.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/triggerError.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/modalStorageOperations.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/storageQueryUtils.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/testIDs.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts.map +0 -1
|
@@ -1,124 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = MutationDetails;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _MutationDetailsChips = _interopRequireDefault(require("./MutationDetailsChips"));
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
/**
|
|
13
|
-
* Displays high-level mutation metadata such as status, retries, and timestamps.
|
|
14
|
-
*/
|
|
15
|
-
function MutationDetails({
|
|
16
|
-
selectedMutation
|
|
17
|
-
}) {
|
|
18
|
-
if (selectedMutation === undefined) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
const submittedAt = new Date(selectedMutation.state.submittedAt).toLocaleTimeString();
|
|
22
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
23
|
-
style: styles.minWidth,
|
|
24
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
25
|
-
style: styles.headerText,
|
|
26
|
-
children: "Mutation Details"
|
|
27
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
28
|
-
style: styles.row,
|
|
29
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
30
|
-
"sentry-label": "ignore devtools mutation details scroll",
|
|
31
|
-
horizontal: true,
|
|
32
|
-
style: styles.flex1,
|
|
33
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
34
|
-
testID: "buoy-rq-mutation-detail-key",
|
|
35
|
-
style: styles.flexWrap,
|
|
36
|
-
children: `${selectedMutation.options.mutationKey ? (0, _sharedUi.displayValue)(selectedMutation.options.mutationKey, true) : "No mutationKey found"}`
|
|
37
|
-
})
|
|
38
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationDetailsChips.default, {
|
|
39
|
-
status: selectedMutation.state.status,
|
|
40
|
-
testID: "buoy-rq-mutation-detail-status"
|
|
41
|
-
})]
|
|
42
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
43
|
-
style: styles.row,
|
|
44
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
45
|
-
style: styles.labelText,
|
|
46
|
-
children: "Submitted At:"
|
|
47
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
48
|
-
style: styles.valueText,
|
|
49
|
-
children: submittedAt
|
|
50
|
-
})]
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
const styles = _reactNative.StyleSheet.create({
|
|
55
|
-
minWidth: {
|
|
56
|
-
minWidth: 200,
|
|
57
|
-
backgroundColor: _sharedUi.night.color.surface,
|
|
58
|
-
borderRadius: 6,
|
|
59
|
-
borderWidth: 1,
|
|
60
|
-
borderColor: _sharedUi.night.color.accent + "4D",
|
|
61
|
-
overflow: "hidden",
|
|
62
|
-
shadowColor: _sharedUi.night.color.accent,
|
|
63
|
-
shadowOffset: {
|
|
64
|
-
width: 0,
|
|
65
|
-
height: 0
|
|
66
|
-
},
|
|
67
|
-
shadowOpacity: 0.1,
|
|
68
|
-
shadowRadius: 6
|
|
69
|
-
},
|
|
70
|
-
headerText: {
|
|
71
|
-
backgroundColor: _sharedUi.night.color.accent + "15",
|
|
72
|
-
paddingHorizontal: 12,
|
|
73
|
-
paddingVertical: 10,
|
|
74
|
-
fontWeight: "600",
|
|
75
|
-
fontSize: 12,
|
|
76
|
-
color: _sharedUi.night.color.accent,
|
|
77
|
-
borderBottomWidth: 1,
|
|
78
|
-
borderBottomColor: _sharedUi.night.color.accent + "33",
|
|
79
|
-
letterSpacing: 0.5,
|
|
80
|
-
textTransform: "uppercase",
|
|
81
|
-
fontFamily: _sharedUi.monoFont
|
|
82
|
-
},
|
|
83
|
-
row: {
|
|
84
|
-
flexDirection: "row",
|
|
85
|
-
justifyContent: "space-between",
|
|
86
|
-
alignItems: "center",
|
|
87
|
-
paddingHorizontal: 12,
|
|
88
|
-
paddingVertical: 10,
|
|
89
|
-
borderBottomWidth: 1,
|
|
90
|
-
borderBottomColor: _sharedUi.night.color.separator
|
|
91
|
-
},
|
|
92
|
-
flex1: {
|
|
93
|
-
flex: 1,
|
|
94
|
-
marginRight: 8
|
|
95
|
-
},
|
|
96
|
-
flexWrap: {
|
|
97
|
-
fontSize: 12,
|
|
98
|
-
color: _sharedUi.night.color.text,
|
|
99
|
-
fontFamily: _sharedUi.monoFont,
|
|
100
|
-
lineHeight: 18,
|
|
101
|
-
flexShrink: 1,
|
|
102
|
-
backgroundColor: _sharedUi.night.color.accent + "15",
|
|
103
|
-
paddingHorizontal: 8,
|
|
104
|
-
paddingVertical: 4,
|
|
105
|
-
borderRadius: 4,
|
|
106
|
-
borderWidth: 1,
|
|
107
|
-
borderColor: _sharedUi.night.color.accent + "4D"
|
|
108
|
-
},
|
|
109
|
-
labelText: {
|
|
110
|
-
fontSize: 10,
|
|
111
|
-
color: _sharedUi.night.color.textSecondary,
|
|
112
|
-
fontWeight: "600",
|
|
113
|
-
letterSpacing: 0.5,
|
|
114
|
-
textTransform: "uppercase",
|
|
115
|
-
fontFamily: _sharedUi.monoFont
|
|
116
|
-
},
|
|
117
|
-
valueText: {
|
|
118
|
-
fontSize: 12,
|
|
119
|
-
color: _sharedUi.night.color.text,
|
|
120
|
-
fontWeight: "500",
|
|
121
|
-
fontVariant: ["tabular-nums"],
|
|
122
|
-
fontFamily: _sharedUi.monoFont
|
|
123
|
-
}
|
|
124
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationDetails;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _MutationDetailsChips=_interopRequireDefault(require("./MutationDetailsChips"));var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function MutationDetails({selectedMutation:t}){if(t===void 0){return null}const e=new Date(t.state.submittedAt).toLocaleTimeString();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.minWidth,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Mutation Details"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.row,children:[(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{"sentry-label":"ignore devtools mutation details scroll",horizontal:true,style:styles.flex1,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-mutation-detail-key",style:styles.flexWrap,children:`${t.options.mutationKey?(0,_sharedUi.displayValue)(t.options.mutationKey,true):"No mutationKey found"}`})}),(0,_jsxRuntime.jsx)(_MutationDetailsChips.default,{status:t.state.status,testID:"buoy-rq-mutation-detail-status"})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.row,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.labelText,children:"Submitted At:"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.valueText,children:e})]})]})}const styles=_reactNative.StyleSheet.create({minWidth:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:_sharedUi.night.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.separator},flex1:{flex:1,marginRight:8},flexWrap:{fontSize:12,color:_sharedUi.night.color.text,fontFamily:_sharedUi.monoFont,lineHeight:18,flexShrink:1,backgroundColor:_sharedUi.night.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D"},labelText:{fontSize:10,color:_sharedUi.night.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},valueText:{fontSize:12,color:_sharedUi.night.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:_sharedUi.monoFont}});
|
|
@@ -1,68 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = QueryDetailsChip;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
const backgroundColors = {
|
|
11
|
-
success: _sharedUi.buoyColors.success + "15",
|
|
12
|
-
error: _sharedUi.buoyColors.error + "15",
|
|
13
|
-
pending: _sharedUi.buoyColors.primary + "15",
|
|
14
|
-
idle: _sharedUi.buoyColors.textMuted + "1A"
|
|
15
|
-
};
|
|
16
|
-
const borderColors = {
|
|
17
|
-
success: _sharedUi.buoyColors.success + "33",
|
|
18
|
-
error: _sharedUi.buoyColors.error + "33",
|
|
19
|
-
pending: _sharedUi.buoyColors.primary + "33",
|
|
20
|
-
idle: _sharedUi.buoyColors.textMuted + "33"
|
|
21
|
-
};
|
|
22
|
-
const textColors = {
|
|
23
|
-
success: _sharedUi.buoyColors.success,
|
|
24
|
-
error: _sharedUi.buoyColors.error,
|
|
25
|
-
pending: _sharedUi.buoyColors.primary,
|
|
26
|
-
idle: _sharedUi.buoyColors.textMuted
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Small status chip used in mutation detail views that adapts styling to the mutation status.
|
|
30
|
-
*/
|
|
31
|
-
function QueryDetailsChip({
|
|
32
|
-
status,
|
|
33
|
-
testID
|
|
34
|
-
}) {
|
|
35
|
-
const statusToColor = status;
|
|
36
|
-
const backgroundColor = backgroundColors[statusToColor];
|
|
37
|
-
const borderColor = borderColors[statusToColor];
|
|
38
|
-
const textColor = textColors[statusToColor];
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
40
|
-
style: [styles.container, {
|
|
41
|
-
backgroundColor,
|
|
42
|
-
borderColor
|
|
43
|
-
}],
|
|
44
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
45
|
-
testID: testID,
|
|
46
|
-
style: [styles.text, {
|
|
47
|
-
color: textColor
|
|
48
|
-
}],
|
|
49
|
-
children: status
|
|
50
|
-
})
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const styles = _reactNative.StyleSheet.create({
|
|
54
|
-
container: {
|
|
55
|
-
paddingHorizontal: 8,
|
|
56
|
-
paddingVertical: 4,
|
|
57
|
-
borderWidth: 1,
|
|
58
|
-
borderRadius: 6,
|
|
59
|
-
alignSelf: "flex-start"
|
|
60
|
-
},
|
|
61
|
-
text: {
|
|
62
|
-
fontSize: 11,
|
|
63
|
-
fontWeight: "600",
|
|
64
|
-
textTransform: "uppercase",
|
|
65
|
-
letterSpacing: 0.5,
|
|
66
|
-
fontFamily: _sharedUi.monoFont
|
|
67
|
-
}
|
|
68
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=QueryDetailsChip;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");const backgroundColors={success:_sharedUi.buoyColors.success+"15",error:_sharedUi.buoyColors.error+"15",pending:_sharedUi.buoyColors.primary+"15",idle:_sharedUi.buoyColors.textMuted+"1A"};const borderColors={success:_sharedUi.buoyColors.success+"33",error:_sharedUi.buoyColors.error+"33",pending:_sharedUi.buoyColors.primary+"33",idle:_sharedUi.buoyColors.textMuted+"33"};const textColors={success:_sharedUi.buoyColors.success,error:_sharedUi.buoyColors.error,pending:_sharedUi.buoyColors.primary,idle:_sharedUi.buoyColors.textMuted};function QueryDetailsChip({status:r,testID:e}){const o=r;const t=backgroundColors[o];const s=borderColors[o];const l=textColors[o];return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.container,{backgroundColor:t,borderColor:s}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:e,style:[styles.text,{color:l}],children:r})})}const styles=_reactNative.StyleSheet.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:_sharedUi.monoFont}});
|
|
@@ -1,118 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = MutationInformation;
|
|
7
|
-
var _Explorer = _interopRequireDefault(require("./Explorer"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _MutationDetails = _interopRequireDefault(require("./MutationDetails"));
|
|
10
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
/** Detailed information block for a selected mutation within the modal experience. */
|
|
14
|
-
function MutationInformation({
|
|
15
|
-
selectedMutation
|
|
16
|
-
}) {
|
|
17
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
18
|
-
"sentry-label": "ignore devtools mutation information scroll",
|
|
19
|
-
style: styles.flex1,
|
|
20
|
-
contentContainerStyle: styles.scrollContent,
|
|
21
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
22
|
-
style: styles.section,
|
|
23
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationDetails.default, {
|
|
24
|
-
selectedMutation: selectedMutation
|
|
25
|
-
})
|
|
26
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
27
|
-
style: styles.section,
|
|
28
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
29
|
-
style: styles.textHeader,
|
|
30
|
-
children: "Variables Details"
|
|
31
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
32
|
-
style: styles.padding,
|
|
33
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
34
|
-
label: "Variables",
|
|
35
|
-
value: selectedMutation?.state.variables,
|
|
36
|
-
defaultExpanded: ["Variables"]
|
|
37
|
-
})
|
|
38
|
-
})]
|
|
39
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
40
|
-
style: styles.section,
|
|
41
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
42
|
-
style: styles.textHeader,
|
|
43
|
-
children: "Context Details"
|
|
44
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
45
|
-
style: styles.padding,
|
|
46
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
47
|
-
label: "Context",
|
|
48
|
-
value: selectedMutation?.state.context,
|
|
49
|
-
defaultExpanded: ["Context"]
|
|
50
|
-
})
|
|
51
|
-
})]
|
|
52
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
|
-
style: styles.section,
|
|
54
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
55
|
-
style: styles.textHeader,
|
|
56
|
-
children: "Data Explorer"
|
|
57
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
58
|
-
style: styles.padding,
|
|
59
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
60
|
-
label: "Data",
|
|
61
|
-
defaultExpanded: ["Data"],
|
|
62
|
-
value: selectedMutation?.state.data
|
|
63
|
-
})
|
|
64
|
-
})]
|
|
65
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
66
|
-
style: styles.section,
|
|
67
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
68
|
-
style: styles.textHeader,
|
|
69
|
-
children: "Mutations Explorer"
|
|
70
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
71
|
-
style: styles.padding,
|
|
72
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
73
|
-
label: "Mutation",
|
|
74
|
-
defaultExpanded: ["Mutation"],
|
|
75
|
-
value: selectedMutation
|
|
76
|
-
})
|
|
77
|
-
})]
|
|
78
|
-
})]
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
const styles = _reactNative.StyleSheet.create({
|
|
82
|
-
flex1: {
|
|
83
|
-
flex: 1,
|
|
84
|
-
// Transparent so the night sheet's star field shows through.
|
|
85
|
-
backgroundColor: "transparent"
|
|
86
|
-
},
|
|
87
|
-
scrollContent: {
|
|
88
|
-
paddingBottom: 16,
|
|
89
|
-
paddingHorizontal: 8
|
|
90
|
-
},
|
|
91
|
-
section: {
|
|
92
|
-
marginBottom: 16
|
|
93
|
-
},
|
|
94
|
-
textHeader: {
|
|
95
|
-
textAlign: "left",
|
|
96
|
-
backgroundColor: _sharedUi.night.color.accent + "15",
|
|
97
|
-
padding: 12,
|
|
98
|
-
fontSize: 12,
|
|
99
|
-
fontWeight: "700",
|
|
100
|
-
color: _sharedUi.night.color.accent,
|
|
101
|
-
borderTopLeftRadius: 8,
|
|
102
|
-
borderTopRightRadius: 8,
|
|
103
|
-
borderBottomWidth: 1,
|
|
104
|
-
borderBottomColor: _sharedUi.night.color.accent + "33",
|
|
105
|
-
fontFamily: _sharedUi.monoFont,
|
|
106
|
-
letterSpacing: 1,
|
|
107
|
-
textTransform: "uppercase"
|
|
108
|
-
},
|
|
109
|
-
padding: {
|
|
110
|
-
padding: 12,
|
|
111
|
-
backgroundColor: _sharedUi.night.color.surface,
|
|
112
|
-
borderBottomLeftRadius: 8,
|
|
113
|
-
borderBottomRightRadius: 8,
|
|
114
|
-
borderWidth: 1,
|
|
115
|
-
borderColor: _sharedUi.night.color.border,
|
|
116
|
-
borderTopWidth: 0
|
|
117
|
-
}
|
|
118
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationInformation;var _Explorer=_interopRequireDefault(require("./Explorer"));var _reactNative=require("react-native");var _MutationDetails=_interopRequireDefault(require("./MutationDetails"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function MutationInformation({selectedMutation:e}){return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{"sentry-label":"ignore devtools mutation information scroll",style:styles.flex1,contentContainerStyle:styles.scrollContent,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_MutationDetails.default,{selectedMutation:e})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Variables Details"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Context Details"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Data Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Mutations Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})]})}const styles=_reactNative.StyleSheet.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:_sharedUi.night.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:_sharedUi.night.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",fontFamily:_sharedUi.monoFont,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:_sharedUi.night.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border,borderTopWidth:0}});
|
|
@@ -1,84 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
8
|
-
var _QueryStatus = _interopRequireDefault(require("./QueryStatus"));
|
|
9
|
-
var _useQueryStatusCounts = require("../../hooks/useQueryStatusCounts");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
/**
|
|
13
|
-
* Horizontal status filter bar tailored for mutations. Integrates scroll detection to avoid
|
|
14
|
-
* accidental filter toggles while panning.
|
|
15
|
-
*/
|
|
16
|
-
const MutationStatusCount = ({
|
|
17
|
-
activeFilter,
|
|
18
|
-
onFilterChange,
|
|
19
|
-
size = "default"
|
|
20
|
-
}) => {
|
|
21
|
-
const {
|
|
22
|
-
pending,
|
|
23
|
-
success,
|
|
24
|
-
error,
|
|
25
|
-
paused
|
|
26
|
-
} = (0, _useQueryStatusCounts.useMutationStatusCounts)();
|
|
27
|
-
const {
|
|
28
|
-
scrollProps,
|
|
29
|
-
onTouchStart: handleTouchStart,
|
|
30
|
-
isTap
|
|
31
|
-
} = (0, _sharedUi.useChipTap)();
|
|
32
|
-
const handleFilterClick = (filter, event) => {
|
|
33
|
-
if (!isTap(event)) return;
|
|
34
|
-
if (onFilterChange) {
|
|
35
|
-
onFilterChange(activeFilter === filter ? null : filter);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ChipStrip, {
|
|
39
|
-
scrollProps: scrollProps,
|
|
40
|
-
sentryLabel: "ignore devtools mutation status count scroll",
|
|
41
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
42
|
-
label: "Pending",
|
|
43
|
-
color: "blue",
|
|
44
|
-
count: pending,
|
|
45
|
-
isActive: activeFilter === "pending",
|
|
46
|
-
onPress: event => handleFilterClick("pending", event),
|
|
47
|
-
onTouchStart: handleTouchStart,
|
|
48
|
-
testID: "buoy-rq-mstatus-pending",
|
|
49
|
-
showLabel: true,
|
|
50
|
-
size: size
|
|
51
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
52
|
-
label: "Success",
|
|
53
|
-
color: "green",
|
|
54
|
-
count: success,
|
|
55
|
-
isActive: activeFilter === "success",
|
|
56
|
-
onPress: event => handleFilterClick("success", event),
|
|
57
|
-
onTouchStart: handleTouchStart,
|
|
58
|
-
testID: "buoy-rq-mstatus-success",
|
|
59
|
-
showLabel: true,
|
|
60
|
-
size: size
|
|
61
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
62
|
-
label: "Error",
|
|
63
|
-
color: "red",
|
|
64
|
-
count: error,
|
|
65
|
-
isActive: activeFilter === "error",
|
|
66
|
-
onPress: event => handleFilterClick("error", event),
|
|
67
|
-
onTouchStart: handleTouchStart,
|
|
68
|
-
testID: "buoy-rq-mstatus-error",
|
|
69
|
-
showLabel: true,
|
|
70
|
-
size: size
|
|
71
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
72
|
-
label: "Paused",
|
|
73
|
-
color: "purple",
|
|
74
|
-
count: paused,
|
|
75
|
-
isActive: activeFilter === "paused",
|
|
76
|
-
onPress: event => handleFilterClick("paused", event),
|
|
77
|
-
onTouchStart: handleTouchStart,
|
|
78
|
-
testID: "buoy-rq-mstatus-paused",
|
|
79
|
-
showLabel: true,
|
|
80
|
-
size: size
|
|
81
|
-
})]
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
var _default = exports.default = MutationStatusCount;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _sharedUi=require("@buoy-gg/shared-ui");var _QueryStatus=_interopRequireDefault(require("./QueryStatus"));var _useQueryStatusCounts=require("../../hooks/useQueryStatusCounts");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const MutationStatusCount=({activeFilter:e,onFilterChange:o,size:t="default"})=>{const{pending:a,success:n,error:l,paused:c}=(0,_useQueryStatusCounts.useMutationStatusCounts)();const{scrollProps:i,onTouchStart:u,isTap:d}=(0,_sharedUi.useChipTap)();const r=(s,p)=>{if(!d(p))return;if(o){o(e===s?null:s)}};return(0,_jsxRuntime.jsxs)(_sharedUi.ChipStrip,{scrollProps:i,sentryLabel:"ignore devtools mutation status count scroll",children:[(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Pending",color:"blue",count:a,isActive:e==="pending",onPress:s=>r("pending",s),onTouchStart:u,testID:"buoy-rq-mstatus-pending",showLabel:true,size:t}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Success",color:"green",count:n,isActive:e==="success",onPress:s=>r("success",s),onTouchStart:u,testID:"buoy-rq-mstatus-success",showLabel:true,size:t}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Error",color:"red",count:l,isActive:e==="error",onPress:s=>r("error",s),onTouchStart:u,testID:"buoy-rq-mstatus-error",showLabel:true,size:t}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Paused",color:"purple",count:c,isActive:e==="paused",onPress:s=>r("paused",s),onTouchStart:u,testID:"buoy-rq-mstatus-paused",showLabel:true,size:t})]})};var _default=exports.default=MutationStatusCount;
|
|
@@ -1,220 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = MutationsList;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _MutationButton = _interopRequireDefault(require("./MutationButton"));
|
|
10
|
-
var _MutationInformation = _interopRequireDefault(require("./MutationInformation"));
|
|
11
|
-
var _useAllMutations = _interopRequireDefault(require("../../hooks/useAllMutations"));
|
|
12
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
/**
|
|
16
|
-
* Virtualized list of mutations with filtering and selection support for the mutation browser.
|
|
17
|
-
*/
|
|
18
|
-
function MutationsList({
|
|
19
|
-
selectedMutation,
|
|
20
|
-
setSelectedMutation,
|
|
21
|
-
activeFilter,
|
|
22
|
-
hideInfoPanel = false,
|
|
23
|
-
contentContainerStyle,
|
|
24
|
-
searchText = ""
|
|
25
|
-
}) {
|
|
26
|
-
const {
|
|
27
|
-
mutations: allmutations
|
|
28
|
-
} = (0, _useAllMutations.default)();
|
|
29
|
-
|
|
30
|
-
// Helper function to get mutation status for filtering
|
|
31
|
-
const getMutationStatus = mutation => {
|
|
32
|
-
if (mutation.state.isPaused) return "paused";
|
|
33
|
-
const status = mutation.state.status;
|
|
34
|
-
return status; // 'idle', 'pending', 'success', 'error'
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// Filter mutations based on active filter and search text
|
|
38
|
-
const filteredMutations = (0, _react.useMemo)(() => {
|
|
39
|
-
let filtered = allmutations;
|
|
40
|
-
|
|
41
|
-
// Apply status filter
|
|
42
|
-
if (activeFilter) {
|
|
43
|
-
filtered = filtered.filter(mutation => {
|
|
44
|
-
const status = getMutationStatus(mutation);
|
|
45
|
-
return status === activeFilter;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Apply search filter on mutation keys
|
|
50
|
-
if (searchText) {
|
|
51
|
-
const searchLower = searchText.toLowerCase();
|
|
52
|
-
filtered = filtered.filter(mutation => {
|
|
53
|
-
const mutationKey = mutation.options.mutationKey;
|
|
54
|
-
if (!mutationKey) return false;
|
|
55
|
-
const keys = Array.isArray(mutationKey) ? mutationKey : [mutationKey];
|
|
56
|
-
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
57
|
-
return keyString.includes(searchLower);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return filtered;
|
|
61
|
-
}, [allmutations, activeFilter, searchText]);
|
|
62
|
-
|
|
63
|
-
// Height management for resizable mutation information panel
|
|
64
|
-
const screenHeight = _reactNative.Dimensions.get("window").height;
|
|
65
|
-
const defaultInfoHeight = screenHeight * 0.4; // 40% of screen height
|
|
66
|
-
const minInfoHeight = 150;
|
|
67
|
-
const maxInfoHeight = screenHeight * 0.7; // 70% of screen height
|
|
68
|
-
|
|
69
|
-
const infoHeightAnim = (0, _react.useRef)(new _reactNative.Animated.Value(defaultInfoHeight)).current;
|
|
70
|
-
const [, setCurrentInfoHeight] = (0, _react.useState)(defaultInfoHeight);
|
|
71
|
-
const currentInfoHeightRef = (0, _react.useRef)(defaultInfoHeight);
|
|
72
|
-
|
|
73
|
-
// Pan responder for dragging the mutation information panel
|
|
74
|
-
const infoPanResponder = (0, _react.useRef)(_reactNative.PanResponder.create({
|
|
75
|
-
onMoveShouldSetPanResponder: (evt, gestureState) => {
|
|
76
|
-
return Math.abs(gestureState.dy) > Math.abs(gestureState.dx) && Math.abs(gestureState.dy) > 10;
|
|
77
|
-
},
|
|
78
|
-
onPanResponderGrant: () => {
|
|
79
|
-
infoHeightAnim.stopAnimation(value => {
|
|
80
|
-
setCurrentInfoHeight(value);
|
|
81
|
-
currentInfoHeightRef.current = value;
|
|
82
|
-
infoHeightAnim.setValue(value);
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
onPanResponderMove: (evt, gestureState) => {
|
|
86
|
-
// Use the ref value which is always current
|
|
87
|
-
const newHeight = currentInfoHeightRef.current - gestureState.dy;
|
|
88
|
-
const clampedHeight = Math.max(minInfoHeight, Math.min(maxInfoHeight, newHeight));
|
|
89
|
-
infoHeightAnim.setValue(clampedHeight);
|
|
90
|
-
},
|
|
91
|
-
onPanResponderRelease: (evt, gestureState) => {
|
|
92
|
-
const finalHeight = Math.max(minInfoHeight, Math.min(maxInfoHeight, currentInfoHeightRef.current - gestureState.dy));
|
|
93
|
-
setCurrentInfoHeight(finalHeight);
|
|
94
|
-
currentInfoHeightRef.current = finalHeight;
|
|
95
|
-
_reactNative.Animated.timing(infoHeightAnim, {
|
|
96
|
-
toValue: finalHeight,
|
|
97
|
-
duration: 200,
|
|
98
|
-
useNativeDriver: false
|
|
99
|
-
}).start(() => {
|
|
100
|
-
// Ensure the animated value and state are perfectly synced after animation
|
|
101
|
-
infoHeightAnim.setValue(finalHeight);
|
|
102
|
-
setCurrentInfoHeight(finalHeight);
|
|
103
|
-
currentInfoHeightRef.current = finalHeight;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
})).current;
|
|
107
|
-
|
|
108
|
-
// Optimize FlatList performance - memoize renderItem to prevent re-renders
|
|
109
|
-
const renderMutation = (0, _react.useCallback)(({
|
|
110
|
-
item
|
|
111
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationButton.default, {
|
|
112
|
-
selected: selectedMutation,
|
|
113
|
-
setSelectedMutation: setSelectedMutation,
|
|
114
|
-
mutation: item
|
|
115
|
-
}), [selectedMutation, setSelectedMutation]);
|
|
116
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
117
|
-
style: styles.container,
|
|
118
|
-
children: [filteredMutations.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
119
|
-
style: styles.listWrapper,
|
|
120
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
121
|
-
"sentry-label": "ignore devtools mutations list",
|
|
122
|
-
testID: "buoy-rq-mutation-list",
|
|
123
|
-
data: filteredMutations,
|
|
124
|
-
renderItem: renderMutation,
|
|
125
|
-
keyExtractor: (item, index) => `${item.mutationId}-${item.state.submittedAt}-${item.state.status}-${index}`,
|
|
126
|
-
inverted: true,
|
|
127
|
-
showsVerticalScrollIndicator: true
|
|
128
|
-
// See QueryBrowser: e2e bundles keep every cell mounted so Detox's
|
|
129
|
-
// hittability check doesn't reject an on-screen row as clipped.
|
|
130
|
-
,
|
|
131
|
-
removeClippedSubviews: !(typeof process !== "undefined" && process.env?.EXPO_PUBLIC_E2E),
|
|
132
|
-
contentContainerStyle: contentContainerStyle || styles.listContent,
|
|
133
|
-
initialNumToRender: 10,
|
|
134
|
-
maxToRenderPerBatch: 10,
|
|
135
|
-
windowSize: 10,
|
|
136
|
-
scrollEnabled: false
|
|
137
|
-
})
|
|
138
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
139
|
-
testID: "buoy-rq-mutations-empty",
|
|
140
|
-
otto: activeFilter ? "filtering" : "scanning",
|
|
141
|
-
title: "No mutations found",
|
|
142
|
-
message: activeFilter ? `No ${activeFilter} mutations. Pick another status to see the rest.` : "Mutations run through useMutation will appear here."
|
|
143
|
-
}), selectedMutation && !hideInfoPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
144
|
-
style: [styles.mutationInfo, {
|
|
145
|
-
height: infoHeightAnim
|
|
146
|
-
}],
|
|
147
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
148
|
-
style: styles.dragHandle,
|
|
149
|
-
...infoPanResponder.panHandlers,
|
|
150
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
151
|
-
style: styles.dragIndicator
|
|
152
|
-
})
|
|
153
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
154
|
-
style: styles.mutationInfoContent,
|
|
155
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationInformation.default, {
|
|
156
|
-
selectedMutation: selectedMutation
|
|
157
|
-
})
|
|
158
|
-
})]
|
|
159
|
-
})]
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
const styles = _reactNative.StyleSheet.create({
|
|
163
|
-
container: {
|
|
164
|
-
flex: 1,
|
|
165
|
-
// Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
|
|
166
|
-
backgroundColor: "transparent"
|
|
167
|
-
},
|
|
168
|
-
listWrapper: {
|
|
169
|
-
flex: 1
|
|
170
|
-
},
|
|
171
|
-
listContent: {
|
|
172
|
-
// Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
|
|
173
|
-
backgroundColor: "transparent",
|
|
174
|
-
paddingHorizontal: 8,
|
|
175
|
-
paddingTop: 8
|
|
176
|
-
},
|
|
177
|
-
mutationInfo: {
|
|
178
|
-
borderTopWidth: 1,
|
|
179
|
-
borderTopColor: _sharedUi.night.color.border,
|
|
180
|
-
// Transparent so the night sheet's star field shows through.
|
|
181
|
-
backgroundColor: "transparent"
|
|
182
|
-
},
|
|
183
|
-
dragHandle: {
|
|
184
|
-
height: 20,
|
|
185
|
-
justifyContent: "center",
|
|
186
|
-
alignItems: "center",
|
|
187
|
-
backgroundColor: _sharedUi.night.color.surface,
|
|
188
|
-
borderBottomWidth: 1,
|
|
189
|
-
borderBottomColor: _sharedUi.night.color.border
|
|
190
|
-
},
|
|
191
|
-
dragIndicator: {
|
|
192
|
-
width: 40,
|
|
193
|
-
height: 4,
|
|
194
|
-
backgroundColor: _sharedUi.night.color.placeholder,
|
|
195
|
-
borderRadius: 2
|
|
196
|
-
},
|
|
197
|
-
mutationInfoContent: {
|
|
198
|
-
flex: 1,
|
|
199
|
-
// Transparent so the night sheet's star field shows through.
|
|
200
|
-
backgroundColor: "transparent"
|
|
201
|
-
},
|
|
202
|
-
emptyContainer: {
|
|
203
|
-
flex: 1,
|
|
204
|
-
justifyContent: "center",
|
|
205
|
-
alignItems: "center",
|
|
206
|
-
padding: 32,
|
|
207
|
-
backgroundColor: _sharedUi.night.color.surface,
|
|
208
|
-
margin: 16,
|
|
209
|
-
borderRadius: 8,
|
|
210
|
-
borderWidth: 1,
|
|
211
|
-
borderColor: _sharedUi.night.color.border
|
|
212
|
-
},
|
|
213
|
-
emptyText: {
|
|
214
|
-
color: _sharedUi.night.color.textTertiary,
|
|
215
|
-
fontSize: 14,
|
|
216
|
-
textAlign: "center",
|
|
217
|
-
fontFamily: _sharedUi.monoFont,
|
|
218
|
-
letterSpacing: 0.5
|
|
219
|
-
}
|
|
220
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationsList;var _react=require("react");var _reactNative=require("react-native");var _MutationButton=_interopRequireDefault(require("./MutationButton"));var _MutationInformation=_interopRequireDefault(require("./MutationInformation"));var _useAllMutations=_interopRequireDefault(require("../../hooks/useAllMutations"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function MutationsList({selectedMutation:r,setSelectedMutation:f,activeFilter:o,hideInfoPanel:b=false,contentContainerStyle:x,searchText:u=""}){const{mutations:h}=(0,_useAllMutations.default)();const C=t=>{if(t.state.isPaused)return"paused";const e=t.state.status;return e};const g=(0,_react.useMemo)(()=>{let t=h;if(o){t=t.filter(e=>{const n=C(e);return n===o})}if(u){const e=u.toLowerCase();t=t.filter(n=>{const s=n.options.mutationKey;if(!s)return false;const w=Array.isArray(s)?s:[s];const R=w.filter(c=>c!=null).map(c=>String(c)).join(" ").toLowerCase();return R.includes(e)})}return t},[h,o,u]);const m=_reactNative.Dimensions.get("window").height;const l=m*.4;const p=150;const y=m*.7;const a=(0,_react.useRef)(new _reactNative.Animated.Value(l)).current;const[,d]=(0,_react.useState)(l);const i=(0,_react.useRef)(l);const M=(0,_react.useRef)(_reactNative.PanResponder.create({onMoveShouldSetPanResponder:(t,e)=>{return Math.abs(e.dy)>Math.abs(e.dx)&&Math.abs(e.dy)>10},onPanResponderGrant:()=>{a.stopAnimation(t=>{d(t);i.current=t;a.setValue(t)})},onPanResponderMove:(t,e)=>{const n=i.current-e.dy;const s=Math.max(p,Math.min(y,n));a.setValue(s)},onPanResponderRelease:(t,e)=>{const n=Math.max(p,Math.min(y,i.current-e.dy));d(n);i.current=n;_reactNative.Animated.timing(a,{toValue:n,duration:200,useNativeDriver:false}).start(()=>{a.setValue(n);d(n);i.current=n})}})).current;const I=(0,_react.useCallback)(({item:t})=>(0,_jsxRuntime.jsx)(_MutationButton.default,{selected:r,setSelectedMutation:f,mutation:t}),[r,f]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[g.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.listWrapper,children:(0,_jsxRuntime.jsx)(_reactNative.FlatList,{"sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:g,renderItem:I,keyExtractor:(t,e)=>`${t.mutationId}-${t.state.submittedAt}-${t.state.status}-${e}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:x||styles.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{testID:"buoy-rq-mutations-empty",otto:o?"filtering":"scanning",title:"No mutations found",message:o?`No ${o} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),r&&!b&&(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.mutationInfo,{height:a}],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dragHandle,...M.panHandlers,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dragIndicator})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.mutationInfoContent,children:(0,_jsxRuntime.jsx)(_MutationInformation.default,{selectedMutation:r})})]})]})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:_sharedUi.night.color.surface,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.border},dragIndicator:{width:40,height:4,backgroundColor:_sharedUi.night.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:_sharedUi.night.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border},emptyText:{color:_sharedUi.night.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:_sharedUi.monoFont,letterSpacing:.5}});
|