react-native-inapp-inspector 2.4.1 → 2.5.0
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.ar.md +163 -0
- package/README.de.md +163 -0
- package/README.es.md +164 -0
- package/README.fr.md +163 -0
- package/README.hi.md +163 -0
- package/README.ja.md +180 -0
- package/README.ko.md +163 -0
- package/README.md +340 -243
- package/README.pt-BR.md +163 -0
- package/README.ru.md +163 -0
- package/README.zh-CN.md +387 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +605 -23
- package/assets/banner_dark.svg +186 -0
- package/assets/banner_light.svg +186 -0
- package/assets/icon_circle.svg +148 -0
- package/assets/icon_square.svg +369 -0
- package/assets/inapp_inspector_icon.gif +0 -0
- package/assets/inapp_inspector_icon_original.gif +0 -0
- package/assets/social_preview.png +0 -0
- package/assets/walkthrough.gif +0 -0
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/AnalyticsDetail.js +23 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
- package/dist/commonjs/components/AnalyticsGraph.js +44 -44
- package/dist/commonjs/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/commonjs/components/AnimatedBrandOwl.js +175 -0
- package/dist/commonjs/components/AppHeaderLogo.d.ts +1 -0
- package/dist/commonjs/components/AppHeaderLogo.js +5 -3
- package/dist/commonjs/components/BrandCircleIcon.js +28 -28
- package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
- package/dist/commonjs/components/BrandSquareIcon.js +139 -0
- package/dist/commonjs/components/ConsoleLogCard.d.ts +2 -1
- package/dist/commonjs/components/ConsoleLogCard.js +23 -39
- package/dist/commonjs/components/Inspector/AboutModal.js +44 -54
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +6 -6
- package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +30 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +12 -12
- package/dist/commonjs/components/Inspector/CrashTab.js +44 -9
- package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +30 -33
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +172 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +55 -35
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +40 -35
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +341 -135
- package/dist/commonjs/components/Inspector/NetworkTab.js +50 -50
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/commonjs/components/Inspector/PushCard.d.ts +3 -2
- package/dist/commonjs/components/Inspector/PushCard.js +5 -4
- package/dist/commonjs/components/Inspector/PushDetail.js +41 -32
- package/dist/commonjs/components/Inspector/PushTab.js +12 -12
- package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
- package/dist/commonjs/components/Inspector/ReduxTab.js +10 -8
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +287 -139
- package/dist/commonjs/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SocketCard.js +116 -0
- package/dist/commonjs/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/SocketDetail.js +327 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/commonjs/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SocketTab.js +112 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +39 -37
- package/dist/commonjs/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/SupportModal.js +125 -0
- package/dist/commonjs/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SupportPage.js +227 -0
- package/dist/commonjs/components/Inspector/TabBar.js +24 -23
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +24 -24
- package/dist/commonjs/components/JsonViewer.js +50 -48
- package/dist/commonjs/components/LogCard.d.ts +3 -2
- package/dist/commonjs/components/LogCard.js +27 -25
- package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
- package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
- package/dist/commonjs/components/NetworkIcons.d.ts +42 -0
- package/dist/commonjs/components/NetworkIcons.js +139 -6
- package/dist/commonjs/components/SegmentedTabs.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/crash.d.ts +1 -1
- package/dist/commonjs/crash.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
- package/dist/commonjs/customHooks/crashHandler.js +7 -7
- package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
- package/dist/commonjs/customHooks/socketLogger.js +2 -0
- package/dist/commonjs/editor.d.ts +13 -0
- package/dist/commonjs/editor.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +3 -3
- package/dist/commonjs/helpers/memoryManager.d.ts +1 -0
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +5 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +3 -1
- package/dist/commonjs/helpers/shareFormatter.js +8 -7
- package/dist/commonjs/helpers/telemetry.js +1 -1
- package/dist/commonjs/i18n/index.d.ts +99 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -0
- package/dist/commonjs/i18n/locales/it.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -0
- package/dist/commonjs/i18n/locales/mr.json +1 -0
- package/dist/commonjs/i18n/locales/nl.json +1 -0
- package/dist/commonjs/i18n/locales/pa.json +1 -0
- package/dist/commonjs/i18n/locales/pl.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -0
- package/dist/commonjs/i18n/locales/te.json +1 -0
- package/dist/commonjs/i18n/locales/tr.json +1 -0
- package/dist/commonjs/i18n/locales/vi.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +16 -13
- package/dist/commonjs/index.js +5 -4
- package/dist/commonjs/native/NativeInspector.d.ts +4 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/commonjs/socket.d.ts +4 -0
- package/dist/commonjs/socket.js +1 -0
- package/dist/commonjs/styles/AppColors.d.ts +42 -2
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/common.js +1 -1
- package/dist/commonjs/styles/index.d.ts +30 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/editor.d.ts +96 -0
- package/dist/commonjs/types/editor.js +1 -0
- package/dist/commonjs/types/enums.d.ts +40 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +143 -1
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +31 -31
- package/dist/esm/components/AnalyticsEventCard.js +1 -1
- package/dist/esm/components/AnalyticsGraph.js +74 -74
- package/dist/esm/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/esm/components/AnimatedBrandOwl.js +175 -0
- package/dist/esm/components/AppHeaderLogo.d.ts +1 -0
- package/dist/esm/components/AppHeaderLogo.js +7 -5
- package/dist/esm/components/BrandCircleIcon.js +70 -70
- package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
- package/dist/esm/components/BrandSquareIcon.js +139 -0
- package/dist/esm/components/ConsoleLogCard.d.ts +2 -1
- package/dist/esm/components/ConsoleLogCard.js +61 -77
- package/dist/esm/components/Inspector/AboutModal.js +85 -95
- package/dist/esm/components/Inspector/AnalyticsTab.js +24 -24
- package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/esm/components/Inspector/ConfirmationModal.js +30 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
- package/dist/esm/components/Inspector/CrashTab.js +203 -168
- package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
- package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
- package/dist/esm/components/Inspector/FabLauncher.js +57 -60
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
- package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +172 -0
- package/dist/esm/components/Inspector/MainScreen.js +130 -110
- package/dist/esm/components/Inspector/MediaGalleryTab.js +83 -78
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -139
- package/dist/esm/components/Inspector/NetworkTab.js +130 -130
- package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/esm/components/Inspector/PushCard.d.ts +3 -2
- package/dist/esm/components/Inspector/PushCard.js +23 -22
- package/dist/esm/components/Inspector/PushDetail.js +45 -36
- package/dist/esm/components/Inspector/PushTab.js +23 -23
- package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
- package/dist/esm/components/Inspector/ReduxTab.js +20 -18
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +526 -378
- package/dist/esm/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/esm/components/Inspector/SocketCard.js +116 -0
- package/dist/esm/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/SocketDetail.js +327 -0
- package/dist/esm/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/esm/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/esm/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/esm/components/Inspector/SocketTab.js +112 -0
- package/dist/esm/components/Inspector/StorageTab.js +139 -137
- package/dist/esm/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/esm/components/Inspector/SupportModal.js +125 -0
- package/dist/esm/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/esm/components/Inspector/SupportPage.js +227 -0
- package/dist/esm/components/Inspector/TabBar.js +36 -35
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +22 -22
- package/dist/esm/components/JsonViewer.js +66 -64
- package/dist/esm/components/LogCard.d.ts +3 -2
- package/dist/esm/components/LogCard.js +57 -55
- package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
- package/dist/esm/components/ModuleErrorBoundary.js +23 -23
- package/dist/esm/components/NetworkIcons.d.ts +42 -0
- package/dist/esm/components/NetworkIcons.js +139 -6
- package/dist/esm/components/SegmentedTabs.js +7 -7
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.d.ts +1 -1
- package/dist/esm/crash.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +2 -1
- package/dist/esm/customHooks/crashHandler.js +7 -7
- package/dist/esm/customHooks/socketLogger.d.ts +26 -0
- package/dist/esm/customHooks/socketLogger.js +2 -0
- package/dist/esm/editor.d.ts +13 -0
- package/dist/esm/editor.js +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/memoryManager.d.ts +1 -0
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +5 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +3 -1
- package/dist/esm/helpers/shareFormatter.js +8 -7
- package/dist/esm/helpers/telemetry.js +1 -1
- package/dist/esm/i18n/index.d.ts +99 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -0
- package/dist/esm/i18n/locales/it.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -0
- package/dist/esm/i18n/locales/mr.json +1 -0
- package/dist/esm/i18n/locales/nl.json +1 -0
- package/dist/esm/i18n/locales/pa.json +1 -0
- package/dist/esm/i18n/locales/pl.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -0
- package/dist/esm/i18n/locales/te.json +1 -0
- package/dist/esm/i18n/locales/tr.json +1 -0
- package/dist/esm/i18n/locales/vi.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +16 -13
- package/dist/esm/index.js +8 -7
- package/dist/esm/native/NativeInspector.d.ts +4 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/esm/socket.d.ts +4 -0
- package/dist/esm/socket.js +1 -0
- package/dist/esm/styles/AppColors.d.ts +42 -2
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/common.js +1 -1
- package/dist/esm/styles/index.d.ts +30 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/editor.d.ts +96 -0
- package/dist/esm/types/editor.js +1 -0
- package/dist/esm/types/enums.d.ts +40 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +143 -1
- package/editor.d.ts +1 -0
- package/editor.js +1 -0
- package/ios/NetworkInspectorModule.mm +531 -12
- package/package.json +213 -2
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +65 -4
- package/src/native/NativeNetworkInspector.ts +4 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(l,
|
|
2
|
-
<PushCard_1.default item={
|
|
3
|
-
</AnimatedEntrance_1.default>,[
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(l,o,n,t){t===void 0&&(t=n);var a=Object.getOwnPropertyDescriptor(o,n);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(l,t,a)}):(function(l,o,n,t){t===void 0&&(t=n),l[t]=o[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(l,o){Object.defineProperty(l,"default",{enumerable:!0,value:o})}):function(l,o){l.default=o}),__importStar=this&&this.__importStar||(function(){var l=function(o){return l=Object.getOwnPropertyNames||function(n){var t=[];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[t.length]=a);return t},l(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var t=l(o),a=0;a<t.length;a++)t[a]!=="default"&&__createBinding(n,o,t[a]);return __setModuleDefault(n,o),n}})(),__importDefault=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),PushCard_1=__importDefault(require("./PushCard")),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),EmptyState_1=__importDefault(require("../EmptyState")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),LOAD_MORE_STEP=10,PushTab=react_1.default.memo(()=>{const{t:l}=(0,i18n_1.useTranslation)(),{pushRecords:o,filteredPushRecords:n,pushSearch:t,setPushSearch:a,pushQuickFilter:s,setPushQuickFilter:f,setSelectedPush:h,clearAllPushLogs:T,simulatePush:C,maxPushLogs:u}=(0,InspectorContext_1.useInspector)(),v=u||50,b=(0,react_1.useRef)(null),[g,x]=(0,react_1.useState)(0),[_,y]=(0,react_1.useState)(v);react_1.default.useEffect(()=>{y(u||50),b.current?.scrollToOffset({offset:0,animated:!1})},[t,s,u]);const d=(0,react_1.useMemo)(()=>n.slice(0,_),[n,_]),m=["salesforce","fcm","apns","deeplink","rich_media"],I=(0,react_1.useCallback)(()=>{const e=m[g%m.length];C(e),x(r=>r+1)},[g,C]),S=(0,react_1.useMemo)(()=>{let e=0,r=0,c=0;const i={};return o.forEach(p=>{const w=(p.appState||"").toLowerCase();w==="foreground"&&e++,w==="background"&&r++,p.action==="opened"&&c++;const A=(p.source||"other").toLowerCase();i[A]=(i[A]||0)+1}),{all:o.length,foreground:e,background:r,opened:c,sources:i}},[o]),V=(0,react_1.useMemo)(()=>{const e=[{id:"all",label:"All",color:AppColors_1.AppColors.purple,icon:r=><NetworkIcons_1.BellIcon size={12}color={r}/>},{id:"foreground",label:"Foreground",color:AppColors_1.AppColors.greenColor,icon:r=><NetworkIcons_1.SunIcon size={12}color={r}/>},{id:"background",label:"Background",color:AppColors_1.AppColors.darkOrange,icon:r=><NetworkIcons_1.MoonIcon size={12}color={r}/>},{id:"opened",label:"Opened",color:AppColors_1.AppColors.brandPurple,icon:r=><NetworkIcons_1.ExternalLinkIcon size={12}color={r}/>}];return Object.entries(S.sources).forEach(([r,c])=>{c>0&&r!=="all"&&e.push({id:`source:${r}`,label:r.toUpperCase(),color:r==="salesforce"?AppColors_1.AppColors.sky600:AppColors_1.AppColors.brandPurple,icon:i=><NetworkIcons_1.CloudPushIcon size={12}color={i}/>})}),e},[S]),P=(0,react_1.useCallback)(e=>{h(e)},[h]),k=(0,react_1.useCallback)(({item:e,index:r})=><AnimatedEntrance_1.default index={r}distance={8}>
|
|
2
|
+
<PushCard_1.default item={e}searchStr={t}onPress={()=>P(e)}/>
|
|
3
|
+
</AnimatedEntrance_1.default>,[t,P]),B=(0,react_1.useCallback)(e=>e.id||`push_${e.timestamp}`,[]);return<react_native_1.View style={{flex:1}}>
|
|
4
4
|
|
|
5
5
|
<react_native_1.View style={{marginTop:6}}>
|
|
6
6
|
<react_native_1.View style={styles_1.default.toolbarRow}>
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
<react_native_1.View style={styles_1.default.searchIcon}>
|
|
9
9
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak}size={15}/>
|
|
10
10
|
</react_native_1.View>
|
|
11
|
-
<react_native_1.TextInput style={[styles_1.default.searchInput,{paddingVertical:0}]}placeholder="Search notifications..."placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={
|
|
12
|
-
{
|
|
13
|
-
<react_native_1.Pressable onPress={()=>
|
|
11
|
+
<react_native_1.TextInput style={[styles_1.default.searchInput,{paddingVertical:0}]}placeholder="Search notifications..."placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={t}onChangeText={a}autoCapitalize="none"autoCorrect={!1}returnKeyType="search"clearButtonMode="while-editing"/>
|
|
12
|
+
{t.length>0&&react_native_1.Platform.OS==="android"&&<react_native_1.View style={{position:"absolute",right:8,top:0,bottom:0,justifyContent:"center"}}>
|
|
13
|
+
<react_native_1.Pressable onPress={()=>a("")}hitSlop={10}style={styles_1.default.clearBtn}>
|
|
14
14
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak}size={13}/>
|
|
15
15
|
</react_native_1.Pressable>
|
|
16
16
|
</react_native_1.View>}
|
|
17
17
|
</react_native_1.View>
|
|
18
18
|
|
|
19
19
|
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
20
|
-
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{backgroundColor:`${AppColors_1.AppColors.brandPurple}14`,borderColor:`${AppColors_1.AppColors.brandPurple}30`}]}onPress={
|
|
20
|
+
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{backgroundColor:`${AppColors_1.AppColors.brandPurple}14`,borderColor:`${AppColors_1.AppColors.brandPurple}30`}]}onPress={I}hitSlop={6}accessibilityRole="button"accessibilityLabel="Simulate incoming push notification">
|
|
21
21
|
<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.brandPurple}size={15}/>
|
|
22
22
|
</TouchableScale_1.default>
|
|
23
23
|
|
|
24
|
-
{
|
|
24
|
+
{o.length>0&&<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={T}hitSlop={6}accessibilityRole="button"accessibilityLabel="Clear all push notification history">
|
|
25
25
|
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor}size={15}/>
|
|
26
26
|
</TouchableScale_1.default>}
|
|
27
27
|
</react_native_1.View>
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
|
|
32
32
|
<react_native_1.View style={pushTabStyles.carouselWrapper}>
|
|
33
33
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={pushTabStyles.carouselContent}>
|
|
34
|
-
{
|
|
35
|
-
{
|
|
34
|
+
{V.map(e=>{const r=s===e.id;return<TouchableScale_1.default key={e.id}onPress={()=>f(e.id)}style={[pushTabStyles.filterPill,r&&{backgroundColor:e.color,borderColor:e.color}]}>
|
|
35
|
+
{e.icon?e.icon(r?AppColors_1.AppColors.white:e.color):null}
|
|
36
36
|
<react_native_1.Text style={[pushTabStyles.filterPillText,r&&{color:AppColors_1.AppColors.white}]}>
|
|
37
|
-
{
|
|
37
|
+
{e.label}
|
|
38
38
|
</react_native_1.Text>
|
|
39
39
|
</TouchableScale_1.default>})}
|
|
40
40
|
</react_native_1.ScrollView>
|
|
41
41
|
</react_native_1.View>
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
<react_native_1.FlatList ref={
|
|
44
|
+
<react_native_1.FlatList ref={b}data={d}renderItem={k}keyExtractor={B}style={{flex:1}}contentContainerStyle={[pushTabStyles.listContent,{flexGrow:1}]}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"ListEmptyComponent={<EmptyState_1.default isSearch={!!(t||s!=="all")}searchQuery={t}customTitle={t||s!=="all"?l("push.noMatching","No matching push notifications"):l("push.noNotifications","No push notifications captured yet")}customSub={t||s!=="all"?l("push.adjustSearchFilter","Try adjusting your search query or filter chips."):l("push.noNotificationsDesc","Incoming or opened push payloads from any domain (Salesforce, FCM, APNs, etc.) will appear here automatically.")}onClearSearch={()=>{a(""),f("all")}}showReload={!1}/>}ListFooterComponent={n.length>0?<EndOfListFooter_1.default count={d.length}totalCount={n.length}label="push notifications"loadMoreStep={LOAD_MORE_STEP}hasMore={d.length<n.length}onLoadMore={()=>y(e=>e+LOAD_MORE_STEP)}/>:null}/>
|
|
45
45
|
</react_native_1.View>}),pushTabStyles=react_native_1.StyleSheet.create({carouselWrapper:{paddingVertical:6,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,backgroundColor:AppColors_1.AppColors.white},carouselContent:{paddingHorizontal:8,gap:6,flexDirection:"row",alignItems:"center"},filterPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:4.5,borderRadius:20,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},filterPillText:{fontSize:11,fontFamily:AppFonts_1.AppFonts.interMedium,color:AppColors_1.AppColors.primaryBlack},countBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:10},countBadgeText:{fontSize:9.5,fontFamily:AppFonts_1.AppFonts.interBold},listContent:{padding:8,paddingBottom:24}});PushTab.displayName="PushTab",exports.default=PushTab;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,i,l,
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,i,l,o){o===void 0&&(o=l);var t=Object.getOwnPropertyDescriptor(i,l);(!t||("get"in t?!i.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return i[l]}}),Object.defineProperty(e,o,t)}):(function(e,i,l,o){o===void 0&&(o=l),e[o]=i[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,i){Object.defineProperty(e,"default",{enumerable:!0,value:i})}):function(e,i){e.default=i}),__importStar=this&&this.__importStar||(function(){var e=function(i){return e=Object.getOwnPropertyNames||function(l){var o=[];for(var t in l)Object.prototype.hasOwnProperty.call(l,t)&&(o[o.length]=t);return o},e(i)};return function(i){if(i&&i.__esModule)return i;var l={};if(i!=null)for(var o=e(i),t=0;t<o.length;t++)o[t]!=="default"&&__createBinding(l,i,o[t]);return __setModuleDefault(l,i),l}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),SegmentedTabs_1=__importDefault(require("../SegmentedTabs")),JsonViewer_1=__importDefault(require("../JsonViewer")),DiffViewer_1=__importDefault(require("../DiffViewer")),CopyButton_1=__importDefault(require("../CopyButton")),ShareButton_1=__importDefault(require("../ShareButton")),TouchableScale_1=__importDefault(require("../TouchableScale")),HighlightText_1=__importDefault(require("../HighlightText")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),reduxLogger_1=require("../../customHooks/reduxLogger"),helpers_1=require("../../helpers"),shareFormatter_1=require("../../helpers/shareFormatter"),settingsStore_1=require("../../helpers/settingsStore"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),NetworkIcons_1=require("../NetworkIcons"),getOriginBadge=e=>{switch(e){case"saga":return{label:"SAGA",renderIcon:(i,l=9)=><NetworkIcons_1.AtomIcon color={i}size={l}/>,bg:AppColors_1.AppColors.purple100,text:AppColors_1.AppColors.brandPurple,border:AppColors_1.AppColors.purple200};case"thunk":return{label:"THUNK",renderIcon:(i,l=9)=><NetworkIcons_1.BoltIcon color={i}size={l}/>,bg:AppColors_1.AppColors.amber100,text:AppColors_1.AppColors.amber800Warm,border:AppColors_1.AppColors.amber200};case"epic":return{label:"EPIC",renderIcon:(i,l=9)=><NetworkIcons_1.TerminalIcon color={i}size={l}/>,bg:AppColors_1.AppColors.sky100,text:AppColors_1.AppColors.sky600,border:AppColors_1.AppColors.sky400};case"listener":return{label:"LISTENER",renderIcon:(i,l=9)=><NetworkIcons_1.ListenerIcon color={i}size={l}/>,bg:AppColors_1.AppColors.teal100,text:AppColors_1.AppColors.teal700,border:AppColors_1.AppColors.teal400};case"component":return{label:"UI DISPATCH",renderIcon:(i,l=9)=><NetworkIcons_1.ScreenIcon color={i}size={l}/>,bg:AppColors_1.AppColors.sky100,text:AppColors_1.AppColors.sky600,border:AppColors_1.AppColors.sky400};default:return{label:"DISPATCH",renderIcon:(i,l=9)=><NetworkIcons_1.BoltIcon color={i}size={l}/>,bg:AppColors_1.AppColors.slate100,text:AppColors_1.AppColors.slate700,border:AppColors_1.AppColors.slate200}}},ReduxDetail=react_1.default.memo(()=>{const{t:e}=(0,i18n_1.useTranslation)(),{reduxState:i,reduxLastActionMap:l,selectedReduxSlice:o,selectedReduxAction:t}=(0,InspectorContext_1.useInspector)(),[d,S]=(0,react_1.useState)(""),[y,V]=(0,react_1.useState)("live"),[T,F]=(0,react_1.useState)("payload"),[k,B]=(0,react_1.useState)("raw"),[P,W]=(0,react_1.useState)(null),[_,A]=(0,react_1.useState)(!1),[b,g]=(0,react_1.useState)(null),h=(0,react_1.useMemo)(()=>(0,reduxLogger_1.getActionHistory)(),[l]),x=(0,react_1.useMemo)(()=>o?h.filter(a=>!a.affectedSlices||a.affectedSlices.length===0?!0:a.affectedSlices.includes(o)):h,[h,o]),I=(0,react_1.useMemo)(()=>{if(!d.trim())return x;const a=d.toLowerCase();return x.filter(p=>p.type.toLowerCase().includes(a)||p.callerFile&&p.callerFile.toLowerCase().includes(a)||p.payload&&JSON.stringify(p.payload).toLowerCase().includes(a))},[x,d]);(0,react_1.useEffect)(()=>{if(!o)return;async function a(){try{const p=(0,settingsStore_1.getCustomStorage)();if(!p){A(!1),g(null);return}let c=await p.getItem(`persist:${o}`);if(c){try{g(JSON.parse(c))}catch{g(c)}A(!0);return}let n=await p.getItem("persist:root");if(n){const r=JSON.parse(n);if(r&&r[o]!==void 0){const s=r[o];try{g(typeof s=="string"?JSON.parse(s):s)}catch{g(s)}A(!0);return}}}catch{}A(!1),g(null)}a()},[o]);const z=()=>{o&&react_native_1.Alert.alert(e("redux.clearPersistedTitle","Clear Persisted State"),e("redux.clearPersistedMessage",'Are you sure you want to delete persisted storage for slice "{{slice}}"?').replace("{{slice}}",o||""),[{text:e("common.cancel","Cancel"),style:"cancel"},{text:"Delete",style:"destructive",onPress:async()=>{try{const a=(0,settingsStore_1.getCustomStorage)();if(!a)return;typeof a.removeItem=="function"?await a.removeItem(`persist:${o}`):await a.setItem(`persist:${o}`,""),A(!1),g(null),V("live"),react_native_1.Platform.OS==="android"?react_native_1.ToastAndroid.show("Persisted state cleared",react_native_1.ToastAndroid.SHORT):react_native_1.Alert.alert(e("redux.clearedPersisted","Persisted state has been cleared."))}catch{react_native_1.Alert.alert(e("common.failed","Failed"),e("redux.clearPersistedError","Failed to clear persisted state."))}}}])};if(o!=null){const a=i?.[o],p=a&&typeof a=="object"?Object.keys(a).length:typeof a<"u"?1:0,c=l[o],n=[{key:"live",label:e("redux.liveState","Live State"),icon:r=><NetworkIcons_1.LiveStateIcon color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={12}/>},{key:"timeline",label:`${e("redux.timeline","Timeline")} (${x.length})`,icon:r=><NetworkIcons_1.TimelineIcon color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={12}/>},{key:"persisted",label:_?e("redux.persisted","Persisted"):e("redux.storage","Storage"),icon:r=><NetworkIcons_1.StorageIcon color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={12}/>},{key:"metadata",label:e("redux.metadata","Metadata"),icon:r=><NetworkIcons_1.MetadataIcon color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={12}/>}];return<react_native_1.View style={{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground}}>
|
|
2
2
|
|
|
3
3
|
<react_native_1.View style={reduxDetailStyles.infoBar}>
|
|
4
4
|
<react_native_1.View style={reduxDetailStyles.infoTopRow}>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</react_native_1.Text>
|
|
10
10
|
</react_native_1.View>
|
|
11
11
|
<react_native_1.Text style={reduxDetailStyles.sliceNameText}numberOfLines={1}>
|
|
12
|
-
{
|
|
12
|
+
{o}
|
|
13
13
|
</react_native_1.Text>
|
|
14
14
|
{_?<react_native_1.View style={reduxDetailStyles.persistedChip}>
|
|
15
15
|
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.emerald700}size={10}/>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</react_native_1.View>
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
<CopyButton_1.default value={()=>y==="live"?a:
|
|
33
|
+
<CopyButton_1.default value={()=>y==="live"?a:b}label={e("redux.sliceJson","Slice JSON")}/>
|
|
34
34
|
</react_native_1.View>
|
|
35
35
|
|
|
36
36
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
{e("redux.timeline","Timeline")}:
|
|
59
59
|
</react_native_1.Text>
|
|
60
60
|
<react_native_1.Text style={[reduxDetailStyles.statValue,{color:AppColors_1.AppColors.brandPurple}]}>
|
|
61
|
-
{
|
|
61
|
+
{x.length}
|
|
62
62
|
</react_native_1.Text>
|
|
63
63
|
</react_native_1.View>
|
|
64
64
|
{c&&<react_native_1.View style={[reduxDetailStyles.statPill,{backgroundColor:AppColors_1.AppColors.amber100,borderColor:AppColors_1.AppColors.amber200,flexShrink:1,maxWidth:160}]}>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
</react_native_1.View>
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
<SegmentedTabs_1.default tabs={n}activeKey={y}onChange={
|
|
76
|
+
<SegmentedTabs_1.default tabs={n}activeKey={y}onChange={r=>V(r)}style={{marginTop:10}}/>
|
|
77
77
|
</react_native_1.View>
|
|
78
78
|
|
|
79
79
|
|
|
@@ -92,47 +92,47 @@
|
|
|
92
92
|
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
93
93
|
{d.trim()?"No actions matching your search query.":"No dispatched actions recorded for this slice yet."}
|
|
94
94
|
</react_native_1.Text>
|
|
95
|
-
</react_native_1.View>:I.map((
|
|
96
|
-
<TouchableScale_1.default onPress={()=>W(C?null:
|
|
95
|
+
</react_native_1.View>:I.map((r,s)=>{const C=P===r.id,f=getOriginBadge(r.originType),D=r.callerFile?r.callerFile.split("/").pop():null;return<AnimatedEntrance_1.default key={r.id}index={s}distance={6}>
|
|
96
|
+
<TouchableScale_1.default onPress={()=>W(C?null:r.id)}style={reduxDetailStyles.timelineCard}>
|
|
97
97
|
<react_native_1.View style={reduxDetailStyles.timelineHeader}>
|
|
98
98
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6,flex:1,minWidth:0,flexWrap:"wrap"}}>
|
|
99
99
|
<react_native_1.View style={reduxDetailStyles.actionBadge}>
|
|
100
100
|
<react_native_1.Text style={reduxDetailStyles.actionBadgeText}>
|
|
101
|
-
#{
|
|
101
|
+
#{r.id}
|
|
102
102
|
</react_native_1.Text>
|
|
103
103
|
</react_native_1.View>
|
|
104
104
|
|
|
105
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:
|
|
106
|
-
{
|
|
107
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:
|
|
108
|
-
{
|
|
105
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:f.bg,paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:f.border}}>
|
|
106
|
+
{f.renderIcon(f.text,8.5)}
|
|
107
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:f.text,letterSpacing:.3}}>
|
|
108
|
+
{f.label}
|
|
109
109
|
</react_native_1.Text>
|
|
110
110
|
</react_native_1.View>
|
|
111
111
|
|
|
112
|
-
<HighlightText_1.default text={
|
|
112
|
+
<HighlightText_1.default text={r.type}search={d}style={reduxDetailStyles.actionTitle}highlightStyle={reduxDetailStyles.highlight}/>
|
|
113
113
|
</react_native_1.View>
|
|
114
114
|
|
|
115
115
|
<react_native_1.View style={reduxDetailStyles.timePill}>
|
|
116
116
|
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.purple}size={10}/>
|
|
117
117
|
<react_native_1.Text style={reduxDetailStyles.timeText}>
|
|
118
|
-
{
|
|
118
|
+
{r.timestamp}
|
|
119
119
|
</react_native_1.Text>
|
|
120
120
|
</react_native_1.View>
|
|
121
121
|
</react_native_1.View>
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
{
|
|
124
|
+
{r.callerFile&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:6,marginBottom:2,paddingHorizontal:8,paddingVertical:4,backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}}>
|
|
125
125
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0}}>
|
|
126
126
|
<NetworkIcons_1.DocIcon color={AppColors_1.AppColors.sky600}size={10}/>
|
|
127
127
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak}}>
|
|
128
128
|
{e("redux.triggeredFrom","Triggered From:")}
|
|
129
129
|
</react_native_1.Text>
|
|
130
130
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.sky600}}numberOfLines={1}>
|
|
131
|
-
{D}:{
|
|
131
|
+
{D}:{r.callerLine||1}
|
|
132
132
|
</react_native_1.Text>
|
|
133
133
|
</react_native_1.View>
|
|
134
134
|
|
|
135
|
-
<react_native_1.Pressable onPress={()=>(0,helpers_1.openInVSCode)(
|
|
135
|
+
<react_native_1.Pressable onPress={()=>(0,helpers_1.openInVSCode)(r.callerFile,r.callerLine,r.callerCol)}hitSlop={8}style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.sky100,paddingHorizontal:5,paddingVertical:2,borderRadius:4}}>
|
|
136
136
|
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600}size={9}/>
|
|
137
137
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.sky600}}>
|
|
138
138
|
{e("redux.openInEditor","Open in Editor")}
|
|
@@ -143,12 +143,12 @@
|
|
|
143
143
|
|
|
144
144
|
{C?<react_native_1.View style={reduxDetailStyles.expandedContent}>
|
|
145
145
|
|
|
146
|
-
{
|
|
146
|
+
{r.stack?<react_native_1.View style={{marginBottom:12}}>
|
|
147
147
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
148
148
|
{e("redux.callStack","Call Stack Trace")}:
|
|
149
149
|
</react_native_1.Text>
|
|
150
150
|
<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,padding:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,gap:4}}>
|
|
151
|
-
{
|
|
151
|
+
{r.stack.split(`
|
|
152
152
|
`).map(m=>m.trim()).filter(m=>m.length>0&&!m.includes("reduxLogger")&&!m.includes("inspectorReduxMiddleware")).slice(0,8).map((m,v)=>{const u=(0,helpers_1.parseStackLine)(m,v===0),w=u.frameType==="app";return<react_native_1.Pressable key={v}onPress={()=>{u.fileName!=="Unknown"&&(0,helpers_1.openInVSCode)(u.fullPath||u.fileName,u.lineNumber,u.columnNumber)}}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:3,borderBottomWidth:v<7?.5:0,borderBottomColor:AppColors_1.AppColors.dividerColor}}>
|
|
153
153
|
<react_native_1.View style={{flex:1,minWidth:0}}>
|
|
154
154
|
<react_native_1.Text style={{fontFamily:w?AppFonts_1.AppFonts.interBold:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:w?AppColors_1.AppColors.primaryBlack:AppColors_1.AppColors.grayTextWeak}}numberOfLines={1}>
|
|
@@ -165,17 +165,17 @@
|
|
|
165
165
|
</react_native_1.View>
|
|
166
166
|
</react_native_1.View>:null}
|
|
167
167
|
|
|
168
|
-
{
|
|
168
|
+
{r.payload!==void 0&&<react_native_1.View style={{marginBottom:12}}>
|
|
169
169
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
170
170
|
{e("redux.actionPayload","Action Payload:")}
|
|
171
171
|
</react_native_1.Text>
|
|
172
|
-
<JsonViewer_1.default data={
|
|
172
|
+
<JsonViewer_1.default data={r.payload}search={d}forceOpen={!0}wrap={!0}/>
|
|
173
173
|
</react_native_1.View>}
|
|
174
174
|
|
|
175
175
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
176
176
|
{e("redux.stateChangesDiff","State Changes (Diff):")}
|
|
177
177
|
</react_native_1.Text>
|
|
178
|
-
<DiffViewer_1.default oldData={
|
|
178
|
+
<DiffViewer_1.default oldData={r.prevState?.[o]||{}}newData={r.nextState?.[o]||{}}forceOpen={!0}/>
|
|
179
179
|
</react_native_1.View>:<react_native_1.View style={reduxDetailStyles.collapsedPrompt}>
|
|
180
180
|
<react_native_1.Text style={reduxDetailStyles.collapsedPromptText}>
|
|
181
181
|
{e("redux.tapToInspectAction","Tap to inspect action payload & diff changes")}
|
|
@@ -186,10 +186,10 @@
|
|
|
186
186
|
</AnimatedEntrance_1.default>})}
|
|
187
187
|
</react_native_1.ScrollView>:y==="metadata"?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
188
188
|
<react_native_1.View style={reduxDetailStyles.metadataCard}>
|
|
189
|
-
{[{label:"Slice Name",value:
|
|
190
|
-
<react_native_1.Text style={reduxDetailStyles.metaLabel}>{
|
|
189
|
+
{[{label:"Slice Name",value:o},{label:"Root Keys Count",value:`${p} keys`},{label:"In-Memory State Size",value:(0,helpers_1.getSize)(a)},{label:"Persistence Status",value:_?`Persisted (${(0,helpers_1.getSize)(b)})`:"Not Persisted (In-Memory)"},{label:"Dispatched Actions History",value:`${x.length} recorded actions`},{label:"Last Dispatched Action",value:c?c.type:"None"},{label:"Last Action Timestamp",value:c?c.timestamp:"Initial"}].map((r,s)=><react_native_1.View key={s}style={[reduxDetailStyles.metaRow,s===6&&{borderBottomWidth:0}]}>
|
|
190
|
+
<react_native_1.Text style={reduxDetailStyles.metaLabel}>{r.label}</react_native_1.Text>
|
|
191
191
|
<react_native_1.Text style={reduxDetailStyles.metaValue}selectable numberOfLines={2}>
|
|
192
|
-
{
|
|
192
|
+
{r.value}
|
|
193
193
|
</react_native_1.Text>
|
|
194
194
|
</react_native_1.View>)}
|
|
195
195
|
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
208
208
|
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.emerald700}size={14}/>
|
|
209
209
|
<react_native_1.Text style={reduxDetailStyles.persistedInfoTitle}>
|
|
210
|
-
Stored in persistent storage ({(0,helpers_1.getSize)(
|
|
210
|
+
Stored in persistent storage ({(0,helpers_1.getSize)(b)})
|
|
211
211
|
</react_native_1.Text>
|
|
212
212
|
</react_native_1.View>
|
|
213
213
|
<react_native_1.TouchableOpacity style={reduxDetailStyles.clearPersistMiniBtn}onPress={z}>
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
</react_native_1.View>
|
|
220
220
|
</react_native_1.View>
|
|
221
221
|
<react_native_1.View style={{flex:1,marginTop:8}}>
|
|
222
|
-
<JsonViewer_1.default data={
|
|
222
|
+
<JsonViewer_1.default data={b}search={d}forceOpen={d.length>0?!0:void 0}mode={k}onModeChange={B}fullHeight={!0}wrap={!0}/>
|
|
223
223
|
</react_native_1.View>
|
|
224
224
|
</react_native_1.View>:<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
225
225
|
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.grayTextWeak}size={32}/>
|
|
@@ -311,25 +311,25 @@
|
|
|
311
311
|
</react_native_1.View>}
|
|
312
312
|
|
|
313
313
|
|
|
314
|
-
<SegmentedTabs_1.default tabs={c}activeKey={
|
|
314
|
+
<SegmentedTabs_1.default tabs={c}activeKey={T}onChange={n=>F(n)}style={{marginTop:10}}/>
|
|
315
315
|
</react_native_1.View>
|
|
316
316
|
|
|
317
317
|
|
|
318
|
-
{
|
|
318
|
+
{T==="payload"?<react_native_1.View style={{flex:1,padding:10}}>
|
|
319
319
|
{t.payload!==void 0?<JsonViewer_1.default data={t.payload}search={d}forceOpen={!0}fullHeight={!0}wrap={!0}/>:<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
320
320
|
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
321
321
|
This action has no payload dispatched.
|
|
322
322
|
</react_native_1.Text>
|
|
323
323
|
</react_native_1.View>}
|
|
324
|
-
</react_native_1.View>:
|
|
324
|
+
</react_native_1.View>:T==="diff"?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
325
325
|
<DiffViewer_1.default oldData={t.prevState||{}}newData={t.nextState||{}}forceOpen={!0}/>
|
|
326
|
-
</react_native_1.ScrollView>:
|
|
326
|
+
</react_native_1.ScrollView>:T==="stack"?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
327
327
|
{t.stack?<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.white,borderRadius:10,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}}>
|
|
328
328
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
329
329
|
Dispatched from call stack:
|
|
330
330
|
</react_native_1.Text>
|
|
331
331
|
{t.stack.split(`
|
|
332
|
-
`).map(n=>n.trim()).filter(n=>n.length>0&&!n.includes("reduxLogger")&&!n.includes("inspectorReduxMiddleware")).map((n,
|
|
332
|
+
`).map(n=>n.trim()).filter(n=>n.length>0&&!n.includes("reduxLogger")&&!n.includes("inspectorReduxMiddleware")).map((n,r)=>{const s=(0,helpers_1.parseStackLine)(n,r===0),C=s.frameType==="app";return<react_native_1.Pressable key={r}onPress={()=>{s.fileName!=="Unknown"&&(0,helpers_1.openInVSCode)(s.fullPath||s.fileName,s.lineNumber,s.columnNumber)}}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:5,borderBottomWidth:.5,borderBottomColor:AppColors_1.AppColors.dividerColor}}>
|
|
333
333
|
<react_native_1.View style={{flex:1,minWidth:0}}>
|
|
334
334
|
<react_native_1.Text style={{fontFamily:C?AppFonts_1.AppFonts.interBold:AppFonts_1.AppFonts.interRegular,fontSize:10.5,color:C?AppColors_1.AppColors.primaryBlack:AppColors_1.AppColors.grayTextWeak}}numberOfLines={1}>
|
|
335
335
|
{s.functionName||"anonymous"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,t,a,r){r===void 0&&(r=a);var n=Object.getOwnPropertyDescriptor(t,a);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(i,r,n)}):(function(i,t,a,r){r===void 0&&(r=a),i[r]=t[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(i,t){Object.defineProperty(i,"default",{enumerable:!0,value:t})}):function(i,t){i.default=t}),__importStar=this&&this.__importStar||(function(){var i=function(t){return i=Object.getOwnPropertyNames||function(a){var r=[];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(r[r.length]=n);return r},i(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null)for(var r=i(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(a,t,r[n]);return __setModuleDefault(a,t),a}})(),__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),EmptyState_1=__importDefault(require("../EmptyState")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),HighlightText_1=__importDefault(require("../HighlightText")),helpers_1=require("../../helpers"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),reduxLogger_1=require("../../customHooks/reduxLogger"),NetworkIcons_1=require("../NetworkIcons"),getOriginBadge=i=>{switch(i){case"saga":return{label:"SAGA",renderIcon:(t,a=9)=><NetworkIcons_1.BoltIcon color={t}size={a}/>,bg:AppColors_1.AppColors.purple100,text:AppColors_1.AppColors.brandPurple,border:AppColors_1.AppColors.purple200};case"thunk":return{label:"THUNK",renderIcon:(t,a=9)=><NetworkIcons_1.AtomIcon color={t}size={a}/>,bg:AppColors_1.AppColors.amber100,text:AppColors_1.AppColors.amber800Warm,border:AppColors_1.AppColors.amber200};case"ui":return{label:"UI",renderIcon:(t,a=9)=><NetworkIcons_1.ScreenIcon color={t}size={a}/>,bg:AppColors_1.AppColors.sky100,text:AppColors_1.AppColors.sky600,border:AppColors_1.AppColors.sky400};case"listener":return{label:"LISTENER",renderIcon:(t,a=9)=><NetworkIcons_1.ListenerIcon color={t}size={a}/>,bg:AppColors_1.AppColors.teal100,text:AppColors_1.AppColors.teal700,border:AppColors_1.AppColors.teal400};default:return{label:"DIRECT",renderIcon:(t,a=9)=><NetworkIcons_1.BoltIcon color={t}size={a}/>,bg:AppColors_1.AppColors.slate100,text:AppColors_1.AppColors.slate700,border:AppColors_1.AppColors.slate200}}},DEFAULT_PAGE_SIZE=50,LOAD_MORE_STEP=10,ReduxTab=react_1.default.memo(()=>{const{t:i}=(0,i18n_1.useTranslation)(),{reduxState:t,reduxLastActionMap:a,reduxSearch:r,setReduxSearch:n,setSelectedReduxSlice:b}=(0,InspectorContext_1.useInspector)(),x=(0,react_1.useRef)(null),[T,m]=(0,react_1.useState)(DEFAULT_PAGE_SIZE),[u,I]=(0,react_1.useState)("latest");react_1.default.useEffect(()=>{m(DEFAULT_PAGE_SIZE),x.current?.scrollToOffset({offset:0,animated:!1})},[r,u]);const R=(0,react_1.useMemo)(()=>(0,helpers_1.getSize)(t),[t]),v=(0,react_1.useMemo)(()=>(0,reduxLogger_1.getActionHistory)(),[a]),
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,t,a,r){r===void 0&&(r=a);var n=Object.getOwnPropertyDescriptor(t,a);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(i,r,n)}):(function(i,t,a,r){r===void 0&&(r=a),i[r]=t[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(i,t){Object.defineProperty(i,"default",{enumerable:!0,value:t})}):function(i,t){i.default=t}),__importStar=this&&this.__importStar||(function(){var i=function(t){return i=Object.getOwnPropertyNames||function(a){var r=[];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(r[r.length]=n);return r},i(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null)for(var r=i(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(a,t,r[n]);return __setModuleDefault(a,t),a}})(),__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),EmptyState_1=__importDefault(require("../EmptyState")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),HighlightText_1=__importDefault(require("../HighlightText")),helpers_1=require("../../helpers"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),reduxLogger_1=require("../../customHooks/reduxLogger"),NetworkIcons_1=require("../NetworkIcons"),getOriginBadge=i=>{switch(i){case"saga":return{label:"SAGA",renderIcon:(t,a=9)=><NetworkIcons_1.BoltIcon color={t}size={a}/>,bg:AppColors_1.AppColors.purple100,text:AppColors_1.AppColors.brandPurple,border:AppColors_1.AppColors.purple200};case"thunk":return{label:"THUNK",renderIcon:(t,a=9)=><NetworkIcons_1.AtomIcon color={t}size={a}/>,bg:AppColors_1.AppColors.amber100,text:AppColors_1.AppColors.amber800Warm,border:AppColors_1.AppColors.amber200};case"ui":return{label:"UI",renderIcon:(t,a=9)=><NetworkIcons_1.ScreenIcon color={t}size={a}/>,bg:AppColors_1.AppColors.sky100,text:AppColors_1.AppColors.sky600,border:AppColors_1.AppColors.sky400};case"listener":return{label:"LISTENER",renderIcon:(t,a=9)=><NetworkIcons_1.ListenerIcon color={t}size={a}/>,bg:AppColors_1.AppColors.teal100,text:AppColors_1.AppColors.teal700,border:AppColors_1.AppColors.teal400};default:return{label:"DIRECT",renderIcon:(t,a=9)=><NetworkIcons_1.BoltIcon color={t}size={a}/>,bg:AppColors_1.AppColors.slate100,text:AppColors_1.AppColors.slate700,border:AppColors_1.AppColors.slate200}}},DEFAULT_PAGE_SIZE=50,LOAD_MORE_STEP=10,ReduxTab=react_1.default.memo(()=>{const{t:i}=(0,i18n_1.useTranslation)(),{reduxState:t,reduxLastActionMap:a,reduxSearch:r,setReduxSearch:n,setSelectedReduxSlice:b}=(0,InspectorContext_1.useInspector)(),x=(0,react_1.useRef)(null),[T,m]=(0,react_1.useState)(DEFAULT_PAGE_SIZE),[u,I]=(0,react_1.useState)("latest");react_1.default.useEffect(()=>{m(DEFAULT_PAGE_SIZE),x.current?.scrollToOffset({offset:0,animated:!1})},[r,u]);const R=(0,react_1.useMemo)(()=>(0,helpers_1.getSize)(t),[t]),v=(0,react_1.useMemo)(()=>(0,reduxLogger_1.getActionHistory)(),[a]),A=(0,react_1.useMemo)(()=>!t||typeof t!="object"?[]:Object.keys(t).map(l=>{const o=t[l],p=Array.isArray(o),w=o&&typeof o=="object";let g="Primitive",d=0;p?(d=o.length,g=`Array [${d}]`):w?(d=Object.keys(o).length,g=`Object {${d}}`):typeof o<"u"&&(d=1,g=typeof o);let f="live",c;w&&(o.loading===!0||o.isLoading===!0||o.status==="loading"||o.status==="pending"?(f="loading",c="Loading"):o.error||o.hasError||o.status==="error"||o.status==="failed"?(f="error",c=typeof o.error=="string"?o.error:"Error"):d===0&&(f="empty",c="Empty"));const s=a[l],B=s?.updatedAt||0,F=v.filter(C=>!C.affectedSlices||C.affectedSlices.length===0?!0:C.affectedSlices.includes(l)).length;let S;if(s){let C;if(s.payload!==void 0&&s.payload!==null)try{if(typeof s.payload=="object"){const V=Object.keys(s.payload);C=`{ ${V.slice(0,3).join(", ")}${V.length>3?"...":""} }`}else C=String(s.payload)}catch{}S={type:s.type,timestamp:s.timestamp,updatedAt:s.updatedAt,payloadPreview:C,originType:s.originType,callerFile:s.callerFile,callerLine:s.callerLine,callerCol:s.callerCol}}return{id:`slice-${l}`,name:l,keysCount:d,sizeStr:(0,helpers_1.getSize)(o),typeLabel:g,status:f,statusMessage:c,timelineCount:F,lastAction:S,updatedAt:B}}),[t,a,v]),y=(0,react_1.useMemo)(()=>{let e=A;if(r&&r.trim().length>0){const l=r.trim().toLowerCase().split(/\s+/).filter(Boolean);e=e.filter(o=>{const p=t?t[o.name]:null,w=[o.name||"",o.lastAction?.type||"",o.lastAction?.payloadPreview||"",o.lastAction?.originType||"",o.status||"",o.statusMessage||"",p?typeof p=="string"?p:JSON.stringify(p):""].join(" ").toLowerCase();return l.every(g=>w.includes(g))})}return[...e].sort((l,o)=>u==="latest"&&o.updatedAt!==l.updatedAt?o.updatedAt-l.updatedAt:l.name.localeCompare(o.name))},[A,r,u,t]),_=(0,react_1.useMemo)(()=>y.slice(0,T),[y,T]),h=(0,react_1.useMemo)(()=>{const e=Object.values(a);return e.length===0?null:e.reduce((l,o)=>l?(o.updatedAt||0)>(l.updatedAt||0)?o:l:o,null)},[a]),z=(0,react_1.useCallback)(({item:e,index:l})=>{const o=e.updatedAt>0&&Date.now()-e.updatedAt<5e3,p=e.status==="error"?AppColors_1.AppColors.errorColor:e.status==="loading"?AppColors_1.AppColors.warningIconGold:e.status==="empty"?AppColors_1.AppColors.grayTextWeak:AppColors_1.AppColors.greenColor,w=e.status==="error"?AppColors_1.AppColors.red100:e.status==="loading"?AppColors_1.AppColors.amber100:e.status==="empty"?AppColors_1.AppColors.grayBackground:AppColors_1.AppColors.emeraldBg,g=e.status==="error"?AppColors_1.AppColors.errorBorder:e.status==="loading"?AppColors_1.AppColors.amber200:e.status==="empty"?AppColors_1.AppColors.dividerColor:AppColors_1.AppColors.emeraldBorder,d=e.status==="error"?AppColors_1.AppColors.red600:e.status==="loading"?AppColors_1.AppColors.amber800Warm:e.status==="empty"?AppColors_1.AppColors.grayTextWeak:AppColors_1.AppColors.emerald700,f=e.lastAction?.callerFile?(0,helpers_1.getCleanCallerDisplay)(e.lastAction.callerFile):null;return<AnimatedEntrance_1.default index={l}distance={8}>
|
|
2
2
|
<react_native_1.View style={reduxTabStyles.cardContainer}>
|
|
3
3
|
<TouchableScale_1.default onPress={()=>{b(e.name)}}style={[reduxTabStyles.card,{borderLeftWidth:3.5,borderLeftColor:p,backgroundColor:e.status==="error"?AppColors_1.AppColors.errorCardBg:AppColors_1.AppColors.white},o&&reduxTabStyles.cardRecentlyUpdated]}>
|
|
4
4
|
<react_native_1.View style={reduxTabStyles.cardBody}>
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<react_native_1.View style={reduxTabStyles.cardHeaderLeft}>
|
|
8
8
|
<react_native_1.Text style={reduxTabStyles.serialNumber}>#{l+1}</react_native_1.Text>
|
|
9
9
|
<react_native_1.View style={[reduxTabStyles.methodBadge,{backgroundColor:AppColors_1.AppColors.violet600}]}>
|
|
10
|
-
<react_native_1.Text style={reduxTabStyles.methodBadgeText}>
|
|
10
|
+
<react_native_1.Text style={reduxTabStyles.methodBadgeText}>
|
|
11
|
+
{i("redux.title","REDUX").toUpperCase()}
|
|
12
|
+
</react_native_1.Text>
|
|
11
13
|
</react_native_1.View>
|
|
12
14
|
<react_native_1.View style={[reduxTabStyles.chip,{backgroundColor:`${AppColors_1.AppColors.violet600}14`,borderColor:`${AppColors_1.AppColors.violet600}2E`}]}>
|
|
13
15
|
<react_native_1.Text style={[reduxTabStyles.chipText,{color:AppColors_1.AppColors.violet600}]}>
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
</react_native_1.View>
|
|
25
27
|
|
|
26
28
|
<react_native_1.View style={reduxTabStyles.cardHeaderRight}>
|
|
27
|
-
<react_native_1.View style={[reduxTabStyles.statusPill,{backgroundColor:
|
|
29
|
+
<react_native_1.View style={[reduxTabStyles.statusPill,{backgroundColor:w,borderColor:g}]}>
|
|
28
30
|
{e.status==="loading"?<NetworkIcons_1.LoadingSpinnerIcon color={AppColors_1.AppColors.amber800Warm}size={10}/>:e.status==="error"?<NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.red600}size={10}/>:e.status==="empty"?null:<react_native_1.View style={reduxTabStyles.liveDot}/>}
|
|
29
31
|
<react_native_1.Text style={[reduxTabStyles.statusPillText,{color:d}]}>
|
|
30
32
|
{e.status==="loading"?"Loading":e.status==="error"?e.statusMessage||"Error":e.status==="empty"?"Empty":"Live"}
|
|
@@ -96,7 +98,7 @@
|
|
|
96
98
|
<react_native_1.View style={reduxTabStyles.overviewCard}>
|
|
97
99
|
<react_native_1.View style={reduxTabStyles.statCol}>
|
|
98
100
|
<react_native_1.Text style={reduxTabStyles.statHeading}>{i("redux.activeSlices","ACTIVE SLICES")}</react_native_1.Text>
|
|
99
|
-
<react_native_1.Text style={reduxTabStyles.statBigVal}>{
|
|
101
|
+
<react_native_1.Text style={reduxTabStyles.statBigVal}>{A.length}</react_native_1.Text>
|
|
100
102
|
</react_native_1.View>
|
|
101
103
|
<react_native_1.View style={reduxTabStyles.statDivider}/>
|
|
102
104
|
<react_native_1.View style={reduxTabStyles.statCol}>
|
|
@@ -132,7 +134,7 @@
|
|
|
132
134
|
{r.length>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
133
135
|
<react_native_1.View style={{backgroundColor:`${AppColors_1.AppColors.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
134
136
|
<react_native_1.Text style={{color:AppColors_1.AppColors.purple,fontSize:9.5,fontFamily:AppFonts_1.AppFonts.interBold}}>
|
|
135
|
-
{
|
|
137
|
+
{y.length}
|
|
136
138
|
</react_native_1.Text>
|
|
137
139
|
</react_native_1.View>
|
|
138
140
|
<react_native_1.Pressable accessible={!0}accessibilityRole="button"accessibilityLabel="Clear search input"onPress={()=>n("")}hitSlop={10}>
|
|
@@ -149,7 +151,7 @@
|
|
|
149
151
|
|
|
150
152
|
<react_native_1.View style={reduxTabStyles.headerSubRow}>
|
|
151
153
|
<react_native_1.Text style={reduxTabStyles.resultCount}>
|
|
152
|
-
Showing {
|
|
154
|
+
Showing {y.length} of {A.length} state slices
|
|
153
155
|
</react_native_1.Text>
|
|
154
156
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
155
157
|
{u==="latest"?<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.brandPurple}size={11}/>:<NetworkIcons_1.TextAaIcon color={AppColors_1.AppColors.brandPurple}size={11}/>}
|
|
@@ -161,7 +163,7 @@
|
|
|
161
163
|
</react_native_1.View>
|
|
162
164
|
|
|
163
165
|
|
|
164
|
-
<react_native_1.FlatList ref={x}data={_}keyExtractor={e=>e.id}renderItem={z}getItemLayout={(e,l)=>({length:126,offset:126*l,index:l})}initialNumToRender={
|
|
166
|
+
<react_native_1.FlatList ref={x}data={_}keyExtractor={e=>e.id}renderItem={z}getItemLayout={(e,l)=>({length:126,offset:126*l,index:l})}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<EmptyState_1.default isSearch={r.trim().length>0}searchQuery={r}onClearSearch={()=>n("")}customTitle={r.trim().length>0?"No Matching Slices":"No Redux State Detected"}customSub={r.trim().length>0?`No Redux slices match "${r}"`:"Attach the Redux store or dispatch actions to see state slices."}/>}ListFooterComponent={y.length>0?<EndOfListFooter_1.default count={_.length}totalCount={y.length}label="slices"loadMoreStep={LOAD_MORE_STEP}hasMore={_.length<y.length}onLoadMore={()=>m(e=>e+LOAD_MORE_STEP)}/>:null}style={{flex:1}}contentContainerStyle={[reduxTabStyles.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
165
167
|
</react_native_1.View>:<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
166
168
|
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
167
169
|
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple}size={32}/>
|
|
@@ -170,4 +172,4 @@
|
|
|
170
172
|
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
171
173
|
{i("redux.connectStoreTip","Call connectReduxStore(store) or use inspectorReduxMiddleware at app initialization.")}
|
|
172
174
|
</react_native_1.Text>
|
|
173
|
-
</react_native_1.View>}),reduxTabStyles=react_native_1.StyleSheet.create({overviewCard:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,marginHorizontal:
|
|
175
|
+
</react_native_1.View>}),reduxTabStyles=react_native_1.StyleSheet.create({overviewCard:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,marginHorizontal:8,marginTop:8,borderRadius:12,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,shadowColor:AppColors_1.AppColors.primaryBlack,shadowOffset:{width:0,height:1},shadowOpacity:.03,shadowRadius:3,elevation:1},statCol:{flex:1},statDivider:{width:1,height:28,backgroundColor:AppColors_1.AppColors.dividerColor,marginHorizontal:6},statHeading:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.5},statBigVal:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack,marginTop:2},statLastAction:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.purple,marginTop:2},statLastTime:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak},toolbarContainer:{backgroundColor:AppColors_1.AppColors.white,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingHorizontal:8,paddingTop:8,paddingBottom:6,marginTop:8},searchRow:{flexDirection:"row",alignItems:"center",gap:8},headerSubRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:6,paddingHorizontal:2},resultCount:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayTextWeak},sortLabel:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,color:AppColors_1.AppColors.brandPurple},listContent:{paddingVertical:8,paddingBottom:36},cardContainer:{paddingHorizontal:5,paddingVertical:4,height:126},card:{backgroundColor:AppColors_1.AppColors.white,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,shadowColor:AppColors_1.AppColors.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:2.5,elevation:1.5,height:118,overflow:"hidden"},cardRecentlyUpdated:{borderColor:`${AppColors_1.AppColors.brandPurple}66`,backgroundColor:AppColors_1.AppColors.purpleTintBg},cardBody:{paddingHorizontal:8,paddingTop:8,paddingBottom:6,flex:1,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22,gap:4.5},cardHeaderLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},serialNumber:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,lineHeight:13,color:AppColors_1.AppColors.grayTextWeak},methodBadge:{paddingHorizontal:5.5,paddingVertical:2,borderRadius:4,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.white,fontSize:9,lineHeight:12,letterSpacing:.4},chip:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,lineHeight:11,letterSpacing:.3},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},liveDot:{width:6,height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.emerald500},statusPillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12},cardMainRow:{height:48,minHeight:48,maxHeight:48,justifyContent:"space-between",gap:3},sliceNameRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6},sliceNameText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,lineHeight:16,color:AppColors_1.AppColors.primaryBlack,flex:1},actionCountChip:{flexDirection:"row",alignItems:"center",gap:2.5,backgroundColor:`${AppColors_1.AppColors.violet600}14`,borderColor:`${AppColors_1.AppColors.violet600}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},actionCountChipText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,lineHeight:11,color:AppColors_1.AppColors.violet600},actionPreviewRow:{flexDirection:"row",alignItems:"center",gap:4.5,minHeight:15},actionPreviewText:{fontFamily:react_native_1.Platform.select({ios:"Menlo",default:"monospace"}),fontSize:10,lineHeight:13,color:AppColors_1.AppColors.grayTextWeak,flex:1},actionPreviewEmptyText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:13,color:AppColors_1.AppColors.slate400,fontStyle:"italic",flex:1},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:6},footerLeft:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:0},footerTimestampText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:13,color:AppColors_1.AppColors.slate400},callerChip:{flexDirection:"row",alignItems:"center",gap:2.5,backgroundColor:AppColors_1.AppColors.sky100,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3,borderWidth:.5,borderColor:AppColors_1.AppColors.sky400,marginLeft:4},callerChipText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:8.5,lineHeight:11,color:AppColors_1.AppColors.sky600},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.violetSoftBg,borderColor:AppColors_1.AppColors.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:AppColors_1.AppColors.graySurface,borderRadius:1.5,overflow:"hidden"},waterfallBar:{height:"100%",borderRadius:1.5},highlight:{backgroundColor:AppColors_1.AppColors.yellowHighlight,color:AppColors_1.AppColors.primaryBlack,borderRadius:2}});exports.default=ReduxTab;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,e,o,t){t===void 0&&(t=o);var n=Object.getOwnPropertyDescriptor(e,o);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(r,t,n)}):(function(r,e,o,t){t===void 0&&(t=o),r[t]=e[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),__importStar=this&&this.__importStar||(function(){var r=function(e){return r=Object.getOwnPropertyNames||function(o){var t=[];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[t.length]=n);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var o={};if(e!=null)for(var t=r(e),n=0;n<t.length;n++)t[n]!=="default"&&__createBinding(o,e,t[n]);return __setModuleDefault(o,e),o}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SecondaryTelemetryStrip=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_linear_gradient_1=__importDefault(require("react-native-linear-gradient")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),NetworkIcons_1=require("../NetworkIcons"),NativeInspector_1=require("../../native/NativeInspector"),networkLogger_1=require("../../customHooks/networkLogger"),InspectorContext_1=require("./InspectorContext"),i18n_1=require("../../i18n"),SecondaryTelemetryStrip=()=>{const{t:r}=(0,i18n_1.useTranslation)(),{switchActiveTab:e,peekMode:o}=(0,InspectorContext_1.useInspector)(),[t,n]=(0,react_1.useState)(60),[a,I]=(0,react_1.useState)(null),[f,y]=(0,react_1.useState)(0),g=(0,react_1.useRef)(0),S=(0,react_1.useRef)(Date.now());(0,react_1.useEffect)(()=>{let i;const c=()=>{g.current++;const l=Date.now(),u=l-S.current;if(u>=1e3){const h=Math.min(60,Math.round(g.current*1e3/u));n(h),g.current=0,S.current=l}i=requestAnimationFrame(c)};return i=requestAnimationFrame(c),()=>cancelAnimationFrame(i)},[]);const p=(0,react_1.useRef)(0),v=(0,react_1.useRef)(Date.now());(0,react_1.useEffect)(()=>{const i=(0,networkLogger_1.subscribeNetworkLogs)(l=>{if(!l||l.length===0){y(0);return}const u=Date.now(),h=l.slice(0,10);let w=0,A=0,_=0;for(const s of h){let B=0,F=0;s.request&&(B=typeof s.request=="string"?s.request.length:JSON.stringify(s.request).length),s.response&&(F=typeof s.response=="string"?s.response.length:JSON.stringify(s.response).length);const m=B+F;if(m>0&&s.duration&&s.duration>0){const x=m*8/(s.duration/1e3)/1e3;x>0&&_===0&&(_=x),w+=m,A+=s.duration}}let d=0;A>0&&w>0?d=w*8/(A/1e3)/1e3:_>0&&(d=_),d>0?(p.current=d,v.current=u,y(Math.round(d*10)/10)):p.current>0&&u-v.current<12e3&&y(Math.round(p.current*10)/10)}),c=setInterval(()=>{Date.now()-v.current>15e3&&p.current>0&&(p.current=0,y(0))},3e3);return()=>{i(),clearInterval(c)}},[]),(0,react_1.useEffect)(()=>{let i=!0;const c=async()=>{try{const u=await(0,NativeInspector_1.getNativeDeviceMetrics)();i&&u&&I(u)}catch{}};c();const l=setInterval(c,4e3);return()=>{i=!1,clearInterval(l)}},[]);const M=t>=55?AppColors_1.AppColors.emerald400:t>=30?AppColors_1.AppColors.amber400:AppColors_1.AppColors.rose400,C=(0,react_1.useMemo)(()=>{if(a?.usedRAM&&a?.totalRAM){const i=(a.usedRAM/1073741824).toFixed(2),c=(a.totalRAM/(1024*1024*1024)).toFixed(1);return`${i} / ${c} GB RAM`}return a?.residentMemory?`${(a.residentMemory/1073741824).toFixed(2)} GB RAM`:a?.usedRAM?`${(a.usedRAM/1073741824).toFixed(2)} GB RAM`:null},[a]),b=a?.batteryPercent,T=a?.isCharging;return<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.telemetrySubHeaderGradStart||"#0B0F1C",AppColors_1.AppColors.telemetrySubHeaderGradMid||"#111524",AppColors_1.AppColors.telemetrySubHeaderGradEnd||"#0B0F1C"]}start={{x:0,y:0}}end={{x:1,y:0}}style={stripStyles.container}>
|
|
2
|
+
<react_native_1.TouchableOpacity activeOpacity={.8}onPress={()=>e?.("device")}style={stripStyles.inner}>
|
|
3
|
+
|
|
4
|
+
<react_native_1.View style={stripStyles.item}>
|
|
5
|
+
<NetworkIcons_1.ActivityIcon size={11.5}color={M}/>
|
|
6
|
+
<react_native_1.Text style={[stripStyles.label,{color:M,fontFamily:AppFonts_1.AppFonts.interBold}]}>
|
|
7
|
+
{t} {r("telemetry.fps","FPS")}
|
|
8
|
+
</react_native_1.Text>
|
|
9
|
+
</react_native_1.View>
|
|
10
|
+
|
|
11
|
+
<react_native_1.View style={stripStyles.divider}/>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<react_native_1.View style={stripStyles.item}>
|
|
15
|
+
<NetworkIcons_1.SpeedIcon size={11.5}color={AppColors_1.AppColors.sky300||"#7DD3FC"}/>
|
|
16
|
+
<react_native_1.Text style={[stripStyles.label,{color:AppColors_1.AppColors.sky300||"#7DD3FC"}]}>
|
|
17
|
+
{f>=1e3?`${(f/1e3).toFixed(2)} Mbps`:f>0?`${f.toFixed(1)} kbps`:"0.0 kbps"}
|
|
18
|
+
</react_native_1.Text>
|
|
19
|
+
</react_native_1.View>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
{C&&<>
|
|
23
|
+
<react_native_1.View style={stripStyles.divider}/>
|
|
24
|
+
<react_native_1.View style={stripStyles.item}>
|
|
25
|
+
<NetworkIcons_1.BoltIcon size={11}color={AppColors_1.AppColors.purple400||"#A78BFA"}/>
|
|
26
|
+
<react_native_1.Text style={[stripStyles.label,{color:AppColors_1.AppColors.purple400||"#A78BFA"}]}>
|
|
27
|
+
{C}
|
|
28
|
+
</react_native_1.Text>
|
|
29
|
+
</react_native_1.View>
|
|
30
|
+
</>}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
{b!==void 0&&b>=0&&<>
|
|
34
|
+
<react_native_1.View style={stripStyles.divider}/>
|
|
35
|
+
<react_native_1.View style={stripStyles.item}>
|
|
36
|
+
{T?<NetworkIcons_1.BatteryChargingIcon size={11.5}color={AppColors_1.AppColors.emerald400}/>:<NetworkIcons_1.BatteryFullIcon size={11.5}color={AppColors_1.AppColors.slate400}/>}
|
|
37
|
+
<react_native_1.Text style={stripStyles.label}>
|
|
38
|
+
{Math.round(b)}%
|
|
39
|
+
</react_native_1.Text>
|
|
40
|
+
</react_native_1.View>
|
|
41
|
+
</>}
|
|
42
|
+
</react_native_1.TouchableOpacity>
|
|
43
|
+
</react_native_linear_gradient_1.default>};exports.SecondaryTelemetryStrip=SecondaryTelemetryStrip;const stripStyles=react_native_1.StyleSheet.create({container:{width:"100%",borderBottomWidth:react_native_1.StyleSheet.hairlineWidth,borderBottomColor:AppColors_1.AppColors.telemetrySubHeaderBorder||"rgba(255, 255, 255, 0.07)",borderTopWidth:react_native_1.StyleSheet.hairlineWidth,borderTopColor:"rgba(0, 0, 0, 0.25)",zIndex:9},inner:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:3.5,minHeight:23},item:{flexDirection:"row",alignItems:"center",gap:4},divider:{width:1,height:10,backgroundColor:"rgba(255, 255, 255, 0.08)"},label:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:9,lineHeight:11.5,color:"rgba(255, 255, 255, 0.85)",letterSpacing:.1}});
|