@daoyi/nmtl-ui 2.0.1-beta.7 → 2.0.1-beta.70
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/Autocomplete-429c839b.js +335 -0
- package/lib/components/Autocomplete.js +13 -1
- package/lib/components/Avatar.js +53 -1
- package/lib/components/BackTop.js +109 -1
- package/lib/components/BarChart.js +762 -1
- package/lib/components/Breadcrumbs.js +122 -1
- package/lib/components/Button-4fddcd2f.js +92 -0
- package/lib/components/Button.js +6 -1
- package/lib/components/Carousel.js +4654 -1
- package/lib/components/Checkbox.js +37 -1
- package/lib/components/CollapseContent.js +179 -1
- package/lib/components/ContactModal-33f4e605.js +12020 -0
- package/lib/components/ContactModal.js +22 -3
- package/lib/components/Drawer-fb5bc1ec.js +157 -0
- package/lib/components/Drawer.js +11 -1
- package/lib/components/Dropdown.js +134 -1
- package/lib/components/Empty-e50b760e.js +45 -0
- package/lib/components/Empty.js +5 -1
- package/lib/components/ExportButton.js +112 -1
- package/lib/components/ExtraTools-a49a1d2f.js +3537 -0
- package/lib/components/ExtraTools.js +10 -22
- package/lib/components/Filter.js +782 -12
- package/lib/components/Footer.js +271 -1
- package/lib/components/ForwardLink-6a82c19d.js +106 -0
- package/lib/components/ForwardLink.js +8 -0
- package/lib/components/Header.js +187 -1
- package/lib/components/Image.js +61 -1
- package/lib/components/Input.js +82 -1
- package/lib/components/InputMethod.js +33949 -12
- package/lib/components/KeywordSearch-ae74e8e2.js +140 -0
- package/lib/components/KeywordSearch.js +15 -1
- package/lib/components/KeywordTicker.js +190 -1
- package/lib/components/Keywords.js +317 -1
- package/lib/components/Loading.js +28 -1
- package/lib/components/MUITheme.js +2624 -1
- package/lib/components/Modal-2c39d5b8.js +108 -0
- package/lib/components/Modal.js +9 -1
- package/lib/components/MoreButton-6b323fe4.js +110 -0
- package/lib/components/MoreButton.js +6 -1
- package/lib/components/Pagination.js +3706 -0
- package/lib/components/Radio.js +78 -1
- package/lib/components/SNA.js +1691 -22
- package/lib/components/Select-0f131640.js +115 -0
- package/lib/components/Select.js +8 -1
- package/lib/components/Spin-1741f625.js +75 -0
- package/lib/components/Spin.js +6 -1
- package/lib/components/Table.js +51 -1
- package/lib/components/Tooltip-65a21a86.js +70 -0
- package/lib/components/Tooltip.js +7 -1
- package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
- package/lib/components/_rollupPluginBabelHelpers-a52356f6.js +142 -0
- package/lib/components/createSvgIcon-d9801fb7.js +576 -0
- package/lib/components/dataExport-d55d6fa3.js +92 -0
- package/lib/components/debounce-127da66c.js +355 -0
- package/lib/components/defaultTheme-5839b9b3.js +1505 -0
- package/lib/components/globalConfig.js +175 -0
- package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
- package/lib/components/index-0be0afec.js +481 -0
- package/lib/components/index-ef96775f.js +61 -0
- package/lib/components/isObjectLike-e111475d.js +190 -0
- package/lib/components/style-inject.es-1f59c1d0.js +28 -1
- package/lib/components/transform-3a04288b.js +5475 -0
- package/lib/components/withTheme-4417822c.js +6 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/utils/_rollupPluginBabelHelpers-8dd26e1a.js +121 -0
- package/lib/utils/arrayMerge.js +4953 -1
- package/lib/utils/chunkArray.js +15 -1
- package/lib/utils/convert2HtmlEntities.js +42 -1
- package/lib/utils/domToImage.js +802 -1
- package/lib/utils/downloadGephi.js +106 -1
- package/lib/utils/exportXlsx.js +219 -1
- package/lib/utils/historyAppendSearch.js +502 -1
- package/lib/utils/isDevelopMode.js +5 -1
- package/lib/utils/parseYMD.js +36 -1
- package/lib/utils/removeDuplicateItem.js +11 -1
- package/lib/utils/sendEmail.js +39 -1
- package/lib/utils/snaDefine-6a2bcd94.js +5 -0
- package/lib/utils/snaDefine.js +1 -1
- package/lib/utils/snaPreProcess.js +84 -1
- package/package.json +17 -21
- package/lib/components/Empty-54b79907.js +0 -1
- package/lib/components/KeywordSearch-5a393f12.js +0 -1
- package/lib/components/Select-f2441b83.js +0 -1
- package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
- package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
- package/lib/components/createSvgIcon-62b64929.js +0 -1
- package/lib/components/createSvgIcon-e24792d4.js +0 -1
- package/lib/components/createTheme-7fffa109.js +0 -1
- package/lib/components/dataExport-9fccd4f0.js +0 -1
- package/lib/components/debounce-c993109b.js +0 -1
- package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
- package/lib/components/index-11391ca3.js +0 -7
- package/lib/components/index-b2745105.js +0 -7
- package/lib/components/isObjectLike-2f1983fe.js +0 -1
- package/lib/components/style-inject.es-c875d022.js +0 -1
- package/lib/components/transform-0eb2d36e.js +0 -1
- package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
- package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
|
@@ -1 +1,134 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
|
+
import React__default, { useRef, useState } from 'react';
|
|
3
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { Button, Menu, Divider, MenuItem, ListItemIcon, ListItemText } from '@material-ui/core';
|
|
6
|
+
import { makeStyles } from '@material-ui/styles';
|
|
7
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
8
|
+
|
|
9
|
+
var css_248z = "";
|
|
10
|
+
styleInject(css_248z);
|
|
11
|
+
|
|
12
|
+
var buttonType = {
|
|
13
|
+
default: 'outlined',
|
|
14
|
+
primary: 'contained',
|
|
15
|
+
link: 'text'
|
|
16
|
+
};
|
|
17
|
+
var Dropdown = function Dropdown(props) {
|
|
18
|
+
var className = props.className,
|
|
19
|
+
type = props.type,
|
|
20
|
+
disabled = props.disabled; // Attributes
|
|
21
|
+
|
|
22
|
+
var children = props.children,
|
|
23
|
+
icon = props.icon; // Node/Elements
|
|
24
|
+
|
|
25
|
+
var options = props.options; // Data List
|
|
26
|
+
|
|
27
|
+
var onOpen = props.onOpen,
|
|
28
|
+
_onClose = props.onClose,
|
|
29
|
+
getPopupContainer = props.getPopupContainer; // Callback List
|
|
30
|
+
|
|
31
|
+
var buttonRef = useRef(null);
|
|
32
|
+
var _useState = useState(false),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
open = _useState2[0],
|
|
35
|
+
setOpen = _useState2[1];
|
|
36
|
+
var useStyles = makeStyles(function () {
|
|
37
|
+
return {
|
|
38
|
+
root: {
|
|
39
|
+
opacity: 0.6,
|
|
40
|
+
pointerEvents: 'none',
|
|
41
|
+
cursor: 'pointer'
|
|
42
|
+
},
|
|
43
|
+
disabled: true
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
47
|
+
className: classNames('dropdown', className)
|
|
48
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
49
|
+
id: "basic-button",
|
|
50
|
+
ref: buttonRef,
|
|
51
|
+
"aria-controls": "basic-menu",
|
|
52
|
+
"aria-haspopup": "true",
|
|
53
|
+
"aria-expanded": open ? 'true' : undefined,
|
|
54
|
+
onClick: function onClick() {
|
|
55
|
+
if (options && Array.isArray(options) && options.length > 0) {
|
|
56
|
+
setOpen(true);
|
|
57
|
+
if (onOpen) onOpen();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
variant: buttonType[type] || 'text',
|
|
61
|
+
startIcon: icon || null,
|
|
62
|
+
disabled: disabled || false
|
|
63
|
+
}, children || null), /*#__PURE__*/React__default.createElement(Menu, {
|
|
64
|
+
id: "basic-menu",
|
|
65
|
+
getContentAnchorEl: null,
|
|
66
|
+
container: getPopupContainer || buttonRef.current,
|
|
67
|
+
anchorOrigin: {
|
|
68
|
+
vertical: 'bottom',
|
|
69
|
+
horizontal: 'center'
|
|
70
|
+
},
|
|
71
|
+
transformOrigin: {
|
|
72
|
+
vertical: 'top',
|
|
73
|
+
horizontal: 'center'
|
|
74
|
+
},
|
|
75
|
+
anchorEl: buttonRef.current,
|
|
76
|
+
open: open,
|
|
77
|
+
onClose: function onClose() {
|
|
78
|
+
setOpen(false);
|
|
79
|
+
if (_onClose) _onClose();
|
|
80
|
+
},
|
|
81
|
+
MenuListProps: {
|
|
82
|
+
'aria-labelledby': 'basic-button'
|
|
83
|
+
}
|
|
84
|
+
}, options && Array.isArray(options) && options.map(function (item, index) {
|
|
85
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
86
|
+
key: index.toString()
|
|
87
|
+
}, item.divider && /*#__PURE__*/React__default.createElement(Divider, null), /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
88
|
+
className: item.disabled ? useStyles().root : '',
|
|
89
|
+
onClick: function onClick() {
|
|
90
|
+
setOpen(false);
|
|
91
|
+
if (_onClose) _onClose();
|
|
92
|
+
if (item.onClick) item.onClick({
|
|
93
|
+
label: item.label,
|
|
94
|
+
value: item.value
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}, item.icon && /*#__PURE__*/React__default.createElement(ListItemIcon, null, item.icon), item.label && /*#__PURE__*/React__default.createElement(ListItemText, null, item.label)));
|
|
98
|
+
})));
|
|
99
|
+
};
|
|
100
|
+
Dropdown.defaultProps = {
|
|
101
|
+
className: undefined,
|
|
102
|
+
children: undefined,
|
|
103
|
+
icon: undefined,
|
|
104
|
+
type: 'link',
|
|
105
|
+
disabled: undefined,
|
|
106
|
+
options: undefined,
|
|
107
|
+
getPopupContainer: undefined,
|
|
108
|
+
onOpen: undefined,
|
|
109
|
+
onClose: undefined
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/* Write props detail information and 'npm run updateStory' will help you generate stories's argTypes */
|
|
113
|
+
Dropdown.propTypes = {
|
|
114
|
+
/** Css Name */
|
|
115
|
+
className: PropTypes.string,
|
|
116
|
+
/** 按鈕內容 */
|
|
117
|
+
children: PropTypes.node,
|
|
118
|
+
/** 按鈕左側Icon */
|
|
119
|
+
icon: PropTypes.node,
|
|
120
|
+
/** 按鈕類型 */
|
|
121
|
+
type: PropTypes.oneOf(Object.keys(buttonType)),
|
|
122
|
+
/** Menu按鈕是否禁用 */
|
|
123
|
+
disabled: PropTypes.bool,
|
|
124
|
+
/** Menu Data list */
|
|
125
|
+
options: PropTypes.arrayOf(PropTypes.any),
|
|
126
|
+
/** Menu content render by node */
|
|
127
|
+
getPopupContainer: PropTypes.func,
|
|
128
|
+
/** Menu 開啟 Callback */
|
|
129
|
+
onOpen: PropTypes.func,
|
|
130
|
+
/** Menu 關閉 Callback */
|
|
131
|
+
onClose: PropTypes.func
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export { Dropdown as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
4
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
5
|
+
|
|
6
|
+
var img = "data:image/svg+xml,%3csvg class='ant-empty-img-default' width='184' height='152' viewBox='0 0 184 152' xmlns='http://www.w3.org/2000/svg'%3e %3cg fill='none' fill-rule='evenodd'%3e %3cg transform='translate(24 31.67)'%3e %3cellipse fill='%23f5f5f5' fill-opacity='0.8' cx='67.797' cy='106.89' rx='67.797' ry='12.668'%3e%3c/ellipse%3e %3cpath fill='%23aeb8c2' d='M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z'%3e%3c/path%3e %3cpath fill='url(%23linearGradient-1)' d='M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z' transform='translate(13.56)'%3e%3c/path%3e %3cpath fill='%23f5f5f7' d='M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z'%3e%3c/path%3e %3cpath fill='%23dce0e6' d='M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z'%3e%3c/path%3e %3c/g%3e %3cpath fill='%23dce0e6' d='M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z'%3e%3c/path%3e %3cg fill='white' transform='translate(149.65 15.383)'%3e %3cellipse cx='20.654' cy='3.167' rx='2.849' ry='2.815'%3e%3c/ellipse%3e %3cpath d='M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z'%3e%3c/path%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
|
|
7
|
+
|
|
8
|
+
var css_248z = ".antd-empty {\n width: 100%;\n font-size: 1rem;\n line-height: 1.5715;\n text-align: center;\n overflow: hidden;\n height: 100%; }\n .antd-empty .ant-empty-image {\n height: 100px;\n margin-bottom: 8px; }\n .antd-empty .ant-empty-image img {\n height: calc(100% - 22px);\n margin: auto; }\n .antd-empty .antd-empty-description {\n color: rgba(0, 0, 0, 0.85); }\n";
|
|
9
|
+
styleInject(css_248z);
|
|
10
|
+
|
|
11
|
+
var Empty = function Empty(_ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
description = _ref.description,
|
|
14
|
+
emptySrc = _ref.emptySrc,
|
|
15
|
+
imageStyle = _ref.imageStyle;
|
|
16
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
17
|
+
className: classNames('antd-empty', className)
|
|
18
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
19
|
+
className: "ant-empty-image"
|
|
20
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
21
|
+
src: emptySrc || img,
|
|
22
|
+
alt: description,
|
|
23
|
+
style: imageStyle
|
|
24
|
+
}), description && /*#__PURE__*/React__default.createElement("div", {
|
|
25
|
+
className: "ant-empty-description"
|
|
26
|
+
}, description)));
|
|
27
|
+
};
|
|
28
|
+
Empty.defaultProps = {
|
|
29
|
+
className: undefined,
|
|
30
|
+
emptySrc: undefined,
|
|
31
|
+
description: 'No Data',
|
|
32
|
+
imageStyle: {}
|
|
33
|
+
};
|
|
34
|
+
Empty.propTypes = {
|
|
35
|
+
/** Css名稱 */
|
|
36
|
+
className: PropTypes.string,
|
|
37
|
+
/** 空白時圖案的Src */
|
|
38
|
+
emptySrc: PropTypes.string,
|
|
39
|
+
/** 描述 */
|
|
40
|
+
description: PropTypes.node,
|
|
41
|
+
/** 圖案的style */
|
|
42
|
+
imageStyle: PropTypes.objectOf(PropTypes.any)
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { Empty as E };
|
package/lib/components/Empty.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export { E as default } from './Empty-e50b760e.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import './index-ef96775f.js';
|
|
5
|
+
import './style-inject.es-1f59c1d0.js';
|
|
@@ -1 +1,112 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
5
|
+
import { ExitToApp } from '@material-ui/icons';
|
|
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';
|
|
8
|
+
import { getIntl } from './globalConfig';
|
|
9
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
10
|
+
|
|
11
|
+
var css_248z = ".exportButton {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n transition: color 0.3s ease-in-out;\n -webkit-user-select: none;\n user-select: none; }\n .exportButton--right {\n justify-content: flex-end; }\n .exportButton__text {\n display: flex;\n align-items: center;\n text-decoration: underline;\n cursor: pointer; }\n .exportButton__text__icon {\n font-size: 2rem;\n margin-right: 4px; }\n .exportButton__text:hover {\n font-weight: bold; }\n";
|
|
12
|
+
styleInject(css_248z);
|
|
13
|
+
|
|
14
|
+
var ExportButton = function ExportButton(_ref) {
|
|
15
|
+
var className = _ref.className,
|
|
16
|
+
color = _ref.color,
|
|
17
|
+
right = _ref.right,
|
|
18
|
+
forceTxt = _ref.forceTxt,
|
|
19
|
+
exportText = _ref.exportText,
|
|
20
|
+
exportTypeText = _ref.exportTypeText,
|
|
21
|
+
data = _ref.data;
|
|
22
|
+
var _getIntl = getIntl(),
|
|
23
|
+
formatMessage = _getIntl.formatMessage;
|
|
24
|
+
var _useState = useState(false),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
open = _useState2[0],
|
|
27
|
+
setOpen = _useState2[1];
|
|
28
|
+
var buttons = [{
|
|
29
|
+
type: 'CSV',
|
|
30
|
+
click: function click() {
|
|
31
|
+
return fileDownload("\uFEFF".concat(jsonExcel(data)), 'output.csv');
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
type: 'EXCEL',
|
|
35
|
+
click: function click() {
|
|
36
|
+
return fileDownload("\uFEFF".concat(jsonExcel(data)), 'output.xls');
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
type: 'TXT',
|
|
40
|
+
click: function click() {
|
|
41
|
+
return fileDownload("\uFEFF".concat(jsonTxt(data)), 'output.txt');
|
|
42
|
+
}
|
|
43
|
+
}];
|
|
44
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
45
|
+
style: {
|
|
46
|
+
color: color
|
|
47
|
+
},
|
|
48
|
+
className: classNames('exportButton', {
|
|
49
|
+
'exportButton--right': right
|
|
50
|
+
}, className)
|
|
51
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
52
|
+
className: "exportButton__text",
|
|
53
|
+
onClick: function onClick() {
|
|
54
|
+
return forceTxt ? fileDownload("\uFEFF".concat(jsonTxt(data)), 'output.txt') : setOpen(true);
|
|
55
|
+
}
|
|
56
|
+
}, /*#__PURE__*/React__default.createElement(ExitToApp, {
|
|
57
|
+
className: "exportButton__text__icon"
|
|
58
|
+
}), exportText || formatMessage({
|
|
59
|
+
id: 'common.export'
|
|
60
|
+
})), /*#__PURE__*/React__default.createElement(Dialog, {
|
|
61
|
+
open: open,
|
|
62
|
+
keepMounted: true,
|
|
63
|
+
onClose: function onClose() {
|
|
64
|
+
return setOpen(false);
|
|
65
|
+
},
|
|
66
|
+
"aria-labelledby": "alert-dialog-slide-title",
|
|
67
|
+
"aria-describedby": "alert-dialog-slide-description"
|
|
68
|
+
}, /*#__PURE__*/React__default.createElement(DialogContent, null, /*#__PURE__*/React__default.createElement(DialogContentText, null, exportTypeText || formatMessage({
|
|
69
|
+
id: 'common.export.type'
|
|
70
|
+
}))), /*#__PURE__*/React__default.createElement(DialogActions, null, buttons.map(function (_ref2) {
|
|
71
|
+
var type = _ref2.type,
|
|
72
|
+
click = _ref2.click;
|
|
73
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
74
|
+
key: type,
|
|
75
|
+
variant: "text",
|
|
76
|
+
onClick: function onClick() {
|
|
77
|
+
click();
|
|
78
|
+
setOpen(false);
|
|
79
|
+
}
|
|
80
|
+
}, type);
|
|
81
|
+
}))));
|
|
82
|
+
};
|
|
83
|
+
ExportButton.defaultProps = {
|
|
84
|
+
className: undefined,
|
|
85
|
+
color: '#4e3a16',
|
|
86
|
+
right: undefined,
|
|
87
|
+
forceTxt: true,
|
|
88
|
+
// 聽說Excel怪怪的 先強制隱藏
|
|
89
|
+
exportText: undefined,
|
|
90
|
+
exportTypeText: 'Export Type',
|
|
91
|
+
data: undefined
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/* Write props detail information and 'npm run updateStory' will help you generate stories's argTypes */
|
|
95
|
+
ExportButton.propTypes = {
|
|
96
|
+
/** Css Name */
|
|
97
|
+
className: PropTypes.string,
|
|
98
|
+
/** 主題顏色 */
|
|
99
|
+
color: PropTypes.string,
|
|
100
|
+
/** 靠右起來 */
|
|
101
|
+
right: PropTypes.bool,
|
|
102
|
+
/** 匯出是否強制txt */
|
|
103
|
+
forceTxt: PropTypes.bool,
|
|
104
|
+
/** 匯出的文字 */
|
|
105
|
+
exportText: PropTypes.string,
|
|
106
|
+
/** 匯出類型的文字 */
|
|
107
|
+
exportTypeText: PropTypes.string,
|
|
108
|
+
/** 要匯出的JSON資料 */
|
|
109
|
+
data: PropTypes.oneOfType([PropTypes.objectOf(PropTypes.any), PropTypes.arrayOf(PropTypes.any)])
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { ExportButton as default };
|