ebaoferc 0.3.2 → 0.3.3
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 -21
- package/README.md +43 -43
- package/dist/components/FlexRowCol/index.js +1 -3
- package/dist/components/ImageViewTrigger/index.d.ts +4 -0
- package/dist/components/ImageViewTrigger/index.js +14 -6
- package/dist/components/ImageViewTrigger/index.less +25 -25
- package/dist/components/MindGraph/core/graphic/drag.js +15 -15
- package/dist/components/MindGraph/core/graphic/index.js +105 -105
- package/dist/components/MindGraph/core/helper/depth-first-walk-tree.js +4 -4
- package/dist/components/MindGraph/core/helper/descendant.js +3 -3
- package/dist/components/MindGraph/core/helper/get-layout-calc-children.js +6 -6
- package/dist/components/MindGraph/core/helper/judge-if-all-child-fold.js +4 -4
- package/dist/components/MindGraph/core/helper/judge-if-heir-and-fold.js +6 -6
- package/dist/components/MindGraph/core/helper/judge-if-visual-leaf.js +3 -3
- package/dist/components/MindGraph/core/index.d.ts +2 -6
- package/dist/components/MindGraph/core/index.js +26 -26
- package/dist/components/MindGraph/core/process/layout/structured/get-node-cross-boundary.js +7 -7
- package/dist/components/MindGraph/core/process/layout/type.js +20 -20
- package/dist/components/MindGraph/core/process/visible.js +3 -3
- package/dist/components/MindGraph/react/component/index.module.less +71 -71
- package/dist/components/MindGraph/react/scrollbar/axis/index.module.less +47 -47
- package/dist/components/QueryProCard/index.less +9 -9
- package/dist/components/SectionTitleBar/index.less +31 -31
- package/dist/components/SliderVerify/style.module.less +119 -119
- package/dist/components/StyledQueryFilter/index.less +34 -34
- package/dist/components/StyledTable/index.less +17 -17
- package/dist/components/ThemeStatusTag/index.less +11 -11
- package/dist/utils/format/index.js +14 -14
- package/package.json +100 -100
package/LICENSE
CHANGED
|
@@ -1,21 +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.
|
|
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
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# ebaoferc
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.org/package/ebaoferc)
|
|
4
|
-
[](https://npmjs.org/package/ebaoferc)
|
|
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
|
-
$ pnpm install
|
|
21
|
-
|
|
22
|
-
# develop library by docs demo
|
|
23
|
-
$ pnpm start
|
|
24
|
-
|
|
25
|
-
# build library source code
|
|
26
|
-
$ pnpm run build
|
|
27
|
-
|
|
28
|
-
# build library source code in watch mode
|
|
29
|
-
$ pnpm run build:watch
|
|
30
|
-
|
|
31
|
-
# build docs
|
|
32
|
-
$ pnpm run docs:build
|
|
33
|
-
|
|
34
|
-
# Locally preview the production build.
|
|
35
|
-
$ pnpm run docs:preview
|
|
36
|
-
|
|
37
|
-
# check your project for potential problems
|
|
38
|
-
$ pnpm run doctor
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## LICENSE
|
|
42
|
-
|
|
43
|
-
MIT
|
|
1
|
+
# ebaoferc
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/ebaoferc)
|
|
4
|
+
[](https://npmjs.org/package/ebaoferc)
|
|
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
|
+
$ pnpm install
|
|
21
|
+
|
|
22
|
+
# develop library by docs demo
|
|
23
|
+
$ pnpm start
|
|
24
|
+
|
|
25
|
+
# build library source code
|
|
26
|
+
$ pnpm run build
|
|
27
|
+
|
|
28
|
+
# build library source code in watch mode
|
|
29
|
+
$ pnpm run build:watch
|
|
30
|
+
|
|
31
|
+
# build docs
|
|
32
|
+
$ pnpm run docs:build
|
|
33
|
+
|
|
34
|
+
# Locally preview the production build.
|
|
35
|
+
$ pnpm run docs:preview
|
|
36
|
+
|
|
37
|
+
# check your project for potential problems
|
|
38
|
+
$ pnpm run doctor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## LICENSE
|
|
42
|
+
|
|
43
|
+
MIT
|
|
@@ -54,9 +54,7 @@ export default function FlexRowCol(props) {
|
|
|
54
54
|
});
|
|
55
55
|
var count = 0;
|
|
56
56
|
// 处理子元素,计算 hidden 属性
|
|
57
|
-
var processedChildren = Children.toArray(children).
|
|
58
|
-
return /*#__PURE__*/isValidElement(child);
|
|
59
|
-
}).map(function (child, index) {
|
|
57
|
+
var processedChildren = Children.toArray(children).map(function (child, index) {
|
|
60
58
|
if (! /*#__PURE__*/isValidElement(child) || child.props.hidden) return child;
|
|
61
59
|
count++;
|
|
62
60
|
var childColProps = child.props.colProps || _colProps;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Image } from 'antd';
|
|
1
2
|
import { ReactElement } from 'react';
|
|
2
3
|
import './index.less';
|
|
3
4
|
type RenderTriggerPayload = {
|
|
@@ -8,10 +9,13 @@ type TAlbumThumbnailSize = {
|
|
|
8
9
|
width?: number;
|
|
9
10
|
height?: number;
|
|
10
11
|
};
|
|
12
|
+
type PreviewGroupProps = React.ComponentProps<typeof Image.PreviewGroup>;
|
|
13
|
+
type TPreviewOptions = Exclude<PreviewGroupProps['preview'], boolean>;
|
|
11
14
|
export type TImageViewTriggerProps = {
|
|
12
15
|
links?: string[];
|
|
13
16
|
albumThumbnailSize?: TAlbumThumbnailSize;
|
|
14
17
|
children?: (payload: RenderTriggerPayload) => ReactElement;
|
|
18
|
+
previewOptions?: TPreviewOptions;
|
|
15
19
|
};
|
|
16
20
|
export type TImageViewTriggerRef = {
|
|
17
21
|
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
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); }
|
|
16
16
|
import { EyeOutlined } from '@ant-design/icons';
|
|
17
17
|
import { Image, message } from 'antd';
|
|
18
|
-
import { arrayToSingleValue, isNullOrUndefined } from "
|
|
18
|
+
import { arrayToSingleValue, isNullOrUndefined } from "../..";
|
|
19
19
|
import { forwardRef, memo, useImperativeHandle, useMemo, useState } from 'react';
|
|
20
20
|
import "./index.less";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -29,7 +29,9 @@ var ImageViewTriggerCpn = function ImageViewTriggerCpn(props, ref) {
|
|
|
29
29
|
var children = props.children,
|
|
30
30
|
links = props.links,
|
|
31
31
|
_props$albumThumbnail = props.albumThumbnailSize,
|
|
32
|
-
originAlbumThumbnailSize = _props$albumThumbnail === void 0 ? {} : _props$albumThumbnail
|
|
32
|
+
originAlbumThumbnailSize = _props$albumThumbnail === void 0 ? {} : _props$albumThumbnail,
|
|
33
|
+
_props$previewOptions = props.previewOptions,
|
|
34
|
+
previewOptions = _props$previewOptions === void 0 ? {} : _props$previewOptions;
|
|
33
35
|
var albumThumbnailSize = useMemo(function () {
|
|
34
36
|
var composeValue = _objectSpread(_objectSpread({}, AlbumThumbnailSizeDefaultValue), originAlbumThumbnailSize);
|
|
35
37
|
if (!isNullOrUndefined(originAlbumThumbnailSize === null || originAlbumThumbnailSize === void 0 ? void 0 : originAlbumThumbnailSize.width) && isNullOrUndefined(originAlbumThumbnailSize === null || originAlbumThumbnailSize === void 0 ? void 0 : originAlbumThumbnailSize.height)) {
|
|
@@ -108,12 +110,18 @@ var ImageViewTriggerCpn = function ImageViewTriggerCpn(props, ref) {
|
|
|
108
110
|
loading: loading
|
|
109
111
|
}), /*#__PURE__*/_jsx(Image.PreviewGroup, {
|
|
110
112
|
items: links || items,
|
|
111
|
-
preview: {
|
|
113
|
+
preview: _objectSpread(_objectSpread({}, previewOptions), {}, {
|
|
112
114
|
visible: visible,
|
|
113
|
-
onVisibleChange: function onVisibleChange(
|
|
114
|
-
|
|
115
|
+
onVisibleChange: function onVisibleChange() {
|
|
116
|
+
var _previewOptions$onVis;
|
|
117
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
118
|
+
args[_key] = arguments[_key];
|
|
119
|
+
}
|
|
120
|
+
var visible = args[0];
|
|
121
|
+
setVisible(visible);
|
|
122
|
+
previewOptions === null || previewOptions === void 0 || (_previewOptions$onVis = previewOptions.onVisibleChange) === null || _previewOptions$onVis === void 0 || _previewOptions$onVis.call.apply(_previewOptions$onVis, [previewOptions].concat(args));
|
|
115
123
|
}
|
|
116
|
-
},
|
|
124
|
+
}),
|
|
117
125
|
children: links && /*#__PURE__*/_jsxs("div", {
|
|
118
126
|
className: "thumbnail-mode-trigger",
|
|
119
127
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
.thumbnail-mode-trigger {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
|
|
5
|
-
.thumbnail-mask {
|
|
6
|
-
position: absolute;
|
|
7
|
-
z-index: 1;
|
|
8
|
-
inset: 0;
|
|
9
|
-
display: flex;
|
|
10
|
-
gap: 4px;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
color: #fff;
|
|
14
|
-
background: rgba(0, 0, 0, 50%);
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
opacity: 0;
|
|
17
|
-
transition: opacity 0.3s;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:hover {
|
|
21
|
-
.thumbnail-mask {
|
|
22
|
-
opacity: 1;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
.thumbnail-mode-trigger {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
|
|
5
|
+
.thumbnail-mask {
|
|
6
|
+
position: absolute;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
inset: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: 4px;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
color: #fff;
|
|
14
|
+
background: rgba(0, 0, 0, 50%);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
opacity: 0;
|
|
17
|
+
transition: opacity 0.3s;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
.thumbnail-mask {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -28,13 +28,13 @@ export var Drag = /*#__PURE__*/_createClass(function Drag(context) {
|
|
|
28
28
|
_defineProperty(this, "temporaryLine", void 0);
|
|
29
29
|
_defineProperty(this, "container", void 0);
|
|
30
30
|
_defineProperty(this, "draggableLayout", void 0);
|
|
31
|
-
/**
|
|
32
|
-
* 获取拖动节点插入到关联节点子代的下标
|
|
33
|
-
* @param attachedNodeChildren 关联节点的子代
|
|
34
|
-
* @param dropPosition 拖动节点镜像中心位置
|
|
35
|
-
* @param dragNode 拖动节点
|
|
36
|
-
* @param attachedNode 被关联的节点
|
|
37
|
-
* @return 期望插入位置
|
|
31
|
+
/**
|
|
32
|
+
* 获取拖动节点插入到关联节点子代的下标
|
|
33
|
+
* @param attachedNodeChildren 关联节点的子代
|
|
34
|
+
* @param dropPosition 拖动节点镜像中心位置
|
|
35
|
+
* @param dragNode 拖动节点
|
|
36
|
+
* @param attachedNode 被关联的节点
|
|
37
|
+
* @return 期望插入位置
|
|
38
38
|
*/
|
|
39
39
|
_defineProperty(this, "calcDropIndex", function (attachedNodeChildren, dropPosition, dragNode, attachedNode) {
|
|
40
40
|
return _this.draggableLayout.calcDropIndex({
|
|
@@ -47,12 +47,12 @@ export var Drag = /*#__PURE__*/_createClass(function Drag(context) {
|
|
|
47
47
|
root: _this.root
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
-
/**
|
|
51
|
-
* 拖动操作
|
|
52
|
-
* - 根节点不可拖拽
|
|
53
|
-
* @param position 拖动节点镜像中心位置
|
|
54
|
-
* @param canBeAttachedNodes 需要搜索的可关联节点
|
|
55
|
-
* @return 链接关联信息
|
|
50
|
+
/**
|
|
51
|
+
* 拖动操作
|
|
52
|
+
* - 根节点不可拖拽
|
|
53
|
+
* @param position 拖动节点镜像中心位置
|
|
54
|
+
* @param canBeAttachedNodes 需要搜索的可关联节点
|
|
55
|
+
* @return 链接关联信息
|
|
56
56
|
*/
|
|
57
57
|
_defineProperty(this, "drag", function (position, canBeAttachedNodes) {
|
|
58
58
|
var cache = _this.cacheMap.get(_this.dragNode.id);
|
|
@@ -88,8 +88,8 @@ export var Drag = /*#__PURE__*/_createClass(function Drag(context) {
|
|
|
88
88
|
return undefined;
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
/**
|
|
92
|
-
* 通知控制器拖动操作结束
|
|
91
|
+
/**
|
|
92
|
+
* 通知控制器拖动操作结束
|
|
93
93
|
*/
|
|
94
94
|
_defineProperty(this, "end", function () {
|
|
95
95
|
_this.temporaryLine.destroy();
|