@tanstack/query-core 5.0.0-alpha.86 → 5.0.0-alpha.87
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/build/legacy/focusManager.cjs +116 -0
- package/build/legacy/focusManager.cjs.map +1 -0
- package/build/legacy/focusManager.d.cts +16 -0
- package/build/{lib → legacy}/focusManager.d.ts +6 -5
- package/build/legacy/focusManager.js +91 -0
- package/build/legacy/focusManager.js.map +1 -0
- package/build/legacy/hydration.cjs +109 -0
- package/build/legacy/hydration.cjs.map +1 -0
- package/build/legacy/hydration.d.cts +35 -0
- package/build/legacy/hydration.d.ts +35 -0
- package/build/legacy/hydration.js +82 -0
- package/build/legacy/hydration.js.map +1 -0
- package/build/legacy/index.cjs +85 -0
- package/build/legacy/index.cjs.map +1 -0
- package/build/legacy/index.d.cts +9 -0
- package/build/legacy/index.d.ts +9 -0
- package/build/legacy/index.js +50 -0
- package/build/legacy/index.js.map +1 -0
- package/build/legacy/infiniteQueryBehavior.cjs +141 -0
- package/build/legacy/infiniteQueryBehavior.cjs.map +1 -0
- package/build/legacy/infiniteQueryBehavior.d.cts +15 -0
- package/build/legacy/infiniteQueryBehavior.d.ts +15 -0
- package/build/legacy/infiniteQueryBehavior.js +115 -0
- package/build/legacy/infiniteQueryBehavior.js.map +1 -0
- package/build/legacy/infiniteQueryObserver.cjs +88 -0
- package/build/legacy/infiniteQueryObserver.cjs.map +1 -0
- package/build/legacy/infiniteQueryObserver.d.cts +19 -0
- package/build/{lib → legacy}/infiniteQueryObserver.d.ts +7 -8
- package/build/{lib/infiniteQueryObserver.legacy.js → legacy/infiniteQueryObserver.js} +24 -32
- package/build/legacy/infiniteQueryObserver.js.map +1 -0
- package/build/legacy/mutation.cjs +297 -0
- package/build/legacy/mutation.cjs.map +1 -0
- package/build/legacy/mutation.d.cts +3 -0
- package/build/legacy/mutation.d.ts +3 -0
- package/build/legacy/mutation.js +272 -0
- package/build/legacy/mutation.js.map +1 -0
- package/build/legacy/mutationCache.cjs +133 -0
- package/build/legacy/mutationCache.cjs.map +1 -0
- package/build/legacy/mutationCache.d.cts +3 -0
- package/build/legacy/mutationCache.d.ts +3 -0
- package/build/legacy/mutationCache.js +109 -0
- package/build/legacy/mutationCache.js.map +1 -0
- package/build/legacy/mutationObserver.cjs +171 -0
- package/build/legacy/mutationObserver.cjs.map +1 -0
- package/build/legacy/mutationObserver.d.cts +3 -0
- package/build/legacy/mutationObserver.d.ts +3 -0
- package/build/legacy/mutationObserver.js +147 -0
- package/build/legacy/mutationObserver.js.map +1 -0
- package/build/legacy/notifyManager.cjs +97 -0
- package/build/legacy/notifyManager.cjs.map +1 -0
- package/build/legacy/notifyManager.d.cts +20 -0
- package/build/{lib → legacy}/notifyManager.d.ts +4 -4
- package/build/{lib → legacy}/notifyManager.js +14 -31
- package/build/legacy/notifyManager.js.map +1 -0
- package/build/legacy/onlineManager.cjs +106 -0
- package/build/legacy/onlineManager.cjs.map +1 -0
- package/build/legacy/onlineManager.d.cts +16 -0
- package/build/{lib → legacy}/onlineManager.d.ts +6 -5
- package/build/legacy/onlineManager.js +81 -0
- package/build/legacy/onlineManager.js.map +1 -0
- package/build/legacy/queriesObserver.cjs +242 -0
- package/build/legacy/queriesObserver.cjs.map +1 -0
- package/build/legacy/queriesObserver.d.cts +26 -0
- package/build/{lib → legacy}/queriesObserver.d.ts +10 -11
- package/build/legacy/queriesObserver.js +218 -0
- package/build/legacy/queriesObserver.js.map +1 -0
- package/build/legacy/query.cjs +423 -0
- package/build/legacy/query.cjs.map +1 -0
- package/build/legacy/query.d.cts +3 -0
- package/build/legacy/query.d.ts +3 -0
- package/build/legacy/query.js +399 -0
- package/build/legacy/query.js.map +1 -0
- package/build/legacy/queryCache.cjs +140 -0
- package/build/legacy/queryCache.cjs.map +1 -0
- package/build/legacy/queryCache.d.cts +3 -0
- package/build/legacy/queryCache.d.ts +3 -0
- package/build/legacy/queryCache.js +116 -0
- package/build/legacy/queryCache.js.map +1 -0
- package/build/legacy/queryClient-4ba6364e.d.ts +916 -0
- package/build/legacy/queryClient-d615ed9f.d.ts +916 -0
- package/build/legacy/queryClient.cjs +322 -0
- package/build/legacy/queryClient.cjs.map +1 -0
- package/build/legacy/queryClient.d.cts +3 -0
- package/build/legacy/queryClient.d.ts +3 -0
- package/build/legacy/queryClient.js +304 -0
- package/build/legacy/queryClient.js.map +1 -0
- package/build/legacy/queryObserver.cjs +501 -0
- package/build/legacy/queryObserver.cjs.map +1 -0
- package/build/legacy/queryObserver.d.cts +3 -0
- package/build/legacy/queryObserver.d.ts +3 -0
- package/build/legacy/queryObserver.js +484 -0
- package/build/legacy/queryObserver.js.map +1 -0
- package/build/legacy/removable.cjs +77 -0
- package/build/legacy/removable.cjs.map +1 -0
- package/build/legacy/removable.d.cts +11 -0
- package/build/{lib → legacy}/removable.d.ts +3 -2
- package/build/legacy/removable.js +53 -0
- package/build/legacy/removable.js.map +1 -0
- package/build/legacy/retryer.cjs +169 -0
- package/build/legacy/retryer.cjs.map +1 -0
- package/build/legacy/retryer.d.cts +3 -0
- package/build/legacy/retryer.d.ts +3 -0
- package/build/{lib/retryer.legacy.js → legacy/retryer.js} +37 -48
- package/build/legacy/retryer.js.map +1 -0
- package/build/legacy/subscribable.cjs +49 -0
- package/build/legacy/subscribable.cjs.map +1 -0
- package/build/legacy/subscribable.d.cts +11 -0
- package/build/{lib → legacy}/subscribable.d.ts +3 -3
- package/build/{lib → legacy}/subscribable.js +5 -6
- package/build/legacy/subscribable.js.map +1 -0
- package/build/legacy/types.cjs +17 -0
- package/build/legacy/types.cjs.map +1 -0
- package/build/legacy/types.d.cts +3 -0
- package/build/legacy/types.d.ts +3 -0
- package/build/legacy/types.js +1 -0
- package/build/legacy/types.js.map +1 -0
- package/build/{lib/utils.legacy.cjs → legacy/utils.cjs} +92 -93
- package/build/legacy/utils.cjs.map +1 -0
- package/build/legacy/utils.d.cts +3 -0
- package/build/legacy/utils.d.ts +3 -0
- package/build/{lib/utils.legacy.js → legacy/utils.js} +49 -72
- package/build/legacy/utils.js.map +1 -0
- package/build/modern/focusManager.cjs +91 -0
- package/build/modern/focusManager.cjs.map +1 -0
- package/build/modern/focusManager.d.cts +16 -0
- package/build/modern/focusManager.d.ts +16 -0
- package/build/modern/focusManager.js +66 -0
- package/build/modern/focusManager.js.map +1 -0
- package/build/modern/hydration.cjs +107 -0
- package/build/modern/hydration.cjs.map +1 -0
- package/build/modern/hydration.d.cts +35 -0
- package/build/modern/hydration.d.ts +35 -0
- package/build/modern/hydration.js +80 -0
- package/build/modern/hydration.js.map +1 -0
- package/build/modern/index.cjs +85 -0
- package/build/modern/index.cjs.map +1 -0
- package/build/modern/index.d.cts +9 -0
- package/build/modern/index.d.ts +9 -0
- package/build/modern/index.js +50 -0
- package/build/modern/index.js.map +1 -0
- package/build/modern/infiniteQueryBehavior.cjs +138 -0
- package/build/modern/infiniteQueryBehavior.cjs.map +1 -0
- package/build/modern/infiniteQueryBehavior.d.cts +15 -0
- package/build/modern/infiniteQueryBehavior.d.ts +15 -0
- package/build/{lib → modern}/infiniteQueryBehavior.js +46 -53
- package/build/modern/infiniteQueryBehavior.js.map +1 -0
- package/build/modern/infiniteQueryObserver.cjs +87 -0
- package/build/modern/infiniteQueryObserver.cjs.map +1 -0
- package/build/modern/infiniteQueryObserver.d.cts +19 -0
- package/build/modern/infiniteQueryObserver.d.ts +19 -0
- package/build/{lib → modern}/infiniteQueryObserver.js +23 -31
- package/build/modern/infiniteQueryObserver.js.map +1 -0
- package/build/modern/mutation.cjs +259 -0
- package/build/modern/mutation.cjs.map +1 -0
- package/build/modern/mutation.d.cts +3 -0
- package/build/modern/mutation.d.ts +3 -0
- package/build/{lib → modern}/mutation.js +86 -86
- package/build/modern/mutation.js.map +1 -0
- package/build/modern/mutationCache.cjs +103 -0
- package/build/modern/mutationCache.cjs.map +1 -0
- package/build/modern/mutationCache.d.cts +3 -0
- package/build/modern/mutationCache.d.ts +3 -0
- package/build/modern/mutationCache.js +79 -0
- package/build/modern/mutationCache.js.map +1 -0
- package/build/modern/mutationObserver.cjs +132 -0
- package/build/modern/mutationObserver.cjs.map +1 -0
- package/build/modern/mutationObserver.d.cts +3 -0
- package/build/modern/mutationObserver.d.ts +3 -0
- package/build/{lib → modern}/mutationObserver.js +44 -32
- package/build/modern/mutationObserver.js.map +1 -0
- package/build/modern/notifyManager.cjs +97 -0
- package/build/modern/notifyManager.cjs.map +1 -0
- package/build/modern/notifyManager.d.cts +20 -0
- package/build/modern/notifyManager.d.ts +20 -0
- package/build/{lib/notifyManager.legacy.js → modern/notifyManager.js} +14 -31
- package/build/modern/notifyManager.js.map +1 -0
- package/build/modern/onlineManager.cjs +82 -0
- package/build/modern/onlineManager.cjs.map +1 -0
- package/build/modern/onlineManager.d.cts +16 -0
- package/build/modern/onlineManager.d.ts +16 -0
- package/build/{lib → modern}/onlineManager.js +14 -17
- package/build/modern/onlineManager.js.map +1 -0
- package/build/modern/queriesObserver.cjs +202 -0
- package/build/modern/queriesObserver.cjs.map +1 -0
- package/build/modern/queriesObserver.d.cts +26 -0
- package/build/modern/queriesObserver.d.ts +26 -0
- package/build/{lib → modern}/queriesObserver.js +69 -50
- package/build/modern/queriesObserver.js.map +1 -0
- package/build/{lib → modern}/query.cjs +143 -186
- package/build/modern/query.cjs.map +1 -0
- package/build/modern/query.d.cts +3 -0
- package/build/modern/query.d.ts +3 -0
- package/build/{lib → modern}/query.js +110 -175
- package/build/modern/query.js.map +1 -0
- package/build/modern/queryCache.cjs +120 -0
- package/build/modern/queryCache.cjs.map +1 -0
- package/build/modern/queryCache.d.cts +3 -0
- package/build/modern/queryCache.d.ts +3 -0
- package/build/{lib → modern}/queryCache.js +21 -29
- package/build/modern/queryCache.js.map +1 -0
- package/build/modern/queryClient-4ba6364e.d.ts +916 -0
- package/build/modern/queryClient-d615ed9f.d.ts +916 -0
- package/build/modern/queryClient.cjs +284 -0
- package/build/modern/queryClient.cjs.map +1 -0
- package/build/modern/queryClient.d.cts +3 -0
- package/build/modern/queryClient.d.ts +3 -0
- package/build/{lib → modern}/queryClient.js +77 -94
- package/build/modern/queryClient.js.map +1 -0
- package/build/{lib → modern}/queryObserver.cjs +133 -149
- package/build/modern/queryObserver.cjs.map +1 -0
- package/build/modern/queryObserver.d.cts +3 -0
- package/build/modern/queryObserver.d.ts +3 -0
- package/build/{lib → modern}/queryObserver.js +107 -138
- package/build/modern/queryObserver.js.map +1 -0
- package/build/modern/removable.cjs +55 -0
- package/build/modern/removable.cjs.map +1 -0
- package/build/modern/removable.d.cts +11 -0
- package/build/modern/removable.d.ts +11 -0
- package/build/{lib → modern}/removable.js +10 -8
- package/build/modern/removable.js.map +1 -0
- package/build/{lib → modern}/retryer.cjs +50 -44
- package/build/modern/retryer.cjs.map +1 -0
- package/build/modern/retryer.d.cts +3 -0
- package/build/modern/retryer.d.ts +3 -0
- package/build/{lib → modern}/retryer.js +23 -39
- package/build/modern/retryer.js.map +1 -0
- package/build/modern/subscribable.cjs +49 -0
- package/build/modern/subscribable.cjs.map +1 -0
- package/build/modern/subscribable.d.cts +11 -0
- package/build/modern/subscribable.d.ts +11 -0
- package/build/{lib/subscribable.legacy.js → modern/subscribable.js} +5 -6
- package/build/modern/subscribable.js.map +1 -0
- package/build/modern/types.cjs +17 -0
- package/build/modern/types.cjs.map +1 -0
- package/build/modern/types.d.cts +3 -0
- package/build/modern/types.d.ts +3 -0
- package/build/modern/types.js +1 -0
- package/build/modern/types.js.map +1 -0
- package/build/{lib → modern}/utils.cjs +92 -93
- package/build/modern/utils.cjs.map +1 -0
- package/build/modern/utils.d.cts +3 -0
- package/build/modern/utils.d.ts +3 -0
- package/build/{lib → modern}/utils.js +49 -72
- package/build/modern/utils.js.map +1 -0
- package/package.json +15 -13
- package/build/lib/_virtual/_rollupPluginBabelHelpers.legacy.cjs +0 -16
- package/build/lib/_virtual/_rollupPluginBabelHelpers.legacy.cjs.map +0 -1
- package/build/lib/_virtual/_rollupPluginBabelHelpers.legacy.js +0 -13
- package/build/lib/_virtual/_rollupPluginBabelHelpers.legacy.js.map +0 -1
- package/build/lib/focusManager.cjs +0 -75
- package/build/lib/focusManager.cjs.map +0 -1
- package/build/lib/focusManager.d.ts.map +0 -1
- package/build/lib/focusManager.js +0 -72
- package/build/lib/focusManager.js.map +0 -1
- package/build/lib/focusManager.legacy.cjs +0 -91
- package/build/lib/focusManager.legacy.cjs.map +0 -1
- package/build/lib/focusManager.legacy.js +0 -88
- package/build/lib/focusManager.legacy.js.map +0 -1
- package/build/lib/hydration.cjs +0 -97
- package/build/lib/hydration.cjs.map +0 -1
- package/build/lib/hydration.d.ts +0 -35
- package/build/lib/hydration.d.ts.map +0 -1
- package/build/lib/hydration.js +0 -92
- package/build/lib/hydration.js.map +0 -1
- package/build/lib/hydration.legacy.cjs +0 -100
- package/build/lib/hydration.legacy.cjs.map +0 -1
- package/build/lib/hydration.legacy.js +0 -95
- package/build/lib/hydration.legacy.js.map +0 -1
- package/build/lib/index.cjs +0 -40
- package/build/lib/index.cjs.map +0 -1
- package/build/lib/index.d.ts +0 -22
- package/build/lib/index.d.ts.map +0 -1
- package/build/lib/index.js +0 -14
- package/build/lib/index.js.map +0 -1
- package/build/lib/index.legacy.cjs +0 -40
- package/build/lib/index.legacy.cjs.map +0 -1
- package/build/lib/index.legacy.js +0 -14
- package/build/lib/index.legacy.js.map +0 -1
- package/build/lib/infiniteQueryBehavior.cjs +0 -123
- package/build/lib/infiniteQueryBehavior.cjs.map +0 -1
- package/build/lib/infiniteQueryBehavior.d.ts +0 -12
- package/build/lib/infiniteQueryBehavior.d.ts.map +0 -1
- package/build/lib/infiniteQueryBehavior.js.map +0 -1
- package/build/lib/infiniteQueryBehavior.legacy.cjs +0 -125
- package/build/lib/infiniteQueryBehavior.legacy.cjs.map +0 -1
- package/build/lib/infiniteQueryBehavior.legacy.js +0 -121
- package/build/lib/infiniteQueryBehavior.legacy.js.map +0 -1
- package/build/lib/infiniteQueryObserver.cjs +0 -77
- package/build/lib/infiniteQueryObserver.cjs.map +0 -1
- package/build/lib/infiniteQueryObserver.d.ts.map +0 -1
- package/build/lib/infiniteQueryObserver.js.map +0 -1
- package/build/lib/infiniteQueryObserver.legacy.cjs +0 -78
- package/build/lib/infiniteQueryObserver.legacy.cjs.map +0 -1
- package/build/lib/infiniteQueryObserver.legacy.js.map +0 -1
- package/build/lib/mutation.cjs +0 -237
- package/build/lib/mutation.cjs.map +0 -1
- package/build/lib/mutation.d.ts +0 -64
- package/build/lib/mutation.d.ts.map +0 -1
- package/build/lib/mutation.js.map +0 -1
- package/build/lib/mutation.legacy.cjs +0 -262
- package/build/lib/mutation.legacy.cjs.map +0 -1
- package/build/lib/mutation.legacy.js +0 -259
- package/build/lib/mutation.legacy.js.map +0 -1
- package/build/lib/mutationCache.cjs +0 -85
- package/build/lib/mutationCache.cjs.map +0 -1
- package/build/lib/mutationCache.d.ts +0 -59
- package/build/lib/mutationCache.d.ts.map +0 -1
- package/build/lib/mutationCache.js +0 -83
- package/build/lib/mutationCache.js.map +0 -1
- package/build/lib/mutationCache.legacy.cjs +0 -98
- package/build/lib/mutationCache.legacy.cjs.map +0 -1
- package/build/lib/mutationCache.legacy.js +0 -96
- package/build/lib/mutationCache.legacy.js.map +0 -1
- package/build/lib/mutationObserver.cjs +0 -98
- package/build/lib/mutationObserver.cjs.map +0 -1
- package/build/lib/mutationObserver.d.ts +0 -19
- package/build/lib/mutationObserver.d.ts.map +0 -1
- package/build/lib/mutationObserver.js.map +0 -1
- package/build/lib/mutationObserver.legacy.cjs +0 -128
- package/build/lib/mutationObserver.legacy.cjs.map +0 -1
- package/build/lib/mutationObserver.legacy.js +0 -126
- package/build/lib/mutationObserver.legacy.js.map +0 -1
- package/build/lib/notifyManager.cjs +0 -92
- package/build/lib/notifyManager.cjs.map +0 -1
- package/build/lib/notifyManager.d.ts.map +0 -1
- package/build/lib/notifyManager.js.map +0 -1
- package/build/lib/notifyManager.legacy.cjs +0 -92
- package/build/lib/notifyManager.legacy.cjs.map +0 -1
- package/build/lib/notifyManager.legacy.js.map +0 -1
- package/build/lib/onlineManager.cjs +0 -63
- package/build/lib/onlineManager.cjs.map +0 -1
- package/build/lib/onlineManager.d.ts.map +0 -1
- package/build/lib/onlineManager.js.map +0 -1
- package/build/lib/onlineManager.legacy.cjs +0 -78
- package/build/lib/onlineManager.legacy.cjs.map +0 -1
- package/build/lib/onlineManager.legacy.js +0 -75
- package/build/lib/onlineManager.legacy.js.map +0 -1
- package/build/lib/queriesObserver.cjs +0 -161
- package/build/lib/queriesObserver.cjs.map +0 -1
- package/build/lib/queriesObserver.d.ts.map +0 -1
- package/build/lib/queriesObserver.js.map +0 -1
- package/build/lib/queriesObserver.legacy.cjs +0 -207
- package/build/lib/queriesObserver.legacy.cjs.map +0 -1
- package/build/lib/queriesObserver.legacy.js +0 -205
- package/build/lib/queriesObserver.legacy.js.map +0 -1
- package/build/lib/query.cjs.map +0 -1
- package/build/lib/query.d.ts +0 -115
- package/build/lib/query.d.ts.map +0 -1
- package/build/lib/query.js.map +0 -1
- package/build/lib/query.legacy.cjs +0 -471
- package/build/lib/query.legacy.cjs.map +0 -1
- package/build/lib/query.legacy.js +0 -469
- package/build/lib/query.legacy.js.map +0 -1
- package/build/lib/queryCache.cjs +0 -106
- package/build/lib/queryCache.cjs.map +0 -1
- package/build/lib/queryCache.d.ts +0 -71
- package/build/lib/queryCache.d.ts.map +0 -1
- package/build/lib/queryCache.js.map +0 -1
- package/build/lib/queryCache.legacy.cjs +0 -111
- package/build/lib/queryCache.legacy.cjs.map +0 -1
- package/build/lib/queryCache.legacy.js +0 -109
- package/build/lib/queryCache.legacy.js.map +0 -1
- package/build/lib/queryClient.cjs +0 -285
- package/build/lib/queryClient.cjs.map +0 -1
- package/build/lib/queryClient.d.ts +0 -41
- package/build/lib/queryClient.d.ts.map +0 -1
- package/build/lib/queryClient.js.map +0 -1
- package/build/lib/queryClient.legacy.cjs +0 -322
- package/build/lib/queryClient.legacy.cjs.map +0 -1
- package/build/lib/queryClient.legacy.js +0 -320
- package/build/lib/queryClient.legacy.js.map +0 -1
- package/build/lib/queryObserver.cjs.map +0 -1
- package/build/lib/queryObserver.d.ts +0 -35
- package/build/lib/queryObserver.d.ts.map +0 -1
- package/build/lib/queryObserver.js.map +0 -1
- package/build/lib/queryObserver.legacy.cjs +0 -561
- package/build/lib/queryObserver.legacy.cjs.map +0 -1
- package/build/lib/queryObserver.legacy.js +0 -559
- package/build/lib/queryObserver.legacy.js.map +0 -1
- package/build/lib/removable.cjs +0 -31
- package/build/lib/removable.cjs.map +0 -1
- package/build/lib/removable.d.ts.map +0 -1
- package/build/lib/removable.js.map +0 -1
- package/build/lib/removable.legacy.cjs +0 -38
- package/build/lib/removable.legacy.cjs.map +0 -1
- package/build/lib/removable.legacy.js +0 -36
- package/build/lib/removable.legacy.js.map +0 -1
- package/build/lib/retryer.cjs.map +0 -1
- package/build/lib/retryer.d.ts +0 -34
- package/build/lib/retryer.d.ts.map +0 -1
- package/build/lib/retryer.js.map +0 -1
- package/build/lib/retryer.legacy.cjs +0 -158
- package/build/lib/retryer.legacy.cjs.map +0 -1
- package/build/lib/retryer.legacy.js.map +0 -1
- package/build/lib/subscribable.cjs +0 -28
- package/build/lib/subscribable.cjs.map +0 -1
- package/build/lib/subscribable.d.ts.map +0 -1
- package/build/lib/subscribable.js.map +0 -1
- package/build/lib/subscribable.legacy.cjs +0 -28
- package/build/lib/subscribable.legacy.cjs.map +0 -1
- package/build/lib/subscribable.legacy.js.map +0 -1
- package/build/lib/tests/focusManager.test.d.ts +0 -2
- package/build/lib/tests/focusManager.test.d.ts.map +0 -1
- package/build/lib/tests/hydration.test.d.ts +0 -2
- package/build/lib/tests/hydration.test.d.ts.map +0 -1
- package/build/lib/tests/infiniteQueryBehavior.test.d.ts +0 -2
- package/build/lib/tests/infiniteQueryBehavior.test.d.ts.map +0 -1
- package/build/lib/tests/infiniteQueryObserver.test.d.ts +0 -2
- package/build/lib/tests/infiniteQueryObserver.test.d.ts.map +0 -1
- package/build/lib/tests/mutationCache.test.d.ts +0 -2
- package/build/lib/tests/mutationCache.test.d.ts.map +0 -1
- package/build/lib/tests/mutationObserver.test.d.ts +0 -2
- package/build/lib/tests/mutationObserver.test.d.ts.map +0 -1
- package/build/lib/tests/mutations.test.d.ts +0 -2
- package/build/lib/tests/mutations.test.d.ts.map +0 -1
- package/build/lib/tests/notifyManager.test.d.ts +0 -2
- package/build/lib/tests/notifyManager.test.d.ts.map +0 -1
- package/build/lib/tests/onlineManager.test.d.ts +0 -2
- package/build/lib/tests/onlineManager.test.d.ts.map +0 -1
- package/build/lib/tests/queriesObserver.test.d.ts +0 -2
- package/build/lib/tests/queriesObserver.test.d.ts.map +0 -1
- package/build/lib/tests/query.test.d.ts +0 -2
- package/build/lib/tests/query.test.d.ts.map +0 -1
- package/build/lib/tests/queryCache.test.d.ts +0 -2
- package/build/lib/tests/queryCache.test.d.ts.map +0 -1
- package/build/lib/tests/queryClient.test.d.ts +0 -2
- package/build/lib/tests/queryClient.test.d.ts.map +0 -1
- package/build/lib/tests/queryObserver.test.d.ts +0 -2
- package/build/lib/tests/queryObserver.test.d.ts.map +0 -1
- package/build/lib/tests/utils.d.ts +0 -17
- package/build/lib/tests/utils.d.ts.map +0 -1
- package/build/lib/tests/utils.test.d.ts +0 -2
- package/build/lib/tests/utils.test.d.ts.map +0 -1
- package/build/lib/types.d.ts +0 -437
- package/build/lib/types.d.ts.map +0 -1
- package/build/lib/utils.cjs.map +0 -1
- package/build/lib/utils.d.ts +0 -90
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js.map +0 -1
- package/build/lib/utils.legacy.cjs.map +0 -1
- package/build/lib/utils.legacy.js.map +0 -1
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { classPrivateFieldLooseBase as _classPrivateFieldLooseBase, classPrivateFieldLooseKey as _classPrivateFieldLooseKey } from './_virtual/_rollupPluginBabelHelpers.legacy.js';
|
|
2
|
-
import { getDefaultState } from './mutation.legacy.js';
|
|
3
|
-
import { notifyManager } from './notifyManager.legacy.js';
|
|
4
|
-
import { Subscribable } from './subscribable.legacy.js';
|
|
5
|
-
import { shallowEqualObjects } from './utils.legacy.js';
|
|
6
|
-
|
|
7
|
-
// TYPES
|
|
8
|
-
var _client = /*#__PURE__*/_classPrivateFieldLooseKey("client");
|
|
9
|
-
var _currentResult = /*#__PURE__*/_classPrivateFieldLooseKey("currentResult");
|
|
10
|
-
var _currentMutation = /*#__PURE__*/_classPrivateFieldLooseKey("currentMutation");
|
|
11
|
-
var _mutateOptions = /*#__PURE__*/_classPrivateFieldLooseKey("mutateOptions");
|
|
12
|
-
var _updateResult = /*#__PURE__*/_classPrivateFieldLooseKey("updateResult");
|
|
13
|
-
var _notify = /*#__PURE__*/_classPrivateFieldLooseKey("notify");
|
|
14
|
-
// CLASS
|
|
15
|
-
|
|
16
|
-
class MutationObserver extends Subscribable {
|
|
17
|
-
constructor(client, options) {
|
|
18
|
-
super();
|
|
19
|
-
Object.defineProperty(this, _notify, {
|
|
20
|
-
value: _notify2
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(this, _updateResult, {
|
|
23
|
-
value: _updateResult2
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(this, _client, {
|
|
26
|
-
writable: true,
|
|
27
|
-
value: void 0
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(this, _currentResult, {
|
|
30
|
-
writable: true,
|
|
31
|
-
value: undefined
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(this, _currentMutation, {
|
|
34
|
-
writable: true,
|
|
35
|
-
value: void 0
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(this, _mutateOptions, {
|
|
38
|
-
writable: true,
|
|
39
|
-
value: void 0
|
|
40
|
-
});
|
|
41
|
-
_classPrivateFieldLooseBase(this, _client)[_client] = client;
|
|
42
|
-
this.setOptions(options);
|
|
43
|
-
this.bindMethods();
|
|
44
|
-
_classPrivateFieldLooseBase(this, _updateResult)[_updateResult]();
|
|
45
|
-
}
|
|
46
|
-
bindMethods() {
|
|
47
|
-
this.mutate = this.mutate.bind(this);
|
|
48
|
-
this.reset = this.reset.bind(this);
|
|
49
|
-
}
|
|
50
|
-
setOptions(options) {
|
|
51
|
-
var _classPrivateFieldLoo;
|
|
52
|
-
const prevOptions = this.options;
|
|
53
|
-
this.options = _classPrivateFieldLooseBase(this, _client)[_client].defaultMutationOptions(options);
|
|
54
|
-
if (!shallowEqualObjects(prevOptions, this.options)) {
|
|
55
|
-
_classPrivateFieldLooseBase(this, _client)[_client].getMutationCache().notify({
|
|
56
|
-
type: 'observerOptionsUpdated',
|
|
57
|
-
mutation: _classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation],
|
|
58
|
-
observer: this
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
(_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation]) == null ? void 0 : _classPrivateFieldLoo.setOptions(this.options);
|
|
62
|
-
}
|
|
63
|
-
onUnsubscribe() {
|
|
64
|
-
if (!this.hasListeners()) {
|
|
65
|
-
var _classPrivateFieldLoo2;
|
|
66
|
-
(_classPrivateFieldLoo2 = _classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation]) == null ? void 0 : _classPrivateFieldLoo2.removeObserver(this);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
onMutationUpdate(action) {
|
|
70
|
-
_classPrivateFieldLooseBase(this, _updateResult)[_updateResult]();
|
|
71
|
-
_classPrivateFieldLooseBase(this, _notify)[_notify](action);
|
|
72
|
-
}
|
|
73
|
-
getCurrentResult() {
|
|
74
|
-
return _classPrivateFieldLooseBase(this, _currentResult)[_currentResult];
|
|
75
|
-
}
|
|
76
|
-
reset() {
|
|
77
|
-
_classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation] = undefined;
|
|
78
|
-
_classPrivateFieldLooseBase(this, _updateResult)[_updateResult]();
|
|
79
|
-
_classPrivateFieldLooseBase(this, _notify)[_notify]();
|
|
80
|
-
}
|
|
81
|
-
mutate(variables, options) {
|
|
82
|
-
var _classPrivateFieldLoo3;
|
|
83
|
-
_classPrivateFieldLooseBase(this, _mutateOptions)[_mutateOptions] = options;
|
|
84
|
-
(_classPrivateFieldLoo3 = _classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation]) == null ? void 0 : _classPrivateFieldLoo3.removeObserver(this);
|
|
85
|
-
_classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation] = _classPrivateFieldLooseBase(this, _client)[_client].getMutationCache().build(_classPrivateFieldLooseBase(this, _client)[_client], this.options);
|
|
86
|
-
_classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation].addObserver(this);
|
|
87
|
-
return _classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation].execute(variables);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function _updateResult2() {
|
|
91
|
-
var _classPrivateFieldLoo4, _classPrivateFieldLoo5;
|
|
92
|
-
const state = (_classPrivateFieldLoo4 = (_classPrivateFieldLoo5 = _classPrivateFieldLooseBase(this, _currentMutation)[_currentMutation]) == null ? void 0 : _classPrivateFieldLoo5.state) != null ? _classPrivateFieldLoo4 : getDefaultState();
|
|
93
|
-
_classPrivateFieldLooseBase(this, _currentResult)[_currentResult] = {
|
|
94
|
-
...state,
|
|
95
|
-
isPending: state.status === 'pending',
|
|
96
|
-
isSuccess: state.status === 'success',
|
|
97
|
-
isError: state.status === 'error',
|
|
98
|
-
isIdle: state.status === 'idle',
|
|
99
|
-
mutate: this.mutate,
|
|
100
|
-
reset: this.reset
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
function _notify2(action) {
|
|
104
|
-
notifyManager.batch(() => {
|
|
105
|
-
// First trigger the mutate callbacks
|
|
106
|
-
if (_classPrivateFieldLooseBase(this, _mutateOptions)[_mutateOptions] && this.hasListeners()) {
|
|
107
|
-
if ((action == null ? void 0 : action.type) === 'success') {
|
|
108
|
-
var _classPrivateFieldLoo6, _classPrivateFieldLoo7, _classPrivateFieldLoo8, _classPrivateFieldLoo9;
|
|
109
|
-
(_classPrivateFieldLoo6 = (_classPrivateFieldLoo7 = _classPrivateFieldLooseBase(this, _mutateOptions)[_mutateOptions]).onSuccess) == null ? void 0 : _classPrivateFieldLoo6.call(_classPrivateFieldLoo7, action.data, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].variables, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].context);
|
|
110
|
-
(_classPrivateFieldLoo8 = (_classPrivateFieldLoo9 = _classPrivateFieldLooseBase(this, _mutateOptions)[_mutateOptions]).onSettled) == null ? void 0 : _classPrivateFieldLoo8.call(_classPrivateFieldLoo9, action.data, null, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].variables, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].context);
|
|
111
|
-
} else if ((action == null ? void 0 : action.type) === 'error') {
|
|
112
|
-
var _classPrivateFieldLoo10, _classPrivateFieldLoo11, _classPrivateFieldLoo12, _classPrivateFieldLoo13;
|
|
113
|
-
(_classPrivateFieldLoo10 = (_classPrivateFieldLoo11 = _classPrivateFieldLooseBase(this, _mutateOptions)[_mutateOptions]).onError) == null ? void 0 : _classPrivateFieldLoo10.call(_classPrivateFieldLoo11, action.error, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].variables, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].context);
|
|
114
|
-
(_classPrivateFieldLoo12 = (_classPrivateFieldLoo13 = _classPrivateFieldLooseBase(this, _mutateOptions)[_mutateOptions]).onSettled) == null ? void 0 : _classPrivateFieldLoo12.call(_classPrivateFieldLoo13, undefined, action.error, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].variables, _classPrivateFieldLooseBase(this, _currentResult)[_currentResult].context);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Then trigger the listeners
|
|
119
|
-
this.listeners.forEach(listener => {
|
|
120
|
-
listener(_classPrivateFieldLooseBase(this, _currentResult)[_currentResult]);
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export { MutationObserver };
|
|
126
|
-
//# sourceMappingURL=mutationObserver.legacy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mutationObserver.legacy.js","sources":["../../src/mutationObserver.ts"],"sourcesContent":["import { getDefaultState } from './mutation'\nimport { notifyManager } from './notifyManager'\nimport { Subscribable } from './subscribable'\nimport { shallowEqualObjects } from './utils'\nimport type { QueryClient } from './queryClient'\nimport type {\n DefaultError,\n MutateOptions,\n MutationObserverOptions,\n MutationObserverResult,\n} from './types'\nimport type { Action, Mutation } from './mutation'\n\n// TYPES\n\ntype MutationObserverListener<TData, TError, TVariables, TContext> = (\n result: MutationObserverResult<TData, TError, TVariables, TContext>,\n) => void\n\n// CLASS\n\nexport class MutationObserver<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TContext = unknown,\n> extends Subscribable<\n MutationObserverListener<TData, TError, TVariables, TContext>\n> {\n options!: MutationObserverOptions<TData, TError, TVariables, TContext>\n\n #client: QueryClient\n #currentResult: MutationObserverResult<TData, TError, TVariables, TContext> =\n undefined!\n #currentMutation?: Mutation<TData, TError, TVariables, TContext>\n #mutateOptions?: MutateOptions<TData, TError, TVariables, TContext>\n\n constructor(\n client: QueryClient,\n options: MutationObserverOptions<TData, TError, TVariables, TContext>,\n ) {\n super()\n\n this.#client = client\n this.setOptions(options)\n this.bindMethods()\n this.#updateResult()\n }\n\n protected bindMethods(): void {\n this.mutate = this.mutate.bind(this)\n this.reset = this.reset.bind(this)\n }\n\n setOptions(\n options?: MutationObserverOptions<TData, TError, TVariables, TContext>,\n ) {\n const prevOptions = this.options\n this.options = this.#client.defaultMutationOptions(options)\n if (!shallowEqualObjects(prevOptions, this.options)) {\n this.#client.getMutationCache().notify({\n type: 'observerOptionsUpdated',\n mutation: this.#currentMutation,\n observer: this,\n })\n }\n this.#currentMutation?.setOptions(this.options)\n }\n\n protected onUnsubscribe(): void {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this)\n }\n }\n\n onMutationUpdate(action: Action<TData, TError, TVariables, TContext>): void {\n this.#updateResult()\n\n this.#notify(action)\n }\n\n getCurrentResult(): MutationObserverResult<\n TData,\n TError,\n TVariables,\n TContext\n > {\n return this.#currentResult\n }\n\n reset(): void {\n this.#currentMutation = undefined\n this.#updateResult()\n this.#notify()\n }\n\n mutate(\n variables: TVariables,\n options?: MutateOptions<TData, TError, TVariables, TContext>,\n ): Promise<TData> {\n this.#mutateOptions = options\n\n this.#currentMutation?.removeObserver(this)\n\n this.#currentMutation = this.#client\n .getMutationCache()\n .build(this.#client, this.options)\n\n this.#currentMutation.addObserver(this)\n\n return this.#currentMutation.execute(variables)\n }\n\n #updateResult(): void {\n const state =\n this.#currentMutation?.state ??\n getDefaultState<TData, TError, TVariables, TContext>()\n\n this.#currentResult = {\n ...state,\n isPending: state.status === 'pending',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset,\n } as MutationObserverResult<TData, TError, TVariables, TContext>\n }\n\n #notify(action?: Action<TData, TError, TVariables, TContext>): void {\n notifyManager.batch(() => {\n // First trigger the mutate callbacks\n if (this.#mutateOptions && this.hasListeners()) {\n if (action?.type === 'success') {\n this.#mutateOptions.onSuccess?.(\n action.data,\n this.#currentResult.variables!,\n this.#currentResult.context!,\n )\n this.#mutateOptions.onSettled?.(\n action.data,\n null,\n this.#currentResult.variables!,\n this.#currentResult.context,\n )\n } else if (action?.type === 'error') {\n this.#mutateOptions.onError?.(\n action.error,\n this.#currentResult.variables!,\n this.#currentResult.context,\n )\n this.#mutateOptions.onSettled?.(\n undefined,\n action.error,\n this.#currentResult.variables!,\n this.#currentResult.context,\n )\n }\n }\n\n // Then trigger the listeners\n this.listeners.forEach((listener) => {\n listener(this.#currentResult)\n })\n })\n }\n}\n"],"names":["_client","_classPrivateFieldLooseKey","_currentResult","_currentMutation","_mutateOptions","_updateResult","_notify","MutationObserver","Subscribable","constructor","client","options","Object","defineProperty","value","_notify2","_updateResult2","writable","undefined","_classPrivateFieldLooseBase","setOptions","bindMethods","mutate","bind","reset","_classPrivateFieldLoo","prevOptions","defaultMutationOptions","shallowEqualObjects","getMutationCache","notify","type","mutation","observer","onUnsubscribe","hasListeners","_classPrivateFieldLoo2","removeObserver","onMutationUpdate","action","getCurrentResult","variables","_classPrivateFieldLoo3","build","addObserver","execute","_classPrivateFieldLoo4","_classPrivateFieldLoo5","state","getDefaultState","isPending","status","isSuccess","isError","isIdle","notifyManager","batch","_classPrivateFieldLoo6","_classPrivateFieldLoo7","_classPrivateFieldLoo8","_classPrivateFieldLoo9","onSuccess","call","data","context","onSettled","_classPrivateFieldLoo10","_classPrivateFieldLoo11","_classPrivateFieldLoo12","_classPrivateFieldLoo13","onError","error","listeners","forEach","listener"],"mappings":";;;;;;AAaA;AAAA,IAAAA,OAAA,gBAAAC,0BAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IAAAC,cAAA,gBAAAD,0BAAA,CAAA,eAAA,CAAA,CAAA;AAAA,IAAAE,gBAAA,gBAAAF,0BAAA,CAAA,iBAAA,CAAA,CAAA;AAAA,IAAAG,cAAA,gBAAAH,0BAAA,CAAA,eAAA,CAAA,CAAA;AAAA,IAAAI,aAAA,gBAAAJ,0BAAA,CAAA,cAAA,CAAA,CAAA;AAAA,IAAAK,OAAA,gBAAAL,0BAAA,CAAA,QAAA,CAAA,CAAA;AAMA;;AAEO,MAAMM,gBAAgB,SAKnBC,YAAY,CAEpB;AASAC,EAAAA,WAAWA,CACTC,MAAmB,EACnBC,OAAqE,EACrE;AACA,IAAA,KAAK,EAAE,CAAA;IAAAC,MAAA,CAAAC,cAAA,CAAA,IAAA,EAAAP,OAAA,EAAA;AAAAQ,MAAAA,KAAA,EAAAC,QAAAA;AAAA,KAAA,CAAA,CAAA;IAAAH,MAAA,CAAAC,cAAA,CAAA,IAAA,EAAAR,aAAA,EAAA;AAAAS,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C,CAAAA,SAAS,EAC7BtB,2BAAA,KAAI,EAAAjB,cAAA,EAAAA,cAAA,CAAA,CAAgB8D,OACtB,CAAC,CAAA;AACD,QAAA,CAAAI,uBAAA,GAAAC,CAAAA,uBAAA,GAAAlD,2BAAA,CAAA,IAAI,EAAAf,cAAA,CAAA,CAAAA,cAAA,CAAgB6D,EAAAA,SAAS,qBAA7BG,uBAAA,CAAAN,IAAA,CAAAO,uBAAA,EACEnD,SAAS,EACTqB,MAAM,CAACgC,KAAK,EACZpD,2BAAA,KAAI,EAAAjB,cAAA,EAAAA,cAAA,CAAA,CAAgBuC,SAAS,EAC7BtB,2BAAA,KAAI,EAAAjB,cAAA,EAAAA,cAAA,CAAA,CAAgB8D,OACtB,CAAC,CAAA;AACH,OAAA;AACF,KAAA;;AAEA;AACA,IAAA,IAAI,CAACQ,SAAS,CAACC,OAAO,CAAEC,QAAQ,IAAK;MACnCA,QAAQ,CAAAvD,2BAAA,CAAC,IAAI,EAAAjB,cAAA,CAAA,CAAAA,cAAA,CAAe,CAAC,CAAA;AAC/B,KAAC,CAAC,CAAA;AACJ,GAAC,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var utils = require('./utils.cjs');
|
|
4
|
-
|
|
5
|
-
// TYPES
|
|
6
|
-
|
|
7
|
-
function createNotifyManager() {
|
|
8
|
-
let queue = [];
|
|
9
|
-
let transactions = 0;
|
|
10
|
-
let notifyFn = callback => {
|
|
11
|
-
callback();
|
|
12
|
-
};
|
|
13
|
-
let batchNotifyFn = callback => {
|
|
14
|
-
callback();
|
|
15
|
-
};
|
|
16
|
-
const batch = callback => {
|
|
17
|
-
let result;
|
|
18
|
-
transactions++;
|
|
19
|
-
try {
|
|
20
|
-
result = callback();
|
|
21
|
-
} finally {
|
|
22
|
-
transactions--;
|
|
23
|
-
if (!transactions) {
|
|
24
|
-
flush();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
const schedule = callback => {
|
|
30
|
-
if (transactions) {
|
|
31
|
-
queue.push(callback);
|
|
32
|
-
} else {
|
|
33
|
-
utils.scheduleMicrotask(() => {
|
|
34
|
-
notifyFn(callback);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* All calls to the wrapped function will be batched.
|
|
41
|
-
*/
|
|
42
|
-
const batchCalls = callback => {
|
|
43
|
-
return (...args) => {
|
|
44
|
-
schedule(() => {
|
|
45
|
-
callback(...args);
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
const flush = () => {
|
|
50
|
-
const originalQueue = queue;
|
|
51
|
-
queue = [];
|
|
52
|
-
if (originalQueue.length) {
|
|
53
|
-
utils.scheduleMicrotask(() => {
|
|
54
|
-
batchNotifyFn(() => {
|
|
55
|
-
originalQueue.forEach(callback => {
|
|
56
|
-
notifyFn(callback);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Use this method to set a custom notify function.
|
|
65
|
-
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
66
|
-
*/
|
|
67
|
-
const setNotifyFunction = fn => {
|
|
68
|
-
notifyFn = fn;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
73
|
-
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
74
|
-
*/
|
|
75
|
-
const setBatchNotifyFunction = fn => {
|
|
76
|
-
batchNotifyFn = fn;
|
|
77
|
-
};
|
|
78
|
-
return {
|
|
79
|
-
batch,
|
|
80
|
-
batchCalls,
|
|
81
|
-
schedule,
|
|
82
|
-
setNotifyFunction,
|
|
83
|
-
setBatchNotifyFunction
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// SINGLETON
|
|
88
|
-
const notifyManager = createNotifyManager();
|
|
89
|
-
|
|
90
|
-
exports.createNotifyManager = createNotifyManager;
|
|
91
|
-
exports.notifyManager = notifyManager;
|
|
92
|
-
//# sourceMappingURL=notifyManager.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifyManager.cjs","sources":["../../src/notifyManager.ts"],"sourcesContent":["import { scheduleMicrotask } from './utils'\n\n// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends unknown[]> = (...args: T) => void\n\nexport function createNotifyManager() {\n let queue: NotifyCallback[] = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n\n const batch = <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n }\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback)\n })\n }\n }\n\n /**\n * All calls to the wrapped function will be batched.\n */\n const batchCalls = <T extends unknown[]>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n }\n\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n const setNotifyFunction = (fn: NotifyFunction) => {\n notifyFn = fn\n }\n\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n const setBatchNotifyFunction = (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n }\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"names":["createNotifyManager","queue","transactions","notifyFn","callback","batchNotifyFn","batch","result","flush","schedule","push","scheduleMicrotask","batchCalls","args","originalQueue","length","forEach","setNotifyFunction","fn","setBatchNotifyFunction","notifyManager"],"mappings":";;;;AAEA;;AAUO,SAASA,mBAAmBA,GAAG;EACpC,IAAIC,KAAuB,GAAG,EAAE,CAAA;EAChC,IAAIC,YAAY,GAAG,CAAC,CAAA;EACpB,IAAIC,QAAwB,GAAIC,QAAQ,IAAK;AAC3CA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EACD,IAAIC,aAAkC,GAAID,QAAoB,IAAK;AACjEA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EAED,MAAME,KAAK,GAAOF,QAAiB,IAAQ;AACzC,IAAA,IAAIG,MAAM,CAAA;AACVL,IAAAA,YAAY,EAAE,CAAA;IACd,IAAI;MACFK,MAAM,GAAGH,QAAQ,EAAE,CAAA;AACrB,KAAC,SAAS;AACRF,MAAAA,YAAY,EAAE,CAAA;MACd,IAAI,CAACA,YAAY,EAAE;AACjBM,QAAAA,KAAK,EAAE,CAAA;AACT,OAAA;AACF,KAAA;AACA,IAAA,OAAOD,MAAM,CAAA;GACd,CAAA;EAED,MAAME,QAAQ,GAAIL,QAAwB,IAAW;AACnD,IAAA,IAAIF,YAAY,EAAE;AAChBD,MAAAA,KAAK,CAACS,IAAI,CAACN,QAAQ,CAAC,CAAA;AACtB,KAAC,MAAM;AACLO,MAAAA,uBAAiB,CAAC,MAAM;QACtBR,QAAQ,CAACC,QAAQ,CAAC,CAAA;AACpB,OAAC,CAAC,CAAA;AACJ,KAAA;GACD,CAAA;;AAED;AACF;AACA;EACE,MAAMQ,U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,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAEzD,KAAK,kBAAkB,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;AAEnE,wBAAgB,mBAAmB;;;kCAwBL,cAAc,KAAG,IAAI;qCAyClB,cAAc;0CAQT,mBAAmB;EAWxD;AAGD,eAAO,MAAM,aAAa;;;kCA/DI,cAAc,KAAG,IAAI;qCAyClB,cAAc;0CAQT,mBAAmB;CAcP,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifyManager.js","sources":["../../src/notifyManager.ts"],"sourcesContent":["import { scheduleMicrotask } from './utils'\n\n// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends unknown[]> = (...args: T) => void\n\nexport function createNotifyManager() {\n let queue: NotifyCallback[] = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n\n const batch = <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n }\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback)\n })\n }\n }\n\n /**\n * All calls to the wrapped function will be batched.\n */\n const batchCalls = <T extends unknown[]>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n }\n\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n const setNotifyFunction = (fn: NotifyFunction) => {\n notifyFn = fn\n }\n\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n const setBatchNotifyFunction = (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n }\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"names":["createNotifyManager","queue","transactions","notifyFn","callback","batchNotifyFn","batch","result","flush","schedule","push","scheduleMicrotask","batchCalls","args","originalQueue","length","forEach","setNotifyFunction","fn","setBatchNotifyFunction","notifyManager"],"mappings":";;AAEA;;AAUO,SAASA,mBAAmBA,GAAG;EACpC,IAAIC,KAAuB,GAAG,EAAE,CAAA;EAChC,IAAIC,YAAY,GAAG,CAAC,CAAA;EACpB,IAAIC,QAAwB,GAAIC,QAAQ,IAAK;AAC3CA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EACD,IAAIC,aAAkC,GAAID,QAAoB,IAAK;AACjEA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EAED,MAAME,KAAK,GAAOF,QAAiB,IAAQ;AACzC,IAAA,IAAIG,MAAM,CAAA;AACVL,IAAAA,YAAY,EAAE,CAAA;IACd,IAAI;MACFK,MAAM,GAAGH,QAAQ,EAAE,CAAA;AACrB,KAAC,SAAS;AACRF,MAAAA,YAAY,EAAE,CAAA;MACd,IAAI,CAACA,YAAY,EAAE;AACjBM,QAAAA,KAAK,EAAE,CAAA;AACT,OAAA;AACF,KAAA;AACA,IAAA,OAAOD,MAAM,CAAA;GACd,CAAA;EAED,MAAME,QAAQ,GAAIL,QAAwB,IAAW;AACnD,IAAA,IAAIF,YAAY,EAAE;AAChBD,MAAAA,KAAK,CAACS,IAAI,CAACN,QAAQ,CAAC,CAAA;AACtB,KAAC,MAAM;AACLO,MAAAA,iBAA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
|
6
|
-
|
|
7
|
-
function createNotifyManager() {
|
|
8
|
-
let queue = [];
|
|
9
|
-
let transactions = 0;
|
|
10
|
-
let notifyFn = callback => {
|
|
11
|
-
callback();
|
|
12
|
-
};
|
|
13
|
-
let batchNotifyFn = callback => {
|
|
14
|
-
callback();
|
|
15
|
-
};
|
|
16
|
-
const batch = callback => {
|
|
17
|
-
let result;
|
|
18
|
-
transactions++;
|
|
19
|
-
try {
|
|
20
|
-
result = callback();
|
|
21
|
-
} finally {
|
|
22
|
-
transactions--;
|
|
23
|
-
if (!transactions) {
|
|
24
|
-
flush();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
const schedule = callback => {
|
|
30
|
-
if (transactions) {
|
|
31
|
-
queue.push(callback);
|
|
32
|
-
} else {
|
|
33
|
-
utils.scheduleMicrotask(() => {
|
|
34
|
-
notifyFn(callback);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* All calls to the wrapped function will be batched.
|
|
41
|
-
*/
|
|
42
|
-
const batchCalls = callback => {
|
|
43
|
-
return (...args) => {
|
|
44
|
-
schedule(() => {
|
|
45
|
-
callback(...args);
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
const flush = () => {
|
|
50
|
-
const originalQueue = queue;
|
|
51
|
-
queue = [];
|
|
52
|
-
if (originalQueue.length) {
|
|
53
|
-
utils.scheduleMicrotask(() => {
|
|
54
|
-
batchNotifyFn(() => {
|
|
55
|
-
originalQueue.forEach(callback => {
|
|
56
|
-
notifyFn(callback);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Use this method to set a custom notify function.
|
|
65
|
-
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
66
|
-
*/
|
|
67
|
-
const setNotifyFunction = fn => {
|
|
68
|
-
notifyFn = fn;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
73
|
-
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
74
|
-
*/
|
|
75
|
-
const setBatchNotifyFunction = fn => {
|
|
76
|
-
batchNotifyFn = fn;
|
|
77
|
-
};
|
|
78
|
-
return {
|
|
79
|
-
batch,
|
|
80
|
-
batchCalls,
|
|
81
|
-
schedule,
|
|
82
|
-
setNotifyFunction,
|
|
83
|
-
setBatchNotifyFunction
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// SINGLETON
|
|
88
|
-
const notifyManager = createNotifyManager();
|
|
89
|
-
|
|
90
|
-
exports.createNotifyManager = createNotifyManager;
|
|
91
|
-
exports.notifyManager = notifyManager;
|
|
92
|
-
//# sourceMappingURL=notifyManager.legacy.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifyManager.legacy.cjs","sources":["../../src/notifyManager.ts"],"sourcesContent":["import { scheduleMicrotask } from './utils'\n\n// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends unknown[]> = (...args: T) => void\n\nexport function createNotifyManager() {\n let queue: NotifyCallback[] = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n\n const batch = <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n }\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback)\n })\n }\n }\n\n /**\n * All calls to the wrapped function will be batched.\n */\n const batchCalls = <T extends unknown[]>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n }\n\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n const setNotifyFunction = (fn: NotifyFunction) => {\n notifyFn = fn\n }\n\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n const setBatchNotifyFunction = (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n }\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"names":["createNotifyManager","queue","transactions","notifyFn","callback","batchNotifyFn","batch","result","flush","schedule","push","scheduleMicrotask","batchCalls","args","originalQueue","length","forEach","setNotifyFunction","fn","setBatchNotifyFunction","notifyManager"],"mappings":";;;;AAEA;;AAUO,SAASA,mBAAmBA,GAAG;EACpC,IAAIC,KAAuB,GAAG,EAAE,CAAA;EAChC,IAAIC,YAAY,GAAG,CAAC,CAAA;EACpB,IAAIC,QAAwB,GAAIC,QAAQ,IAAK;AAC3CA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EACD,IAAIC,aAAkC,GAAID,QAAoB,IAAK;AACjEA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EAED,MAAME,KAAK,GAAOF,QAAiB,IAAQ;AACzC,IAAA,IAAIG,MAAM,CAAA;AACVL,IAAAA,YAAY,EAAE,CAAA;IACd,IAAI;MACFK,MAAM,GAAGH,QAAQ,EAAE,CAAA;AACrB,KAAC,SAAS;AACRF,MAAAA,YAAY,EAAE,CAAA;MACd,IAAI,CAAC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ACLZ,KAAK;IACLM,UAAU;IACVH,QAAQ;IACRQ,iBAAiB;AACjBE,IAAAA,sBAAAA;GACD,CAAA;AACH,CAAA;;AAEA;AACaC,MAAAA,aAAa,GAAGpB,mBAAmB;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifyManager.legacy.js","sources":["../../src/notifyManager.ts"],"sourcesContent":["import { scheduleMicrotask } from './utils'\n\n// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends unknown[]> = (...args: T) => void\n\nexport function createNotifyManager() {\n let queue: NotifyCallback[] = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n\n const batch = <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n }\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback)\n })\n }\n }\n\n /**\n * All calls to the wrapped function will be batched.\n */\n const batchCalls = <T extends unknown[]>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n }\n\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n const setNotifyFunction = (fn: NotifyFunction) => {\n notifyFn = fn\n }\n\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n const setBatchNotifyFunction = (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n }\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"names":["createNotifyManager","queue","transactions","notifyFn","callback","batchNotifyFn","batch","result","flush","schedule","push","scheduleMicrotask","batchCalls","args","originalQueue","length","forEach","setNotifyFunction","fn","setBatchNotifyFunction","notifyManager"],"mappings":";;AAEA;;AAUO,SAASA,mBAAmBA,GAAG;EACpC,IAAIC,KAAuB,GAAG,EAAE,CAAA;EAChC,IAAIC,YAAY,GAAG,CAAC,CAAA;EACpB,IAAIC,QAAwB,GAAIC,QAAQ,IAAK;AAC3CA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EACD,IAAIC,aAAkC,GAAID,QAAoB,IAAK;AACjEA,IAAAA,QAAQ,EAAE,CAAA;GACX,CAAA;EAED,MAAME,KAAK,GAAOF,QAAiB,IAAQ;AACzC,IAAA,IAAIG,MAAM,CAAA;AACVL,IAAAA,YAAY,EAAE,CAAA;IACd,IAAI;MACFK,MAAM,GAAGH,QAAQ,EAAE,CAAA;AACrB,KAAC,SAAS;AACRF,MAAAA,YAAY,EAAE,CAAA;MACd,IAAI,CAACA,YAAY,EAAE;AACjBM,QAAAA,KAAK,EAAE,CAAA;AACT,OAAA;AACF,KAAA;AACA,IAAA,OAAOD,MAAM,CAAA;GACd,CAAA;EAED,MAAME,QAAQ,GAAIL,QAAwB,IAAW;AACnD,IAAA,IAAIF,YAAY,EAAE;AAChBD,MAAAA,KAAK,CAACS,IAAI,CAACN,QAAQ,CAAC,CAAA;AACtB,KAAC,MAAM;AACLO,MAAAA,iBAAiB,CAAC,MAAM;QACtBR,QAAQ,CAACC,QAAQ,CAAC,CAAA;AACpB,OAAC,CAAC,CAAA;AACJ,KAAA;GACD,CAAA;;AAED;AACF;AACA;EACE,MAAMQ,UAAU,GACdR,QAA+B,IACL;IAC1B,OAAO,CAAC,GAAGS,IAAI,KAAK;AAClBJ,MAAAA,QAAQ,CAAC,MAAM;QACbL,QAAQ,CAAC,GAAGS,IAAI,CAAC,CAAA;AACnB,OAAC,CAAC,CAAA;KACH,CAAA;GACF,CAAA;EAED,MAAML,KAAK,GAAGA,MAAY;IACxB,MAAMM,aAAa,GAAGb,KAAK,CAAA;AAC3BA,IAAAA,KAAK,GAAG,EAAE,CAAA;IACV,IAAIa,aAAa,CAACC,MAAM,EAAE;AACxBJ,MAAAA,iBAAiB,CAAC,MAAM;AACtBN,QAAAA,aAAa,CAAC,MAAM;AAClBS,UAAAA,aAAa,CAACE,OAAO,CAAEZ,QAAQ,IAAK;YAClCD,QAAQ,CAACC,QAAQ,CAAC,CAAA;AACpB,WAAC,CAAC,CAAA;AACJ,SAAC,CAAC,CAAA;AACJ,OAAC,CAAC,CAAA;AACJ,KAAA;GACD,CAAA;;AAED;AACF;AACA;AACA;EACE,MAAMa,iBAAiB,GAAIC,EAAkB,IAAK;AAChDf,IAAAA,QAAQ,GAAGe,EAAE,CAAA;GACd,CAAA;;AAED;AACF;AACA;AACA;EACE,MAAMC,sBAAsB,GAAID,EAAuB,IAAK;AAC1Db,IAAAA,aAAa,GAAGa,EAAE,CAAA;GACnB,CAAA;EAED,OAAO;IACLZ,KAAK;IACLM,UAAU;IACVH,QAAQ;IACRQ,iBAAiB;AACjBE,IAAAA,sBAAAA;GACD,CAAA;AACH,CAAA;;AAEA;AACaC,MAAAA,aAAa,GAAGpB,mBAAmB;;;;"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var subscribable = require('./subscribable.cjs');
|
|
4
|
-
var utils = require('./utils.cjs');
|
|
5
|
-
|
|
6
|
-
class OnlineManager extends subscribable.Subscribable {
|
|
7
|
-
#online = true;
|
|
8
|
-
#cleanup;
|
|
9
|
-
#setup;
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.#setup = onOnline => {
|
|
13
|
-
// addEventListener does not exist in React Native, but window does
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
15
|
-
if (!utils.isServer && window.addEventListener) {
|
|
16
|
-
const onlineListener = () => onOnline(true);
|
|
17
|
-
const offlineListener = () => onOnline(false);
|
|
18
|
-
// Listen to online
|
|
19
|
-
window.addEventListener('online', onlineListener, false);
|
|
20
|
-
window.addEventListener('offline', offlineListener, false);
|
|
21
|
-
return () => {
|
|
22
|
-
// Be sure to unsubscribe if a new handler is set
|
|
23
|
-
window.removeEventListener('online', onlineListener);
|
|
24
|
-
window.removeEventListener('offline', offlineListener);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
return;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
onSubscribe() {
|
|
31
|
-
if (!this.#cleanup) {
|
|
32
|
-
this.setEventListener(this.#setup);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
onUnsubscribe() {
|
|
36
|
-
if (!this.hasListeners()) {
|
|
37
|
-
this.#cleanup?.();
|
|
38
|
-
this.#cleanup = undefined;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
setEventListener(setup) {
|
|
42
|
-
this.#setup = setup;
|
|
43
|
-
this.#cleanup?.();
|
|
44
|
-
this.#cleanup = setup(this.setOnline.bind(this));
|
|
45
|
-
}
|
|
46
|
-
setOnline(online) {
|
|
47
|
-
const changed = this.#online !== online;
|
|
48
|
-
if (changed) {
|
|
49
|
-
this.#online = online;
|
|
50
|
-
this.listeners.forEach(listener => {
|
|
51
|
-
listener(online);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
isOnline() {
|
|
56
|
-
return this.#online;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const onlineManager = new OnlineManager();
|
|
60
|
-
|
|
61
|
-
exports.OnlineManager = OnlineManager;
|
|
62
|
-
exports.onlineManager = onlineManager;
|
|
63
|
-
//# sourceMappingURL=onlineManager.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onlineManager.cjs","sources":["../../src/onlineManager.ts"],"sourcesContent":["import { Subscribable } from './subscribable'\nimport { isServer } from './utils'\n\ntype Listener = (online: boolean) => void\ntype SetupFn = (setOnline: Listener) => (() => void) | undefined\n\nexport class OnlineManager extends Subscribable<Listener> {\n #online = true\n #cleanup?: () => void\n\n #setup: SetupFn\n\n constructor() {\n super()\n this.#setup = (onOnline) => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true)\n const offlineListener = () => onOnline(false)\n // Listen to online\n window.addEventListener('online', onlineListener, false)\n window.addEventListener('offline', offlineListener, false)\n\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', onlineListener)\n window.removeEventListener('offline', offlineListener)\n }\n }\n\n return\n }\n }\n\n protected onSubscribe(): void {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup)\n }\n }\n\n protected onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.()\n this.#cleanup = undefined\n }\n }\n\n setEventListener(setup: SetupFn): void {\n this.#setup = setup\n this.#cleanup?.()\n this.#cleanup = setup(this.setOnline.bind(this))\n }\n\n setOnline(online: boolean): void {\n const changed = this.#online !== online\n\n if (changed) {\n this.#online = online\n this.listeners.forEach((listener) => {\n listener(online)\n })\n }\n }\n\n isOnline(): boolean {\n return this.#online\n }\n}\n\nexport const onlineManager = new OnlineManager()\n"],"names":["OnlineManager","Subscribable","constructor","onOnline","isServer","window","addEventListener","onlineListener","offlineListener","removeEventListener","onSubscribe","setEventListener","onUnsubscribe","hasListeners","undefined","setup","setOnline","bind","online","changed","listeners","forEach","listener","isOnline","onlineManager"],"mappings":";;;;;AAMO,MAAMA,aAAa,SAASC,yBAAY,CAAW;EACxD,OAAO,GAAG,IAAI,CAAA;AACd,EAAA,QAAQ,CAAA;AAER,EAAA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|
-
{"version":3,"file":"onlineManager.js","sources":["../../src/onlineManager.ts"],"sourcesContent":["import { Subscribable } from './subscribable'\nimport { isServer } from './utils'\n\ntype Listener = (online: boolean) => void\ntype SetupFn = (setOnline: Listener) => (() => void) | undefined\n\nexport class OnlineManager extends Subscribable<Listener> {\n #online = true\n #cleanup?: () => void\n\n #setup: SetupFn\n\n constructor() {\n super()\n this.#setup = (onOnline) => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true)\n const offlineListener = () => onOnline(false)\n // Listen to online\n window.addEventListener('online', onlineListener, false)\n window.addEventListener('offline', offlineListener, false)\n\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', onlineListener)\n window.removeEventListener('offline', offlineListener)\n }\n }\n\n return\n }\n }\n\n protected onSubscribe(): void {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup)\n }\n }\n\n protected onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.()\n this.#cleanup = undefined\n }\n }\n\n setEventListener(setup: SetupFn): void {\n this.#setup = setup\n this.#cleanup?.()\n this.#cleanup = setup(this.setOnline.bind(this))\n }\n\n setOnline(online: boolean): void {\n const changed = this.#online !== online\n\n if (changed) {\n this.#online = online\n this.listeners.forEach((listener) => {\n listener(online)\n })\n }\n }\n\n isOnline(): boolean {\n return this.#online\n }\n}\n\nexport const onlineManager = new OnlineManager()\n"],"names":["OnlineManager","Subscribable","constructor","onOnline","isServer","window","addEventListener","onlineListener","offlineListener","removeEventListener","onSubscribe","setEventListener","onUnsubscribe","hasListeners","undefined","setup","setOnline","bind","online","changed","listeners","forEach","listener","isOnline","onlineManager"],"mappings":";;;AAMO,MAAMA,aAAa,SAASC,YAAY,CAAW;EACxD,OAAO,GAAG,IAAI,CAAA;AACd,EAAA,QAAQ,CAAA;AAER,EAAA,MAAM,CAAA;AAENC,EAAAA,WAAWA,GAAG;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KAAK,CAAC,IAAI,CAACC,SAAS,CAACC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;AAClD,GAAA;EAEAD,SAASA,CAACE,MAAe,EAAQ;AAC/B,IAAA,MAAMC,OAAO,GAAG,IAAI,CAAC,OAAO,KAAKD,MAAM,CAAA;AAEvC,IAAA,IAAIC,OAAO,EAAE;AACX,MAAA,IAAI,CAAC,OAAO,GAAGD,MAAM,CAAA;AACrB,MAAA,IAAI,CAACE,SAAS,CAACC,OAAO,CAAEC,QAAQ,IAAK;QACnCA,QAAQ,CAACJ,MAAM,CAAC,CAAA;AAClB,OAAC,CAAC,CAAA;AACJ,KAAA;AACF,GAAA;AAEAK,EAAAA,QAAQA,GAAY;IAClB,OAAO,IAAI,CAAC,OAAO,CAAA;AACrB,GAAA;AACF,CAAA;MAEaC,aAAa,GAAG,IAAIxB,aAAa;;;;"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.legacy.cjs');
|
|
4
|
-
var subscribable = require('./subscribable.legacy.cjs');
|
|
5
|
-
var utils = require('./utils.legacy.cjs');
|
|
6
|
-
|
|
7
|
-
var _online = /*#__PURE__*/_rollupPluginBabelHelpers.classPrivateFieldLooseKey("online");
|
|
8
|
-
var _cleanup = /*#__PURE__*/_rollupPluginBabelHelpers.classPrivateFieldLooseKey("cleanup");
|
|
9
|
-
var _setup = /*#__PURE__*/_rollupPluginBabelHelpers.classPrivateFieldLooseKey("setup");
|
|
10
|
-
class OnlineManager extends subscribable.Subscribable {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
Object.defineProperty(this, _online, {
|
|
14
|
-
writable: true,
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(this, _cleanup, {
|
|
18
|
-
writable: true,
|
|
19
|
-
value: void 0
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(this, _setup, {
|
|
22
|
-
writable: true,
|
|
23
|
-
value: void 0
|
|
24
|
-
});
|
|
25
|
-
_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _setup)[_setup] = onOnline => {
|
|
26
|
-
// addEventListener does not exist in React Native, but window does
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
28
|
-
if (!utils.isServer && window.addEventListener) {
|
|
29
|
-
const onlineListener = () => onOnline(true);
|
|
30
|
-
const offlineListener = () => onOnline(false);
|
|
31
|
-
// Listen to online
|
|
32
|
-
window.addEventListener('online', onlineListener, false);
|
|
33
|
-
window.addEventListener('offline', offlineListener, false);
|
|
34
|
-
return () => {
|
|
35
|
-
// Be sure to unsubscribe if a new handler is set
|
|
36
|
-
window.removeEventListener('online', onlineListener);
|
|
37
|
-
window.removeEventListener('offline', offlineListener);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
onSubscribe() {
|
|
44
|
-
if (!_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _cleanup)[_cleanup]) {
|
|
45
|
-
this.setEventListener(_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _setup)[_setup]);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
onUnsubscribe() {
|
|
49
|
-
if (!this.hasListeners()) {
|
|
50
|
-
var _classPrivateFieldLoo, _classPrivateFieldLoo2;
|
|
51
|
-
(_classPrivateFieldLoo = (_classPrivateFieldLoo2 = _rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _cleanup))[_cleanup]) == null ? void 0 : _classPrivateFieldLoo.call(_classPrivateFieldLoo2);
|
|
52
|
-
_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _cleanup)[_cleanup] = undefined;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
setEventListener(setup) {
|
|
56
|
-
var _classPrivateFieldLoo3, _classPrivateFieldLoo4;
|
|
57
|
-
_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _setup)[_setup] = setup;
|
|
58
|
-
(_classPrivateFieldLoo3 = (_classPrivateFieldLoo4 = _rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _cleanup))[_cleanup]) == null ? void 0 : _classPrivateFieldLoo3.call(_classPrivateFieldLoo4);
|
|
59
|
-
_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _cleanup)[_cleanup] = setup(this.setOnline.bind(this));
|
|
60
|
-
}
|
|
61
|
-
setOnline(online) {
|
|
62
|
-
const changed = _rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _online)[_online] !== online;
|
|
63
|
-
if (changed) {
|
|
64
|
-
_rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _online)[_online] = online;
|
|
65
|
-
this.listeners.forEach(listener => {
|
|
66
|
-
listener(online);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
isOnline() {
|
|
71
|
-
return _rollupPluginBabelHelpers.classPrivateFieldLooseBase(this, _online)[_online];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const onlineManager = new OnlineManager();
|
|
75
|
-
|
|
76
|
-
exports.OnlineManager = OnlineManager;
|
|
77
|
-
exports.onlineManager = onlineManager;
|
|
78
|
-
//# sourceMappingURL=onlineManager.legacy.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onlineManager.legacy.cjs","sources":["../../src/onlineManager.ts"],"sourcesContent":["import { Subscribable } from './subscribable'\nimport { isServer } from './utils'\n\ntype Listener = (online: boolean) => void\ntype SetupFn = (setOnline: Listener) => (() => void) | undefined\n\nexport class OnlineManager extends Subscribable<Listener> {\n #online = true\n #cleanup?: () => void\n\n #setup: SetupFn\n\n constructor() {\n super()\n this.#setup = (onOnline) => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true)\n const offlineListener = () => onOnline(false)\n // Listen to online\n window.addEventListener('online', onlineListener, false)\n window.addEventListener('offline', offlineListener, false)\n\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', onlineListener)\n window.removeEventListener('offline', offlineListener)\n }\n }\n\n return\n }\n }\n\n protected onSubscribe(): void {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup)\n }\n }\n\n protected onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.()\n this.#cleanup = undefined\n }\n }\n\n setEventListener(setup: SetupFn): void {\n this.#setup = setup\n this.#cleanup?.()\n this.#cleanup = setup(this.setOnline.bind(this))\n }\n\n setOnline(online: boolean): void {\n const changed = this.#online !== online\n\n if (changed) {\n this.#online = online\n this.listeners.forEach((listener) => {\n listener(online)\n })\n }\n }\n\n isOnline(): boolean {\n return this.#online\n }\n}\n\nexport const onlineManager = new OnlineManager()\n"],"names":["_online","_classPrivateFieldLooseKey","_cleanup","_setup","OnlineManager","Subscribable","constructor","Object","defineProperty","writable","value","_classPrivateFieldLooseBase","onOnline","isServer","window","addEventListener","onlineListener","offlineListener","removeEventListener","onSubscribe","setEventListener","onUnsubscribe","hasListeners","_classPrivateFieldLoo","_classPrivateFieldLoo2","call","undefined","setup","_classPrivateFieldLoo3","_classPrivateFieldLoo4","setOnline","bind","online","changed","listeners","forEach","listener","isOnline","onlineManager"],"mappings":";;;;;;AACkC,IAAAA,OAAA,gBAAAC,mDAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IAAAC,QAAA,gBAAAD,mDAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAAE,MAAA,gBAAAF,mDAAA,CAAA,OAAA,CAAA,CAAA;AAK3B,MAAMG,aAAa,SAASC,yBAAY,CAAW;AAMxDC,EAAAA,WAAWA,GAAG;AACZ,IAAA,KAAK,EAAE,CAAA;IAAAC,MAAA,CAAAC,cAAA,CAAA,IAAA,EAAAR,OAAA,EAAA;MAAAS,QAAA,EA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