@buoy-gg/react-query 1.7.2
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 +389 -0
- package/lib/commonjs/index.js +107 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/preset.js +220 -0
- package/lib/commonjs/react-query/ReactQueryDevTools.js +335 -0
- package/lib/commonjs/react-query/components/DataEditorMode.js +316 -0
- package/lib/commonjs/react-query/components/FilterStatusBadge.js +51 -0
- package/lib/commonjs/react-query/components/MutationBrowserMode.js +51 -0
- package/lib/commonjs/react-query/components/MutationEditorMode.js +257 -0
- package/lib/commonjs/react-query/components/QueryBrowserMode.js +82 -0
- package/lib/commonjs/react-query/components/QueryDebugInfo.js +107 -0
- package/lib/commonjs/react-query/components/QueryFilterViewV3.js +221 -0
- package/lib/commonjs/react-query/components/QuerySelector.js +208 -0
- package/lib/commonjs/react-query/components/ReactQueryDevToolsModal.js +76 -0
- package/lib/commonjs/react-query/components/ReactQuerySection.js +47 -0
- package/lib/commonjs/react-query/components/WifiToggle.js +49 -0
- package/lib/commonjs/react-query/components/index.js +253 -0
- package/lib/commonjs/react-query/components/modals/DataEditorModal.js +70 -0
- package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +69 -0
- package/lib/commonjs/react-query/components/modals/MutationBrowserModal.js +146 -0
- package/lib/commonjs/react-query/components/modals/MutationEditorModal.js +58 -0
- package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +63 -0
- package/lib/commonjs/react-query/components/modals/QueryBrowserModal.js +237 -0
- package/lib/commonjs/react-query/components/modals/ReactQueryModal.js +83 -0
- package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +171 -0
- package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +204 -0
- package/lib/commonjs/react-query/components/query-browser/ActionButton.js +127 -0
- package/lib/commonjs/react-query/components/query-browser/ClearCacheButton.js +53 -0
- package/lib/commonjs/react-query/components/query-browser/Explorer.js +985 -0
- package/lib/commonjs/react-query/components/query-browser/MutationButton.js +184 -0
- package/lib/commonjs/react-query/components/query-browser/MutationDetails.js +122 -0
- package/lib/commonjs/react-query/components/query-browser/MutationDetailsChips.js +66 -0
- package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +117 -0
- package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +111 -0
- package/lib/commonjs/react-query/components/query-browser/MutationsList.js +212 -0
- package/lib/commonjs/react-query/components/query-browser/NetworkToggleButton.js +54 -0
- package/lib/commonjs/react-query/components/query-browser/QueryActions.js +138 -0
- package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +146 -0
- package/lib/commonjs/react-query/components/query-browser/QueryDetails.js +137 -0
- package/lib/commonjs/react-query/components/query-browser/QueryDetailsChip.js +76 -0
- package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +94 -0
- package/lib/commonjs/react-query/components/query-browser/QueryRow.js +93 -0
- package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +125 -0
- package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +130 -0
- package/lib/commonjs/react-query/components/query-browser/StorageStatusCount.js +106 -0
- package/lib/commonjs/react-query/components/query-browser/index.js +170 -0
- package/lib/commonjs/react-query/components/query-browser/svgs.js +74 -0
- package/lib/commonjs/react-query/hooks/index.js +96 -0
- package/lib/commonjs/react-query/hooks/useActionButtons.js +59 -0
- package/lib/commonjs/react-query/hooks/useAllMutations.js +35 -0
- package/lib/commonjs/react-query/hooks/useAllQueries.js +117 -0
- package/lib/commonjs/react-query/hooks/useModalManager.js +178 -0
- package/lib/commonjs/react-query/hooks/useModalPersistence.js +71 -0
- package/lib/commonjs/react-query/hooks/useMutationActionButtons.js +22 -0
- package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +110 -0
- package/lib/commonjs/react-query/hooks/useReactQueryState.js +24 -0
- package/lib/commonjs/react-query/hooks/useSelectedMutation.js +30 -0
- package/lib/commonjs/react-query/hooks/useSelectedQuery.js +96 -0
- package/lib/commonjs/react-query/hooks/useStorageQueryCounts.js +28 -0
- package/lib/commonjs/react-query/hooks/useWifiState.js +67 -0
- package/lib/commonjs/react-query/index.js +16 -0
- package/lib/commonjs/react-query/types/index.js +16 -0
- package/lib/commonjs/react-query/types/types.js +14 -0
- package/lib/commonjs/react-query/utils/actions/deleteItem.js +23 -0
- package/lib/commonjs/react-query/utils/actions/invalidate.js +13 -0
- package/lib/commonjs/react-query/utils/actions/refetch.js +15 -0
- package/lib/commonjs/react-query/utils/actions/remove.js +12 -0
- package/lib/commonjs/react-query/utils/actions/reset.js +15 -0
- package/lib/commonjs/react-query/utils/actions/triggerError.js +30 -0
- package/lib/commonjs/react-query/utils/actions/triggerLoading.js +51 -0
- package/lib/commonjs/react-query/utils/deleteNestedDataByPath.js +56 -0
- package/lib/commonjs/react-query/utils/formatRelativeTime.js +29 -0
- package/lib/commonjs/react-query/utils/getQueryStatusColor.js +16 -0
- package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +17 -0
- package/lib/commonjs/react-query/utils/getStorageQueryCounts.js +35 -0
- package/lib/commonjs/react-query/utils/index.js +170 -0
- package/lib/commonjs/react-query/utils/modalStorageOperations.js +127 -0
- package/lib/commonjs/react-query/utils/storageQueryUtils.js +149 -0
- package/lib/commonjs/react-query/utils/updateNestedDataByPath.js +61 -0
- package/lib/module/index.js +19 -0
- package/lib/module/preset.js +216 -0
- package/lib/module/react-query/ReactQueryDevTools.js +68 -0
- package/lib/module/react-query/components/DataEditorMode.js +310 -0
- package/lib/module/react-query/components/FilterStatusBadge.js +47 -0
- package/lib/module/react-query/components/MutationBrowserMode.js +46 -0
- package/lib/module/react-query/components/MutationEditorMode.js +252 -0
- package/lib/module/react-query/components/QueryBrowserMode.js +77 -0
- package/lib/module/react-query/components/QueryDebugInfo.js +104 -0
- package/lib/module/react-query/components/QueryFilterViewV3.js +218 -0
- package/lib/module/react-query/components/QuerySelector.js +204 -0
- package/lib/module/react-query/components/ReactQueryDevToolsModal.js +72 -0
- package/lib/module/react-query/components/ReactQuerySection.js +43 -0
- package/lib/module/react-query/components/WifiToggle.js +46 -0
- package/lib/module/react-query/components/index.js +29 -0
- package/lib/module/react-query/components/modals/DataEditorModal.js +66 -0
- package/lib/module/react-query/components/modals/MutationBrowserFooter.js +64 -0
- package/lib/module/react-query/components/modals/MutationBrowserModal.js +143 -0
- package/lib/module/react-query/components/modals/MutationEditorModal.js +54 -0
- package/lib/module/react-query/components/modals/QueryBrowserFooter.js +58 -0
- package/lib/module/react-query/components/modals/QueryBrowserModal.js +233 -0
- package/lib/module/react-query/components/modals/ReactQueryModal.js +79 -0
- package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +167 -0
- package/lib/module/react-query/components/modals/SwipeIndicator.js +200 -0
- package/lib/module/react-query/components/query-browser/ActionButton.js +124 -0
- package/lib/module/react-query/components/query-browser/ClearCacheButton.js +49 -0
- package/lib/module/react-query/components/query-browser/Explorer.js +983 -0
- package/lib/module/react-query/components/query-browser/MutationButton.js +180 -0
- package/lib/module/react-query/components/query-browser/MutationDetails.js +117 -0
- package/lib/module/react-query/components/query-browser/MutationDetailsChips.js +62 -0
- package/lib/module/react-query/components/query-browser/MutationInformation.js +112 -0
- package/lib/module/react-query/components/query-browser/MutationStatusCount.js +106 -0
- package/lib/module/react-query/components/query-browser/MutationsList.js +207 -0
- package/lib/module/react-query/components/query-browser/NetworkToggleButton.js +50 -0
- package/lib/module/react-query/components/query-browser/QueryActions.js +133 -0
- package/lib/module/react-query/components/query-browser/QueryBrowser.js +141 -0
- package/lib/module/react-query/components/query-browser/QueryDetails.js +132 -0
- package/lib/module/react-query/components/query-browser/QueryDetailsChip.js +72 -0
- package/lib/module/react-query/components/query-browser/QueryInformation.js +89 -0
- package/lib/module/react-query/components/query-browser/QueryRow.js +89 -0
- package/lib/module/react-query/components/query-browser/QueryStatus.js +121 -0
- package/lib/module/react-query/components/query-browser/QueryStatusCount.js +125 -0
- package/lib/module/react-query/components/query-browser/StorageStatusCount.js +101 -0
- package/lib/module/react-query/components/query-browser/index.js +22 -0
- package/lib/module/react-query/components/query-browser/svgs.js +66 -0
- package/lib/module/react-query/hooks/index.js +23 -0
- package/lib/module/react-query/hooks/useActionButtons.js +54 -0
- package/lib/module/react-query/hooks/useAllMutations.js +32 -0
- package/lib/module/react-query/hooks/useAllQueries.js +114 -0
- package/lib/module/react-query/hooks/useModalManager.js +175 -0
- package/lib/module/react-query/hooks/useModalPersistence.js +67 -0
- package/lib/module/react-query/hooks/useMutationActionButtons.js +18 -0
- package/lib/module/react-query/hooks/useQueryStatusCounts.js +108 -0
- package/lib/module/react-query/hooks/useReactQueryState.js +20 -0
- package/lib/module/react-query/hooks/useSelectedMutation.js +27 -0
- package/lib/module/react-query/hooks/useSelectedQuery.js +92 -0
- package/lib/module/react-query/hooks/useStorageQueryCounts.js +25 -0
- package/lib/module/react-query/hooks/useWifiState.js +64 -0
- package/lib/module/react-query/index.js +3 -0
- package/lib/module/react-query/types/index.js +3 -0
- package/lib/module/react-query/types/types.js +10 -0
- package/lib/module/react-query/utils/actions/deleteItem.js +19 -0
- package/lib/module/react-query/utils/actions/invalidate.js +9 -0
- package/lib/module/react-query/utils/actions/refetch.js +11 -0
- package/lib/module/react-query/utils/actions/remove.js +8 -0
- package/lib/module/react-query/utils/actions/reset.js +11 -0
- package/lib/module/react-query/utils/actions/triggerError.js +26 -0
- package/lib/module/react-query/utils/actions/triggerLoading.js +47 -0
- package/lib/module/react-query/utils/deleteNestedDataByPath.js +51 -0
- package/lib/module/react-query/utils/formatRelativeTime.js +25 -0
- package/lib/module/react-query/utils/getQueryStatusColor.js +12 -0
- package/lib/module/react-query/utils/getQueryStatusLabel.js +13 -0
- package/lib/module/react-query/utils/getStorageQueryCounts.js +31 -0
- package/lib/module/react-query/utils/index.js +27 -0
- package/lib/module/react-query/utils/modalStorageOperations.js +117 -0
- package/lib/module/react-query/utils/storageQueryUtils.js +140 -0
- package/lib/module/react-query/utils/updateNestedDataByPath.js +56 -0
- package/lib/typescript/index.d.ts +7 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts +160 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/react-query/ReactQueryDevTools.d.ts +45 -0
- package/lib/typescript/react-query/ReactQueryDevTools.d.ts.map +1 -0
- package/lib/typescript/react-query/components/DataEditorMode.d.ts +25 -0
- package/lib/typescript/react-query/components/DataEditorMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/FilterStatusBadge.d.ts +12 -0
- package/lib/typescript/react-query/components/FilterStatusBadge.d.ts.map +1 -0
- package/lib/typescript/react-query/components/MutationBrowserMode.d.ts +14 -0
- package/lib/typescript/react-query/components/MutationBrowserMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/MutationEditorMode.d.ts +12 -0
- package/lib/typescript/react-query/components/MutationEditorMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QueryBrowserMode.d.ts +14 -0
- package/lib/typescript/react-query/components/QueryBrowserMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QueryDebugInfo.d.ts +6 -0
- package/lib/typescript/react-query/components/QueryDebugInfo.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts +17 -0
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QuerySelector.d.ts +15 -0
- package/lib/typescript/react-query/components/QuerySelector.d.ts.map +1 -0
- package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts +19 -0
- package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/ReactQuerySection.d.ts +11 -0
- package/lib/typescript/react-query/components/ReactQuerySection.d.ts.map +1 -0
- package/lib/typescript/react-query/components/WifiToggle.d.ts +8 -0
- package/lib/typescript/react-query/components/WifiToggle.d.ts.map +1 -0
- package/lib/typescript/react-query/components/index.d.ts +21 -0
- package/lib/typescript/react-query/components/index.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts +17 -0
- package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts +17 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts +21 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts +17 -0
- package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts +16 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts +21 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts +29 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts +19 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts +14 -0
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts +49 -0
- package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/Explorer.d.ts +19 -0
- package/lib/typescript/react-query/components/query-browser/Explorer.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts +8 -0
- package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts +17 -0
- package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts +11 -0
- package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts +19 -0
- package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts +17 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts +11 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts +18 -0
- package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/index.d.ts +21 -0
- package/lib/typescript/react-query/components/query-browser/index.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/svgs.d.ts +17 -0
- package/lib/typescript/react-query/components/query-browser/svgs.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/index.d.ts +13 -0
- package/lib/typescript/react-query/hooks/index.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useActionButtons.d.ts +21 -0
- package/lib/typescript/react-query/hooks/useActionButtons.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useAllMutations.d.ts +10 -0
- package/lib/typescript/react-query/hooks/useAllMutations.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useAllQueries.d.ts +12 -0
- package/lib/typescript/react-query/hooks/useAllQueries.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useModalManager.d.ts +39 -0
- package/lib/typescript/react-query/hooks/useModalManager.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useModalPersistence.d.ts +29 -0
- package/lib/typescript/react-query/hooks/useModalPersistence.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts +15 -0
- package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts +25 -0
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useReactQueryState.d.ts +9 -0
- package/lib/typescript/react-query/hooks/useReactQueryState.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts +7 -0
- package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts +25 -0
- package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts +10 -0
- package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useWifiState.d.ts +9 -0
- package/lib/typescript/react-query/hooks/useWifiState.d.ts.map +1 -0
- package/lib/typescript/react-query/index.d.ts +2 -0
- package/lib/typescript/react-query/index.d.ts.map +1 -0
- package/lib/typescript/react-query/types/index.d.ts +2 -0
- package/lib/typescript/react-query/types/index.d.ts.map +1 -0
- package/lib/typescript/react-query/types/types.d.ts +10 -0
- package/lib/typescript/react-query/types/types.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/deleteItem.d.ts +9 -0
- package/lib/typescript/react-query/utils/actions/deleteItem.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/invalidate.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/invalidate.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/refetch.d.ts +7 -0
- package/lib/typescript/react-query/utils/actions/refetch.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/remove.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/remove.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/reset.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/reset.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/triggerError.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/triggerError.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts +7 -0
- package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts +9 -0
- package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/formatRelativeTime.d.ts +7 -0
- package/lib/typescript/react-query/utils/formatRelativeTime.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts +10 -0
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts +9 -0
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts +13 -0
- package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/index.d.ts +17 -0
- package/lib/typescript/react-query/utils/index.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/modalStorageOperations.d.ts +55 -0
- package/lib/typescript/react-query/utils/modalStorageOperations.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/storageQueryUtils.d.ts +69 -0
- package/lib/typescript/react-query/utils/storageQueryUtils.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts +10 -0
- package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { TouchableOpacity, Text, View, StyleSheet } from "react-native";
|
|
4
|
+
import { CheckCircle, LoadingCircle, PauseCircle, XCircle } from "./svgs";
|
|
5
|
+
import { formatRelativeTime } from "../../utils/formatRelativeTime";
|
|
6
|
+
import { buoyColors } from "@buoy-gg/shared-ui";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const getMutationText = mutation => {
|
|
9
|
+
if (!mutation.options.mutationKey) return "Anonymous Mutation";
|
|
10
|
+
const keys = Array.isArray(mutation.options.mutationKey) ? mutation.options.mutationKey : [mutation.options.mutationKey];
|
|
11
|
+
return keys.filter(k => k != null).map(k => String(k)).join(" › ") || "Anonymous Mutation";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* List-row button for displaying mutation metadata and selecting it for detail inspection.
|
|
15
|
+
*/
|
|
16
|
+
export default function MutationButton({
|
|
17
|
+
mutation,
|
|
18
|
+
setSelectedMutation,
|
|
19
|
+
selected
|
|
20
|
+
}) {
|
|
21
|
+
const submittedAt = new Date(mutation.state.submittedAt).toLocaleTimeString();
|
|
22
|
+
|
|
23
|
+
// Get last updated timestamp - always show something for debugging
|
|
24
|
+
const getTimestamp = () => {
|
|
25
|
+
if (mutation.state.submittedAt && mutation.state.submittedAt > 0) {
|
|
26
|
+
return formatRelativeTime(mutation.state.submittedAt);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// @ts-ignore - exploring state fields for debugging
|
|
30
|
+
const stateAny = mutation.state;
|
|
31
|
+
|
|
32
|
+
// Try other timestamp fields
|
|
33
|
+
if (stateAny.updatedAt && stateAny.updatedAt > 0) {
|
|
34
|
+
return formatRelativeTime(stateAny.updatedAt);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Debug fallback
|
|
38
|
+
return `N/A (${mutation.state.submittedAt || 0})`;
|
|
39
|
+
};
|
|
40
|
+
const lastUpdated = getTimestamp();
|
|
41
|
+
const getStatusInfo = () => {
|
|
42
|
+
if (mutation.state.isPaused) {
|
|
43
|
+
return {
|
|
44
|
+
status: "Paused",
|
|
45
|
+
color: buoyColors.textMuted,
|
|
46
|
+
icon: /*#__PURE__*/_jsx(PauseCircle, {})
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
switch (mutation.state.status) {
|
|
50
|
+
case "success":
|
|
51
|
+
return {
|
|
52
|
+
status: "Success",
|
|
53
|
+
color: buoyColors.success,
|
|
54
|
+
icon: /*#__PURE__*/_jsx(CheckCircle, {})
|
|
55
|
+
};
|
|
56
|
+
case "error":
|
|
57
|
+
return {
|
|
58
|
+
status: "Error",
|
|
59
|
+
color: buoyColors.error,
|
|
60
|
+
icon: /*#__PURE__*/_jsx(XCircle, {})
|
|
61
|
+
};
|
|
62
|
+
case "pending":
|
|
63
|
+
return {
|
|
64
|
+
status: "Loading",
|
|
65
|
+
color: buoyColors.primary,
|
|
66
|
+
icon: /*#__PURE__*/_jsx(LoadingCircle, {})
|
|
67
|
+
};
|
|
68
|
+
default:
|
|
69
|
+
return {
|
|
70
|
+
status: "Idle",
|
|
71
|
+
color: buoyColors.textMuted,
|
|
72
|
+
icon: null
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const statusInfo = getStatusInfo();
|
|
77
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
78
|
+
"sentry-label": "ignore devtools mutation button",
|
|
79
|
+
onPress: () => setSelectedMutation(mutation === selected ? undefined : mutation),
|
|
80
|
+
style: [styles.button, selected?.mutationId === mutation.mutationId && styles.selected],
|
|
81
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
82
|
+
style: styles.rowContent,
|
|
83
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
84
|
+
style: styles.statusSection,
|
|
85
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
86
|
+
style: [styles.statusDot, {
|
|
87
|
+
backgroundColor: statusInfo.color
|
|
88
|
+
}]
|
|
89
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
90
|
+
style: styles.statusInfo,
|
|
91
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
92
|
+
style: [styles.statusLabel, {
|
|
93
|
+
color: statusInfo.color
|
|
94
|
+
}],
|
|
95
|
+
children: statusInfo.status
|
|
96
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
97
|
+
style: styles.submittedText,
|
|
98
|
+
children: submittedAt
|
|
99
|
+
})]
|
|
100
|
+
})]
|
|
101
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
102
|
+
style: styles.mutationSection,
|
|
103
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
104
|
+
style: styles.mutationKey,
|
|
105
|
+
children: getMutationText(mutation)
|
|
106
|
+
})
|
|
107
|
+
})]
|
|
108
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
109
|
+
style: styles.bottomRightContainer,
|
|
110
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
111
|
+
style: styles.bottomRightText,
|
|
112
|
+
children: lastUpdated
|
|
113
|
+
})
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const styles = StyleSheet.create({
|
|
118
|
+
button: {
|
|
119
|
+
backgroundColor: buoyColors.card,
|
|
120
|
+
borderRadius: 8,
|
|
121
|
+
borderWidth: 1,
|
|
122
|
+
borderColor: buoyColors.border,
|
|
123
|
+
marginHorizontal: 8,
|
|
124
|
+
marginVertical: 3,
|
|
125
|
+
padding: 12
|
|
126
|
+
},
|
|
127
|
+
selected: {
|
|
128
|
+
backgroundColor: buoyColors.primary + "15",
|
|
129
|
+
borderColor: buoyColors.primary + "50"
|
|
130
|
+
},
|
|
131
|
+
rowContent: {
|
|
132
|
+
flexDirection: "row",
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
justifyContent: "space-between"
|
|
135
|
+
},
|
|
136
|
+
statusSection: {
|
|
137
|
+
flexDirection: "row",
|
|
138
|
+
alignItems: "center",
|
|
139
|
+
gap: 8,
|
|
140
|
+
flex: 1
|
|
141
|
+
},
|
|
142
|
+
statusDot: {
|
|
143
|
+
width: 8,
|
|
144
|
+
height: 8,
|
|
145
|
+
borderRadius: 4
|
|
146
|
+
},
|
|
147
|
+
statusInfo: {
|
|
148
|
+
flex: 1
|
|
149
|
+
},
|
|
150
|
+
statusLabel: {
|
|
151
|
+
fontSize: 11,
|
|
152
|
+
fontWeight: "600",
|
|
153
|
+
lineHeight: 14
|
|
154
|
+
},
|
|
155
|
+
submittedText: {
|
|
156
|
+
fontSize: 10,
|
|
157
|
+
color: buoyColors.textMuted,
|
|
158
|
+
marginTop: 1
|
|
159
|
+
},
|
|
160
|
+
mutationSection: {
|
|
161
|
+
flex: 2,
|
|
162
|
+
paddingHorizontal: 12
|
|
163
|
+
},
|
|
164
|
+
mutationKey: {
|
|
165
|
+
fontFamily: "monospace",
|
|
166
|
+
fontSize: 12,
|
|
167
|
+
color: buoyColors.text,
|
|
168
|
+
lineHeight: 16
|
|
169
|
+
},
|
|
170
|
+
bottomRightContainer: {
|
|
171
|
+
position: "absolute",
|
|
172
|
+
bottom: 4,
|
|
173
|
+
right: 8
|
|
174
|
+
},
|
|
175
|
+
bottomRightText: {
|
|
176
|
+
fontSize: 9,
|
|
177
|
+
color: buoyColors.textMuted,
|
|
178
|
+
fontFamily: "monospace"
|
|
179
|
+
}
|
|
180
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, Text, ScrollView, StyleSheet } from "react-native";
|
|
4
|
+
import { displayValue, buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import MutationDetailsChips from "./MutationDetailsChips";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Displays high-level mutation metadata such as status, retries, and timestamps.
|
|
9
|
+
*/
|
|
10
|
+
export default function MutationDetails({
|
|
11
|
+
selectedMutation
|
|
12
|
+
}) {
|
|
13
|
+
if (selectedMutation === undefined) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const submittedAt = new Date(selectedMutation.state.submittedAt).toLocaleTimeString();
|
|
17
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
18
|
+
style: styles.minWidth,
|
|
19
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
20
|
+
style: styles.headerText,
|
|
21
|
+
children: "Mutation Details"
|
|
22
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
23
|
+
style: styles.row,
|
|
24
|
+
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
25
|
+
"sentry-label": "ignore devtools mutation details scroll",
|
|
26
|
+
horizontal: true,
|
|
27
|
+
style: styles.flex1,
|
|
28
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
29
|
+
style: styles.flexWrap,
|
|
30
|
+
children: `${selectedMutation.options.mutationKey ? displayValue(selectedMutation.options.mutationKey, true) : "No mutationKey found"}`
|
|
31
|
+
})
|
|
32
|
+
}), /*#__PURE__*/_jsx(MutationDetailsChips, {
|
|
33
|
+
status: selectedMutation.state.status
|
|
34
|
+
})]
|
|
35
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
36
|
+
style: styles.row,
|
|
37
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
38
|
+
style: styles.labelText,
|
|
39
|
+
children: "Submitted At:"
|
|
40
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
41
|
+
style: styles.valueText,
|
|
42
|
+
children: submittedAt
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
minWidth: {
|
|
49
|
+
minWidth: 200,
|
|
50
|
+
backgroundColor: buoyColors.card,
|
|
51
|
+
borderRadius: 6,
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderColor: buoyColors.primary + "4D",
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
shadowColor: buoyColors.primary,
|
|
56
|
+
shadowOffset: {
|
|
57
|
+
width: 0,
|
|
58
|
+
height: 0
|
|
59
|
+
},
|
|
60
|
+
shadowOpacity: 0.1,
|
|
61
|
+
shadowRadius: 6
|
|
62
|
+
},
|
|
63
|
+
headerText: {
|
|
64
|
+
backgroundColor: buoyColors.primary + "15",
|
|
65
|
+
paddingHorizontal: 12,
|
|
66
|
+
paddingVertical: 10,
|
|
67
|
+
fontWeight: "600",
|
|
68
|
+
fontSize: 12,
|
|
69
|
+
color: buoyColors.primary,
|
|
70
|
+
borderBottomWidth: 1,
|
|
71
|
+
borderBottomColor: buoyColors.primary + "33",
|
|
72
|
+
letterSpacing: 0.5,
|
|
73
|
+
textTransform: "uppercase",
|
|
74
|
+
fontFamily: "monospace"
|
|
75
|
+
},
|
|
76
|
+
row: {
|
|
77
|
+
flexDirection: "row",
|
|
78
|
+
justifyContent: "space-between",
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
paddingHorizontal: 12,
|
|
81
|
+
paddingVertical: 10,
|
|
82
|
+
borderBottomWidth: 1,
|
|
83
|
+
borderBottomColor: buoyColors.textMuted + "66"
|
|
84
|
+
},
|
|
85
|
+
flex1: {
|
|
86
|
+
flex: 1,
|
|
87
|
+
marginRight: 8
|
|
88
|
+
},
|
|
89
|
+
flexWrap: {
|
|
90
|
+
fontSize: 12,
|
|
91
|
+
color: buoyColors.text,
|
|
92
|
+
fontFamily: "monospace",
|
|
93
|
+
lineHeight: 18,
|
|
94
|
+
flexShrink: 1,
|
|
95
|
+
backgroundColor: buoyColors.primary + "15",
|
|
96
|
+
paddingHorizontal: 8,
|
|
97
|
+
paddingVertical: 4,
|
|
98
|
+
borderRadius: 4,
|
|
99
|
+
borderWidth: 1,
|
|
100
|
+
borderColor: buoyColors.primary + "4D"
|
|
101
|
+
},
|
|
102
|
+
labelText: {
|
|
103
|
+
fontSize: 10,
|
|
104
|
+
color: buoyColors.textSecondary,
|
|
105
|
+
fontWeight: "600",
|
|
106
|
+
letterSpacing: 0.5,
|
|
107
|
+
textTransform: "uppercase",
|
|
108
|
+
fontFamily: "monospace"
|
|
109
|
+
},
|
|
110
|
+
valueText: {
|
|
111
|
+
fontSize: 12,
|
|
112
|
+
color: buoyColors.text,
|
|
113
|
+
fontWeight: "500",
|
|
114
|
+
fontVariant: ["tabular-nums"],
|
|
115
|
+
fontFamily: "monospace"
|
|
116
|
+
}
|
|
117
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text, View, StyleSheet } from "react-native";
|
|
4
|
+
import { buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const backgroundColors = {
|
|
7
|
+
success: buoyColors.success + "15",
|
|
8
|
+
error: buoyColors.error + "15",
|
|
9
|
+
pending: buoyColors.primary + "15",
|
|
10
|
+
idle: buoyColors.textMuted + "1A"
|
|
11
|
+
};
|
|
12
|
+
const borderColors = {
|
|
13
|
+
success: buoyColors.success + "33",
|
|
14
|
+
error: buoyColors.error + "33",
|
|
15
|
+
pending: buoyColors.primary + "33",
|
|
16
|
+
idle: buoyColors.textMuted + "33"
|
|
17
|
+
};
|
|
18
|
+
const textColors = {
|
|
19
|
+
success: buoyColors.success,
|
|
20
|
+
error: buoyColors.error,
|
|
21
|
+
pending: buoyColors.primary,
|
|
22
|
+
idle: buoyColors.textMuted
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Small status chip used in mutation detail views that adapts styling to the mutation status.
|
|
26
|
+
*/
|
|
27
|
+
export default function QueryDetailsChip({
|
|
28
|
+
status
|
|
29
|
+
}) {
|
|
30
|
+
const statusToColor = status;
|
|
31
|
+
const backgroundColor = backgroundColors[statusToColor];
|
|
32
|
+
const borderColor = borderColors[statusToColor];
|
|
33
|
+
const textColor = textColors[statusToColor];
|
|
34
|
+
return /*#__PURE__*/_jsx(View, {
|
|
35
|
+
style: [styles.container, {
|
|
36
|
+
backgroundColor,
|
|
37
|
+
borderColor
|
|
38
|
+
}],
|
|
39
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
40
|
+
style: [styles.text, {
|
|
41
|
+
color: textColor
|
|
42
|
+
}],
|
|
43
|
+
children: status
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
container: {
|
|
49
|
+
paddingHorizontal: 8,
|
|
50
|
+
paddingVertical: 4,
|
|
51
|
+
borderWidth: 1,
|
|
52
|
+
borderRadius: 6,
|
|
53
|
+
alignSelf: "flex-start"
|
|
54
|
+
},
|
|
55
|
+
text: {
|
|
56
|
+
fontSize: 11,
|
|
57
|
+
fontWeight: "600",
|
|
58
|
+
textTransform: "uppercase",
|
|
59
|
+
letterSpacing: 0.5,
|
|
60
|
+
fontFamily: "monospace"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import DataExplorer from "./Explorer";
|
|
4
|
+
import { ScrollView, Text, View, StyleSheet } from "react-native";
|
|
5
|
+
import MutationDetails from "./MutationDetails";
|
|
6
|
+
import { buoyColors } from "@buoy-gg/shared-ui";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
/** Detailed information block for a selected mutation within the modal experience. */
|
|
9
|
+
export default function MutationInformation({
|
|
10
|
+
selectedMutation
|
|
11
|
+
}) {
|
|
12
|
+
return /*#__PURE__*/_jsxs(ScrollView, {
|
|
13
|
+
"sentry-label": "ignore devtools mutation information scroll",
|
|
14
|
+
style: styles.flex1,
|
|
15
|
+
contentContainerStyle: styles.scrollContent,
|
|
16
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
17
|
+
style: styles.section,
|
|
18
|
+
children: /*#__PURE__*/_jsx(MutationDetails, {
|
|
19
|
+
selectedMutation: selectedMutation
|
|
20
|
+
})
|
|
21
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
22
|
+
style: styles.section,
|
|
23
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
24
|
+
style: styles.textHeader,
|
|
25
|
+
children: "Variables Details"
|
|
26
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
27
|
+
style: styles.padding,
|
|
28
|
+
children: /*#__PURE__*/_jsx(DataExplorer, {
|
|
29
|
+
label: "Variables",
|
|
30
|
+
value: selectedMutation?.state.variables,
|
|
31
|
+
defaultExpanded: ["Variables"]
|
|
32
|
+
})
|
|
33
|
+
})]
|
|
34
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
35
|
+
style: styles.section,
|
|
36
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
37
|
+
style: styles.textHeader,
|
|
38
|
+
children: "Context Details"
|
|
39
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
40
|
+
style: styles.padding,
|
|
41
|
+
children: /*#__PURE__*/_jsx(DataExplorer, {
|
|
42
|
+
label: "Context",
|
|
43
|
+
value: selectedMutation?.state.context,
|
|
44
|
+
defaultExpanded: ["Context"]
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
48
|
+
style: styles.section,
|
|
49
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
50
|
+
style: styles.textHeader,
|
|
51
|
+
children: "Data Explorer"
|
|
52
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
53
|
+
style: styles.padding,
|
|
54
|
+
children: /*#__PURE__*/_jsx(DataExplorer, {
|
|
55
|
+
label: "Data",
|
|
56
|
+
defaultExpanded: ["Data"],
|
|
57
|
+
value: selectedMutation?.state.data
|
|
58
|
+
})
|
|
59
|
+
})]
|
|
60
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
61
|
+
style: styles.section,
|
|
62
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
63
|
+
style: styles.textHeader,
|
|
64
|
+
children: "Mutations Explorer"
|
|
65
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
66
|
+
style: styles.padding,
|
|
67
|
+
children: /*#__PURE__*/_jsx(DataExplorer, {
|
|
68
|
+
label: "Mutation",
|
|
69
|
+
defaultExpanded: ["Mutation"],
|
|
70
|
+
value: selectedMutation
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
flex1: {
|
|
78
|
+
flex: 1,
|
|
79
|
+
backgroundColor: buoyColors.base
|
|
80
|
+
},
|
|
81
|
+
scrollContent: {
|
|
82
|
+
paddingBottom: 16,
|
|
83
|
+
paddingHorizontal: 8
|
|
84
|
+
},
|
|
85
|
+
section: {
|
|
86
|
+
marginBottom: 16
|
|
87
|
+
},
|
|
88
|
+
textHeader: {
|
|
89
|
+
textAlign: "left",
|
|
90
|
+
backgroundColor: buoyColors.primary + "15",
|
|
91
|
+
padding: 12,
|
|
92
|
+
fontSize: 12,
|
|
93
|
+
fontWeight: "700",
|
|
94
|
+
color: buoyColors.primary,
|
|
95
|
+
borderTopLeftRadius: 8,
|
|
96
|
+
borderTopRightRadius: 8,
|
|
97
|
+
borderBottomWidth: 1,
|
|
98
|
+
borderBottomColor: buoyColors.primary + "33",
|
|
99
|
+
fontFamily: "monospace",
|
|
100
|
+
letterSpacing: 1,
|
|
101
|
+
textTransform: "uppercase"
|
|
102
|
+
},
|
|
103
|
+
padding: {
|
|
104
|
+
padding: 12,
|
|
105
|
+
backgroundColor: buoyColors.card,
|
|
106
|
+
borderBottomLeftRadius: 8,
|
|
107
|
+
borderBottomRightRadius: 8,
|
|
108
|
+
borderWidth: 1,
|
|
109
|
+
borderColor: buoyColors.border,
|
|
110
|
+
borderTopWidth: 0
|
|
111
|
+
}
|
|
112
|
+
});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, StyleSheet, ScrollView } from "react-native";
|
|
4
|
+
import QueryStatus from "./QueryStatus";
|
|
5
|
+
import { useMutationStatusCounts } from "../../hooks/useQueryStatusCounts";
|
|
6
|
+
import { useRef, useState } from "react";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
/**
|
|
9
|
+
* Horizontal status filter bar tailored for mutations. Integrates scroll detection to avoid
|
|
10
|
+
* accidental filter toggles while panning.
|
|
11
|
+
*/
|
|
12
|
+
const MutationStatusCount = ({
|
|
13
|
+
activeFilter,
|
|
14
|
+
onFilterChange
|
|
15
|
+
}) => {
|
|
16
|
+
const {
|
|
17
|
+
pending,
|
|
18
|
+
success,
|
|
19
|
+
error,
|
|
20
|
+
paused
|
|
21
|
+
} = useMutationStatusCounts();
|
|
22
|
+
const [isScrolling, setIsScrolling] = useState(false);
|
|
23
|
+
const touchStartX = useRef(0);
|
|
24
|
+
const touchStartY = useRef(0);
|
|
25
|
+
const handleFilterClick = (filter, event) => {
|
|
26
|
+
if (event) {
|
|
27
|
+
const dx = Math.abs(event.nativeEvent.pageX - touchStartX.current);
|
|
28
|
+
const dy = Math.abs(event.nativeEvent.pageY - touchStartY.current);
|
|
29
|
+
if (dx > 5 || dy > 5 || isScrolling) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (onFilterChange) {
|
|
34
|
+
onFilterChange(activeFilter === filter ? null : filter);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const handleTouchStart = event => {
|
|
38
|
+
touchStartX.current = event.nativeEvent.pageX;
|
|
39
|
+
touchStartY.current = event.nativeEvent.pageY;
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_jsx(View, {
|
|
42
|
+
style: styles.mutationStatusContainer,
|
|
43
|
+
children: /*#__PURE__*/_jsxs(ScrollView, {
|
|
44
|
+
"sentry-label": "ignore devtools mutation status count scroll",
|
|
45
|
+
horizontal: true,
|
|
46
|
+
showsHorizontalScrollIndicator: false,
|
|
47
|
+
style: styles.scrollView,
|
|
48
|
+
contentContainerStyle: styles.scrollContent,
|
|
49
|
+
onScrollBeginDrag: () => setIsScrolling(true),
|
|
50
|
+
onScrollEndDrag: () => setTimeout(() => setIsScrolling(false), 300),
|
|
51
|
+
onMomentumScrollBegin: () => setIsScrolling(true),
|
|
52
|
+
onMomentumScrollEnd: () => setTimeout(() => setIsScrolling(false), 300),
|
|
53
|
+
children: [/*#__PURE__*/_jsx(QueryStatus, {
|
|
54
|
+
label: "Pending",
|
|
55
|
+
color: "blue",
|
|
56
|
+
count: pending,
|
|
57
|
+
isActive: activeFilter === "pending",
|
|
58
|
+
onPress: event => handleFilterClick("pending", event),
|
|
59
|
+
onTouchStart: handleTouchStart,
|
|
60
|
+
showLabel: true
|
|
61
|
+
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
62
|
+
label: "Success",
|
|
63
|
+
color: "green",
|
|
64
|
+
count: success,
|
|
65
|
+
isActive: activeFilter === "success",
|
|
66
|
+
onPress: event => handleFilterClick("success", event),
|
|
67
|
+
onTouchStart: handleTouchStart,
|
|
68
|
+
showLabel: true
|
|
69
|
+
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
70
|
+
label: "Error",
|
|
71
|
+
color: "red",
|
|
72
|
+
count: error,
|
|
73
|
+
isActive: activeFilter === "error",
|
|
74
|
+
onPress: event => handleFilterClick("error", event),
|
|
75
|
+
onTouchStart: handleTouchStart,
|
|
76
|
+
showLabel: true
|
|
77
|
+
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
78
|
+
label: "Paused",
|
|
79
|
+
color: "purple",
|
|
80
|
+
count: paused,
|
|
81
|
+
isActive: activeFilter === "paused",
|
|
82
|
+
onPress: event => handleFilterClick("paused", event),
|
|
83
|
+
onTouchStart: handleTouchStart,
|
|
84
|
+
showLabel: true
|
|
85
|
+
})]
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
const styles = StyleSheet.create({
|
|
90
|
+
mutationStatusContainer: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
minWidth: 0
|
|
93
|
+
},
|
|
94
|
+
scrollView: {
|
|
95
|
+
flex: 1
|
|
96
|
+
},
|
|
97
|
+
scrollContent: {
|
|
98
|
+
flexDirection: "row",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
gap: 8,
|
|
101
|
+
paddingHorizontal: 4,
|
|
102
|
+
paddingVertical: 4,
|
|
103
|
+
flexGrow: 1
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export default MutationStatusCount;
|