tntd 1.4.23 → 1.4.26
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/babel.config.js +22 -21
- package/components/QueryForm/Field/SelectInput.js +1 -0
- package/dist/stats.json +5057 -5057
- package/dist/tntd.js +1 -1
- package/es/ArrayInput/icon.js +11 -3
- package/es/ArrayInput/index.js +67 -57
- package/es/AuthContext.js +13 -3
- package/es/Columns/index.js +24 -12
- package/es/DevelopmentLogin/LoginModal.js +29 -22
- package/es/DevelopmentLogin/index.js +29 -13
- package/es/Ellipsis/Svg/CopySVG.js +11 -2
- package/es/Ellipsis/Svg/TickSVG.js +11 -2
- package/es/Ellipsis/index.js +33 -25
- package/es/Handle/README.md +20 -0
- package/es/Handle/index.js +46 -29
- package/es/Icon/fonts/iconfont.js +2 -0
- package/es/Icon/iconList.js +8 -1
- package/es/Icon/index.js +25 -5
- package/es/Img/Contain.js +21 -8
- package/es/Img/Cover.js +29 -11
- package/es/Img/index.js +22 -8
- package/es/Layout/ActionsContext.js +12 -2
- package/es/Layout/AppList.js +58 -42
- package/es/Layout/Application.js +44 -24
- package/es/Layout/Avatar.js +45 -23
- package/es/Layout/CompatibleLanguage.js +51 -29
- package/es/Layout/EnterpriseLayout/Avatar.js +54 -32
- package/es/Layout/EnterpriseLayout/Language.js +39 -15
- package/es/Layout/EnterpriseLayout/Theme.js +31 -15
- package/es/Layout/EnterpriseLayout/index.js +24 -9
- package/es/Layout/GlobalNavigation/NavigationPopup.js +53 -29
- package/es/Layout/GlobalNavigation/index.js +51 -23
- package/es/Layout/Header.js +40 -19
- package/es/Layout/HeaderActions.js +43 -19
- package/es/Layout/HeaderNavs.js +35 -12
- package/es/Layout/HeaderTabs.js +50 -25
- package/es/Layout/Iconfont.js +16 -4
- package/es/Layout/Language.js +38 -14
- package/es/Layout/Layout.js +58 -32
- package/es/Layout/Logo.js +26 -12
- package/es/Layout/OrgAppList.js +52 -36
- package/es/Layout/SideMenu.js +57 -32
- package/es/Layout/Theme.js +39 -21
- package/es/Layout/createActions.js +19 -6
- package/es/Layout/images/index.js +95 -58
- package/es/Layout/index.js +70 -28
- package/es/Layout/paaslayout/CompactSideMenu.js +35 -17
- package/es/Layout/paaslayout/Header.js +31 -17
- package/es/Layout/paaslayout/Logo.js +19 -9
- package/es/Layout/paaslayout/SideMenu.js +29 -12
- package/es/Layout/paaslayout/index.js +58 -32
- package/es/Layout/storage.js +71 -21
- package/es/LoadingButton/index.js +17 -8
- package/es/Modal/index.js +29 -16
- package/es/Page/Box.js +18 -8
- package/es/Page/index.js +47 -29
- package/es/Page/utils.js +12 -1
- package/es/QueryForm/Field/Checkbox.js +13 -5
- package/es/QueryForm/Field/Select.js +28 -12
- package/es/QueryForm/Field/SelectInput.js +35 -19
- package/es/QueryForm/Field/fieldsMap.js +36 -23
- package/es/QueryForm/Field/index.js +25 -12
- package/es/QueryForm/createActions.js +20 -7
- package/es/QueryForm/index.js +66 -50
- package/es/QueryForm/useForm.js +16 -4
- package/es/QueryListScene/List.js +43 -30
- package/es/QueryListScene/QueryForm.js +21 -9
- package/es/QueryListScene/QueryListScene.js +29 -16
- package/es/QueryListScene/Title.js +17 -5
- package/es/QueryListScene/Toolbar.js +16 -4
- package/es/QueryListScene/createActions.js +26 -13
- package/es/QueryListScene/index.js +40 -19
- package/es/QueryListScene/useActions.js +16 -4
- package/es/Select/DropDownWrap.js +18 -6
- package/es/Select/index.js +28 -15
- package/es/Table/ResizableTable/index.js +32 -18
- package/es/Table/index.js +30 -11
- package/es/Title/index.js +18 -5
- package/es/index.js +193 -20
- package/es/locale.js +27 -8
- package/es/utils/checkAuth.js +15 -4
- package/es/utils/findMenuInfoByPath.js +16 -5
- package/es/utils/index.js +70 -10
- package/lib/ArrayInput/index.js +12 -28
- package/lib/Columns/index.js +4 -10
- package/lib/DevelopmentLogin/LoginModal.js +9 -23
- package/lib/Ellipsis/index.js +4 -10
- package/lib/Handle/README.md +20 -0
- package/lib/Handle/index.js +9 -19
- package/lib/Layout/AppList.js +12 -30
- package/lib/Layout/Application.js +3 -5
- package/lib/Layout/Avatar.js +6 -12
- package/lib/Layout/CompatibleLanguage.js +3 -5
- package/lib/Layout/EnterpriseLayout/Avatar.js +8 -18
- package/lib/Layout/EnterpriseLayout/Theme.js +3 -5
- package/lib/Layout/HeaderActions.js +5 -7
- package/lib/Layout/Layout.js +7 -9
- package/lib/Layout/OrgAppList.js +7 -19
- package/lib/Layout/SideMenu.js +7 -9
- package/lib/Layout/Theme.js +3 -5
- package/lib/Layout/paaslayout/index.js +8 -10
- package/lib/LoadingButton/index.js +2 -6
- package/lib/Modal/index.js +3 -5
- package/lib/Page/Box.js +3 -5
- package/lib/QueryForm/Field/Checkbox.js +2 -6
- package/lib/QueryForm/Field/Select.js +4 -8
- package/lib/QueryForm/Field/SelectInput.js +7 -14
- package/lib/QueryForm/Field/fieldsMap.js +8 -18
- package/lib/QueryForm/Field/index.js +3 -7
- package/lib/QueryForm/index.js +13 -27
- package/lib/QueryListScene/List.js +5 -7
- package/lib/Select/index.js +8 -14
- package/lib/Table/ResizableTable/index.js +3 -5
- package/lib/Table/index.js +5 -7
- package/package.json +1 -1
- package/es/Layout/checkAuth.js +0 -29
- package/es/Layout/utils.js +0 -136
- package/lib/Layout/EnterpriseLayout/Header.js +0 -113
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
- package/lib/Layout/checkAuth.js +0 -39
- package/lib/Layout/utils.js +0 -166
package/es/ArrayInput/icon.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.deleteIcon = exports.plusIcon = void 0;
|
|
7
|
+
var plusIcon = React.createElement("svg", {
|
|
2
8
|
viewBox: "64 64 896 896",
|
|
3
9
|
focusable: "false",
|
|
4
10
|
"data-icon": "plus-circle",
|
|
@@ -11,7 +17,8 @@ export var plusIcon = React.createElement("svg", {
|
|
|
11
17
|
}), React.createElement("path", {
|
|
12
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"
|
|
13
19
|
}));
|
|
14
|
-
|
|
20
|
+
exports.plusIcon = plusIcon;
|
|
21
|
+
var deleteIcon = React.createElement("svg", {
|
|
15
22
|
viewBox: "64 64 896 896",
|
|
16
23
|
focusable: "false",
|
|
17
24
|
"data-icon": "delete",
|
|
@@ -21,4 +28,5 @@ export var deleteIcon = React.createElement("svg", {
|
|
|
21
28
|
"aria-hidden": "true"
|
|
22
29
|
}, React.createElement("path", {
|
|
23
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"
|
|
24
|
-
}));
|
|
31
|
+
}));
|
|
32
|
+
exports.deleteIcon = deleteIcon;
|
package/es/ArrayInput/index.js
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = ArrayInput;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
|
|
16
|
+
var _icon = require("./icon");
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
9
23
|
|
|
10
24
|
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; }
|
|
11
25
|
|
|
@@ -33,17 +47,13 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
33
47
|
|
|
34
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
49
|
|
|
36
|
-
|
|
37
|
-
import { isFunction, isArray, sumBy, sum, set, get } from "lodash";
|
|
38
|
-
import { plusIcon, deleteIcon } from "./icon";
|
|
39
|
-
import "./index.less";
|
|
40
|
-
var Column = _Table.Column;
|
|
50
|
+
var Column = _antd.Table.Column;
|
|
41
51
|
|
|
42
52
|
var getWidth = function getWidth(span) {
|
|
43
53
|
return 1000 / span;
|
|
44
54
|
};
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
function ArrayInput(_ref) {
|
|
47
57
|
var children = _ref.children,
|
|
48
58
|
defaultValue = _ref.defaultValue,
|
|
49
59
|
value = _ref.value,
|
|
@@ -61,20 +71,20 @@ export default function ArrayInput(_ref) {
|
|
|
61
71
|
_ref$addText = _ref.addText,
|
|
62
72
|
addText = _ref$addText === void 0 ? "添加" : _ref$addText;
|
|
63
73
|
|
|
64
|
-
if (!isFunction(children)) {
|
|
74
|
+
if (!(0, _lodash.isFunction)(children)) {
|
|
65
75
|
throw new Error("ArrayInput的children必须是函数");
|
|
66
76
|
}
|
|
67
77
|
|
|
68
|
-
var _useState = useState(value || defaultValue),
|
|
78
|
+
var _useState = (0, _react.useState)(value || defaultValue),
|
|
69
79
|
_useState2 = _slicedToArray(_useState, 2),
|
|
70
80
|
_value = _useState2[0],
|
|
71
81
|
setValue = _useState2[1];
|
|
72
82
|
|
|
73
|
-
useEffect(function () {
|
|
83
|
+
(0, _react.useEffect)(function () {
|
|
74
84
|
setValue(value);
|
|
75
85
|
}, [value]);
|
|
76
86
|
|
|
77
|
-
var _onChange = useCallback(function (value) {
|
|
87
|
+
var _onChange = (0, _react.useCallback)(function (value) {
|
|
78
88
|
if (onChange) {
|
|
79
89
|
onChange(value);
|
|
80
90
|
} else {
|
|
@@ -111,22 +121,22 @@ export default function ArrayInput(_ref) {
|
|
|
111
121
|
};
|
|
112
122
|
|
|
113
123
|
if (mode === "list") {
|
|
114
|
-
return
|
|
124
|
+
return _react["default"].createElement("div", {
|
|
115
125
|
className: "tntd-array-input"
|
|
116
126
|
}, inValue.map(function (item, index) {
|
|
117
127
|
var fields = children(item, index);
|
|
118
128
|
|
|
119
|
-
if (!isArray(fields)) {
|
|
120
|
-
fields = get(fields, "props.children", []);
|
|
129
|
+
if (!(0, _lodash.isArray)(fields)) {
|
|
130
|
+
fields = (0, _lodash.get)(fields, "props.children", []);
|
|
121
131
|
}
|
|
122
132
|
|
|
123
|
-
return
|
|
133
|
+
return _react["default"].createElement(_antd.Row, {
|
|
124
134
|
gutter: gutter,
|
|
125
135
|
key: index,
|
|
126
136
|
className: "tntd-array-input-item"
|
|
127
137
|
}, fields.map(function (field, i) {
|
|
128
|
-
if (!isValidElement(field)) {
|
|
129
|
-
return field ?
|
|
138
|
+
if (!(0, _react.isValidElement)(field)) {
|
|
139
|
+
return field ? _react["default"].createElement(_antd.Col, {
|
|
130
140
|
span: 4,
|
|
131
141
|
key: i
|
|
132
142
|
}, field) : "";
|
|
@@ -139,10 +149,10 @@ export default function ArrayInput(_ref) {
|
|
|
139
149
|
fieldChange = _ref2.onChange,
|
|
140
150
|
other = _objectWithoutProperties(_ref2, ["name", "span", "onChange"]);
|
|
141
151
|
|
|
142
|
-
return
|
|
152
|
+
return _react["default"].createElement(_antd.Col, {
|
|
143
153
|
span: span,
|
|
144
154
|
key: i
|
|
145
|
-
},
|
|
155
|
+
}, _react["default"].cloneElement(field, _objectSpread({
|
|
146
156
|
value: item[name] || undefined,
|
|
147
157
|
onChange: function onChange(e) {
|
|
148
158
|
fieldChange && fieldChange(e, index, changeValue);
|
|
@@ -150,38 +160,38 @@ export default function ArrayInput(_ref) {
|
|
|
150
160
|
changeValue(index, name, newValue);
|
|
151
161
|
}
|
|
152
162
|
}, other)));
|
|
153
|
-
}),
|
|
154
|
-
span: 24 - sum(fields.map(function (f) {
|
|
155
|
-
return get(f, "props.span", 4);
|
|
163
|
+
}), _react["default"].createElement(_antd.Col, {
|
|
164
|
+
span: 24 - (0, _lodash.sum)(fields.map(function (f) {
|
|
165
|
+
return (0, _lodash.get)(f, "props.span", 4);
|
|
156
166
|
})) % 24
|
|
157
|
-
},
|
|
167
|
+
}, _react["default"].createElement("span", {
|
|
158
168
|
className: "tntd-array-input-action"
|
|
159
|
-
}, plusTip ?
|
|
169
|
+
}, plusTip ? _react["default"].createElement(_antd.Tooltip, {
|
|
160
170
|
title: plusTip,
|
|
161
171
|
placement: "left"
|
|
162
|
-
},
|
|
172
|
+
}, _react["default"].createElement("span", {
|
|
163
173
|
className: "mr10",
|
|
164
174
|
onClick: function onClick() {
|
|
165
175
|
return onAdd(index);
|
|
166
176
|
}
|
|
167
|
-
}, plusIcon)) :
|
|
177
|
+
}, _icon.plusIcon)) : _react["default"].createElement("span", {
|
|
168
178
|
className: "mr10",
|
|
169
179
|
onClick: function onClick() {
|
|
170
180
|
return onAdd(index);
|
|
171
181
|
}
|
|
172
|
-
}, plusIcon), deleteTip ?
|
|
182
|
+
}, _icon.plusIcon), deleteTip ? _react["default"].createElement(_antd.Tooltip, {
|
|
173
183
|
title: deleteTip,
|
|
174
184
|
placement: "right"
|
|
175
|
-
},
|
|
185
|
+
}, _react["default"].createElement("span", {
|
|
176
186
|
onClick: function onClick() {
|
|
177
187
|
return onDelete(index);
|
|
178
188
|
}
|
|
179
|
-
}, deleteIcon)) :
|
|
189
|
+
}, _icon.deleteIcon)) : _react["default"].createElement("span", {
|
|
180
190
|
onClick: function onClick() {
|
|
181
191
|
return onDelete(index);
|
|
182
192
|
}
|
|
183
|
-
}, deleteIcon))));
|
|
184
|
-
}), inValue.length === 0 &&
|
|
193
|
+
}, _icon.deleteIcon))));
|
|
194
|
+
}), inValue.length === 0 && _react["default"].createElement("a", {
|
|
185
195
|
onClick: function onClick() {
|
|
186
196
|
return onAdd();
|
|
187
197
|
}
|
|
@@ -189,8 +199,8 @@ export default function ArrayInput(_ref) {
|
|
|
189
199
|
} else {
|
|
190
200
|
var fields = children({}, 0);
|
|
191
201
|
|
|
192
|
-
if (!isArray(fields)) {
|
|
193
|
-
fields = get(fields, "props.children", []);
|
|
202
|
+
if (!(0, _lodash.isArray)(fields)) {
|
|
203
|
+
fields = (0, _lodash.get)(fields, "props.children", []);
|
|
194
204
|
}
|
|
195
205
|
|
|
196
206
|
var dataSource = inValue.map(function (value, index) {
|
|
@@ -200,17 +210,17 @@ export default function ArrayInput(_ref) {
|
|
|
200
210
|
var _field$props;
|
|
201
211
|
|
|
202
212
|
var name = field == null ? void 0 : (_field$props = field.props) == null ? void 0 : _field$props.name;
|
|
203
|
-
name && set(back, name, field);
|
|
213
|
+
name && (0, _lodash.set)(back, name, field);
|
|
204
214
|
});
|
|
205
215
|
return back;
|
|
206
216
|
});
|
|
207
|
-
return
|
|
217
|
+
return _react["default"].createElement("div", {
|
|
208
218
|
className: "tntd-array-input"
|
|
209
|
-
},
|
|
219
|
+
}, _react["default"].createElement(_antd.Table, {
|
|
210
220
|
dataSource: dataSource,
|
|
211
221
|
pagination: false,
|
|
212
222
|
locale: {
|
|
213
|
-
emptyText:
|
|
223
|
+
emptyText: _react["default"].createElement("a", {
|
|
214
224
|
onClick: function onClick() {
|
|
215
225
|
return onAdd();
|
|
216
226
|
}
|
|
@@ -222,18 +232,18 @@ export default function ArrayInput(_ref) {
|
|
|
222
232
|
span = _ref3.span,
|
|
223
233
|
title = _ref3.title;
|
|
224
234
|
|
|
225
|
-
return
|
|
235
|
+
return _react["default"].createElement(Column, {
|
|
226
236
|
key: name,
|
|
227
237
|
dataIndex: name,
|
|
228
238
|
title: title,
|
|
229
239
|
width: getWidth(span || 24 / (fields.length + 1)),
|
|
230
240
|
render: function render(field, row, index) {
|
|
231
|
-
if (!isValidElement(field)) {
|
|
241
|
+
if (!(0, _react.isValidElement)(field)) {
|
|
232
242
|
return field;
|
|
233
243
|
}
|
|
234
244
|
|
|
235
245
|
var fieldChange = field.props.onChange;
|
|
236
|
-
return
|
|
246
|
+
return _react["default"].cloneElement(field, {
|
|
237
247
|
value: inValue[index][name] || undefined,
|
|
238
248
|
onChange: function onChange(e) {
|
|
239
249
|
fieldChange && fieldChange(e, index, changeValue);
|
|
@@ -243,39 +253,39 @@ export default function ArrayInput(_ref) {
|
|
|
243
253
|
});
|
|
244
254
|
}
|
|
245
255
|
});
|
|
246
|
-
}),
|
|
256
|
+
}), _react["default"].createElement(Column, {
|
|
247
257
|
key: "action",
|
|
248
258
|
dataIndex: "action",
|
|
249
259
|
title: "\u64CD\u4F5C",
|
|
250
|
-
width: getWidth(24 - sumBy(fields, "props.span") % 24),
|
|
260
|
+
width: getWidth(24 - (0, _lodash.sumBy)(fields, "props.span") % 24),
|
|
251
261
|
render: function render(text, row, index) {
|
|
252
|
-
return
|
|
262
|
+
return _react["default"].createElement("span", {
|
|
253
263
|
className: "tntd-array-input-action"
|
|
254
|
-
}, plusTip ?
|
|
264
|
+
}, plusTip ? _react["default"].createElement(_antd.Tooltip, {
|
|
255
265
|
title: plusTip,
|
|
256
266
|
placement: "left"
|
|
257
|
-
},
|
|
267
|
+
}, _react["default"].createElement("span", {
|
|
258
268
|
className: "mr10",
|
|
259
269
|
onClick: function onClick() {
|
|
260
270
|
return onAdd(index);
|
|
261
271
|
}
|
|
262
|
-
}, plusIcon)) :
|
|
272
|
+
}, _icon.plusIcon)) : _react["default"].createElement("span", {
|
|
263
273
|
className: "mr10",
|
|
264
274
|
onClick: function onClick() {
|
|
265
275
|
return onAdd(index);
|
|
266
276
|
}
|
|
267
|
-
}, plusIcon), deleteTip ?
|
|
277
|
+
}, _icon.plusIcon), deleteTip ? _react["default"].createElement(_antd.Tooltip, {
|
|
268
278
|
title: deleteTip,
|
|
269
279
|
placement: "right"
|
|
270
|
-
},
|
|
280
|
+
}, _react["default"].createElement("span", {
|
|
271
281
|
onClick: function onClick() {
|
|
272
282
|
return onDelete(index);
|
|
273
283
|
}
|
|
274
|
-
}, deleteIcon)) :
|
|
284
|
+
}, _icon.deleteIcon)) : _react["default"].createElement("span", {
|
|
275
285
|
onClick: function onClick() {
|
|
276
286
|
return onDelete(index);
|
|
277
287
|
}
|
|
278
|
-
}, deleteIcon));
|
|
288
|
+
}, _icon.deleteIcon));
|
|
279
289
|
}
|
|
280
290
|
})));
|
|
281
291
|
}
|
package/es/AuthContext.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _default = (0, _react.createContext)(function () {
|
|
3
11
|
return true;
|
|
4
|
-
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
exports["default"] = _default;
|
package/es/Columns/index.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Item = void 0;
|
|
7
|
+
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
5
15
|
|
|
6
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
17
|
|
|
@@ -15,10 +25,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
15
25
|
|
|
16
26
|
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
27
|
|
|
18
|
-
import classnames from 'classnames';
|
|
19
|
-
import './index.less';
|
|
20
28
|
var clsPrefix = 'tnt-columns';
|
|
21
|
-
|
|
29
|
+
|
|
30
|
+
var Item = function Item(props) {
|
|
22
31
|
var children = props.children,
|
|
23
32
|
span = props.span,
|
|
24
33
|
extra = props.extra,
|
|
@@ -29,7 +38,7 @@ export var Item = function Item(props) {
|
|
|
29
38
|
tabType = props.tabType,
|
|
30
39
|
onTabChange = props.onTabChange;
|
|
31
40
|
var realActiveKey = activeTabKey || defaultActiveTabKey;
|
|
32
|
-
return React.createElement(
|
|
41
|
+
return React.createElement(_antd.Col, {
|
|
33
42
|
className: "".concat(clsPrefix, "-col"),
|
|
34
43
|
span: span < 4 ? 4 : span
|
|
35
44
|
}, React.createElement("div", null, (!tabList || tabList.length < 0) && React.createElement("div", {
|
|
@@ -46,7 +55,7 @@ export var Item = function Item(props) {
|
|
|
46
55
|
var tab = _ref.tab,
|
|
47
56
|
key = _ref.key;
|
|
48
57
|
return React.createElement("span", {
|
|
49
|
-
className:
|
|
58
|
+
className: (0, _classnames["default"])('tab-item', {
|
|
50
59
|
'active-tab': realActiveKey === key
|
|
51
60
|
}),
|
|
52
61
|
style: {
|
|
@@ -62,6 +71,8 @@ export var Item = function Item(props) {
|
|
|
62
71
|
}, children)));
|
|
63
72
|
};
|
|
64
73
|
|
|
74
|
+
exports.Item = Item;
|
|
75
|
+
|
|
65
76
|
var Columns = function Columns(props) {
|
|
66
77
|
var children = props.children,
|
|
67
78
|
height = props.height,
|
|
@@ -74,8 +85,8 @@ var Columns = function Columns(props) {
|
|
|
74
85
|
height: props.height ? "".concat(props.height, "px") : 'calc(100vh)'
|
|
75
86
|
});
|
|
76
87
|
|
|
77
|
-
return React.createElement(
|
|
78
|
-
className:
|
|
88
|
+
return React.createElement(_antd.Row, _extends({
|
|
89
|
+
className: (0, _classnames["default"])(clsPrefix, {
|
|
79
90
|
gutter: gutter
|
|
80
91
|
}),
|
|
81
92
|
style: rowStyle
|
|
@@ -83,4 +94,5 @@ var Columns = function Columns(props) {
|
|
|
83
94
|
};
|
|
84
95
|
|
|
85
96
|
Columns.Item = Item;
|
|
86
|
-
|
|
97
|
+
var _default = Columns;
|
|
98
|
+
exports["default"] = _default;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _universalCookie = _interopRequireDefault(require("universal-cookie"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
15
|
|
|
10
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; }
|
|
11
17
|
|
|
@@ -21,20 +27,19 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
21
27
|
|
|
22
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
import Cookies from 'universal-cookie';
|
|
26
|
-
var cookies = new Cookies(); // 默认
|
|
30
|
+
var cookies = new _universalCookie["default"](); // 默认
|
|
27
31
|
|
|
28
32
|
var accountInfoDefault = {
|
|
29
33
|
account: undefined,
|
|
30
34
|
password: undefined
|
|
31
35
|
};
|
|
32
|
-
|
|
36
|
+
|
|
37
|
+
var _default = function _default(_ref) {
|
|
33
38
|
var visible = _ref.visible,
|
|
34
39
|
close = _ref.close,
|
|
35
40
|
signIn = _ref.signIn;
|
|
36
41
|
|
|
37
|
-
var _useState = useState(false),
|
|
42
|
+
var _useState = (0, _react.useState)(false),
|
|
38
43
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
44
|
confirmLoading = _useState2[0],
|
|
40
45
|
setConfirmLoading = _useState2[1]; // 如果storage中已存在,则取storage
|
|
@@ -48,7 +53,7 @@ export default (function (_ref) {
|
|
|
48
53
|
} catch (e) {}
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
var _useState3 = useState(accountInfoDefault),
|
|
56
|
+
var _useState3 = (0, _react.useState)(accountInfoDefault),
|
|
52
57
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
58
|
accountInfo = _useState4[0],
|
|
54
59
|
setAccountInfo = _useState4[1];
|
|
@@ -62,7 +67,7 @@ export default (function (_ref) {
|
|
|
62
67
|
|
|
63
68
|
if (returnVal && returnVal.then) {
|
|
64
69
|
returnVal.then(function (res) {
|
|
65
|
-
|
|
70
|
+
_antd.message.success('模拟登陆成功');
|
|
66
71
|
|
|
67
72
|
localStorage.setItem('accountInfo', JSON.stringify(accountInfo));
|
|
68
73
|
setConfirmLoading(false);
|
|
@@ -90,32 +95,32 @@ export default (function (_ref) {
|
|
|
90
95
|
setAccountInfo(_objectSpread({}, accountInfo, _defineProperty({}, key, evt.target.value)));
|
|
91
96
|
};
|
|
92
97
|
|
|
93
|
-
return React.createElement(
|
|
98
|
+
return React.createElement(_antd.Modal, {
|
|
94
99
|
title: "\u5F00\u53D1\u8005\u6A21\u62DF\u767B\u9646",
|
|
95
100
|
visible: visible,
|
|
96
101
|
maskClosable: false,
|
|
97
102
|
onOk: onSubmit,
|
|
98
103
|
onCancel: close,
|
|
99
104
|
confirmLoading: confirmLoading
|
|
100
|
-
}, React.createElement(
|
|
105
|
+
}, React.createElement(_antd.Form, {
|
|
101
106
|
labelCol: {
|
|
102
107
|
span: 5
|
|
103
108
|
},
|
|
104
109
|
wrapperCol: {
|
|
105
110
|
span: 18
|
|
106
111
|
}
|
|
107
|
-
}, React.createElement(
|
|
112
|
+
}, React.createElement(_antd.Form.Item, {
|
|
108
113
|
label: "\u7528\u6237\u540D\uFF1A"
|
|
109
|
-
}, React.createElement(
|
|
114
|
+
}, React.createElement(_antd.Input, {
|
|
110
115
|
type: "text",
|
|
111
116
|
placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D",
|
|
112
117
|
value: account || undefined,
|
|
113
118
|
onChange: function onChange(evt) {
|
|
114
119
|
return changeFieldValue('account', evt);
|
|
115
120
|
}
|
|
116
|
-
})), React.createElement(
|
|
121
|
+
})), React.createElement(_antd.Form.Item, {
|
|
117
122
|
label: "\u5BC6\u7801\uFF1A"
|
|
118
|
-
}, React.createElement(
|
|
123
|
+
}, React.createElement(_antd.Input, {
|
|
119
124
|
type: "text",
|
|
120
125
|
placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D",
|
|
121
126
|
value: password || undefined,
|
|
@@ -123,4 +128,6 @@ export default (function (_ref) {
|
|
|
123
128
|
return changeFieldValue('password', evt);
|
|
124
129
|
}
|
|
125
130
|
}))));
|
|
126
|
-
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
exports["default"] = _default;
|
|
@@ -1,3 +1,14 @@
|
|
|
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 _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); }
|
|
11
|
+
|
|
1
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
2
13
|
|
|
3
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
@@ -6,35 +17,40 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
6
17
|
|
|
7
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
19
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var DevelopmentLoginModal =
|
|
14
|
-
return
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
var DevelopmentLoginModal = _react["default"].lazy(function () {
|
|
25
|
+
return Promise.resolve().then(function () {
|
|
26
|
+
return _interopRequireWildcard(require('./LoginModal'));
|
|
27
|
+
});
|
|
15
28
|
});
|
|
16
|
-
|
|
29
|
+
|
|
30
|
+
var _default = function _default(_ref) {
|
|
17
31
|
var signIn = _ref.signIn;
|
|
18
32
|
|
|
19
|
-
var _useState = useState(false),
|
|
33
|
+
var _useState = (0, _react.useState)(false),
|
|
20
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
35
|
loginVisible = _useState2[0],
|
|
22
36
|
setLoginVisible = _useState2[1];
|
|
23
37
|
|
|
24
|
-
return
|
|
38
|
+
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement("a", {
|
|
25
39
|
style: {
|
|
26
40
|
fontSize: 14
|
|
27
41
|
},
|
|
28
42
|
onClick: function onClick() {
|
|
29
43
|
return setLoginVisible(true);
|
|
30
44
|
}
|
|
31
|
-
}, "\u6A21\u62DF\u767B\u5F55"), loginVisible &&
|
|
32
|
-
fallback:
|
|
33
|
-
},
|
|
45
|
+
}, "\u6A21\u62DF\u767B\u5F55"), loginVisible && _react["default"].createElement(_react["default"].Suspense, {
|
|
46
|
+
fallback: _react["default"].createElement("div", null, "\u6B63\u5728\u52A0\u8F7D\u4E2D")
|
|
47
|
+
}, _react["default"].createElement(DevelopmentLoginModal, {
|
|
34
48
|
visible: loginVisible,
|
|
35
49
|
signIn: signIn,
|
|
36
50
|
close: function close() {
|
|
37
51
|
return setLoginVisible(false);
|
|
38
52
|
}
|
|
39
53
|
})));
|
|
40
|
-
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports["default"] = _default;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _default = function _default(props) {
|
|
2
9
|
return React.createElement("div", props, React.createElement("svg", {
|
|
3
10
|
width: "16px",
|
|
4
11
|
height: "16px",
|
|
@@ -60,4 +67,6 @@ export default (function (props) {
|
|
|
60
67
|
y2: "8",
|
|
61
68
|
id: "\u8DEF\u5F84"
|
|
62
69
|
})))))))));
|
|
63
|
-
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
exports["default"] = _default;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _default = function _default(props) {
|
|
2
9
|
return React.createElement("div", props, React.createElement("svg", {
|
|
3
10
|
width: "17px",
|
|
4
11
|
height: "16px",
|
|
@@ -38,4 +45,6 @@ export default (function (props) {
|
|
|
38
45
|
"stroke-linejoin": "round",
|
|
39
46
|
points: "14.3333333 3.66666667 5.625 12.3333333 1.66666667 8.39393333"
|
|
40
47
|
}))))))));
|
|
41
|
-
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports["default"] = _default;
|