tycho-components 0.8.15 → 0.8.17
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/dist/Header/types/App.d.ts +1 -2
- package/dist/Header/types/App.js +24 -50
- package/dist/configs/Localization.d.ts +48 -51
- package/dist/configs/localization/HeaderTexts.d.ts +49 -52
- package/dist/configs/localization/HeaderTexts.js +49 -52
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/package.json +2 -2
- package/dist/Header/HeaderApps/HeaderAppsDesktop.d.ts +0 -2
- package/dist/Header/HeaderApps/HeaderAppsDesktop.js +0 -29
- package/dist/Header/HeaderDesktop.d.ts +0 -11
- package/dist/Header/HeaderDesktop.js +0 -21
|
@@ -2,7 +2,7 @@ type App = {
|
|
|
2
2
|
code: string;
|
|
3
3
|
icon?: string;
|
|
4
4
|
image?: string;
|
|
5
|
-
visibility:
|
|
5
|
+
visibility: 'public' | null;
|
|
6
6
|
admin?: boolean;
|
|
7
7
|
lexicon?: boolean;
|
|
8
8
|
parser?: boolean;
|
|
@@ -10,5 +10,4 @@ type App = {
|
|
|
10
10
|
appendCorpusUid?: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare const AvailableApps: App[];
|
|
13
|
-
export declare const AvailableAppsDesktop: App[];
|
|
14
13
|
export default App;
|
package/dist/Header/types/App.js
CHANGED
|
@@ -1,86 +1,60 @@
|
|
|
1
1
|
export const AvailableApps = [
|
|
2
2
|
{
|
|
3
|
-
code:
|
|
4
|
-
icon:
|
|
3
|
+
code: 'reserved',
|
|
4
|
+
icon: 'lock',
|
|
5
5
|
visibility: null,
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
|
-
code:
|
|
9
|
-
icon:
|
|
8
|
+
code: 'catalog',
|
|
9
|
+
icon: 'auto_stories',
|
|
10
10
|
visibility: null,
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
code:
|
|
14
|
-
icon:
|
|
13
|
+
code: 'admin',
|
|
14
|
+
icon: 'folder_managed',
|
|
15
15
|
visibility: null,
|
|
16
16
|
admin: true,
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
code:
|
|
20
|
-
icon:
|
|
19
|
+
code: 'parser',
|
|
20
|
+
icon: 'settings',
|
|
21
21
|
visibility: null,
|
|
22
22
|
parser: true,
|
|
23
23
|
appendCorpusUid: false,
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
code:
|
|
27
|
-
icon:
|
|
26
|
+
code: 'io',
|
|
27
|
+
icon: 'swap_vert',
|
|
28
28
|
visibility: null,
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
code:
|
|
32
|
-
icon:
|
|
31
|
+
code: 'lexicon',
|
|
32
|
+
icon: 'book_3',
|
|
33
33
|
visibility: null,
|
|
34
34
|
lexicon: true,
|
|
35
35
|
appendCorpusUid: false,
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
code:
|
|
39
|
-
icon:
|
|
40
|
-
visibility:
|
|
38
|
+
code: 'search',
|
|
39
|
+
icon: 'match_word',
|
|
40
|
+
visibility: 'public',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
code:
|
|
44
|
-
icon:
|
|
45
|
-
visibility:
|
|
43
|
+
code: 'viewer',
|
|
44
|
+
icon: 'news',
|
|
45
|
+
visibility: 'public',
|
|
46
46
|
appendCorpusUid: false,
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
code:
|
|
50
|
-
icon:
|
|
51
|
-
visibility:
|
|
49
|
+
code: 'synviewer',
|
|
50
|
+
icon: 'graph_4',
|
|
51
|
+
visibility: 'public',
|
|
52
52
|
appendCorpusUid: false,
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
code:
|
|
56
|
-
icon:
|
|
57
|
-
visibility:
|
|
58
|
-
appendCorpusUid: false,
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
export const AvailableAppsDesktop = [
|
|
62
|
-
{
|
|
63
|
-
code: "catalog",
|
|
64
|
-
icon: "auto_stories",
|
|
65
|
-
visibility: "public",
|
|
66
|
-
appendCorpusUid: false,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
code: "syntrees",
|
|
70
|
-
icon: "graph_4",
|
|
71
|
-
visibility: "public",
|
|
72
|
-
appendCorpusUid: false,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
code: "search",
|
|
76
|
-
icon: "match_word",
|
|
77
|
-
visibility: "public",
|
|
78
|
-
appendCorpusUid: false,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
code: "parser",
|
|
82
|
-
icon: "automation",
|
|
83
|
-
visibility: "public",
|
|
55
|
+
code: 'psd-reindexer',
|
|
56
|
+
icon: '123',
|
|
57
|
+
visibility: 'public',
|
|
84
58
|
appendCorpusUid: false,
|
|
85
59
|
},
|
|
86
60
|
];
|
|
@@ -103,23 +103,22 @@ export declare const commonResources: {
|
|
|
103
103
|
'sentence.status.auto': string;
|
|
104
104
|
};
|
|
105
105
|
header: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'profile.label.home': string;
|
|
106
|
+
"label.platform": string;
|
|
107
|
+
"label.signout": string;
|
|
108
|
+
"label.my.settings": string;
|
|
109
|
+
"label.choose": string;
|
|
110
|
+
"tooltip.keyboard": string;
|
|
111
|
+
"tooltip.tutorials": string;
|
|
112
|
+
"replace.all.tooltip": string;
|
|
113
|
+
"replace.find.placeholder": string;
|
|
114
|
+
"replace.placeholder": string;
|
|
115
|
+
"tag.public": string;
|
|
116
|
+
"tag.private": string;
|
|
117
|
+
"profile.label.hello": string;
|
|
118
|
+
"profile.label.theme": string;
|
|
119
|
+
"profile.label.help": string;
|
|
120
|
+
"profile.label.logout": string;
|
|
121
|
+
"profile.label.home": string;
|
|
123
122
|
};
|
|
124
123
|
'header-app': {
|
|
125
124
|
'label.tools': string;
|
|
@@ -372,23 +371,22 @@ export declare const commonResources: {
|
|
|
372
371
|
'sentence.status.auto': string;
|
|
373
372
|
};
|
|
374
373
|
header: {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
'profile.label.home': string;
|
|
374
|
+
"label.platform": string;
|
|
375
|
+
"label.signout": string;
|
|
376
|
+
"label.my.settings": string;
|
|
377
|
+
"label.choose": string;
|
|
378
|
+
"tooltip.keyboard": string;
|
|
379
|
+
"tooltip.tutorials": string;
|
|
380
|
+
"replace.all.tooltip": string;
|
|
381
|
+
"replace.find.placeholder": string;
|
|
382
|
+
"replace.placeholder": string;
|
|
383
|
+
"tag.public": string;
|
|
384
|
+
"tag.private": string;
|
|
385
|
+
"profile.label.hello": string;
|
|
386
|
+
"profile.label.theme": string;
|
|
387
|
+
"profile.label.help": string;
|
|
388
|
+
"profile.label.logout": string;
|
|
389
|
+
"profile.label.home": string;
|
|
392
390
|
};
|
|
393
391
|
'header-app': {
|
|
394
392
|
'label.tools': string;
|
|
@@ -640,23 +638,22 @@ export declare const commonResources: {
|
|
|
640
638
|
'sentence.status.auto': string;
|
|
641
639
|
};
|
|
642
640
|
header: {
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
'profile.label.home': string;
|
|
641
|
+
"label.platform": string;
|
|
642
|
+
"label.signout": string;
|
|
643
|
+
"label.my.settings": string;
|
|
644
|
+
"label.choose": string;
|
|
645
|
+
"tooltip.keyboard": string;
|
|
646
|
+
"tooltip.tutorials": string;
|
|
647
|
+
"replace.all.tooltip": string;
|
|
648
|
+
"replace.find.placeholder": string;
|
|
649
|
+
"replace.placeholder": string;
|
|
650
|
+
"tag.public": string;
|
|
651
|
+
"tag.private": string;
|
|
652
|
+
"profile.label.hello": string;
|
|
653
|
+
"profile.label.theme": string;
|
|
654
|
+
"profile.label.help": string;
|
|
655
|
+
"profile.label.logout": string;
|
|
656
|
+
"profile.label.home": string;
|
|
660
657
|
};
|
|
661
658
|
'header-app': {
|
|
662
659
|
'label.tools': string;
|
|
@@ -1,59 +1,56 @@
|
|
|
1
1
|
export declare const HeaderTexts: {
|
|
2
2
|
en: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'profile.label.home': string;
|
|
3
|
+
"label.platform": string;
|
|
4
|
+
"label.signout": string;
|
|
5
|
+
"label.my.settings": string;
|
|
6
|
+
"label.choose": string;
|
|
7
|
+
"tooltip.keyboard": string;
|
|
8
|
+
"tooltip.tutorials": string;
|
|
9
|
+
"replace.all.tooltip": string;
|
|
10
|
+
"replace.find.placeholder": string;
|
|
11
|
+
"replace.placeholder": string;
|
|
12
|
+
"tag.public": string;
|
|
13
|
+
"tag.private": string;
|
|
14
|
+
"profile.label.hello": string;
|
|
15
|
+
"profile.label.theme": string;
|
|
16
|
+
"profile.label.help": string;
|
|
17
|
+
"profile.label.logout": string;
|
|
18
|
+
"profile.label.home": string;
|
|
20
19
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
'profile.label.home': string;
|
|
20
|
+
"pt-BR": {
|
|
21
|
+
"label.platform": string;
|
|
22
|
+
"label.signout": string;
|
|
23
|
+
"label.my.settings": string;
|
|
24
|
+
"label.choose": string;
|
|
25
|
+
"tooltip.keyboard": string;
|
|
26
|
+
"tooltip.tutorials": string;
|
|
27
|
+
"replace.all.tooltip": string;
|
|
28
|
+
"replace.find.placeholder": string;
|
|
29
|
+
"replace.placeholder": string;
|
|
30
|
+
"tag.public": string;
|
|
31
|
+
"tag.private": string;
|
|
32
|
+
"profile.label.hello": string;
|
|
33
|
+
"profile.label.theme": string;
|
|
34
|
+
"profile.label.help": string;
|
|
35
|
+
"profile.label.logout": string;
|
|
36
|
+
"profile.label.home": string;
|
|
39
37
|
};
|
|
40
38
|
it: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'profile.label.home': string;
|
|
39
|
+
"label.platform": string;
|
|
40
|
+
"label.signout": string;
|
|
41
|
+
"label.my.settings": string;
|
|
42
|
+
"label.choose": string;
|
|
43
|
+
"tooltip.keyboard": string;
|
|
44
|
+
"tooltip.tutorials": string;
|
|
45
|
+
"replace.all.tooltip": string;
|
|
46
|
+
"replace.find.placeholder": string;
|
|
47
|
+
"replace.placeholder": string;
|
|
48
|
+
"tag.public": string;
|
|
49
|
+
"tag.private": string;
|
|
50
|
+
"profile.label.hello": string;
|
|
51
|
+
"profile.label.theme": string;
|
|
52
|
+
"profile.label.help": string;
|
|
53
|
+
"profile.label.logout": string;
|
|
54
|
+
"profile.label.home": string;
|
|
58
55
|
};
|
|
59
56
|
};
|
|
@@ -1,59 +1,56 @@
|
|
|
1
1
|
export const HeaderTexts = {
|
|
2
2
|
en: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'profile.label.home': 'My profile',
|
|
3
|
+
"label.platform": "Tycho Brahe Platform",
|
|
4
|
+
"label.signout": "sign out",
|
|
5
|
+
"label.my.settings": "My Settings",
|
|
6
|
+
"label.choose": "Choose a corpus",
|
|
7
|
+
"tooltip.keyboard": "Open Virtual Keyboard",
|
|
8
|
+
"tooltip.tutorials": "Views Tutorials",
|
|
9
|
+
"replace.all.tooltip": "Replace All",
|
|
10
|
+
"replace.find.placeholder": "Find",
|
|
11
|
+
"replace.placeholder": "Replace",
|
|
12
|
+
"tag.public": "Public",
|
|
13
|
+
"tag.private": "Private",
|
|
14
|
+
"profile.label.hello": "Hello,",
|
|
15
|
+
"profile.label.theme": "Layout Theme",
|
|
16
|
+
"profile.label.help": "Help Center",
|
|
17
|
+
"profile.label.logout": "Logout",
|
|
18
|
+
"profile.label.home": "My profile",
|
|
20
19
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
'profile.label.home': 'Meu perfil',
|
|
20
|
+
"pt-BR": {
|
|
21
|
+
"label.platform": "Plataforma Tycho Brahe",
|
|
22
|
+
"label.signout": "sair",
|
|
23
|
+
"label.my.settings": "Minhas Configurações",
|
|
24
|
+
"label.choose": "Escolha um corpus",
|
|
25
|
+
"tooltip.keyboard": "Abrir Teclado Virtual",
|
|
26
|
+
"tooltip.tutorials": "Ver tutoriais",
|
|
27
|
+
"replace.all.tooltip": "Substituir Todos",
|
|
28
|
+
"replace.find.placeholder": "Procurar",
|
|
29
|
+
"replace.placeholder": "Substituir",
|
|
30
|
+
"tag.public": "Público",
|
|
31
|
+
"tag.private": "Privado",
|
|
32
|
+
"profile.label.hello": "Olá,",
|
|
33
|
+
"profile.label.theme": "Tema do Layout",
|
|
34
|
+
"profile.label.help": "Central de Ajuda",
|
|
35
|
+
"profile.label.logout": "Sair da conta",
|
|
36
|
+
"profile.label.home": "Meu perfil",
|
|
39
37
|
},
|
|
40
38
|
it: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'profile.label.home': 'Il mio profilo',
|
|
39
|
+
"label.platform": "Piattaforma Tycho Brahe",
|
|
40
|
+
"label.signout": "esci",
|
|
41
|
+
"label.my.settings": "Le mie impostazioni",
|
|
42
|
+
"label.choose": "Scegli un corpus",
|
|
43
|
+
"tooltip.keyboard": "Apri tastiera virtuale",
|
|
44
|
+
"tooltip.tutorials": "Visualizza i tutorial",
|
|
45
|
+
"replace.all.tooltip": "Sostituisci tutto",
|
|
46
|
+
"replace.find.placeholder": "Trova",
|
|
47
|
+
"replace.placeholder": "Sostituisci",
|
|
48
|
+
"tag.public": "Pubblico",
|
|
49
|
+
"tag.private": "Privato",
|
|
50
|
+
"profile.label.hello": "Ciao,",
|
|
51
|
+
"profile.label.theme": "Tema grafico",
|
|
52
|
+
"profile.label.help": "Centro assistenza",
|
|
53
|
+
"profile.label.logout": "Disconnetti",
|
|
54
|
+
"profile.label.home": "Il mio profilo",
|
|
58
55
|
},
|
|
59
56
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,9 @@ export { default as SecurityUtils } from './functions/SecurityUtils';
|
|
|
66
66
|
export { default as SentenceUtils } from './functions/SentenceUtils';
|
|
67
67
|
export { default as UsabilityUtils } from './functions/UsabilityUtils';
|
|
68
68
|
export { default as Header } from './Header';
|
|
69
|
-
export { default as
|
|
69
|
+
export { default as HeaderCorpus } from './Header/HeaderCorpora/HeaderCorpus';
|
|
70
|
+
export { default as HelpButton } from './Header/HelpButton';
|
|
71
|
+
export type { HelpAction } from './Header/HelpButton/HelpButton';
|
|
70
72
|
export { default as LanguageSelector } from './LanguageSelector';
|
|
71
73
|
export { AvailableLanguages } from './LanguageSelector';
|
|
72
74
|
export type { AvailableLanguage } from './LanguageSelector';
|
package/dist/index.js
CHANGED
|
@@ -50,7 +50,8 @@ export { default as SecurityUtils } from './functions/SecurityUtils';
|
|
|
50
50
|
export { default as SentenceUtils } from './functions/SentenceUtils';
|
|
51
51
|
export { default as UsabilityUtils } from './functions/UsabilityUtils';
|
|
52
52
|
export { default as Header } from './Header';
|
|
53
|
-
export { default as
|
|
53
|
+
export { default as HeaderCorpus } from './Header/HeaderCorpora/HeaderCorpus';
|
|
54
|
+
export { default as HelpButton } from './Header/HelpButton';
|
|
54
55
|
export { default as LanguageSelector } from './LanguageSelector';
|
|
55
56
|
export { AvailableLanguages } from './LanguageSelector';
|
|
56
57
|
export { default as Participants } from './Participants';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tycho-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.17",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react-hook-form": "^7.45.2",
|
|
45
45
|
"react-i18next": "^13.0.2",
|
|
46
46
|
"react-router-dom": "^6.14.2",
|
|
47
|
-
"tycho-storybook": "0.5.
|
|
47
|
+
"tycho-storybook": "0.5.15",
|
|
48
48
|
"yup": "^1.2.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Drawer } from '@mui/material';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { Button, Icon, IconButton } from 'tycho-storybook';
|
|
6
|
-
import { useCorpusUtils } from '../../configs/useCorpusUtils';
|
|
7
|
-
import { AvailableAppsDesktop } from '../types/App';
|
|
8
|
-
import './style.scss';
|
|
9
|
-
export default function HeaderAppsDesktop() {
|
|
10
|
-
const { t } = useTranslation('header-app');
|
|
11
|
-
const { getCorpus, hasCorpus } = useCorpusUtils();
|
|
12
|
-
const [open, setOpen] = useState(false);
|
|
13
|
-
const goto = (app, blank) => {
|
|
14
|
-
const shouldAppendCorpusUid = app.appendCorpusUid !== false;
|
|
15
|
-
const url = hasCorpus() && shouldAppendCorpusUid
|
|
16
|
-
? `/${app.code}/${getCorpus().uid}`
|
|
17
|
-
: `/${app.code}`;
|
|
18
|
-
if (blank) {
|
|
19
|
-
window.open(url, '_blank');
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
location.href = url;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const renderItem = (item, idx) => {
|
|
26
|
-
return (_jsxs("div", { className: "item", title: t(`${item.code}.desc`), onClick: () => goto(item, false), children: [item.icon && (_jsx("div", { className: "icon", children: _jsx(Icon, { name: item.icon }) })), item.image && _jsx("img", { src: item.image }), _jsxs("div", { className: "texts", children: [_jsx("span", { className: "label", children: t(`${item.code}.name`) }), _jsx("span", { className: "sublabel", style: { maxWidth: '16vw' }, children: t(`${item.code}.desc`) })] }), _jsx("div", { className: "options", children: _jsx(Button, { text: t('common:button.open'), size: "x-small", mode: "tonal" }) })] }, idx.valueOf()));
|
|
27
|
-
};
|
|
28
|
-
return (_jsxs("div", { className: "header-apps-container", children: [_jsx(IconButton, { name: "apps", className: "icon-apps", size: "large", onClick: () => setOpen(!open), filledIcon: true }), open && (_jsxs(Drawer, { anchor: "left", open: true, onClose: () => setOpen(false), className: "offcanvas-apps", children: [_jsxs("div", { className: "header", children: [_jsx("span", { className: "label", children: t('header:label.platform') }), _jsx(IconButton, { name: "close", size: "x-small", mode: "ghost", onClick: () => setOpen(false) })] }), _jsxs("div", { className: "body", children: [_jsx("div", { className: "title", children: t('label.tools') }), AvailableAppsDesktop.map((item, idx) => renderItem(item, idx))] })] }))] }));
|
|
29
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HelpAction } from './HelpButton/HelpButton';
|
|
2
|
-
import './styles.scss';
|
|
3
|
-
type Props = {
|
|
4
|
-
tool: string;
|
|
5
|
-
hideKeyboard?: boolean;
|
|
6
|
-
keyboardLayout?: string;
|
|
7
|
-
navigateHome?: () => void;
|
|
8
|
-
helpActions?: HelpAction[];
|
|
9
|
-
};
|
|
10
|
-
export default function HeaderDesktop({ tool, hideKeyboard, keyboardLayout, navigateHome, helpActions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { IconButton } from 'tycho-storybook';
|
|
6
|
-
import LanguageSelector from '../LanguageSelector';
|
|
7
|
-
import VirtualKeyboard from '../VirtualKeyboard';
|
|
8
|
-
import { useCorpusUtils } from '../configs/useCorpusUtils';
|
|
9
|
-
import HeaderAppsDesktop from './HeaderApps/HeaderAppsDesktop';
|
|
10
|
-
import HeaderCorpus from './HeaderCorpora/HeaderCorpus';
|
|
11
|
-
import HelpButton from './HelpButton';
|
|
12
|
-
import './styles.scss';
|
|
13
|
-
export default function HeaderDesktop({ tool, hideKeyboard, keyboardLayout, navigateHome, helpActions, }) {
|
|
14
|
-
const { t } = useTranslation('header');
|
|
15
|
-
const { getCorpus } = useCorpusUtils();
|
|
16
|
-
const [openKeyboard, setOpenKeyboard] = useState(false);
|
|
17
|
-
const homeTextsClass = cx('texts', {
|
|
18
|
-
pointer: navigateHome !== undefined,
|
|
19
|
-
});
|
|
20
|
-
return (_jsxs("div", { className: "ds-header", children: [_jsx(HeaderAppsDesktop, {}), _jsxs("div", { className: homeTextsClass, onClick: () => navigateHome && navigateHome(), children: [_jsx("span", { className: "title", children: t('label.desktop') }), _jsx("span", { className: "subtitle", children: tool })] }), _jsx(HeaderCorpus, {}), _jsxs("div", { className: "header-profile", children: [!hideKeyboard && (_jsx(IconButton, { onClick: () => setOpenKeyboard(!openKeyboard), name: "keyboard", size: "medium", title: t('tooltip.keyboard') })), _jsx(HelpButton, { helpActions: helpActions }), _jsx(LanguageSelector, {})] }), openKeyboard && (_jsx(VirtualKeyboard, { onClose: () => setOpenKeyboard(false), closeLabel: t('common:button.close'), defaultLayout: keyboardLayout || getCorpus().keyboardLayout || 'english' }))] }));
|
|
21
|
-
}
|