create-digigov-app 0.6.4 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -1,6 +1,50 @@
1
1
  {
2
2
  "name": "create-digigov-app",
3
3
  "entries": [
4
+ {
5
+ "version": "0.7.2",
6
+ "tag": "create-digigov-app_v0.7.2",
7
+ "date": "Wed, 30 Mar 2022 12:28:30 GMT",
8
+ "comments": {
9
+ "dependency": [
10
+ {
11
+ "comment": "Updating dependency \"@digigov/cli-lint\" from `0.5.28` to `0.5.29`"
12
+ },
13
+ {
14
+ "comment": "Updating dependency \"@digigov/cli-test\" from `0.6.0` to `0.6.1`"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "version": "0.7.1",
21
+ "tag": "create-digigov-app_v0.7.1",
22
+ "date": "Thu, 24 Feb 2022 14:51:06 GMT",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "comment": "Add tests for typescript template"
27
+ }
28
+ ],
29
+ "dependency": [
30
+ {
31
+ "comment": "Updating dependency \"@digigov/cli-test\" from `0.5.26` to `0.6.0`"
32
+ }
33
+ ]
34
+ }
35
+ },
36
+ {
37
+ "version": "0.7.0",
38
+ "tag": "create-digigov-app_v0.7.0",
39
+ "date": "Mon, 14 Feb 2022 11:53:09 GMT",
40
+ "comments": {
41
+ "minor": [
42
+ {
43
+ "comment": "Eeplace @digigov/react-core with @digigov/ui"
44
+ }
45
+ ]
46
+ }
47
+ },
4
48
  {
5
49
  "version": "0.6.4",
6
50
  "tag": "create-digigov-app_v0.6.4",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,25 @@
1
1
  # Change Log - create-digigov-app
2
2
 
3
- This log was last generated on Mon, 14 Feb 2022 09:56:29 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 30 Mar 2022 12:28:30 GMT and should not be manually modified.
4
+
5
+ ## 0.7.2
6
+ Wed, 30 Mar 2022 12:28:30 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 0.7.1
11
+ Thu, 24 Feb 2022 14:51:06 GMT
12
+
13
+ ### Patches
14
+
15
+ - Add tests for typescript template
16
+
17
+ ## 0.7.0
18
+ Mon, 14 Feb 2022 11:53:09 GMT
19
+
20
+ ### Minor changes
21
+
22
+ - Eeplace @digigov/react-core with @digigov/ui
4
23
 
5
24
  ## 0.6.4
6
25
  Mon, 14 Feb 2022 09:56:29 GMT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-digigov-app",
3
- "version": "0.6.4",
3
+ "version": "0.7.2",
4
4
  "description": "Create a DigiGOV App with ease",
5
5
  "bin": "cli.js",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@digigov/cli": "0.5.27",
29
- "@digigov/cli-lint": "0.5.28",
30
- "@digigov/cli-test": "0.5.26",
29
+ "@digigov/cli-lint": "0.5.29",
30
+ "@digigov/cli-test": "0.6.1",
31
31
  "typescript": "4.2.3"
32
32
  },
33
33
  "license": "MIT",
@@ -1,36 +1,44 @@
1
1
  import React from 'react';
2
2
  import Head from 'next/head';
3
3
  import { useTranslation } from '@digigov/ui/app/i18n';
4
- import {
5
- Layout,
6
- Top,
7
- Container,
8
- Bottom,
9
- Header,
10
- GovGRFooter,
11
- GovGRLogo,
12
- } from '@digigov/react-core';
4
+ import { useRouter } from 'next/router';
5
+ import BasicLayout, { Top, Content, Bottom } from '@digigov/ui/layouts/Basic';
6
+ import Header, {
7
+ HeaderTitle,
8
+ HeaderContent,
9
+ HeaderSection,
10
+ } from '@digigov/ui/app/Header';
11
+ import GovGRLogo from '@digigov/ui/govgr/Logo';
12
+ import GovGRFooter from '@digigov/ui/govgr/Footer';
13
13
 
14
14
  const CommonLayout = ({ children }) => {
15
+ const router = useRouter();
16
+ const notHome = router.asPath !== '/';
15
17
  const { t } = useTranslation();
16
18
  return (
17
- <Layout>
19
+ <BasicLayout>
18
20
  <Head>
19
21
  <title>{t('app.name')}</title>
20
22
  </Head>
21
23
  <Top>
22
24
  <Header>
23
- <GovGRLogo />
24
- {/* <HeaderTitle>
25
- {t('app.name')}
26
- </HeaderTitle> */}
25
+ <HeaderSection>
26
+ <HeaderContent>
27
+ <GovGRLogo />
28
+ {notHome && (
29
+ <>
30
+ <HeaderTitle>{t('app.name')}</HeaderTitle>
31
+ </>
32
+ )}
33
+ </HeaderContent>
34
+ </HeaderSection>
27
35
  </Header>
28
36
  </Top>
29
- <Container>{children}</Container>
37
+ <Content>{children}</Content>
30
38
  <Bottom>
31
39
  <GovGRFooter />
32
40
  </Bottom>
33
- </Layout>
41
+ </BasicLayout>
34
42
  );
35
43
  };
36
44
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import NotFound from '@digigov/ui/app/NotFound';
3
- import { Main, ASide } from '@digigov/react-core'
3
+ import { Main, Side } from '@digigov/ui/layouts/Basic';
4
4
  import CommonLayout from '<%= name %>/components/CommonLayout';
5
5
 
6
6
  const NotFoundPage = () => {
@@ -9,7 +9,7 @@ const NotFoundPage = () => {
9
9
  <Main>
10
10
  <NotFound />
11
11
  </Main>
12
- <ASide></ASide>
12
+ <Side></Side>
13
13
  </CommonLayout>
14
14
  );
15
15
  };
@@ -1,13 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from '@digigov/ui/app/i18n';
3
- import {
4
- Main,
5
- Aside,
6
- PageTitle,
7
- PageTitleHeading,
8
- CallToAction,
9
- Paragraph,
10
- } from '@digigov/react-core';
3
+ import { Main, Side } from '@digigov/ui/layouts/Basic';
4
+ import PageTitle, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
5
+ import CallToAction from '@digigov/ui/core/Button/CallToAction';
6
+ import Paragraph from '@digigov/ui/typography/Paragraph';
7
+
11
8
  import CommonLayout from '<%= name %>/components/CommonLayout';
12
9
 
13
10
  const Home = () => {
@@ -21,7 +18,7 @@ const Home = () => {
21
18
  <Paragraph>{t('app.intro_text')}</Paragraph>
22
19
  <CallToAction href="/login">{t('button.start')}</CallToAction>
23
20
  </Main>
24
- <Aside></Aside>
21
+ <Side></Side>
25
22
  </CommonLayout>
26
23
  );
27
24
  };
@@ -1,36 +1,44 @@
1
1
  import React from 'react';
2
2
  import Head from 'next/head';
3
3
  import { useTranslation } from '@digigov/ui/app/i18n';
4
- import {
5
- Layout,
6
- Top,
7
- Container,
8
- Bottom,
9
- Header,
10
- GovGRFooter,
11
- GovGRLogo,
12
- } from '@digigov/react-core';
4
+ import { useRouter } from 'next/router';
5
+ import BasicLayout, { Top, Content, Bottom } from '@digigov/ui/layouts/Basic';
6
+ import Header, {
7
+ HeaderTitle,
8
+ HeaderContent,
9
+ HeaderSection,
10
+ } from '@digigov/ui/app/Header';
11
+ import GovGRLogo from '@digigov/ui/govgr/Logo';
12
+ import GovGRFooter from '@digigov/ui/govgr/Footer';
13
13
 
14
14
  const CommonLayout: React.FC = ({ children }) => {
15
+ const router = useRouter();
16
+ const notHome = router.asPath !== '/';
15
17
  const { t } = useTranslation();
16
18
  return (
17
- <Layout>
19
+ <BasicLayout>
18
20
  <Head>
19
21
  <title>{t('app.name')}</title>
20
22
  </Head>
21
23
  <Top>
22
24
  <Header>
23
- <GovGRLogo />
24
- {/* <HeaderTitle>
25
- {t('app.name')}
26
- </HeaderTitle> */}
25
+ <HeaderSection>
26
+ <HeaderContent>
27
+ <GovGRLogo />
28
+ {notHome && (
29
+ <>
30
+ <HeaderTitle>{t('app.name')}</HeaderTitle>
31
+ </>
32
+ )}
33
+ </HeaderContent>
34
+ </HeaderSection>
27
35
  </Header>
28
36
  </Top>
29
- <Container>{children}</Container>
37
+ <Content>{children}</Content>
30
38
  <Bottom>
31
39
  <GovGRFooter />
32
40
  </Bottom>
33
- </Layout>
41
+ </BasicLayout>
34
42
  );
35
43
  };
36
44
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import NotFound from '@digigov/ui/app/NotFound';
3
- import { Main, Aside } from '@digigov/react-core'
3
+ import { Main, Side } from '@digigov/ui/layouts/Basic';
4
4
  import CommonLayout from '<%= name %>/components/CommonLayout';
5
5
 
6
6
  const NotFoundPage: React.FC = () => {
@@ -9,10 +9,9 @@ const NotFoundPage: React.FC = () => {
9
9
  <Main>
10
10
  <NotFound />
11
11
  </Main>
12
- <Aside></Aside>
12
+ <Side></Side>
13
13
  </CommonLayout>
14
14
  );
15
15
  };
16
16
 
17
17
  export default NotFoundPage;
18
-
@@ -1,13 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from '@digigov/ui/app/i18n';
3
- import {
4
- Main,
5
- Aside,
6
- PageTitle,
7
- PageTitleHeading,
8
- CallToAction,
9
- Paragraph,
10
- } from '@digigov/react-core';
3
+ import { Main, Side } from '@digigov/ui/layouts/Basic';
4
+ import PageTitle, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
5
+ import CallToAction from '@digigov/ui/core/Button/CallToAction';
6
+ import Paragraph from '@digigov/ui/typography/Paragraph';
7
+
11
8
  import CommonLayout from '<%= name %>/components/CommonLayout';
12
9
 
13
10
  const Home: React.FC = () => {
@@ -21,7 +18,7 @@ const Home: React.FC = () => {
21
18
  <Paragraph>{t('app.intro_text')}</Paragraph>
22
19
  <CallToAction href="/login">{t('button.start')}</CallToAction>
23
20
  </Main>
24
- <Aside></Aside>
21
+ <Side></Side>
25
22
  </CommonLayout>
26
23
  );
27
24
  };