dce-reactkit 3.12.3 → 4.0.0-beta-date-and-time.1
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 +5338 -5515
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/LoadingSpinner.d.ts +2 -2
- package/dist/cjs/types/components/SimpleDateChooser.d.ts +3 -1
- package/dist/cjs/types/components/SimpleTimeChooser.d.ts +20 -0
- package/dist/cjs/types/components/Tooltip.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +12 -11
- package/dist/cjs/types/types/ParamType.d.ts +10 -10
- package/dist/cjs/types/types/ReactKitErrorCode.d.ts +2 -14
- package/dist/esm/index.js +5344 -5517
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/LoadingSpinner.d.ts +2 -2
- package/dist/esm/types/components/SimpleDateChooser.d.ts +3 -1
- package/dist/esm/types/components/SimpleTimeChooser.d.ts +20 -0
- package/dist/esm/types/components/Tooltip.d.ts +1 -1
- package/dist/esm/types/index.d.ts +12 -11
- package/dist/esm/types/types/ParamType.d.ts +10 -10
- package/dist/esm/types/types/ReactKitErrorCode.d.ts +2 -14
- package/dist/index.d.ts +183 -354
- package/genEncodedSecret.ts +84 -0
- package/package.json +7 -9
- package/rollup.config.js +2 -0
- package/src/components/AppWrapper.tsx +3 -1
- package/src/components/CheckboxButton.tsx +1 -1
- package/src/components/Dropdown.tsx +1 -1
- package/src/components/LogReviewer.tsx +2 -2
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/RadioButton.tsx +3 -1
- package/src/components/SimpleDateChooser.tsx +62 -26
- package/src/components/SimpleTimeChooser.tsx +195 -0
- package/src/components/Tooltip.tsx +1 -1
- package/src/{client → helpers}/initClient.tsx +5 -1
- package/src/helpers/logClientEvent.tsx +3 -1
- package/src/helpers/visitServerEndpoint.tsx +1 -1
- package/src/index.ts +20 -20
- package/src/types/ParamType.ts +10 -10
- package/src/types/ReactKitErrorCode.tsx +3 -17
- package/dist/cjs/types/components/ItemPicker/index.test.d.ts +0 -1
- package/dist/cjs/types/helpers/addDBEditorEndpoints.d.ts +0 -41
- package/dist/cjs/types/helpers/genRouteHandler.d.ts +0 -76
- package/dist/cjs/types/helpers/handleError.d.ts +0 -18
- package/dist/cjs/types/helpers/handleSuccess.d.ts +0 -8
- package/dist/cjs/types/helpers/parseUserAgent.d.ts +0 -17
- package/dist/cjs/types/helpers/visitEndpointOnAnotherServer/index.d.ts +0 -24
- package/dist/cjs/types/helpers/visitEndpointOnAnotherServer/sendServerToServerRequest.d.ts +0 -33
- package/dist/cjs/types/server/initLogCollection.d.ts +0 -8
- package/dist/cjs/types/server/initServer.d.ts +0 -42
- package/dist/esm/types/components/ItemPicker/index.test.d.ts +0 -1
- package/dist/esm/types/helpers/addDBEditorEndpoints.d.ts +0 -41
- package/dist/esm/types/helpers/genRouteHandler.d.ts +0 -76
- package/dist/esm/types/helpers/handleError.d.ts +0 -18
- package/dist/esm/types/helpers/handleSuccess.d.ts +0 -8
- package/dist/esm/types/helpers/parseUserAgent.d.ts +0 -17
- package/dist/esm/types/helpers/visitEndpointOnAnotherServer/index.d.ts +0 -24
- package/dist/esm/types/helpers/visitEndpointOnAnotherServer/sendServerToServerRequest.d.ts +0 -33
- package/dist/esm/types/server/initLogCollection.d.ts +0 -8
- package/dist/esm/types/server/initServer.d.ts +0 -42
- package/src/components/ItemPicker/index.test.tsx +0 -783
- package/src/helpers/addDBEditorEndpoints.ts +0 -128
- package/src/helpers/genRouteHandler.ts +0 -948
- package/src/helpers/handleError.ts +0 -65
- package/src/helpers/handleSuccess.ts +0 -18
- package/src/helpers/parseUserAgent.ts +0 -108
- package/src/helpers/visitEndpointOnAnotherServer/index.ts +0 -93
- package/src/helpers/visitEndpointOnAnotherServer/sendServerToServerRequest.ts +0 -164
- package/src/server/initLogCollection.ts +0 -27
- package/src/server/initServer.ts +0 -287
- /package/dist/cjs/types/{client → helpers}/initClient.d.ts +0 -0
- /package/dist/esm/types/{client → helpers}/initClient.d.ts +0 -0
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sends and retries an http request
|
|
3
|
-
* @author Gabriel Abrams
|
|
4
|
-
* @param opts object containing all arguments
|
|
5
|
-
* @param opts.path path to send request to
|
|
6
|
-
* @param [opts.host] host to send request to
|
|
7
|
-
* @param [opts.method=GET] http method to use
|
|
8
|
-
* @param [opts.params] body/data to include in the request
|
|
9
|
-
* @param [opts.headers] headers to include in the request
|
|
10
|
-
* @param [opts.sendCrossDomainCredentials=true if in development mode] if true,
|
|
11
|
-
* send cross-domain credentials even if not in dev mode
|
|
12
|
-
* @param [opts.responseType=JSON] expected response type
|
|
13
|
-
* @returns { body, status, headers } on success
|
|
14
|
-
*/
|
|
15
|
-
declare const sendServerToServerRequest: (opts: {
|
|
16
|
-
path: string;
|
|
17
|
-
host?: string | undefined;
|
|
18
|
-
method?: "GET" | "POST" | "DELETE" | "PUT" | undefined;
|
|
19
|
-
params?: {
|
|
20
|
-
[x: string]: any;
|
|
21
|
-
} | undefined;
|
|
22
|
-
headers?: {
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
} | undefined;
|
|
25
|
-
responseType?: "Text" | "JSON" | undefined;
|
|
26
|
-
}) => Promise<{
|
|
27
|
-
body: any;
|
|
28
|
-
status: number;
|
|
29
|
-
headers: {
|
|
30
|
-
[x: string]: any;
|
|
31
|
-
};
|
|
32
|
-
}>;
|
|
33
|
-
export default sendServerToServerRequest;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Initialize a log collection given the dce-mango Collection class
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
* @param Collection the Collection class from dce-mango
|
|
5
|
-
* @returns initialized logCollection
|
|
6
|
-
*/
|
|
7
|
-
declare const initLogCollection: (Collection: any) => any;
|
|
8
|
-
export default initLogCollection;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
type GetLaunchInfoFunction = (req: any) => {
|
|
2
|
-
launched: boolean;
|
|
3
|
-
launchInfo?: any;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Get launch info via CACCL
|
|
7
|
-
* @author Gabe Abrams
|
|
8
|
-
* @param req express request object
|
|
9
|
-
* @returns object { launched, launchInfo }
|
|
10
|
-
*/
|
|
11
|
-
export declare const cacclGetLaunchInfo: GetLaunchInfoFunction;
|
|
12
|
-
/**
|
|
13
|
-
* Get log collection
|
|
14
|
-
* @author Gabe Abrams
|
|
15
|
-
* @returns log collection if one was included during launch or null if we don't
|
|
16
|
-
* have a log collection (yet)
|
|
17
|
-
*/
|
|
18
|
-
export declare const internalGetLogCollection: () => any;
|
|
19
|
-
/**
|
|
20
|
-
* Prepare dce-reactkit to run on the server
|
|
21
|
-
* @author Gabe Abrams
|
|
22
|
-
* @param opts object containing all arguments
|
|
23
|
-
* @param opts.app express app from inside of the postprocessor function that
|
|
24
|
-
* we will add routes to
|
|
25
|
-
* @param opts.getLaunchInfo CACCL LTI's get launch info function
|
|
26
|
-
* @param [opts.logCollection] mongo collection from dce-mango to use for
|
|
27
|
-
* storing logs. If none is included, logs are written to the console
|
|
28
|
-
* @param [opts.logReviewAdmins=all] info on which admins can review
|
|
29
|
-
* logs from the client. If not included, all Canvas admins are allowed to
|
|
30
|
-
* review logs. If null, no Canvas admins are allowed to review logs.
|
|
31
|
-
* If an array of Canvas userIds (numbers), only Canvas admins with those
|
|
32
|
-
* userIds are allowed to review logs. If a dce-mango collection, only
|
|
33
|
-
* Canvas admins with entries in that collection ({ userId, ...}) are allowed
|
|
34
|
-
* to review logs
|
|
35
|
-
*/
|
|
36
|
-
declare const initServer: (opts: {
|
|
37
|
-
app: any;
|
|
38
|
-
getLaunchInfo: GetLaunchInfoFunction;
|
|
39
|
-
logCollection?: any;
|
|
40
|
-
logReviewAdmins?: (number[] | any);
|
|
41
|
-
}) => void;
|
|
42
|
-
export default initServer;
|