redux-connected-devtools 0.0.13 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. package/.env +2 -0
  2. package/.prettierrc.js +10 -0
  3. package/.vscode/settings.json +12 -0
  4. package/.vscode/tasks.json +33 -0
  5. package/LICENSE +21 -0
  6. package/README.md +5 -0
  7. package/index.html +58 -0
  8. package/jest.config.js +8 -0
  9. package/package.json +47 -62
  10. package/public/devtools.html +8 -0
  11. package/public/icon.png +0 -0
  12. package/public/manifest.json +29 -0
  13. package/public/options.html +12 -0
  14. package/public/panel.html +39 -0
  15. package/public/popup.html +12 -0
  16. package/src/__tests__/sum.ts +9 -0
  17. package/src/background.ts +49 -0
  18. package/src/components/DevInspector/DevInspector.scss +2 -0
  19. package/src/components/DevInspector/DevInspector.style.tsx +8 -0
  20. package/src/components/DevInspector/DevInspector.tsx +34 -0
  21. package/src/components/DevList/DevList.scss +2 -0
  22. package/src/components/DevList/DevList.style.tsx +34 -0
  23. package/src/components/DevList/DevList.tsx +62 -0
  24. package/src/components/DevMenu/DevMenu.scss +2 -0
  25. package/src/components/DevMenu/DevMenu.style.tsx +53 -0
  26. package/src/components/DevMenu/DevMenu.tsx +76 -0
  27. package/src/components/DevPanel/DevPanel.scss +2 -0
  28. package/src/components/DevPanel/DevPanel.style.tsx +16 -0
  29. package/src/components/DevPanel/DevPanel.tsx +51 -0
  30. package/src/components/JourneyRow/JourneyRow.scss +2 -0
  31. package/src/components/JourneyRow/JourneyRow.style.tsx +46 -0
  32. package/src/components/JourneyRow/JourneyRow.tsx +58 -0
  33. package/src/components/JsonViewer/JsonViewer.scss +2 -0
  34. package/src/components/JsonViewer/JsonViewer.style.tsx +31 -0
  35. package/src/components/JsonViewer/JsonViewer.tsx +24 -0
  36. package/src/components/Lifecycle/Lifecycle.scss +2 -0
  37. package/src/components/Lifecycle/Lifecycle.style.tsx +6 -0
  38. package/src/components/Lifecycle/Lifecycle.tsx +31 -0
  39. package/src/components/LogsViewer/LogsViewer.scss +2 -0
  40. package/src/components/LogsViewer/LogsViewer.style.tsx +5 -0
  41. package/src/components/LogsViewer/LogsViewer.tsx +14 -0
  42. package/src/components/RequestDetails/RequestDetails.scss +2 -0
  43. package/src/components/RequestDetails/RequestDetails.style.tsx +20 -0
  44. package/src/components/RequestDetails/RequestDetails.tsx +60 -0
  45. package/src/components/RequestJourney/RequestJourney.scss +2 -0
  46. package/src/components/RequestJourney/RequestJourney.style.tsx +6 -0
  47. package/src/components/RequestJourney/RequestJourney.tsx +33 -0
  48. package/src/components/RequestRow/RequestRow.scss +2 -0
  49. package/src/components/RequestRow/RequestRow.style.tsx +31 -0
  50. package/src/components/RequestRow/RequestRow.tsx +37 -0
  51. package/src/components/Time/Time.scss +2 -0
  52. package/src/components/Time/Time.style.tsx +17 -0
  53. package/src/components/Time/Time.tsx +25 -0
  54. package/src/containers/DevMenuContainer.tsx +28 -0
  55. package/src/containers/DevPanelContainer.tsx +10 -0
  56. package/src/containers/EndpointConfigsContainer.tsx +12 -0
  57. package/src/containers/EndpointStatusContainer.tsx +12 -0
  58. package/src/containers/GlobalSettingsContainer.tsx +12 -0
  59. package/src/containers/GlobalStatsContainer.tsx +12 -0
  60. package/src/containers/LifecycleApiErrorContainer.tsx +11 -0
  61. package/src/containers/LifecycleGeneralErrorContainer.tsx +11 -0
  62. package/src/containers/LifecycleInQueueContainer.tsx +11 -0
  63. package/src/containers/LifecyclePendingApiContainer.tsx +11 -0
  64. package/src/containers/LifecyclePostActionContainer.tsx +11 -0
  65. package/src/containers/LifecycleReceivedContainer.tsx +11 -0
  66. package/src/content_script.ts +19 -0
  67. package/src/data/devComponents.tsx +25 -0
  68. package/src/data/devRoutes.ts +83 -0
  69. package/src/devtools.tsx +29 -0
  70. package/src/index.ts +1 -0
  71. package/src/injected_script.ts +9 -0
  72. package/src/options.tsx +77 -0
  73. package/src/panel.tsx +30 -0
  74. package/src/popup.tsx +63 -0
  75. package/src/store/initialState.ts +42 -0
  76. package/src/store/selectors.ts +205 -0
  77. package/src/sum.ts +3 -0
  78. package/src/types.ts +1 -0
  79. package/src/utils/date.ts +3 -0
  80. package/tsconfig.json +24 -0
  81. package/vite.config.ts +45 -0
  82. package/webpack/webpack.common.js +46 -0
  83. package/webpack/webpack.dev.js +7 -0
  84. package/webpack/webpack.prod.js +6 -0
  85. package/esm/components/Config/Config.d.ts +0 -6
  86. package/esm/components/Config/Config.js +0 -15
  87. package/esm/components/DevTools/DevTools.d.ts +0 -4
  88. package/esm/components/DevTools/DevTools.js +0 -19
  89. package/esm/components/Dispatcher/Dispatcher.d.ts +0 -8
  90. package/esm/components/Dispatcher/Dispatcher.js +0 -62
  91. package/esm/components/GlobalSettings/GlobalSettings.d.ts +0 -6
  92. package/esm/components/GlobalSettings/GlobalSettings.js +0 -16
  93. package/esm/components/Group/Group.d.ts +0 -9
  94. package/esm/components/Group/Group.js +0 -14
  95. package/esm/components/Json/Json.d.ts +0 -7
  96. package/esm/components/Json/Json.js +0 -9
  97. package/esm/components/Logs/Logs.d.ts +0 -6
  98. package/esm/components/Logs/Logs.js +0 -49
  99. package/esm/components/Monitor/Monitor.d.ts +0 -6
  100. package/esm/components/Monitor/Monitor.js +0 -52
  101. package/esm/components/OverlayManager/OverlayManager.d.ts +0 -6
  102. package/esm/components/OverlayManager/OverlayManager.js +0 -17
  103. package/esm/components/Panel/Panel.d.ts +0 -14
  104. package/esm/components/Panel/Panel.js +0 -46
  105. package/esm/components/Preview/Preview.d.ts +0 -19
  106. package/esm/components/Preview/Preview.js +0 -58
  107. package/esm/components/Redux/Redux.d.ts +0 -6
  108. package/esm/components/Redux/Redux.js +0 -72
  109. package/esm/components/ReduxSettings/ReduxSettings.d.ts +0 -9
  110. package/esm/components/ReduxSettings/ReduxSettings.js +0 -60
  111. package/esm/components/Requests/Requests.d.ts +0 -6
  112. package/esm/components/Requests/Requests.js +0 -61
  113. package/esm/components/Status/Status.d.ts +0 -6
  114. package/esm/components/Status/Status.js +0 -16
  115. package/esm/components/TaskManager/TaskManager.d.ts +0 -9
  116. package/esm/components/TaskManager/TaskManager.js +0 -22
  117. package/esm/components/Toggle/Toggle.d.ts +0 -9
  118. package/esm/components/Toggle/Toggle.js +0 -8
  119. package/esm/components/VirtualList/VirtualList.d.ts +0 -19
  120. package/esm/components/VirtualList/VirtualList.js +0 -30
  121. package/esm/components/Visual/Visual.d.ts +0 -6
  122. package/esm/components/Visual/Visual.js +0 -38
  123. package/esm/components/prefix.d.ts +0 -2
  124. package/esm/components/prefix.js +0 -2
  125. package/esm/data/boxSizes.d.ts +0 -2
  126. package/esm/data/boxSizes.js +0 -10
  127. package/esm/data/dispatcherActions.d.ts +0 -5
  128. package/esm/data/dispatcherActions.js +0 -35
  129. package/esm/data/panels.d.ts +0 -2
  130. package/esm/data/panels.js +0 -74
  131. package/esm/data/panelsArrangements.d.ts +0 -19
  132. package/esm/data/panelsArrangements.js +0 -19
  133. package/esm/data/reduxFilterOptions.d.ts +0 -20
  134. package/esm/data/reduxFilterOptions.js +0 -223
  135. package/esm/data/widgets.d.ts +0 -2
  136. package/esm/data/widgets.js +0 -85
  137. package/esm/hooks/index.d.ts +0 -7
  138. package/esm/hooks/index.js +0 -7
  139. package/esm/hooks/misc/hookState.d.ts +0 -8
  140. package/esm/hooks/misc/hookState.js +0 -6
  141. package/esm/hooks/misc/util.d.ts +0 -5
  142. package/esm/hooks/misc/util.js +0 -21
  143. package/esm/hooks/useBoolean.d.ts +0 -3
  144. package/esm/hooks/useBoolean.js +0 -3
  145. package/esm/hooks/useClickAway.d.ts +0 -3
  146. package/esm/hooks/useClickAway.js +0 -27
  147. package/esm/hooks/useEvent.d.ts +0 -13
  148. package/esm/hooks/useEvent.js +0 -35
  149. package/esm/hooks/useKey.d.ts +0 -12
  150. package/esm/hooks/useKey.js +0 -29
  151. package/esm/hooks/useList.d.ts +0 -57
  152. package/esm/hooks/useList.js +0 -74
  153. package/esm/hooks/useLocalstorage.d.ts +0 -10
  154. package/esm/hooks/useLocalstorage.js +0 -75
  155. package/esm/hooks/usePanels.d.ts +0 -10
  156. package/esm/hooks/usePanels.js +0 -43
  157. package/esm/hooks/useSetState.d.ts +0 -2
  158. package/esm/hooks/useSetState.js +0 -10
  159. package/esm/hooks/useToggle.d.ts +0 -2
  160. package/esm/hooks/useToggle.js +0 -6
  161. package/esm/hooks/useUpdate.d.ts +0 -1
  162. package/esm/hooks/useUpdate.js +0 -6
  163. package/esm/index.d.ts +0 -3
  164. package/esm/index.js +0 -3
  165. package/esm/selectors/selectors.d.ts +0 -21
  166. package/esm/selectors/selectors.js +0 -20
  167. package/esm/theme/devtoolsTheme.d.ts +0 -2
  168. package/esm/theme/devtoolsTheme.js +0 -95
  169. package/esm/utils/filter.d.ts +0 -3
  170. package/esm/utils/filter.js +0 -25
  171. package/esm/utils/localStorage.d.ts +0 -2
  172. package/esm/utils/localStorage.js +0 -21
  173. package/lib/components/Colors copy.css +0 -3
  174. package/lib/components/Colors copy.css.map +0 -1
  175. package/lib/components/Colors.css +0 -3
  176. package/lib/components/Colors.css.map +0 -1
  177. package/lib/components/ColorsDark.css +0 -3
  178. package/lib/components/ColorsDark.css.map +0 -1
  179. package/lib/components/Config/Config.css +0 -15
  180. package/lib/components/Config/Config.css.map +0 -1
  181. package/lib/components/Config/Config.d.ts +0 -6
  182. package/lib/components/Config/Config.js +0 -20
  183. package/lib/components/DevTools/DevTools.css +0 -3
  184. package/lib/components/DevTools/DevTools.css.map +0 -1
  185. package/lib/components/DevTools/DevTools.d.ts +0 -4
  186. package/lib/components/DevTools/DevTools.js +0 -24
  187. package/lib/components/Dispatcher/Dispatcher.css +0 -15
  188. package/lib/components/Dispatcher/Dispatcher.css.map +0 -1
  189. package/lib/components/Dispatcher/Dispatcher.d.ts +0 -8
  190. package/lib/components/Dispatcher/Dispatcher.js +0 -66
  191. package/lib/components/GlobalSettings/GlobalSettings.css +0 -3
  192. package/lib/components/GlobalSettings/GlobalSettings.css.map +0 -1
  193. package/lib/components/GlobalSettings/GlobalSettings.d.ts +0 -6
  194. package/lib/components/GlobalSettings/GlobalSettings.js +0 -21
  195. package/lib/components/Group/Group.css +0 -41
  196. package/lib/components/Group/Group.css.map +0 -1
  197. package/lib/components/Group/Group.d.ts +0 -9
  198. package/lib/components/Group/Group.js +0 -19
  199. package/lib/components/Json/Json.css +0 -3
  200. package/lib/components/Json/Json.css.map +0 -1
  201. package/lib/components/Json/Json.d.ts +0 -7
  202. package/lib/components/Json/Json.js +0 -14
  203. package/lib/components/Logs/Logs.css +0 -3
  204. package/lib/components/Logs/Logs.css.map +0 -1
  205. package/lib/components/Logs/Logs.d.ts +0 -6
  206. package/lib/components/Logs/Logs.js +0 -54
  207. package/lib/components/Monitor/Monitor.css +0 -3
  208. package/lib/components/Monitor/Monitor.css.map +0 -1
  209. package/lib/components/Monitor/Monitor.d.ts +0 -6
  210. package/lib/components/Monitor/Monitor.js +0 -57
  211. package/lib/components/OverlayManager/OverlayManager.css +0 -72
  212. package/lib/components/OverlayManager/OverlayManager.css.map +0 -1
  213. package/lib/components/OverlayManager/OverlayManager.d.ts +0 -6
  214. package/lib/components/OverlayManager/OverlayManager.js +0 -22
  215. package/lib/components/Panel/Panel.css +0 -35
  216. package/lib/components/Panel/Panel.css.map +0 -1
  217. package/lib/components/Panel/Panel.d.ts +0 -14
  218. package/lib/components/Panel/Panel.js +0 -51
  219. package/lib/components/Prefix copy.css +0 -3
  220. package/lib/components/Prefix copy.css.map +0 -1
  221. package/lib/components/Prefix.css +0 -3
  222. package/lib/components/Prefix.css.map +0 -1
  223. package/lib/components/Preview/Preview.css +0 -29
  224. package/lib/components/Preview/Preview.css.map +0 -1
  225. package/lib/components/Preview/Preview.d.ts +0 -19
  226. package/lib/components/Preview/Preview.js +0 -64
  227. package/lib/components/Reading.css +0 -107
  228. package/lib/components/Reading.css.map +0 -1
  229. package/lib/components/Redux/Redux.css +0 -86
  230. package/lib/components/Redux/Redux.css.map +0 -1
  231. package/lib/components/Redux/Redux.d.ts +0 -6
  232. package/lib/components/Redux/Redux.js +0 -77
  233. package/lib/components/ReduxSettings/ReduxSettings.css +0 -10
  234. package/lib/components/ReduxSettings/ReduxSettings.css.map +0 -1
  235. package/lib/components/ReduxSettings/ReduxSettings.d.ts +0 -9
  236. package/lib/components/ReduxSettings/ReduxSettings.js +0 -64
  237. package/lib/components/Requests/Requests.css +0 -8
  238. package/lib/components/Requests/Requests.css.map +0 -1
  239. package/lib/components/Requests/Requests.d.ts +0 -6
  240. package/lib/components/Requests/Requests.js +0 -66
  241. package/lib/components/Status/Status.css +0 -15
  242. package/lib/components/Status/Status.css.map +0 -1
  243. package/lib/components/Status/Status.d.ts +0 -6
  244. package/lib/components/Status/Status.js +0 -21
  245. package/lib/components/TaskManager/TaskManager.css +0 -9
  246. package/lib/components/TaskManager/TaskManager.css.map +0 -1
  247. package/lib/components/TaskManager/TaskManager.d.ts +0 -9
  248. package/lib/components/TaskManager/TaskManager.js +0 -28
  249. package/lib/components/Toggle/Toggle.css +0 -3
  250. package/lib/components/Toggle/Toggle.css.map +0 -1
  251. package/lib/components/Toggle/Toggle.d.ts +0 -9
  252. package/lib/components/Toggle/Toggle.js +0 -13
  253. package/lib/components/Variables.css +0 -3
  254. package/lib/components/Variables.css.map +0 -1
  255. package/lib/components/VirtualList/VirtualList.css +0 -13
  256. package/lib/components/VirtualList/VirtualList.css.map +0 -1
  257. package/lib/components/VirtualList/VirtualList.d.ts +0 -19
  258. package/lib/components/VirtualList/VirtualList.js +0 -35
  259. package/lib/components/Visual/Visual.css +0 -56
  260. package/lib/components/Visual/Visual.css.map +0 -1
  261. package/lib/components/Visual/Visual.d.ts +0 -6
  262. package/lib/components/Visual/Visual.js +0 -43
  263. package/lib/components/prefix.d.ts +0 -2
  264. package/lib/components/prefix.js +0 -5
  265. package/lib/data/boxSizes.d.ts +0 -2
  266. package/lib/data/boxSizes.js +0 -13
  267. package/lib/data/dispatcherActions.d.ts +0 -5
  268. package/lib/data/dispatcherActions.js +0 -38
  269. package/lib/data/panels.d.ts +0 -2
  270. package/lib/data/panels.js +0 -77
  271. package/lib/data/panelsArrangements.d.ts +0 -19
  272. package/lib/data/panelsArrangements.js +0 -22
  273. package/lib/data/reduxFilterOptions.d.ts +0 -20
  274. package/lib/data/reduxFilterOptions.js +0 -227
  275. package/lib/data/widgets.d.ts +0 -2
  276. package/lib/data/widgets.js +0 -89
  277. package/lib/hooks/index.d.ts +0 -7
  278. package/lib/hooks/index.js +0 -17
  279. package/lib/hooks/misc/hookState.d.ts +0 -8
  280. package/lib/hooks/misc/hookState.js +0 -10
  281. package/lib/hooks/misc/util.d.ts +0 -5
  282. package/lib/hooks/misc/util.js +0 -27
  283. package/lib/hooks/useBoolean.d.ts +0 -3
  284. package/lib/hooks/useBoolean.js +0 -7
  285. package/lib/hooks/useClickAway.d.ts +0 -3
  286. package/lib/hooks/useClickAway.js +0 -31
  287. package/lib/hooks/useEvent.d.ts +0 -13
  288. package/lib/hooks/useEvent.js +0 -37
  289. package/lib/hooks/useKey.d.ts +0 -12
  290. package/lib/hooks/useKey.js +0 -34
  291. package/lib/hooks/useList.d.ts +0 -57
  292. package/lib/hooks/useList.js +0 -79
  293. package/lib/hooks/useLocalstorage.d.ts +0 -10
  294. package/lib/hooks/useLocalstorage.js +0 -79
  295. package/lib/hooks/usePanels.d.ts +0 -10
  296. package/lib/hooks/usePanels.js +0 -47
  297. package/lib/hooks/useSetState.d.ts +0 -2
  298. package/lib/hooks/useSetState.js +0 -14
  299. package/lib/hooks/useToggle.d.ts +0 -2
  300. package/lib/hooks/useToggle.js +0 -10
  301. package/lib/hooks/useUpdate.d.ts +0 -1
  302. package/lib/hooks/useUpdate.js +0 -9
  303. package/lib/index.css +0 -488
  304. package/lib/index.css.map +0 -1
  305. package/lib/index.d.ts +0 -3
  306. package/lib/index.js +0 -9
  307. package/lib/selectors/selectors.d.ts +0 -21
  308. package/lib/selectors/selectors.js +0 -24
  309. package/lib/theme/devtoolsTheme.d.ts +0 -2
  310. package/lib/theme/devtoolsTheme.js +0 -97
  311. package/lib/utils/filter.d.ts +0 -3
  312. package/lib/utils/filter.js +0 -29
  313. package/lib/utils/localStorage.d.ts +0 -2
  314. package/lib/utils/localStorage.js +0 -26
@@ -1,57 +0,0 @@
1
- import { IHookStateInitAction, IHookStateSetAction } from './misc/hookState';
2
- export interface ListActions<T> {
3
- /**
4
- * @description Set new list instead old one
5
- */
6
- set: (newList: IHookStateSetAction<T[]>) => void;
7
- /**
8
- * @description Add item(s) at the end of list
9
- */
10
- push: (...items: T[]) => void;
11
- /**
12
- * @description Replace item at given position. If item at given position not exists it will be set.
13
- */
14
- updateAt: (index: number, item: T) => void;
15
- /**
16
- * @description Insert item at given position, all items to the right will be shifted.
17
- */
18
- insertAt: (index: number, item: T) => void;
19
- /**
20
- * @description Replace all items that matches predicate with given one.
21
- */
22
- update: (predicate: (a: T, b: T) => boolean, newItem: T) => void;
23
- /**
24
- * @description Replace first item matching predicate with given one.
25
- */
26
- updateFirst: (predicate: (a: T, b: T) => boolean, newItem: T) => void;
27
- /**
28
- * @description Like `updateFirst` bit in case of predicate miss - pushes item to the list
29
- */
30
- upsert: (predicate: (a: T, b: T) => boolean, newItem: T) => void;
31
- /**
32
- * @description Sort list with given sorting function
33
- */
34
- sort: (compareFn?: (a: T, b: T) => number) => void;
35
- /**
36
- * @description Same as native Array's method
37
- */
38
- filter: (callbackFn: (value: T, index?: number, array?: T[]) => boolean, thisArg?: any) => void;
39
- /**
40
- * @description Removes item at given position. All items to the right from removed will be shifted.
41
- */
42
- removeAt: (index: number) => void;
43
- /**
44
- * @deprecated Use removeAt method instead
45
- */
46
- remove: (index: number) => void;
47
- /**
48
- * @description Make the list empty
49
- */
50
- clear: () => void;
51
- /**
52
- * @description Reset list to initial value
53
- */
54
- reset: () => void;
55
- }
56
- export declare function useList<T>(initialList?: IHookStateInitAction<T[]>): [T[], ListActions<T>];
57
- export default useList;
@@ -1,74 +0,0 @@
1
- import { useMemo, useRef } from 'react';
2
- import useUpdate from './useUpdate';
3
- import { resolveHookState } from './misc/hookState';
4
- export function useList(initialList) {
5
- if (initialList === void 0) { initialList = []; }
6
- var list = useRef(resolveHookState(initialList));
7
- var update = useUpdate();
8
- var actions = useMemo(function () {
9
- var a = {
10
- set: function (newList) {
11
- list.current = resolveHookState(newList, list.current);
12
- update();
13
- },
14
- push: function () {
15
- var items = [];
16
- for (var _i = 0; _i < arguments.length; _i++) {
17
- items[_i] = arguments[_i];
18
- }
19
- items.length && actions.set(function (curr) { return curr.concat(items); });
20
- },
21
- updateAt: function (index, item) {
22
- actions.set(function (curr) {
23
- var arr = curr.slice();
24
- arr[index] = item;
25
- return arr;
26
- });
27
- },
28
- insertAt: function (index, item) {
29
- actions.set(function (curr) {
30
- var arr = curr.slice();
31
- index > arr.length ? (arr[index] = item) : arr.splice(index, 0, item);
32
- return arr;
33
- });
34
- },
35
- update: function (predicate, newItem) {
36
- actions.set(function (curr) { return curr.map(function (item) { return (predicate(item, newItem) ? newItem : item); }); });
37
- },
38
- updateFirst: function (predicate, newItem) {
39
- var index = list.current.findIndex(function (item) { return predicate(item, newItem); });
40
- index >= 0 && actions.updateAt(index, newItem);
41
- },
42
- upsert: function (predicate, newItem) {
43
- var index = list.current.findIndex(function (item) { return predicate(item, newItem); });
44
- index >= 0 ? actions.updateAt(index, newItem) : actions.push(newItem);
45
- },
46
- sort: function (compareFn) {
47
- actions.set(function (curr) { return curr.slice().sort(compareFn); });
48
- },
49
- filter: function (callbackFn, thisArg) {
50
- actions.set(function (curr) { return curr.slice().filter(callbackFn, thisArg); });
51
- },
52
- removeAt: function (index) {
53
- actions.set(function (curr) {
54
- var arr = curr.slice();
55
- arr.splice(index, 1);
56
- return arr;
57
- });
58
- },
59
- clear: function () {
60
- actions.set([]);
61
- },
62
- reset: function () {
63
- actions.set(resolveHookState(initialList).slice());
64
- },
65
- };
66
- /**
67
- * @deprecated Use removeAt method instead
68
- */
69
- a.remove = a.removeAt;
70
- return a;
71
- }, []);
72
- return [list.current, actions];
73
- }
74
- export default useList;
@@ -1,10 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- declare type parserOptions<T> = {
3
- raw: true;
4
- } | {
5
- raw: false;
6
- serializer: (value: T) => string;
7
- deserializer: (value: string) => T;
8
- };
9
- export declare const useLocalstorage: <T>(key: string, initialValue?: T | undefined, options?: parserOptions<T> | undefined) => [T | undefined, Dispatch<SetStateAction<T | undefined>>, () => void];
10
- export default useLocalstorage;
@@ -1,75 +0,0 @@
1
- import { useCallback, useState, useRef, useLayoutEffect } from 'react';
2
- import { isBrowser, noop } from './misc/util';
3
- export var useLocalstorage = function (key, initialValue, options) {
4
- if (!isBrowser) {
5
- return [initialValue, noop, noop];
6
- }
7
- if (!key) {
8
- throw new Error('useLocalStorage key may not be falsy');
9
- }
10
- var deserializer = options ? (options.raw ? function (value) { return value; } : options.deserializer) : JSON.parse;
11
- // eslint-disable-next-line react-hooks/rules-of-hooks
12
- var initializer = useRef(function (key) {
13
- try {
14
- var serializer = options ? (options.raw ? String : options.serializer) : JSON.stringify;
15
- var localStorageValue = localStorage.getItem(key);
16
- if (localStorageValue !== null) {
17
- return deserializer(localStorageValue);
18
- }
19
- else {
20
- initialValue && localStorage.setItem(key, serializer(initialValue));
21
- return initialValue;
22
- }
23
- }
24
- catch (_a) {
25
- // If user is in private mode or has storage restriction
26
- // localStorage can throw. JSON.parse and JSON.stringify
27
- // can throw, too.
28
- return initialValue;
29
- }
30
- });
31
- // eslint-disable-next-line react-hooks/rules-of-hooks
32
- var _a = useState(function () { return initializer.current(key); }), state = _a[0], setState = _a[1];
33
- // eslint-disable-next-line react-hooks/rules-of-hooks
34
- useLayoutEffect(function () { return setState(initializer.current(key)); }, [key]);
35
- // eslint-disable-next-line react-hooks/rules-of-hooks
36
- var set = useCallback(function (valOrFunc) {
37
- try {
38
- var newState = typeof valOrFunc === 'function' ? valOrFunc(state) : valOrFunc;
39
- if (typeof newState === 'undefined')
40
- return;
41
- var value = void 0;
42
- if (options)
43
- if (options.raw)
44
- if (typeof newState === 'string')
45
- value = newState;
46
- else
47
- value = JSON.stringify(newState);
48
- else if (options.serializer)
49
- value = options.serializer(newState);
50
- else
51
- value = JSON.stringify(newState);
52
- else
53
- value = JSON.stringify(newState);
54
- localStorage.setItem(key, value);
55
- setState(deserializer(value));
56
- }
57
- catch (_a) {
58
- // If user is in private mode or has storage restriction
59
- // localStorage can throw. Also JSON.stringify can throw.
60
- }
61
- }, [key, setState]);
62
- // eslint-disable-next-line react-hooks/rules-of-hooks
63
- var remove = useCallback(function () {
64
- try {
65
- localStorage.removeItem(key);
66
- setState(undefined);
67
- }
68
- catch (_a) {
69
- // If user is in private mode or has storage restriction
70
- // localStorage can throw.
71
- }
72
- }, [key, setState]);
73
- return [state, set, remove];
74
- };
75
- export default useLocalstorage;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export interface PanelState {
3
- guid: string;
4
- isWide?: boolean;
5
- }
6
- export interface PanelChildProps {
7
- id: string;
8
- isWide: boolean;
9
- }
10
- export declare function usePanels(Cmp: (props: any) => JSX.Element): JSX.Element;
@@ -1,43 +0,0 @@
1
- import { __assign } from "tslib";
2
- import * as React from 'react';
3
- import { Panel } from '../components/Panel/Panel';
4
- import { useCallback, useEffect, useMemo } from 'react';
5
- import { useList, useLocalStorage, useKey } from 'react-use';
6
- import { loadPanelsArrangement } from '../utils/localStorage';
7
- function uuidv4() {
8
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
9
- var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
10
- return v.toString(16);
11
- });
12
- }
13
- export function usePanels(Cmp) {
14
- var _a = useLocalStorage('PANELS_STATE', []), savedList = _a[0], setSavedList = _a[1];
15
- var _b = useList(savedList), list = _b[0], _c = _b[1], push = _c.push, updateAt = _c.updateAt, removeAt = _c.removeAt;
16
- useEffect(function () {
17
- setSavedList(list);
18
- }, [list, setSavedList]);
19
- useKey('`', function (ev) {
20
- if (ev.ctrlKey) {
21
- loadPanelsArrangement();
22
- }
23
- else {
24
- add();
25
- }
26
- });
27
- var add = useCallback(function () {
28
- var guid = uuidv4();
29
- push({ guid: guid });
30
- }, [push]);
31
- var remove = useCallback(function (guid) {
32
- var index = list.findIndex(function (item) { return item.guid === guid; });
33
- removeAt(index);
34
- }, [removeAt, list]);
35
- var onToggleSize = useCallback(function (guid, isWide) {
36
- var index = list.findIndex(function (item) { return item.guid === guid; });
37
- var updatedItem = __assign(__assign({}, list[index]), { isWide: isWide });
38
- updateAt(index, updatedItem);
39
- }, [list, updateAt]);
40
- var fullJsx = useMemo(function () { return (React.createElement(React.Fragment, null, list.map(function (panelState) { return (React.createElement(Panel, { id: panelState.guid, isWide: panelState.isWide, key: panelState.guid, onToggleSize: function (isWide) { return onToggleSize(panelState.guid, isWide); }, onNew: add, onClose: function () { return remove(panelState.guid); }, showDuplicate: true, showLock: true },
41
- React.createElement(Cmp, { isWide: panelState.isWide, id: panelState.guid }))); }))); }, [list, Cmp, add, remove, onToggleSize]);
42
- return fullJsx;
43
- }
@@ -1,2 +0,0 @@
1
- export declare const useSetState: <T extends object>(initialState?: T) => [T, (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void];
2
- export default useSetState;
@@ -1,10 +0,0 @@
1
- import { useCallback, useState } from 'react';
2
- export var useSetState = function (initialState) {
3
- if (initialState === void 0) { initialState = {}; }
4
- var _a = useState(initialState), state = _a[0], set = _a[1];
5
- var setState = useCallback(function (patch) {
6
- set(function (prevState) { return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch); });
7
- }, []);
8
- return [state, setState];
9
- };
10
- export default useSetState;
@@ -1,2 +0,0 @@
1
- export declare const useToggle: (initialValue: boolean) => [boolean, (nextValue?: any) => void];
2
- export default useToggle;
@@ -1,6 +0,0 @@
1
- import { useReducer } from 'react';
2
- var toggleReducer = function (state, nextValue) { return (typeof nextValue === 'boolean' ? nextValue : !state); };
3
- export var useToggle = function (initialValue) {
4
- return useReducer(toggleReducer, initialValue);
5
- };
6
- export default useToggle;
@@ -1 +0,0 @@
1
- export default function useUpdate(): () => void;
@@ -1,6 +0,0 @@
1
- import { useReducer } from 'react';
2
- var updateReducer = function (num) { return (num + 1) % 1000000; };
3
- export default function useUpdate() {
4
- var _a = useReducer(updateReducer, 0), update = _a[1];
5
- return update;
6
- }
package/esm/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { TaskManagers } from './components/TaskManager/TaskManager';
2
- export { Dispatcher } from './components/Dispatcher/Dispatcher';
3
- export { DevTools } from './components/DevTools/DevTools';
package/esm/index.js DELETED
@@ -1,3 +0,0 @@
1
- export { TaskManagers } from './components/TaskManager/TaskManager';
2
- export { Dispatcher } from './components/Dispatcher/Dispatcher';
3
- export { DevTools } from './components/DevTools/DevTools';
@@ -1,21 +0,0 @@
1
- import { EndpointConfig, SagaState, ApiStatus } from 'redux-connected';
2
- export declare const $i: (i: any) => any;
3
- export declare const $apiRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
4
- export declare const $configsRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
5
- export declare const $requestsRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
6
- export declare const $sagasRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
7
- export declare const $statusRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
8
- export declare const $globalSettingsRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
9
- export declare const $globalStatsRaw: import("reselect").OutputSelector<any, any, (res: any) => any>;
10
- export declare const $endpointsConfig: import("reselect").OutputSelector<any, Record<string, EndpointConfig>, (res: any) => Record<string, EndpointConfig>>;
11
- export declare const $status: import("reselect").OutputSelector<any, Record<string, ApiStatus>, (res: any) => Record<string, ApiStatus>>;
12
- export declare const $sagas: import("reselect").OutputSelector<any, SagaState[], (res: any) => SagaState[]>;
13
- export declare const $actionTypes: import("reselect").OutputSelector<any, any, (res: any) => any>;
14
- export declare const $nodeTypes: import("reselect").OutputSelector<any, any, (res: any) => any>;
15
- export declare const $settingsAndStats: import("reselect").OutputSelector<any, {
16
- settings: any;
17
- stats: any;
18
- }, (res1: any, res2: any) => {
19
- settings: any;
20
- stats: any;
21
- }>;
@@ -1,20 +0,0 @@
1
- import { createSelector } from 'reselect';
2
- export var $i = function (i) { return i; };
3
- export var $apiRaw = createSelector($i, function (state) { return state._api; });
4
- export var $configsRaw = createSelector($apiRaw, function (api) { return api.endpointsConfig; });
5
- export var $requestsRaw = createSelector($apiRaw, function (api) { return api.requests; });
6
- export var $sagasRaw = createSelector($i, function (state) { return state._sagas; });
7
- export var $statusRaw = createSelector($apiRaw, function (api) { return api.status; });
8
- export var $globalSettingsRaw = createSelector($apiRaw, function (api) { return api.apiGlobalSettings; });
9
- export var $globalStatsRaw = createSelector($apiRaw, function (api) { return api.apiGlobalStats; });
10
- export var $endpointsConfig = createSelector($configsRaw, function (configs) { return configs; });
11
- export var $status = createSelector($statusRaw, function (state) { return state; });
12
- export var $sagas = createSelector($sagasRaw, function (sagas) {
13
- return Object.values(sagas);
14
- });
15
- export var $actionTypes = createSelector($apiRaw, function (api) { return api.actionTypes; });
16
- export var $nodeTypes = createSelector($apiRaw, function (api) { return api.nodeTypes; });
17
- export var $settingsAndStats = createSelector($globalSettingsRaw, $globalStatsRaw, function (settings, stats) { return ({
18
- settings: settings,
19
- stats: stats,
20
- }); });
@@ -1,2 +0,0 @@
1
- declare const devtoolsThemeDark: import("@fluentui/react").Theme;
2
- export default devtoolsThemeDark;
@@ -1,95 +0,0 @@
1
- import { createTheme } from '@fluentui/react';
2
- // const devtoolsTheme = createTheme({
3
- // palette: {
4
- // themePrimary: '#0078d4',
5
- // themeLighterAlt: '#eff6fc',
6
- // themeLighter: '#deecf9',
7
- // themeLight: '#c7e0f4',
8
- // themeTertiary: '#71afe5',
9
- // themeSecondary: '#2b88d8',
10
- // themeDarkAlt: '#106ebe',
11
- // themeDark: '#005a9e',
12
- // themeDarker: '#004578',
13
- // neutralLighterAlt: '#faf9f8',
14
- // neutralLighter: '#f3f2f1',
15
- // neutralLight: '#edebe9',
16
- // neutralQuaternaryAlt: '#e1dfdd',
17
- // neutralQuaternary: '#d0d0d0',
18
- // neutralTertiaryAlt: '#c8c6c4',
19
- // neutralTertiary: '#a19f9d',
20
- // neutralSecondary: '#605e5c',
21
- // neutralPrimaryAlt: '#3b3a39',
22
- // neutralPrimary: '#323130',
23
- // neutralDark: '#201f1e',
24
- // black: '#000000',
25
- // white: '#ffffff',
26
- // },
27
- // defaultFontStyle: {
28
- // fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif`,
29
- // fontWeight: 'regular',
30
- // },
31
- // fonts: {
32
- // small: {
33
- // fontSize: '12px',
34
- // },
35
- // medium: {
36
- // fontSize: '14px',
37
- // },
38
- // large: {
39
- // fontSize: '21px',
40
- // fontWeight: 'semibold',
41
- // },
42
- // xLarge: {
43
- // fontSize: '23px',
44
- // fontWeight: 'semibold',
45
- // },
46
- // },
47
- // });
48
- var devtoolsThemeDark = createTheme({
49
- palette: {
50
- themePrimary: '#3a96dd',
51
- themeLighterAlt: '#020609',
52
- themeLighter: '#091823',
53
- themeLight: '#112d43',
54
- themeTertiary: '#235a85',
55
- themeSecondary: '#3385c3',
56
- themeDarkAlt: '#4ba0e1',
57
- themeDark: '#65aee6',
58
- themeDarker: '#8ac2ec',
59
- accent: '#3a96dd',
60
- neutralLighterAlt: '#282838',
61
- neutralLighter: '#313141',
62
- neutralLight: '#3f3f4f',
63
- neutralQuaternaryAlt: '#484858',
64
- neutralQuaternary: '#4f4f5f',
65
- neutralTertiaryAlt: '#6d6d7d',
66
- neutralTertiary: '#c8c8d8',
67
- neutralSecondary: '#d0d0e0',
68
- neutralPrimaryAlt: '#dadaea',
69
- neutralPrimary: '#eeeeee',
70
- neutralDark: '#e4e4e4',
71
- black: '#e8e8e8',
72
- white: '#1f1f2f',
73
- },
74
- defaultFontStyle: {
75
- fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
76
- fontWeight: 'regular',
77
- },
78
- fonts: {
79
- small: {
80
- fontSize: '12px',
81
- },
82
- medium: {
83
- fontSize: '14px',
84
- },
85
- large: {
86
- fontSize: '21px',
87
- fontWeight: 'semibold',
88
- },
89
- xLarge: {
90
- fontSize: '23px',
91
- fontWeight: 'semibold',
92
- },
93
- },
94
- });
95
- export default devtoolsThemeDark;
@@ -1,3 +0,0 @@
1
- import { Reading } from 'redux-connected';
2
- import { ApiInfoPerType } from 'redux-store-generator';
3
- export declare const filterReadings: (readings: Reading[], filters: any, apiInfo: ApiInfoPerType) => Reading[];
@@ -1,25 +0,0 @@
1
- import { __spreadArray } from "tslib";
2
- import { readingsFilters } from '../data/reduxFilterOptions';
3
- // import { SavedFilters } from '../components/ReduxSettings/ReduxSettings';
4
- export var filterReadings = function (readings, filters, apiInfo) {
5
- var includes = [];
6
- var excludes = [];
7
- var checkedFilters = Object.keys(filters)
8
- .filter(function (key) { return filters[key]; })
9
- .sort();
10
- checkedFilters.forEach(function (filterId) {
11
- var filter = readingsFilters.find(function (f) { return f.id === filterId; });
12
- if (filter) {
13
- if (filter.include) {
14
- includes.push(filter.include);
15
- }
16
- if (filter.exclude) {
17
- excludes.push(filter.exclude);
18
- }
19
- }
20
- });
21
- return __spreadArray([], readings).filter(function (reading) {
22
- return (includes.some(function (include) { return include(reading, apiInfo); }) &&
23
- !excludes.some(function (exclude) { return exclude(reading, apiInfo); }));
24
- });
25
- };
@@ -1,2 +0,0 @@
1
- export declare const clearPanelData: () => void;
2
- export declare const loadPanelsArrangement: () => void;
@@ -1,21 +0,0 @@
1
- import { arrangement1 } from '../data/panelsArrangements';
2
- var PANELS_KEYS = ['PANELS_', 'PANEL_', 'TASK_MANAGER_'];
3
- var clearKey = function (key) {
4
- localStorage.removeItem(key);
5
- };
6
- var setKey = function (key, value) {
7
- localStorage.setItem(key, value);
8
- };
9
- var loadLocalStorage = function (json) {
10
- Object.keys(json).forEach(function (key) { return setKey(key, json[key]); });
11
- };
12
- export var clearPanelData = function () {
13
- Object.keys(localStorage)
14
- .filter(function (key) { return PANELS_KEYS.some(function (panelKey) { return key.indexOf(panelKey) === 0; }); })
15
- .forEach(function (key) { return clearKey(key); });
16
- };
17
- export var loadPanelsArrangement = function () {
18
- clearPanelData();
19
- loadLocalStorage(arrangement1);
20
- document.location.reload();
21
- };
@@ -1,3 +0,0 @@
1
-
2
-
3
- /*# sourceMappingURL=Colors%20copy.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":[],"names":[],"mappings":"","file":"Colors%20copy.css"}
@@ -1,3 +0,0 @@
1
-
2
-
3
- /*# sourceMappingURL=Colors.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":[],"names":[],"mappings":"","file":"Colors.css"}
@@ -1,3 +0,0 @@
1
-
2
-
3
- /*# sourceMappingURL=ColorsDark.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":[],"names":[],"mappings":"","file":"ColorsDark.css"}
@@ -1,15 +0,0 @@
1
- .__devtools__Config-container {
2
- max-height: 350px;
3
- overflow: auto;
4
- padding: 10px;
5
- }
6
- .__devtools__Config-container pre {
7
- padding: 5px 20px;
8
- margin: 0;
9
- color: #333;
10
- }
11
- .__devtools__Config-container.wide {
12
- max-height: 710px;
13
- }
14
-
15
- /*# sourceMappingURL=Config.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["file:///Users/dht/projects/redux-connected/packages/redux-connected-devtools/src/components/Config/Config.scss"],"names":[],"mappings":"AAEA;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAGJ;EACI","file":"Config.css"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface ConfigProps {
3
- isWide: boolean;
4
- }
5
- export declare function Config(props: ConfigProps): JSX.Element;
6
- export default Config;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Config = void 0;
4
- var tslib_1 = require("tslib");
5
- var React = tslib_1.__importStar(require("react"));
6
- var classnames_1 = tslib_1.__importDefault(require("classnames"));
7
- var Json_1 = tslib_1.__importDefault(require("../Json/Json"));
8
- var selectors = tslib_1.__importStar(require("../../selectors/selectors"));
9
- var react_redux_1 = require("react-redux");
10
- function Config(props) {
11
- var isWide = props.isWide;
12
- var configs = react_redux_1.useSelector(selectors.$endpointsConfig);
13
- var className = classnames_1.default('__devtools__Config-container', {
14
- wide: isWide,
15
- });
16
- return (React.createElement("div", { className: className },
17
- React.createElement(Json_1.default, { value: configs })));
18
- }
19
- exports.Config = Config;
20
- exports.default = Config;
@@ -1,3 +0,0 @@
1
-
2
-
3
- /*# sourceMappingURL=DevTools.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":[],"names":[],"mappings":"","file":"DevTools.css"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- declare type DevToolsProps = {};
3
- export declare function DevTools(_props: DevToolsProps): JSX.Element;
4
- export default DevTools;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DevTools = void 0;
4
- var tslib_1 = require("tslib");
5
- var React = tslib_1.__importStar(require("react"));
6
- var igrid_1 = require("igrid");
7
- var panels_1 = require("../../data/panels");
8
- var widgets_1 = require("../../data/widgets");
9
- function DevTools(_props) {
10
- function renderPanel(id) {
11
- var widget = widgets_1.widgets[id];
12
- if (!widget || !widget.component) {
13
- return React.createElement("div", null);
14
- }
15
- return React.createElement("div", { className: "panel" }, widget.component);
16
- }
17
- function renderInfo(_id) {
18
- return (React.createElement("div", { className: "panel" }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean emper congue. Mauris eget congue magna. Aliquam aliquam lorem lectus, eget auctor nisl fringilla eu. Donec semper tincidunt nibh, a hendrerit neque posuere in. Ut a augue libero."));
19
- }
20
- return (React.createElement("div", { className: "ExamplePick-container" },
21
- React.createElement(igrid_1.Grid, { defaultPanels: panels_1.panels, renderPanel: renderPanel, renderInfo: renderInfo, widgets: widgets_1.widgets })));
22
- }
23
- exports.DevTools = DevTools;
24
- exports.default = DevTools;