testeranto 0.47.34 → 0.47.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/.nvmrc +1 -0
  2. package/Bundle.Dockerfile +45 -0
  3. package/README.md +86 -11
  4. package/Report.Dockerfile +43 -0
  5. package/dist/cjs-shim.js +12 -0
  6. package/dist/common/Features.js +3 -37
  7. package/dist/common/Init.js +30 -0
  8. package/dist/common/Node.js +15 -66
  9. package/dist/common/PM/index.js +7 -0
  10. package/dist/common/PM/main.js +641 -0
  11. package/dist/common/PM/node.js +88 -0
  12. package/dist/common/PM/web.js +132 -0
  13. package/dist/common/Project.js +109 -637
  14. package/dist/common/Puppeteer.js +103 -0
  15. package/dist/common/Reporter.js +112 -0
  16. package/dist/common/Scheduler.js +1 -0
  17. package/dist/common/SubPackages/puppeteer.js +21 -0
  18. package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
  19. package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
  20. package/dist/common/SubPackages/react/jsx/index.js +25 -0
  21. package/dist/common/SubPackages/react/jsx/node.js +10 -0
  22. package/dist/common/SubPackages/react/jsx/web.js +10 -0
  23. package/dist/common/{subPackages/react-dom/jsx → SubPackages/react-dom/component}/node.js +6 -6
  24. package/dist/common/SubPackages/react-dom/component/web.js +93 -0
  25. package/dist/common/SubPackages/react-dom/jsx/index.js +2 -0
  26. package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
  27. package/dist/common/SubPackages/react-dom/jsx/web.js +118 -0
  28. package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +44 -0
  29. package/dist/common/SubPackages/react-test-renderer/component/index.js +2 -0
  30. package/dist/common/{subPackages/react-test-renderer/component/index.js → SubPackages/react-test-renderer/component/interface.js} +23 -33
  31. package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
  32. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
  33. package/dist/common/SubPackages/react-test-renderer/fc/node.js +50 -0
  34. package/dist/common/SubPackages/react-test-renderer/fc/web.js +50 -0
  35. package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
  36. package/dist/common/SubPackages/react-test-renderer/jsx/node.js +10 -0
  37. package/dist/common/SubPackages/react-test-renderer/jsx/web.js +10 -0
  38. package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +42 -0
  39. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
  40. package/dist/common/TaskManBackEnd.js +174 -0
  41. package/dist/common/Web.js +31 -108
  42. package/dist/common/esbuildConfigs/features.js +14 -0
  43. package/dist/common/esbuildConfigs/index.js +21 -0
  44. package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
  45. package/dist/common/esbuildConfigs/node.js +39 -0
  46. package/dist/common/esbuildConfigs/report.js +14 -0
  47. package/dist/common/esbuildConfigs/tests.js +13 -0
  48. package/dist/common/esbuildConfigs/web.js +57 -0
  49. package/dist/common/lib/abstractBase.js +553 -0
  50. package/dist/common/lib/basebuilder.js +79 -0
  51. package/dist/common/lib/classBuilder.js +42 -0
  52. package/dist/common/lib/core.js +75 -0
  53. package/dist/common/lib/index.js +22 -0
  54. package/dist/common/lib/types.js +2 -0
  55. package/dist/common/mongooseSchemas.js +56 -0
  56. package/dist/common/preload.js +14 -27
  57. package/dist/common/puppeteerConfiger.js +24 -0
  58. package/dist/common/report.html.js +31 -0
  59. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  60. package/dist/common/utils.js +16 -0
  61. package/dist/common/web.html.js +22 -0
  62. package/dist/module/ExampleTab.js +112 -0
  63. package/dist/module/Features.js +2 -35
  64. package/dist/module/Init.js +25 -0
  65. package/dist/module/Node.js +15 -66
  66. package/dist/module/PM/index.js +3 -0
  67. package/dist/module/PM/main.js +611 -0
  68. package/dist/module/PM/node.js +81 -0
  69. package/dist/module/PM/web.js +125 -0
  70. package/dist/module/Project.js +110 -615
  71. package/dist/module/Puppeteer.js +98 -0
  72. package/dist/module/Reporter.js +107 -0
  73. package/dist/module/Scheduler.js +1 -0
  74. package/dist/module/SubPackages/puppeteer.js +16 -0
  75. package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
  76. package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
  77. package/dist/module/SubPackages/react/jsx/index.js +19 -0
  78. package/dist/module/SubPackages/react/jsx/node.js +5 -0
  79. package/dist/module/SubPackages/react/jsx/web.js +5 -0
  80. package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +7 -7
  81. package/dist/module/SubPackages/react-dom/component/web.js +88 -0
  82. package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
  83. package/dist/module/SubPackages/react-dom/jsx/web.js +90 -0
  84. package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +16 -0
  85. package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -0
  86. package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
  87. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
  88. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
  89. package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
  90. package/dist/module/SubPackages/react-test-renderer/fc/web.js +22 -0
  91. package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
  92. package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
  93. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
  94. package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +16 -0
  95. package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
  96. package/dist/module/TaskManBackEnd.js +169 -0
  97. package/dist/module/TaskManFrontEnd.js +600 -0
  98. package/dist/module/Web.js +31 -108
  99. package/dist/module/esbuildConfigs/features.js +12 -0
  100. package/dist/module/esbuildConfigs/index.js +19 -0
  101. package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
  102. package/dist/module/esbuildConfigs/node.js +34 -0
  103. package/dist/module/esbuildConfigs/report.js +14 -0
  104. package/dist/module/esbuildConfigs/tests.js +11 -0
  105. package/dist/module/esbuildConfigs/web.js +52 -0
  106. package/dist/module/lib/abstractBase.js +545 -0
  107. package/dist/module/lib/basebuilder.js +75 -0
  108. package/dist/module/lib/classBuilder.js +38 -0
  109. package/dist/module/lib/core.js +72 -0
  110. package/dist/module/lib/index.js +18 -0
  111. package/dist/module/lib/types.js +1 -0
  112. package/dist/module/mongooseSchemas.js +50 -0
  113. package/dist/module/preload.js +15 -26
  114. package/dist/module/puppeteerConfiger.js +19 -0
  115. package/dist/module/report.html.js +29 -0
  116. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  117. package/dist/module/utils.js +9 -0
  118. package/dist/module/web.html.js +20 -0
  119. package/dist/prebuild/TaskManBackEnd.mjs +174 -0
  120. package/dist/prebuild/TaskManFrontEnd.css +12301 -0
  121. package/dist/prebuild/TaskManFrontEnd.js +81264 -0
  122. package/dist/types/Features.d.ts +1 -34
  123. package/dist/types/Init.d.ts +2 -0
  124. package/dist/types/Node.d.ts +5 -11
  125. package/dist/types/PM/index.d.ts +20 -0
  126. package/dist/types/PM/main.d.ts +31 -0
  127. package/dist/types/PM/node.d.ts +27 -0
  128. package/dist/types/PM/web.d.ts +25 -0
  129. package/dist/types/Project.d.ts +3 -29
  130. package/dist/types/Puppeteer.d.ts +2 -0
  131. package/dist/types/Reporter.d.ts +1 -0
  132. package/dist/types/Scheduler.d.ts +0 -0
  133. package/dist/types/SubPackages/puppeteer.d.ts +6 -0
  134. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  135. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  136. package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
  137. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  138. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  139. package/dist/types/SubPackages/react-dom/component/node.d.ts +12 -0
  140. package/dist/types/SubPackages/react-dom/component/web.d.ts +11 -0
  141. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
  142. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
  143. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  144. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
  145. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
  146. package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
  147. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +8 -0
  148. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +3 -0
  149. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  150. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +8 -0
  151. package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
  152. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +8 -0
  153. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +8 -0
  154. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
  155. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
  156. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
  157. package/dist/types/TaskManBackEnd.d.ts +3 -0
  158. package/dist/types/Types.d.ts +49 -16
  159. package/dist/types/Web.d.ts +5 -11
  160. package/dist/types/esbuildConfigs/features.d.ts +4 -0
  161. package/dist/types/esbuildConfigs/index.d.ts +4 -0
  162. package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
  163. package/dist/types/esbuildConfigs/node.d.ts +4 -0
  164. package/dist/types/esbuildConfigs/report.d.ts +0 -0
  165. package/dist/types/esbuildConfigs/tests.d.ts +4 -0
  166. package/dist/types/esbuildConfigs/web.d.ts +4 -0
  167. package/dist/types/lib/abstractBase.d.ts +104 -0
  168. package/dist/types/lib/basebuilder.d.ts +27 -0
  169. package/dist/types/lib/classBuilder.d.ts +7 -0
  170. package/dist/types/lib/core.d.ts +8 -0
  171. package/dist/types/lib/index.d.ts +59 -0
  172. package/dist/types/lib/types.d.ts +62 -0
  173. package/dist/types/mongooseSchemas.d.ts +124 -0
  174. package/dist/types/preload.d.ts +0 -1
  175. package/dist/types/puppeteerConfiger.d.ts +4 -0
  176. package/dist/types/report.html.d.ts +2 -0
  177. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  178. package/dist/types/utils.d.ts +2 -0
  179. package/dist/types/web.html.d.ts +2 -0
  180. package/index.html +30 -0
  181. package/package.json +151 -79
  182. package/src/ExampleTab.tsx +219 -0
  183. package/src/Features.ts +2 -58
  184. package/src/Init.ts +51 -0
  185. package/src/Node.ts +71 -157
  186. package/src/PM/index.ts +25 -0
  187. package/src/PM/main.ts +830 -0
  188. package/src/PM/node.ts +128 -0
  189. package/src/PM/web.ts +166 -0
  190. package/src/Project.ts +158 -797
  191. package/src/Puppeteer.ts +141 -0
  192. package/src/Reporter.ts +126 -0
  193. package/src/Scheduler.ts +0 -0
  194. package/src/SubPackages/puppeteer.ts +51 -0
  195. package/src/SubPackages/react/component/node.ts +43 -0
  196. package/src/SubPackages/react/component/web.ts +43 -0
  197. package/src/SubPackages/react/jsx/index.ts +42 -0
  198. package/src/SubPackages/react/jsx/node.ts +26 -0
  199. package/src/SubPackages/react/jsx/web.ts +30 -0
  200. package/src/{subPackages → SubPackages}/react-dom/component/node.ts +24 -44
  201. package/src/SubPackages/react-dom/component/web.ts +143 -0
  202. package/src/SubPackages/react-dom/jsx/index.ts +6 -0
  203. package/src/SubPackages/react-dom/jsx/node.ts +68 -0
  204. package/src/SubPackages/react-dom/jsx/web.ts +139 -0
  205. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +38 -0
  206. package/src/SubPackages/react-test-renderer/component/index.ts +23 -0
  207. package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
  208. package/src/SubPackages/react-test-renderer/component/node.ts +17 -0
  209. package/src/SubPackages/react-test-renderer/component/web.ts +17 -0
  210. package/src/SubPackages/react-test-renderer/fc/node.ts +49 -0
  211. package/src/SubPackages/react-test-renderer/fc/web.ts +48 -0
  212. package/src/SubPackages/react-test-renderer/jsx/index.ts +48 -0
  213. package/src/SubPackages/react-test-renderer/jsx/node.ts +20 -0
  214. package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
  215. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +40 -0
  216. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
  217. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
  218. package/src/TaskManBackEnd.ts +228 -0
  219. package/src/TaskManFrontEnd.tsx +1222 -0
  220. package/src/Types.ts +222 -17
  221. package/src/Web.ts +86 -217
  222. package/src/cjs-shim.js +12 -0
  223. package/src/esbuildConfigs/features.ts +17 -0
  224. package/src/esbuildConfigs/index.ts +23 -0
  225. package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
  226. package/src/esbuildConfigs/node.ts +62 -0
  227. package/src/esbuildConfigs/report.ts +15 -0
  228. package/src/esbuildConfigs/tests.ts +14 -0
  229. package/src/esbuildConfigs/web.ts +79 -0
  230. package/src/lib/abstractBase.ts +910 -0
  231. package/src/lib/basebuilder.ts +214 -0
  232. package/src/lib/classBuilder.ts +131 -0
  233. package/src/lib/core.ts +224 -0
  234. package/src/lib/index.ts +226 -0
  235. package/src/lib/types.ts +303 -0
  236. package/src/mongooseSchemas.ts +105 -0
  237. package/src/preload.ts +14 -28
  238. package/src/puppeteerConfiger.ts +26 -0
  239. package/src/report.html.ts +29 -0
  240. package/src/utils.ts +15 -0
  241. package/src/web.html.ts +20 -0
  242. package/tests/Rectangle.test.ts +189 -0
  243. package/trash/TaskMan.Dockerfile +23 -0
  244. package/trash/TaskMan1.Dockerfile +43 -0
  245. package/trash/devBot.dockerfile +12 -0
  246. package/trash/docker-compose-dev.yml +9 -0
  247. package/trash/docker-compose-prod.yml +18 -0
  248. package/trash/electronBuild.ts +32 -0
  249. package/tsconfig.json +18 -6
  250. package/tsconfig.module.json +14 -4
  251. package/tsconfig.types.json +13 -4
  252. package/dist/common/NodeWriter.js +0 -56
  253. package/dist/common/core.js +0 -396
  254. package/dist/common/electron.js +0 -52
  255. package/dist/common/subPackages/react/jsx/index.js +0 -26
  256. package/dist/common/subPackages/react-dom/component/node.js +0 -101
  257. package/dist/common/subPackages/react-dom/component/web.js +0 -61
  258. package/dist/common/subPackages/react-dom/jsx/web.js +0 -76
  259. package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
  260. package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
  261. package/dist/module/NodeWriter.js +0 -50
  262. package/dist/module/Report.js +0 -186
  263. package/dist/module/core.js +0 -387
  264. package/dist/module/electron.js +0 -47
  265. package/dist/module/subPackages/react/jsx/index.js +0 -22
  266. package/dist/module/subPackages/react/jsx/node.js +0 -5
  267. package/dist/module/subPackages/react/jsx/web.js +0 -5
  268. package/dist/module/subPackages/react-dom/component/web.js +0 -56
  269. package/dist/module/subPackages/react-dom/jsx/node.js +0 -93
  270. package/dist/module/subPackages/react-dom/jsx/web.js +0 -48
  271. package/dist/module/subPackages/react-test-renderer/component/index.js +0 -52
  272. package/dist/types/NodeWriter.d.ts +0 -2
  273. package/dist/types/core.d.ts +0 -220
  274. package/dist/types/subPackages/react/component/node.d.ts +0 -12
  275. package/dist/types/subPackages/react/component/web.d.ts +0 -12
  276. package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
  277. package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
  278. package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
  279. package/dist/types/subPackages/react-dom/component/node.d.ts +0 -14
  280. package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
  281. package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -14
  282. package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -15
  283. package/dist/types/subPackages/react-test-renderer/component/index.d.ts +0 -20
  284. package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
  285. package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
  286. package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
  287. package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
  288. package/src/NodeWriter.ts +0 -72
  289. package/src/Report.tsx +0 -392
  290. package/src/core.ts +0 -1396
  291. package/src/electron.ts +0 -59
  292. package/src/subPackages/react/component/node.ts +0 -75
  293. package/src/subPackages/react/component/web.ts +0 -80
  294. package/src/subPackages/react/jsx/index.ts +0 -64
  295. package/src/subPackages/react/jsx/node.ts +0 -29
  296. package/src/subPackages/react/jsx/web.ts +0 -29
  297. package/src/subPackages/react-dom/component/web.ts +0 -129
  298. package/src/subPackages/react-dom/jsx/node.ts +0 -150
  299. package/src/subPackages/react-dom/jsx/web.ts +0 -117
  300. package/src/subPackages/react-test-renderer/component/index.ts +0 -101
  301. package/src/subPackages/react-test-renderer/component/node.ts +0 -30
  302. package/src/subPackages/react-test-renderer/component/web.ts +0 -30
  303. package/src/subPackages/react-test-renderer/fc/node.tsx +0 -77
  304. package/src/subPackages/react-test-renderer/jsx/index.ts +0 -51
  305. package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
  306. package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
  307. /package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
  308. /package/dist/{types/electron.d.ts → module/SubPackages/react-dom/jsx/index.js} +0 -0
  309. /package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
@@ -0,0 +1,1222 @@
1
+ import { ReactFlow } from '@xyflow/react';
2
+ import { Button, ButtonGroup, Container, Dropdown, DropdownButton, Form, Navbar, NavDropdown, Table, ToggleButton } from "react-bootstrap";
3
+ import mongoose from "mongoose";
4
+ import React, { useEffect, useState } from "react";
5
+ import ReactDom from "react-dom/client";
6
+ import Col from 'react-bootstrap/Col';
7
+ import Nav from 'react-bootstrap/Nav';
8
+ import Row from 'react-bootstrap/Row';
9
+ import Tab from 'react-bootstrap/Tab';
10
+ import Tabs from 'react-bootstrap/Tabs';
11
+ import { BrowserRouter as Router, Route, NavLink, Routes } from 'react-router-dom';
12
+ import { UncontrolledBoard, KanbanBoard } from '@caldwell619/react-kanban'
13
+ import '@caldwell619/react-kanban/dist/styles.css'
14
+ import { Gantt, Task, EventOption, StylingOption, ViewMode, DisplayOption } from 'gantt-task-react';
15
+ import "gantt-task-react/dist/index.css";
16
+ import 'bootstrap/dist/css/bootstrap.min.css';
17
+ import '@xyflow/react/dist/style.css';
18
+ import { IRunTime } from "./lib/types";
19
+
20
+ import {
21
+ IFeature, featuresSchema, ganttSchema, IKanban, IUser, kanbanSchema, userSchema,
22
+ IGantt,
23
+ IChatCatHuddle,
24
+ IChatCatRoom
25
+ } from "./mongooseSchemas";
26
+
27
+ const InputElementString = ({ tree, name }: { tree: any, name: string }) => {
28
+ console.log("mark string", tree)
29
+
30
+ // return <Form.Control type="email" placeholder={name} />
31
+ return <Form.Group className="mb-3" controlId={name}>
32
+ <Form.Label>{name}</Form.Label>
33
+ <Form.Control placeholder={name} />
34
+
35
+ </Form.Group>
36
+ };
37
+
38
+ const InputElementArray = ({ tree, name }: { tree: any, name: string }) => {
39
+ console.log("mark5", tree)
40
+
41
+ return <Form.Control type="email" placeholder="Enter email" />
42
+ };
43
+
44
+ const InputElementObject = ({ tree, name }: { tree: any, name?: string }) => {
45
+ // const x = schema.path(path);
46
+
47
+ console.log("mark4", tree, tree.properties)
48
+
49
+ return <div>
50
+ {
51
+ ...Object.keys(tree.properties).map((name) => {
52
+
53
+ console.log("mark6", name, tree.properties[name].type)
54
+
55
+ if (tree.properties[name].type === "object") {
56
+ return <InputElementObject tree={tree.properties[name]} name={name} ></InputElementObject >
57
+ }
58
+
59
+ if (tree.properties[name].type === "string") {
60
+ return <InputElementString tree={tree.properties[name]} name={name} ></InputElementString >
61
+ }
62
+
63
+ if (Array.isArray(tree.properties[name].type)) {
64
+ return <InputElementArray tree={tree.properties[name]} name={name} ></InputElementArray >
65
+ }
66
+
67
+ })
68
+ }
69
+ </div >
70
+
71
+
72
+ // // if (tree.type === "string") {
73
+ // // return <InputElementString tree={tree.properties[path]} path={path}></InputElementString >
74
+ // // }
75
+
76
+
77
+ // return <div>IDK</div>
78
+ // return <Form.Group>
79
+ // {/* {
80
+ // schema.get(path)
81
+ // } */}
82
+ // </Form.Group>
83
+
84
+ };
85
+
86
+
87
+ const InputForm = ({ schema, path }: { schema: mongoose.Schema, path?: string }) => {
88
+
89
+ return <Form.Group>
90
+
91
+ <InputElementObject tree={schema.toJSONSchema()} ></InputElementObject>
92
+
93
+
94
+ </Form.Group>
95
+
96
+ };
97
+
98
+ const Crud2 = ({ collection, collectionName, schema }: { collection: any, collectionName: string, schema: mongoose.Schema }) => {
99
+ return <div>
100
+ {/* <h3>{collectionName}</h3> */}
101
+ <Table striped bordered hover>
102
+ <thead>
103
+ <tr>
104
+ <th>id</th>
105
+ <th></th>
106
+
107
+ </tr>
108
+ </thead>
109
+ <tbody>
110
+ <tr>
111
+
112
+ <td>add new record</td>
113
+ <td>
114
+ <Form>
115
+ {/* <Form.Group className="mb-3" controlId="formBasicEmail">
116
+ <Form.Label>Email address</Form.Label>
117
+ <Form.Control type="email" placeholder="Enter email" />
118
+ <Form.Text className="text-muted">
119
+ We'll never share your email with anyone else.
120
+ </Form.Text>
121
+ </Form.Group>
122
+
123
+ <Form.Group className="mb-3" controlId="formBasicPassword">
124
+ <Form.Label>Password</Form.Label>
125
+ <Form.Control type="password" placeholder="Password" />
126
+ </Form.Group>
127
+ <Form.Group className="mb-3" controlId="formBasicCheckbox">
128
+ <Form.Check type="checkbox" label="Check me out" />
129
+ </Form.Group> */}
130
+
131
+
132
+ <InputForm schema={schema}></InputForm>
133
+
134
+
135
+ <Button variant="primary" type="submit">
136
+ Submit
137
+ </Button>
138
+
139
+
140
+ </Form>
141
+ </td>
142
+
143
+ </tr>
144
+ {
145
+ collection.map((doc) => {
146
+ return <tr>
147
+ <td>{doc._id}</td>
148
+ <td>{JSON.stringify(doc, null, 2)}</td>
149
+ </tr>
150
+ })
151
+ }
152
+
153
+
154
+ </tbody>
155
+ </Table>
156
+ </div>
157
+ }
158
+
159
+ const Features = ({ features, tests, results, adminMode }) => {
160
+ if (!adminMode) return <Tab.Container id="left-tabs-example5" defaultActiveKey="feature-0">
161
+ <Row>
162
+ <Col sm={4}>
163
+ <Nav variant="pills" className="flex-column">
164
+ {(features).map((feature, ndx) => <Nav.Item key={ndx}>
165
+ <Nav.Link eventKey={`feature/${feature._id}`}>
166
+ {feature.title}
167
+ </Nav.Link>
168
+ </Nav.Item>)}
169
+ </Nav>
170
+ </Col>
171
+ <Col sm={8}>
172
+ <Tab.Content>
173
+ {(features).map((feature, ndx) => {
174
+ // const feature = features[featureKey];
175
+ return (
176
+ <Tab.Pane eventKey={`feature/${feature._id}`} key={ndx}>
177
+ <pre>{JSON.stringify(feature, null, 2)}</pre>
178
+
179
+ {/* <pre>{JSON.stringify(results, null, 2)}</pre> */}
180
+
181
+ <ol>
182
+ {
183
+ results.filter((result) => {
184
+ console.log("mark1", (result.testresults.src));
185
+ // return test._id === feature._id
186
+ // (result.testresults.givens.features || []).includes(feature._id)
187
+
188
+ // console.log("ark3", new Set(result.testresults.givens.reduce((mm: string[], el) => {
189
+ // mm = mm.concat(el.features)
190
+
191
+ // // console.log("mark2", el);
192
+
193
+ // // el.features.forEach((feature) => {
194
+ // // mm.add(feature)
195
+ // // });
196
+ // return mm;
197
+ // }, [])));
198
+
199
+
200
+ return new Set(result.testresults.givens.reduce((mm: string[], el) => {
201
+ mm = mm.concat(el.features)
202
+
203
+ // console.log("mark2", el);
204
+
205
+ // el.features.forEach((feature) => {
206
+ // mm.add(feature)
207
+ // });
208
+ return mm;
209
+ }, [])).has(feature._id)
210
+
211
+ }).map((result) => {
212
+ return <li>
213
+ {/* <pre>{JSON.stringify(test.src, null, 2)}</pre> */}
214
+ {result.src}
215
+ </li>
216
+ })
217
+ }
218
+ </ol>
219
+
220
+ </Tab.Pane>
221
+ )
222
+ }
223
+ )}
224
+ </Tab.Content>
225
+ </Col>
226
+ </Row>
227
+ </Tab.Container>;
228
+
229
+
230
+ return <Crud2 schema={featuresSchema} collectionName="features" collection={features}></Crud2>
231
+ };
232
+
233
+ const Tests = ({ tests, results, features, adminMode }) => {
234
+ if (!adminMode) return <Tab.Container id="left-tabs-example5" defaultActiveKey="feature-0">
235
+ <Row>
236
+ <Col sm={4}>
237
+ <Nav variant="pills" className="flex-column">
238
+ {
239
+ tests.tests.map((t, ndx) =>
240
+ <Nav.Item key={ndx}>
241
+ <Nav.Link eventKey={`test-${ndx}`}>
242
+ {t[0]} - {t[1]}
243
+ </Nav.Link>
244
+ </Nav.Item>
245
+ )
246
+ }
247
+ </Nav>
248
+ </Col>
249
+
250
+ <Col sm={4}>
251
+ <Tab.Content>
252
+
253
+ {
254
+ tests.tests.map((t, ndx) =>
255
+ <Tab.Pane eventKey={`test-${ndx}`}>
256
+ {/* <pre>{JSON.stringify(t, null, 2)}</pre> */}
257
+ {/* <pre>{JSON.stringify(state.results, null, 2)}</pre> */}
258
+ <pre>{JSON.stringify(Object.entries(results).filter(([k, v]: [string, { src: string }]) => {
259
+ console.log(v.src, tests.tests[ndx][0])
260
+ return v.src === tests.tests[ndx][0]
261
+ }), null, 2)}</pre>
262
+
263
+ {/* {tests.tests.map((t, ndx) => {
264
+ return (
265
+ <Tab.Pane eventKey={`feature-${ndx}`} key={ndx}>
266
+ <pre>{JSON.stringify(t, null, 2)}</pre>
267
+ </Tab.Pane>
268
+ )
269
+ }
270
+ )} */}
271
+
272
+ </Tab.Pane>
273
+
274
+ )
275
+ }
276
+
277
+
278
+
279
+
280
+ </Tab.Content>
281
+ </Col>
282
+
283
+
284
+ </Row>
285
+ </Tab.Container>
286
+
287
+ // return <Crud collectionName="features" collection={features}></Crud>
288
+ return <div></div>
289
+
290
+ };
291
+
292
+ const TaskMan = ({ setAdminMode, users, adminMode, children }) => {
293
+ return <div>
294
+ <div className="row">
295
+ <Navbar expand="md" className="bg-body-tertiary">
296
+ <Container fluid>
297
+ {/* <Navbar.Brand href="#home">testeranto</Navbar.Brand> */}
298
+ <Navbar.Toggle aria-controls="basic-navbar-nav" />
299
+ <Navbar.Collapse id="basic-navbar-nav">
300
+ <Nav className="me-auto">
301
+ < Tabs defaultActiveKey="/tests" >
302
+ {/* <Tab eventKey="tests" title={<NavLink to="/tests" className="nav-link">Tests</NavLink>}></Tab> */}
303
+ <Tab eventKey="features"
304
+
305
+ title={<NavLink to="/taskMan/features" className="nav-link">Features</NavLink>
306
+
307
+
308
+ }></Tab>
309
+
310
+ <Tab eventKey="kanban" title={<NavLink to="/taskMan/kanban" className="nav-link">Kanban</NavLink>}></Tab>
311
+ <Tab eventKey="gantt" title={<NavLink to="/taskMan/gantt" className="nav-link">Gantt</NavLink>}></Tab>
312
+ {/* <Tab eventKey="users" title={<NavLink to="/taskMan/users" className="nav-link">Users</NavLink>}></Tab> */}
313
+ </Tabs>
314
+
315
+
316
+
317
+ </Nav>
318
+
319
+ <NavDropdown align="end" title="User" id="basic-nav-dropdown">
320
+ {
321
+ users.map((user) => {
322
+ return <NavDropdown.Item href="#action/3.1">
323
+ {user.email}
324
+ </NavDropdown.Item>
325
+ })
326
+ }
327
+ {/* <NavDropdown.Item href="#action/3.1">Action</NavDropdown.Item>
328
+ <NavDropdown.Item href="#action/3.2">
329
+ Another action
330
+ </NavDropdown.Item>
331
+ <NavDropdown.Item href="#action/3.3">Something</NavDropdown.Item> */}
332
+ <NavDropdown.Divider />
333
+ <NavDropdown.Item href="#action/3.4">
334
+ all
335
+ </NavDropdown.Item>
336
+ </NavDropdown>
337
+
338
+ <ButtonGroup className="mb-2">
339
+ <ToggleButton
340
+ id="toggle-check"
341
+ type="checkbox"
342
+ variant="outline-primary"
343
+ checked={adminMode}
344
+ value="1"
345
+ onChange={(e) => setAdminMode(!adminMode)}
346
+ >
347
+ ⚙️
348
+ </ToggleButton>
349
+ </ButtonGroup>
350
+
351
+ </Navbar.Collapse>
352
+ </Container>
353
+
354
+
355
+ </Navbar>
356
+ </div>
357
+ {children}
358
+ </div>
359
+
360
+ };
361
+
362
+ const DocGal = ({ setAdminMode, users, adminMode, children }) => {
363
+ return <div>
364
+ <div className="row">
365
+ <Navbar expand="md" className="bg-body-tertiary">
366
+ <Container fluid>
367
+
368
+ <Navbar.Toggle aria-controls="basic-navbar-nav" />
369
+ <Navbar.Collapse id="docGal-navbar-nav">
370
+ <Nav className="me-auto">
371
+ < Tabs defaultActiveKey="/fs" >
372
+
373
+ <Tab eventKey="fs" title={<NavLink to="/docGal/fs" className="nav-link">FS</NavLink>}></Tab>
374
+ <Tab eventKey="db" title={<NavLink to="/docGal/db" className="nav-link">DB</NavLink>}></Tab>
375
+
376
+ </Tabs>
377
+
378
+
379
+
380
+ </Nav>
381
+
382
+
383
+
384
+ </Navbar.Collapse>
385
+ </Container>
386
+
387
+
388
+ </Navbar>
389
+ </div>
390
+ {children}
391
+ </div>
392
+
393
+ };
394
+
395
+ const ChatCat = ({ children }: {
396
+ children: any,
397
+ chatCatRooms: ({ _id: string } & IChatCatRoom)[],
398
+ chatCatHuddles: ({ _id: string } & any)[],
399
+ users: ({ _id: string } & IUser)[],
400
+
401
+ }) => {
402
+ return <div>
403
+ <div className="row">
404
+ <Navbar expand="md" className="bg-body-tertiary">
405
+ <Container fluid>
406
+ <Navbar.Toggle aria-controls="basic-navbar-nav" />
407
+ <Navbar.Collapse id="basic-navbar-nav">
408
+ <Nav className="me-auto">
409
+ < Tabs defaultActiveKey="/chatCat/mostRecent" >
410
+ <Tab eventKey="/chatCat/mostRecent" title={<NavLink to="/chatCat/mostRecent" className="nav-link">Most Recent</NavLink>}></Tab>
411
+ <Tab eventKey="/chatCat/bySubject" title={<NavLink to="/chatCat/bySubject" className="nav-link">by Subject</NavLink>}></Tab>
412
+ </Tabs>
413
+
414
+
415
+
416
+ </Nav>
417
+
418
+
419
+
420
+
421
+ </Navbar.Collapse>
422
+ </Container>
423
+
424
+
425
+ </Navbar>
426
+ </div>
427
+ {children}
428
+ </div>
429
+ // return <div>
430
+ // <Row>
431
+ // <Col sm={2}>
432
+
433
+ // <Nav variant="pills" className="flex-column">
434
+
435
+ // <h4>Rooms</h4>
436
+
437
+ // {(chatCatRooms).map((room, ndx) => <Nav.Item key={ndx}>
438
+ // <Nav.Link eventKey={`chatCat/room/${room._id}`}>
439
+ // {room.name}
440
+ // </Nav.Link>
441
+ // </Nav.Item>)}
442
+
443
+ // <h4>Huddles</h4>
444
+
445
+ // {(chatCatHuddles).map((huddle, ndx) => <Nav.Item key={ndx}>
446
+ // <Nav.Link eventKey={`chatCat/user${huddle._id}`}>
447
+ // {huddle.name}
448
+ // </Nav.Link>
449
+ // </Nav.Item>)}
450
+
451
+ // <h4>Users</h4>
452
+
453
+ // {(users).map((user, ndx) => <Nav.Item key={ndx}>
454
+ // <Nav.Link eventKey={`chatCat/user/${user._id}`}>
455
+ // {user.email}
456
+ // </Nav.Link>
457
+ // </Nav.Item>)}
458
+ // </Nav>
459
+ // </Col>
460
+
461
+
462
+ // <Col sm={10}>
463
+ // <Tab.Content>
464
+ // {(chatCatRooms).map((channel, ndx) => {
465
+ // return (
466
+ // <Tab.Pane eventKey={`chatCat/${channel}`} key={ndx}>
467
+ // <pre>{JSON.stringify(channel, null, 2)}</pre>
468
+
469
+
470
+ // </Tab.Pane>
471
+ // )
472
+ // }
473
+ // )}
474
+ // </Tab.Content>
475
+ // </Col>
476
+ // </Row>
477
+ // </div>
478
+
479
+ };
480
+
481
+ const WhoThat = ({ children }: {
482
+ children: any,
483
+ // chatCatRooms: ({ _id: string } & IChatCatRoom)[],
484
+ // chatCatHuddles: ({ _id: string } & any)[],
485
+ users: ({ _id: string } & IUser)[],
486
+
487
+ }) => {
488
+ return <div>
489
+ <div className="row">
490
+ <Navbar expand="md" className="bg-body-tertiary">
491
+ <Container fluid>
492
+ <Navbar.Toggle aria-controls="basic-navbar-nav" />
493
+ <Navbar.Collapse id="basic-navbar-nav">
494
+ <Nav className="me-auto">
495
+ < Tabs defaultActiveKey="/whoThat/people" >
496
+ <Tab eventKey="/whoThat/people" title={<NavLink to="/whoThat/people" className="nav-link">People</NavLink>}></Tab>
497
+ <Tab eventKey="/whoThat/groups" title={<NavLink to="/whoThat/groups" className="nav-link">Groups</NavLink>}></Tab>
498
+ <Tab eventKey="/whoThat/org" title={<NavLink to="/whoThat/org" className="nav-link">Org</NavLink>}></Tab>
499
+ </Tabs>
500
+
501
+
502
+
503
+ </Nav>
504
+
505
+
506
+ <ButtonGroup className="mb-2">
507
+ <ToggleButton
508
+ id="toggle-check"
509
+ type="checkbox"
510
+ variant="outline-primary"
511
+ checked={false}
512
+ value="1"
513
+ // onChange={(e) => setAdminMode(!adminMode)}
514
+ >
515
+ ⚙️
516
+ </ToggleButton>
517
+ </ButtonGroup>
518
+ </Navbar.Collapse>
519
+
520
+
521
+
522
+ </Container>
523
+
524
+
525
+ </Navbar>
526
+ </div>
527
+ {children}
528
+ </div>
529
+ // return <div>
530
+ // <Row>
531
+ // <Col sm={2}>
532
+
533
+ // <Nav variant="pills" className="flex-column">
534
+
535
+ // <h4>Rooms</h4>
536
+
537
+ // {(chatCatRooms).map((room, ndx) => <Nav.Item key={ndx}>
538
+ // <Nav.Link eventKey={`chatCat/room/${room._id}`}>
539
+ // {room.name}
540
+ // </Nav.Link>
541
+ // </Nav.Item>)}
542
+
543
+ // <h4>Huddles</h4>
544
+
545
+ // {(chatCatHuddles).map((huddle, ndx) => <Nav.Item key={ndx}>
546
+ // <Nav.Link eventKey={`chatCat/user${huddle._id}`}>
547
+ // {huddle.name}
548
+ // </Nav.Link>
549
+ // </Nav.Item>)}
550
+
551
+ // <h4>Users</h4>
552
+
553
+ // {(users).map((user, ndx) => <Nav.Item key={ndx}>
554
+ // <Nav.Link eventKey={`chatCat/user/${user._id}`}>
555
+ // {user.email}
556
+ // </Nav.Link>
557
+ // </Nav.Item>)}
558
+ // </Nav>
559
+ // </Col>
560
+
561
+
562
+ // <Col sm={10}>
563
+ // <Tab.Content>
564
+ // {(chatCatRooms).map((channel, ndx) => {
565
+ // return (
566
+ // <Tab.Pane eventKey={`chatCat/${channel}`} key={ndx}>
567
+ // <pre>{JSON.stringify(channel, null, 2)}</pre>
568
+
569
+
570
+ // </Tab.Pane>
571
+ // )
572
+ // }
573
+ // )}
574
+ // </Tab.Content>
575
+ // </Col>
576
+ // </Row>
577
+ // </div>
578
+
579
+ };
580
+
581
+ const Kanban = ({
582
+ features, tests, results, kanban, openNewColumnModal, adminMode
583
+ }: {
584
+ features: IFeature[],
585
+ tests: any,
586
+ kanban: (IKanban & { _id: string })[],
587
+ results: any,
588
+ openNewColumnModal: any,
589
+ adminMode: boolean,
590
+ }) => {
591
+
592
+ const board: KanbanBoard<any> = {
593
+ columns: [
594
+ {
595
+ id: -1,
596
+ title: 'BACKLOG',
597
+ cards: features.filter((f) => f.state === undefined)
598
+ },
599
+ {
600
+ id: 0,
601
+ title: 'ARCHIVE',
602
+ cards: features.filter((f) => f.state === "ARCHIVED")
603
+ },
604
+ ...kanban.map((kb) => {
605
+ return {
606
+ id: kb._id,
607
+ title: kb.title,
608
+ cards: features.filter((f) => f.state === kb._id)
609
+ }
610
+ }),
611
+ // {
612
+ // id: 1,
613
+ // title: 'Backlog',
614
+ // cards: [
615
+ // {
616
+ // id: 1,
617
+ // title: 'Add card',
618
+ // description: 'Add capability to add a card in a column'
619
+ // },
620
+ // ]
621
+ // },
622
+
623
+ ]
624
+ }
625
+
626
+ if (!adminMode) return <Tab.Container id="left-tabs-example8" defaultActiveKey="feature-0">
627
+
628
+
629
+ <Row>
630
+ <Col sm={12}>
631
+ <button onClick={() => {
632
+ openNewColumnModal()
633
+ }}>new column</button>
634
+ <UncontrolledBoard initialBoard={board} />
635
+ </Col>
636
+ </Row>
637
+ </Tab.Container>
638
+
639
+ return <Crud2 schema={kanbanSchema} collectionName="kanban" collection={kanban}></Crud2>
640
+
641
+ };
642
+
643
+ const GanttChart = ({ gantt, tests, results, features, adminMode }: {
644
+ gantt: IGantt[],
645
+ tests: any,
646
+ results: any,
647
+ features: any,
648
+ adminMode: boolean
649
+
650
+ }) => {
651
+ if (!adminMode) {
652
+ if (gantt.length > 1) {
653
+ return <Row>
654
+ <Col sm={12}>
655
+ <Gantt tasks={(gantt || []).map((g: IGantt & { _id: string }) => {
656
+ console.log(g)
657
+ let task: Task =
658
+ {
659
+ start: new Date(2020, 1, 1),
660
+ end: new Date(2020, 1, 2),
661
+ name: g.name,
662
+ id: g._id,
663
+ type: g.type,
664
+ progress: 45,
665
+ isDisabled: false,
666
+ styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' },
667
+ };
668
+
669
+ console.log(task)
670
+ return task;
671
+ })} />
672
+ </Col>
673
+ </Row>
674
+ } else {
675
+ return <p>you need to add some gantt items</p>
676
+ }
677
+ }
678
+
679
+ return <Crud2 schema={ganttSchema} collectionName="gantt" collection={gantt}></Crud2>
680
+
681
+ };
682
+
683
+ const Users = ({ users, adminMode }) => {
684
+ if (!adminMode) return <Tab.Container id="left-tabs-example9" defaultActiveKey="feature-0">
685
+ <Row>
686
+ <Col sm={12}>
687
+ <ul>
688
+ {
689
+ users.map((user) => {
690
+ return <li>
691
+ {user.email}
692
+ </li>
693
+ })
694
+ }
695
+ </ul>
696
+ </Col>
697
+ </Row>
698
+ </Tab.Container>
699
+
700
+ return <Crud2 schema={userSchema} collectionName="users" collection={users} ></Crud2>
701
+
702
+ };
703
+
704
+ const OrgChart = ({ users, adminMode }) => {
705
+
706
+ const initialNodes = [
707
+ { id: '1', position: { x: 0, y: 0 }, data: { label: '1' } },
708
+ { id: '2', position: { x: 0, y: 100 }, data: { label: '2' } },
709
+ ];
710
+ const initialEdges = [{ id: 'e1-2', source: '1', target: '2' }];
711
+
712
+
713
+ if (!adminMode) return <Tab.Container id="left-tabs-example9" defaultActiveKey="feature-0">
714
+ <Row>
715
+ <Col sm={12}>
716
+ <div style={{ width: '100vw', height: '100vh' }}>
717
+ <ReactFlow nodes={[
718
+ ...initialNodes,
719
+ ...users.map((user) => {
720
+ return ({ id: user._id, position: { x: 0, y: 0 }, data: { label: user.email } })
721
+ })
722
+ ]} edges={initialEdges} />
723
+ </div>
724
+ </Col>
725
+ </Row>
726
+ </Tab.Container>
727
+
728
+ return <Crud2 schema={userSchema} collectionName="users" collection={users} ></Crud2>
729
+
730
+ };
731
+
732
+ const DocGalFsNav = ({ docGalFs, filepath }: {
733
+ filepath: string
734
+ docGalFs: {
735
+ name: string,
736
+ children: any[]
737
+ }[]
738
+ }) => {
739
+
740
+ return <div>
741
+ <ul>
742
+ {
743
+ ...docGalFs.map((lm) => {
744
+ return <li>
745
+ <a href={`${filepath}/${lm.name}`}>{lm.name}</a>
746
+ {/* <p>{lm.name}</p>
747
+ <p>{lm.name}</p> */}
748
+ {
749
+ lm.children.length > 0 && <DocGalFsNav docGalFs={lm.children} filepath={`${filepath}/${lm.name}`} />
750
+ }
751
+ </li>
752
+ })
753
+ }
754
+ </ul>
755
+ </div>
756
+ }
757
+
758
+ const DocGalFs = ({
759
+ docGalFs,
760
+ // tests, results, features, adminMode
761
+ }: {
762
+ docGalFs: any[],
763
+ // tests: any,
764
+ // results: any,
765
+ // features: any,
766
+ // adminMode: boolean
767
+
768
+ }) => {
769
+ // return <Row>
770
+ // <Col sm={12}>
771
+ // {JSON.stringify(docGalFs, null, 2)}
772
+ // </Col>
773
+ // </Row>
774
+
775
+ return <Row>
776
+ <Col sm={4}>
777
+ <DocGalFsNav docGalFs={docGalFs} filepath="" />
778
+ {/* {JSON.stringify(docGalFs, null, 2)} */}
779
+ {/* <Nav variant="pills" className="flex-column">
780
+ {
781
+ docGalFs.map((t, ndx) =>
782
+ <Nav.Item key={ndx}>
783
+ <Nav.Link eventKey={`docGalFs-${ndx}`}>
784
+ {t}
785
+ </Nav.Link>
786
+ </Nav.Item>
787
+ )
788
+ }
789
+ </Nav> */}
790
+ </Col>
791
+
792
+ <Col sm={4}>
793
+ <Tab.Content>
794
+
795
+
796
+
797
+
798
+
799
+
800
+ </Tab.Content>
801
+ </Col>
802
+
803
+
804
+ </Row>
805
+
806
+ };
807
+
808
+ const DocGalDb = ({
809
+ // gantt, tests, results, features, adminMode
810
+ }: {
811
+ // gantt: IGantt[],
812
+ // tests: any,
813
+ // results: any,
814
+ // features: any,
815
+ // adminMode: boolean
816
+
817
+ }) => {
818
+ return <Row>
819
+ <Col sm={12}>
820
+ DocGalDb
821
+ </Col>
822
+ </Row>
823
+
824
+ };
825
+
826
+ const ChatCatPeople = ({ users }) => {
827
+ return <Tab.Container id="left-tabs-example9" defaultActiveKey="feature-0">
828
+ <Row>
829
+ <Col sm={12}>
830
+ <ul>
831
+ {
832
+ users.map((user) => {
833
+ return <li>
834
+ {user.email}
835
+ </li>
836
+ })
837
+ }
838
+ </ul>
839
+ </Col>
840
+ </Row>
841
+ </Tab.Container>
842
+ };
843
+
844
+ const ChatCatConversations = ({ users, conversations }: {
845
+ users: any,
846
+ conversations: any;
847
+ }) => {
848
+ // return <Tab.Container id="left-tabs-example9" defaultActiveKey="feature-0">
849
+ // <Row>
850
+ // <Col sm={12}>
851
+ // <ul>
852
+ // {
853
+ // users.map((user) => {
854
+ // return <li>
855
+ // {user.email}
856
+ // </li>
857
+ // })
858
+ // }
859
+ // </ul>
860
+ // </Col>
861
+ // </Row>
862
+ // </Tab.Container>
863
+ return <Row>
864
+ <Navbar expand="md" className="bg-body-tertiary">
865
+ <Container fluid>
866
+ <Navbar.Toggle aria-controls="basic-navbar-nav" />
867
+ <Navbar.Collapse id="basic-navbar-nav">
868
+ <Nav className="me-auto">
869
+ < Tabs defaultActiveKey="/chatCat/mostRecent" >
870
+ <Tab eventKey="/chatCat/mostRecent" title={<NavLink to="/chatCat/mostRecent" className="nav-link">Feature</NavLink>}></Tab>
871
+ <Tab eventKey="/chatCat/bySubject" title={<NavLink to="/chatCat/bySubject" className="nav-link">Kanban</NavLink>}></Tab>
872
+ <Tab eventKey="/chatCat/bySubject" title={<NavLink to="/chatCat/bySubject" className="nav-link">Gantt</NavLink>}></Tab>
873
+ <Tab eventKey="/chatCat/bySubject" title={<NavLink to="/chatCat/bySubject" className="nav-link">FS docs</NavLink>}></Tab>
874
+ <Tab eventKey="/chatCat/bySubject" title={<NavLink to="/chatCat/bySubject" className="nav-link">DB docs</NavLink>}></Tab>
875
+ <Tab eventKey="/chatCat/bySubject" title={<NavLink to="/chatCat/bySubject" className="nav-link">Groups</NavLink>}></Tab>
876
+ </Tabs>
877
+
878
+
879
+
880
+ </Nav>
881
+
882
+ <ButtonGroup className="mb-2">
883
+ <ToggleButton
884
+ id="toggle-check"
885
+ type="checkbox"
886
+ variant="outline-primary"
887
+ checked={false}
888
+ value="1"
889
+ // onChange={(e) => setAdminMode(!adminMode)}
890
+ >
891
+ ⚙️
892
+ </ToggleButton>
893
+ </ButtonGroup>
894
+
895
+
896
+ </Navbar.Collapse>
897
+ </Container>
898
+
899
+
900
+ </Navbar>
901
+ </Row>
902
+ };
903
+
904
+ const ChatCatRooms = ({ users, rooms }) => {
905
+ return <Tab.Container id="left-tabs-example9" defaultActiveKey="feature-0">
906
+ <Row>
907
+ <Col sm={12}>
908
+ <ul>
909
+ {
910
+ users.map((user) => {
911
+ return <li>
912
+ {user.email}
913
+ </li>
914
+ })
915
+ }
916
+ </ul>
917
+ </Col>
918
+ </Row>
919
+ </Tab.Container>
920
+ };
921
+
922
+ const Report = () => {
923
+
924
+ const [state, setState] = useState<{
925
+ tests: any[],
926
+ buildDir: string,
927
+ results: any
928
+ }>({
929
+ tests: [],
930
+ buildDir: "",
931
+ results: {}
932
+ });
933
+
934
+ const [tests, setTests] = useState<
935
+ {
936
+ tests: any[],
937
+ buildDir: string,
938
+ }
939
+
940
+ >
941
+ ({
942
+ tests: [],
943
+ buildDir: ""
944
+ });
945
+
946
+ const [features, setFeatures] = useState<IFeature[]>(
947
+ []
948
+ );
949
+
950
+
951
+ const [kanban, setKanban] = useState<any[]>(
952
+ []
953
+ );
954
+
955
+ const importResults = async () => {
956
+ const config = await (await fetch("./testeranto.json")).json();
957
+ const results = await Promise.all(config.tests.map((test) => {
958
+ return new Promise(async (res, rej) => {
959
+ const src: string = test[0];
960
+ const runtime: IRunTime = test[1];
961
+ const s: string = [tests.buildDir, runtime as string].concat(src.split(".").slice(0, - 1).join(".")).join("/");
962
+ const exitcode = await (await fetch("/docs" + "/" + s + "/exitcode")).text()
963
+ const log = await (await fetch("/docs" + "/" + s + "/log.txt")).text()
964
+ const testresults = await (await fetch("/docs" + "/" + s + "/tests.json")).json()
965
+ const manifest = await (await fetch("/docs" + "/" + s + "/manifest.json")).json()
966
+
967
+ res({ src, exitcode, log, testresults, manifest })
968
+ })
969
+ }))
970
+
971
+ setState({ tests: config.tests as any, results, buildDir: config.buildDir })
972
+ };
973
+
974
+ const importFeatures = async () => {
975
+ fetch('http://localhost:3000/features.json')
976
+ .then(response => response.json())
977
+ .then(json => setFeatures(json))
978
+ .catch(error => console.error(error));
979
+
980
+ };
981
+ useEffect(() => { importFeatures(); }, []);
982
+
983
+ const importKanban = async () => {
984
+ fetch('http://localhost:3000/kanbans.json')
985
+ .then(response => response.json())
986
+ .then(json => setKanban(json))
987
+ .catch(error => console.error(error));
988
+
989
+ };
990
+ useEffect(() => { importKanban(); }, []);
991
+
992
+ const [users, setUsers] = useState<({ _id: string } & IUser)[]>(
993
+ []
994
+ );
995
+
996
+
997
+ const importUsers = async () => {
998
+ fetch('http://localhost:3000/users.json')
999
+ .then(response => response.json())
1000
+ .then(json => setUsers(json))
1001
+ .catch(error => console.error(error));
1002
+
1003
+ };
1004
+ useEffect(() => { importUsers(); }, []);
1005
+
1006
+
1007
+ const [gantt, setGantt] = useState<IGantt[]>(
1008
+ []
1009
+ );
1010
+
1011
+ const importGantt = async () => {
1012
+ fetch('http://localhost:3000/gantts.json')
1013
+ .then(response => response.json())
1014
+ .then(json => setGantt(json))
1015
+ .catch(error => console.error(error));
1016
+
1017
+ };
1018
+ useEffect(() => { importGantt(); }, []);
1019
+
1020
+ const importTests = async () => {
1021
+ const x = await fetch("./testeranto.json")
1022
+ const y = await x.json();
1023
+ setTests(y as any);
1024
+ };
1025
+
1026
+ useEffect(() => { importResults(); }, []);
1027
+
1028
+ useEffect(() => { importTests(); }, []);
1029
+
1030
+ const [activeKey, setActiveKey] = useState('home');
1031
+
1032
+ const handleSelect = (selectedKey) => {
1033
+ setActiveKey(selectedKey);
1034
+ };
1035
+
1036
+
1037
+ const [adminMode, setAdminMode] = useState(false);
1038
+
1039
+ const [docGalFs, setDocGalFs] = useState<IUser[]>(
1040
+ []
1041
+ );
1042
+
1043
+ const importFs = async () => {
1044
+ fetch('http://localhost:3000/docGal/fs.json')
1045
+ .then(response => response.json())
1046
+ .then(json => setDocGalFs(json))
1047
+ .catch(error => console.error(error));
1048
+
1049
+ };
1050
+ useEffect(() => { importFs(); }, []);
1051
+
1052
+
1053
+ const [chatCatRooms, setChatCatRooms] = useState<({ _id: string } & IChatCatRoom)[]>(
1054
+ []
1055
+ );
1056
+
1057
+ const importChatCatRooms = async () => {
1058
+ fetch('http://localhost:3000/rooms.json')
1059
+ .then(response => response.json())
1060
+ .then(json => setChatCatRooms(json))
1061
+ .catch(error => console.error(error));
1062
+ };
1063
+ useEffect(() => { importChatCatRooms(); }, []);
1064
+
1065
+
1066
+ return (
1067
+ <div>
1068
+ <style>
1069
+ {`
1070
+ pre, code, p {
1071
+ max-width: 40rem;
1072
+ text-wrap: auto;
1073
+ }
1074
+ footer {
1075
+ background-color: lightgray;
1076
+ margin: 0.5rem;
1077
+ padding: 0.5rem;
1078
+ position: fixed;
1079
+ bottom: 0;
1080
+ right: 0;
1081
+ }
1082
+
1083
+ #root > div > ul {
1084
+
1085
+ top: 0;
1086
+ }
1087
+ `}
1088
+ </style>
1089
+
1090
+ <Router>
1091
+
1092
+ <Navbar expand="md" className="bg-body-tertiary">
1093
+ <Container fluid>
1094
+ {/* <Navbar.Brand href="#home">testeranto</Navbar.Brand> */}
1095
+ <Navbar.Toggle aria-controls="basic-navbar-nav" />
1096
+ <Navbar.Collapse id="basic-navbar-nav">
1097
+ <Nav className="me-auto">
1098
+ {/* <Nav.Link href="#home">Tests</Nav.Link>
1099
+ <Nav.Link href="#link">TaskMan</Nav.Link> */}
1100
+
1101
+ < Tabs defaultActiveKey="/tests" >
1102
+
1103
+
1104
+ <Tab eventKey="tests" title={<NavLink to="/tests" className="nav-link">TestPup</NavLink>}></Tab>
1105
+ <Tab eventKey="taskMan" title={<NavLink to="/taskMan/features" className="nav-link">TaskMan</NavLink>}></Tab>
1106
+ <Tab eventKey="docGal" title={<NavLink to="/docGal/fs" className="nav-link">DocGal</NavLink>}></Tab>
1107
+ <Tab eventKey="chatCat" title={<NavLink to="/chatCat/mostRecent" className="nav-link">ChatCat</NavLink>}></Tab>
1108
+ <Tab eventKey="whoThat" title={<NavLink to="/whoThat/people" className="nav-link">WhoThat</NavLink>}></Tab>
1109
+ </Tabs>
1110
+
1111
+
1112
+
1113
+ </Nav>
1114
+
1115
+
1116
+
1117
+ </Navbar.Collapse>
1118
+
1119
+ <ButtonGroup className="mb-2">
1120
+ <Button
1121
+ id="login"
1122
+
1123
+
1124
+
1125
+ value="1"
1126
+ onChange={(e) => setAdminMode(!adminMode)}
1127
+ >
1128
+ Login
1129
+ </Button>
1130
+ </ButtonGroup>
1131
+
1132
+ </Container>
1133
+ </Navbar>
1134
+
1135
+ <Routes>
1136
+ <Route path="/tests" element={<Tests adminMode={adminMode} features={features} results={state.results} tests={tests} />} />
1137
+
1138
+ <Route path="/chatCat/mostRecent" element={
1139
+ <ChatCat
1140
+ chatCatRooms={chatCatRooms}
1141
+ chatCatHuddles={[]}
1142
+ users={users}
1143
+ >
1144
+ <ChatCatPeople users={users} />
1145
+
1146
+ </ChatCat>} />
1147
+
1148
+ <Route path="/chatCat/bySubject" element={
1149
+ <ChatCat
1150
+ chatCatRooms={chatCatRooms}
1151
+ chatCatHuddles={[]}
1152
+ users={users}
1153
+ >
1154
+ <ChatCatConversations users={users} conversations={[]} />
1155
+
1156
+ </ChatCat>} />
1157
+
1158
+ <Route path="/docGal/fs" element={
1159
+ <DocGal adminMode={adminMode} setAdminMode={setAdminMode} users={users} >
1160
+ <DocGalFs docGalFs={docGalFs} />
1161
+ </DocGal>} />
1162
+
1163
+ <Route path="/docGal/db" element={
1164
+ <DocGal adminMode={adminMode} setAdminMode={setAdminMode} users={users} >
1165
+ <DocGalDb />
1166
+ </DocGal>} />
1167
+
1168
+ <Route path="/taskMan/features" element={
1169
+ <TaskMan adminMode={adminMode} setAdminMode={setAdminMode} users={users} >
1170
+ <Features adminMode={adminMode} features={features} results={state.results} tests={tests} />
1171
+ </TaskMan>} />
1172
+
1173
+ <Route path="/taskMan/kanban" element={
1174
+ <TaskMan adminMode={adminMode} setAdminMode={setAdminMode} users={users} >
1175
+ <Kanban
1176
+ adminMode={adminMode} kanban={kanban} results={state.results} tests={tests} features={features}
1177
+ openNewColumnModal={() => {
1178
+ }}
1179
+ />
1180
+ </TaskMan>} />
1181
+
1182
+ <Route path="/taskMan/gantt" element={
1183
+ <TaskMan adminMode={adminMode} setAdminMode={setAdminMode} users={users} >
1184
+ <GanttChart
1185
+ adminMode={adminMode} gantt={gantt} features={features} results={state.results} tests={tests} />
1186
+ </TaskMan>
1187
+ } />
1188
+ <Route path="/whoThat/people" element={
1189
+ <WhoThat users={users} >
1190
+ <Users adminMode={adminMode} users={users} />
1191
+ </WhoThat>
1192
+ } />
1193
+
1194
+ <Route path="/whoThat/groups" element={
1195
+ <WhoThat users={users} >
1196
+ <Users adminMode={adminMode} users={users} />
1197
+ </WhoThat>
1198
+ } />
1199
+
1200
+ <Route path="/whoThat/org" element={
1201
+ <WhoThat users={users} >
1202
+ <OrgChart adminMode={adminMode} users={users} />
1203
+ </WhoThat>
1204
+ } />
1205
+
1206
+
1207
+ </Routes>
1208
+ </Router>
1209
+
1210
+
1211
+ <footer>made with ❤️ and <a href="https://adamwong246.github.io/testeranto/" >testeranto </a></footer>
1212
+
1213
+ </div >
1214
+ );
1215
+ };
1216
+
1217
+ document.addEventListener("DOMContentLoaded", function () {
1218
+ const elem = document.getElementById("root");
1219
+ if (elem) {
1220
+ ReactDom.createRoot(elem).render(React.createElement(Report, {}));
1221
+ }
1222
+ });