dce-reactkit 3.9.4-beta-prompt.2 → 3.9.4-beta-logreviewer.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 (42) hide show
  1. package/dist/cjs/index.js +670 -869
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/AppWrapper.d.ts +0 -24
  4. package/dist/cjs/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +6 -0
  5. package/dist/cjs/types/index.d.ts +2 -2
  6. package/dist/cjs/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +13 -0
  7. package/dist/cjs/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +17 -0
  8. package/dist/cjs/types/types/LogReviewerFilterState/ContextFilterState.d.ts +6 -0
  9. package/dist/cjs/types/types/LogReviewerFilterState/DateFilterState.d.ts +13 -0
  10. package/dist/cjs/types/types/LogReviewerFilterState/TagFilterState.d.ts +4 -0
  11. package/dist/cjs/types/types/LogReviewerFilterState/index.d.ts +17 -0
  12. package/dist/cjs/types/types/ModalType.d.ts +0 -1
  13. package/dist/esm/index.js +672 -870
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/types/components/AppWrapper.d.ts +0 -24
  16. package/dist/esm/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +6 -0
  17. package/dist/esm/types/index.d.ts +2 -2
  18. package/dist/esm/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +13 -0
  19. package/dist/esm/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +17 -0
  20. package/dist/esm/types/types/LogReviewerFilterState/ContextFilterState.d.ts +6 -0
  21. package/dist/esm/types/types/LogReviewerFilterState/DateFilterState.d.ts +13 -0
  22. package/dist/esm/types/types/LogReviewerFilterState/TagFilterState.d.ts +4 -0
  23. package/dist/esm/types/types/LogReviewerFilterState/index.d.ts +17 -0
  24. package/dist/esm/types/types/ModalType.d.ts +0 -1
  25. package/dist/index.d.ts +1 -26
  26. package/package.json +1 -1
  27. package/src/components/AppWrapper.tsx +0 -216
  28. package/src/components/LogReviewer.tsx +840 -1232
  29. package/src/components/Modal/index.tsx +0 -3
  30. package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +9 -0
  31. package/src/index.ts +0 -2
  32. package/src/server/initServer.ts +216 -19
  33. package/src/types/LogReviewerFilterState/ActionErrorFilterState.ts +21 -0
  34. package/src/types/LogReviewerFilterState/AdvancedFilterState.ts +33 -0
  35. package/src/types/LogReviewerFilterState/ContextFilterState.ts +13 -0
  36. package/src/types/LogReviewerFilterState/DateFilterState.ts +23 -0
  37. package/src/types/LogReviewerFilterState/TagFilterState.ts +6 -0
  38. package/src/types/LogReviewerFilterState/index.ts +24 -0
  39. package/src/types/ModalType.tsx +0 -1
  40. package/dist/cjs/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  41. package/dist/esm/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
  42. package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +0 -9
@@ -44,30 +44,6 @@ export declare const confirm: (title: string, text: string, opts?: {
44
44
  cancelButtonText?: string;
45
45
  cancelButtonVariant?: Variant;
46
46
  }) => Promise<boolean>;
47
- /**
48
- * Show a prompt modal asking the user for input
49
- * @author Yuen Ler Chow
50
- * @param title the title text to display at the top of the prompt
51
- * @param text the text to display in the prompt
52
- * @param [opts={}] additional options for the prompt dialog
53
- * @param [opts.placeholder] the placeholder text for the input field
54
- * @param [opts.defaultText] the default text for the input field
55
- * @param [opts.confirmButtonText=Okay] the text of the confirm button
56
- * @param [opts.confirmButtonVariant=Variant.Dark] the variant of the confirm button
57
- * @param [opts.cancelButtonText=Cancel] the text of the cancel button
58
- * @param [opts.cancelButtonVariant=Variant.Secondary] the variant of the cancel button
59
- * @returns Promise that resolves with the input string or null if canceled
60
- */
61
- export declare const prompt: (title: string, text: string, opts?: {
62
- defaultText?: string | undefined;
63
- placeholder?: string | undefined;
64
- confirmButtonText?: string | undefined;
65
- confirmButtonVariant?: Variant | undefined;
66
- cancelButtonText?: string | undefined;
67
- cancelButtonVariant?: Variant | undefined;
68
- minNumChars?: number | undefined;
69
- findValidationError?: ((text: string) => string | undefined) | undefined;
70
- } | undefined) => Promise<string | null>;
71
47
  /**
72
48
  * Show a fatal error message
73
49
  * @author Gabe Abrams
@@ -0,0 +1,6 @@
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,4 +1,4 @@
1
- import AppWrapper, { alert, prompt, confirm, showFatalError, addFatalErrorHandler, leaveToURL } from './components/AppWrapper';
1
+ import AppWrapper, { alert, confirm, showFatalError, addFatalErrorHandler, leaveToURL } from './components/AppWrapper';
2
2
  import LoadingSpinner from './components/LoadingSpinner';
3
3
  import ErrorBox from './components/ErrorBox';
4
4
  import Modal from './components/Modal';
@@ -99,4 +99,4 @@ import PickableItem from './components/ItemPicker/types/PickableItem';
99
99
  import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
100
100
  import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
101
101
  import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
102
- export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, MultiSwitch, Dropdown, alert, prompt, 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, idify, makeLinksClickable, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, leaveToURL, combineClassNames, useForceRender, setClientEventMetadataPopulator, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, visitEndpointOnAnotherServer, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, IntelliTableColumn, DropdownItemType, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
102
+ export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, MultiSwitch, Dropdown, 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, idify, makeLinksClickable, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, leaveToURL, combineClassNames, useForceRender, setClientEventMetadataPopulator, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, visitEndpointOnAnotherServer, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, IntelliTableColumn, DropdownItemType, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
@@ -0,0 +1,13 @@
1
+ import LogType from '../LogType';
2
+ type ActionErrorFilterState = {
3
+ type: LogType | undefined;
4
+ errorMessage: string;
5
+ errorCode: string;
6
+ target: {
7
+ [k: string]: boolean;
8
+ };
9
+ action: {
10
+ [k: string]: boolean;
11
+ };
12
+ };
13
+ export default ActionErrorFilterState;
@@ -0,0 +1,17 @@
1
+ import LogSource from '../LogSource';
2
+ type AdvancedFilterState = {
3
+ userFirstName: string;
4
+ userLastName: string;
5
+ userEmail: string;
6
+ userId: string;
7
+ includeLearners: boolean;
8
+ includeTTMs: boolean;
9
+ includeAdmins: boolean;
10
+ courseId: string;
11
+ courseName: string;
12
+ isMobile: (true | false | undefined);
13
+ source: LogSource | undefined;
14
+ routePath: string;
15
+ routeTemplate: string;
16
+ };
17
+ export default AdvancedFilterState;
@@ -0,0 +1,6 @@
1
+ type ContextFilterState = {
2
+ [k: string]: (boolean | {
3
+ [k: string]: boolean;
4
+ });
5
+ };
6
+ export default ContextFilterState;
@@ -0,0 +1,13 @@
1
+ type DateFilterState = {
2
+ startDate: {
3
+ year: number;
4
+ month: number;
5
+ day: number;
6
+ };
7
+ endDate: {
8
+ year: number;
9
+ month: number;
10
+ day: number;
11
+ };
12
+ };
13
+ export default DateFilterState;
@@ -0,0 +1,4 @@
1
+ type TagFilterState = {
2
+ [k: string]: boolean;
3
+ };
4
+ export default TagFilterState;
@@ -0,0 +1,17 @@
1
+ import DateFilterState from './DateFilterState';
2
+ import ContextFilterState from './ContextFilterState';
3
+ import TagFilterState from './TagFilterState';
4
+ import ActionErrorFilterState from './ActionErrorFilterState';
5
+ import AdvancedFilterState from './AdvancedFilterState';
6
+ /**
7
+ * A bundle of filter state objects for each type of filter
8
+ * @author Gabe Abrams
9
+ */
10
+ type LogReviewerFilterState = {
11
+ dateFilterState: DateFilterState;
12
+ contextFilterState: ContextFilterState;
13
+ tagFilterState: TagFilterState;
14
+ actionErrorFilterState: ActionErrorFilterState;
15
+ advancedFilterState: AdvancedFilterState;
16
+ };
17
+ export default LogReviewerFilterState;
@@ -4,7 +4,6 @@
4
4
  */
5
5
  declare enum ModalType {
6
6
  Okay = "okay",
7
- Cancel = "cancel",
8
7
  OkayCancel = "okay-cancel",
9
8
  YesNo = "yes-no",
10
9
  YesNoCancel = "yes-no-cancel",