diff --git a/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/ImportModal.jsx b/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/ImportModal.jsx new file mode 100644 index 0000000000..d83e3645fb --- /dev/null +++ b/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/ImportModal.jsx @@ -0,0 +1,190 @@ +/* + * Tupaia + * Copyright (c) 2017 - 2024 Beyond Essential Systems Pty Ltd + */ + +import Typography from '@material-ui/core/Typography'; +import PropTypes from 'prop-types'; +import React, { useCallback, useState } from 'react'; +import styled from 'styled-components'; + +import { + SmallAlert, + Button, + OutlinedButton, + Dialog, + DialogContent, + DialogFooter, + DialogHeader, + FileUploadField, + LoadingContainer, +} from '@tupaia/ui-components'; + +const STATUS = { + IDLE: 'idle', + LOADING: 'loading', + SUCCESS: 'success', + ERROR: 'error', +}; + +const Content = styled(DialogContent)` + text-align: left; + min-height: 220px; +`; + +const Heading = styled(Typography)` + margin-bottom: 18px; +`; + +export const ImportModal = ({ + isOpen, + title, + subtitle, + actionText, + loadingText, + loadingHeading, + showLoadingContainer, + onSubmit, + onClose, +}) => { + const [status, setStatus] = useState(STATUS.IDLE); + const [errorMessage, setErrorMessage] = useState(null); + const [successMessage, setSuccessMessage] = useState(null); + const [file, setFile] = useState(null); + + const handleSubmit = async event => { + event.preventDefault(); + setErrorMessage(null); + setStatus(STATUS.LOADING); + + try { + const { message } = await onSubmit(file); + if (showLoadingContainer && message) { + setStatus(STATUS.SUCCESS); + setSuccessMessage(message); + } else { + handleClose(); + } + } catch (error) { + setStatus(STATUS.ERROR); + setErrorMessage(error.message); + } + }; + + const handleClose = async () => { + onClose(); + + setStatus(STATUS.IDLE); + setErrorMessage(null); + setSuccessMessage(null); + setFile(null); + }; + + const handleDismiss = () => { + setStatus(STATUS.IDLE); + setErrorMessage(null); + setSuccessMessage(null); + // Deselect file when dismissing an error, this avoids an error when editing selected files + // @see https://github.com/beyondessential/tupaia-backlog/issues/1211 + setFile(null); + }; + + const ContentContainer = showLoadingContainer + ? ({ children }) => ( + + {children} + + ) + : React.Fragment; + + const renderContent = useCallback(() => { + switch (status) { + case STATUS.SUCCESS: + return

{successMessage}

; + case STATUS.ERROR: + return ( + <> + An error has occurred. + + {errorMessage} + + + ); + default: + return ( + <> +

{subtitle}

+
+ setFile(files[0])} name="file-upload" /> + + + ); + } + }, [status, successMessage, errorMessage, subtitle]); + + const renderButtons = useCallback(() => { + switch (status) { + case STATUS.SUCCESS: + return ; + case STATUS.ERROR: + return ( + <> + Dismiss + + + ); + default: + return ( + <> + + + + ); + } + }, [status, file, handleDismiss, handleClose, handleSubmit]); + + return ( + + + + {renderContent()} + + {renderButtons()} + + ); +}; + +ImportModal.propTypes = { + isOpen: PropTypes.bool.isRequired, + title: PropTypes.string, + subtitle: PropTypes.string, + actionText: PropTypes.string, + loadingText: PropTypes.string, + loadingHeading: PropTypes.string, + showLoadingContainer: PropTypes.bool, + onSubmit: PropTypes.func.isRequired, + onClose: PropTypes.func.isRequired, +}; + +ImportModal.defaultProps = { + title: 'Import', + subtitle: '', + actionText: 'Import', + loadingText: 'Importing', + loadingHeading: 'Importing data', + showLoadingContainer: false, +}; diff --git a/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/PreviewOptions.jsx b/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/PreviewOptions.jsx index af20a122eb..bcdf62a9b2 100644 --- a/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/PreviewOptions.jsx +++ b/packages/admin-panel/src/VizBuilderApp/components/PreviewOptions/PreviewOptions.jsx @@ -13,7 +13,7 @@ import { useUploadTestData } from '../../api'; import { ProjectField } from './ProjectField'; import { LocationField } from './LocationField'; import { DateRangeField } from './DateRangeField'; -import { ImportModal } from '../../../importExport'; +import { ImportModal } from './ImportModal'; const Container = styled(FlexSpaceBetween)` padding: 24px 0; @@ -58,6 +58,7 @@ const UploadDataModal = ({ isOpen, onSubmit, onClose }) => ( actionText="Upload" loadingText="Uploading" showLoadingContainer={false} + hasCustomButton={true} /> ); diff --git a/packages/central-server/src/apiV2/import/importEntities/extractEntitiesByCountryName.js b/packages/central-server/src/apiV2/import/importEntities/extractEntitiesByCountryName.js index 0e61976aac..7fd089ec8e 100644 --- a/packages/central-server/src/apiV2/import/importEntities/extractEntitiesByCountryName.js +++ b/packages/central-server/src/apiV2/import/importEntities/extractEntitiesByCountryName.js @@ -50,12 +50,12 @@ const processXlsxRow = (row, { countryName }) => { }; const xlsxParser = filePath => { - const workbook = xlsx.readFile(filePath); + const workbook = xlsx.readFile(filePath, { raw: false }); return Object.entries(workbook.Sheets).reduce( (entitiesByCountry, [countryName, sheet]) => ({ ...entitiesByCountry, [countryName]: xlsx.utils - .sheet_to_json(sheet) + .sheet_to_json(sheet, { raw: false }) .map(row => processXlsxRow(row, { countryName })), }), {}, diff --git a/packages/central-server/src/apiV2/requestCountryAccess.js b/packages/central-server/src/apiV2/requestCountryAccess.js index 6c13db3472..701c6f36b0 100644 --- a/packages/central-server/src/apiV2/requestCountryAccess.js +++ b/packages/central-server/src/apiV2/requestCountryAccess.js @@ -32,10 +32,12 @@ const sendRequest = async (userId, models, countries, message, project) => { }, countries, message, - project: { - code: project.code, - permissionGroups: project.permission_groups.join(', '), - }, + project: project + ? { + code: project.code, + permissionGroups: project.permission_groups.join(', '), + } + : null, user, }, }); diff --git a/packages/datatrak-web-server/src/routes/SurveysRoute.ts b/packages/datatrak-web-server/src/routes/SurveysRoute.ts index 46fbd2937a..5b372cc2ba 100644 --- a/packages/datatrak-web-server/src/routes/SurveysRoute.ts +++ b/packages/datatrak-web-server/src/routes/SurveysRoute.ts @@ -25,11 +25,17 @@ export class SurveysRoute extends Route { const { fields = [], projectId, countryCode } = query; const country = await models.country.findOne({ code: countryCode }); - const surveys = await ctx.services.central.fetchResources(`countries/${country.id}/surveys`, { + const queryUrl = countryCode ? `countries/${country.id}/surveys` : 'surveys'; + + const filter: Record = {}; + + if (projectId) { + filter.project_id = projectId; + } + + const surveys = await ctx.services.central.fetchResources(queryUrl, { ...query, - filter: { - project_id: projectId, - }, + filter, columns: fields, pageSize: 'ALL', // Override default page size of 100 }); diff --git a/packages/datatrak-web/src/features/Reports/Inputs/EntitySelectorInput.tsx b/packages/datatrak-web/src/features/Reports/Inputs/EntitySelectorInput.tsx index 9d5db0a339..9b1c8532a3 100644 --- a/packages/datatrak-web/src/features/Reports/Inputs/EntitySelectorInput.tsx +++ b/packages/datatrak-web/src/features/Reports/Inputs/EntitySelectorInput.tsx @@ -72,7 +72,8 @@ export const EntitySelectorInput = ({ selectedEntityLevel }: EntitySelectorInput } getOptionLabel={option => option.label} placeholder={`Select ${label.toLowerCase()}...`} - onInputChange={throttle((_, newValue) => { + onInputChange={throttle((e, newValue) => { + if (!e?.target) return; setSearchText(newValue); }, 200)} required diff --git a/packages/devops/scripts/deployment-aws/buildDeployablePackages.sh b/packages/devops/scripts/deployment-aws/buildDeployablePackages.sh index 1500eceb2b..3fdd54f77e 100755 --- a/packages/devops/scripts/deployment-aws/buildDeployablePackages.sh +++ b/packages/devops/scripts/deployment-aws/buildDeployablePackages.sh @@ -13,6 +13,7 @@ PACKAGES=$(${TUPAIA_DIR}/scripts/bash/getDeployablePackages.sh) # Install external dependencies and build internal dependencies cd ${TUPAIA_DIR} yarn install --immutable +chmod 755 node_modules/@babel/cli/bin/babel.js # "postinstall" hook may only fire if the dependency tree changes. This may not happen on feature branches based off dev, # because our AMI performs a yarn install already. In this case we can end up in a situation where "internal-depenednecies" diff --git a/packages/lesmis/src/api/queries/useVitalsData.js b/packages/lesmis/src/api/queries/useVitalsData.js index f2630dd76f..6d7b6f59c8 100644 --- a/packages/lesmis/src/api/queries/useVitalsData.js +++ b/packages/lesmis/src/api/queries/useVitalsData.js @@ -84,7 +84,7 @@ const useEntityReport = entity => ); const useEntityVitals = entity => { - const { data: results, isLoading } = useEntityReport(entity); + const { data: results, isInitialLoading: isLoading } = useEntityReport(entity); return { data: results?.data?.[0], diff --git a/packages/lesmis/src/views/DashboardView.jsx b/packages/lesmis/src/views/DashboardView.jsx index b41b9e5575..171913fccd 100644 --- a/packages/lesmis/src/views/DashboardView.jsx +++ b/packages/lesmis/src/views/DashboardView.jsx @@ -68,7 +68,7 @@ const getTabComponent = tabViewType => { }; export const DashboardView = React.memo(({ isOpen, setIsOpen }) => { - const isFetching = useIsFetching('dashboardReport'); + const isFetching = useIsFetching(['dashboardReport']); const { entityCode } = useUrlParams(); const { data: entityData } = useEntityData(entityCode); // eslint-disable-next-line no-unused-vars diff --git a/packages/tupaia-web/src/api/queries/useMapOverlays.ts b/packages/tupaia-web/src/api/queries/useMapOverlays.ts index d341cb8711..fb288a6916 100644 --- a/packages/tupaia-web/src/api/queries/useMapOverlays.ts +++ b/packages/tupaia-web/src/api/queries/useMapOverlays.ts @@ -49,7 +49,12 @@ const mapOverlayByCode = ( */ export const useMapOverlays = (projectCode?: ProjectCode, entityCode?: EntityCode) => { const [urlSearchParams] = useSearchParams(); - const { data, isLoading, error, isFetched } = useQuery( + const { + data, + isInitialLoading: isLoading, + error, + isFetched, + } = useQuery( ['mapOverlays', projectCode, entityCode], (): Promise => get(`mapOverlays/${projectCode}/${entityCode}`), { diff --git a/packages/tupaia-web/src/features/DashboardItem/DashboardItem.tsx b/packages/tupaia-web/src/features/DashboardItem/DashboardItem.tsx index 7fb166635a..94cbbf6d5e 100644 --- a/packages/tupaia-web/src/features/DashboardItem/DashboardItem.tsx +++ b/packages/tupaia-web/src/features/DashboardItem/DashboardItem.tsx @@ -85,7 +85,7 @@ export const DashboardItem = ({ dashboardItem }: { dashboardItem: DashboardItemT const { data: report, - isLoading, + isInitialLoading: isLoading, error, refetch, } = useReport( diff --git a/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapOverlaySelectorTitle.tsx b/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapOverlaySelectorTitle.tsx index a64370505b..42005a3ff6 100644 --- a/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapOverlaySelectorTitle.tsx +++ b/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapOverlaySelectorTitle.tsx @@ -70,7 +70,7 @@ export const MapOverlaySelectorTitle = () => { projectCode, entityCode, ); - const { isLoading: isLoadingOverlayData, error, refetch } = useMapOverlayMapData(); + const { isInitialLoading: isLoadingOverlayData, error, refetch } = useMapOverlayMapData(); const { data: entity } = useEntity(projectCode, entityCode); const isLoading = diff --git a/packages/types/src/schemas/schemas.ts b/packages/types/src/schemas/schemas.ts index 36de1737fa..ac6adde0af 100644 --- a/packages/types/src/schemas/schemas.ts +++ b/packages/types/src/schemas/schemas.ts @@ -31481,10 +31481,7 @@ export const MeasureConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -31629,10 +31626,7 @@ export const DisplayedValueTypeSchema = { } export const EntityLevelSchema = { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } export const MeasureValueTypeSchema = { @@ -31928,10 +31922,7 @@ export const BaseMapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -32029,10 +32020,7 @@ export const BaseMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -32120,10 +32108,7 @@ export const BaseMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -32502,10 +32487,7 @@ export const SpectrumMapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -32603,10 +32585,7 @@ export const SpectrumMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -32694,10 +32673,7 @@ export const SpectrumMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -33181,10 +33157,7 @@ export const IconMapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -33282,10 +33255,7 @@ export const IconMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -33373,10 +33343,7 @@ export const IconMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -33785,10 +33752,7 @@ export const RadiusMapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -33886,10 +33850,7 @@ export const RadiusMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -33977,10 +33938,7 @@ export const RadiusMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -34363,10 +34321,7 @@ export const ColorMapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -34464,10 +34419,7 @@ export const ColorMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -34555,10 +34507,7 @@ export const ColorMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -34955,10 +34904,7 @@ export const ShadingMapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -35056,10 +35002,7 @@ export const ShadingMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -35147,10 +35090,7 @@ export const ShadingMapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -35539,10 +35479,7 @@ export const MapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -35640,10 +35577,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -35731,10 +35665,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -36217,10 +36148,7 @@ export const MapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -36318,10 +36246,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -36409,10 +36334,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -36820,10 +36742,7 @@ export const MapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -36921,10 +36840,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -37012,10 +36928,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -37397,10 +37310,7 @@ export const MapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -37498,10 +37408,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -37589,10 +37496,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -37988,10 +37892,7 @@ export const MapOverlayConfigSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -38089,10 +37990,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -38180,10 +38078,7 @@ export const MapOverlayConfigSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -69719,10 +69614,7 @@ export const MapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -69820,10 +69712,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -69911,10 +69800,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -70397,10 +70283,7 @@ export const MapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -70498,10 +70381,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -70589,10 +70469,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -71000,10 +70877,7 @@ export const MapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -71101,10 +70975,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -71192,10 +71063,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -71577,10 +71445,7 @@ export const MapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -71678,10 +71543,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -71769,10 +71631,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -72168,10 +72027,7 @@ export const MapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -72269,10 +72125,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -72360,10 +72213,7 @@ export const MapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -72813,10 +72663,7 @@ export const MapOverlayCreateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -72914,10 +72761,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -73005,10 +72849,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -73491,10 +73332,7 @@ export const MapOverlayCreateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -73592,10 +73430,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -73683,10 +73518,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -74094,10 +73926,7 @@ export const MapOverlayCreateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -74195,10 +74024,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -74286,10 +74112,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -74671,10 +74494,7 @@ export const MapOverlayCreateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -74772,10 +74592,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -74863,10 +74680,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -75262,10 +75076,7 @@ export const MapOverlayCreateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -75363,10 +75174,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -75454,10 +75262,7 @@ export const MapOverlayCreateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -75900,10 +75705,7 @@ export const MapOverlayUpdateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -76001,10 +75803,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -76092,10 +75891,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -76578,10 +76374,7 @@ export const MapOverlayUpdateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -76679,10 +76472,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -76770,10 +76560,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -77181,10 +76968,7 @@ export const MapOverlayUpdateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -77282,10 +77066,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -77373,10 +77154,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -77758,10 +77536,7 @@ export const MapOverlayUpdateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -77859,10 +77634,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -77950,10 +77722,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -78349,10 +78118,7 @@ export const MapOverlayUpdateSchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -78450,10 +78216,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -78541,10 +78304,7 @@ export const MapOverlayUpdateSchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -93025,10 +92785,7 @@ export const TranslatedMapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -93126,10 +92883,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -93217,10 +92971,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -93726,10 +93477,7 @@ export const TranslatedMapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -93827,10 +93575,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -93918,10 +93663,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -94352,10 +94094,7 @@ export const TranslatedMapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -94453,10 +94192,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -94544,10 +94280,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -94952,10 +94685,7 @@ export const TranslatedMapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -95053,10 +94783,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -95144,10 +94871,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", @@ -95566,10 +95290,7 @@ export const TranslatedMapOverlaySchema = { }, "displayOnLevel": { "description": "This setting defines the level of the entity hierarchy from where we start rendering the map overlay.\nUse this if we want to only render the map overlay below a certain level.\neg. If rendering the map overlay at the country level causes performance issues, set displayOnLevel: SubDistrict to only start rendering at Sub District", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "displayedValueKey": { "description": "Use to override the default column of data that we display", @@ -95667,10 +95388,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "values": { "description": "Level of the entity hierarchy that this map overlay has data for", @@ -95758,10 +95476,7 @@ export const TranslatedMapOverlaySchema = { }, "measureLevel": { "description": "Level of the entity hierarchy that this map overlay has data for", - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, "noDataColour": { "description": "The colour to use when there is no data", diff --git a/packages/types/src/types/models-extra/mapOverlay.ts b/packages/types/src/types/models-extra/mapOverlay.ts index b20253a751..3bd773dca9 100644 --- a/packages/types/src/types/models-extra/mapOverlay.ts +++ b/packages/types/src/types/models-extra/mapOverlay.ts @@ -7,6 +7,7 @@ import { PascalCase } from '../../utils'; import { CssColor } from '../css'; import { EntityType } from './entityType'; import { DateOffsetSpec, DefaultTimePeriod, ReferenceProps, VizPeriodGranularity } from './common'; +import { EntityTypeEnum } from '../models'; /** * @description A key that can be used to reference a value in a measureConfig, or to reference all values @@ -123,7 +124,7 @@ enum DisplayedValueType { FACILITY_TYPE_NAME = 'facilityTypeName', } -type EntityLevel = PascalCase; +type EntityLevel = PascalCase | EntityType; enum MeasureValueType { BOOLEAN = 'boolean', diff --git a/packages/ui-components/src/components/Button.tsx b/packages/ui-components/src/components/Button.tsx index 43179a2cf2..c88e616b33 100644 --- a/packages/ui-components/src/components/Button.tsx +++ b/packages/ui-components/src/components/Button.tsx @@ -11,7 +11,7 @@ import { OverrideableComponentProps } from '../types'; const StyledButton = styled(MuiButton)` line-height: 1.75; letter-spacing: 0; - padding: 0.5rem 1.75rem; + padding: 0.5rem 1.2rem; box-shadow: none; min-width: 3rem; diff --git a/packages/ui-components/src/components/FilterableTable/FilterCell.tsx b/packages/ui-components/src/components/FilterableTable/FilterCell.tsx index 0524f22f7d..a0618cacf7 100644 --- a/packages/ui-components/src/components/FilterableTable/FilterCell.tsx +++ b/packages/ui-components/src/components/FilterableTable/FilterCell.tsx @@ -45,7 +45,10 @@ const FilterWrapper = styled.div` padding-block: 0.5rem; } .MuiInputBase-input::-webkit-input-placeholder { - color: ${({ theme }) => theme.palette.text.secondary}; + color: #b8b8b8; + } + .MuiInputBase-adornedStart .MuiSvgIcon-root { + color: #b8b8b8; } `;