dce-reactkit 3.5.1-beta.1 → 3.5.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 (191) hide show
  1. package/.eslintrc.js +0 -2
  2. package/dist/cjs/index.js +320 -27
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/client/initClient.d.ts +1 -1
  5. package/dist/cjs/types/components/AppWrapper.d.ts +6 -6
  6. package/dist/cjs/types/components/ButtonInputGroup.d.ts +1 -1
  7. package/dist/cjs/types/components/CSVDownloadButton.d.ts +1 -1
  8. package/dist/cjs/types/components/CheckboxButton.d.ts +1 -1
  9. package/dist/cjs/types/components/CopiableBox.d.ts +1 -1
  10. package/dist/cjs/types/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.d.ts +7 -1
  11. package/dist/cjs/types/components/DBEntryManagerPanel/AddOrEditDBEntry/index.d.ts +5 -4
  12. package/dist/cjs/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +1 -1
  13. package/dist/cjs/types/components/DBEntryManagerPanel/index.d.ts +13 -2
  14. package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntry.d.ts +1 -1
  15. package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntryField.d.ts +1 -1
  16. package/dist/cjs/types/components/Drawer.d.ts +1 -1
  17. package/dist/cjs/types/components/ErrorBox.d.ts +1 -1
  18. package/dist/cjs/types/components/IntelliTable.d.ts +1 -1
  19. package/dist/cjs/types/components/ItemPicker/NestableItemList.d.ts +1 -1
  20. package/dist/cjs/types/components/ItemPicker/index.d.ts +1 -1
  21. package/dist/cjs/types/components/ItemPicker/types/PickableItem.d.ts +1 -1
  22. package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
  23. package/dist/cjs/types/components/Modal.d.ts +1 -1
  24. package/dist/cjs/types/components/PopFailureMark.d.ts +1 -1
  25. package/dist/cjs/types/components/PopPendingMark.d.ts +1 -1
  26. package/dist/cjs/types/components/PopSuccessMark.d.ts +1 -1
  27. package/dist/cjs/types/components/RadioButton.d.ts +1 -1
  28. package/dist/cjs/types/components/SimpleDateChooser.d.ts +1 -1
  29. package/dist/cjs/types/components/TabBox.d.ts +1 -1
  30. package/dist/cjs/types/helpers/abbreviate.test.d.ts +5 -0
  31. package/dist/cjs/types/helpers/addDBEditorEndpoints.d.ts +4 -3
  32. package/dist/cjs/types/helpers/avg.test.d.ts +5 -0
  33. package/dist/cjs/types/helpers/canReviewLogs.d.ts +5 -0
  34. package/dist/cjs/types/helpers/canReviewLogs.test.d.ts +5 -0
  35. package/dist/cjs/types/helpers/ceilToNumDecimals.test.d.ts +5 -0
  36. package/dist/cjs/types/helpers/compareArraysByProp.d.ts +3 -2
  37. package/dist/cjs/types/helpers/compareArraysByProp.test.d.ts +5 -0
  38. package/dist/cjs/types/helpers/extractProp.test.d.ts +5 -0
  39. package/dist/cjs/types/helpers/floorToNumDecimals.test.d.ts +5 -0
  40. package/dist/cjs/types/helpers/forceNumIntoBounds.test.d.ts +5 -0
  41. package/dist/cjs/types/helpers/genCSV.test.d.ts +5 -0
  42. package/dist/cjs/types/helpers/genCommaList.d.ts +12 -0
  43. package/dist/cjs/types/helpers/genCommaList.test.d.ts +1 -0
  44. package/dist/cjs/types/helpers/genRouteHandler.d.ts +7 -7
  45. package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +1 -1
  46. package/dist/cjs/types/helpers/getHumanReadableDate.test.d.ts +5 -0
  47. package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +1 -1
  48. package/dist/cjs/types/helpers/getLocalTimeInfo.test.d.ts +6 -0
  49. package/dist/cjs/types/helpers/getMonthName.test.d.ts +5 -0
  50. package/dist/cjs/types/helpers/getOrdinal.test.d.ts +5 -0
  51. package/dist/cjs/types/helpers/getPartOfDay.test.d.ts +5 -0
  52. package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +1 -1
  53. package/dist/cjs/types/helpers/getTimeInfoInET.test.d.ts +5 -0
  54. package/dist/cjs/types/helpers/parallelLimit.d.ts +1 -1
  55. package/dist/cjs/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +10 -0
  56. package/dist/cjs/types/helpers/validators/shared/helpers/validateRegex.d.ts +19 -0
  57. package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +12 -0
  58. package/dist/cjs/types/helpers/validators/validateEmail.d.ts +11 -0
  59. package/dist/cjs/types/helpers/validators/validateEmail.test.d.ts +1 -0
  60. package/dist/cjs/types/helpers/validators/validatePhoneNumber.d.ts +11 -0
  61. package/dist/cjs/types/helpers/validators/validatePhoneNumber.test.d.ts +1 -0
  62. package/dist/cjs/types/helpers/validators/validateString.d.ts +22 -0
  63. package/dist/cjs/types/helpers/validators/validateString.test.d.ts +1 -0
  64. package/dist/cjs/types/index.d.ts +5 -1
  65. package/dist/cjs/types/server/initServer.d.ts +1 -1
  66. package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
  67. package/dist/cjs/types/types/Log/LogMainInfo.d.ts +1 -1
  68. package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +1 -1
  69. package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +1 -1
  70. package/dist/cjs/types/types/Log/index.d.ts +1 -1
  71. package/dist/cjs/types/types/LogFunction.d.ts +1 -1
  72. package/dist/cjs/types/types/LogMetadataContextMap.d.ts +1 -1
  73. package/dist/cjs/types/types/LogMetadataTagMap.d.ts +1 -1
  74. package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +1 -1
  75. package/dist/cjs/types/types/LogMetadataType.d.ts +1 -1
  76. package/dist/esm/index.js +317 -28
  77. package/dist/esm/index.js.map +1 -1
  78. package/dist/esm/types/client/initClient.d.ts +1 -1
  79. package/dist/esm/types/components/AppWrapper.d.ts +6 -6
  80. package/dist/esm/types/components/ButtonInputGroup.d.ts +1 -1
  81. package/dist/esm/types/components/CSVDownloadButton.d.ts +1 -1
  82. package/dist/esm/types/components/CheckboxButton.d.ts +1 -1
  83. package/dist/esm/types/components/CopiableBox.d.ts +1 -1
  84. package/dist/esm/types/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.d.ts +7 -1
  85. package/dist/esm/types/components/DBEntryManagerPanel/AddOrEditDBEntry/index.d.ts +5 -4
  86. package/dist/esm/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +1 -1
  87. package/dist/esm/types/components/DBEntryManagerPanel/index.d.ts +13 -2
  88. package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntry.d.ts +1 -1
  89. package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntryField.d.ts +1 -1
  90. package/dist/esm/types/components/Drawer.d.ts +1 -1
  91. package/dist/esm/types/components/ErrorBox.d.ts +1 -1
  92. package/dist/esm/types/components/IntelliTable.d.ts +1 -1
  93. package/dist/esm/types/components/ItemPicker/NestableItemList.d.ts +1 -1
  94. package/dist/esm/types/components/ItemPicker/index.d.ts +1 -1
  95. package/dist/esm/types/components/ItemPicker/types/PickableItem.d.ts +1 -1
  96. package/dist/esm/types/components/LogReviewer.d.ts +1 -1
  97. package/dist/esm/types/components/Modal.d.ts +1 -1
  98. package/dist/esm/types/components/PopFailureMark.d.ts +1 -1
  99. package/dist/esm/types/components/PopPendingMark.d.ts +1 -1
  100. package/dist/esm/types/components/PopSuccessMark.d.ts +1 -1
  101. package/dist/esm/types/components/RadioButton.d.ts +1 -1
  102. package/dist/esm/types/components/SimpleDateChooser.d.ts +1 -1
  103. package/dist/esm/types/components/TabBox.d.ts +1 -1
  104. package/dist/esm/types/helpers/abbreviate.test.d.ts +5 -0
  105. package/dist/esm/types/helpers/addDBEditorEndpoints.d.ts +4 -3
  106. package/dist/esm/types/helpers/avg.test.d.ts +5 -0
  107. package/dist/esm/types/helpers/canReviewLogs.d.ts +5 -0
  108. package/dist/esm/types/helpers/canReviewLogs.test.d.ts +5 -0
  109. package/dist/esm/types/helpers/ceilToNumDecimals.test.d.ts +5 -0
  110. package/dist/esm/types/helpers/compareArraysByProp.d.ts +3 -2
  111. package/dist/esm/types/helpers/compareArraysByProp.test.d.ts +5 -0
  112. package/dist/esm/types/helpers/extractProp.test.d.ts +5 -0
  113. package/dist/esm/types/helpers/floorToNumDecimals.test.d.ts +5 -0
  114. package/dist/esm/types/helpers/forceNumIntoBounds.test.d.ts +5 -0
  115. package/dist/esm/types/helpers/genCSV.test.d.ts +5 -0
  116. package/dist/esm/types/helpers/genCommaList.d.ts +12 -0
  117. package/dist/esm/types/helpers/genCommaList.test.d.ts +1 -0
  118. package/dist/esm/types/helpers/genRouteHandler.d.ts +7 -7
  119. package/dist/esm/types/helpers/getHumanReadableDate.d.ts +1 -1
  120. package/dist/esm/types/helpers/getHumanReadableDate.test.d.ts +5 -0
  121. package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +1 -1
  122. package/dist/esm/types/helpers/getLocalTimeInfo.test.d.ts +6 -0
  123. package/dist/esm/types/helpers/getMonthName.test.d.ts +5 -0
  124. package/dist/esm/types/helpers/getOrdinal.test.d.ts +5 -0
  125. package/dist/esm/types/helpers/getPartOfDay.test.d.ts +5 -0
  126. package/dist/esm/types/helpers/getTimeInfoInET.d.ts +1 -1
  127. package/dist/esm/types/helpers/getTimeInfoInET.test.d.ts +5 -0
  128. package/dist/esm/types/helpers/parallelLimit.d.ts +1 -1
  129. package/dist/esm/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +10 -0
  130. package/dist/esm/types/helpers/validators/shared/helpers/validateRegex.d.ts +19 -0
  131. package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +12 -0
  132. package/dist/esm/types/helpers/validators/validateEmail.d.ts +11 -0
  133. package/dist/esm/types/helpers/validators/validateEmail.test.d.ts +1 -0
  134. package/dist/esm/types/helpers/validators/validatePhoneNumber.d.ts +11 -0
  135. package/dist/esm/types/helpers/validators/validatePhoneNumber.test.d.ts +1 -0
  136. package/dist/esm/types/helpers/validators/validateString.d.ts +22 -0
  137. package/dist/esm/types/helpers/validators/validateString.test.d.ts +1 -0
  138. package/dist/esm/types/index.d.ts +5 -1
  139. package/dist/esm/types/server/initServer.d.ts +1 -1
  140. package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
  141. package/dist/esm/types/types/Log/LogMainInfo.d.ts +1 -1
  142. package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +1 -1
  143. package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +1 -1
  144. package/dist/esm/types/types/Log/index.d.ts +1 -1
  145. package/dist/esm/types/types/LogFunction.d.ts +1 -1
  146. package/dist/esm/types/types/LogMetadataContextMap.d.ts +1 -1
  147. package/dist/esm/types/types/LogMetadataTagMap.d.ts +1 -1
  148. package/dist/esm/types/types/LogMetadataTargetMap.d.ts +1 -1
  149. package/dist/esm/types/types/LogMetadataType.d.ts +1 -1
  150. package/dist/index.d.ts +134 -56
  151. package/package.json +14 -13
  152. package/src/components/ItemPicker/index.test.tsx +10 -10
  153. package/src/helpers/abbreviate.test.ts +26 -0
  154. package/src/helpers/avg.test.ts +24 -0
  155. package/src/helpers/canReviewLogs.test.ts +67 -0
  156. package/src/helpers/canReviewLogs.ts +20 -0
  157. package/src/helpers/ceilToNumDecimals.test.ts +39 -0
  158. package/src/helpers/compareArraysByProp.test.ts +147 -0
  159. package/src/helpers/compareArraysByProp.ts +41 -22
  160. package/src/helpers/extractProp.test.ts +34 -0
  161. package/src/helpers/floorToNumDecimals.test.ts +39 -0
  162. package/src/helpers/forceNumIntoBounds.test.ts +34 -0
  163. package/src/helpers/genCSV.test.ts +61 -0
  164. package/src/helpers/genCSV.ts +5 -2
  165. package/src/helpers/genCommaList.test.ts +57 -0
  166. package/src/helpers/genCommaList.ts +21 -0
  167. package/src/helpers/getHumanReadableDate.test.ts +29 -0
  168. package/src/helpers/getLocalTimeInfo.test.ts +48 -0
  169. package/src/helpers/getMonthName.test.ts +79 -0
  170. package/src/helpers/getOrdinal.test.ts +84 -0
  171. package/src/helpers/{getOrdinal.tsx → getOrdinal.ts} +1 -0
  172. package/src/helpers/getPartOfDay.test.ts +56 -0
  173. package/src/helpers/getTimeInfoInET.test.ts +72 -0
  174. package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +18 -0
  175. package/src/helpers/validators/shared/helpers/validateRegex.ts +47 -0
  176. package/src/helpers/validators/shared/types/ValidationResult.ts +20 -0
  177. package/src/helpers/validators/validateEmail.test.ts +110 -0
  178. package/src/helpers/validators/validateEmail.ts +47 -0
  179. package/src/helpers/validators/validatePhoneNumber.test.ts +94 -0
  180. package/src/helpers/validators/validatePhoneNumber.ts +49 -0
  181. package/src/helpers/validators/validateString.test.ts +173 -0
  182. package/src/helpers/validators/validateString.ts +171 -0
  183. package/src/index.ts +8 -0
  184. package/tsconfig.json +6 -2
  185. /package/src/helpers/{abbreviate.tsx → abbreviate.ts} +0 -0
  186. /package/src/helpers/{avg.tsx → avg.ts} +0 -0
  187. /package/src/helpers/{ceilToNumDecimals.tsx → ceilToNumDecimals.ts} +0 -0
  188. /package/src/helpers/{floorToNumDecimals.tsx → floorToNumDecimals.ts} +0 -0
  189. /package/src/helpers/{forceNumIntoBounds.tsx → forceNumIntoBounds.ts} +0 -0
  190. /package/src/helpers/{getLocalTimeInfo.tsx → getLocalTimeInfo.ts} +0 -0
  191. /package/src/helpers/{getTimeInfoInET.tsx → getTimeInfoInET.ts} +0 -0
@@ -0,0 +1,22 @@
1
+ import ValidationResult from './shared/types/ValidationResult';
2
+ /**
3
+ * Determines whether a given input string is considered valid based on
4
+ * the provided requirements.
5
+ * @author Austen Money
6
+ * @param input input string
7
+ * @param opts options for validation
8
+ * @returns whether input is considered valid according to reqs - if
9
+ * valid, returns a cleaned version of input; if invalid, returns
10
+ * a string containing error messages describing which requirements
11
+ * were not met.
12
+ */
13
+ declare const validateString: (input: string, opts: {
14
+ ignoreWhitespace?: boolean;
15
+ minLen?: number;
16
+ maxLen?: number;
17
+ lettersOnly?: boolean;
18
+ numbersOnly?: boolean;
19
+ regexTest?: RegExp;
20
+ regexDescription?: string;
21
+ }) => ValidationResult<string>;
22
+ export default validateString;
@@ -57,6 +57,10 @@ import extractProp from './helpers/extractProp';
57
57
  import compareArraysByProp from './helpers/compareArraysByProp';
58
58
  import getLocalTimeInfo from './helpers/getLocalTimeInfo';
59
59
  import addDBEditorEndpoints from './helpers/addDBEditorEndpoints';
60
+ import genCommaList from './helpers/genCommaList';
61
+ import validateEmail from './helpers/validators/validateEmail';
62
+ import validatePhoneNumber from './helpers/validators/validatePhoneNumber';
63
+ import validateString from './helpers/validators/validateString';
60
64
  import ModalButtonType from './types/ModalButtonType';
61
65
  import ModalSize from './types/ModalSize';
62
66
  import ModalType from './types/ModalType';
@@ -75,4 +79,4 @@ import PickableItem from './components/ItemPicker/types/PickableItem';
75
79
  import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
76
80
  import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
77
81
  import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
78
- export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, getLocalTimeInfo, initClient, visitServerEndpoint, logClientEvent, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
82
+ export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, initClient, visitServerEndpoint, logClientEvent, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
@@ -1,4 +1,4 @@
1
- declare type GetLaunchInfoFunction = (req: any) => {
1
+ type GetLaunchInfoFunction = (req: any) => {
2
2
  launched: boolean;
3
3
  launchInfo?: any;
4
4
  };
@@ -3,7 +3,7 @@ import ParamType from './ParamType';
3
3
  * Column description for a column in the IntelliTable
4
4
  * @author Gabe Abrams
5
5
  */
6
- declare type IntelliTableColumn = {
6
+ type IntelliTableColumn = {
7
7
  title: string;
8
8
  param: string;
9
9
  type: (ParamType.Boolean | ParamType.Float | ParamType.Int | ParamType.String | ParamType.JSON);
@@ -3,7 +3,7 @@ import LogLevel from '../LogLevel';
3
3
  * Main information in a log event
4
4
  * @author Gabe Abrams
5
5
  */
6
- declare type LogMainInfo = {
6
+ type LogMainInfo = {
7
7
  id: string;
8
8
  userFirstName: string;
9
9
  userLastName: string;
@@ -3,7 +3,7 @@ import LogSource from '../LogSource';
3
3
  * Log info that is specific to the type of source
4
4
  * @author Gabe Abrams
5
5
  */
6
- declare type LogSourceSpecificInfo = ({
6
+ type LogSourceSpecificInfo = ({
7
7
  source: LogSource.Client;
8
8
  } | {
9
9
  source: LogSource.Server;
@@ -4,7 +4,7 @@ import LogType from '../LogType';
4
4
  * Log info that is specific to the type of log
5
5
  * @author Gabe Abrams
6
6
  */
7
- declare type LogTypeSpecificInfo = ({
7
+ type LogTypeSpecificInfo = ({
8
8
  type: LogType.Error;
9
9
  errorMessage: string;
10
10
  errorCode: string;
@@ -6,5 +6,5 @@ import LogTypeSpecificInfo from './LogTypeSpecificInfo';
6
6
  * error encountered by a user
7
7
  * @author Gabe Abrams
8
8
  */
9
- declare type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
9
+ type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
10
10
  export default Log;
@@ -5,7 +5,7 @@ import LogLevel from './LogLevel';
5
5
  * Type of a log action function
6
6
  * @author Gabe Abrams
7
7
  */
8
- declare type LogFunction = (opts: ({
8
+ type LogFunction = (opts: ({
9
9
  context: string | {
10
10
  _: string;
11
11
  };
@@ -2,7 +2,7 @@
2
2
  * Type of the context map in a LogMetadata file
3
3
  * @author Gabe Abrams
4
4
  */
5
- declare type LogMetadataContextMap = {
5
+ type LogMetadataContextMap = {
6
6
  [k: string]: (string | {
7
7
  _: string;
8
8
  [k: string]: string;
@@ -2,7 +2,7 @@
2
2
  * Type of the tag map inside a LogMetadata file
3
3
  * @author Gabe Abrams
4
4
  */
5
- declare type LogMetadataTagMap = {
5
+ type LogMetadataTagMap = {
6
6
  [k: string]: string;
7
7
  };
8
8
  export default LogMetadataTagMap;
@@ -2,7 +2,7 @@
2
2
  * Type of the target map inside a LogMetadata file
3
3
  * @author Gabe Abrams
4
4
  */
5
- declare type LogMetadataTargetMap = {
5
+ type LogMetadataTargetMap = {
6
6
  [k: string]: string;
7
7
  };
8
8
  export default LogMetadataTargetMap;
@@ -5,7 +5,7 @@ import LogMetadataTargetMap from './LogMetadataTargetMap';
5
5
  * Type of a LogMetadata file
6
6
  * @author Gabe Abrams
7
7
  */
8
- declare type LogMetadataType = {
8
+ type LogMetadataType = {
9
9
  Context?: LogMetadataContextMap;
10
10
  Tag?: LogMetadataTagMap;
11
11
  Target?: LogMetadataTargetMap;
package/dist/index.d.ts CHANGED
@@ -23,7 +23,7 @@ declare enum Variant {
23
23
  * @author Gabe Abrams
24
24
  */
25
25
 
26
- declare type Props$h = {
26
+ type Props$h = {
27
27
  children: React.ReactNode;
28
28
  dark?: boolean;
29
29
  };
@@ -50,11 +50,11 @@ declare const alert: (title: string, text: string) => Promise<undefined>;
50
50
  * @returns true if the user confirmed
51
51
  */
52
52
  declare const confirm: (title: string, text: string, opts?: {
53
- confirmButtonText?: string | undefined;
54
- confirmButtonVariant?: Variant | undefined;
55
- cancelButtonText?: string | undefined;
56
- cancelButtonVariant?: Variant | undefined;
57
- } | undefined) => Promise<boolean>;
53
+ confirmButtonText?: string;
54
+ confirmButtonVariant?: Variant;
55
+ cancelButtonText?: string;
56
+ cancelButtonVariant?: Variant;
57
+ }) => Promise<boolean>;
58
58
  /**
59
59
  * Show a fatal error message
60
60
  * @author Gabe Abrams
@@ -75,7 +75,7 @@ declare const LoadingSpinner: () => JSX.Element;
75
75
  * @author Gabe Abrams
76
76
  */
77
77
 
78
- declare type Props$g = {
78
+ type Props$g = {
79
79
  error: any;
80
80
  title?: string;
81
81
  onClose?: () => void;
@@ -131,7 +131,7 @@ declare enum ModalType {
131
131
  * @author Gabe Abrams
132
132
  */
133
133
 
134
- declare type Props$f = {
134
+ type Props$f = {
135
135
  type?: ModalType;
136
136
  size?: ModalSize;
137
137
  title?: React.ReactNode;
@@ -167,7 +167,7 @@ declare const Modal: React.FC<Props$f>;
167
167
  * @author Gabe Abrams
168
168
  */
169
169
 
170
- declare type Props$e = {
170
+ type Props$e = {
171
171
  title: React.ReactNode;
172
172
  children: React.ReactNode;
173
173
  noBottomMargin?: boolean;
@@ -180,7 +180,7 @@ declare const TabBox: React.FC<Props$e>;
180
180
  * @author Gabe Abrams
181
181
  */
182
182
 
183
- declare type Props$d = {
183
+ type Props$d = {
184
184
  text: string;
185
185
  onSelected: () => void;
186
186
  ariaLabel: string;
@@ -199,7 +199,7 @@ declare const RadioButton: React.FC<Props$d>;
199
199
  * @author Gabe Abrams
200
200
  */
201
201
 
202
- declare type Props$c = {
202
+ type Props$c = {
203
203
  text: string;
204
204
  onChanged: (checked: boolean) => void;
205
205
  ariaLabel: string;
@@ -220,7 +220,7 @@ declare const CheckboxButton: React.FC<Props$c>;
220
220
  * @author Gabe Abrams
221
221
  */
222
222
 
223
- declare type Props$b = {
223
+ type Props$b = {
224
224
  label: string;
225
225
  minLabelWidth?: string;
226
226
  children: React.ReactNode;
@@ -234,7 +234,7 @@ declare const ButtonInputGroup: React.FC<Props$b>;
234
234
  * @author Gabe Abrams
235
235
  */
236
236
 
237
- declare type Props$a = {
237
+ type Props$a = {
238
238
  ariaLabel: string;
239
239
  name: string;
240
240
  month: number;
@@ -257,7 +257,7 @@ declare const SimpleDateChooser: React.FC<Props$a>;
257
257
  * @author Gabe Abrams
258
258
  */
259
259
 
260
- declare type Props$9 = {
260
+ type Props$9 = {
261
261
  customBackgroundColor?: string;
262
262
  children: React.ReactNode;
263
263
  };
@@ -268,7 +268,7 @@ declare const Drawer: React.FC<Props$9>;
268
268
  * @author Gabe Abrams
269
269
  */
270
270
 
271
- declare type Props$8 = {
271
+ type Props$8 = {
272
272
  sizeRem?: number;
273
273
  circleVariant?: string;
274
274
  checkVariant?: string;
@@ -280,7 +280,7 @@ declare const PopSuccessMark: React.FC<Props$8>;
280
280
  * @author Gabe Abrams
281
281
  */
282
282
 
283
- declare type Props$7 = {
283
+ type Props$7 = {
284
284
  sizeRem?: number;
285
285
  circleVariant?: string;
286
286
  xVariant?: string;
@@ -292,7 +292,7 @@ declare const PopFailureMark: React.FC<Props$7>;
292
292
  * @author Gabe Abrams
293
293
  */
294
294
 
295
- declare type Props$6 = {
295
+ type Props$6 = {
296
296
  sizeRem?: number;
297
297
  circleVariant?: string;
298
298
  hourglassVariant?: string;
@@ -304,7 +304,7 @@ declare const PopPendingMark: React.FC<Props$6>;
304
304
  * @author Gabe Abrams
305
305
  */
306
306
 
307
- declare type Props$5 = {
307
+ type Props$5 = {
308
308
  text: string;
309
309
  maxTextWidthRem?: number;
310
310
  label?: string;
@@ -322,7 +322,7 @@ declare const CopiableBox: React.FC<Props$5>;
322
322
  * An item that can be chosen (for use within ItemPicker)
323
323
  * @author Gabe Abrams
324
324
  */
325
- declare type PickableItem = ({
325
+ type PickableItem = ({
326
326
  id: number | string;
327
327
  name: string;
328
328
  link?: string;
@@ -339,7 +339,7 @@ declare type PickableItem = ({
339
339
  * @author Yuen Ler Chow
340
340
  */
341
341
 
342
- declare type Props$4 = {
342
+ type Props$4 = {
343
343
  title: string;
344
344
  items: PickableItem[];
345
345
  /**
@@ -356,7 +356,7 @@ declare const ItemPicker: React.FC<Props$4>;
356
356
  * Type of the context map in a LogMetadata file
357
357
  * @author Gabe Abrams
358
358
  */
359
- declare type LogMetadataContextMap = {
359
+ type LogMetadataContextMap = {
360
360
  [k: string]: (string | {
361
361
  _: string;
362
362
  [k: string]: string;
@@ -367,7 +367,7 @@ declare type LogMetadataContextMap = {
367
367
  * Type of the tag map inside a LogMetadata file
368
368
  * @author Gabe Abrams
369
369
  */
370
- declare type LogMetadataTagMap = {
370
+ type LogMetadataTagMap = {
371
371
  [k: string]: string;
372
372
  };
373
373
 
@@ -375,7 +375,7 @@ declare type LogMetadataTagMap = {
375
375
  * Type of the target map inside a LogMetadata file
376
376
  * @author Gabe Abrams
377
377
  */
378
- declare type LogMetadataTargetMap = {
378
+ type LogMetadataTargetMap = {
379
379
  [k: string]: string;
380
380
  };
381
381
 
@@ -383,7 +383,7 @@ declare type LogMetadataTargetMap = {
383
383
  * Type of a LogMetadata file
384
384
  * @author Gabe Abrams
385
385
  */
386
- declare type LogMetadataType = {
386
+ type LogMetadataType = {
387
387
  Context?: LogMetadataContextMap;
388
388
  Tag?: LogMetadataTagMap;
389
389
  Target?: LogMetadataTargetMap;
@@ -395,7 +395,7 @@ declare type LogMetadataType = {
395
395
  * @author Gabe Abrams
396
396
  */
397
397
 
398
- declare type Props$3 = {
398
+ type Props$3 = {
399
399
  LogMetadata: LogMetadataType;
400
400
  onClose: () => void;
401
401
  };
@@ -422,7 +422,7 @@ declare enum ParamType {
422
422
  * Column description for a column in the IntelliTable
423
423
  * @author Gabe Abrams
424
424
  */
425
- declare type IntelliTableColumn = {
425
+ type IntelliTableColumn = {
426
426
  title: string;
427
427
  param: string;
428
428
  type: (ParamType.Boolean | ParamType.Float | ParamType.Int | ParamType.String | ParamType.JSON);
@@ -434,7 +434,7 @@ declare type IntelliTableColumn = {
434
434
  * @author Gabe Abrams
435
435
  */
436
436
 
437
- declare type Props$2 = {
437
+ type Props$2 = {
438
438
  title: string;
439
439
  id: string;
440
440
  data: {
@@ -451,7 +451,7 @@ declare const IntelliTable: React.FC<Props$2>;
451
451
  * @author Gabe Abrams
452
452
  */
453
453
 
454
- declare type Props$1 = {
454
+ type Props$1 = {
455
455
  filename: string;
456
456
  csv: string;
457
457
  id?: string;
@@ -469,7 +469,7 @@ declare const CSVDownloadButton: React.FC<Props$1>;
469
469
  * Generic type for an object
470
470
  * @author Yuen Ler Chow
471
471
  */
472
- declare type DBEntry = {
472
+ type DBEntry = {
473
473
  [k: string]: any;
474
474
  };
475
475
 
@@ -489,7 +489,7 @@ declare enum DBEntryFieldType {
489
489
  * A database entry input field
490
490
  * @author Yuen Ler Chow
491
491
  */
492
- declare type DBEntryField = ({
492
+ type DBEntryField = ({
493
493
  label: string;
494
494
  objectKey: string;
495
495
  placeholder: string;
@@ -536,17 +536,28 @@ declare type DBEntryField = ({
536
536
  /**
537
537
  * DB Entry Manager Panel
538
538
  * @author Yuen Ler Chow
539
+ * @author Gabe Abrams
539
540
  */
540
541
 
541
- declare type Props = {
542
+ type Props = {
542
543
  entryFields: DBEntryField[];
543
544
  idPropName: string;
544
545
  titlePropName: string;
545
546
  descriptionPropName: string;
546
547
  itemListTitle: string;
547
548
  itemName: string;
549
+ /**
550
+ * Function to validate the db entry before sending to the server
551
+ * (throws an error if not validate)
552
+ * @param dbEntry the db entry to validate
553
+ */
548
554
  validateEntry?: (dbEntry: DBEntry) => Promise<void>;
549
- modifyEntry?: (dbEntry: DBEntry) => Promise<DBEntry>;
555
+ /**
556
+ * Function to modify the db entry before sending to the server
557
+ * @param dbEntry the db entry to modify
558
+ * @returns the modified db entry
559
+ */
560
+ modifyEntry?: (dbEntry: DBEntry) => Promise<DBEntry> | DBEntry;
550
561
  disableEdit?: boolean;
551
562
  collectionName: string;
552
563
  adminsOnly?: boolean;
@@ -600,7 +611,7 @@ declare const DynamicWord: {
600
611
  * Type of CACCL's send request function
601
612
  * @author Gabe Abrams
602
613
  */
603
- declare type SendRequestFunction = (opts: {
614
+ type SendRequestFunction = (opts: {
604
615
  path: string;
605
616
  method: ('GET' | 'POST' | 'DELETE' | 'PUT');
606
617
  params?: {
@@ -749,7 +760,7 @@ declare enum LogLevel {
749
760
  * Main information in a log event
750
761
  * @author Gabe Abrams
751
762
  */
752
- declare type LogMainInfo = {
763
+ type LogMainInfo = {
753
764
  id: string;
754
765
  userFirstName: string;
755
766
  userLastName: string;
@@ -796,7 +807,7 @@ declare enum LogSource {
796
807
  * Log info that is specific to the type of source
797
808
  * @author Gabe Abrams
798
809
  */
799
- declare type LogSourceSpecificInfo = ({
810
+ type LogSourceSpecificInfo = ({
800
811
  source: LogSource.Client;
801
812
  } | {
802
813
  source: LogSource.Server;
@@ -840,7 +851,7 @@ declare enum LogType {
840
851
  * Log info that is specific to the type of log
841
852
  * @author Gabe Abrams
842
853
  */
843
- declare type LogTypeSpecificInfo = ({
854
+ type LogTypeSpecificInfo = ({
844
855
  type: LogType.Error;
845
856
  errorMessage: string;
846
857
  errorCode: string;
@@ -856,13 +867,13 @@ declare type LogTypeSpecificInfo = ({
856
867
  * error encountered by a user
857
868
  * @author Gabe Abrams
858
869
  */
859
- declare type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
870
+ type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
860
871
 
861
872
  /**
862
873
  * Type of a log action function
863
874
  * @author Gabe Abrams
864
875
  */
865
- declare type LogFunction = (opts: ({
876
+ type LogFunction = (opts: ({
866
877
  context: string | {
867
878
  _: string;
868
879
  };
@@ -912,14 +923,14 @@ declare const genRouteHandler: (opts: {
912
923
  req: any;
913
924
  next: () => void;
914
925
  redirect: (pathOrURL: string) => void;
915
- send: (text: string, status?: number | undefined) => void;
926
+ send: (text: string, status?: number) => void;
916
927
  renderErrorPage: (opts?: {
917
- title?: string | undefined;
918
- description?: string | undefined;
919
- code?: string | undefined;
920
- pageTitle?: string | undefined;
921
- status?: number | undefined;
922
- } | undefined) => void;
928
+ title?: string;
929
+ description?: string;
930
+ code?: string;
931
+ pageTitle?: string;
932
+ status?: number;
933
+ }) => void;
923
934
  logServerEvent: LogFunction;
924
935
  }) => any;
925
936
  skipSessionCheck?: boolean | undefined;
@@ -951,7 +962,7 @@ declare const handleError: (res: any, error: ({
951
962
  */
952
963
  declare const handleSuccess: (res: any, body: any) => undefined;
953
964
 
954
- declare type GetLaunchInfoFunction = (req: any) => {
965
+ type GetLaunchInfoFunction = (req: any) => {
955
966
  launched: boolean;
956
967
  launchInfo?: any;
957
968
  };
@@ -996,7 +1007,7 @@ declare const getOrdinal: (num: number) => string;
996
1007
  * corresponding to ET time values for year, month, day, hour, hour12, minute, isPM
997
1008
  * where hour is in 24hr time and hour12 is in 12hr time.
998
1009
  */
999
- declare const getTimeInfoInET: (dateOrTimestamp?: number | Date | undefined) => {
1010
+ declare const getTimeInfoInET: (dateOrTimestamp?: Date | number) => {
1000
1011
  timestamp: number;
1001
1012
  year: number;
1002
1013
  month: number;
@@ -1040,7 +1051,7 @@ declare const startMinWait: (minWaitMs: number) => () => Promise<void>;
1040
1051
  * @param [dateOrTimestamp=today] the date or timestamp for the date to describe
1041
1052
  * @returns human-readable description of the date
1042
1053
  */
1043
- declare const getHumanReadableDate: (dateOrTimestamp?: number | Date | undefined) => string;
1054
+ declare const getHumanReadableDate: (dateOrTimestamp?: Date | number) => string;
1044
1055
 
1045
1056
  /**
1046
1057
  * Get the current part of day (morning, evening, etc.)
@@ -1076,7 +1087,7 @@ declare const onlyKeepLetters: (str: string) => string;
1076
1087
  * once
1077
1088
  * @returns array of resolved values in the same order as the task functions
1078
1089
  */
1079
- declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number | undefined) => Promise<any[]>;
1090
+ declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number) => Promise<any[]>;
1080
1091
 
1081
1092
  /**
1082
1093
  * Log a user action on the client (cannot be used on the server)
@@ -1152,11 +1163,12 @@ declare const extractProp: (arr: any[], prop: string) => any[];
1152
1163
  * @author Gabe Abrams
1153
1164
  * @param a the first array
1154
1165
  * @param b the second array
1155
- * @param prop the property to compare with
1166
+ * @param prop the property to compare with, or an array of props to compare
1167
+ * with (if array, all values associated with those props must match)
1156
1168
  * @returns true if the arrays contain the same objects as determined by
1157
1169
  * the values associated with each object's prop
1158
1170
  */
1159
- declare const compareArraysByProp: (a: any[], b: any[], prop: string) => boolean;
1171
+ declare const compareArraysByProp: (a: any[], b: any[], prop: string | string[]) => boolean;
1160
1172
 
1161
1173
  /**
1162
1174
  * Get current time info in local time
@@ -1166,7 +1178,7 @@ declare const compareArraysByProp: (a: any[], b: any[], prop: string) => boolean
1166
1178
  * corresponding to time values for year, month, day, hour, hour12, minute, isPM
1167
1179
  * where hour is in 24hr time and hour12 is in 12hr time.
1168
1180
  */
1169
- declare const getLocalTimeInfo: (dateOrTimestamp?: number | Date | undefined) => {
1181
+ declare const getLocalTimeInfo: (dateOrTimestamp?: Date | number) => {
1170
1182
  timestamp: number;
1171
1183
  year: number;
1172
1184
  month: number;
@@ -1181,7 +1193,7 @@ declare const getLocalTimeInfo: (dateOrTimestamp?: number | Date | undefined) =>
1181
1193
  * Interface for a collection in the database
1182
1194
  * @author Yuen Ler Chow
1183
1195
  */
1184
- interface Collection {
1196
+ type DCEMangoCollection = {
1185
1197
  /**
1186
1198
  * Find all items in the collection that match the filter query
1187
1199
  * @param filterQuery
@@ -1200,7 +1212,7 @@ interface Collection {
1200
1212
  delete: (filterQuery: {
1201
1213
  id: string;
1202
1214
  }) => Promise<void>;
1203
- }
1215
+ };
1204
1216
  /**
1205
1217
  * Add all routes for the DBEditor
1206
1218
  * @author Yuen Ler Chow
@@ -1208,14 +1220,80 @@ interface Collection {
1208
1220
  * @param opts.app express app to add routes too
1209
1221
  * @param opts.collectionName the name of the collection
1210
1222
  * @param opts.adminsOnly true if the endpoint is for admins only
1223
+ * @param opts.collection dce-mango db collection
1211
1224
  */
1212
1225
  declare const addDBEditorEndpoints: (opts: {
1213
1226
  app: express.Application;
1214
1227
  collectionName: string;
1215
1228
  adminsOnly: boolean;
1216
- collection: Collection;
1229
+ collection: DCEMangoCollection;
1217
1230
  }) => void;
1218
1231
 
1232
+ /**
1233
+ * Given an array of strings, create a single comma-separated string that includes
1234
+ * 'and' as well as an oxford comma.
1235
+ * Ex: ['apples'] => 'apples'
1236
+ * Ex: ['apples', 'bananas'] => 'apples and bananas'
1237
+ * Ex: ['apples', 'bananas', 'grapes'] => 'apples, bananas, and grapes'
1238
+ * @author Austen Money
1239
+ * @param list an array of elements to be made into a single comma-separated string.
1240
+ * @returns a comma-separated string.
1241
+ */
1242
+ declare const genCommaList: (list: string[]) => string;
1243
+
1244
+ /**
1245
+ * Result of a validation function.
1246
+ * @author Austen Money
1247
+ */
1248
+ type ValidationResult<CleanedValueType> = ({
1249
+ isValid: true;
1250
+ cleanedValue: CleanedValueType;
1251
+ } | {
1252
+ isValid: false;
1253
+ errorMessage: string;
1254
+ });
1255
+
1256
+ /**
1257
+ * Determines whether a given email address is valid.
1258
+ * @author Austen Money
1259
+ * @param email email address to validate
1260
+ * @returns whether email fulfills proper formatting requirements, includes a
1261
+ * cleaned version of the address without leading or trailing
1262
+ * whitespace if valid or an error message if invalid.
1263
+ */
1264
+ declare const validateEmail: (email: string) => ValidationResult<string>;
1265
+
1266
+ /**
1267
+ * Determines whether a given phone number is valid.
1268
+ * @author Austen Money
1269
+ * @param phoneNumber phone number to validate
1270
+ * @returns whether phone number is considered valid - if valid, also returns
1271
+ * a cleaned version of the number without any formatting. If invalid,
1272
+ * returns an error message.
1273
+ */
1274
+ declare const validatePhoneNumber: (phoneNumber: string) => ValidationResult<string>;
1275
+
1276
+ /**
1277
+ * Determines whether a given input string is considered valid based on
1278
+ * the provided requirements.
1279
+ * @author Austen Money
1280
+ * @param input input string
1281
+ * @param opts options for validation
1282
+ * @returns whether input is considered valid according to reqs - if
1283
+ * valid, returns a cleaned version of input; if invalid, returns
1284
+ * a string containing error messages describing which requirements
1285
+ * were not met.
1286
+ */
1287
+ declare const validateString: (input: string, opts: {
1288
+ ignoreWhitespace?: boolean;
1289
+ minLen?: number;
1290
+ maxLen?: number;
1291
+ lettersOnly?: boolean;
1292
+ numbersOnly?: boolean;
1293
+ regexTest?: RegExp;
1294
+ regexDescription?: string;
1295
+ }) => ValidationResult<string>;
1296
+
1219
1297
  /**
1220
1298
  * List of error codes built into the react kit
1221
1299
  * @author Gabe Abrams
@@ -1266,4 +1344,4 @@ declare const LogBuiltInMetadata: {
1266
1344
  };
1267
1345
  };
1268
1346
 
1269
- export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntry, DBEntryField, DBEntryFieldType, DBEntryManagerPanel, DayOfWeek, Drawer, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, IntelliTableColumn, ItemPicker, LoadingSpinner, Log, LogAction, LogBuiltInMetadata, LogMetadataType, LogReviewer, LogSource, LogType, MINUTE_IN_MS, Modal, ModalButtonType, ModalSize, ModalType, ParamType, PickableItem, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode, SimpleDateChooser, TabBox, Variant, abbreviate, addDBEditorEndpoints, alert, avg, canReviewLogs, ceilToNumDecimals, compareArraysByProp, confirm, extractProp, floorToNumDecimals, forceNumIntoBounds, genCSV, genRouteHandler, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, initClient, initLogCollection, initServer, isMobileOrTablet, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, visitServerEndpoint, waitMs };
1347
+ export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntry, DBEntryField, DBEntryFieldType, DBEntryManagerPanel, DayOfWeek, Drawer, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, IntelliTableColumn, ItemPicker, LoadingSpinner, Log, LogAction, LogBuiltInMetadata, LogMetadataType, LogReviewer, LogSource, LogType, MINUTE_IN_MS, Modal, ModalButtonType, ModalSize, ModalType, ParamType, PickableItem, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode, SimpleDateChooser, TabBox, Variant, abbreviate, addDBEditorEndpoints, alert, avg, canReviewLogs, ceilToNumDecimals, compareArraysByProp, confirm, extractProp, floorToNumDecimals, forceNumIntoBounds, genCSV, genCommaList, genRouteHandler, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, initClient, initLogCollection, initServer, isMobileOrTablet, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, validateEmail, validatePhoneNumber, validateString, visitServerEndpoint, waitMs };