@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,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, Text, StyleSheet, ScrollView } from "react-native";
|
|
4
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
5
|
+
import { useSafeAreaInsets, buoyColors } from "@buoy-gg/shared-ui";
|
|
6
|
+
import Explorer from "./query-browser/Explorer";
|
|
7
|
+
import QueryDetails from "./query-browser/QueryDetails";
|
|
8
|
+
import ActionButton from "./query-browser/ActionButton";
|
|
9
|
+
import { getQueryStatusLabel } from "../utils/getQueryStatusLabel";
|
|
10
|
+
import { useActionButtons } from "../hooks/useActionButtons";
|
|
11
|
+
import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* Primary data editing surface displayed inside the React Query modal. Couples the editable
|
|
15
|
+
* explorer, read-only insight panels, and action footer for the selected query.
|
|
16
|
+
*/
|
|
17
|
+
export function DataEditorMode({
|
|
18
|
+
selectedQuery,
|
|
19
|
+
isFloatingMode,
|
|
20
|
+
disableInternalFooter = false,
|
|
21
|
+
queryVersion
|
|
22
|
+
}) {
|
|
23
|
+
const insets = useSafeAreaInsets({
|
|
24
|
+
minBottom: 16
|
|
25
|
+
});
|
|
26
|
+
const queryClient = useQueryClient();
|
|
27
|
+
const actionButtons = useActionButtons(selectedQuery, queryClient, queryVersion);
|
|
28
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
29
|
+
children: [/*#__PURE__*/_jsxs(ScrollView, {
|
|
30
|
+
accessibilityLabel: "Data editor mode",
|
|
31
|
+
accessibilityHint: "View data editor mode",
|
|
32
|
+
"sentry-label": "ignore data editor mode",
|
|
33
|
+
style: styles.explorerScrollContainer,
|
|
34
|
+
contentContainerStyle: [styles.explorerScrollContent, !disableInternalFooter && {
|
|
35
|
+
paddingBottom: 72
|
|
36
|
+
}],
|
|
37
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
38
|
+
style: styles.section,
|
|
39
|
+
children: [/*#__PURE__*/_jsx(DataExplorer, {
|
|
40
|
+
visible: !!selectedQuery.state.data,
|
|
41
|
+
selectedQuery: selectedQuery,
|
|
42
|
+
queryVersion: queryVersion
|
|
43
|
+
}), /*#__PURE__*/_jsx(DataEmptyState, {
|
|
44
|
+
visible: !selectedQuery.state.data,
|
|
45
|
+
selectedQuery: selectedQuery
|
|
46
|
+
})]
|
|
47
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
48
|
+
style: styles.section,
|
|
49
|
+
children: /*#__PURE__*/_jsx(QueryDetails, {
|
|
50
|
+
query: selectedQuery
|
|
51
|
+
})
|
|
52
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
53
|
+
style: styles.section,
|
|
54
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
55
|
+
style: styles.queryExplorerContainer,
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
57
|
+
style: styles.queryExplorerHeader,
|
|
58
|
+
children: "Query Explorer"
|
|
59
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
60
|
+
style: styles.queryExplorerContent,
|
|
61
|
+
children: /*#__PURE__*/_jsx(DataViewer, {
|
|
62
|
+
title: "",
|
|
63
|
+
data: selectedQuery,
|
|
64
|
+
maxDepth: 10,
|
|
65
|
+
rawMode: true,
|
|
66
|
+
showTypeFilter: true,
|
|
67
|
+
initialExpanded: false
|
|
68
|
+
})
|
|
69
|
+
})]
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
}), !disableInternalFooter && /*#__PURE__*/_jsx(View, {
|
|
73
|
+
style: [styles.actionFooter, {
|
|
74
|
+
paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
|
|
75
|
+
}],
|
|
76
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
77
|
+
style: styles.actionsGrid,
|
|
78
|
+
children: actionButtons.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
|
|
79
|
+
"sentry-label": `ignore action button ${action.label}`,
|
|
80
|
+
onClick: action.onPress,
|
|
81
|
+
text: action.label,
|
|
82
|
+
bgColorClass: action.bgColorClass,
|
|
83
|
+
_textColorClass: action.textColorClass,
|
|
84
|
+
disabled: action.disabled
|
|
85
|
+
}, index))
|
|
86
|
+
})
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// External footer component for sticky modal footer usage
|
|
92
|
+
/**
|
|
93
|
+
* Standalone footer variant that can be composed into sticky modal layouts while reusing the
|
|
94
|
+
* standard action button arrangement.
|
|
95
|
+
*/
|
|
96
|
+
export function DataEditorActionsFooter({
|
|
97
|
+
selectedQuery,
|
|
98
|
+
isFloatingMode,
|
|
99
|
+
queryVersion
|
|
100
|
+
}) {
|
|
101
|
+
const insets = useSafeAreaInsets({
|
|
102
|
+
minBottom: 16
|
|
103
|
+
});
|
|
104
|
+
const queryClient = useQueryClient();
|
|
105
|
+
const actionButtons = useActionButtons(selectedQuery, queryClient, queryVersion);
|
|
106
|
+
return /*#__PURE__*/_jsx(View, {
|
|
107
|
+
style: [styles.actionFooter, {
|
|
108
|
+
paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
|
|
109
|
+
}],
|
|
110
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
111
|
+
style: styles.actionsGrid,
|
|
112
|
+
children: actionButtons.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
|
|
113
|
+
"sentry-label": `ignore action button ${action.label}`,
|
|
114
|
+
onClick: action.onPress,
|
|
115
|
+
text: action.label,
|
|
116
|
+
bgColorClass: action.bgColorClass,
|
|
117
|
+
_textColorClass: action.textColorClass,
|
|
118
|
+
disabled: action.disabled
|
|
119
|
+
}, index))
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function DataExplorer({
|
|
124
|
+
visible,
|
|
125
|
+
selectedQuery,
|
|
126
|
+
queryVersion = 0
|
|
127
|
+
}) {
|
|
128
|
+
if (!visible) return null;
|
|
129
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
130
|
+
style: styles.dataContainer,
|
|
131
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
132
|
+
style: styles.dataHeader,
|
|
133
|
+
children: "Data Editor"
|
|
134
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
135
|
+
style: styles.dataContent,
|
|
136
|
+
children: /*#__PURE__*/_jsx(Explorer, {
|
|
137
|
+
editable: true,
|
|
138
|
+
label: "Data",
|
|
139
|
+
value: selectedQuery.state.data,
|
|
140
|
+
defaultExpanded: ["Data"],
|
|
141
|
+
activeQuery: selectedQuery,
|
|
142
|
+
dataVersion: queryVersion
|
|
143
|
+
})
|
|
144
|
+
})]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function DataEmptyState({
|
|
148
|
+
visible,
|
|
149
|
+
selectedQuery
|
|
150
|
+
}) {
|
|
151
|
+
if (!visible) return null;
|
|
152
|
+
const getEmptyStateContent = () => {
|
|
153
|
+
// Check if query is disabled first
|
|
154
|
+
if (selectedQuery.isDisabled()) {
|
|
155
|
+
return {
|
|
156
|
+
title: "Query Disabled",
|
|
157
|
+
description: "This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (selectedQuery.state.status === "pending" || getQueryStatusLabel(selectedQuery) === "fetching") {
|
|
161
|
+
return {
|
|
162
|
+
title: selectedQuery.state.status === "pending" ? "Loading..." : "Refetching...",
|
|
163
|
+
description: "Please wait while the query is being executed."
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
if (selectedQuery.state.status === "error") {
|
|
167
|
+
return {
|
|
168
|
+
title: "Query Error",
|
|
169
|
+
description: selectedQuery.state.error?.message || "An error occurred while fetching data."
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
title: "No Data Available",
|
|
174
|
+
description: "This query has no data to edit. Try refetching the query first."
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
const {
|
|
178
|
+
title,
|
|
179
|
+
description
|
|
180
|
+
} = getEmptyStateContent();
|
|
181
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
182
|
+
style: styles.emptyState,
|
|
183
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
184
|
+
style: styles.emptyTitle,
|
|
185
|
+
children: title
|
|
186
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
187
|
+
style: styles.emptyDescription,
|
|
188
|
+
children: description
|
|
189
|
+
})]
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
const styles = StyleSheet.create({
|
|
193
|
+
// Explorer section
|
|
194
|
+
explorerScrollContainer: {
|
|
195
|
+
flex: 1
|
|
196
|
+
},
|
|
197
|
+
explorerScrollContent: {
|
|
198
|
+
paddingBottom: 16,
|
|
199
|
+
paddingHorizontal: 8,
|
|
200
|
+
flexGrow: 1
|
|
201
|
+
},
|
|
202
|
+
// Section layout matching QueryInformation
|
|
203
|
+
section: {
|
|
204
|
+
marginBottom: 16
|
|
205
|
+
},
|
|
206
|
+
// Empty states matching main dev tools
|
|
207
|
+
emptyState: {
|
|
208
|
+
flex: 1,
|
|
209
|
+
justifyContent: "center",
|
|
210
|
+
alignItems: "center",
|
|
211
|
+
padding: 32
|
|
212
|
+
},
|
|
213
|
+
emptyTitle: {
|
|
214
|
+
color: buoyColors.text,
|
|
215
|
+
fontSize: 18,
|
|
216
|
+
fontWeight: "600",
|
|
217
|
+
marginBottom: 8,
|
|
218
|
+
textAlign: "center"
|
|
219
|
+
},
|
|
220
|
+
emptyDescription: {
|
|
221
|
+
color: buoyColors.textSecondary,
|
|
222
|
+
fontSize: 14,
|
|
223
|
+
textAlign: "center",
|
|
224
|
+
lineHeight: 20,
|
|
225
|
+
maxWidth: 280
|
|
226
|
+
},
|
|
227
|
+
// Action footer matching main dev tools exactly
|
|
228
|
+
actionFooter: {
|
|
229
|
+
borderTopWidth: 1,
|
|
230
|
+
borderTopColor: buoyColors.border,
|
|
231
|
+
paddingTop: 4,
|
|
232
|
+
paddingHorizontal: 12,
|
|
233
|
+
backgroundColor: buoyColors.base,
|
|
234
|
+
borderBottomLeftRadius: 14,
|
|
235
|
+
borderBottomRightRadius: 14
|
|
236
|
+
},
|
|
237
|
+
actionsGrid: {
|
|
238
|
+
flexDirection: "row",
|
|
239
|
+
flexWrap: "wrap",
|
|
240
|
+
gap: 6,
|
|
241
|
+
// Reduced from 8
|
|
242
|
+
justifyContent: "space-between",
|
|
243
|
+
paddingBottom: 2
|
|
244
|
+
},
|
|
245
|
+
// Query Explorer styled container matching QueryDetails
|
|
246
|
+
queryExplorerContainer: {
|
|
247
|
+
minWidth: 200,
|
|
248
|
+
backgroundColor: buoyColors.card,
|
|
249
|
+
borderRadius: 6,
|
|
250
|
+
borderWidth: 1,
|
|
251
|
+
borderColor: buoyColors.primary + "4D",
|
|
252
|
+
overflow: "hidden",
|
|
253
|
+
shadowColor: buoyColors.primary,
|
|
254
|
+
shadowOffset: {
|
|
255
|
+
width: 0,
|
|
256
|
+
height: 0
|
|
257
|
+
},
|
|
258
|
+
shadowOpacity: 0.1,
|
|
259
|
+
shadowRadius: 6
|
|
260
|
+
},
|
|
261
|
+
queryExplorerHeader: {
|
|
262
|
+
backgroundColor: buoyColors.primary + "1A",
|
|
263
|
+
paddingHorizontal: 12,
|
|
264
|
+
paddingVertical: 10,
|
|
265
|
+
fontWeight: "600",
|
|
266
|
+
fontSize: 12,
|
|
267
|
+
color: buoyColors.primary,
|
|
268
|
+
borderBottomWidth: 1,
|
|
269
|
+
borderBottomColor: buoyColors.primary + "33",
|
|
270
|
+
letterSpacing: 0.5,
|
|
271
|
+
textTransform: "uppercase",
|
|
272
|
+
fontFamily: "monospace"
|
|
273
|
+
},
|
|
274
|
+
queryExplorerContent: {
|
|
275
|
+
padding: 8
|
|
276
|
+
},
|
|
277
|
+
// Data section with teal accent - editable/success theme
|
|
278
|
+
dataContainer: {
|
|
279
|
+
minWidth: 200,
|
|
280
|
+
backgroundColor: buoyColors.card,
|
|
281
|
+
borderRadius: 6,
|
|
282
|
+
borderWidth: 1,
|
|
283
|
+
borderColor: buoyColors.primary + "4D",
|
|
284
|
+
overflow: "hidden",
|
|
285
|
+
shadowColor: buoyColors.primary,
|
|
286
|
+
shadowOffset: {
|
|
287
|
+
width: 0,
|
|
288
|
+
height: 0
|
|
289
|
+
},
|
|
290
|
+
shadowOpacity: 0.1,
|
|
291
|
+
shadowRadius: 6,
|
|
292
|
+
marginTop: 8
|
|
293
|
+
},
|
|
294
|
+
dataHeader: {
|
|
295
|
+
backgroundColor: buoyColors.primary + "1A",
|
|
296
|
+
paddingHorizontal: 12,
|
|
297
|
+
paddingVertical: 10,
|
|
298
|
+
fontWeight: "600",
|
|
299
|
+
fontSize: 12,
|
|
300
|
+
color: buoyColors.primary,
|
|
301
|
+
borderBottomWidth: 1,
|
|
302
|
+
borderBottomColor: buoyColors.primary + "33",
|
|
303
|
+
letterSpacing: 0.5,
|
|
304
|
+
textTransform: "uppercase",
|
|
305
|
+
fontFamily: "monospace"
|
|
306
|
+
},
|
|
307
|
+
dataContent: {
|
|
308
|
+
padding: 8
|
|
309
|
+
}
|
|
310
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
|
|
4
|
+
import { buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Compact badge showing filter status (e.g., "Showing 5 of 12")
|
|
8
|
+
* Displayed below the header when filters are active
|
|
9
|
+
*/
|
|
10
|
+
export function FilterStatusBadge({
|
|
11
|
+
totalCount,
|
|
12
|
+
filteredCount,
|
|
13
|
+
onPress
|
|
14
|
+
}) {
|
|
15
|
+
// Don't show if no filtering is happening
|
|
16
|
+
if (filteredCount === totalCount) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const content = /*#__PURE__*/_jsx(View, {
|
|
20
|
+
style: styles.container,
|
|
21
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
22
|
+
style: styles.text,
|
|
23
|
+
children: ["Showing ", filteredCount, " of ", totalCount]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
if (onPress) {
|
|
27
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
28
|
+
onPress: onPress,
|
|
29
|
+
activeOpacity: 0.7,
|
|
30
|
+
children: content
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return content;
|
|
34
|
+
}
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
container: {
|
|
37
|
+
flexDirection: "row",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
paddingVertical: 2
|
|
41
|
+
},
|
|
42
|
+
text: {
|
|
43
|
+
fontSize: 9,
|
|
44
|
+
color: buoyColors.textMuted,
|
|
45
|
+
fontFamily: "monospace"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
import MutationsList from "./query-browser/MutationsList";
|
|
5
|
+
import { buoyColors } from "@buoy-gg/shared-ui";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Layout wrapper that renders the mutation list alongside selection handling glue logic used by
|
|
9
|
+
* the React Query modal.
|
|
10
|
+
*/
|
|
11
|
+
export function MutationBrowserMode({
|
|
12
|
+
selectedMutation,
|
|
13
|
+
onMutationSelect,
|
|
14
|
+
activeFilter,
|
|
15
|
+
searchText = ""
|
|
16
|
+
}) {
|
|
17
|
+
// Convert function to Dispatch compatible format
|
|
18
|
+
const handleMutationSelect = action => {
|
|
19
|
+
if (typeof action === "function") {
|
|
20
|
+
onMutationSelect(action(selectedMutation));
|
|
21
|
+
} else {
|
|
22
|
+
onMutationSelect(action);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/_jsx(View, {
|
|
26
|
+
style: styles.mutationListContainer,
|
|
27
|
+
children: /*#__PURE__*/_jsx(MutationsList, {
|
|
28
|
+
selectedMutation: selectedMutation,
|
|
29
|
+
setSelectedMutation: handleMutationSelect,
|
|
30
|
+
activeFilter: activeFilter,
|
|
31
|
+
searchText: searchText,
|
|
32
|
+
hideInfoPanel: true,
|
|
33
|
+
contentContainerStyle: styles.mutationListContent
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const styles = StyleSheet.create({
|
|
38
|
+
mutationListContainer: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
backgroundColor: buoyColors.base
|
|
41
|
+
},
|
|
42
|
+
mutationListContent: {
|
|
43
|
+
padding: 8,
|
|
44
|
+
backgroundColor: buoyColors.base
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, Text, StyleSheet, ScrollView } from "react-native";
|
|
4
|
+
import { useSafeAreaInsets, buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import Explorer from "./query-browser/Explorer";
|
|
6
|
+
import MutationDetails from "./query-browser/MutationDetails";
|
|
7
|
+
import ActionButton from "./query-browser/ActionButton";
|
|
8
|
+
import { useMutationActionButtons } from "../hooks/useMutationActionButtons";
|
|
9
|
+
import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* Mutation-focused editing experience mirroring the query editor layout. Provides mutation detail
|
|
13
|
+
* panels, data inspector, and action buttons for the selected mutation entry.
|
|
14
|
+
*/
|
|
15
|
+
export function MutationEditorMode({
|
|
16
|
+
selectedMutation,
|
|
17
|
+
isFloatingMode
|
|
18
|
+
}) {
|
|
19
|
+
const insets = useSafeAreaInsets({
|
|
20
|
+
minBottom: 16
|
|
21
|
+
});
|
|
22
|
+
const actionButtons = useMutationActionButtons(selectedMutation);
|
|
23
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
24
|
+
children: [/*#__PURE__*/_jsxs(ScrollView, {
|
|
25
|
+
accessibilityLabel: "Mutation editor mode",
|
|
26
|
+
accessibilityHint: "View mutation editor mode",
|
|
27
|
+
"sentry-label": "ignore mutation editor mode",
|
|
28
|
+
style: styles.explorerScrollContainer,
|
|
29
|
+
contentContainerStyle: styles.explorerScrollContent,
|
|
30
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
31
|
+
style: styles.section,
|
|
32
|
+
children: [/*#__PURE__*/_jsx(DataExplorer, {
|
|
33
|
+
visible: !!selectedMutation.state.data,
|
|
34
|
+
selectedMutation: selectedMutation
|
|
35
|
+
}), /*#__PURE__*/_jsx(DataEmptyState, {
|
|
36
|
+
visible: !selectedMutation.state.data,
|
|
37
|
+
selectedMutation: selectedMutation
|
|
38
|
+
})]
|
|
39
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
40
|
+
style: styles.section,
|
|
41
|
+
children: /*#__PURE__*/_jsx(MutationDetails, {
|
|
42
|
+
selectedMutation: selectedMutation
|
|
43
|
+
})
|
|
44
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
45
|
+
style: styles.section,
|
|
46
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
47
|
+
style: styles.mutationExplorerContainer,
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
49
|
+
style: styles.mutationExplorerHeader,
|
|
50
|
+
children: "Mutation Explorer"
|
|
51
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
52
|
+
style: styles.mutationExplorerContent,
|
|
53
|
+
children: /*#__PURE__*/_jsx(DataViewer, {
|
|
54
|
+
title: "",
|
|
55
|
+
data: selectedMutation,
|
|
56
|
+
maxDepth: 10,
|
|
57
|
+
rawMode: true,
|
|
58
|
+
showTypeFilter: true,
|
|
59
|
+
initialExpanded: false
|
|
60
|
+
})
|
|
61
|
+
})]
|
|
62
|
+
})
|
|
63
|
+
})]
|
|
64
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
65
|
+
style: [styles.actionFooter, {
|
|
66
|
+
paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
|
|
67
|
+
}],
|
|
68
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
69
|
+
style: styles.actionsGrid,
|
|
70
|
+
children: actionButtons.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
|
|
71
|
+
"sentry-label": `ignore action button ${action.label}`,
|
|
72
|
+
onClick: action.onPress,
|
|
73
|
+
text: action.label,
|
|
74
|
+
bgColorClass: action.bgColorClass,
|
|
75
|
+
_textColorClass: action.textColorClass,
|
|
76
|
+
disabled: action.disabled
|
|
77
|
+
}, index))
|
|
78
|
+
})
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function DataExplorer({
|
|
83
|
+
visible,
|
|
84
|
+
selectedMutation
|
|
85
|
+
}) {
|
|
86
|
+
if (!visible) return null;
|
|
87
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
88
|
+
style: styles.dataContainer,
|
|
89
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
90
|
+
style: styles.dataHeader,
|
|
91
|
+
children: "Data Editor"
|
|
92
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
93
|
+
style: styles.dataContent,
|
|
94
|
+
children: /*#__PURE__*/_jsx(Explorer, {
|
|
95
|
+
editable: true,
|
|
96
|
+
label: "Data",
|
|
97
|
+
value: selectedMutation.state.data,
|
|
98
|
+
defaultExpanded: ["Data"]
|
|
99
|
+
}, selectedMutation.mutationId)
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function DataEmptyState({
|
|
104
|
+
visible,
|
|
105
|
+
selectedMutation
|
|
106
|
+
}) {
|
|
107
|
+
if (!visible) return null;
|
|
108
|
+
const getEmptyStateContent = () => {
|
|
109
|
+
if (selectedMutation.state.status === "pending") {
|
|
110
|
+
return {
|
|
111
|
+
title: "Pending...",
|
|
112
|
+
description: "The mutation is in progress."
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (selectedMutation.state.status === "error") {
|
|
116
|
+
return {
|
|
117
|
+
title: "Mutation Error",
|
|
118
|
+
description: selectedMutation.state.error?.message || "An error occurred."
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
title: "No Data Available",
|
|
123
|
+
description: "This mutation has no data."
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
const {
|
|
127
|
+
title,
|
|
128
|
+
description
|
|
129
|
+
} = getEmptyStateContent();
|
|
130
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
131
|
+
style: styles.emptyState,
|
|
132
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
133
|
+
style: styles.emptyTitle,
|
|
134
|
+
children: title
|
|
135
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
136
|
+
style: styles.emptyDescription,
|
|
137
|
+
children: description
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const styles = StyleSheet.create({
|
|
142
|
+
explorerScrollContainer: {
|
|
143
|
+
flex: 1
|
|
144
|
+
},
|
|
145
|
+
explorerScrollContent: {
|
|
146
|
+
paddingBottom: 16,
|
|
147
|
+
paddingHorizontal: 8,
|
|
148
|
+
flexGrow: 1
|
|
149
|
+
},
|
|
150
|
+
section: {
|
|
151
|
+
marginBottom: 16
|
|
152
|
+
},
|
|
153
|
+
emptyState: {
|
|
154
|
+
flex: 1,
|
|
155
|
+
justifyContent: "center",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
padding: 32
|
|
158
|
+
},
|
|
159
|
+
emptyTitle: {
|
|
160
|
+
color: buoyColors.text,
|
|
161
|
+
fontSize: 18,
|
|
162
|
+
fontWeight: "600",
|
|
163
|
+
marginBottom: 8,
|
|
164
|
+
textAlign: "center"
|
|
165
|
+
},
|
|
166
|
+
emptyDescription: {
|
|
167
|
+
color: buoyColors.textSecondary,
|
|
168
|
+
fontSize: 14,
|
|
169
|
+
textAlign: "center",
|
|
170
|
+
lineHeight: 20,
|
|
171
|
+
maxWidth: 280
|
|
172
|
+
},
|
|
173
|
+
actionFooter: {
|
|
174
|
+
borderTopWidth: 1,
|
|
175
|
+
borderTopColor: buoyColors.border,
|
|
176
|
+
paddingVertical: 8,
|
|
177
|
+
paddingHorizontal: 12,
|
|
178
|
+
backgroundColor: buoyColors.base,
|
|
179
|
+
borderBottomLeftRadius: 14,
|
|
180
|
+
borderBottomRightRadius: 14
|
|
181
|
+
},
|
|
182
|
+
actionsGrid: {
|
|
183
|
+
flexDirection: "row",
|
|
184
|
+
flexWrap: "wrap",
|
|
185
|
+
gap: 6,
|
|
186
|
+
justifyContent: "space-between"
|
|
187
|
+
},
|
|
188
|
+
// Mutation Explorer styled container matching QueryDetails
|
|
189
|
+
mutationExplorerContainer: {
|
|
190
|
+
minWidth: 200,
|
|
191
|
+
backgroundColor: buoyColors.card,
|
|
192
|
+
borderRadius: 6,
|
|
193
|
+
borderWidth: 1,
|
|
194
|
+
borderColor: buoyColors.primary + "4D",
|
|
195
|
+
overflow: "hidden",
|
|
196
|
+
shadowColor: buoyColors.primary,
|
|
197
|
+
shadowOffset: {
|
|
198
|
+
width: 0,
|
|
199
|
+
height: 0
|
|
200
|
+
},
|
|
201
|
+
shadowOpacity: 0.1,
|
|
202
|
+
shadowRadius: 6
|
|
203
|
+
},
|
|
204
|
+
mutationExplorerHeader: {
|
|
205
|
+
backgroundColor: buoyColors.primary + "1A",
|
|
206
|
+
paddingHorizontal: 12,
|
|
207
|
+
paddingVertical: 10,
|
|
208
|
+
fontWeight: "600",
|
|
209
|
+
fontSize: 12,
|
|
210
|
+
color: buoyColors.primary,
|
|
211
|
+
borderBottomWidth: 1,
|
|
212
|
+
borderBottomColor: buoyColors.primary + "33",
|
|
213
|
+
letterSpacing: 0.5,
|
|
214
|
+
textTransform: "uppercase",
|
|
215
|
+
fontFamily: "monospace"
|
|
216
|
+
},
|
|
217
|
+
mutationExplorerContent: {
|
|
218
|
+
padding: 8
|
|
219
|
+
},
|
|
220
|
+
// Data section matching query editor theme for consistency
|
|
221
|
+
dataContainer: {
|
|
222
|
+
minWidth: 200,
|
|
223
|
+
backgroundColor: buoyColors.card,
|
|
224
|
+
borderRadius: 6,
|
|
225
|
+
borderWidth: 1,
|
|
226
|
+
borderColor: buoyColors.primary + "4D",
|
|
227
|
+
overflow: "hidden",
|
|
228
|
+
shadowColor: buoyColors.primary,
|
|
229
|
+
shadowOffset: {
|
|
230
|
+
width: 0,
|
|
231
|
+
height: 0
|
|
232
|
+
},
|
|
233
|
+
shadowOpacity: 0.1,
|
|
234
|
+
shadowRadius: 6
|
|
235
|
+
},
|
|
236
|
+
dataHeader: {
|
|
237
|
+
backgroundColor: buoyColors.primary + "1A",
|
|
238
|
+
paddingHorizontal: 12,
|
|
239
|
+
paddingVertical: 10,
|
|
240
|
+
fontWeight: "600",
|
|
241
|
+
fontSize: 12,
|
|
242
|
+
color: buoyColors.primary,
|
|
243
|
+
borderBottomWidth: 1,
|
|
244
|
+
borderBottomColor: buoyColors.primary + "33",
|
|
245
|
+
letterSpacing: 0.5,
|
|
246
|
+
textTransform: "uppercase",
|
|
247
|
+
fontFamily: "monospace"
|
|
248
|
+
},
|
|
249
|
+
dataContent: {
|
|
250
|
+
padding: 8
|
|
251
|
+
}
|
|
252
|
+
});
|