@daoyi/nmtl-ui 2.0.1-beta.13 → 2.0.1-beta.131

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/lib/components/Autocomplete-3b418e5f.js +494 -0
  2. package/lib/components/Autocomplete.js +20 -1
  3. package/lib/components/Avatar.js +59 -1
  4. package/lib/components/BackTop.js +124 -1
  5. package/lib/components/BarChart.js +764 -1
  6. package/lib/components/Breadcrumbs.js +122 -1
  7. package/lib/components/Button-7bd5aa09.js +114 -0
  8. package/lib/components/Button.js +7 -1
  9. package/lib/components/Carousel.js +4654 -1
  10. package/lib/components/Checkbox.js +37 -1
  11. package/lib/components/CollapseContent.js +180 -1
  12. package/lib/components/ContactModal-eaed02b8.js +12282 -0
  13. package/lib/components/ContactModal.js +24 -3
  14. package/lib/components/Drawer-629e59c7.js +176 -0
  15. package/lib/components/Drawer.js +17 -1
  16. package/lib/components/Dropdown.js +134 -1
  17. package/lib/components/Empty-c6a44967.js +46 -0
  18. package/lib/components/Empty.js +5 -1
  19. package/lib/components/ExportButton.js +128 -1
  20. package/lib/components/ExtraTools-2691c13e.js +3676 -0
  21. package/lib/components/ExtraTools.js +11 -22
  22. package/lib/components/Filter.js +821 -12
  23. package/lib/components/Footer.js +317 -1
  24. package/lib/components/ForwardLink-5fbd2705.js +184 -0
  25. package/lib/components/ForwardLink.js +10 -0
  26. package/lib/components/Header.js +233 -1
  27. package/lib/components/Image.js +61 -1
  28. package/lib/components/Input.js +89 -1
  29. package/lib/components/InputMethod.js +33949 -12
  30. package/lib/components/KeywordSearch-fec33a2c.js +156 -0
  31. package/lib/components/KeywordSearch.js +22 -1
  32. package/lib/components/KeywordTicker.js +224 -1
  33. package/lib/components/Keywords.js +383 -1
  34. package/lib/components/Loading.js +32 -1
  35. package/lib/components/MUITheme.js +2657 -1
  36. package/lib/components/Modal-e04532fa.js +127 -0
  37. package/lib/components/Modal.js +11 -1
  38. package/lib/components/MoreButton-19055e07.js +148 -0
  39. package/lib/components/MoreButton.js +8 -1
  40. package/lib/components/Pagination.js +3702 -0
  41. package/lib/components/Radio.js +83 -1
  42. package/lib/components/SNA.js +1755 -22
  43. package/lib/components/Select-cb3e1ba1.js +189 -0
  44. package/lib/components/Select.js +14 -1
  45. package/lib/components/Spin-8f87eadc.js +79 -0
  46. package/lib/components/Spin.js +7 -1
  47. package/lib/components/Table.js +51 -1
  48. package/lib/components/Tooltip-6ebfa9c1.js +70 -0
  49. package/lib/components/Tooltip.js +7 -1
  50. package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
  51. package/lib/components/_rollupPluginBabelHelpers-a52356f6.js +142 -0
  52. package/lib/components/createSvgIcon-e3803ee1.js +576 -0
  53. package/lib/components/dataExport-a9e3fae1.js +91 -0
  54. package/lib/components/debounce-127da66c.js +355 -0
  55. package/lib/components/defaultTheme-ed7746fe.js +1661 -0
  56. package/lib/components/globalConfig.js +429 -0
  57. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  58. package/lib/components/index-b47819f3.js +481 -0
  59. package/lib/components/index-b76a85f4.js +61 -0
  60. package/lib/components/isObjectLike-e111475d.js +190 -0
  61. package/lib/components/style-inject.es-1f59c1d0.js +28 -1
  62. package/lib/components/toConsumableArray-dbe8af76.js +19 -0
  63. package/lib/components/transform-849a452c.js +5475 -0
  64. package/lib/components/useTheme-d16d02d9.js +11 -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 +5 -1
  70. package/lib/index.js +5 -1
  71. package/lib/utils/_rollupPluginBabelHelpers-9802e640.js +121 -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 +221 -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 +134 -128
  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,124 @@
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-a52356f6.js';
2
+ import React__default, { useState, useRef, useEffect } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classNames } from './index-b76a85f4.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-e3803ee1.js';
8
+ import { getIntl } from './globalConfig';
9
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
10
+ import './isObjectLike-e111475d.js';
11
+ import './_commonjsHelpers-70de2c37.js';
12
+ import './defaultTheme-ed7746fe.js';
13
+ import 'react-is';
14
+ import '@material-ui/styles';
15
+ import 'react-dom';
16
+
17
+ var ExpandLessSharp = {};
18
+
19
+ var _interopRequireDefault = interopRequireDefault.exports;
20
+
21
+ var _interopRequireWildcard = interopRequireWildcard.exports;
22
+
23
+ Object.defineProperty(ExpandLessSharp, "__esModule", {
24
+ value: true
25
+ });
26
+ var default_1 = ExpandLessSharp.default = void 0;
27
+
28
+ var React = _interopRequireWildcard(React__default);
29
+
30
+ var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
31
+
32
+ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", {
33
+ d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"
34
+ }), 'ExpandLessSharp');
35
+
36
+ default_1 = ExpandLessSharp.default = _default;
37
+
38
+ 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}";
39
+ styleInject(css_248z);
40
+
41
+ var scrollToTop = function scrollToTop() {
42
+ if (window.scrollTo) {
43
+ window.scrollTo({
44
+ top: 0,
45
+ left: 0,
46
+ behavior: 'smooth'
47
+ });
48
+ } else {
49
+ window.scrollTop = 0;
50
+ }
51
+ };
52
+ var BackTop = function BackTop(props) {
53
+ var className = props.className,
54
+ visibilityHeight = props.visibilityHeight,
55
+ _onClick = props.onClick,
56
+ children = props.children;
57
+ var _useState = useState(false),
58
+ _useState2 = _slicedToArray(_useState, 2),
59
+ show = _useState2[0],
60
+ setShow = _useState2[1];
61
+ var scrollDebounce = useRef(debounce_1(function () {
62
+ var top = window.scrollY;
63
+ setShow(top >= visibilityHeight);
64
+ }, 100)).current;
65
+ useEffect(function () {
66
+ // const scrollEvent = () => scrollDebounce.current;
67
+ window.addEventListener('scroll', function () {
68
+ return scrollDebounce();
69
+ });
70
+ return function () {
71
+ window.removeEventListener('scroll', function () {
72
+ return scrollDebounce();
73
+ });
74
+ };
75
+ }, []);
76
+ return /*#__PURE__*/React__default.createElement(Fade, {
77
+ in: show,
78
+ timeout: 500,
79
+ unmountOnExit: true
80
+ }, /*#__PURE__*/React__default.createElement("div", {
81
+ className: classNames('backTop', className),
82
+ role: "button",
83
+ tabIndex: 0,
84
+ "aria-label": getIntl().formatMessage({
85
+ id: 'aria.backTop'
86
+ }),
87
+ onClick: function onClick() {
88
+ scrollToTop();
89
+ _onClick();
90
+ },
91
+ onKeyDown: function onKeyDown(event) {
92
+ if (event.key === 'Enter' || event.key === ' ') {
93
+ event.preventDefault();
94
+ scrollToTop();
95
+ _onClick();
96
+ }
97
+ }
98
+ }, children ? /*#__PURE__*/React__default.createElement("div", null, children) : /*#__PURE__*/React__default.createElement(NoSsr, null, /*#__PURE__*/React__default.createElement(Box, {
99
+ className: "backTop__default",
100
+ color: "primary.contrastText",
101
+ bgcolor: "primary.main",
102
+ borderColor: "text.secondary"
103
+ }, /*#__PURE__*/React__default.createElement(default_1, {
104
+ "aria-hidden": "true"
105
+ }), "Top"))));
106
+ };
107
+ BackTop.defaultProps = {
108
+ className: undefined,
109
+ visibilityHeight: 300,
110
+ onClick: function onClick() {},
111
+ children: undefined
112
+ };
113
+ BackTop.propTypes = {
114
+ /** Css Name */
115
+ className: PropTypes.string,
116
+ /** 可視返回Icon的高度偵測 */
117
+ visibilityHeight: PropTypes.number,
118
+ /** 點擊後的Callback */
119
+ onClick: PropTypes.func,
120
+ /** custom */
121
+ children: PropTypes.node
122
+ };
123
+
124
+ export { BackTop as default };