@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.
Files changed (104) hide show
  1. package/README.md +45 -45
  2. package/lib/components/Autocomplete-24e9686d.js +423 -0
  3. package/lib/components/Autocomplete.js +19 -1
  4. package/lib/components/Avatar.js +53 -1
  5. package/lib/components/BackTop.js +109 -1
  6. package/lib/components/BarChart.js +762 -1
  7. package/lib/components/Breadcrumbs.js +122 -1
  8. package/lib/components/Button-430d39e6.js +92 -0
  9. package/lib/components/Button.js +6 -1
  10. package/lib/components/Carousel.js +4713 -1
  11. package/lib/components/Checkbox.js +37 -1
  12. package/lib/components/CollapseContent.js +179 -1
  13. package/lib/components/ContactModal-523ae294.js +12030 -0
  14. package/lib/components/ContactModal.js +22 -3
  15. package/lib/components/Drawer-ec47e780.js +156 -0
  16. package/lib/components/Drawer.js +11 -1
  17. package/lib/components/Dropdown.js +134 -1
  18. package/lib/components/Empty-dc5fc2fc.js +45 -0
  19. package/lib/components/Empty.js +5 -1
  20. package/lib/components/ExportButton.js +112 -1
  21. package/lib/components/ExtraTools-0ffc772b.js +3598 -0
  22. package/lib/components/ExtraTools.js +10 -22
  23. package/lib/components/Filter.js +782 -12
  24. package/lib/components/Footer.js +271 -1
  25. package/lib/components/ForwardLink-15222b22.js +106 -0
  26. package/lib/components/ForwardLink.js +8 -0
  27. package/lib/components/Header.js +194 -1
  28. package/lib/components/Image.js +61 -1
  29. package/lib/components/Input.js +82 -1
  30. package/lib/components/InputMethod.js +33937 -10
  31. package/lib/components/KeywordSearch-91167d24.js +144 -0
  32. package/lib/components/KeywordSearch.js +21 -1
  33. package/lib/components/KeywordTicker.js +190 -1
  34. package/lib/components/Keywords.js +317 -1
  35. package/lib/components/Loading.js +28 -1
  36. package/lib/components/MUITheme.js +2624 -1
  37. package/lib/components/Modal-6b8c72d7.js +108 -0
  38. package/lib/components/Modal.js +9 -1
  39. package/lib/components/MoreButton-4d5d94da.js +110 -0
  40. package/lib/components/MoreButton.js +6 -1
  41. package/lib/components/Pagination.js +3637 -0
  42. package/lib/components/Radio.js +78 -1
  43. package/lib/components/SNA.js +1691 -22
  44. package/lib/components/Select-7da870e0.js +115 -0
  45. package/lib/components/Select.js +8 -1
  46. package/lib/components/Spin-9a07b106.js +75 -0
  47. package/lib/components/Spin.js +6 -1
  48. package/lib/components/Table.js +51 -1
  49. package/lib/components/Tooltip-6d53cb6e.js +70 -0
  50. package/lib/components/Tooltip.js +7 -1
  51. package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
  52. package/lib/components/_rollupPluginBabelHelpers-ed61ffc0.js +160 -0
  53. package/lib/components/createSvgIcon-ff0e3b99.js +576 -0
  54. package/lib/components/dataExport-d55d6fa3.js +92 -0
  55. package/lib/components/debounce-127da66c.js +355 -0
  56. package/lib/components/defaultTheme-ed7746fe.js +1661 -0
  57. package/lib/components/globalConfig.js +191 -0
  58. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  59. package/lib/components/index-a6f22b92.js +481 -0
  60. package/lib/components/index-f491ebce.js +61 -0
  61. package/lib/components/isObjectLike-e111475d.js +190 -0
  62. package/lib/components/style-inject.es-1f59c1d0.js +28 -1
  63. package/lib/components/toConsumableArray-dbe8af76.js +19 -0
  64. package/lib/components/transform-3a04288b.js +5475 -0
  65. package/lib/components/withTheme-2d778133.js +6 -0
  66. package/lib/configs/config.selector.js +151 -0
  67. package/lib/configs/index.d.ts +1 -0
  68. package/lib/configs/index.js +1 -0
  69. package/lib/index.d.ts +2 -0
  70. package/lib/index.js +2 -0
  71. package/lib/utils/_rollupPluginBabelHelpers-a6e0e6e3.js +139 -0
  72. package/lib/utils/arrayMerge.js +4953 -1
  73. package/lib/utils/chunkArray.js +15 -1
  74. package/lib/utils/convert2HtmlEntities.js +42 -1
  75. package/lib/utils/domToImage.js +802 -1
  76. package/lib/utils/downloadGephi.js +106 -1
  77. package/lib/utils/exportXlsx.js +219 -1
  78. package/lib/utils/historyAppendSearch.js +502 -1
  79. package/lib/utils/isDevelopMode.js +5 -1
  80. package/lib/utils/parseYMD.js +36 -1
  81. package/lib/utils/removeDuplicateItem.js +11 -1
  82. package/lib/utils/sendEmail.js +39 -1
  83. package/lib/utils/snaDefine-6a2bcd94.js +5 -0
  84. package/lib/utils/snaDefine.js +1 -1
  85. package/lib/utils/snaPreProcess.js +84 -1
  86. package/package.json +125 -127
  87. package/lib/components/Empty-54b79907.js +0 -1
  88. package/lib/components/KeywordSearch-5a393f12.js +0 -1
  89. package/lib/components/Select-f2441b83.js +0 -1
  90. package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
  91. package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
  92. package/lib/components/createSvgIcon-62b64929.js +0 -1
  93. package/lib/components/createSvgIcon-e24792d4.js +0 -1
  94. package/lib/components/createTheme-7fffa109.js +0 -1
  95. package/lib/components/dataExport-9fccd4f0.js +0 -1
  96. package/lib/components/debounce-c993109b.js +0 -1
  97. package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
  98. package/lib/components/index-11391ca3.js +0 -7
  99. package/lib/components/index-b2745105.js +0 -7
  100. package/lib/components/isObjectLike-2f1983fe.js +0 -1
  101. package/lib/components/style-inject.es-c875d022.js +0 -1
  102. package/lib/components/transform-95ae0119.js +0 -1
  103. package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
  104. package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
@@ -1 +1,109 @@
1
- import{a as e}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import n,{useState as o,useRef as t,useEffect as i}from"react";import r from"prop-types";import{u as a,b as l,c}from"./index-b2745105.js";import{d as s}from"./debounce-c993109b.js";import{Fade as p,NoSsr as d,Box as m}from"@material-ui/core";import{i as u,a as f,r as b}from"./createSvgIcon-e24792d4.js";import{s as v}from"./style-inject.es-1f59c1d0.js";import"@material-ui/styles";import"react-dom";var x=a(l((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var t=u(n),i=(0,f(b).default)(t.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}),"ExpandLessSharp");o.default=i})));v(".backTop {\n right: 30px;\n bottom: 50px;\n position: fixed;\n z-index: 10;\n opacity: 0;\n cursor: pointer; }\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 .backTop__default:hover {\n opacity: 1; }\n .backTop__default .MuiSvgIcon-root {\n margin-bottom: -3px; }\n .backTop:hover {\n opacity: 0.7; }\n\n@media only screen and (max-width: 484px) {\n .backTop {\n right: 15px; } }\n");var y=function(r){var a=r.className,l=r.visibilityHeight,u=r.onClick,f=r.children,b=o(!1),v=e(b,2),y=v[0],h=v[1],w=t(s((function(){var e=window.scrollY;h(e>=l)}),100)).current;return i((function(){return window.addEventListener("scroll",(function(){return w()})),function(){window.removeEventListener("scroll",(function(){return w()}))}}),[]),n.createElement(p,{in:y,timeout:500,unmountOnExit:!0},n.createElement("div",{className:c("backTop",a),onClick:function(){window.scrollTo?window.scrollTo({top:0,left:0,behavior:"smooth"}):window.scrollTop=0,u()}},f?n.createElement("div",null,f):n.createElement(d,null,n.createElement(m,{className:"backTop__default",color:"text.primary",bgcolor:"primary.main",borderColor:"text.secondary"},n.createElement(x,null),"Top"))))};y.defaultProps={className:void 0,visibilityHeight:300,onClick:function(){},children:void 0},y.propTypes={className:r.string,visibilityHeight:r.number,onClick:r.func,children:r.node};export{y as default};
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 };