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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/dist/cjs/index.js +390 -2390
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
  4. package/dist/cjs/types/helpers/logClientEvent.d.ts +1 -1
  5. package/dist/cjs/types/html/genErrorPage.d.ts +1 -1
  6. package/dist/cjs/types/index.d.ts +2 -64
  7. package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
  8. package/dist/cjs/types/types/ProgressBarSize.d.ts +0 -1
  9. package/dist/esm/index.js +130 -2297
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/types/components/LogReviewer.d.ts +1 -1
  12. package/dist/esm/types/helpers/logClientEvent.d.ts +1 -1
  13. package/dist/esm/types/html/genErrorPage.d.ts +1 -1
  14. package/dist/esm/types/index.d.ts +2 -64
  15. package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
  16. package/dist/esm/types/types/ProgressBarSize.d.ts +0 -1
  17. package/dist/index.d.ts +3 -836
  18. package/package.json +4 -3
  19. package/src/components/AppWrapper.tsx +12 -10
  20. package/src/components/AutoscrollToBottomContainer.tsx +5 -3
  21. package/src/components/CopiableBox.tsx +5 -1
  22. package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +2 -2
  23. package/src/components/ErrorBox.tsx +6 -2
  24. package/src/components/IntelliTable.tsx +7 -5
  25. package/src/components/LogReviewer.tsx +23 -21
  26. package/src/components/Modal/index.tsx +5 -3
  27. package/src/components/MultiSwitch.tsx +5 -1
  28. package/src/components/ProgressBar.tsx +66 -76
  29. package/src/components/Shimmer.tsx +4 -2
  30. package/src/components/SimpleDateChooser.tsx +11 -13
  31. package/src/components/SimpleTimeChooser.tsx +4 -2
  32. package/src/helpers/canReviewLogs.test.ts +5 -3
  33. package/src/helpers/canReviewLogs.ts +5 -3
  34. package/src/helpers/initClient.tsx +8 -8
  35. package/src/helpers/isMobileOrTablet.tsx +2 -1
  36. package/src/helpers/isSelectAdmin.ts +4 -2
  37. package/src/helpers/logClientEvent.tsx +7 -5
  38. package/src/helpers/stubServerEndpoint.tsx +1 -1
  39. package/src/helpers/visitServerEndpoint.tsx +10 -7
  40. package/src/html/genErrorPage.ts +6 -4
  41. package/src/index.ts +105 -98
  42. package/src/types/IntelliTableColumn.ts +4 -1
  43. package/src/types/ProgressBarSize.ts +0 -1
  44. package/dist/cjs/types/constants/DAY_IN_MS.d.ts +0 -6
  45. package/dist/cjs/types/constants/HOUR_IN_MS.d.ts +0 -6
  46. package/dist/cjs/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
  47. package/dist/cjs/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  48. package/dist/cjs/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
  49. package/dist/cjs/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
  50. package/dist/cjs/types/constants/MINUTE_IN_MS.d.ts +0 -6
  51. package/dist/cjs/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
  52. package/dist/cjs/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
  53. package/dist/cjs/types/errors/ErrorWithCode.d.ts +0 -9
  54. package/dist/cjs/types/helpers/abbreviate.d.ts +0 -10
  55. package/dist/cjs/types/helpers/abbreviate.test.d.ts +0 -5
  56. package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
  57. package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
  58. package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
  59. package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
  60. package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
  61. package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
  62. package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
  63. package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
  64. package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
  65. package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
  66. package/dist/cjs/types/helpers/avg.d.ts +0 -8
  67. package/dist/cjs/types/helpers/avg.test.d.ts +0 -5
  68. package/dist/cjs/types/helpers/capitalize.d.ts +0 -7
  69. package/dist/cjs/types/helpers/ceilToNumDecimals.d.ts +0 -9
  70. package/dist/cjs/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
  71. package/dist/cjs/types/helpers/cloneDeep.d.ts +0 -8
  72. package/dist/cjs/types/helpers/compareArraysByProp.d.ts +0 -13
  73. package/dist/cjs/types/helpers/compareArraysByProp.test.d.ts +0 -5
  74. package/dist/cjs/types/helpers/extractProp.d.ts +0 -12
  75. package/dist/cjs/types/helpers/extractProp.test.d.ts +0 -5
  76. package/dist/cjs/types/helpers/floorToNumDecimals.d.ts +0 -9
  77. package/dist/cjs/types/helpers/floorToNumDecimals.test.d.ts +0 -5
  78. package/dist/cjs/types/helpers/forceNumIntoBounds.d.ts +0 -10
  79. package/dist/cjs/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
  80. package/dist/cjs/types/helpers/genCSV.d.ts +0 -18
  81. package/dist/cjs/types/helpers/genCSV.test.d.ts +0 -5
  82. package/dist/cjs/types/helpers/genCommaList.d.ts +0 -12
  83. package/dist/cjs/types/helpers/genCommaList.test.d.ts +0 -1
  84. package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +0 -8
  85. package/dist/cjs/types/helpers/getHumanReadableDate.test.d.ts +0 -5
  86. package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +0 -19
  87. package/dist/cjs/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
  88. package/dist/cjs/types/helpers/getMonthName.d.ts +0 -14
  89. package/dist/cjs/types/helpers/getMonthName.test.d.ts +0 -5
  90. package/dist/cjs/types/helpers/getOrdinal.d.ts +0 -8
  91. package/dist/cjs/types/helpers/getOrdinal.test.d.ts +0 -5
  92. package/dist/cjs/types/helpers/getPartOfDay.d.ts +0 -7
  93. package/dist/cjs/types/helpers/getPartOfDay.test.d.ts +0 -5
  94. package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +0 -21
  95. package/dist/cjs/types/helpers/getTimeInfoInET.test.d.ts +0 -5
  96. package/dist/cjs/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
  97. package/dist/cjs/types/helpers/getWordCount.d.ts +0 -10
  98. package/dist/cjs/types/helpers/idify.d.ts +0 -9
  99. package/dist/cjs/types/helpers/onlyKeepLetters.d.ts +0 -8
  100. package/dist/cjs/types/helpers/padDecimalZeros.d.ts +0 -10
  101. package/dist/cjs/types/helpers/padZerosLeft.d.ts +0 -9
  102. package/dist/cjs/types/helpers/parallelLimit.d.ts +0 -12
  103. package/dist/cjs/types/helpers/prefixWithAOrAn.d.ts +0 -10
  104. package/dist/cjs/types/helpers/roundToNumDecimals.d.ts +0 -9
  105. package/dist/cjs/types/helpers/shuffleArray.d.ts +0 -8
  106. package/dist/cjs/types/helpers/startMinWait.d.ts +0 -9
  107. package/dist/cjs/types/helpers/stringsToHumanReadableList.d.ts +0 -10
  108. package/dist/cjs/types/helpers/sum.d.ts +0 -8
  109. package/dist/cjs/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
  110. package/dist/cjs/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
  111. package/dist/cjs/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
  112. package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
  113. package/dist/cjs/types/helpers/validators/validURL.d.ts +0 -8
  114. package/dist/cjs/types/helpers/validators/validateEmail.d.ts +0 -11
  115. package/dist/cjs/types/helpers/validators/validateEmail.test.d.ts +0 -1
  116. package/dist/cjs/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
  117. package/dist/cjs/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
  118. package/dist/cjs/types/helpers/validators/validateString.d.ts +0 -22
  119. package/dist/cjs/types/helpers/validators/validateString.test.d.ts +0 -1
  120. package/dist/cjs/types/helpers/waitMs.d.ts +0 -7
  121. package/dist/cjs/types/types/DayOfWeek.d.ts +0 -14
  122. package/dist/cjs/types/types/Log/LogMainInfo.d.ts +0 -39
  123. package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
  124. package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
  125. package/dist/cjs/types/types/Log/index.d.ts +0 -10
  126. package/dist/cjs/types/types/LogAction.d.ts +0 -29
  127. package/dist/cjs/types/types/LogBuiltInMetadata.d.ts +0 -16
  128. package/dist/cjs/types/types/LogFunction.d.ts +0 -24
  129. package/dist/cjs/types/types/LogLevel.d.ts +0 -10
  130. package/dist/cjs/types/types/LogMetadataContextMap.d.ts +0 -11
  131. package/dist/cjs/types/types/LogMetadataTagMap.d.ts +0 -8
  132. package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +0 -8
  133. package/dist/cjs/types/types/LogMetadataType.d.ts +0 -13
  134. package/dist/cjs/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
  135. package/dist/cjs/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
  136. package/dist/cjs/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
  137. package/dist/cjs/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
  138. package/dist/cjs/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
  139. package/dist/cjs/types/types/LogReviewerFilterState/index.d.ts +0 -17
  140. package/dist/cjs/types/types/LogSource.d.ts +0 -9
  141. package/dist/cjs/types/types/LogType.d.ts +0 -9
  142. package/dist/cjs/types/types/ParamType.d.ts +0 -17
  143. package/dist/cjs/types/types/ReactKitErrorCode.d.ts +0 -14
  144. package/dist/esm/types/constants/DAY_IN_MS.d.ts +0 -6
  145. package/dist/esm/types/constants/HOUR_IN_MS.d.ts +0 -6
  146. package/dist/esm/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
  147. package/dist/esm/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  148. package/dist/esm/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
  149. package/dist/esm/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
  150. package/dist/esm/types/constants/MINUTE_IN_MS.d.ts +0 -6
  151. package/dist/esm/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
  152. package/dist/esm/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
  153. package/dist/esm/types/errors/ErrorWithCode.d.ts +0 -9
  154. package/dist/esm/types/helpers/abbreviate.d.ts +0 -10
  155. package/dist/esm/types/helpers/abbreviate.test.d.ts +0 -5
  156. package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
  157. package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
  158. package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
  159. package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
  160. package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
  161. package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
  162. package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
  163. package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
  164. package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
  165. package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
  166. package/dist/esm/types/helpers/avg.d.ts +0 -8
  167. package/dist/esm/types/helpers/avg.test.d.ts +0 -5
  168. package/dist/esm/types/helpers/capitalize.d.ts +0 -7
  169. package/dist/esm/types/helpers/ceilToNumDecimals.d.ts +0 -9
  170. package/dist/esm/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
  171. package/dist/esm/types/helpers/cloneDeep.d.ts +0 -8
  172. package/dist/esm/types/helpers/compareArraysByProp.d.ts +0 -13
  173. package/dist/esm/types/helpers/compareArraysByProp.test.d.ts +0 -5
  174. package/dist/esm/types/helpers/extractProp.d.ts +0 -12
  175. package/dist/esm/types/helpers/extractProp.test.d.ts +0 -5
  176. package/dist/esm/types/helpers/floorToNumDecimals.d.ts +0 -9
  177. package/dist/esm/types/helpers/floorToNumDecimals.test.d.ts +0 -5
  178. package/dist/esm/types/helpers/forceNumIntoBounds.d.ts +0 -10
  179. package/dist/esm/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
  180. package/dist/esm/types/helpers/genCSV.d.ts +0 -18
  181. package/dist/esm/types/helpers/genCSV.test.d.ts +0 -5
  182. package/dist/esm/types/helpers/genCommaList.d.ts +0 -12
  183. package/dist/esm/types/helpers/genCommaList.test.d.ts +0 -1
  184. package/dist/esm/types/helpers/getHumanReadableDate.d.ts +0 -8
  185. package/dist/esm/types/helpers/getHumanReadableDate.test.d.ts +0 -5
  186. package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +0 -19
  187. package/dist/esm/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
  188. package/dist/esm/types/helpers/getMonthName.d.ts +0 -14
  189. package/dist/esm/types/helpers/getMonthName.test.d.ts +0 -5
  190. package/dist/esm/types/helpers/getOrdinal.d.ts +0 -8
  191. package/dist/esm/types/helpers/getOrdinal.test.d.ts +0 -5
  192. package/dist/esm/types/helpers/getPartOfDay.d.ts +0 -7
  193. package/dist/esm/types/helpers/getPartOfDay.test.d.ts +0 -5
  194. package/dist/esm/types/helpers/getTimeInfoInET.d.ts +0 -21
  195. package/dist/esm/types/helpers/getTimeInfoInET.test.d.ts +0 -5
  196. package/dist/esm/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
  197. package/dist/esm/types/helpers/getWordCount.d.ts +0 -10
  198. package/dist/esm/types/helpers/idify.d.ts +0 -9
  199. package/dist/esm/types/helpers/onlyKeepLetters.d.ts +0 -8
  200. package/dist/esm/types/helpers/padDecimalZeros.d.ts +0 -10
  201. package/dist/esm/types/helpers/padZerosLeft.d.ts +0 -9
  202. package/dist/esm/types/helpers/parallelLimit.d.ts +0 -12
  203. package/dist/esm/types/helpers/prefixWithAOrAn.d.ts +0 -10
  204. package/dist/esm/types/helpers/roundToNumDecimals.d.ts +0 -9
  205. package/dist/esm/types/helpers/shuffleArray.d.ts +0 -8
  206. package/dist/esm/types/helpers/startMinWait.d.ts +0 -9
  207. package/dist/esm/types/helpers/stringsToHumanReadableList.d.ts +0 -10
  208. package/dist/esm/types/helpers/sum.d.ts +0 -8
  209. package/dist/esm/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
  210. package/dist/esm/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
  211. package/dist/esm/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
  212. package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
  213. package/dist/esm/types/helpers/validators/validURL.d.ts +0 -8
  214. package/dist/esm/types/helpers/validators/validateEmail.d.ts +0 -11
  215. package/dist/esm/types/helpers/validators/validateEmail.test.d.ts +0 -1
  216. package/dist/esm/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
  217. package/dist/esm/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
  218. package/dist/esm/types/helpers/validators/validateString.d.ts +0 -22
  219. package/dist/esm/types/helpers/validators/validateString.test.d.ts +0 -1
  220. package/dist/esm/types/helpers/waitMs.d.ts +0 -7
  221. package/dist/esm/types/types/DayOfWeek.d.ts +0 -14
  222. package/dist/esm/types/types/Log/LogMainInfo.d.ts +0 -39
  223. package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
  224. package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
  225. package/dist/esm/types/types/Log/index.d.ts +0 -10
  226. package/dist/esm/types/types/LogAction.d.ts +0 -29
  227. package/dist/esm/types/types/LogBuiltInMetadata.d.ts +0 -16
  228. package/dist/esm/types/types/LogFunction.d.ts +0 -24
  229. package/dist/esm/types/types/LogLevel.d.ts +0 -10
  230. package/dist/esm/types/types/LogMetadataContextMap.d.ts +0 -11
  231. package/dist/esm/types/types/LogMetadataTagMap.d.ts +0 -8
  232. package/dist/esm/types/types/LogMetadataTargetMap.d.ts +0 -8
  233. package/dist/esm/types/types/LogMetadataType.d.ts +0 -13
  234. package/dist/esm/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
  235. package/dist/esm/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
  236. package/dist/esm/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
  237. package/dist/esm/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
  238. package/dist/esm/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
  239. package/dist/esm/types/types/LogReviewerFilterState/index.d.ts +0 -17
  240. package/dist/esm/types/types/LogSource.d.ts +0 -9
  241. package/dist/esm/types/types/LogType.d.ts +0 -9
  242. package/dist/esm/types/types/ParamType.d.ts +0 -17
  243. package/dist/esm/types/types/ReactKitErrorCode.d.ts +0 -14
  244. package/src/constants/DAY_IN_MS.ts +0 -7
  245. package/src/constants/HOUR_IN_MS.ts +0 -7
  246. package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +0 -9
  247. package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +0 -9
  248. package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +0 -10
  249. package/src/constants/LOG_ROUTE_PATH.ts +0 -9
  250. package/src/constants/MINUTE_IN_MS.ts +0 -7
  251. package/src/constants/ROUTE_PATH_PREFIX.ts +0 -7
  252. package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +0 -7
  253. package/src/errors/ErrorWithCode.tsx +0 -15
  254. package/src/helpers/abbreviate.test.ts +0 -26
  255. package/src/helpers/abbreviate.ts +0 -25
  256. package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +0 -114
  257. package/src/helpers/asyncArrayFunctions/everyAsync.ts +0 -51
  258. package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +0 -126
  259. package/src/helpers/asyncArrayFunctions/filterAsync.ts +0 -50
  260. package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +0 -136
  261. package/src/helpers/asyncArrayFunctions/forEachAsync.ts +0 -40
  262. package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +0 -125
  263. package/src/helpers/asyncArrayFunctions/mapAsync.ts +0 -46
  264. package/src/helpers/asyncArrayFunctions/someAsync.test.ts +0 -92
  265. package/src/helpers/asyncArrayFunctions/someAsync.ts +0 -49
  266. package/src/helpers/avg.test.ts +0 -24
  267. package/src/helpers/avg.ts +0 -22
  268. package/src/helpers/capitalize.ts +0 -20
  269. package/src/helpers/ceilToNumDecimals.test.ts +0 -39
  270. package/src/helpers/ceilToNumDecimals.ts +0 -13
  271. package/src/helpers/cloneDeep.ts +0 -11
  272. package/src/helpers/compareArraysByProp.test.ts +0 -147
  273. package/src/helpers/compareArraysByProp.ts +0 -56
  274. package/src/helpers/extractProp.test.ts +0 -34
  275. package/src/helpers/extractProp.ts +0 -17
  276. package/src/helpers/floorToNumDecimals.test.ts +0 -39
  277. package/src/helpers/floorToNumDecimals.ts +0 -13
  278. package/src/helpers/forceNumIntoBounds.test.ts +0 -34
  279. package/src/helpers/forceNumIntoBounds.ts +0 -19
  280. package/src/helpers/genCSV.test.ts +0 -75
  281. package/src/helpers/genCSV.ts +0 -87
  282. package/src/helpers/genCommaList.test.ts +0 -57
  283. package/src/helpers/genCommaList.ts +0 -21
  284. package/src/helpers/getHumanReadableDate.test.ts +0 -29
  285. package/src/helpers/getHumanReadableDate.ts +0 -36
  286. package/src/helpers/getLocalTimeInfo.test.ts +0 -48
  287. package/src/helpers/getLocalTimeInfo.ts +0 -58
  288. package/src/helpers/getMonthName.test.ts +0 -79
  289. package/src/helpers/getMonthName.ts +0 -29
  290. package/src/helpers/getOrdinal.test.ts +0 -84
  291. package/src/helpers/getOrdinal.ts +0 -14
  292. package/src/helpers/getPartOfDay.test.ts +0 -56
  293. package/src/helpers/getPartOfDay.ts +0 -20
  294. package/src/helpers/getTimeInfoInET.test.ts +0 -72
  295. package/src/helpers/getTimeInfoInET.ts +0 -79
  296. package/src/helpers/getTimestampFromTimeInfoInET.ts +0 -179
  297. package/src/helpers/getWordCount.ts +0 -26
  298. package/src/helpers/idify.ts +0 -24
  299. package/src/helpers/onlyKeepLetters.ts +0 -11
  300. package/src/helpers/padDecimalZeros.tsx +0 -32
  301. package/src/helpers/padZerosLeft.tsx +0 -21
  302. package/src/helpers/parallelLimit.ts +0 -63
  303. package/src/helpers/prefixWithAOrAn.ts +0 -29
  304. package/src/helpers/roundToNumDecimals.tsx +0 -13
  305. package/src/helpers/shuffleArray.ts +0 -19
  306. package/src/helpers/startMinWait.ts +0 -33
  307. package/src/helpers/stringsToHumanReadableList.ts +0 -39
  308. package/src/helpers/sum.tsx +0 -16
  309. package/src/helpers/validators/ChicagoTitleCase.test.ts +0 -85
  310. package/src/helpers/validators/ChicagoTitleCase.ts +0 -32
  311. package/src/helpers/validators/findURL.test.ts +0 -83
  312. package/src/helpers/validators/findURL.ts +0 -43
  313. package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +0 -18
  314. package/src/helpers/validators/shared/helpers/validateRegex.ts +0 -47
  315. package/src/helpers/validators/shared/types/ValidationResult.ts +0 -20
  316. package/src/helpers/validators/validURL.test.ts +0 -90
  317. package/src/helpers/validators/validURL.ts +0 -18
  318. package/src/helpers/validators/validateEmail.test.ts +0 -110
  319. package/src/helpers/validators/validateEmail.ts +0 -47
  320. package/src/helpers/validators/validatePhoneNumber.test.ts +0 -94
  321. package/src/helpers/validators/validatePhoneNumber.ts +0 -49
  322. package/src/helpers/validators/validateString.test.ts +0 -173
  323. package/src/helpers/validators/validateString.ts +0 -171
  324. package/src/helpers/waitMs.tsx +0 -12
  325. package/src/types/DayOfWeek.ts +0 -15
  326. package/src/types/Log/LogMainInfo.ts +0 -69
  327. package/src/types/Log/LogSourceSpecificInfo.ts +0 -25
  328. package/src/types/Log/LogTypeSpecificInfo.ts +0 -33
  329. package/src/types/Log/index.ts +0 -17
  330. package/src/types/LogAction.ts +0 -52
  331. package/src/types/LogBuiltInMetadata.ts +0 -19
  332. package/src/types/LogFunction.ts +0 -46
  333. package/src/types/LogLevel.ts +0 -11
  334. package/src/types/LogMetadataContextMap.ts +0 -15
  335. package/src/types/LogMetadataTagMap.ts +0 -9
  336. package/src/types/LogMetadataTargetMap.ts +0 -9
  337. package/src/types/LogMetadataType.ts +0 -16
  338. package/src/types/LogReviewerFilterState/ActionErrorFilterState.ts +0 -24
  339. package/src/types/LogReviewerFilterState/AdvancedFilterState.ts +0 -36
  340. package/src/types/LogReviewerFilterState/ContextFilterState.ts +0 -16
  341. package/src/types/LogReviewerFilterState/DateFilterState.ts +0 -26
  342. package/src/types/LogReviewerFilterState/TagFilterState.ts +0 -9
  343. package/src/types/LogReviewerFilterState/index.ts +0 -24
  344. package/src/types/LogSource.ts +0 -12
  345. package/src/types/LogType.ts +0 -12
  346. package/src/types/ParamType.ts +0 -18
  347. package/src/types/ReactKitErrorCode.tsx +0 -17
package/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,7 +14194,6 @@ const Dropdown = (props) => {
15332
14194
  */
15333
14195
  var ProgressBarSize;
15334
14196
  (function (ProgressBarSize) {
15335
- ProgressBarSize["Small"] = "Small";
15336
14197
  ProgressBarSize["Medium"] = "Medium";
15337
14198
  ProgressBarSize["Large"] = "Large";
15338
14199
  })(ProgressBarSize || (ProgressBarSize = {}));
@@ -15348,7 +14209,7 @@ var ProgressBarSize$1 = ProgressBarSize;
15348
14209
  // Multiplier for calculating width of number of items
15349
14210
  const ITEM_WIDTH_MULTIPLIER = 1.3;
15350
14211
  // Constant for percent width
15351
- const PERCENT_WIDTH = 3;
14212
+ const PERCENT_WIDTH = 2.7;
15352
14213
  // Constant for item width
15353
14214
  const ITEM_WIDTH = 2;
15354
14215
  /*------------------------------------------------------------------------*/
@@ -15358,11 +14219,9 @@ const ITEM_WIDTH = 2;
15358
14219
  let style = `
15359
14220
  .ProgressBar-number-of,
15360
14221
  .ProgressBar-percent {
15361
- flex: 0 0 auto;
15362
14222
  white-space: nowrap;
15363
- padding-right: 0.5em;
15364
- padding-left: 0.25em;
15365
- text-align: right;
14223
+ padding-right: 0.3em;
14224
+ text-align: left;
15366
14225
  transition: width .25s ease;
15367
14226
  }
15368
14227
 
@@ -15382,7 +14241,7 @@ const ProgressBar = (props) => {
15382
14241
  /*------------------------------------------------------------------------*/
15383
14242
  /* -------------------------------- Setup ------------------------------- */
15384
14243
  /*------------------------------------------------------------------------*/
15385
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
14244
+ var _a, _b, _c, _d, _e;
15386
14245
  /* -------------- Props ------------- */
15387
14246
  // Destructure props
15388
14247
  const { striped, variant = Variant$1.Warning, bgVariant = Variant$1.Secondary, showOutline, size = ProgressBarSize$1.Medium, } = props;
@@ -15414,10 +14273,19 @@ const ProgressBar = (props) => {
15414
14273
  /*----------------------------------------*/
15415
14274
  /* ---------------- Sizes --------------- */
15416
14275
  /*----------------------------------------*/
14276
+ // Add dynamic general style
14277
+ style += `
14278
+ .ProgressBar-percent {
14279
+ min-width: ${(status.usePercent ? (_a = status.numDecimalPlaces) !== null && _a !== void 0 ? _a : 0 : 0) + PERCENT_WIDTH}em;
14280
+ }
14281
+ .ProgressBar-number-of {
14282
+ min-width: ${((!status.usePercent ? String((_b = status.total) !== null && _b !== void 0 ? _b : 0).length || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
14283
+ }
14284
+ `;
15417
14285
  // Size styles
15418
14286
  switch (size) {
15419
- case ProgressBarSize$1.Small:
15420
- // Small size
14287
+ case ProgressBarSize$1.Medium:
14288
+ // Medium size
15421
14289
  style += `
15422
14290
  .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15423
14291
  font-size: 1em;
@@ -15430,18 +14298,10 @@ const ProgressBar = (props) => {
15430
14298
  height: 1.5em;
15431
14299
  border-radius: 0.5em;
15432
14300
  }
15433
- .ProgressBar-percent {
15434
- min-width: ${((status.usePercent ? (_a = status.numDecimalPlaces) !== null && _a !== void 0 ? _a : 0 : 0) * 1) + PERCENT_WIDTH}em;
15435
- max-width: ${((status.usePercent ? (_b = status.numDecimalPlaces) !== null && _b !== void 0 ? _b : 0 : 0) * 1) + PERCENT_WIDTH}em;
15436
- }
15437
- .ProgressBar-number-of {
15438
- min-width: ${((!status.usePercent ? ((_c = status.total) === null || _c === void 0 ? void 0 : _c.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15439
- max-width: ${((!status.usePercent ? ((_d = status.total) === null || _d === void 0 ? void 0 : _d.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15440
- }
15441
14301
  `;
15442
14302
  break;
15443
- case ProgressBarSize$1.Medium:
15444
- // Medium size
14303
+ case ProgressBarSize$1.Large:
14304
+ // Large size
15445
14305
  style += `
15446
14306
  .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15447
14307
  font-size: 1.5em;
@@ -15454,47 +14314,14 @@ const ProgressBar = (props) => {
15454
14314
  height: 2em;
15455
14315
  border-radius: 0.7em;
15456
14316
  }
15457
- .ProgressBar-percent {
15458
- min-width: ${((status.usePercent ? (_e = status.numDecimalPlaces) !== null && _e !== void 0 ? _e : 0 : 0) * 1) + PERCENT_WIDTH}em;
15459
- max-width: ${((status.usePercent ? (_f = status.numDecimalPlaces) !== null && _f !== void 0 ? _f : 0 : 0) * 1) + PERCENT_WIDTH}em;
15460
- }
15461
- .ProgressBar-number-of {
15462
- min-width: ${((!status.usePercent ? ((_g = status.total) === null || _g === void 0 ? void 0 : _g.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15463
- max-width: ${((!status.usePercent ? ((_h = status.total) === null || _h === void 0 ? void 0 : _h.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15464
- }
15465
- `;
15466
- break;
15467
- case ProgressBarSize$1.Large:
15468
- // Large size
15469
- style += `
15470
- .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15471
- font-size: 2em;
15472
- }
15473
- .ProgressBar-container .ProgressBar-background {
15474
- height: 3em;
15475
- border-radius: 1em;
15476
- }
15477
- .ProgressBar-container .ProgressBar-bar {
15478
- height: 3em;
15479
- border-radius: 1em;
15480
- }
15481
- .ProgressBar-percent {
15482
- min-width: ${((status.usePercent ? (_j = status.numDecimalPlaces) !== null && _j !== void 0 ? _j : 0 : 0) * 1) + PERCENT_WIDTH}em;
15483
- max-width: ${((status.usePercent ? (_k = status.numDecimalPlaces) !== null && _k !== void 0 ? _k : 0 : 0) * 1) + PERCENT_WIDTH}em;
15484
- }
15485
- .ProgressBar-number-of {
15486
- min-width: ${((!status.usePercent ? ((_l = status.total) === null || _l === void 0 ? void 0 : _l.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15487
- max-width: ${((!status.usePercent ? ((_m = status.total) === null || _m === void 0 ? void 0 : _m.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15488
- }
15489
14317
  `;
15490
14318
  break;
15491
14319
  }
15492
14320
  // Get the width of the outline based on size
15493
14321
  const outlineWidth = (() => {
15494
14322
  switch (size) {
15495
- case ProgressBarSize$1.Small: return '0.05em';
15496
- case ProgressBarSize$1.Medium: return '0.08em';
15497
- case ProgressBarSize$1.Large: return '0.1em';
14323
+ case ProgressBarSize$1.Medium: return '0.05em';
14324
+ case ProgressBarSize$1.Large: return '0.08em';
15498
14325
  default: return '0.05em';
15499
14326
  }
15500
14327
  })();
@@ -15519,75 +14346,51 @@ const ProgressBar = (props) => {
15519
14346
  }
15520
14347
  `;
15521
14348
  // Stripes for striped effect
15522
- const stripes = (React__default["default"].createElement("div", null,
15523
- React__default["default"].createElement("style", null, stripesStyle),
15524
- React__default["default"].createElement("div", { className: "ProgressBar-stripes position-absolute ", style: {
15525
- width: '200%',
15526
- height: '100%',
15527
- } }, "\u00A0")));
14349
+ let stripes = null;
14350
+ if (striped) {
14351
+ stripes = (React__default["default"].createElement("div", null,
14352
+ React__default["default"].createElement("style", null, stripesStyle),
14353
+ React__default["default"].createElement("div", { className: "ProgressBar-stripes position-absolute", style: {
14354
+ width: '200%',
14355
+ height: '100%',
14356
+ } }, "\u00A0")));
14357
+ }
15528
14358
  /*----------------------------------------*/
15529
14359
  /* --------------- Main UI -------------- */
15530
14360
  /*----------------------------------------*/
14361
+ // Calculate the width of the progress bar
14362
+ let progressBarWidthPercent = 0;
14363
+ if (status.usePercent) {
14364
+ // Use percent progress directly
14365
+ progressBarWidthPercent = status.percentProgress;
14366
+ }
14367
+ else if (status.total > 0) {
14368
+ // Calculate percent progress from items
14369
+ progressBarWidthPercent = (status.numComplete / status.total) * 100;
14370
+ }
15531
14371
  // Render the progress bar
15532
14372
  return (React__default["default"].createElement("div", { className: "ProgressBar-container d-flex align-items-center" },
15533
14373
  React__default["default"].createElement("style", null, style),
15534
- !status.usePercent && status.numComplete && (React__default["default"].createElement("span", { className: "ProgressBar-number-of pe-2 align-self-center" },
14374
+ !status.usePercent && status.numComplete && (React__default["default"].createElement("span", { className: "ProgressBar-number-of" },
15535
14375
  status.numComplete,
15536
14376
  "\u00A0of\u00A0",
15537
14377
  status.total)),
15538
- status.usePercent && status.percentProgress && (React__default["default"].createElement("span", { className: "ProgressBar-percent pe-2 align-self-center" },
15539
- status.percentProgress.toFixed((_o = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _o !== void 0 ? _o : 0),
14378
+ status.usePercent && (React__default["default"].createElement("span", { className: "ProgressBar-percent" },
14379
+ dceCommonkit.padDecimalZeros(dceCommonkit.roundToNumDecimals((_c = status.percentProgress) !== null && _c !== void 0 ? _c : 0, (_d = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _d !== void 0 ? _d : 0), (_e = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _e !== void 0 ? _e : 0),
15540
14380
  "%")),
15541
- React__default["default"].createElement("div", { className: `ProgressBar-background bg-${bgVariant} w-100`, style: {
14381
+ React__default["default"].createElement("div", { className: `ProgressBar-background bg-${bgVariant} flex-grow-1`, style: {
15542
14382
  boxShadow: `0 0 0 ${outlineWidth} ${showOutline ? '#000' : '#DEE2E6'}`,
15543
14383
  }, "aria-valuenow": status.usePercent ? status.percentProgress : status.numComplete, "aria-valuemin": 0, "aria-valuemax": status.usePercent ? 100 : status.total },
15544
14384
  React__default["default"].createElement("div", { className: `ProgressBar-bar bg-${variant} text-start position-relative`, style: {
15545
- width: `${(status.usePercent ? status.percentProgress : (status.numComplete / status.total) * 100)}%`,
14385
+ width: `${progressBarWidthPercent}%`,
15546
14386
  overflow: 'hidden',
15547
14387
  } },
15548
- striped && stripes,
14388
+ stripes,
15549
14389
  "\u00A0"))));
15550
14390
  };
15551
14391
 
15552
- /**
15553
- * One minute in ms
15554
- * @author Gabe Abrams
15555
- */
15556
- const MINUTE_IN_MS = 60000;
15557
-
15558
- /**
15559
- * One hour in ms
15560
- * @author Gabe Abrams
15561
- */
15562
- const HOUR_IN_MS = 3600000;
15563
-
15564
- /**
15565
- * One day in ms
15566
- * @author Gabe Abrams
15567
- */
15568
- const DAY_IN_MS = 86400000;
15569
-
15570
- /**
15571
- * Path of the route for storing client-side logs
15572
- * @author Gabe Abrams
15573
- */
15574
- const LOG_REVIEW_ROUTE_PATH_PREFIX = `/admin${ROUTE_PATH_PREFIX}/logs`;
15575
-
15576
- /**
15577
- * Route for checking the status of the current user's
15578
- * access to log review
15579
- * @author Gabe Abrams
15580
- */
15581
- const LOG_REVIEW_STATUS_ROUTE = `${ROUTE_PATH_PREFIX}/logs/access_allowed`;
15582
-
15583
- /**
15584
- * Route for checking if the current user is a select admin
15585
- * @author Gabe Abrams
15586
- */
15587
- const SELECT_ADMIN_CHECK_ROUTE = '/api/admin/select/is-select-admin';
15588
-
15589
14392
  // True if user is on mobile or tablet
15590
- let cachedResult = undefined;
14393
+ let cachedResult;
15591
14394
  /**
15592
14395
  * Check if the user is on a mobile device or tablet
15593
14396
  * from https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser
@@ -15600,6 +14403,7 @@ const isMobileOrTablet = () => {
15600
14403
  }
15601
14404
  try {
15602
14405
  let check = false;
14406
+ // eslint-disable-next-line max-len, no-useless-escape
15603
14407
  ((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)))
15604
14408
  check = true; })((navigator !== null && navigator !== void 0 ? navigator : {}).userAgent || (navigator !== null && navigator !== void 0 ? navigator : {}).vendor || ((_a = window) !== null && _a !== void 0 ? _a : {}).opera);
15605
14409
  cachedResult = check;
@@ -15641,269 +14445,16 @@ const DynamicWord = {
15641
14445
  };
15642
14446
 
15643
14447
  /**
15644
- * Shorten text so it fits into a certain number of chars
15645
- * @author Gabe Abrams
15646
- * @param text the text to abbreviate
15647
- * @param maxChars the maximum number of chars to include
15648
- * @returns abbreviated text with length no greater than maxChars
15649
- * (including ellipses if applicable)
15650
- */
15651
- const abbreviate = (text, maxChars) => {
15652
- // Check if already short enough
15653
- if (text.trim().length < maxChars) {
15654
- return text.trim();
15655
- }
15656
- // Abbreviate
15657
- const shortenedText = (text
15658
- .trim()
15659
- .substring(0, maxChars - 3)
15660
- .trim());
15661
- return `${shortenedText}...`;
15662
- };
15663
-
15664
- /**
15665
- * Sum the numbers in an array
14448
+ * Stub a server endpoint response
15666
14449
  * @author Gabe Abrams
15667
- * @param nums the numbers to sum
15668
- * @returns the sum of the numbers
14450
+ * @param opts object containing all arguments
14451
+ * @param [opts.method=GET] http method to stub
14452
+ * @param opts.path full pathname to stub
14453
+ * @param opts.body body of response if stubbing a successful response
14454
+ * @param opts.errorMessage message of error if stubbing a failed response
14455
+ * @param [opts.errorCode] error code if stubbing a failed response
15669
14456
  */
15670
- const sum = (nums) => {
15671
- return nums.reduce((a, b) => {
15672
- return (a + b);
15673
- }, 0);
15674
- };
15675
-
15676
- /**
15677
- * Get the average of a set of numbers
15678
- * @author Gabe Abrams
15679
- * @param nums the numbers to average
15680
- * @returns average value or 0 if no numbers
15681
- */
15682
- const avg = (nums) => {
15683
- // Handle empty array case
15684
- if (nums.length === 0) {
15685
- return 0;
15686
- }
15687
- // Get the total value
15688
- const total = sum(nums);
15689
- // Get average
15690
- return (total / nums.length);
15691
- };
15692
-
15693
- /**
15694
- * Round a number (ceiling) to a certain number of decimals
15695
- * @author Gabe Abrams
15696
- * @param num the number to round
15697
- * @param numDecimals the number of decimals to round to
15698
- * @returns rounded number
15699
- */
15700
- const ceilToNumDecimals = (num, numDecimals) => {
15701
- const rounder = 10 ** numDecimals;
15702
- return (Math.ceil(num * rounder) / rounder);
15703
- };
15704
-
15705
- /**
15706
- * Round a number (floor) to a certain number of decimals
15707
- * @author Gabe Abrams
15708
- * @param num the number to round
15709
- * @param numDecimals the number of decimals to round to
15710
- * @returns rounded number
15711
- */
15712
- const floorToNumDecimals = (num, numDecimals) => {
15713
- const rounder = 10 ** numDecimals;
15714
- return (Math.floor(num * rounder) / rounder);
15715
- };
15716
-
15717
- /**
15718
- * Force a number to stay within specific bounds
15719
- * @author Gabe Abrams
15720
- * @param num the number to move into the bounds
15721
- * @param min the minimum number in the bound
15722
- * @param max the maximum number in the bound
15723
- * @returns bounded number
15724
- */
15725
- const forceNumIntoBounds = (num, min, max) => {
15726
- return Math.max(min, Math.min(max, num));
15727
- };
15728
-
15729
- /**
15730
- * Pad a number's decimal with zeros on the right
15731
- * (e.g. 5.2 becomes 5.20 with 2 digit padding)
15732
- * @author Gabe Abrams
15733
- * @param num the number to pad
15734
- * @param numDigits the minimum number of digits after the decimal
15735
- * @returns padded number
15736
- */
15737
- const padDecimalZeros = (num, numDigits) => {
15738
- // Skip if nothing to do
15739
- if (numDigits < 1) {
15740
- return String(num);
15741
- }
15742
- // Convert to string
15743
- let out = String(num);
15744
- // Add a decimal point if there isn't one
15745
- if (!out.includes('.')) {
15746
- out += '.';
15747
- }
15748
- // Add zeros
15749
- while (out.split('.')[1].length < numDigits) {
15750
- out = `${out}0`;
15751
- }
15752
- // Return
15753
- return out;
15754
- };
15755
-
15756
- /**
15757
- * Stub a server endpoint response
15758
- * @author Gabe Abrams
15759
- * @param opts object containing all arguments
15760
- * @param [opts.method=GET] http method to stub
15761
- * @param opts.path full pathname to stub
15762
- * @param opts.body body of response if stubbing a successful response
15763
- * @param opts.errorMessage message of error if stubbing a failed response
15764
- * @param [opts.errorCode] error code if stubbing a failed response
15765
- */
15766
- const stubServerEndpoint = _setStubResponse;
15767
-
15768
- /**
15769
- * Start a dynamic wait, call the function once the operation has completed and
15770
- * the dynamic wait will continue waiting for the rest of the minimum time
15771
- * @author Gabe Abrams
15772
- * @param minWaitMs the minimum number of ms to wait
15773
- * @returns async function to call to finish the wait
15774
- */
15775
- const startMinWait = (minWaitMs) => {
15776
- const startTimestamp = Date.now();
15777
- /**
15778
- * Finish the remaining time to wait
15779
- * @author Gabe Abrams
15780
- */
15781
- return () => __awaiter(void 0, void 0, void 0, function* () {
15782
- const endTimestamp = Date.now();
15783
- // Calculate remaining time to wait
15784
- const elapsedTimeMs = (endTimestamp - startTimestamp);
15785
- const remainingTimeToWaitMs = minWaitMs - elapsedTimeMs;
15786
- if (remainingTimeToWaitMs <= 0) {
15787
- return;
15788
- }
15789
- // Perform wait
15790
- yield waitMs(remainingTimeToWaitMs);
15791
- });
15792
- };
15793
-
15794
- /**
15795
- * Get the current part of day (morning, evening, etc.)
15796
- * @author Gabe Abrams
15797
- * @returns the part of day (morning, evening, etc.)
15798
- */
15799
- const getPartOfDay = () => {
15800
- // Setup the post-it time of day
15801
- let partOfDay = 'day';
15802
- const hours = new Date().getHours();
15803
- if (hours < 12) {
15804
- partOfDay = 'morning';
15805
- }
15806
- else if (hours >= 12 && hours <= 16) {
15807
- partOfDay = 'afternoon';
15808
- }
15809
- else if (hours > 16 && hours <= 24) {
15810
- partOfDay = 'evening';
15811
- }
15812
- return partOfDay;
15813
- };
15814
-
15815
- /**
15816
- * Create a human readable list from an array of strings.
15817
- * For example, ['apple', 'orange'] becomes "apple and orange"
15818
- * and ['apple', 'orange', 'mango'] becomes "apple, orange, and mango"
15819
- * @author Gabe Abrams
15820
- * @param items list of items in the list
15821
- * @returns human-readable list
15822
- */
15823
- const stringsToHumanReadableList = (items) => {
15824
- // Handle 0-item case
15825
- if (items.length === 0) {
15826
- return '';
15827
- }
15828
- // Handle 1-item case
15829
- if (items.length === 1) {
15830
- return items[0];
15831
- }
15832
- // Handle 2-item case
15833
- if (items.length === 2) {
15834
- return `${items[0]} and ${items[1]}`;
15835
- }
15836
- // Handle 3+ item case
15837
- let list = '';
15838
- items.forEach((item, i) => {
15839
- if (i === items.length - 1) {
15840
- // Last item
15841
- list += `, and ${item}`;
15842
- }
15843
- // Previous items
15844
- list += `, ${item}`;
15845
- });
15846
- return list;
15847
- };
15848
-
15849
- /**
15850
- * Given a string, only keep the letters inside it
15851
- * @author Gabe Abrams
15852
- * @param str the string to parse
15853
- * @returns only the letters inside of the string
15854
- */
15855
- const onlyKeepLetters = (str) => {
15856
- return str.replace(/[^a-zA-Z]+/g, '');
15857
- };
15858
-
15859
- /**
15860
- * Run tasks in parallel with a limit on how many tasks can execute at once.
15861
- * No guarantees are made about the order of task execution
15862
- * @author Gabe Abrams
15863
- * @param taskFunctions functions that start asynchronous tasks and optionally
15864
- * resolve with values
15865
- * @param [limit=no limit] maximum number of asynchronous tasks to permit to run at
15866
- * once
15867
- * @returns array of resolved values in the same order as the task functions
15868
- */
15869
- const parallelLimit = (taskFunctions, limit) => __awaiter(void 0, void 0, void 0, function* () {
15870
- const results = [];
15871
- // Wait until finished with all tasks
15872
- yield new Promise((resolve) => {
15873
- /* ------------- Helpers ------------ */
15874
- let nextTaskIndex = 0;
15875
- let numFinishedTasks = 0;
15876
- /**
15877
- * Start the next task
15878
- * @author Gabe Abrams
15879
- */
15880
- const startTask = () => __awaiter(void 0, void 0, void 0, function* () {
15881
- const taskIndex = nextTaskIndex++;
15882
- // Get the task
15883
- const taskFunction = taskFunctions[taskIndex];
15884
- if (!taskFunction) {
15885
- return;
15886
- }
15887
- // Execute task
15888
- const result = yield taskFunction();
15889
- // Add results
15890
- results[taskIndex] = result;
15891
- // Tally and finish
15892
- if (++numFinishedTasks === taskFunctions.length) {
15893
- return resolve();
15894
- }
15895
- // Not finished! Start another task
15896
- startTask();
15897
- });
15898
- /* ----------- Start Tasks ---------- */
15899
- // If no limit, start all tasks. At least start 1 task
15900
- const numTasks = Math.max((limit || taskFunctions.length), 1);
15901
- for (let i = 0; i < numTasks; i++) {
15902
- startTask();
15903
- }
15904
- });
15905
- return results;
15906
- });
14457
+ const stubServerEndpoint = _setStubResponse;
15907
14458
 
15908
14459
  /*------------------------------------------------------------------------*/
15909
14460
  /* -------------------------------- Cache ------------------------------- */
@@ -15926,7 +14477,7 @@ const canReviewLogs = () => __awaiter(void 0, void 0, void 0, function* () {
15926
14477
  // Ask on server
15927
14478
  try {
15928
14479
  canReview = !!(yield visitServerEndpoint({
15929
- path: LOG_REVIEW_STATUS_ROUTE,
14480
+ path: dceCommonkit.LOG_REVIEW_STATUS_ROUTE,
15930
14481
  method: 'GET',
15931
14482
  }));
15932
14483
  }
@@ -15936,355 +14487,6 @@ const canReviewLogs = () => __awaiter(void 0, void 0, void 0, function* () {
15936
14487
  return canReview;
15937
14488
  });
15938
14489
 
15939
- /**
15940
- * For every element in an array, extract the value of a prop
15941
- * (e.g. for all user objects, extract their ages and put that into a new
15942
- * ages array)
15943
- * @author Gabe Abrams
15944
- * @param arr the array of objects to operate on
15945
- * @param prop the property to extract from each object
15946
- * @returns new array containing the corresponding values, in order, of each
15947
- * object in the original array
15948
- */
15949
- const extractProp = (arr, prop) => {
15950
- return arr.map((item) => {
15951
- return item[prop];
15952
- });
15953
- };
15954
-
15955
- /**
15956
- * Compare two arrays of objects by only comparing the values in a specific
15957
- * property (e.g. compare user arrays by comparing their user.id values)
15958
- * @author Gabe Abrams
15959
- * @param a the first array
15960
- * @param b the second array
15961
- * @param prop the property to compare with, or an array of props to compare
15962
- * with (if array, all values associated with those props must match)
15963
- * @returns true if the arrays contain the same objects as determined by
15964
- * the values associated with each object's prop
15965
- */
15966
- const compareArraysByProp = (a, b, prop) => {
15967
- // Immediately return if size of arrays is different
15968
- if (a.length !== b.length) {
15969
- return false;
15970
- }
15971
- // Get all props
15972
- const props = (Array.isArray(prop) ? prop : [prop]);
15973
- // Clone second array so we can work on it
15974
- const bCloned = [...b];
15975
- // Remove elements from b as we find them in a
15976
- for (let i = 0; i < a.length; i++) {
15977
- // Find matching element in b
15978
- const matchingIndex = bCloned.findIndex((bItem) => {
15979
- // Compare based on all props
15980
- return props.every((propToCompareBy) => {
15981
- var _a;
15982
- const aVal = ((_a = a[i]) !== null && _a !== void 0 ? _a : {})[propToCompareBy];
15983
- const bVal = (bItem !== null && bItem !== void 0 ? bItem : {})[propToCompareBy];
15984
- return aVal === bVal;
15985
- });
15986
- });
15987
- // Check if no match
15988
- const noMatch = (matchingIndex < 0);
15989
- // If no match, there's no corresponding element in b
15990
- if (noMatch) {
15991
- return false;
15992
- }
15993
- // Remove the matching element
15994
- bCloned.splice(matchingIndex, 1);
15995
- }
15996
- // If we made it here, all elements in a have a corresponding element in b
15997
- return true;
15998
- };
15999
-
16000
- /**
16001
- * Get current time info in local time
16002
- * @author Gabe Abrams
16003
- * @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
16004
- * @returns object with timestamp (ms since epoch) and numbers
16005
- * corresponding to time values for year, month, day, hour, hour12, minute, isPM
16006
- * where hour is in 24hr time and hour12 is in 12hr time.
16007
- */
16008
- const getLocalTimeInfo = (dateOrTimestamp) => {
16009
- // Create a time string
16010
- let d;
16011
- if (!dateOrTimestamp) {
16012
- // Use now
16013
- d = new Date();
16014
- }
16015
- else if (typeof dateOrTimestamp === 'number') {
16016
- // Convert to date
16017
- d = new Date(dateOrTimestamp);
16018
- }
16019
- else {
16020
- // Already a date
16021
- d = dateOrTimestamp;
16022
- }
16023
- // Create all time numbers
16024
- const timestamp = d.getTime();
16025
- const year = d.getFullYear();
16026
- const month = d.getMonth() + 1;
16027
- const day = d.getDate();
16028
- const hour = d.getHours();
16029
- const isPM = hour >= 12;
16030
- let hour12 = hour % 12;
16031
- if (hour12 === 0) {
16032
- hour12 = 12;
16033
- }
16034
- const minute = d.getMinutes();
16035
- // Return
16036
- return {
16037
- timestamp,
16038
- year,
16039
- month,
16040
- day,
16041
- hour,
16042
- hour12,
16043
- isPM,
16044
- minute,
16045
- };
16046
- };
16047
-
16048
- /**
16049
- * Given an array of strings, create a single comma-separated string that includes
16050
- * 'and' as well as an oxford comma.
16051
- * Ex: ['apples'] => 'apples'
16052
- * Ex: ['apples', 'bananas'] => 'apples and bananas'
16053
- * Ex: ['apples', 'bananas', 'grapes'] => 'apples, bananas, and grapes'
16054
- * @author Austen Money
16055
- * @param list an array of elements to be made into a single comma-separated string.
16056
- * @returns a comma-separated string.
16057
- */
16058
- const genCommaList = (list) => {
16059
- const { length } = list;
16060
- return (length < 2
16061
- ? list.join('')
16062
- : `${list.slice(0, length - 1).join(', ')}${length < 3 ? ' and ' : ', and '}${list[length - 1]}`);
16063
- };
16064
-
16065
- /*------------------------------------------------------------------------*/
16066
- /* ------------------------------ Constants ----------------------------- */
16067
- /*------------------------------------------------------------------------*/
16068
- const INVALID_REGEX_ERROR = 'input does not follow the requested format';
16069
- const INVALID_EMAIL_ERROR = 'Please provide a valid email address.';
16070
- const INVALID_PHONE_ERROR = 'Please provide a valid phone number.';
16071
- const INVALID_STRING_ERRORS = {
16072
- MIN_LEN: (minLen) => {
16073
- return `input must not be under ${minLen} character(s)`;
16074
- },
16075
- MAX_LEN: (maxLen) => {
16076
- return `input must not be over ${maxLen} character(s)`;
16077
- },
16078
- LETTERS_ONLY: 'input must only contain letters',
16079
- NUMBERS_ONLY: 'input must only contain numbers',
16080
- MESSAGE_INTRO: 'The following error(s) occurred: ',
16081
- };
16082
-
16083
- // Import constants
16084
- /**
16085
- * Determines whether a given input string is considered valid based on
16086
- * the provided regex.
16087
- * @author Austen Money
16088
- * @param opts object containing all args
16089
- * @param opts.input user-provided input to validate
16090
- * @param opts.regex regular expression to check against input
16091
- * @param [opts.regexDescription] description of what regexString is checking
16092
- * for, used to customize error message
16093
- * @returns the unchanged input if valid, or a customized error message if
16094
- * invalid
16095
- */
16096
- const validateRegex = (opts) => {
16097
- // customize error message in case of invalid input
16098
- const errorMessage = `${INVALID_REGEX_ERROR}${opts.regexDescription
16099
- ? ': '
16100
- : ''}${opts.regexDescription}`;
16101
- // return error message if test is invalid, or input string if valid
16102
- return (opts.regex.test(opts.input)
16103
- ? {
16104
- isValid: true,
16105
- cleanedValue: opts.input,
16106
- }
16107
- : {
16108
- isValid: false,
16109
- errorMessage,
16110
- });
16111
- };
16112
-
16113
- // Import helpers
16114
- /**
16115
- * Determines whether a given email address is valid.
16116
- * @author Austen Money
16117
- * @param email email address to validate
16118
- * @returns whether email fulfills proper formatting requirements, includes a
16119
- * cleaned version of the address without leading or trailing
16120
- * whitespace if valid or an error message if invalid.
16121
- */
16122
- const validateEmail = (email) => {
16123
- // validation regex, sourced from HTML living standard: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)
16124
- // eslint-disable-next-line max-len
16125
- 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])?)*$/;
16126
- // remove leading and trailing whitespace
16127
- const cleanedValue = email.replace(/^\s+|\s+$/g, '');
16128
- // validate email with regex, and return error if not valid
16129
- return (validateRegex({
16130
- input: cleanedValue,
16131
- regex: emailRegex,
16132
- }).isValid
16133
- ? {
16134
- isValid: true,
16135
- cleanedValue,
16136
- }
16137
- : {
16138
- isValid: false,
16139
- errorMessage: INVALID_EMAIL_ERROR,
16140
- });
16141
- };
16142
-
16143
- // Import helpers
16144
- /**
16145
- * Determines whether a given phone number is valid.
16146
- * @author Austen Money
16147
- * @param phoneNumber phone number to validate
16148
- * @returns whether phone number is considered valid - if valid, also returns
16149
- * a cleaned version of the number without any formatting. If invalid,
16150
- * returns an error message.
16151
- */
16152
- const validatePhoneNumber = (phoneNumber) => {
16153
- // regex to validate phone number
16154
- const validationRegex = /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/;
16155
- // validate phone number with regex
16156
- const validationResponse = validateRegex({
16157
- input: phoneNumber,
16158
- regex: validationRegex,
16159
- });
16160
- // remove all non-digits from number
16161
- const cleanedValue = phoneNumber.replace(/\D/g, '');
16162
- // return cleaned value if valid, or error message if invalid
16163
- return (validationResponse.isValid
16164
- ? {
16165
- isValid: true,
16166
- cleanedValue,
16167
- }
16168
- : {
16169
- isValid: false,
16170
- errorMessage: INVALID_PHONE_ERROR,
16171
- });
16172
- };
16173
-
16174
- // Import helpers
16175
- /*------------------------------------------------------------------------*/
16176
- /* ------------------------------ Constants ----------------------------- */
16177
- /*------------------------------------------------------------------------*/
16178
- // define minimum and maximum range for lowercase ASCII chars
16179
- const LOWERCASE_MIN = 65;
16180
- const LOWERCASE_MAX = 90;
16181
- // define minimum and maximum range for uppercase ASCII chars
16182
- const UPPERCASE_MIN = 97;
16183
- const UPPERCASE_MAX = 122;
16184
- // define minimum and maximum range for ASCII digits
16185
- const DIGIT_MIN = 48;
16186
- const DIGIT_MAX = 57;
16187
- /*------------------------------------------------------------------------*/
16188
- /* ---------------------------- Main Function --------------------------- */
16189
- /*------------------------------------------------------------------------*/
16190
- /**
16191
- * Determines whether a given input string is considered valid based on
16192
- * the provided requirements.
16193
- * @author Austen Money
16194
- * @param input input string
16195
- * @param opts options for validation
16196
- * @returns whether input is considered valid according to reqs - if
16197
- * valid, returns a cleaned version of input; if invalid, returns
16198
- * a string containing error messages describing which requirements
16199
- * were not met.
16200
- */
16201
- const validateString = (input, opts) => {
16202
- // stores all invalid input errors
16203
- const errorMessages = [];
16204
- // contains version of input that will be returned
16205
- let cleanedValue = input;
16206
- // remove whitespace if required
16207
- if (opts.ignoreWhitespace) {
16208
- cleanedValue = input.replace(/\s+/g, '');
16209
- }
16210
- // apply max char requirement
16211
- if (opts.minLen) {
16212
- if (cleanedValue.length < opts.minLen) {
16213
- errorMessages.push(INVALID_STRING_ERRORS.MIN_LEN(opts.minLen));
16214
- }
16215
- }
16216
- // apply max char requirement
16217
- if (opts.maxLen) {
16218
- if (cleanedValue.length > opts.maxLen) {
16219
- errorMessages.push(INVALID_STRING_ERRORS.MAX_LEN(opts.maxLen));
16220
- }
16221
- }
16222
- // apply alphabetical requirement
16223
- if (opts.lettersOnly) {
16224
- // remove diacritics
16225
- cleanedValue = cleanedValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
16226
- const containsNonLetters = (cleanedValue
16227
- // split into characters
16228
- .split('')
16229
- // convert into character codes
16230
- .map((curr) => {
16231
- return curr.charCodeAt(0);
16232
- })
16233
- // check for non-letters
16234
- .some((currCode) => {
16235
- return (!(currCode >= LOWERCASE_MIN && currCode <= LOWERCASE_MAX)
16236
- && !(currCode >= UPPERCASE_MIN && currCode <= UPPERCASE_MAX));
16237
- }));
16238
- if (containsNonLetters) {
16239
- errorMessages.push(INVALID_STRING_ERRORS.LETTERS_ONLY);
16240
- }
16241
- }
16242
- // apply numerical requirement
16243
- if (opts.numbersOnly) {
16244
- const containsNonNumbers = (cleanedValue
16245
- // split into characters
16246
- .split('')
16247
- // convert into character codes
16248
- .map((curr) => {
16249
- return curr.charCodeAt(0);
16250
- })
16251
- // check for non-numbers
16252
- .some((currCode) => {
16253
- return (!(currCode >= DIGIT_MIN && currCode <= DIGIT_MAX));
16254
- }));
16255
- if (containsNonNumbers) {
16256
- errorMessages.push(INVALID_STRING_ERRORS.NUMBERS_ONLY);
16257
- }
16258
- }
16259
- // apply regex requirement
16260
- if (opts.regexTest) {
16261
- const regex = opts.regexTest;
16262
- // validate and create customized error message if description is provided
16263
- const result = validateRegex({
16264
- input: cleanedValue,
16265
- regex,
16266
- regexDescription: opts.regexDescription,
16267
- });
16268
- // if string did not pass regex validation, add error message
16269
- if (result.isValid === false) {
16270
- errorMessages.push(result.errorMessage);
16271
- }
16272
- }
16273
- // combine all error messages into one string to return
16274
- const errorMessage = `${INVALID_STRING_ERRORS.MESSAGE_INTRO}${genCommaList(errorMessages)}.`;
16275
- return (
16276
- // if no error messages, string is valid; if not, it is invalid
16277
- errorMessages.length === 0
16278
- ? {
16279
- isValid: true,
16280
- cleanedValue,
16281
- }
16282
- : {
16283
- isValid: false,
16284
- errorMessage,
16285
- });
16286
- };
16287
-
16288
14490
  // Import React
16289
14491
  // Regular express that matches urls
16290
14492
  const urlRegex = /(https?:\/\/)?([a-z0-9-]+\.)+[a-z0-9]{2,6}(:[0-9]{1,5})?(\/\S*)?/g;
@@ -16344,30 +14546,6 @@ const makeLinksClickable = (text, opts) => {
16344
14546
  return elements;
16345
14547
  };
16346
14548
 
16347
- // Constants
16348
- const VOWELS = ['a', 'e', 'i', 'o', 'u'];
16349
- /**
16350
- * Prefix a word or name with "a" or "an" depending on whether it starts with a
16351
- * vowel or not
16352
- * @author Gabe Abrams
16353
- * @param text the text to prefix
16354
- * @param capitalize whether to capitalize the "A" or "An"
16355
- * @returns the text prefixed with "a" or "an"
16356
- */
16357
- const prefixWithAOrAn = (text, capitalize = false) => {
16358
- // Get the first letter
16359
- const firstLetter = text.charAt(0).toLowerCase();
16360
- // Check if starts with vowel
16361
- const startsWithVowel = VOWELS.includes(firstLetter);
16362
- // Determine prefix
16363
- let prefix = startsWithVowel ? 'an' : 'a';
16364
- if (capitalize) {
16365
- prefix = prefix.charAt(0).toUpperCase() + prefix.substring(1);
16366
- }
16367
- // Return the text prefixed with "a" or "an"
16368
- return `${prefix} ${text}`;
16369
- };
16370
-
16371
14549
  /* -------- State Definition -------- */
16372
14550
  /* ------------- Reducer ------------ */
16373
14551
  /**
@@ -16402,336 +14580,6 @@ const useForceRender = (useReducer) => {
16402
14580
  };
16403
14581
  };
16404
14582
 
16405
- /**
16406
- * Run the operator function on each item in the array, returning true if
16407
- * the operator function returns true for every item in the array
16408
- * @author Gabe Abrams
16409
- * @param operatorFunction the operator function to apply. If it returns true
16410
- * for every item, this function will return true
16411
- * @returns true if the operator function returns true for every item in the array
16412
- */
16413
- const everyAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16414
- // Create break logic
16415
- let done = false;
16416
- /**
16417
- * Break the loop (checking stops here)
16418
- * @author Gabe Abrams
16419
- */
16420
- const breakNow = () => {
16421
- done = true;
16422
- };
16423
- // Loop through each item, checking
16424
- for (let i = 0; i < array.length && !done; i++) {
16425
- const passed = yield operatorFunction(array[i], i, {
16426
- breakNow,
16427
- array,
16428
- });
16429
- // Check if this one failed or if loop was broken
16430
- if (!passed || done) {
16431
- return false;
16432
- }
16433
- }
16434
- // Return true because none returned false
16435
- return true;
16436
- });
16437
-
16438
- /**
16439
- * Run the operator function on each item in the array, returning a new array
16440
- * that only contains the items that pass the filter
16441
- * @author Gabe Abrams
16442
- * @param operatorFunction the operator function to apply. If it returns true
16443
- * for an item, the item will be included in the returned array
16444
- * @returns the filtered array
16445
- */
16446
- const filterAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16447
- // Create break logic
16448
- let done = false;
16449
- /**
16450
- * Break the loop (filtering stops here)
16451
- * @author Gabe Abrams
16452
- */
16453
- const breakNow = () => {
16454
- done = true;
16455
- };
16456
- // Loop through each item, filtering
16457
- const output = [];
16458
- for (let i = 0; i < array.length && !done; i++) {
16459
- const included = yield operatorFunction(array[i], i, {
16460
- breakNow,
16461
- array,
16462
- });
16463
- if (included && !done) {
16464
- output.push(array[i]);
16465
- }
16466
- }
16467
- // Return results
16468
- return output;
16469
- });
16470
-
16471
- /**
16472
- * Run the operator function on each item in the array
16473
- * @author Gabe Abrams
16474
- * @param operatorFunction the operator function to apply
16475
- */
16476
- const forEachAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16477
- // Create break logic
16478
- let done = false;
16479
- /**
16480
- * Break the loop
16481
- * @author Gabe Abrams
16482
- */
16483
- const breakNow = () => {
16484
- done = true;
16485
- };
16486
- // Loop through each item
16487
- for (let i = 0; i < array.length && !done; i++) {
16488
- yield operatorFunction(array[i], i, {
16489
- breakNow,
16490
- array,
16491
- });
16492
- }
16493
- });
16494
-
16495
- /**
16496
- * Run the operator function on each item in the array, collecting all results
16497
- * @author Gabe Abrams
16498
- * @param operatorFunction the operator function to apply
16499
- * @returns the array of results
16500
- */
16501
- const mapAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16502
- // Create break logic
16503
- let done = false;
16504
- /**
16505
- * Break the loop
16506
- * @author Gabe Abrams
16507
- */
16508
- const breakNow = () => {
16509
- done = true;
16510
- };
16511
- // Loop through each item, collecting results
16512
- const results = [];
16513
- for (let i = 0; i < array.length && !done; i++) {
16514
- const result = yield operatorFunction(array[i], i, {
16515
- breakNow,
16516
- array,
16517
- });
16518
- results.push(result);
16519
- }
16520
- // Return results
16521
- return results;
16522
- });
16523
-
16524
- /**
16525
- * Run the operator function on each item in the array, returning true if
16526
- * the operator function returns true for any item in the array
16527
- * @author Gabe Abrams
16528
- * @param operatorFunction the operator function to apply. If it returns true
16529
- * for any item, this function will return true
16530
- * @returns true if the operator function returns true for any item in the array
16531
- */
16532
- const someAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0, function* () {
16533
- // Create break logic
16534
- let done = false;
16535
- /**
16536
- * Break the loop (checking stops here)
16537
- * @author Gabe Abrams
16538
- */
16539
- const breakNow = () => {
16540
- done = true;
16541
- };
16542
- // Loop through each item, checking
16543
- for (let i = 0; i < array.length && !done; i++) {
16544
- const passed = yield operatorFunction(array[i], i, {
16545
- breakNow,
16546
- array,
16547
- });
16548
- if (passed && !done) {
16549
- return true;
16550
- }
16551
- }
16552
- // Return false because none returned true
16553
- return false;
16554
- });
16555
-
16556
- /**
16557
- * Capitalize every word in a string (just the first letter)
16558
- * @param str string to capitalize
16559
- * @returns string with every word capitalized
16560
- */
16561
- const capitalize = (str) => {
16562
- return (str
16563
- // Split into words
16564
- .split(' ')
16565
- // Capitalize first letter of each word
16566
- .map((word) => {
16567
- return word.charAt(0).toUpperCase() + word.substring(1);
16568
- })
16569
- // Join back together
16570
- .join(' '));
16571
- };
16572
-
16573
- /**
16574
- * Shuffle a given array
16575
- * @author Austen Money
16576
- * @param arr the array to shuffle
16577
- * @returns the shuffled array
16578
- */
16579
- const shuffleArray = (arr) => {
16580
- const newArr = [...arr];
16581
- // Shuffle using Durstenfeld algorithm
16582
- for (let i = arr.length - 1; i > 0; i--) {
16583
- const j = Math.floor(Math.random() * (i + 1));
16584
- [newArr[i], newArr[j]] = [newArr[j], newArr[i]];
16585
- }
16586
- return newArr;
16587
- };
16588
-
16589
- const punctuationRegex = /[!@#$%^&*(),.?\/;:'"\-\[\]]/g;
16590
- /**
16591
- * Get number of words in string
16592
- * @author Gardenia Liu
16593
- * @author Allison Zhang
16594
- * @author Gabe Abrams
16595
- * @param text the string to check
16596
- * @returns number of words in the string
16597
- */
16598
- const getWordCount = (text) => {
16599
- const trimmedTextWithoutPunctuation = (text
16600
- // Remove leading and trailing whitespace
16601
- .trim()
16602
- // Remove punctuation
16603
- .replace(punctuationRegex, ''));
16604
- if (trimmedTextWithoutPunctuation.length === 0) {
16605
- return 0;
16606
- }
16607
- return trimmedTextWithoutPunctuation.split(/\s+/g).length;
16608
- };
16609
-
16610
- // Import shared types
16611
- /*----------------------------------------*/
16612
- /* --------------- Helpers -------------- */
16613
- /*----------------------------------------*/
16614
- /**
16615
- * Check if a timestamp is valid
16616
- * @author Gabe Abrams
16617
- * @author Gardenia Liu
16618
- * @param opts object containing all arguments
16619
- * @param opts.timestamp Timestamp in milliseconds since epoch
16620
- * @param opts.expectedYear Expected year
16621
- * @param opts.expectedMonth Expected month
16622
- * @param opts.expectedDay Expected day
16623
- * @param opts.expectedHour Expected hour
16624
- * @param opts.expectedMinute Expected minute
16625
- * @returns 1 if the timestamp needs to be increased, -1 if it needs to be decreased, 0 if it is valid
16626
- */
16627
- const checkTimestamp = (opts) => {
16628
- const { timestamp, expectedYear, expectedMonth, expectedDay, expectedHour, expectedMinute, } = opts;
16629
- const timeInfoInET = getTimeInfoInET(timestamp);
16630
- if (timeInfoInET.year < expectedYear) {
16631
- return 1;
16632
- }
16633
- if (timeInfoInET.year > expectedYear) {
16634
- return -1;
16635
- }
16636
- if (timeInfoInET.month < expectedMonth) {
16637
- return 1;
16638
- }
16639
- if (timeInfoInET.month > expectedMonth) {
16640
- return -1;
16641
- }
16642
- if (timeInfoInET.day < expectedDay) {
16643
- return 1;
16644
- }
16645
- if (timeInfoInET.day > expectedDay) {
16646
- return -1;
16647
- }
16648
- if (timeInfoInET.hour < expectedHour) {
16649
- return 1;
16650
- }
16651
- if (timeInfoInET.hour > expectedHour) {
16652
- return -1;
16653
- }
16654
- if (timeInfoInET.minute < expectedMinute) {
16655
- return 1;
16656
- }
16657
- if (timeInfoInET.minute > expectedMinute) {
16658
- return -1;
16659
- }
16660
- return 0;
16661
- };
16662
- /*----------------------------------------*/
16663
- /* ---------------- Main ---------------- */
16664
- /*----------------------------------------*/
16665
- /**
16666
- * Get a timestamp (ms since epoch) from time info (year, month, day, hour, minute, etc.) in Eastern Time (ET)
16667
- * @author Gardenia Liu
16668
- * @author Gabe Abrams
16669
- * @param opts object containing all arguments
16670
- * @param opts.year Year (e.g. 2023)
16671
- * @param opts.month Month (1-12)
16672
- * @param opts.day Day of the month (1-31)
16673
- * @param opts.hour Hour (0-23)
16674
- * @param opts.minute Minute (0-59)
16675
- * @returns Timestamp in milliseconds since epoch
16676
- */
16677
- const getTimestampFromTimeInfoInET = (opts) => {
16678
- // Destructure opts
16679
- const { year, month, day, hour, minute, } = opts;
16680
- // Determine if the date is in DST in Eastern Time
16681
- const tempDate = new Date(year, month - 1, day);
16682
- const janOffset = new Date(year, 0, 1).getTimezoneOffset();
16683
- const isDST = tempDate.getTimezoneOffset() < janOffset;
16684
- const etOffset = isDST ? '-04:00' : '-05:00';
16685
- // Format with leading zeroes
16686
- const mm = padZerosLeft(month, 2);
16687
- const dd = padZerosLeft(day, 2);
16688
- const hh = padZerosLeft(hour, 2);
16689
- const min = padZerosLeft(minute, 2);
16690
- // Build ET ISO string and convert to UTC timestamp
16691
- const etISOString = `${year}-${mm}-${dd}T${hh}:${min}:00${etOffset}`;
16692
- const baseTimestamp = (new Date(etISOString)).getTime();
16693
- let timestamp = baseTimestamp;
16694
- // Heat seek to get the right timestamp
16695
- const maxOffset = 24 * 60; // 24 hours in minutes
16696
- let currentOffset = 0; // minutes
16697
- const offsetIncrement = 15; // minutes
16698
- const offsetDirection = checkTimestamp({
16699
- timestamp,
16700
- expectedYear: year,
16701
- expectedMonth: month,
16702
- expectedDay: day,
16703
- expectedHour: hour,
16704
- expectedMinute: minute,
16705
- });
16706
- if (offsetDirection === 0) {
16707
- // Valid! Return the timestamp
16708
- return timestamp;
16709
- }
16710
- // Heat seek
16711
- while (Math.abs(currentOffset) < maxOffset) {
16712
- // Update offset
16713
- currentOffset += (offsetDirection * offsetIncrement);
16714
- // Update timestamp
16715
- const offsetMs = currentOffset * 60 * 1000;
16716
- timestamp = baseTimestamp + offsetMs;
16717
- // Check timestamp again
16718
- const newDirection = checkTimestamp({
16719
- timestamp,
16720
- expectedYear: year,
16721
- expectedMonth: month,
16722
- expectedDay: day,
16723
- expectedHour: hour,
16724
- expectedMinute: minute,
16725
- });
16726
- if (newDirection === 0) {
16727
- // Valid! Return the timestamp
16728
- return timestamp;
16729
- }
16730
- // Invalid. Keep looping.
16731
- }
16732
- 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);
16733
- };
16734
-
16735
14583
  /*------------------------------------------------------------------------*/
16736
14584
  /* ------------------------------- Caching ------------------------------ */
16737
14585
  /*------------------------------------------------------------------------*/
@@ -16753,7 +14601,7 @@ const isSelectAdmin = () => __awaiter(void 0, void 0, void 0, function* () {
16753
14601
  // Check if the user is a select admin
16754
14602
  try {
16755
14603
  const userIsSelectAdmin = yield visitServerEndpoint({
16756
- path: SELECT_ADMIN_CHECK_ROUTE,
14604
+ path: dceCommonkit.SELECT_ADMIN_CHECK_ROUTE,
16757
14605
  method: 'GET',
16758
14606
  });
16759
14607
  // Cache the result
@@ -16768,127 +14616,279 @@ const isSelectAdmin = () => __awaiter(void 0, void 0, void 0, function* () {
16768
14616
  }
16769
14617
  });
16770
14618
 
16771
- /**
16772
- * Days of the week
16773
- * @author Gabe Abrams
16774
- */
16775
- var DayOfWeek;
16776
- (function (DayOfWeek) {
16777
- DayOfWeek["Monday"] = "m";
16778
- DayOfWeek["Tuesday"] = "t";
16779
- DayOfWeek["Wednesday"] = "w";
16780
- DayOfWeek["Thursday"] = "r";
16781
- DayOfWeek["Friday"] = "f";
16782
- DayOfWeek["Saturday"] = "s";
16783
- DayOfWeek["Sunday"] = "u";
16784
- })(DayOfWeek || (DayOfWeek = {}));
16785
- var DayOfWeek$1 = DayOfWeek;
16786
-
14619
+ Object.defineProperty(exports, 'CommonKitErrorCode', {
14620
+ enumerable: true,
14621
+ get: function () { return dceCommonkit.CommonKitErrorCode; }
14622
+ });
14623
+ Object.defineProperty(exports, 'DAY_IN_MS', {
14624
+ enumerable: true,
14625
+ get: function () { return dceCommonkit.DAY_IN_MS; }
14626
+ });
14627
+ Object.defineProperty(exports, 'DayOfWeek', {
14628
+ enumerable: true,
14629
+ get: function () { return dceCommonkit.DayOfWeek; }
14630
+ });
14631
+ Object.defineProperty(exports, 'ErrorWithCode', {
14632
+ enumerable: true,
14633
+ get: function () { return dceCommonkit.ErrorWithCode; }
14634
+ });
14635
+ Object.defineProperty(exports, 'HOUR_IN_MS', {
14636
+ enumerable: true,
14637
+ get: function () { return dceCommonkit.HOUR_IN_MS; }
14638
+ });
14639
+ Object.defineProperty(exports, 'LOG_REVIEW_GET_LOGS_ROUTE', {
14640
+ enumerable: true,
14641
+ get: function () { return dceCommonkit.LOG_REVIEW_GET_LOGS_ROUTE; }
14642
+ });
14643
+ Object.defineProperty(exports, 'LOG_REVIEW_ROUTE_PATH_PREFIX', {
14644
+ enumerable: true,
14645
+ get: function () { return dceCommonkit.LOG_REVIEW_ROUTE_PATH_PREFIX; }
14646
+ });
14647
+ Object.defineProperty(exports, 'LOG_REVIEW_STATUS_ROUTE', {
14648
+ enumerable: true,
14649
+ get: function () { return dceCommonkit.LOG_REVIEW_STATUS_ROUTE; }
14650
+ });
14651
+ Object.defineProperty(exports, 'LOG_ROUTE_PATH', {
14652
+ enumerable: true,
14653
+ get: function () { return dceCommonkit.LOG_ROUTE_PATH; }
14654
+ });
14655
+ Object.defineProperty(exports, 'LogAction', {
14656
+ enumerable: true,
14657
+ get: function () { return dceCommonkit.LogAction; }
14658
+ });
14659
+ Object.defineProperty(exports, 'LogBuiltInMetadata', {
14660
+ enumerable: true,
14661
+ get: function () { return dceCommonkit.LogBuiltInMetadata; }
14662
+ });
14663
+ Object.defineProperty(exports, 'LogLevel', {
14664
+ enumerable: true,
14665
+ get: function () { return dceCommonkit.LogLevel; }
14666
+ });
14667
+ Object.defineProperty(exports, 'LogSource', {
14668
+ enumerable: true,
14669
+ get: function () { return dceCommonkit.LogSource; }
14670
+ });
14671
+ Object.defineProperty(exports, 'LogType', {
14672
+ enumerable: true,
14673
+ get: function () { return dceCommonkit.LogType; }
14674
+ });
14675
+ Object.defineProperty(exports, 'MINUTE_IN_MS', {
14676
+ enumerable: true,
14677
+ get: function () { return dceCommonkit.MINUTE_IN_MS; }
14678
+ });
14679
+ Object.defineProperty(exports, 'ParamType', {
14680
+ enumerable: true,
14681
+ get: function () { return dceCommonkit.ParamType; }
14682
+ });
14683
+ Object.defineProperty(exports, 'SELECT_ADMIN_CHECK_ROUTE', {
14684
+ enumerable: true,
14685
+ get: function () { return dceCommonkit.SELECT_ADMIN_CHECK_ROUTE; }
14686
+ });
14687
+ Object.defineProperty(exports, 'abbreviate', {
14688
+ enumerable: true,
14689
+ get: function () { return dceCommonkit.abbreviate; }
14690
+ });
14691
+ Object.defineProperty(exports, 'avg', {
14692
+ enumerable: true,
14693
+ get: function () { return dceCommonkit.avg; }
14694
+ });
14695
+ Object.defineProperty(exports, 'capitalize', {
14696
+ enumerable: true,
14697
+ get: function () { return dceCommonkit.capitalize; }
14698
+ });
14699
+ Object.defineProperty(exports, 'ceilToNumDecimals', {
14700
+ enumerable: true,
14701
+ get: function () { return dceCommonkit.ceilToNumDecimals; }
14702
+ });
14703
+ Object.defineProperty(exports, 'cloneDeep', {
14704
+ enumerable: true,
14705
+ get: function () { return dceCommonkit.cloneDeep; }
14706
+ });
14707
+ Object.defineProperty(exports, 'compareArraysByProp', {
14708
+ enumerable: true,
14709
+ get: function () { return dceCommonkit.compareArraysByProp; }
14710
+ });
14711
+ Object.defineProperty(exports, 'everyAsync', {
14712
+ enumerable: true,
14713
+ get: function () { return dceCommonkit.everyAsync; }
14714
+ });
14715
+ Object.defineProperty(exports, 'extractProp', {
14716
+ enumerable: true,
14717
+ get: function () { return dceCommonkit.extractProp; }
14718
+ });
14719
+ Object.defineProperty(exports, 'filterAsync', {
14720
+ enumerable: true,
14721
+ get: function () { return dceCommonkit.filterAsync; }
14722
+ });
14723
+ Object.defineProperty(exports, 'floorToNumDecimals', {
14724
+ enumerable: true,
14725
+ get: function () { return dceCommonkit.floorToNumDecimals; }
14726
+ });
14727
+ Object.defineProperty(exports, 'forEachAsync', {
14728
+ enumerable: true,
14729
+ get: function () { return dceCommonkit.forEachAsync; }
14730
+ });
14731
+ Object.defineProperty(exports, 'forceNumIntoBounds', {
14732
+ enumerable: true,
14733
+ get: function () { return dceCommonkit.forceNumIntoBounds; }
14734
+ });
14735
+ Object.defineProperty(exports, 'genCSV', {
14736
+ enumerable: true,
14737
+ get: function () { return dceCommonkit.genCSV; }
14738
+ });
14739
+ Object.defineProperty(exports, 'genCommaList', {
14740
+ enumerable: true,
14741
+ get: function () { return dceCommonkit.genCommaList; }
14742
+ });
14743
+ Object.defineProperty(exports, 'getHumanReadableDate', {
14744
+ enumerable: true,
14745
+ get: function () { return dceCommonkit.getHumanReadableDate; }
14746
+ });
14747
+ Object.defineProperty(exports, 'getLocalTimeInfo', {
14748
+ enumerable: true,
14749
+ get: function () { return dceCommonkit.getLocalTimeInfo; }
14750
+ });
14751
+ Object.defineProperty(exports, 'getMonthName', {
14752
+ enumerable: true,
14753
+ get: function () { return dceCommonkit.getMonthName; }
14754
+ });
14755
+ Object.defineProperty(exports, 'getOrdinal', {
14756
+ enumerable: true,
14757
+ get: function () { return dceCommonkit.getOrdinal; }
14758
+ });
14759
+ Object.defineProperty(exports, 'getPartOfDay', {
14760
+ enumerable: true,
14761
+ get: function () { return dceCommonkit.getPartOfDay; }
14762
+ });
14763
+ Object.defineProperty(exports, 'getTimeInfoInET', {
14764
+ enumerable: true,
14765
+ get: function () { return dceCommonkit.getTimeInfoInET; }
14766
+ });
14767
+ Object.defineProperty(exports, 'getTimestampFromTimeInfoInET', {
14768
+ enumerable: true,
14769
+ get: function () { return dceCommonkit.getTimestampFromTimeInfoInET; }
14770
+ });
14771
+ Object.defineProperty(exports, 'getWordCount', {
14772
+ enumerable: true,
14773
+ get: function () { return dceCommonkit.getWordCount; }
14774
+ });
14775
+ Object.defineProperty(exports, 'idify', {
14776
+ enumerable: true,
14777
+ get: function () { return dceCommonkit.idify; }
14778
+ });
14779
+ Object.defineProperty(exports, 'mapAsync', {
14780
+ enumerable: true,
14781
+ get: function () { return dceCommonkit.mapAsync; }
14782
+ });
14783
+ Object.defineProperty(exports, 'onlyKeepLetters', {
14784
+ enumerable: true,
14785
+ get: function () { return dceCommonkit.onlyKeepLetters; }
14786
+ });
14787
+ Object.defineProperty(exports, 'padDecimalZeros', {
14788
+ enumerable: true,
14789
+ get: function () { return dceCommonkit.padDecimalZeros; }
14790
+ });
14791
+ Object.defineProperty(exports, 'padZerosLeft', {
14792
+ enumerable: true,
14793
+ get: function () { return dceCommonkit.padZerosLeft; }
14794
+ });
14795
+ Object.defineProperty(exports, 'parallelLimit', {
14796
+ enumerable: true,
14797
+ get: function () { return dceCommonkit.parallelLimit; }
14798
+ });
14799
+ Object.defineProperty(exports, 'prefixWithAOrAn', {
14800
+ enumerable: true,
14801
+ get: function () { return dceCommonkit.prefixWithAOrAn; }
14802
+ });
14803
+ Object.defineProperty(exports, 'roundToNumDecimals', {
14804
+ enumerable: true,
14805
+ get: function () { return dceCommonkit.roundToNumDecimals; }
14806
+ });
14807
+ Object.defineProperty(exports, 'shuffleArray', {
14808
+ enumerable: true,
14809
+ get: function () { return dceCommonkit.shuffleArray; }
14810
+ });
14811
+ Object.defineProperty(exports, 'someAsync', {
14812
+ enumerable: true,
14813
+ get: function () { return dceCommonkit.someAsync; }
14814
+ });
14815
+ Object.defineProperty(exports, 'startMinWait', {
14816
+ enumerable: true,
14817
+ get: function () { return dceCommonkit.startMinWait; }
14818
+ });
14819
+ Object.defineProperty(exports, 'stringsToHumanReadableList', {
14820
+ enumerable: true,
14821
+ get: function () { return dceCommonkit.stringsToHumanReadableList; }
14822
+ });
14823
+ Object.defineProperty(exports, 'sum', {
14824
+ enumerable: true,
14825
+ get: function () { return dceCommonkit.sum; }
14826
+ });
14827
+ Object.defineProperty(exports, 'validateEmail', {
14828
+ enumerable: true,
14829
+ get: function () { return dceCommonkit.validateEmail; }
14830
+ });
14831
+ Object.defineProperty(exports, 'validatePhoneNumber', {
14832
+ enumerable: true,
14833
+ get: function () { return dceCommonkit.validatePhoneNumber; }
14834
+ });
14835
+ Object.defineProperty(exports, 'validateString', {
14836
+ enumerable: true,
14837
+ get: function () { return dceCommonkit.validateString; }
14838
+ });
14839
+ Object.defineProperty(exports, 'waitMs', {
14840
+ enumerable: true,
14841
+ get: function () { return dceCommonkit.waitMs; }
14842
+ });
16787
14843
  exports.AppWrapper = AppWrapper;
16788
14844
  exports.AutoscrollToBottomContainer = AutoscrollToBottomContainer;
16789
14845
  exports.ButtonInputGroup = ButtonInputGroup;
16790
14846
  exports.CSVDownloadButton = CSVDownloadButton;
16791
14847
  exports.CheckboxButton = CheckboxButton;
16792
14848
  exports.CopiableBox = CopiableBox;
16793
- exports.DAY_IN_MS = DAY_IN_MS;
16794
14849
  exports.DBEntryFieldType = DBEntryFieldType$1;
16795
14850
  exports.DBEntryManagerPanel = DBEntryManagerPanel;
16796
- exports.DayOfWeek = DayOfWeek$1;
16797
14851
  exports.Drawer = Drawer;
16798
14852
  exports.Dropdown = Dropdown;
16799
14853
  exports.DropdownItemType = DropdownItemType$1;
16800
14854
  exports.DynamicWord = DynamicWord;
16801
14855
  exports.ErrorBox = ErrorBox;
16802
- exports.ErrorWithCode = ErrorWithCode;
16803
- exports.HOUR_IN_MS = HOUR_IN_MS;
16804
14856
  exports.IntelliTable = IntelliTable;
16805
14857
  exports.ItemPicker = ItemPicker;
16806
- exports.LOG_REVIEW_GET_LOGS_ROUTE = LOG_REVIEW_GET_LOGS_ROUTE;
16807
- exports.LOG_REVIEW_ROUTE_PATH_PREFIX = LOG_REVIEW_ROUTE_PATH_PREFIX;
16808
- exports.LOG_REVIEW_STATUS_ROUTE = LOG_REVIEW_STATUS_ROUTE;
16809
- exports.LOG_ROUTE_PATH = LOG_ROUTE_PATH;
16810
14858
  exports.LoadingSpinner = LoadingSpinner;
16811
- exports.LogAction = LogAction$1;
16812
- exports.LogBuiltInMetadata = LogBuiltInMetadata;
16813
- exports.LogLevel = LogLevel$1;
16814
14859
  exports.LogReviewer = LogReviewer;
16815
- exports.LogSource = LogSource$1;
16816
- exports.LogType = LogType$1;
16817
- exports.MINUTE_IN_MS = MINUTE_IN_MS;
16818
14860
  exports.Modal = Modal;
16819
14861
  exports.ModalButtonType = ModalButtonType$1;
16820
14862
  exports.ModalSize = ModalSize$1;
16821
14863
  exports.ModalType = ModalType$1;
16822
14864
  exports.MultiSwitch = MultiSwitch;
16823
- exports.ParamType = ParamType$1;
16824
14865
  exports.PopFailureMark = PopFailureMark;
16825
14866
  exports.PopPendingMark = PopPendingMark;
16826
14867
  exports.PopSuccessMark = PopSuccessMark;
16827
14868
  exports.ProgressBar = ProgressBar;
16828
14869
  exports.ProgressBarSize = ProgressBarSize$1;
16829
14870
  exports.RadioButton = RadioButton;
16830
- exports.ReactKitErrorCode = ReactKitErrorCode$1;
16831
- exports.SELECT_ADMIN_CHECK_ROUTE = SELECT_ADMIN_CHECK_ROUTE;
16832
14871
  exports.SimpleDateChooser = SimpleDateChooser;
16833
14872
  exports.SimpleTimeChooser = SimpleTimeChooser;
16834
14873
  exports.TabBox = TabBox;
16835
14874
  exports.ToggleSwitch = ToggleSwitch;
16836
14875
  exports.Tooltip = Tooltip;
16837
14876
  exports.Variant = Variant$1;
16838
- exports.abbreviate = abbreviate;
16839
14877
  exports.addFatalErrorHandler = addFatalErrorHandler;
16840
14878
  exports.alert = alert;
16841
- exports.avg = avg;
16842
14879
  exports.canReviewLogs = canReviewLogs;
16843
- exports.capitalize = capitalize;
16844
- exports.ceilToNumDecimals = ceilToNumDecimals;
16845
- exports.cloneDeep = cloneDeep;
16846
14880
  exports.combineClassNames = combineClassNames;
16847
- exports.compareArraysByProp = compareArraysByProp;
16848
14881
  exports.confirm = confirm;
16849
- exports.everyAsync = everyAsync;
16850
- exports.extractProp = extractProp;
16851
- exports.filterAsync = filterAsync;
16852
- exports.floorToNumDecimals = floorToNumDecimals;
16853
- exports.forEachAsync = forEachAsync;
16854
- exports.forceNumIntoBounds = forceNumIntoBounds;
16855
- exports.genCSV = genCSV;
16856
- exports.genCommaList = genCommaList;
16857
- exports.getHumanReadableDate = getHumanReadableDate;
16858
- exports.getLocalTimeInfo = getLocalTimeInfo;
16859
- exports.getMonthName = getMonthName;
16860
- exports.getOrdinal = getOrdinal;
16861
- exports.getPartOfDay = getPartOfDay;
16862
- exports.getTimeInfoInET = getTimeInfoInET;
16863
- exports.getTimestampFromTimeInfoInET = getTimestampFromTimeInfoInET;
16864
- exports.getWordCount = getWordCount;
16865
- exports.idify = idify;
16866
14882
  exports.initClient = initClient;
16867
14883
  exports.isMobileOrTablet = isMobileOrTablet;
16868
14884
  exports.isSelectAdmin = isSelectAdmin;
16869
14885
  exports.leaveToURL = leaveToURL;
16870
14886
  exports.logClientEvent = logClientEvent;
16871
14887
  exports.makeLinksClickable = makeLinksClickable;
16872
- exports.mapAsync = mapAsync;
16873
- exports.onlyKeepLetters = onlyKeepLetters;
16874
- exports.padDecimalZeros = padDecimalZeros;
16875
- exports.padZerosLeft = padZerosLeft;
16876
- exports.parallelLimit = parallelLimit;
16877
- exports.prefixWithAOrAn = prefixWithAOrAn;
16878
14888
  exports.prompt = prompt;
16879
- exports.roundToNumDecimals = roundToNumDecimals;
16880
14889
  exports.setClientEventMetadataPopulator = setClientEventMetadataPopulator;
16881
14890
  exports.showFatalError = showFatalError;
16882
- exports.shuffleArray = shuffleArray;
16883
- exports.someAsync = someAsync;
16884
- exports.startMinWait = startMinWait;
16885
- exports.stringsToHumanReadableList = stringsToHumanReadableList;
16886
14891
  exports.stubServerEndpoint = stubServerEndpoint;
16887
- exports.sum = sum;
16888
14892
  exports.useForceRender = useForceRender;
16889
- exports.validateEmail = validateEmail;
16890
- exports.validatePhoneNumber = validatePhoneNumber;
16891
- exports.validateString = validateString;
16892
14893
  exports.visitServerEndpoint = visitServerEndpoint;
16893
- exports.waitMs = waitMs;
16894
14894
  //# sourceMappingURL=index.js.map