Skip to content

Commit

Permalink
Merge pull request #471 from Smithsonian/develop
Browse files Browse the repository at this point in the history
v0.9.12 Release Candidate 8
  • Loading branch information
jahjedtieson authored Oct 3, 2022
2 parents 92aac26 + d8803b5 commit 949bf2a
Show file tree
Hide file tree
Showing 148 changed files with 26,621 additions and 24,838 deletions.
6 changes: 6 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ REACT_APP_PACKRAT_SERVER_ENDPOINT=
# SERVER
PACKRAT_SERVER_PORT=
PACKRAT_DATABASE_URL=
PACKRAT_ITOPS_EMAIL=
PACKRAT_SESSION_SECRET=
PACKRAT_EDAN_AUTH_KEY=
PACKRAT_EDAN_SERVER=
Expand All @@ -30,6 +31,11 @@ PACKRAT_LDAP_PASSWORD=
PACKRAT_LDAP_CN=
PACKRAT_LDAP_OU=
PACKRAT_LDAP_DC=
PACKRAT_SMTP_HOST=
PACKRAT_SMTP_PORT=
PACKRAT_SMTP_SECURE=
PACKRAT_SMTP_AUTHUSER=
PACKRAT_SMTP_AUTHPASSWORD=
PACKRAT_LOG_ROOT=

# SOLR
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup node version
uses: actions/setup-node@v1
with:
node-version: 14.17.1
node-version: 18.9.0

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Setup node version
uses: actions/setup-node@v1
with:
node-version: 14.17.1
node-version: 18.9.0

- name: Install git
run: sudo apt-add-repository ppa:git-core/ppa && sudo apt-get update && sudo apt-get install git
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
24 changes: 14 additions & 10 deletions client/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/**
* Config Overrides
*
* This config is used for overriding default webpack config of CRA without
* ejecting.
*/
const { override, addExternalBabelPlugin } = require('customize-cra');
const { addReactRefresh } = require('customize-cra-react-refresh');

module.exports = override(addExternalBabelPlugin('react-activation/babel'), addReactRefresh());
/**
* Config Overrides
*
* This config is used for overriding default webpack config of CRA without
* ejecting.
*/
const path = require('path');
const { override, addExternalBabelPlugin, babelInclude } = require('customize-cra');
const { addReactRefresh } = require('customize-cra-react-refresh');

module.exports = override(addExternalBabelPlugin('react-activation/babel'), addReactRefresh(), babelInclude([
path.resolve('src'), // make sure you link your own source
path.resolve('../common'),
]));
30 changes: 15 additions & 15 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dpo-packrat/client",
"version": "0.9.10",
"version": "0.9.12",
"private": true,
"license": "Apache-2.0",
"description": "Client for Packrat",
Expand Down Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@apollo/client": "3.1.5",
"@date-io/date-fns": "1.3.13",
"@dpo-packrat/common": "0.9.10",
"@dpo-packrat/common": "0.9.12",
"@material-ui/core": "4.11.0",
"@material-ui/data-grid": "4.0.0-alpha.33",
"@material-ui/icons": "4.9.1",
Expand All @@ -39,9 +39,9 @@
"@testing-library/user-event": "12.1.4",
"@types/jest": "26.0.13",
"@types/lodash": "4.14.161",
"@types/node": "14.10.1",
"@types/node": "16.11.49",
"@types/react": "16.9.49",
"@types/react-dom": "16.9.8",
"@types/react-dom": "16.9.9",
"@types/react-router": "5.1.8",
"@types/react-router-dom": "5.1.5",
"@types/yup": "0.29.7",
Expand All @@ -60,12 +60,12 @@
"prop-types": "15.7.2",
"query-string": "6.13.2",
"randomatic": "3.1.1",
"react": "16.13.1",
"react": "16.14.0",
"react-activation": "0.5.5",
"react-app-rewired": "2.1.6",
"react-datepicker": "3.8.0",
"react-debounce-input": "3.2.2",
"react-dom": "16.13.1",
"react-dom": "16.14.0",
"react-dropzone": "11.1.0",
"react-helmet": "6.1.0",
"react-icons": "3.11.0",
Expand All @@ -86,13 +86,13 @@
"ts-jest": "24.3.0"
},
"scripts": {
"start": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling react-app-rewired start",
"start:watchcontainer": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling CHOKIDAR_USEPOLLING=1 react-app-rewired start",
"start:prod": "react-app-rewired start",
"build:dev": "yarn env-cmd -f ../.env.dev react-app-rewired build",
"build:prod": "yarn env-cmd -f ../.env.prod react-app-rewired build",
"test": "react-app-rewired test --watchAll=false --passWithNoTests",
"eject": "react-app-rewired eject",
"start": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling react-app-rewired --openssl-legacy-provider start",
"start:watchcontainer": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling CHOKIDAR_USEPOLLING=1 react-app-rewired --openssl-legacy-provider start",
"start:prod": "react-app-rewired --openssl-legacy-provider start",
"build:dev": "yarn env-cmd -f ../.env.dev react-app-rewired --openssl-legacy-provider build",
"build:prod": "yarn env-cmd -f ../.env.prod react-app-rewired --openssl-legacy-provider build",
"test": "react-app-rewired --openssl-legacy-provider test --watchAll=false --passWithNoTests",
"eject": "react-app-rewired --openssl-legacy-provider eject",
"clean": "rm -rf node_modules/ build/",
"postinstall": "echo \"postinstall client\""
},
Expand All @@ -109,7 +109,7 @@
]
},
"volta": {
"node": "14.17.1",
"yarn": "1.22.10"
"node": "18.9.0",
"yarn": "1.22.19"
}
}
11 changes: 3 additions & 8 deletions client/src/components/controls/CheckboxField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* This component renders checkbox field used in ingestion and repository UI.
*/
import { Checkbox, Tooltip } from '@material-ui/core';
import { Checkbox } from '@material-ui/core';
import React from 'react';
import { withStyles } from '@material-ui/core/styles';

Expand All @@ -20,7 +20,6 @@ interface CheckboxFieldProps extends ViewableProps {
value: boolean | null;
onChange: ((event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void) | undefined;
required?: boolean;
tooltip?: any;
valueLeftAligned?: boolean;
gridValue?: number;
gridLabel?: number;
Expand All @@ -37,7 +36,7 @@ export const CheckboxNoPadding = withStyles({
})(Checkbox);

function CheckboxField(props: CheckboxFieldProps): React.ReactElement {
const { label, name, value, onChange, required = false, viewMode = false, disabled = false, updated = false, tooltip, valueLeftAligned = false, gridValue, gridLabel, padding, gridGap, containerStyle } = props;
const { label, name, value, onChange, required = false, viewMode = false, disabled = false, updated = false, valueLeftAligned = false, gridValue, gridLabel, padding, gridGap, containerStyle } = props;
const rowFieldProps = { alignItems: 'center', justifyContent: 'space-between', style: { borderRadius: 0, ...containerStyle } };
const checkbox = (
<CheckboxNoPadding
Expand All @@ -64,11 +63,7 @@ function CheckboxField(props: CheckboxFieldProps): React.ReactElement {
padding={padding}
gridGap={gridGap}
>
{tooltip ? (
<Tooltip {...tooltip}>
{checkbox}
</Tooltip>
) : checkbox}
{checkbox}
</FieldType>
);
}
Expand Down
6 changes: 3 additions & 3 deletions client/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const Config = {
-See releases @ https://github.com/Smithsonian/dpo-voyager/releases
*/
voyager: {
story: process.env.NODE_ENV === 'development' ? 'https://3d-api.si.edu/resources/js/voyager-story.min.js': 'https://3d-api.si.edu/resources/js/voyager-story.min.js',
explorer: process.env.NODE_ENV === 'development' ? 'https://3d-api.si.edu/resources/js/voyager-explorer.min.js' : 'https://3d-api.si.edu/resources/js/voyager-explorer.min.js',
quill: process.env.NODE_ENV === 'development' ? 'https://cdnjs.cloudflare.com/ajax/libs/quill/1.3.7/quill.min.js' : 'https://cdnjs.cloudflare.com/ajax/libs/quill/1.3.7/quill.min.js'
storyJS: process.env.NODE_ENV === 'development' ? 'https://3d-api.si.edu/resources/js/voyager-story.min.js': 'https://3d-api.si.edu/resources/js/voyager-story.min.js',
storyCSS: process.env.NODE_ENV === 'development' ? 'https://3d-api.si.edu/resources/css/voyager-story.min.css' : 'https://3d-api.si.edu/resources/css/voyager-story.min.css',
explorerJS: process.env.NODE_ENV === 'development' ? 'https://3d-api.si.edu/resources/js/voyager-explorer.min.js' : 'https://3d-api.si.edu/resources/js/voyager-explorer.min.js',
}
};

Expand Down
23 changes: 0 additions & 23 deletions client/src/constants/helperfunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,29 +109,6 @@ export function extractModelConstellation(data: any) {
return { ingestionModel, modelObjects, assets };
}


export const updateSystemObjectUploadRedirect = (idAsset: number | undefined | null, idAssetVersion: number | undefined | null, ObjectType: number | undefined | null, assetType: number | undefined | null = null) => {
if (!idAsset || !ObjectType) return '/';

let assetVersion = '';
let asset = '';
let fileType = '';

if (idAsset) asset = `idAsset=${idAsset}`;
if (idAssetVersion) assetVersion = `&idAssetVersion=${idAssetVersion}`;
if (assetType) fileType = `&fileType=${assetType}`;

return `/ingestion/uploads?${asset}${assetVersion}${fileType}&type=${ObjectType}&mode=${eIngestionMode.eUpdate}`;
};

export const ingestSystemObjectUploadRedirect = (fileName: string) => {
return `/ingestion/uploads?name=${fileName}&mode=${eIngestionMode.eIngest}`;
};

export const attachSystemObjectUploadRedirect = (idSystemObject: number, ObjectType: number | undefined | null) => {
return `/ingestion/uploads?idSOAttachment=${idSystemObject}&fileType=${ObjectType}&mode=${eIngestionMode.eAttach}`;
};

export const truncateWithEllipses = (text: string, max: number) => text.slice(0, max - 1) + (text.length > max ? ' ...' : '');

export const truncateMiddleWithEllipses = (text: string, firstHalf: number, secondHalf: number) => {
Expand Down
Loading

0 comments on commit 949bf2a

Please sign in to comment.