@daoyi/nmtl-ui 2.0.1-beta.9 → 2.0.1-beta.90
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/README.md +45 -45
- package/lib/components/Autocomplete-24e9686d.js +423 -0
- package/lib/components/Autocomplete.js +19 -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-430d39e6.js +92 -0
- package/lib/components/Button.js +6 -1
- package/lib/components/Carousel.js +4713 -1
- package/lib/components/Checkbox.js +37 -1
- package/lib/components/CollapseContent.js +179 -1
- package/lib/components/ContactModal-523ae294.js +12030 -0
- package/lib/components/ContactModal.js +22 -3
- package/lib/components/Drawer-ec47e780.js +156 -0
- package/lib/components/Drawer.js +11 -1
- package/lib/components/Dropdown.js +134 -1
- package/lib/components/Empty-dc5fc2fc.js +45 -0
- package/lib/components/Empty.js +5 -1
- package/lib/components/ExportButton.js +112 -1
- package/lib/components/ExtraTools-0ffc772b.js +3598 -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-15222b22.js +106 -0
- package/lib/components/ForwardLink.js +8 -0
- package/lib/components/Header.js +194 -1
- package/lib/components/Image.js +61 -1
- package/lib/components/Input.js +82 -1
- package/lib/components/InputMethod.js +33937 -10
- package/lib/components/KeywordSearch-91167d24.js +144 -0
- package/lib/components/KeywordSearch.js +21 -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-6b8c72d7.js +108 -0
- package/lib/components/Modal.js +9 -1
- package/lib/components/MoreButton-4d5d94da.js +110 -0
- package/lib/components/MoreButton.js +6 -1
- package/lib/components/Pagination.js +3637 -0
- package/lib/components/Radio.js +78 -1
- package/lib/components/SNA.js +1691 -22
- package/lib/components/Select-7da870e0.js +115 -0
- package/lib/components/Select.js +8 -1
- package/lib/components/Spin-9a07b106.js +75 -0
- package/lib/components/Spin.js +6 -1
- package/lib/components/Table.js +51 -1
- package/lib/components/Tooltip-6d53cb6e.js +70 -0
- package/lib/components/Tooltip.js +7 -1
- package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
- package/lib/components/_rollupPluginBabelHelpers-ed61ffc0.js +160 -0
- package/lib/components/createSvgIcon-ff0e3b99.js +576 -0
- package/lib/components/dataExport-d55d6fa3.js +92 -0
- package/lib/components/debounce-127da66c.js +355 -0
- package/lib/components/defaultTheme-ed7746fe.js +1661 -0
- package/lib/components/globalConfig.js +191 -0
- package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
- package/lib/components/index-a6f22b92.js +481 -0
- package/lib/components/index-f491ebce.js +61 -0
- package/lib/components/isObjectLike-e111475d.js +190 -0
- package/lib/components/style-inject.es-1f59c1d0.js +28 -1
- package/lib/components/toConsumableArray-dbe8af76.js +19 -0
- package/lib/components/transform-3a04288b.js +5475 -0
- package/lib/components/withTheme-2d778133.js +6 -0
- package/lib/configs/config.selector.js +151 -0
- package/lib/configs/index.d.ts +1 -0
- package/lib/configs/index.js +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/utils/_rollupPluginBabelHelpers-a6e0e6e3.js +139 -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 +125 -127
- 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-95ae0119.js +0 -1
- package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
- package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
|
@@ -1 +1,109 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-ed61ffc0.js';
|
|
2
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classNames } from './index-f491ebce.js';
|
|
5
|
+
import { d as debounce_1 } from './debounce-127da66c.js';
|
|
6
|
+
import { Fade, NoSsr, Box } from '@material-ui/core';
|
|
7
|
+
import { r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-ff0e3b99.js';
|
|
8
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
|
+
import './isObjectLike-e111475d.js';
|
|
10
|
+
import './_commonjsHelpers-70de2c37.js';
|
|
11
|
+
import './defaultTheme-ed7746fe.js';
|
|
12
|
+
import 'react-is';
|
|
13
|
+
import '@material-ui/styles';
|
|
14
|
+
import 'react-dom';
|
|
15
|
+
|
|
16
|
+
var ExpandLessSharp = {};
|
|
17
|
+
|
|
18
|
+
var _interopRequireDefault = interopRequireDefault.exports;
|
|
19
|
+
|
|
20
|
+
var _interopRequireWildcard = interopRequireWildcard.exports;
|
|
21
|
+
|
|
22
|
+
Object.defineProperty(ExpandLessSharp, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
});
|
|
25
|
+
var default_1 = ExpandLessSharp.default = void 0;
|
|
26
|
+
|
|
27
|
+
var React = _interopRequireWildcard(React__default);
|
|
28
|
+
|
|
29
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
30
|
+
|
|
31
|
+
var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", {
|
|
32
|
+
d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"
|
|
33
|
+
}), 'ExpandLessSharp');
|
|
34
|
+
|
|
35
|
+
default_1 = ExpandLessSharp.default = _default;
|
|
36
|
+
|
|
37
|
+
var css_248z = ".backTop {\n right: 30px;\n bottom: 50px;\n position: fixed;\n z-index: 10;\n opacity: 0;\n cursor: pointer;\n}\n.backTop__default {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 70px;\n height: 70px;\n border-radius: 45px;\n opacity: 0.8;\n transition: opacity 0.3s ease-in-out;\n}\n.backTop__default:hover {\n opacity: 1;\n}\n.backTop__default .MuiSvgIcon-root {\n margin-bottom: -3px;\n}\n.backTop:hover {\n opacity: 0.7;\n}\n\n@media only screen and (max-width: 484px) {\n .backTop {\n right: 15px;\n }\n}";
|
|
38
|
+
styleInject(css_248z);
|
|
39
|
+
|
|
40
|
+
var scrollToTop = function scrollToTop() {
|
|
41
|
+
if (window.scrollTo) {
|
|
42
|
+
window.scrollTo({
|
|
43
|
+
top: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
behavior: 'smooth'
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
window.scrollTop = 0;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var BackTop = function BackTop(props) {
|
|
52
|
+
var className = props.className,
|
|
53
|
+
visibilityHeight = props.visibilityHeight,
|
|
54
|
+
_onClick = props.onClick,
|
|
55
|
+
children = props.children;
|
|
56
|
+
var _useState = useState(false),
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
show = _useState2[0],
|
|
59
|
+
setShow = _useState2[1];
|
|
60
|
+
var scrollDebounce = useRef(debounce_1(function () {
|
|
61
|
+
var top = window.scrollY;
|
|
62
|
+
setShow(top >= visibilityHeight);
|
|
63
|
+
}, 100)).current;
|
|
64
|
+
useEffect(function () {
|
|
65
|
+
// const scrollEvent = () => scrollDebounce.current;
|
|
66
|
+
window.addEventListener('scroll', function () {
|
|
67
|
+
return scrollDebounce();
|
|
68
|
+
});
|
|
69
|
+
return function () {
|
|
70
|
+
window.removeEventListener('scroll', function () {
|
|
71
|
+
return scrollDebounce();
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
return /*#__PURE__*/React__default.createElement(Fade, {
|
|
76
|
+
in: show,
|
|
77
|
+
timeout: 500,
|
|
78
|
+
unmountOnExit: true
|
|
79
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
80
|
+
className: classNames('backTop', className),
|
|
81
|
+
onClick: function onClick() {
|
|
82
|
+
scrollToTop();
|
|
83
|
+
_onClick();
|
|
84
|
+
}
|
|
85
|
+
}, children ? /*#__PURE__*/React__default.createElement("div", null, children) : /*#__PURE__*/React__default.createElement(NoSsr, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
86
|
+
className: "backTop__default",
|
|
87
|
+
color: "text.primary",
|
|
88
|
+
bgcolor: "primary.main",
|
|
89
|
+
borderColor: "text.secondary"
|
|
90
|
+
}, /*#__PURE__*/React__default.createElement(default_1, null), "Top"))));
|
|
91
|
+
};
|
|
92
|
+
BackTop.defaultProps = {
|
|
93
|
+
className: undefined,
|
|
94
|
+
visibilityHeight: 300,
|
|
95
|
+
onClick: function onClick() {},
|
|
96
|
+
children: undefined
|
|
97
|
+
};
|
|
98
|
+
BackTop.propTypes = {
|
|
99
|
+
/** Css Name */
|
|
100
|
+
className: PropTypes.string,
|
|
101
|
+
/** 可視返回Icon的高度偵測 */
|
|
102
|
+
visibilityHeight: PropTypes.number,
|
|
103
|
+
/** 點擊後的Callback */
|
|
104
|
+
onClick: PropTypes.func,
|
|
105
|
+
/** custom */
|
|
106
|
+
children: PropTypes.node
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export { BackTop as default };
|