hc-busin-components 1.0.0
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/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/Actions/index.d.ts +20 -0
- package/dist/Actions/index.js +142 -0
- package/dist/Actions/index.less +9 -0
- package/dist/AuthComponents/authDivider.d.ts +15 -0
- package/dist/AuthComponents/authDivider.js +104 -0
- package/dist/AuthComponents/index.d.ts +4 -0
- package/dist/AuthComponents/index.js +14 -0
- package/dist/BasicFilesRead/images/back.png +0 -0
- package/dist/BasicFilesRead/images/excel.png +0 -0
- package/dist/BasicFilesRead/images/folder.png +0 -0
- package/dist/BasicFilesRead/images/image.png +0 -0
- package/dist/BasicFilesRead/images/jpeg.png +0 -0
- package/dist/BasicFilesRead/images/jpg.png +0 -0
- package/dist/BasicFilesRead/images/normal.png +0 -0
- package/dist/BasicFilesRead/images/png.png +0 -0
- package/dist/BasicFilesRead/images/tar.png +0 -0
- package/dist/BasicFilesRead/images/text.png +0 -0
- package/dist/BasicFilesRead/images/zip.png +0 -0
- package/dist/BasicFilesRead/index.d.ts +31 -0
- package/dist/BasicFilesRead/index.js +286 -0
- package/dist/BasicFilesRead/styles/index.d.ts +3 -0
- package/dist/BasicFilesRead/styles/index.js +9 -0
- package/dist/CombinTable/components/RenderContent.d.ts +9 -0
- package/dist/CombinTable/components/RenderContent.js +201 -0
- package/dist/CombinTable/hooks/useTableParams.d.ts +20 -0
- package/dist/CombinTable/hooks/useTableParams.js +75 -0
- package/dist/CombinTable/hooks/useTableState.d.ts +5 -0
- package/dist/CombinTable/hooks/useTableState.js +22 -0
- package/dist/CombinTable/index.d.ts +4 -0
- package/dist/CombinTable/index.js +225 -0
- package/dist/CombinTable/styles/index.d.ts +3 -0
- package/dist/CombinTable/styles/index.js +11 -0
- package/dist/CombinTable/types/index.d.ts +21 -0
- package/dist/CombinTable/types/index.js +1 -0
- package/dist/CombineSearch/components/Content.d.ts +13 -0
- package/dist/CombineSearch/components/Content.js +249 -0
- package/dist/CombineSearch/components/Tags.d.ts +14 -0
- package/dist/CombineSearch/components/Tags.js +115 -0
- package/dist/CombineSearch/hooks/useCombineState.d.ts +5 -0
- package/dist/CombineSearch/hooks/useCombineState.js +17 -0
- package/dist/CombineSearch/index.d.ts +4 -0
- package/dist/CombineSearch/index.js +168 -0
- package/dist/CombineSearch/style/edit.svg +1 -0
- package/dist/CombineSearch/style/index.d.ts +14 -0
- package/dist/CombineSearch/style/index.js +26 -0
- package/dist/CombineSearch/types/index.d.ts +46 -0
- package/dist/CombineSearch/types/index.js +0 -0
- package/dist/ComponentUninstalled/assets/comp-unintall-background.png +0 -0
- package/dist/ComponentUninstalled/assets/comp-unintall-bg.png +0 -0
- package/dist/ComponentUninstalled/index.d.ts +32 -0
- package/dist/ComponentUninstalled/index.js +164 -0
- package/dist/ComponentUninstalled/index.less +108 -0
- package/dist/ComponentUninstalled/locale.d.ts +14 -0
- package/dist/ComponentUninstalled/locale.js +21 -0
- package/dist/DataCountPopover/index.d.ts +23 -0
- package/dist/DataCountPopover/index.js +121 -0
- package/dist/DataCountPopover/index.less +62 -0
- package/dist/DateRangePicker/index.d.ts +38 -0
- package/dist/DateRangePicker/index.js +483 -0
- package/dist/DateRangePicker/index.less +196 -0
- package/dist/DeleteConfirm/index.d.ts +23 -0
- package/dist/DeleteConfirm/index.js +109 -0
- package/dist/DeleteConfirm/index.less +44 -0
- package/dist/DeleteConfirm/locale.d.ts +7 -0
- package/dist/DeleteConfirm/locale.js +7 -0
- package/dist/DisplayButton/index.d.ts +7 -0
- package/dist/DisplayButton/index.js +23 -0
- package/dist/FileRead/images/back.png +0 -0
- package/dist/FileRead/images/excel.png +0 -0
- package/dist/FileRead/images/folder.png +0 -0
- package/dist/FileRead/images/image.png +0 -0
- package/dist/FileRead/images/jpeg.png +0 -0
- package/dist/FileRead/images/jpg.png +0 -0
- package/dist/FileRead/images/normal.png +0 -0
- package/dist/FileRead/images/png.png +0 -0
- package/dist/FileRead/images/tar.png +0 -0
- package/dist/FileRead/images/text.png +0 -0
- package/dist/FileRead/images/zip.png +0 -0
- package/dist/FileRead/index.d.ts +31 -0
- package/dist/FileRead/index.js +417 -0
- package/dist/FileRead/styles/index.d.ts +3 -0
- package/dist/FileRead/styles/index.js +9 -0
- package/dist/Icon/iconfont.d.ts +1 -0
- package/dist/Icon/iconfont.js +1 -0
- package/dist/Icon/index.d.ts +10 -0
- package/dist/Icon/index.js +20 -0
- package/dist/Icon/index.less +11 -0
- package/dist/IconPopTips/index.d.ts +10 -0
- package/dist/IconPopTips/index.js +26 -0
- package/dist/IconPopTips/index.less +33 -0
- package/dist/IconText/index.d.ts +15 -0
- package/dist/IconText/index.js +19 -0
- package/dist/IconText/index.less +38 -0
- package/dist/LogCenter/assets/empty.png +0 -0
- package/dist/LogCenter/context.d.ts +24 -0
- package/dist/LogCenter/context.js +66 -0
- package/dist/LogCenter/history-log.d.ts +35 -0
- package/dist/LogCenter/history-log.js +1214 -0
- package/dist/LogCenter/index.d.ts +8 -0
- package/dist/LogCenter/index.js +130 -0
- package/dist/LogCenter/index.less +577 -0
- package/dist/LogCenter/locale.d.ts +3 -0
- package/dist/LogCenter/locale.js +81 -0
- package/dist/LogCenter/realtime-log.d.ts +35 -0
- package/dist/LogCenter/realtime-log.js +641 -0
- package/dist/LogCenter/select-with-all.d.ts +28 -0
- package/dist/LogCenter/select-with-all.js +337 -0
- package/dist/LogCenter/select-with-all.less +81 -0
- package/dist/LogCenter/services.d.ts +27 -0
- package/dist/LogCenter/services.js +93 -0
- package/dist/LogCenter/tools.d.ts +9 -0
- package/dist/LogCenter/tools.js +137 -0
- package/dist/LogCenter/types.d.ts +133 -0
- package/dist/LogCenter/types.js +1 -0
- package/dist/LogicalResourceFilter/index.d.ts +7 -0
- package/dist/LogicalResourceFilter/index.js +426 -0
- package/dist/LogicalResourceFilter/index.less +139 -0
- package/dist/LogicalResourceFilter/locale.d.ts +2 -0
- package/dist/LogicalResourceFilter/locale.js +10 -0
- package/dist/LogicalResourceFilter/types.d.ts +58 -0
- package/dist/LogicalResourceFilter/types.js +1 -0
- package/dist/MetadataCount/index.d.ts +16 -0
- package/dist/MetadataCount/index.js +97 -0
- package/dist/MetadataCount/index.less +40 -0
- package/dist/MetadataForm/index.d.ts +18 -0
- package/dist/MetadataForm/index.js +85 -0
- package/dist/MetadataForm/index.less +108 -0
- package/dist/MetadataForm/label.d.ts +13 -0
- package/dist/MetadataForm/label.js +447 -0
- package/dist/MetadataPopoverList/fetchArray.d.ts +3 -0
- package/dist/MetadataPopoverList/fetchArray.js +74 -0
- package/dist/MetadataPopoverList/index.d.ts +13 -0
- package/dist/MetadataPopoverList/index.js +98 -0
- package/dist/MetadataPopoverList/index.less +74 -0
- package/dist/MetadataTags/index.d.ts +17 -0
- package/dist/MetadataTags/index.js +109 -0
- package/dist/MetadataTags/index.less +26 -0
- package/dist/OverFlow/index.d.ts +4 -0
- package/dist/OverFlow/index.js +66 -0
- package/dist/OverFlow/types/index.d.ts +11 -0
- package/dist/OverFlow/types/index.js +1 -0
- package/dist/PageHeader/index.d.ts +16 -0
- package/dist/PageHeader/index.js +41 -0
- package/dist/PageHeader/index.less +89 -0
- package/dist/ResourceProgress/index.d.ts +6 -0
- package/dist/ResourceProgress/index.js +102 -0
- package/dist/ResourceProgress/index.less +86 -0
- package/dist/ResourceProgress/types/index.d.ts +15 -0
- package/dist/ResourceProgress/types/index.js +1 -0
- package/dist/Terminal/index.d.ts +44 -0
- package/dist/Terminal/index.js +390 -0
- package/dist/Terminal/index.less +39 -0
- package/dist/TextCopy/index.d.ts +21 -0
- package/dist/TextCopy/index.js +38 -0
- package/dist/TextCopy/index.less +51 -0
- package/dist/TextEllipsis/index.d.ts +18 -0
- package/dist/TextEllipsis/index.js +31 -0
- package/dist/TextEllipsis/index.less +3 -0
- package/dist/ThemeForm/index.d.ts +6 -0
- package/dist/ThemeForm/index.js +15 -0
- package/dist/ThemeForm/index.less +15 -0
- package/dist/ThemeSubmit/index.d.ts +16 -0
- package/dist/ThemeSubmit/index.js +60 -0
- package/dist/ThemeSubmit/index.less +30 -0
- package/dist/TooltipSpan/index.d.ts +6 -0
- package/dist/TooltipSpan/index.js +72 -0
- package/dist/UsageCycle/index.d.ts +12 -0
- package/dist/UsageCycle/index.js +71 -0
- package/dist/UsageCycle/index.less +56 -0
- package/dist/Yaml/CodeMirrorWrapper.d.ts +14 -0
- package/dist/Yaml/CodeMirrorWrapper.js +106 -0
- package/dist/Yaml/index.d.ts +6 -0
- package/dist/Yaml/index.js +470 -0
- package/dist/Yaml/index.less +190 -0
- package/dist/Yaml/types.d.ts +38 -0
- package/dist/Yaml/types.js +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +32 -0
- package/dist/metadata/locale.d.ts +52 -0
- package/dist/metadata/locale.js +69 -0
- package/dist/showMore/index.d.ts +6 -0
- package/dist/showMore/index.js +40 -0
- package/package.json +121 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# hc-busin-components
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/hc-busin-components)
|
|
4
|
+
[](https://npmjs.org/package/hc-busin-components)
|
|
5
|
+
|
|
6
|
+
A react library developed with dumi
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
TODO
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
TODO
|
|
15
|
+
|
|
16
|
+
## Development
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# install dependencies
|
|
20
|
+
$ yarn install
|
|
21
|
+
|
|
22
|
+
# develop library by docs demo
|
|
23
|
+
$ yarn start
|
|
24
|
+
|
|
25
|
+
# build library source code
|
|
26
|
+
$ yarn run build
|
|
27
|
+
|
|
28
|
+
# build library source code in watch mode
|
|
29
|
+
$ yarn run build:watch
|
|
30
|
+
|
|
31
|
+
# build docs
|
|
32
|
+
$ yarn run docs:build
|
|
33
|
+
|
|
34
|
+
# Locally preview the production build.
|
|
35
|
+
$ yarn run docs:preview
|
|
36
|
+
|
|
37
|
+
# check your project for potential problems
|
|
38
|
+
$ yarn run doctor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
若文档开发报错 `Can't resolve './core/defineApp' in '.dumi/tmp'`,说明 Dumi 临时目录不完整。可先清理再生成:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
rm -rf .dumi/tmp .dumi/tmp-production .dumi/tmp-test
|
|
45
|
+
yarn dumi setup # 或 npx dumi setup
|
|
46
|
+
yarn start
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
(`yarn start` / `docs:build` 已会在执行前自动运行 `dumi setup`。)
|
|
50
|
+
|
|
51
|
+
## LICENSE
|
|
52
|
+
|
|
53
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface ActionElementProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface ActionsProps {
|
|
9
|
+
children: React.ReactNode[] | React.ReactNode;
|
|
10
|
+
/** 行内最多展示的按钮数量,超出部分收入「更多」 */
|
|
11
|
+
threshold?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface LinkButtonProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
}
|
|
18
|
+
declare const LinkButton: React.FC<LinkButtonProps>;
|
|
19
|
+
declare const Actions: React.FC<ActionsProps>;
|
|
20
|
+
export { Actions, LinkButton };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
var _excluded = ["disabled", "children", "onClick", "style"],
|
|
2
|
+
_excluded2 = ["onClick", "disabled", "children"],
|
|
3
|
+
_excluded3 = ["onClick", "disabled", "style", "children"],
|
|
4
|
+
_excluded4 = ["onClick", "disabled", "children"];
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
import { MoreOutlined } from '@ant-design/icons';
|
|
15
|
+
import { Divider, Dropdown, Space } from 'antd';
|
|
16
|
+
import React, { useEffect, useState } from 'react';
|
|
17
|
+
import "./index.less";
|
|
18
|
+
var LinkButton = function LinkButton(_ref) {
|
|
19
|
+
var _ref$disabled = _ref.disabled,
|
|
20
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21
|
+
linkChildren = _ref.children,
|
|
22
|
+
onClick = _ref.onClick,
|
|
23
|
+
style = _ref.style,
|
|
24
|
+
args = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
26
|
+
style: style,
|
|
27
|
+
className: disabled ? 'displayed-name' : 'name-link',
|
|
28
|
+
onClick: disabled ? undefined : onClick
|
|
29
|
+
}, args), linkChildren);
|
|
30
|
+
};
|
|
31
|
+
var Actions = function Actions(_ref2) {
|
|
32
|
+
var children = _ref2.children,
|
|
33
|
+
_ref2$threshold = _ref2.threshold,
|
|
34
|
+
threshold = _ref2$threshold === void 0 ? 3 : _ref2$threshold;
|
|
35
|
+
var _useState = useState([]),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
list = _useState2[0],
|
|
38
|
+
setList = _useState2[1];
|
|
39
|
+
useEffect(function () {
|
|
40
|
+
if (!children) {
|
|
41
|
+
setList([]);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (Array.isArray(children)) {
|
|
45
|
+
var lt = children.filter(function (item) {
|
|
46
|
+
return item !== null && typeof item !== 'boolean' && /*#__PURE__*/React.isValidElement(item);
|
|
47
|
+
});
|
|
48
|
+
setList(lt);
|
|
49
|
+
} else if ( /*#__PURE__*/React.isValidElement(children) && children.props.children) {
|
|
50
|
+
setList([children]);
|
|
51
|
+
} else {
|
|
52
|
+
setList([]);
|
|
53
|
+
}
|
|
54
|
+
}, [children]);
|
|
55
|
+
if (list.length <= threshold) {
|
|
56
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
57
|
+
align: "center",
|
|
58
|
+
style: {
|
|
59
|
+
gap: 0
|
|
60
|
+
},
|
|
61
|
+
split: /*#__PURE__*/React.createElement(Divider, {
|
|
62
|
+
type: "vertical"
|
|
63
|
+
})
|
|
64
|
+
}, list.map(function (item, index) {
|
|
65
|
+
var _item$props = item.props,
|
|
66
|
+
onClick = _item$props.onClick,
|
|
67
|
+
_item$props$disabled = _item$props.disabled,
|
|
68
|
+
disabled = _item$props$disabled === void 0 ? false : _item$props$disabled,
|
|
69
|
+
linkChildren = _item$props.children,
|
|
70
|
+
rest = _objectWithoutProperties(_item$props, _excluded2);
|
|
71
|
+
return /*#__PURE__*/React.createElement(LinkButton, _extends({
|
|
72
|
+
key: index,
|
|
73
|
+
onClick: onClick,
|
|
74
|
+
disabled: disabled
|
|
75
|
+
}, rest), linkChildren);
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
var l1 = list.slice(0, threshold);
|
|
79
|
+
var l2 = list.slice(threshold);
|
|
80
|
+
var items = l2.map(function (item, index) {
|
|
81
|
+
var _item$props2 = item.props,
|
|
82
|
+
onClick = _item$props2.onClick,
|
|
83
|
+
_item$props2$disabled = _item$props2.disabled,
|
|
84
|
+
disabled = _item$props2$disabled === void 0 ? false : _item$props2$disabled,
|
|
85
|
+
style = _item$props2.style,
|
|
86
|
+
labelChildren = _item$props2.children,
|
|
87
|
+
rest = _objectWithoutProperties(_item$props2, _excluded3);
|
|
88
|
+
void onClick;
|
|
89
|
+
return {
|
|
90
|
+
key: String(index),
|
|
91
|
+
disabled: disabled,
|
|
92
|
+
label: /*#__PURE__*/React.createElement("span", _extends({
|
|
93
|
+
className: disabled ? 'displayed-name' : '',
|
|
94
|
+
style: style
|
|
95
|
+
}, rest), labelChildren)
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
var onMenuClick = function onMenuClick(_ref3) {
|
|
99
|
+
var key = _ref3.key,
|
|
100
|
+
domEvent = _ref3.domEvent;
|
|
101
|
+
domEvent === null || domEvent === void 0 || domEvent.stopPropagation();
|
|
102
|
+
var idx = Number(key);
|
|
103
|
+
var item = l2[idx];
|
|
104
|
+
if (item && !item.props.disabled) {
|
|
105
|
+
var _item$props$onClick, _item$props3;
|
|
106
|
+
(_item$props$onClick = (_item$props3 = item.props).onClick) === null || _item$props$onClick === void 0 || _item$props$onClick.call(_item$props3);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
110
|
+
align: "center",
|
|
111
|
+
style: {
|
|
112
|
+
gap: 0
|
|
113
|
+
},
|
|
114
|
+
split: /*#__PURE__*/React.createElement(Divider, {
|
|
115
|
+
type: "vertical"
|
|
116
|
+
})
|
|
117
|
+
}, l1.map(function (item, index) {
|
|
118
|
+
var _item$props4 = item.props,
|
|
119
|
+
onClick = _item$props4.onClick,
|
|
120
|
+
_item$props4$disabled = _item$props4.disabled,
|
|
121
|
+
disabled = _item$props4$disabled === void 0 ? false : _item$props4$disabled,
|
|
122
|
+
linkChildren = _item$props4.children,
|
|
123
|
+
rest = _objectWithoutProperties(_item$props4, _excluded4);
|
|
124
|
+
return /*#__PURE__*/React.createElement(LinkButton, _extends({
|
|
125
|
+
key: index,
|
|
126
|
+
onClick: onClick,
|
|
127
|
+
disabled: disabled
|
|
128
|
+
}, rest), linkChildren);
|
|
129
|
+
}), /*#__PURE__*/React.createElement(Dropdown, {
|
|
130
|
+
trigger: ['click'],
|
|
131
|
+
menu: {
|
|
132
|
+
items: items,
|
|
133
|
+
onClick: onMenuClick
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
136
|
+
style: {
|
|
137
|
+
fontSize: 12,
|
|
138
|
+
cursor: 'pointer'
|
|
139
|
+
}
|
|
140
|
+
})));
|
|
141
|
+
};
|
|
142
|
+
export { Actions, LinkButton };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ButtonProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface AuthType {
|
|
4
|
+
accType: string;
|
|
5
|
+
createor?: boolean;
|
|
6
|
+
statusDisabled?: boolean;
|
|
7
|
+
adminOperation?: boolean;
|
|
8
|
+
oner?: boolean;
|
|
9
|
+
gap?: boolean;
|
|
10
|
+
tip?: string;
|
|
11
|
+
haveAuth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
type Props = ButtonProps & AuthType;
|
|
14
|
+
declare const AuthDividerButton: (props: Props) => React.JSX.Element;
|
|
15
|
+
export default AuthDividerButton;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["haveAuth", "accType", "tip", "statusDisabled", "createor", "oner", "adminOperation", "gap"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
import { Button, Divider, Space } from 'antd';
|
|
12
|
+
import DisPlayButton from "../DisplayButton";
|
|
13
|
+
import React from 'react';
|
|
14
|
+
var AuthDividerButton = function AuthDividerButton(props) {
|
|
15
|
+
var haveAuth = props.haveAuth,
|
|
16
|
+
accType = props.accType,
|
|
17
|
+
tip = props.tip,
|
|
18
|
+
statusDisabled = props.statusDisabled,
|
|
19
|
+
createor = props.createor,
|
|
20
|
+
oner = props.oner,
|
|
21
|
+
_props$adminOperation = props.adminOperation,
|
|
22
|
+
adminOperation = _props$adminOperation === void 0 ? true : _props$adminOperation,
|
|
23
|
+
_props$gap = props.gap,
|
|
24
|
+
gap = _props$gap === void 0 ? true : _props$gap,
|
|
25
|
+
btnProps = _objectWithoutProperties(props, _excluded);
|
|
26
|
+
var inStyles = _objectSpread({
|
|
27
|
+
padding: 0,
|
|
28
|
+
fontSize: '12px'
|
|
29
|
+
}, btnProps.style);
|
|
30
|
+
if (haveAuth) {
|
|
31
|
+
if (statusDisabled) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
33
|
+
align: "center",
|
|
34
|
+
size: [0, 0]
|
|
35
|
+
}, /*#__PURE__*/React.createElement(DisPlayButton, {
|
|
36
|
+
text: btnProps.children,
|
|
37
|
+
style: inStyles,
|
|
38
|
+
tip: "\u5F53\u524D\u72B6\u6001\u4E0D\u53EF\u64CD\u4F5C"
|
|
39
|
+
}), gap ? /*#__PURE__*/React.createElement(Divider, {
|
|
40
|
+
type: "vertical"
|
|
41
|
+
}) : null);
|
|
42
|
+
}
|
|
43
|
+
if (adminOperation) {
|
|
44
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
45
|
+
align: "center",
|
|
46
|
+
size: [0, 0]
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
48
|
+
type: "link",
|
|
49
|
+
size: "small"
|
|
50
|
+
}, btnProps, {
|
|
51
|
+
style: inStyles
|
|
52
|
+
}), btnProps.children), gap ? /*#__PURE__*/React.createElement(Divider, {
|
|
53
|
+
type: "vertical"
|
|
54
|
+
}) : null);
|
|
55
|
+
}
|
|
56
|
+
if (oner) {
|
|
57
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
58
|
+
align: "center",
|
|
59
|
+
size: [0, 0]
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
61
|
+
size: "small",
|
|
62
|
+
type: "link"
|
|
63
|
+
}, btnProps, {
|
|
64
|
+
style: inStyles
|
|
65
|
+
}), btnProps.children), gap ? /*#__PURE__*/React.createElement(Divider, {
|
|
66
|
+
type: "vertical"
|
|
67
|
+
}) : null);
|
|
68
|
+
}
|
|
69
|
+
if (createor) {
|
|
70
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
71
|
+
align: "center",
|
|
72
|
+
size: [0, 0]
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
74
|
+
type: "link",
|
|
75
|
+
size: "small"
|
|
76
|
+
}, btnProps, {
|
|
77
|
+
style: inStyles
|
|
78
|
+
}), btnProps.children), gap ? /*#__PURE__*/React.createElement(Divider, {
|
|
79
|
+
type: "vertical"
|
|
80
|
+
}) : null);
|
|
81
|
+
}
|
|
82
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
83
|
+
align: "center",
|
|
84
|
+
size: [0, 0]
|
|
85
|
+
}, /*#__PURE__*/React.createElement(DisPlayButton, {
|
|
86
|
+
text: btnProps.children,
|
|
87
|
+
style: inStyles,
|
|
88
|
+
tip: tip ? tip : "只有创建者和组织管理员可以操作"
|
|
89
|
+
}), gap ? /*#__PURE__*/React.createElement(Divider, {
|
|
90
|
+
type: "vertical"
|
|
91
|
+
}) : null);
|
|
92
|
+
}
|
|
93
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
94
|
+
align: "center",
|
|
95
|
+
size: [0, 0]
|
|
96
|
+
}, /*#__PURE__*/React.createElement(DisPlayButton, {
|
|
97
|
+
text: btnProps.children,
|
|
98
|
+
style: inStyles,
|
|
99
|
+
tip: "\u5F53\u524D\u7528\u6237\u65E0\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650"
|
|
100
|
+
}), gap ? /*#__PURE__*/React.createElement(Divider, {
|
|
101
|
+
type: "vertical"
|
|
102
|
+
}) : null);
|
|
103
|
+
};
|
|
104
|
+
export default AuthDividerButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var AuthComponent = function AuthComponent(Components, componentType, haveAuth) {
|
|
3
|
+
return function (props) {
|
|
4
|
+
try {
|
|
5
|
+
if (haveAuth) {
|
|
6
|
+
return /*#__PURE__*/React.createElement(Components, props);
|
|
7
|
+
}
|
|
8
|
+
return null;
|
|
9
|
+
} catch (_unused) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default AuthComponent;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
data: any[];
|
|
4
|
+
onClickPath: (path: string, allpath: any[]) => void;
|
|
5
|
+
fieldNames: string[];
|
|
6
|
+
fieldVisible?: {
|
|
7
|
+
dataIndex: string;
|
|
8
|
+
visibleKey: string;
|
|
9
|
+
visibleValue: any;
|
|
10
|
+
}[];
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
tools?: {
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
DOM: React.ReactNode;
|
|
16
|
+
}[];
|
|
17
|
+
operations: {
|
|
18
|
+
key: string;
|
|
19
|
+
title: string;
|
|
20
|
+
displayKey?: string;
|
|
21
|
+
displayValue?: any;
|
|
22
|
+
type?: 'danger' | 'link' | undefined;
|
|
23
|
+
dangerTip?: string;
|
|
24
|
+
showKey?: string;
|
|
25
|
+
render?: (record: any, allPath?: string[], isFileTools?: boolean) => React.ReactNode;
|
|
26
|
+
onClick?: (record: any, allPath?: string[]) => void;
|
|
27
|
+
}[];
|
|
28
|
+
customColumnsRender?: any;
|
|
29
|
+
}
|
|
30
|
+
declare const FileRead: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
31
|
+
export default FileRead;
|