@labelbee/lb-components 1.23.0-alpha.2 → 1.23.0-alpha.20
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/App.js +1 -1
- package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/dist/components/LLMToolView/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/components/LLMToolView/utils/data.js +1 -1
- package/dist/components/NLPToolView/index.js +1 -1
- package/dist/components/NLPToolView/textContent/extraMask.js +1 -1
- package/dist/components/NLPToolView/textContent/index.js +1 -1
- package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
- package/dist/components/audioAnnotate/index.js +1 -1
- package/dist/components/audioPlayer/index.js +1 -1
- package/dist/components/longText/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/subAttributeList/index.js +1 -0
- package/dist/index.css +13 -7
- package/dist/store/Actions.js +1 -1
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/App.d.ts +2 -1
- package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
- package/dist/types/components/audioAnnotate/audioContext/index.d.ts +1 -1
- package/dist/types/components/audioPlayer/index.d.ts +3 -1
- package/dist/types/components/longText/index.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +6 -1
- package/dist/types/components/subAttributeList/index.d.ts +9 -0
- package/dist/types/store/Actions.d.ts +1 -0
- package/dist/types/store/annotation/actionCreators.d.ts +3 -2
- package/dist/types/store/annotation/reducer.d.ts +1 -0
- package/dist/types/store/annotation/types.d.ts +9 -2
- package/dist/types/utils/index.d.ts +4 -1
- package/dist/utils/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
- package/dist/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/App.js +1 -1
- package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/es/components/LLMToolView/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/components/LLMToolView/utils/data.js +1 -1
- package/es/components/NLPToolView/index.js +1 -1
- package/es/components/NLPToolView/textContent/extraMask.js +1 -1
- package/es/components/NLPToolView/textContent/index.js +1 -1
- package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
- package/es/components/audioAnnotate/index.js +1 -1
- package/es/components/audioPlayer/index.js +1 -1
- package/es/components/longText/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/index.js +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/subAttributeList/index.js +1 -0
- package/es/index.css +13 -7
- package/es/store/Actions.js +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/utils/index.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
- package/es/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbUtils=require("@labelbee/lb-utils"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),ctx=require("../../store/ctx.js"),actionCreators=require("../../store/annotation/actionCreators.js"),index=require("../../store/annotatedBox/index.js");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbUtils=require("@labelbee/lb-utils"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),ctx=require("../../store/ctx.js"),actionCreators=require("../../store/annotation/actionCreators.js"),index=require("../../store/annotatedBox/index.js"),_=require("lodash");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React),___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,n,i)=>n in o?__defProp(o,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[n]=i,__spreadValues=(o,n)=>{for(var i in n||(n={}))__hasOwnProp.call(n,i)&&__defNormalProp(o,i,n[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(n))__propIsEnum.call(n,i)&&__defNormalProp(o,i,n[i]);return o},__spreadProps=(o,n)=>__defProps(o,__getOwnPropDescs(n)),__async=(o,n,i)=>new Promise((b,y)=>{var L=c=>{try{I(i.next(c))}catch(S){y(S)}},x=c=>{try{I(i.throw(c))}catch(S){y(S)}},I=c=>c.done?b(c.value):Promise.resolve(c.value).then(L,x);I((i=i.apply(o,n)).next())});const pickRectObject=o=>___default.default.pick(o,["id","attribute","width","height","x","y","imageName"]),PointCloudContext=React__default.default.createContext({rectList:[],pointCloudBoxList:[],pointCloudSphereList:[],displayPointCloudList:[],displaySphereList:[],displayLineList:[],polygonList:[],lineList:[],selectedID:"",selectedIDs:[],highlightIDs:[],setHighlightIDs:()=>{},valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudSphereList:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},addHighlightID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>[],addPointCloudSphere:()=>[],setPolygonList:()=>{},setRectList:()=>{},addRectIn2DView:()=>{},removeRectIn2DView:()=>{},updateRectIn2DView:()=>{},setLineList:()=>{},zoom:1,setZoom:()=>{},history:new lbAnnotation.ActionsHistory,hideAttributes:[],setHideAttributes:()=>{},toggleAttributesVisible:()=>{},reRender:()=>{},setAttrPanelLayout:()=>{},attrPanelLayout:"",syncAllViewPointCloudColor:()=>Promise.resolve(),defaultAttribute:"",setDefaultAttribute:()=>{},pointCloudPattern:lbAnnotation.EToolName.Rect,setPointCloudPattern:()=>{},selectSpecAttr:()=>{},globalPattern:lbUtils.EPointCloudPattern.Detection,setGlobalPattern:()=>{},setPtSegmentInstance:()=>{},segmentation:[],setSegmentation:()=>{},clearAllDetectionInstance:()=>{},highlight2DDataList:[],setHighlight2DDataList:()=>{},cuboidBoxIn2DView:!0,setCuboidBoxIn2DView:o=>{},imageSizes:{},cacheImageNodeSize:()=>{}}),PointCloudProvider=({children:o})=>{const[n,i]=React.useState([]),[b,y]=React.useState([]),[L,x]=React.useState([]),[I,c]=React.useState([]),[S,et]=React.useState([]),[v,V]=React.useState([]),[w,R]=React.useState([]),[N,nt]=React.useState(!0),[q,ot]=React.useState(!0),[z,it]=React.useState(1),[r,M]=React.useState(),[G,T]=React.useState(),[F,k]=React.useState(),[s,Z]=React.useState(),[U,st]=React.useState(""),[B,lt]=React.useState(lbAnnotation.EToolName.Rect),rt=React.useRef(new lbAnnotation.ActionsHistory).current,[d,O]=React.useState([]),[J,at]=React.useState(""),[H,ut]=React.useState(lbUtils.EPointCloudPattern.Detection),[C,K]=React.useState(void 0),[E,ct]=React.useState([]),[j,dt]=React.useState([]),p=index(),[Q,pt]=React.useState({}),vt=ctx.useDispatch(),ft=l=>{const{imgNode:a,path:u}=l;u&&a&&pt(P=>__spreadProps(__spreadValues({},P),{[u]:{width:a.width,height:a.height}}))},W=React.useMemo(()=>v.length===1?v[0]:"",[v]),A=React.useMemo(()=>{const l=n.find(t=>t.id===W),a=t=>{const e=n.concat(t);return i(e),e},u=t=>{const e=b.concat(t);return y(e),e},P=t=>{nt(t!==!1)},f=t=>{t===void 0&&V([]),typeof t=="string"&&V([t]),Array.isArray(t)&&V(Array.from(new Set(t)))},Pt=t=>{v.includes(t)?f(v.filter(e=>e!==t)):f([...v,t])},ht=t=>{const e=pickRectObject(t);c(g=>[...g,e])},St=t=>{const e=pickRectObject(t);c(g=>g.map(h=>h.id===t.id?e:h))},bt=t=>{c(e=>e.filter(g=>!t.find(h=>h.id===g.id)))},It=t=>{w.includes(t)?R([]):R([t])},Ct=()=>{if(B===lbAnnotation.EToolName.Rect){const t=n.map(e=>e.id);f(t),r==null||r.pointCloud2dOperation.setSelectedIDs(t)}},mt=t=>{f(n.filter(e=>e.attribute===t).map(e=>e.id))},X=n.filter(t=>!d.includes(t.attribute)),Y=b.filter(t=>!d.includes(t.attribute)),$=S.filter(t=>t.attribute&&!d.includes(t.attribute)),yt=t=>{if(d.includes(t))O(d.filter(e=>e!==t));else{const e=d.concat(t);O(e)}},Lt=(t=X,e=L,g=Y,h=$,D=E)=>{var m;s==null||s.clearAllBox(),s==null||s.clearAllSphere(),r==null||r.updatePolygonList(t,e),r==null||r.updatePointList(g),r==null||r.updateLineList(h),s==null||s.generateBoxes(t),s==null||s.generateSpheres(g),(m=C==null?void 0:C.store)==null||m.updateCurrentSegment(D),tt(t)},wt=()=>{M(void 0),T(void 0),k(void 0),Z(void 0)},tt=(t,e)=>__async(void 0,null,function*(){var g;if(!s)return;const h=s.pointCloudObject;if(!!h)try{const D=yield s.getHighlightIndexByMappingImgList({mappingImgList:e!=null?e:j,points:h.geometry.attributes.position.array}),m=yield s==null?void 0:s.highlightOriginPointCloud(t,D);return m&&((g=r==null?void 0:r.pointCloudInstance)==null||g.updateColor(m)),m}catch(D){console.error(D)}});return{selectedID:W,pointCloudBoxList:n,pointCloudSphereList:b,displayPointCloudList:X,displaySphereList:Y,displayLineList:$,selectedIDs:v,setPointCloudResult:i,setSelectedIDs:f,addPointCloudBox:a,addPointCloudSphere:u,setPointCloudSphereList:y,valid:N,selectedPointCloudBox:l,setPointCloudValid:P,addSelectedID:Pt,addHighlightID:It,selectedAllBoxes:Ct,topViewInstance:r,setTopViewInstance:M,sideViewInstance:G,setSideViewInstance:T,backViewInstance:F,setBackViewInstance:k,mainViewInstance:s,setMainViewInstance:Z,polygonList:L,setPolygonList:x,rectList:I,setRectList:c,addRectIn2DView:ht,removeRectIn2DView:bt,updateRectIn2DView:St,lineList:S,setLineList:et,zoom:z,setZoom:it,history:rt,toggleAttributesVisible:yt,hideAttributes:d,setHideAttributes:O,reRender:Lt,attrPanelLayout:J,setAttrPanelLayout:at,syncAllViewPointCloudColor:tt,defaultAttribute:U,setDefaultAttribute:st,pointCloudPattern:B,setPointCloudPattern:lt,selectSpecAttr:mt,globalPattern:H,setGlobalPattern:t=>{H!==t&&(vt(actionCreators.ChangeSave),ut(t),t===lbUtils.EPointCloudPattern.Detection&&K(void 0))},ptSegmentInstance:C,setPtSegmentInstance:K,segmentation:E,setSegmentation:ct,clearAllDetectionInstance:wt,highlight2DDataList:j,setHighlight2DDataList:dt,cuboidBoxIn2DView:q,setCuboidBoxIn2DView:ot,imageSizes:Q,cacheImageNodeSize:ft,highlightIDs:w,setHighlightIDs:R}},[N,v,n,b,L,S,I,r,G,F,s,z,d,J,U,B,H,C,E,j,q,Q,w]);React.useEffect(()=>{var l,a,u;(l=p==null?void 0:p.setPointCloudBoxList)==null||l.call(p,n),(a=p==null?void 0:p.setHighlightIDs)==null||a.call(p,w),(u=p==null?void 0:p.setSelectedIDs)==null||u.call(p,v)},[n,v,w]),React.useEffect(()=>{var l;(l=p==null?void 0:p.setPtCtx)==null||l.call(p,A)},[A]);const gt=()=>{const l=n.filter(f=>d.includes(f.attribute)),{setSelectedIDs:a,reRender:u}=A,P=l.map(f=>f.id);P.length>0&&a(v.filter(f=>!P.includes(f))),u()};return React.useEffect(()=>{var l,a,u,P;gt(),(a=(l=r==null?void 0:r.toolInstance)==null?void 0:l.setHiddenAttributes)==null||a.call(l,d),(P=(u=C==null?void 0:C.store)==null?void 0:u.setHiddenAttributes)==null||P.call(u,d)},[d]),React__default.default.createElement(PointCloudContext.Provider,{value:A},o)};exports.PointCloudContext=PointCloudContext,exports.PointCloudProvider=PointCloudProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js"),lbUtils=require("@labelbee/lb-utils");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:i,sideViewInstance:r,backViewInstance:u,mainViewInstance:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js"),lbUtils=require("@labelbee/lb-utils");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:i,sideViewInstance:r,backViewInstance:u,mainViewInstance:e,setPointCloudResult:d,setPointCloudSphereList:P,setPolygonList:C,setRectList:v,pointCloudPattern:a,setPointCloudPattern:o,syncAllViewPointCloudColor:b,globalPattern:n,setLineList:h}=React.useContext(PointCloudContext.PointCloudContext),{pushHistoryWithList:p}=useHistory.useHistory(),y=()=>{e==null||e.clearAllBox(),e==null||e.clearAllSphere(),e==null||e.render(),d([]),C([]),P([]),h([]),v([]),i==null||i.toolScheduler.clearStatusAndResult(),b([]),p({pointCloudBoxList:[],polygonList:[],pointCloudSphereList:[]})},l=()=>{r==null||r.toolInstance.clearResult(),u==null||u.toolInstance.clearResult()},L=c=>{if(c===a)return;const s=[i,r,u];switch(c){case EToolName.Rect:l(),s.forEach(t=>{t==null||t.switchToCanvas(EToolName.PointCloudPolygon),t==null||t.toolInstance.setPattern(EPolygonPattern.Rect)}),o(EToolName.Rect);break;case EToolName.Polygon:l(),s.forEach(t=>{t==null||t.switchToCanvas(EToolName.PointCloudPolygon),t==null||t.toolInstance.setPattern(EPolygonPattern.Normal)}),o(EToolName.Polygon);break;case EToolName.Point:l(),s.forEach(t=>{t==null||t.switchToCanvas(EToolName.Point)}),o(EToolName.Point);break;case EToolName.Line:l(),s.forEach(t=>{t==null||t.switchToCanvas(EToolName.Line)}),o(EToolName.Line);break}},w=React.useMemo(()=>n===lbUtils.EPointCloudPattern.Detection,[n]),R=React.useMemo(()=>n===lbUtils.EPointCloudPattern.Segmentation,[n]);return{clearAllResult:y,updatePointCloudPattern:L,pointCloudPattern:a,isPointCloudDetectionPattern:w,isPointCloudSegmentationPattern:R}};exports.useStatus=useStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),PointCloudSegmentListener=require("./PointCloudSegmentListener.js"),PointCloudSegment=require("./PointCloudSegment.js"),PointCloudSegmentStatus=require("./PointCloudSegmentStatus.js"),PointCloudSegmentToolbar=require("./PointCloudSegmentToolbar.js"),PointCloudSegment2DView=require("./PointCloudSegment2DView.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index$1=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),annotation=require("../../hooks/annotation.js"),index=require("../../utils/index.js"),map=require("../../store/annotation/map.js"),classNames=require("classnames"),index$2=require("./components/sideAndBackOverView/index.js"),actionCreators=require("../../store/annotation/actionCreators.js");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),PointCloudSegmentListener=require("./PointCloudSegmentListener.js"),PointCloudSegment=require("./PointCloudSegment.js"),PointCloudSegmentStatus=require("./PointCloudSegmentStatus.js"),PointCloudSegmentToolbar=require("./PointCloudSegmentToolbar.js"),PointCloudSegment2DView=require("./PointCloudSegment2DView.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index$1=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),annotation=require("../../hooks/annotation.js"),index=require("../../utils/index.js"),map=require("../../store/annotation/map.js"),classNames=require("classnames"),index$2=require("./components/sideAndBackOverView/index.js"),actionCreators=require("../../store/annotation/actionCreators.js");function _interopDefaultLegacy(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var React__default=_interopDefaultLegacy(React),classNames__default=_interopDefaultLegacy(classNames);const PointCloudView=a=>{const{currentData:i,imgList:P,drawLayerSlot:c,checkMode:n,intelligentFit:v,imgIndex:p,config:L,measureVisible:E}=a,e=React.useContext(PointCloudContext.PointCloudContext),{globalPattern:m,setGlobalPattern:x,selectedIDs:C}=e,S=ctx.useDispatch(),[l,f]=React.useState(!1),q=(C==null?void 0:C.length)>0&&l,b=index.jsonParser(i.result),{toolInstanceRef:o,clearToolInstance:j}=annotation.useCustomToolInstance({basicInfo:b});if(React.useEffect(()=>{o.current.setPointCloudGlobalPattern=t=>{t!==m&&(x(t),e.clearAllDetectionInstance(),j())}},[m]),React.useEffect(()=>{var t;if(actionCreators.SetLoadPCDFileLoading(S,!0),i){const{boxParamsList:r,polygonList:s,lineList:u,sphereParamsList:d,segmentation:w,rectList:N}=lbUtils.PointCloudUtils.parsePointCloudCurrentResult((t=i==null?void 0:i.result)!=null?t:"");e.setPointCloudResult(r),e.setPolygonList(s),e.setLineList(u),e.setPointCloudSphereList(d),e.setRectList(N),e.setSegmentation(w)}},[p]),React.useEffect(()=>{o.current.exportData=()=>[e.pointCloudBoxList,{valid:e.valid}],o.current.exportCustomData=()=>{var t,r,s,u,d;return{resultPolygon:(t=e.polygonList)!=null?t:[],resultLine:(r=e.lineList)!=null?r:[],resultPoint:(s=e.pointCloudSphereList)!=null?s:[],resultRect:(u=e.rectList)!=null?u:[],segmentation:(d=e.segmentation)!=null?d:[]}}},[e.pointCloudBoxList,e.rectList,e.valid,e.polygonList,e.lineList,e.pointCloudSphereList,e.ptSegmentInstance,e.segmentation]),P.length===0)return null;if(m===lbUtils.EPointCloudPattern.Segmentation)return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudSegmentListener,{checkMode:n,toolInstanceRef:o}),React__default.default.createElement(PointCloudSegmentToolbar,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout")},React__default.default.createElement(PointCloudSegment,{checkMode:n}),React__default.default.createElement(PointCloudSegment2DView,null)),React__default.default.createElement(PointCloudSegmentStatus,{config:L}),c==null?void 0:c({direct:!0}));let g=React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left-bottom")},React__default.default.createElement(PointCloudBackView,{checkMode:n}),React__default.default.createElement(PointCloudSideView,{checkMode:n}));return l&&(g=React__default.default.createElement(index$2,{selectAndEnlarge:q,checkMode:n})),React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:n,toolInstanceRef:o}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:t=>t.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index$1.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud3DView,null),g),React__default.default.createElement("div",{className:classNames__default.default({[dom.getClassName("point-cloud-container","right")]:!0,[dom.getClassName("point-cloud-container","rightZoom")]:l})},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:c,checkMode:n,intelligentFit:v,setIsEnlargeTopView:f,onExitZoom:()=>{f(!1)},isEnlargeTopView:l}),React__default.default.createElement("div",{className:classNames__default.default({[dom.getClassName("point-cloud-container","right-bottom")]:!l,[dom.getClassName("point-cloud-container","right-bottom-floatLeft")]:l})},React__default.default.createElement(PointCloud2DView,{isEnlargeTopView:l,thumbnailWidth:l?300:455,checkMode:n,measureVisible:E})))),React__default.default.createElement(index$1.AnnotatedAttributesPanelFixedRight,null))))};var PointCloudView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudView);module.exports=PointCloudView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),index=require("../attributeList/index.js");function _interopDefaultLegacy(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var React__default=_interopDefaultLegacy(React);const subTitleStyle={margin:"12px 20px 8px",fontSize:14,fontWeight:500,wordWrap:"break-word"},SubAttributeList=a=>{const{subAttributeList:d,setSubAttribute:l,getValue:r}=a,{t:n}=reactI18next.useTranslation();return React__default.default.createElement(React__default.default.Fragment,null,d.map(e=>{var u;return(e==null?void 0:e.subSelected)&&React__default.default.createElement("div",{style:{marginTop:12},key:e.value},React__default.default.createElement("div",{style:subTitleStyle},n("SubAttribute"),"-",e.key),((u=e.subSelected)==null?void 0:u.length)<5?React__default.default.createElement(index.default,{list:e.subSelected.map(t=>({label:t.key,value:t.value})),selectedAttribute:r(e),num:"-",forbidColor:!0,forbidDefault:!0,attributeChanged:t=>l(e.value,t),style:{marginBottom:12}}):React__default.default.createElement(antd.Select,{style:{margin:"0px 21px 17px 16px",width:"87%"},value:r(e),placeholder:n("PleaseSelect"),onChange:t=>l(e.value,t),allowClear:!0},e.subSelected.map(t=>React__default.default.createElement(antd.Select.Option,{key:t.value,value:t.value},t.key))),React__default.default.createElement(antd.Divider,{style:{margin:0}}))}))};module.exports=SubAttributeList;
|
package/dist/index.css
CHANGED
|
@@ -132,6 +132,12 @@
|
|
|
132
132
|
.index-module_outputDisplay__5dS48 .index-module_content__Iml6l .markdown-body {
|
|
133
133
|
font-size: 14px;
|
|
134
134
|
}
|
|
135
|
+
|
|
136
|
+
.index-module_tip__NFru6 {
|
|
137
|
+
margin-bottom: 8px;
|
|
138
|
+
color: rgba(0, 0, 0, 0.45);
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
}
|
|
135
141
|
.index-module_tagList__cvWor {
|
|
136
142
|
padding: 0px 16px 16px 16px;
|
|
137
143
|
}
|
|
@@ -1870,11 +1876,14 @@
|
|
|
1870
1876
|
-ms-user-select: none;
|
|
1871
1877
|
user-select: none;
|
|
1872
1878
|
}
|
|
1879
|
+
.generalOperation .generalOperation-col {
|
|
1880
|
+
display: flex;
|
|
1881
|
+
justify-content: center;
|
|
1882
|
+
}
|
|
1873
1883
|
.generalOperation .item {
|
|
1874
1884
|
text-align: center;
|
|
1875
|
-
flex: 1;
|
|
1876
1885
|
box-sizing: border-box;
|
|
1877
|
-
width:
|
|
1886
|
+
width: 100px;
|
|
1878
1887
|
height: 100%;
|
|
1879
1888
|
display: flex;
|
|
1880
1889
|
flex-direction: column;
|
|
@@ -3077,15 +3086,12 @@
|
|
|
3077
3086
|
display: block;
|
|
3078
3087
|
}
|
|
3079
3088
|
.bee-sidebar__content__NLPList__item__text {
|
|
3080
|
-
flex: 1 1;
|
|
3081
|
-
padding: 16px;
|
|
3082
3089
|
font-weight: 400;
|
|
3083
3090
|
font-size: 12px;
|
|
3084
3091
|
line-height: 20px;
|
|
3085
3092
|
color: #666666;
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
white-space: nowrap;
|
|
3093
|
+
padding: 16px;
|
|
3094
|
+
width: 100%;
|
|
3089
3095
|
}
|
|
3090
3096
|
.bee-sidebar__content__NLPList__item__active {
|
|
3091
3097
|
background-color: #eeefff;
|
package/dist/store/Actions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS",UPDATE_IMG_INDEX_BY_EXTERNAL:"@@UPDATE_IMG_INDEX_BY_EXTERNAL"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var o=s=>{try{u(n.next(s))}catch(i){r(i)}},T=s=>{try{u(n.throw(s))}catch(i){r(i)}},u=s=>s.done?a(s.value):Promise.resolve(s.value).then(o,T);u((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a;const{imgList:r,imgIndex:o}=t,{dataSourceStep:T}=reducer.getStepConfig(t.stepList,t.step);return((a=(n=index$1.jsonParser(r[o-1].result)[`step_${T}`])==null?void 0:n.result)==null?void 0:a.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,step:u,stepList:s,skipBeforePageTurning:i,beforeRotate:N,checkMode:p,highlightAttribute:I,preDataProcess:O}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),T&&A.push(UpdateGetFileList(T)),o&&A.push(UpdatePageSize(o)),i&&A.push(UpdateSkipBeforePageTurning(i)),N&&A.push(UpdateBeforeRotate(N)),O&&A.push(UpdatePreDataProcess(O)),typeof p=="boolean"&&A.push(UpdateCheckMode(p)),A.push(UpdateHighlightAttribute(I)),A.push(SetTaskConfig({stepList:s,step:u})),A.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),A.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),d=>dispatchTasks(d,A)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,stepList:u,beforeRotate:s,highlightAttribute:i,preDataProcess:N}){const p=[];return t&&p.push(UpdateOnSubmit(t)),e&&p.push(UpdateOnSave(e)),n&&p.push(UpdateOnPageChange(n)),a&&p.push(UpdateOnStepChange(a)),r&&p.push(UpdateGetFileData(r)),T&&p.push(UpdateGetFileList(T)),o&&p.push(UpdatePageSize(o)),s&&p.push(UpdateBeforeRotate(s)),N&&p.push(UpdatePreDataProcess(N)),p.push(UpdateHighlightAttribute(i)),p.push(SetTaskStepList({stepList:u})),I=>dispatchTasks(I,p)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:o}=a,T=getNextStep(r,o);return[e(UpdateProcessingStep(T,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,o;const{annotation:T}=a();(r=T==null?void 0:T.onStepChange)==null||r.call(T,t);const u=(o=T==null?void 0:T.imgIndex)!=null?o:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:u,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>[t(ToSubmitFileData(n)),t(reducer.LoadFileAndFileData(e,a))],ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:o,imgList:T,pageSize:u}=e().annotation,s=Math.floor(n/u);SetAnnotationLoading(t,!0);try{const i=yield o(s,u);if(SetAnnotationLoading(t,!1),!((r=i==null?void 0:i.fileList)==null?void 0:r.length)||!(i==null?void 0:i.total))throw new Error("fileList and total are required");const N=a?new Array(i.total):[...T];return N.splice(s*u,u,...i.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(i){SetAnnotationLoading(t,!1),console.error(i)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var o;const T=e().annotation,{fileIndexChanged:u,fileIndex:s,basicIndexChanged:i,basicIndex:N}=PageOperator.getNextPageInfo(n,T,r),p=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(t,a),u){if(T.loading||!T.imgList[s]&&!(yield loadImgList(t,e,s)))return;(o=T.onPageChange)==null||o.call(T,s);const I=p===index.ESubmitType.Backward?getBasicIndex(e().annotation,N):N;return SubmitAndChangeFileIndex(t,s,p,I)}return i?ChangeBasicIndex(t,N):t(ToSubmitFileData(p))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetPointCloudLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:o}=a().annotation;return util.getBoxesByTrackID(r,o,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:o}=n();return(r=(a=o==null?void 0:o.preDataProcess)==null?void 0:a.call(o,t))!=null?r:t.dataList};exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var T=s=>{try{o(n.next(s))}catch(p){r(p)}},i=s=>{try{o(n.throw(s))}catch(p){r(p)}},o=s=>s.done?a(s.value):Promise.resolve(s.value).then(T,i);o((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a,r;const{imgList:T,imgIndex:i}=t,{dataSourceStep:o}=reducer.getStepConfig(t.stepList,t.step);return((r=(a=index$1.jsonParser((n=T[i-1])==null?void 0:n.result)[`step_${o}`])==null?void 0:a.result)==null?void 0:r.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function UpdateImgIndexByExternal(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL,payload:{getImgIndexByExternal:t}}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:T,loadFileList:i,step:o,stepList:s,skipBeforePageTurning:p,beforeRotate:N,checkMode:A,highlightAttribute:I,preDataProcess:d,getImgIndexByExternal:l}){const u=[];return t&&u.push(UpdateOnSubmit(t)),e&&u.push(UpdateOnSave(e)),n&&u.push(UpdateOnPageChange(n)),a&&u.push(UpdateOnStepChange(a)),r&&u.push(UpdateGetFileData(r)),i&&u.push(UpdateGetFileList(i)),T&&u.push(UpdatePageSize(T)),p&&u.push(UpdateSkipBeforePageTurning(p)),N&&u.push(UpdateBeforeRotate(N)),d&&u.push(UpdatePreDataProcess(d)),typeof A=="boolean"&&u.push(UpdateCheckMode(A)),l&&u.push(UpdateImgIndexByExternal(l)),u.push(UpdateHighlightAttribute(I)),u.push(SetTaskConfig({stepList:s,step:o})),u.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),u.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),O=>dispatchTasks(O,u)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:T,loadFileList:i,stepList:o,beforeRotate:s,highlightAttribute:p,preDataProcess:N}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),i&&A.push(UpdateGetFileList(i)),T&&A.push(UpdatePageSize(T)),s&&A.push(UpdateBeforeRotate(s)),N&&A.push(UpdatePreDataProcess(N)),A.push(UpdateHighlightAttribute(p)),A.push(SetTaskStepList({stepList:o})),I=>dispatchTasks(I,A)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:T}=a,i=getNextStep(r,T);return[e(UpdateProcessingStep(i,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,T;const{annotation:i}=a();(r=i==null?void 0:i.onStepChange)==null||r.call(i,t);const o=(T=i==null?void 0:i.imgIndex)!=null?T:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:o,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>[t(ToSubmitFileData(n)),t(reducer.LoadFileAndFileData(e,a))],ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:T,imgList:i,pageSize:o}=e().annotation,s=Math.floor(n/o);SetAnnotationLoading(t,!0);try{const p=yield T(s,o);if(SetAnnotationLoading(t,!1),!((r=p==null?void 0:p.fileList)==null?void 0:r.length)||!(p==null?void 0:p.total))throw new Error("fileList and total are required");const N=a?new Array(p.total):[...i];return N.splice(s*o,o,...p.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(p){SetAnnotationLoading(t,!1),console.error(p)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var T,i;const o=e().annotation,s=getSubmitByPageOperation(n);let{fileIndexChanged:p,fileIndex:N,basicIndexChanged:A,basicIndex:I}=PageOperator.getNextPageInfo(n,o,r);const d=(T=o==null?void 0:o.getImgIndexByExternal)==null?void 0:T.call(o,o.imgIndex,s);if(d!==void 0&&(p=!0,N=d),ChangeTriggerEventAfterIndexChanged(t,a),p){if(o.loading||!o.imgList[N]&&!(yield loadImgList(t,e,N)))return;(i=o.onPageChange)==null||i.call(o,N);const l=s===index.ESubmitType.Backward?getBasicIndex(e().annotation,I):I;return SubmitAndChangeFileIndex(t,N,s,l)}return A?ChangeBasicIndex(t,I):t(ToSubmitFileData(s))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetPointCloudLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:T}=a().annotation;return util.getBoxesByTrackID(r,T,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:T}=n();return(r=(a=T==null?void 0:T.preDataProcess)==null?void 0:a.call(T,t))!=null?r:t.dataList};exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateImgIndexByExternal=UpdateImgIndexByExternal,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((g,u)=>{var S=I=>{try{N(s.next(I))}catch(m){u(m)}},A=I=>{try{N(s.throw(I))}catch(m){u(m)}},N=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,A);N((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:g}=e,u=StepUtils.getCurrentStepInfo(s,g),S=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isAudioTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool)||[ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(u==null?void 0:u.tool))return;const A=document.getElementById("toolContainer");if(!A)throw"Not exist dom named id-toolContainer";const N=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:A,toolName:u.tool,size:N,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,g)=>__async(void 0,null,function*(){var u,S;const{stepList:A,step:N}=g().annotation,I=StepUtils.currentToolIsVideo(N,A),m=StepUtils.currentToolIsPointCloud(N,A),D=((u=StepUtils.getCurrentStepInfo(N,A))==null?void 0:u.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(N,A))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(N,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),I){s(AfterVideoLoaded(e));return}if(m||D||P||y){s(AfterCommonLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=s().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,g)=>{var u;const{toolInstance:S,imgList:A}=g().annotation,N=(u=A==null?void 0:A[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(N).then(I=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),S==null||S.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:g,step:u=1})=>{var S,A,N,I;const m=((S=t[s])==null?void 0:S.result)||"",[D,y,P]=(A=e==null?void 0:e.exportData())!=null?A:[],x=(I=(N=e==null?void 0:e.exportCustomData)==null?void 0:N.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,g,u,S,A,N,I,m,D,y,P,x,B,w,b,F,G,V,M,q,k,H,z,K,W;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,l=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:l})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:l,stepList:i,toolInstance:a,onSubmit:r,resultList:p}=e;if(!a||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(g=a==null?void 0:a.exportData())!=null?g:[],O=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(d,c),C=data.composeResult(f,{step:l,stepList:i},{rect:p},O),L=e.imgList.map((v,E)=>{if(E===o){const U=AnnotationDataUtils.dataCorrection(C,d,l,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),T)}return v});if(((A=t.payload)==null?void 0:A.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});r&&r([L[o]],(N=t.payload)==null?void 0:N.submitType,o,L);const R=calcStepProgress(L,l);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:l}=e;return l==null||l(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:l,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(I=i==null?void 0:i.exportData())!=null?I:[];let p=r;if((a==null?void 0:a.length)>0){const d=(m=a[o])==null?void 0:m.id,c=r.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));p=___default.default.cloneDeep(l).filter(T=>T.sourceID!==d),p.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:p,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:l,imgIndex:i,stepList:a,annotationEngine:r,resultList:p,basicResultList:d}=e;if(!n||!r)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,O=index.jsonParser((y=l[i])==null?void 0:y.result),f=(p||[]).filter(U=>U.sourceID===T),C=getStepConfig(a,o),{dataSourceStep:L,tool:R}=C,v=getStepConfig(a,L);let E=[];return L&&R&&(E=(P=O[`step_${L}`])==null?void 0:P.result,(E==null?void 0:E.length)>0?(r==null||r.setBasicInfo(v.tool,E[c]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(v.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:c})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:l,annotationEngine:i,stepList:a}=e;if(!l)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:p,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,O=c!=null?c:0,f=index.jsonParser((x=n[p])==null?void 0:x.result),C=f[`step_${r.step}`],L=!C,R={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?i==null||i.setImgNode(d,R):l==null||l.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:U}=v,$=getStepConfig(a,E),Y=E&&U,h=(F=(b=f[`step_${E}`])==null?void 0:b.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,l,v,h,L);if(i==null||i.launchOperation(),Y&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo($.tool,h[O]):(i==null||i.setBasicInfo($.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const J=(V=(G=h[O])==null?void 0:G.id)!=null?V:"",X=Y?j.filter(Z=>lbAnnotation.CommonToolUtils.isSameSourceID(Z.sourceID,J)):j;(M=l==null?void 0:l.history)==null||M.initRecord(j,!0),l==null||l.setResult(X)}return __spreadProps(__spreadValues({},e),{imgIndex:p,basicIndex:O,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(q=t.payload.config)!=null?q:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:l,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:l,annotationEngine:i})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(k=t.payload)==null?void 0:k.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:l}=e,i=[...l];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(H=n==null?void 0:n.updateRotate)==null||H.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(z=n==null?void 0:n.valid)!=null?z:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:l,step:i}=e;if(!n)return e;if(o===0||o>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=l[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,i,(K=l[o].result)!=null?K:"");l[o]=__spreadProps(__spreadValues({},l[o]),{result:r});const d=index.jsonParser(r)[`step_${i}`],c=(d==null?void 0:d.result)||[];return n==null||n.setResult(c),n==null||n.history.pushHistory(c),(W=n==null?void 0:n.asyncData)==null||W.call(n,l[o]),__spreadProps(__spreadValues({},e),{imgList:[...l]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:l}=t.payload;if(!o)return e;const i=getStepConfig(n,l);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:l,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:l,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:l}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:l,step:i,predictionResult:a}=e,r={};a.forEach(T=>{const{index:O}=T;r[O]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const p=`step_${i}`,d=[],c=o.map((T,O)=>{if(r[O]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:l},{rect:[]},{})):index.jsonParser(T.result);f[p].result.push(r[O]);const C=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:O,newInfo:C}),C}return T});return n==null||n(c,index$1.ESubmitType.BatchUpdateImgList,-1,c,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((g,a)=>{var S=I=>{try{N(s.next(I))}catch(m){a(m)}},A=I=>{try{N(s.throw(I))}catch(m){a(m)}},N=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,A);N((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,g)=>{if(g){const a=g.result;if(index.jsonParser(a)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:g}=e,a=StepUtils.getCurrentStepInfo(s,g),S=ConfigUtils.ConfigUtils.jsonParser(a.config);if(ToolUtils.isVideoTool(a==null?void 0:a.tool)||ToolUtils.isAudioTool(a==null?void 0:a.tool)||ToolUtils.isPointCloudTool(a==null?void 0:a.tool)||[ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(a==null?void 0:a.tool))return;const A=document.getElementById("toolContainer");if(!A)throw"Not exist dom named id-toolContainer";const N=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:A,toolName:a.tool,size:N,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,g)=>__async(void 0,null,function*(){var a,S;const{stepList:A,step:N}=g().annotation,I=StepUtils.currentToolIsVideo(N,A),m=StepUtils.currentToolIsPointCloud(N,A),D=((a=StepUtils.getCurrentStepInfo(N,A))==null?void 0:a.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(N,A))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(N,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),I){s(AfterVideoLoaded(e));return}if(m||D||P||y){s(AfterCommonLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:g,imgList:a}=s().annotation;if(g){const S=yield g(a[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,g)=>{var a;const{toolInstance:S,imgList:A}=g().annotation,N=(a=A==null?void 0:A[e])==null?void 0:a.url;lbAnnotation.ImgUtils.load(N).then(I=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),S==null||S.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:g,step:a=1})=>{var S,A,N,I;const m=((S=t[s])==null?void 0:S.result)||"",[D,y,P]=(A=e==null?void 0:e.exportData())!=null?A:[],x=(I=(N=e==null?void 0:e.exportCustomData)==null?void 0:N.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:a,stepList:g},{rect:D},x);return t.map((b,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,g,a,S,A,N,I,m,D,y,P,x,B,w,b,F,G,M,V,q,k,H,z,K,W;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,l=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:l})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:l,stepList:r,toolInstance:u,onSubmit:i,resultList:p}=e;if(!u||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(g=u==null?void 0:u.exportData())!=null?g:[],O=(S=(a=u==null?void 0:u.exportCustomData)==null?void 0:a.call(u))!=null?S:{},f=data.composeResultWithBasicImgInfo(d,c),E=data.composeResult(f,{step:l,stepList:r},{rect:p},O),L=e.imgList.map((v,C)=>{if(C===o){const U=AnnotationDataUtils.dataCorrection(E,d,l,r);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),T)}return v});if(((A=t.payload)==null?void 0:A.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});i&&i([L[o]],(N=t.payload)==null?void 0:N.submitType,o,L);const R=calcStepProgress(L,l);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:l}=e;return l==null||l(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:l,toolInstance:r,basicResultList:u}=e;if(!r)return e;const[i]=(I=r==null?void 0:r.exportData())!=null?I:[];let p=i;if((u==null?void 0:u.length)>0){const d=(m=u[o])==null?void 0:m.id,c=i.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));p=___default.default.cloneDeep(l).filter(T=>T.sourceID!==d),p.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:p,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:l,imgIndex:r,stepList:u,annotationEngine:i,resultList:p,basicResultList:d}=e;if(!n||!i)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,O=index.jsonParser((y=l[r])==null?void 0:y.result),f=(p||[]).filter(U=>U.sourceID===T),E=getStepConfig(u,o),{dataSourceStep:L,tool:R}=E,v=getStepConfig(u,L);let C=[];return L&&R&&(C=(P=O[`step_${L}`])==null?void 0:P.result,(C==null?void 0:C.length)>0?(i==null||i.setBasicInfo(v.tool,C[c]),i==null||i.launchOperation()):(i==null||i.setBasicInfo(v.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:c})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:l,annotationEngine:r,stepList:u}=e;if(!l)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const i=StepUtils.getCurrentStepInfo(o,u),{nextIndex:p,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,O=c!=null?c:0,f=index.jsonParser((x=n[p])==null?void 0:x.result),E=f[`step_${i.step}`],L=!E,R={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?r==null||r.setImgNode(d,R):l==null||l.setValid(R.valid);const v=getStepConfig(u,i.step),{dataSourceStep:C,tool:U}=v,$=getStepConfig(u,C),X=C&&U,h=(F=(b=f[`step_${C}`])==null?void 0:b.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(E==null?void 0:E.result,l,v,h,L);if(r==null||r.launchOperation(),X&&((h==null?void 0:h.length)>0?r==null||r.setBasicInfo($.tool,h[O]):(r==null||r.setBasicInfo($.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),i.tool!=="check"){const Y=(M=(G=h[O])==null?void 0:G.id)!=null?M:"",J=X?j.filter(Z=>lbAnnotation.CommonToolUtils.isSameSourceID(Z.sourceID,Y)):j;(V=l==null?void 0:l.history)==null||V.initRecord(j,!0),l==null||l.setResult(J)}return __spreadProps(__spreadValues({},e),{imgIndex:p,basicIndex:O,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(q=t.payload.config)!=null?q:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:l,annotationEngine:r}=o;return __spreadProps(__spreadValues({},e),{toolInstance:l,annotationEngine:r})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(k=t.payload)==null?void 0:k.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL:return __spreadProps(__spreadValues({},e),{getImgIndexByExternal:t.payload.getImgIndexByExternal});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:l}=e,r=[...l];return r[o]=__spreadValues(__spreadValues({},r[o]),n),__spreadProps(__spreadValues({},e),{imgList:r})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(H=n==null?void 0:n.updateRotate)==null||H.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(z=n==null?void 0:n.valid)!=null?z:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:l,step:r}=e;if(!n)return e;if(o===0||o>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const u=l[o-1].result;if(!u)return e;const i=AnnotationDataUtils.copyResultChange(u,r,(K=l[o].result)!=null?K:"");l[o]=__spreadProps(__spreadValues({},l[o]),{result:i});const d=index.jsonParser(i)[`step_${r}`],c=(d==null?void 0:d.result)||[];return n==null||n.setResult(c),n==null||n.history.pushHistory(c),(W=n==null?void 0:n.asyncData)==null||W.call(n,l[o]),__spreadProps(__spreadValues({},e),{imgList:[...l]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:l}=t.payload;if(o){const r=getStepConfig(n,l);return o==null||o.setToolName(r.tool,r.config),__spreadProps(__spreadValues({},e),{step:l,toolInstance:o==null?void 0:o.toolInstance})}return __spreadProps(__spreadValues({},e),{step:l})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:l,imgList:r}=t.payload,{imgIndex:u,onSubmit:i}=e,p=[],d=r.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return i&&i([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:l}=t.payload,{imgList:r,imgIndex:u,onSubmit:i}=e,p=[],d=r.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return i&&i([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:l,step:r,predictionResult:u}=e,i={};u.forEach(T=>{const{index:O}=T;i[O]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const p=`step_${r}`,d=[],c=o.map((T,O)=>{if(i[O]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:r,stepList:l},{rect:[]},{})):index.jsonParser(T.result);f[p].result.push(i[O]);const E=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:O,newInfo:E}),E}return T});return n==null||n(c,index$1.ESubmitType.BatchUpdateImgList,-1,c,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
|
package/dist/types/App.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ToolInstance } from './store/annotation/types';
|
|
4
|
-
import { GetFileData, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
|
|
4
|
+
import { GetFileData, GetImgIndexByExternal, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
|
|
5
5
|
import { Header, RenderFooter, Sider, DrawLayerSlot } from './types/main';
|
|
6
6
|
import { IStepInfo } from './types/step';
|
|
7
7
|
import { EPointCloudName } from '@labelbee/lb-annotation';
|
|
@@ -77,6 +77,7 @@ export interface AppProps {
|
|
|
77
77
|
}) => void;
|
|
78
78
|
preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
|
|
79
79
|
auditContext?: any;
|
|
80
|
+
getImgIndexByExternal: GetImgIndexByExternal;
|
|
80
81
|
}
|
|
81
82
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps & {
|
|
82
83
|
children?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAnswerList, IAnswerSort, ILLMBoxResult, ILLMToolConfig, IWaitAnswerSort, IInputList, ISelectedTags } from '../types';
|
|
2
|
-
export declare const getCurrentResultFromResultList: (result: string) => any;
|
|
2
|
+
export declare const getCurrentResultFromResultList: (result: string, step?: number) => any;
|
|
3
3
|
export declare const formatSort: (sortList: any) => any;
|
|
4
4
|
export declare const getTagResult: (inputList: IInputList[], result?: ISelectedTags) => {};
|
|
5
5
|
export declare const getWaitSortList: (answerList: IAnswerList[], result?: ILLMBoxResult) => {
|
|
@@ -19,7 +19,7 @@ export interface ISelectedRegion {
|
|
|
19
19
|
id?: string;
|
|
20
20
|
loop?: boolean;
|
|
21
21
|
}
|
|
22
|
-
type IAudioClipConfig = Pick<IAudioTextToolConfig, 'clipConfigurable' | 'clipAttributeConfigurable' | 'clipAttributeList' | 'clipTextConfigurable'>;
|
|
22
|
+
type IAudioClipConfig = Pick<IAudioTextToolConfig, 'clipConfigurable' | 'clipAttributeConfigurable' | 'clipAttributeList' | 'clipTextConfigurable' | 'secondaryAttributeConfigurable' | 'subAttributeList'>;
|
|
23
23
|
interface IAudioClipState extends IAudioClipConfig {
|
|
24
24
|
/** 选中的截取属性,新建截取片段的默认属性 */
|
|
25
25
|
selectedAttribute: string;
|
|
@@ -13,7 +13,7 @@ interface IAudioPlayerContext {
|
|
|
13
13
|
imgIndex: number;
|
|
14
14
|
}
|
|
15
15
|
export declare const AudioPlayerContext: React.Context<IAudioPlayerContext>;
|
|
16
|
-
export declare const AudioPlayer: ({ fileData, onLoaded, context, invalid, height, hideError, onError, updateRegion, removeRegion, regions, activeToolPanel, clipConfigurable, clipTextConfigurable, clipAttributeList, clipAttributeConfigurable, isCheck, hoverRegionId, footer, drawLayerSlot, }: {
|
|
16
|
+
export declare const AudioPlayer: ({ fileData, onLoaded, context, invalid, height, hideError, onError, updateRegion, removeRegion, regions, activeToolPanel, clipConfigurable, clipTextConfigurable, clipAttributeList, clipAttributeConfigurable, secondaryAttributeConfigurable, subAttributeList, isCheck, hoverRegionId, footer, drawLayerSlot, }: {
|
|
17
17
|
fileData: any;
|
|
18
18
|
height?: number | undefined;
|
|
19
19
|
invalid: boolean;
|
|
@@ -32,6 +32,8 @@ export declare const AudioPlayer: ({ fileData, onLoaded, context, invalid, heigh
|
|
|
32
32
|
clipConfigurable: boolean;
|
|
33
33
|
clipTextConfigurable: boolean;
|
|
34
34
|
clipAttributeConfigurable: boolean;
|
|
35
|
+
secondaryAttributeConfigurable: boolean;
|
|
36
|
+
subAttributeList: IInputList[];
|
|
35
37
|
clipAttributeList: IInputList[];
|
|
36
38
|
/** 是否是查看模式:查看模式需要禁用截取的新建、调整功能 */
|
|
37
39
|
isCheck?: boolean | undefined;
|
|
@@ -24,5 +24,5 @@ interface IProps extends IA2MapStateProps {
|
|
|
24
24
|
checkMode?: boolean;
|
|
25
25
|
measureVisible?: boolean;
|
|
26
26
|
}
|
|
27
|
-
declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, thumbnailWidth, isEnlargeTopView, highlightAttribute, loadPCDFileLoading, checkMode, measureVisible }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
27
|
+
declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, thumbnailWidth, isEnlargeTopView, highlightAttribute, loadPCDFileLoading, checkMode, measureVisible, }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
28
28
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPointCloudBox, IPointCloudBoxList, IPolygonData, IPointCloudSphereList, IPointCloudSphere, ILine, EPointCloudPattern, IPointCloudSegmentation, ICalib, ISize } from '@labelbee/lb-utils';
|
|
1
|
+
import { IPointCloudBox, IPointCloudBoxList, IPolygonData, IPointCloudSphereList, IPointCloudSphere, ILine, EPointCloudPattern, IPointCloudSegmentation, ICalib, ISize, IPointCloudBoxRect, IPointCloud2DRectOperationViewRect } from '@labelbee/lb-utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PointCloud, PointCloudAnnotation, ActionsHistory, EToolName } from '@labelbee/lb-annotation';
|
|
4
4
|
interface IPointCloudContextInstances {
|
|
@@ -26,6 +26,7 @@ interface IHighlight2DData {
|
|
|
26
26
|
}
|
|
27
27
|
export interface IPointCloudContext extends IPointCloudContextInstances, IPointCloudStatus, IPointCloudSegment {
|
|
28
28
|
pointCloudBoxList: IPointCloudBoxList;
|
|
29
|
+
rectList: IPointCloudBoxRect[];
|
|
29
30
|
pointCloudSphereList: IPointCloudSphereList;
|
|
30
31
|
displayPointCloudList: IPointCloudBoxList;
|
|
31
32
|
displaySphereList: IPointCloudSphereList;
|
|
@@ -47,6 +48,10 @@ export interface IPointCloudContext extends IPointCloudContextInstances, IPointC
|
|
|
47
48
|
addPointCloudSphere: (sphereParams: IPointCloudSphere) => IPointCloudSphere[];
|
|
48
49
|
polygonList: IPolygonData[];
|
|
49
50
|
setPolygonList: (polygonList: IPolygonData[]) => void;
|
|
51
|
+
setRectList: (rectList: IPointCloudBoxRect[]) => void;
|
|
52
|
+
addRectIn2DView: (rect: IPointCloud2DRectOperationViewRect) => void;
|
|
53
|
+
removeRectIn2DView: (rects: IPointCloud2DRectOperationViewRect[]) => void;
|
|
54
|
+
updateRectIn2DView: (rect: IPointCloud2DRectOperationViewRect) => void;
|
|
50
55
|
lineList: ILine[];
|
|
51
56
|
setLineList: (lineList: ILine[]) => void;
|
|
52
57
|
zoom: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IInputList } from '@labelbee/lb-utils';
|
|
3
|
+
interface IProps {
|
|
4
|
+
subAttributeList: IInputList[];
|
|
5
|
+
setSubAttribute: (value: string, subAttribute: string) => void;
|
|
6
|
+
getValue: (subAttribute: IInputList) => undefined | string;
|
|
7
|
+
}
|
|
8
|
+
declare const SubAttributeList: (props: IProps) => React.JSX.Element;
|
|
9
|
+
export default SubAttributeList;
|
|
@@ -40,6 +40,7 @@ export declare const ANNOTATION_ACTIONS: {
|
|
|
40
40
|
SET_PREDICT_RESULT: string;
|
|
41
41
|
SET_HIGHLIGHT_ATTRIBUTE: string;
|
|
42
42
|
UPDATE_PRE_DATA_PROCESS: string;
|
|
43
|
+
UPDATE_IMG_INDEX_BY_EXTERNAL: string;
|
|
43
44
|
};
|
|
44
45
|
export declare const IMAGE_ATTRIBUTE_ACTIONS: {
|
|
45
46
|
UPDATE_IMG_ATTRIBUTE: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IStepInfo } from '@/types/step';
|
|
2
|
-
import { GetFileData, LoadFileList, IFileItem, OnPageChange, OnSave, OnStepChange, OnSubmit } from '@/types/data';
|
|
2
|
+
import { GetFileData, LoadFileList, IFileItem, OnPageChange, OnSave, OnStepChange, OnSubmit, GetImgIndexByExternal } from '@/types/data';
|
|
3
3
|
import { AnnotationActionTypes, ToolInstance } from './types';
|
|
4
4
|
import { ESubmitType } from '@/constant';
|
|
5
5
|
import { EPageTurningOperation } from '@/data/enums/AnnotationSize';
|
|
@@ -28,6 +28,7 @@ export declare function UpdateSkipBeforePageTurning(skipBeforePageTurning: (page
|
|
|
28
28
|
export declare function UpdateBeforeRotate(beforeRotate: () => {}): AnnotationActionTypes;
|
|
29
29
|
export declare function UpdatePreDataProcess(preDataProcess: () => {}): AnnotationActionTypes;
|
|
30
30
|
export declare function CopyBackWordResult(): AnnotationActionTypes;
|
|
31
|
+
export declare function UpdateImgIndexByExternal(getImgIndexByExternal: GetImgIndexByExternal): AnnotationActionTypes;
|
|
31
32
|
export declare function BatchUpdateTrackID({ id, newID, rangeIndex, imgList, }: {
|
|
32
33
|
id: number;
|
|
33
34
|
newID: number;
|
|
@@ -43,7 +44,7 @@ export declare const UpdateHighlightAttribute: (attribute: string) => Annotation
|
|
|
43
44
|
* 初始化任务数据
|
|
44
45
|
* @param param0
|
|
45
46
|
*/
|
|
46
|
-
export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, skipBeforePageTurning, beforeRotate, checkMode, highlightAttribute, preDataProcess, }: any): any;
|
|
47
|
+
export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, skipBeforePageTurning, beforeRotate, checkMode, highlightAttribute, preDataProcess, getImgIndexByExternal, }: any): any;
|
|
47
48
|
/**
|
|
48
49
|
* 初始化任务数据
|
|
49
50
|
* @param param0
|
|
@@ -54,4 +54,5 @@ export declare const annotationReducer: (state: {
|
|
|
54
54
|
predictionResultVisible: boolean;
|
|
55
55
|
highlightAttribute: string;
|
|
56
56
|
preDataProcess?: ((params: import("../../App").IPreDataProcessParams) => IPointCloudBox[]) | undefined;
|
|
57
|
+
getImgIndexByExternal?: import("@/types/data").GetImgIndexByExternal | undefined;
|
|
57
58
|
} | undefined, action: AnnotationActionTypes) => AnnotationState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnnotationEngine, RectOperation, TagOperation, TextToolOperation, PointOperation, PolygonOperation, LineToolOperation } from '@labelbee/lb-annotation';
|
|
2
2
|
import { ANNOTATION_ACTIONS } from '@/store/Actions';
|
|
3
3
|
import { IStepInfo } from '@/types/step';
|
|
4
|
-
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList } from '@/types/data';
|
|
4
|
+
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList, GetImgIndexByExternal } from '@/types/data';
|
|
5
5
|
import { ESubmitType } from '@/constant';
|
|
6
6
|
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
7
7
|
import { IPreDataProcessParams } from '@/App';
|
|
@@ -47,6 +47,7 @@ export interface AnnotationState {
|
|
|
47
47
|
predictionResultVisible: boolean;
|
|
48
48
|
highlightAttribute: string;
|
|
49
49
|
preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
|
|
50
|
+
getImgIndexByExternal?: GetImgIndexByExternal;
|
|
50
51
|
}
|
|
51
52
|
interface UpdateToolInstance {
|
|
52
53
|
type: typeof ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE;
|
|
@@ -135,6 +136,12 @@ interface UpdateGetFileList {
|
|
|
135
136
|
getFileData: LoadFileList;
|
|
136
137
|
};
|
|
137
138
|
}
|
|
139
|
+
interface UpdataImgIndexByExternal {
|
|
140
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL;
|
|
141
|
+
payload: {
|
|
142
|
+
getImgIndexByExternal: GetImgIndexByExternal;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
138
145
|
interface CopyBackWordResult extends CommonActions {
|
|
139
146
|
type: typeof ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT;
|
|
140
147
|
}
|
|
@@ -158,5 +165,5 @@ interface BatchUpdateResultByTrackID {
|
|
|
158
165
|
range: [number, number];
|
|
159
166
|
};
|
|
160
167
|
}
|
|
161
|
-
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | InitAnnotationState;
|
|
168
|
+
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | UpdataImgIndexByExternal | InitAnnotationState;
|
|
162
169
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICoordinate, IPointCloudBox, ISize } from '@labelbee/lb-utils';
|
|
1
|
+
import { IBasicRect, ICoordinate, IPointCloudBox, ISize } from '@labelbee/lb-utils';
|
|
2
2
|
import { IMappingImg } from '@/types/data';
|
|
3
3
|
export declare const jsonParser: (content: any, defaultValue?: any) => any;
|
|
4
4
|
export declare const getNewNode: <T>(newNode: T, oldNode: T) => T;
|
|
@@ -11,6 +11,9 @@ export declare const getBoundingRect: (points: ICoordinate[]) => {
|
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
13
|
};
|
|
14
|
+
export declare const isBoundingRectInImage: (boundingRect: Omit<IBasicRect, "id">, path: string, imageSizes: {
|
|
15
|
+
[key: string]: ISize;
|
|
16
|
+
}) => boolean;
|
|
14
17
|
interface IGetRectPointCloudBoxParams {
|
|
15
18
|
pointCloudBox: IPointCloudBox;
|
|
16
19
|
mappingData: IMappingImg;
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const jsonParser=(e,t={})=>{try{return typeof e=="string"?JSON.parse(e):___default.default.isObject(e)?e:t}catch(n){return t}},classnames=e=>{if(Array.isArray(e))return e.filter(t=>t).join(" ");if(___default.default.isObject(e)){const t=[];return Object.keys(e).forEach(n=>{e[n]&&t.push(n)}),t.join(" ")}return""},getBoundingRect=e=>{let t=Infinity,n=Infinity,r=-Infinity,o=-Infinity;for(const i of e)t=Math.min(t,i.x),n=Math.min(n,i.y),r=Math.max(r,i.x),o=Math.max(o,i.y);return{x:t,y:n,width:r-t,height:o-n}},isBoundingRectInImage=(()=>{const e=(t,n)=>{const r=Math.max(t.x,n.x),o=Math.max(t.y,n.y),i=Math.min(t.x+t.width,n.x+n.width),s=Math.min(t.y+t.height,n.y+n.height),a=i-r,u=s-o;return a>=0&&u>=0?{x:r,y:o,width:a,height:u}:null};return(t,n,r)=>{if(r[n]){const o=r[n].width,i=r[n].height;return e(t,{x:0,y:0,width:o,height:i})!==null}return!1}})(),getRectPointCloudBox=e=>{var t;const{pointCloudBox:n,mappingData:r,imageSizes:o}=e,{transferViewData:i}=(t=lbAnnotation.pointCloudLidar2image(n,r.calib))!=null?t:{};if(!i)return;const s=i.reduce((c,p)=>p.type==="line"?[...c,...p.pointList]:c,[]),a=__spreadProps(__spreadValues({},getBoundingRect(s)),{imageName:r.path});if(isBoundingRectInImage(a,r.path,o))return a};exports.classnames=classnames,exports.getBoundingRect=getBoundingRect,exports.getRectPointCloudBox=getRectPointCloudBox,exports.isBoundingRectInImage=isBoundingRectInImage,exports.jsonParser=jsonParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),index=require("../../../../constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const forbidStyle={color:"#CCCCCC"},PopconfirmTitle=({info:e})=>{const{t}=reactI18next.useTranslation();return e.key.startsWith("sure")?React__default.default.createElement("div",{key:e.key},`${t("ConfirmTo")}${e.name.slice(0)}\uFF1F`):React__default.default.createElement("span",null,e.name)},ActionIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:23,height:25,src:e}):e,ShowIcon=({isHover:e,info:t})=>{const
|
|
1
|
+
"use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),index=require("../../../../constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const forbidStyle={color:"#CCCCCC"},PopconfirmTitle=({info:e})=>{const{t}=reactI18next.useTranslation();return e.key.startsWith("sure")?React__default.default.createElement("div",{key:e.key},`${t("ConfirmTo")}${e.name.slice(0)}\uFF1F`):React__default.default.createElement("span",null,e.name)},ActionIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:23,height:25,src:e}):e,ShowIcon=({isHover:e,info:t})=>{const a=!!t.forbidOperation,l=t.key===e&&!a;let n={color:l?"#666fff":""};return a&&(n=forbidStyle),React__default.default.createElement("div",{style:{cursor:a?"not-allowed":"default"},onClick:()=>{var c;return(t==null?void 0:t.forbidConfirm)&&!a&&((c=t==null?void 0:t.onClick)==null?void 0:c.call(t))}},React__default.default.createElement("div",{className:"icon"},React__default.default.createElement(ActionIcon,{icon:l?t.hoverSvg:t.imgSvg})),React__default.default.createElement("div",{className:"toolName",style:n},t.name))},ActionsConfirm=({allOperation:e})=>{const t=React.useRef(null),[a,l]=React.useState(null),{t:n}=reactI18next.useTranslation(),c=Math.floor(24/e.length);return React__default.default.createElement("div",{className:"generalOperation",ref:t},e.map((r,u)=>React__default.default.createElement(antd.Col,{span:c,key:u,className:"generalOperation-col"},React__default.default.createElement("div",{key:r.key,className:"item",onMouseEnter:()=>{l(r.key)},onMouseLeave:()=>{l(null)}},r.forbidConfirm?React__default.default.createElement(ShowIcon,{info:r,isHover:a}):React__default.default.createElement(antd.Popconfirm,{title:React__default.default.createElement(PopconfirmTitle,{info:r}),placement:"topRight",okText:n("Confirm"),cancelText:n("Cancel"),getPopupContainer:()=>{var o;return(o=t.current)!=null?o:document.body},onConfirm:r.onClick,overlayClassName:`${index.prefix}-pop-confirm`},React__default.default.createElement("div",null,React__default.default.createElement(ShowIcon,{info:r,isHover:a})))))))};module.exports=ActionsConfirm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$2=require("../../../../constant/index.js"),index=require("../../../../utils/index.js"),antd=require("antd"),icons=require("@ant-design/icons"),index$1=require("../../../../components/longText/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const sidebarCls=`${index$2.prefix}-sidebar`,getAnnotatedList=(e,t,n)=>{const a=(e==null?void 0:e.attributeList)||[],u=t.map(l=>{var s,r;const d=((r=(s=a.filter(p=>p.value===l.attribute))==null?void 0:s[0])==null?void 0:r.key)||"";return __spreadProps(__spreadValues({},l),{label:d})});return(n==null?void 0:n.length)>0?u.filter(l=>n.includes(l.attribute)):u},NLPAnnotatedList=e=>{var t,n,a;const[u,l]=React.useState(0),s=React.useRef(null),{toolInstance:r,checkMode:d,stepInfo:p}=e,{t:c}=reactI18next.useTranslation(),x=index.jsonParser(p.config),[v,g]=React.useState("");React.useEffect(()=>(r&&r.on("changeAttributeSidebar",o=>{l(i=>i+1)}),()=>{r==null||r.unbindAll("changeAttributeSidebar")}),[r,s]);const[m]=r.exportData(),P=(n=(t=m==null?void 0:m[0])==null?void 0:t.textAnnotation)!=null?n:[],_=getAnnotatedList(x,P,(a=r==null?void 0:r.attributeLockList)!=null?a:[]),b=o=>{let i=o===v?"":o;r==null||r.setHighlightKey(i),g(i)},h=o=>{r==null||r.deleteTextAnnotation(o.id)};return(_==null?void 0:_.length)===0?null:React__default.default.createElement("div",{className:`${sidebarCls}__content__NLPList`},_.map((o,i)=>{const y=v===o.id;return React__default.default.createElement("div",{key:i,className:index.classnames({[`${sidebarCls}__content__NLPList__item`]:!0,[`${sidebarCls}__content__NLPList__item__active`]:y}),onClick:()=>b(o.id)},React__default.default.createElement(antd.Row,{className:`${sidebarCls}__content__NLPList__item__text`},React__default.default.createElement(antd.Col,{span:7},React__default.default.createElement(index$1,{text:`${o.label}\uFF0C${c("textTool")}: `,openByText:!0,isToolTips:!0})),React__default.default.createElement(antd.Col,{span:16,offset:1},React__default.default.createElement(index$1,{text:o.text,openByText:!0,isToolTips:!0}))),!d&&React__default.default.createElement(antd.Popconfirm,{title:c("DeleteCommentConfirm"),placement:"topRight",okText:c("Confirm"),cancelText:c("Cancel"),getPopupContainer:f=>f.parentElement,onConfirm:()=>h(o),overlayClassName:`${index$2.prefix}-pop-confirm`},React__default.default.createElement(icons.CloseOutlined,{className:`${sidebarCls}-pop-remove`,onClick:f=>{f.stopPropagation()}})))}))},mapStateToProps=e=>{var t,n;const a=StepUtils.getCurrentStepInfo((t=e.annotation)==null?void 0:t.step,(n=e.annotation)==null?void 0:n.stepList);return{toolInstance:e.annotation.toolInstance,stepInfo:a}};var NLPAnnotatedList$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(NLPAnnotatedList);exports.default=NLPAnnotatedList$1,exports.sidebarCls=sidebarCls;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index=require("../../../../utils/index.js"),index$1=require("../../../../components/LLMToolView/sidebar/components/determineGroup/index.js"),data=require("../../../../components/LLMToolView/utils/data.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(t,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(t,n,e[n]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e));const IndicatorDetermineList=t=>{const{toolInstance:e,stepInfo:n,disabeledAll:u,imgIndex:c,imgList:d}=t,[m]=e.exportData(),[i,
|
|
1
|
+
"use strict";var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index=require("../../../../utils/index.js"),index$1=require("../../../../components/LLMToolView/sidebar/components/determineGroup/index.js"),data=require("../../../../components/LLMToolView/utils/data.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(t,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(t,n,e[n]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e));const IndicatorDetermineList=t=>{const{toolInstance:e,stepInfo:n,disabeledAll:u,imgIndex:c,imgList:d}=t,[m]=e.exportData(),[i,g]=React.useState(m==null?void 0:m[0]),{t:_}=reactI18next.useTranslation(),[D,x]=React.useState(0);React.useEffect(()=>{var o;if(!d[c])return;const r=(o=d[c])!=null?o:{},a=data.getCurrentResultFromResultList((r==null?void 0:r.result)||"");g(a)},[c,d]),React.useEffect(()=>(e&&e.on("changeIndicatorDetermine",o=>{const[r]=e.exportData();g(r==null?void 0:r[0]),x(a=>a+1)}),()=>{e==null||e.unbindAll("changeIndicatorDetermine")}),[e]);const I=index.jsonParser(n.config),{indicatorDetermine:p}=I,y=o=>{var r;const{value:a,key:l}=o;if(l){const v={[l]:a},s=(r=i==null?void 0:i.indicatorDetermine)!=null?r:{},f=__spreadProps(__spreadValues({},i),{indicatorDetermine:__spreadValues(__spreadValues({},s),v)});e.updateResult(f)}};if((p==null?void 0:p.length)>0){const o=p.filter(r=>r==null?void 0:r.label);return React__default.default.createElement("div",{style:{padding:"12px",marginBottom:"12px"}},(o==null?void 0:o.length)>0&&React__default.default.createElement("div",null,React__default.default.createElement("div",{style:{fontSize:"16px",fontWeight:500,lineHeight:"46px"}},_("IndicatorJudgment")),React__default.default.createElement("div",{style:{maxHeight:"400px",overflow:"auto"}},o.map((r,a)=>{var l;const{label:v,value:s}=r;return React__default.default.createElement(index$1,{selectValue:(l=i==null?void 0:i.indicatorDetermine)==null?void 0:l[s],title:v,updateValue:f=>{y({key:s,value:f})},key:a,disabeledAll:u})}))))}return null},mapStateToProps=t=>{var e,n;const u=StepUtils.getCurrentStepInfo((e=t.annotation)==null?void 0:e.step,(n=t.annotation)==null?void 0:n.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:u,imgIndex:t.annotation.imgIndex,imgList:t.annotation.imgList}};var IndicatorDetermineList$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(IndicatorDetermineList);module.exports=IndicatorDetermineList$1;
|