redux-connected-devtools 0.0.15 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.env +2 -0
- package/.prettierrc.js +10 -0
- package/.vscode/settings.json +12 -0
- package/.vscode/tasks.json +33 -0
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/index.html +58 -0
- package/jest.config.js +8 -0
- package/package.json +47 -66
- package/public/devtools.html +8 -0
- package/public/icon.png +0 -0
- package/public/manifest.json +29 -0
- package/public/options.html +12 -0
- package/public/panel.html +39 -0
- package/public/popup.html +12 -0
- package/src/__tests__/sum.ts +9 -0
- package/src/background.ts +49 -0
- package/src/components/DevInspector/DevInspector.scss +2 -0
- package/src/components/DevInspector/DevInspector.style.tsx +8 -0
- package/src/components/DevInspector/DevInspector.tsx +34 -0
- package/src/components/DevList/DevList.scss +2 -0
- package/src/components/DevList/DevList.style.tsx +34 -0
- package/src/components/DevList/DevList.tsx +62 -0
- package/src/components/DevMenu/DevMenu.scss +2 -0
- package/src/components/DevMenu/DevMenu.style.tsx +53 -0
- package/src/components/DevMenu/DevMenu.tsx +76 -0
- package/src/components/DevPanel/DevPanel.scss +2 -0
- package/src/components/DevPanel/DevPanel.style.tsx +16 -0
- package/src/components/DevPanel/DevPanel.tsx +51 -0
- package/src/components/JourneyRow/JourneyRow.scss +2 -0
- package/src/components/JourneyRow/JourneyRow.style.tsx +46 -0
- package/src/components/JourneyRow/JourneyRow.tsx +58 -0
- package/src/components/JsonViewer/JsonViewer.scss +2 -0
- package/src/components/JsonViewer/JsonViewer.style.tsx +31 -0
- package/src/components/JsonViewer/JsonViewer.tsx +24 -0
- package/src/components/Lifecycle/Lifecycle.scss +2 -0
- package/src/components/Lifecycle/Lifecycle.style.tsx +6 -0
- package/src/components/Lifecycle/Lifecycle.tsx +31 -0
- package/src/components/LogsViewer/LogsViewer.scss +2 -0
- package/src/components/LogsViewer/LogsViewer.style.tsx +5 -0
- package/src/components/LogsViewer/LogsViewer.tsx +14 -0
- package/src/components/RequestDetails/RequestDetails.scss +2 -0
- package/src/components/RequestDetails/RequestDetails.style.tsx +20 -0
- package/src/components/RequestDetails/RequestDetails.tsx +60 -0
- package/src/components/RequestJourney/RequestJourney.scss +2 -0
- package/src/components/RequestJourney/RequestJourney.style.tsx +6 -0
- package/src/components/RequestJourney/RequestJourney.tsx +33 -0
- package/src/components/RequestRow/RequestRow.scss +2 -0
- package/src/components/RequestRow/RequestRow.style.tsx +31 -0
- package/src/components/RequestRow/RequestRow.tsx +37 -0
- package/src/components/Time/Time.scss +2 -0
- package/src/components/Time/Time.style.tsx +17 -0
- package/src/components/Time/Time.tsx +25 -0
- package/src/containers/DevMenuContainer.tsx +28 -0
- package/src/containers/DevPanelContainer.tsx +10 -0
- package/src/containers/EndpointConfigsContainer.tsx +12 -0
- package/src/containers/EndpointStatusContainer.tsx +12 -0
- package/src/containers/GlobalSettingsContainer.tsx +12 -0
- package/src/containers/GlobalStatsContainer.tsx +12 -0
- package/src/containers/LifecycleApiErrorContainer.tsx +11 -0
- package/src/containers/LifecycleGeneralErrorContainer.tsx +11 -0
- package/src/containers/LifecycleInQueueContainer.tsx +11 -0
- package/src/containers/LifecyclePendingApiContainer.tsx +11 -0
- package/src/containers/LifecyclePostActionContainer.tsx +11 -0
- package/src/containers/LifecycleReceivedContainer.tsx +11 -0
- package/src/content_script.ts +19 -0
- package/src/data/devComponents.tsx +25 -0
- package/src/data/devRoutes.ts +83 -0
- package/src/devtools.tsx +29 -0
- package/src/index.ts +1 -0
- package/src/injected_script.ts +9 -0
- package/src/options.tsx +77 -0
- package/src/panel.tsx +30 -0
- package/src/popup.tsx +63 -0
- package/src/store/initialState.ts +42 -0
- package/src/store/selectors.ts +205 -0
- package/src/sum.ts +3 -0
- package/src/types.ts +1 -0
- package/src/utils/date.ts +3 -0
- package/tsconfig.json +24 -0
- package/vite.config.ts +45 -0
- package/webpack/webpack.common.js +46 -0
- package/webpack/webpack.dev.js +7 -0
- package/webpack/webpack.prod.js +6 -0
- package/esm/components/Config/Config.d.ts +0 -6
- package/esm/components/Config/Config.js +0 -15
- package/esm/components/DevTools/DevTools.d.ts +0 -4
- package/esm/components/DevTools/DevTools.js +0 -19
- package/esm/components/DevToolsLocal/DevToolsLocal.d.ts +0 -4
- package/esm/components/DevToolsLocal/DevToolsLocal.js +0 -12
- package/esm/components/Dispatcher/Dispatcher.d.ts +0 -8
- package/esm/components/Dispatcher/Dispatcher.js +0 -61
- package/esm/components/GlobalSettings/GlobalSettings.d.ts +0 -6
- package/esm/components/GlobalSettings/GlobalSettings.js +0 -16
- package/esm/components/Group/Group.d.ts +0 -9
- package/esm/components/Group/Group.js +0 -14
- package/esm/components/Json/Json.d.ts +0 -7
- package/esm/components/Json/Json.js +0 -9
- package/esm/components/Logs/Logs.d.ts +0 -6
- package/esm/components/Logs/Logs.js +0 -49
- package/esm/components/Monitor/Monitor.d.ts +0 -6
- package/esm/components/Monitor/Monitor.js +0 -54
- package/esm/components/OverlayManager/OverlayManager.d.ts +0 -6
- package/esm/components/OverlayManager/OverlayManager.js +0 -17
- package/esm/components/Panel/Panel.d.ts +0 -14
- package/esm/components/Panel/Panel.js +0 -46
- package/esm/components/Preview/Preview.d.ts +0 -18
- package/esm/components/Preview/Preview.js +0 -58
- package/esm/components/Redux/Redux.d.ts +0 -6
- package/esm/components/Redux/Redux.js +0 -72
- package/esm/components/ReduxSettings/ReduxSettings.d.ts +0 -9
- package/esm/components/ReduxSettings/ReduxSettings.js +0 -60
- package/esm/components/Requests/Requests.d.ts +0 -6
- package/esm/components/Requests/Requests.js +0 -61
- package/esm/components/Status/Status.d.ts +0 -6
- package/esm/components/Status/Status.js +0 -16
- package/esm/components/TaskManager/TaskManager.d.ts +0 -9
- package/esm/components/TaskManager/TaskManager.js +0 -22
- package/esm/components/Timeline/Timeline.d.ts +0 -6
- package/esm/components/Timeline/Timeline.js +0 -13
- package/esm/components/TimelineEvent/TimelineEvent.d.ts +0 -7
- package/esm/components/TimelineEvent/TimelineEvent.js +0 -13
- package/esm/components/TimelineHeader/TimelineHeader.d.ts +0 -4
- package/esm/components/TimelineHeader/TimelineHeader.js +0 -5
- package/esm/components/TimelineRow/TimelineRow.d.ts +0 -7
- package/esm/components/TimelineRow/TimelineRow.js +0 -13
- package/esm/components/TimelineRowHeader/TimelineRowHeader.d.ts +0 -7
- package/esm/components/TimelineRowHeader/TimelineRowHeader.js +0 -10
- package/esm/components/Toggle/Toggle.d.ts +0 -8
- package/esm/components/Toggle/Toggle.js +0 -8
- package/esm/components/VirtualList/VirtualList.d.ts +0 -19
- package/esm/components/VirtualList/VirtualList.js +0 -30
- package/esm/components/Visual/Visual.d.ts +0 -6
- package/esm/components/Visual/Visual.js +0 -38
- package/esm/components/prefix.d.ts +0 -2
- package/esm/components/prefix.js +0 -2
- package/esm/data/boxSizes.d.ts +0 -2
- package/esm/data/boxSizes.js +0 -10
- package/esm/data/dispatcherActions.d.ts +0 -5
- package/esm/data/dispatcherActions.js +0 -35
- package/esm/data/layoutDefault.d.ts +0 -2
- package/esm/data/layoutDefault.js +0 -46
- package/esm/data/panels.d.ts +0 -2
- package/esm/data/panels.js +0 -14
- package/esm/data/panelsArrangements.d.ts +0 -19
- package/esm/data/panelsArrangements.js +0 -19
- package/esm/data/panelsLocal.d.ts +0 -2
- package/esm/data/panelsLocal.js +0 -7
- package/esm/data/reduxFilterOptions.d.ts +0 -20
- package/esm/data/reduxFilterOptions.js +0 -223
- package/esm/data/widgets.d.ts +0 -2
- package/esm/data/widgets.js +0 -154
- package/esm/data/widgetsLocal.d.ts +0 -2
- package/esm/data/widgetsLocal.js +0 -19
- package/esm/hooks/index.d.ts +0 -7
- package/esm/hooks/index.js +0 -7
- package/esm/hooks/misc/hookState.d.ts +0 -8
- package/esm/hooks/misc/hookState.js +0 -6
- package/esm/hooks/misc/util.d.ts +0 -5
- package/esm/hooks/misc/util.js +0 -21
- package/esm/hooks/useBoolean.d.ts +0 -3
- package/esm/hooks/useBoolean.js +0 -3
- package/esm/hooks/useClickAway.d.ts +0 -3
- package/esm/hooks/useClickAway.js +0 -27
- package/esm/hooks/useEvent.d.ts +0 -13
- package/esm/hooks/useEvent.js +0 -35
- package/esm/hooks/useKey.d.ts +0 -12
- package/esm/hooks/useKey.js +0 -29
- package/esm/hooks/useList.d.ts +0 -57
- package/esm/hooks/useList.js +0 -74
- package/esm/hooks/useLocalstorage.d.ts +0 -10
- package/esm/hooks/useLocalstorage.js +0 -75
- package/esm/hooks/usePanels.d.ts +0 -10
- package/esm/hooks/usePanels.js +0 -45
- package/esm/hooks/useSetState.d.ts +0 -2
- package/esm/hooks/useSetState.js +0 -10
- package/esm/hooks/useToggle.d.ts +0 -2
- package/esm/hooks/useToggle.js +0 -6
- package/esm/hooks/useUpdate.d.ts +0 -1
- package/esm/hooks/useUpdate.js +0 -6
- package/esm/index.d.ts +0 -4
- package/esm/index.js +0 -4
- package/esm/selectors/selectors.d.ts +0 -21
- package/esm/selectors/selectors.js +0 -20
- package/esm/theme/devtoolsTheme.d.ts +0 -2
- package/esm/theme/devtoolsTheme.js +0 -95
- package/esm/types.d.ts +0 -21
- package/esm/types.js +0 -1
- package/esm/utils/filter.d.ts +0 -3
- package/esm/utils/filter.js +0 -25
- package/esm/utils/localStorage.d.ts +0 -2
- package/esm/utils/localStorage.js +0 -21
- package/esm/utils/sockets.d.ts +0 -7
- package/esm/utils/sockets.js +0 -27
- package/lib/components/Colors copy.css +0 -3
- package/lib/components/Colors copy.css.map +0 -1
- package/lib/components/Colors.css +0 -3
- package/lib/components/Colors.css.map +0 -1
- package/lib/components/ColorsDark.css +0 -3
- package/lib/components/ColorsDark.css.map +0 -1
- package/lib/components/Config/Config.css +0 -15
- package/lib/components/Config/Config.css.map +0 -1
- package/lib/components/Config/Config.d.ts +0 -6
- package/lib/components/Config/Config.js +0 -20
- package/lib/components/DevTools/DevTools.css +0 -11
- package/lib/components/DevTools/DevTools.css.map +0 -1
- package/lib/components/DevTools/DevTools.d.ts +0 -4
- package/lib/components/DevTools/DevTools.js +0 -24
- package/lib/components/DevToolsLocal/DevToolsLocal.css +0 -11
- package/lib/components/DevToolsLocal/DevToolsLocal.css.map +0 -1
- package/lib/components/DevToolsLocal/DevToolsLocal.d.ts +0 -4
- package/lib/components/DevToolsLocal/DevToolsLocal.js +0 -17
- package/lib/components/Dispatcher/Dispatcher.css +0 -15
- package/lib/components/Dispatcher/Dispatcher.css.map +0 -1
- package/lib/components/Dispatcher/Dispatcher.d.ts +0 -8
- package/lib/components/Dispatcher/Dispatcher.js +0 -65
- package/lib/components/GlobalSettings/GlobalSettings.css +0 -3
- package/lib/components/GlobalSettings/GlobalSettings.css.map +0 -1
- package/lib/components/GlobalSettings/GlobalSettings.d.ts +0 -6
- package/lib/components/GlobalSettings/GlobalSettings.js +0 -21
- package/lib/components/Group/Group.css +0 -41
- package/lib/components/Group/Group.css.map +0 -1
- package/lib/components/Group/Group.d.ts +0 -9
- package/lib/components/Group/Group.js +0 -19
- package/lib/components/Json/Json.css +0 -5
- package/lib/components/Json/Json.css.map +0 -1
- package/lib/components/Json/Json.d.ts +0 -7
- package/lib/components/Json/Json.js +0 -14
- package/lib/components/Logs/Logs.css +0 -5
- package/lib/components/Logs/Logs.css.map +0 -1
- package/lib/components/Logs/Logs.d.ts +0 -6
- package/lib/components/Logs/Logs.js +0 -54
- package/lib/components/Monitor/Monitor.css +0 -5
- package/lib/components/Monitor/Monitor.css.map +0 -1
- package/lib/components/Monitor/Monitor.d.ts +0 -6
- package/lib/components/Monitor/Monitor.js +0 -59
- package/lib/components/OverlayManager/OverlayManager.css +0 -72
- package/lib/components/OverlayManager/OverlayManager.css.map +0 -1
- package/lib/components/OverlayManager/OverlayManager.d.ts +0 -6
- package/lib/components/OverlayManager/OverlayManager.js +0 -22
- package/lib/components/Panel/Panel.css +0 -35
- package/lib/components/Panel/Panel.css.map +0 -1
- package/lib/components/Panel/Panel.d.ts +0 -14
- package/lib/components/Panel/Panel.js +0 -51
- package/lib/components/Prefix copy.css +0 -3
- package/lib/components/Prefix copy.css.map +0 -1
- package/lib/components/Prefix.css +0 -3
- package/lib/components/Prefix.css.map +0 -1
- package/lib/components/Preview/Preview.css +0 -29
- package/lib/components/Preview/Preview.css.map +0 -1
- package/lib/components/Preview/Preview.d.ts +0 -18
- package/lib/components/Preview/Preview.js +0 -64
- package/lib/components/Reading.css +0 -107
- package/lib/components/Reading.css.map +0 -1
- package/lib/components/Redux/Redux.css +0 -86
- package/lib/components/Redux/Redux.css.map +0 -1
- package/lib/components/Redux/Redux.d.ts +0 -6
- package/lib/components/Redux/Redux.js +0 -77
- package/lib/components/ReduxSettings/ReduxSettings.css +0 -10
- package/lib/components/ReduxSettings/ReduxSettings.css.map +0 -1
- package/lib/components/ReduxSettings/ReduxSettings.d.ts +0 -9
- package/lib/components/ReduxSettings/ReduxSettings.js +0 -64
- package/lib/components/Requests/Requests.css +0 -8
- package/lib/components/Requests/Requests.css.map +0 -1
- package/lib/components/Requests/Requests.d.ts +0 -6
- package/lib/components/Requests/Requests.js +0 -66
- package/lib/components/Status/Status.css +0 -15
- package/lib/components/Status/Status.css.map +0 -1
- package/lib/components/Status/Status.d.ts +0 -6
- package/lib/components/Status/Status.js +0 -21
- package/lib/components/TaskManager/TaskManager.css +0 -9
- package/lib/components/TaskManager/TaskManager.css.map +0 -1
- package/lib/components/TaskManager/TaskManager.d.ts +0 -9
- package/lib/components/TaskManager/TaskManager.js +0 -28
- package/lib/components/Timeline/Timeline.css +0 -5
- package/lib/components/Timeline/Timeline.css.map +0 -1
- package/lib/components/Timeline/Timeline.d.ts +0 -6
- package/lib/components/Timeline/Timeline.js +0 -18
- package/lib/components/TimelineEvent/TimelineEvent.css +0 -20
- package/lib/components/TimelineEvent/TimelineEvent.css.map +0 -1
- package/lib/components/TimelineEvent/TimelineEvent.d.ts +0 -7
- package/lib/components/TimelineEvent/TimelineEvent.js +0 -18
- package/lib/components/TimelineHeader/TimelineHeader.css +0 -6
- package/lib/components/TimelineHeader/TimelineHeader.css.map +0 -1
- package/lib/components/TimelineHeader/TimelineHeader.d.ts +0 -4
- package/lib/components/TimelineHeader/TimelineHeader.js +0 -10
- package/lib/components/TimelineRow/TimelineRow.css +0 -14
- package/lib/components/TimelineRow/TimelineRow.css.map +0 -1
- package/lib/components/TimelineRow/TimelineRow.d.ts +0 -7
- package/lib/components/TimelineRow/TimelineRow.js +0 -18
- package/lib/components/TimelineRowHeader/TimelineRowHeader.css +0 -45
- package/lib/components/TimelineRowHeader/TimelineRowHeader.css.map +0 -1
- package/lib/components/TimelineRowHeader/TimelineRowHeader.d.ts +0 -7
- package/lib/components/TimelineRowHeader/TimelineRowHeader.js +0 -15
- package/lib/components/Toggle/Toggle.css +0 -3
- package/lib/components/Toggle/Toggle.css.map +0 -1
- package/lib/components/Toggle/Toggle.d.ts +0 -8
- package/lib/components/Toggle/Toggle.js +0 -13
- package/lib/components/Variables.css +0 -3
- package/lib/components/Variables.css.map +0 -1
- package/lib/components/VirtualList/VirtualList.css +0 -13
- package/lib/components/VirtualList/VirtualList.css.map +0 -1
- package/lib/components/VirtualList/VirtualList.d.ts +0 -19
- package/lib/components/VirtualList/VirtualList.js +0 -35
- package/lib/components/Visual/Visual.css +0 -57
- package/lib/components/Visual/Visual.css.map +0 -1
- package/lib/components/Visual/Visual.d.ts +0 -6
- package/lib/components/Visual/Visual.js +0 -43
- package/lib/components/prefix.d.ts +0 -2
- package/lib/components/prefix.js +0 -5
- package/lib/data/boxSizes.d.ts +0 -2
- package/lib/data/boxSizes.js +0 -13
- package/lib/data/dispatcherActions.d.ts +0 -5
- package/lib/data/dispatcherActions.js +0 -38
- package/lib/data/layoutDefault.d.ts +0 -2
- package/lib/data/layoutDefault.js +0 -49
- package/lib/data/panels.d.ts +0 -2
- package/lib/data/panels.js +0 -17
- package/lib/data/panelsArrangements.d.ts +0 -19
- package/lib/data/panelsArrangements.js +0 -22
- package/lib/data/panelsLocal.d.ts +0 -2
- package/lib/data/panelsLocal.js +0 -10
- package/lib/data/reduxFilterOptions.d.ts +0 -20
- package/lib/data/reduxFilterOptions.js +0 -227
- package/lib/data/widgets.d.ts +0 -2
- package/lib/data/widgets.js +0 -157
- package/lib/data/widgetsLocal.d.ts +0 -2
- package/lib/data/widgetsLocal.js +0 -22
- package/lib/hooks/index.d.ts +0 -7
- package/lib/hooks/index.js +0 -17
- package/lib/hooks/misc/hookState.d.ts +0 -8
- package/lib/hooks/misc/hookState.js +0 -10
- package/lib/hooks/misc/util.d.ts +0 -5
- package/lib/hooks/misc/util.js +0 -27
- package/lib/hooks/useBoolean.d.ts +0 -3
- package/lib/hooks/useBoolean.js +0 -7
- package/lib/hooks/useClickAway.d.ts +0 -3
- package/lib/hooks/useClickAway.js +0 -31
- package/lib/hooks/useEvent.d.ts +0 -13
- package/lib/hooks/useEvent.js +0 -37
- package/lib/hooks/useKey.d.ts +0 -12
- package/lib/hooks/useKey.js +0 -34
- package/lib/hooks/useList.d.ts +0 -57
- package/lib/hooks/useList.js +0 -79
- package/lib/hooks/useLocalstorage.d.ts +0 -10
- package/lib/hooks/useLocalstorage.js +0 -79
- package/lib/hooks/usePanels.d.ts +0 -10
- package/lib/hooks/usePanels.js +0 -49
- package/lib/hooks/useSetState.d.ts +0 -2
- package/lib/hooks/useSetState.js +0 -14
- package/lib/hooks/useToggle.d.ts +0 -2
- package/lib/hooks/useToggle.js +0 -10
- package/lib/hooks/useUpdate.d.ts +0 -1
- package/lib/hooks/useUpdate.js +0 -9
- package/lib/index.css +0 -605
- package/lib/index.css.map +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -11
- package/lib/selectors/selectors.d.ts +0 -21
- package/lib/selectors/selectors.js +0 -24
- package/lib/theme/devtoolsTheme.d.ts +0 -2
- package/lib/theme/devtoolsTheme.js +0 -97
- package/lib/types.d.ts +0 -21
- package/lib/types.js +0 -2
- package/lib/utils/filter.d.ts +0 -3
- package/lib/utils/filter.js +0 -29
- package/lib/utils/localStorage.d.ts +0 -2
- package/lib/utils/localStorage.js +0 -26
- package/lib/utils/sockets.d.ts +0 -7
- package/lib/utils/sockets.js +0 -34
package/.env
ADDED
package/.prettierrc.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
2
|
+
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
3
|
+
// for the documentation about the tasks.json format
|
4
|
+
"version": "2.0.0",
|
5
|
+
"command": "npm",
|
6
|
+
"tasks": [
|
7
|
+
{
|
8
|
+
"label": "install",
|
9
|
+
"type": "shell",
|
10
|
+
"command": "npm",
|
11
|
+
"args": ["install"]
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"label": "update",
|
15
|
+
"type": "shell",
|
16
|
+
"command": "npm",
|
17
|
+
"args": ["update"]
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"label": "test",
|
21
|
+
"type": "shell",
|
22
|
+
"command": "npm",
|
23
|
+
"args": ["run", "test"]
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"label": "build",
|
27
|
+
"type": "shell",
|
28
|
+
"group": "build",
|
29
|
+
"command": "npm",
|
30
|
+
"args": ["run", "watch"]
|
31
|
+
}
|
32
|
+
]
|
33
|
+
}
|
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Tomofumi Chiba
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
package/index.html
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
|
+
<link
|
8
|
+
rel="stylesheet"
|
9
|
+
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
10
|
+
/>
|
11
|
+
<link
|
12
|
+
rel="stylesheet"
|
13
|
+
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
|
14
|
+
/>
|
15
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
16
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
17
|
+
<link
|
18
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Roboto:wght@100;400;500;700&display=swap"
|
19
|
+
rel="stylesheet"
|
20
|
+
/>
|
21
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
22
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
23
|
+
<link
|
24
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
|
25
|
+
rel="stylesheet"
|
26
|
+
/>
|
27
|
+
|
28
|
+
<title>redux-connected-chrome-extension</title>
|
29
|
+
<style>
|
30
|
+
body {
|
31
|
+
padding: 0;
|
32
|
+
margin: 0;
|
33
|
+
min-height: 100vh;
|
34
|
+
font-family: 'Inter', sans-serif;
|
35
|
+
}
|
36
|
+
|
37
|
+
body,
|
38
|
+
#root {
|
39
|
+
display: flex;
|
40
|
+
flex: 1;
|
41
|
+
}
|
42
|
+
|
43
|
+
input,
|
44
|
+
h1,
|
45
|
+
h2,
|
46
|
+
h3,
|
47
|
+
select,
|
48
|
+
textarea {
|
49
|
+
font-family: 'Inter', sans-serif;
|
50
|
+
}
|
51
|
+
</style>
|
52
|
+
</head>
|
53
|
+
<body>
|
54
|
+
<div id="root"></div>
|
55
|
+
<div id="modal-root"></div>
|
56
|
+
<script type="module" src="/src/panel.tsx"></script>
|
57
|
+
</body>
|
58
|
+
</html>
|
package/jest.config.js
ADDED
package/package.json
CHANGED
@@ -1,77 +1,58 @@
|
|
1
1
|
{
|
2
2
|
"name": "redux-connected-devtools",
|
3
|
-
"version": "
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"main": "lib/index.js",
|
7
|
-
"files": [
|
8
|
-
"lib/",
|
9
|
-
"lib/index.css",
|
10
|
-
"esm/"
|
11
|
-
],
|
12
|
-
"types": "lib/index.d.ts",
|
13
|
-
"typings": "lib/index.d.ts",
|
3
|
+
"version": "1.0.2",
|
4
|
+
"description": "redux-connected-devtools",
|
5
|
+
"main": "src/index.ts",
|
14
6
|
"scripts": {
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
"
|
26
|
-
"
|
7
|
+
"dev": "vite",
|
8
|
+
"watch": "webpack --config webpack/webpack.dev.js --watch",
|
9
|
+
"build": "webpack --config webpack/webpack.prod.js",
|
10
|
+
"clean": "rimraf dist",
|
11
|
+
"test": "npx jest",
|
12
|
+
"style": "prettier --write \"src/**/*.{ts,tsx}\""
|
13
|
+
},
|
14
|
+
"author": "",
|
15
|
+
"license": "MIT",
|
16
|
+
"repository": {
|
17
|
+
"type": "git",
|
18
|
+
"url": "https://github.com/dht/redux-connected-devtools.git"
|
27
19
|
},
|
28
20
|
"dependencies": {
|
29
|
-
"@
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"react": "^
|
35
|
-
"react-draggable": "^4.4.3",
|
36
|
-
"react-json-view": "^1.21.1",
|
37
|
-
"react-modal": "^3.14.3",
|
38
|
-
"react-redux": "^7.2.4",
|
39
|
-
"react-toggle": "^4.1.2",
|
40
|
-
"react-use": "^17.2.4",
|
21
|
+
"@redux-devtools/extension": "^3.2.2",
|
22
|
+
"bytes": "^3.1.2",
|
23
|
+
"dotenv-flow": "^3.2.0",
|
24
|
+
"react": "^17.0.1",
|
25
|
+
"react-dom": "^17.0.2",
|
26
|
+
"react-redux": "^7.2.6",
|
41
27
|
"react-window": "^1.8.6",
|
42
|
-
"redux-connected": "^0.0.
|
43
|
-
"
|
44
|
-
"
|
45
|
-
|
46
|
-
|
47
|
-
"redux-connected": "^0.0.10"
|
28
|
+
"redux-connected": "^0.0.90",
|
29
|
+
"redux-store-generator": "^0.9.74",
|
30
|
+
"reselect": "^4.1.5",
|
31
|
+
"styled-components": "^5.3.3",
|
32
|
+
"tslib": "^2.3.1"
|
48
33
|
},
|
49
34
|
"devDependencies": {
|
50
|
-
"@
|
51
|
-
"@
|
52
|
-
"@types/
|
53
|
-
"@types/
|
54
|
-
"@types/
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
35
|
+
"@types/bytes": "^3.1.1",
|
36
|
+
"@types/chrome": "0.0.158",
|
37
|
+
"@types/jest": "^27.0.2",
|
38
|
+
"@types/react": "^17.0.0",
|
39
|
+
"@types/react-dom": "^17.0.0",
|
40
|
+
"@types/react-window": "^1.8.5",
|
41
|
+
"@types/styled-components": "^5.1.24",
|
42
|
+
"@vitejs/plugin-react": "^1.2.0",
|
43
|
+
"copy-webpack-plugin": "^9.0.1",
|
44
|
+
"glob": "^7.1.6",
|
45
|
+
"jest": "^27.2.1",
|
58
46
|
"prettier": "^2.2.1",
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
|
65
|
-
|
66
|
-
"
|
67
|
-
|
68
|
-
|
69
|
-
}
|
70
|
-
},
|
71
|
-
"lint-staged": {
|
72
|
-
"src/**/**/*.{ts,tsx}": [
|
73
|
-
"eslint --fix",
|
74
|
-
"git add"
|
75
|
-
]
|
47
|
+
"rimraf": "^3.0.2 ",
|
48
|
+
"ts-jest": "^27.0.5",
|
49
|
+
"ts-loader": "^8.0.0",
|
50
|
+
"typescript": "^4.4.3 ",
|
51
|
+
"vite": "^2.6.4",
|
52
|
+
"vite-plugin-react-svg": "^0.2.0",
|
53
|
+
"vite-tsconfig-paths": "^3.3.13",
|
54
|
+
"webpack": "^5.0.0",
|
55
|
+
"webpack-cli": "^4.0.0",
|
56
|
+
"webpack-merge": "^5.0.0"
|
76
57
|
}
|
77
58
|
}
|
package/public/icon.png
ADDED
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"manifest_version": 3,
|
3
|
+
"name": "redux-connected devtools",
|
4
|
+
"description": "Inspect the lifecycle of a redux-connected request",
|
5
|
+
"version": "1.0",
|
6
|
+
"options_ui": {
|
7
|
+
"page": "options.html"
|
8
|
+
},
|
9
|
+
"action": {
|
10
|
+
"default_icon": "icon.png",
|
11
|
+
"default_popup": "popup.html"
|
12
|
+
},
|
13
|
+
"background": {
|
14
|
+
"service_worker": "js/background.js"
|
15
|
+
},
|
16
|
+
"content_scripts": [
|
17
|
+
{
|
18
|
+
"matches": ["<all_urls>"],
|
19
|
+
"js": [
|
20
|
+
"js/vendor.js",
|
21
|
+
"js/content_script.js",
|
22
|
+
"js/injected_script.js"
|
23
|
+
]
|
24
|
+
}
|
25
|
+
],
|
26
|
+
"devtools_page": "devtools.html",
|
27
|
+
"permissions": ["storage"],
|
28
|
+
"host_permissions": ["<all_urls>"]
|
29
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Redux-connected devtools</title>
|
5
|
+
<script src="js/vendor.js"></script>
|
6
|
+
<link
|
7
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
|
8
|
+
rel="stylesheet"
|
9
|
+
/>
|
10
|
+
<style>
|
11
|
+
body {
|
12
|
+
padding: 0;
|
13
|
+
margin: 0;
|
14
|
+
min-height: 100vh;
|
15
|
+
}
|
16
|
+
|
17
|
+
body,
|
18
|
+
#root {
|
19
|
+
display: flex;
|
20
|
+
flex: 1;
|
21
|
+
font-family: 'Inter', sans-serif;
|
22
|
+
}
|
23
|
+
|
24
|
+
input,
|
25
|
+
h1,
|
26
|
+
h2,
|
27
|
+
h3,
|
28
|
+
select,
|
29
|
+
textarea {
|
30
|
+
font-family: 'Inter', sans-serif;
|
31
|
+
}
|
32
|
+
</style>
|
33
|
+
</head>
|
34
|
+
|
35
|
+
<body>
|
36
|
+
<div id="root"></div>
|
37
|
+
<script src="js/panel.js"></script>
|
38
|
+
</body>
|
39
|
+
</html>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
// background.js
|
2
|
+
|
3
|
+
let connections: Record<number | string, chrome.runtime.Port> = {};
|
4
|
+
|
5
|
+
chrome.runtime.onConnect.addListener(function (port) {
|
6
|
+
var extensionListener = function (message: any) {
|
7
|
+
// The original connection event doesn't include the tab ID of the
|
8
|
+
// DevTools page, so we need to send it explicitly.
|
9
|
+
if (message.name == 'init') {
|
10
|
+
connections[message.tabId] = port;
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
|
14
|
+
// other message handling
|
15
|
+
};
|
16
|
+
|
17
|
+
// Listen to messages sent from the DevTools page
|
18
|
+
port.onMessage.addListener(extensionListener);
|
19
|
+
|
20
|
+
port.onDisconnect.addListener(function (port) {
|
21
|
+
port.onMessage.removeListener(extensionListener);
|
22
|
+
|
23
|
+
const tabs = Object.keys(connections);
|
24
|
+
for (var i = 0, len = tabs.length; i < len; i++) {
|
25
|
+
if (connections[tabs[i]] == port) {
|
26
|
+
delete connections[tabs[i]];
|
27
|
+
break;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
});
|
31
|
+
});
|
32
|
+
|
33
|
+
// Receive message from content script and relay to the devTools page for the
|
34
|
+
// current tab
|
35
|
+
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
36
|
+
// Messages from content scripts should have sender.tab set
|
37
|
+
if (sender.tab) {
|
38
|
+
var tabId = sender.tab.id;
|
39
|
+
|
40
|
+
if (tabId && connections[tabId]) {
|
41
|
+
connections[tabId].postMessage(request);
|
42
|
+
} else {
|
43
|
+
console.log('Tab not found in connection list.');
|
44
|
+
}
|
45
|
+
} else {
|
46
|
+
console.log('sender.tab not defined.');
|
47
|
+
}
|
48
|
+
return true;
|
49
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Container } from './DevInspector.style';
|
3
|
+
import { ApiRequest } from 'redux-connected';
|
4
|
+
import RequestJourney from '../RequestJourney/RequestJourney';
|
5
|
+
import RequestDetails from '../RequestDetails/RequestDetails';
|
6
|
+
|
7
|
+
export type DevInspectorProps = {
|
8
|
+
item?: ApiRequest;
|
9
|
+
};
|
10
|
+
|
11
|
+
export function DevInspector(props: DevInspectorProps) {
|
12
|
+
const { item } = props;
|
13
|
+
|
14
|
+
if (!item) {
|
15
|
+
return (
|
16
|
+
<Container
|
17
|
+
className='DevInspector-container'
|
18
|
+
data-testid='DevInspector-container'
|
19
|
+
></Container>
|
20
|
+
);
|
21
|
+
}
|
22
|
+
|
23
|
+
return (
|
24
|
+
<Container
|
25
|
+
className='DevInspector-container'
|
26
|
+
data-testid='DevInspector-container'
|
27
|
+
>
|
28
|
+
<RequestDetails item={item} />
|
29
|
+
<RequestJourney item={item} />
|
30
|
+
</Container>
|
31
|
+
);
|
32
|
+
}
|
33
|
+
|
34
|
+
export default DevInspector;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
|
3
|
+
export const Container = styled.div`
|
4
|
+
flex: 1;
|
5
|
+
|
6
|
+
.list {
|
7
|
+
&::-webkit-scrollbar {
|
8
|
+
width: 8px;
|
9
|
+
}
|
10
|
+
|
11
|
+
/* Track */
|
12
|
+
&::-webkit-scrollbar-track {
|
13
|
+
background: #333;
|
14
|
+
}
|
15
|
+
|
16
|
+
/* Handle */
|
17
|
+
&::-webkit-scrollbar-thumb {
|
18
|
+
background: #555;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Handle on hover */
|
22
|
+
&::-webkit-scrollbar-thumb:hover {
|
23
|
+
background: #666;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
`;
|
27
|
+
|
28
|
+
export const Empty = styled.div`
|
29
|
+
color: #456;
|
30
|
+
margin: 30px;
|
31
|
+
font-size: 17px;
|
32
|
+
text-align: center;
|
33
|
+
text-shadow: 1px 3px 3px rgba(0, 0, 0, 0.2);
|
34
|
+
`;
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Container, Empty } from './DevList.style';
|
3
|
+
import { FixedSizeList as List } from 'react-window';
|
4
|
+
import { Json } from '../../types';
|
5
|
+
|
6
|
+
export type DevListProps = {
|
7
|
+
items: Json[];
|
8
|
+
row: React.FC<any>;
|
9
|
+
onClick: (item: any) => void;
|
10
|
+
};
|
11
|
+
|
12
|
+
export function DevList(props: DevListProps) {
|
13
|
+
const { row: Cmp, items } = props;
|
14
|
+
|
15
|
+
const Item = (rowInfo: any) => {
|
16
|
+
const { index, style } = rowInfo;
|
17
|
+
|
18
|
+
const item = items[index];
|
19
|
+
|
20
|
+
return (
|
21
|
+
<Cmp
|
22
|
+
onClick={props.onClick}
|
23
|
+
index={index}
|
24
|
+
style={style}
|
25
|
+
item={item}
|
26
|
+
/>
|
27
|
+
);
|
28
|
+
};
|
29
|
+
|
30
|
+
function renderEmpty() {
|
31
|
+
return <Empty>Empty list</Empty>;
|
32
|
+
}
|
33
|
+
|
34
|
+
function renderList() {
|
35
|
+
if (items.length === 0) {
|
36
|
+
return renderEmpty();
|
37
|
+
}
|
38
|
+
|
39
|
+
return (
|
40
|
+
<List
|
41
|
+
height={850}
|
42
|
+
itemCount={items.length}
|
43
|
+
itemSize={68}
|
44
|
+
width={350}
|
45
|
+
className='list'
|
46
|
+
>
|
47
|
+
{Item}
|
48
|
+
</List>
|
49
|
+
);
|
50
|
+
}
|
51
|
+
|
52
|
+
return (
|
53
|
+
<Container
|
54
|
+
className='DevList-container'
|
55
|
+
data-testid='DevList-container'
|
56
|
+
>
|
57
|
+
{renderList()}
|
58
|
+
</Container>
|
59
|
+
);
|
60
|
+
}
|
61
|
+
|
62
|
+
export default DevList;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
|
3
|
+
export const Container = styled.div`
|
4
|
+
width: 190px;
|
5
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
6
|
+
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
7
|
+
`;
|
8
|
+
|
9
|
+
export const MenuGroup = styled.div`
|
10
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
11
|
+
`;
|
12
|
+
|
13
|
+
export const MenuGroupTitle = styled.div`
|
14
|
+
font-size: 13px;
|
15
|
+
padding: 5px 10px;
|
16
|
+
color: rgba(255, 255, 255, 0.5);
|
17
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
18
|
+
background-color: rgba(0, 0, 0, 0.1);
|
19
|
+
`;
|
20
|
+
|
21
|
+
export const MenuItem = styled.div<{ selected: boolean }>`
|
22
|
+
display: flex;
|
23
|
+
flex-direction: row;
|
24
|
+
align-items: center;
|
25
|
+
padding: 6px 10px;
|
26
|
+
font-size: 14px;
|
27
|
+
color: ${(props) =>
|
28
|
+
props.selected ? 'gold' : 'rgba(255, 255, 255, 0.89)'};
|
29
|
+
background-color: ${(props) =>
|
30
|
+
props.selected ? 'rgba(255, 255, 255, 0.05)' : 'transparent'};
|
31
|
+
|
32
|
+
&:hover {
|
33
|
+
background-color: rgba(255, 255, 255, 0.1);
|
34
|
+
cursor: pointer;
|
35
|
+
}
|
36
|
+
`;
|
37
|
+
|
38
|
+
export const Title = styled.div`
|
39
|
+
flex: 1;
|
40
|
+
`;
|
41
|
+
|
42
|
+
export const Badge = styled.div`
|
43
|
+
background-color: rgba(0, 0, 80, 0.3);
|
44
|
+
padding: 0 4px;
|
45
|
+
font-size: 12px;
|
46
|
+
border-radius: 7px;
|
47
|
+
border: 1px solid #334;
|
48
|
+
color: cyan;
|
49
|
+
`;
|
50
|
+
|
51
|
+
export const BadgeTotal = styled(Badge)`
|
52
|
+
color: #555;
|
53
|
+
`;
|