@daoyi/nmtl-ui 2.0.1-beta.76 → 2.0.1-beta.77

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 (36) hide show
  1. package/lib/components/{Autocomplete-a2b6831e.js → Autocomplete-6f14f9ae.js} +72 -67
  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-88f7d810.js → ContactModal-6877182a.js} +2 -2
  8. package/lib/components/ContactModal.js +3 -3
  9. package/lib/components/{Drawer-ae2af6ec.js → Drawer-47f9967c.js} +2 -2
  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-c316a0ec.js → ExtraTools-97665703.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-9adcd9e4.js → ForwardLink-17f61eb0.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-58da143a.js → KeywordSearch-85e5e07b.js} +3 -3
  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/Pagination.js +1 -1
  27. package/lib/components/Radio.js +1 -1
  28. package/lib/components/SNA.js +4 -4
  29. package/lib/components/{Select-72b835df.js → Select-a607a0d4.js} +1 -1
  30. package/lib/components/Select.js +2 -2
  31. package/lib/components/Table.js +1 -1
  32. package/lib/components/{Tooltip-b67d73c0.js → Tooltip-f1cd39ef.js} +1 -1
  33. package/lib/components/Tooltip.js +2 -2
  34. package/lib/components/{_rollupPluginBabelHelpers-a52356f6.js → _rollupPluginBabelHelpers-7eb4ffba.js} +1 -1
  35. package/lib/components/{dataExport-d55d6fa3.js → dataExport-04b77185.js} +31 -30
  36. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { _ as _extends$1, a as _slicedToArray, b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { _ as _typeof, a as _extends$1, b as _objectSpread2, c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.js';
@@ -87,21 +87,23 @@ var Box = styled('div')(styleFunction, {
87
87
  name: 'MuiBox'
88
88
  });
89
89
 
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)
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
+ }
105
107
  // typeof item === 'object' ? item.label === value : item === value
106
108
  );
107
109
 
@@ -109,32 +111,30 @@ var useAutocomplete = (_ref => {
109
111
  // console.log('value', value);
110
112
  // console.log('finder', finder);
111
113
  if (finder) {
112
- return typeof finder === 'object' ? finder.label : finder;
114
+ return _typeof(finder) === 'object' ? finder.label : finder;
113
115
  }
114
- return typeof value === 'object' ? value.label : value;
116
+ return _typeof(value) === 'object' ? value.label : value;
115
117
  }, [options]);
116
118
 
117
119
  /* 若MUI的Autocomplete下方的options列表要勾選已選的項目 必須從options取出才可 */
118
- const getValueFromOptions = useCallback(defaultValue => {
120
+ var getValueFromOptions = useCallback(function (defaultValue) {
119
121
  if (Array.isArray(options)) {
120
122
  if (Array.isArray(defaultValue)) {
121
123
  return defaultValue.map(
122
124
  // item有可能為 object({ label, value }) 或 string(value)
123
- item => options.find(_ref2 => {
124
- let {
125
- value
126
- } = _ref2;
127
- return item === value || item.value === value;
128
- }) || item
125
+ function (item) {
126
+ return options.find(function (_ref2) {
127
+ var value = _ref2.value;
128
+ return item === value || item.value === value;
129
+ }) || item;
130
+ }
129
131
  // if (typeof item === 'object') return options.find(({ value }) => item.value === value) || item;
130
132
  // return item;
131
133
  );
132
134
  }
133
135
 
134
- const result = options.find(_ref3 => {
135
- let {
136
- value
137
- } = _ref3;
136
+ var result = options.find(function (_ref3) {
137
+ var value = _ref3.value;
138
138
  return defaultValue === value;
139
139
  });
140
140
  return labelInValue ? defaultValue : result || {
@@ -144,45 +144,50 @@ var useAutocomplete = (_ref => {
144
144
  }
145
145
  return defaultValue;
146
146
  }, [options, labelInValue]);
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: '0',
176
- position: 'absolute'
177
- }
178
- }, /*#__PURE__*/React__default.createElement(default_1, null)), params.InputProps.endAdornment)
179
- }
180
- })), [loading, searchIcon, arrowIcon]);
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: '0',
180
+ position: 'absolute'
181
+ }
182
+ }, /*#__PURE__*/React__default.createElement(default_1, null)), params.InputProps.endAdornment)
183
+ })
184
+ }));
185
+ }, [loading, searchIcon, arrowIcon]);
181
186
  return {
182
- getValue,
183
- getValueFromOptions,
184
- defaultTag,
185
- defaultRenderInput
187
+ getValue: getValue,
188
+ getValueFromOptions: getValueFromOptions,
189
+ defaultTag: defaultTag,
190
+ defaultRenderInput: defaultRenderInput
186
191
  };
187
192
  });
188
193
 
@@ -1,5 +1,5 @@
1
- export { A as default } from './Autocomplete-a2b6831e.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { A as default } from './Autocomplete-6f14f9ae.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-8aa477f6.js';
@@ -1,4 +1,4 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.js';
@@ -1,4 +1,4 @@
1
- import { c as _objectWithoutProperties$1, b as _objectSpread2, _ as _extends$3 } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { d as _objectWithoutProperties$1, b as _objectSpread2, a as _extends$3 } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { forwardRef, useRef, useImperativeHandle } from 'react';
3
3
  import { a as classnames, c as classNames } from './index-8aa477f6.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { c as _objectWithoutProperties, _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { d as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.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 { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { useState, useRef, useEffect } from 'react';
3
3
  import { c as classNames } from './index-8aa477f6.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { _ as _extends$1, a as _slicedToArray$2, b as _objectSpread2, e as _defineProperty$1 } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { a as _extends$1, c as _slicedToArray$2, b as _objectSpread2, e as _defineProperty$1 } from './_rollupPluginBabelHelpers-7eb4ffba.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-1e6d1b61.js';
7
7
  import { c as commonjsGlobal, a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
8
8
  import { c as classNames } from './index-8aa477f6.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-72b835df.js';
10
+ import { S as Select } from './Select-a607a0d4.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-b2072aa6.js';
13
13
  import { getIntl } from './globalConfig';
@@ -1,5 +1,5 @@
1
- export { C as default } from './ContactModal-88f7d810.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { C as default } from './ContactModal-6877182a.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.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-3d002693.js';
13
13
  import './style-inject.es-1f59c1d0.js';
14
14
  import './Spin-a5ff6ede.js';
15
15
  import './_commonjsHelpers-70de2c37.js';
16
- import './Select-72b835df.js';
16
+ import './Select-a607a0d4.js';
17
17
  import './Empty-b674a51e.js';
18
18
  import './createSvgIcon-b2072aa6.js';
19
19
  import './defaultTheme-ed7746fe.js';
@@ -1,9 +1,9 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-72b835df.js';
6
+ import { S as Select } from './Select-a607a0d4.js';
7
7
  import { useHistory, useRouteMatch } from 'react-router-dom';
8
8
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
9
9
 
@@ -1,10 +1,10 @@
1
- export { D as default } from './Drawer-ae2af6ec.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { D as default } from './Drawer-47f9967c.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.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-72b835df.js';
7
+ import './Select-a607a0d4.js';
8
8
  import './index-8aa477f6.js';
9
9
  import './Empty-b674a51e.js';
10
10
  import './style-inject.es-1f59c1d0.js';
@@ -1,4 +1,4 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { useRef, useState } from 'react';
3
3
  import { c as classNames } from './index-8aa477f6.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,10 +1,10 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-8aa477f6.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 { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.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-b67d73c0.js';
9
- import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-d55d6fa3.js';
8
+ import { T as Tooltip } from './Tooltip-f1cd39ef.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-c316a0ec.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { E as default } from './ExtraTools-97665703.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
3
3
  import 'react';
4
4
  import './index-8aa477f6.js';
5
5
  import 'prop-types';
6
6
  import './_commonjsHelpers-70de2c37.js';
7
7
  import '@material-ui/core';
8
- import './Tooltip-b67d73c0.js';
8
+ import './Tooltip-f1cd39ef.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-a52356f6.js';
1
+ import { f as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.js';
@@ -1,9 +1,9 @@
1
- import { a as _slicedToArray, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray, _ as _typeof } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { useState, useEffect } from 'react';
3
3
  import { c as classNames } from './index-8aa477f6.js';
4
4
  import PropTypes from 'prop-types';
5
5
  import axios from 'axios';
6
- import { C as ContactModal } from './ContactModal-88f7d810.js';
6
+ import { C as ContactModal } from './ContactModal-6877182a.js';
7
7
  import { S as Spin } from './Spin-a5ff6ede.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-3d002693.js';
15
15
  import './_commonjsHelpers-70de2c37.js';
16
- import './Select-72b835df.js';
16
+ import './Select-a607a0d4.js';
17
17
  import './Empty-b674a51e.js';
18
18
  import './createSvgIcon-b2072aa6.js';
19
19
  import './defaultTheme-ed7746fe.js';
@@ -1,4 +1,4 @@
1
- import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { d as _objectWithoutProperties } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { useMemo } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { q as queryString } from './index-b1cfc87c.js';
@@ -1,5 +1,5 @@
1
- export { F as default } from './ForwardLink-9adcd9e4.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { F as default } from './ForwardLink-17f61eb0.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-b1cfc87c.js';
@@ -1,4 +1,4 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.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-58da143a.js';
10
- import { S as Select } from './Select-72b835df.js';
11
- import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-ae2af6ec.js';
9
+ import { K as KeywordSearch } from './KeywordSearch-85e5e07b.js';
10
+ import { S as Select } from './Select-a607a0d4.js';
11
+ import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-47f9967c.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-a2b6831e.js';
16
+ import './Autocomplete-6f14f9ae.js';
17
17
  import '@material-ui/lab';
18
18
  import './createSvgIcon-b2072aa6.js';
19
19
  import './defaultTheme-ed7746fe.js';
@@ -1,4 +1,4 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default, { useState } from 'react';
3
3
  import { c as classNames } from './index-8aa477f6.js';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.js';
@@ -1,10 +1,10 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.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-a2b6831e.js';
7
+ import { A as Autocomplete } from './Autocomplete-6f14f9ae.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);
@@ -43,7 +43,7 @@ var KeywordSearch = function KeywordSearch(_ref) {
43
43
 
44
44
  // 過濾特定符號
45
45
  var escapeRegExpKeyword = function escapeRegExpKeyword(string) {
46
- return string.replace(/[-"':.*+?^${}()|[\]\\]/g, '\\\\$&');
46
+ return string.replace(/[-"':.*+?^${}()|[\]\\ ]/g, '\\\\$&');
47
47
  }; // $& means the whole matched string
48
48
  var fetchSearchList = function fetchSearchList(text) {
49
49
  if (!text || text.length === 0) return;
@@ -1,11 +1,11 @@
1
- export { K as default } from './KeywordSearch-58da143a.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { K as default } from './KeywordSearch-85e5e07b.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-8aa477f6.js';
6
6
  import 'axios';
7
7
  import './style-inject.es-1f59c1d0.js';
8
- import './Autocomplete-a2b6831e.js';
8
+ import './Autocomplete-6f14f9ae.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 { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.js';
5
- import { F as ForwardLink } from './ForwardLink-9adcd9e4.js';
5
+ import { F as ForwardLink } from './ForwardLink-17f61eb0.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
7
  import './index-b1cfc87c.js';
8
8
  import 'react-router-dom';
@@ -1,4 +1,4 @@
1
- import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { c as _slicedToArray } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.js';
@@ -1,4 +1,4 @@
1
- import { c as _objectWithoutProperties$1 } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { d as _objectWithoutProperties$1 } from './_rollupPluginBabelHelpers-7eb4ffba.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-a52356f6.js';
1
+ import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-7eb4ffba.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-8aa477f6.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-c316a0ec.js';
5
+ import { E as ExtraTools } from './ExtraTools-97665703.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
- import './_rollupPluginBabelHelpers-a52356f6.js';
7
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
8
8
  import './_commonjsHelpers-70de2c37.js';
9
9
  import '@material-ui/core';
10
- import './Tooltip-b67d73c0.js';
11
- import './dataExport-d55d6fa3.js';
10
+ import './Tooltip-f1cd39ef.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, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { b as _objectSpread2, _ as _typeof } from './_rollupPluginBabelHelpers-7eb4ffba.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { c as classNames } from './index-8aa477f6.js';
@@ -1,5 +1,5 @@
1
- export { S as default } from './Select-72b835df.js';
2
- import './_rollupPluginBabelHelpers-a52356f6.js';
1
+ export { S as default } from './Select-a607a0d4.js';
2
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import './index-8aa477f6.js';
@@ -1,4 +1,4 @@
1
- import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
1
+ import { d as _objectWithoutProperties } from './_rollupPluginBabelHelpers-7eb4ffba.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 { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
4
+ import { a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.js';
5
5
  import { c as classNames } from './index-8aa477f6.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-b67d73c0.js';
1
+ export { T as default, p as placements } from './Tooltip-f1cd39ef.js';
2
2
  import 'react';
3
3
  import 'prop-types';
4
4
  import '@material-ui/core';
5
- import './_rollupPluginBabelHelpers-a52356f6.js';
5
+ import './_rollupPluginBabelHelpers-7eb4ffba.js';
6
6
  import './index-8aa477f6.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 { _extends as _, _slicedToArray as a, _objectSpread2 as b, _objectWithoutProperties as c, _typeof as d, _defineProperty as e, _taggedTemplateLiteral as f };
142
+ export { _typeof as _, _extends as a, _objectSpread2 as b, _slicedToArray as c, _objectWithoutProperties 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.76",
3
+ "version": "2.0.1-beta.77",
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",