dce-reactkit 4.3.4 → 5.0.0-beta-progress-size-3

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 (347) hide show
  1. package/dist/cjs/index.js +390 -2390
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
  4. package/dist/cjs/types/helpers/logClientEvent.d.ts +1 -1
  5. package/dist/cjs/types/html/genErrorPage.d.ts +1 -1
  6. package/dist/cjs/types/index.d.ts +2 -64
  7. package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
  8. package/dist/cjs/types/types/ProgressBarSize.d.ts +0 -1
  9. package/dist/esm/index.js +130 -2297
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/types/components/LogReviewer.d.ts +1 -1
  12. package/dist/esm/types/helpers/logClientEvent.d.ts +1 -1
  13. package/dist/esm/types/html/genErrorPage.d.ts +1 -1
  14. package/dist/esm/types/index.d.ts +2 -64
  15. package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
  16. package/dist/esm/types/types/ProgressBarSize.d.ts +0 -1
  17. package/dist/index.d.ts +3 -836
  18. package/package.json +4 -3
  19. package/src/components/AppWrapper.tsx +12 -10
  20. package/src/components/AutoscrollToBottomContainer.tsx +5 -3
  21. package/src/components/CopiableBox.tsx +5 -1
  22. package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +2 -2
  23. package/src/components/ErrorBox.tsx +6 -2
  24. package/src/components/IntelliTable.tsx +7 -5
  25. package/src/components/LogReviewer.tsx +23 -21
  26. package/src/components/Modal/index.tsx +5 -3
  27. package/src/components/MultiSwitch.tsx +5 -1
  28. package/src/components/ProgressBar.tsx +66 -76
  29. package/src/components/Shimmer.tsx +4 -2
  30. package/src/components/SimpleDateChooser.tsx +11 -13
  31. package/src/components/SimpleTimeChooser.tsx +4 -2
  32. package/src/helpers/canReviewLogs.test.ts +5 -3
  33. package/src/helpers/canReviewLogs.ts +5 -3
  34. package/src/helpers/initClient.tsx +8 -8
  35. package/src/helpers/isMobileOrTablet.tsx +2 -1
  36. package/src/helpers/isSelectAdmin.ts +4 -2
  37. package/src/helpers/logClientEvent.tsx +7 -5
  38. package/src/helpers/stubServerEndpoint.tsx +1 -1
  39. package/src/helpers/visitServerEndpoint.tsx +10 -7
  40. package/src/html/genErrorPage.ts +6 -4
  41. package/src/index.ts +105 -98
  42. package/src/types/IntelliTableColumn.ts +4 -1
  43. package/src/types/ProgressBarSize.ts +0 -1
  44. package/dist/cjs/types/constants/DAY_IN_MS.d.ts +0 -6
  45. package/dist/cjs/types/constants/HOUR_IN_MS.d.ts +0 -6
  46. package/dist/cjs/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
  47. package/dist/cjs/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  48. package/dist/cjs/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
  49. package/dist/cjs/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
  50. package/dist/cjs/types/constants/MINUTE_IN_MS.d.ts +0 -6
  51. package/dist/cjs/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
  52. package/dist/cjs/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
  53. package/dist/cjs/types/errors/ErrorWithCode.d.ts +0 -9
  54. package/dist/cjs/types/helpers/abbreviate.d.ts +0 -10
  55. package/dist/cjs/types/helpers/abbreviate.test.d.ts +0 -5
  56. package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
  57. package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
  58. package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
  59. package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
  60. package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
  61. package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
  62. package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
  63. package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
  64. package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
  65. package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
  66. package/dist/cjs/types/helpers/avg.d.ts +0 -8
  67. package/dist/cjs/types/helpers/avg.test.d.ts +0 -5
  68. package/dist/cjs/types/helpers/capitalize.d.ts +0 -7
  69. package/dist/cjs/types/helpers/ceilToNumDecimals.d.ts +0 -9
  70. package/dist/cjs/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
  71. package/dist/cjs/types/helpers/cloneDeep.d.ts +0 -8
  72. package/dist/cjs/types/helpers/compareArraysByProp.d.ts +0 -13
  73. package/dist/cjs/types/helpers/compareArraysByProp.test.d.ts +0 -5
  74. package/dist/cjs/types/helpers/extractProp.d.ts +0 -12
  75. package/dist/cjs/types/helpers/extractProp.test.d.ts +0 -5
  76. package/dist/cjs/types/helpers/floorToNumDecimals.d.ts +0 -9
  77. package/dist/cjs/types/helpers/floorToNumDecimals.test.d.ts +0 -5
  78. package/dist/cjs/types/helpers/forceNumIntoBounds.d.ts +0 -10
  79. package/dist/cjs/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
  80. package/dist/cjs/types/helpers/genCSV.d.ts +0 -18
  81. package/dist/cjs/types/helpers/genCSV.test.d.ts +0 -5
  82. package/dist/cjs/types/helpers/genCommaList.d.ts +0 -12
  83. package/dist/cjs/types/helpers/genCommaList.test.d.ts +0 -1
  84. package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +0 -8
  85. package/dist/cjs/types/helpers/getHumanReadableDate.test.d.ts +0 -5
  86. package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +0 -19
  87. package/dist/cjs/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
  88. package/dist/cjs/types/helpers/getMonthName.d.ts +0 -14
  89. package/dist/cjs/types/helpers/getMonthName.test.d.ts +0 -5
  90. package/dist/cjs/types/helpers/getOrdinal.d.ts +0 -8
  91. package/dist/cjs/types/helpers/getOrdinal.test.d.ts +0 -5
  92. package/dist/cjs/types/helpers/getPartOfDay.d.ts +0 -7
  93. package/dist/cjs/types/helpers/getPartOfDay.test.d.ts +0 -5
  94. package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +0 -21
  95. package/dist/cjs/types/helpers/getTimeInfoInET.test.d.ts +0 -5
  96. package/dist/cjs/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
  97. package/dist/cjs/types/helpers/getWordCount.d.ts +0 -10
  98. package/dist/cjs/types/helpers/idify.d.ts +0 -9
  99. package/dist/cjs/types/helpers/onlyKeepLetters.d.ts +0 -8
  100. package/dist/cjs/types/helpers/padDecimalZeros.d.ts +0 -10
  101. package/dist/cjs/types/helpers/padZerosLeft.d.ts +0 -9
  102. package/dist/cjs/types/helpers/parallelLimit.d.ts +0 -12
  103. package/dist/cjs/types/helpers/prefixWithAOrAn.d.ts +0 -10
  104. package/dist/cjs/types/helpers/roundToNumDecimals.d.ts +0 -9
  105. package/dist/cjs/types/helpers/shuffleArray.d.ts +0 -8
  106. package/dist/cjs/types/helpers/startMinWait.d.ts +0 -9
  107. package/dist/cjs/types/helpers/stringsToHumanReadableList.d.ts +0 -10
  108. package/dist/cjs/types/helpers/sum.d.ts +0 -8
  109. package/dist/cjs/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
  110. package/dist/cjs/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
  111. package/dist/cjs/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
  112. package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
  113. package/dist/cjs/types/helpers/validators/validURL.d.ts +0 -8
  114. package/dist/cjs/types/helpers/validators/validateEmail.d.ts +0 -11
  115. package/dist/cjs/types/helpers/validators/validateEmail.test.d.ts +0 -1
  116. package/dist/cjs/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
  117. package/dist/cjs/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
  118. package/dist/cjs/types/helpers/validators/validateString.d.ts +0 -22
  119. package/dist/cjs/types/helpers/validators/validateString.test.d.ts +0 -1
  120. package/dist/cjs/types/helpers/waitMs.d.ts +0 -7
  121. package/dist/cjs/types/types/DayOfWeek.d.ts +0 -14
  122. package/dist/cjs/types/types/Log/LogMainInfo.d.ts +0 -39
  123. package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
  124. package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
  125. package/dist/cjs/types/types/Log/index.d.ts +0 -10
  126. package/dist/cjs/types/types/LogAction.d.ts +0 -29
  127. package/dist/cjs/types/types/LogBuiltInMetadata.d.ts +0 -16
  128. package/dist/cjs/types/types/LogFunction.d.ts +0 -24
  129. package/dist/cjs/types/types/LogLevel.d.ts +0 -10
  130. package/dist/cjs/types/types/LogMetadataContextMap.d.ts +0 -11
  131. package/dist/cjs/types/types/LogMetadataTagMap.d.ts +0 -8
  132. package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +0 -8
  133. package/dist/cjs/types/types/LogMetadataType.d.ts +0 -13
  134. package/dist/cjs/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
  135. package/dist/cjs/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
  136. package/dist/cjs/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
  137. package/dist/cjs/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
  138. package/dist/cjs/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
  139. package/dist/cjs/types/types/LogReviewerFilterState/index.d.ts +0 -17
  140. package/dist/cjs/types/types/LogSource.d.ts +0 -9
  141. package/dist/cjs/types/types/LogType.d.ts +0 -9
  142. package/dist/cjs/types/types/ParamType.d.ts +0 -17
  143. package/dist/cjs/types/types/ReactKitErrorCode.d.ts +0 -14
  144. package/dist/esm/types/constants/DAY_IN_MS.d.ts +0 -6
  145. package/dist/esm/types/constants/HOUR_IN_MS.d.ts +0 -6
  146. package/dist/esm/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
  147. package/dist/esm/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  148. package/dist/esm/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
  149. package/dist/esm/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
  150. package/dist/esm/types/constants/MINUTE_IN_MS.d.ts +0 -6
  151. package/dist/esm/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
  152. package/dist/esm/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
  153. package/dist/esm/types/errors/ErrorWithCode.d.ts +0 -9
  154. package/dist/esm/types/helpers/abbreviate.d.ts +0 -10
  155. package/dist/esm/types/helpers/abbreviate.test.d.ts +0 -5
  156. package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
  157. package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
  158. package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
  159. package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
  160. package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
  161. package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
  162. package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
  163. package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
  164. package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
  165. package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
  166. package/dist/esm/types/helpers/avg.d.ts +0 -8
  167. package/dist/esm/types/helpers/avg.test.d.ts +0 -5
  168. package/dist/esm/types/helpers/capitalize.d.ts +0 -7
  169. package/dist/esm/types/helpers/ceilToNumDecimals.d.ts +0 -9
  170. package/dist/esm/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
  171. package/dist/esm/types/helpers/cloneDeep.d.ts +0 -8
  172. package/dist/esm/types/helpers/compareArraysByProp.d.ts +0 -13
  173. package/dist/esm/types/helpers/compareArraysByProp.test.d.ts +0 -5
  174. package/dist/esm/types/helpers/extractProp.d.ts +0 -12
  175. package/dist/esm/types/helpers/extractProp.test.d.ts +0 -5
  176. package/dist/esm/types/helpers/floorToNumDecimals.d.ts +0 -9
  177. package/dist/esm/types/helpers/floorToNumDecimals.test.d.ts +0 -5
  178. package/dist/esm/types/helpers/forceNumIntoBounds.d.ts +0 -10
  179. package/dist/esm/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
  180. package/dist/esm/types/helpers/genCSV.d.ts +0 -18
  181. package/dist/esm/types/helpers/genCSV.test.d.ts +0 -5
  182. package/dist/esm/types/helpers/genCommaList.d.ts +0 -12
  183. package/dist/esm/types/helpers/genCommaList.test.d.ts +0 -1
  184. package/dist/esm/types/helpers/getHumanReadableDate.d.ts +0 -8
  185. package/dist/esm/types/helpers/getHumanReadableDate.test.d.ts +0 -5
  186. package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +0 -19
  187. package/dist/esm/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
  188. package/dist/esm/types/helpers/getMonthName.d.ts +0 -14
  189. package/dist/esm/types/helpers/getMonthName.test.d.ts +0 -5
  190. package/dist/esm/types/helpers/getOrdinal.d.ts +0 -8
  191. package/dist/esm/types/helpers/getOrdinal.test.d.ts +0 -5
  192. package/dist/esm/types/helpers/getPartOfDay.d.ts +0 -7
  193. package/dist/esm/types/helpers/getPartOfDay.test.d.ts +0 -5
  194. package/dist/esm/types/helpers/getTimeInfoInET.d.ts +0 -21
  195. package/dist/esm/types/helpers/getTimeInfoInET.test.d.ts +0 -5
  196. package/dist/esm/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
  197. package/dist/esm/types/helpers/getWordCount.d.ts +0 -10
  198. package/dist/esm/types/helpers/idify.d.ts +0 -9
  199. package/dist/esm/types/helpers/onlyKeepLetters.d.ts +0 -8
  200. package/dist/esm/types/helpers/padDecimalZeros.d.ts +0 -10
  201. package/dist/esm/types/helpers/padZerosLeft.d.ts +0 -9
  202. package/dist/esm/types/helpers/parallelLimit.d.ts +0 -12
  203. package/dist/esm/types/helpers/prefixWithAOrAn.d.ts +0 -10
  204. package/dist/esm/types/helpers/roundToNumDecimals.d.ts +0 -9
  205. package/dist/esm/types/helpers/shuffleArray.d.ts +0 -8
  206. package/dist/esm/types/helpers/startMinWait.d.ts +0 -9
  207. package/dist/esm/types/helpers/stringsToHumanReadableList.d.ts +0 -10
  208. package/dist/esm/types/helpers/sum.d.ts +0 -8
  209. package/dist/esm/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
  210. package/dist/esm/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
  211. package/dist/esm/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
  212. package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
  213. package/dist/esm/types/helpers/validators/validURL.d.ts +0 -8
  214. package/dist/esm/types/helpers/validators/validateEmail.d.ts +0 -11
  215. package/dist/esm/types/helpers/validators/validateEmail.test.d.ts +0 -1
  216. package/dist/esm/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
  217. package/dist/esm/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
  218. package/dist/esm/types/helpers/validators/validateString.d.ts +0 -22
  219. package/dist/esm/types/helpers/validators/validateString.test.d.ts +0 -1
  220. package/dist/esm/types/helpers/waitMs.d.ts +0 -7
  221. package/dist/esm/types/types/DayOfWeek.d.ts +0 -14
  222. package/dist/esm/types/types/Log/LogMainInfo.d.ts +0 -39
  223. package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
  224. package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
  225. package/dist/esm/types/types/Log/index.d.ts +0 -10
  226. package/dist/esm/types/types/LogAction.d.ts +0 -29
  227. package/dist/esm/types/types/LogBuiltInMetadata.d.ts +0 -16
  228. package/dist/esm/types/types/LogFunction.d.ts +0 -24
  229. package/dist/esm/types/types/LogLevel.d.ts +0 -10
  230. package/dist/esm/types/types/LogMetadataContextMap.d.ts +0 -11
  231. package/dist/esm/types/types/LogMetadataTagMap.d.ts +0 -8
  232. package/dist/esm/types/types/LogMetadataTargetMap.d.ts +0 -8
  233. package/dist/esm/types/types/LogMetadataType.d.ts +0 -13
  234. package/dist/esm/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
  235. package/dist/esm/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
  236. package/dist/esm/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
  237. package/dist/esm/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
  238. package/dist/esm/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
  239. package/dist/esm/types/types/LogReviewerFilterState/index.d.ts +0 -17
  240. package/dist/esm/types/types/LogSource.d.ts +0 -9
  241. package/dist/esm/types/types/LogType.d.ts +0 -9
  242. package/dist/esm/types/types/ParamType.d.ts +0 -17
  243. package/dist/esm/types/types/ReactKitErrorCode.d.ts +0 -14
  244. package/src/constants/DAY_IN_MS.ts +0 -7
  245. package/src/constants/HOUR_IN_MS.ts +0 -7
  246. package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +0 -9
  247. package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +0 -9
  248. package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +0 -10
  249. package/src/constants/LOG_ROUTE_PATH.ts +0 -9
  250. package/src/constants/MINUTE_IN_MS.ts +0 -7
  251. package/src/constants/ROUTE_PATH_PREFIX.ts +0 -7
  252. package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +0 -7
  253. package/src/errors/ErrorWithCode.tsx +0 -15
  254. package/src/helpers/abbreviate.test.ts +0 -26
  255. package/src/helpers/abbreviate.ts +0 -25
  256. package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +0 -114
  257. package/src/helpers/asyncArrayFunctions/everyAsync.ts +0 -51
  258. package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +0 -126
  259. package/src/helpers/asyncArrayFunctions/filterAsync.ts +0 -50
  260. package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +0 -136
  261. package/src/helpers/asyncArrayFunctions/forEachAsync.ts +0 -40
  262. package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +0 -125
  263. package/src/helpers/asyncArrayFunctions/mapAsync.ts +0 -46
  264. package/src/helpers/asyncArrayFunctions/someAsync.test.ts +0 -92
  265. package/src/helpers/asyncArrayFunctions/someAsync.ts +0 -49
  266. package/src/helpers/avg.test.ts +0 -24
  267. package/src/helpers/avg.ts +0 -22
  268. package/src/helpers/capitalize.ts +0 -20
  269. package/src/helpers/ceilToNumDecimals.test.ts +0 -39
  270. package/src/helpers/ceilToNumDecimals.ts +0 -13
  271. package/src/helpers/cloneDeep.ts +0 -11
  272. package/src/helpers/compareArraysByProp.test.ts +0 -147
  273. package/src/helpers/compareArraysByProp.ts +0 -56
  274. package/src/helpers/extractProp.test.ts +0 -34
  275. package/src/helpers/extractProp.ts +0 -17
  276. package/src/helpers/floorToNumDecimals.test.ts +0 -39
  277. package/src/helpers/floorToNumDecimals.ts +0 -13
  278. package/src/helpers/forceNumIntoBounds.test.ts +0 -34
  279. package/src/helpers/forceNumIntoBounds.ts +0 -19
  280. package/src/helpers/genCSV.test.ts +0 -75
  281. package/src/helpers/genCSV.ts +0 -87
  282. package/src/helpers/genCommaList.test.ts +0 -57
  283. package/src/helpers/genCommaList.ts +0 -21
  284. package/src/helpers/getHumanReadableDate.test.ts +0 -29
  285. package/src/helpers/getHumanReadableDate.ts +0 -36
  286. package/src/helpers/getLocalTimeInfo.test.ts +0 -48
  287. package/src/helpers/getLocalTimeInfo.ts +0 -58
  288. package/src/helpers/getMonthName.test.ts +0 -79
  289. package/src/helpers/getMonthName.ts +0 -29
  290. package/src/helpers/getOrdinal.test.ts +0 -84
  291. package/src/helpers/getOrdinal.ts +0 -14
  292. package/src/helpers/getPartOfDay.test.ts +0 -56
  293. package/src/helpers/getPartOfDay.ts +0 -20
  294. package/src/helpers/getTimeInfoInET.test.ts +0 -72
  295. package/src/helpers/getTimeInfoInET.ts +0 -79
  296. package/src/helpers/getTimestampFromTimeInfoInET.ts +0 -179
  297. package/src/helpers/getWordCount.ts +0 -26
  298. package/src/helpers/idify.ts +0 -24
  299. package/src/helpers/onlyKeepLetters.ts +0 -11
  300. package/src/helpers/padDecimalZeros.tsx +0 -32
  301. package/src/helpers/padZerosLeft.tsx +0 -21
  302. package/src/helpers/parallelLimit.ts +0 -63
  303. package/src/helpers/prefixWithAOrAn.ts +0 -29
  304. package/src/helpers/roundToNumDecimals.tsx +0 -13
  305. package/src/helpers/shuffleArray.ts +0 -19
  306. package/src/helpers/startMinWait.ts +0 -33
  307. package/src/helpers/stringsToHumanReadableList.ts +0 -39
  308. package/src/helpers/sum.tsx +0 -16
  309. package/src/helpers/validators/ChicagoTitleCase.test.ts +0 -85
  310. package/src/helpers/validators/ChicagoTitleCase.ts +0 -32
  311. package/src/helpers/validators/findURL.test.ts +0 -83
  312. package/src/helpers/validators/findURL.ts +0 -43
  313. package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +0 -18
  314. package/src/helpers/validators/shared/helpers/validateRegex.ts +0 -47
  315. package/src/helpers/validators/shared/types/ValidationResult.ts +0 -20
  316. package/src/helpers/validators/validURL.test.ts +0 -90
  317. package/src/helpers/validators/validURL.ts +0 -18
  318. package/src/helpers/validators/validateEmail.test.ts +0 -110
  319. package/src/helpers/validators/validateEmail.ts +0 -47
  320. package/src/helpers/validators/validatePhoneNumber.test.ts +0 -94
  321. package/src/helpers/validators/validatePhoneNumber.ts +0 -49
  322. package/src/helpers/validators/validateString.test.ts +0 -173
  323. package/src/helpers/validators/validateString.ts +0 -171
  324. package/src/helpers/waitMs.tsx +0 -12
  325. package/src/types/DayOfWeek.ts +0 -15
  326. package/src/types/Log/LogMainInfo.ts +0 -69
  327. package/src/types/Log/LogSourceSpecificInfo.ts +0 -25
  328. package/src/types/Log/LogTypeSpecificInfo.ts +0 -33
  329. package/src/types/Log/index.ts +0 -17
  330. package/src/types/LogAction.ts +0 -52
  331. package/src/types/LogBuiltInMetadata.ts +0 -19
  332. package/src/types/LogFunction.ts +0 -46
  333. package/src/types/LogLevel.ts +0 -11
  334. package/src/types/LogMetadataContextMap.ts +0 -15
  335. package/src/types/LogMetadataTagMap.ts +0 -9
  336. package/src/types/LogMetadataTargetMap.ts +0 -9
  337. package/src/types/LogMetadataType.ts +0 -16
  338. package/src/types/LogReviewerFilterState/ActionErrorFilterState.ts +0 -24
  339. package/src/types/LogReviewerFilterState/AdvancedFilterState.ts +0 -36
  340. package/src/types/LogReviewerFilterState/ContextFilterState.ts +0 -16
  341. package/src/types/LogReviewerFilterState/DateFilterState.ts +0 -26
  342. package/src/types/LogReviewerFilterState/TagFilterState.ts +0 -9
  343. package/src/types/LogReviewerFilterState/index.ts +0 -24
  344. package/src/types/LogSource.ts +0 -12
  345. package/src/types/LogType.ts +0 -12
  346. package/src/types/ParamType.ts +0 -18
  347. package/src/types/ReactKitErrorCode.tsx +0 -17
@@ -1,13 +0,0 @@
1
- import LogMetadataContextMap from './LogMetadataContextMap';
2
- import LogMetadataTagMap from './LogMetadataTagMap';
3
- import LogMetadataTargetMap from './LogMetadataTargetMap';
4
- /**
5
- * Type of a LogMetadata file
6
- * @author Gabe Abrams
7
- */
8
- type LogMetadataType = {
9
- Context?: LogMetadataContextMap;
10
- Tag?: LogMetadataTagMap;
11
- Target?: LogMetadataTargetMap;
12
- };
13
- export default LogMetadataType;
@@ -1,17 +0,0 @@
1
- import LogType from '../LogType';
2
- /**
3
- * Action filter state (only relevant for action logs)
4
- * @author Yuen Ler Chow
5
- */
6
- type ActionErrorFilterState = {
7
- type: LogType | undefined;
8
- errorMessage: string;
9
- errorCode: string;
10
- target: {
11
- [k: string]: boolean;
12
- };
13
- action: {
14
- [k: string]: boolean;
15
- };
16
- };
17
- export default ActionErrorFilterState;
@@ -1,21 +0,0 @@
1
- import LogSource from '../LogSource';
2
- /**
3
- * Advanced filter state
4
- * @author Yuen Ler Chow
5
- */
6
- type AdvancedFilterState = {
7
- userFirstName: string;
8
- userLastName: string;
9
- userEmail: string;
10
- userId: string;
11
- includeLearners: boolean;
12
- includeTTMs: boolean;
13
- includeAdmins: boolean;
14
- courseId: string;
15
- courseName: string;
16
- isMobile: (true | false | undefined);
17
- source: LogSource | undefined;
18
- routePath: string;
19
- routeTemplate: string;
20
- };
21
- export default AdvancedFilterState;
@@ -1,10 +0,0 @@
1
- /**
2
- * Context filter state
3
- * @author Yuen Ler Chow
4
- */
5
- type ContextFilterState = {
6
- [k: string]: (boolean | {
7
- [k: string]: boolean;
8
- });
9
- };
10
- export default ContextFilterState;
@@ -1,17 +0,0 @@
1
- /**
2
- * Date filter state
3
- * @author Yuen Ler Chow
4
- */
5
- type DateFilterState = {
6
- startDate: {
7
- year: number;
8
- month: number;
9
- day: number;
10
- };
11
- endDate: {
12
- year: number;
13
- month: number;
14
- day: number;
15
- };
16
- };
17
- export default DateFilterState;
@@ -1,8 +0,0 @@
1
- /**
2
- * Tag filter state
3
- * @author Yuen Ler Chow
4
- */
5
- type TagFilterState = {
6
- [k: string]: boolean;
7
- };
8
- export default TagFilterState;
@@ -1,17 +0,0 @@
1
- import DateFilterState from './DateFilterState';
2
- import ContextFilterState from './ContextFilterState';
3
- import TagFilterState from './TagFilterState';
4
- import ActionErrorFilterState from './ActionErrorFilterState';
5
- import AdvancedFilterState from './AdvancedFilterState';
6
- /**
7
- * A bundle of filter state objects for each type of filter
8
- * @author Gabe Abrams
9
- */
10
- type LogReviewerFilterState = {
11
- dateFilterState: DateFilterState;
12
- contextFilterState: ContextFilterState;
13
- tagFilterState: TagFilterState;
14
- actionErrorFilterState: ActionErrorFilterState;
15
- advancedFilterState: AdvancedFilterState;
16
- };
17
- export default LogReviewerFilterState;
@@ -1,9 +0,0 @@
1
- /**
2
- * Source of a log event
3
- * @author Gabe Abrams
4
- */
5
- declare enum LogSource {
6
- Client = "client",
7
- Server = "server"
8
- }
9
- export default LogSource;
@@ -1,9 +0,0 @@
1
- /**
2
- * Type of a log event
3
- * @author Gabe Abrams
4
- */
5
- declare enum LogType {
6
- Action = "action",
7
- Error = "error"
8
- }
9
- export default LogType;
@@ -1,17 +0,0 @@
1
- /**
2
- * Server-side API param types
3
- * @author Gabe Abrams
4
- */
5
- declare enum ParamType {
6
- Boolean = "Boolean",
7
- BooleanOptional = "BooleanOptional",
8
- Float = "Float",
9
- FloatOptional = "FloatOptional",
10
- Int = "Int",
11
- IntOptional = "IntOptional",
12
- JSON = "JSON",
13
- JSONOptional = "JSONOptional",
14
- String = "String",
15
- StringOptional = "StringOptional"
16
- }
17
- export default ParamType;
@@ -1,14 +0,0 @@
1
- /**
2
- * List of error codes built into the react kit
3
- * @author Gabe Abrams
4
- */
5
- declare enum ReactKitErrorCode {
6
- NoResponse = "DRK1",
7
- NoCode = "DRK2",
8
- SessionExpired = "DRK3",
9
- NoCACCLSendRequestFunction = "DRK7",
10
- SimpleDateChooserInvalidDateRange = "DRK35",
11
- SimpleDateChooserInvalidNumMonths = "DRK36",
12
- ETTimestampInvalid = "DRK37"
13
- }
14
- export default ReactKitErrorCode;
@@ -1,7 +0,0 @@
1
- /**
2
- * One day in ms
3
- * @author Gabe Abrams
4
- */
5
- const DAY_IN_MS = 86400000;
6
-
7
- export default DAY_IN_MS;
@@ -1,7 +0,0 @@
1
- /**
2
- * One hour in ms
3
- * @author Gabe Abrams
4
- */
5
- const HOUR_IN_MS = 3600000;
6
-
7
- export default HOUR_IN_MS;
@@ -1,9 +0,0 @@
1
- import ROUTE_PATH_PREFIX from './ROUTE_PATH_PREFIX';
2
-
3
- /**
4
- * Path of the route for getting logs for log review
5
- * @author Gabe Abrams
6
- */
7
- const LOG_REVIEW_GET_LOGS_ROUTE = `/admin${ROUTE_PATH_PREFIX}/logs`;
8
-
9
- export default LOG_REVIEW_GET_LOGS_ROUTE;
@@ -1,9 +0,0 @@
1
- import ROUTE_PATH_PREFIX from './ROUTE_PATH_PREFIX';
2
-
3
- /**
4
- * Path of the route for storing client-side logs
5
- * @author Gabe Abrams
6
- */
7
- const LOG_REVIEW_ROUTE_PATH_PREFIX = `/admin${ROUTE_PATH_PREFIX}/logs`;
8
-
9
- export default LOG_REVIEW_ROUTE_PATH_PREFIX;
@@ -1,10 +0,0 @@
1
- import ROUTE_PATH_PREFIX from './ROUTE_PATH_PREFIX';
2
-
3
- /**
4
- * Route for checking the status of the current user's
5
- * access to log review
6
- * @author Gabe Abrams
7
- */
8
- const LOG_REVIEW_STATUS_ROUTE = `${ROUTE_PATH_PREFIX}/logs/access_allowed`;
9
-
10
- export default LOG_REVIEW_STATUS_ROUTE;
@@ -1,9 +0,0 @@
1
- import ROUTE_PATH_PREFIX from './ROUTE_PATH_PREFIX';
2
-
3
- /**
4
- * Path of the route for storing client-side logs
5
- * @author Gabe Abrams
6
- */
7
- const LOG_ROUTE_PATH = `${ROUTE_PATH_PREFIX}/log`;
8
-
9
- export default LOG_ROUTE_PATH;
@@ -1,7 +0,0 @@
1
- /**
2
- * One minute in ms
3
- * @author Gabe Abrams
4
- */
5
- const MINUTE_IN_MS = 60000;
6
-
7
- export default MINUTE_IN_MS;
@@ -1,7 +0,0 @@
1
- /**
2
- * Path that all routes start with
3
- * @author Gabe Abrams
4
- */
5
- const ROUTE_PATH_PREFIX = '/dce-reactkit';
6
-
7
- export default ROUTE_PATH_PREFIX;
@@ -1,7 +0,0 @@
1
- /**
2
- * Route for checking if the current user is a select admin
3
- * @author Gabe Abrams
4
- */
5
- const SELECT_ADMIN_CHECK_ROUTE = '/api/admin/select/is-select-admin';
6
-
7
- export default SELECT_ADMIN_CHECK_ROUTE;
@@ -1,15 +0,0 @@
1
- /**
2
- * An error with a code
3
- * @author Gabe Abrams
4
- */
5
- class ErrorWithCode extends Error {
6
- code: string;
7
-
8
- constructor(message: string, code: string) {
9
- super(message);
10
- this.name = 'ErrorWithCode';
11
- this.code = code;
12
- }
13
- }
14
-
15
- export default ErrorWithCode;
@@ -1,26 +0,0 @@
1
- /**
2
- * Unit tests for abbreviate helper
3
- * @author Gabe Abrams
4
- */
5
-
6
- import abbreviate from './abbreviate';
7
-
8
- describe('helpers > abbreviate', () => {
9
- it('should return the original text if it is shorter than the maxChars parameter', () => {
10
- const text = 'Hello, world!';
11
- const maxChars = 20;
12
- expect(abbreviate(text, maxChars)).toEqual(text);
13
- });
14
-
15
- it('should abbreviate the text if it is longer than the maxChars parameter', () => {
16
- const text = 'This is a really long string that needs to be abbreviated';
17
- const maxChars = 20;
18
- expect(abbreviate(text, maxChars)).toEqual('This is a really...');
19
- });
20
-
21
- it('should handle leading/trailing whitespace', () => {
22
- const text = ' This is a string with leading/trailing whitespace ';
23
- const maxChars = 20;
24
- expect(abbreviate(text, maxChars)).toEqual('This is a string...');
25
- });
26
- });
@@ -1,25 +0,0 @@
1
- /**
2
- * Shorten text so it fits into a certain number of chars
3
- * @author Gabe Abrams
4
- * @param text the text to abbreviate
5
- * @param maxChars the maximum number of chars to include
6
- * @returns abbreviated text with length no greater than maxChars
7
- * (including ellipses if applicable)
8
- */
9
- const abbreviate = (text: string, maxChars: number): string => {
10
- // Check if already short enough
11
- if (text.trim().length < maxChars) {
12
- return text.trim();
13
- }
14
-
15
- // Abbreviate
16
- const shortenedText = (
17
- text
18
- .trim()
19
- .substring(0, maxChars - 3)
20
- .trim()
21
- );
22
- return `${shortenedText}...`;
23
- };
24
-
25
- export default abbreviate;
@@ -1,114 +0,0 @@
1
- // Import item to test
2
- import everyAsync from './everyAsync';
3
-
4
- describe('everyAsync', () => {
5
- it('returns true for an empty array', async () => {
6
- const result = await everyAsync(
7
- [],
8
- async () => {
9
- return true;
10
- },
11
- );
12
- expect(result).toBe(true);
13
- });
14
-
15
- it('returns true if the operator function returns true for every item in the array', async () => {
16
- const result = await everyAsync(
17
- [1, 2, 3],
18
- async (item) => {
19
- return item > 0;
20
- },
21
- );
22
- expect(result).toBe(true);
23
- });
24
-
25
- it('returns false if the operator function returns false for any item in the array', async () => {
26
- const result = await everyAsync(
27
- [1, 2, 3],
28
- async (item) => {
29
- return item > 1;
30
- },
31
- );
32
- expect(result).toBe(false);
33
- });
34
-
35
- it('passes the index as the second argument to the operator function', async () => {
36
- const result = await everyAsync(
37
- [1, 2, 3],
38
- async (item, index) => {
39
- return index === item - 1;
40
- },
41
- );
42
- expect(result).toBe(true);
43
- });
44
-
45
- it('passes an object with a breakNow function and the array as the third argument to the operator function', async () => {
46
- const result = await everyAsync(
47
- [1, 2, 3],
48
- async (item, index, { breakNow }) => {
49
- if (item === 2) {
50
- breakNow();
51
- }
52
- return true;
53
- },
54
- );
55
- expect(result).toBe(false);
56
- });
57
-
58
- it('stops iterating if the operator function calls the breakNow function', async () => {
59
- const mockOperatorFunction = jest.fn(async (item, index, { breakNow }) => {
60
- if (item === 2) {
61
- breakNow();
62
- }
63
- return true;
64
- });
65
- const result = await everyAsync(
66
- [1, 2, 3],
67
- mockOperatorFunction,
68
- );
69
- expect(result).toBe(false);
70
- expect(mockOperatorFunction).toHaveBeenCalledTimes(2);
71
- });
72
-
73
- it('handles an operator function that returns a promise that resolves to true', async () => {
74
- const result = await everyAsync(
75
- [1, 2, 3],
76
- async (item) => {
77
- return Promise.resolve(item > 0);
78
- },
79
- );
80
- expect(result).toBe(true);
81
- });
82
-
83
- it('handles an operator function that returns a promise that resolves to false', async () => {
84
- const result = await everyAsync(
85
- [1, 2, 3],
86
- async (item) => {
87
- return Promise.resolve(item > 1);
88
- },
89
- );
90
- expect(result).toBe(false);
91
- });
92
-
93
- it('handles an operator function that throws an error', async () => {
94
- const mockOperatorFunction = jest.fn(async (item) => {
95
- if (item === 2) {
96
- throw new Error('Test error');
97
- }
98
- return true;
99
- });
100
- let error: any = null;
101
- let result: boolean | null = null;
102
- try {
103
- result = await everyAsync(
104
- [1, 2, 3],
105
- mockOperatorFunction,
106
- );
107
- } catch (err) {
108
- error = err;
109
- }
110
- expect(result).toBe(null);
111
- expect(error).not.toBe(null);
112
- expect(mockOperatorFunction).toHaveBeenCalledTimes(2);
113
- });
114
- });
@@ -1,51 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array, returning true if
3
- * the operator function returns true for every item in the array
4
- * @author Gabe Abrams
5
- * @param operatorFunction the operator function to apply. If it returns true
6
- * for every item, this function will return true
7
- * @returns true if the operator function returns true for every item in the array
8
- */
9
- const everyAsync = async <T>(
10
- array: T[],
11
- operatorFunction: (
12
- item: T,
13
- index: number,
14
- opts: {
15
- breakNow: () => void,
16
- array: Array<T>,
17
- },
18
- ) => Promise<any>,
19
- ): Promise<boolean> => {
20
- // Create break logic
21
- let done = false;
22
- /**
23
- * Break the loop (checking stops here)
24
- * @author Gabe Abrams
25
- */
26
- const breakNow = () => {
27
- done = true;
28
- };
29
-
30
- // Loop through each item, checking
31
- for (let i = 0; i < array.length && !done; i++) {
32
- const passed = await operatorFunction(
33
- array[i],
34
- i,
35
- {
36
- breakNow,
37
- array,
38
- },
39
- );
40
-
41
- // Check if this one failed or if loop was broken
42
- if (!passed || done) {
43
- return false;
44
- }
45
- }
46
-
47
- // Return true because none returned false
48
- return true;
49
- };
50
-
51
- export default everyAsync;
@@ -1,126 +0,0 @@
1
- import filterAsync from './filterAsync';
2
-
3
- describe('filterAsync', () => {
4
- it('should return an empty array when given an empty array', async () => {
5
- const result = await filterAsync(
6
- [],
7
- async () => {
8
- return true;
9
- },
10
- );
11
- expect(result).toEqual([]);
12
- });
13
-
14
- it('should return the original array when all items pass the filter', async () => {
15
- const originalArray = [1, 2, 3];
16
- const result = await filterAsync(
17
- originalArray,
18
- async () => {
19
- return true;
20
- },
21
- );
22
- expect(result).toEqual(originalArray);
23
- });
24
-
25
- it('should return an empty array when no items pass the filter', async () => {
26
- const originalArray = [1, 2, 3];
27
- const result = await filterAsync(
28
- originalArray,
29
- async () => {
30
- return false;
31
- },
32
- );
33
- expect(result).toEqual([]);
34
- });
35
-
36
- it('should return only the items that pass the filter', async () => {
37
- const originalArray = [1, 2, 3];
38
- const result = await filterAsync(
39
- originalArray,
40
- async (item) => {
41
- return item > 1;
42
- },
43
- );
44
- expect(result).toEqual([2, 3]);
45
- });
46
-
47
- it('should pass the correct index to the operator function', async () => {
48
- const originalArray = [1, 2, 3];
49
- const result = await filterAsync(
50
- originalArray,
51
- async (_, index) => {
52
- return index === 1;
53
- },
54
- );
55
- expect(result).toEqual([2]);
56
- });
57
-
58
- it('should allow breaking out of the loop early', async () => {
59
- const originalArray = [1, 2, 3];
60
- const result = await filterAsync(
61
- originalArray,
62
- async (_, index, { breakNow }) => {
63
- if (index === 1) {
64
- breakNow();
65
- }
66
- return true;
67
- },
68
- );
69
- expect(result).toEqual([1]);
70
- });
71
-
72
- it('should pass the original array to the operator function', async () => {
73
- const originalArray = [1, 2, 3];
74
- const result = await filterAsync(
75
- originalArray,
76
- async (_, index, { array }) => {
77
- return array.length === 3;
78
- },
79
- );
80
- expect(result).toEqual(originalArray);
81
- });
82
-
83
- it('should handle an operator function that returns a non-boolean value', async () => {
84
- const originalArray = [1, 2, 3];
85
- const result = await filterAsync(
86
- originalArray,
87
- async () => {
88
- return 'hello';
89
- },
90
- );
91
- expect(result).toEqual(originalArray);
92
- });
93
-
94
- it('should handle an operator function that throws an error', async () => {
95
- const originalArray = [1, 2, 3];
96
- let error: any = null;
97
- let result: number[] | null = null;
98
- try {
99
- result = await filterAsync(
100
- originalArray,
101
- async () => {
102
- throw new Error('Something went wrong');
103
- },
104
- );
105
- } catch (err) {
106
- error = err;
107
- }
108
- expect(result).toEqual(null);
109
- expect(error).not.toBe(null);
110
- });
111
-
112
- it('should handle an array of objects', async () => {
113
- const originalArray = [
114
- { name: 'Alice', age: 30 },
115
- { name: 'Bob', age: 25 },
116
- { name: 'Charlie', age: 35 },
117
- ];
118
- const result = await filterAsync(
119
- originalArray,
120
- async (item) => {
121
- return (item.age > 30);
122
- },
123
- );
124
- expect(result).toEqual([{ name: 'Charlie', age: 35 }]);
125
- });
126
- });
@@ -1,50 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array, returning a new array
3
- * that only contains the items that pass the filter
4
- * @author Gabe Abrams
5
- * @param operatorFunction the operator function to apply. If it returns true
6
- * for an item, the item will be included in the returned array
7
- * @returns the filtered array
8
- */
9
- const filterAsync = async <T>(
10
- array: T[],
11
- operatorFunction: (
12
- item: T,
13
- index: number,
14
- opts: {
15
- breakNow: () => void,
16
- array: Array<T>,
17
- },
18
- ) => Promise<any>,
19
- ): Promise<T[]> => {
20
- // Create break logic
21
- let done = false;
22
- /**
23
- * Break the loop (filtering stops here)
24
- * @author Gabe Abrams
25
- */
26
- const breakNow = () => {
27
- done = true;
28
- };
29
-
30
- // Loop through each item, filtering
31
- const output: T[] = [];
32
- for (let i = 0; i < array.length && !done; i++) {
33
- const included = await operatorFunction(
34
- array[i],
35
- i,
36
- {
37
- breakNow,
38
- array,
39
- },
40
- );
41
- if (included && !done) {
42
- output.push(array[i]);
43
- }
44
- }
45
-
46
- // Return results
47
- return output;
48
- };
49
-
50
- export default filterAsync;