@daoyi/nmtl-ui 2.0.1-beta.45 → 2.0.1-beta.47

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 (72) hide show
  1. package/lib/components/Autocomplete-5439ff22.js +333 -1
  2. package/lib/components/Autocomplete.js +12 -1
  3. package/lib/components/Avatar.js +51 -1
  4. package/lib/components/BackTop.js +82 -1
  5. package/lib/components/BarChart.js +132 -1
  6. package/lib/components/Breadcrumbs.js +124 -1
  7. package/lib/components/Button-63c7e9f3.js +91 -1
  8. package/lib/components/Button.js +8 -1
  9. package/lib/components/Carousel.js +61 -1
  10. package/lib/components/Checkbox.js +37 -1
  11. package/lib/components/CollapseContent.js +181 -1
  12. package/lib/components/ContactModal-a59bc808.js +924 -0
  13. package/lib/components/ContactModal.js +17 -1
  14. package/lib/components/Drawer-af3ed21a.js +157 -1
  15. package/lib/components/Drawer.js +13 -1
  16. package/lib/components/Dropdown.js +135 -1
  17. package/lib/components/Empty-70f040a9.js +44 -1
  18. package/lib/components/Empty.js +7 -1
  19. package/lib/components/ExportButton.js +114 -1
  20. package/lib/components/ExtraTools-f10a66a8.js +818 -1
  21. package/lib/components/ExtraTools.js +11 -1
  22. package/lib/components/Filter.js +90 -1
  23. package/lib/components/Footer.js +266 -1
  24. package/lib/components/ForwardLink.js +106 -1
  25. package/lib/components/Header.js +186 -1
  26. package/lib/components/Image.js +58 -1
  27. package/lib/components/Input.js +79 -1
  28. package/lib/components/InputMethod.js +23106 -1
  29. package/lib/components/KeywordSearch-224f84c1.js +138 -1
  30. package/lib/components/KeywordSearch.js +14 -1
  31. package/lib/components/KeywordTicker.js +182 -1
  32. package/lib/components/Keywords.js +292 -1
  33. package/lib/components/Loading.js +30 -1
  34. package/lib/components/MUITheme.js +255 -1
  35. package/lib/components/Modal-a7591b98.js +107 -1
  36. package/lib/components/Modal.js +11 -1
  37. package/lib/components/MoreButton-f15ca38e.js +109 -1
  38. package/lib/components/MoreButton.js +8 -1
  39. package/lib/components/Radio.js +81 -1
  40. package/lib/components/SNA.js +324 -1
  41. package/lib/components/Select-98a8e973.js +114 -1
  42. package/lib/components/Select.js +10 -1
  43. package/lib/components/Spin-690a3597.js +74 -1
  44. package/lib/components/Spin.js +8 -1
  45. package/lib/components/Table.js +51 -1
  46. package/lib/components/Tooltip-b7eb966d.js +69 -1
  47. package/lib/components/Tooltip.js +9 -1
  48. package/lib/components/_rollupPluginBabelHelpers-fde6d1c6.js +491 -1
  49. package/lib/components/dataExport-f418e6fe.js +56 -1
  50. package/lib/components/globalConfig.js +186 -1
  51. package/lib/components/vendor-851c6356.js +41893 -16
  52. package/lib/index.d.ts +1 -3
  53. package/lib/index.js +1 -3
  54. package/lib/utils/_rollupPluginBabelHelpers-a6e0e6e3.js +139 -1
  55. package/lib/utils/arrayMerge.js +100 -1
  56. package/lib/utils/chunkArray.js +15 -1
  57. package/lib/utils/convert2HtmlEntities.js +42 -1
  58. package/lib/utils/domToImage.js +32 -1
  59. package/lib/utils/downloadGephi.js +106 -1
  60. package/lib/utils/exportXlsx.js +184 -1
  61. package/lib/utils/historyAppendSearch.js +23 -1
  62. package/lib/utils/isDevelopMode.js +5 -1
  63. package/lib/utils/parseYMD.js +36 -1
  64. package/lib/utils/removeDuplicateItem.js +11 -1
  65. package/lib/utils/sendEmail.js +39 -1
  66. package/lib/utils/snaDefine-6a2bcd94.js +5 -1
  67. package/lib/utils/snaDefine.js +1 -1
  68. package/lib/utils/snaPreProcess.js +84 -1
  69. package/lib/utils/vendor-3ec75cc9.js +1289 -1
  70. package/package.json +1 -1
  71. package/lib/components/ContactModal-d7e2f8bb.js +0 -1
  72. package/lib/components/globalConfig-40069b54.js +0 -1
@@ -1 +1,11 @@
1
- export{E as default}from"./ExtraTools-f10a66a8.js";import"./_rollupPluginBabelHelpers-fde6d1c6.js";import"react";import"./vendor-851c6356.js";import"prop-types";import"react-is";import"@material-ui/styles";import"react-dom";import"@material-ui/core";import"./Tooltip-b7eb966d.js";import"./dataExport-f418e6fe.js";
1
+ export { E as default } from './ExtraTools-f10a66a8.js';
2
+ import './_rollupPluginBabelHelpers-fde6d1c6.js';
3
+ import 'react';
4
+ import './vendor-851c6356.js';
5
+ import 'prop-types';
6
+ import 'react-is';
7
+ import '@material-ui/styles';
8
+ import 'react-dom';
9
+ import '@material-ui/core';
10
+ import './Tooltip-b7eb966d.js';
11
+ import './dataExport-f418e6fe.js';
@@ -1 +1,90 @@
1
- import{h as t,e}from"./_rollupPluginBabelHelpers-fde6d1c6.js";import r from"react";import o from"prop-types";import{E as i,s as n,U as a,c as l}from"./vendor-851c6356.js";import{useHistory as s}from"react-router-dom";import"react-is";import"@material-ui/styles";import"react-dom";const c=t=>{let{history:e,...r}=t;if(e){const{search:t}=e.location;e.replace({search:i.stringify({...i.parse(t),...r})})}else console.error("error","historyAppendSearch needs history")};c.propTypes={history:o.objectOf(o.any).isRequired};var f;n("@charset \"UTF-8\";\n.filter {\n flex: 1;\n font-size: 1.5rem; }\n .filter__item {\n cursor: pointer; }\n .filter__item--active {\n font-weight: 500; }\n .filter__item--disabled {\n pointer-events: none; }\n .filter__item:hover {\n font-weight: 500; }\n .filter__item::after {\n content: '.'; }\n .filter__item:last-child::after {\n content: none; }\n");var m=function(o){var n=o.className,m=o.textColor,p=o.textHoverColor,d=o.filter,y=o.disabled,_=o.filterKey,u=s(),v=u.location.search,h=i.parse(v),b=a.span(f||(f=t(["\n\t\tcolor: ",";\n\t\t.filter__item--active {\n\t\t\tcolor: ",";\n\t\t}\n\t\t:hover {\n\t\t\tcolor: ",";\n\t\t}\n\t\t::after {\n\t\t\tcolor: ",";\n\t\t}\n\t"])),m,p||m,p||m,m);return r.createElement("div",{className:l("filter",n)},Array.isArray(d)&&d.filter((function(t){return"undefined"!==t.key})).map((function(t){var o=t.key,i=t.title,n=t.count;return r.createElement(b,{key:o,className:l("filter__item",{"filter__item--disabled":y},{"filter__item--active":o===h[_]}),onClick:function(){return c(e({history:u},_,o))}},"".concat(i,"(").concat(n,")"))})))};m.defaultProps={className:void 0,textColor:"#666",textHoverColor:void 0,filter:void 0,disabled:!1,filterKey:"filterType"},m.propTypes={className:o.string,textColor:o.string,textHoverColor:o.string,filter:o.arrayOf(o.any),disabled:o.bool,filterKey:o.string};export{m as default};
1
+ import { h as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-fde6d1c6.js';
2
+ import React__default from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { E as queryString, s as styleInject, U as He, c as classNames } from './vendor-851c6356.js';
5
+ import { useHistory } from 'react-router-dom';
6
+ import 'react-is';
7
+ import '@material-ui/styles';
8
+ import 'react-dom';
9
+
10
+ const historyAppendSearch = _ref => {
11
+ let {
12
+ history,
13
+ ...rest
14
+ } = _ref;
15
+ if (history) {
16
+ const {
17
+ search
18
+ } = history.location;
19
+ history.replace({
20
+ search: queryString.stringify({
21
+ ...queryString.parse(search),
22
+ ...rest
23
+ })
24
+ });
25
+ } else {
26
+ console.error('error', 'historyAppendSearch needs history');
27
+ }
28
+ };
29
+ historyAppendSearch.propTypes = {
30
+ /** react-router-dom 的 history */
31
+ history: PropTypes.objectOf(PropTypes.any).isRequired
32
+ };
33
+
34
+ var css_248z = "@charset \"UTF-8\";\n.filter {\n flex: 1;\n font-size: 1.5rem; }\n .filter__item {\n cursor: pointer; }\n .filter__item--active {\n font-weight: 500; }\n .filter__item--disabled {\n pointer-events: none; }\n .filter__item:hover {\n font-weight: 500; }\n .filter__item::after {\n content: '.'; }\n .filter__item:last-child::after {\n content: none; }\n";
35
+ styleInject(css_248z);
36
+
37
+ var _templateObject;
38
+ var Filter = function Filter(_ref) {
39
+ var className = _ref.className,
40
+ textColor = _ref.textColor,
41
+ textHoverColor = _ref.textHoverColor,
42
+ filter = _ref.filter,
43
+ disabled = _ref.disabled,
44
+ filterKey = _ref.filterKey;
45
+ var history = useHistory();
46
+ var search = history.location.search;
47
+ var urlSearch = queryString.parse(search);
48
+ var FilterItem = He.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\tcolor: ", ";\n\t\t.filter__item--active {\n\t\t\tcolor: ", ";\n\t\t}\n\t\t:hover {\n\t\t\tcolor: ", ";\n\t\t}\n\t\t::after {\n\t\t\tcolor: ", ";\n\t\t}\n\t"])), textColor, textHoverColor || textColor, textHoverColor || textColor, textColor);
49
+ return /*#__PURE__*/React__default.createElement("div", {
50
+ className: classNames('filter', className)
51
+ }, Array.isArray(filter) && filter.filter(function (_ref2) {
52
+ var key = _ref2.key;
53
+ return key !== 'undefined';
54
+ }).map(function (_ref3) {
55
+ var key = _ref3.key,
56
+ title = _ref3.title,
57
+ count = _ref3.count;
58
+ return /*#__PURE__*/React__default.createElement(FilterItem, {
59
+ key: key,
60
+ className: classNames('filter__item', {
61
+ 'filter__item--disabled': disabled
62
+ }, {
63
+ 'filter__item--active': key === urlSearch[filterKey]
64
+ }),
65
+ onClick: function onClick() {
66
+ return historyAppendSearch(_defineProperty({
67
+ history: history
68
+ }, filterKey, key));
69
+ }
70
+ }, "".concat(title, "(").concat(count, ")"));
71
+ }));
72
+ };
73
+ Filter.defaultProps = {
74
+ className: undefined,
75
+ textColor: '#666',
76
+ textHoverColor: undefined,
77
+ filter: undefined,
78
+ disabled: false,
79
+ filterKey: 'filterType'
80
+ };
81
+ Filter.propTypes = {
82
+ className: PropTypes.string,
83
+ textColor: PropTypes.string,
84
+ textHoverColor: PropTypes.string,
85
+ filter: PropTypes.arrayOf(PropTypes.any),
86
+ disabled: PropTypes.bool,
87
+ filterKey: PropTypes.string
88
+ };
89
+
90
+ export { Filter as default };