tntd 1.4.4 → 1.4.7

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 (88) hide show
  1. package/components/Layout/HeaderActions.js +90 -128
  2. package/components/LoadingButton/index.js +11 -15
  3. package/components/QueryListScene/QueryForm.js +7 -4
  4. package/dist/stats.json +4990 -4990
  5. package/dist/tntd.js +1 -1
  6. package/es/Layout/HeaderActions.js +10 -10
  7. package/es/LoadingButton/index.js +20 -10
  8. package/es/QueryListScene/QueryForm.js +6 -3
  9. package/lib/ArrayInput/icon.js +27 -31
  10. package/lib/ArrayInput/index.js +211 -298
  11. package/lib/AuthContext.js +2 -13
  12. package/lib/Columns/index.js +71 -100
  13. package/lib/DevelopmentLogin/LoginModal.js +79 -141
  14. package/lib/DevelopmentLogin/index.js +28 -55
  15. package/lib/Ellipsis/Svg/CopySVG.js +23 -71
  16. package/lib/Ellipsis/Svg/TickSVG.js +17 -49
  17. package/lib/Ellipsis/index.js +148 -154
  18. package/lib/Handle/index.js +72 -109
  19. package/lib/Icon/fonts/iconfont.js +1 -43
  20. package/lib/Icon/iconList.js +119 -8
  21. package/lib/Icon/index.js +13 -45
  22. package/lib/Img/Contain.js +49 -81
  23. package/lib/Img/Cover.js +88 -136
  24. package/lib/Img/index.js +36 -89
  25. package/lib/Layout/ActionsContext.js +2 -11
  26. package/lib/Layout/AppList.js +262 -256
  27. package/lib/Layout/Application.js +119 -135
  28. package/lib/Layout/Avatar.js +137 -137
  29. package/lib/Layout/CompatibleLanguage.js +214 -195
  30. package/lib/Layout/EnterpriseLayout/Avatar.js +156 -168
  31. package/lib/Layout/EnterpriseLayout/Language.js +75 -100
  32. package/lib/Layout/EnterpriseLayout/Theme.js +96 -94
  33. package/lib/Layout/EnterpriseLayout/index.js +32 -45
  34. package/lib/Layout/GlobalNavigation/NavigationPopup.js +335 -407
  35. package/lib/Layout/GlobalNavigation/index.js +110 -158
  36. package/lib/Layout/Header.js +165 -116
  37. package/lib/Layout/HeaderActions.js +132 -129
  38. package/lib/Layout/HeaderNavs.js +90 -113
  39. package/lib/Layout/HeaderTabs.js +312 -278
  40. package/lib/Layout/Iconfont.js +2 -15
  41. package/lib/Layout/Language.js +63 -102
  42. package/lib/Layout/Layout.js +272 -261
  43. package/lib/Layout/Logo.js +132 -87
  44. package/lib/Layout/OrgAppList.js +440 -319
  45. package/lib/Layout/SideMenu.js +429 -343
  46. package/lib/Layout/Theme.js +95 -124
  47. package/lib/Layout/checkAuth.js +21 -35
  48. package/lib/Layout/createActions.js +38 -51
  49. package/lib/Layout/images/index.js +33 -41
  50. package/lib/Layout/index.js +110 -161
  51. package/lib/Layout/paaslayout/CompactSideMenu.js +200 -178
  52. package/lib/Layout/paaslayout/Header.js +84 -90
  53. package/lib/Layout/paaslayout/Logo.js +27 -32
  54. package/lib/Layout/paaslayout/SideMenu.js +161 -174
  55. package/lib/Layout/paaslayout/index.js +240 -261
  56. package/lib/Layout/storage.js +20 -78
  57. package/lib/Layout/utils.js +93 -143
  58. package/lib/LoadingButton/index.js +25 -57
  59. package/lib/Modal/index.js +83 -108
  60. package/lib/Page/Box.js +56 -81
  61. package/lib/Page/index.js +151 -173
  62. package/lib/Page/utils.js +12 -30
  63. package/lib/QueryForm/Field/Checkbox.js +11 -33
  64. package/lib/QueryForm/Field/Select.js +63 -99
  65. package/lib/QueryForm/Field/SelectInput.js +69 -114
  66. package/lib/QueryForm/Field/fieldsMap.js +30 -52
  67. package/lib/QueryForm/Field/index.js +76 -158
  68. package/lib/QueryForm/createActions.js +50 -65
  69. package/lib/QueryForm/index.js +304 -383
  70. package/lib/QueryForm/useForm.js +6 -17
  71. package/lib/QueryListScene/List.js +290 -366
  72. package/lib/QueryListScene/QueryForm.js +93 -158
  73. package/lib/QueryListScene/QueryListScene.js +33 -87
  74. package/lib/QueryListScene/Title.js +10 -20
  75. package/lib/QueryListScene/Toolbar.js +8 -31
  76. package/lib/QueryListScene/createActions.js +64 -79
  77. package/lib/QueryListScene/index.js +23 -40
  78. package/lib/QueryListScene/useActions.js +6 -17
  79. package/lib/Select/DropDownWrap.js +60 -124
  80. package/lib/Select/index.js +425 -561
  81. package/lib/Table/ResizableTable/index.js +77 -121
  82. package/lib/Table/index.js +19 -51
  83. package/lib/Title/index.js +34 -52
  84. package/lib/index.js +19 -159
  85. package/lib/locale.js +48 -63
  86. package/package.json +1 -1
  87. package/lib/Layout/EnterpriseLayout/Header.js +0 -113
  88. package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
@@ -6,7 +6,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
6
6
  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; }
7
7
 
8
8
  function _templateObject() {
9
- var data = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-block;\n line-height: ", ";\n margin: 0 0 0 20px;\n .hasHeaderTabs & {\n margin: 0;\n }\n padding: 0;\n white-space: nowrap;\n\n .isInIframe & {\n display: none;\n }\n\n & > li {\n height: 100%;\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n font-size: 20px;\n margin: 0 7.5px;\n color: ", ";\n .large-size & {\n margin: 0 10px;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n &:last-of-type {\n margin-right: 0;\n }\n .hasHeaderTabs &{\n color: #455064;\n }\n // \u5220\u9664\u8272\u7CFB\u533A\u5206 \u7EDF\u4E00\u8272\u8C03\n // .hasHeaderTabs:not(.tnt-themeS1) & {\n // color: rgba(255,255,255,.8);\n // }\n .hasHeaderTabs:not(.tnt-themeS1) & {\n color: #455064 !important;\n }\n }\n"]);
9
+ var data = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-block;\n line-height: ", ";\n margin: 0 0 0 20px;\n .hasHeaderTabs & {\n margin: 0;\n }\n padding: 0;\n white-space: nowrap;\n\n .isInIframe & {\n display: none;\n }\n\n & > li {\n height: 100%;\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n font-size: 20px;\n margin: 0 7.5px;\n color: ", ";\n .large-size & {\n margin: 0 10px;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n &:last-of-type {\n margin-right: 0;\n }\n .hasHeaderTabs & {\n color: #455064;\n }\n // \u5220\u9664\u8272\u7CFB\u533A\u5206 \u7EDF\u4E00\u8272\u8C03\n // .hasHeaderTabs:not(.tnt-themeS1) & {\n // color: rgba(255,255,255,.8);\n // }\n .hasHeaderTabs:not(.tnt-themeS1) & {\n color: #455064 !important;\n }\n }\n"]);
10
10
 
11
11
  _templateObject = function _templateObject() {
12
12
  return data;
@@ -17,13 +17,13 @@ function _templateObject() {
17
17
 
18
18
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
19
 
20
- import styled, { withTheme } from 'styled-components';
21
- import GlobalNavigation from './GlobalNavigation';
22
- import Language from './Language';
23
- import Theme from './Theme';
24
- import LanguageTheme from './CompatibleLanguage';
25
- import Application from './Application';
26
- import Avatar from './Avatar';
20
+ import styled, { withTheme } from "styled-components";
21
+ import GlobalNavigation from "./GlobalNavigation";
22
+ import Language from "./Language";
23
+ import Theme from "./Theme";
24
+ import LanguageTheme from "./CompatibleLanguage";
25
+ import Application from "./Application";
26
+ import Avatar from "./Avatar";
27
27
  var Actions = styled.ul(_templateObject(), function (props) {
28
28
  return "".concat(props.theme.headerHeight, "px");
29
29
  }, function (props) {
@@ -65,7 +65,7 @@ export default withTheme(function (props) {
65
65
  return React.createElement(Actions, rest, extraActions, globalNavigation && React.createElement(GlobalNavigation, {
66
66
  headerRef: headerRef,
67
67
  menus: menus
68
- }), !AvatarCustom && (!compatible ? React.createElement(React.Fragment, null, language && React.createElement(Language, {
68
+ }), !compatible ? React.createElement(React.Fragment, null, language && React.createElement(Language, {
69
69
  language: userInfo.lang,
70
70
  onChange: onLanguageChange
71
71
  }), theme && React.createElement(Theme, {
@@ -77,7 +77,7 @@ export default withTheme(function (props) {
77
77
  theme: userInfo.theme,
78
78
  onLanguageChange: onLanguageChange,
79
79
  onThemeChange: onThemeChange
80
- })), application && React.createElement(Application, {
80
+ }), application && React.createElement(Application, {
81
81
  language: userInfo.lang,
82
82
  apps: apps,
83
83
  onChange: onApplicationChange
@@ -11,17 +11,27 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
11
11
 
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
 
14
- import { useState, useEffect } from 'react';
15
- export default (function (props) {
16
- var _useState = useState(props.loading),
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
+ import { useState, useEffect } from "react";
19
+ export default (function (_ref) {
20
+ var loadingText = _ref.loadingText,
21
+ pLoading = _ref.loading,
22
+ onClick = _ref.onClick,
23
+ children = _ref.children,
24
+ otherProps = _objectWithoutProperties(_ref, ["loadingText", "loading", "onClick", "children"]);
25
+
26
+ var _useState = useState(pLoading),
17
27
  _useState2 = _slicedToArray(_useState, 2),
18
28
  loading = _useState2[0],
19
29
  setLoading = _useState2[1];
20
30
 
21
- var onClick = function onClick(evt) {
31
+ var doClick = function doClick(evt) {
22
32
  if (!loading) {
23
33
  setLoading(true);
24
- var returnVal = props.onClick && props.onClick(evt, function () {
34
+ var returnVal = onClick && onClick(evt, function () {
25
35
  return setLoading(false);
26
36
  });
27
37
 
@@ -36,10 +46,10 @@ export default (function (props) {
36
46
  };
37
47
 
38
48
  useEffect(function () {
39
- setLoading(props.loading);
40
- }, [props.loading]);
41
- return React.createElement(_Button, _extends({}, props, {
49
+ setLoading(pLoading);
50
+ }, [pLoading]);
51
+ return React.createElement(_Button, _extends({}, otherProps, {
42
52
  loading: loading,
43
- onClick: onClick
44
- }), loading ? props.loadingText || props.children : props.children);
53
+ onClick: doClick
54
+ }), loading ? loadingText || children : children);
45
55
  });
@@ -53,11 +53,14 @@ function (_React$PureComponent) {
53
53
 
54
54
  var params = _objectSpread({}, values, {
55
55
  current: 1
56
- });
56
+ }); // memory 与 url解析setForm时 监听事件异步
57
+
57
58
 
58
59
  actions.setData('formData', values);
59
- onSearch && onSearch(params);
60
- actions.emit('search', params);
60
+ Promise.resolve().then(function () {
61
+ onSearch && onSearch(params);
62
+ actions.emit('search', params);
63
+ });
61
64
  };
62
65
 
63
66
  _this.onReset = function () {
@@ -1,32 +1,28 @@
1
- "use strict";
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
+ );
2
15
 
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;
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
+ );