@labelbee/lb-components 1.24.0-alpha.5 → 1.24.0-alpha.7
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/components/LLMMultiWheelView/sidebar/index.js +1 -1
- package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/components/LLMMultiWheelView/sidebar/index.js +1 -1
- package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),ctx=require("../../../store/ctx.js"),reactRedux=require("react-redux"),index$8=require("../../../constant/index.js"),reducer=require("../../../store/annotation/reducer.js"),index=require("../../../utils/index.js"),index$2=require("../../LLMToolView/sidebar/components/modelAnswerSort/index.js"),reactI18next=require("react-i18next"),annotation=require("../../../hooks/annotation.js"),_=require("lodash"),actionCreators=require("../../../store/annotation/actionCreators.js"),lbAnnotation=require("@labelbee/lb-annotation"),index$3=require("../../LLMToolView/sidebar/index.js"),index$5=require("../../LLMToolView/sidebar/components/textInputBox/index.js"),antd=require("antd"),index$7=require("../../LLMToolView/sidebar/components/answerList/index.js"),index$1=require("../../../store/LLMMultiWheel/index.js"),StepUtils=require("../../../utils/StepUtils.js"),data=require("../../LLMToolView/utils/data.js"),ahooks=require("ahooks"),index$4=require("../../LLMToolView/sidebar/components/answerSort/index.js"),index$6=require("../../tagList/components/overall/index.js");function _interopDefaultLegacy(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}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=(r,
|
|
1
|
+
"use strict";var React=require("react"),ctx=require("../../../store/ctx.js"),reactRedux=require("react-redux"),index$8=require("../../../constant/index.js"),reducer=require("../../../store/annotation/reducer.js"),index=require("../../../utils/index.js"),index$2=require("../../LLMToolView/sidebar/components/modelAnswerSort/index.js"),reactI18next=require("react-i18next"),annotation=require("../../../hooks/annotation.js"),_=require("lodash"),actionCreators=require("../../../store/annotation/actionCreators.js"),lbAnnotation=require("@labelbee/lb-annotation"),index$3=require("../../LLMToolView/sidebar/index.js"),index$5=require("../../LLMToolView/sidebar/components/textInputBox/index.js"),antd=require("antd"),index$7=require("../../LLMToolView/sidebar/components/answerList/index.js"),index$1=require("../../../store/LLMMultiWheel/index.js"),StepUtils=require("../../../utils/StepUtils.js"),data=require("../../LLMToolView/utils/data.js"),ahooks=require("ahooks"),index$4=require("../../LLMToolView/sidebar/components/answerSort/index.js"),index$6=require("../../tagList/components/overall/index.js");function _interopDefaultLegacy(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}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=(r,u,d)=>u in r?__defProp(r,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[u]=d,__spreadValues=(r,u)=>{for(var d in u||(u={}))__hasOwnProp.call(u,d)&&__defNormalProp(r,d,u[d]);if(__getOwnPropSymbols)for(var d of __getOwnPropSymbols(u))__propIsEnum.call(u,d)&&__defNormalProp(r,d,u[d]);return r},__spreadProps=(r,u)=>__defProps(r,__getOwnPropDescs(u));const EKeyCode=lbAnnotation.cKeyCode.default,sidebarCls=`${index$8.prefix}-sidebar`,initGlobalResult={sort:[],answerSort:{},textAttribute:[],tagList:{}},LLMMultiWheelToolSidebar=r=>{var u,d,N,B,k,W;const{annotation:oe,dispatch:C,checkMode:le}=r,{imgIndex:E,imgList:D,stepList:y,step:M,skipBeforePageTurning:h}=oe,[l,ie]=React.useState(),{t:x}=reactI18next.useTranslation(),o=(u=D[E])!=null?u:{},z=index.jsonParser(o==null?void 0:o.result),{toolInstanceRef:f}=annotation.useCustomToolInstance({basicInfo:z}),[$,ae]=React.useState(!0),[R,G]=React.useState({}),[p,K]=React.useState(initGlobalResult),I=React.useRef(),[m,O]=React.useState({}),{selectedID:A,setNewAnswerListMap:U,newAnswerListMap:Q}=index$1(),w=React.useMemo(()=>R[A],[A,R]),S=!f.current.valid||le;React.useEffect(()=>{var e;if(y&&M){const t=(e=reducer.getStepConfig(y,M))==null?void 0:e.config;ie(index.jsonParser(t))}},[M,JSON.stringify(y)]),React.useEffect(()=>{!o||E===-1||(f.current.setValid=J,f.current.clearResult=se,J(),H())},[E,l,o==null?void 0:o.id]);const se=()=>{var e,t,n,i;H((e=o==null?void 0:o.questionList)==null?void 0:e.textList),((t=I.current)==null?void 0:t.clearValue)&&((n=I.current)==null||n.clearValue());const{waitSorts:c}=index$2.getSorts({selectedSort:(i=L==null?void 0:L.sort)!=null?i:[],initSelected:[],modelList:q?P!=null?P:[]:[]});O(__spreadProps(__spreadValues({},m),{waitSorts:c,newSort:[]}))},J=e=>{var t;const n=e!=null?e:z.valid;_.isBoolean(n)&&(ae(n),f.current.valid=n,(t=f.current)==null||t.emit("validUpdated"))},ue=()=>{const e=StepUtils.getCurrentStepInfo(M,y);return data.getCurrentResultFromResultList(o==null?void 0:o.result,e.step)},L=React.useMemo(()=>ue(),[M,y,o]),H=ahooks.useMemoizedFn(e=>{var t,n,i,c,a,g,j;const s=L;let b=(t=o==null?void 0:o.questionList)==null?void 0:t.textList;((n=s==null?void 0:s.modelData)==null?void 0:n.length)&&f.current.valid&&(b=s==null?void 0:s.modelData),e&&(b=e,s.sort=[],s.textAttribute=[],s.answerSort=[]);let ne={};b==null||b.forEach((v,we)=>{var re;const Se=data.getRenderDataByResult(l,__spreadProps(__spreadValues({},v),{answerList:(re=v==null?void 0:v.answerList)==null?void 0:re.map((F,_e)=>((l==null?void 0:l.isTextEdit)&&U(__spreadProps(__spreadValues({},Q),{[`${v.id}-${F.id}`]:F.answer})),__spreadProps(__spreadValues({},F),{order:_e+1})))}));ne[v.id]=__spreadProps(__spreadValues({},Se),{order:we+1,id:v.id})});const{waitSorts:Le,newSort:ge}=index$2.getSorts({selectedSort:(i=L==null?void 0:L.sort)!=null?i:[],modelList:q?P!=null?P:[]:[]});O({waitSorts:Le,newSort:ge});const xe=((c=l==null?void 0:l.inputList)==null?void 0:c.filter(v=>v==null?void 0:v.isOverall))||[],me=data.getTagResult(xe,s==null?void 0:s.tagList);K({sort:(a=s==null?void 0:s.sort)!=null?a:[],textAttribute:(g=s==null?void 0:s.textAttribute)!=null?g:[],answerSort:(j=s==null?void 0:s.answerSort)!=null?j:{},tagList:me}),G(ne)});React.useEffect(()=>{de()},[R,$,p]),React.useEffect(()=>(window.addEventListener("keydown",X),()=>{window.removeEventListener("keydown",X)}),[]);const de=ahooks.useMemoizedFn(()=>{var e,t;const n=(t=(e=o==null?void 0:o.questionList)==null?void 0:e.textList)==null?void 0:t.map(c=>{var a;const g=(a=R[c.id])!=null?a:{};return{id:c.id,answerList:g.answerList}}),i=__spreadProps(__spreadValues({},p),{modelData:n});f.current.exportData=()=>[[i],{valid:$}],f.current.currentPageResult=__spreadProps(__spreadValues({},i),{toolName:lbAnnotation.EToolName.LLMMultiWheel,valid:$})}),X=e=>{if(e.ctrlKey&&e.keyCode===EKeyCode.Enter){if(h){h(()=>C(actionCreators.PageForward()));return}C(actionCreators.PageForward())}},ce=ahooks.useMemoizedFn(({order:e,value:t,key:n})=>{const{answerList:i}=w,c=i==null?void 0:i.map(a=>{var g,j;if((a==null?void 0:a.order)===e){if(n==="textEdit"&&_.isString(t)&&ee)return U(__spreadProps(__spreadValues({},Q),{[`${A}-${(g=a==null?void 0:a.id)!=null?g:""}`]:t})),__spreadProps(__spreadValues({},a),{newAnswer:t});if(_.isNumber(t))return __spreadProps(__spreadValues({},a),{score:t});if(_.isObject(t)&&n){const s={[t==null?void 0:t.key]:t.value},b=(j=a[n])!=null?j:{};return __spreadProps(__spreadValues({},a),{[n]:__spreadValues(__spreadValues({},b),s)})}}return a});G(a=>__spreadProps(__spreadValues({},a),{[A]:__spreadProps(__spreadValues({},w),{answerList:c})}))}),T=(e,t)=>{K(n=>__spreadProps(__spreadValues({},n),{[e]:t}))},{indicatorScore:Y=[],indicatorDetermine:Z=[],isTextEdit:ee,dialogSort:q=!1,inputList:V=[],tagInputListConfigurable:te,enableSort:ve=!1}=l||{},P=React.useMemo(()=>{var e,t,n;return q?(n=(t=(e=o==null?void 0:o.questionList)==null?void 0:e.textList)==null?void 0:t.map((i,c)=>__spreadProps(__spreadValues({},i),{title:c+1})))!=null?n:[]:[]},[o,q]);if(React.useMemo(()=>index$3.getLLMIsNoConfig(l),[l]))return React__default.default.createElement(index$3.EmptyConfig,null);const fe=te&&((d=V.filter(e=>!e.isOverall))==null?void 0:d.length)>0,pe=(Z==null?void 0:Z.length)>0||(Y==null?void 0:Y.length)>0||ee||fe;return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},React__default.default.createElement("div",{style:{fontSize:"18px",fontWeight:500,padding:"0px 16px",marginTop:"16px"}},x("GlobalAnnotation")),q&&React__default.default.createElement(index$4,{waitSortList:(m==null?void 0:m.waitSorts)||[],sortList:(m==null?void 0:m.newSort)||[],setSortList:e=>{const t=e.map(n=>n.map(i=>i.id));T("sort",t),O(__spreadProps(__spreadValues({},m),{newSort:e}))},disabeledAll:S,title:x("SortConversationQuality"),prefixId:"model"}),(l==null?void 0:l.text)&&React__default.default.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},React__default.default.createElement(index$5,{textAttribute:(N=p==null?void 0:p.textAttribute)!=null?N:[],textConfig:(l==null?void 0:l.text)&&_.isArray(l.text)?l==null?void 0:l.text:[],setText:e=>T("textAttribute",e),disabeledAll:S})),ve&&React__default.default.createElement(index$2.default,{modelData:(k=(B=o==null?void 0:o.questionList)==null?void 0:B.textList)!=null?k:[],selectedAnswerSort:e=>T("answerSort",e),selectedSort:(W=L==null?void 0:L.answerSort)!=null?W:[],ref:I,disabeledAll:S,imgIndex:E}),te&&V.length&&React__default.default.createElement(index$6,{inputList:V,selectedTags:(p==null?void 0:p.tagList)||{},updateValue:e=>{const{key:t,value:n}=e,i=(p==null?void 0:p.tagList)||{};T("tagList",__spreadProps(__spreadValues({},i),{[t]:n}))},disabeledAll:S}),w&&React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("div",{style:{fontSize:"18px",fontWeight:500,padding:"0px 16px",marginTop:"16px"}},x("QualifiedAnnotation")),React__default.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},React__default.default.createElement(antd.Button,{type:"primary",danger:!0},x("Annotating")),React__default.default.createElement("div",{style:{padding:16}},x("Group"),"\uFF1A",w.order)),React__default.default.createElement("div",null,pe&&React__default.default.createElement(index$7,{list:(w==null?void 0:w.answerList)||[],LLMConfig:l,updateValue:ce,disabeledAll:S})))),React__default.default.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(D==null?void 0:D.length)-1!==E&&React__default.default.createElement(antd.Button,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(h){h(()=>C(actionCreators.PageForward()));return}C(actionCreators.PageForward())},disabled:S},x("Save"))))},mapStateToProps=r=>({annotation:r.annotation});var LLMMultiWheelToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(LLMMultiWheelToolSidebar);module.exports=LLMMultiWheelToolSidebar$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../../components/LLMMultiWheelView/index.js"),index=require("../../../constant/index.js"),index$1=require("../../../utils/index.js"),dom=require("../../../utils/dom.js"),es=require("antd/es"),reResizable=require("re-resizable"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LLMMultiWheelViewCls=`${index.prefix}-LLMMultiWheelView`,{Sider,Content}=es.Layout,layoutCls=`${index.prefix}-layout`,LLMMultiWheelLayout=e=>{var t,l;return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index$1.classnames({[`${layoutCls}__content`]:!0,[`${index.prefix}-LLMLayout`]:!0})},React__default.default.createElement(index$2.default,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),React__default.default.createElement(index$3.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer})),React__default.default.createElement(reResizable.Resizable,{defaultSize:{width:600},enable:{left:!0}},React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:"100%",style:{position:"relative",height:"100%"}},React__default.default.createElement(index$4.default,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(l=e.drawLayerSlot)==null?void 0:l.call(e,{}))))};exports.LLMMultiWheelViewCls=LLMMultiWheelViewCls,exports.default=LLMMultiWheelLayout;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../../components/LLMMultiWheelView/index.js"),index=require("../../../constant/index.js"),index$1=require("../../../utils/index.js"),dom=require("../../../utils/dom.js"),es=require("antd/es"),reResizable=require("re-resizable"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LLMMultiWheelViewCls=`${index.prefix}-LLMMultiWheelView`,{Sider,Content}=es.Layout,layoutCls=`${index.prefix}-layout`,LLMMultiWheelLayout=e=>{var t,l;return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index$1.classnames({[`${layoutCls}__content`]:!0,[`${index.prefix}-LLMLayout`]:!0})},React__default.default.createElement(index$2.default,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),React__default.default.createElement(index$3.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer})),React__default.default.createElement(reResizable.Resizable,{defaultSize:{width:600},maxWidth:"95%",enable:{left:!0}},React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:"100%",style:{position:"relative",height:"100%"}},React__default.default.createElement(index$4.default,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(l=e.drawLayerSlot)==null?void 0:l.call(e,{}))))};exports.LLMMultiWheelViewCls=LLMMultiWheelViewCls,exports.default=LLMMultiWheelLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icons=require("@ant-design/icons"),ToolIcons=require("../ToolIcons.js"),ToolType=require("../../../../data/enums/ToolType.js"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../components/pointCloudView/PointCloudContext.js"),antd=require("antd"),StepUtils=require("../../../../utils/StepUtils.js"),reactRedux=require("react-redux"),index=require("../../../../utils/index.js"),useStatus=require("../../../../components/pointCloudView/hooks/useStatus.js"),useSingleBox=require("../../../../components/pointCloudView/hooks/useSingleBox.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$6=require("./components/batchUpdateModal/index.js"),index$1=require("./components/annotatedBox/index.js"),index$3=require("./components/rectRotateSensitivitySlider/index.js"),index$2=require("./components/findTrackIDIndex/index.js"),index$4=require("./components/firstFrameDataSwitch/index.js"),index$5=require("./components/selectBoxVisibleSwitch/index.js"),lbUtils=require("@labelbee/lb-utils"),index$7=require("../../../../components/attributeList/index.js"),useAttribute=require("../../../../components/pointCloudView/hooks/useAttribute.js"),lassoSelector=require("../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js"),lassoSelector_a=require("../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js"),circleSelector=require("../../../../assets/annotation/pointCloudTool/circleSelector.svg.js"),circleSelector_a=require("../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js"),icon_rect=require("../../../../assets/annotation/rectTool/icon_rect.svg.js"),icon_rect_a=require("../../../../assets/annotation/rectTool/icon_rect_a.svg.js"),index$9=require("../index.js"),actionCreators=require("../../../../store/annotation/actionCreators.js"),usePointCloudViews=require("../../../../components/pointCloudView/hooks/usePointCloudViews.js"),index$8=require("../../../../components/subAttributeList/index.js"),DynamicResizer=require("../../../../components/DynamicResizer/DynamicResizer.js"),_=require("lodash");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 BoxTrackIDInput=()=>{const[e,t]=React.useState(!1),n=React.useContext(PointCloudContext.PointCloudContext),{pointCloudBoxList:i}=n,{selectedBox:s,updateSelectedBox:o}=useSingleBox.useSingleBox(),[u,c]=React.useState(""),{t:v}=reactI18next.useTranslation(),m=s==null?void 0:s.info.trackID,r=React.useMemo(()=>_.isNumber(m)&&m>=0,[m]),a=d=>!!i.find(C=>C.trackID===d&&C.id!==(s==null?void 0:s.info.id)),g=(d=!1)=>{const p=parseInt(u,10);if(d&&t(!1),isNaN(p)){antd.message.error(v("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){antd.message.error(v("NotAllowDecimalPointsInTrackID"));return}if(a(p)){antd.message.error(v("DuplicateTrackIDsExist"));return}if(p<0){antd.message.error(v("PositiveIntegerCheck"));return}f(p)};React.useEffect(()=>{t(!1)},[m]);const f=d=>{var p;const C=o({trackID:d});(p=n==null?void 0:n.topViewInstance)==null||p.updatePolygonList(C!=null?C:[]),n.mainViewInstance&&n.selectedPointCloudBox&&(n==null||n.mainViewInstance.generateBox(n==null?void 0:n.selectedPointCloudBox))};return React__default.default.createElement("div",{style:{padding:24}},React__default.default.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},React__default.default.createElement("span",null,v("CurrentBoxTrackIDs")),r&&React__default.default.createElement(index$6,{id:m,updateCurrentPolygonList:d=>f(d)})),React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},e&&r?React__default.default.createElement(antd.Input,{defaultValue:m,onChange:d=>{c(d.target.value)},disabled:!r,size:"small",onBlur:()=>{g()},onPressEnter:()=>{g(!0)}}):React__default.default.createElement("span",null,m),React__default.default.createElement(icons.EditFilled,{style:{color:"#999",marginLeft:16,cursor:typeof m!="undefined"?"pointer":"not-allowed"},onClick:()=>{r&&t(!e)}})))},isAllowUpdateInSegment=({segmentStatus:e,globalPattern:t})=>t===lbUtils.EPointCloudPattern.Segmentation&&![lbUtils.EPointCloudSegmentStatus.Edit,lbUtils.EPointCloudSegmentStatus.Ready].includes(e),AttributeUpdater=({attributeList:e,subAttributeList:t,toolInstance:n,config:i,stepList:s,stepInfo:o,enableColorPicker:u})=>{const[c,v]=React.useState({segmentStatus:lbUtils.EPointCloudSegmentStatus.Ready}),{selectedBox:m}=useSingleBox.useSingleBox(),r=React.useContext(PointCloudContext.PointCloudContext),{ptSegmentInstance:a}=r,{t:g}=reactI18next.useTranslation(),{defaultAttribute:f}=useAttribute.useAttribute(),d=usePointCloudViews.usePointCloudViews(),{isPointCloudSegmentationPattern:p}=useStatus.useStatus(),C=ctx.useDispatch(),j={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};React.useEffect(()=>{if(!!a)return a.on("syncPointCloudStatus",v),()=>{a.unbind("syncPointCloudStatus",v)}},[a]);const q=(l,x)=>{var b,P,E,w,D;const y=(b=i==null?void 0:i.attributeList)==null?void 0:b.map(S=>S.value===l?__spreadProps(__spreadValues({},S),{color:x}):S),T=__spreadProps(__spreadValues({},i),{attributeList:y}),A=JSON.stringify(T),N=s==null?void 0:s.map(S=>(S==null?void 0:S.step)===(o==null?void 0:o.step)?__spreadProps(__spreadValues({},S),{config:A}):S);(P=r==null?void 0:r.topViewInstance)==null||P.updateAttributeList(y),(E=r==null?void 0:r.sideViewInstance)==null||E.updateAttributeList(y),(w=r==null?void 0:r.backViewInstance)==null||w.updateAttributeList(y),(D=r==null?void 0:r.mainViewInstance)==null||D.setConfig(T),C(actionCreators.SetTaskStepList({stepList:N}))},I=l=>{d.updateViewsByDefaultSize&&d.updateViewsByDefaultSize(l)},h=l=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:c.segmentStatus})||n.setDefaultAttribute(l)},L=(l,x)=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:c.segmentStatus})||n.setSubAttribute(l,x)},B=e.map(l=>({label:l.key,value:l.value,color:l==null?void 0:l.color,limit:l==null?void 0:l.limit,isDefault:l==null?void 0:l.isDefault})),V=m||c.cacheSegData&&c.segmentStatus===lbUtils.EPointCloudSegmentStatus.Edit,k=p;return React__default.default.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},React__default.default.createElement("div",{style:j},g("Attribute")),React__default.default.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},React__default.default.createElement(index$7.default,{list:B,forbidDefault:!0,selectedAttribute:f!=null?f:"",attributeChanged:l=>h(l),updateColorConfig:q,enableColorPicker:u,updateSize:I,forbidShowLimitPopover:k}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),V&&React__default.default.createElement(index$8,{subAttributeList:t,setSubAttribute:L,getValue:l=>{var x,b,P,E;return((b=(x=r.selectedPointCloudBox)==null?void 0:x.subAttribute)==null?void 0:b[l.value])||((E=(P=c.cacheSegData)==null?void 0:P.subAttribute)==null?void 0:E[l.value])}})))},renderSegmentTools=[{toolName:"LassoSelector",commonSvg:lassoSelector,selectedSvg:lassoSelector_a},{toolName:"RectSelector",commonSvg:icon_rect,selectedSvg:icon_rect_a},{toolName:"CircleSelector",commonSvg:circleSelector,selectedSvg:circleSelector_a}],PointCloudSegToolIcon=({toolInstance:e})=>{const{ptSegmentInstance:t}=React.useContext(PointCloudContext.PointCloudContext),[n,i]=React.useState("LassoSelector"),{t:s}=reactI18next.useTranslation();return React.useEffect(()=>{if(!t)return;const o=()=>{i("LassoSelector")},u=()=>{i("RectSelector")},c=()=>{i("CircleSelector")};return t.on("LassoSelector",o),t.on("RectSelector",u),t.on("CircleSelector",c),()=>{t.unbind("LassoSelector",o),t.unbind("RectSelector",u),t.unbind("CircleSelector",c)}},[t]),React__default.default.createElement("div",{className:`${index$9.sidebarCls}__level`},renderSegmentTools.map(o=>{const u=n===o.toolName;return React__default.default.createElement("span",{className:`${index$9.sidebarCls}__toolOption`,key:o.toolName,onClick:()=>t==null?void 0:t.emit(o.toolName)},React__default.default.createElement("img",{className:`${index$9.sidebarCls}__singleTool`,src:u?o==null?void 0:o.selectedSvg:o==null?void 0:o.commonSvg}),React__default.default.createElement("span",{className:index.classnames({[`${index$9.sidebarCls}__toolOption__selected`]:u})},s(o.toolName)))}))},PointCloudToolSidebar=({stepInfo:e,toolInstance:t,imgList:n,imgIndex:i,stepList:s,enableColorPicker:o})=>{var u,c;const{updatePointCloudPattern:v,pointCloudPattern:m,isPointCloudSegmentationPattern:r}=useStatus.useStatus(),a=index.jsonParser(e.config),g=(u=a==null?void 0:a.attributeList)!=null?u:[],f=(a==null?void 0:a.secondaryAttributeConfigurable)===!0?(c=a==null?void 0:a.inputList)!=null?c:[]:[];return r?React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudSegToolIcon,{toolInstance:t}),React__default.default.createElement(AttributeUpdater,{toolInstance:t,attributeList:g,subAttributeList:f,config:a,stepList:s,stepInfo:e,enableColorPicker:o})):React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(ToolIcons.ToolIcons,{toolName:lbAnnotation.cTool.EPointCloudName.PointCloud,selectedToolName:m,onChange:d=>v==null?void 0:v(d)}),React__default.default.createElement("div",{style:{flex:1,overflow:"hidden"}},React__default.default.createElement(DynamicResizer,{minTopHeight:42,defaultHeight:400,localKey:"id:"+(e==null?void 0:e.id)+"taskID:"+(e==null?void 0:e.taskID)+"step:"+(e==null?void 0:e.step)+"type:"+(e==null?void 0:e.type)},React__default.default.createElement(AttributeUpdater,{toolInstance:t,attributeList:g,subAttributeList:f,config:a,stepList:s,stepInfo:e,enableColorPicker:o}),(a==null?void 0:a.trackConfigurable)===!0&&m===ToolType.EToolName.Rect?React__default.default.createElement("div",{style:{height:"100%",overflow:"auto"}},React__default.default.createElement(BoxTrackIDInput,null),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$1,{imgList:n,imgIndex:i}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$2.default,{imgList:n,imgIndex:i}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$3,null),e.loadPreStep>0&&React__default.default.createElement(index$4,null),React__default.default.createElement(index$5,null)):React__default.default.createElement("div",null))))},mapStateToProps=e=>{var t,n,i,s;const o=StepUtils.getCurrentStepInfo((t=e.annotation)==null?void 0:t.step,(n=e.annotation)==null?void 0:n.stepList),u=(i=e.annotation)==null?void 0:i.toolInstance,c=(s=e.annotation)==null?void 0:s.stepList;return{stepInfo:o,toolInstance:u,imgList:e.annotation.imgList,imgIndex:e.annotation.imgIndex,stepList:c}};var PointCloudToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudToolSidebar);exports.PointCloudSegToolIcon=PointCloudSegToolIcon,exports.default=PointCloudToolSidebar$1;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icons=require("@ant-design/icons"),ToolIcons=require("../ToolIcons.js"),ToolType=require("../../../../data/enums/ToolType.js"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../components/pointCloudView/PointCloudContext.js"),antd=require("antd"),StepUtils=require("../../../../utils/StepUtils.js"),reactRedux=require("react-redux"),index=require("../../../../utils/index.js"),useStatus=require("../../../../components/pointCloudView/hooks/useStatus.js"),useSingleBox=require("../../../../components/pointCloudView/hooks/useSingleBox.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$6=require("./components/batchUpdateModal/index.js"),index$1=require("./components/annotatedBox/index.js"),index$3=require("./components/rectRotateSensitivitySlider/index.js"),index$2=require("./components/findTrackIDIndex/index.js"),index$4=require("./components/firstFrameDataSwitch/index.js"),index$5=require("./components/selectBoxVisibleSwitch/index.js"),lbUtils=require("@labelbee/lb-utils"),index$7=require("../../../../components/attributeList/index.js"),useAttribute=require("../../../../components/pointCloudView/hooks/useAttribute.js"),lassoSelector=require("../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js"),lassoSelector_a=require("../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js"),circleSelector=require("../../../../assets/annotation/pointCloudTool/circleSelector.svg.js"),circleSelector_a=require("../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js"),icon_rect=require("../../../../assets/annotation/rectTool/icon_rect.svg.js"),icon_rect_a=require("../../../../assets/annotation/rectTool/icon_rect_a.svg.js"),index$9=require("../index.js"),actionCreators=require("../../../../store/annotation/actionCreators.js"),usePointCloudViews=require("../../../../components/pointCloudView/hooks/usePointCloudViews.js"),index$8=require("../../../../components/subAttributeList/index.js"),DynamicResizer=require("../../../../components/DynamicResizer/DynamicResizer.js"),_=require("lodash");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 BoxTrackIDInput=()=>{const[e,t]=React.useState(!1),n=React.useContext(PointCloudContext.PointCloudContext),{pointCloudBoxList:i}=n,{selectedBox:s,updateSelectedBox:o}=useSingleBox.useSingleBox(),[u,c]=React.useState(""),{t:v}=reactI18next.useTranslation(),m=s==null?void 0:s.info.trackID,r=React.useMemo(()=>_.isNumber(m)&&m>=0,[m]),a=d=>!!i.find(C=>C.trackID===d&&C.id!==(s==null?void 0:s.info.id)),g=(d=!1)=>{const p=parseInt(u,10);if(d&&t(!1),isNaN(p)){antd.message.error(v("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){antd.message.error(v("NotAllowDecimalPointsInTrackID"));return}if(a(p)){antd.message.error(v("DuplicateTrackIDsExist"));return}if(!(p>0)){antd.message.error(v("PositiveIntegerCheck"));return}f(p)};React.useEffect(()=>{t(!1)},[m]);const f=d=>{var p;const C=o({trackID:d});(p=n==null?void 0:n.topViewInstance)==null||p.updatePolygonList(C!=null?C:[]),n.mainViewInstance&&n.selectedPointCloudBox&&(n==null||n.mainViewInstance.generateBox(n==null?void 0:n.selectedPointCloudBox))};return React__default.default.createElement("div",{style:{padding:24}},React__default.default.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},React__default.default.createElement("span",null,v("CurrentBoxTrackIDs")),r&&React__default.default.createElement(index$6,{id:m,updateCurrentPolygonList:d=>f(d)})),React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},e&&r?React__default.default.createElement(antd.Input,{defaultValue:m,onChange:d=>{c(d.target.value)},disabled:!r,size:"small",onBlur:()=>{g()},onPressEnter:()=>{g(!0)}}):React__default.default.createElement("span",null,m),React__default.default.createElement(icons.EditFilled,{style:{color:"#999",marginLeft:16,cursor:typeof m!="undefined"?"pointer":"not-allowed"},onClick:()=>{r&&t(!e)}})))},isAllowUpdateInSegment=({segmentStatus:e,globalPattern:t})=>t===lbUtils.EPointCloudPattern.Segmentation&&![lbUtils.EPointCloudSegmentStatus.Edit,lbUtils.EPointCloudSegmentStatus.Ready].includes(e),AttributeUpdater=({attributeList:e,subAttributeList:t,toolInstance:n,config:i,stepList:s,stepInfo:o,enableColorPicker:u})=>{const[c,v]=React.useState({segmentStatus:lbUtils.EPointCloudSegmentStatus.Ready}),{selectedBox:m}=useSingleBox.useSingleBox(),r=React.useContext(PointCloudContext.PointCloudContext),{ptSegmentInstance:a}=r,{t:g}=reactI18next.useTranslation(),{defaultAttribute:f}=useAttribute.useAttribute(),d=usePointCloudViews.usePointCloudViews(),{isPointCloudSegmentationPattern:p}=useStatus.useStatus(),C=ctx.useDispatch(),j={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};React.useEffect(()=>{if(!!a)return a.on("syncPointCloudStatus",v),()=>{a.unbind("syncPointCloudStatus",v)}},[a]);const q=(l,x)=>{var b,P,E,w,D;const y=(b=i==null?void 0:i.attributeList)==null?void 0:b.map(S=>S.value===l?__spreadProps(__spreadValues({},S),{color:x}):S),T=__spreadProps(__spreadValues({},i),{attributeList:y}),A=JSON.stringify(T),N=s==null?void 0:s.map(S=>(S==null?void 0:S.step)===(o==null?void 0:o.step)?__spreadProps(__spreadValues({},S),{config:A}):S);(P=r==null?void 0:r.topViewInstance)==null||P.updateAttributeList(y),(E=r==null?void 0:r.sideViewInstance)==null||E.updateAttributeList(y),(w=r==null?void 0:r.backViewInstance)==null||w.updateAttributeList(y),(D=r==null?void 0:r.mainViewInstance)==null||D.setConfig(T),C(actionCreators.SetTaskStepList({stepList:N}))},I=l=>{d.updateViewsByDefaultSize&&d.updateViewsByDefaultSize(l)},h=l=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:c.segmentStatus})||n.setDefaultAttribute(l)},L=(l,x)=>{isAllowUpdateInSegment({globalPattern:r.globalPattern,segmentStatus:c.segmentStatus})||n.setSubAttribute(l,x)},B=e.map(l=>({label:l.key,value:l.value,color:l==null?void 0:l.color,limit:l==null?void 0:l.limit,isDefault:l==null?void 0:l.isDefault})),V=m||c.cacheSegData&&c.segmentStatus===lbUtils.EPointCloudSegmentStatus.Edit,k=p;return React__default.default.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},React__default.default.createElement("div",{style:j},g("Attribute")),React__default.default.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},React__default.default.createElement(index$7.default,{list:B,forbidDefault:!0,selectedAttribute:f!=null?f:"",attributeChanged:l=>h(l),updateColorConfig:q,enableColorPicker:u,updateSize:I,forbidShowLimitPopover:k}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),V&&React__default.default.createElement(index$8,{subAttributeList:t,setSubAttribute:L,getValue:l=>{var x,b,P,E;return((b=(x=r.selectedPointCloudBox)==null?void 0:x.subAttribute)==null?void 0:b[l.value])||((E=(P=c.cacheSegData)==null?void 0:P.subAttribute)==null?void 0:E[l.value])}})))},renderSegmentTools=[{toolName:"LassoSelector",commonSvg:lassoSelector,selectedSvg:lassoSelector_a},{toolName:"RectSelector",commonSvg:icon_rect,selectedSvg:icon_rect_a},{toolName:"CircleSelector",commonSvg:circleSelector,selectedSvg:circleSelector_a}],PointCloudSegToolIcon=({toolInstance:e})=>{const{ptSegmentInstance:t}=React.useContext(PointCloudContext.PointCloudContext),[n,i]=React.useState("LassoSelector"),{t:s}=reactI18next.useTranslation();return React.useEffect(()=>{if(!t)return;const o=()=>{i("LassoSelector")},u=()=>{i("RectSelector")},c=()=>{i("CircleSelector")};return t.on("LassoSelector",o),t.on("RectSelector",u),t.on("CircleSelector",c),()=>{t.unbind("LassoSelector",o),t.unbind("RectSelector",u),t.unbind("CircleSelector",c)}},[t]),React__default.default.createElement("div",{className:`${index$9.sidebarCls}__level`},renderSegmentTools.map(o=>{const u=n===o.toolName;return React__default.default.createElement("span",{className:`${index$9.sidebarCls}__toolOption`,key:o.toolName,onClick:()=>t==null?void 0:t.emit(o.toolName)},React__default.default.createElement("img",{className:`${index$9.sidebarCls}__singleTool`,src:u?o==null?void 0:o.selectedSvg:o==null?void 0:o.commonSvg}),React__default.default.createElement("span",{className:index.classnames({[`${index$9.sidebarCls}__toolOption__selected`]:u})},s(o.toolName)))}))},PointCloudToolSidebar=({stepInfo:e,toolInstance:t,imgList:n,imgIndex:i,stepList:s,enableColorPicker:o})=>{var u,c;const{updatePointCloudPattern:v,pointCloudPattern:m,isPointCloudSegmentationPattern:r}=useStatus.useStatus(),a=index.jsonParser(e.config),g=(u=a==null?void 0:a.attributeList)!=null?u:[],f=(a==null?void 0:a.secondaryAttributeConfigurable)===!0?(c=a==null?void 0:a.inputList)!=null?c:[]:[];return r?React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudSegToolIcon,{toolInstance:t}),React__default.default.createElement(AttributeUpdater,{toolInstance:t,attributeList:g,subAttributeList:f,config:a,stepList:s,stepInfo:e,enableColorPicker:o})):React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(ToolIcons.ToolIcons,{toolName:lbAnnotation.cTool.EPointCloudName.PointCloud,selectedToolName:m,onChange:d=>v==null?void 0:v(d)}),React__default.default.createElement("div",{style:{flex:1,overflow:"hidden"}},React__default.default.createElement(DynamicResizer,{minTopHeight:42,defaultHeight:400,localKey:"id:"+(e==null?void 0:e.id)+"taskID:"+(e==null?void 0:e.taskID)+"step:"+(e==null?void 0:e.step)+"type:"+(e==null?void 0:e.type)},React__default.default.createElement(AttributeUpdater,{toolInstance:t,attributeList:g,subAttributeList:f,config:a,stepList:s,stepInfo:e,enableColorPicker:o}),(a==null?void 0:a.trackConfigurable)===!0&&m===ToolType.EToolName.Rect?React__default.default.createElement("div",{style:{height:"100%",overflow:"auto"}},React__default.default.createElement(BoxTrackIDInput,null),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$1,{imgList:n,imgIndex:i}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$2.default,{imgList:n,imgIndex:i}),React__default.default.createElement(antd.Divider,{style:{margin:0}}),React__default.default.createElement(index$3,null),e.loadPreStep>0&&React__default.default.createElement(index$4,null),React__default.default.createElement(index$5,null)):React__default.default.createElement("div",null))))},mapStateToProps=e=>{var t,n,i,s;const o=StepUtils.getCurrentStepInfo((t=e.annotation)==null?void 0:t.step,(n=e.annotation)==null?void 0:n.stepList),u=(i=e.annotation)==null?void 0:i.toolInstance,c=(s=e.annotation)==null?void 0:s.stepList;return{stepInfo:o,toolInstance:u,imgList:e.annotation.imgList,imgIndex:e.annotation.imgIndex,stepList:c}};var PointCloudToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudToolSidebar);exports.PointCloudSegToolIcon=PointCloudSegToolIcon,exports.default=PointCloudToolSidebar$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r,{useState as
|
|
1
|
+
import r,{useState as C,useRef as It,useMemo as N,useEffect as $}from"react";import{LabelBeeContext as Vt}from"../../../store/ctx.js";import{connect as Nt}from"react-redux";import{prefix as $t}from"../../../constant/index.js";import{getStepConfig as Bt}from"../../../store/annotation/reducer.js";import{jsonParser as ct}from"../../../utils/index.js";import Wt,{getSorts as pt}from"../../LLMToolView/sidebar/components/modelAnswerSort/index.js";import{useTranslation as Ft}from"react-i18next";import{useCustomToolInstance as kt}from"../../../hooks/annotation.js";import{isBoolean as qt,isString as Gt,isNumber as Kt,isObject as zt,isArray as Ut}from"lodash";import{PageForward as B}from"../../../store/annotation/actionCreators.js";import{cKeyCode as Qt,EToolName as Jt}from"@labelbee/lb-annotation";import{getLLMIsNoConfig as Ht,EmptyConfig as Xt}from"../../LLMToolView/sidebar/index.js";import Yt from"../../LLMToolView/sidebar/components/textInputBox/index.js";import{Button as mt}from"antd";import Zt from"../../LLMToolView/sidebar/components/answerList/index.js";import te from"../../../store/LLMMultiWheel/index.js";import ee from"../../../utils/StepUtils.js";import{getRenderDataByResult as ne,getTagResult as oe,getCurrentResultFromResultList as re}from"../../LLMToolView/utils/data.js";import{useMemoizedFn as z}from"ahooks";import le from"../../LLMToolView/sidebar/components/answerSort/index.js";import ie from"../../tagList/components/overall/index.js";var se=Object.defineProperty,ae=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,vt=(p,c,m)=>c in p?se(p,c,{enumerable:!0,configurable:!0,writable:!0,value:m}):p[c]=m,l=(p,c)=>{for(var m in c||(c={}))de.call(c,m)&&vt(p,m,c[m]);if(ft)for(var m of ft(c))ce.call(c,m)&&vt(p,m,c[m]);return p},d=(p,c)=>ae(p,ue(c));const pe=Qt.default,Lt=`${$t}-sidebar`,me={sort:[],answerSort:{},textAttribute:[],tagList:{}},fe=p=>{var c,m,U,Q,J,H;const{annotation:gt,dispatch:R,checkMode:xt}=p,{imgIndex:M,imgList:W,stepList:A,step:T,skipBeforePageTurning:D}=gt,[i,wt]=C(),{t:S}=Ft(),o=(c=W[M])!=null?c:{},X=ct(o==null?void 0:o.result),{toolInstanceRef:L}=kt({basicInfo:X}),[F,St]=C(!0),[O,Y]=C({}),[g,Z]=C(me),k=It(),[_,q]=C({}),{selectedID:P,setNewAnswerListMap:tt,newAnswerListMap:et}=te(),b=N(()=>O[P],[P,O]),y=!L.current.valid||xt;$(()=>{var t;if(A&&T){const e=(t=Bt(A,T))==null?void 0:t.config;wt(ct(e))}},[T,JSON.stringify(A)]),$(()=>{!o||M===-1||(L.current.setValid=nt,L.current.clearResult=_t,nt(),ot())},[M,i,o==null?void 0:o.id]);const _t=()=>{var t,e,n,s;ot((t=o==null?void 0:o.questionList)==null?void 0:t.textList),((e=k.current)==null?void 0:e.clearValue)&&((n=k.current)==null||n.clearValue());const{waitSorts:f}=pt({selectedSort:(s=x==null?void 0:x.sort)!=null?s:[],initSelected:[],modelList:h?V!=null?V:[]:[]});q(d(l({},_),{waitSorts:f,newSort:[]}))},nt=t=>{var e;const n=t!=null?t:X.valid;qt(n)&&(St(n),L.current.valid=n,(e=L.current)==null||e.emit("validUpdated"))},bt=()=>{const t=ee.getCurrentStepInfo(T,A);return re(o==null?void 0:o.result,t.step)},x=N(()=>bt(),[T,A,o]),ot=z(t=>{var e,n,s,f,a,w,j;const u=x;let E=(e=o==null?void 0:o.questionList)==null?void 0:e.textList;((n=u==null?void 0:u.modelData)==null?void 0:n.length)&&L.current.valid&&(E=u==null?void 0:u.modelData),t&&(E=t,u.sort=[],u.textAttribute=[],u.answerSort=[]);let ut={};E==null||E.forEach((v,Dt)=>{var dt;const Ot=ne(i,d(l({},v),{answerList:(dt=v==null?void 0:v.answerList)==null?void 0:dt.map((K,Pt)=>((i==null?void 0:i.isTextEdit)&&tt(d(l({},et),{[`${v.id}-${K.id}`]:K.answer})),d(l({},K),{order:Pt+1})))}));ut[v.id]=d(l({},Ot),{order:Dt+1,id:v.id})});const{waitSorts:ht,newSort:jt}=pt({selectedSort:(s=x==null?void 0:x.sort)!=null?s:[],modelList:h?V!=null?V:[]:[]});q({waitSorts:ht,newSort:jt});const Ct=((f=i==null?void 0:i.inputList)==null?void 0:f.filter(v=>v==null?void 0:v.isOverall))||[],Rt=oe(Ct,u==null?void 0:u.tagList);Z({sort:(a=u==null?void 0:u.sort)!=null?a:[],textAttribute:(w=u==null?void 0:u.textAttribute)!=null?w:[],answerSort:(j=u==null?void 0:u.answerSort)!=null?j:{},tagList:Rt}),Y(ut)});$(()=>{yt()},[O,F,g]),$(()=>(window.addEventListener("keydown",rt),()=>{window.removeEventListener("keydown",rt)}),[]);const yt=z(()=>{var t,e;const n=(e=(t=o==null?void 0:o.questionList)==null?void 0:t.textList)==null?void 0:e.map(f=>{var a;const w=(a=O[f.id])!=null?a:{};return{id:f.id,answerList:w.answerList}}),s=d(l({},g),{modelData:n});L.current.exportData=()=>[[s],{valid:F}],L.current.currentPageResult=d(l({},s),{toolName:Jt.LLMMultiWheel,valid:F})}),rt=t=>{if(t.ctrlKey&&t.keyCode===pe.Enter){if(D){D(()=>R(B()));return}R(B())}},Et=z(({order:t,value:e,key:n})=>{const{answerList:s}=b,f=s==null?void 0:s.map(a=>{var w,j;if((a==null?void 0:a.order)===t){if(n==="textEdit"&&Gt(e)&&st)return tt(d(l({},et),{[`${P}-${(w=a==null?void 0:a.id)!=null?w:""}`]:e})),d(l({},a),{newAnswer:e});if(Kt(e))return d(l({},a),{score:e});if(zt(e)&&n){const u={[e==null?void 0:e.key]:e.value},E=(j=a[n])!=null?j:{};return d(l({},a),{[n]:l(l({},E),u)})}}return a});Y(a=>d(l({},a),{[P]:d(l({},b),{answerList:f})}))}),I=(t,e)=>{Z(n=>d(l({},n),{[t]:e}))},{indicatorScore:lt=[],indicatorDetermine:it=[],isTextEdit:st,dialogSort:h=!1,inputList:G=[],tagInputListConfigurable:at,enableSort:Mt=!1}=i||{},V=N(()=>{var t,e,n;return h?(n=(e=(t=o==null?void 0:o.questionList)==null?void 0:t.textList)==null?void 0:e.map((s,f)=>d(l({},s),{title:f+1})))!=null?n:[]:[]},[o,h]);if(N(()=>Ht(i),[i]))return r.createElement(Xt,null);const At=at&&((m=G.filter(t=>!t.isOverall))==null?void 0:m.length)>0,Tt=(it==null?void 0:it.length)>0||(lt==null?void 0:lt.length)>0||st||At;return r.createElement("div",{className:`${Lt}`},r.createElement("div",{className:`${Lt}__content`},r.createElement("div",{style:{fontSize:"18px",fontWeight:500,padding:"0px 16px",marginTop:"16px"}},S("GlobalAnnotation")),h&&r.createElement(le,{waitSortList:(_==null?void 0:_.waitSorts)||[],sortList:(_==null?void 0:_.newSort)||[],setSortList:t=>{const e=t.map(n=>n.map(s=>s.id));I("sort",e),q(d(l({},_),{newSort:t}))},disabeledAll:y,title:S("SortConversationQuality"),prefixId:"model"}),(i==null?void 0:i.text)&&r.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},r.createElement(Yt,{textAttribute:(U=g==null?void 0:g.textAttribute)!=null?U:[],textConfig:(i==null?void 0:i.text)&&Ut(i.text)?i==null?void 0:i.text:[],setText:t=>I("textAttribute",t),disabeledAll:y})),Mt&&r.createElement(Wt,{modelData:(J=(Q=o==null?void 0:o.questionList)==null?void 0:Q.textList)!=null?J:[],selectedAnswerSort:t=>I("answerSort",t),selectedSort:(H=x==null?void 0:x.answerSort)!=null?H:[],ref:k,disabeledAll:y,imgIndex:M}),at&&G.length&&r.createElement(ie,{inputList:G,selectedTags:(g==null?void 0:g.tagList)||{},updateValue:t=>{const{key:e,value:n}=t,s=(g==null?void 0:g.tagList)||{};I("tagList",d(l({},s),{[e]:n}))},disabeledAll:y}),b&&r.createElement(r.Fragment,null,r.createElement("div",{style:{fontSize:"18px",fontWeight:500,padding:"0px 16px",marginTop:"16px"}},S("QualifiedAnnotation")),r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},r.createElement(mt,{type:"primary",danger:!0},S("Annotating")),r.createElement("div",{style:{padding:16}},S("Group"),"\uFF1A",b.order)),r.createElement("div",null,Tt&&r.createElement(Zt,{list:(b==null?void 0:b.answerList)||[],LLMConfig:i,updateValue:Et,disabeledAll:y})))),r.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(W==null?void 0:W.length)-1!==M&&r.createElement(mt,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(D){D(()=>R(B()));return}R(B())},disabled:y},S("Save"))))},ve=p=>({annotation:p.annotation});var Le=Nt(ve,null,null,{context:Vt})(fe);export{Le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"../../../components/LLMMultiWheelView/index.js";import{prefix as l}from"../../../constant/index.js";import{classnames as m}from"../../../utils/index.js";import{getClassName as d}from"../../../utils/dom.js";import{Layout as a}from"antd/es";import{Resizable as s}from"re-resizable";import t from"react";import c from"../sidebar/index.js";import u from"../toolFooter/index.js";const f=`${l}-LLMMultiWheelView`,{Sider:L,Content:h}=a,r=`${l}-layout`,M=e=>{var i,o;return t.createElement(a,{className:d("layout","container")},e==null?void 0:e.leftSider,t.createElement(h,{className:m({[`${r}__content`]:!0,[`${l}-LLMLayout`]:!0})},t.createElement(n,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),t.createElement(u,{style:(i=e.style)==null?void 0:i.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(s,{defaultSize:{width:600},enable:{left:!0}},t.createElement(L,{className:`${r}__side`,width:"100%",style:{position:"relative",height:"100%"}},t.createElement(c,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(o=e.drawLayerSlot)==null?void 0:o.call(e,{}))))};export{f as LLMMultiWheelViewCls,M as default};
|
|
1
|
+
import n from"../../../components/LLMMultiWheelView/index.js";import{prefix as l}from"../../../constant/index.js";import{classnames as m}from"../../../utils/index.js";import{getClassName as d}from"../../../utils/dom.js";import{Layout as a}from"antd/es";import{Resizable as s}from"re-resizable";import t from"react";import c from"../sidebar/index.js";import u from"../toolFooter/index.js";const f=`${l}-LLMMultiWheelView`,{Sider:L,Content:h}=a,r=`${l}-layout`,M=e=>{var i,o;return t.createElement(a,{className:d("layout","container")},e==null?void 0:e.leftSider,t.createElement(h,{className:m({[`${r}__content`]:!0,[`${l}-LLMLayout`]:!0})},t.createElement(n,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),t.createElement(u,{style:(i=e.style)==null?void 0:i.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(s,{defaultSize:{width:600},maxWidth:"95%",enable:{left:!0}},t.createElement(L,{className:`${r}__side`,width:"100%",style:{position:"relative",height:"100%"}},t.createElement(c,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(o=e.drawLayerSlot)==null?void 0:o.call(e,{}))))};export{f as LLMMultiWheelViewCls,M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as w,useContext as T,useMemo as ot,useEffect as L}from"react";import{EditFilled as nt}from"@ant-design/icons";import{ToolIcons as lt}from"../ToolIcons.js";import{EToolName as it}from"../../../../data/enums/ToolType.js";import{cTool as rt}from"@labelbee/lb-annotation";import{PointCloudContext as B}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as D,Input as st,message as h}from"antd";import at from"../../../../utils/StepUtils.js";import{connect as ct}from"react-redux";import{jsonParser as ut,classnames as mt}from"../../../../utils/index.js";import{useStatus as $}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as z}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as k}from"react-i18next";import{LabelBeeContext as dt,useDispatch as pt}from"../../../../store/ctx.js";import ft from"./components/batchUpdateModal/index.js";import vt from"./components/annotatedBox/index.js";import gt from"./components/rectRotateSensitivitySlider/index.js";import St from"./components/findTrackIDIndex/index.js";import bt from"./components/firstFrameDataSwitch/index.js";import Ct from"./components/selectBoxVisibleSwitch/index.js";import{EPointCloudSegmentStatus as j,EPointCloudPattern as xt}from"@labelbee/lb-utils";import Et from"../../../../components/attributeList/index.js";import{useAttribute as Pt}from"../../../../components/pointCloudView/hooks/useAttribute.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import yt from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import wt from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import Dt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import ht from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import jt from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as I}from"../index.js";import{SetTaskStepList as It}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as Tt}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Lt from"../../../../components/subAttributeList/index.js";import Bt from"../../../../components/DynamicResizer/DynamicResizer.js";import{isNumber as kt}from"lodash";var Vt=Object.defineProperty,At=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,U=(o,t,n)=>t in o?Vt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,V=(o,t)=>{for(var n in t||(t={}))Ot.call(t,n)&&U(o,n,t[n]);if(F)for(var n of F(t))Rt.call(t,n)&&U(o,n,t[n]);return o},A=(o,t)=>At(o,Nt(t));const $t=()=>{const[o,t]=w(!1),n=T(B),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:l}=z(),[u,m]=w(""),{t:f}=k(),p=c==null?void 0:c.info.trackID,r=ot(()=>kt(p)&&p>=0,[p]),s=d=>!!a.find(C=>C.trackID===d&&C.id!==(c==null?void 0:c.info.id)),b=(d=!1)=>{const v=parseInt(u,10);if(d&&t(!1),isNaN(v)){h.error(f("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){h.error(f("NotAllowDecimalPointsInTrackID"));return}if(s(v)){h.error(f("DuplicateTrackIDsExist"));return}if(v
|
|
1
|
+
import e,{useState as w,useContext as T,useMemo as ot,useEffect as L}from"react";import{EditFilled as nt}from"@ant-design/icons";import{ToolIcons as lt}from"../ToolIcons.js";import{EToolName as it}from"../../../../data/enums/ToolType.js";import{cTool as rt}from"@labelbee/lb-annotation";import{PointCloudContext as B}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as D,Input as st,message as h}from"antd";import at from"../../../../utils/StepUtils.js";import{connect as ct}from"react-redux";import{jsonParser as ut,classnames as mt}from"../../../../utils/index.js";import{useStatus as $}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as z}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as k}from"react-i18next";import{LabelBeeContext as dt,useDispatch as pt}from"../../../../store/ctx.js";import ft from"./components/batchUpdateModal/index.js";import vt from"./components/annotatedBox/index.js";import gt from"./components/rectRotateSensitivitySlider/index.js";import St from"./components/findTrackIDIndex/index.js";import bt from"./components/firstFrameDataSwitch/index.js";import Ct from"./components/selectBoxVisibleSwitch/index.js";import{EPointCloudSegmentStatus as j,EPointCloudPattern as xt}from"@labelbee/lb-utils";import Et from"../../../../components/attributeList/index.js";import{useAttribute as Pt}from"../../../../components/pointCloudView/hooks/useAttribute.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import yt from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import wt from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import Dt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import ht from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import jt from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as I}from"../index.js";import{SetTaskStepList as It}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as Tt}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Lt from"../../../../components/subAttributeList/index.js";import Bt from"../../../../components/DynamicResizer/DynamicResizer.js";import{isNumber as kt}from"lodash";var Vt=Object.defineProperty,At=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,U=(o,t,n)=>t in o?Vt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,V=(o,t)=>{for(var n in t||(t={}))Ot.call(t,n)&&U(o,n,t[n]);if(F)for(var n of F(t))Rt.call(t,n)&&U(o,n,t[n]);return o},A=(o,t)=>At(o,Nt(t));const $t=()=>{const[o,t]=w(!1),n=T(B),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:l}=z(),[u,m]=w(""),{t:f}=k(),p=c==null?void 0:c.info.trackID,r=ot(()=>kt(p)&&p>=0,[p]),s=d=>!!a.find(C=>C.trackID===d&&C.id!==(c==null?void 0:c.info.id)),b=(d=!1)=>{const v=parseInt(u,10);if(d&&t(!1),isNaN(v)){h.error(f("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){h.error(f("NotAllowDecimalPointsInTrackID"));return}if(s(v)){h.error(f("DuplicateTrackIDsExist"));return}if(!(v>0)){h.error(f("PositiveIntegerCheck"));return}g(v)};L(()=>{t(!1)},[p]);const g=d=>{var v;const C=l({trackID:d});(v=n==null?void 0:n.topViewInstance)==null||v.updatePolygonList(C!=null?C:[]),n.mainViewInstance&&n.selectedPointCloudBox&&(n==null||n.mainViewInstance.generateBox(n==null?void 0:n.selectedPointCloudBox))};return e.createElement("div",{style:{padding:24}},e.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},e.createElement("span",null,f("CurrentBoxTrackIDs")),r&&e.createElement(ft,{id:p,updateCurrentPolygonList:d=>g(d)})),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},o&&r?e.createElement(st,{defaultValue:p,onChange:d=>{m(d.target.value)},disabled:!r,size:"small",onBlur:()=>{b()},onPressEnter:()=>{b(!0)}}):e.createElement("span",null,p),e.createElement(nt,{style:{color:"#999",marginLeft:16,cursor:typeof p!="undefined"?"pointer":"not-allowed"},onClick:()=>{r&&t(!o)}})))},H=({segmentStatus:o,globalPattern:t})=>t===xt.Segmentation&&![j.Edit,j.Ready].includes(o),M=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:l,enableColorPicker:u})=>{const[m,f]=w({segmentStatus:j.Ready}),{selectedBox:p}=z(),r=T(B),{ptSegmentInstance:s}=r,{t:b}=k(),{defaultAttribute:g}=Pt(),d=Tt(),{isPointCloudSegmentationPattern:v}=$(),C=pt(),J={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};L(()=>{if(!!s)return s.on("syncPointCloudStatus",f),()=>{s.unbind("syncPointCloudStatus",f)}},[s]);const K=(i,x)=>{var E,P,_,N,O;const y=(E=a==null?void 0:a.attributeList)==null?void 0:E.map(S=>S.value===i?A(V({},S),{color:x}):S),R=A(V({},a),{attributeList:y}),tt=JSON.stringify(R),et=c==null?void 0:c.map(S=>(S==null?void 0:S.step)===(l==null?void 0:l.step)?A(V({},S),{config:tt}):S);(P=r==null?void 0:r.topViewInstance)==null||P.updateAttributeList(y),(_=r==null?void 0:r.sideViewInstance)==null||_.updateAttributeList(y),(N=r==null?void 0:r.backViewInstance)==null||N.updateAttributeList(y),(O=r==null?void 0:r.mainViewInstance)==null||O.setConfig(R),C(It({stepList:et}))},X=i=>{d.updateViewsByDefaultSize&&d.updateViewsByDefaultSize(i)},Y=i=>{H({globalPattern:r.globalPattern,segmentStatus:m.segmentStatus})||n.setDefaultAttribute(i)},q=(i,x)=>{H({globalPattern:r.globalPattern,segmentStatus:m.segmentStatus})||n.setSubAttribute(i,x)},G=o.map(i=>({label:i.key,value:i.value,color:i==null?void 0:i.color,limit:i==null?void 0:i.limit,isDefault:i==null?void 0:i.isDefault})),Q=p||m.cacheSegData&&m.segmentStatus===j.Edit,Z=v;return e.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},e.createElement("div",{style:J},b("Attribute")),e.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},e.createElement(Et,{list:G,forbidDefault:!0,selectedAttribute:g!=null?g:"",attributeChanged:i=>Y(i),updateColorConfig:K,enableColorPicker:u,updateSize:X,forbidShowLimitPopover:Z}),e.createElement(D,{style:{margin:0}}),Q&&e.createElement(Lt,{subAttributeList:t,setSubAttribute:q,getValue:i=>{var x,E,P,_;return((E=(x=r.selectedPointCloudBox)==null?void 0:x.subAttribute)==null?void 0:E[i.value])||((_=(P=m.cacheSegData)==null?void 0:P.subAttribute)==null?void 0:_[i.value])}})))},zt=[{toolName:"LassoSelector",commonSvg:_t,selectedSvg:yt},{toolName:"RectSelector",commonSvg:ht,selectedSvg:jt},{toolName:"CircleSelector",commonSvg:wt,selectedSvg:Dt}],W=({toolInstance:o})=>{const{ptSegmentInstance:t}=T(B),[n,a]=w("LassoSelector"),{t:c}=k();return L(()=>{if(!t)return;const l=()=>{a("LassoSelector")},u=()=>{a("RectSelector")},m=()=>{a("CircleSelector")};return t.on("LassoSelector",l),t.on("RectSelector",u),t.on("CircleSelector",m),()=>{t.unbind("LassoSelector",l),t.unbind("RectSelector",u),t.unbind("CircleSelector",m)}},[t]),e.createElement("div",{className:`${I}__level`},zt.map(l=>{const u=n===l.toolName;return e.createElement("span",{className:`${I}__toolOption`,key:l.toolName,onClick:()=>t==null?void 0:t.emit(l.toolName)},e.createElement("img",{className:`${I}__singleTool`,src:u?l==null?void 0:l.selectedSvg:l==null?void 0:l.commonSvg}),e.createElement("span",{className:mt({[`${I}__toolOption__selected`]:u})},c(l.toolName)))}))},Ft=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:l})=>{var u,m;const{updatePointCloudPattern:f,pointCloudPattern:p,isPointCloudSegmentationPattern:r}=$(),s=ut(o.config),b=(u=s==null?void 0:s.attributeList)!=null?u:[],g=(s==null?void 0:s.secondaryAttributeConfigurable)===!0?(m=s==null?void 0:s.inputList)!=null?m:[]:[];return r?e.createElement(e.Fragment,null,e.createElement(W,{toolInstance:t}),e.createElement(M,{toolInstance:t,attributeList:b,subAttributeList:g,config:s,stepList:c,stepInfo:o,enableColorPicker:l})):e.createElement(e.Fragment,null,e.createElement(lt,{toolName:rt.EPointCloudName.PointCloud,selectedToolName:p,onChange:d=>f==null?void 0:f(d)}),e.createElement("div",{style:{flex:1,overflow:"hidden"}},e.createElement(Bt,{minTopHeight:42,defaultHeight:400,localKey:"id:"+(o==null?void 0:o.id)+"taskID:"+(o==null?void 0:o.taskID)+"step:"+(o==null?void 0:o.step)+"type:"+(o==null?void 0:o.type)},e.createElement(M,{toolInstance:t,attributeList:b,subAttributeList:g,config:s,stepList:c,stepInfo:o,enableColorPicker:l}),(s==null?void 0:s.trackConfigurable)===!0&&p===it.Rect?e.createElement("div",{style:{height:"100%",overflow:"auto"}},e.createElement($t,null),e.createElement(D,{style:{margin:0}}),e.createElement(vt,{imgList:n,imgIndex:a}),e.createElement(D,{style:{margin:0}}),e.createElement(St,{imgList:n,imgIndex:a}),e.createElement(D,{style:{margin:0}}),e.createElement(gt,null),o.loadPreStep>0&&e.createElement(bt,null),e.createElement(Ct,null)):e.createElement("div",null))))},Ut=o=>{var t,n,a,c;const l=at.getCurrentStepInfo((t=o.annotation)==null?void 0:t.step,(n=o.annotation)==null?void 0:n.stepList),u=(a=o.annotation)==null?void 0:a.toolInstance,m=(c=o.annotation)==null?void 0:c.stepList;return{stepInfo:l,toolInstance:u,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:m}};var Ht=ct(Ut,null,null,{context:dt})(Ft);export{W as PointCloudSegToolIcon,Ht as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labelbee/lb-components",
|
|
3
|
-
"version": "1.24.0-alpha.
|
|
3
|
+
"version": "1.24.0-alpha.7",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ant-design/icons": "^4.6.2",
|
|
46
|
-
"@labelbee/lb-annotation": "1.28.0-alpha.
|
|
46
|
+
"@labelbee/lb-annotation": "1.28.0-alpha.3",
|
|
47
47
|
"@labelbee/lb-utils": "1.19.0",
|
|
48
48
|
"@labelbee/wavesurfer": "1.1.0",
|
|
49
49
|
"@types/react-dom": "^18.2.7",
|