@labelbee/lb-components 1.24.0-alpha.3 → 1.24.0-alpha.31
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/_virtual/2DViewWorker.js +1 -1
- package/dist/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +2 -2
- package/dist/_virtual/highlightSegmentWorker.js +1 -1
- package/dist/assets/annotation/rectTool/three_points_rect.svg.js +1 -0
- package/dist/assets/annotation/rectTool/two_points_rect.svg.js +1 -0
- package/dist/components/DynamicResizer/DynamicResizer.js +1 -1
- package/dist/components/DynamicResizer/hooks/useDrag.js +1 -1
- package/dist/components/DynamicResizer/hooks/useDraggingAllowed.js +1 -0
- package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -1
- package/dist/components/DynamicResizer/utils/index.js +1 -0
- package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -1
- package/dist/components/LLMMultiWheelView/index.js +1 -1
- package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -1
- package/dist/components/LLMToolView/index.js +1 -1
- package/dist/components/LLMToolView/questionView/components/audioView/index.js +1 -0
- package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/dist/components/LLMToolView/questionView/index.js +1 -1
- package/dist/components/attributeList/index.js +1 -1
- package/dist/components/audioAnnotate/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.module.scss.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/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/components/TitleButton/index.js +1 -1
- package/dist/components/pointCloudView/components/UnifyParamsModal/index.js +1 -1
- package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudAttribute.js +1 -0
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/tagList/index.js +1 -1
- package/dist/constant/index.js +1 -1
- package/dist/index.css +118 -90
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/store/toolConfig/pointCloudToolConfig.js +1 -1
- package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +3 -3
- package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +24 -7
- package/dist/types/components/DynamicResizer/hooks/useDraggingAllowed.d.ts +12 -0
- package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +10 -21
- package/dist/types/components/DynamicResizer/types/interface.d.ts +14 -6
- package/dist/types/components/DynamicResizer/utils/index.d.ts +4 -0
- package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +2 -0
- package/dist/types/components/LLMMultiWheelView/index.d.ts +2 -0
- package/dist/types/components/LLMToolView/questionView/components/audioView/index.d.ts +8 -0
- package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +3 -1
- package/dist/types/components/attributeList/components/limitPopover/index.d.ts +2 -2
- package/dist/types/components/longText/index.d.ts +1 -1
- package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +0 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +4 -0
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
- package/dist/types/components/pointCloudView/hooks/usePointCloudAttribute.d.ts +3 -0
- package/dist/types/components/pointCloudView/hooks/useRotate.d.ts +1 -2
- package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +1 -2
- package/dist/types/components/pointCloudView/index.d.ts +2 -0
- package/dist/types/constant/index.d.ts +2 -1
- package/dist/types/store/annotation/actionCreators.d.ts +1 -1
- package/dist/types/store/annotation/map.d.ts +1 -0
- package/dist/types/store/annotation/reducer.d.ts +4 -0
- package/dist/types/store/annotation/types.d.ts +3 -2
- package/dist/types/store/toolConfig/types.d.ts +2 -0
- package/dist/types/views/MainView/index.d.ts +2 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/index.d.ts +2 -0
- package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -1
- package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/ToolIcons.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/es/_virtual/2DViewWorker.js +1 -1
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +2 -2
- package/es/_virtual/highlightSegmentWorker.js +1 -1
- package/es/assets/annotation/rectTool/three_points_rect.svg.js +1 -0
- package/es/assets/annotation/rectTool/two_points_rect.svg.js +1 -0
- package/es/components/DynamicResizer/DynamicResizer.js +1 -1
- package/es/components/DynamicResizer/hooks/useDrag.js +1 -1
- package/es/components/DynamicResizer/hooks/useDraggingAllowed.js +1 -0
- package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -1
- package/es/components/DynamicResizer/utils/index.js +1 -0
- package/es/components/LLMMultiWheelView/dialogView/index.js +1 -1
- package/es/components/LLMMultiWheelView/index.js +1 -1
- package/es/components/LLMMultiWheelView/sidebar/index.js +1 -1
- package/es/components/LLMToolView/index.js +1 -1
- package/es/components/LLMToolView/questionView/components/audioView/index.js +1 -0
- package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/es/components/LLMToolView/questionView/index.js +1 -1
- package/es/components/attributeList/index.js +1 -1
- package/es/components/audioAnnotate/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.module.scss.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/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/components/TitleButton/index.js +1 -1
- package/es/components/pointCloudView/components/UnifyParamsModal/index.js +1 -1
- package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudAttribute.js +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/tagList/index.js +1 -1
- package/es/constant/index.js +1 -1
- package/es/index.css +118 -90
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/toolConfig/pointCloudToolConfig.js +1 -1
- package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -1
- package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/ToolIcons.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/package.json +6 -6
- package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +0 -1
- package/dist/components/DynamicResizer/assets/divider.svg.js +0 -1
- package/dist/components/DynamicResizer/assets/topToZero.svg.js +0 -1
- package/es/components/DynamicResizer/assets/bottomToZero.svg.js +0 -1
- package/es/components/DynamicResizer/assets/divider.svg.js +0 -1
- package/es/components/DynamicResizer/assets/topToZero.svg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import r,{useRef as
|
|
1
|
+
import r,{useRef as p,useState as C}from"react";import{Col as y,Popconfirm as E}from"antd";import{useTranslation as i}from"react-i18next";import{prefix as g}from"../../../../constant/index.js";const k={color:"#CCCCCC"},f=({info:e})=>{const{t}=i();return e.key.startsWith("sure")?r.createElement("div",{key:e.key},`${t("ConfirmTo")}${e.name.slice(0)}\uFF1F`,(e==null?void 0:e.content)?e.content:""):r.createElement("span",null,e.name)},h=({icon:e})=>typeof e=="string"?r.createElement("img",{width:23,height:25,src:e}):e,u=({isHover:e,info:t})=>{const l=!!t.forbidOperation,a=t.key===e&&!l;let o={color:a?"#666fff":""};return l&&(o=k),r.createElement("div",{style:{cursor:l?"not-allowed":"default"},onClick:()=>{var c;return(t==null?void 0:t.forbidConfirm)&&!l&&((c=t==null?void 0:t.onClick)==null?void 0:c.call(t))}},r.createElement("div",{className:"icon"},r.createElement(h,{icon:a?t.hoverSvg:t.imgSvg})),r.createElement("div",{className:"toolName",style:o},t.name))},x=({allOperation:e,setBatchSetValid:t,valid:l})=>{const a=p(null),[o,c]=C(null),{t:m}=i(),d=Math.floor(24/e.length),v=n=>n.forbidConfirm?r.createElement(u,{info:n,isHover:o}):t&&n.key==="setValidity"?t({valid:l,isHover:!!o,singleSetQuestionImg:n.onClick}):r.createElement(E,{title:r.createElement(f,{info:n}),placement:"topRight",okText:m("Confirm"),cancelText:m("Cancel"),getPopupContainer:()=>{var s;return(s=a.current)!=null?s:document.body},onConfirm:n.onClick,overlayClassName:`${g}-pop-confirm`},r.createElement("div",null,r.createElement(u,{info:n,isHover:o})));return r.createElement("div",{className:"generalOperation",ref:a},e.map((n,s)=>r.createElement(y,{span:d,key:s,className:"generalOperation-col"},r.createElement("div",{key:n.key,className:"item",onMouseEnter:()=>{c(n.key)},onMouseLeave:()=>{c(null)}},v(n)))))};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import s,{useState as
|
|
1
|
+
import s,{useState as f,useCallback as U}from"react";import{connect as g}from"react-redux";import w from"../../../../utils/StepUtils.js";import{jsonParser as v}from"../../../../utils/index.js";import C from"./ActionsConfirm.js";import y from"./useOperationList.js";import{LabelBeeContext as S}from"../../../../store/ctx.js";import T from"../../../../assets/annotation/pointCloudTool/unitAttribute.svg.js";import V from"../../../../assets/annotation/pointCloudTool/unitAttributeForbid.svg.js";import A from"../../../../assets/annotation/pointCloudTool/unitAttributeHover.svg.js";import{useTranslation as I}from"react-i18next";import E from"../../../../components/pointCloudView/components/UnifyParamsModal/index.js";import{useSingleBox as M}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{composeResultByToolInstance as _}from"../../../../store/annotation/reducer.js";import{useStatus as R}from"../../../../components/pointCloudView/hooks/useStatus.js";const x=o=>{var t,i;const n=w.getCurrentStepInfo((t=o.annotation)==null?void 0:t.step,(i=o.annotation)==null?void 0:i.stepList);return{toolInstance:o.annotation.toolInstance,stepInfo:n,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:o.annotation.stepList}},$=({toolInstance:o,stepInfo:t,hideValidity:i})=>{const n=y(o),r=v(t==null?void 0:t.config),e=[n.empty];return(t==null?void 0:t.dataSourceStep)===0&&!i&&e.push(n.setValidity),(r==null?void 0:r.copyBackwardResult)&&e.push(n.copyPrevious),s.createElement(C,{allOperation:e})},D=g(x,null,null,{context:S})(({toolInstance:o,stepInfo:t,imgList:i,stepList:n,imgIndex:r,setBatchSetValid:e})=>{const{t:P}=I(),{selectedBox:m}=M(),u=y(o),[j,c]=f(!1),[L,b]=f([]),{isPointCloudDetectionPattern:k,isPointCloudSegmentationPattern:h}=R(),p=v(t.config);let a=[u.copyPrevious,u.empty,u.setValidity];if(k&&p.trackConfigurable===!0){const l=!m,B={name:P("UnifyParams"),key:"UnifyParams",imgSvg:l?V:T,hoverSvg:A,onClick:()=>{b(_({toolInstance:o,imgList:i,imgIndex:r,stepList:n})),c(!0)},forbidConfirm:!0,forbidOperation:l};a.unshift(B)}const O=U(()=>{c(!1)},[]),d=m==null?void 0:m.info;return h&&(a=a.filter(l=>!["setValidity","copyPrevious"].includes(l.key))),s.createElement(s.Fragment,null,s.createElement(C,{allOperation:a,setBatchSetValid:e,valid:o==null?void 0:o.valid}),s.createElement(E,{id:d==null?void 0:d.trackID,visible:j,onCancel:O,config:p,imgList:L}))});var F=g(x,null,null,{context:S})($);export{D as PointCloudOperation,F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as
|
|
1
|
+
import e,{useState as w,useContext as I,useMemo as rt,useEffect as L}from"react";import{EditFilled as it}from"@ant-design/icons";import{ToolIcons as lt}from"../ToolIcons.js";import{EToolName as st}from"../../../../data/enums/ToolType.js";import{cTool as at}from"@labelbee/lb-annotation";import{PointCloudContext as B}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as h,Input as ct,message as T}from"antd";import ut from"../../../../utils/StepUtils.js";import{connect as mt}from"react-redux";import{jsonParser as dt,classnames as pt}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 gt,useDispatch as ft}from"../../../../store/ctx.js";import vt from"./components/batchUpdateModal/index.js";import St from"./components/annotatedBox/index.js";import bt from"./components/rectRotateSensitivitySlider/index.js";import Ct from"./components/findTrackIDIndex/index.js";import xt from"./components/firstFrameDataSwitch/index.js";import Et from"./components/selectBoxVisibleSwitch/index.js";import{EPointCloudSegmentStatus as D,EPointCloudPattern as Pt}from"@labelbee/lb-utils";import _t from"../../../../components/attributeList/index.js";import{useAttribute as yt}from"../../../../components/pointCloudView/hooks/useAttribute.js";import wt from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import ht from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import Tt from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import Dt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import jt from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import It from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as j}from"../index.js";import{SetTaskStepList as Lt}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as Bt}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import kt from"../../../../components/subAttributeList/index.js";import At from"../../../../components/DynamicResizer/DynamicResizer.js";import{isNumber as Vt}from"lodash";import Nt from"../../../../store/toolConfig/index.js";var Ot=Object.defineProperty,Rt=Object.defineProperties,$t=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,U=(o,t,n)=>t in o?Ot(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,A=(o,t)=>{for(var n in t||(t={}))zt.call(t,n)&&U(o,n,t[n]);if(F)for(var n of F(t))Ft.call(t,n)&&U(o,n,t[n]);return o},V=(o,t)=>Rt(o,$t(t));const Ut=()=>{const[o,t]=w(!1),n=I(B),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:i}=z(),[u,m]=w(""),{t:g}=k(),p=c==null?void 0:c.info.trackID,l=rt(()=>Vt(p)&&p>=0,[p]),s=d=>!!a.find(x=>x.trackID===d&&x.id!==(c==null?void 0:c.info.id)),C=(d=!1)=>{const f=parseInt(u,10);if(d&&t(!1),isNaN(f)){T.error(g("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){T.error(g("NotAllowDecimalPointsInTrackID"));return}if(s(f)){T.error(g("DuplicateTrackIDsExist"));return}if(!(f>0)){T.error(g("PositiveIntegerCheck"));return}v(f)};L(()=>{t(!1)},[p]);const v=d=>{var f;const x=i({trackID:d});(f=n==null?void 0:n.topViewInstance)==null||f.updatePolygonList(x!=null?x:[]),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,g("CurrentBoxTrackIDs")),l&&e.createElement(vt,{id:p,updateCurrentPolygonList:d=>v(d)})),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},o&&l?e.createElement(ct,{defaultValue:p,onChange:d=>{m(d.target.value)},disabled:!l,size:"small",onBlur:()=>{C()},onPressEnter:()=>{C(!0)}}):e.createElement("span",null,p),e.createElement(it,{style:{color:"#999",marginLeft:16,cursor:typeof p!="undefined"?"pointer":"not-allowed"},onClick:()=>{l&&t(!o)}})))},H=({segmentStatus:o,globalPattern:t})=>t===Pt.Segmentation&&![D.Edit,D.Ready].includes(o),M=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:i,enableColorPicker:u})=>{const[m,g]=w({segmentStatus:D.Ready}),{selectedBox:p}=z(),l=I(B),{ptSegmentInstance:s}=l,{t:C}=k(),{defaultAttribute:v}=yt(),d=Bt(),{isPointCloudSegmentationPattern:f}=$(),x=ft(),{attrChangeTrigger:J,setAttrChangeTrigger:K}=Nt(),X={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};L(()=>{if(!!s)return s.on("syncPointCloudStatus",g),()=>{s.unbind("syncPointCloudStatus",g)}},[s]);const Y=(r,S)=>{var E,P,_,N,O;const y=(E=a==null?void 0:a.attributeList)==null?void 0:E.map(b=>b.value===r?V(A({},b),{color:S}):b),R=V(A({},a),{attributeList:y}),ot=JSON.stringify(R),nt=c==null?void 0:c.map(b=>(b==null?void 0:b.step)===(i==null?void 0:i.step)?V(A({},b),{config:ot}):b);(P=l==null?void 0:l.topViewInstance)==null||P.updateAttributeList(y),(_=l==null?void 0:l.sideViewInstance)==null||_.updateAttributeList(y),(N=l==null?void 0:l.backViewInstance)==null||N.updateAttributeList(y),(O=l==null?void 0:l.mainViewInstance)==null||O.setConfig(R),x(Lt({stepList:nt}))},q=r=>{d.updateViewsByDefaultSize&&d.updateViewsByDefaultSize(r)},G=r=>{if(H({globalPattern:l.globalPattern,segmentStatus:m.segmentStatus}))return;const S=r===v?J+1:0;K(S),n.setAttrChangeTrigger(S),n.setDefaultAttribute(r)},Q=(r,S)=>{H({globalPattern:l.globalPattern,segmentStatus:m.segmentStatus})||n.setSubAttribute(r,S)},Z=o.map(r=>({label:r.key,value:r.value,color:r==null?void 0:r.color,limit:r==null?void 0:r.limit,isDefault:r==null?void 0:r.isDefault})),tt=p||m.cacheSegData&&m.segmentStatus===D.Edit,et=f;return e.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},e.createElement("div",{style:X},C("Attribute")),e.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},e.createElement(_t,{list:Z,forbidDefault:!0,selectedAttribute:v!=null?v:"",attributeChanged:r=>G(r),updateColorConfig:Y,enableColorPicker:u,updateSize:q,forbidShowLimitPopover:et}),e.createElement(h,{style:{margin:0}}),tt&&e.createElement(kt,{subAttributeList:t,setSubAttribute:Q,getValue:r=>{var S,E,P,_;return((E=(S=l.selectedPointCloudBox)==null?void 0:S.subAttribute)==null?void 0:E[r.value])||((_=(P=m.cacheSegData)==null?void 0:P.subAttribute)==null?void 0:_[r.value])}})))},Ht=[{toolName:"LassoSelector",commonSvg:wt,selectedSvg:ht},{toolName:"RectSelector",commonSvg:jt,selectedSvg:It},{toolName:"CircleSelector",commonSvg:Tt,selectedSvg:Dt}],W=({toolInstance:o})=>{const{ptSegmentInstance:t}=I(B),[n,a]=w("LassoSelector"),{t:c}=k();return L(()=>{if(!t)return;const i=()=>{a("LassoSelector")},u=()=>{a("RectSelector")},m=()=>{a("CircleSelector")};return t.on("LassoSelector",i),t.on("RectSelector",u),t.on("CircleSelector",m),()=>{t.unbind("LassoSelector",i),t.unbind("RectSelector",u),t.unbind("CircleSelector",m)}},[t]),e.createElement("div",{className:`${j}__level`},Ht.map(i=>{const u=n===i.toolName;return e.createElement("span",{className:`${j}__toolOption`,key:i.toolName,onClick:()=>t==null?void 0:t.emit(i.toolName)},e.createElement("img",{className:`${j}__singleTool`,src:u?i==null?void 0:i.selectedSvg:i==null?void 0:i.commonSvg}),e.createElement("span",{className:pt({[`${j}__toolOption__selected`]:u})},c(i.toolName)))}))},Mt=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:i})=>{var u,m;const{updatePointCloudPattern:g,pointCloudPattern:p,isPointCloudSegmentationPattern:l}=$(),s=dt(o.config),C=(u=s==null?void 0:s.attributeList)!=null?u:[],v=(s==null?void 0:s.secondaryAttributeConfigurable)===!0?(m=s==null?void 0:s.inputList)!=null?m:[]:[];return l?e.createElement(e.Fragment,null,e.createElement(W,{toolInstance:t}),e.createElement(M,{toolInstance:t,attributeList:C,subAttributeList:v,config:s,stepList:c,stepInfo:o,enableColorPicker:i})):e.createElement(e.Fragment,null,e.createElement(lt,{toolName:at.EPointCloudName.PointCloud,selectedToolName:p,onChange:d=>g==null?void 0:g(d)}),e.createElement("div",{style:{flex:1,overflow:"hidden"}},e.createElement(At,{minTopHeight:42,defaultHeight:400,localKey:"settingid:"+(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:C,subAttributeList:v,config:s,stepList:c,stepInfo:o,enableColorPicker:i}),(s==null?void 0:s.trackConfigurable)===!0&&p===st.Rect?e.createElement("div",{style:{height:"100%",overflow:"auto"}},e.createElement(Ut,null),e.createElement(h,{style:{margin:0}}),e.createElement(St,{imgList:n,imgIndex:a}),e.createElement(h,{style:{margin:0}}),e.createElement(Ct,{imgList:n,imgIndex:a}),e.createElement(h,{style:{margin:0}}),e.createElement(bt,null),o.loadPreStep>0&&e.createElement(xt,null),e.createElement(Et,null)):e.createElement("div",null))))},Wt=o=>{var t,n,a,c;const i=ut.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:i,toolInstance:u,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:m}};var Jt=mt(Wt,null,null,{context:gt})(Mt);export{W as PointCloudSegToolIcon,Jt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EToolName as
|
|
1
|
+
import{EToolName as t}from"../../../data/enums/ToolType.js";import e from"react";import{sidebarCls as n}from"./index.js";import E from"../../../assets/annotation/lineTool/icon_line.svg.js";import N from"../../../assets/annotation/lineTool/icon_line_a.svg.js";import S from"../../../assets/annotation/pointTool/icon_point.svg.js";import y from"../../../assets/annotation/pointTool/icon_point_a.svg.js";import P from"../../../assets/annotation/polygonTool/icon_polygon_a.svg.js";import R from"../../../assets/annotation/polygonTool/icon_polygon.svg.js";import{cTool as w}from"@labelbee/lb-annotation";import O from"classnames";import{useTranslation as $}from"react-i18next";import{Dropdown as j}from"antd";import{DownOutlined as C}from"@ant-design/icons";import{ReactComponent as c}from"../../../assets/annotation/rectTool/two_points_rect.svg.js";import{ReactComponent as u}from"../../../assets/annotation/rectTool/three_points_rect.svg.js";import{useLocalStorageState as M}from"ahooks";const{EPointCloudName:b,TOOL_NAME:h,TOOL_NAME_EN:k,ERectToolModeType:l,RECT_TOOL_MODE_NAME:L}=w,d=[{toolName:t.Rect,dropdownItems:[{key:l.ThreePoints,icon:e.createElement(u,null),label:"\u4E09\u70B9\u753B\u77E9\u5F62"},{key:l.TwoPoints,icon:e.createElement(c,null),label:"\u4E24\u70B9\u753B\u77E9\u5F62"}]},{toolName:t.Polygon,commonSvg:R,selectedSvg:P},{toolName:t.Line,commonSvg:E,selectedSvg:N},{toolName:t.Point,commonSvg:S,selectedSvg:y}],B=s=>s==="en"?k:h,x=({toolName:s,selectedToolName:p,onChange:r})=>{const{i18n:g}=$(),m=d==null?void 0:d.filter(o=>s===b.PointCloud?[t.Polygon,t.Rect,t.Point,t.Line].includes(o==null?void 0:o.toolName):(o==null?void 0:o.toolName)===s),_=m.length>1,[a,T]=M(L,{defaultValue:l.ThreePoints,serializer:o=>o!=null?o:"",deserializer:o=>o}),v=a===l.TwoPoints?c:u,f=o=>{T(o.key)};return e.createElement("div",{className:`${n}__level`},m.map(o=>{const i=_&&p===o.toolName;return e.createElement("span",{className:`${n}__toolOption`,key:o.toolName,onClick:()=>r==null?void 0:r(o.toolName)},o.dropdownItems?e.createElement(j,{overlayClassName:`${n}__dropdown`,menu:{items:o.dropdownItems,selectable:!0,defaultSelectedKeys:a?[a]:[],onClick:f}},e.createElement("div",{className:`${n}__multiBox`,style:{color:i?"#666fff":"#999999"}},e.createElement(v,null),e.createElement(C,null))):e.createElement("img",{className:`${n}__singleTool`,src:i?o==null?void 0:o.selectedSvg:o==null?void 0:o.commonSvg}),e.createElement("span",{className:O({[`${n}__toolOption__selected`]:i})},B(g.language)[o.toolName]))}))};export{x as ToolIcons};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{prefix as
|
|
1
|
+
import{prefix as W}from"../../../constant/index.js";import{EToolName as n}from"../../../data/enums/ToolType.js";import z from"../../../utils/StepUtils.js";import{Collapse as u}from"antd/es";import e,{useState as D}from"react";import{useTranslation as G}from"react-i18next";import U from"./AnnotationText/index.js";import q from"./ClearIcon/index.js";import H,{PointCloudOperation as y}from"./GeneralOperation/index.js";import J from"./ImgAttributeInfo/index.js";import Q from"./SwitchAttributeList/index.js";import p,{expandIconFuc as _}from"./TagSidebar/index.js";import f from"./TextToolSidebar/index.js";import $ from"./PointCloudToolSidebar/index.js";import X from"./ToolStyle/index.js";import{cTool as Y}from"@labelbee/lb-annotation";import Z from"./ScribbleSidebar/index.js";import{ToolIcons as ee}from"./ToolIcons.js";import{useSelector as te}from"../../../store/ctx.js";import{Tabs as I}from"antd";import{classnames as oe}from"../../../utils/index.js";import P from"../../../assets/annotation/common/icon_menu_fold.svg.js";import ne from"../../../components/LLMToolView/sidebar/index.js";import re from"../../../components/LLMMultiWheelView/sidebar/index.js";import ie from"./NLPSidebar/index.js";import le from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";const{EVideoToolName:E,EPointCloudName:ae}=Y,{Panel:A}=u,t=`${W}-sidebar`,se=({sider:l,enableColorPicker:w,setSiderWidth:b,propsSiderWidth:ce,checkMode:c,setBatchSetValid:M})=>{const x=te(r=>z.getCurrentStepInfo(r.annotation.step,r.annotation.stepList)),[m,V]=D(!0),o=x==null?void 0:x.tool,{t:S}=G();if(!o)return null;const B=r=>{const s=e.createElement(X,null);return e.createElement(A,{header:S("Style"),className:"panel",key:r},s)},T=e.createElement(ee,{toolName:o,onChange:()=>{}}),a=e.createElement(Q,null),g=e.createElement(U,null),N=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},B("1")),h=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},e.createElement(A,{header:e.createElement("div",null,S("Adjust"),e.createElement(q,null)),className:"panel",key:"imgAttribute"},e.createElement(J,null))),i=e.createElement(H,null),O=e.createElement(p,null),k=r=>e.createElement(f,{disabled:r}),L=e.createElement(Z,{onChange:(r,s)=>{}}),v=e.createElement(le,null),C=e.createElement(ne,{checkMode:c}),F=e.createElement(re,{checkMode:c}),j=e.createElement(ie,{checkMode:c}),d=e.createElement("div",{className:`${t}__horizontal`}),K=e.createElement($,{enableColorPicker:w}),R=e.createElement(y,{setBatchSetValid:M});if(l)return typeof l=="function"?e.createElement("div",{className:`${t}`},l({toolIcon:T,attributeList:a,annotationText:g,toolStyle:N,imageAttributeInfo:h,operation:i,tagToolSideBar:O,textToolSideBar:k,horizontal:d,pointCloudToolSidebar:K,pointCloudOperation:R,scribbleSidebar:L,LLMSidebar:C,LLMMultiWheelSidebar:F,videoClipSidebar:v,NLPSidebar:j})):l;if([n.Rect,n.Point,n.Line,n.Rect,n.Polygon,n.Cuboid].includes(o))return e.createElement("div",{className:`${t}`},T,d,a,g,d,e.createElement("div",{className:`${t}__content`},N,h),i);if(o===n.Tag)return e.createElement("div",{className:`${t}`},e.createElement(p,null));if(o===E.VideoClipTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},v,a),i);if(o===E.VideoTagTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(p,null)),i);if(o===E.VideoTextTool)return e.createElement("div",{className:`${t}`},e.createElement(f,null));if(o===n.Text)return e.createElement("div",{className:`${t}`},"s",e.createElement(f,null));if(o===ae.PointCloud){const r=()=>{V(!m),b&&b(m?48:void 0)},s=e.createElement("div",{style:{width:"48px",height:"100%",display:"flex",justifyContent:"center",background:"#ffffff"}},e.createElement("span",{onClick:()=>r()},e.createElement("img",{style:{width:"16px",height:"16px",marginTop:"18px",cursor:"pointer",transform:"rotate(180deg)"},src:P})));return m?e.createElement(I,{type:"card",activeKey:"1",className:oe({[`${t}`]:!0,[`${t}__pointCloud`]:!0}),tabBarExtraContent:{left:e.createElement("span",{onClick:()=>r(),style:{padding:"0px 4px"}},e.createElement("img",{style:{width:"16px",height:"16px",marginLeft:"4px",cursor:"pointer"},src:P}))}},e.createElement(I.TabPane,{tab:"\u5DE5\u5177\u9762\u677F",key:"1",style:{height:"100%",display:"flex",flexDirection:"column"}},e.createElement("div",{className:`${t}__content`},e.createElement($,null)),e.createElement(y,null))):s}return o===n.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},L,a),i):o===n.LLM?C:o===n.NLP?j:null};export{se as default,t as sidebarCls};
|
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.31",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ant-design/icons": "^4.6.2",
|
|
46
|
-
"@labelbee/lb-annotation": "1.28.0-alpha.
|
|
47
|
-
"@labelbee/lb-utils": "1.
|
|
46
|
+
"@labelbee/lb-annotation": "1.28.0-alpha.18",
|
|
47
|
+
"@labelbee/lb-utils": "1.20.0-alpha.3",
|
|
48
48
|
"@labelbee/wavesurfer": "1.1.0",
|
|
49
|
-
"@types/react-dom": "
|
|
49
|
+
"@types/react-dom": "18.3.1",
|
|
50
50
|
"@types/react-transition-group": "^4.4.9",
|
|
51
51
|
"ahooks": "^3.4.0",
|
|
52
52
|
"classnames": "^2.3.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"github-markdown-css": "^5.2.0",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"postcss-url": "^10.1.3",
|
|
58
|
-
"re-resizable": "
|
|
58
|
+
"re-resizable": "6.9.17",
|
|
59
59
|
"react-colorful": "^5.6.1",
|
|
60
60
|
"react-draggable": "^4.4.6",
|
|
61
61
|
"react-i18next": "^11.12.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@svgr/rollup": "^8.1.0",
|
|
90
90
|
"@types/diff-match-patch": "^1.0.36",
|
|
91
91
|
"@types/lodash": "^4.14.168",
|
|
92
|
-
"@types/react": "
|
|
92
|
+
"@types/react": "16.14.62",
|
|
93
93
|
"@types/react-redux": "^7.1.16",
|
|
94
94
|
"@types/react-syntax-highlighter": "^15.5.0",
|
|
95
95
|
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("react");var img="data:image/svg+xml,%3csvg t='1720421473527' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5364' width='200' height='200'%3e %3cpath d='M94.8 304.5L512 721.8l416-416-833.2-1.3z m0 0' p-id='5365'%3e%3c/path%3e%3c/svg%3e";module.exports=img;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("react");var img="data:image/svg+xml,%3csvg t='1720596188811' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1478' width='200' height='200'%3e %3cpath d='M36.5551 360.072857h950.842186q36.5551 0 36.5551 40.190131t-36.5551 40.190131H36.5551Q0 440.453119 0 400.314185q0-40.190131 36.5551-40.190131z' fill='%23999999' p-id='1479' %3e%3c/path%3e %3cpath d='M36.5551 583.550465h950.842186q36.5551 0 36.5551 40.190131t-36.5551 40.190131H36.5551q-36.5551 0-36.5551-40.190131t36.5551-40.190131z' fill='%23999999' p-id='1480' %3e%3c/path%3e %3cpath d='M553.292672 10.700302l159.634177 89.237451a58.774867 58.774867 0 0 1 29.080248 67.990438 64.406605 64.406605 0 0 1-62.409898 44.388336H344.355187a64.406605 64.406605 0 0 1-62.409897-44.388336 58.774867 58.774867 0 0 1 29.080247-67.990438L470.659714 10.700302a85.448827 85.448827 0 0 1 82.632958 0z m0 1002.654177l159.634177-89.23745a58.774867 58.774867 0 0 0 29.080248-67.990439 64.406605 64.406605 0 0 0-62.409898-44.388336H344.355187a64.406605 64.406605 0 0 0-62.409897 44.388336 58.774867 58.774867 0 0 0 29.080247 67.990439l159.634177 89.23745a85.448827 85.448827 0 0 0 82.632958 0z' fill='%23999999' p-id='1481' %3e%3c/path%3e%3c/svg%3e";module.exports=img;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("react");var img="data:image/svg+xml,%3csvg t='1720421409111' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5202' width='200' height='200'%3e %3cpath d='M928 721.8L510.8 304.5l-416 416 833.2 1.3z m0 0' p-id='5203'%3e%3c/path%3e%3c/svg%3e";module.exports=img;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"react";var t="data:image/svg+xml,%3csvg t='1720421473527' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5364' width='200' height='200'%3e %3cpath d='M94.8 304.5L512 721.8l416-416-833.2-1.3z m0 0' p-id='5365'%3e%3c/path%3e%3c/svg%3e";export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"react";var a="data:image/svg+xml,%3csvg t='1720596188811' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1478' width='200' height='200'%3e %3cpath d='M36.5551 360.072857h950.842186q36.5551 0 36.5551 40.190131t-36.5551 40.190131H36.5551Q0 440.453119 0 400.314185q0-40.190131 36.5551-40.190131z' fill='%23999999' p-id='1479' %3e%3c/path%3e %3cpath d='M36.5551 583.550465h950.842186q36.5551 0 36.5551 40.190131t-36.5551 40.190131H36.5551q-36.5551 0-36.5551-40.190131t36.5551-40.190131z' fill='%23999999' p-id='1480' %3e%3c/path%3e %3cpath d='M553.292672 10.700302l159.634177 89.237451a58.774867 58.774867 0 0 1 29.080248 67.990438 64.406605 64.406605 0 0 1-62.409898 44.388336H344.355187a64.406605 64.406605 0 0 1-62.409897-44.388336 58.774867 58.774867 0 0 1 29.080247-67.990438L470.659714 10.700302a85.448827 85.448827 0 0 1 82.632958 0z m0 1002.654177l159.634177-89.23745a58.774867 58.774867 0 0 0 29.080248-67.990439 64.406605 64.406605 0 0 0-62.409898-44.388336H344.355187a64.406605 64.406605 0 0 0-62.409897 44.388336 58.774867 58.774867 0 0 0 29.080247 67.990439l159.634177 89.23745a85.448827 85.448827 0 0 0 82.632958 0z' fill='%23999999' p-id='1481' %3e%3c/path%3e%3c/svg%3e";export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"react";var t="data:image/svg+xml,%3csvg t='1720421409111' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5202' width='200' height='200'%3e %3cpath d='M928 721.8L510.8 304.5l-416 416 833.2 1.3z m0 0' p-id='5203'%3e%3c/path%3e%3c/svg%3e";export{t as default};
|