@dssp/dkpi 1.0.0-alpha.5 → 1.0.0-alpha.7
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-client/menu.d.ts +23 -1
- package/dist-client/menu.js +57 -2
- package/dist-client/menu.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/menu-tools.d.ts +9 -0
- package/dist-client/viewparts/menu-tools.js +116 -10
- package/dist-client/viewparts/menu-tools.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +51 -50
- package/schema.graphql +7088 -745
package/dist-client/menu.d.ts
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
export declare function getMenuTemplate(
|
|
1
|
+
export declare function getMenuTemplate(owner: boolean | undefined, dataSets: any[]): (false | {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
icon?: undefined;
|
|
5
|
+
path?: undefined;
|
|
6
|
+
menus?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
name: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
path: string;
|
|
11
|
+
type?: undefined;
|
|
12
|
+
menus?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
name: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
path: string;
|
|
17
|
+
menus: {
|
|
18
|
+
name: any;
|
|
19
|
+
icon: string;
|
|
20
|
+
path: string;
|
|
21
|
+
}[];
|
|
22
|
+
type?: undefined;
|
|
23
|
+
})[];
|
package/dist-client/menu.js
CHANGED
|
@@ -1,4 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import i18next from 'i18next';
|
|
2
|
+
export function getMenuTemplate(owner = false, dataSets) {
|
|
3
|
+
return [
|
|
4
|
+
owner && {
|
|
5
|
+
name: 'DATASET',
|
|
6
|
+
type: 'group'
|
|
7
|
+
},
|
|
8
|
+
owner && {
|
|
9
|
+
name: i18next.t('title.data-set list'),
|
|
10
|
+
icon: 'dataset',
|
|
11
|
+
path: 'data-set-list'
|
|
12
|
+
},
|
|
13
|
+
owner && {
|
|
14
|
+
name: i18next.t('title.data-key-set list'),
|
|
15
|
+
icon: 'dataset_linked',
|
|
16
|
+
path: 'data-key-set-list'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'DATA ENTRY',
|
|
20
|
+
type: 'group'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
icon: 'edit_square',
|
|
24
|
+
name: i18next.t('title.data-entry list'),
|
|
25
|
+
path: 'data-entry-list'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'DATA REPORT',
|
|
29
|
+
type: 'group'
|
|
30
|
+
},
|
|
31
|
+
owner && {
|
|
32
|
+
name: i18next.t('title.data-sample list'),
|
|
33
|
+
icon: 'rule',
|
|
34
|
+
path: 'data-sample-list',
|
|
35
|
+
menus: dataSets.map(item => {
|
|
36
|
+
return {
|
|
37
|
+
name: item.name,
|
|
38
|
+
icon: 'checklist_rtl',
|
|
39
|
+
path: `data-sample-search/${item.id}`
|
|
40
|
+
};
|
|
41
|
+
}) || []
|
|
42
|
+
},
|
|
43
|
+
owner && {
|
|
44
|
+
name: i18next.t('title.data-summary list'),
|
|
45
|
+
icon: 'functions',
|
|
46
|
+
path: 'data-summary-list',
|
|
47
|
+
menus: dataSets
|
|
48
|
+
.filter(item => item.active && item.summaryPeriod)
|
|
49
|
+
.map(item => {
|
|
50
|
+
return {
|
|
51
|
+
name: item.name,
|
|
52
|
+
icon: 'checklist',
|
|
53
|
+
path: `data-summary-period/${item.id}`
|
|
54
|
+
};
|
|
55
|
+
}) || []
|
|
56
|
+
}
|
|
57
|
+
].filter(Boolean);
|
|
3
58
|
}
|
|
4
59
|
//# sourceMappingURL=menu.js.map
|
package/dist-client/menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../client/menu.ts"],"names":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AAE,mBAAmB;YACzB,KAAK,EACH,QAAQ;iBACL,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC;iBACjD,GAAG,CAAC,IAAI,CAAC,EAAE;gBACV,OAAO;oBACL,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,uBAAuB,IAAI,CAAC,EAAE,EAAE;iBACvC,CAAA;YACH,CAAC,CAAC,IAAI,EAAE;SACb;KACF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AACnB,CAAC","sourcesContent":["import i18next from 'i18next'\n\nexport function getMenuTemplate(owner: boolean = false, dataSets: any[]) {\n return [\n owner && {\n name: 'DATASET',\n type: 'group'\n },\n owner && {\n name: i18next.t('title.data-set list'),\n icon: 'dataset',\n path: 'data-set-list'\n },\n owner && {\n name: i18next.t('title.data-key-set list'),\n icon: 'dataset_linked',\n path: 'data-key-set-list'\n },\n {\n name: 'DATA ENTRY',\n type: 'group'\n },\n {\n icon: 'edit_square',\n name: i18next.t('title.data-entry list'),\n path: 'data-entry-list'\n },\n {\n name: 'DATA REPORT',\n type: 'group'\n },\n owner && {\n name: i18next.t('title.data-sample list'),\n icon: 'rule',\n path: 'data-sample-list',\n menus:\n dataSets.map(item => {\n return {\n name: item.name,\n icon: 'checklist_rtl',\n path: `data-sample-search/${item.id}`\n }\n }) || []\n },\n owner && {\n name: i18next.t('title.data-summary list'),\n icon: 'functions',\n path: 'data-summary-list',\n menus:\n dataSets\n .filter(item => item.active && item.summaryPeriod)\n .map(item => {\n return {\n name: item.name,\n icon: 'checklist',\n path: `data-summary-period/${item.id}`\n }\n }) || []\n }\n ].filter(Boolean)\n}\n"]}
|