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.
- package/.vscode/settings.json +1 -0
- package/dist/cjs/index.js +36477 -247
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/client/initClient.d.ts +1 -1
- package/dist/cjs/types/components/AppWrapper.d.ts +6 -6
- package/dist/cjs/types/components/ButtonInputGroup.d.ts +1 -1
- package/dist/cjs/types/components/CSVDownloadButton.d.ts +1 -1
- package/dist/cjs/types/components/CheckboxButton.d.ts +1 -1
- package/dist/cjs/types/components/CopiableBox.d.ts +1 -1
- package/dist/cjs/types/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.d.ts +16 -0
- package/dist/cjs/types/components/DBEntryManagerPanel/AddOrEditDBEntry/index.d.ts +35 -0
- package/dist/cjs/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +9 -0
- package/dist/cjs/types/components/DBEntryManagerPanel/index.d.ts +36 -0
- package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntry.d.ts +8 -0
- package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntryField.d.ts +49 -0
- package/dist/cjs/types/components/DBEntryManagerPanel/types/DBEntryFieldType.d.ts +12 -0
- package/dist/cjs/types/components/Drawer.d.ts +1 -1
- package/dist/cjs/types/components/ErrorBox.d.ts +1 -1
- package/dist/cjs/types/components/IntelliTable.d.ts +1 -1
- package/dist/cjs/types/components/ItemPicker/NestableItemList.d.ts +1 -1
- package/dist/cjs/types/components/ItemPicker/index.d.ts +1 -1
- package/dist/cjs/types/components/ItemPicker/types/PickableItem.d.ts +1 -1
- package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
- package/dist/cjs/types/components/Modal.d.ts +1 -1
- package/dist/cjs/types/components/PopFailureMark.d.ts +1 -1
- package/dist/cjs/types/components/PopPendingMark.d.ts +1 -1
- package/dist/cjs/types/components/PopSuccessMark.d.ts +1 -1
- package/dist/cjs/types/components/RadioButton.d.ts +1 -1
- package/dist/cjs/types/components/SimpleDateChooser.d.ts +1 -1
- package/dist/cjs/types/components/TabBox.d.ts +1 -1
- package/dist/cjs/types/helpers/addDBEditorEndpoints.d.ts +41 -0
- package/dist/cjs/types/helpers/compareArraysByProp.d.ts +3 -2
- package/dist/cjs/types/helpers/genRouteHandler.d.ts +7 -7
- package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +1 -1
- package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +1 -1
- package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +1 -1
- package/dist/cjs/types/helpers/parallelLimit.d.ts +1 -1
- package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +7 -2
- package/dist/cjs/types/server/initServer.d.ts +1 -1
- package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
- package/dist/cjs/types/types/Log/LogMainInfo.d.ts +1 -1
- package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +1 -1
- package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +1 -1
- package/dist/cjs/types/types/Log/index.d.ts +1 -1
- package/dist/cjs/types/types/LogFunction.d.ts +1 -1
- package/dist/cjs/types/types/LogMetadataContextMap.d.ts +1 -1
- package/dist/cjs/types/types/LogMetadataTagMap.d.ts +1 -1
- package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +1 -1
- package/dist/cjs/types/types/LogMetadataType.d.ts +1 -1
- package/dist/esm/index.js +36692 -483
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/client/initClient.d.ts +1 -1
- package/dist/esm/types/components/AppWrapper.d.ts +6 -6
- package/dist/esm/types/components/ButtonInputGroup.d.ts +1 -1
- package/dist/esm/types/components/CSVDownloadButton.d.ts +1 -1
- package/dist/esm/types/components/CheckboxButton.d.ts +1 -1
- package/dist/esm/types/components/CopiableBox.d.ts +1 -1
- package/dist/esm/types/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.d.ts +16 -0
- package/dist/esm/types/components/DBEntryManagerPanel/AddOrEditDBEntry/index.d.ts +35 -0
- package/dist/esm/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +9 -0
- package/dist/esm/types/components/DBEntryManagerPanel/index.d.ts +36 -0
- package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntry.d.ts +8 -0
- package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntryField.d.ts +49 -0
- package/dist/esm/types/components/DBEntryManagerPanel/types/DBEntryFieldType.d.ts +12 -0
- package/dist/esm/types/components/Drawer.d.ts +1 -1
- package/dist/esm/types/components/ErrorBox.d.ts +1 -1
- package/dist/esm/types/components/IntelliTable.d.ts +1 -1
- package/dist/esm/types/components/ItemPicker/NestableItemList.d.ts +1 -1
- package/dist/esm/types/components/ItemPicker/index.d.ts +1 -1
- package/dist/esm/types/components/ItemPicker/types/PickableItem.d.ts +1 -1
- package/dist/esm/types/components/LogReviewer.d.ts +1 -1
- package/dist/esm/types/components/Modal.d.ts +1 -1
- package/dist/esm/types/components/PopFailureMark.d.ts +1 -1
- package/dist/esm/types/components/PopPendingMark.d.ts +1 -1
- package/dist/esm/types/components/PopSuccessMark.d.ts +1 -1
- package/dist/esm/types/components/RadioButton.d.ts +1 -1
- package/dist/esm/types/components/SimpleDateChooser.d.ts +1 -1
- package/dist/esm/types/components/TabBox.d.ts +1 -1
- package/dist/esm/types/helpers/addDBEditorEndpoints.d.ts +41 -0
- package/dist/esm/types/helpers/compareArraysByProp.d.ts +3 -2
- package/dist/esm/types/helpers/genRouteHandler.d.ts +7 -7
- package/dist/esm/types/helpers/getHumanReadableDate.d.ts +1 -1
- package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +1 -1
- package/dist/esm/types/helpers/getTimeInfoInET.d.ts +1 -1
- package/dist/esm/types/helpers/parallelLimit.d.ts +1 -1
- package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +1 -1
- package/dist/esm/types/index.d.ts +7 -2
- package/dist/esm/types/server/initServer.d.ts +1 -1
- package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
- package/dist/esm/types/types/Log/LogMainInfo.d.ts +1 -1
- package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +1 -1
- package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +1 -1
- package/dist/esm/types/types/Log/index.d.ts +1 -1
- package/dist/esm/types/types/LogFunction.d.ts +1 -1
- package/dist/esm/types/types/LogMetadataContextMap.d.ts +1 -1
- package/dist/esm/types/types/LogMetadataTagMap.d.ts +1 -1
- package/dist/esm/types/types/LogMetadataTargetMap.d.ts +1 -1
- package/dist/esm/types/types/LogMetadataType.d.ts +1 -1
- package/dist/index.d.ts +229 -85
- package/package.json +7 -2
- package/src/client/initClient.tsx +23 -31
- package/src/components/AppWrapper.tsx +1 -1
- package/src/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.tsx +303 -0
- package/src/components/DBEntryManagerPanel/AddOrEditDBEntry/index.tsx +737 -0
- package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +16 -0
- package/src/components/DBEntryManagerPanel/index.tsx +522 -0
- package/src/components/DBEntryManagerPanel/types/DBEntry.ts +7 -0
- package/src/components/DBEntryManagerPanel/types/DBEntryField.ts +94 -0
- package/src/components/DBEntryManagerPanel/types/DBEntryFieldType.ts +18 -0
- package/src/helpers/addDBEditorEndpoints.ts +128 -0
- package/src/helpers/compareArraysByProp.ts +41 -19
- package/src/index.ts +11 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import Variant from '../types/Variant';
|
|
8
|
-
|
|
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
|
|
36
|
-
confirmButtonVariant?: Variant
|
|
37
|
-
cancelButtonText?: string
|
|
38
|
-
cancelButtonVariant?: Variant
|
|
39
|
-
}
|
|
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
|
package/dist/cjs/types/components/DBEntryManagerPanel/AddOrEditDBEntry/CreatableMultiselect.d.ts
ADDED
|
@@ -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,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;
|
|
@@ -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
|
-
|
|
10
|
+
type Props = {
|
|
11
11
|
type?: ModalType;
|
|
12
12
|
size?: ModalSize;
|
|
13
13
|
title?: React.ReactNode;
|
|
@@ -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
|
|
36
|
+
send: (text: string, status?: number) => void;
|
|
37
37
|
renderErrorPage: (opts?: {
|
|
38
|
-
title?: string
|
|
39
|
-
description?: string
|
|
40
|
-
code?: string
|
|
41
|
-
pageTitle?: string
|
|
42
|
-
status?: number
|
|
43
|
-
}
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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
|
|
11
|
+
declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number) => Promise<any[]>;
|
|
12
12
|
export default parallelLimit;
|
|
@@ -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
|
-
|
|
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, };
|
|
@@ -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
|
-
|
|
6
|
+
type IntelliTableColumn = {
|
|
7
7
|
title: string;
|
|
8
8
|
param: string;
|
|
9
9
|
type: (ParamType.Boolean | ParamType.Float | ParamType.Int | ParamType.String | ParamType.JSON);
|
|
@@ -6,5 +6,5 @@ import LogTypeSpecificInfo from './LogTypeSpecificInfo';
|
|
|
6
6
|
* error encountered by a user
|
|
7
7
|
* @author Gabe Abrams
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
|
|
10
10
|
export default Log;
|