diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index a8b893df..a9e51e29 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -12964,7 +12964,6 @@ "requires": { "axios": "^0.21.0", "browser-or-node": "^1.2.1", - "cvat-data": "file:../cvat-data", "detect-browser": "^5.2.0", "error-stack-parser": "^2.0.2", "form-data": "^2.5.0", diff --git a/cvat-ui/src/components/actions-menu/actions-menu.tsx b/cvat-ui/src/components/actions-menu/actions-menu.tsx index b447050a..c1ef3d39 100644 --- a/cvat-ui/src/components/actions-menu/actions-menu.tsx +++ b/cvat-ui/src/components/actions-menu/actions-menu.tsx @@ -8,7 +8,6 @@ import Menu from 'antd/lib/menu'; import Modal from 'antd/lib/modal'; // eslint-disable-next-line import/no-extraneous-dependencies import { MenuInfo } from 'rc-menu/lib/interface'; - import DumpSubmenu from './dump-submenu'; import LoadSubmenu from './load-submenu'; import ExportSubmenu from './export-submenu'; diff --git a/cvat-ui/src/components/actions-menu/load-submenu.tsx b/cvat-ui/src/components/actions-menu/load-submenu.tsx index 89036fdb..53bbe3c7 100644 --- a/cvat-ui/src/components/actions-menu/load-submenu.tsx +++ b/cvat-ui/src/components/actions-menu/load-submenu.tsx @@ -17,7 +17,9 @@ interface Props { } export default function LoadSubmenu(props: Props): JSX.Element { - const { menuKey, loaders, loadActivity, onFileUpload } = props; + const { + menuKey, loaders, loadActivity, onFileUpload, + } = props; return ( diff --git a/cvat-ui/src/components/actions-menu/styles.scss b/cvat-ui/src/components/actions-menu/styles.scss index e0518205..ccb00306 100644 --- a/cvat-ui/src/components/actions-menu/styles.scss +++ b/cvat-ui/src/components/actions-menu/styles.scss @@ -20,7 +20,7 @@ .cvat-menu-load-submenu-item, .cvat-menu-dump-submenu-item, .cvat-menu-export-submenu-item { - > i { + > span[role='img'] { color: $info-icon-color; } diff --git a/cvat-ui/src/components/annotation-page/appearance-block.tsx b/cvat-ui/src/components/annotation-page/appearance-block.tsx index 90843397..f7f09cbe 100644 --- a/cvat-ui/src/components/annotation-page/appearance-block.tsx +++ b/cvat-ui/src/components/annotation-page/appearance-block.tsx @@ -52,7 +52,7 @@ interface DispatchToProps { export function computeHeight(): number { const [sidebar] = window.document.getElementsByClassName('cvat-objects-sidebar'); const [appearance] = window.document.getElementsByClassName('cvat-objects-appearance-collapse'); - const [tabs] = Array.from(window.document.querySelectorAll('.cvat-objects-sidebar-tabs > .ant-tabs-card-bar')); + const [tabs] = Array.from(window.document.querySelectorAll('.cvat-objects-sidebar-tabs > .ant-tabs-nav')); if (sidebar && appearance && tabs) { const maxHeight = sidebar ? sidebar.clientHeight : 0; diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx index 042f0463..8782eb18 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx @@ -291,15 +291,11 @@ function AttributeAnnotationSidebar(props: StateToProps & DispatchToProps): JSX. ant-layout-sider-zero-width-trigger-left`} onClick={collapse} > - {sidebarCollapsed ? ( - - ) : ( - - )} + {sidebarCollapsed ? : } - - + + @@ -323,6 +319,7 @@ function AttributeAnnotationSidebar(props: StateToProps & DispatchToProps): JSX. }} /> {sidebarCollapsed ? : } - - + + diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx index b6356e9e..1816aed5 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx @@ -22,7 +22,9 @@ interface InputElementParameters { } function renderInputElement(parameters: InputElementParameters): JSX.Element { - const { inputType, attrID, clientID, values, currentValue, onChange } = parameters; + const { + inputType, attrID, clientID, values, currentValue, onChange, + } = parameters; const renderCheckbox = (): JSX.Element => ( <> @@ -246,7 +248,9 @@ interface Props { } function AttributeEditor(props: Props): JSX.Element { - const { attribute, currentValue, onChange, clientID } = props; + const { + attribute, currentValue, onChange, clientID, + } = props; const { inputType, values, id: attrID } = attribute; return ( diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx index c2df6952..28fd8fd8 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx @@ -17,7 +17,9 @@ interface Props { } function AttributeSwitcher(props: Props): JSX.Element { - const { currentAttribute, currentIndex, attributesCount, nextAttribute, normalizedKeyMap } = props; + const { + currentAttribute, currentIndex, attributesCount, nextAttribute, normalizedKeyMap, + } = props; const title = `${currentAttribute} [${currentIndex + 1}/${attributesCount}]`; return ( diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx index bbd36ba2..e0f48d31 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx @@ -19,7 +19,9 @@ interface Props { } function ObjectSwitcher(props: Props): JSX.Element { - const { currentLabel, clientID, objectsCount, currentIndex, nextObject, normalizedKeyMap } = props; + const { + currentLabel, clientID, objectsCount, currentIndex, nextObject, normalizedKeyMap, + } = props; const title = `${currentLabel} ${clientID} [${currentIndex + 1}/${objectsCount}]`; return ( diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss index fbbd2e07..908ab6e8 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss @@ -27,7 +27,7 @@ overflow: hidden; } - > button > i { + > button > span[role='img'] { color: $objects-bar-icons-color; } } diff --git a/cvat-ui/src/components/annotation-page/request-review-modal.tsx b/cvat-ui/src/components/annotation-page/request-review-modal.tsx index 89d4e244..884f1447 100644 --- a/cvat-ui/src/components/annotation-page/request-review-modal.tsx +++ b/cvat-ui/src/components/annotation-page/request-review-modal.tsx @@ -43,12 +43,12 @@ export default function RequestReviewModal(): JSX.Element | null { onOk={submitAnnotations} okText='Submit' > - + Assign a user who is responsible for review - + Reviewer: @@ -56,7 +56,7 @@ export default function RequestReviewModal(): JSX.Element | null { - + You might not be able to change the job after this action. Continue? diff --git a/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx b/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx index 163ca343..fcd415da 100644 --- a/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx +++ b/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx @@ -5,47 +5,36 @@ import React, { ReactPortal } from 'react'; import ReactDOM from 'react-dom'; import { useDispatch } from 'react-redux'; -import Form, { FormComponentProps } from '@ant-design/compatible/lib/form/Form'; +import Form from 'antd/lib/form'; import Input from 'antd/lib/input'; import Button from 'antd/lib/button'; import { Row, Col } from 'antd/lib/grid'; import { reviewActions, finishIssueAsync } from 'actions/review-actions'; +import { Store } from 'antd/lib/form/interface'; -type FormProps = { +interface FormProps { top: number; left: number; submit(message: string): void; cancel(): void; -} & FormComponentProps; +} function MessageForm(props: FormProps): JSX.Element { const { - form: { getFieldDecorator }, - form, - top, - left, - submit, - cancel, + top, left, submit, cancel, } = props; - function handleSubmit(e: React.FormEvent): void { - e.preventDefault(); - form.validateFields((error, values): void => { - if (!error) { - submit(values.issue_description); - } - }); + function handleSubmit(values: Store): void { + submit(values.issue_description); } return ( -
- - {getFieldDecorator('issue_description', { - rules: [{ required: true, message: 'Please, fill out the field' }], - })()} + + + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx index a07b16da..bbbc5ccb 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx @@ -24,19 +24,19 @@ function SetupTagPopover(props: Props): JSX.Element { return (
- + Setup tag - + Label - + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx index 38e8f6f4..43625fd6 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx @@ -18,23 +18,27 @@ interface Props { } function SplitControl(props: Props): JSX.Element { - const { switchSplitShortcut, activeControl, canvasInstance, splitTrack } = props; + const { + switchSplitShortcut, activeControl, canvasInstance, splitTrack, + } = props; const dynamicIconProps = - activeControl === ActiveControl.SPLIT ? { - className: 'cvat-split-track-control cvat-active-canvas-control', - onClick: (): void => { - canvasInstance.split({ enabled: false }); - splitTrack(false); - }, - } : { - className: 'cvat-split-track-control', - onClick: (): void => { - canvasInstance.cancel(); - canvasInstance.split({ enabled: true }); - splitTrack(true); - }, - }; + activeControl === ActiveControl.SPLIT ? + { + className: 'cvat-split-track-control cvat-active-canvas-control', + onClick: (): void => { + canvasInstance.split({ enabled: false }); + splitTrack(false); + }, + } : + { + className: 'cvat-split-track-control', + onClick: (): void => { + canvasInstance.cancel(); + canvasInstance.split({ enabled: true }); + splitTrack(true); + }, + }; return ( diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/tools-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/tools-control.tsx index f1566ea2..88c2b0a7 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/tools-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/tools-control.tsx @@ -375,17 +375,17 @@ export class ToolsControlComponent extends React.PureComponent { } }; - private setActiveInteractor = (key: string): void => { + private setActiveInteractor = (value: string): void => { const { interactors } = this.props; this.setState({ - activeInteractor: interactors.filter((interactor: Model) => interactor.id === key)[0], + activeInteractor: interactors.filter((interactor: Model) => interactor.id === value)[0], }); }; - private setActiveTracker = (key: string): void => { + private setActiveTracker = (value: string): void => { const { trackers } = this.props; this.setState({ - activeTracker: trackers.filter((tracker: Model) => tracker.id === key)[0], + activeTracker: trackers.filter((tracker: Model) => tracker.id === value)[0], }); }; @@ -457,12 +457,12 @@ export class ToolsControlComponent extends React.PureComponent { const { activeLabelID } = this.state; return ( <> - + Label - + { if (!trackers.length) { return ( - + No available trackers found @@ -498,12 +498,12 @@ export class ToolsControlComponent extends React.PureComponent { return ( <> - + Tracker - + - + Tracking frames @@ -541,7 +541,7 @@ export class ToolsControlComponent extends React.PureComponent { /> - + @@ -64,14 +65,14 @@ function LabelItemComponent(props: Props): JSX.Element { {statesLocked ? ( - + ) : ( )} {statesHidden ? ( - + ) : ( )} diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx index b48c1574..3517010f 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx @@ -94,7 +94,7 @@ function ItemTopComponent(props: Props): JSX.Element { }; return ( - + {clientID}
@@ -104,7 +104,13 @@ function ItemTopComponent(props: Props): JSX.Element { - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx index cde142be..ea7a046f 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx @@ -4,7 +4,19 @@ import React from 'react'; import { Row, Col } from 'antd/lib/grid'; -import Icon from '@ant-design/icons'; +import Icon, { + UnlockOutlined, + LockFilled, + TeamOutlined, + UserOutlined, + PushpinFilled, + PushpinOutlined, + EyeInvisibleFilled, + StarFilled, + SelectOutlined, + StarOutlined, + EyeOutlined, +} from '@ant-design/icons'; import Tooltip from 'antd/lib/tooltip'; import { ObjectType, ShapeType } from 'reducers/interfaces'; @@ -130,9 +142,9 @@ function SwitchLock(props: Props): JSX.Element { return ( {locked ? ( - + ) : ( - + )} ); @@ -145,9 +157,9 @@ function SwitchOccluded(props: Props): JSX.Element { return ( {occluded ? ( - + ) : ( - + )} ); @@ -158,9 +170,9 @@ function SwitchPinned(props: Props): JSX.Element { return ( {pinned ? ( - + ) : ( - + )} ); @@ -174,15 +186,9 @@ function SwitchHidden(props: Props): JSX.Element { return ( ); @@ -203,7 +209,7 @@ function SwitchOutside(props: Props): JSX.Element { style={outsideStyle} /> ) : ( - + )}
); @@ -217,15 +223,9 @@ function SwitchKeyframe(props: Props): JSX.Element { return ( {keyframe ? ( - + ) : ( - + )} ); @@ -236,9 +236,9 @@ function ItemButtonsComponent(props: Props): JSX.Element { if (objectType === ObjectType.TRACK) { return ( - + - + @@ -253,7 +253,7 @@ function ItemButtonsComponent(props: Props): JSX.Element { {!readonly && ( - + @@ -287,9 +287,9 @@ function ItemButtonsComponent(props: Props): JSX.Element { if (objectType === ObjectType.TAG) { return ( - + - + @@ -300,9 +300,9 @@ function ItemButtonsComponent(props: Props): JSX.Element { } return ( - + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-details.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-details.tsx index b541ce0d..9615d4bf 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-details.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-details.tsx @@ -55,7 +55,6 @@ function ItemAttributesComponent(props: Props): JSX.Element { (attribute: any): JSX.Element => ( - {statesLocked ? ( - - ) : ( - - )} + {statesLocked ? : } ); @@ -57,7 +56,7 @@ function HideAllSwitcher(props: Props): JSX.Element {