@daoyi/nmtl-ui 2.0.1-beta.82 → 2.0.1-beta.83
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/lib/components/{Drawer-68ffa63e.js → Drawer-cd48391b.js} +17 -12
- package/lib/components/Drawer.js +1 -1
- package/lib/components/ExportButton.js +1 -1
- package/lib/components/{ExtraTools-5407d9de.js → ExtraTools-51d59918.js} +1 -1
- package/lib/components/ExtraTools.js +2 -2
- package/lib/components/Header.js +1 -1
- package/lib/components/SNA.js +2 -2
- package/lib/components/{dataExport-04b77185.js → dataExport-d55d6fa3.js} +30 -31
- package/lib/components/globalConfig.js +1 -1
- package/package.json +1 -1
|
@@ -27,27 +27,32 @@ var checkLanguageSupport = function checkLanguageSupport(_ref) {
|
|
|
27
27
|
return isSupport ? language : supportLanguages[0].value;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
const DrawerList = _ref => {
|
|
31
|
+
let {
|
|
32
|
+
drawerList,
|
|
33
|
+
setOpen
|
|
34
|
+
} = _ref;
|
|
35
|
+
const history = useHistory();
|
|
36
|
+
const {
|
|
37
|
+
url
|
|
38
|
+
} = useRouteMatch();
|
|
36
39
|
return /*#__PURE__*/React__default.createElement(List, {
|
|
37
40
|
className: "drawer__list"
|
|
38
|
-
}, Array.isArray(drawerList) && drawerList.map(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
}, Array.isArray(drawerList) && drawerList.map((_ref2, index) => {
|
|
42
|
+
let {
|
|
43
|
+
name,
|
|
44
|
+
icon,
|
|
45
|
+
path
|
|
46
|
+
} = _ref2;
|
|
42
47
|
return /*#__PURE__*/React__default.createElement(ListItem, {
|
|
43
48
|
button: true,
|
|
44
49
|
key: index.toString(),
|
|
45
|
-
onClick:
|
|
50
|
+
onClick: () => {
|
|
46
51
|
if (path.indexOf('http') > -1) {
|
|
47
52
|
window.location = path;
|
|
48
53
|
} else {
|
|
49
54
|
history.push({
|
|
50
|
-
pathname:
|
|
55
|
+
pathname: `${url}${path}`
|
|
51
56
|
});
|
|
52
57
|
}
|
|
53
58
|
setOpen(false);
|
package/lib/components/Drawer.js
CHANGED
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
5
5
|
import { ExitToApp } from '@material-ui/icons';
|
|
6
6
|
import { Dialog, DialogContent, DialogContentText, DialogActions, Button } from '@material-ui/core';
|
|
7
|
-
import { f as fileDownload, j as jsonTxt, a as jsonExcel } from './dataExport-
|
|
7
|
+
import { f as fileDownload, j as jsonTxt, a as jsonExcel } from './dataExport-d55d6fa3.js';
|
|
8
8
|
import { getIntl } from './globalConfig';
|
|
9
9
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
|
|
7
7
|
import { Menu, MenuItem, useMediaQuery, IconButton } from '@material-ui/core';
|
|
8
8
|
import { T as Tooltip } from './Tooltip-21964965.js';
|
|
9
|
-
import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-
|
|
9
|
+
import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-d55d6fa3.js';
|
|
10
10
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
11
11
|
|
|
12
12
|
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as default } from './ExtraTools-
|
|
1
|
+
export { E as default } from './ExtraTools-51d59918.js';
|
|
2
2
|
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './index-cbd6bca9.js';
|
|
@@ -7,4 +7,4 @@ import './_commonjsHelpers-70de2c37.js';
|
|
|
7
7
|
import '@material-ui/core';
|
|
8
8
|
import './Tooltip-21964965.js';
|
|
9
9
|
import './style-inject.es-1f59c1d0.js';
|
|
10
|
-
import './dataExport-
|
|
10
|
+
import './dataExport-d55d6fa3.js';
|
package/lib/components/Header.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Typography, IconButton } from '@material-ui/core';
|
|
|
8
8
|
import { SearchOutlined } from '@material-ui/icons';
|
|
9
9
|
import { K as KeywordSearch } from './KeywordSearch-a66db4e4.js';
|
|
10
10
|
import { S as Select } from './Select-7c0ef815.js';
|
|
11
|
-
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-
|
|
11
|
+
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-cd48391b.js';
|
|
12
12
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
13
13
|
import './isObjectLike-e111475d.js';
|
|
14
14
|
import './_commonjsHelpers-70de2c37.js';
|
package/lib/components/SNA.js
CHANGED
|
@@ -2,13 +2,13 @@ import React__default, { useMemo, useEffect } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import { e as event, d as d3Select, a as dispatch, c as customEvent, D as DragEvent, q as quadtree, m as map, t as timer, T as Transform, i as identity, b as interrupt, o as ordinal, f as category10 } from './transform-3a04288b.js';
|
|
5
|
-
import { E as ExtraTools } from './ExtraTools-
|
|
5
|
+
import { E as ExtraTools } from './ExtraTools-51d59918.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
8
8
|
import './_commonjsHelpers-70de2c37.js';
|
|
9
9
|
import '@material-ui/core';
|
|
10
10
|
import './Tooltip-21964965.js';
|
|
11
|
-
import './dataExport-
|
|
11
|
+
import './dataExport-d55d6fa3.js';
|
|
12
12
|
|
|
13
13
|
function sourceEvent() {
|
|
14
14
|
var current = event, source;
|
|
@@ -34,57 +34,56 @@ var fileDownload = function(data, filename, mime, bom) {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const jsonExcel = json => {
|
|
38
|
+
let output = '';
|
|
39
39
|
if (Array.isArray(json) && json.length > 0) {
|
|
40
|
-
|
|
41
|
-
output +=
|
|
42
|
-
json.forEach(
|
|
43
|
-
keys.forEach(
|
|
44
|
-
output +=
|
|
40
|
+
const keys = Object.keys(json[0]);
|
|
41
|
+
output += `${keys.toString()}\n`;
|
|
42
|
+
json.forEach(item => {
|
|
43
|
+
keys.forEach(key => {
|
|
44
|
+
output += `${item[key]},`;
|
|
45
45
|
});
|
|
46
46
|
output += '\n';
|
|
47
47
|
});
|
|
48
48
|
} else {
|
|
49
|
-
|
|
50
|
-
output +=
|
|
51
|
-
|
|
52
|
-
output +=
|
|
49
|
+
const keys = Object.keys(json);
|
|
50
|
+
output += `${keys.toString()}\n`;
|
|
51
|
+
keys.forEach(key => {
|
|
52
|
+
output += `${json[key]},`;
|
|
53
53
|
});
|
|
54
54
|
output += '\n';
|
|
55
55
|
}
|
|
56
56
|
return output;
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const jsonTxt = json => {
|
|
59
|
+
let output = '';
|
|
60
60
|
if (Array.isArray(json) && json.length > 0) {
|
|
61
|
-
|
|
62
|
-
json.forEach(
|
|
63
|
-
output +=
|
|
64
|
-
keys.forEach(
|
|
65
|
-
output +=
|
|
61
|
+
const keys = Object.keys(json[0]);
|
|
62
|
+
json.forEach((item, index) => {
|
|
63
|
+
output += `(${index + 1})\n`;
|
|
64
|
+
keys.forEach(key => {
|
|
65
|
+
output += `${key}: ${item[key]}\n`;
|
|
66
66
|
});
|
|
67
67
|
output += '\n';
|
|
68
68
|
});
|
|
69
69
|
} else {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
output +=
|
|
70
|
+
const keys = Object.keys(json);
|
|
71
|
+
keys.forEach(key => {
|
|
72
|
+
output += `${key}: ${json[key]}\n`;
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
return output;
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
links
|
|
80
|
-
nodes
|
|
77
|
+
const snaToExcel = data => {
|
|
78
|
+
const {
|
|
79
|
+
links,
|
|
80
|
+
nodes
|
|
81
|
+
} = data || {};
|
|
81
82
|
if (links && links.length > 0) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
87
|
-
});
|
|
83
|
+
const result = links.map(link => ({
|
|
84
|
+
From: nodes[link.source].name,
|
|
85
|
+
To: nodes[link.target].name
|
|
86
|
+
}));
|
|
88
87
|
return result;
|
|
89
88
|
}
|
|
90
89
|
return [];
|
|
@@ -46,7 +46,7 @@ var zhtw = {
|
|
|
46
46
|
"common.form.female": "女",
|
|
47
47
|
"common.form.dataname.placeholder": "可填書名、期刊名等",
|
|
48
48
|
"common.form.provider.notice": "(此名稱將會顯示於此網站上)",
|
|
49
|
-
"common.form.code": "驗證碼",
|
|
49
|
+
"common.form.code": "驗證碼(點選圖片可更換驗證碼)",
|
|
50
50
|
"common.form.code.error": "驗證碼錯誤",
|
|
51
51
|
"common.form.attachment": "附件上傳",
|
|
52
52
|
"common.form.attachment.valid.error": "附件上傳上限為10MB",
|
package/package.json
CHANGED