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.
- package/dist/cjs/index.js +390 -2390
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
- package/dist/cjs/types/helpers/logClientEvent.d.ts +1 -1
- package/dist/cjs/types/html/genErrorPage.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +2 -64
- package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
- package/dist/cjs/types/types/ProgressBarSize.d.ts +0 -1
- package/dist/esm/index.js +130 -2297
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/LogReviewer.d.ts +1 -1
- package/dist/esm/types/helpers/logClientEvent.d.ts +1 -1
- package/dist/esm/types/html/genErrorPage.d.ts +1 -1
- package/dist/esm/types/index.d.ts +2 -64
- package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
- package/dist/esm/types/types/ProgressBarSize.d.ts +0 -1
- package/dist/index.d.ts +3 -836
- package/package.json +4 -3
- package/src/components/AppWrapper.tsx +12 -10
- package/src/components/AutoscrollToBottomContainer.tsx +5 -3
- package/src/components/CopiableBox.tsx +5 -1
- package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +2 -2
- package/src/components/ErrorBox.tsx +6 -2
- package/src/components/IntelliTable.tsx +7 -5
- package/src/components/LogReviewer.tsx +23 -21
- package/src/components/Modal/index.tsx +5 -3
- package/src/components/MultiSwitch.tsx +5 -1
- package/src/components/ProgressBar.tsx +66 -76
- package/src/components/Shimmer.tsx +4 -2
- package/src/components/SimpleDateChooser.tsx +11 -13
- package/src/components/SimpleTimeChooser.tsx +4 -2
- package/src/helpers/canReviewLogs.test.ts +5 -3
- package/src/helpers/canReviewLogs.ts +5 -3
- package/src/helpers/initClient.tsx +8 -8
- package/src/helpers/isMobileOrTablet.tsx +2 -1
- package/src/helpers/isSelectAdmin.ts +4 -2
- package/src/helpers/logClientEvent.tsx +7 -5
- package/src/helpers/stubServerEndpoint.tsx +1 -1
- package/src/helpers/visitServerEndpoint.tsx +10 -7
- package/src/html/genErrorPage.ts +6 -4
- package/src/index.ts +105 -98
- package/src/types/IntelliTableColumn.ts +4 -1
- package/src/types/ProgressBarSize.ts +0 -1
- package/dist/cjs/types/constants/DAY_IN_MS.d.ts +0 -6
- package/dist/cjs/types/constants/HOUR_IN_MS.d.ts +0 -6
- package/dist/cjs/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
- package/dist/cjs/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/cjs/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
- package/dist/cjs/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
- package/dist/cjs/types/constants/MINUTE_IN_MS.d.ts +0 -6
- package/dist/cjs/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/cjs/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
- package/dist/cjs/types/errors/ErrorWithCode.d.ts +0 -9
- package/dist/cjs/types/helpers/abbreviate.d.ts +0 -10
- package/dist/cjs/types/helpers/abbreviate.test.d.ts +0 -5
- package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
- package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
- package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
- package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
- package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
- package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/avg.d.ts +0 -8
- package/dist/cjs/types/helpers/avg.test.d.ts +0 -5
- package/dist/cjs/types/helpers/capitalize.d.ts +0 -7
- package/dist/cjs/types/helpers/ceilToNumDecimals.d.ts +0 -9
- package/dist/cjs/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
- package/dist/cjs/types/helpers/cloneDeep.d.ts +0 -8
- package/dist/cjs/types/helpers/compareArraysByProp.d.ts +0 -13
- package/dist/cjs/types/helpers/compareArraysByProp.test.d.ts +0 -5
- package/dist/cjs/types/helpers/extractProp.d.ts +0 -12
- package/dist/cjs/types/helpers/extractProp.test.d.ts +0 -5
- package/dist/cjs/types/helpers/floorToNumDecimals.d.ts +0 -9
- package/dist/cjs/types/helpers/floorToNumDecimals.test.d.ts +0 -5
- package/dist/cjs/types/helpers/forceNumIntoBounds.d.ts +0 -10
- package/dist/cjs/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
- package/dist/cjs/types/helpers/genCSV.d.ts +0 -18
- package/dist/cjs/types/helpers/genCSV.test.d.ts +0 -5
- package/dist/cjs/types/helpers/genCommaList.d.ts +0 -12
- package/dist/cjs/types/helpers/genCommaList.test.d.ts +0 -1
- package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +0 -8
- package/dist/cjs/types/helpers/getHumanReadableDate.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +0 -19
- package/dist/cjs/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
- package/dist/cjs/types/helpers/getMonthName.d.ts +0 -14
- package/dist/cjs/types/helpers/getMonthName.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getOrdinal.d.ts +0 -8
- package/dist/cjs/types/helpers/getOrdinal.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getPartOfDay.d.ts +0 -7
- package/dist/cjs/types/helpers/getPartOfDay.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +0 -21
- package/dist/cjs/types/helpers/getTimeInfoInET.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
- package/dist/cjs/types/helpers/getWordCount.d.ts +0 -10
- package/dist/cjs/types/helpers/idify.d.ts +0 -9
- package/dist/cjs/types/helpers/onlyKeepLetters.d.ts +0 -8
- package/dist/cjs/types/helpers/padDecimalZeros.d.ts +0 -10
- package/dist/cjs/types/helpers/padZerosLeft.d.ts +0 -9
- package/dist/cjs/types/helpers/parallelLimit.d.ts +0 -12
- package/dist/cjs/types/helpers/prefixWithAOrAn.d.ts +0 -10
- package/dist/cjs/types/helpers/roundToNumDecimals.d.ts +0 -9
- package/dist/cjs/types/helpers/shuffleArray.d.ts +0 -8
- package/dist/cjs/types/helpers/startMinWait.d.ts +0 -9
- package/dist/cjs/types/helpers/stringsToHumanReadableList.d.ts +0 -10
- package/dist/cjs/types/helpers/sum.d.ts +0 -8
- package/dist/cjs/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
- package/dist/cjs/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
- package/dist/cjs/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
- package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
- package/dist/cjs/types/helpers/validators/validURL.d.ts +0 -8
- package/dist/cjs/types/helpers/validators/validateEmail.d.ts +0 -11
- package/dist/cjs/types/helpers/validators/validateEmail.test.d.ts +0 -1
- package/dist/cjs/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
- package/dist/cjs/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
- package/dist/cjs/types/helpers/validators/validateString.d.ts +0 -22
- package/dist/cjs/types/helpers/validators/validateString.test.d.ts +0 -1
- package/dist/cjs/types/helpers/waitMs.d.ts +0 -7
- package/dist/cjs/types/types/DayOfWeek.d.ts +0 -14
- package/dist/cjs/types/types/Log/LogMainInfo.d.ts +0 -39
- package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
- package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
- package/dist/cjs/types/types/Log/index.d.ts +0 -10
- package/dist/cjs/types/types/LogAction.d.ts +0 -29
- package/dist/cjs/types/types/LogBuiltInMetadata.d.ts +0 -16
- package/dist/cjs/types/types/LogFunction.d.ts +0 -24
- package/dist/cjs/types/types/LogLevel.d.ts +0 -10
- package/dist/cjs/types/types/LogMetadataContextMap.d.ts +0 -11
- package/dist/cjs/types/types/LogMetadataTagMap.d.ts +0 -8
- package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +0 -8
- package/dist/cjs/types/types/LogMetadataType.d.ts +0 -13
- package/dist/cjs/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
- package/dist/cjs/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
- package/dist/cjs/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
- package/dist/cjs/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
- package/dist/cjs/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
- package/dist/cjs/types/types/LogReviewerFilterState/index.d.ts +0 -17
- package/dist/cjs/types/types/LogSource.d.ts +0 -9
- package/dist/cjs/types/types/LogType.d.ts +0 -9
- package/dist/cjs/types/types/ParamType.d.ts +0 -17
- package/dist/cjs/types/types/ReactKitErrorCode.d.ts +0 -14
- package/dist/esm/types/constants/DAY_IN_MS.d.ts +0 -6
- package/dist/esm/types/constants/HOUR_IN_MS.d.ts +0 -6
- package/dist/esm/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
- package/dist/esm/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/esm/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
- package/dist/esm/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
- package/dist/esm/types/constants/MINUTE_IN_MS.d.ts +0 -6
- package/dist/esm/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/esm/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
- package/dist/esm/types/errors/ErrorWithCode.d.ts +0 -9
- package/dist/esm/types/helpers/abbreviate.d.ts +0 -10
- package/dist/esm/types/helpers/abbreviate.test.d.ts +0 -5
- package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
- package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
- package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
- package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
- package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
- package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/avg.d.ts +0 -8
- package/dist/esm/types/helpers/avg.test.d.ts +0 -5
- package/dist/esm/types/helpers/capitalize.d.ts +0 -7
- package/dist/esm/types/helpers/ceilToNumDecimals.d.ts +0 -9
- package/dist/esm/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
- package/dist/esm/types/helpers/cloneDeep.d.ts +0 -8
- package/dist/esm/types/helpers/compareArraysByProp.d.ts +0 -13
- package/dist/esm/types/helpers/compareArraysByProp.test.d.ts +0 -5
- package/dist/esm/types/helpers/extractProp.d.ts +0 -12
- package/dist/esm/types/helpers/extractProp.test.d.ts +0 -5
- package/dist/esm/types/helpers/floorToNumDecimals.d.ts +0 -9
- package/dist/esm/types/helpers/floorToNumDecimals.test.d.ts +0 -5
- package/dist/esm/types/helpers/forceNumIntoBounds.d.ts +0 -10
- package/dist/esm/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
- package/dist/esm/types/helpers/genCSV.d.ts +0 -18
- package/dist/esm/types/helpers/genCSV.test.d.ts +0 -5
- package/dist/esm/types/helpers/genCommaList.d.ts +0 -12
- package/dist/esm/types/helpers/genCommaList.test.d.ts +0 -1
- package/dist/esm/types/helpers/getHumanReadableDate.d.ts +0 -8
- package/dist/esm/types/helpers/getHumanReadableDate.test.d.ts +0 -5
- package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +0 -19
- package/dist/esm/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
- package/dist/esm/types/helpers/getMonthName.d.ts +0 -14
- package/dist/esm/types/helpers/getMonthName.test.d.ts +0 -5
- package/dist/esm/types/helpers/getOrdinal.d.ts +0 -8
- package/dist/esm/types/helpers/getOrdinal.test.d.ts +0 -5
- package/dist/esm/types/helpers/getPartOfDay.d.ts +0 -7
- package/dist/esm/types/helpers/getPartOfDay.test.d.ts +0 -5
- package/dist/esm/types/helpers/getTimeInfoInET.d.ts +0 -21
- package/dist/esm/types/helpers/getTimeInfoInET.test.d.ts +0 -5
- package/dist/esm/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
- package/dist/esm/types/helpers/getWordCount.d.ts +0 -10
- package/dist/esm/types/helpers/idify.d.ts +0 -9
- package/dist/esm/types/helpers/onlyKeepLetters.d.ts +0 -8
- package/dist/esm/types/helpers/padDecimalZeros.d.ts +0 -10
- package/dist/esm/types/helpers/padZerosLeft.d.ts +0 -9
- package/dist/esm/types/helpers/parallelLimit.d.ts +0 -12
- package/dist/esm/types/helpers/prefixWithAOrAn.d.ts +0 -10
- package/dist/esm/types/helpers/roundToNumDecimals.d.ts +0 -9
- package/dist/esm/types/helpers/shuffleArray.d.ts +0 -8
- package/dist/esm/types/helpers/startMinWait.d.ts +0 -9
- package/dist/esm/types/helpers/stringsToHumanReadableList.d.ts +0 -10
- package/dist/esm/types/helpers/sum.d.ts +0 -8
- package/dist/esm/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
- package/dist/esm/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
- package/dist/esm/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
- package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
- package/dist/esm/types/helpers/validators/validURL.d.ts +0 -8
- package/dist/esm/types/helpers/validators/validateEmail.d.ts +0 -11
- package/dist/esm/types/helpers/validators/validateEmail.test.d.ts +0 -1
- package/dist/esm/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
- package/dist/esm/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
- package/dist/esm/types/helpers/validators/validateString.d.ts +0 -22
- package/dist/esm/types/helpers/validators/validateString.test.d.ts +0 -1
- package/dist/esm/types/helpers/waitMs.d.ts +0 -7
- package/dist/esm/types/types/DayOfWeek.d.ts +0 -14
- package/dist/esm/types/types/Log/LogMainInfo.d.ts +0 -39
- package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
- package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
- package/dist/esm/types/types/Log/index.d.ts +0 -10
- package/dist/esm/types/types/LogAction.d.ts +0 -29
- package/dist/esm/types/types/LogBuiltInMetadata.d.ts +0 -16
- package/dist/esm/types/types/LogFunction.d.ts +0 -24
- package/dist/esm/types/types/LogLevel.d.ts +0 -10
- package/dist/esm/types/types/LogMetadataContextMap.d.ts +0 -11
- package/dist/esm/types/types/LogMetadataTagMap.d.ts +0 -8
- package/dist/esm/types/types/LogMetadataTargetMap.d.ts +0 -8
- package/dist/esm/types/types/LogMetadataType.d.ts +0 -13
- package/dist/esm/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
- package/dist/esm/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
- package/dist/esm/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
- package/dist/esm/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
- package/dist/esm/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
- package/dist/esm/types/types/LogReviewerFilterState/index.d.ts +0 -17
- package/dist/esm/types/types/LogSource.d.ts +0 -9
- package/dist/esm/types/types/LogType.d.ts +0 -9
- package/dist/esm/types/types/ParamType.d.ts +0 -17
- package/dist/esm/types/types/ReactKitErrorCode.d.ts +0 -14
- package/src/constants/DAY_IN_MS.ts +0 -7
- package/src/constants/HOUR_IN_MS.ts +0 -7
- package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +0 -9
- package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +0 -9
- package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +0 -10
- package/src/constants/LOG_ROUTE_PATH.ts +0 -9
- package/src/constants/MINUTE_IN_MS.ts +0 -7
- package/src/constants/ROUTE_PATH_PREFIX.ts +0 -7
- package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +0 -7
- package/src/errors/ErrorWithCode.tsx +0 -15
- package/src/helpers/abbreviate.test.ts +0 -26
- package/src/helpers/abbreviate.ts +0 -25
- package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +0 -114
- package/src/helpers/asyncArrayFunctions/everyAsync.ts +0 -51
- package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +0 -126
- package/src/helpers/asyncArrayFunctions/filterAsync.ts +0 -50
- package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +0 -136
- package/src/helpers/asyncArrayFunctions/forEachAsync.ts +0 -40
- package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +0 -125
- package/src/helpers/asyncArrayFunctions/mapAsync.ts +0 -46
- package/src/helpers/asyncArrayFunctions/someAsync.test.ts +0 -92
- package/src/helpers/asyncArrayFunctions/someAsync.ts +0 -49
- package/src/helpers/avg.test.ts +0 -24
- package/src/helpers/avg.ts +0 -22
- package/src/helpers/capitalize.ts +0 -20
- package/src/helpers/ceilToNumDecimals.test.ts +0 -39
- package/src/helpers/ceilToNumDecimals.ts +0 -13
- package/src/helpers/cloneDeep.ts +0 -11
- package/src/helpers/compareArraysByProp.test.ts +0 -147
- package/src/helpers/compareArraysByProp.ts +0 -56
- package/src/helpers/extractProp.test.ts +0 -34
- package/src/helpers/extractProp.ts +0 -17
- package/src/helpers/floorToNumDecimals.test.ts +0 -39
- package/src/helpers/floorToNumDecimals.ts +0 -13
- package/src/helpers/forceNumIntoBounds.test.ts +0 -34
- package/src/helpers/forceNumIntoBounds.ts +0 -19
- package/src/helpers/genCSV.test.ts +0 -75
- package/src/helpers/genCSV.ts +0 -87
- package/src/helpers/genCommaList.test.ts +0 -57
- package/src/helpers/genCommaList.ts +0 -21
- package/src/helpers/getHumanReadableDate.test.ts +0 -29
- package/src/helpers/getHumanReadableDate.ts +0 -36
- package/src/helpers/getLocalTimeInfo.test.ts +0 -48
- package/src/helpers/getLocalTimeInfo.ts +0 -58
- package/src/helpers/getMonthName.test.ts +0 -79
- package/src/helpers/getMonthName.ts +0 -29
- package/src/helpers/getOrdinal.test.ts +0 -84
- package/src/helpers/getOrdinal.ts +0 -14
- package/src/helpers/getPartOfDay.test.ts +0 -56
- package/src/helpers/getPartOfDay.ts +0 -20
- package/src/helpers/getTimeInfoInET.test.ts +0 -72
- package/src/helpers/getTimeInfoInET.ts +0 -79
- package/src/helpers/getTimestampFromTimeInfoInET.ts +0 -179
- package/src/helpers/getWordCount.ts +0 -26
- package/src/helpers/idify.ts +0 -24
- package/src/helpers/onlyKeepLetters.ts +0 -11
- package/src/helpers/padDecimalZeros.tsx +0 -32
- package/src/helpers/padZerosLeft.tsx +0 -21
- package/src/helpers/parallelLimit.ts +0 -63
- package/src/helpers/prefixWithAOrAn.ts +0 -29
- package/src/helpers/roundToNumDecimals.tsx +0 -13
- package/src/helpers/shuffleArray.ts +0 -19
- package/src/helpers/startMinWait.ts +0 -33
- package/src/helpers/stringsToHumanReadableList.ts +0 -39
- package/src/helpers/sum.tsx +0 -16
- package/src/helpers/validators/ChicagoTitleCase.test.ts +0 -85
- package/src/helpers/validators/ChicagoTitleCase.ts +0 -32
- package/src/helpers/validators/findURL.test.ts +0 -83
- package/src/helpers/validators/findURL.ts +0 -43
- package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +0 -18
- package/src/helpers/validators/shared/helpers/validateRegex.ts +0 -47
- package/src/helpers/validators/shared/types/ValidationResult.ts +0 -20
- package/src/helpers/validators/validURL.test.ts +0 -90
- package/src/helpers/validators/validURL.ts +0 -18
- package/src/helpers/validators/validateEmail.test.ts +0 -110
- package/src/helpers/validators/validateEmail.ts +0 -47
- package/src/helpers/validators/validatePhoneNumber.test.ts +0 -94
- package/src/helpers/validators/validatePhoneNumber.ts +0 -49
- package/src/helpers/validators/validateString.test.ts +0 -173
- package/src/helpers/validators/validateString.ts +0 -171
- package/src/helpers/waitMs.tsx +0 -12
- package/src/types/DayOfWeek.ts +0 -15
- package/src/types/Log/LogMainInfo.ts +0 -69
- package/src/types/Log/LogSourceSpecificInfo.ts +0 -25
- package/src/types/Log/LogTypeSpecificInfo.ts +0 -33
- package/src/types/Log/index.ts +0 -17
- package/src/types/LogAction.ts +0 -52
- package/src/types/LogBuiltInMetadata.ts +0 -19
- package/src/types/LogFunction.ts +0 -46
- package/src/types/LogLevel.ts +0 -11
- package/src/types/LogMetadataContextMap.ts +0 -15
- package/src/types/LogMetadataTagMap.ts +0 -9
- package/src/types/LogMetadataTargetMap.ts +0 -9
- package/src/types/LogMetadataType.ts +0 -16
- package/src/types/LogReviewerFilterState/ActionErrorFilterState.ts +0 -24
- package/src/types/LogReviewerFilterState/AdvancedFilterState.ts +0 -36
- package/src/types/LogReviewerFilterState/ContextFilterState.ts +0 -16
- package/src/types/LogReviewerFilterState/DateFilterState.ts +0 -26
- package/src/types/LogReviewerFilterState/TagFilterState.ts +0 -9
- package/src/types/LogReviewerFilterState/index.ts +0 -24
- package/src/types/LogSource.ts +0 -12
- package/src/types/LogType.ts +0 -12
- package/src/types/ParamType.ts +0 -18
- package/src/types/ReactKitErrorCode.tsx +0 -17
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
// Import helpers
|
|
2
|
-
import genCommaList from '../genCommaList';
|
|
3
|
-
|
|
4
|
-
// Import types
|
|
5
|
-
import ValidationResult from './shared/types/ValidationResult';
|
|
6
|
-
|
|
7
|
-
// Import constants
|
|
8
|
-
import { INVALID_STRING_ERRORS, INVALID_REGEX_ERROR } from './shared/constants/ERROR_MESSAGES';
|
|
9
|
-
|
|
10
|
-
// Import function
|
|
11
|
-
import validateString from './validateString';
|
|
12
|
-
|
|
13
|
-
/*------------------------------------------------------------------------*/
|
|
14
|
-
/* ---------------------------- Valid Tests --------------------------- */
|
|
15
|
-
/*------------------------------------------------------------------------*/
|
|
16
|
-
|
|
17
|
-
const validStrings: string[] = [
|
|
18
|
-
'users',
|
|
19
|
-
'username',
|
|
20
|
-
'MyValidString',
|
|
21
|
-
'HereisAnotherValidString',
|
|
22
|
-
'WoahAnotherValidStringIsHere',
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
const validReqs: {
|
|
26
|
-
// whitespace is removed from input before checking and returning
|
|
27
|
-
ignoreWhitespace?: boolean,
|
|
28
|
-
// input length must be at least minLen
|
|
29
|
-
minLen?: number,
|
|
30
|
-
// input length must be at most maxLen
|
|
31
|
-
maxLen?: number,
|
|
32
|
-
// input must only contain letters
|
|
33
|
-
lettersOnly?: boolean,
|
|
34
|
-
// input must only contain numbers
|
|
35
|
-
numbersOnly?: boolean,
|
|
36
|
-
// input must match given regExp
|
|
37
|
-
regexTest?: RegExp,
|
|
38
|
-
// description of regExp test, used to customize error messages
|
|
39
|
-
regexDescription?: string,
|
|
40
|
-
}[] = [
|
|
41
|
-
{
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
minLen: 5,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
minLen: 5,
|
|
48
|
-
maxLen: 30,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
minLen: 5,
|
|
52
|
-
maxLen: 30,
|
|
53
|
-
lettersOnly: true,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
minLen: 5,
|
|
57
|
-
maxLen: 30,
|
|
58
|
-
lettersOnly: true,
|
|
59
|
-
numbersOnly: false,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
minLen: 5,
|
|
63
|
-
maxLen: 30,
|
|
64
|
-
lettersOnly: true,
|
|
65
|
-
numbersOnly: false,
|
|
66
|
-
ignoreWhitespace: false,
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
|
|
70
|
-
test(
|
|
71
|
-
'Returns true for a given valid string.',
|
|
72
|
-
async () => {
|
|
73
|
-
validStrings.forEach((validString) => {
|
|
74
|
-
validReqs.forEach((validReq) => {
|
|
75
|
-
const validResponse: ValidationResult<string> = {
|
|
76
|
-
isValid: true,
|
|
77
|
-
cleanedValue: validString,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
expect(validateString(validString, validReq)).toStrictEqual(validResponse);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const validString = 'A string with whitespace!';
|
|
85
|
-
|
|
86
|
-
const validResponse: ValidationResult<string> = {
|
|
87
|
-
isValid: true,
|
|
88
|
-
cleanedValue: 'Astringwithwhitespace!',
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const validOpt = {
|
|
92
|
-
maxLen: 22,
|
|
93
|
-
ignoreWhitespace: true,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
expect(validateString(validString, validOpt)).toStrictEqual(validResponse);
|
|
97
|
-
},
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
/*------------------------------------------------------------------------*/
|
|
101
|
-
/* ---------------------------- Invalid Tests --------------------------- */
|
|
102
|
-
/*------------------------------------------------------------------------*/
|
|
103
|
-
|
|
104
|
-
const invalidStrings: {
|
|
105
|
-
input: string,
|
|
106
|
-
reqs: {
|
|
107
|
-
// whitespace is removed from input before checking and returning
|
|
108
|
-
ignoreWhitespace?: boolean,
|
|
109
|
-
// input length must be at least minLen
|
|
110
|
-
minLen?: number,
|
|
111
|
-
// input length must be at most maxLen
|
|
112
|
-
maxLen?: number,
|
|
113
|
-
// input must only contain letters
|
|
114
|
-
lettersOnly?: boolean,
|
|
115
|
-
// input must only contain numbers
|
|
116
|
-
numbersOnly?: boolean,
|
|
117
|
-
// input must match given regExp
|
|
118
|
-
regexTest?: RegExp,
|
|
119
|
-
// description of regExp test, used to customize error messages
|
|
120
|
-
regexDescription?: string,
|
|
121
|
-
},
|
|
122
|
-
error: string[]
|
|
123
|
-
}[] = [
|
|
124
|
-
{
|
|
125
|
-
input: 'ûšër',
|
|
126
|
-
reqs: {
|
|
127
|
-
minLen: 5,
|
|
128
|
-
lettersOnly: true,
|
|
129
|
-
},
|
|
130
|
-
error: [INVALID_STRING_ERRORS.MIN_LEN(5)],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
input: '123456789',
|
|
134
|
-
reqs: {
|
|
135
|
-
minLen: 10,
|
|
136
|
-
maxLen: 5,
|
|
137
|
-
lettersOnly: true,
|
|
138
|
-
},
|
|
139
|
-
error: [INVALID_STRING_ERRORS.MIN_LEN(10), INVALID_STRING_ERRORS.MAX_LEN(5), INVALID_STRING_ERRORS.LETTERS_ONLY],
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
input: 'String with non-letters!!',
|
|
143
|
-
reqs: {
|
|
144
|
-
lettersOnly: true,
|
|
145
|
-
numbersOnly: true,
|
|
146
|
-
ignoreWhitespace: true,
|
|
147
|
-
},
|
|
148
|
-
error: [INVALID_STRING_ERRORS.LETTERS_ONLY, INVALID_STRING_ERRORS.NUMBERS_ONLY],
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
input: '12345678',
|
|
152
|
-
reqs: {
|
|
153
|
-
lettersOnly: true,
|
|
154
|
-
regexTest: /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/,
|
|
155
|
-
regexDescription: 'should be a phone number',
|
|
156
|
-
},
|
|
157
|
-
error: [INVALID_STRING_ERRORS.LETTERS_ONLY, `${INVALID_REGEX_ERROR}: should be a phone number`],
|
|
158
|
-
},
|
|
159
|
-
];
|
|
160
|
-
|
|
161
|
-
test(
|
|
162
|
-
'Returns false for a given invalid string.',
|
|
163
|
-
async () => {
|
|
164
|
-
invalidStrings.forEach((triple) => {
|
|
165
|
-
const invalidResponse: ValidationResult<string> = {
|
|
166
|
-
isValid: false,
|
|
167
|
-
errorMessage: `${INVALID_STRING_ERRORS.MESSAGE_INTRO}${genCommaList(triple.error)}.`,
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
expect(validateString(triple.input, triple.reqs)).toStrictEqual(invalidResponse);
|
|
171
|
-
});
|
|
172
|
-
},
|
|
173
|
-
);
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
// Import helpers
|
|
2
|
-
import validateRegex from './shared/helpers/validateRegex';
|
|
3
|
-
import genCommaList from '../genCommaList';
|
|
4
|
-
|
|
5
|
-
// Import constants
|
|
6
|
-
import { INVALID_STRING_ERRORS } from './shared/constants/ERROR_MESSAGES';
|
|
7
|
-
|
|
8
|
-
// Import types
|
|
9
|
-
import ValidationResult from './shared/types/ValidationResult';
|
|
10
|
-
|
|
11
|
-
/*------------------------------------------------------------------------*/
|
|
12
|
-
/* ------------------------------ Constants ----------------------------- */
|
|
13
|
-
/*------------------------------------------------------------------------*/
|
|
14
|
-
|
|
15
|
-
// define minimum and maximum range for lowercase ASCII chars
|
|
16
|
-
const LOWERCASE_MIN = 65;
|
|
17
|
-
const LOWERCASE_MAX = 90;
|
|
18
|
-
|
|
19
|
-
// define minimum and maximum range for uppercase ASCII chars
|
|
20
|
-
const UPPERCASE_MIN = 97;
|
|
21
|
-
const UPPERCASE_MAX = 122;
|
|
22
|
-
|
|
23
|
-
// define minimum and maximum range for ASCII digits
|
|
24
|
-
const DIGIT_MIN = 48;
|
|
25
|
-
const DIGIT_MAX = 57;
|
|
26
|
-
|
|
27
|
-
/*------------------------------------------------------------------------*/
|
|
28
|
-
/* ---------------------------- Main Function --------------------------- */
|
|
29
|
-
/*------------------------------------------------------------------------*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Determines whether a given input string is considered valid based on
|
|
33
|
-
* the provided requirements.
|
|
34
|
-
* @author Austen Money
|
|
35
|
-
* @param input input string
|
|
36
|
-
* @param opts options for validation
|
|
37
|
-
* @returns whether input is considered valid according to reqs - if
|
|
38
|
-
* valid, returns a cleaned version of input; if invalid, returns
|
|
39
|
-
* a string containing error messages describing which requirements
|
|
40
|
-
* were not met.
|
|
41
|
-
*/
|
|
42
|
-
const validateString = (
|
|
43
|
-
input: string,
|
|
44
|
-
opts: {
|
|
45
|
-
// whitespace is removed from input before checking and returning
|
|
46
|
-
ignoreWhitespace?: boolean,
|
|
47
|
-
// input length must be at least minLen
|
|
48
|
-
minLen?: number,
|
|
49
|
-
// input length must be at most maxLen
|
|
50
|
-
maxLen?: number,
|
|
51
|
-
// input must only contain letters
|
|
52
|
-
// (future TODO: add option for passing in an array of permitted chars)
|
|
53
|
-
lettersOnly?: boolean,
|
|
54
|
-
// input must only contain numbers
|
|
55
|
-
numbersOnly?: boolean,
|
|
56
|
-
// input must match given regExp
|
|
57
|
-
regexTest?: RegExp,
|
|
58
|
-
// description of regExp test, used to customize error messages
|
|
59
|
-
regexDescription?: string,
|
|
60
|
-
},
|
|
61
|
-
): ValidationResult<string> => {
|
|
62
|
-
// stores all invalid input errors
|
|
63
|
-
const errorMessages: string[] = [];
|
|
64
|
-
|
|
65
|
-
// contains version of input that will be returned
|
|
66
|
-
let cleanedValue: string = input;
|
|
67
|
-
|
|
68
|
-
// remove whitespace if required
|
|
69
|
-
if (opts.ignoreWhitespace) {
|
|
70
|
-
cleanedValue = input.replace(/\s+/g, '');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// apply max char requirement
|
|
74
|
-
if (opts.minLen) {
|
|
75
|
-
if (cleanedValue.length < opts.minLen) {
|
|
76
|
-
errorMessages.push(INVALID_STRING_ERRORS.MIN_LEN(opts.minLen));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// apply max char requirement
|
|
81
|
-
if (opts.maxLen) {
|
|
82
|
-
if (cleanedValue.length > opts.maxLen) {
|
|
83
|
-
errorMessages.push(INVALID_STRING_ERRORS.MAX_LEN(opts.maxLen));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// apply alphabetical requirement
|
|
88
|
-
if (opts.lettersOnly) {
|
|
89
|
-
// remove diacritics
|
|
90
|
-
cleanedValue = cleanedValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
91
|
-
|
|
92
|
-
const containsNonLetters = (
|
|
93
|
-
cleanedValue
|
|
94
|
-
// split into characters
|
|
95
|
-
.split('')
|
|
96
|
-
// convert into character codes
|
|
97
|
-
.map((curr) => {
|
|
98
|
-
return curr.charCodeAt(0);
|
|
99
|
-
})
|
|
100
|
-
// check for non-letters
|
|
101
|
-
.some((currCode) => {
|
|
102
|
-
return (
|
|
103
|
-
!(currCode >= LOWERCASE_MIN && currCode <= LOWERCASE_MAX)
|
|
104
|
-
&& !(currCode >= UPPERCASE_MIN && currCode <= UPPERCASE_MAX)
|
|
105
|
-
);
|
|
106
|
-
})
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
if (containsNonLetters) {
|
|
110
|
-
errorMessages.push(INVALID_STRING_ERRORS.LETTERS_ONLY);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// apply numerical requirement
|
|
115
|
-
if (opts.numbersOnly) {
|
|
116
|
-
const containsNonNumbers = (
|
|
117
|
-
cleanedValue
|
|
118
|
-
// split into characters
|
|
119
|
-
.split('')
|
|
120
|
-
// convert into character codes
|
|
121
|
-
.map((curr) => {
|
|
122
|
-
return curr.charCodeAt(0);
|
|
123
|
-
})
|
|
124
|
-
// check for non-numbers
|
|
125
|
-
.some((currCode) => {
|
|
126
|
-
return (
|
|
127
|
-
!(currCode >= DIGIT_MIN && currCode <= DIGIT_MAX)
|
|
128
|
-
);
|
|
129
|
-
})
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
if (containsNonNumbers) {
|
|
133
|
-
errorMessages.push(INVALID_STRING_ERRORS.NUMBERS_ONLY);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// apply regex requirement
|
|
138
|
-
if (opts.regexTest) {
|
|
139
|
-
const regex = opts.regexTest;
|
|
140
|
-
|
|
141
|
-
// validate and create customized error message if description is provided
|
|
142
|
-
const result = validateRegex({
|
|
143
|
-
input: cleanedValue,
|
|
144
|
-
regex,
|
|
145
|
-
regexDescription: opts.regexDescription,
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
// if string did not pass regex validation, add error message
|
|
149
|
-
if (result.isValid === false) {
|
|
150
|
-
errorMessages.push(result.errorMessage);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// combine all error messages into one string to return
|
|
155
|
-
const errorMessage = `${INVALID_STRING_ERRORS.MESSAGE_INTRO}${genCommaList(errorMessages)}.`;
|
|
156
|
-
|
|
157
|
-
return (
|
|
158
|
-
// if no error messages, string is valid; if not, it is invalid
|
|
159
|
-
errorMessages.length === 0
|
|
160
|
-
? {
|
|
161
|
-
isValid: true,
|
|
162
|
-
cleanedValue,
|
|
163
|
-
}
|
|
164
|
-
: {
|
|
165
|
-
isValid: false,
|
|
166
|
-
errorMessage,
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export default validateString;
|
package/src/helpers/waitMs.tsx
DELETED
package/src/types/DayOfWeek.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// Import shared types
|
|
2
|
-
import LogLevel from '../LogLevel';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Main information in a log event
|
|
6
|
-
* @author Gabe Abrams
|
|
7
|
-
*/
|
|
8
|
-
type LogMainInfo = {
|
|
9
|
-
// Unique id of the log event
|
|
10
|
-
id: string,
|
|
11
|
-
// First name of the user
|
|
12
|
-
userFirstName: string,
|
|
13
|
-
// Last name of the user
|
|
14
|
-
userLastName: string,
|
|
15
|
-
// User email
|
|
16
|
-
userEmail: string,
|
|
17
|
-
// User Canvas Id
|
|
18
|
-
userId: number,
|
|
19
|
-
// If true, the user is a learner
|
|
20
|
-
isLearner: boolean,
|
|
21
|
-
// If true, the user is an admin
|
|
22
|
-
isAdmin: boolean,
|
|
23
|
-
// If true, the user is a ttm
|
|
24
|
-
isTTM: boolean,
|
|
25
|
-
// The id of the Canvas course that the user launched from
|
|
26
|
-
courseId: number,
|
|
27
|
-
// The name of the Canvas course
|
|
28
|
-
courseName: string,
|
|
29
|
-
// Browser info
|
|
30
|
-
browser: {
|
|
31
|
-
// Name of the browser
|
|
32
|
-
name: string,
|
|
33
|
-
// Version of the browser
|
|
34
|
-
version: string,
|
|
35
|
-
},
|
|
36
|
-
// Device info
|
|
37
|
-
device: {
|
|
38
|
-
// Name of the operating system
|
|
39
|
-
os: string,
|
|
40
|
-
// If true, device is a mobile device
|
|
41
|
-
isMobile: boolean,
|
|
42
|
-
},
|
|
43
|
-
// Calendar year that the event is from
|
|
44
|
-
year: number,
|
|
45
|
-
// Month that the event is from (1 = Jan, 12 = Dec)
|
|
46
|
-
month: number,
|
|
47
|
-
// Day of the month that the event is from
|
|
48
|
-
day: number,
|
|
49
|
-
// Hour of the day (24hr) when the event occurred
|
|
50
|
-
hour: number,
|
|
51
|
-
// Minute of the day when the event occurred
|
|
52
|
-
minute: number,
|
|
53
|
-
// Timestamp of event (ms since epoch)
|
|
54
|
-
timestamp: number,
|
|
55
|
-
// Context of the event (each app determines how to organize contexts)
|
|
56
|
-
context: string,
|
|
57
|
-
// Subcontext of the event (each app determines how to organize subcontexts)
|
|
58
|
-
subcontext: string,
|
|
59
|
-
// List of tags that apply to this action (each app determines tag usage)
|
|
60
|
-
tags: string[],
|
|
61
|
-
// Log level
|
|
62
|
-
level: LogLevel,
|
|
63
|
-
// Additional optional custom metadata
|
|
64
|
-
metadata?: {
|
|
65
|
-
[k: string]: any,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default LogMainInfo;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Import shared types
|
|
2
|
-
import LogSource from '../LogSource';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Log info that is specific to the type of source
|
|
6
|
-
* @author Gabe Abrams
|
|
7
|
-
*/
|
|
8
|
-
type LogSourceSpecificInfo = (
|
|
9
|
-
// Client
|
|
10
|
-
| {
|
|
11
|
-
// Source of the event
|
|
12
|
-
source: LogSource.Client,
|
|
13
|
-
}
|
|
14
|
-
// Server
|
|
15
|
-
| {
|
|
16
|
-
// Source of the event
|
|
17
|
-
source: LogSource.Server,
|
|
18
|
-
// Route path (e.g. /api/admin/courses/53450/blocks)
|
|
19
|
-
routePath: string,
|
|
20
|
-
// Route template (e.g. /api/admin/courses/:courseId/blocks)
|
|
21
|
-
routeTemplate: string,
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export default LogSourceSpecificInfo;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Import shared types
|
|
2
|
-
import LogAction from '../LogAction';
|
|
3
|
-
import LogType from '../LogType';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Log info that is specific to the type of log
|
|
7
|
-
* @author Gabe Abrams
|
|
8
|
-
*/
|
|
9
|
-
type LogTypeSpecificInfo = (
|
|
10
|
-
// Error
|
|
11
|
-
| {
|
|
12
|
-
// Type of the event
|
|
13
|
-
type: LogType.Error,
|
|
14
|
-
// The error message
|
|
15
|
-
errorMessage: string,
|
|
16
|
-
// The error code
|
|
17
|
-
errorCode: string,
|
|
18
|
-
// Error stack trace
|
|
19
|
-
errorStack: string,
|
|
20
|
-
}
|
|
21
|
-
// Action
|
|
22
|
-
| {
|
|
23
|
-
// Type of the event
|
|
24
|
-
type: LogType.Action,
|
|
25
|
-
// Target of the action (each app determines the list of targets)
|
|
26
|
-
// These are usually buttons, panels, elements, etc.
|
|
27
|
-
target: string,
|
|
28
|
-
// The type of action performed on the target
|
|
29
|
-
action: LogAction,
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
export default LogTypeSpecificInfo;
|
package/src/types/Log/index.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Import shared types
|
|
2
|
-
import LogMainInfo from './LogMainInfo';
|
|
3
|
-
import LogSourceSpecificInfo from './LogSourceSpecificInfo';
|
|
4
|
-
import LogTypeSpecificInfo from './LogTypeSpecificInfo';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A single log event corresponding to an action performed by a user or an
|
|
8
|
-
* error encountered by a user
|
|
9
|
-
* @author Gabe Abrams
|
|
10
|
-
*/
|
|
11
|
-
type Log = (
|
|
12
|
-
LogMainInfo
|
|
13
|
-
& LogSourceSpecificInfo
|
|
14
|
-
& LogTypeSpecificInfo
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
export default Log;
|
package/src/types/LogAction.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types of actions
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
*/
|
|
5
|
-
enum LogAction {
|
|
6
|
-
// Target was opened by the user (it was not on screen, but now it is)
|
|
7
|
-
Open = 'Open',
|
|
8
|
-
// Target was closed by the user (it was on screen, but now it is not)
|
|
9
|
-
Close = 'Close',
|
|
10
|
-
// Target was cancelled by the user (it was on closed without saving)
|
|
11
|
-
Cancel = 'Cancel',
|
|
12
|
-
// Target was expanded by the user (it always remains on screen, but size was changed)
|
|
13
|
-
Expand = 'Expand',
|
|
14
|
-
// Target was collapsed by the user (it always remains on screen, but size was changed)
|
|
15
|
-
Collapse = 'Collapse',
|
|
16
|
-
// Target was viewed by the user (only for items that are not opened or closed, those must use Open/Close actions)
|
|
17
|
-
View = 'View',
|
|
18
|
-
// Target interrupted the user (popup, dialog, validation message, etc. appeared without user prompting)
|
|
19
|
-
Interrupt = 'Interrupt',
|
|
20
|
-
// Target was created by the user (it did not exist before)
|
|
21
|
-
Create = 'Create',
|
|
22
|
-
// Target was modified by the user (it existed and was changed)
|
|
23
|
-
Modify = 'Modify',
|
|
24
|
-
// Target was deleted by the user (it existed and now it doesn't)
|
|
25
|
-
Delete = 'Delete',
|
|
26
|
-
// Target was added by the user (it already existed and was added to another place)
|
|
27
|
-
Add = 'Add',
|
|
28
|
-
// Target was removed by the user (it was removed from something but still exists)
|
|
29
|
-
Remove = 'Remove',
|
|
30
|
-
// Target was activated by the user (click, check, tap, keypress, etc.)
|
|
31
|
-
Activate = 'Activate',
|
|
32
|
-
// Target was deactivated by the user (click away, uncheck, tap outside of, tab away, etc.)
|
|
33
|
-
Deactivate = 'Deactivate',
|
|
34
|
-
// User showed interest in a target (hover, peek, etc.)
|
|
35
|
-
Peek = 'Peek',
|
|
36
|
-
// Halt a process (pause, etc.)
|
|
37
|
-
Halt = 'Halt',
|
|
38
|
-
// Resume a process (resume a halted process)
|
|
39
|
-
Resume = 'Resume',
|
|
40
|
-
// Jump to/seek to/reveal/go to/navigate to a target
|
|
41
|
-
Jump = 'Jump',
|
|
42
|
-
// Post a submission/message/etc. into the target
|
|
43
|
-
Post = 'Post',
|
|
44
|
-
// Like something
|
|
45
|
-
Like = 'Like',
|
|
46
|
-
// Dislike something
|
|
47
|
-
Dislike = 'Dislike',
|
|
48
|
-
// Unknown action
|
|
49
|
-
Unknown = 'Unknown',
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export default LogAction;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in metadata for logs
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
*/
|
|
5
|
-
const LogBuiltInMetadata = {
|
|
6
|
-
// Contexts
|
|
7
|
-
Context: {
|
|
8
|
-
Uncategorized: 'Uncategorized',
|
|
9
|
-
ServerRenderedErrorPage: 'ServerRenderedErrorPage',
|
|
10
|
-
ServerEndpointError: 'ServerEndpointError',
|
|
11
|
-
ClientFatalError: 'ClientFatalError',
|
|
12
|
-
},
|
|
13
|
-
// Targets
|
|
14
|
-
Target: {
|
|
15
|
-
NoTarget: 'NoTarget',
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default LogBuiltInMetadata;
|
package/src/types/LogFunction.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Import shared types
|
|
2
|
-
import Log from './Log';
|
|
3
|
-
import LogAction from './LogAction';
|
|
4
|
-
import LogLevel from './LogLevel';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Type of a log action function
|
|
8
|
-
* @author Gabe Abrams
|
|
9
|
-
*/
|
|
10
|
-
type LogFunction = (
|
|
11
|
-
opts: (
|
|
12
|
-
// Shared info
|
|
13
|
-
{
|
|
14
|
-
// Context of the event (each app determines how to organize contexts)
|
|
15
|
-
context: string | { _: string },
|
|
16
|
-
// Subcontext of the event (each app determines how to organize subcontexts)
|
|
17
|
-
subcontext?: string,
|
|
18
|
-
// List of tags that apply to this action (each app determines tag usage)
|
|
19
|
-
tags?: string[],
|
|
20
|
-
// Additional optional custom metadata
|
|
21
|
-
metadata?: {
|
|
22
|
-
[k: string]: any,
|
|
23
|
-
},
|
|
24
|
-
// Log level (default is info)
|
|
25
|
-
level?: LogLevel,
|
|
26
|
-
} & (
|
|
27
|
-
// Error
|
|
28
|
-
| {
|
|
29
|
-
// The error object to log
|
|
30
|
-
error: any,
|
|
31
|
-
}
|
|
32
|
-
// Action
|
|
33
|
-
| {
|
|
34
|
-
// The type of action performed
|
|
35
|
-
action: LogAction,
|
|
36
|
-
// Target of the action (each app determines the list of targets)
|
|
37
|
-
// These are usually buttons, panels, elements, etc.
|
|
38
|
-
// If no target is included, this should indicate that this is an action
|
|
39
|
-
// being performed on the whole feature (open/close/etc)
|
|
40
|
-
target?: string,
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
),
|
|
44
|
-
) => Promise<Log>;
|
|
45
|
-
|
|
46
|
-
export default LogFunction;
|
package/src/types/LogLevel.ts
DELETED