Skip to content
Closed
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
30 changes: 14 additions & 16 deletions packages/admin-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"dependencies": {
"@apollo/client": "3.8.0",
"@bb-tech/ra-components": "2.0.6",
"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.1",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@mui/material": "5.13.3",
"@mui/styles": "^5.14.19",
"@mui/utils": "^5.14.19",
"@mui/material": "7.3.2",
"@mui/styles": "^6.4.8",
"@mui/utils": "^7.3.5",
"@mui/x-data-grid": "6.18.2",
"@react-page/react-admin": "5.4.4",
"@reduxjs/toolkit": "1.9.5",
Expand All @@ -35,18 +35,17 @@
"keycloak-js": "^22.0.1",
"lodash": "^4.17.21",
"moment-timezone": "^0.5.46",
"mui-image": "1.0.7",
"process": "^0.11.10",
"ra-data-hasura": "0.6.0",
"react": "18.1.0",
"react-admin": "4.12.4",
"react": "19.1.1",
"react-admin": "5.12.3",
"react-admin-import-csv": "4.0.1",
"react-admin-json-view": "2.0.0",
"react-apexcharts": "1.4.1",
"react-diff-view": "^3.2.0",
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-dom": "18.1.0",
"react-dom": "19.1.1",
"react-i18next": "11.18.3",
"react-js-cron": "^5.0.1",
"react-redux": "8.1.2",
Expand Down Expand Up @@ -119,10 +118,9 @@
"@testing-library/user-event": "^13.2.1",
"@types/intl-tel-input": "^18.1.4",
"@types/jest": "^27.0.1",
"@types/mui-image": "^1.0.0",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "19.1.1",
"@types/react-dom": "19.1.1",
"@types/sanitize-html": "2.9.0",
"@types/sql.js": "^1.4.9",
"@types/uuid": "9.0.2",
Expand Down Expand Up @@ -150,11 +148,11 @@
"storybook-addon-react-router-v6": "^0.1.13",
"style-loader": "^3.3.3",
"ts-jest": "26.4.4",
"ts-loader": "9.5.1",
"ts-loader": "9.5.4",
"typescript": "^5.9.2",
"webpack": "5.94.0",
"webpack-cli": "6.0.1",
"ts-node": "^10.9.2",
"typescript": "^4.4.2",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "^4.15.1"
}
}
9 changes: 9 additions & 0 deletions packages/admin-portal/src/components/CustomMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,29 @@ export const CustomMenu = () => {
to="/user-roles"
primaryText={open ? t("sideMenu.usersAndRoles") : null}
leftIcon={<GroupIcon sx={{color: adminTheme.palette.brandColor}} />}
placeholder={undefined}
onPointerEnterCapture={undefined}
onPointerLeaveCapture={undefined}
/>
)}
{tenant && showSettings && (
<StyledItem
to="/settings"
primaryText={open ? t("sideMenu.settings") : null}
leftIcon={<SettingsIcon sx={{color: adminTheme.palette.brandColor}} />}
placeholder={undefined}
onPointerEnterCapture={undefined}
onPointerLeaveCapture={undefined}
/>
)}
{tenant && showTemplates && (
<StyledItem
to="/sequent_backend_template"
primaryText={open && t("sideMenu.templates")}
leftIcon={<MailIcon sx={{color: adminTheme.palette.brandColor}} />}
placeholder={undefined}
onPointerEnterCapture={undefined}
onPointerLeaveCapture={undefined}
/>
)}
{tenant?.settings?.help_links?.length > 0 && (
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-portal/src/components/area/SelectArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const SelectArea = ({
filterToQuery={areaFilterToQuery}
onChange={onSelectArea}
debounce={100}
sx={customStyle}
sx={customStyle as any}
isRequired={isRequired}
disabled={disabled}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const SelectElection = ({
filterToQuery={electionFilterToQuery}
onChange={onSelectElection}
debounce={300}
sx={customStyle}
sx={customStyle as any}
disabled={disabled}
/>
</ReferenceInput>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@ export default function ElectionEvents() {
paddingLeft: i18n.dir(i18n.language) === "rtl" ? 0 : "16px",
paddingRight: i18n.dir(i18n.language) === "rtl" ? "16px" : 0,
}}
placeholder={undefined}
onPointerEnterCapture={undefined}
onPointerLeaveCapture={undefined}
/>
{isOpenSidebar && showAddElectionEvent ? (
<StyledIconButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const WizardStyles = {
width: 100%;
margin: auto;
`,
Toolbar: styled(Toolbar)`
Toolbar: styled(Toolbar as any)`
bottom: 0;
position: sticky;
flex-direction: row;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export const CandidateDataForm: React.FC<{
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={1}>
<Grid item xs={2}>
<Grid size={2}>
{parsedValue?.image_document_id &&
parsedValue?.image_document_id !== "" ? (
<img
Expand All @@ -501,7 +501,7 @@ export const CandidateDataForm: React.FC<{
/>
) : null}
</Grid>
<Grid item xs={10}>
<Grid size={10}>
<DropFile
handleFiles={async (files) => handleFiles(files)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ export const ContestDataForm: React.FC = () => {
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={1}>
<Grid item xs={2}>
<Grid size={2}>
{parsedValue?.image_document_id &&
parsedValue?.image_document_id !== "" ? (
<img
Expand All @@ -826,7 +826,7 @@ export const ContestDataForm: React.FC = () => {
/>
) : null}
</Grid>
<Grid item xs={10}>
<Grid size={10}>
<DropFile
handleFiles={async (files) => handleFiles(files)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export const ElectionDataForm: React.FC = () => {
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={4}>
<Grid item xs={12} md={6}>
<Grid size={{xs: 12, md: 6}}>
{renderVotingChannels(parsedValue)}
</Grid>
</Grid>
Expand Down Expand Up @@ -729,7 +729,7 @@ export const ElectionDataForm: React.FC = () => {
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={1}>
<Grid item xs={2}>
<Grid size={2}>
{parsedValue?.image_document_id &&
parsedValue?.image_document_id !== "" ? (
<img
Expand All @@ -740,7 +740,7 @@ export const ElectionDataForm: React.FC = () => {
/>
) : null}
</Grid>
<Grid item xs={10}>
<Grid size={10}>
<DropFile
handleFiles={async (files) => handleFiles(files)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ export const EditElectionEventAreasList: React.FC = () => {
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={4}>
<Grid item xs={12} md={6}>
<Grid size={{xs: 12, md: 6}}>
<DateTimeInput
source="start_date"
label={t("electionEventScreen.field.startDateTime")}
/>
</Grid>
<Grid item xs={12} md={6}>
<Grid size={{xs: 12, md: 6}}>
<DateTimeInput
source="end_date"
label={t("electionEventScreen.field.endDateTime")}
Expand All @@ -139,7 +139,7 @@ export const EditElectionEventAreasList: React.FC = () => {
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={4}>
<Grid item xs={12} md={6}>
<Grid size={{xs: 12, md: 6}}>
<BooleanInput
source="language.english"
label={"English"}
Expand All @@ -166,7 +166,7 @@ export const EditElectionEventAreasList: React.FC = () => {
<AccordionDetails>
{" "}
<Grid container spacing={4}>
<Grid item xs={12} md={6}>
<Grid size={{xs: 12, md: 6}}>
<BooleanInput source="allowed.one" label={"One"} defaultValue={true} />
<BooleanInput source="allowed.two" label={"Two"} defaultValue={true} />
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ export const EditElectionEventDataForm: React.FC = () => {
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={4}>
<Grid item xs={12} md={6}>
<Grid size={{xs: 12, md: 6}}>
{renderVotingChannels(parsedValue)}
</Grid>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ export const TallyCeremony: React.FC = () => {
id="keys-ceremony-for-tally"
value={keysCeremonyId ?? ""}
label={t("tally.keysCeremonyTitle")}
placeholder={t("tally.keysCeremonyTitle")}
onChange={(props) => {
if (!props?.target?.value) {
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const SelectTemplate = ({
choices={choices}
onChange={handleTemplateChange}
debounce={100}
sx={customStyle}
sx={customStyle as any}
disabled={disabled}
validate={isRequired ? [required()] : undefined}
isLoading={isLoading}
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-portal/src/resources/User/EditUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ export const EditUserForm: React.FC<EditUserFormProps> = ({
if (attr.annotations?.inputType === "select") {
return (
<Grid key={index} container spacing={2}>
<Grid item xs={12}>
<Grid size={12}>
<FormControl fullWidth>
<Autocomplete
defaultValue={value || null}
Expand Down
24 changes: 11 additions & 13 deletions packages/ballot-verifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
"i18next": "^21.8.16",
"i18next-browser-languagedetector": "^6.1.4",
"lodash": "^4.17.21",
"react": "18.1.0",
"react-dom": "18.1.0",
"mui-image": "1.0.7",
"react": "19.1.1",
"react-dom": "19.1.1",
"react-i18next": "11.18.3",
"react-redux": "8.1.2",
"react-router-dom": "6.11.2",
"@mui/material": "5.13.3",
"@mui/material": "7.3.2",
"@reduxjs/toolkit": "1.9.5",
"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.1",
"react-scripts": "5.0.1",
"sequent-core": "file:./rust/sequent-core-0.1.0.tgz",
"@sequentech/ui-essentials": "*",
Expand Down Expand Up @@ -75,10 +74,9 @@
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@types/mui-image": "^1.0.0",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "19.1.1",
"@types/react-dom": "19.1.1",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"babel-loader": "9.1.2",
Expand All @@ -95,10 +93,10 @@
"prop-types": "^15.8.1",
"style-loader": "^3.3.3",
"storybook-addon-react-router-v6": "^0.1.13",
"ts-loader": "9.5.1",
"typescript": "^4.4.2",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
"ts-loader": "9.5.4",
"typescript": "^5.9.2",
"webpack": "5.94.0",
"webpack-cli": "6.0.1",
"webpack-dev-server": "^4.15.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
} from "@sequentech/ui-essentials"
import {translate, ICandidate, IContest, EInvalidVotePolicy} from "@sequentech/ui-core"
import {keyBy} from "lodash"
import Image from "mui-image"
import {checkIsInvalidVote, checkIsWriteIn, getImageUrl} from "../services/ElectionConfigService"

const StyledLink = styled(RouterLink)`
Expand Down
16 changes: 13 additions & 3 deletions packages/ballot-verifier/src/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {IBallotService, IConfirmationBallot} from "../services/BallotService"
import TextField from "@mui/material/TextField"
import {faCircleQuestion, faAngleRight} from "@fortawesome/free-solid-svg-icons"
import JsonImg from "../public/json.png"
import Image from "mui-image"
import {TenantEventContext} from ".."
import {GET_BALLOT_STYLES} from "../queries/GetBallotStyles"
import {GetBallotStylesQuery} from "../gql/graphql"
Expand Down Expand Up @@ -63,7 +62,7 @@ const StyledButton = styled(Button)`
}
`

const StyledImage = styled(Image)`
const StyledImageBox = styled(Box)`
max-height: 64px;
max-width: 64px;
`
Expand Down Expand Up @@ -93,7 +92,18 @@ const JsonFile: React.FC<JsonFileProps> = ({name}) => {
{t("homeScreen.fileUploaded")}
</Typography>
<FileWrapper>
<StyledImage src={JsonImg} duration={100} width="unset" />
<StyledImageBox>
<img
src={JsonImg}
alt=""
style={{
width: "auto",
height: "100%",
objectFit: "contain",
transition: "opacity 100ms ease",
}}
/>
</StyledImageBox>
<Typography variant="body2" sx={{color: theme.palette.black}}>
{name || SampleFileName}
</Typography>
Expand Down
9 changes: 9 additions & 0 deletions packages/basic/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2022 Felix Robles <felix@sequentech.io>
#
# SPDX-License-Identifier: AGPL-3.0-only
node_modules/
dist/
target/
pkg/
build/
src/gql/
Loading
Loading