@daoyi/nmtl-ui 2.0.1-beta.81 → 2.0.1-beta.82

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.
Files changed (37) hide show
  1. package/lib/components/{Autocomplete-b9f7ea2b.js → Autocomplete-83a79687.js} +67 -72
  2. package/lib/components/Autocomplete.js +2 -2
  3. package/lib/components/BackTop.js +1 -1
  4. package/lib/components/Carousel.js +1 -1
  5. package/lib/components/Checkbox.js +1 -1
  6. package/lib/components/CollapseContent.js +1 -1
  7. package/lib/components/{ContactModal-a062b92c.js → ContactModal-ab8e5ab2.js} +20 -10
  8. package/lib/components/ContactModal.js +3 -3
  9. package/lib/components/{Drawer-6d519e05.js → Drawer-68ffa63e.js} +14 -19
  10. package/lib/components/Drawer.js +3 -3
  11. package/lib/components/Dropdown.js +1 -1
  12. package/lib/components/ExportButton.js +2 -2
  13. package/lib/components/{ExtraTools-79c9c400.js → ExtraTools-5407d9de.js} +3 -3
  14. package/lib/components/ExtraTools.js +4 -4
  15. package/lib/components/Filter.js +1 -1
  16. package/lib/components/Footer.js +3 -3
  17. package/lib/components/{ForwardLink-5dd46685.js → ForwardLink-2554a5d9.js} +1 -1
  18. package/lib/components/ForwardLink.js +2 -2
  19. package/lib/components/Header.js +5 -5
  20. package/lib/components/Image.js +1 -1
  21. package/lib/components/InputMethod.js +1 -1
  22. package/lib/components/{KeywordSearch-8ee9bf32.js → KeywordSearch-a66db4e4.js} +2 -2
  23. package/lib/components/KeywordSearch.js +3 -3
  24. package/lib/components/KeywordTicker.js +2 -2
  25. package/lib/components/Keywords.js +1 -1
  26. package/lib/components/MUITheme.js +15 -12
  27. package/lib/components/Pagination.js +1 -1
  28. package/lib/components/Radio.js +1 -1
  29. package/lib/components/SNA.js +4 -4
  30. package/lib/components/{Select-eb3c067e.js → Select-7c0ef815.js} +1 -1
  31. package/lib/components/Select.js +2 -2
  32. package/lib/components/Table.js +1 -1
  33. package/lib/components/{Tooltip-59ca3c6d.js → Tooltip-21964965.js} +1 -1
  34. package/lib/components/Tooltip.js +2 -2
  35. package/lib/components/{_rollupPluginBabelHelpers-7eb4ffba.js → _rollupPluginBabelHelpers-a52356f6.js} +1 -1
  36. package/lib/components/{dataExport-d55d6fa3.js → dataExport-04b77185.js} +31 -30
  37. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { _ as _typeof, a as _extends$1, b as _objectSpread2, c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { _ as _extends$1, a as _slicedToArray, b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useCallback, useState, useRef, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -87,23 +87,21 @@ var Box = styled('div')(styleFunction, {
87
87
  name: 'MuiBox'
88
88
  });
89
89
 
90
- var useAutocomplete = (function (_ref) {
91
- var options = _ref.options,
92
- placeholder = _ref.placeholder,
93
- loading = _ref.loading,
94
- searchIcon = _ref.searchIcon,
95
- labelInValue = _ref.labelInValue,
96
- onEnter = _ref.onEnter,
97
- currentResult = _ref.currentResult,
98
- setCurrentDefaultValue = _ref.setCurrentDefaultValue,
99
- arrowIcon = _ref.arrowIcon;
100
- var getValue = useCallback(function (data) {
101
- return _typeof(data) === 'object' ? data.value : data;
102
- }, []);
103
- var getLabel = useCallback(function (value) {
104
- var finder = (Array.isArray(options) ? options : []).find(function (item) {
105
- return getValue(item) === getValue(value);
106
- }
90
+ var useAutocomplete = (_ref => {
91
+ let {
92
+ options,
93
+ placeholder,
94
+ loading,
95
+ searchIcon,
96
+ labelInValue,
97
+ onEnter,
98
+ currentResult,
99
+ setCurrentDefaultValue,
100
+ arrowIcon
101
+ } = _ref;
102
+ const getValue = useCallback(data => typeof data === 'object' ? data.value : data, []);
103
+ const getLabel = useCallback(value => {
104
+ const finder = (Array.isArray(options) ? options : []).find(item => getValue(item) === getValue(value)
107
105
  // typeof item === 'object' ? item.label === value : item === value
108
106
  );
109
107
 
@@ -111,30 +109,32 @@ var useAutocomplete = (function (_ref) {
111
109
  // console.log('value', value);
112
110
  // console.log('finder', finder);
113
111
  if (finder) {
114
- return _typeof(finder) === 'object' ? finder.label : finder;
112
+ return typeof finder === 'object' ? finder.label : finder;
115
113
  }
116
- return _typeof(value) === 'object' ? value.label : value;
114
+ return typeof value === 'object' ? value.label : value;
117
115
  }, [options]);
118
116
 
119
117
  /* 若MUI的Autocomplete下方的options列表要勾選已選的項目 必須從options取出才可 */
120
- var getValueFromOptions = useCallback(function (defaultValue) {
118
+ const getValueFromOptions = useCallback(defaultValue => {
121
119
  if (Array.isArray(options)) {
122
120
  if (Array.isArray(defaultValue)) {
123
121
  return defaultValue.map(
124
122
  // item有可能為 object({ label, value }) 或 string(value)
125
- function (item) {
126
- return options.find(function (_ref2) {
127
- var value = _ref2.value;
128
- return item === value || item.value === value;
129
- }) || item;
130
- }
123
+ item => options.find(_ref2 => {
124
+ let {
125
+ value
126
+ } = _ref2;
127
+ return item === value || item.value === value;
128
+ }) || item
131
129
  // if (typeof item === 'object') return options.find(({ value }) => item.value === value) || item;
132
130
  // return item;
133
131
  );
134
132
  }
135
133
 
136
- var result = options.find(function (_ref3) {
137
- var value = _ref3.value;
134
+ const result = options.find(_ref3 => {
135
+ let {
136
+ value
137
+ } = _ref3;
138
138
  return defaultValue === value;
139
139
  });
140
140
  return labelInValue ? defaultValue : result || {
@@ -144,50 +144,45 @@ var useAutocomplete = (function (_ref) {
144
144
  }
145
145
  return defaultValue;
146
146
  }, [options, labelInValue]);
147
- var defaultTag = useCallback(function (tagValue, getTagProps) {
148
- return tagValue.map(function (option, index) {
149
- return /*#__PURE__*/React__default.createElement(Chip, _extends$1({
150
- label: getLabel(option),
151
- deleteIcon: /*#__PURE__*/React__default.createElement(Close, null)
152
- }, getTagProps({
153
- index: index
154
- })));
155
- });
156
- }, [options]);
157
- var defaultRenderInput = useCallback(function (params) {
158
- return /*#__PURE__*/React__default.createElement(TextField, _extends$1({}, params, {
159
- variant: "outlined",
160
- placeholder: placeholder,
161
- InputProps: _objectSpread2(_objectSpread2({}, params.InputProps), {}, {
162
- endAdornment: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, loading && /*#__PURE__*/React__default.createElement(CircularProgress, {
163
- className: "autocomplete__icon",
164
- color: "inherit",
165
- size: 20
166
- }), searchIcon && /*#__PURE__*/React__default.createElement(SearchOutlined, {
167
- className: "autocomplete__icon",
168
- onClick: function onClick(event) {
169
- var tmpObj = {
170
- labels: currentResult || '',
171
- value: currentResult || ''
172
- };
173
- setCurrentDefaultValue(tmpObj);
174
- return onEnter(event, tmpObj);
175
- }
176
- }), !searchIcon && !loading && arrowIcon && /*#__PURE__*/React__default.createElement(Box, {
177
- style: {
178
- top: 'calc(50% - 14px)',
179
- right: '12px',
180
- position: 'absolute'
181
- }
182
- }, /*#__PURE__*/React__default.createElement(default_1, null)), params.InputProps.endAdornment)
183
- })
184
- }));
185
- }, [loading, searchIcon, arrowIcon]);
147
+ const defaultTag = useCallback((tagValue, getTagProps) => tagValue.map((option, index) => /*#__PURE__*/React__default.createElement(Chip, _extends$1({
148
+ label: getLabel(option),
149
+ deleteIcon: /*#__PURE__*/React__default.createElement(Close, null)
150
+ }, getTagProps({
151
+ index
152
+ })))), [options]);
153
+ const defaultRenderInput = useCallback(params => /*#__PURE__*/React__default.createElement(TextField, _extends$1({}, params, {
154
+ variant: "outlined",
155
+ placeholder: placeholder,
156
+ InputProps: {
157
+ ...params.InputProps,
158
+ endAdornment: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, loading && /*#__PURE__*/React__default.createElement(CircularProgress, {
159
+ className: "autocomplete__icon",
160
+ color: "inherit",
161
+ size: 20
162
+ }), searchIcon && /*#__PURE__*/React__default.createElement(SearchOutlined, {
163
+ className: "autocomplete__icon",
164
+ onClick: event => {
165
+ const tmpObj = {
166
+ labels: currentResult || '',
167
+ value: currentResult || ''
168
+ };
169
+ setCurrentDefaultValue(tmpObj);
170
+ return onEnter(event, tmpObj);
171
+ }
172
+ }), !searchIcon && !loading && arrowIcon && /*#__PURE__*/React__default.createElement(Box, {
173
+ style: {
174
+ top: 'calc(50% - 14px)',
175
+ right: '12px',
176
+ position: 'absolute'
177
+ }
178
+ }, /*#__PURE__*/React__default.createElement(default_1, null)), params.InputProps.endAdornment)
179
+ }
180
+ })), [loading, searchIcon, arrowIcon]);
186
181
  return {
187
- getValue: getValue,
188
- getValueFromOptions: getValueFromOptions,
189
- defaultTag: defaultTag,
190
- defaultRenderInput: defaultRenderInput
182
+ getValue,
183
+ getValueFromOptions,
184
+ defaultTag,
185
+ defaultRenderInput
191
186
  };
192
187
  });
193
188
 
@@ -1,5 +1,5 @@
1
- export { A as default } from './Autocomplete-b9f7ea2b.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { A as default } from './Autocomplete-83a79687.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-cbd6bca9.js';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useRef, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -1,4 +1,4 @@
1
- import { d as _objectWithoutProperties$1, b as _objectSpread2, a as _extends$3 } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { c as _objectWithoutProperties$1, b as _objectSpread2, _ as _extends$3 } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { forwardRef, useRef, useImperativeHandle } from 'react';
3
3
  import { a as classnames, c as classNames } from './index-cbd6bca9.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { d as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { c as _objectWithoutProperties, _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { FormControlLabel, Checkbox as Checkbox$1 } from '@material-ui/core';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useRef, useEffect } from 'react';
3
3
  import { c as classNames } from './index-cbd6bca9.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { a as _extends$1, c as _slicedToArray$2, b as _objectSpread2, e as _defineProperty$1 } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { _ as _extends$1, a as _slicedToArray$2, b as _objectSpread2, e as _defineProperty$1 } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { createContext, forwardRef, createElement, useContext, useRef, useEffect, useReducer, useCallback, useMemo, useLayoutEffect, Component, useState, useImperativeHandle, Fragment } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { h as hoistNonReactStatics_cjs } from './hoist-non-react-statics.cjs-3f408ad2.js';
@@ -7,7 +7,7 @@ import { M as Modal } from './Modal-c8a92699.js';
7
7
  import { c as commonjsGlobal, a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
8
8
  import { c as classNames } from './index-cbd6bca9.js';
9
9
  import { Input, Button, Box, Typography, FormControl, RadioGroup, FormControlLabel, Radio, TextField, TextareaAutosize } from '@material-ui/core';
10
- import { S as Select } from './Select-eb3c067e.js';
10
+ import { S as Select } from './Select-7c0ef815.js';
11
11
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
12
12
  import { r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-e95160be.js';
13
13
  import { getIntl } from './globalConfig';
@@ -9992,7 +9992,7 @@ const getConfig = () => ({
9992
9992
  color: [getRandom(100, 255, 3), getRandom(100, 255, 4), getRandom(100, 255, 3), getRandom(100, 255, 3)]
9993
9993
  });
9994
9994
 
9995
- var css_248z$2 = ".vcode {\n display: block;\n align-items: center; }\n .vcode__image {\n margin-top: 10px;\n background: rgba(0, 0, 0, 0.8);\n width: 160px;\n overflow: hidden;\n height: 50px;\n text-align: center;\n position: relative; }\n .vcode__image:hover .vcode__mask {\n opacity: 0.8; }\n .vcode__image__mask {\n position: absolute;\n width: 100%;\n top: 0;\n line-height: 50px;\n background-color: rgba(0, 0, 0, 0.95);\n opacity: 0;\n z-index: 1;\n transition: opacity 0.3s ease-in-out;\n cursor: pointer; }\n .vcode__image__itemStr {\n float: left;\n margin-left: 20px; }\n\n#bgi {\n top: 0;\n left: 0;\n position: absolute;\n width: 100%;\n height: 100%; }\n";
9995
+ var css_248z$2 = ".vcode {\n display: block;\n align-items: center; }\n .vcode__image {\n margin-top: 10px;\n background: rgba(0, 0, 0, 0.8);\n width: 160px;\n overflow: hidden;\n height: 50px;\n text-align: center;\n position: relative; }\n .vcode__image:hover .vcode__mask {\n opacity: 0.8; }\n .vcode__image__mask {\n position: absolute;\n width: 100%;\n top: 0;\n line-height: 50px;\n background-color: rgba(0, 0, 0, 0.95);\n opacity: 0;\n z-index: 1;\n transition: opacity 0.3s ease-in-out;\n cursor: pointer; }\n .vcode__image__itemStr {\n float: left;\n margin-left: 20px; }\n .vcode__box {\n display: flex;\n align-items: center; }\n .vcode__error {\n color: #d93333;\n font-weight: bold;\n margin-left: 1rem; }\n\n#bgi {\n top: 0;\n left: 0;\n position: absolute;\n width: 100%;\n height: 100%; }\n";
9996
9996
  styleInject(css_248z$2);
9997
9997
 
9998
9998
  const VCode = _ref => {
@@ -10000,7 +10000,8 @@ const VCode = _ref => {
10000
10000
  visible,
10001
10001
  placeholder,
10002
10002
  onChange,
10003
- formatMessage
10003
+ formatMessage,
10004
+ name
10004
10005
  } = _ref;
10005
10006
  const [codeConfig, setCodeConfig] = useState(getConfig());
10006
10007
  const {
@@ -10021,8 +10022,10 @@ const VCode = _ref => {
10021
10022
  className: "vcode"
10022
10023
  }, /*#__PURE__*/React__default.createElement(Input, {
10023
10024
  placeholder: placeholder,
10024
- onChange: e => onChange(e.target.value === vcodeNumber)
10025
+ onChange: e => onChange(e.target.value.toUpperCase() === vcodeNumber.toUpperCase())
10025
10026
  }), /*#__PURE__*/React__default.createElement("div", {
10027
+ className: "vcode__box"
10028
+ }, /*#__PURE__*/React__default.createElement("div", {
10026
10029
  className: "vcode__image"
10027
10030
  }, /*#__PURE__*/React__default.createElement("canvas", {
10028
10031
  id: "bgi",
@@ -10041,19 +10044,25 @@ const VCode = _ref => {
10041
10044
  onClick: refresh
10042
10045
  }, formatMessage({
10043
10046
  id: 'common.click.refresh'
10044
- }))));
10047
+ }))), /*#__PURE__*/React__default.createElement(ErrorMessage, {
10048
+ className: "vcode__error",
10049
+ name: name,
10050
+ component: "div"
10051
+ })));
10045
10052
  };
10046
10053
  VCode.defaultProps = {
10047
10054
  visible: false,
10048
10055
  placeholder: undefined,
10049
10056
  onChange: () => {},
10050
- formatMessage: () => {}
10057
+ formatMessage: () => {},
10058
+ name: undefined
10051
10059
  };
10052
10060
  VCode.propTypes = {
10053
10061
  visible: PropTypes.bool,
10054
10062
  placeholder: PropTypes.string,
10055
10063
  onChange: PropTypes.func,
10056
- formatMessage: PropTypes.func
10064
+ formatMessage: PropTypes.func,
10065
+ name: PropTypes.string
10057
10066
  };
10058
10067
 
10059
10068
  var facebookLoginWithButton = {exports: {}};
@@ -11606,7 +11615,8 @@ const FormItem = _ref => {
11606
11615
  component = /*#__PURE__*/React__default.createElement(VCode, {
11607
11616
  placeholder: currentPlaceholder,
11608
11617
  onChange: pass => setFieldValue(field.name, pass),
11609
- formatMessage: formatMessage
11618
+ formatMessage: formatMessage,
11619
+ name: name
11610
11620
  });
11611
11621
  break;
11612
11622
  default:
@@ -11640,7 +11650,7 @@ const FormItem = _ref => {
11640
11650
  className: classNames('formItem__operator', {
11641
11651
  'formItem__operator--unsupport': !component
11642
11652
  })
11643
- }, component || 'Check component type is support on FormItem'), /*#__PURE__*/React__default.createElement(ErrorMessage, {
11653
+ }, component || 'Check component type is support on FormItem'), field.name === 'vcode' ? null : /*#__PURE__*/React__default.createElement(ErrorMessage, {
11644
11654
  className: "formItem__error",
11645
11655
  name: name,
11646
11656
  component: "div"
@@ -1,5 +1,5 @@
1
- export { C as default } from './ContactModal-a062b92c.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { C as default } from './ContactModal-ab8e5ab2.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './hoist-non-react-statics.cjs-3f408ad2.js';
@@ -13,7 +13,7 @@ import './Button-f86bbd40.js';
13
13
  import './style-inject.es-1f59c1d0.js';
14
14
  import './Spin-1762ce9c.js';
15
15
  import './_commonjsHelpers-70de2c37.js';
16
- import './Select-eb3c067e.js';
16
+ import './Select-7c0ef815.js';
17
17
  import './Empty-9a192c2a.js';
18
18
  import './createSvgIcon-e95160be.js';
19
19
  import './defaultTheme-ed7746fe.js';
@@ -1,9 +1,9 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { List, ListItem, ListItemIcon, ListItemText, IconButton, Drawer as Drawer$1, Divider } from '@material-ui/core';
5
5
  import { DehazeRounded } from '@material-ui/icons';
6
- import { S as Select } from './Select-eb3c067e.js';
6
+ import { S as Select } from './Select-7c0ef815.js';
7
7
  import { useHistory, useRouteMatch } from 'react-router-dom';
8
8
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
9
9
 
@@ -27,32 +27,27 @@ var checkLanguageSupport = function checkLanguageSupport(_ref) {
27
27
  return isSupport ? language : supportLanguages[0].value;
28
28
  };
29
29
 
30
- const DrawerList = _ref => {
31
- let {
32
- drawerList,
33
- setOpen
34
- } = _ref;
35
- const history = useHistory();
36
- const {
37
- url
38
- } = useRouteMatch();
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;
39
36
  return /*#__PURE__*/React__default.createElement(List, {
40
37
  className: "drawer__list"
41
- }, Array.isArray(drawerList) && drawerList.map((_ref2, index) => {
42
- let {
43
- name,
44
- icon,
45
- path
46
- } = _ref2;
38
+ }, Array.isArray(drawerList) && drawerList.map(function (_ref2, index) {
39
+ var name = _ref2.name,
40
+ icon = _ref2.icon,
41
+ path = _ref2.path;
47
42
  return /*#__PURE__*/React__default.createElement(ListItem, {
48
43
  button: true,
49
44
  key: index.toString(),
50
- onClick: () => {
45
+ onClick: function onClick() {
51
46
  if (path.indexOf('http') > -1) {
52
47
  window.location = path;
53
48
  } else {
54
49
  history.push({
55
- pathname: `${url}${path}`
50
+ pathname: "".concat(url).concat(path)
56
51
  });
57
52
  }
58
53
  setOpen(false);
@@ -1,10 +1,10 @@
1
- export { D as default } from './Drawer-6d519e05.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { D as default } from './Drawer-68ffa63e.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import '@material-ui/core';
6
6
  import '@material-ui/icons';
7
- import './Select-eb3c067e.js';
7
+ import './Select-7c0ef815.js';
8
8
  import './index-cbd6bca9.js';
9
9
  import './Empty-9a192c2a.js';
10
10
  import './style-inject.es-1f59c1d0.js';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useRef, useState } from 'react';
3
3
  import { c as classNames } from './index-cbd6bca9.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,10 +1,10 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState } from 'react';
3
3
  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-d55d6fa3.js';
7
+ import { f as fileDownload, j as jsonTxt, a as jsonExcel } from './dataExport-04b77185.js';
8
8
  import { getIntl } from './globalConfig';
9
9
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
10
10
 
@@ -1,12 +1,12 @@
1
- import { a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import * as React from 'react';
3
3
  import React__default, { Component, forwardRef, useState } from 'react';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
5
5
  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
- import { T as Tooltip } from './Tooltip-59ca3c6d.js';
9
- import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-d55d6fa3.js';
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';
10
10
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
11
11
 
12
12
  var __assign$3 = (undefined && undefined.__assign) || function () {
@@ -1,10 +1,10 @@
1
- export { E as default } from './ExtraTools-79c9c400.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { E as default } from './ExtraTools-5407d9de.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import './index-cbd6bca9.js';
5
5
  import 'prop-types';
6
6
  import './_commonjsHelpers-70de2c37.js';
7
7
  import '@material-ui/core';
8
- import './Tooltip-59ca3c6d.js';
8
+ import './Tooltip-21964965.js';
9
9
  import './style-inject.es-1f59c1d0.js';
10
- import './dataExport-d55d6fa3.js';
10
+ import './dataExport-04b77185.js';
@@ -1,4 +1,4 @@
1
- import { f as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { f as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useContext, createElement, useCallback } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -1,9 +1,9 @@
1
- import { c as _slicedToArray, _ as _typeof } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useEffect } from 'react';
3
3
  import { c as classNames } from './index-cbd6bca9.js';
4
4
  import PropTypes from 'prop-types';
5
5
  import axios from 'axios';
6
- import { C as ContactModal } from './ContactModal-a062b92c.js';
6
+ import { C as ContactModal } from './ContactModal-ab8e5ab2.js';
7
7
  import { S as Spin } from './Spin-1762ce9c.js';
8
8
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
9
9
  import './hoist-non-react-statics.cjs-3f408ad2.js';
@@ -13,7 +13,7 @@ import '@material-ui/core';
13
13
  import '@material-ui/icons';
14
14
  import './Button-f86bbd40.js';
15
15
  import './_commonjsHelpers-70de2c37.js';
16
- import './Select-eb3c067e.js';
16
+ import './Select-7c0ef815.js';
17
17
  import './Empty-9a192c2a.js';
18
18
  import './createSvgIcon-e95160be.js';
19
19
  import './defaultTheme-ed7746fe.js';
@@ -1,4 +1,4 @@
1
- import { d as _objectWithoutProperties } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useMemo } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { q as queryString } from './index-34fc27f1.js';
@@ -1,5 +1,5 @@
1
- export { F as default } from './ForwardLink-5dd46685.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { F as default } from './ForwardLink-2554a5d9.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-34fc27f1.js';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useRef, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -6,14 +6,14 @@ import { d as debounce_1 } from './debounce-127da66c.js';
6
6
  import { useHistory, useRouteMatch, NavLink } from 'react-router-dom';
7
7
  import { Typography, IconButton } from '@material-ui/core';
8
8
  import { SearchOutlined } from '@material-ui/icons';
9
- import { K as KeywordSearch } from './KeywordSearch-8ee9bf32.js';
10
- import { S as Select } from './Select-eb3c067e.js';
11
- import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-6d519e05.js';
9
+ import { K as KeywordSearch } from './KeywordSearch-a66db4e4.js';
10
+ import { S as Select } from './Select-7c0ef815.js';
11
+ import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-68ffa63e.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';
15
15
  import 'axios';
16
- import './Autocomplete-b9f7ea2b.js';
16
+ import './Autocomplete-83a79687.js';
17
17
  import '@material-ui/lab';
18
18
  import './createSvgIcon-e95160be.js';
19
19
  import './defaultTheme-ed7746fe.js';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState } from 'react';
3
3
  import { c as classNames } from './index-cbd6bca9.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useRef, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -1,10 +1,10 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
5
5
  import axios from 'axios';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
- import { A as Autocomplete } from './Autocomplete-b9f7ea2b.js';
7
+ import { A as Autocomplete } from './Autocomplete-83a79687.js';
8
8
 
9
9
  var css_248z = ".keywordSearch {\n border-radius: 4px;\n width: 100%;\n margin-right: 14px; }\n .keywordSearch--animation .autocomplete {\n transition: max-width 0.3s ease-out;\n max-width: 240px; }\n .keywordSearch--focus {\n flex: 1; }\n .keywordSearch--focus .autocomplete {\n max-width: 100%; }\n .keywordSearch .MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'] {\n border-radius: 10px;\n background-color: #ffffff66; }\n";
10
10
  styleInject(css_248z);
@@ -1,11 +1,11 @@
1
- export { K as default } from './KeywordSearch-8ee9bf32.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { K as default } from './KeywordSearch-a66db4e4.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-cbd6bca9.js';
6
6
  import 'axios';
7
7
  import './style-inject.es-1f59c1d0.js';
8
- import './Autocomplete-b9f7ea2b.js';
8
+ import './Autocomplete-83a79687.js';
9
9
  import './debounce-127da66c.js';
10
10
  import './isObjectLike-e111475d.js';
11
11
  import './_commonjsHelpers-70de2c37.js';
@@ -1,8 +1,8 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useRef, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
5
- import { F as ForwardLink } from './ForwardLink-5dd46685.js';
5
+ import { F as ForwardLink } from './ForwardLink-2554a5d9.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
7
  import './index-34fc27f1.js';
8
8
  import 'react-router-dom';
@@ -1,4 +1,4 @@
1
- import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default, { useState, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -2380,20 +2380,23 @@ var fonts = ['Noto Sans TC', 'Microsoft JhengHei', 'sans-serif', '-apple-system'
2380
2380
  var css_248z = "@import url(\"https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;500;700;900&display=swap\");\n";
2381
2381
  styleInject(css_248z);
2382
2382
 
2383
- var defaultColors = {
2383
+ const defaultColors = {
2384
2384
  primaryColor: '#0087dc',
2385
2385
  primaryColorFocus: '#339fe3',
2386
2386
  secondaryColor: '#ffc400'
2387
2387
  };
2388
2388
 
2389
2389
  // export const commonThemeProps = ({ darkMode, colors }) => {
2390
- var commonTheme = function commonTheme(_ref) {
2391
- var darkMode = _ref.darkMode,
2392
- colors = _ref.colors;
2393
- var _ref2 = colors || defaultColors,
2394
- primaryColor = _ref2.primaryColor,
2395
- secondaryColor = _ref2.secondaryColor;
2396
- var borderColor = darkMode ? '#8c8c8c' : '#d9d9d9';
2390
+ const commonTheme = _ref => {
2391
+ let {
2392
+ darkMode,
2393
+ colors
2394
+ } = _ref;
2395
+ const {
2396
+ primaryColor,
2397
+ secondaryColor
2398
+ } = colors || defaultColors;
2399
+ const borderColor = darkMode ? '#8c8c8c' : '#d9d9d9';
2397
2400
  return createTheme({
2398
2401
  typography: {
2399
2402
  button: {
@@ -2466,7 +2469,7 @@ var commonTheme = function commonTheme(_ref) {
2466
2469
  MuiInput: {
2467
2470
  root: {
2468
2471
  width: '100%',
2469
- border: "1px solid ".concat(borderColor),
2472
+ border: `1px solid ${borderColor}`,
2470
2473
  borderRadius: 3,
2471
2474
  padding: '2px 8px 0'
2472
2475
  },
@@ -2505,12 +2508,12 @@ var commonTheme = function commonTheme(_ref) {
2505
2508
  borderRadius: '2px',
2506
2509
  backgroundColor: darkMode ? '#595959' : '#f5f5f5',
2507
2510
  border: '1px solid',
2508
- borderColor: borderColor
2511
+ borderColor
2509
2512
  }
2510
2513
  },
2511
2514
  MuiOutlinedInput: {
2512
2515
  root: {
2513
- borderColor: borderColor,
2516
+ borderColor,
2514
2517
  '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
2515
2518
  borderWidth: '1px',
2516
2519
  boxShadow: '0 0 0 2px rgb(24 144 255 / 20%)'
@@ -2566,7 +2569,7 @@ var commonTheme = function commonTheme(_ref) {
2566
2569
  MuiDialogActions: {
2567
2570
  root: {
2568
2571
  padding: 12,
2569
- borderTop: "1px solid ".concat(borderColor)
2572
+ borderTop: `1px solid ${borderColor}`
2570
2573
  }
2571
2574
  }
2572
2575
  }
@@ -1,4 +1,4 @@
1
- import { d as _objectWithoutProperties$1 } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { c as _objectWithoutProperties$1 } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import * as React$2 from 'react';
3
3
  import React__default, { Children, isValidElement, cloneElement } from 'react';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { RadioGroup, FormControlLabel, Radio as Radio$1 } from '@material-ui/core';
@@ -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-79c9c400.js';
5
+ import { E as ExtraTools } from './ExtraTools-5407d9de.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
7
+ import './_rollupPluginBabelHelpers-a52356f6.js';
8
8
  import './_commonjsHelpers-70de2c37.js';
9
9
  import '@material-ui/core';
10
- import './Tooltip-59ca3c6d.js';
11
- import './dataExport-d55d6fa3.js';
10
+ import './Tooltip-21964965.js';
11
+ import './dataExport-04b77185.js';
12
12
 
13
13
  function sourceEvent() {
14
14
  var current = event, source;
@@ -1,4 +1,4 @@
1
- import { b as _objectSpread2, _ as _typeof } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { b as _objectSpread2, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-cbd6bca9.js';
@@ -1,5 +1,5 @@
1
- export { S as default } from './Select-eb3c067e.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { S as default } from './Select-7c0ef815.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-cbd6bca9.js';
@@ -1,4 +1,4 @@
1
- import { d as _objectWithoutProperties } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { TableContainer, Paper, Table as Table$1, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core';
@@ -1,7 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Tooltip as Tooltip$1 } from '@material-ui/core';
4
- import { a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.js';
4
+ import { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
5
5
  import { c as classNames } from './index-cbd6bca9.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
7
 
@@ -1,7 +1,7 @@
1
- export { T as default, p as placements } from './Tooltip-59ca3c6d.js';
1
+ export { T as default, p as placements } from './Tooltip-21964965.js';
2
2
  import 'react';
3
3
  import 'prop-types';
4
4
  import '@material-ui/core';
5
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
5
+ import './_rollupPluginBabelHelpers-a52356f6.js';
6
6
  import './index-cbd6bca9.js';
7
7
  import './style-inject.es-1f59c1d0.js';
@@ -139,4 +139,4 @@ function _nonIterableRest() {
139
139
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
140
140
  }
141
141
 
142
- export { _typeof as _, _extends as a, _objectSpread2 as b, _slicedToArray as c, _objectWithoutProperties as d, _defineProperty as e, _taggedTemplateLiteral as f };
142
+ export { _extends as _, _slicedToArray as a, _objectSpread2 as b, _objectWithoutProperties as c, _typeof as d, _defineProperty as e, _taggedTemplateLiteral as f };
@@ -34,56 +34,57 @@ var fileDownload = function(data, filename, mime, bom) {
34
34
  }
35
35
  };
36
36
 
37
- const jsonExcel = json => {
38
- let output = '';
37
+ var jsonExcel = function jsonExcel(json) {
38
+ var output = '';
39
39
  if (Array.isArray(json) && json.length > 0) {
40
- const keys = Object.keys(json[0]);
41
- output += `${keys.toString()}\n`;
42
- json.forEach(item => {
43
- keys.forEach(key => {
44
- output += `${item[key]},`;
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], ",");
45
45
  });
46
46
  output += '\n';
47
47
  });
48
48
  } else {
49
- const keys = Object.keys(json);
50
- output += `${keys.toString()}\n`;
51
- keys.forEach(key => {
52
- output += `${json[key]},`;
49
+ var _keys = Object.keys(json);
50
+ output += "".concat(_keys.toString(), "\n");
51
+ _keys.forEach(function (key) {
52
+ output += "".concat(json[key], ",");
53
53
  });
54
54
  output += '\n';
55
55
  }
56
56
  return output;
57
57
  };
58
- const jsonTxt = json => {
59
- let output = '';
58
+ var jsonTxt = function jsonTxt(json) {
59
+ var output = '';
60
60
  if (Array.isArray(json) && json.length > 0) {
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`;
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");
66
66
  });
67
67
  output += '\n';
68
68
  });
69
69
  } else {
70
- const keys = Object.keys(json);
71
- keys.forEach(key => {
72
- output += `${key}: ${json[key]}\n`;
70
+ var _keys2 = Object.keys(json);
71
+ _keys2.forEach(function (key) {
72
+ output += "".concat(key, ": ").concat(json[key], "\n");
73
73
  });
74
74
  }
75
75
  return output;
76
76
  };
77
- const snaToExcel = data => {
78
- const {
79
- links,
80
- nodes
81
- } = data || {};
77
+ var snaToExcel = function snaToExcel(data) {
78
+ var _ref = data || {},
79
+ links = _ref.links,
80
+ nodes = _ref.nodes;
82
81
  if (links && links.length > 0) {
83
- const result = links.map(link => ({
84
- From: nodes[link.source].name,
85
- To: nodes[link.target].name
86
- }));
82
+ var result = links.map(function (link) {
83
+ return {
84
+ From: nodes[link.source].name,
85
+ To: nodes[link.target].name
86
+ };
87
+ });
87
88
  return result;
88
89
  }
89
90
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "2.0.1-beta.81",
3
+ "version": "2.0.1-beta.82",
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",