tycho-components 0.14.0 → 0.14.1
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Corpus } from
|
|
2
|
-
export type PlatformTools =
|
|
1
|
+
import { Corpus } from "../configs/types/Corpus";
|
|
2
|
+
export type PlatformTools = "EDICTOR" | "TRANSLATION" | "DESIGN" | "TRANSCRIBER" | "SYNTREES";
|
|
3
3
|
type EditionToolsMenu = {
|
|
4
4
|
parameter: string;
|
|
5
5
|
name: PlatformTools;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
export const EDITION_TOOLS = [
|
|
2
2
|
{
|
|
3
|
-
parameter:
|
|
4
|
-
name:
|
|
5
|
-
action:
|
|
6
|
-
title:
|
|
7
|
-
icon:
|
|
8
|
-
path:
|
|
3
|
+
parameter: "useEdictor",
|
|
4
|
+
name: "EDICTOR",
|
|
5
|
+
action: "actions:actions.label.edictor",
|
|
6
|
+
title: "actions:actions.name.edictor",
|
|
7
|
+
icon: "edit_square",
|
|
8
|
+
path: "/editor",
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
parameter:
|
|
12
|
-
name:
|
|
13
|
-
action:
|
|
14
|
-
title:
|
|
15
|
-
icon:
|
|
16
|
-
path:
|
|
11
|
+
parameter: "useTranslations",
|
|
12
|
+
name: "TRANSLATION",
|
|
13
|
+
action: "actions:actions.label.translations",
|
|
14
|
+
title: "actions:actions.name.translations",
|
|
15
|
+
icon: "language_japanese_kana",
|
|
16
|
+
path: "/translation",
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
parameter:
|
|
20
|
-
name:
|
|
21
|
-
action:
|
|
22
|
-
title:
|
|
23
|
-
icon:
|
|
24
|
-
path:
|
|
19
|
+
parameter: "useDesigner",
|
|
20
|
+
name: "DESIGN",
|
|
21
|
+
action: "actions:actions.label.design",
|
|
22
|
+
title: "actions:actions.name.design",
|
|
23
|
+
icon: "design_services",
|
|
24
|
+
path: "/editor/box",
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
parameter:
|
|
28
|
-
name:
|
|
29
|
-
action:
|
|
30
|
-
title:
|
|
31
|
-
icon:
|
|
32
|
-
path:
|
|
27
|
+
parameter: "useTranscriber",
|
|
28
|
+
name: "TRANSCRIBER",
|
|
29
|
+
action: "actions:actions.label.transcriber",
|
|
30
|
+
title: "actions:actions.name.transcriber",
|
|
31
|
+
icon: "music_cast",
|
|
32
|
+
path: "/transcriber",
|
|
33
33
|
},
|
|
34
34
|
];
|
|
35
35
|
const getTitle = (defaultTool) => {
|
|
36
|
-
const tool = defaultTool ||
|
|
36
|
+
const tool = defaultTool || "EDICTOR";
|
|
37
37
|
return EDITION_TOOLS.filter((t) => t.name === tool)[0].title;
|
|
38
38
|
};
|
|
39
39
|
const getIcon = (defaultTool) => {
|
|
40
|
-
const tool = defaultTool ||
|
|
40
|
+
const tool = defaultTool || "EDICTOR";
|
|
41
41
|
return EDITION_TOOLS.filter((t) => t.name === tool)[0].icon;
|
|
42
42
|
};
|
|
43
43
|
const openDocument = (page, corpus, hasParameter, defaultTool) => {
|
|
@@ -62,16 +62,16 @@ const redirectPage = (corpus, tool, uid, hasParameter) => {
|
|
|
62
62
|
window.open(`${EDITION_TOOLS.find((t) => t.name === tool)?.path}/${uid}`);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
if (hasParameter(corpus,
|
|
65
|
+
if (hasParameter(corpus, "useEdictor")) {
|
|
66
66
|
openEdictor(uid);
|
|
67
67
|
}
|
|
68
|
-
else if (hasParameter(corpus,
|
|
68
|
+
else if (hasParameter(corpus, "useTranslations")) {
|
|
69
69
|
openTranslations(uid);
|
|
70
70
|
}
|
|
71
|
-
else if (hasParameter(corpus,
|
|
71
|
+
else if (hasParameter(corpus, "useDesigner")) {
|
|
72
72
|
openDesign(uid);
|
|
73
73
|
}
|
|
74
|
-
else if (hasParameter(corpus,
|
|
74
|
+
else if (hasParameter(corpus, "useTranscriber")) {
|
|
75
75
|
openTranscriber(uid);
|
|
76
76
|
}
|
|
77
77
|
};
|