Skip to content

Commit

Permalink
feat: Require @dhis2/ui v5 (#439)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: require @dhis2/ui v5 - components should now be imported from @dhis2/ui and various components have had breaking changes in v5
  • Loading branch information
amcgee committed Aug 14, 2020
1 parent 267f361 commit e600807
Show file tree
Hide file tree
Showing 13 changed files with 312 additions and 93 deletions.
23 changes: 11 additions & 12 deletions adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/app-adapter",
"version": "4.0.9",
"version": "5.0.0-alpha.2",
"repository": {
"type": "git",
"url": "https://github.com/amcgee/dhis2-app-platform",
Expand All @@ -17,24 +17,23 @@
"build"
],
"dependencies": {
"@dhis2/ui-widgets": "^2.1.1",
"moment": "^2.24.0"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "4.0.9"
"@dhis2/cli-app-scripts": "5.0.0-alpha.2"
},
"scripts": {
"build": "d2-app-scripts build"
},
"peerDependencies": {
"@dhis2/app-runtime": "^2.0.4",
"@dhis2/d2-i18n": "^1.0.5",
"@dhis2/ui-core": "^4.6.1",
"classnames": "^2.2.6",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"styled-jsx": "^3.2.1"
"@dhis2/app-runtime": "^2",
"@dhis2/d2-i18n": "^1",
"@dhis2/ui": "^5",
"classnames": "^2",
"moment": "^2",
"prop-types": "^15",
"react": "^16.8",
"react-dom": "^16.8",
"styled-jsx": "^3"
}
}
2 changes: 1 addition & 1 deletion adapter/src/AuthBoundary/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ModalActions,
Button,
InputField,
} from '@dhis2/ui-core'
} from '@dhis2/ui'

const staticUrl = process.env.REACT_APP_DHIS2_BASE_URL

Expand Down
10 changes: 6 additions & 4 deletions adapter/src/AuthBoundary/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { useDataQuery } from '@dhis2/app-runtime'

import { ScreenCover, CircularLoader } from '@dhis2/ui-core'
import { Layer, layers, CenteredContent, CircularLoader } from '@dhis2/ui'
import { LoginModal } from './LoginModal'
import { useLocale } from './useLocale'

Expand All @@ -17,9 +17,11 @@ export const AuthBoundary = ({ url, children }) => {

if (loading) {
return (
<ScreenCover>
<CircularLoader />
</ScreenCover>
<Layer translucent level={layers.alert}>
<CenteredContent>
<CircularLoader />
</CenteredContent>
</Layer>
)
}

Expand Down
2 changes: 1 addition & 1 deletion adapter/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { HeaderBar } from '@dhis2/ui-widgets'
import { HeaderBar } from '@dhis2/ui'
import { Provider } from '@dhis2/app-runtime'
import { FatalErrorBoundary } from './FatalErrorBoundary'
import { AuthBoundary } from './AuthBoundary'
Expand Down
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/cli-app-scripts",
"version": "4.0.9",
"version": "5.0.0-alpha.2",
"engines": {
"node": ">=10"
},
Expand Down Expand Up @@ -32,7 +32,7 @@
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@dhis2/app-shell": "4.0.9",
"@dhis2/app-shell": "5.0.0-alpha.2",
"@dhis2/cli-helpers-engine": "^1.5.0",
"archiver": "^3.1.1",
"babel-jest": "^24.9.0",
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The baseline features built-in to any platform application include:
- Transpilation & Bundling
- App-shell encapsulation
- Publication & Release
- Application runtime support ([`@dhis2/app-runtime`](https://runtime.dhis2.nu))
- UI Primitives ([@dhis2/ui-core](https://ui-core.dhis2.nu))
- Application runtime support ([`@dhis2/app-runtime`](https://runtime.dhis2.nu))
- UI Components ([@dhis2/ui](https://ui.dhis2.nu))
- API Data fetching
- Translations
- Configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/usage/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
The following NPM packages are automatically provided by the platform. You can reference these libraries from your source code without specifying them as explicit dependencies, though it is recommended that you also include them as dependencies in your application's `package.json`.

- `@dhis2/app-runtime`
- `@dhis2/ui-core`
- `@dhis2/ui-widgets`
- `@dhis2/ui`
- `@dhis2/d2-i18n`
- `react` and `react-dom`
- `classnames`
Expand Down
Loading

0 comments on commit e600807

Please sign in to comment.