tntd 1.3.56 → 1.3.60

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 (109) hide show
  1. package/babel.config.js +2 -2
  2. package/components/Layout/OrgAppList.js +1 -1
  3. package/components/QueryListScene/List.js +17 -13
  4. package/lib/0645cf743e4e44ca9da321d689897f07.png +0 -0
  5. package/lib/09db77de0c24fa0f45f8a5cf299a3d11.png +0 -0
  6. package/lib/1d0b52448de217857b270af807e9360d.png +0 -0
  7. package/lib/25d78d77c9c2f0d403e5d899ceb5b1ef.png +0 -0
  8. package/lib/27fa44ff0c98e1594d79b73045aabedf.png +0 -0
  9. package/lib/2c95075adb68d6131b59cae9fa554ec2.png +0 -0
  10. package/lib/377c871d922a25c773a9e7c2f42ed7c0.png +0 -0
  11. package/lib/3d901589b40bd56ff1fde2bbb700bfe1.png +0 -0
  12. package/lib/4abe481e130d7be0574e45573de8beb7.png +0 -0
  13. package/lib/95ee2260a509cd630d89c5367ed1973b.png +0 -0
  14. package/lib/ArrayInput/icon.js +31 -27
  15. package/lib/ArrayInput/index.js +298 -211
  16. package/lib/AuthContext.js +13 -2
  17. package/lib/BlockHeader/README.md +83 -0
  18. package/lib/BlockHeader/fonts/OswaldLight.ttf +0 -0
  19. package/lib/BlockHeader/index.js +42 -0
  20. package/lib/BlockHeader/index.less +141 -0
  21. package/lib/Columns/index.js +100 -71
  22. package/lib/DevelopmentLogin/LoginModal.js +141 -79
  23. package/lib/DevelopmentLogin/index.js +55 -28
  24. package/lib/Ellipsis/Svg/CopySVG.js +71 -23
  25. package/lib/Ellipsis/Svg/TickSVG.js +49 -17
  26. package/lib/Ellipsis/index.js +155 -149
  27. package/lib/Handle/index.js +109 -72
  28. package/lib/Icon/fonts/iconfont.js +43 -1
  29. package/lib/Icon/iconList.js +8 -119
  30. package/lib/Icon/index.js +45 -13
  31. package/lib/Img/Contain.js +81 -49
  32. package/lib/Img/Cover.js +136 -88
  33. package/lib/Img/index.js +89 -36
  34. package/lib/Layout/ActionsContext.js +11 -2
  35. package/lib/Layout/AppList.js +256 -262
  36. package/lib/Layout/Application.js +135 -119
  37. package/lib/Layout/Avatar.js +137 -137
  38. package/lib/Layout/CompatibleLanguage.js +195 -214
  39. package/lib/Layout/EnterpriseLayout/Avatar.js +168 -156
  40. package/lib/Layout/EnterpriseLayout/Language.js +100 -75
  41. package/lib/Layout/EnterpriseLayout/Theme.js +94 -96
  42. package/lib/Layout/EnterpriseLayout/index.js +45 -32
  43. package/lib/Layout/GlobalNavigation/NavigationPopup.js +407 -335
  44. package/lib/Layout/GlobalNavigation/index.js +158 -110
  45. package/lib/Layout/Header.js +116 -165
  46. package/lib/Layout/HeaderActions.js +129 -170
  47. package/lib/Layout/HeaderNavs.js +113 -90
  48. package/lib/Layout/HeaderTabs.js +278 -312
  49. package/lib/Layout/Iconfont.js +15 -2
  50. package/lib/Layout/Language.js +102 -63
  51. package/lib/Layout/Layout.js +261 -272
  52. package/lib/Layout/Logo.js +87 -132
  53. package/lib/Layout/OrgAppList.js +319 -440
  54. package/lib/Layout/SideMenu.js +343 -429
  55. package/lib/Layout/Theme.js +124 -95
  56. package/lib/Layout/checkAuth.js +35 -21
  57. package/lib/Layout/createActions.js +51 -38
  58. package/lib/Layout/images/index.js +41 -33
  59. package/lib/Layout/index.js +161 -110
  60. package/lib/Layout/locale.js +53 -0
  61. package/lib/Layout/paaslayout/CompactSideMenu.js +178 -200
  62. package/lib/Layout/paaslayout/Header.js +90 -84
  63. package/lib/Layout/paaslayout/Logo.js +32 -27
  64. package/lib/Layout/paaslayout/SideMenu.js +174 -161
  65. package/lib/Layout/paaslayout/index.js +261 -240
  66. package/lib/Layout/paaslayout/index.less +75 -0
  67. package/lib/Layout/storage.js +78 -20
  68. package/lib/Layout/utils.js +143 -93
  69. package/lib/LoadingButton/index.js +57 -29
  70. package/lib/Modal/index.js +108 -83
  71. package/lib/Page/Box.js +81 -56
  72. package/lib/Page/index.js +173 -151
  73. package/lib/Page/utils.js +30 -12
  74. package/lib/QueryForm/Field/Checkbox.js +33 -11
  75. package/lib/QueryForm/Field/Select.js +99 -63
  76. package/lib/QueryForm/Field/SelectInput.js +114 -69
  77. package/lib/QueryForm/Field/fieldsMap.js +52 -30
  78. package/lib/QueryForm/Field/index.js +156 -75
  79. package/lib/QueryForm/createActions.js +65 -50
  80. package/lib/QueryForm/index.js +382 -303
  81. package/lib/QueryForm/useForm.js +17 -6
  82. package/lib/QueryListScene/Field/SelectInput.js +115 -0
  83. package/lib/QueryListScene/Field/fieldsMap.js +52 -0
  84. package/lib/QueryListScene/Field/index.js +159 -0
  85. package/lib/QueryListScene/Field/select.js +100 -0
  86. package/lib/QueryListScene/List.js +362 -285
  87. package/lib/QueryListScene/QueryForm/index.js +423 -0
  88. package/lib/QueryListScene/QueryForm/index.less +141 -0
  89. package/lib/QueryListScene/QueryForm.js +159 -91
  90. package/lib/QueryListScene/QueryListScene.js +87 -33
  91. package/lib/QueryListScene/Title.js +20 -10
  92. package/lib/QueryListScene/Toolbar.js +31 -8
  93. package/lib/QueryListScene/createActions.js +79 -64
  94. package/lib/QueryListScene/index.js +40 -23
  95. package/lib/QueryListScene/useActions.js +17 -6
  96. package/lib/Select/DropDownWrap.js +124 -60
  97. package/lib/Select/index.js +563 -426
  98. package/lib/Table/ResizableTable/index.js +121 -77
  99. package/lib/Table/index.js +51 -19
  100. package/lib/Title/index.js +52 -34
  101. package/lib/b9dd5ff3622296fbee51ed68f4bca1bf.png +0 -0
  102. package/lib/bd2921989f9296089ba58efb7a76f3ef.png +0 -0
  103. package/lib/index.html +6 -0
  104. package/lib/index.js +159 -19
  105. package/lib/locale.js +63 -48
  106. package/lib/main.css +16420 -0
  107. package/lib/tntd.js +2 -0
  108. package/lib/tntd.js.LICENSE.txt +36 -0
  109. package/package.json +2 -2
@@ -1,23 +1,40 @@
1
- import QueryListScene from './QueryListScene';
2
- import Title from './Title';
3
- import Form from './QueryForm';
4
- import Toolbar from './Toolbar';
5
- import List from './List';
6
- import Actions from './createActions';
7
- import useActions from './useActions';
8
- import './index.less';
9
-
10
- export const QueryForm = Form;
11
- export const QueryList = List;
12
- export const createActions = Actions;
13
-
14
- QueryListScene.Title = Title;
15
- QueryListScene.QueryForm = Form;
16
- QueryListScene.Toolbar = Toolbar;
17
- QueryListScene.QueryList = List;
18
- QueryListScene.Field = Form.Field;
19
-
20
- QueryListScene.useActions = useActions;
21
- QueryListScene.createActions = createActions;
22
-
23
- export default QueryListScene;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.createActions = exports.QueryList = exports.QueryForm = void 0;
7
+
8
+ var _QueryListScene = _interopRequireDefault(require("./QueryListScene"));
9
+
10
+ var _Title = _interopRequireDefault(require("./Title"));
11
+
12
+ var _QueryForm = _interopRequireDefault(require("./QueryForm"));
13
+
14
+ var _Toolbar = _interopRequireDefault(require("./Toolbar"));
15
+
16
+ var _List = _interopRequireDefault(require("./List"));
17
+
18
+ var _createActions = _interopRequireDefault(require("./createActions"));
19
+
20
+ var _useActions = _interopRequireDefault(require("./useActions"));
21
+
22
+ require("./index.less");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ var QueryForm = _QueryForm["default"];
27
+ exports.QueryForm = QueryForm;
28
+ var QueryList = _List["default"];
29
+ exports.QueryList = QueryList;
30
+ var createActions = _createActions["default"];
31
+ exports.createActions = createActions;
32
+ _QueryListScene["default"].Title = _Title["default"];
33
+ _QueryListScene["default"].QueryForm = _QueryForm["default"];
34
+ _QueryListScene["default"].Toolbar = _Toolbar["default"];
35
+ _QueryListScene["default"].QueryList = _List["default"];
36
+ _QueryListScene["default"].Field = _QueryForm["default"].Field;
37
+ _QueryListScene["default"].useActions = _useActions["default"];
38
+ _QueryListScene["default"].createActions = createActions;
39
+ var _default = _QueryListScene["default"];
40
+ exports["default"] = _default;
@@ -1,8 +1,19 @@
1
- import { useRef } from 'react';
2
- import createActions from './createActions';
1
+ "use strict";
3
2
 
4
- export default function useActions() {
5
- const actions = useRef(createActions());
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = useActions;
6
7
 
7
- return actions.current;
8
- };
8
+ var _react = require("react");
9
+
10
+ var _createActions = _interopRequireDefault(require("./createActions"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ function useActions() {
15
+ var actions = (0, _react.useRef)((0, _createActions["default"])());
16
+ return actions.current;
17
+ }
18
+
19
+ ;
@@ -1,64 +1,128 @@
1
- import React, { PureComponent } from 'react';
2
-
3
- export default class DropDownWrap extends PureComponent {
4
- constructor(props) {
5
- super(props);
6
- const { allHeight, startIndex, endIndex } = props;
7
-
8
- this.state = {
9
- allHeight,
10
- startIndex,
11
- endIndex
12
- };
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
11
+
12
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+
14
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
+
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
22
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
+
24
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
25
+
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
27
+
28
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
29
+
30
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
+
32
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
+
34
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
+
36
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
+
38
+ var DropDownWrap =
39
+ /*#__PURE__*/
40
+ function (_PureComponent) {
41
+ _inherits(DropDownWrap, _PureComponent);
42
+
43
+ function DropDownWrap(props) {
44
+ var _this;
45
+
46
+ _classCallCheck(this, DropDownWrap);
47
+
48
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(DropDownWrap).call(this, props));
49
+
50
+ _this.getItemStyle = function (i) {
51
+ var itemHeight = _this.props.itemHeight;
52
+ return {
53
+ position: 'absolute',
54
+ top: itemHeight * i,
55
+ height: itemHeight,
56
+ width: '100%'
57
+ };
58
+ };
59
+
60
+ _this.reactList = function (allHeight, startIndex, endIndex) {
61
+ return _this.setState({
62
+ allHeight: allHeight,
63
+ startIndex: startIndex,
64
+ endIndex: endIndex
65
+ });
66
+ };
67
+
68
+ var _allHeight = props.allHeight,
69
+ _startIndex = props.startIndex,
70
+ _endIndex = props.endIndex;
71
+ _this.state = {
72
+ allHeight: _allHeight,
73
+ startIndex: _startIndex,
74
+ endIndex: _endIndex
75
+ };
76
+ return _this;
77
+ }
78
+
79
+ _createClass(DropDownWrap, [{
80
+ key: "componentDidUpdate",
81
+ value: function componentDidUpdate(prevProps) {
82
+ if (this.props.allHeight !== prevProps.allHeight) {
83
+ this.setState({
84
+ allHeight: this.props.allHeight
85
+ });
86
+ }
13
87
  }
88
+ }, {
89
+ key: "render",
90
+ value: function render() {
91
+ var _this2 = this;
14
92
 
15
- componentDidUpdate(prevProps) {
16
- if (this.props.allHeight !== prevProps.allHeight) {
17
- this.setState({ allHeight: this.props.allHeight });
18
- }
93
+ var menu = this.props.menu;
94
+ var _this$state = this.state,
95
+ startIndex = _this$state.startIndex,
96
+ endIndex = _this$state.endIndex,
97
+ allHeight = _this$state.allHeight; // 截取 Select 下拉列表中需要显示的部分
98
+
99
+ var cloneMenu = _react["default"].cloneElement(menu, {
100
+ menuItems: menu.props.menuItems.slice(startIndex, endIndex).map(function (item, i) {
101
+ var realIndex = (startIndex || 0) + Number(i);
102
+
103
+ var style = _this2.getItemStyle(realIndex); // 未搜到数据提示高度使用默认高度
104
+
105
+
106
+ if (item.key === 'NOT_FOUND') {
107
+ delete style.height;
108
+ }
109
+
110
+ return _react["default"].cloneElement(item, {
111
+ style: _objectSpread({}, item.props.style, {}, style)
112
+ });
113
+ }),
114
+ dropdownMenuStyle: _objectSpread({}, menu.props.dropdownMenuStyle, {
115
+ height: allHeight,
116
+ maxHeight: allHeight,
117
+ overflow: 'hidden'
118
+ })
119
+ });
120
+
121
+ return cloneMenu;
19
122
  }
123
+ }]);
124
+
125
+ return DropDownWrap;
126
+ }(_react.PureComponent);
20
127
 
21
- getItemStyle = i => {
22
- const { itemHeight } = this.props;
23
- return {
24
- position: 'absolute',
25
- top: itemHeight * i,
26
- height: itemHeight,
27
- width: '100%'
28
- };
29
- };
30
-
31
- reactList = (allHeight, startIndex, endIndex) =>
32
- this.setState({ allHeight, startIndex, endIndex });
33
-
34
- render() {
35
- const { menu } = this.props;
36
- const { startIndex, endIndex, allHeight } = this.state;
37
-
38
- // 截取 Select 下拉列表中需要显示的部分
39
- const cloneMenu = React.cloneElement(menu, {
40
- menuItems: menu.props.menuItems
41
- .slice(startIndex, endIndex)
42
- .map((item, i) => {
43
- const realIndex = (startIndex || 0) + Number(i);
44
- const style = this.getItemStyle(realIndex);
45
-
46
- // 未搜到数据提示高度使用默认高度
47
- if (item.key === 'NOT_FOUND') {
48
- delete style.height;
49
- }
50
- return React.cloneElement(item, {
51
- style: { ...item.props.style, ...style }
52
- });
53
- }),
54
- dropdownMenuStyle: {
55
- ...menu.props.dropdownMenuStyle,
56
- height: allHeight,
57
- maxHeight: allHeight,
58
- overflow: 'hidden'
59
- }
60
- });
61
-
62
- return cloneMenu;
63
- }
64
- }
128
+ exports["default"] = DropDownWrap;