mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
fix: search zindex (#6947)
* fix: search zindex * feat: update ui version --------- Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
8
frontend/package-lock.json
generated
8
frontend/package-lock.json
generated
@@ -19,7 +19,7 @@
|
|||||||
"@seafile/sdoc-editor": "1.0.112",
|
"@seafile/sdoc-editor": "1.0.112",
|
||||||
"@seafile/seafile-calendar": "0.0.28",
|
"@seafile/seafile-calendar": "0.0.28",
|
||||||
"@seafile/seafile-editor": "^1.0.122",
|
"@seafile/seafile-editor": "^1.0.122",
|
||||||
"@seafile/sf-metadata-ui-component": "^0.0.47",
|
"@seafile/sf-metadata-ui-component": "^0.0.48",
|
||||||
"@uiw/codemirror-extensions-langs": "^4.19.4",
|
"@uiw/codemirror-extensions-langs": "^4.19.4",
|
||||||
"@uiw/codemirror-themes": "^4.23.5",
|
"@uiw/codemirror-themes": "^4.23.5",
|
||||||
"@uiw/react-codemirror": "^4.19.4",
|
"@uiw/react-codemirror": "^4.19.4",
|
||||||
@@ -5038,9 +5038,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@seafile/sf-metadata-ui-component": {
|
"node_modules/@seafile/sf-metadata-ui-component": {
|
||||||
"version": "0.0.47",
|
"version": "0.0.48",
|
||||||
"resolved": "https://registry.npmjs.org/@seafile/sf-metadata-ui-component/-/sf-metadata-ui-component-0.0.47.tgz",
|
"resolved": "https://registry.npmjs.org/@seafile/sf-metadata-ui-component/-/sf-metadata-ui-component-0.0.48.tgz",
|
||||||
"integrity": "sha512-3EO6NwU+PDBRsvv8UsIRAETf4QPw3spRwbusKTa2ls86sIxTmB/tbTt2Z2FiUpQH9ITrahy1OlCuAZZBnte2rA==",
|
"integrity": "sha512-5/kWI4ABMwvRL5C3+PeEnd/yXX/x+vgguvS/+okEiJbiuOLw85i4FURWg1pHPh7MuVPsn0iinyxdPcIMYS8URg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@seafile/seafile-calendar": "0.0.28",
|
"@seafile/seafile-calendar": "0.0.28",
|
||||||
"@seafile/seafile-editor": "^1.0.122",
|
"@seafile/seafile-editor": "^1.0.122",
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
"@seafile/sdoc-editor": "1.0.112",
|
"@seafile/sdoc-editor": "1.0.112",
|
||||||
"@seafile/seafile-calendar": "0.0.28",
|
"@seafile/seafile-calendar": "0.0.28",
|
||||||
"@seafile/seafile-editor": "^1.0.122",
|
"@seafile/seafile-editor": "^1.0.122",
|
||||||
"@seafile/sf-metadata-ui-component": "^0.0.47",
|
"@seafile/sf-metadata-ui-component": "^0.0.48",
|
||||||
"@uiw/codemirror-extensions-langs": "^4.19.4",
|
"@uiw/codemirror-extensions-langs": "^4.19.4",
|
||||||
"@uiw/codemirror-themes": "^4.23.5",
|
"@uiw/codemirror-themes": "^4.23.5",
|
||||||
"@uiw/react-codemirror": "^4.19.4",
|
"@uiw/react-codemirror": "^4.19.4",
|
||||||
|
@@ -721,13 +721,13 @@ class Search extends Component {
|
|||||||
let width = this.state.width !== 'default' ? this.state.width : '';
|
let width = this.state.width !== 'default' ? this.state.width : '';
|
||||||
let style = {'width': width};
|
let style = {'width': width};
|
||||||
const { isMaskShow } = this.state;
|
const { isMaskShow } = this.state;
|
||||||
const placeholder = `${this.props.placeholder}${isMaskShow ? '' : ` (${controlKey} + k )`}`;
|
const placeholder = `${this.props.placeholder}${isMaskShow ? '' : ` (${controlKey} + k)`}`;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MediaQuery query="(min-width: 768px)">
|
<MediaQuery query="(min-width: 768px)">
|
||||||
<div className="search">
|
<div className="search">
|
||||||
<div className={`search-mask ${isMaskShow ? 'show' : 'hide'}`} onClick={this.onCloseHandler} style={{ zIndex: SEARCH_MASK }}></div>
|
<div className={`search-mask ${isMaskShow ? 'show' : 'hide'}`} onClick={this.onCloseHandler} style={isMaskShow ? { zIndex: SEARCH_MASK } : {}}></div>
|
||||||
<div className={`search-container ${isMaskShow ? 'show' : ''}`} style={{ zIndex: SEARCH_CONTAINER }}>
|
<div className={`search-container ${isMaskShow ? 'show' : ''}`} style={isMaskShow ? { zIndex: SEARCH_CONTAINER } : {}}>
|
||||||
<div className={`input-icon ${isMaskShow ? 'mb-1' : ''}`}>
|
<div className={`input-icon ${isMaskShow ? 'mb-1' : ''}`}>
|
||||||
<i className="search-icon-left input-icon-addon sf3-font sf3-font-search"></i>
|
<i className="search-icon-left input-icon-addon sf3-font sf3-font-search"></i>
|
||||||
<input
|
<input
|
||||||
|
@@ -1,33 +1,9 @@
|
|||||||
// CellMasks should render in front of the cells
|
|
||||||
// Unfrozen cells do not have a zIndex specifed
|
|
||||||
export const CELL_MASK = 1;
|
|
||||||
export const TABLE_MAIN_INTERVAL = 1;
|
|
||||||
export const RESIZE_HANDLE = 1;
|
|
||||||
export const SEQUENCE_COLUMN = 1;
|
|
||||||
|
|
||||||
// higher than unfrozen header cell(0), RESIZE_HANDLE
|
|
||||||
export const FROZEN_HEADER_CELL = 2;
|
|
||||||
export const GROUP_FROZEN_HEADER = 2;
|
|
||||||
export const SCROLL_BAR = 2;
|
|
||||||
// In front of CELL_MASK/non-frozen cell(1)、back of the frozen cells (2)
|
|
||||||
export const GROUP_BACKDROP = 2;
|
|
||||||
export const MOBILE_RECORDS_COLUMN_NAMES = 2;
|
|
||||||
export const FROZEN_GROUP_CELL = 2;
|
|
||||||
export const RESIZE_BAR = 2;
|
export const RESIZE_BAR = 2;
|
||||||
|
|
||||||
export const FOLDED_SIDE_NAV_FILES = 2;
|
export const FOLDED_SIDE_NAV_FILES = 2;
|
||||||
|
|
||||||
// Frozen cells have a zIndex value of 2 so CELL_MASK should have a higher value
|
|
||||||
export const FROZEN_CELL_MASK = 3;
|
|
||||||
export const FOLDED_SIDE_NAV = 3;
|
export const FOLDED_SIDE_NAV = 3;
|
||||||
|
|
||||||
// need higher than the doms(etc. cell, cell_mask) which behind of the grid header
|
|
||||||
export const GRID_HEADER = 4;
|
|
||||||
export const GRID_FOOTER = 4;
|
|
||||||
export const UPLOAD_PROGRESS = 4;
|
|
||||||
|
|
||||||
// EditorContainer is rendered outside the grid and it higher FROZEN_GROUP_CELL(2)
|
|
||||||
export const EDITOR_CONTAINER = 9;
|
|
||||||
|
|
||||||
// search mask should higher than file tags (20) but lower than modal mask (1050)
|
// search mask should higher than file tags (20) but lower than modal mask (1050)
|
||||||
export const SEARCH_MASK = 1045;
|
export const SEARCH_MASK = 1045;
|
||||||
|
|
||||||
@@ -37,4 +13,3 @@ export const SEARCH_CONTAINER_SETTINGS = 1047;
|
|||||||
|
|
||||||
export const EXTRA_ATTRIBUTES_DIALOG_MODAL = 1048;
|
export const EXTRA_ATTRIBUTES_DIALOG_MODAL = 1048;
|
||||||
|
|
||||||
export const DROPDOWN_MENU = 1051;
|
|
||||||
|
@@ -8,8 +8,7 @@ import { getEventClassName } from '../../../utils/common';
|
|||||||
import { isCellValueChanged, getCellValueByColumn } from '../../../utils/cell';
|
import { isCellValueChanged, getCellValueByColumn } from '../../../utils/cell';
|
||||||
import { canEditCell } from '../../../utils/column';
|
import { canEditCell } from '../../../utils/column';
|
||||||
import { isCtrlKeyHeldDown, isKeyPrintable } from '../../../utils/keyboard-utils';
|
import { isCtrlKeyHeldDown, isKeyPrintable } from '../../../utils/keyboard-utils';
|
||||||
import { EVENT_BUS_TYPE, PRIVATE_COLUMN_KEYS } from '../../../constants';
|
import { EVENT_BUS_TYPE, PRIVATE_COLUMN_KEYS, metadataZIndexes } from '../../../constants';
|
||||||
import { zIndexes } from '../../../../constants';
|
|
||||||
|
|
||||||
class NormalEditorContainer extends React.Component {
|
class NormalEditorContainer extends React.Component {
|
||||||
|
|
||||||
@@ -316,7 +315,7 @@ class NormalEditorContainer extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { width, height, left, top } = this.props;
|
const { width, height, left, top } = this.props;
|
||||||
const style = { position: 'absolute', height, width, left, top, zIndex: zIndexes.EDITOR_CONTAINER };
|
const style = { position: 'absolute', height, width, left, top, zIndex: metadataZIndexes.EDITOR_CONTAINER };
|
||||||
return (
|
return (
|
||||||
<ClickOutside onClickOutside={this.onClickOutside}>
|
<ClickOutside onClickOutside={this.onClickOutside}>
|
||||||
<div
|
<div
|
||||||
|
@@ -6,8 +6,7 @@ import Editor from '../editor';
|
|||||||
import { Utils } from '../../../../utils/utils';
|
import { Utils } from '../../../../utils/utils';
|
||||||
import { isCellValueChanged, getCellValueByColumn, getColumnOptionNameById, getColumnOptionNamesByIds } from '../../../utils/cell';
|
import { isCellValueChanged, getCellValueByColumn, getColumnOptionNameById, getColumnOptionNamesByIds } from '../../../utils/cell';
|
||||||
import { canEditCell, getColumnOriginName } from '../../../utils/column';
|
import { canEditCell, getColumnOriginName } from '../../../utils/column';
|
||||||
import { CellType, EVENT_BUS_TYPE, PRIVATE_COLUMN_KEYS } from '../../../constants';
|
import { CellType, metadataZIndexes, EVENT_BUS_TYPE, PRIVATE_COLUMN_KEYS } from '../../../constants';
|
||||||
import { zIndexes } from '../../../../constants';
|
|
||||||
|
|
||||||
const NOT_SUPPORT_EDITOR_COLUMN_TYPES = [
|
const NOT_SUPPORT_EDITOR_COLUMN_TYPES = [
|
||||||
CellType.CTIME, CellType.MTIME, CellType.CREATOR, CellType.LAST_MODIFIER, CellType.FILE_NAME,
|
CellType.CTIME, CellType.MTIME, CellType.CREATOR, CellType.LAST_MODIFIER, CellType.FILE_NAME,
|
||||||
@@ -28,7 +27,7 @@ class PopupEditorContainer extends React.Component {
|
|||||||
isInvalid: false,
|
isInvalid: false,
|
||||||
style: {
|
style: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
zIndex: zIndexes.EDITOR_CONTAINER,
|
zIndex: metadataZIndexes.EDITOR_CONTAINER,
|
||||||
left,
|
left,
|
||||||
top,
|
top,
|
||||||
...additionalStyles
|
...additionalStyles
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { zIndexes } from '../../../constants';
|
import { metadataZIndexes } from '../../constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
innerWidth: PropTypes.number,
|
innerWidth: PropTypes.number,
|
||||||
@@ -35,7 +35,7 @@ class HorizontalScrollbar extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getContainerStyle = () => {
|
getContainerStyle = () => {
|
||||||
return { zIndex: zIndexes.SCROLL_BAR };
|
return { zIndex: metadataZIndexes.SCROLL_BAR };
|
||||||
};
|
};
|
||||||
|
|
||||||
setScrollbarRef = (ref) => {
|
setScrollbarRef = (ref) => {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { zIndexes } from '../../../constants';
|
import { metadataZIndexes } from '../../constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
onScrollbarScroll: PropTypes.func.isRequired,
|
onScrollbarScroll: PropTypes.func.isRequired,
|
||||||
@@ -49,7 +49,7 @@ class RightScrollbar extends React.Component {
|
|||||||
const component = window.sfMetadataBody;
|
const component = window.sfMetadataBody;
|
||||||
if (component && component.resultContentRef) {
|
if (component && component.resultContentRef) {
|
||||||
style.height = component.resultContentRef.clientHeight;
|
style.height = component.resultContentRef.clientHeight;
|
||||||
style.zIndex = zIndexes.SCROLL_BAR;
|
style.zIndex = metadataZIndexes.SCROLL_BAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sf-metadata-header have 33px height */
|
/* sf-metadata-header have 33px height */
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import CellType from './column/type';
|
import CellType from './column/type';
|
||||||
import { EVENT_BUS_TYPE } from './event-bus-type';
|
import { EVENT_BUS_TYPE } from './event-bus-type';
|
||||||
import TRANSFER_TYPES from './TransferTypes';
|
import TRANSFER_TYPES from './TransferTypes';
|
||||||
|
import * as metadataZIndexes from './z-index';
|
||||||
|
|
||||||
export * from './column';
|
export * from './column';
|
||||||
export * from './filter';
|
export * from './filter';
|
||||||
@@ -115,6 +116,7 @@ export const EDITOR_TYPE = {
|
|||||||
export {
|
export {
|
||||||
EVENT_BUS_TYPE,
|
EVENT_BUS_TYPE,
|
||||||
TRANSFER_TYPES,
|
TRANSFER_TYPES,
|
||||||
|
metadataZIndexes,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DATE_TAG_HEIGHT = 44;
|
export const DATE_TAG_HEIGHT = 44;
|
||||||
|
29
frontend/src/metadata/constants/z-index.js
Normal file
29
frontend/src/metadata/constants/z-index.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// CellMasks should render in front of the cells
|
||||||
|
// Unfrozen cells do not have a zIndex specifed
|
||||||
|
export const CELL_MASK = 1;
|
||||||
|
export const TABLE_MAIN_INTERVAL = 1;
|
||||||
|
export const RESIZE_HANDLE = 1;
|
||||||
|
export const SEQUENCE_COLUMN = 1;
|
||||||
|
|
||||||
|
// higher than unfrozen header cell(0), RESIZE_HANDLE
|
||||||
|
export const FROZEN_HEADER_CELL = 2;
|
||||||
|
export const GROUP_FROZEN_HEADER = 2;
|
||||||
|
export const SCROLL_BAR = 2;
|
||||||
|
|
||||||
|
// In front of CELL_MASK/non-frozen cell(1)、back of the frozen cells (2)
|
||||||
|
export const GROUP_BACKDROP = 2;
|
||||||
|
export const MOBILE_RECORDS_COLUMN_NAMES = 2;
|
||||||
|
export const FROZEN_GROUP_CELL = 2;
|
||||||
|
|
||||||
|
// Frozen cells have a zIndex value of 2 so CELL_MASK should have a higher value
|
||||||
|
export const FROZEN_CELL_MASK = 3;
|
||||||
|
|
||||||
|
// need higher than the doms(etc. cell, cell_mask) which behind of the grid header
|
||||||
|
export const GRID_HEADER = 4;
|
||||||
|
export const GRID_FOOTER = 4;
|
||||||
|
export const UPLOAD_PROGRESS = 4;
|
||||||
|
|
||||||
|
// EditorContainer is rendered outside the grid and it higher FROZEN_GROUP_CELL(2)
|
||||||
|
export const EDITOR_CONTAINER = 9;
|
||||||
|
|
||||||
|
export const DROPDOWN_MENU = 1051;
|
@@ -5,8 +5,7 @@ import toaster from '../../../../../components/toast';
|
|||||||
import LoadAllTip from '../load-all-tip';
|
import LoadAllTip from '../load-all-tip';
|
||||||
import RecordMetrics from '../../utils/record-metrics';
|
import RecordMetrics from '../../utils/record-metrics';
|
||||||
import { gettext } from '../../../../../utils/constants';
|
import { gettext } from '../../../../../utils/constants';
|
||||||
import { SEQUENCE_COLUMN_WIDTH, CANVAS_RIGHT_INTERVAL } from '../../../../constants';
|
import { SEQUENCE_COLUMN_WIDTH, CANVAS_RIGHT_INTERVAL, metadataZIndexes } from '../../../../constants';
|
||||||
import { zIndexes } from '../../../../../constants';
|
|
||||||
import { addClassName, removeClassName } from '../../utils';
|
import { addClassName, removeClassName } from '../../utils';
|
||||||
import { getRecordsFromSelectedRange } from '../../utils/selected-cell-utils';
|
import { getRecordsFromSelectedRange } from '../../utils/selected-cell-utils';
|
||||||
|
|
||||||
@@ -136,7 +135,7 @@ class RecordsFooter extends React.Component {
|
|||||||
const recordWidth = (isLoadingMore || hasMore ? SEQUENCE_COLUMN_WIDTH + columns[0].width : SEQUENCE_COLUMN_WIDTH) + groupOffsetLeft;
|
const recordWidth = (isLoadingMore || hasMore ? SEQUENCE_COLUMN_WIDTH + columns[0].width : SEQUENCE_COLUMN_WIDTH) + groupOffsetLeft;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="sf-metadata-result-footer" style={{ zIndex: zIndexes.GRID_FOOTER }} ref={ref => this.ref = ref}>
|
<div className="sf-metadata-result-footer" style={{ zIndex: metadataZIndexes.GRID_FOOTER }} ref={ref => this.ref = ref}>
|
||||||
<div className="rows-record d-flex text-nowrap" style={{ width: recordWidth }}>
|
<div className="rows-record d-flex text-nowrap" style={{ width: recordWidth }}>
|
||||||
<span>{this.getRecord()}</span>
|
<span>{this.getRecord()}</span>
|
||||||
{!isLoadingMore && hasMore &&
|
{!isLoadingMore && hasMore &&
|
||||||
|
@@ -6,8 +6,9 @@ import InsertColumn from './insert-column';
|
|||||||
import { isMobile } from '../../../../../utils/utils';
|
import { isMobile } from '../../../../../utils/utils';
|
||||||
import { isFrozen, recalculateColumnMetricsByResizeColumn, getFrozenColumns } from '../../../../utils/column';
|
import { isFrozen, recalculateColumnMetricsByResizeColumn, getFrozenColumns } from '../../../../utils/column';
|
||||||
import { isEmptyObject } from '../../../../utils/common';
|
import { isEmptyObject } from '../../../../utils/common';
|
||||||
import { GRID_HEADER_DEFAULT_HEIGHT, GRID_HEADER_DOUBLE_HEIGHT, HEADER_HEIGHT_TYPE, SEQUENCE_COLUMN_WIDTH } from '../../../../constants';
|
import { GRID_HEADER_DEFAULT_HEIGHT, GRID_HEADER_DOUBLE_HEIGHT, HEADER_HEIGHT_TYPE, SEQUENCE_COLUMN_WIDTH,
|
||||||
import { zIndexes } from '../../../../../constants';
|
metadataZIndexes,
|
||||||
|
} from '../../../../constants';
|
||||||
|
|
||||||
const RecordsHeader = ({
|
const RecordsHeader = ({
|
||||||
isGroupView,
|
isGroupView,
|
||||||
@@ -40,7 +41,7 @@ const RecordsHeader = ({
|
|||||||
return {
|
return {
|
||||||
width: containerWidth,
|
width: containerWidth,
|
||||||
minWidth: '100%',
|
minWidth: '100%',
|
||||||
zIndex: zIndexes.GRID_HEADER,
|
zIndex: metadataZIndexes.GRID_HEADER,
|
||||||
height
|
height
|
||||||
};
|
};
|
||||||
}, [containerWidth, height]);
|
}, [containerWidth, height]);
|
||||||
@@ -56,7 +57,7 @@ const RecordsHeader = ({
|
|||||||
position: (isMobile ? 'absolute' : 'fixed'),
|
position: (isMobile ? 'absolute' : 'fixed'),
|
||||||
marginLeft: '0px',
|
marginLeft: '0px',
|
||||||
height,
|
height,
|
||||||
zIndex: zIndexes.SEQUENCE_COLUMN,
|
zIndex: metadataZIndexes.SEQUENCE_COLUMN,
|
||||||
};
|
};
|
||||||
if ((isGroupView && !isFrozen(columns[0])) || isMobile) {
|
if ((isGroupView && !isFrozen(columns[0])) || isMobile) {
|
||||||
value.position = 'absolute';
|
value.position = 'absolute';
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import GroupHeaderLeft from './group-header-left';
|
import GroupHeaderLeft from './group-header-left';
|
||||||
import { zIndexes } from '../../../../../../../constants';
|
import { metadataZIndexes } from '../../../../../../constants';
|
||||||
|
|
||||||
class GroupContainerLeft extends Component {
|
class GroupContainerLeft extends Component {
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ class GroupContainerLeft extends Component {
|
|||||||
firstColumnFrozen, lastColumnFrozen, firstColumnKey,
|
firstColumnFrozen, lastColumnFrozen, firstColumnKey,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
let containerStyle = {
|
let containerStyle = {
|
||||||
zIndex: firstColumnFrozen ? zIndexes.GROUP_FROZEN_HEADER : 0,
|
zIndex: firstColumnFrozen ? metadataZIndexes.GROUP_FROZEN_HEADER : 0,
|
||||||
width: leftPaneWidth,
|
width: leftPaneWidth,
|
||||||
height,
|
height,
|
||||||
};
|
};
|
||||||
|
@@ -2,8 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { isFrozen } from '../../../../../../utils/column';
|
import { isFrozen } from '../../../../../../utils/column';
|
||||||
import { GROUP_HEADER_HEIGHT, SEQUENCE_COLUMN_WIDTH } from '../../../../../../constants';
|
import { GROUP_HEADER_HEIGHT, SEQUENCE_COLUMN_WIDTH, metadataZIndexes } from '../../../../../../constants';
|
||||||
import { zIndexes } from '../../../../../../../constants';
|
|
||||||
|
|
||||||
class GroupHeaderCell extends React.PureComponent {
|
class GroupHeaderCell extends React.PureComponent {
|
||||||
|
|
||||||
@@ -33,7 +32,7 @@ class GroupHeaderCell extends React.PureComponent {
|
|||||||
left: offsetLeft
|
left: offsetLeft
|
||||||
};
|
};
|
||||||
if (isFrozen(column)) {
|
if (isFrozen(column)) {
|
||||||
style.zIndex = zIndexes.GROUP_FROZEN_HEADER;
|
style.zIndex = metadataZIndexes.GROUP_FROZEN_HEADER;
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
};
|
};
|
||||||
|
@@ -4,8 +4,7 @@ import classnames from 'classnames';
|
|||||||
import { IconBtn } from '@seafile/sf-metadata-ui-component';
|
import { IconBtn } from '@seafile/sf-metadata-ui-component';
|
||||||
import GroupTitle from './group-title';
|
import GroupTitle from './group-title';
|
||||||
import { gettext } from '../../../../../../../utils/constants';
|
import { gettext } from '../../../../../../../utils/constants';
|
||||||
import { zIndexes } from '../../../../../../../constants';
|
import { GROUP_HEADER_HEIGHT, metadataZIndexes } from '../../../../../../constants';
|
||||||
import { GROUP_HEADER_HEIGHT } from '../../../../../../constants';
|
|
||||||
|
|
||||||
class GroupHeaderLeft extends Component {
|
class GroupHeaderLeft extends Component {
|
||||||
|
|
||||||
@@ -16,7 +15,7 @@ class GroupHeaderLeft extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
const { column, count, level, cell_value, original_cell_value } = group;
|
const { column, count, level, cell_value, original_cell_value } = group;
|
||||||
const groupHeaderLeftStyle = {
|
const groupHeaderLeftStyle = {
|
||||||
zIndex: firstColumnFrozen && zIndexes.GROUP_FROZEN_HEADER,
|
zIndex: firstColumnFrozen && metadataZIndexes.GROUP_FROZEN_HEADER,
|
||||||
height: GROUP_HEADER_HEIGHT,
|
height: GROUP_HEADER_HEIGHT,
|
||||||
width,
|
width,
|
||||||
};
|
};
|
||||||
|
@@ -5,8 +5,7 @@ import GroupContainerLeft from './group-container-left';
|
|||||||
import GroupContainerRight from './group-container-right';
|
import GroupContainerRight from './group-container-right';
|
||||||
import { isMobile } from '../../../../../../../utils/utils';
|
import { isMobile } from '../../../../../../../utils/utils';
|
||||||
import { isFrozen } from '../../../../../../utils/column';
|
import { isFrozen } from '../../../../../../utils/column';
|
||||||
import { GROUP_VIEW_OFFSET, SEQUENCE_COLUMN_WIDTH } from '../../../../../../constants';
|
import { GROUP_VIEW_OFFSET, SEQUENCE_COLUMN_WIDTH, metadataZIndexes } from '../../../../../../constants';
|
||||||
import { zIndexes } from '../../../../../../../constants';
|
|
||||||
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
@@ -102,7 +101,7 @@ class GroupContainer extends Component {
|
|||||||
let backDropStyle = {
|
let backDropStyle = {
|
||||||
height: backdropHeight,
|
height: backdropHeight,
|
||||||
width: leftPaneWidth + scrollLeft ? GROUP_VIEW_OFFSET : 0,
|
width: leftPaneWidth + scrollLeft ? GROUP_VIEW_OFFSET : 0,
|
||||||
zIndex: zIndexes.GROUP_BACKDROP
|
zIndex: metadataZIndexes.GROUP_BACKDROP
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -4,7 +4,7 @@ import classnames from 'classnames';
|
|||||||
import Cell from './cell';
|
import Cell from './cell';
|
||||||
import ActionsCell from './actions-cell';
|
import ActionsCell from './actions-cell';
|
||||||
import { getFrozenColumns } from '../../../../../utils/column';
|
import { getFrozenColumns } from '../../../../../utils/column';
|
||||||
import { zIndexes } from '../../../../../../constants';
|
import { metadataZIndexes } from '../../../../../constants';
|
||||||
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
@@ -191,12 +191,12 @@ class Record extends React.Component {
|
|||||||
getFrozenColumnsStyle = () => {
|
getFrozenColumnsStyle = () => {
|
||||||
const { isGroupView, lastFrozenColumnKey, height } = this.props;
|
const { isGroupView, lastFrozenColumnKey, height } = this.props;
|
||||||
let style = {
|
let style = {
|
||||||
zIndex: zIndexes.SEQUENCE_COLUMN,
|
zIndex: metadataZIndexes.SEQUENCE_COLUMN,
|
||||||
height: height - 1,
|
height: height - 1,
|
||||||
};
|
};
|
||||||
if (isGroupView) {
|
if (isGroupView) {
|
||||||
style.height = height;
|
style.height = height;
|
||||||
style.zIndex = zIndexes.FROZEN_GROUP_CELL;
|
style.zIndex = metadataZIndexes.FROZEN_GROUP_CELL;
|
||||||
if (!lastFrozenColumnKey) {
|
if (!lastFrozenColumnKey) {
|
||||||
style.marginLeft = '0px';
|
style.marginLeft = '0px';
|
||||||
}
|
}
|
||||||
|
@@ -2,8 +2,7 @@ import { Utils } from '../../../../utils/utils';
|
|||||||
import { getCellValueByColumn, getFileNameFromRecord } from '../../../utils/cell';
|
import { getCellValueByColumn, getFileNameFromRecord } from '../../../utils/cell';
|
||||||
import { getGroupByPath } from '../../../utils/view';
|
import { getGroupByPath } from '../../../utils/view';
|
||||||
import { getColumnByIndex, canEditCell } from '../../../utils/column';
|
import { getColumnByIndex, canEditCell } from '../../../utils/column';
|
||||||
import { PRIVATE_COLUMN_KEY, SUPPORT_PREVIEW_COLUMN_TYPES } from '../../../constants';
|
import { PRIVATE_COLUMN_KEY, SUPPORT_PREVIEW_COLUMN_TYPES, metadataZIndexes } from '../../../constants';
|
||||||
import { zIndexes } from '../../../../constants';
|
|
||||||
import { getGroupRecordByIndex } from './group-metrics';
|
import { getGroupRecordByIndex } from './group-metrics';
|
||||||
|
|
||||||
const SELECT_DIRECTION = {
|
const SELECT_DIRECTION = {
|
||||||
@@ -87,7 +86,7 @@ export const getSelectedDimensions = ({
|
|||||||
} else {
|
} else {
|
||||||
top = getRecordTopFromRecordsBody(rowIdx);
|
top = getRecordTopFromRecordsBody(rowIdx);
|
||||||
}
|
}
|
||||||
const zIndex = frozen ? zIndexes.FROZEN_CELL_MASK : zIndexes.CELL_MASK;
|
const zIndex = frozen ? metadataZIndexes.FROZEN_CELL_MASK : metadataZIndexes.CELL_MASK;
|
||||||
return { width, left, top, height: rowHeight, zIndex };
|
return { width, left, top, height: rowHeight, zIndex };
|
||||||
}
|
}
|
||||||
return defaultDimensions;
|
return defaultDimensions;
|
||||||
@@ -123,7 +122,7 @@ export const getSelectedRangeDimensions = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { topLeft, bottomRight, startCell, cursorCell } = selectedRange;
|
const { topLeft, bottomRight, startCell, cursorCell } = selectedRange;
|
||||||
if (topLeft.idx < 0) {
|
if (topLeft.idx < 0) {
|
||||||
return { width: 0, left: 0, top: 0, height: rowHeight, zIndex: zIndexes.CELL_MASK };
|
return { width: 0, left: 0, top: 0, height: rowHeight, zIndex: metadataZIndexes.CELL_MASK };
|
||||||
}
|
}
|
||||||
|
|
||||||
let { totalWidth, anyColFrozen, left } = getColumnRangeProperties(topLeft.idx, bottomRight.idx, columns);
|
let { totalWidth, anyColFrozen, left } = getColumnRangeProperties(topLeft.idx, bottomRight.idx, columns);
|
||||||
@@ -169,7 +168,7 @@ export const getSelectedRangeDimensions = ({
|
|||||||
top = getRecordTopFromRecordsBody(topLeft.rowIdx);
|
top = getRecordTopFromRecordsBody(topLeft.rowIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
const zIndex = anyColFrozen ? zIndexes.FROZEN_CELL_MASK : zIndexes.CELL_MASK;
|
const zIndex = anyColFrozen ? metadataZIndexes.FROZEN_CELL_MASK : metadataZIndexes.CELL_MASK;
|
||||||
return { width: totalWidth, left, top, height, zIndex };
|
return { width: totalWidth, left, top, height, zIndex };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user