-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5907 from beyondessential/release-2024-38
Release 2024-38
- Loading branch information
Showing
695 changed files
with
17,338 additions
and
19,012 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...web/.storybook/ReactHookFormDecorator.tsx → .storybook/ReactHookFormDecorator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import fs from 'fs'; | ||
import path, { join, dirname } from 'path'; | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
const getStoriesDir = () => { | ||
const currentDir = process.cwd(); | ||
return join(currentDir, 'stories/**/*.stories.@(js|jsx|ts|tsx)'); | ||
}; | ||
|
||
const getStaticDir = () => { | ||
const currentDir = process.cwd(); | ||
const publicPath = join(currentDir, 'public'); | ||
|
||
if (!fs.existsSync(publicPath)) return []; | ||
return [publicPath]; | ||
}; | ||
|
||
const config: StorybookConfig = { | ||
stories: [getStoriesDir()], | ||
addons: ['@storybook/addon-essentials'], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
typescript: { | ||
reactDocgen: 'react-docgen-typescript', | ||
}, | ||
core: { | ||
builder: '@storybook/builder-vite', | ||
}, | ||
staticDirs: getStaticDir(), | ||
viteFinal: async (config, { configType }) => { | ||
// Merge custom configuration into the default config | ||
const { mergeConfig, loadEnv } = await import('vite'); | ||
// Load the environment variables, whether or not they are prefixed with REACT_APP_ | ||
const env = loadEnv(configType || 'DEVELOPMENT', process.cwd(), ['REACT_APP_', '']); | ||
|
||
return mergeConfig(config, { | ||
define: { | ||
'process.env': env, | ||
}, | ||
server: { | ||
watch: { | ||
// Ignore the .env files because for some reason vite is detecting changes in them and restarting the server multiple times | ||
ignored: '**/.env*', | ||
}, | ||
}, | ||
resolve: { | ||
preserveSymlinks: true, // use the yarn workspace symlinks | ||
alias: { | ||
http: path.resolve(__dirname, '../moduleMock.js'), | ||
winston: path.resolve(__dirname, '../moduleMock.js'), | ||
jsonwebtoken: path.resolve(__dirname, '../moduleMock.js'), | ||
'node-fetch': path.resolve(__dirname, '../moduleMock.js'), | ||
// This is a workaround for us using react-16 in the monorepo | ||
'@storybook/react-dom-shim': '@storybook/react-dom-shim/dist/react-16', | ||
}, | ||
}, | ||
}); | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Tupaia | ||
* Copyright (c) 2017 - 2020 Beyond Essential Systems Pty Ltd | ||
* | ||
*/ | ||
|
||
import { createMuiTheme } from '@material-ui/core'; | ||
|
||
export const darkTheme = createMuiTheme({ | ||
palette: { | ||
type: 'dark', | ||
primary: { | ||
main: '#1978D4', // Main blue (as seen on primary buttons) | ||
}, | ||
secondary: { | ||
main: '#ee6230', | ||
}, | ||
background: { | ||
default: '#262834', // Dark blue background | ||
paper: '#262834', // Dark blue to match background | ||
}, | ||
text: { | ||
secondary: '#9ba0a6', | ||
}, | ||
form: { | ||
border: '#d9d9d9', | ||
}, | ||
}, | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TUPAIA_FRONT_END_URL= | ||
DATATRAK_FRONT_END_URL= | ||
LESMIS_FRONT_END_URL= | ||
ADMIN_PANEL_FRONT_END_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/mutations/useExportDashboardVisualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/mutations/useExportMapOverlayVisualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/mutations/useSaveDashboardVisualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/mutations/useSaveMapOverlayVisualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/admin-panel/src/VizBuilderApp/api/mutations/useUploadTestData.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
/** | ||
* Tupaia | ||
* Copyright (c) 2017 - 2021 Beyond Essential Systems Pty Ltd | ||
* Copyright (c) 2017 - 2024 Beyond Essential Systems Pty Ltd | ||
*/ | ||
|
||
import { useMutation } from 'react-query'; | ||
import { useMutation } from '@tanstack/react-query'; | ||
import { upload } from '../api'; | ||
|
||
// Must match the file name expected by the back-end | ||
const FILE_NAME = 'testData'; | ||
|
||
export const useUploadTestData = () => | ||
useMutation('uploadTestData', file => upload('uploadTestData', {}, FILE_NAME, file)); | ||
useMutation(['uploadTestData'], file => upload('uploadTestData', {}, FILE_NAME, file)); |
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/queries/useCountries.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/queries/useDashboardVisualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/queries/useEntities.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin-panel/src/VizBuilderApp/api/queries/useLocations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.