tntd 1.3.62 → 1.3.65

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 (62) hide show
  1. package/babel.config.js +13 -3
  2. package/components/QueryListScene/List.js +26 -25
  3. package/lib/ArrayInput/index.js +8 -8
  4. package/lib/Columns/index.js +4 -4
  5. package/lib/DevelopmentLogin/LoginModal.js +8 -8
  6. package/lib/Ellipsis/index.js +4 -4
  7. package/lib/Handle/index.js +6 -6
  8. package/lib/Layout/AppList.js +10 -10
  9. package/lib/Layout/Application.js +2 -2
  10. package/lib/Layout/Avatar.js +4 -4
  11. package/lib/Layout/CompatibleLanguage.js +2 -2
  12. package/lib/Layout/EnterpriseLayout/Avatar.js +6 -6
  13. package/lib/Layout/EnterpriseLayout/Theme.js +2 -2
  14. package/lib/Layout/HeaderActions.js +2 -2
  15. package/lib/Layout/Layout.js +2 -2
  16. package/lib/Layout/OrgAppList.js +6 -6
  17. package/lib/Layout/SideMenu.js +2 -2
  18. package/lib/Layout/Theme.js +2 -2
  19. package/lib/Layout/paaslayout/index.js +2 -2
  20. package/lib/LoadingButton/index.js +2 -2
  21. package/lib/Modal/index.js +2 -2
  22. package/lib/Page/Box.js +2 -2
  23. package/lib/QueryForm/Field/Checkbox.js +2 -2
  24. package/lib/QueryForm/Field/Select.js +2 -2
  25. package/lib/QueryForm/Field/SelectInput.js +4 -4
  26. package/lib/QueryForm/Field/fieldsMap.js +6 -6
  27. package/lib/QueryForm/Field/index.js +2 -2
  28. package/lib/QueryForm/index.js +8 -8
  29. package/lib/QueryListScene/List.js +30 -26
  30. package/lib/Select/index.js +4 -4
  31. package/lib/Table/ResizableTable/index.js +2 -2
  32. package/lib/Table/index.js +2 -2
  33. package/package.json +4 -1
  34. package/scripts/postbuild.sh +5 -0
  35. package/lib/0645cf743e4e44ca9da321d689897f07.png +0 -0
  36. package/lib/09db77de0c24fa0f45f8a5cf299a3d11.png +0 -0
  37. package/lib/1d0b52448de217857b270af807e9360d.png +0 -0
  38. package/lib/25d78d77c9c2f0d403e5d899ceb5b1ef.png +0 -0
  39. package/lib/27fa44ff0c98e1594d79b73045aabedf.png +0 -0
  40. package/lib/2c95075adb68d6131b59cae9fa554ec2.png +0 -0
  41. package/lib/377c871d922a25c773a9e7c2f42ed7c0.png +0 -0
  42. package/lib/3d901589b40bd56ff1fde2bbb700bfe1.png +0 -0
  43. package/lib/4abe481e130d7be0574e45573de8beb7.png +0 -0
  44. package/lib/95ee2260a509cd630d89c5367ed1973b.png +0 -0
  45. package/lib/BlockHeader/README.md +0 -83
  46. package/lib/BlockHeader/fonts/OswaldLight.ttf +0 -0
  47. package/lib/BlockHeader/index.js +0 -42
  48. package/lib/BlockHeader/index.less +0 -141
  49. package/lib/Layout/locale.js +0 -53
  50. package/lib/Layout/paaslayout/index.less +0 -75
  51. package/lib/QueryListScene/Field/SelectInput.js +0 -115
  52. package/lib/QueryListScene/Field/fieldsMap.js +0 -52
  53. package/lib/QueryListScene/Field/index.js +0 -159
  54. package/lib/QueryListScene/Field/select.js +0 -100
  55. package/lib/QueryListScene/QueryForm/index.js +0 -423
  56. package/lib/QueryListScene/QueryForm/index.less +0 -141
  57. package/lib/b9dd5ff3622296fbee51ed68f4bca1bf.png +0 -0
  58. package/lib/bd2921989f9296089ba58efb7a76f3ef.png +0 -0
  59. package/lib/index.html +0 -6
  60. package/lib/main.css +0 -16420
  61. package/lib/tntd.js +0 -2
  62. package/lib/tntd.js.LICENSE.txt +0 -36
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- require("antd/es/spin/style");
8
+ require("antd/lib/spin/style");
9
9
 
10
- var _spin = _interopRequireDefault(require("antd/es/spin"));
10
+ var _spin = _interopRequireDefault(require("antd/lib/spin"));
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
@@ -330,31 +330,35 @@ function (_React$PureComponent) {
330
330
  qlsProps = _this$props4.qlsProps,
331
331
  actions = _this$props4.actions;
332
332
  this.formData = _objectSpread({}, actions.getFormData() || {}, {}, qlsProps.memory ? actions.getPagination() : {});
333
- this.fetchData(this.formData)["finally"](function () {
334
- // 轮询
335
- if (qlsProps.interval && !_this2.isUnmounted) {
336
- var doIntervalQuery = function doIntervalQuery(ms) {
337
- // 组件unmounted后,不执行轮训逻辑
338
- if (!_this2.isUnmounted) {
339
- _this2.timmer = setTimeout(function () {
340
- // 如果有查询请求还未结束,则该次轮询不执行,重新设置下次轮询
341
- if (!_this2.isFetching) {
342
- _this2.fetchData(actions.getSubmittedFormData(), {
343
- isInterval: true,
344
- showLoading: false
345
- }).then(function () {
333
+
334
+ if (!qlsProps.initSearch) {
335
+ // 默认进来不请求
336
+ this.fetchData(this.formData)["finally"](function () {
337
+ // 轮询
338
+ if (qlsProps.interval && !_this2.isUnmounted) {
339
+ var doIntervalQuery = function doIntervalQuery(ms) {
340
+ // 组件unmounted后,不执行轮训逻辑
341
+ if (!_this2.isUnmounted) {
342
+ _this2.timmer = setTimeout(function () {
343
+ // 如果有查询请求还未结束,则该次轮询不执行,重新设置下次轮询
344
+ if (!_this2.isFetching) {
345
+ _this2.fetchData(actions.getSubmittedFormData(), {
346
+ isInterval: true,
347
+ showLoading: false
348
+ }).then(function () {
349
+ doIntervalQuery(ms);
350
+ });
351
+ } else {
346
352
  doIntervalQuery(ms);
347
- });
348
- } else {
349
- doIntervalQuery(ms);
350
- }
351
- }, ms);
352
- }
353
- };
354
-
355
- doIntervalQuery(qlsProps.interval);
356
- }
357
- });
353
+ }
354
+ }, ms);
355
+ }
356
+ };
357
+
358
+ doIntervalQuery(qlsProps.interval);
359
+ }
360
+ });
361
+ }
358
362
 
359
363
  if ((_this$state$scroll = this.state.scroll) == null ? void 0 : _this$state$scroll.y) {
360
364
  window.addEventListener('resize', this.onWindowResize);
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- require("antd/es/empty/style");
8
+ require("antd/lib/empty/style");
9
9
 
10
- var _empty = _interopRequireDefault(require("antd/es/empty"));
10
+ var _empty = _interopRequireDefault(require("antd/lib/empty"));
11
11
 
12
- require("antd/es/select/style");
12
+ require("antd/lib/select/style");
13
13
 
14
- var _select = _interopRequireDefault(require("antd/es/select"));
14
+ var _select = _interopRequireDefault(require("antd/lib/select"));
15
15
 
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
 
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- require("antd/es/table/style");
8
+ require("antd/lib/table/style");
9
9
 
10
- var _table = _interopRequireDefault(require("antd/es/table"));
10
+ var _table = _interopRequireDefault(require("antd/lib/table"));
11
11
 
12
12
  var _react = require("react");
13
13
 
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
- require("antd/es/table/style");
10
+ require("antd/lib/table/style");
11
11
 
12
- var _table = _interopRequireDefault(require("antd/es/table"));
12
+ var _table = _interopRequireDefault(require("antd/lib/table"));
13
13
 
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
 
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "tntd",
3
- "version": "1.3.62",
3
+ "version": "1.3.65",
4
4
  "description": "ued tnt design",
5
5
  "main": "lib/index.js",
6
+ "module": "es/index.js",
7
+ "unpkg": "dist/tntd.js",
6
8
  "scripts": {
7
9
  "start": "doc-scripts start --input docs",
8
10
  "dev": "doc-scripts start --input components/$NAME",
9
11
  "dev:single": "doc-scripts start --input",
10
12
  "build": "npx babel components --out-dir output",
11
13
  "postbuild": "./scripts/postbuild.sh",
14
+ "build:es": "cross-env BUILD_ENV=es npx babel components --out-dir output",
12
15
  "build:umd": "cross-env BUILD_ENV=umd npx webpack --config ./scripts/webpack.config.js",
13
16
  "analyzer": "webpack-bundle-analyzer --port 8888 ./dist/stats.json",
14
17
  "test": "echo \"Error: no test specified\" $* && exit 1"
@@ -3,6 +3,11 @@
3
3
  # *.less
4
4
  cp -rf components/ lib/
5
5
  cp -rf output/ lib/
6
+
7
+ npm run build:es
8
+ cp -rf components/ es/
9
+ cp -rf output/ es/
10
+
6
11
  rm -rf output
7
12
 
8
13
  npm run build:umd
@@ -1,83 +0,0 @@
1
- ## BlockHeader组件
2
- ### 代码演示
3
- ```jsx
4
- import React from 'react';
5
- import ReactDOM from 'react-dom';
6
- import 'antd/dist/antd.css';
7
- import {Button, Table} from "antd";
8
- import BlockHeader from './index';
9
-
10
- const Demo = props => {
11
-
12
- return (
13
- <div>
14
- <BlockHeader
15
- title='这是标题'
16
- subTitle='这是描述,相当于副标题'
17
- tooltip='test'
18
- placement="right"
19
- size='large'
20
- extra={<Button>这是extra信息</Button>}
21
- />
22
- <br/>
23
- <BlockHeader
24
- title='这是标题'
25
- subTitle='这是描述,相当于副标题'
26
- tooltip='test'
27
- placement="right"
28
- />
29
- <br/>
30
- <BlockHeader
31
- title='这是标题'
32
- subTitle='这是描述,相当于副标题'
33
- tooltip='test'
34
- placement="right"
35
- size='small'
36
- />
37
- <br/>
38
- <BlockHeader
39
- title='这是标题'
40
- subTitle='这是描述,相当于副标题'
41
- tooltip='test'
42
- placement="right"
43
- size='large'
44
- number={1}
45
- />
46
- <br/>
47
- <BlockHeader
48
- title='这是标题'
49
- subTitle='这是描述,相当于副标题'
50
- tooltip='test'
51
- placement="right"
52
- number={2}
53
- />
54
- <br/>
55
- <BlockHeader
56
- title='这是标题'
57
- subTitle='这是描述,相当于副标题'
58
- tooltip='test'
59
- placement="right"
60
- size='small'
61
- number={3}
62
- />
63
- <br/>
64
- </div>
65
- );
66
- };
67
-
68
-
69
- ReactDOM.render(
70
- <Demo />,
71
- document.getElementById('root')
72
- );
73
- ```
74
- ### API
75
- #### Handle
76
- | 属性名称 | 属性说明 | 类型 | 默认值 | 是否必须 |
77
- | :---------- | :------------------------- | :------ | :---------- | :------- |
78
- | title | 标题 | String | - | 否 |
79
- | subTitle | 副标题 | String | - | 否 |
80
- | number | 标题前是数字 | Number | - | 否 |
81
- | size | 大小,large、default、small | String | default | 否 |
82
- | extra | 右边区域内容 | React node | - | 否 |
83
-
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _classnames = _interopRequireDefault(require("classnames"));
9
-
10
- require("./index.less");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
-
16
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
-
18
- var _default = function _default(props) {
19
- var _ref = props || {},
20
- _ref$title = _ref.title,
21
- title = _ref$title === void 0 ? '暂无标题' : _ref$title,
22
- subTitle = _ref.subTitle,
23
- _ref$size = _ref.size,
24
- size = _ref$size === void 0 ? 'default' : _ref$size,
25
- extra = _ref.extra,
26
- number = _ref.number,
27
- rest = _objectWithoutProperties(_ref, ["title", "subTitle", "size", "extra", "number"]);
28
-
29
- return React.createElement("div", {
30
- className: (0, _classnames["default"])('tntd-block-header', size, {
31
- 'has-number': number
32
- })
33
- }, React.createElement("div", {
34
- className: "tntd-block-header-title"
35
- }, number && React.createElement("i", {
36
- "class": "count"
37
- }, number <= 9 ? "0".concat(number) : number), React.createElement("h3", null, title), React.createElement("span", null, subTitle)), extra && React.createElement("div", {
38
- className: "tntd-block-header-extra"
39
- }, extra));
40
- };
41
-
42
- exports["default"] = _default;
@@ -1,141 +0,0 @@
1
- .tntd-block-header {
2
- @font-face {
3
- font-family:'OswaldLight';
4
- font-display: swap;
5
- src:url('./fonts/OswaldLight.ttf');
6
- }
7
- & {
8
- height: 32px;
9
- line-height: 32px;
10
- clear: both;
11
- }
12
- &.has-number{
13
- .tntd-block-header-title {
14
- h3 {
15
- margin-left: 0;
16
- }
17
- &::before {
18
- display: none;
19
- }
20
- }
21
- &.small {
22
- .count {
23
- font-size: 20px;
24
- margin-right: 12px;
25
- &::before {
26
- width: 20px;
27
- height: 15px;
28
- top: 44%;
29
- left: 60%;
30
- }
31
- }
32
- }
33
- &.large {
34
- .count {
35
- font-size: 24px;
36
- margin-right: 12px;
37
- &::before {
38
- width: 24px;
39
- height: 15px;
40
- left: 56%;
41
- }
42
- }
43
- }
44
- .count {
45
- position: relative;
46
- top: -1px;
47
- color: #0089ff;
48
- font-size: 22px;
49
- font-style: normal;
50
- margin-right: 12px;
51
- position: relative;
52
- vertical-align: top;
53
- font-weight: 500;
54
- font-family: "OswaldLight" !important;
55
- letter-spacing: 2px;
56
- }
57
- .count::before {
58
- position: absolute;
59
- display: block;
60
- content: "";
61
- width: 22px;
62
- height: 15px;
63
- border-top: 1px solid #0089ff;
64
- background-color: #fff;
65
- top: 47%;
66
- left: 52%;
67
- transform: rotate(-45deg);
68
- -webkit-transform: rotate(-45deg);
69
- }
70
- }
71
- &.small {
72
- & {
73
- height: 28px;
74
- line-height: 28px;
75
- }
76
- .tntd-block-header-title {
77
- h3 {
78
- font-size: 14px;
79
- }
80
- &::before {
81
- height: 14px;
82
- top: 7px;
83
- }
84
- }
85
- }
86
- &.large {
87
- & {
88
- height: 36px;
89
- line-height: 36px;
90
- }
91
- .tntd-block-header-title {
92
- h3 {
93
- font-size: 18px;
94
- }
95
- &::before {
96
- height: 18px;
97
- top: 9px;
98
- }
99
- }
100
- }
101
- .tntd-block-header-title {
102
- & {
103
- position: relative;
104
- float: left;
105
- }
106
- h3 {
107
- font-size: 16px;
108
- color: #17233D;
109
- font-weight: normal;
110
- margin: 0;
111
- margin-right: 10px;
112
- margin-left: 10px;
113
- display: inline-block;
114
- }
115
- span {
116
- position: relative;
117
- top: 1px;
118
- font-size: 12px;
119
- color:#8b919e;
120
- margin-right: 10px;
121
- line-height: 1;
122
- }
123
- &::before {
124
- position: absolute;
125
- left: 0;
126
- top: 8px;
127
- background-color: #126BFB;
128
- content: "";
129
- width: 3px;
130
- height: 16px;
131
- margin-right: 8px;
132
- }
133
- }
134
- .tntd-block-header-extra {
135
- & {
136
- position: relative;
137
- float: right;
138
- margin-left: 8px;
139
- }
140
- }
141
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.getText = exports.en_US = exports.zh_CN = void 0;
7
- var zh_CN = {
8
- globalNavigation: '全局导航',
9
- menuSearch: '菜单搜索',
10
- // QueryForm
11
- search: '搜索',
12
- reset: '重置',
13
- moreFiltering: '更多过滤',
14
- expand: '展开',
15
- collapse: '收起',
16
- // user popover
17
- personalSettings: '个人设置',
18
- changePwd: '修改密码',
19
- signOut: '退出'
20
- };
21
- exports.zh_CN = zh_CN;
22
- var en_US = {
23
- globalNavigation: 'Global Navigation',
24
- menuSearch: 'Menu Search',
25
- // QueryForm
26
- search: 'Search',
27
- reset: 'Reset',
28
- moreFiltering: 'More filtering',
29
- expand: 'Expand',
30
- collapse: 'Collapse',
31
- // user popover
32
- personalSettings: 'Personal settings',
33
- changePwd: 'Change password',
34
- signOut: 'Sign out'
35
- };
36
- exports.en_US = en_US;
37
-
38
- var getText = function getText(key) {
39
- var _ref;
40
-
41
- var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'cn';
42
- return (_ref = {
43
- cn: zh_CN,
44
- en: en_US
45
- }[language] || zh_CN) == null ? void 0 : _ref[key];
46
- };
47
-
48
- exports.getText = getText;
49
- var _default = {
50
- en_US: en_US,
51
- zh_CN: zh_CN
52
- };
53
- exports["default"] = _default;
@@ -1,75 +0,0 @@
1
-
2
-
3
- .side-menu-section {
4
- &:first-child {
5
- h2 {
6
- padding-top: 0;
7
- }
8
- }
9
- &.only-one-submenu {
10
- margin-bottom: 0;
11
- }
12
- h2 {
13
- font-size: 14px;
14
- color: #17233D;
15
- height: 40px;
16
- line-height: 40px;
17
- font-weight: normal;
18
- padding-left: 17px;
19
- margin: 0;
20
- .tnt-icon {
21
- margin-right: 7px;
22
- }
23
- }
24
- .side-menu-list {
25
- margin-bottom: 0;
26
- .side-menu-item {
27
- & {
28
- position: relative;
29
- cursor: pointer;
30
- height: 30px;
31
- line-height: 30px;
32
- opacity: 0.8;
33
- font-size: 14px;
34
- color: #17233D;
35
- letter-spacing: 0;
36
- }
37
- a {
38
- padding-left: 42px;
39
- & {
40
- color: #666;
41
- text-decoration: none;
42
- display: block;
43
- transition: none;
44
- height: 30px;
45
- line-height: 30px;
46
- }
47
- &:hover {
48
- color: #323232;
49
- background: #f5f5f5;
50
- }
51
- i {
52
- padding-left: 20px;
53
- font-size: 20px;
54
- margin-right: 15px;
55
- vertical-align: sub;
56
- }
57
- }
58
- &.active {
59
- &:before {
60
- position: absolute;
61
- content: "";
62
- left: 0;
63
- top: 0;
64
- width: 3px;
65
- height: 100%;
66
- background: @primary-color;
67
- }
68
- a {
69
- background: rgba(18,107,251,0.10);
70
- color: @primary-color;
71
- }
72
- }
73
- }
74
- }
75
- }