@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.
@@ -27,27 +27,32 @@ var checkLanguageSupport = function checkLanguageSupport(_ref) {
27
27
  return isSupport ? language : supportLanguages[0].value;
28
28
  };
29
29
 
30
- var DrawerList = function DrawerList(_ref) {
31
- var drawerList = _ref.drawerList,
32
- setOpen = _ref.setOpen;
33
- var history = useHistory();
34
- var _useRouteMatch = useRouteMatch(),
35
- url = _useRouteMatch.url;
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(function (_ref2, index) {
39
- var name = _ref2.name,
40
- icon = _ref2.icon,
41
- path = _ref2.path;
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: function onClick() {
50
+ onClick: () => {
46
51
  if (path.indexOf('http') > -1) {
47
52
  window.location = path;
48
53
  } else {
49
54
  history.push({
50
- pathname: "".concat(url).concat(path)
55
+ pathname: `${url}${path}`
51
56
  });
52
57
  }
53
58
  setOpen(false);
@@ -1,4 +1,4 @@
1
- export { D as default } from './Drawer-68ffa63e.js';
1
+ export { D as default } from './Drawer-cd48391b.js';
2
2
  import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
@@ -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-04b77185.js';
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-04b77185.js';
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-5407d9de.js';
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-04b77185.js';
10
+ import './dataExport-d55d6fa3.js';
@@ -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-68ffa63e.js';
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';
@@ -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-5407d9de.js';
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-04b77185.js';
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
- var jsonExcel = function jsonExcel(json) {
38
- var output = '';
37
+ const jsonExcel = json => {
38
+ let output = '';
39
39
  if (Array.isArray(json) && json.length > 0) {
40
- var keys = Object.keys(json[0]);
41
- output += "".concat(keys.toString(), "\n");
42
- json.forEach(function (item) {
43
- keys.forEach(function (key) {
44
- output += "".concat(item[key], ",");
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
- var _keys = Object.keys(json);
50
- output += "".concat(_keys.toString(), "\n");
51
- _keys.forEach(function (key) {
52
- output += "".concat(json[key], ",");
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
- var jsonTxt = function jsonTxt(json) {
59
- var output = '';
58
+ const jsonTxt = json => {
59
+ let output = '';
60
60
  if (Array.isArray(json) && json.length > 0) {
61
- var keys = Object.keys(json[0]);
62
- json.forEach(function (item, index) {
63
- output += "(".concat(index + 1, ")\n");
64
- keys.forEach(function (key) {
65
- output += "".concat(key, ": ").concat(item[key], "\n");
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
- var _keys2 = Object.keys(json);
71
- _keys2.forEach(function (key) {
72
- output += "".concat(key, ": ").concat(json[key], "\n");
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
- var snaToExcel = function snaToExcel(data) {
78
- var _ref = data || {},
79
- links = _ref.links,
80
- nodes = _ref.nodes;
77
+ const snaToExcel = data => {
78
+ const {
79
+ links,
80
+ nodes
81
+ } = data || {};
81
82
  if (links && links.length > 0) {
82
- var result = links.map(function (link) {
83
- return {
84
- From: nodes[link.source].name,
85
- To: nodes[link.target].name
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "2.0.1-beta.82",
3
+ "version": "2.0.1-beta.83",
4
4
  "description": "This project is to be used as a starter kit for building React component using Storybook and Rollup",
5
5
  "author": "daoyi",
6
6
  "main": "lib/index.js",