@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,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MutationBrowserMode = MutationBrowserMode;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _MutationsList = _interopRequireDefault(require("./query-browser/MutationsList"));
|
|
9
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* Layout wrapper that renders the mutation list alongside selection handling glue logic used by
|
|
14
|
+
* the React Query modal.
|
|
15
|
+
*/
|
|
16
|
+
function MutationBrowserMode({
|
|
17
|
+
selectedMutation,
|
|
18
|
+
onMutationSelect,
|
|
19
|
+
activeFilter,
|
|
20
|
+
searchText = ""
|
|
21
|
+
}) {
|
|
22
|
+
// Convert function to Dispatch compatible format
|
|
23
|
+
const handleMutationSelect = action => {
|
|
24
|
+
if (typeof action === "function") {
|
|
25
|
+
onMutationSelect(action(selectedMutation));
|
|
26
|
+
} else {
|
|
27
|
+
onMutationSelect(action);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
31
|
+
style: styles.mutationListContainer,
|
|
32
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationsList.default, {
|
|
33
|
+
selectedMutation: selectedMutation,
|
|
34
|
+
setSelectedMutation: handleMutationSelect,
|
|
35
|
+
activeFilter: activeFilter,
|
|
36
|
+
searchText: searchText,
|
|
37
|
+
hideInfoPanel: true,
|
|
38
|
+
contentContainerStyle: styles.mutationListContent
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const styles = _reactNative.StyleSheet.create({
|
|
43
|
+
mutationListContainer: {
|
|
44
|
+
flex: 1,
|
|
45
|
+
backgroundColor: _sharedUi.buoyColors.base
|
|
46
|
+
},
|
|
47
|
+
mutationListContent: {
|
|
48
|
+
padding: 8,
|
|
49
|
+
backgroundColor: _sharedUi.buoyColors.base
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MutationEditorMode = MutationEditorMode;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
+
var _Explorer = _interopRequireDefault(require("./query-browser/Explorer"));
|
|
10
|
+
var _MutationDetails = _interopRequireDefault(require("./query-browser/MutationDetails"));
|
|
11
|
+
var _ActionButton = _interopRequireDefault(require("./query-browser/ActionButton"));
|
|
12
|
+
var _useMutationActionButtons = require("../hooks/useMutationActionButtons");
|
|
13
|
+
var _dataViewer = require("@buoy-gg/shared-ui/dataViewer");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
/**
|
|
17
|
+
* Mutation-focused editing experience mirroring the query editor layout. Provides mutation detail
|
|
18
|
+
* panels, data inspector, and action buttons for the selected mutation entry.
|
|
19
|
+
*/
|
|
20
|
+
function MutationEditorMode({
|
|
21
|
+
selectedMutation,
|
|
22
|
+
isFloatingMode
|
|
23
|
+
}) {
|
|
24
|
+
const insets = (0, _sharedUi.useSafeAreaInsets)({
|
|
25
|
+
minBottom: 16
|
|
26
|
+
});
|
|
27
|
+
const actionButtons = (0, _useMutationActionButtons.useMutationActionButtons)(selectedMutation);
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
30
|
+
accessibilityLabel: "Mutation editor mode",
|
|
31
|
+
accessibilityHint: "View mutation editor mode",
|
|
32
|
+
"sentry-label": "ignore mutation editor mode",
|
|
33
|
+
style: styles.explorerScrollContainer,
|
|
34
|
+
contentContainerStyle: styles.explorerScrollContent,
|
|
35
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
36
|
+
style: styles.section,
|
|
37
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DataExplorer, {
|
|
38
|
+
visible: !!selectedMutation.state.data,
|
|
39
|
+
selectedMutation: selectedMutation
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DataEmptyState, {
|
|
41
|
+
visible: !selectedMutation.state.data,
|
|
42
|
+
selectedMutation: selectedMutation
|
|
43
|
+
})]
|
|
44
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
45
|
+
style: styles.section,
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationDetails.default, {
|
|
47
|
+
selectedMutation: selectedMutation
|
|
48
|
+
})
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
50
|
+
style: styles.section,
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
52
|
+
style: styles.mutationExplorerContainer,
|
|
53
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
54
|
+
style: styles.mutationExplorerHeader,
|
|
55
|
+
children: "Mutation Explorer"
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
57
|
+
style: styles.mutationExplorerContent,
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.DataViewer, {
|
|
59
|
+
title: "",
|
|
60
|
+
data: selectedMutation,
|
|
61
|
+
maxDepth: 10,
|
|
62
|
+
rawMode: true,
|
|
63
|
+
showTypeFilter: true,
|
|
64
|
+
initialExpanded: false
|
|
65
|
+
})
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
70
|
+
style: [styles.actionFooter, {
|
|
71
|
+
paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
|
|
72
|
+
}],
|
|
73
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
74
|
+
style: styles.actionsGrid,
|
|
75
|
+
children: actionButtons.map((action, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
|
|
76
|
+
"sentry-label": `ignore action button ${action.label}`,
|
|
77
|
+
onClick: action.onPress,
|
|
78
|
+
text: action.label,
|
|
79
|
+
bgColorClass: action.bgColorClass,
|
|
80
|
+
_textColorClass: action.textColorClass,
|
|
81
|
+
disabled: action.disabled
|
|
82
|
+
}, index))
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function DataExplorer({
|
|
88
|
+
visible,
|
|
89
|
+
selectedMutation
|
|
90
|
+
}) {
|
|
91
|
+
if (!visible) return null;
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
93
|
+
style: styles.dataContainer,
|
|
94
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
95
|
+
style: styles.dataHeader,
|
|
96
|
+
children: "Data Editor"
|
|
97
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
98
|
+
style: styles.dataContent,
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
100
|
+
editable: true,
|
|
101
|
+
label: "Data",
|
|
102
|
+
value: selectedMutation.state.data,
|
|
103
|
+
defaultExpanded: ["Data"]
|
|
104
|
+
}, selectedMutation.mutationId)
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function DataEmptyState({
|
|
109
|
+
visible,
|
|
110
|
+
selectedMutation
|
|
111
|
+
}) {
|
|
112
|
+
if (!visible) return null;
|
|
113
|
+
const getEmptyStateContent = () => {
|
|
114
|
+
if (selectedMutation.state.status === "pending") {
|
|
115
|
+
return {
|
|
116
|
+
title: "Pending...",
|
|
117
|
+
description: "The mutation is in progress."
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
if (selectedMutation.state.status === "error") {
|
|
121
|
+
return {
|
|
122
|
+
title: "Mutation Error",
|
|
123
|
+
description: selectedMutation.state.error?.message || "An error occurred."
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
title: "No Data Available",
|
|
128
|
+
description: "This mutation has no data."
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
const {
|
|
132
|
+
title,
|
|
133
|
+
description
|
|
134
|
+
} = getEmptyStateContent();
|
|
135
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
136
|
+
style: styles.emptyState,
|
|
137
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
138
|
+
style: styles.emptyTitle,
|
|
139
|
+
children: title
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
141
|
+
style: styles.emptyDescription,
|
|
142
|
+
children: description
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
const styles = _reactNative.StyleSheet.create({
|
|
147
|
+
explorerScrollContainer: {
|
|
148
|
+
flex: 1
|
|
149
|
+
},
|
|
150
|
+
explorerScrollContent: {
|
|
151
|
+
paddingBottom: 16,
|
|
152
|
+
paddingHorizontal: 8,
|
|
153
|
+
flexGrow: 1
|
|
154
|
+
},
|
|
155
|
+
section: {
|
|
156
|
+
marginBottom: 16
|
|
157
|
+
},
|
|
158
|
+
emptyState: {
|
|
159
|
+
flex: 1,
|
|
160
|
+
justifyContent: "center",
|
|
161
|
+
alignItems: "center",
|
|
162
|
+
padding: 32
|
|
163
|
+
},
|
|
164
|
+
emptyTitle: {
|
|
165
|
+
color: _sharedUi.buoyColors.text,
|
|
166
|
+
fontSize: 18,
|
|
167
|
+
fontWeight: "600",
|
|
168
|
+
marginBottom: 8,
|
|
169
|
+
textAlign: "center"
|
|
170
|
+
},
|
|
171
|
+
emptyDescription: {
|
|
172
|
+
color: _sharedUi.buoyColors.textSecondary,
|
|
173
|
+
fontSize: 14,
|
|
174
|
+
textAlign: "center",
|
|
175
|
+
lineHeight: 20,
|
|
176
|
+
maxWidth: 280
|
|
177
|
+
},
|
|
178
|
+
actionFooter: {
|
|
179
|
+
borderTopWidth: 1,
|
|
180
|
+
borderTopColor: _sharedUi.buoyColors.border,
|
|
181
|
+
paddingVertical: 8,
|
|
182
|
+
paddingHorizontal: 12,
|
|
183
|
+
backgroundColor: _sharedUi.buoyColors.base,
|
|
184
|
+
borderBottomLeftRadius: 14,
|
|
185
|
+
borderBottomRightRadius: 14
|
|
186
|
+
},
|
|
187
|
+
actionsGrid: {
|
|
188
|
+
flexDirection: "row",
|
|
189
|
+
flexWrap: "wrap",
|
|
190
|
+
gap: 6,
|
|
191
|
+
justifyContent: "space-between"
|
|
192
|
+
},
|
|
193
|
+
// Mutation Explorer styled container matching QueryDetails
|
|
194
|
+
mutationExplorerContainer: {
|
|
195
|
+
minWidth: 200,
|
|
196
|
+
backgroundColor: _sharedUi.buoyColors.card,
|
|
197
|
+
borderRadius: 6,
|
|
198
|
+
borderWidth: 1,
|
|
199
|
+
borderColor: _sharedUi.buoyColors.primary + "4D",
|
|
200
|
+
overflow: "hidden",
|
|
201
|
+
shadowColor: _sharedUi.buoyColors.primary,
|
|
202
|
+
shadowOffset: {
|
|
203
|
+
width: 0,
|
|
204
|
+
height: 0
|
|
205
|
+
},
|
|
206
|
+
shadowOpacity: 0.1,
|
|
207
|
+
shadowRadius: 6
|
|
208
|
+
},
|
|
209
|
+
mutationExplorerHeader: {
|
|
210
|
+
backgroundColor: _sharedUi.buoyColors.primary + "1A",
|
|
211
|
+
paddingHorizontal: 12,
|
|
212
|
+
paddingVertical: 10,
|
|
213
|
+
fontWeight: "600",
|
|
214
|
+
fontSize: 12,
|
|
215
|
+
color: _sharedUi.buoyColors.primary,
|
|
216
|
+
borderBottomWidth: 1,
|
|
217
|
+
borderBottomColor: _sharedUi.buoyColors.primary + "33",
|
|
218
|
+
letterSpacing: 0.5,
|
|
219
|
+
textTransform: "uppercase",
|
|
220
|
+
fontFamily: "monospace"
|
|
221
|
+
},
|
|
222
|
+
mutationExplorerContent: {
|
|
223
|
+
padding: 8
|
|
224
|
+
},
|
|
225
|
+
// Data section matching query editor theme for consistency
|
|
226
|
+
dataContainer: {
|
|
227
|
+
minWidth: 200,
|
|
228
|
+
backgroundColor: _sharedUi.buoyColors.card,
|
|
229
|
+
borderRadius: 6,
|
|
230
|
+
borderWidth: 1,
|
|
231
|
+
borderColor: _sharedUi.buoyColors.primary + "4D",
|
|
232
|
+
overflow: "hidden",
|
|
233
|
+
shadowColor: _sharedUi.buoyColors.primary,
|
|
234
|
+
shadowOffset: {
|
|
235
|
+
width: 0,
|
|
236
|
+
height: 0
|
|
237
|
+
},
|
|
238
|
+
shadowOpacity: 0.1,
|
|
239
|
+
shadowRadius: 6
|
|
240
|
+
},
|
|
241
|
+
dataHeader: {
|
|
242
|
+
backgroundColor: _sharedUi.buoyColors.primary + "1A",
|
|
243
|
+
paddingHorizontal: 12,
|
|
244
|
+
paddingVertical: 10,
|
|
245
|
+
fontWeight: "600",
|
|
246
|
+
fontSize: 12,
|
|
247
|
+
color: _sharedUi.buoyColors.primary,
|
|
248
|
+
borderBottomWidth: 1,
|
|
249
|
+
borderBottomColor: _sharedUi.buoyColors.primary + "33",
|
|
250
|
+
letterSpacing: 0.5,
|
|
251
|
+
textTransform: "uppercase",
|
|
252
|
+
fontFamily: "monospace"
|
|
253
|
+
},
|
|
254
|
+
dataContent: {
|
|
255
|
+
padding: 8
|
|
256
|
+
}
|
|
257
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.QueryBrowserMode = QueryBrowserMode;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _index = require("./query-browser/index");
|
|
10
|
+
var _FilterStatusBadge = require("./FilterStatusBadge");
|
|
11
|
+
var _useAllQueries = _interopRequireDefault(require("../hooks/useAllQueries"));
|
|
12
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
/** Wrapper around the query list experience used inside the modal view. */
|
|
16
|
+
function QueryBrowserMode({
|
|
17
|
+
selectedQuery,
|
|
18
|
+
onQuerySelect,
|
|
19
|
+
activeFilter,
|
|
20
|
+
searchText = "",
|
|
21
|
+
ignoredPatterns = new Set(),
|
|
22
|
+
includedPatterns = new Set(),
|
|
23
|
+
onFilterPress
|
|
24
|
+
}) {
|
|
25
|
+
const hasIncludeFilters = includedPatterns.size > 0;
|
|
26
|
+
const hasExcludeFilters = ignoredPatterns.size > 0;
|
|
27
|
+
const allQueries = (0, _useAllQueries.default)();
|
|
28
|
+
|
|
29
|
+
// Calculate filtered count for the badge
|
|
30
|
+
const filteredCount = (0, _react.useMemo)(() => {
|
|
31
|
+
let filtered = allQueries;
|
|
32
|
+
|
|
33
|
+
// Apply included patterns filter
|
|
34
|
+
if (includedPatterns.size > 0) {
|
|
35
|
+
filtered = filtered.filter(query => {
|
|
36
|
+
if (!query?.queryKey) return false;
|
|
37
|
+
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
38
|
+
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
39
|
+
return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Apply ignored patterns filter
|
|
44
|
+
if (ignoredPatterns.size > 0) {
|
|
45
|
+
filtered = filtered.filter(query => {
|
|
46
|
+
if (!query?.queryKey) return true;
|
|
47
|
+
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
48
|
+
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
49
|
+
return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return filtered.length;
|
|
53
|
+
}, [allQueries, includedPatterns, ignoredPatterns]);
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
55
|
+
style: styles.queryListContainer,
|
|
56
|
+
children: [(hasIncludeFilters || hasExcludeFilters) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FilterStatusBadge.FilterStatusBadge, {
|
|
57
|
+
totalCount: allQueries.length,
|
|
58
|
+
filteredCount: filteredCount,
|
|
59
|
+
onPress: onFilterPress
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.QueryBrowser, {
|
|
61
|
+
selectedQuery: selectedQuery,
|
|
62
|
+
onQuerySelect: onQuerySelect,
|
|
63
|
+
activeFilter: activeFilter,
|
|
64
|
+
searchText: searchText,
|
|
65
|
+
ignoredPatterns: ignoredPatterns,
|
|
66
|
+
includedPatterns: includedPatterns,
|
|
67
|
+
emptyStateMessage: searchText ? `No queries found matching "${searchText}"` : activeFilter ? `No ${activeFilter} queries found` : hasIncludeFilters ? `No queries match your "include only" filters. ${includedPatterns.size} pattern(s) active.` : hasExcludeFilters ? `No queries match the current filters. ${ignoredPatterns.size} pattern(s) excluded.` : "No React Query queries are currently active.\n\nTo see queries here:\n• Make API calls using useQuery\n• Ensure queries are within QueryClientProvider\n• Check console for debugging info",
|
|
68
|
+
contentContainerStyle: styles.queryListContent
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
const styles = _reactNative.StyleSheet.create({
|
|
73
|
+
queryListContainer: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
backgroundColor: _sharedUi.buoyColors.base
|
|
76
|
+
},
|
|
77
|
+
queryListContent: {
|
|
78
|
+
padding: 8,
|
|
79
|
+
backgroundColor: _sharedUi.buoyColors.base,
|
|
80
|
+
flexGrow: 1
|
|
81
|
+
}
|
|
82
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.QueryDebugInfo = QueryDebugInfo;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _reactQuery = require("@tanstack/react-query");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
/**
|
|
11
|
+
* Lightweight debug panel that surfaces high-level QueryClient information and recently seen
|
|
12
|
+
* query keys. Intended primarily for the React Query dev tools modal.
|
|
13
|
+
*/
|
|
14
|
+
function QueryDebugInfo() {
|
|
15
|
+
try {
|
|
16
|
+
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
17
|
+
const queries = queryClient.getQueryCache().getAll();
|
|
18
|
+
const mutations = queryClient.getMutationCache().getAll();
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
20
|
+
style: styles.container,
|
|
21
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
22
|
+
style: styles.title,
|
|
23
|
+
children: "Debug Info"
|
|
24
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
25
|
+
style: styles.info,
|
|
26
|
+
children: "QueryClient: \u2705 Available"
|
|
27
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
28
|
+
style: styles.info,
|
|
29
|
+
children: ["Queries: ", queries.length]
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
31
|
+
style: styles.info,
|
|
32
|
+
children: ["Mutations: ", mutations.length]
|
|
33
|
+
}), queries.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
34
|
+
style: styles.queriesList,
|
|
35
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
36
|
+
style: styles.subtitle,
|
|
37
|
+
children: "Query Keys:"
|
|
38
|
+
}), queries.slice(0, 3).map((query, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
39
|
+
style: styles.queryKey,
|
|
40
|
+
children: ["\u2022", " ", Array.isArray(query.queryKey) ? query.queryKey.join(" - ") : String(query.queryKey)]
|
|
41
|
+
}, index)), queries.length > 3 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
42
|
+
style: styles.more,
|
|
43
|
+
children: ["... and ", queries.length - 3, " more"]
|
|
44
|
+
})]
|
|
45
|
+
})]
|
|
46
|
+
});
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
49
|
+
style: styles.container,
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
51
|
+
style: styles.title,
|
|
52
|
+
children: "Debug Info"
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
54
|
+
style: styles.error,
|
|
55
|
+
children: ["\u274C QueryClient Error: ", String(error)]
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const styles = _reactNative.StyleSheet.create({
|
|
61
|
+
container: {
|
|
62
|
+
padding: 16,
|
|
63
|
+
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
64
|
+
borderRadius: 8,
|
|
65
|
+
margin: 16,
|
|
66
|
+
borderWidth: 1,
|
|
67
|
+
borderColor: "rgba(255, 255, 255, 0.1)"
|
|
68
|
+
},
|
|
69
|
+
title: {
|
|
70
|
+
color: "#FFFFFF",
|
|
71
|
+
fontSize: 14,
|
|
72
|
+
fontWeight: "600",
|
|
73
|
+
marginBottom: 8
|
|
74
|
+
},
|
|
75
|
+
subtitle: {
|
|
76
|
+
color: "#E5E7EB",
|
|
77
|
+
fontSize: 12,
|
|
78
|
+
fontWeight: "500",
|
|
79
|
+
marginTop: 8,
|
|
80
|
+
marginBottom: 4
|
|
81
|
+
},
|
|
82
|
+
info: {
|
|
83
|
+
color: "#9CA3AF",
|
|
84
|
+
fontSize: 12,
|
|
85
|
+
marginBottom: 4
|
|
86
|
+
},
|
|
87
|
+
error: {
|
|
88
|
+
color: "#EF4444",
|
|
89
|
+
fontSize: 12,
|
|
90
|
+
marginBottom: 4
|
|
91
|
+
},
|
|
92
|
+
queriesList: {
|
|
93
|
+
marginTop: 4
|
|
94
|
+
},
|
|
95
|
+
queryKey: {
|
|
96
|
+
color: "#60A5FA",
|
|
97
|
+
fontSize: 11,
|
|
98
|
+
marginLeft: 8,
|
|
99
|
+
marginBottom: 2
|
|
100
|
+
},
|
|
101
|
+
more: {
|
|
102
|
+
color: "#9CA3AF",
|
|
103
|
+
fontSize: 11,
|
|
104
|
+
fontStyle: "italic",
|
|
105
|
+
marginLeft: 8
|
|
106
|
+
}
|
|
107
|
+
});
|