dce-reactkit 4.3.5-beta-progress-size.2 → 5.0.0

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 +405 -2374
  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 +1 -0
  9. package/dist/esm/index.js +145 -2281
  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 +1 -0
  17. package/dist/index.d.ts +4 -835
  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 +75 -61
  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 +1 -0
  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 -76
  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
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { LogMetadataType, ParamType, LogFunction } from 'dce-commonkit';
3
+ export { CommonKitErrorCode, DAY_IN_MS, DayOfWeek, ErrorWithCode, HOUR_IN_MS, LOG_REVIEW_GET_LOGS_ROUTE, LOG_REVIEW_ROUTE_PATH_PREFIX, LOG_REVIEW_STATUS_ROUTE, LOG_ROUTE_PATH, Log, LogAction, LogBuiltInMetadata, LogFunction, LogLevel, LogMainInfo, LogMetadataType, LogReviewerFilterState, LogSource, LogSourceSpecificInfo, LogType, LogTypeSpecificInfo, MINUTE_IN_MS, ParamType, SELECT_ADMIN_CHECK_ROUTE, abbreviate, avg, capitalize, ceilToNumDecimals, cloneDeep, compareArraysByProp, everyAsync, extractProp, filterAsync, floorToNumDecimals, forEachAsync, forceNumIntoBounds, genCSV, genCommaList, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, getTimestampFromTimeInfoInET, getWordCount, idify, mapAsync, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, prefixWithAOrAn, roundToNumDecimals, shuffleArray, someAsync, startMinWait, stringsToHumanReadableList, sum, validateEmail, validatePhoneNumber, validateString, waitMs } from 'dce-commonkit';
2
4
  import React$1 from 'react';
3
5
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
4
6
 
@@ -444,43 +446,6 @@ type Props$a = {
444
446
  };
445
447
  declare const ItemPicker: React$1.FC<Props$a>;
446
448
 
447
- /**
448
- * Type of the context map in a LogMetadata file
449
- * @author Gabe Abrams
450
- */
451
- type LogMetadataContextMap = {
452
- [k: string]: (string | {
453
- _: string;
454
- [k: string]: string;
455
- });
456
- };
457
-
458
- /**
459
- * Type of the tag map inside a LogMetadata file
460
- * @author Gabe Abrams
461
- */
462
- type LogMetadataTagMap = {
463
- [k: string]: string;
464
- };
465
-
466
- /**
467
- * Type of the target map inside a LogMetadata file
468
- * @author Gabe Abrams
469
- */
470
- type LogMetadataTargetMap = {
471
- [k: string]: string;
472
- };
473
-
474
- /**
475
- * Type of a LogMetadata file
476
- * @author Gabe Abrams
477
- */
478
- type LogMetadataType = {
479
- Context?: LogMetadataContextMap;
480
- Tag?: LogMetadataTagMap;
481
- Target?: LogMetadataTargetMap;
482
- };
483
-
484
449
  /**
485
450
  * Log reviewer panel that allows users (must be approved admins) to
486
451
  * review logs written by dce-reactkit
@@ -493,23 +458,6 @@ type Props$9 = {
493
458
  };
494
459
  declare const LogReviewer: React$1.FC<Props$9>;
495
460
 
496
- /**
497
- * Server-side API param types
498
- * @author Gabe Abrams
499
- */
500
- declare enum ParamType {
501
- Boolean = "Boolean",
502
- BooleanOptional = "BooleanOptional",
503
- Float = "Float",
504
- FloatOptional = "FloatOptional",
505
- Int = "Int",
506
- IntOptional = "IntOptional",
507
- JSON = "JSON",
508
- JSONOptional = "JSONOptional",
509
- String = "String",
510
- StringOptional = "StringOptional"
511
- }
512
-
513
461
  /**
514
462
  * Column description for a column in the IntelliTable
515
463
  * @author Gabe Abrams
@@ -778,6 +726,7 @@ declare const Dropdown: React$1.FC<Props$1>;
778
726
  * @author Allison Zhang
779
727
  */
780
728
  declare enum ProgressBarSize {
729
+ Small = "Small",
781
730
  Medium = "Medium",
782
731
  Large = "Large"
783
732
  }
@@ -802,64 +751,6 @@ type Props = (({
802
751
  });
803
752
  declare const ProgressBar: React$1.FC<Props>;
804
753
 
805
- /**
806
- * An error with a code
807
- * @author Gabe Abrams
808
- */
809
- declare class ErrorWithCode extends Error {
810
- code: string;
811
- constructor(message: string, code: string);
812
- }
813
-
814
- /**
815
- * One minute in ms
816
- * @author Gabe Abrams
817
- */
818
- declare const MINUTE_IN_MS = 60000;
819
-
820
- /**
821
- * One hour in ms
822
- * @author Gabe Abrams
823
- */
824
- declare const HOUR_IN_MS = 3600000;
825
-
826
- /**
827
- * One day in ms
828
- * @author Gabe Abrams
829
- */
830
- declare const DAY_IN_MS = 86400000;
831
-
832
- /**
833
- * Path of the route for storing client-side logs
834
- * @author Gabe Abrams
835
- */
836
- declare const LOG_REVIEW_ROUTE_PATH_PREFIX: string;
837
-
838
- /**
839
- * Path of the route for storing client-side logs
840
- * @author Gabe Abrams
841
- */
842
- declare const LOG_ROUTE_PATH: string;
843
-
844
- /**
845
- * Route for checking the status of the current user's
846
- * access to log review
847
- * @author Gabe Abrams
848
- */
849
- declare const LOG_REVIEW_STATUS_ROUTE: string;
850
-
851
- /**
852
- * Path of the route for getting logs for log review
853
- * @author Gabe Abrams
854
- */
855
- declare const LOG_REVIEW_GET_LOGS_ROUTE: string;
856
-
857
- /**
858
- * Route for checking if the current user is a select admin
859
- * @author Gabe Abrams
860
- */
861
- declare const SELECT_ADMIN_CHECK_ROUTE = "/api/admin/select/is-select-admin";
862
-
863
754
  /**
864
755
  * Dynamic words determined by the user's platform
865
756
  * @author Gabe Abrams
@@ -915,95 +806,6 @@ declare const initClient: (opts: ({
915
806
  sessionExpiredMessage?: undefined;
916
807
  })) => void;
917
808
 
918
- /**
919
- * Shorten text so it fits into a certain number of chars
920
- * @author Gabe Abrams
921
- * @param text the text to abbreviate
922
- * @param maxChars the maximum number of chars to include
923
- * @returns abbreviated text with length no greater than maxChars
924
- * (including ellipses if applicable)
925
- */
926
- declare const abbreviate: (text: string, maxChars: number) => string;
927
-
928
- /**
929
- * Get the average of a set of numbers
930
- * @author Gabe Abrams
931
- * @param nums the numbers to average
932
- * @returns average value or 0 if no numbers
933
- */
934
- declare const avg: (nums: number[]) => number;
935
-
936
- /**
937
- * Round a number (ceiling) to a certain number of decimals
938
- * @author Gabe Abrams
939
- * @param num the number to round
940
- * @param numDecimals the number of decimals to round to
941
- * @returns rounded number
942
- */
943
- declare const ceilToNumDecimals: (num: number, numDecimals: number) => number;
944
-
945
- /**
946
- * Round a number (floor) to a certain number of decimals
947
- * @author Gabe Abrams
948
- * @param num the number to round
949
- * @param numDecimals the number of decimals to round to
950
- * @returns rounded number
951
- */
952
- declare const floorToNumDecimals: (num: number, numDecimals: number) => number;
953
-
954
- /**
955
- * Force a number to stay within specific bounds
956
- * @author Gabe Abrams
957
- * @param num the number to move into the bounds
958
- * @param min the minimum number in the bound
959
- * @param max the maximum number in the bound
960
- * @returns bounded number
961
- */
962
- declare const forceNumIntoBounds: (num: number, min: number, max: number) => number;
963
-
964
- /**
965
- * Pad a number's decimal with zeros on the right
966
- * (e.g. 5.2 becomes 5.20 with 2 digit padding)
967
- * @author Gabe Abrams
968
- * @param num the number to pad
969
- * @param numDigits the minimum number of digits after the decimal
970
- * @returns padded number
971
- */
972
- declare const padDecimalZeros: (num: number, numDigits: number) => string;
973
-
974
- /**
975
- * Pad a number with zeros on the left (e.g. 5 becomes 05 with 2 digit padding)
976
- * @author Gabe Abrams
977
- * @param num the number to pad
978
- * @param numDigits the minimum number of digits before the decimal
979
- * @returns padded number
980
- */
981
- declare const padZerosLeft: (num: number, numDigits: number) => string;
982
-
983
- /**
984
- * Round a number to a certain number of decimals
985
- * @author Gabe Abrams
986
- * @param num the number to round
987
- * @param numDecimals the number of decimals to round to
988
- * @returns rounded number
989
- */
990
- declare const roundToNumDecimals: (num: number, numDecimals: number) => number;
991
-
992
- /**
993
- * Sum the numbers in an array
994
- * @author Gabe Abrams
995
- * @param nums the numbers to sum
996
- * @returns the sum of the numbers
997
- */
998
- declare const sum: (nums: number[]) => number;
999
-
1000
- /**
1001
- * Wait for a certain number of ms
1002
- * @author Gabe Abrams
1003
- * @param ms number of ms to wait
1004
- */
1005
- declare const waitMs: (ms?: number) => Promise<unknown>;
1006
-
1007
809
  /**
1008
810
  * Visit an endpoint on the server [for client only]
1009
811
  * @author Gabe Abrams
@@ -1021,35 +823,6 @@ declare const visitServerEndpoint: (opts: {
1021
823
  } | undefined;
1022
824
  }) => Promise<any>;
1023
825
 
1024
- /**
1025
- * Get a number's ordinal
1026
- * @author Gabe Abrams
1027
- * @param num the number being analyzed
1028
- * @returns ordinal
1029
- */
1030
- declare const getOrdinal: (num: number) => string;
1031
-
1032
- /**
1033
- * Get current time info in US Boston Eastern Time, independent of machine
1034
- * timezone
1035
- * @author Gabe Abrams
1036
- * @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
1037
- * @returns object with timestamp (ms since epoch) and numbers
1038
- * corresponding to ET time values for year, month, day, hour, hour12, minute, second, isPM
1039
- * where hour is in 24hr time and hour12 is in 12hr time.
1040
- */
1041
- declare const getTimeInfoInET: (dateOrTimestamp?: Date | number) => {
1042
- timestamp: number;
1043
- year: number;
1044
- month: number;
1045
- day: number;
1046
- hour: number;
1047
- hour12: number;
1048
- minute: number;
1049
- second: number;
1050
- isPM: boolean;
1051
- };
1052
-
1053
826
  /**
1054
827
  * Stub a server endpoint response
1055
828
  * @author Gabe Abrams
@@ -1068,210 +841,6 @@ declare const stubServerEndpoint: (opts: {
1068
841
  errorCode?: string | undefined;
1069
842
  }) => void;
1070
843
 
1071
- /**
1072
- * Start a dynamic wait, call the function once the operation has completed and
1073
- * the dynamic wait will continue waiting for the rest of the minimum time
1074
- * @author Gabe Abrams
1075
- * @param minWaitMs the minimum number of ms to wait
1076
- * @returns async function to call to finish the wait
1077
- */
1078
- declare const startMinWait: (minWaitMs: number) => () => Promise<void>;
1079
-
1080
- /**
1081
- * Get a human-readable description of a date (all in ET)
1082
- * @author Gabe Abrams
1083
- * @param [dateOrTimestamp=today] the date or timestamp for the date to describe
1084
- * @returns human-readable description of the date
1085
- */
1086
- declare const getHumanReadableDate: (dateOrTimestamp?: Date | number) => string;
1087
-
1088
- /**
1089
- * Get the current part of day (morning, evening, etc.)
1090
- * @author Gabe Abrams
1091
- * @returns the part of day (morning, evening, etc.)
1092
- */
1093
- declare const getPartOfDay: () => string;
1094
-
1095
- /**
1096
- * Create a human readable list from an array of strings.
1097
- * For example, ['apple', 'orange'] becomes "apple and orange"
1098
- * and ['apple', 'orange', 'mango'] becomes "apple, orange, and mango"
1099
- * @author Gabe Abrams
1100
- * @param items list of items in the list
1101
- * @returns human-readable list
1102
- */
1103
- declare const stringsToHumanReadableList: (items: string[]) => string;
1104
-
1105
- /**
1106
- * Given a string, only keep the letters inside it
1107
- * @author Gabe Abrams
1108
- * @param str the string to parse
1109
- * @returns only the letters inside of the string
1110
- */
1111
- declare const onlyKeepLetters: (str: string) => string;
1112
-
1113
- /**
1114
- * Run tasks in parallel with a limit on how many tasks can execute at once.
1115
- * No guarantees are made about the order of task execution
1116
- * @author Gabe Abrams
1117
- * @param taskFunctions functions that start asynchronous tasks and optionally
1118
- * resolve with values
1119
- * @param [limit=no limit] maximum number of asynchronous tasks to permit to run at
1120
- * once
1121
- * @returns array of resolved values in the same order as the task functions
1122
- */
1123
- declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number) => Promise<any[]>;
1124
-
1125
- /**
1126
- * Allowed log levels
1127
- * @author Gabe Abrams
1128
- */
1129
- declare enum LogLevel {
1130
- Warn = "Warn",
1131
- Info = "Info",
1132
- Debug = "Debug"
1133
- }
1134
-
1135
- /**
1136
- * Main information in a log event
1137
- * @author Gabe Abrams
1138
- */
1139
- type LogMainInfo = {
1140
- id: string;
1141
- userFirstName: string;
1142
- userLastName: string;
1143
- userEmail: string;
1144
- userId: number;
1145
- isLearner: boolean;
1146
- isAdmin: boolean;
1147
- isTTM: boolean;
1148
- courseId: number;
1149
- courseName: string;
1150
- browser: {
1151
- name: string;
1152
- version: string;
1153
- };
1154
- device: {
1155
- os: string;
1156
- isMobile: boolean;
1157
- };
1158
- year: number;
1159
- month: number;
1160
- day: number;
1161
- hour: number;
1162
- minute: number;
1163
- timestamp: number;
1164
- context: string;
1165
- subcontext: string;
1166
- tags: string[];
1167
- level: LogLevel;
1168
- metadata?: {
1169
- [k: string]: any;
1170
- };
1171
- };
1172
-
1173
- /**
1174
- * Source of a log event
1175
- * @author Gabe Abrams
1176
- */
1177
- declare enum LogSource {
1178
- Client = "client",
1179
- Server = "server"
1180
- }
1181
-
1182
- /**
1183
- * Log info that is specific to the type of source
1184
- * @author Gabe Abrams
1185
- */
1186
- type LogSourceSpecificInfo = ({
1187
- source: LogSource.Client;
1188
- } | {
1189
- source: LogSource.Server;
1190
- routePath: string;
1191
- routeTemplate: string;
1192
- });
1193
-
1194
- /**
1195
- * Types of actions
1196
- * @author Gabe Abrams
1197
- */
1198
- declare enum LogAction {
1199
- Open = "Open",
1200
- Close = "Close",
1201
- Cancel = "Cancel",
1202
- Expand = "Expand",
1203
- Collapse = "Collapse",
1204
- View = "View",
1205
- Interrupt = "Interrupt",
1206
- Create = "Create",
1207
- Modify = "Modify",
1208
- Delete = "Delete",
1209
- Add = "Add",
1210
- Remove = "Remove",
1211
- Activate = "Activate",
1212
- Deactivate = "Deactivate",
1213
- Peek = "Peek",
1214
- Halt = "Halt",
1215
- Resume = "Resume",
1216
- Jump = "Jump",
1217
- Post = "Post",
1218
- Like = "Like",
1219
- Dislike = "Dislike",
1220
- Unknown = "Unknown"
1221
- }
1222
-
1223
- /**
1224
- * Type of a log event
1225
- * @author Gabe Abrams
1226
- */
1227
- declare enum LogType {
1228
- Action = "action",
1229
- Error = "error"
1230
- }
1231
-
1232
- /**
1233
- * Log info that is specific to the type of log
1234
- * @author Gabe Abrams
1235
- */
1236
- type LogTypeSpecificInfo = ({
1237
- type: LogType.Error;
1238
- errorMessage: string;
1239
- errorCode: string;
1240
- errorStack: string;
1241
- } | {
1242
- type: LogType.Action;
1243
- target: string;
1244
- action: LogAction;
1245
- });
1246
-
1247
- /**
1248
- * A single log event corresponding to an action performed by a user or an
1249
- * error encountered by a user
1250
- * @author Gabe Abrams
1251
- */
1252
- type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
1253
-
1254
- /**
1255
- * Type of a log action function
1256
- * @author Gabe Abrams
1257
- */
1258
- type LogFunction = (opts: ({
1259
- context: string | {
1260
- _: string;
1261
- };
1262
- subcontext?: string;
1263
- tags?: string[];
1264
- metadata?: {
1265
- [k: string]: any;
1266
- };
1267
- level?: LogLevel;
1268
- } & ({
1269
- error: any;
1270
- } | {
1271
- action: LogAction;
1272
- target?: string;
1273
- }))) => Promise<Log>;
1274
-
1275
844
  type MetadataPopulator = () => {
1276
845
  [k: string]: any;
1277
846
  } | Promise<{
@@ -1292,38 +861,6 @@ declare const setClientEventMetadataPopulator: (newMetadataPopulator: MetadataPo
1292
861
  */
1293
862
  declare const logClientEvent: LogFunction;
1294
863
 
1295
- /**
1296
- * Get the name of a month given the month number (1 = January, etc.)
1297
- * If an invalid number is provided, we will treat it like January
1298
- * @author Gabe Abrams
1299
- * @param month the number of the month
1300
- * @returns object containing multiple month name formats:
1301
- * { short, full } where short will look like "Jan" and full will look like
1302
- * "January"
1303
- */
1304
- declare const getMonthName: (month: number) => {
1305
- short: string;
1306
- full: string;
1307
- };
1308
-
1309
- /**
1310
- * Generate a CSV file
1311
- * @author Gabe Abrams
1312
- * @param data list of row data in the form of json objects
1313
- * @param columns list of columns to include in the csv where each column is an object with:
1314
- * - title: the column title
1315
- * - param: the key in the data object to use for this column
1316
- * - textIfUndefined: optional text to use if the value is undefined (defaults to empty string)
1317
- * @returns multiline csv string
1318
- */
1319
- declare const genCSV: (data: {
1320
- [k: string]: any;
1321
- }[], columns: {
1322
- title: string;
1323
- param: string;
1324
- textIfUndefined?: string;
1325
- }[]) => string;
1326
-
1327
864
  /**
1328
865
  * Check if the current user can review logs
1329
866
  * @author Gabe Abrams
@@ -1338,124 +875,6 @@ declare const canReviewLogs: () => Promise<boolean>;
1338
875
  */
1339
876
  declare const isMobileOrTablet: () => boolean;
1340
877
 
1341
- /**
1342
- * For every element in an array, extract the value of a prop
1343
- * (e.g. for all user objects, extract their ages and put that into a new
1344
- * ages array)
1345
- * @author Gabe Abrams
1346
- * @param arr the array of objects to operate on
1347
- * @param prop the property to extract from each object
1348
- * @returns new array containing the corresponding values, in order, of each
1349
- * object in the original array
1350
- */
1351
- declare const extractProp: (arr: any[], prop: string) => any[];
1352
-
1353
- /**
1354
- * Compare two arrays of objects by only comparing the values in a specific
1355
- * property (e.g. compare user arrays by comparing their user.id values)
1356
- * @author Gabe Abrams
1357
- * @param a the first array
1358
- * @param b the second array
1359
- * @param prop the property to compare with, or an array of props to compare
1360
- * with (if array, all values associated with those props must match)
1361
- * @returns true if the arrays contain the same objects as determined by
1362
- * the values associated with each object's prop
1363
- */
1364
- declare const compareArraysByProp: (a: any[], b: any[], prop: string | string[]) => boolean;
1365
-
1366
- /**
1367
- * Get current time info in local time
1368
- * @author Gabe Abrams
1369
- * @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
1370
- * @returns object with timestamp (ms since epoch) and numbers
1371
- * corresponding to time values for year, month, day, hour, hour12, minute, isPM
1372
- * where hour is in 24hr time and hour12 is in 12hr time.
1373
- */
1374
- declare const getLocalTimeInfo: (dateOrTimestamp?: Date | number) => {
1375
- timestamp: number;
1376
- year: number;
1377
- month: number;
1378
- day: number;
1379
- hour: number;
1380
- hour12: number;
1381
- minute: number;
1382
- isPM: boolean;
1383
- };
1384
-
1385
- /**
1386
- * Given an array of strings, create a single comma-separated string that includes
1387
- * 'and' as well as an oxford comma.
1388
- * Ex: ['apples'] => 'apples'
1389
- * Ex: ['apples', 'bananas'] => 'apples and bananas'
1390
- * Ex: ['apples', 'bananas', 'grapes'] => 'apples, bananas, and grapes'
1391
- * @author Austen Money
1392
- * @param list an array of elements to be made into a single comma-separated string.
1393
- * @returns a comma-separated string.
1394
- */
1395
- declare const genCommaList: (list: string[]) => string;
1396
-
1397
- /**
1398
- * Result of a validation function.
1399
- * @author Austen Money
1400
- */
1401
- type ValidationResult<CleanedValueType> = ({
1402
- isValid: true;
1403
- cleanedValue: CleanedValueType;
1404
- } | {
1405
- isValid: false;
1406
- errorMessage: string;
1407
- });
1408
-
1409
- /**
1410
- * Determines whether a given email address is valid.
1411
- * @author Austen Money
1412
- * @param email email address to validate
1413
- * @returns whether email fulfills proper formatting requirements, includes a
1414
- * cleaned version of the address without leading or trailing
1415
- * whitespace if valid or an error message if invalid.
1416
- */
1417
- declare const validateEmail: (email: string) => ValidationResult<string>;
1418
-
1419
- /**
1420
- * Determines whether a given phone number is valid.
1421
- * @author Austen Money
1422
- * @param phoneNumber phone number to validate
1423
- * @returns whether phone number is considered valid - if valid, also returns
1424
- * a cleaned version of the number without any formatting. If invalid,
1425
- * returns an error message.
1426
- */
1427
- declare const validatePhoneNumber: (phoneNumber: string) => ValidationResult<string>;
1428
-
1429
- /**
1430
- * Determines whether a given input string is considered valid based on
1431
- * the provided requirements.
1432
- * @author Austen Money
1433
- * @param input input string
1434
- * @param opts options for validation
1435
- * @returns whether input is considered valid according to reqs - if
1436
- * valid, returns a cleaned version of input; if invalid, returns
1437
- * a string containing error messages describing which requirements
1438
- * were not met.
1439
- */
1440
- declare const validateString: (input: string, opts: {
1441
- ignoreWhitespace?: boolean;
1442
- minLen?: number;
1443
- maxLen?: number;
1444
- lettersOnly?: boolean;
1445
- numbersOnly?: boolean;
1446
- regexTest?: RegExp;
1447
- regexDescription?: string;
1448
- }) => ValidationResult<string>;
1449
-
1450
- /**
1451
- * Convert a string to hyphenated lowercase format with no space or
1452
- * non-alphanumeric characters
1453
- * @author Gabe Abrams
1454
- * @param str the string to convert
1455
- * @returns the idified string
1456
- */
1457
- declare const idify: (str: string) => string;
1458
-
1459
878
  /**
1460
879
  * Given some text, make the links clickable
1461
880
  * @author Gabe Abrams
@@ -1482,16 +901,6 @@ declare const makeLinksClickable: (text: string, opts?: {
1482
901
  */
1483
902
  declare const combineClassNames: (classNames: (string | undefined | null | false)[]) => string;
1484
903
 
1485
- /**
1486
- * Prefix a word or name with "a" or "an" depending on whether it starts with a
1487
- * vowel or not
1488
- * @author Gabe Abrams
1489
- * @param text the text to prefix
1490
- * @param capitalize whether to capitalize the "A" or "An"
1491
- * @returns the text prefixed with "a" or "an"
1492
- */
1493
- declare const prefixWithAOrAn: (text: string, capitalize?: boolean) => string;
1494
-
1495
904
  /**
1496
905
  * Create a function that forces a render of a component. Use this only when
1497
906
  * absolutely necessary
@@ -1501,119 +910,6 @@ declare const prefixWithAOrAn: (text: string, capitalize?: boolean) => string;
1501
910
  */
1502
911
  declare const useForceRender: (useReducer: any) => () => void;
1503
912
 
1504
- /**
1505
- * Run the operator function on each item in the array, returning true if
1506
- * the operator function returns true for every item in the array
1507
- * @author Gabe Abrams
1508
- * @param operatorFunction the operator function to apply. If it returns true
1509
- * for every item, this function will return true
1510
- * @returns true if the operator function returns true for every item in the array
1511
- */
1512
- declare const everyAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
1513
- breakNow: () => void;
1514
- array: T[];
1515
- }) => Promise<any>) => Promise<boolean>;
1516
-
1517
- /**
1518
- * Run the operator function on each item in the array, returning a new array
1519
- * that only contains the items that pass the filter
1520
- * @author Gabe Abrams
1521
- * @param operatorFunction the operator function to apply. If it returns true
1522
- * for an item, the item will be included in the returned array
1523
- * @returns the filtered array
1524
- */
1525
- declare const filterAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
1526
- breakNow: () => void;
1527
- array: T[];
1528
- }) => Promise<any>) => Promise<T[]>;
1529
-
1530
- /**
1531
- * Run the operator function on each item in the array
1532
- * @author Gabe Abrams
1533
- * @param operatorFunction the operator function to apply
1534
- */
1535
- declare const forEachAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
1536
- breakNow: () => void;
1537
- array: T[];
1538
- }) => void) => Promise<void>;
1539
-
1540
- /**
1541
- * Run the operator function on each item in the array, collecting all results
1542
- * @author Gabe Abrams
1543
- * @param operatorFunction the operator function to apply
1544
- * @returns the array of results
1545
- */
1546
- declare const mapAsync: <T, U>(array: T[], operatorFunction: (item: T, index: number, opts: {
1547
- breakNow: () => void;
1548
- array: T[];
1549
- }) => Promise<U>) => Promise<U[]>;
1550
-
1551
- /**
1552
- * Run the operator function on each item in the array, returning true if
1553
- * the operator function returns true for any item in the array
1554
- * @author Gabe Abrams
1555
- * @param operatorFunction the operator function to apply. If it returns true
1556
- * for any item, this function will return true
1557
- * @returns true if the operator function returns true for any item in the array
1558
- */
1559
- declare const someAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
1560
- breakNow: () => void;
1561
- array: T[];
1562
- }) => Promise<any>) => Promise<boolean>;
1563
-
1564
- /**
1565
- * Capitalize every word in a string (just the first letter)
1566
- * @param str string to capitalize
1567
- * @returns string with every word capitalized
1568
- */
1569
- declare const capitalize: (str: string) => string;
1570
-
1571
- /**
1572
- * Shuffle a given array
1573
- * @author Austen Money
1574
- * @param arr the array to shuffle
1575
- * @returns the shuffled array
1576
- */
1577
- declare const shuffleArray: <T>(arr: T[]) => T[];
1578
-
1579
- /**
1580
- * Get number of words in string
1581
- * @author Gardenia Liu
1582
- * @author Allison Zhang
1583
- * @author Gabe Abrams
1584
- * @param text the string to check
1585
- * @returns number of words in the string
1586
- */
1587
- declare const getWordCount: (text: string) => number;
1588
-
1589
- /**
1590
- * Deeply clones an object
1591
- * @author Yuen Ler Chow
1592
- * @param obj the object to clone
1593
- * @returns a deep clone of the object
1594
- */
1595
- declare const cloneDeep: <T>(obj: T) => T;
1596
-
1597
- /**
1598
- * Get a timestamp (ms since epoch) from time info (year, month, day, hour, minute, etc.) in Eastern Time (ET)
1599
- * @author Gardenia Liu
1600
- * @author Gabe Abrams
1601
- * @param opts object containing all arguments
1602
- * @param opts.year Year (e.g. 2023)
1603
- * @param opts.month Month (1-12)
1604
- * @param opts.day Day of the month (1-31)
1605
- * @param opts.hour Hour (0-23)
1606
- * @param opts.minute Minute (0-59)
1607
- * @returns Timestamp in milliseconds since epoch
1608
- */
1609
- declare const getTimestampFromTimeInfoInET: (opts: {
1610
- year: number;
1611
- month: number;
1612
- day: number;
1613
- hour: number;
1614
- minute: number;
1615
- }) => number;
1616
-
1617
913
  /**
1618
914
  * Checks if the current user is a select admin
1619
915
  * @author Gardenia Liu
@@ -1621,131 +917,4 @@ declare const getTimestampFromTimeInfoInET: (opts: {
1621
917
  */
1622
918
  declare const isSelectAdmin: () => Promise<boolean>;
1623
919
 
1624
- /**
1625
- * Days of the week
1626
- * @author Gabe Abrams
1627
- */
1628
- declare enum DayOfWeek {
1629
- Monday = "m",
1630
- Tuesday = "t",
1631
- Wednesday = "w",
1632
- Thursday = "r",
1633
- Friday = "f",
1634
- Saturday = "s",
1635
- Sunday = "u"
1636
- }
1637
-
1638
- /**
1639
- * Built-in metadata for logs
1640
- * @author Gabe Abrams
1641
- */
1642
- declare const LogBuiltInMetadata: {
1643
- Context: {
1644
- Uncategorized: string;
1645
- ServerRenderedErrorPage: string;
1646
- ServerEndpointError: string;
1647
- ClientFatalError: string;
1648
- };
1649
- Target: {
1650
- NoTarget: string;
1651
- };
1652
- };
1653
-
1654
- /**
1655
- * List of error codes built into the react kit
1656
- * @author Gabe Abrams
1657
- */
1658
- declare enum ReactKitErrorCode {
1659
- NoResponse = "DRK1",
1660
- NoCode = "DRK2",
1661
- SessionExpired = "DRK3",
1662
- NoCACCLSendRequestFunction = "DRK7",
1663
- SimpleDateChooserInvalidDateRange = "DRK35",
1664
- SimpleDateChooserInvalidNumMonths = "DRK36",
1665
- ETTimestampInvalid = "DRK37"
1666
- }
1667
-
1668
- /**
1669
- * Date filter state
1670
- * @author Yuen Ler Chow
1671
- */
1672
- type DateFilterState = {
1673
- startDate: {
1674
- year: number;
1675
- month: number;
1676
- day: number;
1677
- };
1678
- endDate: {
1679
- year: number;
1680
- month: number;
1681
- day: number;
1682
- };
1683
- };
1684
-
1685
- /**
1686
- * Context filter state
1687
- * @author Yuen Ler Chow
1688
- */
1689
- type ContextFilterState = {
1690
- [k: string]: (boolean | {
1691
- [k: string]: boolean;
1692
- });
1693
- };
1694
-
1695
- /**
1696
- * Tag filter state
1697
- * @author Yuen Ler Chow
1698
- */
1699
- type TagFilterState = {
1700
- [k: string]: boolean;
1701
- };
1702
-
1703
- /**
1704
- * Action filter state (only relevant for action logs)
1705
- * @author Yuen Ler Chow
1706
- */
1707
- type ActionErrorFilterState = {
1708
- type: LogType | undefined;
1709
- errorMessage: string;
1710
- errorCode: string;
1711
- target: {
1712
- [k: string]: boolean;
1713
- };
1714
- action: {
1715
- [k: string]: boolean;
1716
- };
1717
- };
1718
-
1719
- /**
1720
- * Advanced filter state
1721
- * @author Yuen Ler Chow
1722
- */
1723
- type AdvancedFilterState = {
1724
- userFirstName: string;
1725
- userLastName: string;
1726
- userEmail: string;
1727
- userId: string;
1728
- includeLearners: boolean;
1729
- includeTTMs: boolean;
1730
- includeAdmins: boolean;
1731
- courseId: string;
1732
- courseName: string;
1733
- isMobile: (true | false | undefined);
1734
- source: LogSource | undefined;
1735
- routePath: string;
1736
- routeTemplate: string;
1737
- };
1738
-
1739
- /**
1740
- * A bundle of filter state objects for each type of filter
1741
- * @author Gabe Abrams
1742
- */
1743
- type LogReviewerFilterState = {
1744
- dateFilterState: DateFilterState;
1745
- contextFilterState: ContextFilterState;
1746
- tagFilterState: TagFilterState;
1747
- actionErrorFilterState: ActionErrorFilterState;
1748
- advancedFilterState: AdvancedFilterState;
1749
- };
1750
-
1751
- export { AppWrapper, AutoscrollToBottomContainer, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntry, DBEntryField, DBEntryFieldType, DBEntryManagerPanel, DayOfWeek, Drawer, Dropdown, DropdownItemType, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, IntelliTableColumn, ItemPicker, LOG_REVIEW_GET_LOGS_ROUTE, LOG_REVIEW_ROUTE_PATH_PREFIX, LOG_REVIEW_STATUS_ROUTE, LOG_ROUTE_PATH, LoadingSpinner, Log, LogAction, LogBuiltInMetadata, LogFunction, LogLevel, LogMainInfo, LogMetadataType, LogReviewer, LogReviewerFilterState, LogSource, LogSourceSpecificInfo, LogType, LogTypeSpecificInfo, MINUTE_IN_MS, Modal, ModalButtonType, ModalSize, ModalType, MultiSwitch, ParamType, PickableItem, PopFailureMark, PopPendingMark, PopSuccessMark, ProgressBar, ProgressBarSize, RadioButton, ReactKitErrorCode, SELECT_ADMIN_CHECK_ROUTE, SimpleDateChooser, SimpleTimeChooser, TabBox, ToggleSwitch, Tooltip, Variant, abbreviate, addFatalErrorHandler, alert, avg, canReviewLogs, capitalize, ceilToNumDecimals, cloneDeep, combineClassNames, compareArraysByProp, confirm, everyAsync, extractProp, filterAsync, floorToNumDecimals, forEachAsync, forceNumIntoBounds, genCSV, genCommaList, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, getTimestampFromTimeInfoInET, getWordCount, idify, initClient, isMobileOrTablet, isSelectAdmin, leaveToURL, logClientEvent, makeLinksClickable, mapAsync, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, prefixWithAOrAn, prompt, roundToNumDecimals, setClientEventMetadataPopulator, showFatalError, shuffleArray, someAsync, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, useForceRender, validateEmail, validatePhoneNumber, validateString, visitServerEndpoint, waitMs };
920
+ export { AppWrapper, AutoscrollToBottomContainer, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DBEntry, DBEntryField, DBEntryFieldType, DBEntryManagerPanel, Drawer, Dropdown, DropdownItemType, DynamicWord, ErrorBox, IntelliTable, IntelliTableColumn, ItemPicker, LoadingSpinner, LogReviewer, Modal, ModalButtonType, ModalSize, ModalType, MultiSwitch, PickableItem, PopFailureMark, PopPendingMark, PopSuccessMark, ProgressBar, ProgressBarSize, RadioButton, SimpleDateChooser, SimpleTimeChooser, TabBox, ToggleSwitch, Tooltip, Variant, addFatalErrorHandler, alert, canReviewLogs, combineClassNames, confirm, initClient, isMobileOrTablet, isSelectAdmin, leaveToURL, logClientEvent, makeLinksClickable, prompt, setClientEventMetadataPopulator, showFatalError, stubServerEndpoint, useForceRender, visitServerEndpoint };