Skip to content
Merged
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
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ This project is composed of (click on the link for there documentation):

- [apollo-dx - 🚀 - Provides an apollo-client configured to connect on DX graphql API](./packages/apollo-dx)
- [react-apollo - 🚀 - Provides helpers methods to manipulate DX nodes, based on graphQL API](./packages/react-apollo)
- [i18next - 🌐 - Provides an i18next configuration](./packages/i18next)
- [react-router - ✨ - A router with multiple outlets](./packages/react-router)
- [redux - 💩 - DEPRECATED no one use it](./packages/redux)

Expand Down Expand Up @@ -95,8 +94,8 @@ Modules can also be built independently by going to packages subfolder, and use

### Publish

When you make changes to javascript-components, a new version is built and published automatically. Releases and
publish are done thanks to [auto](https://intuit.github.io/auto/). Version are incremented according to
When you make changes to javascript-components, a new version is built and published automatically. Releases and
publish are done thanks to [auto](https://intuit.github.io/auto/). Version are incremented according to
[PR labels](https://intuit.github.io/auto/pages/autorc.html#labels).


Expand Down
1 change: 0 additions & 1 deletion packages/design-system-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"classnames": "^2.2.6",
"lodash": "^4.17.13",
"prop-types": "^15.6.2",
"react-i18next": "^7.6.1",
"react-number-format": "^4.2.0"
}
}
7 changes: 0 additions & 7 deletions packages/design-system-kit/resources/locales/de.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/design-system-kit/resources/locales/en.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/design-system-kit/resources/locales/fr.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import {translate} from 'react-i18next';
import {Tooltip, withStyles} from '@material-ui/core';
import {compose} from 'recompose';
import classNames from 'classnames';
Expand All @@ -17,7 +16,7 @@ const styles = () => ({
}
});

export const BurgerMenuButton = ({classes, isDrawerOpen, t}) => {
export const BurgerMenuButton = ({classes, isDrawerOpen, title}) => {
function openMenu() {
const clickEvent = window.top.document.createEvent('MouseEvents');
clickEvent.initEvent('click', true, true);
Expand All @@ -33,7 +32,7 @@ export const BurgerMenuButton = ({classes, isDrawerOpen, t}) => {
}

return (
<Tooltip title={t('label.tooltip.burgerMenu')}
<Tooltip title={title}
placement="right"
>
<div className={classNames(classes.menuButton)}
Expand All @@ -46,14 +45,13 @@ export const BurgerMenuButton = ({classes, isDrawerOpen, t}) => {
BurgerMenuButton.propTypes = {
isDrawerOpen: PropTypes.bool,
classes: PropTypes.object.isRequired,
t: PropTypes.func.isRequired
title: PropTypes.string.isRequired
};

BurgerMenuButton.defaultProps = {
isDrawerOpen: false
};

export default compose(
translate('design-system-kit'),
withStyles(styles, {name: 'DxBurgerMenuButton'})
)(BurgerMenuButton);
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {List, ListItem, Typography, withStyles} from '@material-ui/core';
import {ChevronRight, ExpandMore} from '@material-ui/icons';
import React from 'react';
import {lodash as _} from 'lodash';
import {translate} from 'react-i18next';
import {DisplayActions, toIconComponent} from '@jahia/react-material';
import {compose} from 'recompose';

Expand All @@ -16,7 +15,7 @@ const styles = theme => ({
}
});

export const LeftDrawerListItems = ({context, actionPath, classes, t}) => (
export const LeftDrawerListItems = ({context, actionPath, classes}) => (
<DisplayActions target={context.menu}
context={{...context.originalContext, parent: context}}
render={actionProps => {
Expand Down Expand Up @@ -48,15 +47,15 @@ export const LeftDrawerListItems = ({context, actionPath, classes, t}) => (
{icon}
&nbsp;
<Typography color="textPrimary">
{t(actionContext.buttonLabel)}
{actionContext.buttonLabel}
</Typography>
</ListItem>
<List disablePadding classes={{root: classes.nested}}>
{actionContext.menu && actionContext.open &&
<LeftDrawerListItems context={actionContext}
actionPath={actionPath + '/' + actionContext.key}
classes={classes}
t={t}/>}
/>}
</List>
</React.Fragment>
);
Expand All @@ -66,11 +65,9 @@ export const LeftDrawerListItems = ({context, actionPath, classes, t}) => (
LeftDrawerListItems.propTypes = {
actionPath: PropTypes.string.isRequired,
context: PropTypes.object.isRequired,
classes: PropTypes.object.isRequired,
t: PropTypes.func.isRequired
classes: PropTypes.object.isRequired
};

export default compose(
translate(),
withStyles(styles)
)(LeftDrawerListItems);
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import PropTypes from 'prop-types';
import React from 'react';
import {Badge, Button, Typography, withStyles} from '@material-ui/core';
import {compose} from 'recompose';
import {translate} from 'react-i18next';
import {toIconComponent} from '@jahia/react-material';

const styles = theme => ({
Expand Down Expand Up @@ -46,7 +45,7 @@ const styles = theme => ({
}
});

export const LeftMenuItem = ({classes, t, drawer, context}) => {
export const LeftMenuItem = ({classes, drawer, context}) => {
const {onClick, buttonLabel, buttonIcon, badge} = context;

let icon = toIconComponent(buttonIcon, drawer ? {classes: {root: classes.colorOpen}} : {classes: {root: classes.colorClosed}});
Expand All @@ -57,7 +56,7 @@ export const LeftMenuItem = ({classes, t, drawer, context}) => {
<Typography className={drawer ? classes.typographyIcon : classes.typographyIconLight}
data-sel-role="left-menu-item-text"
>
{t(buttonLabel)}
{buttonLabel}
</Typography>
</React.Fragment>
);
Expand All @@ -81,11 +80,9 @@ LeftMenuItem.propTypes = {
context: PropTypes.object.isRequired,
// eslint-disable-next-line react/boolean-prop-naming
drawer: PropTypes.bool.isRequired,
classes: PropTypes.object.isRequired,
t: PropTypes.func.isRequired
classes: PropTypes.object.isRequired
};

export default compose(
translate(),
withStyles(styles, {withTheme: true})
)(LeftMenuItem);
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const styles = theme => ({
}
});

export const LeftNavigation = ({context, classes, actionsTarget, secondaryActionsTarget, drawer}) => {
export const LeftNavigation = ({context, classes, actionsTarget, secondaryActionsTarget, drawer, burgerIconTitle}) => {
let actionContext = {
...context,
drawer
Expand All @@ -71,7 +71,7 @@ export const LeftNavigation = ({context, classes, actionsTarget, secondaryAction
>
<List className={classes.list} component="nav">
<ListItem button className={classes.menuBurger}>
<BurgerMenuButton isDrawerOpen={drawer.drawerOpen}/>
<BurgerMenuButton title={burgerIconTitle} isDrawerOpen={drawer.drawerOpen}/>
</ListItem>
<DisplayActions target={actionsTarget}
context={actionContext}
Expand Down Expand Up @@ -110,6 +110,7 @@ LeftNavigation.propTypes = {
secondaryActionsTarget: PropTypes.string.isRequired,
context: PropTypes.object.isRequired,
drawer: PropTypes.object.isRequired,
burgerIconTitle: PropTypes.string.isRequired,
classes: PropTypes.object.isRequired
};

Expand Down
10 changes: 0 additions & 10 deletions packages/i18next/.autorc

This file was deleted.

9 changes: 0 additions & 9 deletions packages/i18next/CHANGELOG.md

This file was deleted.

80 changes: 0 additions & 80 deletions packages/i18next/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions packages/i18next/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/i18next/src/getI18n.d.ts

This file was deleted.

Loading