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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/dist/cjs/index.js +405 -2374
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
  4. package/dist/cjs/types/helpers/logClientEvent.d.ts +1 -1
  5. package/dist/cjs/types/html/genErrorPage.d.ts +1 -1
  6. package/dist/cjs/types/index.d.ts +2 -64
  7. package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
  8. package/dist/cjs/types/types/ProgressBarSize.d.ts +1 -0
  9. package/dist/esm/index.js +145 -2281
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/types/components/LogReviewer.d.ts +1 -1
  12. package/dist/esm/types/helpers/logClientEvent.d.ts +1 -1
  13. package/dist/esm/types/html/genErrorPage.d.ts +1 -1
  14. package/dist/esm/types/index.d.ts +2 -64
  15. package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
  16. package/dist/esm/types/types/ProgressBarSize.d.ts +1 -0
  17. package/dist/index.d.ts +4 -835
  18. package/package.json +4 -3
  19. package/src/components/AppWrapper.tsx +12 -10
  20. package/src/components/AutoscrollToBottomContainer.tsx +5 -3
  21. package/src/components/CopiableBox.tsx +5 -1
  22. package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +2 -2
  23. package/src/components/ErrorBox.tsx +6 -2
  24. package/src/components/IntelliTable.tsx +7 -5
  25. package/src/components/LogReviewer.tsx +23 -21
  26. package/src/components/Modal/index.tsx +5 -3
  27. package/src/components/MultiSwitch.tsx +5 -1
  28. package/src/components/ProgressBar.tsx +75 -61
  29. package/src/components/Shimmer.tsx +4 -2
  30. package/src/components/SimpleDateChooser.tsx +11 -13
  31. package/src/components/SimpleTimeChooser.tsx +4 -2
  32. package/src/helpers/canReviewLogs.test.ts +5 -3
  33. package/src/helpers/canReviewLogs.ts +5 -3
  34. package/src/helpers/initClient.tsx +8 -8
  35. package/src/helpers/isMobileOrTablet.tsx +2 -1
  36. package/src/helpers/isSelectAdmin.ts +4 -2
  37. package/src/helpers/logClientEvent.tsx +7 -5
  38. package/src/helpers/stubServerEndpoint.tsx +1 -1
  39. package/src/helpers/visitServerEndpoint.tsx +10 -7
  40. package/src/html/genErrorPage.ts +6 -4
  41. package/src/index.ts +105 -98
  42. package/src/types/IntelliTableColumn.ts +4 -1
  43. package/src/types/ProgressBarSize.ts +1 -0
  44. package/dist/cjs/types/constants/DAY_IN_MS.d.ts +0 -6
  45. package/dist/cjs/types/constants/HOUR_IN_MS.d.ts +0 -6
  46. package/dist/cjs/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
  47. package/dist/cjs/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  48. package/dist/cjs/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
  49. package/dist/cjs/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
  50. package/dist/cjs/types/constants/MINUTE_IN_MS.d.ts +0 -6
  51. package/dist/cjs/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
  52. package/dist/cjs/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
  53. package/dist/cjs/types/errors/ErrorWithCode.d.ts +0 -9
  54. package/dist/cjs/types/helpers/abbreviate.d.ts +0 -10
  55. package/dist/cjs/types/helpers/abbreviate.test.d.ts +0 -5
  56. package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
  57. package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
  58. package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
  59. package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
  60. package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
  61. package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
  62. package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
  63. package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
  64. package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
  65. package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
  66. package/dist/cjs/types/helpers/avg.d.ts +0 -8
  67. package/dist/cjs/types/helpers/avg.test.d.ts +0 -5
  68. package/dist/cjs/types/helpers/capitalize.d.ts +0 -7
  69. package/dist/cjs/types/helpers/ceilToNumDecimals.d.ts +0 -9
  70. package/dist/cjs/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
  71. package/dist/cjs/types/helpers/cloneDeep.d.ts +0 -8
  72. package/dist/cjs/types/helpers/compareArraysByProp.d.ts +0 -13
  73. package/dist/cjs/types/helpers/compareArraysByProp.test.d.ts +0 -5
  74. package/dist/cjs/types/helpers/extractProp.d.ts +0 -12
  75. package/dist/cjs/types/helpers/extractProp.test.d.ts +0 -5
  76. package/dist/cjs/types/helpers/floorToNumDecimals.d.ts +0 -9
  77. package/dist/cjs/types/helpers/floorToNumDecimals.test.d.ts +0 -5
  78. package/dist/cjs/types/helpers/forceNumIntoBounds.d.ts +0 -10
  79. package/dist/cjs/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
  80. package/dist/cjs/types/helpers/genCSV.d.ts +0 -18
  81. package/dist/cjs/types/helpers/genCSV.test.d.ts +0 -5
  82. package/dist/cjs/types/helpers/genCommaList.d.ts +0 -12
  83. package/dist/cjs/types/helpers/genCommaList.test.d.ts +0 -1
  84. package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +0 -8
  85. package/dist/cjs/types/helpers/getHumanReadableDate.test.d.ts +0 -5
  86. package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +0 -19
  87. package/dist/cjs/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
  88. package/dist/cjs/types/helpers/getMonthName.d.ts +0 -14
  89. package/dist/cjs/types/helpers/getMonthName.test.d.ts +0 -5
  90. package/dist/cjs/types/helpers/getOrdinal.d.ts +0 -8
  91. package/dist/cjs/types/helpers/getOrdinal.test.d.ts +0 -5
  92. package/dist/cjs/types/helpers/getPartOfDay.d.ts +0 -7
  93. package/dist/cjs/types/helpers/getPartOfDay.test.d.ts +0 -5
  94. package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +0 -21
  95. package/dist/cjs/types/helpers/getTimeInfoInET.test.d.ts +0 -5
  96. package/dist/cjs/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
  97. package/dist/cjs/types/helpers/getWordCount.d.ts +0 -10
  98. package/dist/cjs/types/helpers/idify.d.ts +0 -9
  99. package/dist/cjs/types/helpers/onlyKeepLetters.d.ts +0 -8
  100. package/dist/cjs/types/helpers/padDecimalZeros.d.ts +0 -10
  101. package/dist/cjs/types/helpers/padZerosLeft.d.ts +0 -9
  102. package/dist/cjs/types/helpers/parallelLimit.d.ts +0 -12
  103. package/dist/cjs/types/helpers/prefixWithAOrAn.d.ts +0 -10
  104. package/dist/cjs/types/helpers/roundToNumDecimals.d.ts +0 -9
  105. package/dist/cjs/types/helpers/shuffleArray.d.ts +0 -8
  106. package/dist/cjs/types/helpers/startMinWait.d.ts +0 -9
  107. package/dist/cjs/types/helpers/stringsToHumanReadableList.d.ts +0 -10
  108. package/dist/cjs/types/helpers/sum.d.ts +0 -8
  109. package/dist/cjs/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
  110. package/dist/cjs/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
  111. package/dist/cjs/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
  112. package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
  113. package/dist/cjs/types/helpers/validators/validURL.d.ts +0 -8
  114. package/dist/cjs/types/helpers/validators/validateEmail.d.ts +0 -11
  115. package/dist/cjs/types/helpers/validators/validateEmail.test.d.ts +0 -1
  116. package/dist/cjs/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
  117. package/dist/cjs/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
  118. package/dist/cjs/types/helpers/validators/validateString.d.ts +0 -22
  119. package/dist/cjs/types/helpers/validators/validateString.test.d.ts +0 -1
  120. package/dist/cjs/types/helpers/waitMs.d.ts +0 -7
  121. package/dist/cjs/types/types/DayOfWeek.d.ts +0 -14
  122. package/dist/cjs/types/types/Log/LogMainInfo.d.ts +0 -39
  123. package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
  124. package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
  125. package/dist/cjs/types/types/Log/index.d.ts +0 -10
  126. package/dist/cjs/types/types/LogAction.d.ts +0 -29
  127. package/dist/cjs/types/types/LogBuiltInMetadata.d.ts +0 -16
  128. package/dist/cjs/types/types/LogFunction.d.ts +0 -24
  129. package/dist/cjs/types/types/LogLevel.d.ts +0 -10
  130. package/dist/cjs/types/types/LogMetadataContextMap.d.ts +0 -11
  131. package/dist/cjs/types/types/LogMetadataTagMap.d.ts +0 -8
  132. package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +0 -8
  133. package/dist/cjs/types/types/LogMetadataType.d.ts +0 -13
  134. package/dist/cjs/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
  135. package/dist/cjs/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
  136. package/dist/cjs/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
  137. package/dist/cjs/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
  138. package/dist/cjs/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
  139. package/dist/cjs/types/types/LogReviewerFilterState/index.d.ts +0 -17
  140. package/dist/cjs/types/types/LogSource.d.ts +0 -9
  141. package/dist/cjs/types/types/LogType.d.ts +0 -9
  142. package/dist/cjs/types/types/ParamType.d.ts +0 -17
  143. package/dist/cjs/types/types/ReactKitErrorCode.d.ts +0 -14
  144. package/dist/esm/types/constants/DAY_IN_MS.d.ts +0 -6
  145. package/dist/esm/types/constants/HOUR_IN_MS.d.ts +0 -6
  146. package/dist/esm/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
  147. package/dist/esm/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  148. package/dist/esm/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
  149. package/dist/esm/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
  150. package/dist/esm/types/constants/MINUTE_IN_MS.d.ts +0 -6
  151. package/dist/esm/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
  152. package/dist/esm/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
  153. package/dist/esm/types/errors/ErrorWithCode.d.ts +0 -9
  154. package/dist/esm/types/helpers/abbreviate.d.ts +0 -10
  155. package/dist/esm/types/helpers/abbreviate.test.d.ts +0 -5
  156. package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
  157. package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
  158. package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
  159. package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
  160. package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
  161. package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
  162. package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
  163. package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
  164. package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
  165. package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
  166. package/dist/esm/types/helpers/avg.d.ts +0 -8
  167. package/dist/esm/types/helpers/avg.test.d.ts +0 -5
  168. package/dist/esm/types/helpers/capitalize.d.ts +0 -7
  169. package/dist/esm/types/helpers/ceilToNumDecimals.d.ts +0 -9
  170. package/dist/esm/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
  171. package/dist/esm/types/helpers/cloneDeep.d.ts +0 -8
  172. package/dist/esm/types/helpers/compareArraysByProp.d.ts +0 -13
  173. package/dist/esm/types/helpers/compareArraysByProp.test.d.ts +0 -5
  174. package/dist/esm/types/helpers/extractProp.d.ts +0 -12
  175. package/dist/esm/types/helpers/extractProp.test.d.ts +0 -5
  176. package/dist/esm/types/helpers/floorToNumDecimals.d.ts +0 -9
  177. package/dist/esm/types/helpers/floorToNumDecimals.test.d.ts +0 -5
  178. package/dist/esm/types/helpers/forceNumIntoBounds.d.ts +0 -10
  179. package/dist/esm/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
  180. package/dist/esm/types/helpers/genCSV.d.ts +0 -18
  181. package/dist/esm/types/helpers/genCSV.test.d.ts +0 -5
  182. package/dist/esm/types/helpers/genCommaList.d.ts +0 -12
  183. package/dist/esm/types/helpers/genCommaList.test.d.ts +0 -1
  184. package/dist/esm/types/helpers/getHumanReadableDate.d.ts +0 -8
  185. package/dist/esm/types/helpers/getHumanReadableDate.test.d.ts +0 -5
  186. package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +0 -19
  187. package/dist/esm/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
  188. package/dist/esm/types/helpers/getMonthName.d.ts +0 -14
  189. package/dist/esm/types/helpers/getMonthName.test.d.ts +0 -5
  190. package/dist/esm/types/helpers/getOrdinal.d.ts +0 -8
  191. package/dist/esm/types/helpers/getOrdinal.test.d.ts +0 -5
  192. package/dist/esm/types/helpers/getPartOfDay.d.ts +0 -7
  193. package/dist/esm/types/helpers/getPartOfDay.test.d.ts +0 -5
  194. package/dist/esm/types/helpers/getTimeInfoInET.d.ts +0 -21
  195. package/dist/esm/types/helpers/getTimeInfoInET.test.d.ts +0 -5
  196. package/dist/esm/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
  197. package/dist/esm/types/helpers/getWordCount.d.ts +0 -10
  198. package/dist/esm/types/helpers/idify.d.ts +0 -9
  199. package/dist/esm/types/helpers/onlyKeepLetters.d.ts +0 -8
  200. package/dist/esm/types/helpers/padDecimalZeros.d.ts +0 -10
  201. package/dist/esm/types/helpers/padZerosLeft.d.ts +0 -9
  202. package/dist/esm/types/helpers/parallelLimit.d.ts +0 -12
  203. package/dist/esm/types/helpers/prefixWithAOrAn.d.ts +0 -10
  204. package/dist/esm/types/helpers/roundToNumDecimals.d.ts +0 -9
  205. package/dist/esm/types/helpers/shuffleArray.d.ts +0 -8
  206. package/dist/esm/types/helpers/startMinWait.d.ts +0 -9
  207. package/dist/esm/types/helpers/stringsToHumanReadableList.d.ts +0 -10
  208. package/dist/esm/types/helpers/sum.d.ts +0 -8
  209. package/dist/esm/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
  210. package/dist/esm/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
  211. package/dist/esm/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
  212. package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
  213. package/dist/esm/types/helpers/validators/validURL.d.ts +0 -8
  214. package/dist/esm/types/helpers/validators/validateEmail.d.ts +0 -11
  215. package/dist/esm/types/helpers/validators/validateEmail.test.d.ts +0 -1
  216. package/dist/esm/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
  217. package/dist/esm/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
  218. package/dist/esm/types/helpers/validators/validateString.d.ts +0 -22
  219. package/dist/esm/types/helpers/validators/validateString.test.d.ts +0 -1
  220. package/dist/esm/types/helpers/waitMs.d.ts +0 -7
  221. package/dist/esm/types/types/DayOfWeek.d.ts +0 -14
  222. package/dist/esm/types/types/Log/LogMainInfo.d.ts +0 -39
  223. package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
  224. package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
  225. package/dist/esm/types/types/Log/index.d.ts +0 -10
  226. package/dist/esm/types/types/LogAction.d.ts +0 -29
  227. package/dist/esm/types/types/LogBuiltInMetadata.d.ts +0 -16
  228. package/dist/esm/types/types/LogFunction.d.ts +0 -24
  229. package/dist/esm/types/types/LogLevel.d.ts +0 -10
  230. package/dist/esm/types/types/LogMetadataContextMap.d.ts +0 -11
  231. package/dist/esm/types/types/LogMetadataTagMap.d.ts +0 -8
  232. package/dist/esm/types/types/LogMetadataTargetMap.d.ts +0 -8
  233. package/dist/esm/types/types/LogMetadataType.d.ts +0 -13
  234. package/dist/esm/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
  235. package/dist/esm/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
  236. package/dist/esm/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
  237. package/dist/esm/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
  238. package/dist/esm/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
  239. package/dist/esm/types/types/LogReviewerFilterState/index.d.ts +0 -17
  240. package/dist/esm/types/types/LogSource.d.ts +0 -9
  241. package/dist/esm/types/types/LogType.d.ts +0 -9
  242. package/dist/esm/types/types/ParamType.d.ts +0 -17
  243. package/dist/esm/types/types/ReactKitErrorCode.d.ts +0 -14
  244. package/src/constants/DAY_IN_MS.ts +0 -7
  245. package/src/constants/HOUR_IN_MS.ts +0 -7
  246. package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +0 -9
  247. package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +0 -9
  248. package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +0 -10
  249. package/src/constants/LOG_ROUTE_PATH.ts +0 -9
  250. package/src/constants/MINUTE_IN_MS.ts +0 -7
  251. package/src/constants/ROUTE_PATH_PREFIX.ts +0 -7
  252. package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +0 -7
  253. package/src/errors/ErrorWithCode.tsx +0 -15
  254. package/src/helpers/abbreviate.test.ts +0 -26
  255. package/src/helpers/abbreviate.ts +0 -25
  256. package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +0 -114
  257. package/src/helpers/asyncArrayFunctions/everyAsync.ts +0 -51
  258. package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +0 -126
  259. package/src/helpers/asyncArrayFunctions/filterAsync.ts +0 -50
  260. package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +0 -136
  261. package/src/helpers/asyncArrayFunctions/forEachAsync.ts +0 -40
  262. package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +0 -125
  263. package/src/helpers/asyncArrayFunctions/mapAsync.ts +0 -46
  264. package/src/helpers/asyncArrayFunctions/someAsync.test.ts +0 -92
  265. package/src/helpers/asyncArrayFunctions/someAsync.ts +0 -49
  266. package/src/helpers/avg.test.ts +0 -24
  267. package/src/helpers/avg.ts +0 -22
  268. package/src/helpers/capitalize.ts +0 -20
  269. package/src/helpers/ceilToNumDecimals.test.ts +0 -39
  270. package/src/helpers/ceilToNumDecimals.ts +0 -13
  271. package/src/helpers/cloneDeep.ts +0 -11
  272. package/src/helpers/compareArraysByProp.test.ts +0 -147
  273. package/src/helpers/compareArraysByProp.ts +0 -56
  274. package/src/helpers/extractProp.test.ts +0 -34
  275. package/src/helpers/extractProp.ts +0 -17
  276. package/src/helpers/floorToNumDecimals.test.ts +0 -39
  277. package/src/helpers/floorToNumDecimals.ts +0 -13
  278. package/src/helpers/forceNumIntoBounds.test.ts +0 -34
  279. package/src/helpers/forceNumIntoBounds.ts +0 -19
  280. package/src/helpers/genCSV.test.ts +0 -75
  281. package/src/helpers/genCSV.ts +0 -87
  282. package/src/helpers/genCommaList.test.ts +0 -57
  283. package/src/helpers/genCommaList.ts +0 -21
  284. package/src/helpers/getHumanReadableDate.test.ts +0 -29
  285. package/src/helpers/getHumanReadableDate.ts +0 -36
  286. package/src/helpers/getLocalTimeInfo.test.ts +0 -48
  287. package/src/helpers/getLocalTimeInfo.ts +0 -58
  288. package/src/helpers/getMonthName.test.ts +0 -79
  289. package/src/helpers/getMonthName.ts +0 -29
  290. package/src/helpers/getOrdinal.test.ts +0 -84
  291. package/src/helpers/getOrdinal.ts +0 -14
  292. package/src/helpers/getPartOfDay.test.ts +0 -56
  293. package/src/helpers/getPartOfDay.ts +0 -20
  294. package/src/helpers/getTimeInfoInET.test.ts +0 -72
  295. package/src/helpers/getTimeInfoInET.ts +0 -79
  296. package/src/helpers/getTimestampFromTimeInfoInET.ts +0 -179
  297. package/src/helpers/getWordCount.ts +0 -26
  298. package/src/helpers/idify.ts +0 -24
  299. package/src/helpers/onlyKeepLetters.ts +0 -11
  300. package/src/helpers/padDecimalZeros.tsx +0 -32
  301. package/src/helpers/padZerosLeft.tsx +0 -21
  302. package/src/helpers/parallelLimit.ts +0 -76
  303. package/src/helpers/prefixWithAOrAn.ts +0 -29
  304. package/src/helpers/roundToNumDecimals.tsx +0 -13
  305. package/src/helpers/shuffleArray.ts +0 -19
  306. package/src/helpers/startMinWait.ts +0 -33
  307. package/src/helpers/stringsToHumanReadableList.ts +0 -39
  308. package/src/helpers/sum.tsx +0 -16
  309. package/src/helpers/validators/ChicagoTitleCase.test.ts +0 -85
  310. package/src/helpers/validators/ChicagoTitleCase.ts +0 -32
  311. package/src/helpers/validators/findURL.test.ts +0 -83
  312. package/src/helpers/validators/findURL.ts +0 -43
  313. package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +0 -18
  314. package/src/helpers/validators/shared/helpers/validateRegex.ts +0 -47
  315. package/src/helpers/validators/shared/types/ValidationResult.ts +0 -20
  316. package/src/helpers/validators/validURL.test.ts +0 -90
  317. package/src/helpers/validators/validURL.ts +0 -18
  318. package/src/helpers/validators/validateEmail.test.ts +0 -110
  319. package/src/helpers/validators/validateEmail.ts +0 -47
  320. package/src/helpers/validators/validatePhoneNumber.test.ts +0 -94
  321. package/src/helpers/validators/validatePhoneNumber.ts +0 -49
  322. package/src/helpers/validators/validateString.test.ts +0 -173
  323. package/src/helpers/validators/validateString.ts +0 -171
  324. package/src/helpers/waitMs.tsx +0 -12
  325. package/src/types/DayOfWeek.ts +0 -15
  326. package/src/types/Log/LogMainInfo.ts +0 -69
  327. package/src/types/Log/LogSourceSpecificInfo.ts +0 -25
  328. package/src/types/Log/LogTypeSpecificInfo.ts +0 -33
  329. package/src/types/Log/index.ts +0 -17
  330. package/src/types/LogAction.ts +0 -52
  331. package/src/types/LogBuiltInMetadata.ts +0 -19
  332. package/src/types/LogFunction.ts +0 -46
  333. package/src/types/LogLevel.ts +0 -11
  334. package/src/types/LogMetadataContextMap.ts +0 -15
  335. package/src/types/LogMetadataTagMap.ts +0 -9
  336. package/src/types/LogMetadataTargetMap.ts +0 -9
  337. package/src/types/LogMetadataType.ts +0 -16
  338. package/src/types/LogReviewerFilterState/ActionErrorFilterState.ts +0 -24
  339. package/src/types/LogReviewerFilterState/AdvancedFilterState.ts +0 -36
  340. package/src/types/LogReviewerFilterState/ContextFilterState.ts +0 -16
  341. package/src/types/LogReviewerFilterState/DateFilterState.ts +0 -26
  342. package/src/types/LogReviewerFilterState/TagFilterState.ts +0 -9
  343. package/src/types/LogReviewerFilterState/index.ts +0 -24
  344. package/src/types/LogSource.ts +0 -12
  345. package/src/types/LogType.ts +0 -12
  346. package/src/types/ParamType.ts +0 -18
  347. package/src/types/ReactKitErrorCode.tsx +0 -17
@@ -1,5 +1,5 @@
1
1
  // True if user is on mobile or tablet
2
- let cachedResult: boolean | undefined = undefined;
2
+ let cachedResult: boolean | undefined;
3
3
 
4
4
  /**
5
5
  * Check if the user is on a mobile device or tablet
@@ -13,6 +13,7 @@ const isMobileOrTablet = () => {
13
13
 
14
14
  try {
15
15
  let check = false;
16
+ // eslint-disable-next-line max-len, no-useless-escape
16
17
  ((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))) check = true; })((navigator ?? {}).userAgent || (navigator ?? {}).vendor || ((window as any) ?? {}).opera);
17
18
  cachedResult = check;
18
19
  return cachedResult;
@@ -1,5 +1,7 @@
1
- // Import shared constants
2
- import SELECT_ADMIN_CHECK_ROUTE from '../constants/SELECT_ADMIN_CHECK_ROUTE';
1
+ // Import commonkit
2
+ import {
3
+ SELECT_ADMIN_CHECK_ROUTE,
4
+ } from 'dce-commonkit';
3
5
 
4
6
  // Import shared helpers
5
7
  import visitServerEndpoint from './visitServerEndpoint';
@@ -1,8 +1,10 @@
1
- // Import shared types
2
- import LOG_ROUTE_PATH from '../constants/LOG_ROUTE_PATH';
3
- import LogBuiltInMetadata from '../types/LogBuiltInMetadata';
4
- import LogFunction from '../types/LogFunction';
5
- import LogLevel from '../types/LogLevel';
1
+ // Import commonkit
2
+ import {
3
+ LOG_ROUTE_PATH,
4
+ LogBuiltInMetadata,
5
+ LogFunction,
6
+ LogLevel,
7
+ } from 'dce-commonkit';
6
8
 
7
9
  // Import shared functions
8
10
  // TODO: fix dependency cycle
@@ -1,4 +1,4 @@
1
- import { _setStubResponse } from './visitServerEndpoint'
1
+ import { _setStubResponse } from './visitServerEndpoint';
2
2
 
3
3
  /**
4
4
  * Stub a server endpoint response
@@ -1,8 +1,11 @@
1
+ // Import commonkit
2
+ import {
3
+ ErrorWithCode,
4
+ CommonKitErrorCode,
5
+ } from 'dce-commonkit';
6
+
1
7
  /* eslint-disable no-underscore-dangle */
2
8
  /* eslint-disable @typescript-eslint/naming-convention */
3
- // Import custom error
4
- import ErrorWithCode from '../errors/ErrorWithCode';
5
- import ReactKitErrorCode from '../types/ReactKitErrorCode';
6
9
 
7
10
  // Import helpers
8
11
  // TODO: fix dependency cycle
@@ -62,7 +65,7 @@ export const _setStubResponse = (
62
65
  } = opts;
63
66
  const method = (opts.method ?? 'GET').toUpperCase();
64
67
  const errorMessage = (opts.errorMessage ?? 'An unknown error has occurred.');
65
- const errorCode = (opts.errorCode ?? ReactKitErrorCode.NoCode);
68
+ const errorCode = (opts.errorCode ?? CommonKitErrorCode.NoCode);
66
69
 
67
70
  // Store to stub responses
68
71
  if (!stubResponses[method]) {
@@ -162,12 +165,12 @@ const visitServerEndpoint = async (
162
165
  if (!response || !response.body) {
163
166
  throw new ErrorWithCode(
164
167
  'We didn\'t get a response from the server. Please check your internet connection.',
165
- ReactKitErrorCode.NoResponse,
168
+ CommonKitErrorCode.NoResponse,
166
169
  );
167
170
  }
168
171
  if (!response.body.success) {
169
172
  // Session expired
170
- if (response.body.code === ReactKitErrorCode.SessionExpired) {
173
+ if (response.body.code === CommonKitErrorCode.SessionExpired) {
171
174
  showSessionExpiredMessage();
172
175
 
173
176
  // Never return (don't continue execution)
@@ -184,7 +187,7 @@ const visitServerEndpoint = async (
184
187
  ),
185
188
  (
186
189
  response.body.code
187
- || ReactKitErrorCode.NoCode
190
+ || CommonKitErrorCode.NoCode
188
191
  ),
189
192
  );
190
193
  }
@@ -1,5 +1,7 @@
1
- // Import shared types
2
- import ReactKitErrorCode from '../types/ReactKitErrorCode';
1
+ // Import commonkit
2
+ import {
3
+ CommonKitErrorCode,
4
+ } from 'dce-commonkit';
3
5
 
4
6
  /**
5
7
  * Generate a static error page
@@ -8,7 +10,7 @@ import ReactKitErrorCode from '../types/ReactKitErrorCode';
8
10
  * @param [opts.title=An Error Occurred] title of the error box
9
11
  * @param [opts.description=An unknown server error occurred. Please contact support.]
10
12
  * a human-readable description of the error
11
- * @param [opts.code=ReactKitErrorCode.NoCode] error code to show
13
+ * @param [opts.code=CommonKitErrorCode.NoCode] error code to show
12
14
  * @param [opts.pageTitle=opts.title] title of the page/tab if it differs from
13
15
  * the title of the error
14
16
  * @returns html of the page
@@ -27,7 +29,7 @@ const genErrorPage = (
27
29
  opts.description
28
30
  ?? 'An unknown server error occurred. Please contact support.'
29
31
  );
30
- const code = (opts.code ?? ReactKitErrorCode.NoCode);
32
+ const code = (opts.code ?? CommonKitErrorCode.NoCode);
31
33
 
32
34
  return `
33
35
  <head>
package/src/index.ts CHANGED
@@ -1,3 +1,74 @@
1
+ // Import dce-commonkit
2
+ import {
3
+ // Errors
4
+ ErrorWithCode,
5
+ // Constants
6
+ MINUTE_IN_MS,
7
+ HOUR_IN_MS,
8
+ DAY_IN_MS,
9
+ LOG_REVIEW_ROUTE_PATH_PREFIX,
10
+ LOG_ROUTE_PATH,
11
+ LOG_REVIEW_STATUS_ROUTE,
12
+ LOG_REVIEW_GET_LOGS_ROUTE,
13
+ SELECT_ADMIN_CHECK_ROUTE,
14
+ // Helpers
15
+ abbreviate,
16
+ avg,
17
+ ceilToNumDecimals,
18
+ floorToNumDecimals,
19
+ forceNumIntoBounds,
20
+ padDecimalZeros,
21
+ padZerosLeft,
22
+ roundToNumDecimals,
23
+ sum,
24
+ waitMs,
25
+ getOrdinal,
26
+ getTimeInfoInET,
27
+ startMinWait,
28
+ getHumanReadableDate,
29
+ getPartOfDay,
30
+ stringsToHumanReadableList,
31
+ onlyKeepLetters,
32
+ parallelLimit,
33
+ getMonthName,
34
+ genCSV,
35
+ extractProp,
36
+ compareArraysByProp,
37
+ getLocalTimeInfo,
38
+ genCommaList,
39
+ validateEmail,
40
+ validatePhoneNumber,
41
+ validateString,
42
+ idify,
43
+ prefixWithAOrAn,
44
+ everyAsync,
45
+ filterAsync,
46
+ forEachAsync,
47
+ mapAsync,
48
+ someAsync,
49
+ capitalize,
50
+ shuffleArray,
51
+ getWordCount,
52
+ cloneDeep,
53
+ getTimestampFromTimeInfoInET,
54
+ // Types
55
+ ParamType,
56
+ DayOfWeek,
57
+ Log,
58
+ LogType,
59
+ LogSource,
60
+ LogAction,
61
+ LogBuiltInMetadata,
62
+ LogMetadataType,
63
+ LogFunction,
64
+ LogTypeSpecificInfo,
65
+ LogMainInfo,
66
+ LogSourceSpecificInfo,
67
+ LogLevel,
68
+ CommonKitErrorCode,
69
+ LogReviewerFilterState,
70
+ } from 'dce-commonkit';
71
+
1
72
  // Import components
2
73
  import AppWrapper, {
3
74
  alert,
@@ -33,95 +104,28 @@ import MultiSwitch from './components/MultiSwitch';
33
104
  import Dropdown from './components/Dropdown';
34
105
  import ProgressBar from './components/ProgressBar';
35
106
 
36
- // Import errors
37
- import ErrorWithCode from './errors/ErrorWithCode';
38
-
39
- // Import constants
40
- import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
41
- import HOUR_IN_MS from './constants/HOUR_IN_MS';
42
- import DAY_IN_MS from './constants/DAY_IN_MS';
43
- import LOG_REVIEW_ROUTE_PATH_PREFIX from './constants/LOG_REVIEW_ROUTE_PATH_PREFIX';
44
- import LOG_ROUTE_PATH from './constants/LOG_ROUTE_PATH';
45
- import LOG_REVIEW_STATUS_ROUTE from './constants/LOG_REVIEW_STATUS_ROUTE';
46
- import LOG_REVIEW_GET_LOGS_ROUTE from './constants/LOG_REVIEW_GET_LOGS_ROUTE';
47
- import SELECT_ADMIN_CHECK_ROUTE from './constants/SELECT_ADMIN_CHECK_ROUTE';
48
-
49
107
  // Import dynamic constants
50
108
  import DynamicWord from './dynamicConstants/DynamicWord';
51
109
 
52
110
  // Import helpers
53
111
  import initClient from './helpers/initClient';
54
- import abbreviate from './helpers/abbreviate';
55
- import avg from './helpers/avg';
56
- import ceilToNumDecimals from './helpers/ceilToNumDecimals';
57
- import floorToNumDecimals from './helpers/floorToNumDecimals';
58
- import forceNumIntoBounds from './helpers/forceNumIntoBounds';
59
- import padDecimalZeros from './helpers/padDecimalZeros';
60
- import padZerosLeft from './helpers/padZerosLeft';
61
- import roundToNumDecimals from './helpers/roundToNumDecimals';
62
- import sum from './helpers/sum';
63
- import waitMs from './helpers/waitMs';
64
112
  import visitServerEndpoint from './helpers/visitServerEndpoint';
65
- import getOrdinal from './helpers/getOrdinal';
66
- import getTimeInfoInET from './helpers/getTimeInfoInET';
67
113
  import stubServerEndpoint from './helpers/stubServerEndpoint';
68
- import startMinWait from './helpers/startMinWait';
69
- import getHumanReadableDate from './helpers/getHumanReadableDate';
70
- import getPartOfDay from './helpers/getPartOfDay';
71
- import stringsToHumanReadableList from './helpers/stringsToHumanReadableList';
72
- import onlyKeepLetters from './helpers/onlyKeepLetters';
73
- import parallelLimit from './helpers/parallelLimit';
74
114
  import logClientEvent, { setClientEventMetadataPopulator } from './helpers/logClientEvent';
75
- import getMonthName from './helpers/getMonthName';
76
- import genCSV from './helpers/genCSV';
77
115
  import canReviewLogs from './helpers/canReviewLogs';
78
116
  import isMobileOrTablet from './helpers/isMobileOrTablet';
79
- import extractProp from './helpers/extractProp';
80
- import compareArraysByProp from './helpers/compareArraysByProp';
81
- import getLocalTimeInfo from './helpers/getLocalTimeInfo';
82
- import genCommaList from './helpers/genCommaList';
83
- import validateEmail from './helpers/validators/validateEmail';
84
- import validatePhoneNumber from './helpers/validators/validatePhoneNumber';
85
- import validateString from './helpers/validators/validateString';
86
- import idify from './helpers/idify';
87
117
  import makeLinksClickable from './helpers/makeLinksClickable';
88
118
  import combineClassNames from './helpers/combineClassNames';
89
- import prefixWithAOrAn from './helpers/prefixWithAOrAn';
90
119
  import useForceRender from './helpers/useForceRender';
91
- import everyAsync from './helpers/asyncArrayFunctions/everyAsync';
92
- import filterAsync from './helpers/asyncArrayFunctions/filterAsync';
93
- import forEachAsync from './helpers/asyncArrayFunctions/forEachAsync';
94
- import mapAsync from './helpers/asyncArrayFunctions/mapAsync';
95
- import someAsync from './helpers/asyncArrayFunctions/someAsync';
96
- import capitalize from './helpers/capitalize';
97
- import shuffleArray from './helpers/shuffleArray';
98
- import getWordCount from './helpers/getWordCount';
99
- import cloneDeep from './helpers/cloneDeep';
100
- import getTimestampFromTimeInfoInET from './helpers/getTimestampFromTimeInfoInET';
101
120
  import isSelectAdmin from './helpers/isSelectAdmin';
102
121
 
103
122
  // Import types
104
- import ParamType from './types/ParamType';
105
123
  import ModalButtonType from './types/ModalButtonType';
106
124
  import ModalSize from './types/ModalSize';
107
125
  import ModalType from './types/ModalType';
108
126
  import Variant from './types/Variant';
109
- import DayOfWeek from './types/DayOfWeek';
110
- import Log from './types/Log';
111
- import LogType from './types/LogType';
112
- import LogSource from './types/LogSource';
113
- import LogAction from './types/LogAction';
114
- import LogBuiltInMetadata from './types/LogBuiltInMetadata';
115
- import LogMetadataType from './types/LogMetadataType';
116
- import LogFunction from './types/LogFunction';
117
- import LogTypeSpecificInfo from './types/Log/LogTypeSpecificInfo';
118
- import LogMainInfo from './types/Log/LogMainInfo';
119
- import LogSourceSpecificInfo from './types/Log/LogSourceSpecificInfo';
120
- import LogLevel from './types/LogLevel';
121
127
  import IntelliTableColumn from './types/IntelliTableColumn';
122
128
  import DropdownItemType from './types/DropdownItemType';
123
- import ReactKitErrorCode from './types/ReactKitErrorCode';
124
- import LogReviewerFilterState from './types/LogReviewerFilterState';
125
129
  import ProgressBarSize from './types/ProgressBarSize';
126
130
 
127
131
  // Component-specific-types
@@ -164,6 +168,38 @@ export {
164
168
  prompt,
165
169
  confirm,
166
170
  showFatalError,
171
+ // Dynamic Constants
172
+ DynamicWord,
173
+ // Helpers
174
+ stubServerEndpoint,
175
+ canReviewLogs,
176
+ isMobileOrTablet,
177
+ makeLinksClickable,
178
+ isSelectAdmin,
179
+ // Client helpers
180
+ initClient,
181
+ visitServerEndpoint,
182
+ logClientEvent,
183
+ addFatalErrorHandler,
184
+ leaveToURL,
185
+ combineClassNames,
186
+ useForceRender,
187
+ setClientEventMetadataPopulator,
188
+ // Types
189
+ ModalButtonType,
190
+ ModalSize,
191
+ ModalType,
192
+ Variant,
193
+ IntelliTableColumn,
194
+ DropdownItemType,
195
+ LogReviewerFilterState,
196
+ ProgressBarSize,
197
+ // Component-specific-types
198
+ PickableItem,
199
+ DBEntry,
200
+ DBEntryField,
201
+ DBEntryFieldType,
202
+ /* ------------- Common ------------- */
167
203
  // Errors
168
204
  ErrorWithCode,
169
205
  // Constants
@@ -175,8 +211,6 @@ export {
175
211
  LOG_REVIEW_STATUS_ROUTE,
176
212
  LOG_REVIEW_GET_LOGS_ROUTE,
177
213
  SELECT_ADMIN_CHECK_ROUTE,
178
- // Dynamic Constants
179
- DynamicWord,
180
214
  // Helpers
181
215
  abbreviate,
182
216
  avg,
@@ -190,7 +224,6 @@ export {
190
224
  waitMs,
191
225
  getOrdinal,
192
226
  getTimeInfoInET,
193
- stubServerEndpoint,
194
227
  startMinWait,
195
228
  getHumanReadableDate,
196
229
  getPartOfDay,
@@ -199,17 +232,14 @@ export {
199
232
  parallelLimit,
200
233
  getMonthName,
201
234
  genCSV,
202
- canReviewLogs,
203
- isMobileOrTablet,
204
235
  extractProp,
205
236
  compareArraysByProp,
237
+ getLocalTimeInfo,
206
238
  genCommaList,
207
239
  validateEmail,
208
240
  validatePhoneNumber,
209
241
  validateString,
210
- getLocalTimeInfo,
211
242
  idify,
212
- makeLinksClickable,
213
243
  prefixWithAOrAn,
214
244
  everyAsync,
215
245
  filterAsync,
@@ -221,23 +251,8 @@ export {
221
251
  getWordCount,
222
252
  cloneDeep,
223
253
  getTimestampFromTimeInfoInET,
224
- isSelectAdmin,
225
- // Client helpers
226
- initClient,
227
- visitServerEndpoint,
228
- logClientEvent,
229
- addFatalErrorHandler,
230
- leaveToURL,
231
- combineClassNames,
232
- useForceRender,
233
- setClientEventMetadataPopulator,
234
254
  // Types
235
255
  ParamType,
236
- ModalButtonType,
237
- ModalSize,
238
- ModalType,
239
- ReactKitErrorCode,
240
- Variant,
241
256
  DayOfWeek,
242
257
  Log,
243
258
  LogType,
@@ -250,13 +265,5 @@ export {
250
265
  LogMainInfo,
251
266
  LogSourceSpecificInfo,
252
267
  LogLevel,
253
- IntelliTableColumn,
254
- DropdownItemType,
255
- LogReviewerFilterState,
256
- ProgressBarSize,
257
- // Component-specific-types
258
- PickableItem,
259
- DBEntry,
260
- DBEntryField,
261
- DBEntryFieldType,
268
+ CommonKitErrorCode,
262
269
  };
@@ -1,4 +1,7 @@
1
- import ParamType from './ParamType';
1
+ // Import commonkit
2
+ import {
3
+ ParamType,
4
+ } from 'dce-commonkit';
2
5
 
3
6
  /**
4
7
  * Column description for a column in the IntelliTable
@@ -3,6 +3,7 @@
3
3
  * @author Allison Zhang
4
4
  */
5
5
  enum ProgressBarSize {
6
+ Small = 'Small',
6
7
  Medium = 'Medium',
7
8
  Large = 'Large',
8
9
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * One day in ms
3
- * @author Gabe Abrams
4
- */
5
- declare const DAY_IN_MS = 86400000;
6
- export default DAY_IN_MS;
@@ -1,6 +0,0 @@
1
- /**
2
- * One hour in ms
3
- * @author Gabe Abrams
4
- */
5
- declare const HOUR_IN_MS = 3600000;
6
- export default HOUR_IN_MS;
@@ -1,6 +0,0 @@
1
- /**
2
- * Path of the route for getting logs for log review
3
- * @author Gabe Abrams
4
- */
5
- declare const LOG_REVIEW_GET_LOGS_ROUTE: string;
6
- export default LOG_REVIEW_GET_LOGS_ROUTE;
@@ -1,6 +0,0 @@
1
- /**
2
- * Path of the route for storing client-side logs
3
- * @author Gabe Abrams
4
- */
5
- declare const LOG_REVIEW_ROUTE_PATH_PREFIX: string;
6
- export default LOG_REVIEW_ROUTE_PATH_PREFIX;
@@ -1,7 +0,0 @@
1
- /**
2
- * Route for checking the status of the current user's
3
- * access to log review
4
- * @author Gabe Abrams
5
- */
6
- declare const LOG_REVIEW_STATUS_ROUTE: string;
7
- export default LOG_REVIEW_STATUS_ROUTE;
@@ -1,6 +0,0 @@
1
- /**
2
- * Path of the route for storing client-side logs
3
- * @author Gabe Abrams
4
- */
5
- declare const LOG_ROUTE_PATH: string;
6
- export default LOG_ROUTE_PATH;
@@ -1,6 +0,0 @@
1
- /**
2
- * One minute in ms
3
- * @author Gabe Abrams
4
- */
5
- declare const MINUTE_IN_MS = 60000;
6
- export default MINUTE_IN_MS;
@@ -1,6 +0,0 @@
1
- /**
2
- * Path that all routes start with
3
- * @author Gabe Abrams
4
- */
5
- declare const ROUTE_PATH_PREFIX = "/dce-reactkit";
6
- export default ROUTE_PATH_PREFIX;
@@ -1,6 +0,0 @@
1
- /**
2
- * Route for checking if the current user is a select admin
3
- * @author Gabe Abrams
4
- */
5
- declare const SELECT_ADMIN_CHECK_ROUTE = "/api/admin/select/is-select-admin";
6
- export default SELECT_ADMIN_CHECK_ROUTE;
@@ -1,9 +0,0 @@
1
- /**
2
- * An error with a code
3
- * @author Gabe Abrams
4
- */
5
- declare class ErrorWithCode extends Error {
6
- code: string;
7
- constructor(message: string, code: string);
8
- }
9
- export default ErrorWithCode;
@@ -1,10 +0,0 @@
1
- /**
2
- * Shorten text so it fits into a certain number of chars
3
- * @author Gabe Abrams
4
- * @param text the text to abbreviate
5
- * @param maxChars the maximum number of chars to include
6
- * @returns abbreviated text with length no greater than maxChars
7
- * (including ellipses if applicable)
8
- */
9
- declare const abbreviate: (text: string, maxChars: number) => string;
10
- export default abbreviate;
@@ -1,5 +0,0 @@
1
- /**
2
- * Unit tests for abbreviate helper
3
- * @author Gabe Abrams
4
- */
5
- export {};
@@ -1,13 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array, returning true if
3
- * the operator function returns true for every item in the array
4
- * @author Gabe Abrams
5
- * @param operatorFunction the operator function to apply. If it returns true
6
- * for every item, this function will return true
7
- * @returns true if the operator function returns true for every item in the array
8
- */
9
- declare const everyAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
10
- breakNow: () => void;
11
- array: T[];
12
- }) => Promise<any>) => Promise<boolean>;
13
- export default everyAsync;
@@ -1,13 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array, returning a new array
3
- * that only contains the items that pass the filter
4
- * @author Gabe Abrams
5
- * @param operatorFunction the operator function to apply. If it returns true
6
- * for an item, the item will be included in the returned array
7
- * @returns the filtered array
8
- */
9
- declare const filterAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
10
- breakNow: () => void;
11
- array: T[];
12
- }) => Promise<any>) => Promise<T[]>;
13
- export default filterAsync;
@@ -1,10 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array
3
- * @author Gabe Abrams
4
- * @param operatorFunction the operator function to apply
5
- */
6
- declare const forEachAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
7
- breakNow: () => void;
8
- array: T[];
9
- }) => void) => Promise<void>;
10
- export default forEachAsync;
@@ -1,11 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array, collecting all results
3
- * @author Gabe Abrams
4
- * @param operatorFunction the operator function to apply
5
- * @returns the array of results
6
- */
7
- declare const mapAsync: <T, U>(array: T[], operatorFunction: (item: T, index: number, opts: {
8
- breakNow: () => void;
9
- array: T[];
10
- }) => Promise<U>) => Promise<U[]>;
11
- export default mapAsync;
@@ -1,13 +0,0 @@
1
- /**
2
- * Run the operator function on each item in the array, returning true if
3
- * the operator function returns true for any item in the array
4
- * @author Gabe Abrams
5
- * @param operatorFunction the operator function to apply. If it returns true
6
- * for any item, this function will return true
7
- * @returns true if the operator function returns true for any item in the array
8
- */
9
- declare const someAsync: <T>(array: T[], operatorFunction: (item: T, index: number, opts: {
10
- breakNow: () => void;
11
- array: T[];
12
- }) => Promise<any>) => Promise<boolean>;
13
- export default someAsync;
@@ -1,8 +0,0 @@
1
- /**
2
- * Get the average of a set of numbers
3
- * @author Gabe Abrams
4
- * @param nums the numbers to average
5
- * @returns average value or 0 if no numbers
6
- */
7
- declare const avg: (nums: number[]) => number;
8
- export default avg;
@@ -1,5 +0,0 @@
1
- /**
2
- * Unit tests for avg helper
3
- * @author Gabe Abrams
4
- */
5
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * Capitalize every word in a string (just the first letter)
3
- * @param str string to capitalize
4
- * @returns string with every word capitalized
5
- */
6
- declare const capitalize: (str: string) => string;
7
- export default capitalize;
@@ -1,9 +0,0 @@
1
- /**
2
- * Round a number (ceiling) to a certain number of decimals
3
- * @author Gabe Abrams
4
- * @param num the number to round
5
- * @param numDecimals the number of decimals to round to
6
- * @returns rounded number
7
- */
8
- declare const ceilToNumDecimals: (num: number, numDecimals: number) => number;
9
- export default ceilToNumDecimals;
@@ -1,5 +0,0 @@
1
- /**
2
- * Test file for the ceilToNumDecimals helper
3
- * @author Gabe Abrams
4
- */
5
- export {};