@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.
- package/lib/components/Autocomplete-5439ff22.js +333 -1
- package/lib/components/Autocomplete.js +12 -1
- package/lib/components/Avatar.js +51 -1
- package/lib/components/BackTop.js +82 -1
- package/lib/components/BarChart.js +132 -1
- package/lib/components/Breadcrumbs.js +124 -1
- package/lib/components/Button-63c7e9f3.js +91 -1
- package/lib/components/Button.js +8 -1
- package/lib/components/Carousel.js +61 -1
- package/lib/components/Checkbox.js +37 -1
- package/lib/components/CollapseContent.js +181 -1
- package/lib/components/ContactModal-a59bc808.js +924 -0
- package/lib/components/ContactModal.js +17 -1
- package/lib/components/Drawer-af3ed21a.js +157 -1
- package/lib/components/Drawer.js +13 -1
- package/lib/components/Dropdown.js +135 -1
- package/lib/components/Empty-70f040a9.js +44 -1
- package/lib/components/Empty.js +7 -1
- package/lib/components/ExportButton.js +114 -1
- package/lib/components/ExtraTools-f10a66a8.js +818 -1
- package/lib/components/ExtraTools.js +11 -1
- package/lib/components/Filter.js +90 -1
- package/lib/components/Footer.js +266 -1
- package/lib/components/ForwardLink.js +106 -1
- package/lib/components/Header.js +186 -1
- package/lib/components/Image.js +58 -1
- package/lib/components/Input.js +79 -1
- package/lib/components/InputMethod.js +23106 -1
- package/lib/components/KeywordSearch-224f84c1.js +138 -1
- package/lib/components/KeywordSearch.js +14 -1
- package/lib/components/KeywordTicker.js +182 -1
- package/lib/components/Keywords.js +292 -1
- package/lib/components/Loading.js +30 -1
- package/lib/components/MUITheme.js +255 -1
- package/lib/components/Modal-a7591b98.js +107 -1
- package/lib/components/Modal.js +11 -1
- package/lib/components/MoreButton-f15ca38e.js +109 -1
- package/lib/components/MoreButton.js +8 -1
- package/lib/components/Radio.js +81 -1
- package/lib/components/SNA.js +324 -1
- package/lib/components/Select-98a8e973.js +114 -1
- package/lib/components/Select.js +10 -1
- package/lib/components/Spin-690a3597.js +74 -1
- package/lib/components/Spin.js +8 -1
- package/lib/components/Table.js +51 -1
- package/lib/components/Tooltip-b7eb966d.js +69 -1
- package/lib/components/Tooltip.js +9 -1
- package/lib/components/_rollupPluginBabelHelpers-fde6d1c6.js +491 -1
- package/lib/components/dataExport-f418e6fe.js +56 -1
- package/lib/components/globalConfig.js +186 -1
- package/lib/components/vendor-851c6356.js +41893 -16
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -3
- package/lib/utils/_rollupPluginBabelHelpers-a6e0e6e3.js +139 -1
- package/lib/utils/arrayMerge.js +100 -1
- package/lib/utils/chunkArray.js +15 -1
- package/lib/utils/convert2HtmlEntities.js +42 -1
- package/lib/utils/domToImage.js +32 -1
- package/lib/utils/downloadGephi.js +106 -1
- package/lib/utils/exportXlsx.js +184 -1
- package/lib/utils/historyAppendSearch.js +23 -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 -1
- package/lib/utils/snaDefine.js +1 -1
- package/lib/utils/snaPreProcess.js +84 -1
- package/lib/utils/vendor-3ec75cc9.js +1289 -1
- package/package.json +1 -1
- package/lib/components/ContactModal-d7e2f8bb.js +0 -1
- package/lib/components/globalConfig-40069b54.js +0 -1
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export{E as default}from
|
|
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';
|
package/lib/components/Filter.js
CHANGED
|
@@ -1 +1,90 @@
|
|
|
1
|
-
import{h as
|
|
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 };
|