redux-connected-devtools 0.0.15 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (373) hide show
  1. package/.env +2 -0
  2. package/.prettierrc.js +10 -0
  3. package/LICENSE +21 -0
  4. package/README.md +5 -0
  5. package/index.html +58 -0
  6. package/jest.config.js +8 -0
  7. package/package.json +58 -63
  8. package/src/__tests__/sum.ts +9 -0
  9. package/src/components/DevInspector/DevInspector.scss +2 -0
  10. package/src/components/DevInspector/DevInspector.style.tsx +7 -0
  11. package/src/components/DevInspector/DevInspector.tsx +34 -0
  12. package/src/components/DevList/DevList.scss +2 -0
  13. package/src/components/DevList/DevList.style.tsx +34 -0
  14. package/src/components/DevList/DevList.tsx +65 -0
  15. package/src/components/DevMenu/DevMenu.scss +2 -0
  16. package/src/components/DevMenu/DevMenu.style.tsx +56 -0
  17. package/src/components/DevMenu/DevMenu.tsx +77 -0
  18. package/src/components/DevPanel/DevPanel.scss +2 -0
  19. package/src/components/DevPanel/DevPanel.style.tsx +25 -0
  20. package/src/components/DevPanel/DevPanel.tsx +58 -0
  21. package/src/components/DevtoolsApp/DevtoolsApp.scss +2 -0
  22. package/src/components/DevtoolsApp/DevtoolsApp.style.tsx +12 -0
  23. package/src/components/DevtoolsApp/DevtoolsApp.tsx +45 -0
  24. package/src/components/Icon/AllIcons.tsx +66 -0
  25. package/src/components/Icon/Icon.scss +2 -0
  26. package/src/components/Icon/Icon.style.tsx +11 -0
  27. package/src/components/Icon/Icon.tsx +28 -0
  28. package/src/components/JourneyRow/JourneyRow.scss +2 -0
  29. package/src/components/JourneyRow/JourneyRow.style.tsx +46 -0
  30. package/src/components/JourneyRow/JourneyRow.tsx +60 -0
  31. package/src/components/JsonViewer/JsonViewer.scss +2 -0
  32. package/src/components/JsonViewer/JsonViewer.style.tsx +31 -0
  33. package/src/components/JsonViewer/JsonViewer.tsx +23 -0
  34. package/src/components/Lifecycle/Lifecycle.scss +2 -0
  35. package/src/components/Lifecycle/Lifecycle.style.tsx +6 -0
  36. package/src/components/Lifecycle/Lifecycle.tsx +36 -0
  37. package/src/components/LogsViewer/LogsViewer.scss +2 -0
  38. package/src/components/LogsViewer/LogsViewer.style.tsx +5 -0
  39. package/src/components/LogsViewer/LogsViewer.tsx +14 -0
  40. package/src/components/RequestDetails/RequestDetails.scss +2 -0
  41. package/src/components/RequestDetails/RequestDetails.style.tsx +20 -0
  42. package/src/components/RequestDetails/RequestDetails.tsx +60 -0
  43. package/src/components/RequestJourney/RequestJourney.scss +2 -0
  44. package/src/components/RequestJourney/RequestJourney.style.tsx +27 -0
  45. package/src/components/RequestJourney/RequestJourney.tsx +33 -0
  46. package/src/components/RequestRow/RequestRow.scss +2 -0
  47. package/src/components/RequestRow/RequestRow.style.tsx +32 -0
  48. package/src/components/RequestRow/RequestRow.tsx +37 -0
  49. package/src/components/Size/Size.scss +2 -0
  50. package/src/components/Size/Size.style.tsx +6 -0
  51. package/src/components/Size/Size.tsx +21 -0
  52. package/src/components/StateViewer/StateViewer.scss +2 -0
  53. package/src/components/StateViewer/StateViewer.style.tsx +5 -0
  54. package/src/components/StateViewer/StateViewer.tsx +17 -0
  55. package/src/components/Time/Time.scss +2 -0
  56. package/src/components/Time/Time.style.tsx +17 -0
  57. package/src/components/Time/Time.tsx +25 -0
  58. package/src/containers/DevMenuContainer.tsx +28 -0
  59. package/src/containers/DevPanelContainer.tsx +12 -0
  60. package/src/containers/DevtoolsAppContainer.tsx +42 -0
  61. package/src/containers/EndpointConfigsContainer.tsx +12 -0
  62. package/src/containers/EndpointStatusContainer.tsx +12 -0
  63. package/src/containers/GlobalSettingsContainer.tsx +12 -0
  64. package/src/containers/GlobalStatsContainer.tsx +12 -0
  65. package/src/containers/JsonViewerContainer.tsx +8 -0
  66. package/src/containers/LifecycleApiErrorContainer.tsx +11 -0
  67. package/src/containers/LifecycleContainer.tsx +12 -0
  68. package/src/containers/LifecycleFailedContainer.tsx +11 -0
  69. package/src/containers/LifecycleGeneralErrorContainer.tsx +11 -0
  70. package/src/containers/LifecycleInQueueContainer.tsx +11 -0
  71. package/src/containers/LifecyclePendingApiContainer.tsx +11 -0
  72. package/src/containers/LifecyclePostActionContainer.tsx +11 -0
  73. package/src/containers/LifecycleReceivedContainer.tsx +11 -0
  74. package/src/containers/LogsViewerContainer.tsx +8 -0
  75. package/src/containers/StateViewerContainer.tsx +8 -0
  76. package/src/data/devComponents.tsx +27 -0
  77. package/src/data/devRouter.ts +107 -0
  78. package/src/data/devRoutes.ts +90 -0
  79. package/src/hooks/useStoreSize.ts +27 -0
  80. package/src/index.ts +1 -0
  81. package/src/store/initialState.ts +42 -0
  82. package/src/store/selectors.ts +220 -0
  83. package/src/types.ts +1 -0
  84. package/src/utils/date.ts +11 -0
  85. package/src/utils/download.ts +17 -0
  86. package/tsconfig.json +18 -0
  87. package/vite.config.ts +27 -0
  88. package/esm/components/Config/Config.d.ts +0 -6
  89. package/esm/components/Config/Config.js +0 -15
  90. package/esm/components/DevTools/DevTools.d.ts +0 -4
  91. package/esm/components/DevTools/DevTools.js +0 -19
  92. package/esm/components/DevToolsLocal/DevToolsLocal.d.ts +0 -4
  93. package/esm/components/DevToolsLocal/DevToolsLocal.js +0 -12
  94. package/esm/components/Dispatcher/Dispatcher.d.ts +0 -8
  95. package/esm/components/Dispatcher/Dispatcher.js +0 -61
  96. package/esm/components/GlobalSettings/GlobalSettings.d.ts +0 -6
  97. package/esm/components/GlobalSettings/GlobalSettings.js +0 -16
  98. package/esm/components/Group/Group.d.ts +0 -9
  99. package/esm/components/Group/Group.js +0 -14
  100. package/esm/components/Json/Json.d.ts +0 -7
  101. package/esm/components/Json/Json.js +0 -9
  102. package/esm/components/Logs/Logs.d.ts +0 -6
  103. package/esm/components/Logs/Logs.js +0 -49
  104. package/esm/components/Monitor/Monitor.d.ts +0 -6
  105. package/esm/components/Monitor/Monitor.js +0 -54
  106. package/esm/components/OverlayManager/OverlayManager.d.ts +0 -6
  107. package/esm/components/OverlayManager/OverlayManager.js +0 -17
  108. package/esm/components/Panel/Panel.d.ts +0 -14
  109. package/esm/components/Panel/Panel.js +0 -46
  110. package/esm/components/Preview/Preview.d.ts +0 -18
  111. package/esm/components/Preview/Preview.js +0 -58
  112. package/esm/components/Redux/Redux.d.ts +0 -6
  113. package/esm/components/Redux/Redux.js +0 -72
  114. package/esm/components/ReduxSettings/ReduxSettings.d.ts +0 -9
  115. package/esm/components/ReduxSettings/ReduxSettings.js +0 -60
  116. package/esm/components/Requests/Requests.d.ts +0 -6
  117. package/esm/components/Requests/Requests.js +0 -61
  118. package/esm/components/Status/Status.d.ts +0 -6
  119. package/esm/components/Status/Status.js +0 -16
  120. package/esm/components/TaskManager/TaskManager.d.ts +0 -9
  121. package/esm/components/TaskManager/TaskManager.js +0 -22
  122. package/esm/components/Timeline/Timeline.d.ts +0 -6
  123. package/esm/components/Timeline/Timeline.js +0 -13
  124. package/esm/components/TimelineEvent/TimelineEvent.d.ts +0 -7
  125. package/esm/components/TimelineEvent/TimelineEvent.js +0 -13
  126. package/esm/components/TimelineHeader/TimelineHeader.d.ts +0 -4
  127. package/esm/components/TimelineHeader/TimelineHeader.js +0 -5
  128. package/esm/components/TimelineRow/TimelineRow.d.ts +0 -7
  129. package/esm/components/TimelineRow/TimelineRow.js +0 -13
  130. package/esm/components/TimelineRowHeader/TimelineRowHeader.d.ts +0 -7
  131. package/esm/components/TimelineRowHeader/TimelineRowHeader.js +0 -10
  132. package/esm/components/Toggle/Toggle.d.ts +0 -8
  133. package/esm/components/Toggle/Toggle.js +0 -8
  134. package/esm/components/VirtualList/VirtualList.d.ts +0 -19
  135. package/esm/components/VirtualList/VirtualList.js +0 -30
  136. package/esm/components/Visual/Visual.d.ts +0 -6
  137. package/esm/components/Visual/Visual.js +0 -38
  138. package/esm/components/prefix.d.ts +0 -2
  139. package/esm/components/prefix.js +0 -2
  140. package/esm/data/boxSizes.d.ts +0 -2
  141. package/esm/data/boxSizes.js +0 -10
  142. package/esm/data/dispatcherActions.d.ts +0 -5
  143. package/esm/data/dispatcherActions.js +0 -35
  144. package/esm/data/layoutDefault.d.ts +0 -2
  145. package/esm/data/layoutDefault.js +0 -46
  146. package/esm/data/panels.d.ts +0 -2
  147. package/esm/data/panels.js +0 -14
  148. package/esm/data/panelsArrangements.d.ts +0 -19
  149. package/esm/data/panelsArrangements.js +0 -19
  150. package/esm/data/panelsLocal.d.ts +0 -2
  151. package/esm/data/panelsLocal.js +0 -7
  152. package/esm/data/reduxFilterOptions.d.ts +0 -20
  153. package/esm/data/reduxFilterOptions.js +0 -223
  154. package/esm/data/widgets.d.ts +0 -2
  155. package/esm/data/widgets.js +0 -154
  156. package/esm/data/widgetsLocal.d.ts +0 -2
  157. package/esm/data/widgetsLocal.js +0 -19
  158. package/esm/hooks/index.d.ts +0 -7
  159. package/esm/hooks/index.js +0 -7
  160. package/esm/hooks/misc/hookState.d.ts +0 -8
  161. package/esm/hooks/misc/hookState.js +0 -6
  162. package/esm/hooks/misc/util.d.ts +0 -5
  163. package/esm/hooks/misc/util.js +0 -21
  164. package/esm/hooks/useBoolean.d.ts +0 -3
  165. package/esm/hooks/useBoolean.js +0 -3
  166. package/esm/hooks/useClickAway.d.ts +0 -3
  167. package/esm/hooks/useClickAway.js +0 -27
  168. package/esm/hooks/useEvent.d.ts +0 -13
  169. package/esm/hooks/useEvent.js +0 -35
  170. package/esm/hooks/useKey.d.ts +0 -12
  171. package/esm/hooks/useKey.js +0 -29
  172. package/esm/hooks/useList.d.ts +0 -57
  173. package/esm/hooks/useList.js +0 -74
  174. package/esm/hooks/useLocalstorage.d.ts +0 -10
  175. package/esm/hooks/useLocalstorage.js +0 -75
  176. package/esm/hooks/usePanels.d.ts +0 -10
  177. package/esm/hooks/usePanels.js +0 -45
  178. package/esm/hooks/useSetState.d.ts +0 -2
  179. package/esm/hooks/useSetState.js +0 -10
  180. package/esm/hooks/useToggle.d.ts +0 -2
  181. package/esm/hooks/useToggle.js +0 -6
  182. package/esm/hooks/useUpdate.d.ts +0 -1
  183. package/esm/hooks/useUpdate.js +0 -6
  184. package/esm/index.d.ts +0 -4
  185. package/esm/index.js +0 -4
  186. package/esm/selectors/selectors.d.ts +0 -21
  187. package/esm/selectors/selectors.js +0 -20
  188. package/esm/theme/devtoolsTheme.d.ts +0 -2
  189. package/esm/theme/devtoolsTheme.js +0 -95
  190. package/esm/types.d.ts +0 -21
  191. package/esm/types.js +0 -1
  192. package/esm/utils/filter.d.ts +0 -3
  193. package/esm/utils/filter.js +0 -25
  194. package/esm/utils/localStorage.d.ts +0 -2
  195. package/esm/utils/localStorage.js +0 -21
  196. package/esm/utils/sockets.d.ts +0 -7
  197. package/esm/utils/sockets.js +0 -27
  198. package/lib/components/Colors copy.css +0 -3
  199. package/lib/components/Colors copy.css.map +0 -1
  200. package/lib/components/Colors.css +0 -3
  201. package/lib/components/Colors.css.map +0 -1
  202. package/lib/components/ColorsDark.css +0 -3
  203. package/lib/components/ColorsDark.css.map +0 -1
  204. package/lib/components/Config/Config.css +0 -15
  205. package/lib/components/Config/Config.css.map +0 -1
  206. package/lib/components/Config/Config.d.ts +0 -6
  207. package/lib/components/Config/Config.js +0 -20
  208. package/lib/components/DevTools/DevTools.css +0 -11
  209. package/lib/components/DevTools/DevTools.css.map +0 -1
  210. package/lib/components/DevTools/DevTools.d.ts +0 -4
  211. package/lib/components/DevTools/DevTools.js +0 -24
  212. package/lib/components/DevToolsLocal/DevToolsLocal.css +0 -11
  213. package/lib/components/DevToolsLocal/DevToolsLocal.css.map +0 -1
  214. package/lib/components/DevToolsLocal/DevToolsLocal.d.ts +0 -4
  215. package/lib/components/DevToolsLocal/DevToolsLocal.js +0 -17
  216. package/lib/components/Dispatcher/Dispatcher.css +0 -15
  217. package/lib/components/Dispatcher/Dispatcher.css.map +0 -1
  218. package/lib/components/Dispatcher/Dispatcher.d.ts +0 -8
  219. package/lib/components/Dispatcher/Dispatcher.js +0 -65
  220. package/lib/components/GlobalSettings/GlobalSettings.css +0 -3
  221. package/lib/components/GlobalSettings/GlobalSettings.css.map +0 -1
  222. package/lib/components/GlobalSettings/GlobalSettings.d.ts +0 -6
  223. package/lib/components/GlobalSettings/GlobalSettings.js +0 -21
  224. package/lib/components/Group/Group.css +0 -41
  225. package/lib/components/Group/Group.css.map +0 -1
  226. package/lib/components/Group/Group.d.ts +0 -9
  227. package/lib/components/Group/Group.js +0 -19
  228. package/lib/components/Json/Json.css +0 -5
  229. package/lib/components/Json/Json.css.map +0 -1
  230. package/lib/components/Json/Json.d.ts +0 -7
  231. package/lib/components/Json/Json.js +0 -14
  232. package/lib/components/Logs/Logs.css +0 -5
  233. package/lib/components/Logs/Logs.css.map +0 -1
  234. package/lib/components/Logs/Logs.d.ts +0 -6
  235. package/lib/components/Logs/Logs.js +0 -54
  236. package/lib/components/Monitor/Monitor.css +0 -5
  237. package/lib/components/Monitor/Monitor.css.map +0 -1
  238. package/lib/components/Monitor/Monitor.d.ts +0 -6
  239. package/lib/components/Monitor/Monitor.js +0 -59
  240. package/lib/components/OverlayManager/OverlayManager.css +0 -72
  241. package/lib/components/OverlayManager/OverlayManager.css.map +0 -1
  242. package/lib/components/OverlayManager/OverlayManager.d.ts +0 -6
  243. package/lib/components/OverlayManager/OverlayManager.js +0 -22
  244. package/lib/components/Panel/Panel.css +0 -35
  245. package/lib/components/Panel/Panel.css.map +0 -1
  246. package/lib/components/Panel/Panel.d.ts +0 -14
  247. package/lib/components/Panel/Panel.js +0 -51
  248. package/lib/components/Prefix copy.css +0 -3
  249. package/lib/components/Prefix copy.css.map +0 -1
  250. package/lib/components/Prefix.css +0 -3
  251. package/lib/components/Prefix.css.map +0 -1
  252. package/lib/components/Preview/Preview.css +0 -29
  253. package/lib/components/Preview/Preview.css.map +0 -1
  254. package/lib/components/Preview/Preview.d.ts +0 -18
  255. package/lib/components/Preview/Preview.js +0 -64
  256. package/lib/components/Reading.css +0 -107
  257. package/lib/components/Reading.css.map +0 -1
  258. package/lib/components/Redux/Redux.css +0 -86
  259. package/lib/components/Redux/Redux.css.map +0 -1
  260. package/lib/components/Redux/Redux.d.ts +0 -6
  261. package/lib/components/Redux/Redux.js +0 -77
  262. package/lib/components/ReduxSettings/ReduxSettings.css +0 -10
  263. package/lib/components/ReduxSettings/ReduxSettings.css.map +0 -1
  264. package/lib/components/ReduxSettings/ReduxSettings.d.ts +0 -9
  265. package/lib/components/ReduxSettings/ReduxSettings.js +0 -64
  266. package/lib/components/Requests/Requests.css +0 -8
  267. package/lib/components/Requests/Requests.css.map +0 -1
  268. package/lib/components/Requests/Requests.d.ts +0 -6
  269. package/lib/components/Requests/Requests.js +0 -66
  270. package/lib/components/Status/Status.css +0 -15
  271. package/lib/components/Status/Status.css.map +0 -1
  272. package/lib/components/Status/Status.d.ts +0 -6
  273. package/lib/components/Status/Status.js +0 -21
  274. package/lib/components/TaskManager/TaskManager.css +0 -9
  275. package/lib/components/TaskManager/TaskManager.css.map +0 -1
  276. package/lib/components/TaskManager/TaskManager.d.ts +0 -9
  277. package/lib/components/TaskManager/TaskManager.js +0 -28
  278. package/lib/components/Timeline/Timeline.css +0 -5
  279. package/lib/components/Timeline/Timeline.css.map +0 -1
  280. package/lib/components/Timeline/Timeline.d.ts +0 -6
  281. package/lib/components/Timeline/Timeline.js +0 -18
  282. package/lib/components/TimelineEvent/TimelineEvent.css +0 -20
  283. package/lib/components/TimelineEvent/TimelineEvent.css.map +0 -1
  284. package/lib/components/TimelineEvent/TimelineEvent.d.ts +0 -7
  285. package/lib/components/TimelineEvent/TimelineEvent.js +0 -18
  286. package/lib/components/TimelineHeader/TimelineHeader.css +0 -6
  287. package/lib/components/TimelineHeader/TimelineHeader.css.map +0 -1
  288. package/lib/components/TimelineHeader/TimelineHeader.d.ts +0 -4
  289. package/lib/components/TimelineHeader/TimelineHeader.js +0 -10
  290. package/lib/components/TimelineRow/TimelineRow.css +0 -14
  291. package/lib/components/TimelineRow/TimelineRow.css.map +0 -1
  292. package/lib/components/TimelineRow/TimelineRow.d.ts +0 -7
  293. package/lib/components/TimelineRow/TimelineRow.js +0 -18
  294. package/lib/components/TimelineRowHeader/TimelineRowHeader.css +0 -45
  295. package/lib/components/TimelineRowHeader/TimelineRowHeader.css.map +0 -1
  296. package/lib/components/TimelineRowHeader/TimelineRowHeader.d.ts +0 -7
  297. package/lib/components/TimelineRowHeader/TimelineRowHeader.js +0 -15
  298. package/lib/components/Toggle/Toggle.css +0 -3
  299. package/lib/components/Toggle/Toggle.css.map +0 -1
  300. package/lib/components/Toggle/Toggle.d.ts +0 -8
  301. package/lib/components/Toggle/Toggle.js +0 -13
  302. package/lib/components/Variables.css +0 -3
  303. package/lib/components/Variables.css.map +0 -1
  304. package/lib/components/VirtualList/VirtualList.css +0 -13
  305. package/lib/components/VirtualList/VirtualList.css.map +0 -1
  306. package/lib/components/VirtualList/VirtualList.d.ts +0 -19
  307. package/lib/components/VirtualList/VirtualList.js +0 -35
  308. package/lib/components/Visual/Visual.css +0 -57
  309. package/lib/components/Visual/Visual.css.map +0 -1
  310. package/lib/components/Visual/Visual.d.ts +0 -6
  311. package/lib/components/Visual/Visual.js +0 -43
  312. package/lib/components/prefix.d.ts +0 -2
  313. package/lib/components/prefix.js +0 -5
  314. package/lib/data/boxSizes.d.ts +0 -2
  315. package/lib/data/boxSizes.js +0 -13
  316. package/lib/data/dispatcherActions.d.ts +0 -5
  317. package/lib/data/dispatcherActions.js +0 -38
  318. package/lib/data/layoutDefault.d.ts +0 -2
  319. package/lib/data/layoutDefault.js +0 -49
  320. package/lib/data/panels.d.ts +0 -2
  321. package/lib/data/panels.js +0 -17
  322. package/lib/data/panelsArrangements.d.ts +0 -19
  323. package/lib/data/panelsArrangements.js +0 -22
  324. package/lib/data/panelsLocal.d.ts +0 -2
  325. package/lib/data/panelsLocal.js +0 -10
  326. package/lib/data/reduxFilterOptions.d.ts +0 -20
  327. package/lib/data/reduxFilterOptions.js +0 -227
  328. package/lib/data/widgets.d.ts +0 -2
  329. package/lib/data/widgets.js +0 -157
  330. package/lib/data/widgetsLocal.d.ts +0 -2
  331. package/lib/data/widgetsLocal.js +0 -22
  332. package/lib/hooks/index.d.ts +0 -7
  333. package/lib/hooks/index.js +0 -17
  334. package/lib/hooks/misc/hookState.d.ts +0 -8
  335. package/lib/hooks/misc/hookState.js +0 -10
  336. package/lib/hooks/misc/util.d.ts +0 -5
  337. package/lib/hooks/misc/util.js +0 -27
  338. package/lib/hooks/useBoolean.d.ts +0 -3
  339. package/lib/hooks/useBoolean.js +0 -7
  340. package/lib/hooks/useClickAway.d.ts +0 -3
  341. package/lib/hooks/useClickAway.js +0 -31
  342. package/lib/hooks/useEvent.d.ts +0 -13
  343. package/lib/hooks/useEvent.js +0 -37
  344. package/lib/hooks/useKey.d.ts +0 -12
  345. package/lib/hooks/useKey.js +0 -34
  346. package/lib/hooks/useList.d.ts +0 -57
  347. package/lib/hooks/useList.js +0 -79
  348. package/lib/hooks/useLocalstorage.d.ts +0 -10
  349. package/lib/hooks/useLocalstorage.js +0 -79
  350. package/lib/hooks/usePanels.d.ts +0 -10
  351. package/lib/hooks/usePanels.js +0 -49
  352. package/lib/hooks/useSetState.d.ts +0 -2
  353. package/lib/hooks/useSetState.js +0 -14
  354. package/lib/hooks/useToggle.d.ts +0 -2
  355. package/lib/hooks/useToggle.js +0 -10
  356. package/lib/hooks/useUpdate.d.ts +0 -1
  357. package/lib/hooks/useUpdate.js +0 -9
  358. package/lib/index.css +0 -605
  359. package/lib/index.css.map +0 -1
  360. package/lib/index.d.ts +0 -4
  361. package/lib/index.js +0 -11
  362. package/lib/selectors/selectors.d.ts +0 -21
  363. package/lib/selectors/selectors.js +0 -24
  364. package/lib/theme/devtoolsTheme.d.ts +0 -2
  365. package/lib/theme/devtoolsTheme.js +0 -97
  366. package/lib/types.d.ts +0 -21
  367. package/lib/types.js +0 -2
  368. package/lib/utils/filter.d.ts +0 -3
  369. package/lib/utils/filter.js +0 -29
  370. package/lib/utils/localStorage.d.ts +0 -2
  371. package/lib/utils/localStorage.js +0 -26
  372. package/lib/utils/sockets.d.ts +0 -7
  373. package/lib/utils/sockets.js +0 -34
package/.env ADDED
@@ -0,0 +1,2 @@
1
+ VITE_SERVER_DOMAIN=http://localhost
2
+ VITE_BASE_PORT_GLI=3100
package/.prettierrc.js ADDED
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ trailingComma: 'es5',
3
+ tabWidth: 4,
4
+ semi: true,
5
+ singleQuote: true,
6
+ jsxSingleQuote: true,
7
+ endOfLine: 'auto',
8
+ // printWidth: 120,
9
+ useTabs: false,
10
+ };
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
@@ -0,0 +1,5 @@
1
+ # Redux-connected-devtools Chrome Extension
2
+
3
+ messages => pub/sub
4
+
5
+ content_script => background => panel script
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
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ "roots": [
3
+ "src"
4
+ ],
5
+ "transform": {
6
+ "^.+\\.ts$": "ts-jest"
7
+ },
8
+ };
package/package.json CHANGED
@@ -1,77 +1,72 @@
1
1
  {
2
2
  "name": "redux-connected-devtools",
3
- "version": "0.0.15",
4
- "license": "MIT",
5
- "description": "Styless UI",
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.1",
4
+ "description": "redux-connected-devtools",
14
5
  "scripts": {
15
- "test": "jest --config jest.config.ts",
16
- "test:watch": "jest --watch",
17
- "test:coverage": "jest --coverage",
18
- "lint": "eslint {src,tests,stories}/**/*.{ts,tsx}",
19
- "lint:fix": "yarn lint --fix",
20
- "lint:types": "tsc --noEmit",
21
- "build:cjs": "tsc",
22
- "build:es": "tsc -m esNext --outDir esm",
23
- "build": "node scripts/generate-index.js && npm run clean && npm run scss && yarn build:cjs && yarn build:es && yalc push",
24
- "clean": "rm -rf lib2/* && rm -rf esm2/*",
25
- "watch": "nodemon -x \"npm run build\"",
26
- "scss": "node scripts/build-scss.js"
6
+ "dev": "vite",
7
+ "watch": "webpack --config webpack/webpack.dev.js --watch",
8
+ "build": "vite build & tsc",
9
+ "clean": "rimraf dist",
10
+ "test": "npx jest",
11
+ "style": "prettier --write \"src/**/*.{ts,tsx}\""
12
+ },
13
+ "author": "",
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/dht/redux-connected-devtools.git"
27
18
  },
28
19
  "dependencies": {
29
- "@testing-library/react": "^11.2.5",
30
- "classnames": "^2.3.1",
31
- "date-fns": "^2.22.1",
32
- "igrid": "^0.0.4",
33
- "lodash": "^4.17.21",
34
- "react": "^17.0.2",
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",
41
- "react-window": "^1.8.6",
42
- "redux-connected": "^0.0.11",
43
- "reselect": "^4.0.0",
44
- "sass": "^1.32.8"
20
+ "@redux-devtools/extension": "^3.2.2",
21
+ "bytes": "^3.1.2",
22
+ "classnames": "^2.3.2",
23
+ "dotenv-flow": "^3.2.0",
24
+ "react-redux": "^7.2.6",
25
+ "react-window": "^1.8.8",
26
+ "redux-connected": "^0.0.103",
27
+ "redux-store-generator": "^0.9.89",
28
+ "reselect": "^4.1.5",
29
+ "rollup-plugin-analyzer": "^4.0.0",
30
+ "shared-base": "^0.0.27",
31
+ "styled-components": "^5.3.3",
32
+ "tslib": "^2.3.1"
45
33
  },
46
34
  "peerDependencies": {
47
- "redux-connected": "^0.0.10"
35
+ "react": "^18.2.0",
36
+ "react-dom": "^18.2.0"
48
37
  },
49
38
  "devDependencies": {
50
- "@babel/core": "^7.13.8",
51
- "@jest/types": "^26.6.2",
52
- "@types/classnames": "^2.2.11",
53
- "@types/jest": "^26.0.21",
54
- "@types/lodash": "^4.14.168",
55
- "husky": "^5.2.0",
56
- "jest": "^26.6.3",
57
- "lint-staged": "^10.5.4",
39
+ "@types/chrome": "0.0.158",
40
+ "@types/jest": "^27.0.2",
41
+ "@types/react": "^17.0.0",
42
+ "@types/react-dom": "^17.0.0",
43
+ "@types/styled-components": "^5.1.24",
44
+ "@vitejs/plugin-react": "^1.2.0",
45
+ "copy-webpack-plugin": "^9.0.1",
46
+ "glob": "^7.1.6",
47
+ "jest": "^27.2.1",
58
48
  "prettier": "^2.2.1",
59
- "ts-jest": "^26.5.4",
60
- "tslib": "^2.1.0",
61
- "tslint": "^6.1.3",
62
- "tslint-config-prettier": "^1.18.0",
63
- "typescript": "^4.2.3"
49
+ "react": "^18.2.0",
50
+ "react-dom": "^18.2.0",
51
+ "rimraf": "^3.0.2 ",
52
+ "ts-jest": "^27.0.5",
53
+ "ts-loader": "^8.0.0",
54
+ "typescript": "^4.5.5",
55
+ "vite": "^2.6.4",
56
+ "vite-plugin-dts": "^1.7.1",
57
+ "vite-plugin-react-svg": "^0.1.0",
58
+ "vite-tsconfig-paths": "^3.3.13",
59
+ "webpack": "^5.0.0",
60
+ "webpack-cli": "^4.0.0",
61
+ "webpack-merge": "^5.0.0"
64
62
  },
65
- "husky": {
66
- "hooks": {
67
- "pre-commit": "lint-staged",
68
- "pre-push": "yarn lint && yarn clean && yarn build && yarn test"
63
+ "main": "./dist/redux-connected-devtools.umd.js",
64
+ "module": "./dist/redux-connected-devtools.es.js",
65
+ "types": "./dist/dts/index.d.ts",
66
+ "exports": {
67
+ ".": {
68
+ "import": "./dist/redux-connected-devtools.es.js",
69
+ "require": "./dist/redux-connected-devtools.umd.js"
69
70
  }
70
- },
71
- "lint-staged": {
72
- "src/**/**/*.{ts,tsx}": [
73
- "eslint --fix",
74
- "git add"
75
- ]
76
71
  }
77
72
  }
@@ -0,0 +1,9 @@
1
+ import { sum } from "../sum";
2
+
3
+ test("1 + 1 = 2", () => {
4
+ expect(sum(1, 1)).toBe(2);
5
+ });
6
+
7
+ test("1 + 2 != 2", () => {
8
+ expect(sum(1, 2)).not.toBe(2);
9
+ });
@@ -0,0 +1,2 @@
1
+ .DevInspector-container {
2
+ }
@@ -0,0 +1,7 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ display: flex;
6
+ flex-direction: column;
7
+ `;
@@ -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,2 @@
1
+ .DevList-container {
2
+ }
@@ -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,65 @@
1
+ import React from 'react';
2
+ import { Container, Empty } from './DevList.style';
3
+ import { FixedSizeList as List } from 'react-window';
4
+ import classnames from 'classnames';
5
+
6
+ export type DevListProps = {
7
+ items: Json[];
8
+ row: React.FC<any>;
9
+ selectedRow: any;
10
+ onClick: (item: any) => void;
11
+ };
12
+
13
+ export function DevList(props: DevListProps) {
14
+ const { row: Cmp, items, selectedRow } = props;
15
+
16
+ const Item = (rowInfo: any) => {
17
+ const { index, style } = rowInfo;
18
+
19
+ const item = items[index];
20
+ const className = classnames({ selected: item.id === selectedRow?.id });
21
+
22
+ return (
23
+ <Cmp
24
+ onClick={props.onClick}
25
+ className={className}
26
+ index={index}
27
+ style={style}
28
+ item={item}
29
+ />
30
+ );
31
+ };
32
+
33
+ function renderEmpty() {
34
+ return <Empty>Empty list</Empty>;
35
+ }
36
+
37
+ function renderList() {
38
+ if (items.length === 0) {
39
+ return renderEmpty();
40
+ }
41
+
42
+ return (
43
+ <List
44
+ height={850}
45
+ itemCount={items.length}
46
+ itemSize={68}
47
+ width={350}
48
+ className='list'
49
+ >
50
+ {Item}
51
+ </List>
52
+ );
53
+ }
54
+
55
+ return (
56
+ <Container
57
+ className='DevList-container'
58
+ data-testid='DevList-container'
59
+ >
60
+ {renderList()}
61
+ </Container>
62
+ );
63
+ }
64
+
65
+ export default DevList;
@@ -0,0 +1,2 @@
1
+ .DevMenu-container {
2
+ }
@@ -0,0 +1,56 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ width: 190px;
5
+ ${(props) => props.theme.borderRight('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`
22
+ display: flex;
23
+ flex-direction: row;
24
+ align-items: center;
25
+ padding: 6px 10px;
26
+ font-size: 14px;
27
+ color: rgba(255, 255, 255, 0.89);
28
+ background-color: transparent;
29
+
30
+ &.selected {
31
+ color: gold;
32
+ background-color: rgba(255, 255, 255, 0.05);
33
+ }
34
+
35
+ &:hover {
36
+ background-color: rgba(255, 255, 255, 0.1);
37
+ cursor: pointer;
38
+ }
39
+ `;
40
+
41
+ export const Title = styled.div`
42
+ flex: 1;
43
+ `;
44
+
45
+ export const Badge = styled.div`
46
+ background-color: rgba(0, 0, 80, 0.3);
47
+ padding: 0 4px;
48
+ font-size: 12px;
49
+ border-radius: 7px;
50
+ border: 1px solid #334;
51
+ color: cyan;
52
+ `;
53
+
54
+ export const BadgeTotal = styled(Badge)`
55
+ color: #555;
56
+ `;
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { IDevRoute } from '../../data/devRoutes';
3
+ import {
4
+ Container,
5
+ MenuGroup,
6
+ MenuGroupTitle,
7
+ MenuItem,
8
+ Title,
9
+ Badge,
10
+ BadgeTotal,
11
+ } from './DevMenu.style';
12
+ import classnames from 'classnames';
13
+
14
+ export type DevMenuProps = {
15
+ groups: string[];
16
+ items: IDevRoute[];
17
+ onClick: (route: IDevRoute) => void;
18
+ selectedId: string;
19
+ badges: Record<string, number>;
20
+ badgesTotal: Record<string, number>;
21
+ };
22
+
23
+ export function DevMenu(props: DevMenuProps) {
24
+ const { groups, items, selectedId, badges, badgesTotal } = props;
25
+
26
+ function renderItem(item: IDevRoute) {
27
+ const { title, id } = item;
28
+ const selected = id === selectedId;
29
+
30
+ const badge = badges[id];
31
+ const badgeTotal = badgesTotal[id];
32
+
33
+ return (
34
+ <MenuItem
35
+ key={item.id}
36
+ className={classnames({ selected })}
37
+ onClick={() => props.onClick(item)}
38
+ >
39
+ <Title>{title}</Title>
40
+ {badgeTotal > 0 && badgeTotal !== badge && (
41
+ <BadgeTotal>{badgeTotal}</BadgeTotal>
42
+ )}
43
+ {badge > 0 && <Badge>{badge}</Badge>}
44
+ </MenuItem>
45
+ );
46
+ }
47
+
48
+ function renderItems(groupItems: IDevRoute[]) {
49
+ return groupItems.map((item: IDevRoute) => renderItem(item));
50
+ }
51
+
52
+ function renderGroup(group: string) {
53
+ const groupItems = items.filter((item) => item.group === group);
54
+
55
+ return (
56
+ <MenuGroup key={group}>
57
+ <MenuGroupTitle>{group}</MenuGroupTitle>
58
+ {renderItems(groupItems)}
59
+ </MenuGroup>
60
+ );
61
+ }
62
+
63
+ function renderGroups() {
64
+ return groups.map((group: string) => renderGroup(group));
65
+ }
66
+
67
+ return (
68
+ <Container
69
+ className='DevMenu-container'
70
+ data-testid='DevMenu-container'
71
+ >
72
+ {renderGroups()}
73
+ </Container>
74
+ );
75
+ }
76
+
77
+ export default DevMenu;
@@ -0,0 +1,2 @@
1
+ .DevPanel-container {
2
+ }
@@ -0,0 +1,25 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ color: #eee;
6
+ background-color: #232332;
7
+ display: flex;
8
+ flex-direction: row;
9
+ `;
10
+
11
+ export const Content = styled.div`
12
+ flex: 1;
13
+ background-color: rgba(0, 0, 0, 0.15);
14
+ display: flex;
15
+ flex-direction: column;
16
+ `;
17
+
18
+ export const Actions = styled.div`
19
+ position: absolute;
20
+ bottom: 5px;
21
+ ${(props) => props.theme.left('10px')}
22
+ display: flex;
23
+ flex-direction: row;
24
+ align-items: center;
25
+ `;
@@ -0,0 +1,58 @@
1
+ import DevMenu from '../../containers/DevMenuContainer';
2
+ import React, { useState } from 'react';
3
+ import { Actions, Container, Content } from './DevPanel.style';
4
+ import { devComponents } from '../../data/devComponents';
5
+ import { devRoutes, IDevRoute } from '../../data/devRoutes';
6
+
7
+ export type DevPanelProps = {
8
+ children: JSX.Element | JSX.Element[];
9
+ };
10
+
11
+ export function DevPanel(props: DevPanelProps) {
12
+ const [route, setRoute] = useState<IDevRoute>(devRoutes[0]);
13
+
14
+ function renderRoute() {
15
+ const Cmp = devComponents[route.componentId];
16
+ return <Cmp key={route.id} />;
17
+ }
18
+
19
+ return (
20
+ <Container
21
+ className='DevPanel-container'
22
+ data-testid='DevPanel-container'
23
+ >
24
+ <DevMenu
25
+ selectedId={route.id}
26
+ onClick={(item: IDevRoute) => setRoute(item)}
27
+ />
28
+ <Actions>{props.children}</Actions>
29
+ <Content>{renderRoute()}</Content>
30
+ </Container>
31
+ );
32
+ }
33
+
34
+ /*
35
+ for the chrome extension devtools panel
36
+ TODO: find another way to encapsulate this
37
+
38
+ let bgConnection;
39
+
40
+ function init(id: string) {
41
+ bgConnection = chrome.runtime?.connect({
42
+ name: id,
43
+ });
44
+
45
+ if (bgConnection) {
46
+ bgConnection.onMessage.addListener((message: Json) => {
47
+ console.log('message ->', message);
48
+ });
49
+ }
50
+ }
51
+
52
+ if (chrome) {
53
+ const tabId = String(chrome.devtools?.inspectedWindow.tabId ?? '');
54
+ init(tabId);
55
+ }
56
+ */
57
+
58
+ export default DevPanel;
@@ -0,0 +1,2 @@
1
+ .DevtoolsApp-container {
2
+ }
@@ -0,0 +1,12 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ background-color: #223;
6
+ z-index: 3;
7
+ color: #eee;
8
+ display: flex;
9
+ flex-direction: column;
10
+ min-width: 880px;
11
+ min-height: 880px;
12
+ `;