@kosdev-code/kos-nx-plugin 2.0.8 → 2.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosdev-code/kos-nx-plugin",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "publishConfig": {
@@ -19,7 +19,7 @@
19
19
  "main": "./src/index.js",
20
20
  "kos": {
21
21
  "build": {
22
- "gitHash": "8584fd420609fe114b6a0417595eb9b83bb1301a"
22
+ "gitHash": "3f829f56d0cb6147af6735c40f3f1f52734cf673"
23
23
  }
24
24
  }
25
25
  }
@@ -1,31 +1,59 @@
1
- import styled from "@emotion/styled";
2
- import { kosComponent, KosLog } from '@kosdev-code/kos-ui-sdk';
1
+ import styled from '@emotion/styled';
2
+ import {
3
+ kosComponent,
4
+ KosLog,
5
+ Trans,
6
+ useKosTranslation,
7
+ } from '@kosdev-code/kos-ui-sdk';
3
8
 
4
- const log = KosLog.createLogger({name: "main-view"})
9
+ const log = KosLog.createLogger({ name: 'main-view' });
5
10
  log.debug('main-view component loaded');
6
11
 
12
+ export const MainView: React.FunctionComponent = kosComponent(() => {
13
+ const { t } = useKosTranslation('<%= nameDashCase %>');
14
+ return (
15
+ <Main>
16
+ <div className="logo">
17
+ <img src="./assets/kos-logo.svg"></img>
18
+ </div>
19
+ <h1>{t('welcome', { default: 'You are now connected.' })}</h1>
20
+ <h2>
21
+ <Trans
22
+ t={t}
23
+ i18nKey="visit"
24
+ defaults={'For more information, visit <link>www.kosdev.com</link>.'}
25
+ components={{ link: <a href="http://www.kosdev.com" /> }}
26
+ />
27
+ </h2>
28
+
29
+ <div className="footer"></div>
30
+ </Main>
31
+ );
32
+ });
33
+
7
34
  const Main = styled.div`
8
35
  display: flex;
9
36
  flex-direction: column;
10
37
  align-items: center;
38
+ justify-content: center;
39
+ width: 100%;
40
+ height: 100%;
11
41
  padding: 50px;
42
+ position: relative;
43
+ color: white;
12
44
  .logo {
45
+ display: flex;
46
+ justify-content: center;
47
+ align-items: center;
13
48
  width: 300px;
14
49
  }
15
- `;
16
-
17
- export const MainView: React.FunctionComponent = kosComponent(
18
- () => {
19
- return (
20
- <Main>
21
- <div className="logo">
22
- <img src="./assets/kos-logo.svg"></img>
23
- </div>
24
- <h1>Welcome to KOS</h1>
25
- <h2>Main View</h2>
26
-
27
- </Main>
28
- );
50
+ .footer {
51
+ position: fixed;
52
+ bottom: 0;
53
+ left: 0;
54
+ width: 100%;
55
+ height: 50vh;
56
+ background-image: url('./assets/graphics.png');
57
+ background-size: cover;
29
58
  }
30
- );
31
-
59
+ `;
@@ -1,13 +1,17 @@
1
- import { Application, DDKModels } from '@kosdev-code/kos-ddk-models';
1
+ <% if (ddk) { %>import { Application, DDKModels } from '@kosdev-code/kos-ddk-models';<% } %>
2
2
  import { KosModelRegistry } from '@kosdev-code/kos-dispense-sdk';
3
3
 
4
- import { initKosProvider, registerLegacyModel } from '@kosdev-code/kos-ui-sdk';
4
+ import { initKosProvider<% if (ddk) { %>, registerLegacyModel<% } %> } from '@kosdev-code/kos-ui-sdk';
5
5
 
6
+ <% if (ddk) { %>
6
7
  KosModelRegistry.dispense.models().model(Application);
7
8
  Object.keys(DDKModels).forEach((key) => {
8
9
  const model = DDKModels[key];
9
10
  registerLegacyModel(KosModelRegistry)(key, model);
10
11
  });
12
+ <% } else { %>
13
+ KosModelRegistry.dispense.models();
14
+ <% } %>
11
15
  const { KosCoreContextProvider } = initKosProvider();
12
16
 
13
17
  export { KosCoreContextProvider };
@@ -1,4 +1,4 @@
1
1
  {
2
- "welcome": "Welcome to KOS",
3
- "mainView": "Main View"
2
+ "welcome": "You are now connected.",
3
+ "visit": "For more information, visit <link>www.kosdev.com</link>."
4
4
  }
@@ -1,26 +1,35 @@
1
- import styled from "@emotion/styled";
2
- import { kosComponent, KosLog, useKosTranslation } from '@kosdev-code/kos-ui-sdk';
1
+ import styled from '@emotion/styled';
2
+ import {
3
+ kosComponent,
4
+ KosLog,
5
+ Trans,
6
+ useKosTranslation,
7
+ } from '@kosdev-code/kos-ui-sdk';
3
8
 
4
- const log = KosLog.createLogger({name: "main-view"})
9
+ const log = KosLog.createLogger({ name: 'main-view' });
5
10
  log.debug('main-view component loaded');
6
11
 
12
+ export const MainView: React.FunctionComponent = kosComponent(() => {
13
+ const { t } = useKosTranslation('<%= nameDashCase %>');
14
+ return (
15
+ <Main>
16
+ <div className="logo">
17
+ <img src="./assets/kos-logo.svg"></img>
18
+ </div>
19
+ <h1>{t('welcome', { default: 'You are now connected.' })}</h1>
20
+ <h2>
21
+ <Trans
22
+ t={t}
23
+ i18nKey="visit"
24
+ defaults={'For more information, visit <link>www.kosdev.com</link>.'}
25
+ components={{ link: <a href="http://www.kosdev.com" /> }}
26
+ />
27
+ </h2>
7
28
 
8
-
9
- export const MainView: React.FunctionComponent = kosComponent(
10
- () => {
11
- const { t } = useKosTranslation('lang-demo');
12
- return (
13
- <Main>
14
- <div className="logo">
15
- <img src="./assets/kos-logo.svg"></img>
16
- </div>
17
- <h1>{t('welcome', 'Welcome to KOS!')}</h1>
18
- <h2>{t('mainView', 'Main View')}</h2>
19
-
20
- </Main>
21
- );
22
- }
23
- );
29
+ <div className="footer"></div>
30
+ </Main>
31
+ );
32
+ });
24
33
 
25
34
  const Main = styled.div`
26
35
  display: flex;
@@ -30,6 +39,7 @@ const Main = styled.div`
30
39
  width: 100%;
31
40
  height: 100%;
32
41
  padding: 50px;
42
+ position: relative;
33
43
  color: white;
34
44
  .logo {
35
45
  display: flex;
@@ -37,5 +47,13 @@ const Main = styled.div`
37
47
  align-items: center;
38
48
  width: 300px;
39
49
  }
40
- `;
41
-
50
+ .footer {
51
+ position: fixed;
52
+ bottom: 0;
53
+ left: 0;
54
+ width: 100%;
55
+ height: 50vh;
56
+ background-image: url('./assets/graphics.png');
57
+ background-size: cover;
58
+ }
59
+ `;
@@ -1,4 +1,4 @@
1
1
  {
2
- "welcome": "Welcome to KOS",
3
- "mainView": "Main View"
2
+ "welcome": "You are now connected.",
3
+ "visit": "For more information, visit <link>www.kosdev.com</link>."
4
4
  }