tntd 1.4.7 → 1.4.10

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 (85) hide show
  1. package/components/DevelopmentLogin/LoginModal.js +2 -2
  2. package/components/Layout/HeaderTabs.js +98 -73
  3. package/dist/1.tntd.js +1 -1
  4. package/dist/stats.json +98 -98
  5. package/dist/tntd.js +1 -1
  6. package/es/DevelopmentLogin/LoginModal.js +2 -2
  7. package/es/Layout/HeaderTabs.js +19 -15
  8. package/lib/ArrayInput/icon.js +31 -27
  9. package/lib/ArrayInput/index.js +298 -211
  10. package/lib/AuthContext.js +13 -2
  11. package/lib/Columns/index.js +100 -71
  12. package/lib/DevelopmentLogin/LoginModal.js +141 -79
  13. package/lib/DevelopmentLogin/index.js +55 -28
  14. package/lib/Ellipsis/Svg/CopySVG.js +71 -23
  15. package/lib/Ellipsis/Svg/TickSVG.js +49 -17
  16. package/lib/Ellipsis/index.js +154 -148
  17. package/lib/Handle/index.js +109 -72
  18. package/lib/Icon/fonts/iconfont.js +43 -1
  19. package/lib/Icon/iconList.js +8 -119
  20. package/lib/Icon/index.js +45 -13
  21. package/lib/Img/Contain.js +81 -49
  22. package/lib/Img/Cover.js +136 -88
  23. package/lib/Img/index.js +89 -36
  24. package/lib/Layout/ActionsContext.js +11 -2
  25. package/lib/Layout/AppList.js +256 -262
  26. package/lib/Layout/Application.js +135 -119
  27. package/lib/Layout/Avatar.js +137 -137
  28. package/lib/Layout/CompatibleLanguage.js +195 -214
  29. package/lib/Layout/EnterpriseLayout/Avatar.js +168 -156
  30. package/lib/Layout/EnterpriseLayout/Language.js +100 -75
  31. package/lib/Layout/EnterpriseLayout/Theme.js +94 -96
  32. package/lib/Layout/EnterpriseLayout/index.js +45 -32
  33. package/lib/Layout/GlobalNavigation/NavigationPopup.js +407 -335
  34. package/lib/Layout/GlobalNavigation/index.js +158 -110
  35. package/lib/Layout/Header.js +116 -165
  36. package/lib/Layout/HeaderActions.js +129 -132
  37. package/lib/Layout/HeaderNavs.js +113 -90
  38. package/lib/Layout/HeaderTabs.js +282 -312
  39. package/lib/Layout/Iconfont.js +15 -2
  40. package/lib/Layout/Language.js +102 -63
  41. package/lib/Layout/Layout.js +261 -272
  42. package/lib/Layout/Logo.js +87 -132
  43. package/lib/Layout/OrgAppList.js +319 -440
  44. package/lib/Layout/SideMenu.js +343 -429
  45. package/lib/Layout/Theme.js +124 -95
  46. package/lib/Layout/checkAuth.js +35 -21
  47. package/lib/Layout/createActions.js +51 -38
  48. package/lib/Layout/images/index.js +41 -33
  49. package/lib/Layout/index.js +161 -110
  50. package/lib/Layout/paaslayout/CompactSideMenu.js +178 -200
  51. package/lib/Layout/paaslayout/Header.js +90 -84
  52. package/lib/Layout/paaslayout/Logo.js +32 -27
  53. package/lib/Layout/paaslayout/SideMenu.js +174 -161
  54. package/lib/Layout/paaslayout/index.js +261 -240
  55. package/lib/Layout/storage.js +78 -20
  56. package/lib/Layout/utils.js +143 -93
  57. package/lib/LoadingButton/index.js +67 -25
  58. package/lib/Modal/index.js +108 -83
  59. package/lib/Page/Box.js +81 -56
  60. package/lib/Page/index.js +173 -151
  61. package/lib/Page/utils.js +30 -12
  62. package/lib/QueryForm/Field/Checkbox.js +33 -11
  63. package/lib/QueryForm/Field/Select.js +99 -63
  64. package/lib/QueryForm/Field/SelectInput.js +114 -69
  65. package/lib/QueryForm/Field/fieldsMap.js +52 -30
  66. package/lib/QueryForm/Field/index.js +158 -76
  67. package/lib/QueryForm/createActions.js +65 -50
  68. package/lib/QueryForm/index.js +383 -304
  69. package/lib/QueryForm/useForm.js +17 -6
  70. package/lib/QueryListScene/List.js +366 -290
  71. package/lib/QueryListScene/QueryForm.js +161 -93
  72. package/lib/QueryListScene/QueryListScene.js +87 -33
  73. package/lib/QueryListScene/Title.js +20 -10
  74. package/lib/QueryListScene/Toolbar.js +31 -8
  75. package/lib/QueryListScene/createActions.js +79 -64
  76. package/lib/QueryListScene/index.js +40 -23
  77. package/lib/QueryListScene/useActions.js +17 -6
  78. package/lib/Select/DropDownWrap.js +124 -60
  79. package/lib/Select/index.js +561 -425
  80. package/lib/Table/ResizableTable/index.js +121 -77
  81. package/lib/Table/index.js +51 -19
  82. package/lib/Title/index.js +52 -34
  83. package/lib/index.js +159 -19
  84. package/lib/locale.js +63 -48
  85. package/package.json +1 -1
@@ -26,8 +26,8 @@ import Cookies from 'universal-cookie';
26
26
  var cookies = new Cookies(); // 默认
27
27
 
28
28
  var accountInfoDefault = {
29
- account: 'admin',
30
- password: 'Td@123456'
29
+ account: undefined,
30
+ password: undefined
31
31
  };
32
32
  export default (function (_ref) {
33
33
  var visible = _ref.visible,
@@ -25,7 +25,7 @@ function _templateObject3() {
25
25
  }
26
26
 
27
27
  function _templateObject2() {
28
- var data = _taggedTemplateLiteral(["\n margin: 14px 0 0;\n padding: 0;\n list-style: none;\n text-align: left;\n height: 36px;\n line-height: 36px;\n flex: 1;\n white-space: nowrap;\n padding-right: 40px;\n transition: transform .25s linear;\n position:absolute;\n"]);
28
+ var data = _taggedTemplateLiteral(["\n margin: 14px 0 0;\n padding: 0;\n list-style: none;\n text-align: left;\n height: 36px;\n line-height: 36px;\n flex: 1;\n white-space: nowrap;\n padding-right: 40px;\n transition: transform 0.25s linear;\n position: absolute;\n"]);
29
29
 
30
30
  _templateObject2 = function _templateObject2() {
31
31
  return data;
@@ -46,17 +46,17 @@ function _templateObject() {
46
46
 
47
47
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
48
48
 
49
- import { useState, useEffect, useRef } from 'react';
50
- import styled, { withTheme } from 'styled-components';
51
- import cn from 'classnames';
52
- import { get } from 'lodash';
53
- import Icon from '../Icon';
49
+ import { useState, useEffect, useRef } from "react";
50
+ import styled, { withTheme } from "styled-components";
51
+ import cn from "classnames";
52
+ import { get } from "lodash";
53
+ import Icon from "../Icon";
54
54
  var TabsContainer = styled.div(_templateObject(), function (props) {
55
55
  return "".concat(props.theme.blueBgColor);
56
56
  });
57
57
  var Tabs = styled.ul(_templateObject2());
58
58
  var TabItem = styled.li(_templateObject3(), function (props) {
59
- return props.theme.size === 'large' ? '46px' : '36px';
59
+ return props.theme.size === "large" ? "46px" : "36px";
60
60
  }, function (props) {
61
61
  return props.theme.headerActionsColor;
62
62
  }, function (props) {
@@ -77,9 +77,10 @@ export var HeaderTabs = withTheme(function (_ref) {
77
77
  appListVisible = _ref.appListVisible,
78
78
  orgListVisible = _ref.orgListVisible,
79
79
  orgAppListVisible = _ref.orgAppListVisible,
80
- props = _objectWithoutProperties(_ref, ["theme", "className", "tabs", "onTabChange", "onTabSelect", "onTabClose", "appListVisible", "orgListVisible", "orgAppListVisible"]);
80
+ language = _ref.language,
81
+ props = _objectWithoutProperties(_ref, ["theme", "className", "tabs", "onTabChange", "onTabSelect", "onTabClose", "appListVisible", "orgListVisible", "orgAppListVisible", "language"]);
81
82
 
82
- var _useState = useState(props.selectedKey || get(tabs, '0.key')),
83
+ var _useState = useState(props.selectedKey || get(tabs, "0.key")),
83
84
  _useState2 = _slicedToArray(_useState, 2),
84
85
  selectedKey = _useState2[0],
85
86
  setSelectedKey = _useState2[1];
@@ -143,7 +144,7 @@ export var HeaderTabs = withTheme(function (_ref) {
143
144
  var tabsDom = getTabsDom();
144
145
  var parentBBox = tabsDom.parentNode.getBoundingClientRect();
145
146
  var parentWidth = parentBBox.width - 32;
146
- var x = Math.abs(+tabsDom.style.transform.replace(/[^\d.-]/g, ''));
147
+ var x = Math.abs(+tabsDom.style.transform.replace(/[^\d.-]/g, ""));
147
148
  var index = Math.ceil(x / 130);
148
149
  var trueX = index * 130;
149
150
  var newX = Math.min(0, -(trueX - parentWidth));
@@ -160,7 +161,7 @@ export var HeaderTabs = withTheme(function (_ref) {
160
161
  var parentBBox = tabsDom.parentNode.getBoundingClientRect();
161
162
  var parentWidth = parentBBox.width - 32;
162
163
  var width = tabItems.length * 130;
163
- var x = Math.abs(+tabsDom.style.transform.replace(/[^\d.-]/g, ''));
164
+ var x = Math.abs(+tabsDom.style.transform.replace(/[^\d.-]/g, ""));
164
165
  var index = Math.floor(x / 130);
165
166
  var trueX = index * 130;
166
167
  var newX = Math.max(-(width - parentWidth), -(trueX + parentWidth));
@@ -179,7 +180,7 @@ export var HeaderTabs = withTheme(function (_ref) {
179
180
  }));
180
181
  if (index === -1) return;
181
182
  var tabsDom = getTabsDom();
182
- var x = -+tabsDom.style.transform.replace(/[^\d.-]/g, '');
183
+ var x = -+tabsDom.style.transform.replace(/[^\d.-]/g, "");
183
184
  var bbox = {
184
185
  left: index * 130,
185
186
  right: (index + 1) * 130
@@ -210,7 +211,7 @@ export var HeaderTabs = withTheme(function (_ref) {
210
211
  };
211
212
 
212
213
  useEffect(function () {
213
- setSelectedKey(props.selectedKey || get(tabs, '0.key')); // const t = [{'code':'tagdata','enName':'tagdata','icon':'layer-color','menuName':'打标数据管理打标数据管理打标数据管理','path':'/orion/tag/datalist','key':'tagdata','name':'打标数据管理打标数据管理打标数据管理'},{'code':'taglist','enName':'taglist','icon':'home','menuName':'标签管理','path':'http://baidu.com/orion/tag/list','key':'taglist','name':'标签管理'},{'code':'relation1','enName':'dadicasesearch1','icon':'home','menuName':'案件检索1','path':'/orion/case/relation1','key':'relation1','name':'案件检索1'},{'code':'dadicasesearch-0','enName':'dadicasesearch','icon':'home','menuName':'案件检索-0','path':'/orion/case/relation0','key':'dadicasesearch-0','name':'案件检索-0'},{'code':'dadicasesearch-1','enName':'dadicasesearch','icon':'home','menuName':'案件检索-1','path':'/orion/case/relation1','key':'dadicasesearch-1','name':'案件检索-1'},{'code':'dadicasesearch-2','enName':'dadicasesearch','icon':'home','menuName':'案件检索-2','path':'/orion/case/relation2','key':'dadicasesearch-2','name':'案件检索-2'},{'code':'dadicasesearch-3','enName':'dadicasesearch','icon':'home','menuName':'案件检索-3','path':'/orion/case/relation3','key':'dadicasesearch-3','name':'案件检索-3'},{'code':'dadicasesearch-4','enName':'dadicasesearch','icon':'home','menuName':'案件检索-4','path':'/orion/case/relation4','key':'dadicasesearch-4','name':'案件检索-4'},{'code':'dadicasesearch-5','enName':'dadicasesearch','icon':'home','menuName':'案件检索-5','path':'/orion/case/relation5','key':'dadicasesearch-5','name':'案件检索-5'},{'code':'dadicasesearch-6','enName':'dadicasesearch','icon':'home','menuName':'案件检索-6','path':'/orion/case/relation6','key':'dadicasesearch-6','name':'案件检索-6'},{'code':'dadicasesearch-7','enName':'dadicasesearch','icon':'home','menuName':'案件检索-7','path':'/orion/case/relation7','key':'dadicasesearch-7','name':'案件检索-7'},{'code':'dadicasesearch-8','enName':'dadicasesearch','icon':'home','menuName':'案件检索-8','path':'/orion/case/relation8','key':'dadicasesearch-8','name':'案件检索-8'}] ;
214
+ setSelectedKey(props.selectedKey || get(tabs, "0.key")); // const t = [{'code':'tagdata','enName':'tagdata','icon':'layer-color','menuName':'打标数据管理打标数据管理打标数据管理','path':'/orion/tag/datalist','key':'tagdata','name':'打标数据管理打标数据管理打标数据管理'},{'code':'taglist','enName':'taglist','icon':'home','menuName':'标签管理','path':'http://baidu.com/orion/tag/list','key':'taglist','name':'标签管理'},{'code':'relation1','enName':'dadicasesearch1','icon':'home','menuName':'案件检索1','path':'/orion/case/relation1','key':'relation1','name':'案件检索1'},{'code':'dadicasesearch-0','enName':'dadicasesearch','icon':'home','menuName':'案件检索-0','path':'/orion/case/relation0','key':'dadicasesearch-0','name':'案件检索-0'},{'code':'dadicasesearch-1','enName':'dadicasesearch','icon':'home','menuName':'案件检索-1','path':'/orion/case/relation1','key':'dadicasesearch-1','name':'案件检索-1'},{'code':'dadicasesearch-2','enName':'dadicasesearch','icon':'home','menuName':'案件检索-2','path':'/orion/case/relation2','key':'dadicasesearch-2','name':'案件检索-2'},{'code':'dadicasesearch-3','enName':'dadicasesearch','icon':'home','menuName':'案件检索-3','path':'/orion/case/relation3','key':'dadicasesearch-3','name':'案件检索-3'},{'code':'dadicasesearch-4','enName':'dadicasesearch','icon':'home','menuName':'案件检索-4','path':'/orion/case/relation4','key':'dadicasesearch-4','name':'案件检索-4'},{'code':'dadicasesearch-5','enName':'dadicasesearch','icon':'home','menuName':'案件检索-5','path':'/orion/case/relation5','key':'dadicasesearch-5','name':'案件检索-5'},{'code':'dadicasesearch-6','enName':'dadicasesearch','icon':'home','menuName':'案件检索-6','path':'/orion/case/relation6','key':'dadicasesearch-6','name':'案件检索-6'},{'code':'dadicasesearch-7','enName':'dadicasesearch','icon':'home','menuName':'案件检索-7','path':'/orion/case/relation7','key':'dadicasesearch-7','name':'案件检索-7'},{'code':'dadicasesearch-8','enName':'dadicasesearch','icon':'home','menuName':'案件检索-8','path':'/orion/case/relation8','key':'dadicasesearch-8','name':'案件检索-8'}] ;
214
215
 
215
216
  setTabItems(tabs);
216
217
  }, [tabs, props.selectedKey]);
@@ -223,7 +224,7 @@ export var HeaderTabs = withTheme(function (_ref) {
223
224
  translateTabsDom(tabItems, selectedKey);
224
225
  }, [tabItems, selectedKey, appListVisible, orgListVisible, orgAppListVisible]);
225
226
  return React.createElement(TabsContainer, _extends({}, props, {
226
- className: cn('tnt-layout-header-tabs', _defineProperty({}, className, className))
227
+ className: cn("tnt-layout-header-tabs", _defineProperty({}, className, className))
227
228
  }), React.createElement(Tabs, {
228
229
  className: "tnt-layout-header-tabs-content",
229
230
  ref: tabsRef
@@ -245,7 +246,10 @@ export var HeaderTabs = withTheme(function (_ref) {
245
246
  onClick: function onClick(evt) {
246
247
  return evt.preventDefault();
247
248
  }
248
- }, tab.name), tabItems.length > 1 && React.createElement(Icon, {
249
+ }, {
250
+ cn: tab.name,
251
+ en: tab.enName || tab.name
252
+ }[language || "cn"]), tab.closable !== false && tabItems.length > 1 && React.createElement(Icon, {
249
253
  type: "close",
250
254
  onClick: closeTabHandle.bind(null, tab, index)
251
255
  }));
@@ -1,28 +1,32 @@
1
- export const plusIcon = (
2
- <svg
3
- viewBox="64 64 896 896"
4
- focusable="false"
5
- data-icon="plus-circle"
6
- width="1em"
7
- height="1em"
8
- fill="currentColor"
9
- aria-hidden="true"
10
- >
11
- <path d="M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"></path>
12
- <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
13
- </svg>
14
- );
1
+ "use strict";
15
2
 
16
- export const deleteIcon = (
17
- <svg
18
- viewBox="64 64 896 896"
19
- focusable="false"
20
- data-icon="delete"
21
- width="1em"
22
- height="1em"
23
- fill="currentColor"
24
- aria-hidden="true"
25
- >
26
- <path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path>
27
- </svg>
28
- );
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.deleteIcon = exports.plusIcon = void 0;
7
+ var plusIcon = React.createElement("svg", {
8
+ viewBox: "64 64 896 896",
9
+ focusable: "false",
10
+ "data-icon": "plus-circle",
11
+ width: "1em",
12
+ height: "1em",
13
+ fill: "currentColor",
14
+ "aria-hidden": "true"
15
+ }, React.createElement("path", {
16
+ d: "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"
17
+ }), React.createElement("path", {
18
+ d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
19
+ }));
20
+ exports.plusIcon = plusIcon;
21
+ var deleteIcon = React.createElement("svg", {
22
+ viewBox: "64 64 896 896",
23
+ focusable: "false",
24
+ "data-icon": "delete",
25
+ width: "1em",
26
+ height: "1em",
27
+ fill: "currentColor",
28
+ "aria-hidden": "true"
29
+ }, React.createElement("path", {
30
+ d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
31
+ }));
32
+ exports.deleteIcon = deleteIcon;