Skip to content

Commit

Permalink
feat(deps): upgrade @dhis2/ui-core to 4.1.1 and @dhis2/ui-widgets to …
Browse files Browse the repository at this point in the history
…2.0.4 (#198)

This upgrades @dhis2/ui-core to major version 4 (a breaking change) and also upgrades to the latest version of @dhis2/ui-widgets.

BREAKING CHANGE: This will break applications which use the v3 API of `@dhis2/ui-core` components
  • Loading branch information
edoardo authored and amcgee committed Dec 9, 2019
1 parent 6137de7 commit 07c2187
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 1,118 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@dhis2/app-runtime": "^2.0.4",
"@dhis2/cli-helpers-engine": "^1.5.0",
"@dhis2/d2-i18n": "^1.0.5",
"@dhis2/ui-core": "^3.11.0",
"@dhis2/ui-core": "^4.1.1",
"archiver": "^3.1.1",
"babel-jest": "^24.9.0",
"chokidar": "^3.3.0",
Expand Down
5 changes: 2 additions & 3 deletions shell/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"build"
],
"dependencies": {
"@dhis2/ui-core": "^3.12.0",
"@dhis2/ui-widgets": "^2.0.2",
"@dhis2/ui-widgets": "^2.0.4",
"moment": "^2.24.0"
},
"devDependencies": {},
Expand All @@ -19,7 +18,7 @@
"peerDependencies": {
"@dhis2/app-runtime": "^2.0.4",
"@dhis2/d2-i18n": "^1.0.5",
"@dhis2/ui-core": "^3.7.1",
"@dhis2/ui-core": "^4.1.1",
"classnames": "^2.2.6",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
Expand Down
25 changes: 16 additions & 9 deletions shell/adapter/src/AuthBoundary/LoginModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import React, { useState } from 'react'
import i18n from '../locales'
import { Modal, Button, InputField } from '@dhis2/ui-core'
import {
Modal,
ModalTitle,
ModalContent,
ModalActions,
Button,
InputField,
} from '@dhis2/ui-core'

const staticUrl = process.env.REACT_APP_DHIS2_BASE_URL

Expand Down Expand Up @@ -47,16 +54,16 @@ export const LoginModal = ({ url }) => {
return (
<Modal open small>
<form onSubmit={onSubmit}>
<Modal.Title>{i18n.t('Please sign in')}</Modal.Title>
<Modal.Content>
<ModalTitle>{i18n.t('Please sign in')}</ModalTitle>
<ModalContent>
{!staticUrl && (
<InputField
error={isDirty && !isValid(server)}
label={i18n.t('Server')}
name="server"
type="text"
value={server}
onChange={_ref => setServer(_ref.target.value)}
onChange={input => setServer(input.value)}
/>
)}
<InputField
Expand All @@ -65,22 +72,22 @@ export const LoginModal = ({ url }) => {
name="j_username"
type="text"
value={username}
onChange={_ref => setUsername(_ref.target.value)}
onChange={input => setUsername(input.value)}
/>
<InputField
error={isDirty && !isValid(password)}
label={i18n.t('Password')}
name="j_password"
type="password"
value={password}
onChange={_ref => setPassword(_ref.target.value)}
onChange={input => setPassword(input.value)}
/>
</Modal.Content>
<Modal.Actions>
</ModalContent>
<ModalActions>
<Button primary type="submit">
{i18n.t('Sign in')}
</Button>
</Modal.Actions>
</ModalActions>
</form>
</Modal>
)
Expand Down
Loading

0 comments on commit 07c2187

Please sign in to comment.