Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions AnimalRequests/.babelrc

This file was deleted.

21 changes: 0 additions & 21 deletions AnimalRequests/jest-config.js

This file was deleted.

20,495 changes: 6,337 additions & 14,158 deletions AnimalRequests/package-lock.json

Large diffs are not rendered by default.

93 changes: 18 additions & 75 deletions AnimalRequests/package.json
Original file line number Diff line number Diff line change
@@ -1,96 +1,39 @@
{
"name": "animalrequests",
"version": "1.1.0",
"description": "Animal request data entry form",
"main": "index.js",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "better-npm-run build",
"build-prod": "better-npm-run build-prod",
"start": "better-npm-run build-style && better-npm-run build-watch",
"clean": "better-npm-run clean",
"reallyClean": "better-npm-run reallyClean",
"test": "better-npm-run build-jest-test"
"build": "npm run build-dev",
"build-dev": "npm run clean && cross-env NODE_ENV=development webpack --config node_modules/@labkey/build/webpack/dev.config.js --color",
"build-prod": "npm run clean && cross-env NODE_ENV=production webpack --config node_modules/@labkey/build/webpack/prod.config.js --color --progress --profile",
"setup": "npm ci --legacy-peer-deps",
"start": "cross-env NODE_ENV=development webpack serve --config node_modules/@labkey/build/webpack/watch.config.js",
"clean": "rimraf resources/web/AnimalRequests/gen && rimraf resources/views/gen && rimraf resources/web/gen"
},
"author": "csebranek",
"license": "Apache 2.0",
"dependencies": {
"@babel/polyfill": "7.12.1",
"@types/react-bootstrap": "0.32.34",
"@types/react-dom": "18.2.14",
"@types/react-redux": "7.1.28",
"@types/react-router": "5.1.20",
"@types/react-router-dom": "5.3.3",
"@types/redux-actions": "2.6.4",
"@types/redux-form": "8.3.8",
"bootstrap": "5.3.2",
"connected-react-router": "6.9.3",
"bootstrap": "5.3.8",
"final-form": "4.20.10",
"final-form-arrays": "3.1.0",
"final-form-set-field-data": "1.0.2",
"final-form-calculate": "1.3.2",
"history": "5.3.0",
"moment": "2.29.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-redux": "8.1.3",
"react-router-dom": "6.18.0",
"react-router": "6.18.0",
"react-bootstrap": "2.9.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-datepicker": "4.21.0",
"react-final-form": "6.5.9",
"react-final-form-arrays": "3.1.4",
"react-final-form-listeners": "1.0.3",
"redux": "4.2.1",
"redux-form": "8.3.10",
"redux-thunk": "2.4.2",
"redux-form-website-template": "1.0.21"
"react-final-form-listeners": "1.0.3"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-react": "7.22.15",
"@babel/preset-typescript": "7.23.2",
"@types/jest": "29.5.7",
"@types/webpack": "5.28.4",
"@types/react": "18.2.36",
"babel-loader": "9.1.3",
"babel-preset-es2015": "6.24.1",
"better-npm-run": "0.1.1",
"cors": "2.8.5",
"css-loader": "6.8.1",
"express": "4.18.2",
"express-http-proxy": "2.0.0",
"jest": "29.7.0",
"jest-transform-css": "6.0.1",
"redux-devtools-extension": "2.13.9",
"rimraf": "5.0.5",
"style-loader": "3.3.3",
"ts-jest": "29.1.1",
"ts-loader": "9.5.0",
"typescript": "5.2.2",
"webpack": "5.89.0",
"webpack-cli": "5.1.4"
"@labkey/build": "9.1.5",
"@types/react": "18.3.31",
"@types/react-dom": "18.3.7",
"uuid": "14.0.1"
},
"betterScripts": {
"build-prod": {
"command": "webpack --config webpack.config.js",
"env": {
"NODE_ENV": "production"
}
},
"build": {
"command": "webpack --config webpack.config.js",
"env": {
"NODE_ENV": "development"
}
},
"clean": {
"command": "rimraf resources/web/AnimalRequests/gen ; rimraf node_modules"
},
"build-jest-test": {
"command": "jest",
"env": {
"NODE_ENV": "test"
}
}
"overrides": {
"uuid": "14.0.1"
}
}
1 change: 0 additions & 1 deletion AnimalRequests/resources/views/app.html

This file was deleted.

6 changes: 0 additions & 6 deletions AnimalRequests/resources/views/app.view.xml

This file was deleted.

18 changes: 0 additions & 18 deletions AnimalRequests/src/__tests__/main.test.tsx

This file was deleted.

15 changes: 8 additions & 7 deletions AnimalRequests/src/client/app.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { AnimalRequestForm } from './containers/Forms/AnimalRequestForm';
import { getEHRData } from './query/actions';

import './theme/css/index.css';
import './theme/css/react-datepicker.css';
import './theme/css/bootstrap.min.css';
import './theme/css/tooltip.css';

import {AnimalRequestForm} from "./containers/Forms/AnimalRequestForm";
import { getEHRData } from './query/actions';
window.addEventListener('DOMContentLoaded', (event) => {
//this has to be an array of promises
const dataArr: Promise<any>[] = [
getEHRData('ehr','investigatorsWithName', '', '', [], 'IncludeExternal'),
getEHRData('ehr_lookups','animal_requests_viral_status'),
Expand All @@ -21,9 +21,9 @@ window.addEventListener('DOMContentLoaded', (event) => {
getEHRData('ehr_lookups','animal_requests_infectiousdisease'),
getEHRData('ehr_lookups', 'animal_requests_yes_no')
];
createRoot(
document.getElementById('app')
).render(<AnimalRequestForm

createRoot(document.getElementById('app')).render(
<AnimalRequestForm
loading={true}
submitted={false}
uniqueProtocolInvestigator={[{value: ''}]}
Expand All @@ -37,5 +37,6 @@ window.addEventListener('DOMContentLoaded', (event) => {
animal_requests_infectiousdisease={[{value: ''}]}
animal_requests_yes_no={[{value: ''}]}
dataArr={dataArr}
/>);
/>
);
});
60 changes: 60 additions & 0 deletions AnimalRequests/src/client/dev.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2026 Board of Regents of the University of Wisconsin System
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { createRoot } from 'react-dom/client';
import { AnimalRequestForm } from './containers/Forms/AnimalRequestForm';
import { getEHRData } from './query/actions';

import './theme/css/index.css';
import './theme/css/react-datepicker.css';
import './theme/css/bootstrap.min.css';
import './theme/css/tooltip.css';

const render = (): void => {
// TODO: Do this once in application init
const dataArr: Promise<any>[] = [
getEHRData('ehr','investigatorsWithName', '', '', [], 'IncludeExternal'),
getEHRData('ehr_lookups','animal_requests_viral_status'),
getEHRData('ehr_lookups','animal_requests_origin','meaning'),
getEHRData('ehr_lookups','animal_requests_species','common'),
getEHRData('ehr_lookups','animal_requests_sex'),
getEHRData('ehr_lookups','animal_requests_active_projects','-project','project,account,enddate'),
getEHRData('ehr','protocol','-protocol'),
getEHRData('ehr_lookups','animal_requests_disposition'),
getEHRData('ehr_lookups','animal_requests_infectiousdisease'),
getEHRData('ehr_lookups', 'animal_requests_yes_no')
];

createRoot(document.getElementById('app')).render(
<AnimalRequestForm
loading={true}
submitted={false}
uniqueProtocolInvestigator={[{value: ''}]}
animal_requests_viral_status={[{value: ''}]}
animal_requests_origin={[{value: ''}]}
animal_requests_species={[{value: ''}]}
animal_requests_sex={[{value: ''}]}
animal_requests_active_projects={[{value: ''}]}
protocol={[{value: ''}]}
animal_requests_disposition={[{value: ''}]}
animal_requests_infectiousdisease={[{value: ''}]}
animal_requests_yes_no={[{value: ''}]}
dataArr={dataArr}
/>
);
};

render();
13 changes: 13 additions & 0 deletions AnimalRequests/src/client/entryPoints.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
module.exports = {
apps: [{
name: 'app',
title: 'Animal Request Form',
path: './src/client',
requiresLogin: true,
}]
};
19 changes: 3 additions & 16 deletions AnimalRequests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
{
"compilerOptions": {
"target": "es6",
"jsx": "react",
"sourceMap": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"resources"
],
"files": [
"src/client/typings/main.d.ts",
"src/client/app.tsx"
]
"extends": "./node_modules/@labkey/build/webpack/tsconfig.json",
"include": ["src/client/**/*"],
"exclude": ["node_modules"],
}
37 changes: 0 additions & 37 deletions AnimalRequests/webpack.config.js

This file was deleted.

34 changes: 0 additions & 34 deletions AnimalRequests/webpack/dev-server.js

This file was deleted.

Loading