Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a87cd14
fix: archive field had old 'model' attribute instead of formik 'name'…
vbojilova Sep 13, 2024
91abd03
fix: porting npm vulnerability fixes #556
vbojilova Jan 7, 2025
06a1a14
set up eslint
tmfrnz Jun 2, 2025
2bca8f3
cleanup
tmfrnz Jun 2, 2025
71ce787
add en-GB
tmfrnz Jun 28, 2025
1e6bb52
fix overview vertical diagram
tmfrnz Jun 28, 2025
6e2db36
configure taxonomy labels and icon
tmfrnz Jun 28, 2025
56054ec
use demo/base theme
tmfrnz Jun 28, 2025
2b33202
update media
tmfrnz Jun 28, 2025
3912efb
enable home page
tmfrnz Jun 28, 2025
c9b1eec
cleanup frameworks etc
tmfrnz Jun 28, 2025
6409aab
more frameworks cleanup
tmfrnz Jun 28, 2025
985f87c
mo cleanup
tmfrnz Jun 28, 2025
0e72d55
more cleanup
tmfrnz Jun 30, 2025
8a01027
update firebase project
tmfrnz Jun 30, 2025
0e840b8
fix missing palette bug
tmfrnz Jun 30, 2025
d5d1c0e
improve overview diagram
tmfrnz Jun 30, 2025
7383167
fix sort for pure number references
tmfrnz Jun 30, 2025
cce8fc0
cleanup various
tmfrnz Jun 30, 2025
d0fcafc
do not set framework
tmfrnz Jun 30, 2025
dd86682
small design tweaks
tmfrnz Jun 30, 2025
6b7d968
dont flip draft export column
tmfrnz Jun 30, 2025
cff9658
fix: also need to remove leading dot (see commit 7df298c79788cd043db2…
tmfrnz Jun 30, 2025
e620e3d
tweak styles and header nav, cleanup
tmfrnz Jul 2, 2025
3836298
tweak labels
tmfrnz Jul 2, 2025
282e8c4
disable GA
tmfrnz Jul 2, 2025
18cf0b2
only show "is_current" where relevant
tmfrnz Jul 2, 2025
462b74b
do not show non-current child taxonomies unless requested
tmfrnz Jul 2, 2025
df7ca77
do not override multiselect options from formdata
tmfrnz Jul 2, 2025
25eba88
only show cycle information when not the most recent cycle
tmfrnz Jul 2, 2025
fdf68b4
tweak labels
tmfrnz Jul 2, 2025
24f767a
update version
tmfrnz Jul 2, 2025
11f2a45
import relationships WIP
tmfrnz Jul 2, 2025
a6d05cc
import relationships for actions
tmfrnz Jul 3, 2025
5751cad
import relationships for recs
tmfrnz Jul 3, 2025
bd02679
cleanup some small issues
tmfrnz Jul 3, 2025
ce6af1c
import relationships for indicators
tmfrnz Jul 3, 2025
12a201f
specify markdown
tmfrnz Jul 3, 2025
9f4146a
inc version
tmfrnz Jul 3, 2025
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
5 changes: 1 addition & 4 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"projects": {
"default": "impact-nz-dev",
"dev": "impact-nz-dev",
"development": "impact-nz-dev",
"a11y": "impact-nz-dev-a11y"
"default": "impactoss-demo-fw"
}
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ build/
node_modules/
internals/generators/
internals/scripts/
internals/webpack/
package-lock.json
yarn.lock
package.json
eslint.config.mjs
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 80,
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
Expand Down
20 changes: 10 additions & 10 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';

// Import ThemeProvider
import { Grommet } from 'grommet';

import { StyleSheetManager } from 'styled-components';
import isPropValid from '@emotion/is-prop-valid';

import 'sanitize.css/sanitize.css';
import './fonts.css';

// Import root app
import App from 'containers/App';
Expand All @@ -27,13 +33,7 @@ import { makeSelectLocationState } from 'containers/App/selectors';
// Import Language Provider
import LanguageProvider from 'containers/LanguageProvider';

// Import ThemeProvider
import { Grommet } from 'grommet';

import { StyleSheetManager } from 'styled-components';
import isPropValid from '@emotion/is-prop-valid';

import theme from 'themes/theme-nz';
import theme from 'themes/theme-base';
import './fonts/fonts.css';

import configureStore from './store';
Expand Down Expand Up @@ -116,7 +116,7 @@ if (!window.Intl) {
} else {
render(translationMessages);
}

/*
// Install ServiceWorker and AppCache in the end since
// it's not most important operation and if main code fails,
// we do not want it installed
Expand All @@ -129,4 +129,4 @@ if (process.env.NODE_ENV === 'production') {
runtime.applyUpdate();
},
});
}
}*/
67 changes: 67 additions & 0 deletions app/components/Accordion/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Button } from 'grommet';
import styled from 'styled-components';
import { without } from 'lodash/array';

import AccordionHeader from 'components/AccordionHeader';

const getActives = ({ activePanels, panelId, single }) => {
const changeToOpen = activePanels.indexOf(panelId) === -1;
if (single) {
return changeToOpen ? [panelId] : [];
}
return changeToOpen ? [...activePanels, panelId] : without(activePanels, panelId);
};

const StyledButton = styled((p) => <Button plain {...p} />)`
width: 100%;
&:hover {
opacity: 0.8;
}
`;

export function Accordion({
activePanels,
onActive,
single,
options,
}) {
return (
<div>
{options.filter((o) => !!o).map((option) => {
const open = activePanels.indexOf(option.id) > -1;
return (
<div key={option.id}>
<div>
<StyledButton
onClick={() => onActive(
getActives({ activePanels, panelId: option.id, single })
)}
>
<AccordionHeader
title={option.titleButton}
open={open}
/>
</StyledButton>
</div>
{open && option.content && (
<div>
{option.content}
</div>
)}
</div>
);
})}
</div>
);
}

Accordion.propTypes = {
activePanels: PropTypes.array,
onActive: PropTypes.func,
single: PropTypes.bool,
options: PropTypes.array,
};

export default Accordion;
55 changes: 55 additions & 0 deletions app/components/AccordionHeader/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Box, Heading, Text } from 'grommet';
import { Up, Down } from 'grommet-icons';
import styled from 'styled-components';

import PrintHide from 'components/styled/PrintHide';
import PrintOnly from 'components/styled/PrintOnly';

const StyledBox = styled((p) => (
<Box
direction="row"
gap="small"
align="center"
pad={{ vertical: 'small', left: 'xxsmall', right: 'xsmall' }}
{...p}
/>
))`
border-bottom: 1px solid;
`;

function AccordionHeader({ title, open, level = 1 }) {
// prettier-ignore
return (
<StyledBox>
<Box>
<Heading
responsive={false}
level={6}
margin={{ vertical: 'xsmall' }}
style={level === 2 ? { fontWeight: 400 } : {}}
>
{title}
</Heading>
</Box>
<Box margin={{ left: 'auto' }}>
<PrintHide>
{!open && <Down size="small" />}
{open && <Up size="small" />}
</PrintHide>
<PrintOnly>
{!open && <Text size="xsmall">(hidden)</Text>}
</PrintOnly>
</Box>
</StyledBox>
);
}

AccordionHeader.propTypes = {
title: PropTypes.string,
open: PropTypes.bool,
level: PropTypes.number,
};

export default AccordionHeader;
2 changes: 1 addition & 1 deletion app/components/EntityListDownload/OptionGroupToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function OptionGroupToggle({
<Box direction="row" align="center" gap="xsmall">
{typeof activeCount !== 'undefined' && activeCount > 0 && (
<Count alignContent="center" align="center" justify="center">
<Text color="black" size="small">{`${activeCount}/${optionCount}`}</Text>
<Text color="white" size="small">{`${activeCount}/${optionCount}`}</Text>
</Count>
)}
{expanded && (
Expand Down
12 changes: 6 additions & 6 deletions app/components/EntityListDownload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,25 +393,25 @@ export function EntityListDownload({
margin={{ top: 'xlarge' }}
>
<Box
direction={(isMinSize(size, 'medium') || !csvSuffix) ? 'row' : 'column'}
align={(isMinSize(size, 'medium') || !csvSuffix) ? 'center' : 'start'}
direction={(isMinSize(size, 'small') || !csvSuffix) ? 'row' : 'column'}
align={(isMinSize(size, 'small') || !csvSuffix) ? 'center' : 'start'}
gap="small"
fill={false}
>
<OptionLabel htmlFor="input-filename">
<FormattedMessage {...messages.filenameLabel} />
</OptionLabel>
<Box
direction={(isMinSize(size, 'medium') || !csvSuffix) ? 'row' : 'column'}
align={(isMinSize(size, 'medium') || !csvSuffix) ? 'center' : 'start'}
gap={(isMinSize(size, 'medium') || !csvSuffix) ? 'none' : 'small'}
direction={(isMinSize(size, 'small') || !csvSuffix) ? 'row' : 'column'}
align={(isMinSize(size, 'small') || !csvSuffix) ? 'center' : 'start'}
gap={(isMinSize(size, 'small') || !csvSuffix) ? 'none' : 'small'}
>
<TextInput
minLength={1}
debounceTimeout={500}
value={csvFilename}
onChange={(evt) => setCSVFilename(evt.target.value)}
style={{ maxWidth: '250px', textAlign: isMinSize(size, 'medium') ? 'right' : 'left' }}
style={{ maxWidth: '250px', textAlign: isMinSize(size, 'small') ? 'right' : 'left' }}
/>
<Text size="xsmall">
{`${csvSuffix ? csvDateSuffix : ''}.csv`}
Expand Down
5 changes: 3 additions & 2 deletions app/components/EntityListMain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,19 @@ class EntityListMain extends React.Component { // eslint-disable-line react/pref
const expandNo = config.expandableColumns && locationQuery.get('expand')
? parseInt(locationQuery.get('expand'), 10)
: 0;

const currentFWid = locationQuery.get('fw') || '1';
let groupSelectValue = locationQuery.get('group');
const groupforFramework = config.taxonomies
&& config.taxonomies.defaultGroupsByFramework
&& frameworks
&& frameworks.size === 1;

if (config.taxonomies && !groupSelectValue) {
if (groupforFramework) {
/* eslint-disable prefer-destructuring */
groupSelectValue = config.taxonomies.defaultGroupsByFramework[frameworks.first().get('id')][1];
/* eslint-enable prefer-destructuring */
} else {
} else if (currentFWid !== 'all'){
groupSelectValue = getGroupValue(
taxonomies,
config.taxonomies.defaultGroupAttribute,
Expand Down
8 changes: 1 addition & 7 deletions app/components/EntityListSidebar/EntityListSidebarGroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ import { palette } from 'styled-theme';
import EntityListSidebarGroupLabel from './EntityListSidebarGroupLabel';
import EntityListSidebarOption from './EntityListSidebarOption';

const Group = styled.div`
border-top: 1px solid;
border-color: ${(props) => props.expanded ? palette('aside', 0) : palette('light', 2)};
&:last-child {
border-bottom: 0;
}
`;
const Group = styled.div``;

class EntityListSidebarGroups extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
render() {
Expand Down
5 changes: 1 addition & 4 deletions app/components/EntityListSidebar/EntityListSidebarOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@ const Styled = styled(Button)`
background-color: ${(props) => props.active ? palette('asideListItem', 3) : palette('asideListItem', 2)};
border-bottom: 1px solid ${palette('asideListItem', 4)};
&:hover, &:focus-visible {
color: ${(props) => props.active ? palette('taxonomiesHover', 1) : palette('asideListItemHover', 0)};
color: ${(props) => props.active ? palette('asideListItemHover', 1) : palette('asideListItemHover', 0)};
background-color: ${(props) => props.active ? palette('asideListItemHover', 3) : palette('asideListItemHover', 2)};
border-bottom-color: ${palette('asideListItemHover', 4)};
outline: none;
}
&:last-child {
border-bottom: 0;
}
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
padding: ${(props) => props.small ? '0.5em 8px 0.5em 36px' : '0.75em 8px 0.75em 16px'};
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/Header/LinkAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import styled from 'styled-components';
import LinkPage from './LinkPage';

export default styled(LinkPage)`
font-weight: normal;
font-weight: 600;
`;
7 changes: 3 additions & 4 deletions app/components/Header/LinkMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ export default styled(Link)`
height: ${(props) => props.theme.sizes.header.nav.heightMobile - 1}px;
border-left: 1px solid ${palette('dark', 3)};
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
min-width: 120px;
min-width: 100px;
font-size: 0.9em;
padding: 5px ${(props) => props.theme.sizes.header.paddingLeft.small}px;
height: ${(props) => props.theme.sizes.header.nav.height - 1}px;
height: ${(props) => props.theme.sizes.header.nav.height}px;
}
@media (min-width: ${(props) => props.theme.breakpoints.medium}) {
min-width: 160px;
padding-top: 4px;
}
@media (min-width: ${(props) => props.theme.breakpoints.large}) {
min-width: 200px;
min-width: 160px;
font-size: 1em;
padding-top: 4px;
padding-left: ${(props) => props.theme.sizes.header.paddingLeft.large}px;
Expand Down
7 changes: 4 additions & 3 deletions app/components/Header/LinkPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import { palette } from 'styled-theme';
import LinkSecondary from './LinkSecondary';

export default styled(LinkSecondary)`
color:${(props) => props.active ? palette('headerNavPagesItem', 1) : palette('headerNavPagesItem', 0)};
background-color: transparent;
color: ${(props) => props.active ? palette('headerNavPagesItem', 1) : palette('headerNavPagesItem', 0)};
background-color: ${(props) => props.active ? palette('headerNavPagesItem', 3) : palette('headerNavPagesItem', 2)};
&:hover {
text-decoration: ${(props) => props.active ? 'none' : 'underline'};
text-decoration: ${(props) => props.active ? 'underline' : 'underline'};
}
&:focus-visible {
text-decoration: underline;
}
&:hover, &:focus-visible {
color:${(props) => props.active ? palette('headerNavPagesItemHover', 1) : palette('headerNavPagesItemHover', 0)};
background-color: ${(props) => props.active ? palette('headerNavPagesItemHover', 3) : palette('headerNavPagesItemHover', 2)};
}
`;
3 changes: 0 additions & 3 deletions app/components/Header/NavAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import messages from './messages';

const Styled = styled.div`
background-color: ${palette('headerNavAccount', 0)};
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
float: right;
}
`;
class NavAccount extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
onClick = (evt, path, currentPath, fullPath) => {
Expand Down
10 changes: 0 additions & 10 deletions app/components/Header/NavAdmin.js

This file was deleted.

8 changes: 6 additions & 2 deletions app/components/Header/NavMain.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';
import styled from 'styled-components';
import { palette } from 'styled-theme';
import PrintHide from 'components/styled/PrintHide';
import { Box } from 'grommet';

export default styled(PrintHide)`
export default styled((p) => <Box direction="row" justify="between" {...p} />)`
height:${(props) => props.theme.sizes.header.nav.heightMobile}px;
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
height:${(props) => props.theme.sizes.header.nav.height}px;
Expand All @@ -16,4 +17,7 @@ export default styled(PrintHide)`
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
@media print {
display: none !important;
}
`;
6 changes: 2 additions & 4 deletions app/components/Header/NavPages.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import styled from 'styled-components';
import { palette } from 'styled-theme';
import { Box } from 'grommet';

export default styled.div`
export default styled(Box)`
background-color: ${palette('headerNavPages', 0)};
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
float: right;
}
`;
Loading