Skip to content

Commit

Permalink
Updated dependencies to support react16
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikHuber committed Sep 27, 2017
1 parent 9021060 commit a4bdc75
Show file tree
Hide file tree
Showing 25 changed files with 222 additions and 124 deletions.
6 changes: 3 additions & 3 deletions demo/src/components/Drawer/DrawerContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const DrawerContent = (props, context) => {
value:undefined,
visible: true,
primaryText: intl.formatMessage({id: t.id}),
onTouchTap: ()=>{updateTheme(t.id)},
onClick: ()=>{updateTheme(t.id)},
rightIcon: <FontIcon
className="material-icons"
color={t.id===theme?muiTheme.palette.primary1Color:undefined}>
Expand All @@ -64,7 +64,7 @@ const DrawerContent = (props, context) => {
value: undefined,
visible: true,
primaryText: intl.formatMessage({id: l.locale}) ,
onTouchTap: ()=>{updateLocale(l.locale)},
onClick: ()=>{updateLocale(l.locale)},
rightIcon: <FontIcon
className="material-icons"
color={l.locale===locale?muiTheme.palette.primary1Color:undefined}>
Expand Down Expand Up @@ -160,7 +160,7 @@ const DrawerContent = (props, context) => {
},
{
value:'/signin',
onTouchTap: handleSignOut,
onClick: handleSignOut,
primaryText: intl.formatMessage({id: 'sign_out'}),
leftIcon: <FontIcon className="material-icons" >lock</FontIcon>
},
Expand Down
4 changes: 2 additions & 2 deletions demo/src/components/Drawer/DrawerHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const DrawerHeader = ({muiTheme, intl, auth, setAuthMenuOpen, fetchUser, dialogs
primaryText={auth.displayName}
secondaryText={auth.email}
rightIconButton={
<IconButton onTouchTap={()=>{setDialogIsOpen('auth_menu', dialogs.auth_menu?false:true)}}>
<IconButton onClick={()=>{setDialogIsOpen('auth_menu', dialogs.auth_menu?false:true)}}>
<FontIcon className="material-icons" >{dialogs.auth_menu?'arrow_drop_up': 'arrow_drop_down'}</FontIcon>
</IconButton>
}
Expand All @@ -57,7 +57,7 @@ const DrawerHeader = ({muiTheme, intl, auth, setAuthMenuOpen, fetchUser, dialogs
disableTouchRipple={true}

style={{ backgroundColor: 'transparent' }}
onTouchTap={()=>{setDialogIsOpen('auth_menu', dialogs.auth_menu?false:true)}}
onClick={()=>{setDialogIsOpen('auth_menu', dialogs.auth_menu?false:true)}}
/>
</List>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export class ChangePasswordDialog extends Component {
<FlatButton
label={intl.formatMessage({id: 'change_password'})}
primary={true}
onTouchTap={this.handlePasswordChangeSubmit}
onClick={this.handlePasswordChangeSubmit}
/>,
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
];

Expand Down
6 changes: 3 additions & 3 deletions demo/src/components/containers/Companies/Companie.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ class Companie extends Component {
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
<FlatButton
label={intl.formatMessage({id: 'delete'})}
secondary={true}
onTouchTap={this.handleDelete}
onClick={this.handleDelete}
/>,
];

Expand All @@ -77,7 +77,7 @@ class Companie extends Component {
iconElementRight={
match.params.uid?<FlatButton
style={{marginTop: 4}}
onTouchTap={()=>{setDialogIsOpen('delete_companie', true);}}
onClick={()=>{setDialogIsOpen('delete_companie', true);}}
icon={<FontIcon className="material-icons" >delete</FontIcon>}
/>:undefined
}
Expand Down
4 changes: 2 additions & 2 deletions demo/src/components/containers/Companies/Companies.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Vehicles extends Component {
key={key}
primaryText={row.name}
secondaryText={row.full_name}
onTouchTap={()=>{history.push(`/companies/edit/${key}`)}}
onClick={()=>{history.push(`/companies/edit/${key}`)}}
id={key}
/>
<Divider inset={true}/>
Expand All @@ -72,7 +72,7 @@ class Vehicles extends Component {
</div>

<div style={{position: 'fixed', right: 18, zIndex:3, bottom: 18, }}>
<FloatingActionButton secondary={true} onTouchTap={()=>{history.push(`/companies/create`)}} style={{zIndex:3}}>
<FloatingActionButton secondary={true} onClick={()=>{history.push(`/companies/create`)}} style={{zIndex:3}}>
<FontIcon className="material-icons" >add</FontIcon>
</FloatingActionButton>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/containers/Companies/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Form extends Component {


<FlatButton
onTouchTap={()=>{
onClick={()=>{
setDialogIsOpen('new_companie_photo', true)
}}
disabled={uid===undefined || !initialized}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ export const DeleteAccountDialog = (props) => {
<FlatButton
label={intl.formatMessage({id: 'delete'})}
secondary={true}
onTouchTap={hanldeSubmit}
onClick={hanldeSubmit}
/>,
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={handleClose}
onClick={handleClose}
/>,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ export class ImageCropDialog extends Component {
disabled={!this.state.src || this.state.isLoading || this.state.isUploading}
label={intl.formatMessage({id: 'submit'})}
primary={true}
onTouchTap={()=>{this.handlePhotoURLUpload(this.cropper.crop())}}
onClick={()=>{this.handlePhotoURLUpload(this.cropper.crop())}}
/>,
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
secondary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
];

Expand Down
18 changes: 9 additions & 9 deletions demo/src/components/containers/MyAccount/MyAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,31 +135,31 @@ export class MyAccount extends Component {
return <IconButton
key={provider}
disabled={isLinkedWithProvider(auth, provider)}
onTouchTap={()=>{linkUserWithPopup(provider)}}
onClick={()=>{linkUserWithPopup(provider)}}
tooltip={intl.formatMessage({id: `link_with_google`})}>
<GoogleIcon color={color}/>
</IconButton>
case 'facebook.com':
return <IconButton
key={provider}
disabled={isLinkedWithProvider(auth, provider)}
onTouchTap={()=>{linkUserWithPopup(provider)}}
onClick={()=>{linkUserWithPopup(provider)}}
tooltip={intl.formatMessage({id: `link_with_facebook`})}>
<FacebookIcon color={color}/>
</IconButton>
case 'twitter.com':
return <IconButton
key={provider}
disabled={isLinkedWithProvider(auth, provider)}
onTouchTap={()=>{linkUserWithPopup(provider)}}
onClick={()=>{linkUserWithPopup(provider)}}
tooltip={intl.formatMessage({id: `link_with_twitter`})}>
<TwitterIcon color={color}/>
</IconButton>
case 'github.com':
return <IconButton
key={provider}
disabled={isLinkedWithProvider(auth, provider)}
onTouchTap={()=>{linkUserWithPopup(provider)}}
onClick={()=>{linkUserWithPopup(provider)}}
tooltip={intl.formatMessage({id: `link_with_github`})}>
<GitHubIcon color={color}/>
</IconButton>
Expand Down Expand Up @@ -206,7 +206,7 @@ export class MyAccount extends Component {

{ auth.isEditing &&
<FlatButton
onTouchTap={()=>{
onClick={()=>{
setDialogIsOpen('new_user_photo_url', true)
}}
containerElement='label'
Expand Down Expand Up @@ -263,7 +263,7 @@ export class MyAccount extends Component {
{auth.email}
{ auth.email &&
<IconButton
onTouchTap={auth.emailVerified===true?undefined:()=>{sendEmailVerification()}}
onClick={auth.emailVerified===true?undefined:()=>{sendEmailVerification()}}
tooltip={intl.formatMessage({id: auth.emailVerified===true?'email_verified':'email_not_verified'})}>
<FontIcon
color={auth.emailVerified===true?muiTheme.palette.primary1Color:muiTheme.palette.accent1Color}
Expand All @@ -290,7 +290,7 @@ export class MyAccount extends Component {
disabled={auth.isFetching}
style={styles.button}
fullWidth={true}
onTouchTap={()=>{setIsEditing(!auth.isEditing)}}
onClick={()=>{setIsEditing(!auth.isEditing)}}
icon={
<FontIcon
className="material-icons">
Expand All @@ -305,7 +305,7 @@ export class MyAccount extends Component {
primary={true}
fullWidth={true}
style={styles.button}
onTouchTap={this.handlePasswordChange}
onClick={this.handlePasswordChange}
icon={
<FontIcon
className="material-icons">
Expand All @@ -318,7 +318,7 @@ export class MyAccount extends Component {
disabled={auth.isFetching}
secondary={true}
fullWidth={true}
onTouchTap={this.handleDeleteAccount}
onClick={this.handleDeleteAccount}
icon={
<FontIcon
className="material-icons">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ export class PasswordDialog extends Component {
<FlatButton
label={intl.formatMessage({id: 'submit'})}
primary={true}
onTouchTap={this.hanldePasswordSubmit}
onClick={this.hanldePasswordSubmit}
/>,
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ResetPassword extends Component {
label={intl.formatMessage({id: 'reset_password'})}
secondary={true}
fullWidth={true}
onTouchTap={this.hanleSignInSubmit}
onClick={this.hanleSignInSubmit}
icon={
<FontIcon
className="material-icons">
Expand Down
6 changes: 3 additions & 3 deletions demo/src/components/containers/Tasks/Task.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ class Task extends Component {
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
<FlatButton
label={intl.formatMessage({id: 'delete'})}
secondary={true}
onTouchTap={this.handleDelete}
onClick={this.handleDelete}
/>,
];

Expand All @@ -78,7 +78,7 @@ class Task extends Component {
iconElementRight={
match.params.uid?<FlatButton
style={{marginTop: 4}}
onTouchTap={()=>{setDialogIsOpen('delete_vehicle', true);}}
onClick={()=>{setDialogIsOpen('delete_vehicle', true);}}
icon={<FontIcon className="material-icons" >delete</FontIcon>}
/>:undefined
}
Expand Down
14 changes: 7 additions & 7 deletions demo/src/components/containers/Tasks/Tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ class Tasks extends Component {

return task.completed?
<Avatar
onTouchTap={auth.uid===task.userId?()=>{this.handleUpdateTask(key,{...task, completed: !task.completed})}:undefined}
onClick={auth.uid===task.userId?()=>{this.handleUpdateTask(key,{...task, completed: !task.completed})}:undefined}
alt="person"
icon={<FontIcon className="material-icons" >done</FontIcon>}
backgroundColor={green800}
/>
:
<Avatar
src={task.userPhotoURL}
onTouchTap={auth.uid===task.userId?()=>{this.handleUpdateTask(key,{...task, completed: !task.completed})}:undefined}
onClick={auth.uid===task.userId?()=>{this.handleUpdateTask(key,{...task, completed: !task.completed})}:undefined}
alt="person"
icon={
<FontIcon className="material-icons">
Expand All @@ -121,15 +121,15 @@ class Tasks extends Component {

<ListItem
key={key}
onTouchTap={task.userId===auth.uid?()=>{history.push(`/tasks/edit/${key}`)}:undefined}
onClick={task.userId===auth.uid?()=>{history.push(`/tasks/edit/${key}`)}:undefined}
primaryText={task.title}
secondaryText={`${task.userName} ${task.created?intl.formatRelative(new Date(task.created)):undefined}`}
leftAvatar={this.userAvatar(key, task)}
rightIconButton={
task.userId===auth.uid?
<IconButton
style={{display:browser.lessThan.medium?'none':undefined}}
onTouchTap={()=>{setDialogIsOpen('delete_task_from_list', key);}}>
onClick={()=>{setDialogIsOpen('delete_task_from_list', key);}}>
<FontIcon className="material-icons" color={'red'}>{'delete'}</FontIcon>
</IconButton>:undefined
}
Expand Down Expand Up @@ -161,12 +161,12 @@ class Tasks extends Component {
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
<FlatButton
label={intl.formatMessage({id: 'delete'})}
secondary={true}
onTouchTap={this.handleDelete}
onClick={this.handleDelete}
/>,
];

Expand Down Expand Up @@ -199,7 +199,7 @@ class Tasks extends Component {
type="Text"
/>
<IconButton
onTouchTap={this.handleAddTask}>
onClick={this.handleAddTask}>
<FontIcon className="material-icons" color={muiTheme.palette.primary1Color}>send</FontIcon>
</IconButton>
</div>
Expand Down
6 changes: 3 additions & 3 deletions demo/src/containers/Companies/Companie.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ class Companie extends Component {
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
primary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
<FlatButton
label={intl.formatMessage({id: 'delete'})}
secondary={true}
onTouchTap={this.handleDelete}
onClick={this.handleDelete}
/>,
];

Expand All @@ -76,7 +76,7 @@ class Companie extends Component {
iconElementRight={
match.params.uid?<FlatButton
style={{marginTop: 4}}
onTouchTap={()=>{setDialogIsOpen('delete_companie', true);}}
onClick={()=>{setDialogIsOpen('delete_companie', true);}}
icon={<FontIcon className="material-icons" >delete</FontIcon>}
/>:undefined
}
Expand Down
4 changes: 2 additions & 2 deletions demo/src/containers/Companies/Companies.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Vehicles extends Component {
key={index}
primaryText={companie.val.name}
secondaryText={companie.val.full_name}
onTouchTap={()=>{history.push(`/companies/edit/${companie.key}`)}}
onClick={()=>{history.push(`/companies/edit/${companie.key}`)}}
id={index}
/>
<Divider inset={true}/>
Expand All @@ -75,7 +75,7 @@ class Vehicles extends Component {
</div>

<div style={{position: 'fixed', right: 18, zIndex:3, bottom: 18, }}>
<FloatingActionButton secondary={true} onTouchTap={()=>{history.push(`/companies/create`)}} style={{zIndex:3}}>
<FloatingActionButton secondary={true} onClick={()=>{history.push(`/companies/create`)}} style={{zIndex:3}}>
<FontIcon className="material-icons" >add</FontIcon>
</FloatingActionButton>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/src/containers/Companies/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Form extends Component {


<FlatButton
onTouchTap={()=>{
onClick={()=>{
setDialogIsOpen('new_companie_photo', true)
}}
disabled={uid===undefined || !initialized}
Expand Down
4 changes: 2 additions & 2 deletions demo/src/containers/ImageCropDialog/ImageCropDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ export class ImageCropDialog extends Component {
disabled={!this.state.src || this.state.isLoading || this.state.isUploading}
label={intl.formatMessage({id: 'submit'})}
primary={true}
onTouchTap={()=>{this.handlePhotoURLUpload(this.cropper.crop())}}
onClick={()=>{this.handlePhotoURLUpload(this.cropper.crop())}}
/>,
<FlatButton
label={intl.formatMessage({id: 'cancel'})}
secondary={true}
onTouchTap={this.handleClose}
onClick={this.handleClose}
/>,
];

Expand Down
Loading

0 comments on commit a4bdc75

Please sign in to comment.