@labelbee/lb-components 1.8.0 → 1.9.0-alpha.1
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/dist/assets/icons/bcc2b407.svg +11 -0
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/index.css +52 -3
- package/dist/store/annotation/selectors.js +1 -0
- package/dist/types/components/AnnotationView/index.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +8 -1
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +3 -16
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +4 -1
- package/dist/types/components/videoPlayer/types.d.ts +1 -1
- package/dist/types/store/annotation/selectors.d.ts +7 -0
- package/dist/types/store/annotation/types.d.ts +3 -3
- package/dist/types/store/imgAttribute/types.d.ts +1 -1
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/store/toolStyle/types.d.ts +1 -1
- package/dist/types/utils/dom.d.ts +2 -2
- package/dist/types/views/MainView/toolFooter/AnnotatedAttributes/index.d.ts +4 -0
- package/dist/types/views/MainView/toolFooter/FooterPopover.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
- package/dist/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolFooter/index.js +1 -1
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +1 -4
- package/es/components/ImageError/index.js +1 -53
- package/es/components/pointCloudView/PointCloud2DView.js +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js.map +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js.map +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js.map +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js.map +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js.map +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js.map +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js.map +1 -1
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/es/components/pointCloudView/hooks/useBoxes.js.map +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudBoxes.js +119 -0
- package/es/components/pointCloudView/hooks/usePointCloudBoxes.js.map +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +1 -1
- package/es/components/pointCloudView/hooks/usePolygon.js.map +1 -1
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/es/components/pointCloudView/hooks/useSingleBox.js.map +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js.map +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/pointCloudView/index.js.map +1 -1
- package/es/components/pointCloudView/useSingleBox.js +44 -0
- package/es/components/pointCloudView/useSingleBox.js.map +1 -0
- package/es/index.css +52 -3
- package/es/store/annotation/selectors.js +1 -0
- package/es/store/annotation/selectors.js.map +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/OperationList.js +77 -0
- package/es/views/MainView/sidebar/GeneralOperation/OperationList.js.map +1 -0
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/es/views/MainView/toolFooter/FooterPopover.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +1 -1
- package/es/views/MainView/toolFooter/index.js +1 -1
- package/es/views/MainView/toolFooter/index.js.map +1 -1
- package/package.json +4 -4
- package/es/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg.js +0 -4
- package/es/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg.js.map +0 -1
- package/es/assets/cssIcon/annotation/icon_clearSmall.svg +0 -10
- package/es/assets/cssIcon/annotation/icon_clearSmall_a.svg +0 -10
- package/es/assets/cssIcon/slide_btn.svg +0 -23
- package/es/components/pointCloudView/components/UnifiedParamsModal/index.js +0 -228
- package/es/components/pointCloudView/components/UnifiedParamsModal/index.js.map +0 -1
- package/es/components/pointCloudView/data.js +0 -4
- package/es/components/pointCloudView/data.js.map +0 -1
- package/es/hooks/useConfig.js +0 -18
- package/es/hooks/useConfig.js.map +0 -1
package/es/index.css
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
position: relative;
|
|
22
22
|
z-index: 10;
|
|
23
23
|
border-top: 1px solid #e2e2e2;
|
|
24
|
+
border-left: 1px solid #e2e2e2;
|
|
24
25
|
}
|
|
25
26
|
.bee-layout__side .ant-collapse-borderless > .ant-collapse-item {
|
|
26
27
|
border-bottom: 1px solid #eee;
|
|
@@ -1062,6 +1063,44 @@
|
|
|
1062
1063
|
min-width: 116px;
|
|
1063
1064
|
}
|
|
1064
1065
|
|
|
1066
|
+
.bee-annotated-attribute {
|
|
1067
|
+
width: 240px;
|
|
1068
|
+
background: white;
|
|
1069
|
+
}
|
|
1070
|
+
.bee-annotated-attribute__popover .ant-popover-inner-content {
|
|
1071
|
+
padding: 0;
|
|
1072
|
+
}
|
|
1073
|
+
.bee-annotated-attribute__pin {
|
|
1074
|
+
cursor: pointer;
|
|
1075
|
+
color: #666fff;
|
|
1076
|
+
}
|
|
1077
|
+
.bee-annotated-attribute__pin .anticon {
|
|
1078
|
+
margin-right: 4px;
|
|
1079
|
+
}
|
|
1080
|
+
.bee-annotated-attribute__text {
|
|
1081
|
+
display: flex;
|
|
1082
|
+
justify-content: space-between;
|
|
1083
|
+
padding: 8px 12px;
|
|
1084
|
+
color: #333;
|
|
1085
|
+
}
|
|
1086
|
+
.bee-annotated-attribute__item {
|
|
1087
|
+
height: 40px;
|
|
1088
|
+
line-height: 40px;
|
|
1089
|
+
padding: 12px;
|
|
1090
|
+
display: flex;
|
|
1091
|
+
align-items: center;
|
|
1092
|
+
}
|
|
1093
|
+
.bee-annotated-attribute__item .anticon {
|
|
1094
|
+
cursor: pointer;
|
|
1095
|
+
}
|
|
1096
|
+
.bee-annotated-attribute__item .anticon-eye,
|
|
1097
|
+
.bee-annotated-attribute__item .anticon-caret-down {
|
|
1098
|
+
margin-right: 8px;
|
|
1099
|
+
}
|
|
1100
|
+
.bee-annotated-attribute__item__text {
|
|
1101
|
+
flex: 1;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1065
1104
|
/** VideoPlayer样式 start */
|
|
1066
1105
|
.bee-video-wrapper {
|
|
1067
1106
|
width: 100%;
|
|
@@ -1201,6 +1240,10 @@
|
|
|
1201
1240
|
overflow: hidden;
|
|
1202
1241
|
flex: 1;
|
|
1203
1242
|
}
|
|
1243
|
+
.bee-point-cloud-wrapper .bee-point-cloud-content {
|
|
1244
|
+
flex: 1;
|
|
1245
|
+
display: flex;
|
|
1246
|
+
}
|
|
1204
1247
|
.bee-point-cloud-wrapper .bee-point-cloud-container {
|
|
1205
1248
|
position: relative;
|
|
1206
1249
|
}
|
|
@@ -1299,19 +1342,25 @@
|
|
|
1299
1342
|
flex-direction: column;
|
|
1300
1343
|
justify-content: flex-end;
|
|
1301
1344
|
}
|
|
1302
|
-
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__reset {
|
|
1345
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__reset, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__followTop {
|
|
1303
1346
|
display: inline-block;
|
|
1304
1347
|
height: 36px;
|
|
1305
1348
|
width: 36px;
|
|
1306
1349
|
background-repeat: no-repeat;
|
|
1307
1350
|
cursor: pointer;
|
|
1308
|
-
background-image: url("../dist/assets/icons/25ef334b.svg");
|
|
1309
|
-
margin: 16px 0;
|
|
1310
1351
|
font-size: 36px;
|
|
1311
1352
|
background-position: center;
|
|
1312
1353
|
background-color: #444;
|
|
1313
1354
|
border-radius: 4px;
|
|
1314
1355
|
}
|
|
1356
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__reset {
|
|
1357
|
+
background-image: url("../dist/assets/icons/25ef334b.svg");
|
|
1358
|
+
margin: 16px 0;
|
|
1359
|
+
}
|
|
1360
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__followTop {
|
|
1361
|
+
margin: 16px 0 0 0;
|
|
1362
|
+
background-image: url("../dist/assets/icons/bcc2b407.svg");
|
|
1363
|
+
}
|
|
1315
1364
|
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__top, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__front, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__left, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__right, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__back, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__bottom, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__lft, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__rbt {
|
|
1316
1365
|
display: inline-block;
|
|
1317
1366
|
height: 36px;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsonParser as s}from"../../utils/index.js";import{getStepConfig as i}from"./reducer.js";const n=({annotation:e})=>{var t;const{stepList:o,step:r}=e;return s((t=i(o,r))==null?void 0:t.config)};export{n as stepConfigSelector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.js","sources":["../../../src/store/annotation/selectors.ts"],"sourcesContent":["import { jsonParser } from '@/utils';\nimport { getStepConfig } from './reducer';\nimport { AnnotationState } from './types';\n\n/**\n * select current step config\n */\nexport const stepConfigSelector = ({ annotation }: { annotation: AnnotationState }) => {\n const { stepList, step } = annotation;\n return jsonParser(getStepConfig(stepList, step)?.config);\n};\n"],"names":[],"mappings":";;;AAOa,MAAA,kBAAA,GAAqB,CAAC,CAAE,UAAkD,CAAA,KAAA;AAPvF,EAAA,IAAA,EAAA,CAAA;AAQE,EAAM,MAAA,CAAE,UAAU,IAAS,CAAA,GAAA,UAAA,CAAA;AAC3B,EAAA,OAAO,UAAW,CAAA,CAAA,EAAA,GAAA,aAAA,CAAc,QAAU,EAAA,IAAA,CAAA,KAAxB,IAA+B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import img from '../../../../assets/annotation/common/icon_clear.svg.js';
|
|
2
|
+
import img$1 from '../../../../assets/annotation/common/icon_clear_a.svg.js';
|
|
3
|
+
import img$2 from '../../../../assets/annotation/common/icon_invalid.svg.js';
|
|
4
|
+
import img$3 from '../../../../assets/annotation/common/icon_invalid_a.svg.js';
|
|
5
|
+
import { StopOutlined } from '@ant-design/icons';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { CopyBackWordResult } from '../../../../store/annotation/actionCreators.js';
|
|
9
|
+
import { store } from '../../../../index.js';
|
|
10
|
+
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
15
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
16
|
+
var __spreadValues = (a, b) => {
|
|
17
|
+
for (var prop in b || (b = {}))
|
|
18
|
+
if (__hasOwnProp.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
if (__getOwnPropSymbols)
|
|
21
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
22
|
+
if (__propIsEnum.call(b, prop))
|
|
23
|
+
__defNormalProp(a, prop, b[prop]);
|
|
24
|
+
}
|
|
25
|
+
return a;
|
|
26
|
+
};
|
|
27
|
+
const useOperationList = (toolInstance) => {
|
|
28
|
+
const {t} = useTranslation();
|
|
29
|
+
const iconStyle = {
|
|
30
|
+
height: "25px",
|
|
31
|
+
lineHeight: "25px",
|
|
32
|
+
display: "flex",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
alignItems: "center"
|
|
35
|
+
};
|
|
36
|
+
const empty = [
|
|
37
|
+
{
|
|
38
|
+
name: t("ClearLabel"),
|
|
39
|
+
key: "sureClear",
|
|
40
|
+
imgSvg: img,
|
|
41
|
+
hoverSvg: img$1,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
toolInstance == null ? void 0 : toolInstance.clearResult();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
const setQuestion = {
|
|
48
|
+
name: t(toolInstance.valid === true ? "SetAsInvalid" : "SetAsValid"),
|
|
49
|
+
key: "sureQuestion",
|
|
50
|
+
imgSvg: /* @__PURE__ */ React.createElement(StopOutlined, {
|
|
51
|
+
style: iconStyle
|
|
52
|
+
}),
|
|
53
|
+
hoverSvg: /* @__PURE__ */ React.createElement(StopOutlined, {
|
|
54
|
+
style: __spreadValues({color: "#666fff"}, iconStyle)
|
|
55
|
+
}),
|
|
56
|
+
onClick: () => {
|
|
57
|
+
toolInstance.setValid(!toolInstance.valid);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const copyThePrevious = {
|
|
61
|
+
name: t("CopyThePrevious"),
|
|
62
|
+
key: "sureCopy",
|
|
63
|
+
imgSvg: img$2,
|
|
64
|
+
hoverSvg: img$3,
|
|
65
|
+
onClick: () => {
|
|
66
|
+
store.dispatch(CopyBackWordResult());
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
setQuestion,
|
|
71
|
+
empty,
|
|
72
|
+
copyThePrevious
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { useOperationList as default };
|
|
77
|
+
//# sourceMappingURL=OperationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationList.js","sources":["../../../../../src/views/MainView/sidebar/GeneralOperation/OperationList.tsx"],"sourcesContent":["import { IOperationConfig } from './ActionsConfirm';\nimport clearResultSvg from '@/assets/annotation/common/icon_clear.svg';\nimport clearResultASvg from '@/assets/annotation/common/icon_clear_a.svg';\nimport copyBackStepSvg from '@/assets/annotation/common/icon_invalid.svg';\nimport copyBackStepASvg from '@/assets/annotation/common/icon_invalid_a.svg';\nimport { StopOutlined } from '@ant-design/icons';\nimport { useTranslation } from 'react-i18next';\nimport React from 'react';\nimport { CopyBackWordResult } from '@/store/annotation/actionCreators';\nimport { store } from '@/index';\n\nconst useOperationList = (toolInstance: any) => {\n const { t } = useTranslation();\n const iconStyle = {\n height: '25px',\n lineHeight: '25px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n };\n\n const empty: IOperationConfig[] = [\n {\n name: t('ClearLabel'),\n key: 'sureClear',\n imgSvg: clearResultSvg,\n hoverSvg: clearResultASvg,\n onClick: () => {\n toolInstance?.clearResult();\n },\n },\n ];\n\n const setQuestion = {\n name: t(toolInstance.valid === true ? 'SetAsInvalid' : 'SetAsValid'),\n key: 'sureQuestion',\n imgSvg: <StopOutlined style={iconStyle} />,\n hoverSvg: <StopOutlined style={{ color: '#666fff', ...iconStyle }} />,\n onClick: () => {\n toolInstance.setValid(!toolInstance.valid);\n },\n };\n\n const copyThePrevious = {\n name: t('CopyThePrevious'),\n key: 'sureCopy',\n imgSvg: copyBackStepSvg,\n hoverSvg: copyBackStepASvg,\n onClick: () => {\n store.dispatch(CopyBackWordResult());\n },\n };\n\n return {\n setQuestion,\n empty,\n copyThePrevious,\n };\n};\n\nexport default useOperationList;\n"],"names":["clearResultSvg","clearResultASvg","copyBackStepSvg","copyBackStepASvg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAA,gBAAA,GAAmB,CAAC,YAAsB,KAAA;AAC9C,EAAA,MAAM,CAAE,CAAM,CAAA,GAAA,cAAA,EAAA,CAAA;AACd,EAAA,MAAM,SAAY,GAAA;AAAA,IAChB,MAAQ,EAAA,MAAA;AAAA,IACR,UAAY,EAAA,MAAA;AAAA,IACZ,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA,QAAA;AAAA,IAChB,UAAY,EAAA,QAAA;AAAA,GAAA,CAAA;AAGd,EAAA,MAAM,KAA4B,GAAA;AAAA,IAChC;AAAA,MACE,MAAM,CAAE,CAAA,YAAA,CAAA;AAAA,MACR,GAAK,EAAA,WAAA;AAAA,MACL,MAAQ,EAAAA,GAAA;AAAA,MACR,QAAU,EAAAC,KAAA;AAAA,MACV,SAAS,MAAM;AACb,QAAc,YAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,YAAA,CAAA,WAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA;AAAA,GAAA,CAAA;AAKpB,EAAA,MAAM,WAAc,GAAA;AAAA,IAClB,IAAM,EAAA,CAAA,CAAE,YAAa,CAAA,KAAA,KAAU,OAAO,cAAiB,GAAA,YAAA,CAAA;AAAA,IACvD,GAAK,EAAA,cAAA;AAAA,IACL,MAAA,sCAAS,YAAD,EAAA;AAAA,MAAc,KAAO,EAAA,SAAA;AAAA,KAAA,CAAA;AAAA,IAC7B,QAAA,sCAAW,YAAD,EAAA;AAAA,MAAc,KAAA,EAAO,cAAE,CAAA,CAAA,KAAA,EAAO,SAAc,CAAA,EAAA,SAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IACtD,SAAS,MAAM;AACb,MAAa,YAAA,CAAA,QAAA,CAAS,CAAC,YAAa,CAAA,KAAA,CAAA,CAAA;AAAA,KAAA;AAAA,GAAA,CAAA;AAIxC,EAAA,MAAM,eAAkB,GAAA;AAAA,IACtB,MAAM,CAAE,CAAA,iBAAA,CAAA;AAAA,IACR,GAAK,EAAA,UAAA;AAAA,IACL,MAAQ,EAAAC,KAAA;AAAA,IACR,QAAU,EAAAC,KAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAA,KAAA,CAAM,QAAS,CAAA,kBAAA,EAAA,CAAA,CAAA;AAAA,KAAA;AAAA,GAAA,CAAA;AAInB,EAAO,OAAA;AAAA,IACL,WAAA;AAAA,IACA,KAAA;AAAA,IACA,eAAA;AAAA,GAAA,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudContext as u}from"../../../../components/pointCloudView/PointCloudContext.js";import{Modal as j}from"antd";import t,{useContext as c,useState as S}from"react";import{stepConfigSelector as I}from"../../../../store/annotation/selectors.js";import{useSelector as v}from"../../../../store/ctx.js";import{i18n as E}from"@labelbee/lb-utils";import{UnorderedListOutlined as L,PushpinFilled as f,EyeInvisibleFilled as R,EyeFilled as w,CaretDownFilled as H,DeleteOutlined as V}from"@ant-design/icons";import{useHistory as G}from"../../../../components/pointCloudView/hooks/useHistory.js";import{getClassName as r}from"../../../../utils/dom.js";import O from"../../../../utils/StepUtils.js";import{EPointCloudName as T}from"@labelbee/lb-annotation";import{useTranslation as U}from"react-i18next";import _ from"../FooterPopover.js";const $=({attribute:e})=>{const a=c(u),{pointCloudBoxList:o,hideAttributes:l,toggleAttributesVisible:m,polygonList:i,setPolygonList:P,setPointCloudResult:x,reRender:h}=a,[A,F]=S(!1),{pushHistoryWithList:k}=G(),y=[...o,...i].filter(n=>n.attribute===e.value),b=()=>{m(e.value)},N=l.includes(e.value),g=({trackID:n,order:s})=>n||s,B=n=>{if(y.length===0)return;const s=i.filter(C=>n!==C.attribute),p=o.filter(C=>n!==C.attribute);P(s),x(p),h(p,s),k({pointCloudBoxList:p,polygonList:s})},D=n=>{j.confirm({content:E.t("onDeleteGraphByAttr",{attribute:n.key}),onOk:()=>{B(n.value)},okText:E.t("Confirm"),cancelText:E.t("Cancel")})};return t.createElement(t.Fragment,null,t.createElement("div",{className:r("annotated-attribute","item")},N?t.createElement(R,{onClick:b}):t.createElement(w,{onClick:b}),t.createElement(H,{rotate:A?270:0,onClick:()=>{F(!A)}}),t.createElement("span",{className:r("annotated-attribute","item","text")},e.key),t.createElement(V,{onClick:()=>D(e)})),y.map(n=>t.createElement("div",{key:g(n),style:{paddingLeft:54}},`${g(n)}.${e.key}`)))},d=()=>{const e=v(I),{attrPanelLayout:a,setAttrPanelLayout:o}=c(u);return t.createElement("div",{className:r("annotated-attribute")},a?t.createElement("div",{className:r("annotated-attribute","text")},t.createElement("span",null,"\u6807\u6CE8\u7ED3\u679C"),t.createElement("span",{className:r("annotated-attribute","pin"),onClick:()=>{o("")}},t.createElement(f,null),"\u53D6\u6D88\u56FA\u5B9A")):t.createElement("div",{className:r("annotated-attribute","text")},t.createElement("span",{onClick:()=>{o("left")},className:r("annotated-attribute","pin")},t.createElement(f,null),"\u56FA\u5B9A\u5728\u5DE6\u4FA7"),t.createElement("span",{onClick:()=>{o("right")},className:r("annotated-attribute","pin")},t.createElement(f,null),"\u56FA\u5B9A\u5728\u53F3\u4FA7")),t.createElement("div",null,e.attributeList.map(l=>t.createElement($,{attribute:l,key:l.value}))))},M=()=>{const{attrPanelLayout:e}=c(u);return e==="left"?t.createElement(d,null):null},W=()=>{const{attrPanelLayout:e}=c(u);return e==="right"?t.createElement(d,null):null},q=()=>{const{attrPanelLayout:e}=c(u),{t:a}=U(),o=v(l=>{var m,i;return O.getCurrentStepInfo((m=l==null?void 0:l.annotation)==null?void 0:m.step,(i=l.annotation)==null?void 0:i.stepList)});return(o==null?void 0:o.tool)!==T.PointCloud||e?null:t.createElement(_,{hoverIcon:t.createElement(L,{style:{marginRight:4}}),icon:t.createElement(L,{style:{marginRight:4}}),title:a("AnnotatedList"),content:t.createElement(d,null)})};export{q as AnnotatedAttributesIcon,d as AnnotatedAttributesPanel,M as AnnotatedAttributesPanelFixedLeft,W as AnnotatedAttributesPanelFixedRight};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/views/MainView/toolFooter/AnnotatedAttributes/index.tsx"],"sourcesContent":["import { PointCloudContext } from '@/components/pointCloudView/PointCloudContext';\nimport { Modal } from 'antd';\nimport React, { useContext, useState } from 'react';\nimport { stepConfigSelector } from '@/store/annotation/selectors';\nimport { useSelector } from '@/store/ctx';\nimport { i18n, IPointCloudConfig } from '@labelbee/lb-utils';\nimport {\n CaretDownFilled,\n DeleteOutlined,\n EyeFilled,\n EyeInvisibleFilled,\n PushpinFilled,\n UnorderedListOutlined,\n} from '@ant-design/icons';\nimport { IInputList } from '@/types/main';\nimport { useHistory } from '@/components/pointCloudView/hooks/useHistory';\nimport { getClassName } from '@/utils/dom';\nimport StepUtils from '@/utils/StepUtils';\nimport { EPointCloudName } from '@labelbee/lb-annotation';\nimport { useTranslation } from 'react-i18next';\nimport FooterPopover from '../FooterPopover';\n\nconst AnnotatedAttributesItem = ({ attribute }: { attribute: IInputList }) => {\n const pointCloudCtx = useContext(PointCloudContext);\n const {\n pointCloudBoxList,\n hideAttributes,\n toggleAttributesVisible,\n polygonList,\n setPolygonList,\n setPointCloudResult,\n reRender,\n } = pointCloudCtx;\n\n const [expanded, setExpanded] = useState(false);\n\n const { pushHistoryWithList } = useHistory();\n\n const pointCloudListForSpecAttribute = [...pointCloudBoxList, ...polygonList].filter(\n (i) => i.attribute === attribute.value,\n );\n\n const onVisibleChange = () => {\n toggleAttributesVisible(attribute.value);\n };\n\n const isHidden = hideAttributes.includes(attribute.value);\n\n const getBoxID = ({ trackID, order }: { trackID?: number; order?: number }) => {\n return trackID ? trackID : order;\n };\n\n const deleteGraphByAttr = (attribute: string) => {\n if (pointCloudListForSpecAttribute.length === 0) {\n return;\n }\n\n const newPolygonList = polygonList.filter((i) => attribute !== i.attribute);\n const newPointCloudList = pointCloudBoxList.filter((i) => attribute !== i.attribute);\n setPolygonList(newPolygonList);\n setPointCloudResult(newPointCloudList);\n\n reRender(newPointCloudList, newPolygonList);\n\n pushHistoryWithList({ pointCloudBoxList: newPointCloudList, polygonList: newPolygonList });\n };\n\n const onDeleteGraphByAttr = (attribute: IInputList) => {\n Modal.confirm({\n content: i18n.t('onDeleteGraphByAttr', { attribute: attribute.key }),\n onOk: () => {\n deleteGraphByAttr(attribute.value);\n },\n okText: i18n.t('Confirm'),\n cancelText: i18n.t('Cancel'),\n });\n };\n\n return (\n <>\n <div className={getClassName('annotated-attribute', 'item')}>\n {isHidden ? (\n <EyeInvisibleFilled onClick={onVisibleChange} />\n ) : (\n <EyeFilled onClick={onVisibleChange} />\n )}\n <CaretDownFilled\n rotate={expanded ? 270 : 0}\n onClick={() => {\n setExpanded(!expanded);\n }}\n />\n <span className={getClassName('annotated-attribute', 'item', 'text')}>{attribute.key}</span>\n\n <DeleteOutlined onClick={() => onDeleteGraphByAttr(attribute)} />\n </div>\n {pointCloudListForSpecAttribute.map((box) => {\n return (\n <div key={getBoxID(box)} style={{ paddingLeft: 54 }}>\n {`${getBoxID(box)}.${attribute.key}`}\n </div>\n );\n })}\n </>\n );\n};\n\nexport const AnnotatedAttributesPanel = () => {\n const stepConfig: IPointCloudConfig = useSelector(stepConfigSelector);\n const { attrPanelLayout, setAttrPanelLayout } = useContext(PointCloudContext);\n\n return (\n <div className={getClassName('annotated-attribute')}>\n {attrPanelLayout ? (\n <div className={getClassName('annotated-attribute', 'text')}>\n <span>标注结果</span>\n <span\n className={getClassName('annotated-attribute', 'pin')}\n onClick={() => {\n setAttrPanelLayout('');\n }}\n >\n <PushpinFilled />\n 取消固定\n </span>\n </div>\n ) : (\n <div className={getClassName('annotated-attribute', 'text')}>\n <span\n onClick={() => {\n setAttrPanelLayout('left');\n }}\n className={getClassName('annotated-attribute', 'pin')}\n >\n <PushpinFilled />\n 固定在左侧\n </span>\n <span\n onClick={() => {\n setAttrPanelLayout('right');\n }}\n className={getClassName('annotated-attribute', 'pin')}\n >\n <PushpinFilled />\n 固定在右侧\n </span>\n </div>\n )}\n\n <div>\n {stepConfig.attributeList.map((i) => (\n <AnnotatedAttributesItem attribute={i} key={i.value} />\n ))}\n </div>\n </div>\n );\n};\n\nexport const AnnotatedAttributesPanelFixedLeft = () => {\n const { attrPanelLayout } = useContext(PointCloudContext);\n if (attrPanelLayout === 'left') {\n return <AnnotatedAttributesPanel />;\n }\n\n return null;\n};\n\nexport const AnnotatedAttributesPanelFixedRight = () => {\n const { attrPanelLayout } = useContext(PointCloudContext);\n\n if (attrPanelLayout === 'right') {\n return <AnnotatedAttributesPanel />;\n }\n\n return null;\n};\n\nexport const AnnotatedAttributesIcon = () => {\n const { attrPanelLayout } = useContext(PointCloudContext);\n const { t } = useTranslation();\n const stepInfo = useSelector((state) =>\n // @ts-ignore\n StepUtils.getCurrentStepInfo(state?.annotation?.step, state.annotation?.stepList),\n );\n\n if (stepInfo?.tool !== EPointCloudName.PointCloud) {\n return null;\n }\n\n if (attrPanelLayout) {\n return null;\n }\n\n return (\n <FooterPopover\n hoverIcon={<UnorderedListOutlined style={{ marginRight: 4 }} />}\n icon={<UnorderedListOutlined style={{ marginRight: 4 }} />}\n title={t('AnnotatedList')}\n content={<AnnotatedAttributesPanel />}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,uBAAA,GAA0B,CAAC,CAAE,SAA2C,CAAA,KAAA;AAC5E,EAAA,MAAM,gBAAgB,UAAW,CAAA,iBAAA,CAAA,CAAA;AACjC,EAAM,MAAA;AAAA,IACJ,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,uBAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA,mBAAA;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E,CAAM,CAAA,GAAA,cAAA,EAAA,CAAA;AACd,EAAM,MAAA,QAAA,GAAW,WAAY,CAAA,CAAC,KAAO,KAAA;AApLvC,IAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAsLI,IAAA,OAAA,SAAA,CAAU,mBAAmB,CAAO,EAAA,GAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,UAAA,KAAP,mBAAmB,IAAM,EAAA,CAAA,EAAA,GAAA,KAAA,CAAM,eAAN,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA;AAG1E,EAAI,IAAA,CAAA,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAU,IAAS,MAAA,eAAA,CAAgB,UAAY,EAAA;AACjD,IAAO,OAAA,IAAA,CAAA;AAAA,GAAA;AAGT,EAAA,IAAI,eAAiB,EAAA;AACnB,IAAO,OAAA,IAAA,CAAA;AAAA,GAAA;AAGT,EAAA,2CACG,aAAD,EAAA;AAAA,IACE,SAAA,sCAAY,qBAAD,EAAA;AAAA,MAAuB,KAAA,EAAO,CAAE,WAAa,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IACxD,IAAA,sCAAO,qBAAD,EAAA;AAAA,MAAuB,KAAA,EAAO,CAAE,WAAa,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IACnD,OAAO,CAAE,CAAA,eAAA,CAAA;AAAA,IACT,OAAA,sCAAU,wBAAD,EAAA,IAAA,CAAA;AAAA,GAAA,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useState as c}from"react";import{Popover as p}from"antd";const i=({source:e})=>typeof e=="string"?t.createElement("img",{src:e,width:14,height:14,style:{marginRight:4}}):e,u=({hoverIcon:e,icon:s,containerStyle:a,content:r,title:n})=>{const[l,o]=c(!1),m=t.createElement(i,{source:l&&e!=null?e:s});return t.createElement(p,{placement:"topLeft",content:r,onMouseMove:()=>{o(!0)},onMouseLeave:()=>{o(!1)},overlayClassName:"tool-hotkeys-popover",className:"tipsBar"},t.createElement("div",{className:"shortCutTitle",onMouseMove:()=>o(!0),onMouseLeave:()=>o(!1),style:a},t.createElement("a",{className:"svg"},m,n)))};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooterPopover.js","sources":["../../../../src/views/MainView/toolFooter/FooterPopover.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Popover } from 'antd';\n\ntype Source = string | React.ReactElement;\n\nconst Icon = ({ source }: { source: Source }) => {\n if (typeof source === 'string') {\n return <img src={source} width={14} height={14} style={{ marginRight: 4 }} />;\n }\n\n return source;\n};\n\nconst FooterPopover = ({\n hoverIcon,\n icon,\n containerStyle,\n content,\n title,\n}: {\n hoverIcon: Source;\n icon: Source;\n containerStyle?: React.CSSProperties;\n content: React.ReactNode;\n title: string;\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const displayIcon = <Icon source={isOpen ? hoverIcon ?? icon : icon} />;\n\n return (\n <Popover\n placement='topLeft'\n content={content}\n // @ts-ignore\n onMouseMove={() => {\n setIsOpen(true);\n }}\n onMouseLeave={() => {\n setIsOpen(false);\n }}\n overlayClassName='tool-hotkeys-popover'\n className='tipsBar'\n >\n <div\n className='shortCutTitle'\n onMouseMove={() => setIsOpen(true)}\n onMouseLeave={() => setIsOpen(false)}\n style={containerStyle}\n >\n <a className='svg'>\n {displayIcon}\n {title}\n </a>\n </div>\n </Popover>\n );\n};\n\nexport default FooterPopover;\n"],"names":[],"mappings":";;;AAKA,MAAM,IAAA,GAAO,CAAC,CAAE,MAAiC,CAAA,KAAA;AAC/C,EAAI,IAAA,OAAO,WAAW,QAAU,EAAA;AAC9B,IAAA,2CAAQ,KAAD,EAAA;AAAA,MAAK,GAAK,EAAA,MAAA;AAAA,MAAQ,KAAO,EAAA,EAAA;AAAA,MAAI,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"../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js";import O from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js";import{EToolName as s}from"../../../../../data/enums/ToolType.js";import w from"./rectToolShortCutTable/index.js";import I from"./point/index.js";import k from"./polygon/index.js";import N from"./line/index.js";import H from"./tag/index.js";import R from"./text/index.js";import K from"./videoTag/index.js";import L,{pointCloudShortCutTable_POLYGON as V}from"./pointCloud/index.js";import G from"./scribble/index.js";import{footerCls as $}from"../../index.js";import{useTranslation as W}from"react-i18next";import{cTool as Y}from"@labelbee/lb-annotation";import{PointCloudContext as A}from"../../../../../components/pointCloudView/PointCloudContext.js";import B from"../../FooterPopover.js";var F=Object.defineProperty,h=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,C=(o,r,t)=>r in o?F(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,M=(o,r)=>{for(var t in r||(r={}))z.call(r,t)&&C(o,t,r[t]);if(h)for(var t of h(r))D.call(r,t)&&C(o,t,r[t]);return o};const{EVideoToolName:U,EPointCloudName:y}=Y,d={[s.Rect]:w,[s.Tag]:H,[s.Point]:I,[s.Polygon]:k,[s.Line]:N,[s.Text]:R,[U.VideoTagTool]:K,[y.PointCloud]:L,[y.PointCloud+"_POLYGON"]:V,[s.ScribbleTool]:G},q=({icon:o})=>typeof o=="string"?e.createElement("img",{width:16,height:16,src:o}):o||null,T=({title:o,style:r,shortCutList:t})=>{const{t:m}=W(),p={width:320,display:"flex",justifyContent:"space-between",margin:16},i={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},E=(l,c)=>e.createElement("div",{style:p,key:c},e.createElement("span",{style:{display:"flex",alignItems:"center"}},e.createElement(q,{icon:l.icon}),e.createElement("span",{style:{marginLeft:l.icon?16:0}},m(l.name))),e.createElement("span",{style:{display:"flex",alignItems:"center"}},l.noticeInfo&&e.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},m(l.noticeInfo)),b(l.shortCut,l.shortCutUseHtml,l.linkSymbol))),b=(l,c=!1,_="+")=>{if(!l)return null;const S=l.map((n,a)=>{var f,g;const u={display:"flex",alignItems:"center"};return c?e.createElement("span",{key:a,style:u},e.createElement("span",{style:i,dangerouslySetInnerHTML:{__html:n}})):a<l.length-1?typeof n=="number"?e.createElement("span",{key:a,style:u},e.createElement("span",{style:i},n),e.createElement("span",{style:{marginRight:"3px"}},"~")):((f=n==null?void 0:n.startsWith)==null?void 0:f.call(n,"data"))?e.createElement("span",{key:a,style:u},e.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:n})),e.createElement("span",{style:{marginRight:"3px"}},"+")):e.createElement("span",{key:a,style:u},e.createElement("span",{style:i},n),e.createElement("span",{style:{marginRight:"3px"}},_)):typeof n=="number"?e.createElement("span",{key:a,style:u},e.createElement("span",{style:i},n)):((g=n==null?void 0:n.startsWith)==null?void 0:g.call(n,"data"))?e.createElement("span",{className:"shortCutButton",key:a,style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:n})):e.createElement("span",{style:i,key:a},n)});return e.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},S)},x=e.createElement("div",{className:`${$}__hotkey-content`},t==null?void 0:t.map((l,c)=>E(l,c))),v=r||{};return e.createElement(B,{hoverIcon:O,icon:j,title:m("Hotkeys"),content:x,containerStyle:v})},J=({style:o,title:r,toolName:t})=>{const{pointCloudPattern:m}=P(A);if(!t||!d[t])return null;let p=t;p===`${y.PointCloud}`&&m===s.Polygon&&(p+="_POLYGON");const i={style:o,title:r,shortCutList:d[p]};return e.createElement(T,M({},i))};export{T as ToolHotKeyCom,J as default,d as shortCutTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/views/MainView/toolFooter/FooterTips/ToolHotKey/index.tsx"],"sourcesContent":["import { Popover } from 'antd/es';\nimport _ from 'lodash';\nimport React, { useContext, useState } from 'react';\n\nimport hotKeySvg from '@/assets/annotation/toolHotKeyIcon/icon_kj1.svg';\nimport hotKeyHoverSvg from '@/assets/annotation/toolHotKeyIcon/icon_kj_h.svg';\nimport { EToolName } from '@/data/enums/ToolType';\nimport rectToolShortcutTable from './rectToolShortCutTable';\nimport pointToolShortcutTable from './point';\nimport polygonToolShortcutTable from './polygon';\nimport lineToolShortCutTable from './line';\nimport tagToolSingleShortCutTable from './tag';\nimport textToolShortCutTable from './text';\nimport videoToolShortCutTable from './videoTag';\nimport pointCloudShortCutTable, { pointCloudShortCutTable_POLYGON } from './pointCloud';\nimport scribbleShortCutTable from './scribble';\n\nimport { footerCls } from '../../index';\nimport { useTranslation } from 'react-i18next';\nimport { cTool } from '@labelbee/lb-annotation';\nimport { PointCloudContext } from '@/components/pointCloudView/PointCloudContext';\n\nconst { EVideoToolName, EPointCloudName } = cTool;\n\ninterface IProps {\n toolName?: string;\n style?: any;\n title?: React.ReactElement<any>;\n}\n\ninterface IShortCutInfo {\n name: string;\n icon?: string;\n shortCut?: string[];\n noticeInfo?: string;\n}\n\ninterface IComponentsProps {\n style?: any;\n title?: React.ReactElement<any>;\n shortCutList: IShortCutInfo[];\n}\n\nexport const shortCutTable: { [a: string]: IShortCutInfo[] } = {\n [EToolName.Rect]: rectToolShortcutTable,\n [EToolName.Tag]: tagToolSingleShortCutTable,\n [EToolName.Point]: pointToolShortcutTable,\n [EToolName.Polygon]: polygonToolShortcutTable,\n [EToolName.Line]: lineToolShortCutTable,\n [EToolName.Text]: textToolShortCutTable,\n [EVideoToolName.VideoTagTool]: videoToolShortCutTable,\n [EPointCloudName.PointCloud]: pointCloudShortCutTable,\n [EPointCloudName.PointCloud + '_POLYGON']: pointCloudShortCutTable_POLYGON,\n [EToolName.ScribbleTool]: scribbleShortCutTable,\n};\n\nconst ToolHotKeyIcon = ({ icon }: { icon: React.ReactElement | string }) => {\n if (typeof icon === 'string') {\n return <img width={16} height={16} src={icon} />;\n }\n\n if (icon) {\n return icon;\n }\n\n return null;\n};\n\nexport const ToolHotKeyCom: React.FC<IComponentsProps> = ({ title, style, shortCutList }) => {\n const [svgFlag, setFlag] = useState(false);\n const { t } = useTranslation();\n\n const shortCutStyle = {\n width: 320,\n display: 'flex',\n justifyContent: 'space-between',\n margin: 16,\n };\n\n const shortCutNameStyles: React.CSSProperties = {\n display: 'block',\n padding: '0 3px',\n minWidth: '20px',\n marginRight: '3px',\n border: '1px solid rgba(204,204,204,1)',\n verticalAlign: 'middle',\n fontSize: '12px',\n textAlign: 'center',\n };\n\n const setHotKey = (info: any, index: number) => (\n <div style={shortCutStyle} key={index}>\n <span style={{ display: 'flex', alignItems: 'center' }}>\n <ToolHotKeyIcon icon={info.icon} />\n <span style={{ marginLeft: info.icon ? 16 : 0 }}>{t(info.name)}</span>\n </span>\n <span style={{ display: 'flex', alignItems: 'center' }}>\n {info.noticeInfo && (\n <span style={{ marginRight: '5px', color: '#CCCCCC' }}>{t(info.noticeInfo)}</span>\n )}\n {setSVG(info.shortCut, info.shortCutUseHtml, info.linkSymbol)}\n </span>\n </div>\n );\n\n const setSVG = (list: any[], useDangerInnerHtml = false, linkSymbol = '+') => {\n if (!list) {\n return null;\n }\n const listDom = list.map((item, index) => {\n const wrapperStyle = { display: 'flex', alignItems: 'center' };\n\n if (useDangerInnerHtml) {\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles} dangerouslySetInnerHTML={{ __html: item }} />\n </span>\n );\n }\n\n if (index < list.length - 1) {\n if (typeof item === 'number') {\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles}>{item}</span>\n <span style={{ marginRight: '3px' }}>~</span>\n </span>\n );\n }\n\n if (item?.startsWith?.('data')) {\n return (\n <span key={index} style={wrapperStyle}>\n <span className='shortCutButton' style={{ marginRight: '3px' }}>\n <img width={16} height={23} src={item} />\n </span>\n <span style={{ marginRight: '3px' }}>+</span>\n </span>\n );\n }\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles}>{item}</span>\n <span style={{ marginRight: '3px' }}>{linkSymbol}</span>\n </span>\n );\n }\n\n if (typeof item === 'number') {\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles}>{item}</span>\n </span>\n );\n }\n if (item?.startsWith?.('data')) {\n return (\n <span className='shortCutButton' key={index} style={{ marginRight: '3px' }}>\n <img width={16} height={23} src={item} />\n </span>\n );\n }\n return (\n <span style={shortCutNameStyles} key={index}>\n {item}\n </span>\n );\n });\n return (\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-around',\n alignItems: 'center',\n }}\n >\n {listDom}\n </div>\n );\n };\n\n const content = (\n <div className={`${footerCls}__hotkey-content`}>\n {shortCutList?.map((info: any, index: number) => setHotKey(info, index))}\n </div>\n );\n const containerStyle = style || { width: 100 };\n\n return (\n // @ts-ignore\n <Popover\n placement='topLeft'\n content={content}\n // @ts-ignore\n onMouseMove={() => setFlag(true)}\n onMouseLeave={() => {\n setFlag(false);\n }}\n overlayClassName='tool-hotkeys-popover'\n className='tipsBar'\n // visible={svgFlag}\n >\n <div\n className='shortCutTitle'\n onMouseMove={() => setFlag(true)}\n onMouseLeave={() => setFlag(false)}\n style={containerStyle}\n >\n {title ?? (\n <a className='svg'>\n <img\n src={svgFlag ? hotKeyHoverSvg : hotKeySvg}\n width={15}\n height={13}\n style={{ marginRight: '5px' }}\n />\n\n {t('Hotkeys')}\n </a>\n )}\n </div>\n </Popover>\n );\n};\n\nconst ToolHotKey: React.FC<IProps> = ({ style, title, toolName }) => {\n const { pointCloudPattern } = useContext(PointCloudContext);\n if (!toolName) {\n return null;\n }\n\n // 不存在对应的工具则不展示的快捷键\n if (!shortCutTable[toolName]) {\n return null;\n }\n\n let newToolName = toolName;\n if (newToolName === `${EPointCloudName.PointCloud}` && pointCloudPattern === EToolName.Polygon) {\n newToolName += '_POLYGON';\n }\n\n const props = {\n style,\n title,\n shortCutList: shortCutTable[newToolName],\n };\n\n return <ToolHotKeyCom {...props} />;\n};\n\nexport default ToolHotKey;\n"],"names":["pointToolShortcutTable","polygonToolShortcutTable","videoToolShortCutTable","hotKeyHoverSvg","hotKeySvg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,CAAE,gBAAgB,eAAoB,CAAA,GAAA,KAAA,CAAA;AAqBrC,MAAM,aAAkD,GAAA;AAAA,EAAA,CAC5D,UAAU,IAAO,GAAA,qBAAA;AAAA,EAAA,CACjB,UAAU,GAAM,GAAA,0BAAA;AAAA,EAAA,CAChB,UAAU,KAAQ,GAAAA,sBAAA;AAAA,EAAA,CAClB,UAAU,OAAU,GAAAC,wBAAA;AAAA,EAAA,CACpB,UAAU,IAAO,GAAA,qBAAA;AAAA,EAAA,CACjB,UAAU,IAAO,GAAA,qBAAA;AAAA,EAAA,CACjB,eAAe,YAAe,GAAAC,yBAAA;AAAA,EAAA,CAC9B,gBAAgB,UAAa,GAAA,uBAAA;AAAA,EAC7B,CAAA,eAAA,CAAgB,aAAa,UAAa,GAAA,+BAAA;AAAA,EAAA,CAC1C,UAAU,YAAe,GAAA,qBAAA;AAAA,EAAA;AAG5B,MAAM,cAAA,GAAiB,CAAC,CAAE,IAAkD,CAAA,KAAA;AAC1E,EAAI,IAAA,OAAO,SAAS,QAAU,EAAA;AAC5B,IAAA,2CAAQ,KAAD,EAAA;AAAA,MAAK,KAAO,EAAA,EAAA;AAAA,MAAI,MAAQ,EAAA,EAAA;AAAA,MAAI,GAAK,EAAA,IAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA;AAG1C,EAAA,IAAI,IAAM,EAAA;AACR,IAAO,OAAA,IAAA,CAAA;AAAA,GAAA;AAGT,EAAO,OAAA,IAAA,CAAA;AAAA,CAAA,CAAA;AAGF,MAAM,aAA4C,GAAA,CAAC,CAAE,KAAA,EAAO,OAAO,YAAmB,CAAA,KAAA;AAC3F,EAAM,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,CAAA;AAAA,GAAA;AAGT,EAAA,IAAI,WAAc,GAAA,QAAA,CAAA;AAClB,EAAA,IAAI,gBAAgB,CAAG,EAAA,eAAA,CAAgB,UAAgB,CAAA,CAAA,IAAA,iBAAA,KAAsB,UAAU,OAAS,EAAA;AAC9F,IAAe,WAAA,IAAA,UAAA,CAAA;AAAA,GAAA;AAGjB,EAAA,MAAM,KAAQ,GAAA;AAAA,IACZ,KAAA;AAAA,IACA,KAAA;AAAA,IACA,cAAc,aAAc,CAAA,WAAA,CAAA;AAAA,GAAA,CAAA;AAG9B,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,eAAD,cAAmB,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/views/MainView/toolFooter/FooterTips/ToolHotKey/index.tsx"],"sourcesContent":["import _ from 'lodash';\nimport React, { useContext } from 'react';\n\nimport hotKeySvg from '@/assets/annotation/toolHotKeyIcon/icon_kj1.svg';\nimport hotKeyHoverSvg from '@/assets/annotation/toolHotKeyIcon/icon_kj_h.svg';\nimport { EToolName } from '@/data/enums/ToolType';\nimport rectToolShortcutTable from './rectToolShortCutTable';\nimport pointToolShortcutTable from './point';\nimport polygonToolShortcutTable from './polygon';\nimport lineToolShortCutTable from './line';\nimport tagToolSingleShortCutTable from './tag';\nimport textToolShortCutTable from './text';\nimport videoToolShortCutTable from './videoTag';\nimport pointCloudShortCutTable, { pointCloudShortCutTable_POLYGON } from './pointCloud';\nimport scribbleShortCutTable from './scribble';\n\nimport { footerCls } from '../../index';\nimport { useTranslation } from 'react-i18next';\nimport { cTool } from '@labelbee/lb-annotation';\nimport { PointCloudContext } from '@/components/pointCloudView/PointCloudContext';\nimport FooterPopover from '@/views/MainView/toolFooter/FooterPopover';\n\nconst { EVideoToolName, EPointCloudName } = cTool;\n\ninterface IProps {\n toolName?: string;\n style?: any;\n title?: React.ReactElement<any>;\n}\n\ninterface IShortCutInfo {\n name: string;\n icon?: string;\n shortCut?: string[];\n noticeInfo?: string;\n}\n\ninterface IComponentsProps {\n style?: any;\n title?: React.ReactElement<any>;\n shortCutList: IShortCutInfo[];\n}\n\nexport const shortCutTable: { [a: string]: IShortCutInfo[] } = {\n [EToolName.Rect]: rectToolShortcutTable,\n [EToolName.Tag]: tagToolSingleShortCutTable,\n [EToolName.Point]: pointToolShortcutTable,\n [EToolName.Polygon]: polygonToolShortcutTable,\n [EToolName.Line]: lineToolShortCutTable,\n [EToolName.Text]: textToolShortCutTable,\n [EVideoToolName.VideoTagTool]: videoToolShortCutTable,\n [EPointCloudName.PointCloud]: pointCloudShortCutTable,\n [EPointCloudName.PointCloud + '_POLYGON']: pointCloudShortCutTable_POLYGON,\n [EToolName.ScribbleTool]: scribbleShortCutTable,\n};\n\nconst ToolHotKeyIcon = ({ icon }: { icon: React.ReactElement | string }) => {\n if (typeof icon === 'string') {\n return <img width={16} height={16} src={icon} />;\n }\n\n if (icon) {\n return icon;\n }\n\n return null;\n};\n\nexport const ToolHotKeyCom: React.FC<IComponentsProps> = ({ title, style, shortCutList }) => {\n const { t } = useTranslation();\n\n const shortCutStyle = {\n width: 320,\n display: 'flex',\n justifyContent: 'space-between',\n margin: 16,\n };\n\n const shortCutNameStyles: React.CSSProperties = {\n display: 'block',\n padding: '0 3px',\n minWidth: '20px',\n marginRight: '3px',\n border: '1px solid rgba(204,204,204,1)',\n verticalAlign: 'middle',\n fontSize: '12px',\n textAlign: 'center',\n };\n\n const setHotKey = (info: any, index: number) => (\n <div style={shortCutStyle} key={index}>\n <span style={{ display: 'flex', alignItems: 'center' }}>\n <ToolHotKeyIcon icon={info.icon} />\n <span style={{ marginLeft: info.icon ? 16 : 0 }}>{t(info.name)}</span>\n </span>\n <span style={{ display: 'flex', alignItems: 'center' }}>\n {info.noticeInfo && (\n <span style={{ marginRight: '5px', color: '#CCCCCC' }}>{t(info.noticeInfo)}</span>\n )}\n {setSVG(info.shortCut, info.shortCutUseHtml, info.linkSymbol)}\n </span>\n </div>\n );\n\n const setSVG = (list: any[], useDangerInnerHtml = false, linkSymbol = '+') => {\n if (!list) {\n return null;\n }\n const listDom = list.map((item, index) => {\n const wrapperStyle = { display: 'flex', alignItems: 'center' };\n\n if (useDangerInnerHtml) {\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles} dangerouslySetInnerHTML={{ __html: item }} />\n </span>\n );\n }\n\n if (index < list.length - 1) {\n if (typeof item === 'number') {\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles}>{item}</span>\n <span style={{ marginRight: '3px' }}>~</span>\n </span>\n );\n }\n\n if (item?.startsWith?.('data')) {\n return (\n <span key={index} style={wrapperStyle}>\n <span className='shortCutButton' style={{ marginRight: '3px' }}>\n <img width={16} height={23} src={item} />\n </span>\n <span style={{ marginRight: '3px' }}>+</span>\n </span>\n );\n }\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles}>{item}</span>\n <span style={{ marginRight: '3px' }}>{linkSymbol}</span>\n </span>\n );\n }\n\n if (typeof item === 'number') {\n return (\n <span key={index} style={wrapperStyle}>\n <span style={shortCutNameStyles}>{item}</span>\n </span>\n );\n }\n if (item?.startsWith?.('data')) {\n return (\n <span className='shortCutButton' key={index} style={{ marginRight: '3px' }}>\n <img width={16} height={23} src={item} />\n </span>\n );\n }\n return (\n <span style={shortCutNameStyles} key={index}>\n {item}\n </span>\n );\n });\n return (\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-around',\n alignItems: 'center',\n }}\n >\n {listDom}\n </div>\n );\n };\n\n const content = (\n <div className={`${footerCls}__hotkey-content`}>\n {shortCutList?.map((info: any, index: number) => setHotKey(info, index))}\n </div>\n );\n const containerStyle = style || {};\n\n return (\n <FooterPopover\n hoverIcon={hotKeyHoverSvg}\n icon={hotKeySvg}\n title={t('Hotkeys')}\n content={content}\n containerStyle={containerStyle}\n />\n );\n};\n\nconst ToolHotKey: React.FC<IProps> = ({ style, title, toolName }) => {\n const { pointCloudPattern } = useContext(PointCloudContext);\n if (!toolName) {\n return null;\n }\n\n // 不存在对应的工具则不展示的快捷键\n if (!shortCutTable[toolName]) {\n return null;\n }\n\n let newToolName = toolName;\n if (newToolName === `${EPointCloudName.PointCloud}` && pointCloudPattern === EToolName.Polygon) {\n newToolName += '_POLYGON';\n }\n\n const props = {\n style,\n title,\n shortCutList: shortCutTable[newToolName],\n };\n\n return <ToolHotKeyCom {...props} />;\n};\n\nexport default ToolHotKey;\n"],"names":["pointToolShortcutTable","polygonToolShortcutTable","videoToolShortCutTable","hotKeyHoverSvg","hotKeySvg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,CAAE,gBAAgB,eAAoB,CAAA,GAAA,KAAA,CAAA;AAqBrC,MAAM,aAAkD,GAAA;AAAA,EAAA,CAC5D,UAAU,IAAO,GAAA,qBAAA;AAAA,EAAA,CACjB,UAAU,GAAM,GAAA,0BAAA;AAAA,EAAA,CAChB,UAAU,KAAQ,GAAAA,sBAAA;AAAA,EAAA,CAClB,UAAU,OAAU,GAAAC,wBAAA;AAAA,EAAA,CACpB,UAAU,IAAO,GAAA,qBAAA;AAAA,EAAA,CACjB,UAAU,IAAO,GAAA,qBAAA;AAAA,EAAA,CACjB,eAAe,YAAe,GAAAC,yBAAA;AAAA,EAAA,CAC9B,gBAAgB,UAAa,GAAA,uBAAA;AAAA,EAC7B,CAAA,eAAA,CAAgB,aAAa,UAAa,GAAA,+BAAA;AAAA,EAAA,CAC1C,UAAU,YAAe,GAAA,qBAAA;AAAA,EAAA;AAG5B,MAAM,cAAA,GAAiB,CAAC,CAAE,IAAkD,CAAA,KAAA;AAC1E,EAAI,IAAA,OAAO,SAAS,QAAU,EAAA;AAC5B,IAAA,2CAAQ,KAAD,EAAA;AAAA,MAAK,KAAO,EAAA,EAAA;AAAA,MAAI,MAAQ,EAAA,EAAA;AAAA,MAAI,GAAK,EAAA,IAAA;AAAA,KAAA,CAA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import{PageBackward as g,PageForward as x,PageJump as b}from"../../../store/annotation/actionCreators.js";import{getTotalPage as k}from"../../../store/annotation/reducer.js";import{Divider as B}from"antd/es";import e from"react";import{useTranslation as A}from"react-i18next";import{connect as S}from"react-redux";import{LabelBeeContext as w,useDispatch as D}from"../../../store/ctx.js";import T from"./FooterTips/index.js";import H from"./HiddenTips/index.js";import R from"./PageNumber/index.js";import $ from"./ZoomController/index.js";import{Pagination as J}from"./Pagination.js";import{AnnotatedAttributesIcon as P}from"./AnnotatedAttributes/index.js";import{cTool as K}from"@labelbee/lb-annotation";import{shortCutTable as Z,ToolHotKeyCom as z}from"./FooterTips/ToolHotKey/index.js";const{EPointCloudName:_}=K,l=`${N}-footer`,E=()=>e.createElement(B,{type:"vertical",style:{background:"rgba(153, 153, 153, 1)",height:"16px"}}),I=({footerTips:t,hiddenTips:a,pageNumber:s,pagination:m,zoomController:i,curItems:c,footerDivider:u,annotateAttrList:o})=>e.createElement(e.Fragment,null,t,o,e.createElement("div",{style:{flex:1}}),a,s,m,c,u,i),q=t=>{var a;const{stepList:s,step:m,basicResultList:i,basicIndex:c,mode:u="light",footer:o=I,skipBeforePageTurning:n}=t,r=D(),{t:j}=A(),d=(a=s[m-1])!=null?a:{},y=!!d.dataSourceStep,h=()=>{if(n){n(()=>r(g()));return}r(g())},v=()=>{if(n){n(()=>r(x()));return}r(x())},C=L=>{const f=~~L-1;if(n){n(()=>r(b(f)));return}r(b(f))},p=e.createElement(J,{imgIndex:t.imgIndex,totalPage:t.totalPage,pageJump:C,pageBackward:h,pageForward:v,footerCls:l}),F=y&&i.length>0?e.createElement("span",null,j("curItems",{current:c+1,total:i.length})):null;return typeof o=="function"?o===I&&d.tool===_.PointCloud?e.createElement("div",{className:`${l}`,style:t.style},e.createElement(T,null),e.createElement(P,null),e.createElement("div",{style:{flex:1}}),p):e.createElement("div",{className:`${l}`,style:t.style},o({footerTips:e.createElement(T,null),hiddenTips:e.createElement(H,null),pageNumber:e.createElement(R,null),annotateAttrList:e.createElement(P,null),pagination:p,zoomController:e.createElement($,{mode:u}),curItems:F,footerDivider:e.createElement(E,null),shortCutTable:Z,ToolHotKeyCom:z})):o},G=t=>({totalPage:k(t.annotation),imgIndex:t.annotation.imgIndex,stepList:t.annotation.stepList,step:t.annotation.step,basicIndex:t.annotation.basicIndex,basicResultList:t.annotation.basicResultList,skipBeforePageTurning:t.annotation.skipBeforePageTurning});var M=S(G,null,null,{context:w})(q);export{E as FooterDivider,M as default,l as footerCls};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/views/MainView/toolFooter/index.tsx"],"sourcesContent":["import { prefix } from '@/constant';\nimport { AppState } from '@/store';\nimport { PageBackward, PageForward, PageJump } from '@/store/annotation/actionCreators';\nimport { getTotalPage } from '@/store/annotation/reducer';\nimport { RenderFooter } from '@/types/main';\nimport { IStepInfo } from '@/types/step';\nimport { Divider } from 'antd/es';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { connect } from 'react-redux';\nimport { useDispatch, LabelBeeContext } from '@/store/ctx';\nimport FooterTips from './FooterTips';\nimport HiddenTips from './HiddenTips';\nimport PageNumber from './PageNumber';\nimport ZoomController from './ZoomController';\nimport { Pagination } from './Pagination';\nimport { cTool } from '@labelbee/lb-annotation';\nimport { shortCutTable, ToolHotKeyCom } from './FooterTips/ToolHotKey';\n\nconst { EPointCloudName } = cTool;\n\nexport type FooterTheme = 'light' | 'dark';\ninterface IProps {\n totalPage: number;\n imgIndex: number;\n style?: { [key: string]: any };\n stepList: IStepInfo[];\n step: number;\n basicResultList: any[];\n basicIndex: number;\n mode?: FooterTheme; // 后面通过 context 的形式进行编写\n footer?: RenderFooter;\n\n skipBeforePageTurning?: (pageTurning: Function) => void;\n}\n\nexport const footerCls = `${prefix}-footer`;\n\nexport const FooterDivider = () => (\n <Divider type='vertical' style={{ background: 'rgba(153, 153, 153, 1)', height: '16px' }} />\n);\n\n/**\n * default footer renderer\n * @param param0\n * @returns\n */\nconst renderFooter: RenderFooter = ({\n footerTips,\n hiddenTips,\n pageNumber,\n pagination,\n zoomController,\n curItems,\n footerDivider,\n}) => {\n return (\n <>\n {footerTips}\n <div style={{ flex: 1 }} />\n {hiddenTips}\n {pageNumber}\n {pagination}\n {curItems}\n {footerDivider}\n {zoomController}\n </>\n );\n};\n\nconst ToolFooter: React.FC<IProps> = (props: IProps) => {\n const {\n stepList,\n step,\n basicResultList,\n basicIndex,\n mode = 'light',\n footer = renderFooter,\n skipBeforePageTurning,\n } = props;\n\n const dispatch = useDispatch();\n const { t } = useTranslation();\n const stepInfo = stepList[step - 1] ?? {};\n const hasSourceStep = !!stepInfo.dataSourceStep;\n\n const pageBackward = () => {\n if (skipBeforePageTurning) {\n skipBeforePageTurning(() => dispatch(PageBackward()));\n return;\n }\n\n dispatch(PageBackward());\n };\n\n const pageForward = () => {\n if (skipBeforePageTurning) {\n skipBeforePageTurning(() => dispatch(PageForward()));\n return;\n }\n dispatch(PageForward());\n };\n\n const toPageNumber = (page: string) => {\n const imgIndex = ~~page - 1;\n if (skipBeforePageTurning) {\n skipBeforePageTurning(() => dispatch(PageJump(imgIndex)));\n return;\n }\n dispatch(PageJump(imgIndex));\n };\n\n const pagination = (\n <Pagination\n imgIndex={props.imgIndex}\n totalPage={props.totalPage}\n pageJump={toPageNumber}\n pageBackward={pageBackward}\n pageForward={pageForward}\n footerCls={footerCls}\n />\n );\n\n const curItems =\n hasSourceStep && basicResultList.length > 0 ? (\n <span>{t('curItems', { current: basicIndex + 1, total: basicResultList.length })}</span>\n ) : null;\n\n if (typeof footer === 'function') {\n if (footer === renderFooter && stepInfo.tool === EPointCloudName.PointCloud) {\n return (\n <div className={`${footerCls}`} style={props.style}>\n <FooterTips />\n <div style={{ flex: 1 }} />\n {pagination}\n </div>\n );\n }\n\n return (\n <div className={`${footerCls}`} style={props.style}>\n {footer({\n footerTips: <FooterTips />,\n hiddenTips: <HiddenTips />,\n pageNumber: <PageNumber />,\n pagination,\n zoomController: <ZoomController mode={mode} />,\n curItems,\n footerDivider: <FooterDivider />,\n shortCutTable,\n ToolHotKeyCom,\n })}\n </div>\n );\n }\n\n return footer;\n};\n\nconst mapStateToProps = (state: AppState) => ({\n totalPage: getTotalPage(state.annotation),\n imgIndex: state.annotation.imgIndex,\n stepList: state.annotation.stepList,\n step: state.annotation.step,\n basicIndex: state.annotation.basicIndex,\n basicResultList: state.annotation.basicResultList,\n skipBeforePageTurning: state.annotation.skipBeforePageTurning,\n});\n\nexport default connect(mapStateToProps, null, null, { context: LabelBeeContext })(ToolFooter);\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/views/MainView/toolFooter/index.tsx"],"sourcesContent":["import { prefix } from '@/constant';\nimport { AppState } from '@/store';\nimport { PageBackward, PageForward, PageJump } from '@/store/annotation/actionCreators';\nimport { getTotalPage } from '@/store/annotation/reducer';\nimport { RenderFooter } from '@/types/main';\nimport { IStepInfo } from '@/types/step';\nimport { Divider } from 'antd/es';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { connect } from 'react-redux';\nimport { useDispatch, LabelBeeContext } from '@/store/ctx';\nimport FooterTips from './FooterTips';\nimport HiddenTips from './HiddenTips';\nimport PageNumber from './PageNumber';\nimport ZoomController from './ZoomController';\nimport { Pagination } from './Pagination';\nimport { AnnotatedAttributesIcon } from './AnnotatedAttributes';\nimport { cTool } from '@labelbee/lb-annotation';\nimport { shortCutTable, ToolHotKeyCom } from './FooterTips/ToolHotKey';\n\nconst { EPointCloudName } = cTool;\n\nexport type FooterTheme = 'light' | 'dark';\ninterface IProps {\n totalPage: number;\n imgIndex: number;\n style?: { [key: string]: any };\n stepList: IStepInfo[];\n step: number;\n basicResultList: any[];\n basicIndex: number;\n mode?: FooterTheme; // 后面通过 context 的形式进行编写\n footer?: RenderFooter;\n\n skipBeforePageTurning?: (pageTurning: Function) => void;\n}\n\nexport const footerCls = `${prefix}-footer`;\n\nexport const FooterDivider = () => (\n <Divider type='vertical' style={{ background: 'rgba(153, 153, 153, 1)', height: '16px' }} />\n);\n\n/**\n * default footer renderer\n * @param param0\n * @returns\n */\nconst renderFooter: RenderFooter = ({\n footerTips,\n hiddenTips,\n pageNumber,\n pagination,\n zoomController,\n curItems,\n footerDivider,\n annotateAttrList,\n}) => {\n return (\n <>\n {footerTips}\n {annotateAttrList}\n <div style={{ flex: 1 }} />\n {hiddenTips}\n {pageNumber}\n {pagination}\n {curItems}\n {footerDivider}\n {zoomController}\n </>\n );\n};\n\nconst ToolFooter: React.FC<IProps> = (props: IProps) => {\n const {\n stepList,\n step,\n basicResultList,\n basicIndex,\n mode = 'light',\n footer = renderFooter,\n skipBeforePageTurning,\n } = props;\n\n const dispatch = useDispatch();\n const { t } = useTranslation();\n const stepInfo = stepList[step - 1] ?? {};\n const hasSourceStep = !!stepInfo.dataSourceStep;\n\n const pageBackward = () => {\n if (skipBeforePageTurning) {\n skipBeforePageTurning(() => dispatch(PageBackward()));\n return;\n }\n\n dispatch(PageBackward());\n };\n\n const pageForward = () => {\n if (skipBeforePageTurning) {\n skipBeforePageTurning(() => dispatch(PageForward()));\n return;\n }\n dispatch(PageForward());\n };\n\n const toPageNumber = (page: string) => {\n const imgIndex = ~~page - 1;\n if (skipBeforePageTurning) {\n skipBeforePageTurning(() => dispatch(PageJump(imgIndex)));\n return;\n }\n dispatch(PageJump(imgIndex));\n };\n\n const pagination = (\n <Pagination\n imgIndex={props.imgIndex}\n totalPage={props.totalPage}\n pageJump={toPageNumber}\n pageBackward={pageBackward}\n pageForward={pageForward}\n footerCls={footerCls}\n />\n );\n\n const curItems =\n hasSourceStep && basicResultList.length > 0 ? (\n <span>{t('curItems', { current: basicIndex + 1, total: basicResultList.length })}</span>\n ) : null;\n\n if (typeof footer === 'function') {\n if (footer === renderFooter && stepInfo.tool === EPointCloudName.PointCloud) {\n return (\n <div className={`${footerCls}`} style={props.style}>\n <FooterTips />\n <AnnotatedAttributesIcon />\n <div style={{ flex: 1 }} />\n {pagination}\n </div>\n );\n }\n\n return (\n <div className={`${footerCls}`} style={props.style}>\n {footer({\n footerTips: <FooterTips />,\n hiddenTips: <HiddenTips />,\n pageNumber: <PageNumber />,\n annotateAttrList: <AnnotatedAttributesIcon />,\n pagination,\n zoomController: <ZoomController mode={mode} />,\n curItems,\n footerDivider: <FooterDivider />,\n shortCutTable,\n ToolHotKeyCom,\n })}\n </div>\n );\n }\n\n return footer;\n};\n\nconst mapStateToProps = (state: AppState) => ({\n totalPage: getTotalPage(state.annotation),\n imgIndex: state.annotation.imgIndex,\n stepList: state.annotation.stepList,\n step: state.annotation.step,\n basicIndex: state.annotation.basicIndex,\n basicResultList: state.annotation.basicResultList,\n skipBeforePageTurning: state.annotation.skipBeforePageTurning,\n});\n\nexport default connect(mapStateToProps, null, null, { context: LabelBeeContext })(ToolFooter);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,CAAE,eAAoB,CAAA,GAAA,KAAA,CAAA;AAiBrB,MAAM,YAAY,CAAG,EAAA,MAAA,CAAA,OAAA,EAAA;AAEf,MAAA,aAAA,GAAgB,sBAC3B,KAAA,CAAA,aAAA,CAAC,OAAD,EAAA;AAAA,EAAS,IAAK,EAAA,UAAA;AAAA,EAAW,KAAO,EAAA,CAAE,UAAY,EAAA,wBAAA,EAA0B,MAAQ,EAAA,MAAA,CAAA;AAAA,CAAA,EAAA;AAQlF,MAAM,eAA6B,CAAC;AAAA,EAClC,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,CACI,KAAA;AACJ,EAAA,uBAEK,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EACA,gBACD,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAD,EAAA;AAAA,IAAK,KAAA,EAAO,CAAE,IAAM,EAAA,CAAA,C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ha.1",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@ant-design/icons": "^4.6.2",
|
|
44
|
-
"@labelbee/lb-annotation": "^1.
|
|
45
|
-
"@labelbee/lb-utils": "^1.
|
|
44
|
+
"@labelbee/lb-annotation": "^1.13.0-alpha.1",
|
|
45
|
+
"@labelbee/lb-utils": "^1.6.0-alpha.1",
|
|
46
46
|
"ahooks": "^3.4.0",
|
|
47
47
|
"classnames": "^2.3.0",
|
|
48
48
|
"lodash": "^4.17.21",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"path": "node_modules/cz-conventional-changelog"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "1e5c54dfbf628db07eb8f06afb5dd8b5f8b67296"
|
|
101
101
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var img = "data:image/svg+xml,%3c%3fxml version='1.0' standalone='no'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' class='icon' viewBox='0 0 1024 1024'%3e %3cpath d='M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z'/%3e%3c/svg%3e";
|
|
2
|
-
|
|
3
|
-
export { img as default };
|
|
4
|
-
//# sourceMappingURL=icon_copyBackwardResult.svg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_copyBackwardResult.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3c%3fxml version='1.0' standalone='no'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' class='icon' viewBox='0 0 1024 1024'%3e %3cpath d='M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="12.004" height="11.999" viewBox="0 0 12.004 11.999">
|
|
2
|
-
<defs>
|
|
3
|
-
<style>
|
|
4
|
-
.cls-1 {
|
|
5
|
-
fill: #999;
|
|
6
|
-
}
|
|
7
|
-
</style>
|
|
8
|
-
</defs>
|
|
9
|
-
<path id="icon_clearSmall" class="cls-1" d="M17526.469-1204.464l-.678-.678,1.752-1.751a.489.489,0,0,0-.006-.691.482.482,0,0,0-.689,0l-1.752,1.751-1.039-1.043,1.752-1.751a.484.484,0,0,0,0-.691.489.489,0,0,0-.7,0l-1.752,1.751-1.037-1.038,1.75-1.756a.484.484,0,0,0,0-.691.482.482,0,0,0-.689,0l-1.752,1.751-.682-.678a1,1,0,0,1,0-1.417l3.1-3.1a.972.972,0,0,1,0-1.384.981.981,0,0,1,1.387,0l2.422,2.422,1.736-1.732a1.47,1.47,0,0,1,2.076,0,1.476,1.476,0,0,1,0,2.081l-1.73,1.731,2.426,2.427a.98.98,0,0,1,0,1.386.985.985,0,0,1-1.391,0l-3.1,3.1a.989.989,0,0,1-.707.294A.987.987,0,0,1,17526.469-1204.464Z" transform="translate(-17520.656 1216.17)"/>
|
|
10
|
-
</svg>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="12.004" height="11.999" viewBox="0 0 12.004 11.999">
|
|
2
|
-
<defs>
|
|
3
|
-
<style>
|
|
4
|
-
.cls-1 {
|
|
5
|
-
fill: #666fff;
|
|
6
|
-
}
|
|
7
|
-
</style>
|
|
8
|
-
</defs>
|
|
9
|
-
<path id="icon_clearSmall_a" class="cls-1" d="M17526.469-1204.464l-.678-.678,1.752-1.751a.489.489,0,0,0-.006-.691.482.482,0,0,0-.689,0l-1.752,1.751-1.039-1.043,1.752-1.751a.484.484,0,0,0,0-.691.489.489,0,0,0-.7,0l-1.752,1.751-1.037-1.038,1.75-1.756a.484.484,0,0,0,0-.691.482.482,0,0,0-.689,0l-1.752,1.751-.682-.678a1,1,0,0,1,0-1.417l3.1-3.1a.972.972,0,0,1,0-1.384.981.981,0,0,1,1.387,0l2.422,2.422,1.736-1.732a1.47,1.47,0,0,1,2.076,0,1.476,1.476,0,0,1,0,2.081l-1.73,1.731,2.426,2.427a.98.98,0,0,1,0,1.386.985.985,0,0,1-1.391,0l-3.1,3.1a.989.989,0,0,1-.707.294A.987.987,0,0,1,17526.469-1204.464Z" transform="translate(-17520.656 1216.17)"/>
|
|
10
|
-
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="23.011" viewBox="0 0 21 23.011">
|
|
2
|
-
<defs>
|
|
3
|
-
<style>
|
|
4
|
-
.cls-1 {
|
|
5
|
-
fill: #fff;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.cls-2 {
|
|
9
|
-
filter: url(#形状结合);
|
|
10
|
-
}
|
|
11
|
-
</style>
|
|
12
|
-
<filter id="形状结合" x="0" y="0" width="21" height="23.011" filterUnits="userSpaceOnUse">
|
|
13
|
-
<feOffset dy="1" input="SourceAlpha"/>
|
|
14
|
-
<feGaussianBlur stdDeviation="1.5" result="blur"/>
|
|
15
|
-
<feFlood flood-opacity="0.302"/>
|
|
16
|
-
<feComposite operator="in" in2="blur"/>
|
|
17
|
-
<feComposite in="SourceGraphic"/>
|
|
18
|
-
</filter>
|
|
19
|
-
</defs>
|
|
20
|
-
<g class="cls-2" transform="matrix(1, 0, 0, 1, 0, 0)">
|
|
21
|
-
<path id="形状结合-2" data-name="形状结合" class="cls-1" d="M5.252,13.674,0,7.744H12l-5.251,5.93a1,1,0,0,1-1.5,0ZM0,7.744V1A1,1,0,0,1,1,0H11a1,1,0,0,1,1,1V7.744Z" transform="translate(4.5 3.5)"/>
|
|
22
|
-
</g>
|
|
23
|
-
</svg>
|