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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "4.3.4",
3
+ "version": "5.0.0-beta-progress-size-3",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "homepage": "https://github.com/harvard-edtech/dce-reactkit#readme",
26
26
  "dependencies": {
27
- "nanoclone": "^1.0.2",
27
+ "dce-commonkit": "^5.0.0",
28
28
  "react-select": "^5.7.3"
29
29
  },
30
30
  "peerDependencies": {
@@ -33,7 +33,8 @@
33
33
  "@fortawesome/free-solid-svg-icons": "^x.x.x",
34
34
  "@fortawesome/react-fontawesome": "^x.x.x",
35
35
  "bootstrap": "^5.x.x",
36
- "react": "^x.x.x"
36
+ "react": "^x.x.x",
37
+ "react-dom": "^x.x.x"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -10,24 +10,27 @@ import React, { useState } from 'react';
10
10
  // Import FontAwesome
11
11
  import { faHourglassEnd } from '@fortawesome/free-solid-svg-icons';
12
12
 
13
+ // Import commonkit
14
+ import {
15
+ LogBuiltInMetadata,
16
+ ErrorWithCode,
17
+ waitMs,
18
+ CommonKitErrorCode,
19
+ } from 'dce-commonkit';
20
+
13
21
  // Import shared components
14
22
  import ErrorBox from './ErrorBox';
15
23
 
16
24
  // Import shared types
17
- import ReactKitErrorCode from '../types/ReactKitErrorCode';
18
25
  import ModalButtonType from '../types/ModalButtonType';
19
26
  import ModalType from '../types/ModalType';
20
27
  import Variant from '../types/Variant';
21
- import LogBuiltInMetadata from '../types/LogBuiltInMetadata';
22
28
 
23
29
  // Import shared components
24
30
  // TODO: fix dependency cycle
25
31
  // eslint-disable-next-line import/no-cycle
26
32
  import ModalForWrapper from './Modal';
27
33
 
28
- // Import custom errors
29
- import ErrorWithCode from '../errors/ErrorWithCode';
30
-
31
34
  // Import other helpers
32
35
  // TODO: fix dependency cycle
33
36
  // eslint-disable-next-line import/no-cycle
@@ -38,7 +41,6 @@ import {
38
41
  getSessionExpiredMessage,
39
42
  isDarkModeOn,
40
43
  } from '../helpers/initClient';
41
- import waitMs from '../helpers/waitMs';
42
44
 
43
45
  // Import constants
44
46
  import NUM_MODAL_PORTALS from '../constants/NUM_MODAL_PORTALS';
@@ -413,8 +415,8 @@ export const showFatalError = async (
413
415
  );
414
416
  const code: string = (
415
417
  typeof error === 'string'
416
- ? ReactKitErrorCode.NoCode
417
- : String(error.code ?? ReactKitErrorCode.NoCode)
418
+ ? CommonKitErrorCode.NoCode
419
+ : String(error.code ?? CommonKitErrorCode.NoCode)
418
420
  );
419
421
 
420
422
  // Call all fatal error listeners
@@ -856,11 +858,11 @@ const AppWrapper: React.FC<Props> = (props: Props): React.ReactElement => {
856
858
  sessionHasExpired
857
859
  ? new ErrorWithCode(
858
860
  getSessionExpiredMessage(),
859
- ReactKitErrorCode.SessionExpired,
861
+ CommonKitErrorCode.SessionExpired,
860
862
  )
861
863
  : new ErrorWithCode(
862
864
  (fatalErrorMessage ?? 'An unknown error has occurred. Please contact support.'),
863
- (fatalErrorCode ?? ReactKitErrorCode.NoCode),
865
+ (fatalErrorCode ?? CommonKitErrorCode.NoCode),
864
866
  )
865
867
  );
866
868
 
@@ -16,12 +16,14 @@ import {
16
16
  faChevronDown,
17
17
  } from '@fortawesome/free-solid-svg-icons';
18
18
 
19
+ // Import commonkit
20
+ import {
21
+ idify,
22
+ } from 'dce-commonkit';
23
+
19
24
  // Import shared types
20
25
  import Variant from '../types/Variant';
21
26
 
22
- // Import shared helper
23
- import idify from '../helpers/idify';
24
-
25
27
  /*------------------------------------------------------------------------*/
26
28
  /* -------------------------------- Types ------------------------------- */
27
29
  /*------------------------------------------------------------------------*/
@@ -10,9 +10,13 @@ import React, { useReducer } from 'react';
10
10
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
11
11
  import { faClipboard } from '@fortawesome/free-solid-svg-icons';
12
12
 
13
+ // Import commonkit
14
+ import {
15
+ waitMs,
16
+ } from 'dce-commonkit';
17
+
13
18
  // Import other reactkit functions
14
19
  import { alert } from './AppWrapper';
15
- import waitMs from '../helpers/waitMs';
16
20
 
17
21
  /*------------------------------------------------------------------------*/
18
22
  /* -------------------------------- Types ------------------------------- */
@@ -5,12 +5,12 @@
5
5
  * @param [adminsOnly] true if the endpoint is for admins only
6
6
  * @returns the endpoint path
7
7
  */
8
- const generateEndpointPath = (collectionName: string, adminsOnly?: boolean) => {
8
+ const generateEndpointPath = (collectionName: string, adminsOnly: boolean = true) => {
9
9
  // Determine prefix based on whether the endpoint is for admins only
10
10
  const userPath = adminsOnly ? 'admin' : 'ttm';
11
11
 
12
12
  // Return the endpoint path
13
- return `/api/${userPath}/dce-reactkit/dbeditor/${collectionName}`;
13
+ return `/api/${userPath}/dce-commonkit/dbeditor/${collectionName}`;
14
14
  };
15
15
 
16
16
  export default generateEndpointPath;
@@ -11,8 +11,12 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
11
11
  import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
12
12
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
13
13
 
14
+ // Import commonkit
15
+ import {
16
+ CommonKitErrorCode,
17
+ } from 'dce-commonkit';
18
+
14
19
  // Import shared types
15
- import ReactKitErrorCode from '../types/ReactKitErrorCode';
16
20
  import Variant from '../types/Variant';
17
21
 
18
22
  /*------------------------------------------------------------------------*/
@@ -82,7 +86,7 @@ const ErrorBox: React.FC<Props> = (props) => {
82
86
  >
83
87
  code:
84
88
  {' '}
85
- {String((error as any).code ?? ReactKitErrorCode.NoCode).toUpperCase()}
89
+ {String((error as any).code ?? CommonKitErrorCode.NoCode).toUpperCase()}
86
90
  </span>
87
91
  </span>
88
92
  );
@@ -17,14 +17,16 @@ import {
17
17
  faMinus,
18
18
  } from '@fortawesome/free-solid-svg-icons';
19
19
 
20
+ // Import commonkit
21
+ import {
22
+ ParamType,
23
+ roundToNumDecimals,
24
+ genCSV,
25
+ } from 'dce-commonkit';
26
+
20
27
  // Import shared types
21
- import ParamType from '../types/ParamType';
22
28
  import IntelliTableColumn from '../types/IntelliTableColumn';
23
29
 
24
- // Import shared helpers
25
- import roundToNumDecimals from '../helpers/roundToNumDecimals';
26
- import genCSV from '../helpers/genCSV';
27
-
28
30
  // Import shared components
29
31
  import Modal from './Modal';
30
32
  import ModalType from '../types/ModalType';
@@ -19,32 +19,35 @@ import {
19
19
  faSearch,
20
20
  } from '@fortawesome/free-solid-svg-icons';
21
21
 
22
+ // Import commonkit
23
+ import {
24
+ getTimeInfoInET,
25
+ getHumanReadableDate,
26
+ LOG_REVIEW_GET_LOGS_ROUTE,
27
+ Log,
28
+ LogMetadataType,
29
+ LogSource,
30
+ LogType,
31
+ LogAction,
32
+ ParamType,
33
+ LogBuiltInMetadata,
34
+ LogMetadataContextMap,
35
+ LogMetadataTargetMap,
36
+ cloneDeep,
37
+ LogReviewerFilterState,
38
+ DateFilterState,
39
+ ContextFilterState,
40
+ TagFilterState,
41
+ ActionErrorFilterState,
42
+ AdvancedFilterState,
43
+ } from 'dce-commonkit';
44
+
22
45
  // Import shared helpers
23
46
  import visitServerEndpoint from '../helpers/visitServerEndpoint';
24
- import getTimeInfoInET from '../helpers/getTimeInfoInET';
25
47
  import { alert, showFatalError } from './AppWrapper';
26
- import getHumanReadableDate from '../helpers/getHumanReadableDate';
27
-
28
- // Import shared constants
29
- import LOG_REVIEW_GET_LOGS_ROUTE from '../constants/LOG_REVIEW_GET_LOGS_ROUTE';
30
48
 
31
49
  // Import shared types
32
- import Log from '../types/Log';
33
- import LogMetadataType from '../types/LogMetadataType';
34
- import LogSource from '../types/LogSource';
35
- import LogType from '../types/LogType';
36
- import LogAction from '../types/LogAction';
37
- import ParamType from '../types/ParamType';
38
50
  import IntelliTableColumn from '../types/IntelliTableColumn';
39
- import LogBuiltInMetadata from '../types/LogBuiltInMetadata';
40
- import LogMetadataContextMap from '../types/LogMetadataContextMap';
41
- import LogMetadataTargetMap from '../types/LogMetadataTargetMap';
42
- import LogReviewerFilterState from '../types/LogReviewerFilterState';
43
- import DateFilterState from '../types/LogReviewerFilterState/DateFilterState';
44
- import ContextFilterState from '../types/LogReviewerFilterState/ContextFilterState';
45
- import TagFilterState from '../types/LogReviewerFilterState/TagFilterState';
46
- import ActionErrorFilterState from '../types/LogReviewerFilterState/ActionErrorFilterState';
47
- import AdvancedFilterState from '../types/LogReviewerFilterState/AdvancedFilterState';
48
51
  import Variant from '../types/Variant';
49
52
 
50
53
  // Import shared components
@@ -59,7 +62,6 @@ import RadioButton from './RadioButton';
59
62
  import ButtonInputGroup from './ButtonInputGroup';
60
63
  import IntelliTable from './IntelliTable';
61
64
  import Pagination from './Pagination';
62
- import cloneDeep from '../helpers/cloneDeep';
63
65
 
64
66
  /*------------------------------------------------------------------------*/
65
67
  /* -------------------------------- Types ------------------------------- */
@@ -13,12 +13,14 @@
13
13
  import React, { useState, useEffect, useRef } from 'react';
14
14
  import ReactDOM from 'react-dom';
15
15
 
16
+ // Import commonkit
17
+ import {
18
+ waitMs,
19
+ } from 'dce-commonkit';
20
+
16
21
  // Import other components
17
22
  import LoadingSpinner from '../LoadingSpinner';
18
23
 
19
- // Import helpers
20
- import waitMs from '../../helpers/waitMs';
21
-
22
24
  // Import types
23
25
  import Variant from '../../types/Variant';
24
26
  import ModalButtonType from '../../types/ModalButtonType';
@@ -12,8 +12,12 @@ import React, { useReducer } from 'react';
12
12
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
13
13
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
14
14
 
15
+ // Import commonkit
16
+ import {
17
+ idify,
18
+ } from 'dce-commonkit';
19
+
15
20
  // Import shared helpers
16
- import idify from '../helpers/idify';
17
21
  import combineClassNames from '../helpers/combineClassNames';
18
22
 
19
23
  /*------------------------------------------------------------------------*/
@@ -10,6 +10,12 @@ import React from 'react';
10
10
  import Variant from '../types/Variant';
11
11
  import ProgressBarSize from '../types/ProgressBarSize';
12
12
 
13
+ // Import helpers
14
+ import {
15
+ roundToNumDecimals,
16
+ padDecimalZeros,
17
+ } from 'dce-commonkit';
18
+
13
19
  /*------------------------------------------------------------------------*/
14
20
  /* -------------------------------- Types ------------------------------- */
15
21
  /*------------------------------------------------------------------------*/
@@ -75,7 +81,7 @@ type ProgressStatus = (
75
81
  const ITEM_WIDTH_MULTIPLIER = 1.3;
76
82
 
77
83
  // Constant for percent width
78
- const PERCENT_WIDTH = 3;
84
+ const PERCENT_WIDTH = 2.7;
79
85
 
80
86
  // Constant for item width
81
87
  const ITEM_WIDTH = 2;
@@ -88,11 +94,9 @@ const ITEM_WIDTH = 2;
88
94
  let style = `
89
95
  .ProgressBar-number-of,
90
96
  .ProgressBar-percent {
91
- flex: 0 0 auto;
92
97
  white-space: nowrap;
93
- padding-right: 0.5em;
94
- padding-left: 0.25em;
95
- text-align: right;
98
+ padding-right: 0.3em;
99
+ text-align: left;
96
100
  transition: width .25s ease;
97
101
  }
98
102
 
@@ -164,10 +168,20 @@ const ProgressBar: React.FC<Props> = (props) => {
164
168
  /* ---------------- Sizes --------------- */
165
169
  /*----------------------------------------*/
166
170
 
171
+ // Add dynamic general style
172
+ style += `
173
+ .ProgressBar-percent {
174
+ min-width: ${(status.usePercent ? status.numDecimalPlaces ?? 0 : 0) + PERCENT_WIDTH}em;
175
+ }
176
+ .ProgressBar-number-of {
177
+ min-width: ${((!status.usePercent ? String(status.total ?? 0).length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
178
+ }
179
+ `;
180
+
167
181
  // Size styles
168
182
  switch (size) {
169
- case ProgressBarSize.Small:
170
- // Small size
183
+ case ProgressBarSize.Medium:
184
+ // Medium size
171
185
  style += `
172
186
  .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
173
187
  font-size: 1em;
@@ -180,18 +194,10 @@ const ProgressBar: React.FC<Props> = (props) => {
180
194
  height: 1.5em;
181
195
  border-radius: 0.5em;
182
196
  }
183
- .ProgressBar-percent {
184
- min-width: ${((status.usePercent ? status.numDecimalPlaces ?? 0 : 0) * 1) + PERCENT_WIDTH}em;
185
- max-width: ${((status.usePercent ? status.numDecimalPlaces ?? 0 : 0) * 1) + PERCENT_WIDTH}em;
186
- }
187
- .ProgressBar-number-of {
188
- min-width: ${((!status.usePercent ? status.total?.toString().length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
189
- max-width: ${((!status.usePercent ? status.total?.toString().length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
190
- }
191
197
  `;
192
198
  break;
193
- case ProgressBarSize.Medium:
194
- // Medium size
199
+ case ProgressBarSize.Large:
200
+ // Large size
195
201
  style += `
196
202
  .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
197
203
  font-size: 1.5em;
@@ -204,38 +210,6 @@ const ProgressBar: React.FC<Props> = (props) => {
204
210
  height: 2em;
205
211
  border-radius: 0.7em;
206
212
  }
207
- .ProgressBar-percent {
208
- min-width: ${((status.usePercent ? status.numDecimalPlaces ?? 0 : 0) * 1) + PERCENT_WIDTH}em;
209
- max-width: ${((status.usePercent ? status.numDecimalPlaces ?? 0 : 0) * 1) + PERCENT_WIDTH}em;
210
- }
211
- .ProgressBar-number-of {
212
- min-width: ${((!status.usePercent ? status.total?.toString().length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
213
- max-width: ${((!status.usePercent ? status.total?.toString().length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
214
- }
215
- `;
216
- break;
217
- case ProgressBarSize.Large:
218
- // Large size
219
- style += `
220
- .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
221
- font-size: 2em;
222
- }
223
- .ProgressBar-container .ProgressBar-background {
224
- height: 3em;
225
- border-radius: 1em;
226
- }
227
- .ProgressBar-container .ProgressBar-bar {
228
- height: 3em;
229
- border-radius: 1em;
230
- }
231
- .ProgressBar-percent {
232
- min-width: ${((status.usePercent ? status.numDecimalPlaces ?? 0 : 0) * 1) + PERCENT_WIDTH}em;
233
- max-width: ${((status.usePercent ? status.numDecimalPlaces ?? 0 : 0) * 1) + PERCENT_WIDTH}em;
234
- }
235
- .ProgressBar-number-of {
236
- min-width: ${((!status.usePercent ? status.total?.toString().length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
237
- max-width: ${((!status.usePercent ? status.total?.toString().length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
238
- }
239
213
  `;
240
214
  break;
241
215
  default:
@@ -245,9 +219,8 @@ const ProgressBar: React.FC<Props> = (props) => {
245
219
  // Get the width of the outline based on size
246
220
  const outlineWidth = (() => {
247
221
  switch (size) {
248
- case ProgressBarSize.Small: return '0.05em';
249
- case ProgressBarSize.Medium: return '0.08em';
250
- case ProgressBarSize.Large: return '0.1em';
222
+ case ProgressBarSize.Medium: return '0.05em';
223
+ case ProgressBarSize.Large: return '0.08em';
251
224
  default: return '0.05em';
252
225
  }
253
226
  })();
@@ -275,25 +248,38 @@ const ProgressBar: React.FC<Props> = (props) => {
275
248
  `;
276
249
 
277
250
  // Stripes for striped effect
278
- const stripes: React.ReactNode = (
279
- <div>
280
- <style>{stripesStyle}</style>
281
- <div
282
- className="ProgressBar-stripes position-absolute "
283
- style={{
284
- width: '200%',
285
- height: '100%',
286
- }}
287
- >
288
- &nbsp;
251
+ let stripes: React.ReactNode = null;
252
+ if (striped) {
253
+ stripes = (
254
+ <div>
255
+ <style>{stripesStyle}</style>
256
+ <div
257
+ className="ProgressBar-stripes position-absolute"
258
+ style={{
259
+ width: '200%',
260
+ height: '100%',
261
+ }}
262
+ >
263
+ &nbsp;
264
+ </div>
289
265
  </div>
290
- </div>
291
- );
266
+ );
267
+ }
292
268
 
293
269
  /*----------------------------------------*/
294
270
  /* --------------- Main UI -------------- */
295
271
  /*----------------------------------------*/
296
272
 
273
+ // Calculate the width of the progress bar
274
+ let progressBarWidthPercent = 0;
275
+ if (status.usePercent) {
276
+ // Use percent progress directly
277
+ progressBarWidthPercent = status.percentProgress;
278
+ } else if (status.total > 0) {
279
+ // Calculate percent progress from items
280
+ progressBarWidthPercent = (status.numComplete / status.total) * 100;
281
+ }
282
+
297
283
  // Render the progress bar
298
284
  return (
299
285
  <div className="ProgressBar-container d-flex align-items-center">
@@ -301,25 +287,27 @@ const ProgressBar: React.FC<Props> = (props) => {
301
287
  <style>{style}</style>
302
288
  {/* Use items */}
303
289
  {!status.usePercent && status.numComplete && (
304
- <span
305
- className="ProgressBar-number-of pe-2 align-self-center"
306
- >
290
+ <span className="ProgressBar-number-of">
307
291
  {status.numComplete}
308
292
  &nbsp;of&nbsp;
309
293
  {status.total}
310
294
  </span>
311
295
  )}
312
296
  {/* Use percentage */}
313
- {status.usePercent && status.percentProgress && (
314
- <span
315
- className="ProgressBar-percent pe-2 align-self-center"
316
- >
317
- {status.percentProgress.toFixed(status?.numDecimalPlaces ?? 0)}
297
+ {status.usePercent && (
298
+ <span className="ProgressBar-percent">
299
+ {
300
+ padDecimalZeros(
301
+ roundToNumDecimals(status.percentProgress ?? 0, status?.numDecimalPlaces ?? 0),
302
+ status?.numDecimalPlaces ?? 0,
303
+ )
304
+ }
318
305
  %
319
306
  </span>
320
307
  )}
308
+ {/* Progress Bar Filled Area */}
321
309
  <div
322
- className={`ProgressBar-background bg-${bgVariant} w-100`}
310
+ className={`ProgressBar-background bg-${bgVariant} flex-grow-1`}
323
311
  style={{
324
312
  boxShadow: `0 0 0 ${outlineWidth} ${showOutline ? '#000' : '#DEE2E6'}`,
325
313
  }}
@@ -332,11 +320,13 @@ const ProgressBar: React.FC<Props> = (props) => {
332
320
  `ProgressBar-bar bg-${variant} text-start position-relative`
333
321
  }
334
322
  style={{
335
- width: `${(status.usePercent ? status.percentProgress : (status.numComplete / status.total) * 100)}%`,
323
+ width: `${progressBarWidthPercent}%`,
336
324
  overflow: 'hidden',
337
325
  }}
338
326
  >
339
- {striped && stripes}
327
+ {/* Show Strips (if they exist) */}
328
+ {stripes}
329
+ {/* Space so the bar has some content */}
340
330
  &nbsp;
341
331
  </div>
342
332
  </div>
@@ -8,8 +8,10 @@
8
8
  // Import React
9
9
  import React, { useRef, useEffect } from 'react';
10
10
 
11
- // Import helpers
12
- import waitMs from '../helpers/waitMs';
11
+ // Import commonkit
12
+ import {
13
+ waitMs,
14
+ } from 'dce-commonkit';
13
15
 
14
16
  /*------------------------------------------------------------------------*/
15
17
  /* -------------------------------- Types ------------------------------- */
@@ -7,20 +7,18 @@
7
7
  // Import React
8
8
  import React, { useReducer } from 'react';
9
9
 
10
+ // Import commonkit
11
+ import {
12
+ getOrdinal,
13
+ getMonthName,
14
+ getTimeInfoInET,
15
+ ErrorWithCode,
16
+ CommonKitErrorCode,
17
+ } from 'dce-commonkit';
18
+
10
19
  // Import AppWrapper helpers
11
20
  import { confirm } from './AppWrapper';
12
21
 
13
- // Import helpers
14
- import getOrdinal from '../helpers/getOrdinal';
15
- import getMonthName from '../helpers/getMonthName';
16
- import getTimeInfoInET from '../helpers/getTimeInfoInET';
17
-
18
- // Import classes
19
- import ErrorWithCode from '../errors/ErrorWithCode';
20
-
21
- // Import types
22
- import ReactKitErrorCode from '../types/ReactKitErrorCode';
23
-
24
22
  /*------------------------------------------------------------------------*/
25
23
  /* -------------------------------- Types ------------------------------- */
26
24
  /*------------------------------------------------------------------------*/
@@ -153,7 +151,7 @@ const getChoices = (
153
151
  if (dontAllowPast && dontAllowFuture) {
154
152
  throw new ErrorWithCode(
155
153
  'No past or future dates allowed',
156
- ReactKitErrorCode.SimpleDateChooserInvalidDateRange,
154
+ CommonKitErrorCode.SimpleDateChooserInvalidDateRange,
157
155
  );
158
156
  }
159
157
 
@@ -161,7 +159,7 @@ const getChoices = (
161
159
  if (numMonthsToShow <= 0) {
162
160
  throw new ErrorWithCode(
163
161
  'numMonthsToShow must be positive',
164
- ReactKitErrorCode.SimpleDateChooserInvalidNumMonths,
162
+ CommonKitErrorCode.SimpleDateChooserInvalidNumMonths,
165
163
  );
166
164
  }
167
165
 
@@ -6,8 +6,10 @@
6
6
  // Import React
7
7
  import React from 'react';
8
8
 
9
- // Import helpers
10
- import padZerosLeft from '../helpers/padZerosLeft';
9
+ // Import commonkit
10
+ import {
11
+ padZerosLeft,
12
+ } from 'dce-commonkit';
11
13
 
12
14
  /*------------------------------------------------------------------------*/
13
15
  /* -------------------------------- Types ------------------------------- */
@@ -3,15 +3,17 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
 
6
+ // Import commonkit
7
+ import {
8
+ LOG_REVIEW_STATUS_ROUTE,
9
+ } from 'dce-commonkit';
10
+
6
11
  // Import dce-reactkit
7
12
  import stubServerEndpoint from './stubServerEndpoint';
8
13
 
9
14
  // Import main function
10
15
  import canReviewLogs, { resetCanReviewCache } from './canReviewLogs';
11
16
 
12
- // Import shared constants
13
- import LOG_REVIEW_STATUS_ROUTE from '../constants/LOG_REVIEW_STATUS_ROUTE';
14
-
15
17
  describe('helpers > canReviewLogs', () => {
16
18
  beforeEach(() => {
17
19
  // Reset the cache
@@ -1,9 +1,11 @@
1
+ // Import commonkit
2
+ import {
3
+ LOG_REVIEW_STATUS_ROUTE,
4
+ } from 'dce-commonkit';
5
+
1
6
  // Import shared helpers
2
7
  import visitServerEndpoint from './visitServerEndpoint';
3
8
 
4
- // Import shared constants
5
- import LOG_REVIEW_STATUS_ROUTE from '../constants/LOG_REVIEW_STATUS_ROUTE';
6
-
7
9
  /*------------------------------------------------------------------------*/
8
10
  /* -------------------------------- Cache ------------------------------- */
9
11
  /*------------------------------------------------------------------------*/
@@ -1,15 +1,15 @@
1
+ // Import commonkit
2
+ import {
3
+ waitMs,
4
+ ErrorWithCode,
5
+ CommonKitErrorCode,
6
+ } from 'dce-commonkit';
7
+
1
8
  // Import other components
2
9
  // TODO: fix dependency cycle
3
10
  // eslint-disable-next-line import/no-cycle
4
11
  import { showFatalError } from '../components/AppWrapper';
5
12
 
6
- // Import other helpers
7
- import waitMs from './waitMs';
8
-
9
- // Import shared types
10
- import ErrorWithCode from '../errors/ErrorWithCode';
11
- import ReactKitErrorCode from '../types/ReactKitErrorCode';
12
-
13
13
  /*----------------------------------------*/
14
14
  /* ---------------- Types --------------- */
15
15
  /*----------------------------------------*/
@@ -80,7 +80,7 @@ export const getSendRequest = async () => {
80
80
  showFatalError(
81
81
  new ErrorWithCode(
82
82
  'Could not send a request because the request needed to be sent before dce-reactkit was properly initialized. Perhaps dce-reactkit was not initialized with initClient.',
83
- ReactKitErrorCode.NoCACCLSendRequestFunction,
83
+ CommonKitErrorCode.NoCACCLSendRequestFunction,
84
84
  ),
85
85
  );
86
86
  }