dce-reactkit 3.4.1 → 3.5.2

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 (113) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/dist/cjs/index.js +36477 -247
  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 +16 -0
  11. package/dist/cjs/types/components/DBEntryManagerPanel/AddOrEditDBEntry/index.d.ts +35 -0
  12. package/dist/cjs/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +9 -0
  13. package/dist/cjs/types/components/DBEntryManagerPanel/index.d.ts +36 -0
  14. package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntry.d.ts +8 -0
  15. package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntryField.d.ts +49 -0
  16. package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntryFieldType.d.ts +12 -0
  17. package/dist/cjs/types/components/Drawer.d.ts +1 -1
  18. package/dist/cjs/types/components/ErrorBox.d.ts +1 -1
  19. package/dist/cjs/types/components/IntelliTable.d.ts +1 -1
  20. package/dist/cjs/types/components/ItemPicker/NestableItemList.d.ts +1 -1
  21. package/dist/cjs/types/components/ItemPicker/index.d.ts +1 -1
  22. package/dist/cjs/types/components/ItemPicker/types/PickableItem.d.ts +1 -1
  23. package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
  24. package/dist/cjs/types/components/Modal.d.ts +1 -1
  25. package/dist/cjs/types/components/PopFailureMark.d.ts +1 -1
  26. package/dist/cjs/types/components/PopPendingMark.d.ts +1 -1
  27. package/dist/cjs/types/components/PopSuccessMark.d.ts +1 -1
  28. package/dist/cjs/types/components/RadioButton.d.ts +1 -1
  29. package/dist/cjs/types/components/SimpleDateChooser.d.ts +1 -1
  30. package/dist/cjs/types/components/TabBox.d.ts +1 -1
  31. package/dist/cjs/types/helpers/addDBEditorEndpoints.d.ts +41 -0
  32. package/dist/cjs/types/helpers/compareArraysByProp.d.ts +3 -2
  33. package/dist/cjs/types/helpers/genRouteHandler.d.ts +7 -7
  34. package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +1 -1
  35. package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +1 -1
  36. package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +1 -1
  37. package/dist/cjs/types/helpers/parallelLimit.d.ts +1 -1
  38. package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +1 -1
  39. package/dist/cjs/types/index.d.ts +7 -2
  40. package/dist/cjs/types/server/initServer.d.ts +1 -1
  41. package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
  42. package/dist/cjs/types/types/Log/LogMainInfo.d.ts +1 -1
  43. package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +1 -1
  44. package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +1 -1
  45. package/dist/cjs/types/types/Log/index.d.ts +1 -1
  46. package/dist/cjs/types/types/LogFunction.d.ts +1 -1
  47. package/dist/cjs/types/types/LogMetadataContextMap.d.ts +1 -1
  48. package/dist/cjs/types/types/LogMetadataTagMap.d.ts +1 -1
  49. package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +1 -1
  50. package/dist/cjs/types/types/LogMetadataType.d.ts +1 -1
  51. package/dist/esm/index.js +36692 -483
  52. package/dist/esm/index.js.map +1 -1
  53. package/dist/esm/types/client/initClient.d.ts +1 -1
  54. package/dist/esm/types/components/AppWrapper.d.ts +6 -6
  55. package/dist/esm/types/components/ButtonInputGroup.d.ts +1 -1
  56. package/dist/esm/types/components/CSVDownloadButton.d.ts +1 -1
  57. package/dist/esm/types/components/CheckboxButton.d.ts +1 -1
  58. package/dist/esm/types/components/CopiableBox.d.ts +1 -1
  59. package/dist/esm/types/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.d.ts +16 -0
  60. package/dist/esm/types/components/DBEntryManagerPanel/AddOrEditDBEntry/index.d.ts +35 -0
  61. package/dist/esm/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +9 -0
  62. package/dist/esm/types/components/DBEntryManagerPanel/index.d.ts +36 -0
  63. package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntry.d.ts +8 -0
  64. package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntryField.d.ts +49 -0
  65. package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntryFieldType.d.ts +12 -0
  66. package/dist/esm/types/components/Drawer.d.ts +1 -1
  67. package/dist/esm/types/components/ErrorBox.d.ts +1 -1
  68. package/dist/esm/types/components/IntelliTable.d.ts +1 -1
  69. package/dist/esm/types/components/ItemPicker/NestableItemList.d.ts +1 -1
  70. package/dist/esm/types/components/ItemPicker/index.d.ts +1 -1
  71. package/dist/esm/types/components/ItemPicker/types/PickableItem.d.ts +1 -1
  72. package/dist/esm/types/components/LogReviewer.d.ts +1 -1
  73. package/dist/esm/types/components/Modal.d.ts +1 -1
  74. package/dist/esm/types/components/PopFailureMark.d.ts +1 -1
  75. package/dist/esm/types/components/PopPendingMark.d.ts +1 -1
  76. package/dist/esm/types/components/PopSuccessMark.d.ts +1 -1
  77. package/dist/esm/types/components/RadioButton.d.ts +1 -1
  78. package/dist/esm/types/components/SimpleDateChooser.d.ts +1 -1
  79. package/dist/esm/types/components/TabBox.d.ts +1 -1
  80. package/dist/esm/types/helpers/addDBEditorEndpoints.d.ts +41 -0
  81. package/dist/esm/types/helpers/compareArraysByProp.d.ts +3 -2
  82. package/dist/esm/types/helpers/genRouteHandler.d.ts +7 -7
  83. package/dist/esm/types/helpers/getHumanReadableDate.d.ts +1 -1
  84. package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +1 -1
  85. package/dist/esm/types/helpers/getTimeInfoInET.d.ts +1 -1
  86. package/dist/esm/types/helpers/parallelLimit.d.ts +1 -1
  87. package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +1 -1
  88. package/dist/esm/types/index.d.ts +7 -2
  89. package/dist/esm/types/server/initServer.d.ts +1 -1
  90. package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
  91. package/dist/esm/types/types/Log/LogMainInfo.d.ts +1 -1
  92. package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +1 -1
  93. package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +1 -1
  94. package/dist/esm/types/types/Log/index.d.ts +1 -1
  95. package/dist/esm/types/types/LogFunction.d.ts +1 -1
  96. package/dist/esm/types/types/LogMetadataContextMap.d.ts +1 -1
  97. package/dist/esm/types/types/LogMetadataTagMap.d.ts +1 -1
  98. package/dist/esm/types/types/LogMetadataTargetMap.d.ts +1 -1
  99. package/dist/esm/types/types/LogMetadataType.d.ts +1 -1
  100. package/dist/index.d.ts +229 -85
  101. package/package.json +7 -2
  102. package/src/client/initClient.tsx +23 -31
  103. package/src/components/AppWrapper.tsx +1 -1
  104. package/src/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.tsx +303 -0
  105. package/src/components/DBEntryManagerPanel/AddOrEditDBEntry/index.tsx +737 -0
  106. package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +16 -0
  107. package/src/components/DBEntryManagerPanel/index.tsx +522 -0
  108. package/src/components/DBEntryManagerPanel/types/DBEntry.ts +7 -0
  109. package/src/components/DBEntryManagerPanel/types/DBEntryField.ts +94 -0
  110. package/src/components/DBEntryManagerPanel/types/DBEntryFieldType.ts +18 -0
  111. package/src/helpers/addDBEditorEndpoints.ts +128 -0
  112. package/src/helpers/compareArraysByProp.ts +41 -19
  113. package/src/index.ts +11 -1
@@ -2,7 +2,7 @@
2
2
  * Type of CACCL's send request function
3
3
  * @author Gabe Abrams
4
4
  */
5
- declare type SendRequestFunction = (opts: {
5
+ type SendRequestFunction = (opts: {
6
6
  path: string;
7
7
  method: ('GET' | 'POST' | 'DELETE' | 'PUT');
8
8
  params?: {
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import React from 'react';
7
7
  import Variant from '../types/Variant';
8
- declare type Props = {
8
+ type Props = {
9
9
  children: React.ReactNode;
10
10
  dark?: boolean;
11
11
  };
@@ -32,11 +32,11 @@ export declare const alert: (title: string, text: string) => Promise<undefined>;
32
32
  * @returns true if the user confirmed
33
33
  */
34
34
  export declare const confirm: (title: string, text: string, opts?: {
35
- confirmButtonText?: string | undefined;
36
- confirmButtonVariant?: Variant | undefined;
37
- cancelButtonText?: string | undefined;
38
- cancelButtonVariant?: Variant | undefined;
39
- } | undefined) => Promise<boolean>;
35
+ confirmButtonText?: string;
36
+ confirmButtonVariant?: Variant;
37
+ cancelButtonText?: string;
38
+ cancelButtonVariant?: Variant;
39
+ }) => Promise<boolean>;
40
40
  /**
41
41
  * Show a fatal error message
42
42
  * @author Gabe Abrams
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  label: string;
8
8
  minLabelWidth?: string;
9
9
  children: React.ReactNode;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  filename: string;
8
8
  csv: string;
9
9
  id?: string;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import Variant from '../types/Variant';
7
- declare type Props = {
7
+ type Props = {
8
8
  text: string;
9
9
  onChanged: (checked: boolean) => void;
10
10
  ariaLabel: string;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  text: string;
8
8
  maxTextWidthRem?: number;
9
9
  label?: string;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Multiselect component that allows the user to type in values and add them to
3
+ * the multiselect component
4
+ * @author Yuen Ler Chow
5
+ * @author Gabe Abrams
6
+ */
7
+ import React from 'react';
8
+ import DBEntryFieldType from '../types/DBEntryFieldType';
9
+ type Props = {
10
+ type: DBEntryFieldType.StringArray | DBEntryFieldType.NumberArray;
11
+ values: string[] | number[];
12
+ onChange: (values: string[] | number[]) => void;
13
+ disabled?: boolean;
14
+ };
15
+ declare const CreatableMultiselect: React.FC<Props>;
16
+ export default CreatableMultiselect;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Panel for adding a DBEntry to the database
3
+ * @author Yuen Ler Chow
4
+ * @author Gabe Abrams
5
+ */
6
+ import React from 'react';
7
+ import DBEntry from '../types/DBEntry';
8
+ import DBEntryField from '../types/DBEntryField';
9
+ type Props = {
10
+ /**
11
+ * Handler for when the user finishes adding the DBEntry
12
+ * (if no DBEntry is returned, process was cancelled)
13
+ * @param DBEntry the DBEntry that was just created
14
+ */
15
+ onFinished: (dbEntry?: DBEntry) => void;
16
+ /**
17
+ * Function to validate the DBEntry before saving
18
+ * @param dbEntry the DBEntry to validate
19
+ */
20
+ validateEntry?: (dbEntry: DBEntry) => Promise<void>;
21
+ /**
22
+ * Function to modify the DBEntry before saving
23
+ * @param dbEntry the DBEntry to modify
24
+ * @returns the modified DBEntry
25
+ */
26
+ modifyEntry?: (dbEntry: DBEntry) => Promise<DBEntry> | DBEntry;
27
+ entryFields: DBEntryField[];
28
+ dbEntryToEdit?: DBEntry;
29
+ idPropName: string;
30
+ itemName: string;
31
+ saveEndpointPath: string;
32
+ entries: DBEntry[];
33
+ };
34
+ declare const AddOrEditDBEntry: React.FC<Props>;
35
+ export default AddOrEditDBEntry;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generates the endpoint path for the given collection name
3
+ * @author Yuen Ler Chow
4
+ * @param collectionName the name of the collection
5
+ * @param [adminsOnly] true if the endpoint is for admins only
6
+ * @returns the endpoint path
7
+ */
8
+ declare const generateEndpointPath: (collectionName: string, adminsOnly?: boolean) => string;
9
+ export default generateEndpointPath;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * DB Entry Manager Panel
3
+ * @author Yuen Ler Chow
4
+ * @author Gabe Abrams
5
+ */
6
+ import React from 'react';
7
+ import DBEntry from './types/DBEntry';
8
+ import DBEntryField from './types/DBEntryField';
9
+ type Props = {
10
+ entryFields: DBEntryField[];
11
+ idPropName: string;
12
+ titlePropName: string;
13
+ descriptionPropName: string;
14
+ itemListTitle: string;
15
+ itemName: string;
16
+ /**
17
+ * Function to validate the db entry before sending to the server
18
+ * (throws an error if not validate)
19
+ * @param dbEntry the db entry to validate
20
+ */
21
+ validateEntry?: (dbEntry: DBEntry) => Promise<void>;
22
+ /**
23
+ * Function to modify the db entry before sending to the server
24
+ * @param dbEntry the db entry to modify
25
+ * @returns the modified db entry
26
+ */
27
+ modifyEntry?: (dbEntry: DBEntry) => Promise<DBEntry> | DBEntry;
28
+ disableEdit?: boolean;
29
+ collectionName: string;
30
+ adminsOnly?: boolean;
31
+ filterQuery?: {
32
+ [k: string]: any;
33
+ };
34
+ };
35
+ declare const DBEntryManagerPanel: React.FC<Props>;
36
+ export default DBEntryManagerPanel;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Generic type for an object
3
+ * @author Yuen Ler Chow
4
+ */
5
+ type DBEntry = {
6
+ [k: string]: any;
7
+ };
8
+ export default DBEntry;
@@ -0,0 +1,49 @@
1
+ import DBEntryFieldType from './DBEntryFieldType';
2
+ /**
3
+ * A database entry input field
4
+ * @author Yuen Ler Chow
5
+ */
6
+ type DBEntryField = ({
7
+ label: string;
8
+ objectKey: string;
9
+ placeholder: string;
10
+ lockAfterCreation?: boolean;
11
+ required?: boolean;
12
+ } & ({
13
+ type: DBEntryFieldType.String;
14
+ minNumChars?: number;
15
+ maxNumChars?: number;
16
+ defaultValue?: string;
17
+ choices?: {
18
+ title: string;
19
+ value: string;
20
+ }[];
21
+ } | {
22
+ type: DBEntryFieldType.Number;
23
+ minNumber?: number;
24
+ maxNumber?: number;
25
+ defaultValue?: number;
26
+ } | {
27
+ type: DBEntryFieldType.StringArray;
28
+ minNumElements?: number;
29
+ maxNumElements?: number;
30
+ defaultValue?: string[];
31
+ choices?: {
32
+ title: string;
33
+ value: string;
34
+ }[];
35
+ } | {
36
+ type: DBEntryFieldType.NumberArray;
37
+ minNumElements?: number;
38
+ maxNumElements?: number;
39
+ minNumber?: number;
40
+ maxNumber?: number;
41
+ defaultValue?: number[];
42
+ } | {
43
+ type: DBEntryFieldType.Object;
44
+ defaultValue?: {
45
+ [k: string]: any;
46
+ };
47
+ subfields: DBEntryField[];
48
+ }));
49
+ export default DBEntryField;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Options for field types
3
+ * @author Yuen Ler Chow
4
+ */
5
+ declare enum DBEntryFieldType {
6
+ String = "String",
7
+ Number = "Number",
8
+ Object = "Object",
9
+ StringArray = "StringArray",
10
+ NumberArray = "NumberArray"
11
+ }
12
+ export default DBEntryFieldType;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  customBackgroundColor?: string;
8
8
  children: React.ReactNode;
9
9
  };
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  error: any;
8
8
  title?: string;
9
9
  onClose?: () => void;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import IntelliTableColumn from '../types/IntelliTableColumn';
7
- declare type Props = {
7
+ type Props = {
8
8
  title: string;
9
9
  id: string;
10
10
  data: {
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import React from 'react';
7
7
  import PickableItem from './types/PickableItem';
8
- declare type Props = {
8
+ type Props = {
9
9
  items: PickableItem[];
10
10
  /**
11
11
  * Handler to call when item selection is changed
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import PickableItem from './types/PickableItem';
7
- declare type Props = {
7
+ type Props = {
8
8
  title: string;
9
9
  items: PickableItem[];
10
10
  /**
@@ -2,7 +2,7 @@
2
2
  * An item that can be chosen (for use within ItemPicker)
3
3
  * @author Gabe Abrams
4
4
  */
5
- declare type PickableItem = ({
5
+ type PickableItem = ({
6
6
  id: number | string;
7
7
  name: string;
8
8
  link?: string;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import React from 'react';
7
7
  import LogMetadataType from '../types/LogMetadataType';
8
- declare type Props = {
8
+ type Props = {
9
9
  LogMetadata: LogMetadataType;
10
10
  onClose: () => void;
11
11
  };
@@ -7,7 +7,7 @@ import Variant from '../types/Variant';
7
7
  import ModalButtonType from '../types/ModalButtonType';
8
8
  import ModalSize from '../types/ModalSize';
9
9
  import ModalType from '../types/ModalType';
10
- declare type Props = {
10
+ type Props = {
11
11
  type?: ModalType;
12
12
  size?: ModalSize;
13
13
  title?: React.ReactNode;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  sizeRem?: number;
8
8
  circleVariant?: string;
9
9
  xVariant?: string;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  sizeRem?: number;
8
8
  circleVariant?: string;
9
9
  hourglassVariant?: string;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  sizeRem?: number;
8
8
  circleVariant?: string;
9
9
  checkVariant?: string;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import Variant from '../types/Variant';
7
- declare type Props = {
7
+ type Props = {
8
8
  text: string;
9
9
  onSelected: () => void;
10
10
  ariaLabel: string;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  ariaLabel: string;
8
8
  name: string;
9
9
  month: number;
@@ -3,7 +3,7 @@
3
3
  * @author Gabe Abrams
4
4
  */
5
5
  import React from 'react';
6
- declare type Props = {
6
+ type Props = {
7
7
  title: React.ReactNode;
8
8
  children: React.ReactNode;
9
9
  noBottomMargin?: boolean;
@@ -0,0 +1,41 @@
1
+ import express from 'express';
2
+ /**
3
+ * Interface for a collection in the database
4
+ * @author Yuen Ler Chow
5
+ */
6
+ type DCEMangoCollection = {
7
+ /**
8
+ * Find all items in the collection that match the filter query
9
+ * @param filterQuery
10
+ * @returns list of items that match the filter query
11
+ */
12
+ find: (filterQuery: any) => Promise<any[]>;
13
+ /**
14
+ * Insert an item into the collection
15
+ * @param item the item to insert
16
+ */
17
+ insert: (item: any) => Promise<void>;
18
+ /**
19
+ * Delete an item in the collection
20
+ * @param id the id of the item to delete
21
+ */
22
+ delete: (filterQuery: {
23
+ id: string;
24
+ }) => Promise<void>;
25
+ };
26
+ /**
27
+ * Add all routes for the DBEditor
28
+ * @author Yuen Ler Chow
29
+ * @param opts object containing all arguments
30
+ * @param opts.app express app to add routes too
31
+ * @param opts.collectionName the name of the collection
32
+ * @param opts.adminsOnly true if the endpoint is for admins only
33
+ * @param opts.collection dce-mango db collection
34
+ */
35
+ declare const addDBEditorEndpoints: (opts: {
36
+ app: express.Application;
37
+ collectionName: string;
38
+ adminsOnly: boolean;
39
+ collection: DCEMangoCollection;
40
+ }) => void;
41
+ export default addDBEditorEndpoints;
@@ -4,9 +4,10 @@
4
4
  * @author Gabe Abrams
5
5
  * @param a the first array
6
6
  * @param b the second array
7
- * @param prop the property to compare with
7
+ * @param prop the property to compare with, or an array of props to compare
8
+ * with (if array, all values associated with those props must match)
8
9
  * @returns true if the arrays contain the same objects as determined by
9
10
  * the values associated with each object's prop
10
11
  */
11
- declare const compareArraysByProp: (a: any[], b: any[], prop: string) => boolean;
12
+ declare const compareArraysByProp: (a: any[], b: any[], prop: string | string[]) => boolean;
12
13
  export default compareArraysByProp;
@@ -33,14 +33,14 @@ declare const genRouteHandler: (opts: {
33
33
  req: any;
34
34
  next: () => void;
35
35
  redirect: (pathOrURL: string) => void;
36
- send: (text: string, status?: number | undefined) => void;
36
+ send: (text: string, status?: number) => void;
37
37
  renderErrorPage: (opts?: {
38
- title?: string | undefined;
39
- description?: string | undefined;
40
- code?: string | undefined;
41
- pageTitle?: string | undefined;
42
- status?: number | undefined;
43
- } | undefined) => void;
38
+ title?: string;
39
+ description?: string;
40
+ code?: string;
41
+ pageTitle?: string;
42
+ status?: number;
43
+ }) => void;
44
44
  logServerEvent: LogFunction;
45
45
  }) => any;
46
46
  skipSessionCheck?: boolean | undefined;
@@ -4,5 +4,5 @@
4
4
  * @param [dateOrTimestamp=today] the date or timestamp for the date to describe
5
5
  * @returns human-readable description of the date
6
6
  */
7
- declare const getHumanReadableDate: (dateOrTimestamp?: number | Date | undefined) => string;
7
+ declare const getHumanReadableDate: (dateOrTimestamp?: Date | number) => string;
8
8
  export default getHumanReadableDate;
@@ -6,7 +6,7 @@
6
6
  * corresponding to time values for year, month, day, hour, hour12, minute, isPM
7
7
  * where hour is in 24hr time and hour12 is in 12hr time.
8
8
  */
9
- declare const getLocalTimeInfo: (dateOrTimestamp?: number | Date | undefined) => {
9
+ declare const getLocalTimeInfo: (dateOrTimestamp?: Date | number) => {
10
10
  timestamp: number;
11
11
  year: number;
12
12
  month: number;
@@ -7,7 +7,7 @@
7
7
  * corresponding to ET time values for year, month, day, hour, hour12, minute, isPM
8
8
  * where hour is in 24hr time and hour12 is in 12hr time.
9
9
  */
10
- declare const getTimeInfoInET: (dateOrTimestamp?: number | Date | undefined) => {
10
+ declare const getTimeInfoInET: (dateOrTimestamp?: Date | number) => {
11
11
  timestamp: number;
12
12
  year: number;
13
13
  month: number;
@@ -8,5 +8,5 @@
8
8
  * once
9
9
  * @returns array of resolved values in the same order as the task functions
10
10
  */
11
- declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number | undefined) => Promise<any[]>;
11
+ declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number) => Promise<any[]>;
12
12
  export default parallelLimit;
@@ -2,7 +2,7 @@
2
2
  * Result of a validation function.
3
3
  * @author Austen Money
4
4
  */
5
- declare type ValidationResult<CleanedValueType> = ({
5
+ type ValidationResult<CleanedValueType> = ({
6
6
  isValid: true;
7
7
  cleanedValue: CleanedValueType;
8
8
  } | {
@@ -16,6 +16,7 @@ import ItemPicker from './components/ItemPicker';
16
16
  import LogReviewer from './components/LogReviewer';
17
17
  import IntelliTable from './components/IntelliTable';
18
18
  import CSVDownloadButton from './components/CSVDownloadButton';
19
+ import DBEntryManagerPanel from './components/DBEntryManagerPanel';
19
20
  import ErrorWithCode from './errors/ErrorWithCode';
20
21
  import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
21
22
  import HOUR_IN_MS from './constants/HOUR_IN_MS';
@@ -54,11 +55,12 @@ import canReviewLogs from './helpers/canReviewLogs';
54
55
  import isMobileOrTablet from './helpers/isMobileOrTablet';
55
56
  import extractProp from './helpers/extractProp';
56
57
  import compareArraysByProp from './helpers/compareArraysByProp';
58
+ import getLocalTimeInfo from './helpers/getLocalTimeInfo';
59
+ import addDBEditorEndpoints from './helpers/addDBEditorEndpoints';
57
60
  import genCommaList from './helpers/genCommaList';
58
61
  import validateEmail from './helpers/validators/validateEmail';
59
62
  import validatePhoneNumber from './helpers/validators/validatePhoneNumber';
60
63
  import validateString from './helpers/validators/validateString';
61
- import getLocalTimeInfo from './helpers/getLocalTimeInfo';
62
64
  import ModalButtonType from './types/ModalButtonType';
63
65
  import ModalSize from './types/ModalSize';
64
66
  import ModalType from './types/ModalType';
@@ -74,4 +76,7 @@ import LogBuiltInMetadata from './types/LogBuiltInMetadata';
74
76
  import LogMetadataType from './types/LogMetadataType';
75
77
  import IntelliTableColumn from './types/IntelliTableColumn';
76
78
  import PickableItem from './components/ItemPicker/types/PickableItem';
77
- export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, 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, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, ParamType, };
79
+ import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
80
+ import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
81
+ import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
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;