@gingkoo/pandora-explorer 0.0.1-alpha.90 → 0.0.1-alpha.91
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/lib/es/components/details/index.d.ts +1 -0
- package/lib/es/components/tree/components/Indent.d.ts +1 -8
- package/lib/es/components/tree/components/MotionTreeNode.d.ts +2 -1
- package/lib/es/components/tree/components/Tree.d.ts +28 -28
- package/lib/es/components/tree/components/contextTypes.d.ts +2 -2
- package/lib/es/components/tree/components/util.d.ts +7 -7
- package/lib/es/components/tree/components/utils/keyUtil.d.ts +1 -2
- package/lib/es/components/tree/components/utils/treeUtil.d.ts +3 -3
- package/lib/es/index.js +49 -43
- package/lib/es/index.js.map +1 -1
- package/lib/es/layout/index.d.ts +0 -1
- package/package.json +2 -2
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
prefixCls: string;
|
|
4
|
-
level: number;
|
|
5
|
-
isStart: boolean[];
|
|
6
|
-
isEnd: boolean[];
|
|
7
|
-
width?: number;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.NamedExoticComponent<IndentProps>;
|
|
2
|
+
declare const _default: React.NamedExoticComponent<any>;
|
|
10
3
|
export default _default;
|
|
@@ -9,6 +9,7 @@ interface MotionTreeNodeProps extends Omit<TreeNodeProps, 'domRef'> {
|
|
|
9
9
|
onMotionEnd: () => void;
|
|
10
10
|
motionType?: 'show' | 'hide';
|
|
11
11
|
treeNodeRequiredProps: TreeNodeRequiredProps;
|
|
12
|
+
[key: string]: any;
|
|
12
13
|
}
|
|
13
|
-
declare const RefMotionTreeNode: React.ForwardRefExoticComponent<MotionTreeNodeProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const RefMotionTreeNode: React.ForwardRefExoticComponent<Omit<MotionTreeNodeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
15
|
export default RefMotionTreeNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { NodeDragEventHandler, NodeDragEventParams, NodeMouseEventHandler, NodeMouseEventParams } from './contextTypes';
|
|
3
3
|
import DropIndicator from './DropIndicator';
|
|
4
|
-
import { BasicDataNode, DataNode, Direction, EventDataNode, FieldNames, FlattenNode, IconType, Key, KeyEntities, NodeInstance,
|
|
4
|
+
import { BasicDataNode, DataNode, Direction, EventDataNode, FieldNames, FlattenNode, IconType, Key, KeyEntities, NodeInstance, ScrollTo } from './interface';
|
|
5
5
|
import { NodeListRef } from './NodeList';
|
|
6
6
|
export interface CheckInfo<TreeDataType extends BasicDataNode = DataNode> {
|
|
7
7
|
event: 'check';
|
|
@@ -60,7 +60,7 @@ export interface TreeProps<TreeDataType extends BasicDataNode = DataNode> {
|
|
|
60
60
|
};
|
|
61
61
|
defaultSelectedKeys?: Key[];
|
|
62
62
|
selectedKeys?: Key[];
|
|
63
|
-
allowDrop?:
|
|
63
|
+
allowDrop?: any;
|
|
64
64
|
titleRender?: (node: TreeDataType) => React.ReactNode;
|
|
65
65
|
dropIndicatorRender?: (props: {
|
|
66
66
|
dropPosition: -1 | 0 | 1;
|
|
@@ -144,7 +144,7 @@ interface TreeState<TreeDataType extends BasicDataNode = DataNode> {
|
|
|
144
144
|
loadedKeys: Key[];
|
|
145
145
|
loadingKeys: Key[];
|
|
146
146
|
expandedKeys: Key[];
|
|
147
|
-
draggingNodeKey:
|
|
147
|
+
draggingNodeKey: any;
|
|
148
148
|
dragChildrenKeys: Key[];
|
|
149
149
|
dropPosition: -1 | 0 | 1 | null;
|
|
150
150
|
dropLevelOffset: number | null;
|
|
@@ -161,7 +161,7 @@ interface TreeState<TreeDataType extends BasicDataNode = DataNode> {
|
|
|
161
161
|
prevProps: TreeProps;
|
|
162
162
|
fieldNames: FieldNames;
|
|
163
163
|
}
|
|
164
|
-
declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> extends React.Component<TreeProps<
|
|
164
|
+
declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> extends React.Component<TreeProps<any>, TreeState<any>> {
|
|
165
165
|
static defaultProps: {
|
|
166
166
|
prefixCls: string;
|
|
167
167
|
showLine: boolean;
|
|
@@ -184,19 +184,19 @@ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> ext
|
|
|
184
184
|
};
|
|
185
185
|
static TreeNode: React.FC<import("./interface").TreeNodeProps<DataNode>>;
|
|
186
186
|
destroyed: boolean;
|
|
187
|
-
delayedDragEnterLogic: Record<
|
|
188
|
-
loadingRetryTimes: Record<
|
|
189
|
-
state:
|
|
190
|
-
dragStartMousePosition:
|
|
191
|
-
dragNode:
|
|
192
|
-
currentMouseOverDroppableNodeKey:
|
|
187
|
+
delayedDragEnterLogic: Record<any, number>;
|
|
188
|
+
loadingRetryTimes: Record<any, number>;
|
|
189
|
+
state: any;
|
|
190
|
+
dragStartMousePosition: any;
|
|
191
|
+
dragNode: any;
|
|
192
|
+
currentMouseOverDroppableNodeKey: any;
|
|
193
193
|
listRef: React.RefObject<NodeListRef>;
|
|
194
194
|
componentDidMount(): void;
|
|
195
195
|
componentDidUpdate(): void;
|
|
196
196
|
onUpdated(): void;
|
|
197
197
|
componentWillUnmount(): void;
|
|
198
|
-
static getDerivedStateFromProps(props:
|
|
199
|
-
onNodeDragStart: NodeDragEventHandler<
|
|
198
|
+
static getDerivedStateFromProps(props: any, prevState: any): Partial<TreeState<DataNode>>;
|
|
199
|
+
onNodeDragStart: NodeDragEventHandler<any, HTMLDivElement>;
|
|
200
200
|
/**
|
|
201
201
|
* [Legacy] Select handler is smaller than node,
|
|
202
202
|
* so that this will trigger when drag enter node or select handler.
|
|
@@ -204,18 +204,18 @@ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> ext
|
|
|
204
204
|
* Better for use mouse move event to refresh drag state.
|
|
205
205
|
* But let's just keep it to avoid event trigger logic change.
|
|
206
206
|
*/
|
|
207
|
-
onNodeDragEnter: (event: React.DragEvent<HTMLDivElement>, node:
|
|
207
|
+
onNodeDragEnter: (event: React.DragEvent<HTMLDivElement>, node: any) => void;
|
|
208
208
|
onNodeDragOver: (event: React.DragEvent<HTMLDivElement>, node: NodeInstance<TreeDataType>) => void;
|
|
209
209
|
onNodeDragLeave: NodeDragEventHandler<TreeDataType>;
|
|
210
210
|
onWindowDragEnd: (event: any) => void;
|
|
211
|
-
onNodeDragEnd:
|
|
211
|
+
onNodeDragEnd: any;
|
|
212
212
|
onNodeDrop: (event: React.DragEvent<HTMLDivElement>, node: any, outsideTree?: boolean) => void;
|
|
213
213
|
resetDragState(): void;
|
|
214
214
|
cleanDragState: () => void;
|
|
215
215
|
triggerExpandActionExpand: NodeMouseEventHandler;
|
|
216
216
|
onNodeClick: NodeMouseEventHandler<TreeDataType>;
|
|
217
217
|
onNodeDoubleClick: NodeMouseEventHandler<TreeDataType>;
|
|
218
|
-
onNodeSelect: NodeMouseEventHandler<
|
|
218
|
+
onNodeSelect: NodeMouseEventHandler<any>;
|
|
219
219
|
onNodeCheck: (e: React.MouseEvent<HTMLSpanElement>, treeNode: EventDataNode<TreeDataType>, checked: boolean) => void;
|
|
220
220
|
onNodeLoad: (treeNode: EventDataNode<TreeDataType>) => Promise<void>;
|
|
221
221
|
onNodeMouseEnter: NodeMouseEventHandler<TreeDataType>;
|
|
@@ -224,29 +224,29 @@ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> ext
|
|
|
224
224
|
onFocus: React.FocusEventHandler<HTMLDivElement>;
|
|
225
225
|
onBlur: React.FocusEventHandler<HTMLDivElement>;
|
|
226
226
|
getTreeNodeRequiredProps: () => {
|
|
227
|
-
expandedKeys:
|
|
228
|
-
selectedKeys:
|
|
229
|
-
loadedKeys:
|
|
230
|
-
loadingKeys:
|
|
231
|
-
checkedKeys:
|
|
232
|
-
halfCheckedKeys:
|
|
233
|
-
dragOverNodeKey:
|
|
234
|
-
dropPosition:
|
|
235
|
-
keyEntities:
|
|
227
|
+
expandedKeys: any;
|
|
228
|
+
selectedKeys: any;
|
|
229
|
+
loadedKeys: any;
|
|
230
|
+
loadingKeys: any;
|
|
231
|
+
checkedKeys: any;
|
|
232
|
+
halfCheckedKeys: any;
|
|
233
|
+
dragOverNodeKey: any;
|
|
234
|
+
dropPosition: any;
|
|
235
|
+
keyEntities: any;
|
|
236
236
|
};
|
|
237
237
|
/** Set uncontrolled `expandedKeys`. This will also auto update `flattenNodes`. */
|
|
238
238
|
setExpandedKeys: (expandedKeys: Key[]) => void;
|
|
239
|
-
onNodeExpand: (e: React.MouseEvent<HTMLDivElement>, treeNode:
|
|
239
|
+
onNodeExpand: (e: React.MouseEvent<HTMLDivElement>, treeNode: any) => void;
|
|
240
240
|
onListChangeStart: () => void;
|
|
241
241
|
onListChangeEnd: () => void;
|
|
242
|
-
onActiveChange: (newActiveKey:
|
|
243
|
-
getActiveItem: () =>
|
|
242
|
+
onActiveChange: (newActiveKey: any) => void;
|
|
243
|
+
getActiveItem: () => any;
|
|
244
244
|
offsetActiveKey: (offset: number) => void;
|
|
245
245
|
onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
|
|
246
246
|
/**
|
|
247
247
|
* Only update the value which is not in props
|
|
248
248
|
*/
|
|
249
|
-
setUncontrolledState: (state:
|
|
249
|
+
setUncontrolledState: (state: any, atomic?: boolean, forceState?: Partial<TreeState<TreeDataType>> | null) => void;
|
|
250
250
|
scrollTo: ScrollTo;
|
|
251
251
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
252
252
|
}
|
|
@@ -37,7 +37,7 @@ export interface TreeContextProps<TreeDataType extends BasicDataNode = DataNode>
|
|
|
37
37
|
dropPosition: -1 | 0 | 1;
|
|
38
38
|
dropLevelOffset: number;
|
|
39
39
|
indent: any;
|
|
40
|
-
prefixCls:
|
|
40
|
+
prefixCls: string;
|
|
41
41
|
direction: Direction;
|
|
42
42
|
}) => React.ReactNode;
|
|
43
43
|
dragOverNodeKey: Key | null;
|
|
@@ -61,4 +61,4 @@ export interface TreeContextProps<TreeDataType extends BasicDataNode = DataNode>
|
|
|
61
61
|
onNodeDragEnd: NodeDragEventHandler<any, any>;
|
|
62
62
|
onNodeDrop: NodeDragEventHandler<any, any>;
|
|
63
63
|
}
|
|
64
|
-
export declare const TreeContext: React.Context<
|
|
64
|
+
export declare const TreeContext: React.Context<any>;
|
|
@@ -5,16 +5,16 @@ import React from 'react';
|
|
|
5
5
|
import { BasicDataNode, DataEntity, DataNode, Direction, FlattenNode, Key, KeyEntities, NodeElement, NodeInstance } from './interface';
|
|
6
6
|
import { AllowDrop, TreeProps } from './Tree';
|
|
7
7
|
export { getPosition, isTreeNode } from './utils/treeUtil';
|
|
8
|
-
export declare function arrDel(list: Key[], value:
|
|
9
|
-
export declare function arrAdd(list: Key[], value:
|
|
8
|
+
export declare function arrDel(list: Key[], value: any): React.Key[];
|
|
9
|
+
export declare function arrAdd(list: Key[], value: any): React.Key[];
|
|
10
10
|
export declare function posToArr(pos: string): string[];
|
|
11
|
-
export declare function getDragChildrenKeys<TreeDataType extends BasicDataNode = DataNode>(dragNodeKey:
|
|
12
|
-
export declare function isLastChild<TreeDataType extends BasicDataNode = DataNode>(treeNodeEntity:
|
|
11
|
+
export declare function getDragChildrenKeys<TreeDataType extends BasicDataNode = DataNode>(dragNodeKey: any, keyEntities: KeyEntities<TreeDataType>): Key[];
|
|
12
|
+
export declare function isLastChild<TreeDataType extends BasicDataNode = DataNode>(treeNodeEntity: any): boolean;
|
|
13
13
|
export declare function isFirstChild<TreeDataType extends BasicDataNode = DataNode>(treeNodeEntity: DataEntity<TreeDataType>): boolean;
|
|
14
14
|
export declare function calcDropPosition<TreeDataType extends BasicDataNode = DataNode>(event: React.MouseEvent, dragNode: NodeInstance<TreeDataType>, targetNode: NodeInstance<TreeDataType>, indent: number, startMousePosition: {
|
|
15
15
|
x: number;
|
|
16
16
|
y: number;
|
|
17
|
-
}, allowDrop: AllowDrop<
|
|
17
|
+
}, allowDrop: AllowDrop<any>, flattenedNodes: FlattenNode<TreeDataType>[], keyEntities: KeyEntities<TreeDataType>, expandKeys: Key[], direction: Direction): {
|
|
18
18
|
dropPosition: -1 | 0 | 1;
|
|
19
19
|
dropLevelOffset: number;
|
|
20
20
|
dropTargetKey: Key;
|
|
@@ -30,7 +30,7 @@ export declare function calcDropPosition<TreeDataType extends BasicDataNode = Da
|
|
|
30
30
|
* @returns [string]
|
|
31
31
|
*/
|
|
32
32
|
export declare function calcSelectedKeys(selectedKeys: Key[], props: TreeProps): React.Key[] | undefined;
|
|
33
|
-
export declare function convertDataToTree(treeData: DataNode[], processor?: {
|
|
33
|
+
export declare function convertDataToTree(treeData: DataNode[] | any, processor?: {
|
|
34
34
|
processProps: (prop: DataNode) => any;
|
|
35
35
|
}): NodeElement[];
|
|
36
36
|
/**
|
|
@@ -51,4 +51,4 @@ export declare function parseCheckedKeys(keys: Key[] | {
|
|
|
51
51
|
* @param keyList
|
|
52
52
|
* @param keyEntities
|
|
53
53
|
*/
|
|
54
|
-
export declare function conductExpandParent(keyList:
|
|
54
|
+
export declare function conductExpandParent(keyList: any[], keyEntities: KeyEntities): Key[];
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function getEntity<T = any>(keyEntities: KeyEntities<T>, key: Key): import("../interface").DataEntity<T>;
|
|
1
|
+
export default function getEntity<T = any>(keyEntities: any, key: any): any;
|
|
@@ -7,11 +7,11 @@ export declare function fillFieldNames(fieldNames?: FieldNames): Required<FieldN
|
|
|
7
7
|
/**
|
|
8
8
|
* Warning if TreeNode do not provides key
|
|
9
9
|
*/
|
|
10
|
-
export declare function warningWithoutKey(treeData: DataNode[], fieldNames:
|
|
10
|
+
export declare function warningWithoutKey(treeData: DataNode[], fieldNames: any): void;
|
|
11
11
|
/**
|
|
12
12
|
* Convert `children` of Tree into `treeData` structure.
|
|
13
13
|
*/
|
|
14
|
-
export declare function convertTreeToData(rootNodes: React.ReactNode):
|
|
14
|
+
export declare function convertTreeToData(rootNodes: React.ReactNode): any[];
|
|
15
15
|
/**
|
|
16
16
|
* Flat nest tree data into flatten list. This is used for virtual list render.
|
|
17
17
|
* @param treeNodeList Origin data node list
|
|
@@ -82,5 +82,5 @@ export declare function getTreeNodeProps<TreeDataType extends BasicDataNode = Da
|
|
|
82
82
|
dragOverGapTop: boolean;
|
|
83
83
|
dragOverGapBottom: boolean;
|
|
84
84
|
};
|
|
85
|
-
export declare function convertNodePropsToEventData<TreeDataType extends BasicDataNode = DataNode>(props: TreeNodeProps<TreeDataType>): EventDataNode<
|
|
85
|
+
export declare function convertNodePropsToEventData<TreeDataType extends BasicDataNode = DataNode>(props: TreeNodeProps<TreeDataType>): EventDataNode<any>;
|
|
86
86
|
export {};
|
package/lib/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @gingkoo/pandora-explorer v0.0.1-alpha.
|
|
2
|
+
* @gingkoo/pandora-explorer v0.0.1-alpha.91
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -2577,7 +2577,7 @@ const Indent = ({
|
|
|
2577
2577
|
}, i));
|
|
2578
2578
|
}
|
|
2579
2579
|
return jsx("span", {
|
|
2580
|
-
"aria-hidden":
|
|
2580
|
+
"aria-hidden": 'true',
|
|
2581
2581
|
className: `${prefixCls}-indent`,
|
|
2582
2582
|
children: list
|
|
2583
2583
|
});
|
|
@@ -2740,7 +2740,7 @@ config) {
|
|
|
2740
2740
|
function processNode(node, index, parent, pathNodes) {
|
|
2741
2741
|
const children = node ? node[mergeChildrenPropName] : dataNodes;
|
|
2742
2742
|
const pos = node ? getPosition(parent.pos, index) : '0';
|
|
2743
|
-
const connectNodes = node ? [...pathNodes, node] : [];
|
|
2743
|
+
const connectNodes = node ? [...(pathNodes || []), node] : [];
|
|
2744
2744
|
// Process node if is not root
|
|
2745
2745
|
if (node) {
|
|
2746
2746
|
const key = syntheticGetKey(node, pos);
|
|
@@ -4570,7 +4570,7 @@ let Tree$1 = class Tree extends React.Component {
|
|
|
4570
4570
|
this.setState({
|
|
4571
4571
|
draggingNodeKey: eventKey,
|
|
4572
4572
|
dragChildrenKeys: getDragChildrenKeys(eventKey, keyEntities),
|
|
4573
|
-
indent: this.listRef.current
|
|
4573
|
+
indent: this.listRef.current?.getIndentWidth?.()
|
|
4574
4574
|
});
|
|
4575
4575
|
this.setExpandedKeys(newExpandedKeys);
|
|
4576
4576
|
window.addEventListener('dragend', this.onWindowDragEnd);
|
|
@@ -5373,7 +5373,7 @@ let Tree$1 = class Tree extends React.Component {
|
|
|
5373
5373
|
}
|
|
5374
5374
|
};
|
|
5375
5375
|
scrollTo = scroll => {
|
|
5376
|
-
this.listRef.current
|
|
5376
|
+
this.listRef.current?.scrollTo(scroll);
|
|
5377
5377
|
};
|
|
5378
5378
|
render() {
|
|
5379
5379
|
const {
|
|
@@ -8845,7 +8845,7 @@ const Layout$1 = props => {
|
|
|
8845
8845
|
var css_248z$1 = ".frame-main-info {\n height: 100%;\n width: 100%;\n border-left: 1px solid #6464641a;\n}\n.frame-main-info * {\n user-select: none;\n}\n";
|
|
8846
8846
|
styleInject(css_248z$1);
|
|
8847
8847
|
|
|
8848
|
-
var css_248z = ".explorer-details {\n height: 100%;\n width: 100%;\n border-left: 1px solid #6464641a;\n}\n.explorer-details .info-header {\n height: 65px;\n background: #f6faff;\n background-image: linear-gradient(190deg, #e5f6ff, #fdfeff);\n border-bottom: 1px solid #eee;\n position: relative;\n z-index: 2;\n}\n.explorer-details .info-header .file-icon {\n position: absolute;\n top: 7px;\n left: 10px;\n width: 50px;\n height: 50px;\n line-height: 50px;\n text-align: center;\n overflow: hidden;\n}\n.explorer-details .info-header .file-icon > span {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.explorer-details .info-header .file-name {\n font-size: 15px;\n color: #666;\n word-break: break-word;\n padding-right: 30px;\n vertical-align: middle;\n height: 60px;\n padding-left: 65px;\n line-height: 1.2em;\n}\n.explorer-details .info-header .file-name .title {\n width: 100%;\n max-height: 35px;\n line-height: 1.2em;\n padding-top: 12px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.explorer-details .info-header .file-name .desc {\n font-size: 0.9em;\n color: #aaa;\n padding-top: 4px;\n white-space: nowrap;\n}\n.explorer-details .info-content {\n height: calc(100% - 65px);\n width: 100%;\n overflow: hidden;\n overflow-y: auto;\n}\n.explorer-details .info-content .panel-info {\n padding: 10px 0;\n}\n.explorer-details .info-content .panel-info .panel-col {\n padding-left: 15px;\n padding-right: 10px;\n}\n.explorer-details .info-content .panel-info .panel-col > .title {\n float: left;\n color: #999;\n text-align: left;\n padding: 0;\n margin: 0;\n line-height: 25px;\n width: 27%;\n margin-right: 1%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.explorer-details .info-content .panel-info .panel-col > .content {\n float: left;\n word-break: break-word;\n color: #444;\n width: 72%;\n margin: 0;\n line-height: 25px;\n user-select: text;\n font-size: 1em;\n}\n.explorer-details .info-content .panel-info .panel-col > .content-content {\n max-height: 120px;\n text-overflow: ellipsis;\n word-break: break-word;\n overflow: hidden;\n overflow-y: auto;\n padding: 4px 2% 5px 2%;\n}\n.explorer-details .info-content .panel-info .panel-col > .content > textarea {\n border-radius: 5px;\n outline: none;\n width: 100%;\n line-height: 1.2em;\n padding: 4px 2% 4px 2%;\n border: 1px solid transparent;\n box-shadow: 0 0 0 1px #00000014;\n}\n.explorer-details .info-content .panel-info .panel-col > .content textarea:hover {\n box-shadow: 0 0 0 1px #1890ff;\n}\n.explorer-details .tab-group-line {\n margin: 0;\n background: #fafafa;\n border: none;\n text-align: center;\n position: absolute;\n z-index: 2;\n bottom: 0;\n width: 100%;\n padding: 0;\n border-top: 1px solid #eee;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.02);\n font-size: 1em;\n}\n.explorer-details.background .info-header-background {\n user-select: none;\n position: relative;\n height: 150px;\n}\n.explorer-details.background .info-header-background img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n max-width: inherit;\n max-height: inherit;\n box-shadow: none;\n object-fit: cover;\n pointer-events: none;\n}\n.explorer-details.background .info-header-background .title {\n width: 100%;\n position: absolute;\n bottom: 0;\n background: #00000030;\n color: #fff;\n padding: 0 10px;\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-details.background .info-content {\n height: calc(100% - 150px);\n}\n.explorer-details-modal .
|
|
8848
|
+
var css_248z = ".explorer-details {\n height: 100%;\n width: 100%;\n border-left: 1px solid #6464641a;\n}\n.explorer-details .info-header {\n height: 65px;\n background: #f6faff;\n background-image: linear-gradient(190deg, #e5f6ff, #fdfeff);\n border-bottom: 1px solid #eee;\n position: relative;\n z-index: 2;\n}\n.explorer-details .info-header .file-icon {\n position: absolute;\n top: 7px;\n left: 10px;\n width: 50px;\n height: 50px;\n line-height: 50px;\n text-align: center;\n overflow: hidden;\n}\n.explorer-details .info-header .file-icon > span {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.explorer-details .info-header .file-name {\n font-size: 15px;\n color: #666;\n word-break: break-word;\n padding-right: 30px;\n vertical-align: middle;\n height: 60px;\n padding-left: 65px;\n line-height: 1.2em;\n}\n.explorer-details .info-header .file-name .title {\n width: 100%;\n max-height: 35px;\n line-height: 1.2em;\n padding-top: 12px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.explorer-details .info-header .file-name .desc {\n font-size: 0.9em;\n color: #aaa;\n padding-top: 4px;\n white-space: nowrap;\n}\n.explorer-details .info-content {\n height: calc(100% - 65px);\n width: 100%;\n overflow: hidden;\n overflow-y: auto;\n}\n.explorer-details .info-content .panel-info {\n padding: 10px 0;\n}\n.explorer-details .info-content .panel-info .panel-col {\n padding-left: 15px;\n padding-right: 10px;\n}\n.explorer-details .info-content .panel-info .panel-col > .title {\n float: left;\n color: #999;\n text-align: left;\n padding: 0;\n margin: 0;\n line-height: 25px;\n width: 27%;\n margin-right: 1%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.explorer-details .info-content .panel-info .panel-col > .content {\n float: left;\n word-break: break-word;\n color: #444;\n width: 72%;\n margin: 0;\n line-height: 25px;\n user-select: text;\n font-size: 1em;\n}\n.explorer-details .info-content .panel-info .panel-col > .content-content {\n max-height: 120px;\n text-overflow: ellipsis;\n word-break: break-word;\n overflow: hidden;\n overflow-y: auto;\n padding: 4px 2% 5px 2%;\n}\n.explorer-details .info-content .panel-info .panel-col > .content > textarea {\n border-radius: 5px;\n outline: none;\n width: 100%;\n line-height: 1.2em;\n padding: 4px 2% 4px 2%;\n border: 1px solid transparent;\n box-shadow: 0 0 0 1px #00000014;\n}\n.explorer-details .info-content .panel-info .panel-col > .content textarea:hover {\n box-shadow: 0 0 0 1px #1890ff;\n}\n.explorer-details .tab-group-line {\n margin: 0;\n background: #fafafa;\n border: none;\n text-align: center;\n position: absolute;\n z-index: 2;\n bottom: 0;\n width: 100%;\n padding: 0;\n border-top: 1px solid #eee;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.02);\n font-size: 1em;\n}\n.explorer-details.background .info-header-background {\n user-select: none;\n position: relative;\n height: 150px;\n}\n.explorer-details.background .info-header-background img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n max-width: inherit;\n max-height: inherit;\n box-shadow: none;\n object-fit: cover;\n pointer-events: none;\n}\n.explorer-details.background .info-header-background .title {\n width: 100%;\n position: absolute;\n bottom: 0;\n background: #00000030;\n color: #fff;\n padding: 0 10px;\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-details.background .info-content {\n height: calc(100% - 150px);\n}\n.explorer-details-modal .info-header {\n width: 100%;\n height: 65px;\n background: #f6faff;\n background-image: linear-gradient(190deg, #e5f6ff, #fdfeff);\n border-bottom: 1px solid #eee;\n position: relative;\n z-index: 2;\n}\n.explorer-details-modal .info-header .file-icon {\n position: absolute;\n top: 7px;\n left: 10px;\n width: 50px;\n height: 50px;\n line-height: 50px;\n text-align: center;\n overflow: hidden;\n}\n.explorer-details-modal .info-header .file-icon > span {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.explorer-details-modal .info-header .file-name {\n font-size: 15px;\n color: #666;\n word-break: break-word;\n padding-right: 30px;\n vertical-align: middle;\n height: 60px;\n padding-left: 65px;\n line-height: 1.2em;\n}\n.explorer-details-modal .info-header .file-name .title {\n width: 100%;\n max-height: 35px;\n line-height: 1.2em;\n padding-top: 12px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.explorer-details-modal .info-header .file-name .desc {\n font-size: 0.9em;\n color: #aaa;\n padding-top: 4px;\n white-space: nowrap;\n}\n.explorer-details-modal .header-toolbar {\n z-index: 2 !important;\n}\n.explorer-details-modal .info-header-background {\n width: 100%;\n user-select: none;\n position: relative;\n height: 150px;\n}\n.explorer-details-modal .info-header-background img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n max-width: inherit;\n max-height: inherit;\n box-shadow: none;\n object-fit: cover;\n pointer-events: none;\n}\n.explorer-details-modal .info-header-background .title {\n width: 100%;\n position: absolute;\n bottom: 0;\n background: #00000030;\n color: #fff;\n padding: 0 10px;\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-details-modal .info-content {\n height: 100% !important;\n}\n.explorer-details-modal .viewer-modal-header {\n overflow: unset;\n}\n.explorer-details-modal .header-toolbar {\n background: transparent !important;\n z-index: 10;\n}\n";
|
|
8849
8849
|
styleInject(css_248z);
|
|
8850
8850
|
|
|
8851
8851
|
// const Image = (src: string) => {
|
|
@@ -8865,7 +8865,8 @@ styleInject(css_248z);
|
|
|
8865
8865
|
function DetailsInfo(props) {
|
|
8866
8866
|
const {
|
|
8867
8867
|
info,
|
|
8868
|
-
getIcons
|
|
8868
|
+
getIcons,
|
|
8869
|
+
isheader = true
|
|
8869
8870
|
} = props;
|
|
8870
8871
|
const [isEdit, setIsEdit] = useState(false);
|
|
8871
8872
|
function rednerInfo() {
|
|
@@ -8943,45 +8944,11 @@ function DetailsInfo(props) {
|
|
|
8943
8944
|
})]
|
|
8944
8945
|
});
|
|
8945
8946
|
}
|
|
8946
|
-
function renderHeader() {
|
|
8947
|
-
if (info?.suffix && ImgSuffix.includes(info.suffix)) {
|
|
8948
|
-
return jsxs("div", {
|
|
8949
|
-
className: 'info-header-background',
|
|
8950
|
-
children: [jsx("img", {
|
|
8951
|
-
src: info.pic
|
|
8952
|
-
}), jsx("div", {
|
|
8953
|
-
className: 'title',
|
|
8954
|
-
children: info?.title
|
|
8955
|
-
})]
|
|
8956
|
-
});
|
|
8957
|
-
} else {
|
|
8958
|
-
return jsxs("div", {
|
|
8959
|
-
className: 'info-header',
|
|
8960
|
-
children: [jsx("div", {
|
|
8961
|
-
className: 'file-icon',
|
|
8962
|
-
children: getIcons(info, '')
|
|
8963
|
-
}), jsxs("div", {
|
|
8964
|
-
className: 'file-name',
|
|
8965
|
-
children: [jsx("div", {
|
|
8966
|
-
className: 'title',
|
|
8967
|
-
children: info?.title
|
|
8968
|
-
}), jsxs("div", {
|
|
8969
|
-
className: 'desc',
|
|
8970
|
-
children: [jsx("span", {
|
|
8971
|
-
children: typeof info?.size == 'number' ? convertBytesToSize(info?.size) : info?.size || '-'
|
|
8972
|
-
}), jsx("span", {
|
|
8973
|
-
children: info?.fixTime || ''
|
|
8974
|
-
})]
|
|
8975
|
-
})]
|
|
8976
|
-
})]
|
|
8977
|
-
});
|
|
8978
|
-
}
|
|
8979
|
-
}
|
|
8980
8947
|
return jsxs("div", {
|
|
8981
8948
|
className: cx$1('explorer-details', {
|
|
8982
8949
|
background: ImgSuffix.includes(info?.suffix)
|
|
8983
8950
|
}),
|
|
8984
|
-
children: [
|
|
8951
|
+
children: [isheader && DetailHeader(info), jsx("div", {
|
|
8985
8952
|
className: 'info-content',
|
|
8986
8953
|
children: props?.renderFileInfo ? props.renderFileInfo?.(info) : rednerInfo()
|
|
8987
8954
|
}), jsx("div", {
|
|
@@ -8989,6 +8956,40 @@ function DetailsInfo(props) {
|
|
|
8989
8956
|
})]
|
|
8990
8957
|
});
|
|
8991
8958
|
}
|
|
8959
|
+
function DetailHeader(info) {
|
|
8960
|
+
if (info?.suffix && ImgSuffix.includes(info.suffix)) {
|
|
8961
|
+
return jsxs("div", {
|
|
8962
|
+
className: 'info-header-background',
|
|
8963
|
+
children: [jsx("img", {
|
|
8964
|
+
src: info.pic
|
|
8965
|
+
}), jsx("div", {
|
|
8966
|
+
className: 'title',
|
|
8967
|
+
children: info?.title
|
|
8968
|
+
})]
|
|
8969
|
+
});
|
|
8970
|
+
} else {
|
|
8971
|
+
return jsxs("div", {
|
|
8972
|
+
className: 'info-header',
|
|
8973
|
+
children: [jsx("div", {
|
|
8974
|
+
className: 'file-icon',
|
|
8975
|
+
children: Icons(info, '')
|
|
8976
|
+
}), jsxs("div", {
|
|
8977
|
+
className: 'file-name',
|
|
8978
|
+
children: [jsx("div", {
|
|
8979
|
+
className: 'title',
|
|
8980
|
+
children: info?.title
|
|
8981
|
+
}), jsxs("div", {
|
|
8982
|
+
className: 'desc',
|
|
8983
|
+
children: [jsx("span", {
|
|
8984
|
+
children: typeof info?.size == 'number' ? convertBytesToSize(info?.size) : info?.size || '-'
|
|
8985
|
+
}), jsx("span", {
|
|
8986
|
+
children: info?.fixTime || ''
|
|
8987
|
+
})]
|
|
8988
|
+
})]
|
|
8989
|
+
})]
|
|
8990
|
+
});
|
|
8991
|
+
}
|
|
8992
|
+
}
|
|
8992
8993
|
|
|
8993
8994
|
function ExplorerInfo(props) {
|
|
8994
8995
|
const {
|
|
@@ -9721,10 +9722,15 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9721
9722
|
className: 'explorer-details-modal',
|
|
9722
9723
|
modalWidth: 450,
|
|
9723
9724
|
modalHeight: 620,
|
|
9724
|
-
|
|
9725
|
+
customHeader: () => {
|
|
9726
|
+
return jsx(DetailHeader, {
|
|
9727
|
+
...param
|
|
9728
|
+
});
|
|
9729
|
+
},
|
|
9725
9730
|
content: jsx(DetailsInfo, {
|
|
9726
9731
|
info: param,
|
|
9727
9732
|
getIcons: Icons,
|
|
9733
|
+
isheader: false,
|
|
9728
9734
|
renderFileInfo: props?.renderFileInfo
|
|
9729
9735
|
})
|
|
9730
9736
|
});
|