dce-reactkit 3.4.0-beta.1 → 3.4.0-beta.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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.4.0-beta.1",
3
+ "version": "3.4.0-beta.3",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -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 dce-reactkit
14
- import {
15
- CheckboxButton,
16
- LoadingSpinner,
17
- RadioButton,
18
- ButtonInputGroup,
19
- alert,
20
- showFatalError,
21
- visitServerEndpoint,
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
- // import dce-reactkit components
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
- // import types
19
+ // Import types
20
20
  import DBEntry from './types/DBEntry';
21
21
  import DBEntryField from './types/DBEntryField';
22
22