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/cjs/index.js CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var dceCommonkit = require('dce-commonkit');
5
6
  var React = require('react');
6
7
  var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
7
8
  var reactFontawesome = require('@fortawesome/react-fontawesome');
9
+ var ReactDOM = require('react-dom');
8
10
  var freeRegularSvgIcons = require('@fortawesome/free-regular-svg-icons');
9
- var clone = require('nanoclone');
10
11
 
11
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
13
 
@@ -30,7 +31,7 @@ function _interopNamespace(e) {
30
31
 
31
32
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
32
33
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
- var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
34
+ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
34
35
 
35
36
  /*! *****************************************************************************
36
37
  Copyright (c) Microsoft Corporation.
@@ -57,23 +58,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
57
58
  });
58
59
  }
59
60
 
60
- // Highest error code = DRK37
61
- /**
62
- * List of error codes built into the react kit
63
- * @author Gabe Abrams
64
- */
65
- var ReactKitErrorCode;
66
- (function (ReactKitErrorCode) {
67
- ReactKitErrorCode["NoResponse"] = "DRK1";
68
- ReactKitErrorCode["NoCode"] = "DRK2";
69
- ReactKitErrorCode["SessionExpired"] = "DRK3";
70
- ReactKitErrorCode["NoCACCLSendRequestFunction"] = "DRK7";
71
- ReactKitErrorCode["SimpleDateChooserInvalidDateRange"] = "DRK35";
72
- ReactKitErrorCode["SimpleDateChooserInvalidNumMonths"] = "DRK36";
73
- ReactKitErrorCode["ETTimestampInvalid"] = "DRK37";
74
- })(ReactKitErrorCode || (ReactKitErrorCode = {}));
75
- var ReactKitErrorCode$1 = ReactKitErrorCode;
76
-
77
61
  /**
78
62
  * Bootstrap variants
79
63
  * @author Gabe Abrams
@@ -129,7 +113,7 @@ const ErrorBox = (props) => {
129
113
  } },
130
114
  "code:",
131
115
  ' ',
132
- String((_a = error.code) !== null && _a !== void 0 ? _a : ReactKitErrorCode$1.NoCode).toUpperCase())));
116
+ String((_a = error.code) !== null && _a !== void 0 ? _a : dceCommonkit.CommonKitErrorCode.NoCode).toUpperCase())));
133
117
  }
134
118
  // Main UI
135
119
  return (React__default["default"].createElement("div", { className: `alert alert-${variant} text-center`, style: {
@@ -184,724 +168,6 @@ var ModalType;
184
168
  })(ModalType || (ModalType = {}));
185
169
  var ModalType$1 = ModalType;
186
170
 
187
- /**
188
- * Built-in metadata for logs
189
- * @author Gabe Abrams
190
- */
191
- const LogBuiltInMetadata = {
192
- // Contexts
193
- Context: {
194
- Uncategorized: 'Uncategorized',
195
- ServerRenderedErrorPage: 'ServerRenderedErrorPage',
196
- ServerEndpointError: 'ServerEndpointError',
197
- ClientFatalError: 'ClientFatalError',
198
- },
199
- // Targets
200
- Target: {
201
- NoTarget: 'NoTarget',
202
- },
203
- };
204
-
205
- function getDefaultExportFromCjs (x) {
206
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
207
- }
208
-
209
- var reactDom = {exports: {}};
210
-
211
- var reactDom_production = {};
212
-
213
- /**
214
- * @license React
215
- * react-dom.production.js
216
- *
217
- * Copyright (c) Meta Platforms, Inc. and affiliates.
218
- *
219
- * This source code is licensed under the MIT license found in the
220
- * LICENSE file in the root directory of this source tree.
221
- */
222
-
223
- var hasRequiredReactDom_production;
224
-
225
- function requireReactDom_production () {
226
- if (hasRequiredReactDom_production) return reactDom_production;
227
- hasRequiredReactDom_production = 1;
228
- var React = React__default["default"];
229
- function formatProdErrorMessage(code) {
230
- var url = "https://react.dev/errors/" + code;
231
- if (1 < arguments.length) {
232
- url += "?args[]=" + encodeURIComponent(arguments[1]);
233
- for (var i = 2; i < arguments.length; i++)
234
- url += "&args[]=" + encodeURIComponent(arguments[i]);
235
- }
236
- return (
237
- "Minified React error #" +
238
- code +
239
- "; visit " +
240
- url +
241
- " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
242
- );
243
- }
244
- function noop() {}
245
- var Internals = {
246
- d: {
247
- f: noop,
248
- r: function () {
249
- throw Error(formatProdErrorMessage(522));
250
- },
251
- D: noop,
252
- C: noop,
253
- L: noop,
254
- m: noop,
255
- X: noop,
256
- S: noop,
257
- M: noop
258
- },
259
- p: 0,
260
- findDOMNode: null
261
- },
262
- REACT_PORTAL_TYPE = Symbol.for("react.portal");
263
- function createPortal$1(children, containerInfo, implementation) {
264
- var key =
265
- 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
266
- return {
267
- $$typeof: REACT_PORTAL_TYPE,
268
- key: null == key ? null : "" + key,
269
- children: children,
270
- containerInfo: containerInfo,
271
- implementation: implementation
272
- };
273
- }
274
- var ReactSharedInternals =
275
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
276
- function getCrossOriginStringAs(as, input) {
277
- if ("font" === as) return "";
278
- if ("string" === typeof input)
279
- return "use-credentials" === input ? input : "";
280
- }
281
- reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
282
- Internals;
283
- reactDom_production.createPortal = function (children, container) {
284
- var key =
285
- 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
286
- if (
287
- !container ||
288
- (1 !== container.nodeType &&
289
- 9 !== container.nodeType &&
290
- 11 !== container.nodeType)
291
- )
292
- throw Error(formatProdErrorMessage(299));
293
- return createPortal$1(children, container, null, key);
294
- };
295
- reactDom_production.flushSync = function (fn) {
296
- var previousTransition = ReactSharedInternals.T,
297
- previousUpdatePriority = Internals.p;
298
- try {
299
- if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
300
- } finally {
301
- (ReactSharedInternals.T = previousTransition),
302
- (Internals.p = previousUpdatePriority),
303
- Internals.d.f();
304
- }
305
- };
306
- reactDom_production.preconnect = function (href, options) {
307
- "string" === typeof href &&
308
- (options
309
- ? ((options = options.crossOrigin),
310
- (options =
311
- "string" === typeof options
312
- ? "use-credentials" === options
313
- ? options
314
- : ""
315
- : void 0))
316
- : (options = null),
317
- Internals.d.C(href, options));
318
- };
319
- reactDom_production.prefetchDNS = function (href) {
320
- "string" === typeof href && Internals.d.D(href);
321
- };
322
- reactDom_production.preinit = function (href, options) {
323
- if ("string" === typeof href && options && "string" === typeof options.as) {
324
- var as = options.as,
325
- crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
326
- integrity =
327
- "string" === typeof options.integrity ? options.integrity : void 0,
328
- fetchPriority =
329
- "string" === typeof options.fetchPriority
330
- ? options.fetchPriority
331
- : void 0;
332
- "style" === as
333
- ? Internals.d.S(
334
- href,
335
- "string" === typeof options.precedence ? options.precedence : void 0,
336
- {
337
- crossOrigin: crossOrigin,
338
- integrity: integrity,
339
- fetchPriority: fetchPriority
340
- }
341
- )
342
- : "script" === as &&
343
- Internals.d.X(href, {
344
- crossOrigin: crossOrigin,
345
- integrity: integrity,
346
- fetchPriority: fetchPriority,
347
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
348
- });
349
- }
350
- };
351
- reactDom_production.preinitModule = function (href, options) {
352
- if ("string" === typeof href)
353
- if ("object" === typeof options && null !== options) {
354
- if (null == options.as || "script" === options.as) {
355
- var crossOrigin = getCrossOriginStringAs(
356
- options.as,
357
- options.crossOrigin
358
- );
359
- Internals.d.M(href, {
360
- crossOrigin: crossOrigin,
361
- integrity:
362
- "string" === typeof options.integrity ? options.integrity : void 0,
363
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
364
- });
365
- }
366
- } else null == options && Internals.d.M(href);
367
- };
368
- reactDom_production.preload = function (href, options) {
369
- if (
370
- "string" === typeof href &&
371
- "object" === typeof options &&
372
- null !== options &&
373
- "string" === typeof options.as
374
- ) {
375
- var as = options.as,
376
- crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
377
- Internals.d.L(href, as, {
378
- crossOrigin: crossOrigin,
379
- integrity:
380
- "string" === typeof options.integrity ? options.integrity : void 0,
381
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
382
- type: "string" === typeof options.type ? options.type : void 0,
383
- fetchPriority:
384
- "string" === typeof options.fetchPriority
385
- ? options.fetchPriority
386
- : void 0,
387
- referrerPolicy:
388
- "string" === typeof options.referrerPolicy
389
- ? options.referrerPolicy
390
- : void 0,
391
- imageSrcSet:
392
- "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
393
- imageSizes:
394
- "string" === typeof options.imageSizes ? options.imageSizes : void 0,
395
- media: "string" === typeof options.media ? options.media : void 0
396
- });
397
- }
398
- };
399
- reactDom_production.preloadModule = function (href, options) {
400
- if ("string" === typeof href)
401
- if (options) {
402
- var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
403
- Internals.d.m(href, {
404
- as:
405
- "string" === typeof options.as && "script" !== options.as
406
- ? options.as
407
- : void 0,
408
- crossOrigin: crossOrigin,
409
- integrity:
410
- "string" === typeof options.integrity ? options.integrity : void 0
411
- });
412
- } else Internals.d.m(href);
413
- };
414
- reactDom_production.requestFormReset = function (form) {
415
- Internals.d.r(form);
416
- };
417
- reactDom_production.unstable_batchedUpdates = function (fn, a) {
418
- return fn(a);
419
- };
420
- reactDom_production.useFormState = function (action, initialState, permalink) {
421
- return ReactSharedInternals.H.useFormState(action, initialState, permalink);
422
- };
423
- reactDom_production.useFormStatus = function () {
424
- return ReactSharedInternals.H.useHostTransitionStatus();
425
- };
426
- reactDom_production.version = "19.2.1";
427
- return reactDom_production;
428
- }
429
-
430
- var reactDom_development = {};
431
-
432
- /**
433
- * @license React
434
- * react-dom.development.js
435
- *
436
- * Copyright (c) Meta Platforms, Inc. and affiliates.
437
- *
438
- * This source code is licensed under the MIT license found in the
439
- * LICENSE file in the root directory of this source tree.
440
- */
441
-
442
- var hasRequiredReactDom_development;
443
-
444
- function requireReactDom_development () {
445
- if (hasRequiredReactDom_development) return reactDom_development;
446
- hasRequiredReactDom_development = 1;
447
- "production" !== process.env.NODE_ENV &&
448
- (function () {
449
- function noop() {}
450
- function testStringCoercion(value) {
451
- return "" + value;
452
- }
453
- function createPortal$1(children, containerInfo, implementation) {
454
- var key =
455
- 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
456
- try {
457
- testStringCoercion(key);
458
- var JSCompiler_inline_result = !1;
459
- } catch (e) {
460
- JSCompiler_inline_result = !0;
461
- }
462
- JSCompiler_inline_result &&
463
- (console.error(
464
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
465
- ("function" === typeof Symbol &&
466
- Symbol.toStringTag &&
467
- key[Symbol.toStringTag]) ||
468
- key.constructor.name ||
469
- "Object"
470
- ),
471
- testStringCoercion(key));
472
- return {
473
- $$typeof: REACT_PORTAL_TYPE,
474
- key: null == key ? null : "" + key,
475
- children: children,
476
- containerInfo: containerInfo,
477
- implementation: implementation
478
- };
479
- }
480
- function getCrossOriginStringAs(as, input) {
481
- if ("font" === as) return "";
482
- if ("string" === typeof input)
483
- return "use-credentials" === input ? input : "";
484
- }
485
- function getValueDescriptorExpectingObjectForWarning(thing) {
486
- return null === thing
487
- ? "`null`"
488
- : void 0 === thing
489
- ? "`undefined`"
490
- : "" === thing
491
- ? "an empty string"
492
- : 'something with type "' + typeof thing + '"';
493
- }
494
- function getValueDescriptorExpectingEnumForWarning(thing) {
495
- return null === thing
496
- ? "`null`"
497
- : void 0 === thing
498
- ? "`undefined`"
499
- : "" === thing
500
- ? "an empty string"
501
- : "string" === typeof thing
502
- ? JSON.stringify(thing)
503
- : "number" === typeof thing
504
- ? "`" + thing + "`"
505
- : 'something with type "' + typeof thing + '"';
506
- }
507
- function resolveDispatcher() {
508
- var dispatcher = ReactSharedInternals.H;
509
- null === dispatcher &&
510
- console.error(
511
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
512
- );
513
- return dispatcher;
514
- }
515
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
516
- "function" ===
517
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
518
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
519
- var React = React__default["default"],
520
- Internals = {
521
- d: {
522
- f: noop,
523
- r: function () {
524
- throw Error(
525
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
526
- );
527
- },
528
- D: noop,
529
- C: noop,
530
- L: noop,
531
- m: noop,
532
- X: noop,
533
- S: noop,
534
- M: noop
535
- },
536
- p: 0,
537
- findDOMNode: null
538
- },
539
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
540
- ReactSharedInternals =
541
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
542
- ("function" === typeof Map &&
543
- null != Map.prototype &&
544
- "function" === typeof Map.prototype.forEach &&
545
- "function" === typeof Set &&
546
- null != Set.prototype &&
547
- "function" === typeof Set.prototype.clear &&
548
- "function" === typeof Set.prototype.forEach) ||
549
- console.error(
550
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
551
- );
552
- reactDom_development.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
553
- Internals;
554
- reactDom_development.createPortal = function (children, container) {
555
- var key =
556
- 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
557
- if (
558
- !container ||
559
- (1 !== container.nodeType &&
560
- 9 !== container.nodeType &&
561
- 11 !== container.nodeType)
562
- )
563
- throw Error("Target container is not a DOM element.");
564
- return createPortal$1(children, container, null, key);
565
- };
566
- reactDom_development.flushSync = function (fn) {
567
- var previousTransition = ReactSharedInternals.T,
568
- previousUpdatePriority = Internals.p;
569
- try {
570
- if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
571
- return fn();
572
- } finally {
573
- (ReactSharedInternals.T = previousTransition),
574
- (Internals.p = previousUpdatePriority),
575
- Internals.d.f() &&
576
- console.error(
577
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
578
- );
579
- }
580
- };
581
- reactDom_development.preconnect = function (href, options) {
582
- "string" === typeof href && href
583
- ? null != options && "object" !== typeof options
584
- ? console.error(
585
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
586
- getValueDescriptorExpectingEnumForWarning(options)
587
- )
588
- : null != options &&
589
- "string" !== typeof options.crossOrigin &&
590
- console.error(
591
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
592
- getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
593
- )
594
- : console.error(
595
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
596
- getValueDescriptorExpectingObjectForWarning(href)
597
- );
598
- "string" === typeof href &&
599
- (options
600
- ? ((options = options.crossOrigin),
601
- (options =
602
- "string" === typeof options
603
- ? "use-credentials" === options
604
- ? options
605
- : ""
606
- : void 0))
607
- : (options = null),
608
- Internals.d.C(href, options));
609
- };
610
- reactDom_development.prefetchDNS = function (href) {
611
- if ("string" !== typeof href || !href)
612
- console.error(
613
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
614
- getValueDescriptorExpectingObjectForWarning(href)
615
- );
616
- else if (1 < arguments.length) {
617
- var options = arguments[1];
618
- "object" === typeof options && options.hasOwnProperty("crossOrigin")
619
- ? console.error(
620
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
621
- getValueDescriptorExpectingEnumForWarning(options)
622
- )
623
- : console.error(
624
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
625
- getValueDescriptorExpectingEnumForWarning(options)
626
- );
627
- }
628
- "string" === typeof href && Internals.d.D(href);
629
- };
630
- reactDom_development.preinit = function (href, options) {
631
- "string" === typeof href && href
632
- ? null == options || "object" !== typeof options
633
- ? console.error(
634
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
635
- getValueDescriptorExpectingEnumForWarning(options)
636
- )
637
- : "style" !== options.as &&
638
- "script" !== options.as &&
639
- console.error(
640
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
641
- getValueDescriptorExpectingEnumForWarning(options.as)
642
- )
643
- : console.error(
644
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
645
- getValueDescriptorExpectingObjectForWarning(href)
646
- );
647
- if (
648
- "string" === typeof href &&
649
- options &&
650
- "string" === typeof options.as
651
- ) {
652
- var as = options.as,
653
- crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
654
- integrity =
655
- "string" === typeof options.integrity ? options.integrity : void 0,
656
- fetchPriority =
657
- "string" === typeof options.fetchPriority
658
- ? options.fetchPriority
659
- : void 0;
660
- "style" === as
661
- ? Internals.d.S(
662
- href,
663
- "string" === typeof options.precedence
664
- ? options.precedence
665
- : void 0,
666
- {
667
- crossOrigin: crossOrigin,
668
- integrity: integrity,
669
- fetchPriority: fetchPriority
670
- }
671
- )
672
- : "script" === as &&
673
- Internals.d.X(href, {
674
- crossOrigin: crossOrigin,
675
- integrity: integrity,
676
- fetchPriority: fetchPriority,
677
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
678
- });
679
- }
680
- };
681
- reactDom_development.preinitModule = function (href, options) {
682
- var encountered = "";
683
- ("string" === typeof href && href) ||
684
- (encountered +=
685
- " The `href` argument encountered was " +
686
- getValueDescriptorExpectingObjectForWarning(href) +
687
- ".");
688
- void 0 !== options && "object" !== typeof options
689
- ? (encountered +=
690
- " The `options` argument encountered was " +
691
- getValueDescriptorExpectingObjectForWarning(options) +
692
- ".")
693
- : options &&
694
- "as" in options &&
695
- "script" !== options.as &&
696
- (encountered +=
697
- " The `as` option encountered was " +
698
- getValueDescriptorExpectingEnumForWarning(options.as) +
699
- ".");
700
- if (encountered)
701
- console.error(
702
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
703
- encountered
704
- );
705
- else
706
- switch (
707
- ((encountered =
708
- options && "string" === typeof options.as ? options.as : "script"),
709
- encountered)
710
- ) {
711
- case "script":
712
- break;
713
- default:
714
- (encountered =
715
- getValueDescriptorExpectingEnumForWarning(encountered)),
716
- console.error(
717
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
718
- encountered,
719
- href
720
- );
721
- }
722
- if ("string" === typeof href)
723
- if ("object" === typeof options && null !== options) {
724
- if (null == options.as || "script" === options.as)
725
- (encountered = getCrossOriginStringAs(
726
- options.as,
727
- options.crossOrigin
728
- )),
729
- Internals.d.M(href, {
730
- crossOrigin: encountered,
731
- integrity:
732
- "string" === typeof options.integrity
733
- ? options.integrity
734
- : void 0,
735
- nonce:
736
- "string" === typeof options.nonce ? options.nonce : void 0
737
- });
738
- } else null == options && Internals.d.M(href);
739
- };
740
- reactDom_development.preload = function (href, options) {
741
- var encountered = "";
742
- ("string" === typeof href && href) ||
743
- (encountered +=
744
- " The `href` argument encountered was " +
745
- getValueDescriptorExpectingObjectForWarning(href) +
746
- ".");
747
- null == options || "object" !== typeof options
748
- ? (encountered +=
749
- " The `options` argument encountered was " +
750
- getValueDescriptorExpectingObjectForWarning(options) +
751
- ".")
752
- : ("string" === typeof options.as && options.as) ||
753
- (encountered +=
754
- " The `as` option encountered was " +
755
- getValueDescriptorExpectingObjectForWarning(options.as) +
756
- ".");
757
- encountered &&
758
- console.error(
759
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
760
- encountered
761
- );
762
- if (
763
- "string" === typeof href &&
764
- "object" === typeof options &&
765
- null !== options &&
766
- "string" === typeof options.as
767
- ) {
768
- encountered = options.as;
769
- var crossOrigin = getCrossOriginStringAs(
770
- encountered,
771
- options.crossOrigin
772
- );
773
- Internals.d.L(href, encountered, {
774
- crossOrigin: crossOrigin,
775
- integrity:
776
- "string" === typeof options.integrity ? options.integrity : void 0,
777
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
778
- type: "string" === typeof options.type ? options.type : void 0,
779
- fetchPriority:
780
- "string" === typeof options.fetchPriority
781
- ? options.fetchPriority
782
- : void 0,
783
- referrerPolicy:
784
- "string" === typeof options.referrerPolicy
785
- ? options.referrerPolicy
786
- : void 0,
787
- imageSrcSet:
788
- "string" === typeof options.imageSrcSet
789
- ? options.imageSrcSet
790
- : void 0,
791
- imageSizes:
792
- "string" === typeof options.imageSizes
793
- ? options.imageSizes
794
- : void 0,
795
- media: "string" === typeof options.media ? options.media : void 0
796
- });
797
- }
798
- };
799
- reactDom_development.preloadModule = function (href, options) {
800
- var encountered = "";
801
- ("string" === typeof href && href) ||
802
- (encountered +=
803
- " The `href` argument encountered was " +
804
- getValueDescriptorExpectingObjectForWarning(href) +
805
- ".");
806
- void 0 !== options && "object" !== typeof options
807
- ? (encountered +=
808
- " The `options` argument encountered was " +
809
- getValueDescriptorExpectingObjectForWarning(options) +
810
- ".")
811
- : options &&
812
- "as" in options &&
813
- "string" !== typeof options.as &&
814
- (encountered +=
815
- " The `as` option encountered was " +
816
- getValueDescriptorExpectingObjectForWarning(options.as) +
817
- ".");
818
- encountered &&
819
- console.error(
820
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
821
- encountered
822
- );
823
- "string" === typeof href &&
824
- (options
825
- ? ((encountered = getCrossOriginStringAs(
826
- options.as,
827
- options.crossOrigin
828
- )),
829
- Internals.d.m(href, {
830
- as:
831
- "string" === typeof options.as && "script" !== options.as
832
- ? options.as
833
- : void 0,
834
- crossOrigin: encountered,
835
- integrity:
836
- "string" === typeof options.integrity
837
- ? options.integrity
838
- : void 0
839
- }))
840
- : Internals.d.m(href));
841
- };
842
- reactDom_development.requestFormReset = function (form) {
843
- Internals.d.r(form);
844
- };
845
- reactDom_development.unstable_batchedUpdates = function (fn, a) {
846
- return fn(a);
847
- };
848
- reactDom_development.useFormState = function (action, initialState, permalink) {
849
- return resolveDispatcher().useFormState(action, initialState, permalink);
850
- };
851
- reactDom_development.useFormStatus = function () {
852
- return resolveDispatcher().useHostTransitionStatus();
853
- };
854
- reactDom_development.version = "19.2.1";
855
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
856
- "function" ===
857
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
858
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
859
- })();
860
- return reactDom_development;
861
- }
862
-
863
- (function (module) {
864
-
865
- function checkDCE() {
866
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
867
- if (
868
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
869
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
870
- ) {
871
- return;
872
- }
873
- if (process.env.NODE_ENV !== 'production') {
874
- // This branch is unreachable because this function is only called
875
- // in production, but the condition is true only in development.
876
- // Therefore if the branch is still here, dead code elimination wasn't
877
- // properly applied.
878
- // Don't change the message. React DevTools relies on it. Also make sure
879
- // this message doesn't occur elsewhere in this function, or it will cause
880
- // a false positive.
881
- throw new Error('^_^');
882
- }
883
- try {
884
- // Verify that the code above has been dead code eliminated (DCE'd).
885
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
886
- } catch (err) {
887
- // DevTools shouldn't crash React, no matter what.
888
- // We should still report in case we break this code.
889
- console.error(err);
890
- }
891
- }
892
-
893
- if (process.env.NODE_ENV === 'production') {
894
- // DCE check should happen before ReactDOM bundle executes so that
895
- // DevTools can report bad minification during injection.
896
- checkDCE();
897
- module.exports = requireReactDom_production();
898
- } else {
899
- module.exports = requireReactDom_development();
900
- }
901
- } (reactDom));
902
-
903
- var ReactDOM = /*@__PURE__*/getDefaultExportFromCjs(reactDom.exports);
904
-
905
171
  /**
906
172
  * Loading spinner/indicator
907
173
  * @author Gabe Abrams
@@ -994,17 +260,6 @@ const LoadingSpinner = () => {
994
260
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faCircle, className: "LoadingSpinner-blip-4" })));
995
261
  };
996
262
 
997
- /**
998
- * Wait for a certain number of ms
999
- * @author Gabe Abrams
1000
- * @param ms number of ms to wait
1001
- */
1002
- const waitMs = (ms = 0) => __awaiter(void 0, void 0, void 0, function* () {
1003
- return new Promise((resolve) => {
1004
- setTimeout(resolve, ms);
1005
- });
1006
- });
1007
-
1008
263
  /**
1009
264
  * Modal sizes
1010
265
  * @author Gabe Abrams
@@ -1024,18 +279,6 @@ var ModalSize$1 = ModalSize;
1024
279
  */
1025
280
  const NUM_MODAL_PORTALS = 50;
1026
281
 
1027
- /**
1028
- * An error with a code
1029
- * @author Gabe Abrams
1030
- */
1031
- class ErrorWithCode extends Error {
1032
- constructor(message, code) {
1033
- super(message);
1034
- this.name = 'ErrorWithCode';
1035
- this.code = code;
1036
- }
1037
- }
1038
-
1039
282
  /*----------------------------------------*/
1040
283
  /* ---- Static Variables and Getters ---- */
1041
284
  /*----------------------------------------*/
@@ -1064,9 +307,9 @@ const getSendRequest = () => __awaiter(void 0, void 0, void 0, function* () {
1064
307
  // Show timeout error if too much time passes
1065
308
  let successful = false;
1066
309
  (() => __awaiter(void 0, void 0, void 0, function* () {
1067
- yield waitMs(5000);
310
+ yield dceCommonkit.waitMs(5000);
1068
311
  if (!successful) {
1069
- showFatalError(new ErrorWithCode('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.', ReactKitErrorCode$1.NoCACCLSendRequestFunction));
312
+ showFatalError(new dceCommonkit.ErrorWithCode('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.', dceCommonkit.CommonKitErrorCode.NoCACCLSendRequestFunction));
1070
313
  }
1071
314
  }))();
1072
315
  // Wait for initialization
@@ -1352,14 +595,14 @@ const Modal = (props) => {
1352
595
  setAnimatingIn(true);
1353
596
  setAnimatingPop(false);
1354
597
  // Wait for animation
1355
- yield waitMs(MS_TO_ANIMATE);
598
+ yield dceCommonkit.waitMs(MS_TO_ANIMATE);
1356
599
  // Update to state after animated in
1357
600
  if (mounted.current) {
1358
601
  setAnimatingIn(false);
1359
602
  }
1360
603
  if (isLoading) {
1361
604
  // wait before showing modal
1362
- yield waitMs(MS_TO_WAIT_BEFORE_SHOWING_LOADING_INDICATOR);
605
+ yield dceCommonkit.waitMs(MS_TO_WAIT_BEFORE_SHOWING_LOADING_INDICATOR);
1363
606
  if (mounted.current) {
1364
607
  setShowModal(true);
1365
608
  }
@@ -1460,7 +703,7 @@ const Modal = (props) => {
1460
703
  if (!animatingPop) {
1461
704
  setAnimatingPop(true);
1462
705
  // Wait then stop pop animation
1463
- yield waitMs(MS_TO_ANIMATE);
706
+ yield dceCommonkit.waitMs(MS_TO_ANIMATE);
1464
707
  setAnimatingPop(false);
1465
708
  }
1466
709
  return;
@@ -1534,33 +777,9 @@ const Modal = (props) => {
1534
777
  // Determine which portal to use
1535
778
  const portalNumber = id.current % NUM_MODAL_PORTALS;
1536
779
  // Render in a portal
1537
- return ReactDOM.createPortal(contentToRender, document.getElementById(`modal-portal-${portalNumber}`));
780
+ return ReactDOM__default["default"].createPortal(contentToRender, document.getElementById(`modal-portal-${portalNumber}`));
1538
781
  };
1539
782
 
1540
- /**
1541
- * Path that all routes start with
1542
- * @author Gabe Abrams
1543
- */
1544
- const ROUTE_PATH_PREFIX = '/dce-reactkit';
1545
-
1546
- /**
1547
- * Path of the route for storing client-side logs
1548
- * @author Gabe Abrams
1549
- */
1550
- const LOG_ROUTE_PATH = `${ROUTE_PATH_PREFIX}/log`;
1551
-
1552
- /**
1553
- * Allowed log levels
1554
- * @author Gabe Abrams
1555
- */
1556
- var LogLevel;
1557
- (function (LogLevel) {
1558
- LogLevel["Warn"] = "Warn";
1559
- LogLevel["Info"] = "Info";
1560
- LogLevel["Debug"] = "Debug";
1561
- })(LogLevel || (LogLevel = {}));
1562
- var LogLevel$1 = LogLevel;
1563
-
1564
783
  /*------------------------------------------------------------------------*/
1565
784
  /* Stub Logic */
1566
785
  /*------------------------------------------------------------------------*/
@@ -1581,7 +800,7 @@ const _setStubResponse = (opts) => {
1581
800
  const { path, body, } = opts;
1582
801
  const method = ((_a = opts.method) !== null && _a !== void 0 ? _a : 'GET').toUpperCase();
1583
802
  const errorMessage = ((_b = opts.errorMessage) !== null && _b !== void 0 ? _b : 'An unknown error has occurred.');
1584
- const errorCode = ((_c = opts.errorCode) !== null && _c !== void 0 ? _c : ReactKitErrorCode$1.NoCode);
803
+ const errorCode = ((_c = opts.errorCode) !== null && _c !== void 0 ? _c : dceCommonkit.CommonKitErrorCode.NoCode);
1585
804
  // Store to stub responses
1586
805
  if (!stubResponses[method]) {
1587
806
  stubResponses[method] = {};
@@ -1628,7 +847,7 @@ const visitServerEndpoint = (opts) => __awaiter(void 0, void 0, void 0, function
1628
847
  return stubResponse.body;
1629
848
  }
1630
849
  // Error
1631
- throw new ErrorWithCode(stubResponse.errorMessage, stubResponse.errorCode);
850
+ throw new dceCommonkit.ErrorWithCode(stubResponse.errorMessage, stubResponse.errorCode);
1632
851
  }
1633
852
  // Remove properties with undefined values
1634
853
  let params;
@@ -1659,11 +878,11 @@ const visitServerEndpoint = (opts) => __awaiter(void 0, void 0, void 0, function
1659
878
  });
1660
879
  // Check for failure
1661
880
  if (!response || !response.body) {
1662
- throw new ErrorWithCode('We didn\'t get a response from the server. Please check your internet connection.', ReactKitErrorCode$1.NoResponse);
881
+ throw new dceCommonkit.ErrorWithCode('We didn\'t get a response from the server. Please check your internet connection.', dceCommonkit.CommonKitErrorCode.NoResponse);
1663
882
  }
1664
883
  if (!response.body.success) {
1665
884
  // Session expired
1666
- if (response.body.code === ReactKitErrorCode$1.SessionExpired) {
885
+ if (response.body.code === dceCommonkit.CommonKitErrorCode.SessionExpired) {
1667
886
  showSessionExpiredMessage();
1668
887
  // Never return (don't continue execution)
1669
888
  yield new Promise(() => {
@@ -1671,9 +890,9 @@ const visitServerEndpoint = (opts) => __awaiter(void 0, void 0, void 0, function
1671
890
  });
1672
891
  }
1673
892
  // Other errors
1674
- throw new ErrorWithCode((response.body.message
893
+ throw new dceCommonkit.ErrorWithCode((response.body.message
1675
894
  || 'An unknown error occurred. Please contact an admin.'), (response.body.code
1676
- || ReactKitErrorCode$1.NoCode));
895
+ || dceCommonkit.CommonKitErrorCode.NoCode));
1677
896
  }
1678
897
  // Success! Extract the body
1679
898
  const { body } = response.body;
@@ -1719,14 +938,14 @@ const logClientEvent = (opts) => __awaiter(void 0, void 0, void 0, function* ()
1719
938
  }
1720
939
  // Send to server
1721
940
  return visitServerEndpoint({
1722
- path: LOG_ROUTE_PATH,
941
+ path: dceCommonkit.LOG_ROUTE_PATH,
1723
942
  method: 'POST',
1724
943
  params: {
1725
944
  context: (typeof opts.context === 'string'
1726
945
  ? opts.context
1727
- : ((_c = ((_b = opts.context) !== null && _b !== void 0 ? _b : {})._) !== null && _c !== void 0 ? _c : LogBuiltInMetadata.Context.Uncategorized)),
1728
- subcontext: ((_d = opts.subcontext) !== null && _d !== void 0 ? _d : LogBuiltInMetadata.Context.Uncategorized),
1729
- level: ((_e = opts.level) !== null && _e !== void 0 ? _e : LogLevel$1.Info),
946
+ : ((_c = ((_b = opts.context) !== null && _b !== void 0 ? _b : {})._) !== null && _c !== void 0 ? _c : dceCommonkit.LogBuiltInMetadata.Context.Uncategorized)),
947
+ subcontext: ((_d = opts.subcontext) !== null && _d !== void 0 ? _d : dceCommonkit.LogBuiltInMetadata.Context.Uncategorized),
948
+ level: ((_e = opts.level) !== null && _e !== void 0 ? _e : dceCommonkit.LogLevel.Info),
1730
949
  tags: JSON.stringify((_f = opts.tags) !== null && _f !== void 0 ? _f : []),
1731
950
  metadata: JSON.stringify(metadata),
1732
951
  errorMessage: (opts.error
@@ -1739,7 +958,7 @@ const logClientEvent = (opts) => __awaiter(void 0, void 0, void 0, function* ()
1739
958
  ? opts.error.stack
1740
959
  : undefined),
1741
960
  target: (opts.action
1742
- ? ((_g = opts.target) !== null && _g !== void 0 ? _g : LogBuiltInMetadata.Target.NoTarget)
961
+ ? ((_g = opts.target) !== null && _g !== void 0 ? _g : dceCommonkit.LogBuiltInMetadata.Target.NoTarget)
1743
962
  : undefined),
1744
963
  action: (opts.action
1745
964
  ? opts.action
@@ -1795,7 +1014,7 @@ const waitForHelper = (checkForHelper) => __awaiter(void 0, void 0, void 0, func
1795
1014
  return false;
1796
1015
  }
1797
1016
  // Wait a little while
1798
- yield waitMs(10);
1017
+ yield dceCommonkit.waitMs(10);
1799
1018
  }
1800
1019
  // Helper exists
1801
1020
  return true;
@@ -2022,8 +1241,8 @@ const showFatalError = (error, errorTitle = 'An Error Occurred') => __awaiter(vo
2022
1241
  ? error.trim()
2023
1242
  : String((_c = error.message) !== null && _c !== void 0 ? _c : 'An unknown error occurred.'));
2024
1243
  const code = (typeof error === 'string'
2025
- ? ReactKitErrorCode$1.NoCode
2026
- : String((_d = error.code) !== null && _d !== void 0 ? _d : ReactKitErrorCode$1.NoCode));
1244
+ ? dceCommonkit.CommonKitErrorCode.NoCode
1245
+ : String((_d = error.code) !== null && _d !== void 0 ? _d : dceCommonkit.CommonKitErrorCode.NoCode));
2027
1246
  // Call all fatal error listeners
2028
1247
  try {
2029
1248
  fatalErrorHandlers.forEach((handler) => {
@@ -2035,7 +1254,7 @@ const showFatalError = (error, errorTitle = 'An Error Occurred') => __awaiter(vo
2035
1254
  }
2036
1255
  // Add log
2037
1256
  logClientEvent({
2038
- context: LogBuiltInMetadata.Context.ClientFatalError,
1257
+ context: dceCommonkit.LogBuiltInMetadata.Context.ClientFatalError,
2039
1258
  error: {
2040
1259
  message,
2041
1260
  code,
@@ -2254,8 +1473,8 @@ const AppWrapper = (props) => {
2254
1473
  && (fatalErrorMessage || fatalErrorCode || sessionHasExpired)) {
2255
1474
  // Re-encapsulate in an error
2256
1475
  const error = (sessionHasExpired
2257
- ? new ErrorWithCode(getSessionExpiredMessage(), ReactKitErrorCode$1.SessionExpired)
2258
- : new ErrorWithCode((fatalErrorMessage !== null && fatalErrorMessage !== void 0 ? fatalErrorMessage : 'An unknown error has occurred. Please contact support.'), (fatalErrorCode !== null && fatalErrorCode !== void 0 ? fatalErrorCode : ReactKitErrorCode$1.NoCode)));
1476
+ ? new dceCommonkit.ErrorWithCode(getSessionExpiredMessage(), dceCommonkit.CommonKitErrorCode.SessionExpired)
1477
+ : new dceCommonkit.ErrorWithCode((fatalErrorMessage !== null && fatalErrorMessage !== void 0 ? fatalErrorMessage : 'An unknown error has occurred. Please contact support.'), (fatalErrorCode !== null && fatalErrorCode !== void 0 ? fatalErrorCode : dceCommonkit.CommonKitErrorCode.NoCode)));
2259
1478
  // Choose error box variant
2260
1479
  let errorBoxVariant = Variant$1.Danger;
2261
1480
  if (sessionHasExpired) {
@@ -2552,111 +1771,6 @@ const ButtonInputGroup = (props) => {
2552
1771
  : children))));
2553
1772
  };
2554
1773
 
2555
- // Constants
2556
- const ORDINALS = ['th', 'st', 'nd', 'rd'];
2557
- /**
2558
- * Get a number's ordinal
2559
- * @author Gabe Abrams
2560
- * @param num the number being analyzed
2561
- * @returns ordinal
2562
- */
2563
- const getOrdinal = (num) => {
2564
- var _a, _b;
2565
- return ((_b = (_a = ORDINALS[(num - 20) % 10]) !== null && _a !== void 0 ? _a : ORDINALS[num]) !== null && _b !== void 0 ? _b : ORDINALS[0]);
2566
- };
2567
-
2568
- const monthNames = [
2569
- { short: 'Jan', full: 'January' },
2570
- { short: 'Feb', full: 'February' },
2571
- { short: 'Mar', full: 'March' },
2572
- { short: 'Apr', full: 'April' },
2573
- { short: 'May', full: 'May' },
2574
- { short: 'Jun', full: 'June' },
2575
- { short: 'Jul', full: 'July' },
2576
- { short: 'Aug', full: 'August' },
2577
- { short: 'Sep', full: 'September' },
2578
- { short: 'Oct', full: 'October' },
2579
- { short: 'Nov', full: 'November' },
2580
- { short: 'Dec', full: 'December' },
2581
- ];
2582
- /**
2583
- * Get the name of a month given the month number (1 = January, etc.)
2584
- * If an invalid number is provided, we will treat it like January
2585
- * @author Gabe Abrams
2586
- * @param month the number of the month
2587
- * @returns object containing multiple month name formats:
2588
- * { short, full } where short will look like "Jan" and full will look like
2589
- * "January"
2590
- */
2591
- const getMonthName = (month) => {
2592
- var _a;
2593
- return ((_a = monthNames[month - 1]) !== null && _a !== void 0 ? _a : monthNames[0]);
2594
- };
2595
-
2596
- /**
2597
- * Get current time info in US Boston Eastern Time, independent of machine
2598
- * timezone
2599
- * @author Gabe Abrams
2600
- * @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
2601
- * @returns object with timestamp (ms since epoch) and numbers
2602
- * corresponding to ET time values for year, month, day, hour, hour12, minute, second, isPM
2603
- * where hour is in 24hr time and hour12 is in 12hr time.
2604
- */
2605
- const getTimeInfoInET = (dateOrTimestamp) => {
2606
- // Create a time string
2607
- let d;
2608
- if (!dateOrTimestamp) {
2609
- // Use now
2610
- d = new Date();
2611
- }
2612
- else if (typeof dateOrTimestamp === 'number') {
2613
- // Convert to date
2614
- d = new Date(dateOrTimestamp);
2615
- }
2616
- else {
2617
- // Already a date
2618
- d = dateOrTimestamp;
2619
- }
2620
- const str = d.toLocaleString('en-US', // Using US encoding (it's the only one installed on containers)
2621
- { timeZone: 'America/New_York' });
2622
- // Parse the string for the date/time info
2623
- const [dateStr, timeStr] = str.split(', '); // Format: MM/DD/YYYY, HH:MM:SS AM
2624
- const [monthStr, dayStr, yearStr] = dateStr.split('/'); // Format: MM/DD/YYYY
2625
- const [hourStr, minStr, ending] = timeStr.split(':'); // Format: HH:MM:SS AM
2626
- // Create all time numbers
2627
- const timestamp = d.getTime();
2628
- const year = Number.parseInt(yearStr, 10);
2629
- const month = Number.parseInt(monthStr, 10);
2630
- const day = Number.parseInt(dayStr, 10);
2631
- const minute = Number.parseInt(minStr, 10);
2632
- const second = (ending.split(' ')[0]
2633
- ? Number.parseInt(ending.split(' ')[0], 10)
2634
- : 0);
2635
- const hour12 = Number.parseInt(hourStr, 10);
2636
- // Convert from am/pm to 24hr
2637
- const isAM = ending.toLowerCase().includes('am');
2638
- const isPM = !isAM;
2639
- let hour = hour12;
2640
- if (isPM && hour12 !== 12) {
2641
- hour += 12;
2642
- }
2643
- else if (isAM && hour12 === 12) {
2644
- hour = 0;
2645
- }
2646
- // Return
2647
- return {
2648
- timestamp,
2649
- year,
2650
- month,
2651
- day,
2652
- hour,
2653
- hour12,
2654
- isPM,
2655
- minute,
2656
- second,
2657
- };
2658
- };
2659
-
2660
1774
  /**
2661
1775
  * A very simple, lightweight date chooser
2662
1776
  * @author Gabe Abrams
@@ -2714,17 +1828,17 @@ const getChoices = (opts) => {
2714
1828
  // Destructure props
2715
1829
  const { dontAllowFuture, dontAllowPast, numMonthsToShow = 6, } = opts;
2716
1830
  // Determine the set of choices allowed
2717
- const today = getTimeInfoInET();
1831
+ const today = dceCommonkit.getTimeInfoInET();
2718
1832
  const choices = [];
2719
1833
  let startYear = today.year;
2720
1834
  let startMonth = today.month;
2721
1835
  // Don't allow past or future dates
2722
1836
  if (dontAllowPast && dontAllowFuture) {
2723
- throw new ErrorWithCode('No past or future dates allowed', ReactKitErrorCode$1.SimpleDateChooserInvalidDateRange);
1837
+ throw new dceCommonkit.ErrorWithCode('No past or future dates allowed', dceCommonkit.CommonKitErrorCode.SimpleDateChooserInvalidDateRange);
2724
1838
  }
2725
1839
  // Require numMonthsToShow to be positive
2726
1840
  if (numMonthsToShow <= 0) {
2727
- throw new ErrorWithCode('numMonthsToShow must be positive', ReactKitErrorCode$1.SimpleDateChooserInvalidNumMonths);
1841
+ throw new dceCommonkit.ErrorWithCode('numMonthsToShow must be positive', dceCommonkit.CommonKitErrorCode.SimpleDateChooserInvalidNumMonths);
2728
1842
  }
2729
1843
  // Recalculate startMonth and startYear when allowing past dates
2730
1844
  if (!dontAllowPast) {
@@ -2746,7 +1860,7 @@ const getChoices = (opts) => {
2746
1860
  while (month > 12) {
2747
1861
  month -= 12;
2748
1862
  }
2749
- const monthName = getMonthName(month).full;
1863
+ const monthName = dceCommonkit.getMonthName(month).full;
2750
1864
  // Year is start year +1 for each 12 months
2751
1865
  let yearsToAdd = 0;
2752
1866
  let monthsOfYearsToAdd = unmoddedMonth;
@@ -2857,7 +1971,7 @@ const SimpleDateChooser = (props) => {
2857
1971
  // Check if user confirmed
2858
1972
  if (confirmed) {
2859
1973
  // Update the date to today
2860
- const today = getTimeInfoInET();
1974
+ const today = dceCommonkit.getTimeInfoInET();
2861
1975
  onChange(today.month, today.day, today.year);
2862
1976
  // Update state
2863
1977
  dispatch({
@@ -2888,7 +2002,7 @@ const SimpleDateChooser = (props) => {
2888
2002
  if (month === choice.month) {
2889
2003
  // Create day options
2890
2004
  choice.days.forEach((dayChoice) => {
2891
- const ordinal = getOrdinal(dayChoice);
2005
+ const ordinal = dceCommonkit.getOrdinal(dayChoice);
2892
2006
  dayOptions.push(React__default["default"].createElement("option", { key: `${choice.year}-${choice.month}-${dayChoice}`, value: dayChoice, "aria-label": `choose date ${dayChoice}` },
2893
2007
  dayChoice,
2894
2008
  ordinal));
@@ -2911,10 +2025,10 @@ const SimpleDateChooser = (props) => {
2911
2025
  if (view === View.InvalidDate) {
2912
2026
  body = (React__default["default"].createElement("div", { className: "SimpleDateChooser-inner-container d-inline-block" },
2913
2027
  React__default["default"].createElement("button", { type: "button", className: "btn btn-light", onClick: askToEditInvalidDate, "aria-label": `edit date for ${ariaLabel}` },
2914
- getMonthName(month).full,
2028
+ dceCommonkit.getMonthName(month).full,
2915
2029
  ' ',
2916
2030
  day,
2917
- getOrdinal(day),
2031
+ dceCommonkit.getOrdinal(day),
2918
2032
  ",",
2919
2033
  ' ',
2920
2034
  year),
@@ -2926,24 +2040,6 @@ const SimpleDateChooser = (props) => {
2926
2040
  return (React__default["default"].createElement("span", { className: "SimpleDateChooser-outer-container" }, body));
2927
2041
  };
2928
2042
 
2929
- /**
2930
- * Pad a number with zeros on the left (e.g. 5 becomes 05 with 2 digit padding)
2931
- * @author Gabe Abrams
2932
- * @param num the number to pad
2933
- * @param numDigits the minimum number of digits before the decimal
2934
- * @returns padded number
2935
- */
2936
- const padZerosLeft = (num, numDigits) => {
2937
- // Convert to string
2938
- let out = String(num);
2939
- // Add zeros
2940
- while (out.split('.')[0].length < numDigits) {
2941
- out = `0${out}`;
2942
- }
2943
- // Return
2944
- return out;
2945
- };
2946
-
2947
2043
  /**
2948
2044
  * A very simple, lightweight time chooser
2949
2045
  * @author Gardenia Liu
@@ -3011,7 +2107,7 @@ const SimpleTimeChooser = (props) => {
3011
2107
  hours %= 12;
3012
2108
  }
3013
2109
  // Pad with zeros
3014
- const paddedMinutes = padZerosLeft(minutes, 2);
2110
+ const paddedMinutes = dceCommonkit.padZerosLeft(minutes, 2);
3015
2111
  // Assemble time string
3016
2112
  return `${hours}:${paddedMinutes} ${isAM ? 'AM' : 'PM'}`;
3017
2113
  };
@@ -3495,7 +2591,7 @@ const CopiableBox = (props) => {
3495
2591
  type: ActionType$9.IndicateRecentlyCopied,
3496
2592
  });
3497
2593
  // Wait a moment
3498
- yield waitMs(4000);
2594
+ yield dceCommonkit.waitMs(4000);
3499
2595
  // Hide copied notice
3500
2596
  dispatch({
3501
2597
  type: ActionType$9.ClearRecentlyCopiedStatus,
@@ -3776,211 +2872,6 @@ const ItemPicker = (props) => {
3776
2872
  React__default["default"].createElement(NestableItemList, { items: items, onChanged: onChanged }))));
3777
2873
  };
3778
2874
 
3779
- // Import shared helpers
3780
- /**
3781
- * Get a human-readable description of a date (all in ET)
3782
- * @author Gabe Abrams
3783
- * @param [dateOrTimestamp=today] the date or timestamp for the date to describe
3784
- * @returns human-readable description of the date
3785
- */
3786
- const getHumanReadableDate = (dateOrTimestamp) => {
3787
- // Get the date info
3788
- const { month, day, year, } = getTimeInfoInET(dateOrTimestamp);
3789
- const currYear = getTimeInfoInET().year;
3790
- // Get the short month description
3791
- const monthName = getMonthName(month).short;
3792
- // Create start of description
3793
- let description = `${monthName} ${day}${getOrdinal(day)}`;
3794
- // Add on year if it's different
3795
- if (year !== currYear) {
3796
- description += ` ${year}`;
3797
- }
3798
- // Return description
3799
- return description;
3800
- };
3801
-
3802
- /**
3803
- * Path of the route for getting logs for log review
3804
- * @author Gabe Abrams
3805
- */
3806
- const LOG_REVIEW_GET_LOGS_ROUTE = `/admin${ROUTE_PATH_PREFIX}/logs`;
3807
-
3808
- /**
3809
- * Source of a log event
3810
- * @author Gabe Abrams
3811
- */
3812
- var LogSource;
3813
- (function (LogSource) {
3814
- // Client
3815
- LogSource["Client"] = "client";
3816
- // Server
3817
- LogSource["Server"] = "server";
3818
- })(LogSource || (LogSource = {}));
3819
- var LogSource$1 = LogSource;
3820
-
3821
- /**
3822
- * Type of a log event
3823
- * @author Gabe Abrams
3824
- */
3825
- var LogType;
3826
- (function (LogType) {
3827
- // User action
3828
- LogType["Action"] = "action";
3829
- // Error
3830
- LogType["Error"] = "error";
3831
- })(LogType || (LogType = {}));
3832
- var LogType$1 = LogType;
3833
-
3834
- /**
3835
- * Types of actions
3836
- * @author Gabe Abrams
3837
- */
3838
- var LogAction;
3839
- (function (LogAction) {
3840
- // Target was opened by the user (it was not on screen, but now it is)
3841
- LogAction["Open"] = "Open";
3842
- // Target was closed by the user (it was on screen, but now it is not)
3843
- LogAction["Close"] = "Close";
3844
- // Target was cancelled by the user (it was on closed without saving)
3845
- LogAction["Cancel"] = "Cancel";
3846
- // Target was expanded by the user (it always remains on screen, but size was changed)
3847
- LogAction["Expand"] = "Expand";
3848
- // Target was collapsed by the user (it always remains on screen, but size was changed)
3849
- LogAction["Collapse"] = "Collapse";
3850
- // Target was viewed by the user (only for items that are not opened or closed, those must use Open/Close actions)
3851
- LogAction["View"] = "View";
3852
- // Target interrupted the user (popup, dialog, validation message, etc. appeared without user prompting)
3853
- LogAction["Interrupt"] = "Interrupt";
3854
- // Target was created by the user (it did not exist before)
3855
- LogAction["Create"] = "Create";
3856
- // Target was modified by the user (it existed and was changed)
3857
- LogAction["Modify"] = "Modify";
3858
- // Target was deleted by the user (it existed and now it doesn't)
3859
- LogAction["Delete"] = "Delete";
3860
- // Target was added by the user (it already existed and was added to another place)
3861
- LogAction["Add"] = "Add";
3862
- // Target was removed by the user (it was removed from something but still exists)
3863
- LogAction["Remove"] = "Remove";
3864
- // Target was activated by the user (click, check, tap, keypress, etc.)
3865
- LogAction["Activate"] = "Activate";
3866
- // Target was deactivated by the user (click away, uncheck, tap outside of, tab away, etc.)
3867
- LogAction["Deactivate"] = "Deactivate";
3868
- // User showed interest in a target (hover, peek, etc.)
3869
- LogAction["Peek"] = "Peek";
3870
- // Halt a process (pause, etc.)
3871
- LogAction["Halt"] = "Halt";
3872
- // Resume a process (resume a halted process)
3873
- LogAction["Resume"] = "Resume";
3874
- // Jump to/seek to/reveal/go to/navigate to a target
3875
- LogAction["Jump"] = "Jump";
3876
- // Post a submission/message/etc. into the target
3877
- LogAction["Post"] = "Post";
3878
- // Like something
3879
- LogAction["Like"] = "Like";
3880
- // Dislike something
3881
- LogAction["Dislike"] = "Dislike";
3882
- // Unknown action
3883
- LogAction["Unknown"] = "Unknown";
3884
- })(LogAction || (LogAction = {}));
3885
- var LogAction$1 = LogAction;
3886
-
3887
- /**
3888
- * Server-side API param types
3889
- * @author Gabe Abrams
3890
- */
3891
- var ParamType;
3892
- (function (ParamType) {
3893
- ParamType["Boolean"] = "Boolean";
3894
- ParamType["BooleanOptional"] = "BooleanOptional";
3895
- ParamType["Float"] = "Float";
3896
- ParamType["FloatOptional"] = "FloatOptional";
3897
- ParamType["Int"] = "Int";
3898
- ParamType["IntOptional"] = "IntOptional";
3899
- ParamType["JSON"] = "JSON";
3900
- ParamType["JSONOptional"] = "JSONOptional";
3901
- ParamType["String"] = "String";
3902
- ParamType["StringOptional"] = "StringOptional";
3903
- })(ParamType || (ParamType = {}));
3904
- var ParamType$1 = ParamType;
3905
-
3906
- /**
3907
- * Round a number to a certain number of decimals
3908
- * @author Gabe Abrams
3909
- * @param num the number to round
3910
- * @param numDecimals the number of decimals to round to
3911
- * @returns rounded number
3912
- */
3913
- const roundToNumDecimals = (num, numDecimals) => {
3914
- const rounder = 10 ** numDecimals;
3915
- return (Math.round(num * rounder) / rounder);
3916
- };
3917
-
3918
- /**
3919
- * Escape a CSV cell if needed
3920
- * @author Gabe Abrams
3921
- * @param text the cell contents
3922
- * @returns escaped cell text
3923
- */
3924
- const escapeCellText = (text) => {
3925
- if (!String(text).includes(',')
3926
- && !String(text).includes('"')) {
3927
- // No need to escape
3928
- return String(text);
3929
- }
3930
- // Perform escape
3931
- return `"${String(text).replace(/"/g, '""')}"`;
3932
- };
3933
- /**
3934
- * Generate a CSV file
3935
- * @author Gabe Abrams
3936
- * @param data list of row data in the form of json objects
3937
- * @param columns list of columns to include in the csv where each column is an object with:
3938
- * - title: the column title
3939
- * - param: the key in the data object to use for this column
3940
- * - textIfUndefined: optional text to use if the value is undefined (defaults to empty string)
3941
- * @returns multiline csv string
3942
- */
3943
- const genCSV = (data, columns) => {
3944
- let csv = '';
3945
- // Add header
3946
- csv += (columns
3947
- .map((column) => {
3948
- return escapeCellText(column.title);
3949
- })
3950
- .join(','));
3951
- // Add each row
3952
- data.forEach((datum) => {
3953
- csv += '\n';
3954
- csv += (columns
3955
- .map((column) => {
3956
- var _a;
3957
- let contents;
3958
- const cell = datum[column.param];
3959
- if (typeof cell === 'string'
3960
- || typeof cell === 'number'
3961
- || typeof cell === 'boolean') {
3962
- contents = String(cell);
3963
- }
3964
- else if (cell === null) {
3965
- contents = '';
3966
- }
3967
- else if (typeof cell === 'undefined') {
3968
- contents = ((_a = column.textIfUndefined) !== null && _a !== void 0 ? _a : '');
3969
- }
3970
- else if (typeof cell === 'object') {
3971
- contents = JSON.stringify(cell);
3972
- }
3973
- else {
3974
- contents = '';
3975
- }
3976
- return escapeCellText(contents);
3977
- })
3978
- .join(','));
3979
- });
3980
- // Return
3981
- return csv;
3982
- };
3983
-
3984
2875
  /**
3985
2876
  * Button for downloading a csv file
3986
2877
  * @author Gabe Abrams
@@ -4255,7 +3146,7 @@ const IntelliTable = (props) => {
4255
3146
  }
4256
3147
  // Sort differently based on the data type
4257
3148
  // > Boolean
4258
- if (paramType === ParamType$1.Boolean) {
3149
+ if (paramType === dceCommonkit.ParamType.Boolean) {
4259
3150
  if (aVal && !bVal) {
4260
3151
  return (descending ? -1 : 1);
4261
3152
  }
@@ -4265,14 +3156,14 @@ const IntelliTable = (props) => {
4265
3156
  return tiebreaker;
4266
3157
  }
4267
3158
  // > Number
4268
- if (paramType === ParamType$1.Int
4269
- || paramType === ParamType$1.Float) {
3159
+ if (paramType === dceCommonkit.ParamType.Int
3160
+ || paramType === dceCommonkit.ParamType.Float) {
4270
3161
  return (descending
4271
3162
  ? (bVal - aVal)
4272
3163
  : (aVal - bVal));
4273
3164
  }
4274
3165
  // > String
4275
- if (paramType === ParamType$1.String) {
3166
+ if (paramType === dceCommonkit.ParamType.String) {
4276
3167
  if (aVal < bVal) {
4277
3168
  return (descending ? 1 : -1);
4278
3169
  }
@@ -4282,7 +3173,7 @@ const IntelliTable = (props) => {
4282
3173
  return tiebreaker;
4283
3174
  }
4284
3175
  // > JSON
4285
- if (paramType === ParamType$1.JSON) {
3176
+ if (paramType === dceCommonkit.ParamType.JSON) {
4286
3177
  const aSize = (Array.isArray(aVal)
4287
3178
  ? aVal.length
4288
3179
  : Object.keys(aVal).length);
@@ -4314,7 +3205,7 @@ const IntelliTable = (props) => {
4314
3205
  let fullValue;
4315
3206
  let visibleValue;
4316
3207
  let colTitle = '';
4317
- if (column.type === ParamType$1.Boolean) {
3208
+ if (column.type === dceCommonkit.ParamType.Boolean) {
4318
3209
  fullValue = !!(value);
4319
3210
  const noValue = (value === undefined
4320
3211
  || value === null);
@@ -4326,7 +3217,7 @@ const IntelliTable = (props) => {
4326
3217
  colTitle = 'Empty Cell';
4327
3218
  }
4328
3219
  }
4329
- else if (column.type === ParamType$1.Int) {
3220
+ else if (column.type === dceCommonkit.ParamType.Int) {
4330
3221
  fullValue = Number.parseInt(value, 10);
4331
3222
  const noValue = Number.isNaN(fullValue);
4332
3223
  visibleValue = (noValue
@@ -4337,18 +3228,18 @@ const IntelliTable = (props) => {
4337
3228
  colTitle = 'Empty Cell';
4338
3229
  }
4339
3230
  }
4340
- else if (column.type === ParamType$1.Float) {
3231
+ else if (column.type === dceCommonkit.ParamType.Float) {
4341
3232
  fullValue = Number.parseFloat(value);
4342
3233
  const noValue = Number.isNaN(fullValue);
4343
3234
  visibleValue = (noValue
4344
3235
  ? (React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faMinus }))
4345
- : roundToNumDecimals(fullValue, 2));
3236
+ : dceCommonkit.roundToNumDecimals(fullValue, 2));
4346
3237
  colTitle = String(fullValue);
4347
3238
  if (noValue) {
4348
3239
  colTitle = 'Empty Cell';
4349
3240
  }
4350
3241
  }
4351
- else if (column.type === ParamType$1.String) {
3242
+ else if (column.type === dceCommonkit.ParamType.String) {
4352
3243
  fullValue = String(value).trim();
4353
3244
  const noValue = (value === undefined
4354
3245
  || value === null
@@ -4361,7 +3252,7 @@ const IntelliTable = (props) => {
4361
3252
  colTitle = 'Empty Cell';
4362
3253
  }
4363
3254
  }
4364
- else if (column.type === ParamType$1.JSON) {
3255
+ else if (column.type === dceCommonkit.ParamType.JSON) {
4365
3256
  fullValue = JSON.stringify(value);
4366
3257
  const noValue = (Array.isArray(value)
4367
3258
  ? (!value || value.length === 0)
@@ -4392,7 +3283,7 @@ const IntelliTable = (props) => {
4392
3283
  })
4393
3284
  .length);
4394
3285
  // Build CSV
4395
- const csv = genCSV(data, columns.filter((column) => {
3286
+ const csv = dceCommonkit.genCSV(data, columns.filter((column) => {
4396
3287
  return columnVisibilityMap[column.param];
4397
3288
  }));
4398
3289
  // Build main UI
@@ -4476,14 +3367,6 @@ const Pagination = (props) => {
4476
3367
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faArrowRight }))))));
4477
3368
  };
4478
3369
 
4479
- /**
4480
- * Deeply clones an object
4481
- * @author Yuen Ler Chow
4482
- * @param obj the object to clone
4483
- * @returns a deep clone of the object
4484
- */
4485
- const cloneDeep = clone__default["default"];
4486
-
4487
3370
  /**
4488
3371
  * Log reviewer panel that allows users (must be approved admins) to
4489
3372
  * review logs written by dce-reactkit
@@ -4591,185 +3474,185 @@ const columns = [
4591
3474
  {
4592
3475
  title: 'First Name',
4593
3476
  param: 'userFirstName',
4594
- type: ParamType$1.String,
3477
+ type: dceCommonkit.ParamType.String,
4595
3478
  },
4596
3479
  {
4597
3480
  title: 'Last Name',
4598
3481
  param: 'userLastName',
4599
- type: ParamType$1.String,
3482
+ type: dceCommonkit.ParamType.String,
4600
3483
  },
4601
3484
  {
4602
3485
  title: 'Email',
4603
3486
  param: 'userEmail',
4604
- type: ParamType$1.String,
3487
+ type: dceCommonkit.ParamType.String,
4605
3488
  },
4606
3489
  {
4607
3490
  title: 'Canvas Id',
4608
3491
  param: 'userId',
4609
- type: ParamType$1.Int,
3492
+ type: dceCommonkit.ParamType.Int,
4610
3493
  },
4611
3494
  {
4612
3495
  title: 'Student?',
4613
3496
  param: 'isLearner',
4614
- type: ParamType$1.Boolean,
3497
+ type: dceCommonkit.ParamType.Boolean,
4615
3498
  },
4616
3499
  {
4617
3500
  title: 'Teaching Staff?',
4618
3501
  param: 'isTTM',
4619
- type: ParamType$1.Boolean,
3502
+ type: dceCommonkit.ParamType.Boolean,
4620
3503
  startsHidden: true,
4621
3504
  },
4622
3505
  {
4623
3506
  title: 'Admin?',
4624
3507
  param: 'isAdmin',
4625
- type: ParamType$1.Boolean,
3508
+ type: dceCommonkit.ParamType.Boolean,
4626
3509
  startsHidden: true,
4627
3510
  },
4628
3511
  {
4629
3512
  title: 'Course Canvas Id',
4630
3513
  param: 'courseId',
4631
- type: ParamType$1.Int,
3514
+ type: dceCommonkit.ParamType.Int,
4632
3515
  startsHidden: true,
4633
3516
  },
4634
3517
  {
4635
3518
  title: 'Course Name',
4636
3519
  param: 'courseName',
4637
- type: ParamType$1.String,
3520
+ type: dceCommonkit.ParamType.String,
4638
3521
  },
4639
3522
  {
4640
3523
  title: 'Browser Name',
4641
3524
  param: 'browser.name',
4642
- type: ParamType$1.String,
3525
+ type: dceCommonkit.ParamType.String,
4643
3526
  startsHidden: true,
4644
3527
  },
4645
3528
  {
4646
3529
  title: 'Browser Version',
4647
3530
  param: 'browser.version',
4648
- type: ParamType$1.String,
3531
+ type: dceCommonkit.ParamType.String,
4649
3532
  startsHidden: true,
4650
3533
  },
4651
3534
  {
4652
3535
  title: 'OS',
4653
3536
  param: 'device.os',
4654
- type: ParamType$1.String,
3537
+ type: dceCommonkit.ParamType.String,
4655
3538
  startsHidden: true,
4656
3539
  },
4657
3540
  {
4658
3541
  title: 'Mobile?',
4659
3542
  param: 'device.isMobile',
4660
- type: ParamType$1.Boolean,
3543
+ type: dceCommonkit.ParamType.Boolean,
4661
3544
  startsHidden: true,
4662
3545
  },
4663
3546
  {
4664
3547
  title: 'Year',
4665
3548
  param: 'year',
4666
- type: ParamType$1.Int,
3549
+ type: dceCommonkit.ParamType.Int,
4667
3550
  },
4668
3551
  {
4669
3552
  title: 'Month',
4670
3553
  param: 'month',
4671
- type: ParamType$1.Int,
3554
+ type: dceCommonkit.ParamType.Int,
4672
3555
  },
4673
3556
  {
4674
3557
  title: 'Day',
4675
3558
  param: 'day',
4676
- type: ParamType$1.Int,
3559
+ type: dceCommonkit.ParamType.Int,
4677
3560
  },
4678
3561
  {
4679
3562
  title: 'Hour',
4680
3563
  param: 'hour',
4681
- type: ParamType$1.Int,
3564
+ type: dceCommonkit.ParamType.Int,
4682
3565
  },
4683
3566
  {
4684
3567
  title: 'Minute',
4685
3568
  param: 'minute',
4686
- type: ParamType$1.Int,
3569
+ type: dceCommonkit.ParamType.Int,
4687
3570
  startsHidden: true,
4688
3571
  },
4689
3572
  {
4690
3573
  title: 'Timestamp',
4691
3574
  param: 'timestamp',
4692
- type: ParamType$1.Int,
3575
+ type: dceCommonkit.ParamType.Int,
4693
3576
  startsHidden: true,
4694
3577
  },
4695
3578
  {
4696
3579
  title: 'Context',
4697
3580
  param: 'context',
4698
- type: ParamType$1.String,
3581
+ type: dceCommonkit.ParamType.String,
4699
3582
  },
4700
3583
  {
4701
3584
  title: 'Subcontext',
4702
3585
  param: 'subcontext',
4703
- type: ParamType$1.String,
3586
+ type: dceCommonkit.ParamType.String,
4704
3587
  },
4705
3588
  {
4706
3589
  title: 'Tags',
4707
3590
  param: 'tags',
4708
- type: ParamType$1.JSON,
3591
+ type: dceCommonkit.ParamType.JSON,
4709
3592
  startsHidden: true,
4710
3593
  },
4711
3594
  {
4712
3595
  title: 'Log Level',
4713
3596
  param: 'level',
4714
- type: ParamType$1.String,
3597
+ type: dceCommonkit.ParamType.String,
4715
3598
  startsHidden: true,
4716
3599
  },
4717
3600
  {
4718
3601
  title: 'Metadata',
4719
3602
  param: 'metadata',
4720
- type: ParamType$1.JSON,
3603
+ type: dceCommonkit.ParamType.JSON,
4721
3604
  startsHidden: true,
4722
3605
  },
4723
3606
  {
4724
3607
  title: 'Source',
4725
3608
  param: 'source',
4726
- type: ParamType$1.String,
3609
+ type: dceCommonkit.ParamType.String,
4727
3610
  },
4728
3611
  {
4729
3612
  title: 'Server Route Path',
4730
3613
  param: 'routePath',
4731
- type: ParamType$1.String,
3614
+ type: dceCommonkit.ParamType.String,
4732
3615
  startsHidden: true,
4733
3616
  },
4734
3617
  {
4735
3618
  title: 'Server Route Template',
4736
3619
  param: 'routeTemplate',
4737
- type: ParamType$1.String,
3620
+ type: dceCommonkit.ParamType.String,
4738
3621
  startsHidden: true,
4739
3622
  },
4740
3623
  {
4741
3624
  title: 'Type',
4742
3625
  param: 'type',
4743
- type: ParamType$1.String,
3626
+ type: dceCommonkit.ParamType.String,
4744
3627
  },
4745
3628
  {
4746
3629
  title: 'Error Message',
4747
3630
  param: 'errorMessage',
4748
- type: ParamType$1.String,
3631
+ type: dceCommonkit.ParamType.String,
4749
3632
  startsHidden: true,
4750
3633
  },
4751
3634
  {
4752
3635
  title: 'Error Code',
4753
3636
  param: 'errorCode',
4754
- type: ParamType$1.String,
3637
+ type: dceCommonkit.ParamType.String,
4755
3638
  startsHidden: true,
4756
3639
  },
4757
3640
  {
4758
3641
  title: 'Error Stack',
4759
3642
  param: 'errorStack',
4760
- type: ParamType$1.String,
3643
+ type: dceCommonkit.ParamType.String,
4761
3644
  startsHidden: true,
4762
3645
  },
4763
3646
  {
4764
3647
  title: 'Action Target',
4765
3648
  param: 'target',
4766
- type: ParamType$1.String,
3649
+ type: dceCommonkit.ParamType.String,
4767
3650
  startsHidden: true,
4768
3651
  },
4769
3652
  {
4770
3653
  title: 'Action Type',
4771
3654
  param: 'action',
4772
- type: ParamType$1.String,
3655
+ type: dceCommonkit.ParamType.String,
4773
3656
  startsHidden: true,
4774
3657
  },
4775
3658
  ];
@@ -4938,14 +3821,14 @@ const LogReviewer = (props) => {
4938
3821
  const contextMap = {};
4939
3822
  [
4940
3823
  ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}),
4941
- LogBuiltInMetadata.Context,
3824
+ dceCommonkit.LogBuiltInMetadata.Context,
4942
3825
  ].forEach((partialContextMap) => {
4943
3826
  Object.keys(partialContextMap).forEach((context) => {
4944
3827
  // Add context
4945
3828
  contextMap[context] = partialContextMap[context];
4946
3829
  // If context has children, add an "uncategorized" subcontext
4947
3830
  if (typeof contextMap[context] !== 'string') {
4948
- contextMap[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
3831
+ contextMap[context][dceCommonkit.LogBuiltInMetadata.Context.Uncategorized] = (dceCommonkit.LogBuiltInMetadata.Context.Uncategorized);
4949
3832
  }
4950
3833
  });
4951
3834
  });
@@ -4953,7 +3836,7 @@ const LogReviewer = (props) => {
4953
3836
  const targetMap = {};
4954
3837
  [
4955
3838
  ((_b = LogMetadata.Target) !== null && _b !== void 0 ? _b : {}),
4956
- LogBuiltInMetadata.Target,
3839
+ dceCommonkit.LogBuiltInMetadata.Target,
4957
3840
  ].forEach((partialTargetMap) => {
4958
3841
  Object.keys(partialTargetMap).forEach((target) => {
4959
3842
  targetMap[target] = partialTargetMap[target];
@@ -4961,7 +3844,7 @@ const LogReviewer = (props) => {
4961
3844
  });
4962
3845
  /* -------------- State ------------- */
4963
3846
  // Create initial date filter state
4964
- const today = getTimeInfoInET();
3847
+ const today = dceCommonkit.getTimeInfoInET();
4965
3848
  const initStartDate = {
4966
3849
  year: today.year,
4967
3850
  month: today.month,
@@ -5029,7 +3912,7 @@ const LogReviewer = (props) => {
5029
3912
  Object.values(targetMap).forEach((target) => {
5030
3913
  initActionErrorFilterState.target[target] = true;
5031
3914
  });
5032
- Object.values(LogAction$1).forEach((action) => {
3915
+ Object.values(dceCommonkit.LogAction).forEach((action) => {
5033
3916
  initActionErrorFilterState.action[action] = true;
5034
3917
  });
5035
3918
  // Initial state
@@ -5081,7 +3964,7 @@ const LogReviewer = (props) => {
5081
3964
  let fetchedLogs = [];
5082
3965
  // Get logs from server
5083
3966
  const response = yield visitServerEndpoint({
5084
- path: LOG_REVIEW_GET_LOGS_ROUTE,
3967
+ path: dceCommonkit.LOG_REVIEW_GET_LOGS_ROUTE,
5085
3968
  method: 'GET',
5086
3969
  params: {
5087
3970
  pageNumber: pageNum,
@@ -5208,7 +4091,7 @@ const LogReviewer = (props) => {
5208
4091
  // Save active filters
5209
4092
  // Deep clone the initial filter states to avoid any reference issues
5210
4093
  // if the filter states are modified later
5211
- activeFiltersRef.current = cloneDeep({
4094
+ activeFiltersRef.current = dceCommonkit.cloneDeep({
5212
4095
  dateFilterState: initDateFilterState,
5213
4096
  contextFilterState: initContextFilterState,
5214
4097
  tagFilterState: initTagFilterState,
@@ -5252,7 +4135,7 @@ const LogReviewer = (props) => {
5252
4135
  // Save active filters
5253
4136
  // Deep clone the pending filter states to avoid any reference issues
5254
4137
  // if the filter states are modified later
5255
- activeFiltersRef.current = cloneDeep({
4138
+ activeFiltersRef.current = dceCommonkit.cloneDeep({
5256
4139
  dateFilterState: pendingDateFilterState,
5257
4140
  contextFilterState: pendingContextFilterState,
5258
4141
  tagFilterState: pendingTagFilterState,
@@ -5326,7 +4209,7 @@ const LogReviewer = (props) => {
5326
4209
  checked: !!pendingContextFilterState[context],
5327
4210
  };
5328
4211
  // Add built-in items to its own folder
5329
- const isBuiltIn = context in LogBuiltInMetadata.Context;
4212
+ const isBuiltIn = context in dceCommonkit.LogBuiltInMetadata.Context;
5330
4213
  if (isBuiltIn) {
5331
4214
  // Add to built-in pickable item
5332
4215
  builtInPickableItem.children.push(item);
@@ -5426,22 +4309,22 @@ const LogReviewer = (props) => {
5426
4309
  });
5427
4310
  }, ariaLabel: "show logs of all types", selected: pendingActionErrorFilterState.type === undefined, unselectedVariant: Variant$1.Light }),
5428
4311
  React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-action-only", text: "Action Logs Only", onSelected: () => {
5429
- const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: LogType$1.Action });
4312
+ const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: dceCommonkit.LogType.Action });
5430
4313
  dispatch({
5431
4314
  type: ActionType$6.UpdateActionErrorFilterState,
5432
4315
  actionErrorFilterState: newActionErrorFilterState,
5433
4316
  });
5434
- }, ariaLabel: "only show action logs", selected: pendingActionErrorFilterState.type === LogType$1.Action, unselectedVariant: Variant$1.Light }),
4317
+ }, ariaLabel: "only show action logs", selected: pendingActionErrorFilterState.type === dceCommonkit.LogType.Action, unselectedVariant: Variant$1.Light }),
5435
4318
  React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-error-only", text: "Action Error Only", onSelected: () => {
5436
- const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: LogType$1.Error });
4319
+ const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: dceCommonkit.LogType.Error });
5437
4320
  dispatch({
5438
4321
  type: ActionType$6.UpdateActionErrorFilterState,
5439
4322
  actionErrorFilterState: newActionErrorFilterState,
5440
4323
  });
5441
- }, ariaLabel: "only show error logs", selected: pendingActionErrorFilterState.type === LogType$1.Error, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
4324
+ }, ariaLabel: "only show error logs", selected: pendingActionErrorFilterState.type === dceCommonkit.LogType.Error, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
5442
4325
  (pendingActionErrorFilterState.type === undefined
5443
- || pendingActionErrorFilterState.type === LogType$1.Action) && (React__default["default"].createElement(TabBox, { title: "Action Log Details" },
5444
- React__default["default"].createElement(ButtonInputGroup, { label: "Action", className: "mb-2", wrapButtonsAndAddGaps: true }, Object.keys(LogAction$1)
4326
+ || pendingActionErrorFilterState.type === dceCommonkit.LogType.Action) && (React__default["default"].createElement(TabBox, { title: "Action Log Details" },
4327
+ React__default["default"].createElement(ButtonInputGroup, { label: "Action", className: "mb-2", wrapButtonsAndAddGaps: true }, Object.keys(dceCommonkit.LogAction)
5445
4328
  .map((action) => {
5446
4329
  const description = genHumanReadableName(action);
5447
4330
  return (React__default["default"].createElement(CheckboxButton, { key: action, id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: true, checked: pendingActionErrorFilterState.action[action], onChanged: (checked) => {
@@ -5464,7 +4347,7 @@ const LogReviewer = (props) => {
5464
4347
  }, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
5465
4348
  })))),
5466
4349
  (pendingActionErrorFilterState.type === undefined
5467
- || pendingActionErrorFilterState.type === LogType$1.Error) && (React__default["default"].createElement(TabBox, { title: "Error Log Details" },
4350
+ || pendingActionErrorFilterState.type === dceCommonkit.LogType.Error) && (React__default["default"].createElement(TabBox, { title: "Error Log Details" },
5468
4351
  React__default["default"].createElement("div", { className: "input-group mb-2" },
5469
4352
  React__default["default"].createElement("span", { className: "input-group-text" }, "Error Message"),
5470
4353
  React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for error message", value: pendingActionErrorFilterState.errorMessage, placeholder: "e.g. undefined is not a function", onChange: (e) => {
@@ -5610,21 +4493,21 @@ const LogReviewer = (props) => {
5610
4493
  advancedFilterState: newAdvancedFilterState,
5611
4494
  });
5612
4495
  }, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
5613
- React__default["default"].createElement(RadioButton, { text: "Client Only", ariaLabel: "show logs from client source", selected: pendingAdvancedFilterState.source === LogSource$1.Client, onSelected: () => {
5614
- const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: LogSource$1.Client });
4496
+ React__default["default"].createElement(RadioButton, { text: "Client Only", ariaLabel: "show logs from client source", selected: pendingAdvancedFilterState.source === dceCommonkit.LogSource.Client, onSelected: () => {
4497
+ const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: dceCommonkit.LogSource.Client });
5615
4498
  dispatch({
5616
4499
  type: ActionType$6.UpdateAdvancedFilterState,
5617
4500
  advancedFilterState: newAdvancedFilterState,
5618
4501
  });
5619
4502
  }, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
5620
- React__default["default"].createElement(RadioButton, { text: "Server Only", ariaLabel: "show logs from server source", selected: pendingAdvancedFilterState.source === LogSource$1.Server, onSelected: () => {
5621
- const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: LogSource$1.Server });
4503
+ React__default["default"].createElement(RadioButton, { text: "Server Only", ariaLabel: "show logs from server source", selected: pendingAdvancedFilterState.source === dceCommonkit.LogSource.Server, onSelected: () => {
4504
+ const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: dceCommonkit.LogSource.Server });
5622
4505
  dispatch({
5623
4506
  type: ActionType$6.UpdateAdvancedFilterState,
5624
4507
  advancedFilterState: newAdvancedFilterState,
5625
4508
  });
5626
4509
  }, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
5627
- pendingAdvancedFilterState.source !== LogSource$1.Client && (React__default["default"].createElement("div", { className: "mt-2" },
4510
+ pendingAdvancedFilterState.source !== dceCommonkit.LogSource.Client && (React__default["default"].createElement("div", { className: "mt-2" },
5628
4511
  React__default["default"].createElement("div", { className: "input-group mb-2" },
5629
4512
  React__default["default"].createElement("span", { className: "input-group-text" }, "Server Route Path"),
5630
4513
  React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for server route path", value: pendingAdvancedFilterState.routePath, placeholder: "e.g. /api/ttm/courses/12345", onChange: (e) => {
@@ -5660,7 +4543,7 @@ const LogReviewer = (props) => {
5660
4543
  React__default["default"].createElement("h4", { className: "m-1" }, "No Logs to Show"),
5661
4544
  React__default["default"].createElement("div", null, "Either your filters are too strict or no matching logs have been created yet."))),
5662
4545
  React__default["default"].createElement("div", { className: loading || logs.length === 0 ? 'd-none' : undefined },
5663
- React__default["default"].createElement(IntelliTable, { title: "Matching Logs", csvName: `Logs from ${getHumanReadableDate()}`, id: "logs", data: logs, columns: columns })),
4546
+ React__default["default"].createElement(IntelliTable, { title: "Matching Logs", csvName: `Logs from ${dceCommonkit.getHumanReadableDate()}`, id: "logs", data: logs, columns: columns })),
5664
4547
  !loading && logs.length > 0 && paginationControls));
5665
4548
  /* ---------- Wrap in Modal --------- */
5666
4549
  return (React__default["default"].createElement("div", { className: "LogReviewer-outer-container" },
@@ -10219,7 +9102,7 @@ var MenuPortal = function MenuPortal(props) {
10219
9102
  }), innerProps), children);
10220
9103
  return jsx(PortalPlacementContext.Provider, {
10221
9104
  value: portalPlacementContext
10222
- }, appendTo ? /*#__PURE__*/reactDom.exports.createPortal(menuWrapper, appendTo) : menuWrapper);
9105
+ }, appendTo ? /*#__PURE__*/ReactDOM.createPortal(menuWrapper, appendTo) : menuWrapper);
10223
9106
  };
10224
9107
 
10225
9108
  // ==============================
@@ -14322,11 +13205,11 @@ const AddOrEditDBEntry = (props) => {
14322
13205
  * @param [adminsOnly] true if the endpoint is for admins only
14323
13206
  * @returns the endpoint path
14324
13207
  */
14325
- const generateEndpointPath = (collectionName, adminsOnly) => {
13208
+ const generateEndpointPath = (collectionName, adminsOnly = true) => {
14326
13209
  // Determine prefix based on whether the endpoint is for admins only
14327
13210
  const userPath = adminsOnly ? 'admin' : 'ttm';
14328
13211
  // Return the endpoint path
14329
- return `/api/${userPath}/dce-reactkit/dbeditor/${collectionName}`;
13212
+ return `/api/${userPath}/dce-commonkit/dbeditor/${collectionName}`;
14330
13213
  };
14331
13214
 
14332
13215
  /**
@@ -14655,27 +13538,6 @@ const ToggleSwitch = (props) => {
14655
13538
  } })));
14656
13539
  };
14657
13540
 
14658
- /**
14659
- * Convert a string to hyphenated lowercase format with no space or
14660
- * non-alphanumeric characters
14661
- * @author Gabe Abrams
14662
- * @param str the string to convert
14663
- * @returns the idified string
14664
- */
14665
- const idify = (str) => {
14666
- return (str
14667
- // Trim whitespace
14668
- .trim()
14669
- // Convert to lowercase
14670
- .toLowerCase()
14671
- // Replace non-alphanumeric characters with hyphens
14672
- .replace(/[^a-z0-9]+/g, '-')
14673
- // Change multiple hyphens in a row for a single hyphen
14674
- .replace(/-+/g, '-')
14675
- // Remove hyphens at the beginning and end of the string
14676
- .replace(/^-+|-+$/g, ''));
14677
- };
14678
-
14679
13541
  /**
14680
13542
  * Container that automatically scrolls when new items are added,
14681
13543
  * lets the user scroll up to see old items, but resumes
@@ -14915,8 +13777,8 @@ const AutoscrollToBottomContainer = (props) => {
14915
13777
  // Jump to Bottom button
14916
13778
  let jumpToBottomButton;
14917
13779
  if (jumpToBottomButtonVisible) {
14918
- jumpToBottomButton = (React__default["default"].createElement("div", { className: `AutoscrollToBottomContainer-jump-to-bottom-container AutoscrollToBottomContainer-for-${idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')}` },
14919
- React__default["default"].createElement("button", { type: "button", className: `AutoscrollToBottomContainer-jump-to-bottom-button AutoscrollToBottomContainer-jump-to-bottom-button-for-${idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')} btn btn-sm btn-${jumpToBottomButtonVariant} pt-0 pb-0`, onClick: scrollToBottom, "aria-label": "scroll back to bottom and show new content" },
13780
+ jumpToBottomButton = (React__default["default"].createElement("div", { className: `AutoscrollToBottomContainer-jump-to-bottom-container AutoscrollToBottomContainer-for-${dceCommonkit.idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')}` },
13781
+ React__default["default"].createElement("button", { type: "button", className: `AutoscrollToBottomContainer-jump-to-bottom-button AutoscrollToBottomContainer-jump-to-bottom-button-for-${dceCommonkit.idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')} btn btn-sm btn-${jumpToBottomButtonVariant} pt-0 pb-0`, onClick: scrollToBottom, "aria-label": "scroll back to bottom and show new content" },
14920
13782
  "New",
14921
13783
  ' ', itemsName !== null && itemsName !== void 0 ? itemsName : 'Content',
14922
13784
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faChevronDown, className: "ms-1" }))));
@@ -15139,7 +14001,7 @@ const MultiSwitch = (props) => {
15139
14001
  return (React__default["default"].createElement("button", { type: "button", key: option.id, className: combineClassNames([
15140
14002
  'MultiSwitch-option-button',
15141
14003
  (isHovered ? 'MultiSwitch-option-button-hovered' : ''),
15142
- `MultiSwitch-option-button-with-id-${idify(option.id)}`,
14004
+ `MultiSwitch-option-button-with-id-${dceCommonkit.idify(option.id)}`,
15143
14005
  `MultiSwitch-option-button-is${isSelected ? '' : '-not'}-selected`,
15144
14006
  ]), "aria-label": (isSelected
15145
14007
  ? `option "${option.label}", currently selected`
@@ -15332,38 +14194,12 @@ const Dropdown = (props) => {
15332
14194
  */
15333
14195
  var ProgressBarSize;
15334
14196
  (function (ProgressBarSize) {
14197
+ ProgressBarSize["Small"] = "Small";
15335
14198
  ProgressBarSize["Medium"] = "Medium";
15336
14199
  ProgressBarSize["Large"] = "Large";
15337
14200
  })(ProgressBarSize || (ProgressBarSize = {}));
15338
14201
  var ProgressBarSize$1 = ProgressBarSize;
15339
14202
 
15340
- /**
15341
- * Pad a number's decimal with zeros on the right
15342
- * (e.g. 5.2 becomes 5.20 with 2 digit padding)
15343
- * @author Gabe Abrams
15344
- * @param num the number to pad
15345
- * @param numDigits the minimum number of digits after the decimal
15346
- * @returns padded number
15347
- */
15348
- const padDecimalZeros = (num, numDigits) => {
15349
- // Skip if nothing to do
15350
- if (numDigits < 1) {
15351
- return String(num);
15352
- }
15353
- // Convert to string
15354
- let out = String(num);
15355
- // Add a decimal point if there isn't one
15356
- if (!out.includes('.')) {
15357
- out += '.';
15358
- }
15359
- // Add zeros
15360
- while (out.split('.')[1].length < numDigits) {
15361
- out = `${out}0`;
15362
- }
15363
- // Return
15364
- return out;
15365
- };
15366
-
15367
14203
  /**
15368
14204
  * Customizable Progress Bar component using Bootstrap styles
15369
14205
  * @author Allison Zhang
@@ -15374,7 +14210,7 @@ const padDecimalZeros = (num, numDigits) => {
15374
14210
  // Multiplier for calculating width of number of items
15375
14211
  const ITEM_WIDTH_MULTIPLIER = 1.3;
15376
14212
  // Constant for percent width
15377
- const PERCENT_WIDTH = 2.7;
14213
+ const PERCENT_WIDTH = 3;
15378
14214
  // Constant for item width
15379
14215
  const ITEM_WIDTH = 2;
15380
14216
  /*------------------------------------------------------------------------*/
@@ -15384,9 +14220,11 @@ const ITEM_WIDTH = 2;
15384
14220
  let style = `
15385
14221
  .ProgressBar-number-of,
15386
14222
  .ProgressBar-percent {
14223
+ flex: 0 0 auto;
15387
14224
  white-space: nowrap;
15388
- padding-right: 0.3em;
15389
- text-align: left;
14225
+ padding-right: 0.5em;
14226
+ padding-left: 0.25em;
14227
+ text-align: right;
15390
14228
  transition: width .25s ease;
15391
14229
  }
15392
14230
 
@@ -15406,7 +14244,7 @@ const ProgressBar = (props) => {
15406
14244
  /*------------------------------------------------------------------------*/
15407
14245
  /* -------------------------------- Setup ------------------------------- */
15408
14246
  /*------------------------------------------------------------------------*/
15409
- var _a, _b, _c, _d;
14247
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
15410
14248
  /* -------------- Props ------------- */
15411
14249
  // Destructure props
15412
14250
  const { striped, variant = Variant$1.Warning, bgVariant = Variant$1.Secondary, showOutline, size = ProgressBarSize$1.Medium, } = props;
@@ -15438,19 +14276,10 @@ const ProgressBar = (props) => {
15438
14276
  /*----------------------------------------*/
15439
14277
  /* ---------------- Sizes --------------- */
15440
14278
  /*----------------------------------------*/
15441
- // Add dynamic general style
15442
- style += `
15443
- .ProgressBar-percent {
15444
- min-width: ${(status.usePercent ? (_a = status.numDecimalPlaces) !== null && _a !== void 0 ? _a : 0 : 0) + PERCENT_WIDTH}em;
15445
- }
15446
- .ProgressBar-number-of {
15447
- min-width: ${((!status.usePercent ? String((_b = status.total) !== null && _b !== void 0 ? _b : 0).length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15448
- }
15449
- `;
15450
14279
  // Size styles
15451
14280
  switch (size) {
15452
- case ProgressBarSize$1.Medium:
15453
- // Medium size
14281
+ case ProgressBarSize$1.Small:
14282
+ // Small size
15454
14283
  style += `
15455
14284
  .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15456
14285
  font-size: 1em;
@@ -15463,10 +14292,18 @@ const ProgressBar = (props) => {
15463
14292
  height: 1.5em;
15464
14293
  border-radius: 0.5em;
15465
14294
  }
14295
+ .ProgressBar-percent {
14296
+ min-width: ${((status.usePercent ? (_a = status.numDecimalPlaces) !== null && _a !== void 0 ? _a : 0 : 0) * 1) + PERCENT_WIDTH}em;
14297
+ max-width: ${((status.usePercent ? (_b = status.numDecimalPlaces) !== null && _b !== void 0 ? _b : 0 : 0) * 1) + PERCENT_WIDTH}em;
14298
+ }
14299
+ .ProgressBar-number-of {
14300
+ min-width: ${((!status.usePercent ? ((_c = status.total) === null || _c === void 0 ? void 0 : _c.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14301
+ max-width: ${((!status.usePercent ? ((_d = status.total) === null || _d === void 0 ? void 0 : _d.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14302
+ }
15466
14303
  `;
15467
14304
  break;
15468
- case ProgressBarSize$1.Large:
15469
- // Large size
14305
+ case ProgressBarSize$1.Medium:
14306
+ // Medium size
15470
14307
  style += `
15471
14308
  .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15472
14309
  font-size: 1.5em;
@@ -15479,14 +14316,47 @@ const ProgressBar = (props) => {
15479
14316
  height: 2em;
15480
14317
  border-radius: 0.7em;
15481
14318
  }
14319
+ .ProgressBar-percent {
14320
+ min-width: ${((status.usePercent ? (_e = status.numDecimalPlaces) !== null && _e !== void 0 ? _e : 0 : 0) * 1) + PERCENT_WIDTH}em;
14321
+ max-width: ${((status.usePercent ? (_f = status.numDecimalPlaces) !== null && _f !== void 0 ? _f : 0 : 0) * 1) + PERCENT_WIDTH}em;
14322
+ }
14323
+ .ProgressBar-number-of {
14324
+ min-width: ${((!status.usePercent ? ((_g = status.total) === null || _g === void 0 ? void 0 : _g.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14325
+ max-width: ${((!status.usePercent ? ((_h = status.total) === null || _h === void 0 ? void 0 : _h.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14326
+ }
14327
+ `;
14328
+ break;
14329
+ case ProgressBarSize$1.Large:
14330
+ // Large size
14331
+ style += `
14332
+ .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
14333
+ font-size: 2em;
14334
+ }
14335
+ .ProgressBar-container .ProgressBar-background {
14336
+ height: 3em;
14337
+ border-radius: 1em;
14338
+ }
14339
+ .ProgressBar-container .ProgressBar-bar {
14340
+ height: 3em;
14341
+ border-radius: 1em;
14342
+ }
14343
+ .ProgressBar-percent {
14344
+ min-width: ${((status.usePercent ? (_j = status.numDecimalPlaces) !== null && _j !== void 0 ? _j : 0 : 0) * 1) + PERCENT_WIDTH}em;
14345
+ max-width: ${((status.usePercent ? (_k = status.numDecimalPlaces) !== null && _k !== void 0 ? _k : 0 : 0) * 1) + PERCENT_WIDTH}em;
14346
+ }
14347
+ .ProgressBar-number-of {
14348
+ min-width: ${((!status.usePercent ? ((_l = status.total) === null || _l === void 0 ? void 0 : _l.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14349
+ max-width: ${((!status.usePercent ? ((_m = status.total) === null || _m === void 0 ? void 0 : _m.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14350
+ }
15482
14351
  `;
15483
14352
  break;
15484
14353
  }
15485
14354
  // Get the width of the outline based on size
15486
14355
  const outlineWidth = (() => {
15487
14356
  switch (size) {
15488
- case ProgressBarSize$1.Medium: return '0.05em';
15489
- case ProgressBarSize$1.Large: return '0.08em';
14357
+ case ProgressBarSize$1.Small: return '0.05em';
14358
+ case ProgressBarSize$1.Medium: return '0.08em';
14359
+ case ProgressBarSize$1.Large: return '0.1em';
15490
14360
  default: return '0.05em';
15491
14361
  }
15492
14362
  })();
@@ -15511,88 +14381,38 @@ const ProgressBar = (props) => {
15511
14381
  }
15512
14382
  `;
15513
14383
  // Stripes for striped effect
15514
- let stripes = null;
15515
- if (striped) {
15516
- stripes = (React__default["default"].createElement("div", null,
15517
- React__default["default"].createElement("style", null, stripesStyle),
15518
- React__default["default"].createElement("div", { className: "ProgressBar-stripes position-absolute", style: {
15519
- width: '200%',
15520
- height: '100%',
15521
- } }, "\u00A0")));
15522
- }
14384
+ const stripes = (React__default["default"].createElement("div", null,
14385
+ React__default["default"].createElement("style", null, stripesStyle),
14386
+ React__default["default"].createElement("div", { className: "ProgressBar-stripes position-absolute ", style: {
14387
+ width: '200%',
14388
+ height: '100%',
14389
+ } }, "\u00A0")));
15523
14390
  /*----------------------------------------*/
15524
14391
  /* --------------- Main UI -------------- */
15525
14392
  /*----------------------------------------*/
15526
- // Calculate the width of the progress bar
15527
- let progressBarWidthPercent = 0;
15528
- if (status.usePercent) {
15529
- // Use percent progress directly
15530
- progressBarWidthPercent = status.percentProgress;
15531
- }
15532
- else if (status.total > 0) {
15533
- // Calculate percent progress from items
15534
- progressBarWidthPercent = (status.numComplete / status.total) * 100;
15535
- }
15536
14393
  // Render the progress bar
15537
14394
  return (React__default["default"].createElement("div", { className: "ProgressBar-container d-flex align-items-center" },
15538
14395
  React__default["default"].createElement("style", null, style),
15539
- !status.usePercent && status.numComplete && (React__default["default"].createElement("span", { className: "ProgressBar-number-of" },
14396
+ !status.usePercent && status.numComplete && (React__default["default"].createElement("span", { className: "ProgressBar-number-of pe-2 align-self-center" },
15540
14397
  status.numComplete,
15541
14398
  "\u00A0of\u00A0",
15542
14399
  status.total)),
15543
- status.usePercent && status.percentProgress && (React__default["default"].createElement("span", { className: "ProgressBar-percent" },
15544
- padDecimalZeros(roundToNumDecimals(status.percentProgress, (_c = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _c !== void 0 ? _c : 0), (_d = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _d !== void 0 ? _d : 0),
14400
+ status.usePercent && status.percentProgress && (React__default["default"].createElement("span", { className: "ProgressBar-percent pe-2 align-self-center" },
14401
+ status.percentProgress.toFixed((_o = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _o !== void 0 ? _o : 0),
15545
14402
  "%")),
15546
- React__default["default"].createElement("div", { className: `ProgressBar-background bg-${bgVariant} flex-grow-1`, style: {
14403
+ React__default["default"].createElement("div", { className: `ProgressBar-background bg-${bgVariant} w-100`, style: {
15547
14404
  boxShadow: `0 0 0 ${outlineWidth} ${showOutline ? '#000' : '#DEE2E6'}`,
15548
14405
  }, "aria-valuenow": status.usePercent ? status.percentProgress : status.numComplete, "aria-valuemin": 0, "aria-valuemax": status.usePercent ? 100 : status.total },
15549
14406
  React__default["default"].createElement("div", { className: `ProgressBar-bar bg-${variant} text-start position-relative`, style: {
15550
- width: `${progressBarWidthPercent}%`,
14407
+ width: `${(status.usePercent ? status.percentProgress : (status.numComplete / status.total) * 100)}%`,
15551
14408
  overflow: 'hidden',
15552
14409
  } },
15553
- stripes,
14410
+ striped && stripes,
15554
14411
  "\u00A0"))));
15555
14412
  };
15556
14413
 
15557
- /**
15558
- * One minute in ms
15559
- * @author Gabe Abrams
15560
- */
15561
- const MINUTE_IN_MS = 60000;
15562
-
15563
- /**
15564
- * One hour in ms
15565
- * @author Gabe Abrams
15566
- */
15567
- const HOUR_IN_MS = 3600000;
15568
-
15569
- /**
15570
- * One day in ms
15571
- * @author Gabe Abrams
15572
- */
15573
- const DAY_IN_MS = 86400000;
15574
-
15575
- /**
15576
- * Path of the route for storing client-side logs
15577
- * @author Gabe Abrams
15578
- */
15579
- const LOG_REVIEW_ROUTE_PATH_PREFIX = `/admin${ROUTE_PATH_PREFIX}/logs`;
15580
-
15581
- /**
15582
- * Route for checking the status of the current user's
15583
- * access to log review
15584
- * @author Gabe Abrams
15585
- */
15586
- const LOG_REVIEW_STATUS_ROUTE = `${ROUTE_PATH_PREFIX}/logs/access_allowed`;
15587
-
15588
- /**
15589
- * Route for checking if the current user is a select admin
15590
- * @author Gabe Abrams
15591
- */
15592
- const SELECT_ADMIN_CHECK_ROUTE = '/api/admin/select/is-select-admin';
15593
-
15594
14414
  // True if user is on mobile or tablet
15595
- let cachedResult = undefined;
14415
+ let cachedResult;
15596
14416
  /**
15597
14417
  * Check if the user is on a mobile device or tablet
15598
14418
  * from https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser
@@ -15605,6 +14425,7 @@ const isMobileOrTablet = () => {
15605
14425
  }
15606
14426
  try {
15607
14427
  let check = false;
14428
+ // eslint-disable-next-line max-len, no-useless-escape
15608
14429
  ((a) => { if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)))
15609
14430
  check = true; })((navigator !== null && navigator !== void 0 ? navigator : {}).userAgent || (navigator !== null && navigator !== void 0 ? navigator : {}).vendor || ((_a = window) !== null && _a !== void 0 ? _a : {}).opera);
15610
14431
  cachedResult = check;
@@ -15646,93 +14467,7 @@ const DynamicWord = {
15646
14467
  };
15647
14468
 
15648
14469
  /**
15649
- * Shorten text so it fits into a certain number of chars
15650
- * @author Gabe Abrams
15651
- * @param text the text to abbreviate
15652
- * @param maxChars the maximum number of chars to include
15653
- * @returns abbreviated text with length no greater than maxChars
15654
- * (including ellipses if applicable)
15655
- */
15656
- const abbreviate = (text, maxChars) => {
15657
- // Check if already short enough
15658
- if (text.trim().length < maxChars) {
15659
- return text.trim();
15660
- }
15661
- // Abbreviate
15662
- const shortenedText = (text
15663
- .trim()
15664
- .substring(0, maxChars - 3)
15665
- .trim());
15666
- return `${shortenedText}...`;
15667
- };
15668
-
15669
- /**
15670
- * Sum the numbers in an array
15671
- * @author Gabe Abrams
15672
- * @param nums the numbers to sum
15673
- * @returns the sum of the numbers
15674
- */
15675
- const sum = (nums) => {
15676
- return nums.reduce((a, b) => {
15677
- return (a + b);
15678
- }, 0);
15679
- };
15680
-
15681
- /**
15682
- * Get the average of a set of numbers
15683
- * @author Gabe Abrams
15684
- * @param nums the numbers to average
15685
- * @returns average value or 0 if no numbers
15686
- */
15687
- const avg = (nums) => {
15688
- // Handle empty array case
15689
- if (nums.length === 0) {
15690
- return 0;
15691
- }
15692
- // Get the total value
15693
- const total = sum(nums);
15694
- // Get average
15695
- return (total / nums.length);
15696
- };
15697
-
15698
- /**
15699
- * Round a number (ceiling) to a certain number of decimals
15700
- * @author Gabe Abrams
15701
- * @param num the number to round
15702
- * @param numDecimals the number of decimals to round to
15703
- * @returns rounded number
15704
- */
15705
- const ceilToNumDecimals = (num, numDecimals) => {
15706
- const rounder = 10 ** numDecimals;
15707
- return (Math.ceil(num * rounder) / rounder);
15708
- };
15709
-
15710
- /**
15711
- * Round a number (floor) to a certain number of decimals
15712
- * @author Gabe Abrams
15713
- * @param num the number to round
15714
- * @param numDecimals the number of decimals to round to
15715
- * @returns rounded number
15716
- */
15717
- const floorToNumDecimals = (num, numDecimals) => {
15718
- const rounder = 10 ** numDecimals;
15719
- return (Math.floor(num * rounder) / rounder);
15720
- };
15721
-
15722
- /**
15723
- * Force a number to stay within specific bounds
15724
- * @author Gabe Abrams
15725
- * @param num the number to move into the bounds
15726
- * @param min the minimum number in the bound
15727
- * @param max the maximum number in the bound
15728
- * @returns bounded number
15729
- */
15730
- const forceNumIntoBounds = (num, min, max) => {
15731
- return Math.max(min, Math.min(max, num));
15732
- };
15733
-
15734
- /**
15735
- * Stub a server endpoint response
14470
+ * Stub a server endpoint response
15736
14471
  * @author Gabe Abrams
15737
14472
  * @param opts object containing all arguments
15738
14473
  * @param [opts.method=GET] http method to stub
@@ -15743,159 +14478,6 @@ const forceNumIntoBounds = (num, min, max) => {
15743
14478
  */
15744
14479
  const stubServerEndpoint = _setStubResponse;
15745
14480
 
15746
- /**
15747
- * Start a dynamic wait, call the function once the operation has completed and
15748
- * the dynamic wait will continue waiting for the rest of the minimum time
15749
- * @author Gabe Abrams
15750
- * @param minWaitMs the minimum number of ms to wait
15751
- * @returns async function to call to finish the wait
15752
- */
15753
- const startMinWait = (minWaitMs) => {
15754
- const startTimestamp = Date.now();
15755
- /**
15756
- * Finish the remaining time to wait
15757
- * @author Gabe Abrams
15758
- */
15759
- return () => __awaiter(void 0, void 0, void 0, function* () {
15760
- const endTimestamp = Date.now();
15761
- // Calculate remaining time to wait
15762
- const elapsedTimeMs = (endTimestamp - startTimestamp);
15763
- const remainingTimeToWaitMs = minWaitMs - elapsedTimeMs;
15764
- if (remainingTimeToWaitMs <= 0) {
15765
- return;
15766
- }
15767
- // Perform wait
15768
- yield waitMs(remainingTimeToWaitMs);
15769
- });
15770
- };
15771
-
15772
- /**
15773
- * Get the current part of day (morning, evening, etc.)
15774
- * @author Gabe Abrams
15775
- * @returns the part of day (morning, evening, etc.)
15776
- */
15777
- const getPartOfDay = () => {
15778
- // Setup the post-it time of day
15779
- let partOfDay = 'day';
15780
- const hours = new Date().getHours();
15781
- if (hours < 12) {
15782
- partOfDay = 'morning';
15783
- }
15784
- else if (hours >= 12 && hours <= 16) {
15785
- partOfDay = 'afternoon';
15786
- }
15787
- else if (hours > 16 && hours <= 24) {
15788
- partOfDay = 'evening';
15789
- }
15790
- return partOfDay;
15791
- };
15792
-
15793
- /**
15794
- * Create a human readable list from an array of strings.
15795
- * For example, ['apple', 'orange'] becomes "apple and orange"
15796
- * and ['apple', 'orange', 'mango'] becomes "apple, orange, and mango"
15797
- * @author Gabe Abrams
15798
- * @param items list of items in the list
15799
- * @returns human-readable list
15800
- */
15801
- const stringsToHumanReadableList = (items) => {
15802
- // Handle 0-item case
15803
- if (items.length === 0) {
15804
- return '';
15805
- }
15806
- // Handle 1-item case
15807
- if (items.length === 1) {
15808
- return items[0];
15809
- }
15810
- // Handle 2-item case
15811
- if (items.length === 2) {
15812
- return `${items[0]} and ${items[1]}`;
15813
- }
15814
- // Handle 3+ item case
15815
- let list = '';
15816
- items.forEach((item, i) => {
15817
- if (i === items.length - 1) {
15818
- // Last item
15819
- list += `, and ${item}`;
15820
- }
15821
- // Previous items
15822
- list += `, ${item}`;
15823
- });
15824
- return list;
15825
- };
15826
-
15827
- /**
15828
- * Given a string, only keep the letters inside it
15829
- * @author Gabe Abrams
15830
- * @param str the string to parse
15831
- * @returns only the letters inside of the string
15832
- */
15833
- const onlyKeepLetters = (str) => {
15834
- return str.replace(/[^a-zA-Z]+/g, '');
15835
- };
15836
-
15837
- /**
15838
- * Run tasks in parallel with a limit on how many tasks can execute at once.
15839
- * No guarantees are made about the order of task execution
15840
- * @author Gabe Abrams
15841
- * @param taskFunctions functions that start asynchronous tasks and optionally
15842
- * resolve with values
15843
- * @param [limit=no limit] maximum number of asynchronous tasks to permit to run at
15844
- * once
15845
- * @returns array of resolved values in the same order as the task functions
15846
- */
15847
- const parallelLimit = (taskFunctions, limit) => __awaiter(void 0, void 0, void 0, function* () {
15848
- const results = [];
15849
- let exited = false;
15850
- // Wait until finished with all tasks
15851
- yield new Promise((resolve, reject) => {
15852
- /* ------------- Helpers ------------ */
15853
- let nextTaskIndex = 0;
15854
- let numFinishedTasks = 0;
15855
- /**
15856
- * Start the next task
15857
- * @author Gabe Abrams
15858
- */
15859
- const startTask = () => __awaiter(void 0, void 0, void 0, function* () {
15860
- const taskIndex = nextTaskIndex++;
15861
- // Get the task
15862
- const taskFunction = taskFunctions[taskIndex];
15863
- if (!taskFunction) {
15864
- return;
15865
- }
15866
- try {
15867
- // Execute task
15868
- const result = yield taskFunction();
15869
- // Add results
15870
- results[taskIndex] = result;
15871
- // Tally and finish
15872
- if (++numFinishedTasks === taskFunctions.length) {
15873
- exited = true;
15874
- return resolve();
15875
- }
15876
- if (!exited) {
15877
- // Not finished! Start another task
15878
- startTask();
15879
- }
15880
- }
15881
- catch (err) {
15882
- // Reject only once
15883
- if (!exited) {
15884
- exited = true;
15885
- return reject(err);
15886
- }
15887
- }
15888
- });
15889
- /* ----------- Start Tasks ---------- */
15890
- // If no limit, start all tasks. At least start 1 task
15891
- const numTasks = Math.max((limit || taskFunctions.length), 1);
15892
- for (let i = 0; i < numTasks; i++) {
15893
- startTask();
15894
- }
15895
- });
15896
- return results;
15897
- });
15898
-
15899
14481
  /*------------------------------------------------------------------------*/
15900
14482
  /* -------------------------------- Cache ------------------------------- */
15901
14483
  /*------------------------------------------------------------------------*/
@@ -15917,7 +14499,7 @@ const canReviewLogs = () => __awaiter(void 0, void 0, void 0, function* () {
15917
14499
  // Ask on server
15918
14500
  try {
15919
14501
  canReview = !!(yield visitServerEndpoint({
15920
- path: LOG_REVIEW_STATUS_ROUTE,
14502
+ path: dceCommonkit.LOG_REVIEW_STATUS_ROUTE,
15921
14503
  method: 'GET',
15922
14504
  }));
15923
14505
  }
@@ -15927,355 +14509,6 @@ const canReviewLogs = () => __awaiter(void 0, void 0, void 0, function* () {
15927
14509
  return canReview;
15928
14510
  });
15929
14511
 
15930
- /**
15931
- * For every element in an array, extract the value of a prop
15932
- * (e.g. for all user objects, extract their ages and put that into a new
15933
- * ages array)
15934
- * @author Gabe Abrams
15935
- * @param arr the array of objects to operate on
15936
- * @param prop the property to extract from each object
15937
- * @returns new array containing the corresponding values, in order, of each
15938
- * object in the original array
15939
- */
15940
- const extractProp = (arr, prop) => {
15941
- return arr.map((item) => {
15942
- return item[prop];
15943
- });
15944
- };
15945
-
15946
- /**
15947
- * Compare two arrays of objects by only comparing the values in a specific
15948
- * property (e.g. compare user arrays by comparing their user.id values)
15949
- * @author Gabe Abrams
15950
- * @param a the first array
15951
- * @param b the second array
15952
- * @param prop the property to compare with, or an array of props to compare
15953
- * with (if array, all values associated with those props must match)
15954
- * @returns true if the arrays contain the same objects as determined by
15955
- * the values associated with each object's prop
15956
- */
15957
- const compareArraysByProp = (a, b, prop) => {
15958
- // Immediately return if size of arrays is different
15959
- if (a.length !== b.length) {
15960
- return false;
15961
- }
15962
- // Get all props
15963
- const props = (Array.isArray(prop) ? prop : [prop]);
15964
- // Clone second array so we can work on it
15965
- const bCloned = [...b];
15966
- // Remove elements from b as we find them in a
15967
- for (let i = 0; i < a.length; i++) {
15968
- // Find matching element in b
15969
- const matchingIndex = bCloned.findIndex((bItem) => {
15970
- // Compare based on all props
15971
- return props.every((propToCompareBy) => {
15972
- var _a;
15973
- const aVal = ((_a = a[i]) !== null && _a !== void 0 ? _a : {})[propToCompareBy];
15974
- const bVal = (bItem !== null && bItem !== void 0 ? bItem : {})[propToCompareBy];
15975
- return aVal === bVal;
15976
- });
15977
- });
15978
- // Check if no match
15979
- const noMatch = (matchingIndex < 0);
15980
- // If no match, there's no corresponding element in b
15981
- if (noMatch) {
15982
- return false;
15983
- }
15984
- // Remove the matching element
15985
- bCloned.splice(matchingIndex, 1);
15986
- }
15987
- // If we made it here, all elements in a have a corresponding element in b
15988
- return true;
15989
- };
15990
-
15991
- /**
15992
- * Get current time info in local time
15993
- * @author Gabe Abrams
15994
- * @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
15995
- * @returns object with timestamp (ms since epoch) and numbers
15996
- * corresponding to time values for year, month, day, hour, hour12, minute, isPM
15997
- * where hour is in 24hr time and hour12 is in 12hr time.
15998
- */
15999
- const getLocalTimeInfo = (dateOrTimestamp) => {
16000
- // Create a time string
16001
- let d;
16002
- if (!dateOrTimestamp) {
16003
- // Use now
16004
- d = new Date();
16005
- }
16006
- else if (typeof dateOrTimestamp === 'number') {
16007
- // Convert to date
16008
- d = new Date(dateOrTimestamp);
16009
- }
16010
- else {
16011
- // Already a date
16012
- d = dateOrTimestamp;
16013
- }
16014
- // Create all time numbers
16015
- const timestamp = d.getTime();
16016
- const year = d.getFullYear();
16017
- const month = d.getMonth() + 1;
16018
- const day = d.getDate();
16019
- const hour = d.getHours();
16020
- const isPM = hour >= 12;
16021
- let hour12 = hour % 12;
16022
- if (hour12 === 0) {
16023
- hour12 = 12;
16024
- }
16025
- const minute = d.getMinutes();
16026
- // Return
16027
- return {
16028
- timestamp,
16029
- year,
16030
- month,
16031
- day,
16032
- hour,
16033
- hour12,
16034
- isPM,
16035
- minute,
16036
- };
16037
- };
16038
-
16039
- /**
16040
- * Given an array of strings, create a single comma-separated string that includes
16041
- * 'and' as well as an oxford comma.
16042
- * Ex: ['apples'] => 'apples'
16043
- * Ex: ['apples', 'bananas'] => 'apples and bananas'
16044
- * Ex: ['apples', 'bananas', 'grapes'] => 'apples, bananas, and grapes'
16045
- * @author Austen Money
16046
- * @param list an array of elements to be made into a single comma-separated string.
16047
- * @returns a comma-separated string.
16048
- */
16049
- const genCommaList = (list) => {
16050
- const { length } = list;
16051
- return (length < 2
16052
- ? list.join('')
16053
- : `${list.slice(0, length - 1).join(', ')}${length < 3 ? ' and ' : ', and '}${list[length - 1]}`);
16054
- };
16055
-
16056
- /*------------------------------------------------------------------------*/
16057
- /* ------------------------------ Constants ----------------------------- */
16058
- /*------------------------------------------------------------------------*/
16059
- const INVALID_REGEX_ERROR = 'input does not follow the requested format';
16060
- const INVALID_EMAIL_ERROR = 'Please provide a valid email address.';
16061
- const INVALID_PHONE_ERROR = 'Please provide a valid phone number.';
16062
- const INVALID_STRING_ERRORS = {
16063
- MIN_LEN: (minLen) => {
16064
- return `input must not be under ${minLen} character(s)`;
16065
- },
16066
- MAX_LEN: (maxLen) => {
16067
- return `input must not be over ${maxLen} character(s)`;
16068
- },
16069
- LETTERS_ONLY: 'input must only contain letters',
16070
- NUMBERS_ONLY: 'input must only contain numbers',
16071
- MESSAGE_INTRO: 'The following error(s) occurred: ',
16072
- };
16073
-
16074
- // Import constants
16075
- /**
16076
- * Determines whether a given input string is considered valid based on
16077
- * the provided regex.
16078
- * @author Austen Money
16079
- * @param opts object containing all args
16080
- * @param opts.input user-provided input to validate
16081
- * @param opts.regex regular expression to check against input
16082
- * @param [opts.regexDescription] description of what regexString is checking
16083
- * for, used to customize error message
16084
- * @returns the unchanged input if valid, or a customized error message if
16085
- * invalid
16086
- */
16087
- const validateRegex = (opts) => {
16088
- // customize error message in case of invalid input
16089
- const errorMessage = `${INVALID_REGEX_ERROR}${opts.regexDescription
16090
- ? ': '
16091
- : ''}${opts.regexDescription}`;
16092
- // return error message if test is invalid, or input string if valid
16093
- return (opts.regex.test(opts.input)
16094
- ? {
16095
- isValid: true,
16096
- cleanedValue: opts.input,
16097
- }
16098
- : {
16099
- isValid: false,
16100
- errorMessage,
16101
- });
16102
- };
16103
-
16104
- // Import helpers
16105
- /**
16106
- * Determines whether a given email address is valid.
16107
- * @author Austen Money
16108
- * @param email email address to validate
16109
- * @returns whether email fulfills proper formatting requirements, includes a
16110
- * cleaned version of the address without leading or trailing
16111
- * whitespace if valid or an error message if invalid.
16112
- */
16113
- const validateEmail = (email) => {
16114
- // validation regex, sourced from HTML living standard: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)
16115
- // eslint-disable-next-line max-len
16116
- const emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
16117
- // remove leading and trailing whitespace
16118
- const cleanedValue = email.replace(/^\s+|\s+$/g, '');
16119
- // validate email with regex, and return error if not valid
16120
- return (validateRegex({
16121
- input: cleanedValue,
16122
- regex: emailRegex,
16123
- }).isValid
16124
- ? {
16125
- isValid: true,
16126
- cleanedValue,
16127
- }
16128
- : {
16129
- isValid: false,
16130
- errorMessage: INVALID_EMAIL_ERROR,
16131
- });
16132
- };
16133
-
16134
- // Import helpers
16135
- /**
16136
- * Determines whether a given phone number is valid.
16137
- * @author Austen Money
16138
- * @param phoneNumber phone number to validate
16139
- * @returns whether phone number is considered valid - if valid, also returns
16140
- * a cleaned version of the number without any formatting. If invalid,
16141
- * returns an error message.
16142
- */
16143
- const validatePhoneNumber = (phoneNumber) => {
16144
- // regex to validate phone number
16145
- const validationRegex = /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/;
16146
- // validate phone number with regex
16147
- const validationResponse = validateRegex({
16148
- input: phoneNumber,
16149
- regex: validationRegex,
16150
- });
16151
- // remove all non-digits from number
16152
- const cleanedValue = phoneNumber.replace(/\D/g, '');
16153
- // return cleaned value if valid, or error message if invalid
16154
- return (validationResponse.isValid
16155
- ? {
16156
- isValid: true,
16157
- cleanedValue,
16158
- }
16159
- : {
16160
- isValid: false,
16161
- errorMessage: INVALID_PHONE_ERROR,
16162
- });
16163
- };
16164
-
16165
- // Import helpers
16166
- /*------------------------------------------------------------------------*/
16167
- /* ------------------------------ Constants ----------------------------- */
16168
- /*------------------------------------------------------------------------*/
16169
- // define minimum and maximum range for lowercase ASCII chars
16170
- const LOWERCASE_MIN = 65;
16171
- const LOWERCASE_MAX = 90;
16172
- // define minimum and maximum range for uppercase ASCII chars
16173
- const UPPERCASE_MIN = 97;
16174
- const UPPERCASE_MAX = 122;
16175
- // define minimum and maximum range for ASCII digits
16176
- const DIGIT_MIN = 48;
16177
- const DIGIT_MAX = 57;
16178
- /*------------------------------------------------------------------------*/
16179
- /* ---------------------------- Main Function --------------------------- */
16180
- /*------------------------------------------------------------------------*/
16181
- /**
16182
- * Determines whether a given input string is considered valid based on
16183
- * the provided requirements.
16184
- * @author Austen Money
16185
- * @param input input string
16186
- * @param opts options for validation
16187
- * @returns whether input is considered valid according to reqs - if
16188
- * valid, returns a cleaned version of input; if invalid, returns
16189
- * a string containing error messages describing which requirements
16190
- * were not met.
16191
- */
16192
- const validateString = (input, opts) => {
16193
- // stores all invalid input errors
16194
- const errorMessages = [];
16195
- // contains version of input that will be returned
16196
- let cleanedValue = input;
16197
- // remove whitespace if required
16198
- if (opts.ignoreWhitespace) {
16199
- cleanedValue = input.replace(/\s+/g, '');
16200
- }
16201
- // apply max char requirement
16202
- if (opts.minLen) {
16203
- if (cleanedValue.length < opts.minLen) {
16204
- errorMessages.push(INVALID_STRING_ERRORS.MIN_LEN(opts.minLen));
16205
- }
16206
- }
16207
- // apply max char requirement
16208
- if (opts.maxLen) {
16209
- if (cleanedValue.length > opts.maxLen) {
16210
- errorMessages.push(INVALID_STRING_ERRORS.MAX_LEN(opts.maxLen));
16211
- }
16212
- }
16213
- // apply alphabetical requirement
16214
- if (opts.lettersOnly) {
16215
- // remove diacritics
16216
- cleanedValue = cleanedValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
16217
- const containsNonLetters = (cleanedValue
16218
- // split into characters
16219
- .split('')
16220
- // convert into character codes
16221
- .map((curr) => {
16222
- return curr.charCodeAt(0);
16223
- })
16224
- // check for non-letters
16225
- .some((currCode) => {
16226
- return (!(currCode >= LOWERCASE_MIN && currCode <= LOWERCASE_MAX)
16227
- && !(currCode >= UPPERCASE_MIN && currCode <= UPPERCASE_MAX));
16228
- }));
16229
- if (containsNonLetters) {
16230
- errorMessages.push(INVALID_STRING_ERRORS.LETTERS_ONLY);
16231
- }
16232
- }
16233
- // apply numerical requirement
16234
- if (opts.numbersOnly) {
16235
- const containsNonNumbers = (cleanedValue
16236
- // split into characters
16237
- .split('')
16238
- // convert into character codes
16239
- .map((curr) => {
16240
- return curr.charCodeAt(0);
16241
- })
16242
- // check for non-numbers
16243
- .some((currCode) => {
16244
- return (!(currCode >= DIGIT_MIN && currCode <= DIGIT_MAX));
16245
- }));
16246
- if (containsNonNumbers) {
16247
- errorMessages.push(INVALID_STRING_ERRORS.NUMBERS_ONLY);
16248
- }
16249
- }
16250
- // apply regex requirement
16251
- if (opts.regexTest) {
16252
- const regex = opts.regexTest;
16253
- // validate and create customized error message if description is provided
16254
- const result = validateRegex({
16255
- input: cleanedValue,
16256
- regex,
16257
- regexDescription: opts.regexDescription,
16258
- });
16259
- // if string did not pass regex validation, add error message
16260
- if (result.isValid === false) {
16261
- errorMessages.push(result.errorMessage);
16262
- }
16263
- }
16264
- // combine all error messages into one string to return
16265
- const errorMessage = `${INVALID_STRING_ERRORS.MESSAGE_INTRO}${genCommaList(errorMessages)}.`;
16266
- return (
16267
- // if no error messages, string is valid; if not, it is invalid
16268
- errorMessages.length === 0
16269
- ? {
16270
- isValid: true,
16271
- cleanedValue,
16272
- }
16273
- : {
16274
- isValid: false,
16275
- errorMessage,
16276
- });
16277
- };
16278
-
16279
14512
  // Import React
16280
14513
  // Regular express that matches urls
16281
14514
  const urlRegex = /(https?:\/\/)?([a-z0-9-]+\.)+[a-z0-9]{2,6}(:[0-9]{1,5})?(\/\S*)?/g;
@@ -16335,30 +14568,6 @@ const makeLinksClickable = (text, opts) => {
16335
14568
  return elements;
16336
14569
  };
16337
14570
 
16338
- // Constants
16339
- const VOWELS = ['a', 'e', 'i', 'o', 'u'];
16340
- /**
16341
- * Prefix a word or name with "a" or "an" depending on whether it starts with a
16342
- * vowel or not
16343
- * @author Gabe Abrams
16344
- * @param text the text to prefix
16345
- * @param capitalize whether to capitalize the "A" or "An"
16346
- * @returns the text prefixed with "a" or "an"
16347
- */
16348
- const prefixWithAOrAn = (text, capitalize = false) => {
16349
- // Get the first letter
16350
- const firstLetter = text.charAt(0).toLowerCase();
16351
- // Check if starts with vowel
16352
- const startsWithVowel = VOWELS.includes(firstLetter);
16353
- // Determine prefix
16354
- let prefix = startsWithVowel ? 'an' : 'a';
16355
- if (capitalize) {
16356
- prefix = prefix.charAt(0).toUpperCase() + prefix.substring(1);
16357
- }
16358
- // Return the text prefixed with "a" or "an"
16359
- return `${prefix} ${text}`;
16360
- };
16361
-
16362
14571
  /* -------- State Definition -------- */
16363
14572
  /* ------------- Reducer ------------ */
16364
14573
  /**
@@ -16393,336 +14602,6 @@ const useForceRender = (useReducer) => {
16393
14602
  };
16394
14603
  };
16395
14604
 
16396
- /**
16397
- * Run the operator function on each item in the array, returning true if
16398
- * the operator function returns true for every item in the array
16399
- * @author Gabe Abrams
16400
- * @param operatorFunction the operator function to apply. If it returns true
16401
- * for every item, this function will return true
16402
- * @returns true if the operator function returns true for every item in the array
16403
- */
16404
- const everyAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16405
- // Create break logic
16406
- let done = false;
16407
- /**
16408
- * Break the loop (checking stops here)
16409
- * @author Gabe Abrams
16410
- */
16411
- const breakNow = () => {
16412
- done = true;
16413
- };
16414
- // Loop through each item, checking
16415
- for (let i = 0; i < array.length && !done; i++) {
16416
- const passed = yield operatorFunction(array[i], i, {
16417
- breakNow,
16418
- array,
16419
- });
16420
- // Check if this one failed or if loop was broken
16421
- if (!passed || done) {
16422
- return false;
16423
- }
16424
- }
16425
- // Return true because none returned false
16426
- return true;
16427
- });
16428
-
16429
- /**
16430
- * Run the operator function on each item in the array, returning a new array
16431
- * that only contains the items that pass the filter
16432
- * @author Gabe Abrams
16433
- * @param operatorFunction the operator function to apply. If it returns true
16434
- * for an item, the item will be included in the returned array
16435
- * @returns the filtered array
16436
- */
16437
- const filterAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16438
- // Create break logic
16439
- let done = false;
16440
- /**
16441
- * Break the loop (filtering stops here)
16442
- * @author Gabe Abrams
16443
- */
16444
- const breakNow = () => {
16445
- done = true;
16446
- };
16447
- // Loop through each item, filtering
16448
- const output = [];
16449
- for (let i = 0; i < array.length && !done; i++) {
16450
- const included = yield operatorFunction(array[i], i, {
16451
- breakNow,
16452
- array,
16453
- });
16454
- if (included && !done) {
16455
- output.push(array[i]);
16456
- }
16457
- }
16458
- // Return results
16459
- return output;
16460
- });
16461
-
16462
- /**
16463
- * Run the operator function on each item in the array
16464
- * @author Gabe Abrams
16465
- * @param operatorFunction the operator function to apply
16466
- */
16467
- const forEachAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16468
- // Create break logic
16469
- let done = false;
16470
- /**
16471
- * Break the loop
16472
- * @author Gabe Abrams
16473
- */
16474
- const breakNow = () => {
16475
- done = true;
16476
- };
16477
- // Loop through each item
16478
- for (let i = 0; i < array.length && !done; i++) {
16479
- yield operatorFunction(array[i], i, {
16480
- breakNow,
16481
- array,
16482
- });
16483
- }
16484
- });
16485
-
16486
- /**
16487
- * Run the operator function on each item in the array, collecting all results
16488
- * @author Gabe Abrams
16489
- * @param operatorFunction the operator function to apply
16490
- * @returns the array of results
16491
- */
16492
- const mapAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16493
- // Create break logic
16494
- let done = false;
16495
- /**
16496
- * Break the loop
16497
- * @author Gabe Abrams
16498
- */
16499
- const breakNow = () => {
16500
- done = true;
16501
- };
16502
- // Loop through each item, collecting results
16503
- const results = [];
16504
- for (let i = 0; i < array.length && !done; i++) {
16505
- const result = yield operatorFunction(array[i], i, {
16506
- breakNow,
16507
- array,
16508
- });
16509
- results.push(result);
16510
- }
16511
- // Return results
16512
- return results;
16513
- });
16514
-
16515
- /**
16516
- * Run the operator function on each item in the array, returning true if
16517
- * the operator function returns true for any item in the array
16518
- * @author Gabe Abrams
16519
- * @param operatorFunction the operator function to apply. If it returns true
16520
- * for any item, this function will return true
16521
- * @returns true if the operator function returns true for any item in the array
16522
- */
16523
- const someAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16524
- // Create break logic
16525
- let done = false;
16526
- /**
16527
- * Break the loop (checking stops here)
16528
- * @author Gabe Abrams
16529
- */
16530
- const breakNow = () => {
16531
- done = true;
16532
- };
16533
- // Loop through each item, checking
16534
- for (let i = 0; i < array.length && !done; i++) {
16535
- const passed = yield operatorFunction(array[i], i, {
16536
- breakNow,
16537
- array,
16538
- });
16539
- if (passed && !done) {
16540
- return true;
16541
- }
16542
- }
16543
- // Return false because none returned true
16544
- return false;
16545
- });
16546
-
16547
- /**
16548
- * Capitalize every word in a string (just the first letter)
16549
- * @param str string to capitalize
16550
- * @returns string with every word capitalized
16551
- */
16552
- const capitalize = (str) => {
16553
- return (str
16554
- // Split into words
16555
- .split(' ')
16556
- // Capitalize first letter of each word
16557
- .map((word) => {
16558
- return word.charAt(0).toUpperCase() + word.substring(1);
16559
- })
16560
- // Join back together
16561
- .join(' '));
16562
- };
16563
-
16564
- /**
16565
- * Shuffle a given array
16566
- * @author Austen Money
16567
- * @param arr the array to shuffle
16568
- * @returns the shuffled array
16569
- */
16570
- const shuffleArray = (arr) => {
16571
- const newArr = [...arr];
16572
- // Shuffle using Durstenfeld algorithm
16573
- for (let i = arr.length - 1; i > 0; i--) {
16574
- const j = Math.floor(Math.random() * (i + 1));
16575
- [newArr[i], newArr[j]] = [newArr[j], newArr[i]];
16576
- }
16577
- return newArr;
16578
- };
16579
-
16580
- const punctuationRegex = /[!@#$%^&*(),.?\/;:'"\-\[\]]/g;
16581
- /**
16582
- * Get number of words in string
16583
- * @author Gardenia Liu
16584
- * @author Allison Zhang
16585
- * @author Gabe Abrams
16586
- * @param text the string to check
16587
- * @returns number of words in the string
16588
- */
16589
- const getWordCount = (text) => {
16590
- const trimmedTextWithoutPunctuation = (text
16591
- // Remove leading and trailing whitespace
16592
- .trim()
16593
- // Remove punctuation
16594
- .replace(punctuationRegex, ''));
16595
- if (trimmedTextWithoutPunctuation.length === 0) {
16596
- return 0;
16597
- }
16598
- return trimmedTextWithoutPunctuation.split(/\s+/g).length;
16599
- };
16600
-
16601
- // Import shared types
16602
- /*----------------------------------------*/
16603
- /* --------------- Helpers -------------- */
16604
- /*----------------------------------------*/
16605
- /**
16606
- * Check if a timestamp is valid
16607
- * @author Gabe Abrams
16608
- * @author Gardenia Liu
16609
- * @param opts object containing all arguments
16610
- * @param opts.timestamp Timestamp in milliseconds since epoch
16611
- * @param opts.expectedYear Expected year
16612
- * @param opts.expectedMonth Expected month
16613
- * @param opts.expectedDay Expected day
16614
- * @param opts.expectedHour Expected hour
16615
- * @param opts.expectedMinute Expected minute
16616
- * @returns 1 if the timestamp needs to be increased, -1 if it needs to be decreased, 0 if it is valid
16617
- */
16618
- const checkTimestamp = (opts) => {
16619
- const { timestamp, expectedYear, expectedMonth, expectedDay, expectedHour, expectedMinute, } = opts;
16620
- const timeInfoInET = getTimeInfoInET(timestamp);
16621
- if (timeInfoInET.year < expectedYear) {
16622
- return 1;
16623
- }
16624
- if (timeInfoInET.year > expectedYear) {
16625
- return -1;
16626
- }
16627
- if (timeInfoInET.month < expectedMonth) {
16628
- return 1;
16629
- }
16630
- if (timeInfoInET.month > expectedMonth) {
16631
- return -1;
16632
- }
16633
- if (timeInfoInET.day < expectedDay) {
16634
- return 1;
16635
- }
16636
- if (timeInfoInET.day > expectedDay) {
16637
- return -1;
16638
- }
16639
- if (timeInfoInET.hour < expectedHour) {
16640
- return 1;
16641
- }
16642
- if (timeInfoInET.hour > expectedHour) {
16643
- return -1;
16644
- }
16645
- if (timeInfoInET.minute < expectedMinute) {
16646
- return 1;
16647
- }
16648
- if (timeInfoInET.minute > expectedMinute) {
16649
- return -1;
16650
- }
16651
- return 0;
16652
- };
16653
- /*----------------------------------------*/
16654
- /* ---------------- Main ---------------- */
16655
- /*----------------------------------------*/
16656
- /**
16657
- * Get a timestamp (ms since epoch) from time info (year, month, day, hour, minute, etc.) in Eastern Time (ET)
16658
- * @author Gardenia Liu
16659
- * @author Gabe Abrams
16660
- * @param opts object containing all arguments
16661
- * @param opts.year Year (e.g. 2023)
16662
- * @param opts.month Month (1-12)
16663
- * @param opts.day Day of the month (1-31)
16664
- * @param opts.hour Hour (0-23)
16665
- * @param opts.minute Minute (0-59)
16666
- * @returns Timestamp in milliseconds since epoch
16667
- */
16668
- const getTimestampFromTimeInfoInET = (opts) => {
16669
- // Destructure opts
16670
- const { year, month, day, hour, minute, } = opts;
16671
- // Determine if the date is in DST in Eastern Time
16672
- const tempDate = new Date(year, month - 1, day);
16673
- const janOffset = new Date(year, 0, 1).getTimezoneOffset();
16674
- const isDST = tempDate.getTimezoneOffset() < janOffset;
16675
- const etOffset = isDST ? '-04:00' : '-05:00';
16676
- // Format with leading zeroes
16677
- const mm = padZerosLeft(month, 2);
16678
- const dd = padZerosLeft(day, 2);
16679
- const hh = padZerosLeft(hour, 2);
16680
- const min = padZerosLeft(minute, 2);
16681
- // Build ET ISO string and convert to UTC timestamp
16682
- const etISOString = `${year}-${mm}-${dd}T${hh}:${min}:00${etOffset}`;
16683
- const baseTimestamp = (new Date(etISOString)).getTime();
16684
- let timestamp = baseTimestamp;
16685
- // Heat seek to get the right timestamp
16686
- const maxOffset = 24 * 60; // 24 hours in minutes
16687
- let currentOffset = 0; // minutes
16688
- const offsetIncrement = 15; // minutes
16689
- const offsetDirection = checkTimestamp({
16690
- timestamp,
16691
- expectedYear: year,
16692
- expectedMonth: month,
16693
- expectedDay: day,
16694
- expectedHour: hour,
16695
- expectedMinute: minute,
16696
- });
16697
- if (offsetDirection === 0) {
16698
- // Valid! Return the timestamp
16699
- return timestamp;
16700
- }
16701
- // Heat seek
16702
- while (Math.abs(currentOffset) < maxOffset) {
16703
- // Update offset
16704
- currentOffset += (offsetDirection * offsetIncrement);
16705
- // Update timestamp
16706
- const offsetMs = currentOffset * 60 * 1000;
16707
- timestamp = baseTimestamp + offsetMs;
16708
- // Check timestamp again
16709
- const newDirection = checkTimestamp({
16710
- timestamp,
16711
- expectedYear: year,
16712
- expectedMonth: month,
16713
- expectedDay: day,
16714
- expectedHour: hour,
16715
- expectedMinute: minute,
16716
- });
16717
- if (newDirection === 0) {
16718
- // Valid! Return the timestamp
16719
- return timestamp;
16720
- }
16721
- // Invalid. Keep looping.
16722
- }
16723
- throw new ErrorWithCode(`Timestamp mismatch: expected ${year}-${mm}-${dd} ${hh}:${min}, seeked to offset ${currentOffset} minutes but could not find a valid timestamp.`, ReactKitErrorCode$1.ETTimestampInvalid);
16724
- };
16725
-
16726
14605
  /*------------------------------------------------------------------------*/
16727
14606
  /* ------------------------------- Caching ------------------------------ */
16728
14607
  /*------------------------------------------------------------------------*/
@@ -16744,7 +14623,7 @@ const isSelectAdmin = () => __awaiter(void 0, void 0, void 0, function* () {
16744
14623
  // Check if the user is a select admin
16745
14624
  try {
16746
14625
  const userIsSelectAdmin = yield visitServerEndpoint({
16747
- path: SELECT_ADMIN_CHECK_ROUTE,
14626
+ path: dceCommonkit.SELECT_ADMIN_CHECK_ROUTE,
16748
14627
  method: 'GET',
16749
14628
  });
16750
14629
  // Cache the result
@@ -16759,127 +14638,279 @@ const isSelectAdmin = () => __awaiter(void 0, void 0, void 0, function* () {
16759
14638
  }
16760
14639
  });
16761
14640
 
16762
- /**
16763
- * Days of the week
16764
- * @author Gabe Abrams
16765
- */
16766
- var DayOfWeek;
16767
- (function (DayOfWeek) {
16768
- DayOfWeek["Monday"] = "m";
16769
- DayOfWeek["Tuesday"] = "t";
16770
- DayOfWeek["Wednesday"] = "w";
16771
- DayOfWeek["Thursday"] = "r";
16772
- DayOfWeek["Friday"] = "f";
16773
- DayOfWeek["Saturday"] = "s";
16774
- DayOfWeek["Sunday"] = "u";
16775
- })(DayOfWeek || (DayOfWeek = {}));
16776
- var DayOfWeek$1 = DayOfWeek;
16777
-
14641
+ Object.defineProperty(exports, 'CommonKitErrorCode', {
14642
+ enumerable: true,
14643
+ get: function () { return dceCommonkit.CommonKitErrorCode; }
14644
+ });
14645
+ Object.defineProperty(exports, 'DAY_IN_MS', {
14646
+ enumerable: true,
14647
+ get: function () { return dceCommonkit.DAY_IN_MS; }
14648
+ });
14649
+ Object.defineProperty(exports, 'DayOfWeek', {
14650
+ enumerable: true,
14651
+ get: function () { return dceCommonkit.DayOfWeek; }
14652
+ });
14653
+ Object.defineProperty(exports, 'ErrorWithCode', {
14654
+ enumerable: true,
14655
+ get: function () { return dceCommonkit.ErrorWithCode; }
14656
+ });
14657
+ Object.defineProperty(exports, 'HOUR_IN_MS', {
14658
+ enumerable: true,
14659
+ get: function () { return dceCommonkit.HOUR_IN_MS; }
14660
+ });
14661
+ Object.defineProperty(exports, 'LOG_REVIEW_GET_LOGS_ROUTE', {
14662
+ enumerable: true,
14663
+ get: function () { return dceCommonkit.LOG_REVIEW_GET_LOGS_ROUTE; }
14664
+ });
14665
+ Object.defineProperty(exports, 'LOG_REVIEW_ROUTE_PATH_PREFIX', {
14666
+ enumerable: true,
14667
+ get: function () { return dceCommonkit.LOG_REVIEW_ROUTE_PATH_PREFIX; }
14668
+ });
14669
+ Object.defineProperty(exports, 'LOG_REVIEW_STATUS_ROUTE', {
14670
+ enumerable: true,
14671
+ get: function () { return dceCommonkit.LOG_REVIEW_STATUS_ROUTE; }
14672
+ });
14673
+ Object.defineProperty(exports, 'LOG_ROUTE_PATH', {
14674
+ enumerable: true,
14675
+ get: function () { return dceCommonkit.LOG_ROUTE_PATH; }
14676
+ });
14677
+ Object.defineProperty(exports, 'LogAction', {
14678
+ enumerable: true,
14679
+ get: function () { return dceCommonkit.LogAction; }
14680
+ });
14681
+ Object.defineProperty(exports, 'LogBuiltInMetadata', {
14682
+ enumerable: true,
14683
+ get: function () { return dceCommonkit.LogBuiltInMetadata; }
14684
+ });
14685
+ Object.defineProperty(exports, 'LogLevel', {
14686
+ enumerable: true,
14687
+ get: function () { return dceCommonkit.LogLevel; }
14688
+ });
14689
+ Object.defineProperty(exports, 'LogSource', {
14690
+ enumerable: true,
14691
+ get: function () { return dceCommonkit.LogSource; }
14692
+ });
14693
+ Object.defineProperty(exports, 'LogType', {
14694
+ enumerable: true,
14695
+ get: function () { return dceCommonkit.LogType; }
14696
+ });
14697
+ Object.defineProperty(exports, 'MINUTE_IN_MS', {
14698
+ enumerable: true,
14699
+ get: function () { return dceCommonkit.MINUTE_IN_MS; }
14700
+ });
14701
+ Object.defineProperty(exports, 'ParamType', {
14702
+ enumerable: true,
14703
+ get: function () { return dceCommonkit.ParamType; }
14704
+ });
14705
+ Object.defineProperty(exports, 'SELECT_ADMIN_CHECK_ROUTE', {
14706
+ enumerable: true,
14707
+ get: function () { return dceCommonkit.SELECT_ADMIN_CHECK_ROUTE; }
14708
+ });
14709
+ Object.defineProperty(exports, 'abbreviate', {
14710
+ enumerable: true,
14711
+ get: function () { return dceCommonkit.abbreviate; }
14712
+ });
14713
+ Object.defineProperty(exports, 'avg', {
14714
+ enumerable: true,
14715
+ get: function () { return dceCommonkit.avg; }
14716
+ });
14717
+ Object.defineProperty(exports, 'capitalize', {
14718
+ enumerable: true,
14719
+ get: function () { return dceCommonkit.capitalize; }
14720
+ });
14721
+ Object.defineProperty(exports, 'ceilToNumDecimals', {
14722
+ enumerable: true,
14723
+ get: function () { return dceCommonkit.ceilToNumDecimals; }
14724
+ });
14725
+ Object.defineProperty(exports, 'cloneDeep', {
14726
+ enumerable: true,
14727
+ get: function () { return dceCommonkit.cloneDeep; }
14728
+ });
14729
+ Object.defineProperty(exports, 'compareArraysByProp', {
14730
+ enumerable: true,
14731
+ get: function () { return dceCommonkit.compareArraysByProp; }
14732
+ });
14733
+ Object.defineProperty(exports, 'everyAsync', {
14734
+ enumerable: true,
14735
+ get: function () { return dceCommonkit.everyAsync; }
14736
+ });
14737
+ Object.defineProperty(exports, 'extractProp', {
14738
+ enumerable: true,
14739
+ get: function () { return dceCommonkit.extractProp; }
14740
+ });
14741
+ Object.defineProperty(exports, 'filterAsync', {
14742
+ enumerable: true,
14743
+ get: function () { return dceCommonkit.filterAsync; }
14744
+ });
14745
+ Object.defineProperty(exports, 'floorToNumDecimals', {
14746
+ enumerable: true,
14747
+ get: function () { return dceCommonkit.floorToNumDecimals; }
14748
+ });
14749
+ Object.defineProperty(exports, 'forEachAsync', {
14750
+ enumerable: true,
14751
+ get: function () { return dceCommonkit.forEachAsync; }
14752
+ });
14753
+ Object.defineProperty(exports, 'forceNumIntoBounds', {
14754
+ enumerable: true,
14755
+ get: function () { return dceCommonkit.forceNumIntoBounds; }
14756
+ });
14757
+ Object.defineProperty(exports, 'genCSV', {
14758
+ enumerable: true,
14759
+ get: function () { return dceCommonkit.genCSV; }
14760
+ });
14761
+ Object.defineProperty(exports, 'genCommaList', {
14762
+ enumerable: true,
14763
+ get: function () { return dceCommonkit.genCommaList; }
14764
+ });
14765
+ Object.defineProperty(exports, 'getHumanReadableDate', {
14766
+ enumerable: true,
14767
+ get: function () { return dceCommonkit.getHumanReadableDate; }
14768
+ });
14769
+ Object.defineProperty(exports, 'getLocalTimeInfo', {
14770
+ enumerable: true,
14771
+ get: function () { return dceCommonkit.getLocalTimeInfo; }
14772
+ });
14773
+ Object.defineProperty(exports, 'getMonthName', {
14774
+ enumerable: true,
14775
+ get: function () { return dceCommonkit.getMonthName; }
14776
+ });
14777
+ Object.defineProperty(exports, 'getOrdinal', {
14778
+ enumerable: true,
14779
+ get: function () { return dceCommonkit.getOrdinal; }
14780
+ });
14781
+ Object.defineProperty(exports, 'getPartOfDay', {
14782
+ enumerable: true,
14783
+ get: function () { return dceCommonkit.getPartOfDay; }
14784
+ });
14785
+ Object.defineProperty(exports, 'getTimeInfoInET', {
14786
+ enumerable: true,
14787
+ get: function () { return dceCommonkit.getTimeInfoInET; }
14788
+ });
14789
+ Object.defineProperty(exports, 'getTimestampFromTimeInfoInET', {
14790
+ enumerable: true,
14791
+ get: function () { return dceCommonkit.getTimestampFromTimeInfoInET; }
14792
+ });
14793
+ Object.defineProperty(exports, 'getWordCount', {
14794
+ enumerable: true,
14795
+ get: function () { return dceCommonkit.getWordCount; }
14796
+ });
14797
+ Object.defineProperty(exports, 'idify', {
14798
+ enumerable: true,
14799
+ get: function () { return dceCommonkit.idify; }
14800
+ });
14801
+ Object.defineProperty(exports, 'mapAsync', {
14802
+ enumerable: true,
14803
+ get: function () { return dceCommonkit.mapAsync; }
14804
+ });
14805
+ Object.defineProperty(exports, 'onlyKeepLetters', {
14806
+ enumerable: true,
14807
+ get: function () { return dceCommonkit.onlyKeepLetters; }
14808
+ });
14809
+ Object.defineProperty(exports, 'padDecimalZeros', {
14810
+ enumerable: true,
14811
+ get: function () { return dceCommonkit.padDecimalZeros; }
14812
+ });
14813
+ Object.defineProperty(exports, 'padZerosLeft', {
14814
+ enumerable: true,
14815
+ get: function () { return dceCommonkit.padZerosLeft; }
14816
+ });
14817
+ Object.defineProperty(exports, 'parallelLimit', {
14818
+ enumerable: true,
14819
+ get: function () { return dceCommonkit.parallelLimit; }
14820
+ });
14821
+ Object.defineProperty(exports, 'prefixWithAOrAn', {
14822
+ enumerable: true,
14823
+ get: function () { return dceCommonkit.prefixWithAOrAn; }
14824
+ });
14825
+ Object.defineProperty(exports, 'roundToNumDecimals', {
14826
+ enumerable: true,
14827
+ get: function () { return dceCommonkit.roundToNumDecimals; }
14828
+ });
14829
+ Object.defineProperty(exports, 'shuffleArray', {
14830
+ enumerable: true,
14831
+ get: function () { return dceCommonkit.shuffleArray; }
14832
+ });
14833
+ Object.defineProperty(exports, 'someAsync', {
14834
+ enumerable: true,
14835
+ get: function () { return dceCommonkit.someAsync; }
14836
+ });
14837
+ Object.defineProperty(exports, 'startMinWait', {
14838
+ enumerable: true,
14839
+ get: function () { return dceCommonkit.startMinWait; }
14840
+ });
14841
+ Object.defineProperty(exports, 'stringsToHumanReadableList', {
14842
+ enumerable: true,
14843
+ get: function () { return dceCommonkit.stringsToHumanReadableList; }
14844
+ });
14845
+ Object.defineProperty(exports, 'sum', {
14846
+ enumerable: true,
14847
+ get: function () { return dceCommonkit.sum; }
14848
+ });
14849
+ Object.defineProperty(exports, 'validateEmail', {
14850
+ enumerable: true,
14851
+ get: function () { return dceCommonkit.validateEmail; }
14852
+ });
14853
+ Object.defineProperty(exports, 'validatePhoneNumber', {
14854
+ enumerable: true,
14855
+ get: function () { return dceCommonkit.validatePhoneNumber; }
14856
+ });
14857
+ Object.defineProperty(exports, 'validateString', {
14858
+ enumerable: true,
14859
+ get: function () { return dceCommonkit.validateString; }
14860
+ });
14861
+ Object.defineProperty(exports, 'waitMs', {
14862
+ enumerable: true,
14863
+ get: function () { return dceCommonkit.waitMs; }
14864
+ });
16778
14865
  exports.AppWrapper = AppWrapper;
16779
14866
  exports.AutoscrollToBottomContainer = AutoscrollToBottomContainer;
16780
14867
  exports.ButtonInputGroup = ButtonInputGroup;
16781
14868
  exports.CSVDownloadButton = CSVDownloadButton;
16782
14869
  exports.CheckboxButton = CheckboxButton;
16783
14870
  exports.CopiableBox = CopiableBox;
16784
- exports.DAY_IN_MS = DAY_IN_MS;
16785
14871
  exports.DBEntryFieldType = DBEntryFieldType$1;
16786
14872
  exports.DBEntryManagerPanel = DBEntryManagerPanel;
16787
- exports.DayOfWeek = DayOfWeek$1;
16788
14873
  exports.Drawer = Drawer;
16789
14874
  exports.Dropdown = Dropdown;
16790
14875
  exports.DropdownItemType = DropdownItemType$1;
16791
14876
  exports.DynamicWord = DynamicWord;
16792
14877
  exports.ErrorBox = ErrorBox;
16793
- exports.ErrorWithCode = ErrorWithCode;
16794
- exports.HOUR_IN_MS = HOUR_IN_MS;
16795
14878
  exports.IntelliTable = IntelliTable;
16796
14879
  exports.ItemPicker = ItemPicker;
16797
- exports.LOG_REVIEW_GET_LOGS_ROUTE = LOG_REVIEW_GET_LOGS_ROUTE;
16798
- exports.LOG_REVIEW_ROUTE_PATH_PREFIX = LOG_REVIEW_ROUTE_PATH_PREFIX;
16799
- exports.LOG_REVIEW_STATUS_ROUTE = LOG_REVIEW_STATUS_ROUTE;
16800
- exports.LOG_ROUTE_PATH = LOG_ROUTE_PATH;
16801
14880
  exports.LoadingSpinner = LoadingSpinner;
16802
- exports.LogAction = LogAction$1;
16803
- exports.LogBuiltInMetadata = LogBuiltInMetadata;
16804
- exports.LogLevel = LogLevel$1;
16805
14881
  exports.LogReviewer = LogReviewer;
16806
- exports.LogSource = LogSource$1;
16807
- exports.LogType = LogType$1;
16808
- exports.MINUTE_IN_MS = MINUTE_IN_MS;
16809
14882
  exports.Modal = Modal;
16810
14883
  exports.ModalButtonType = ModalButtonType$1;
16811
14884
  exports.ModalSize = ModalSize$1;
16812
14885
  exports.ModalType = ModalType$1;
16813
14886
  exports.MultiSwitch = MultiSwitch;
16814
- exports.ParamType = ParamType$1;
16815
14887
  exports.PopFailureMark = PopFailureMark;
16816
14888
  exports.PopPendingMark = PopPendingMark;
16817
14889
  exports.PopSuccessMark = PopSuccessMark;
16818
14890
  exports.ProgressBar = ProgressBar;
16819
14891
  exports.ProgressBarSize = ProgressBarSize$1;
16820
14892
  exports.RadioButton = RadioButton;
16821
- exports.ReactKitErrorCode = ReactKitErrorCode$1;
16822
- exports.SELECT_ADMIN_CHECK_ROUTE = SELECT_ADMIN_CHECK_ROUTE;
16823
14893
  exports.SimpleDateChooser = SimpleDateChooser;
16824
14894
  exports.SimpleTimeChooser = SimpleTimeChooser;
16825
14895
  exports.TabBox = TabBox;
16826
14896
  exports.ToggleSwitch = ToggleSwitch;
16827
14897
  exports.Tooltip = Tooltip;
16828
14898
  exports.Variant = Variant$1;
16829
- exports.abbreviate = abbreviate;
16830
14899
  exports.addFatalErrorHandler = addFatalErrorHandler;
16831
14900
  exports.alert = alert;
16832
- exports.avg = avg;
16833
14901
  exports.canReviewLogs = canReviewLogs;
16834
- exports.capitalize = capitalize;
16835
- exports.ceilToNumDecimals = ceilToNumDecimals;
16836
- exports.cloneDeep = cloneDeep;
16837
14902
  exports.combineClassNames = combineClassNames;
16838
- exports.compareArraysByProp = compareArraysByProp;
16839
14903
  exports.confirm = confirm;
16840
- exports.everyAsync = everyAsync;
16841
- exports.extractProp = extractProp;
16842
- exports.filterAsync = filterAsync;
16843
- exports.floorToNumDecimals = floorToNumDecimals;
16844
- exports.forEachAsync = forEachAsync;
16845
- exports.forceNumIntoBounds = forceNumIntoBounds;
16846
- exports.genCSV = genCSV;
16847
- exports.genCommaList = genCommaList;
16848
- exports.getHumanReadableDate = getHumanReadableDate;
16849
- exports.getLocalTimeInfo = getLocalTimeInfo;
16850
- exports.getMonthName = getMonthName;
16851
- exports.getOrdinal = getOrdinal;
16852
- exports.getPartOfDay = getPartOfDay;
16853
- exports.getTimeInfoInET = getTimeInfoInET;
16854
- exports.getTimestampFromTimeInfoInET = getTimestampFromTimeInfoInET;
16855
- exports.getWordCount = getWordCount;
16856
- exports.idify = idify;
16857
14904
  exports.initClient = initClient;
16858
14905
  exports.isMobileOrTablet = isMobileOrTablet;
16859
14906
  exports.isSelectAdmin = isSelectAdmin;
16860
14907
  exports.leaveToURL = leaveToURL;
16861
14908
  exports.logClientEvent = logClientEvent;
16862
14909
  exports.makeLinksClickable = makeLinksClickable;
16863
- exports.mapAsync = mapAsync;
16864
- exports.onlyKeepLetters = onlyKeepLetters;
16865
- exports.padDecimalZeros = padDecimalZeros;
16866
- exports.padZerosLeft = padZerosLeft;
16867
- exports.parallelLimit = parallelLimit;
16868
- exports.prefixWithAOrAn = prefixWithAOrAn;
16869
14910
  exports.prompt = prompt;
16870
- exports.roundToNumDecimals = roundToNumDecimals;
16871
14911
  exports.setClientEventMetadataPopulator = setClientEventMetadataPopulator;
16872
14912
  exports.showFatalError = showFatalError;
16873
- exports.shuffleArray = shuffleArray;
16874
- exports.someAsync = someAsync;
16875
- exports.startMinWait = startMinWait;
16876
- exports.stringsToHumanReadableList = stringsToHumanReadableList;
16877
14913
  exports.stubServerEndpoint = stubServerEndpoint;
16878
- exports.sum = sum;
16879
14914
  exports.useForceRender = useForceRender;
16880
- exports.validateEmail = validateEmail;
16881
- exports.validatePhoneNumber = validatePhoneNumber;
16882
- exports.validateString = validateString;
16883
14915
  exports.visitServerEndpoint = visitServerEndpoint;
16884
- exports.waitMs = waitMs;
16885
14916
  //# sourceMappingURL=index.js.map