dce-reactkit 3.4.0-beta.2 → 3.4.0-beta.4
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 +608 -1570
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +1 -0
- package/dist/esm/index.js +595 -1557
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/DBEntryManagerPanel/helpers/generateEndpointPath.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/DBEntryManagerPanel/AddOrEditDBEntry/index.tsx +9 -10
- package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +1 -1
- package/src/components/DBEntryManagerPanel/index.tsx +2 -2
- package/src/helpers/addDBEditorEndpoints.ts +5 -2
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @author Yuen Ler Chow
|
|
4
4
|
* @param collectionName the name of the collection
|
|
5
5
|
* @param [adminsOnly] true if the endpoint is for admins only
|
|
6
|
+
* @returns the endpoint path
|
|
6
7
|
*/
|
|
7
8
|
declare const generateEndpointPath: (collectionName: string, adminsOnly?: boolean | undefined) => string;
|
|
8
9
|
export default generateEndpointPath;
|
package/package.json
CHANGED
|
@@ -10,16 +10,15 @@ import React, { useReducer } from 'react';
|
|
|
10
10
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
11
11
|
import { faSave } from '@fortawesome/free-solid-svg-icons';
|
|
12
12
|
|
|
13
|
-
// Import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from 'dce-reactkit';
|
|
13
|
+
// Import shared components
|
|
14
|
+
import CheckboxButton from '../../CheckboxButton';
|
|
15
|
+
import LoadingSpinner from '../../LoadingSpinner';
|
|
16
|
+
import RadioButton from '../../RadioButton';
|
|
17
|
+
import ButtonInputGroup from '../../ButtonInputGroup';
|
|
18
|
+
|
|
19
|
+
// Import shared helpers
|
|
20
|
+
import { alert, showFatalError } from '../../AppWrapper';
|
|
21
|
+
import visitServerEndpoint from '../../../helpers/visitServerEndpoint';
|
|
23
22
|
|
|
24
23
|
// Import other types
|
|
25
24
|
import DBEntry from '../types/DBEntry';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* Generates the endpoint path for the given collection name
|
|
4
3
|
* @author Yuen Ler Chow
|
|
5
4
|
* @param collectionName the name of the collection
|
|
6
5
|
* @param [adminsOnly] true if the endpoint is for admins only
|
|
6
|
+
* @returns the endpoint path
|
|
7
7
|
*/
|
|
8
8
|
const generateEndpointPath = (collectionName: string, adminsOnly?: boolean) => {
|
|
9
9
|
// Determine prefix based on whether the endpoint is for admins only
|
|
@@ -10,13 +10,13 @@ import React, { useReducer, useEffect } from 'react';
|
|
|
10
10
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
11
11
|
import { faPlus, faTrash, faCog } from '@fortawesome/free-solid-svg-icons';
|
|
12
12
|
|
|
13
|
-
//
|
|
13
|
+
// Import shared components
|
|
14
14
|
import TabBox from '../TabBox';
|
|
15
15
|
import visitServerEndpoint from '../../helpers/visitServerEndpoint';
|
|
16
16
|
import { showFatalError, confirm } from '../AppWrapper';
|
|
17
17
|
import LoadingSpinner from '../LoadingSpinner';
|
|
18
18
|
|
|
19
|
-
//
|
|
19
|
+
// Import types
|
|
20
20
|
import DBEntry from './types/DBEntry';
|
|
21
21
|
import DBEntryField from './types/DBEntryField';
|
|
22
22
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
|
|
3
|
-
// Import
|
|
4
|
-
import
|
|
3
|
+
// Import shared helpers
|
|
4
|
+
import genRouteHandler from './genRouteHandler';
|
|
5
5
|
import generateEndpointPath from '../components/DBEntryManagerPanel/helpers/generateEndpointPath';
|
|
6
6
|
|
|
7
|
+
// Import shared types
|
|
8
|
+
import ParamType from '../types/ParamType';
|
|
9
|
+
|
|
7
10
|
/**
|
|
8
11
|
* Interface for a collection in the database
|
|
9
12
|
* @author Yuen Ler Chow
|