@labelbee/lb-components 1.23.0-alpha.99 → 1.23.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/2DViewWorker.js +1 -1
- package/dist/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
- package/dist/components/AnnotationView/index.js +1 -1
- package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -0
- package/dist/components/LLMMultiWheelView/index.js +1 -0
- package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -0
- package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -1
- package/dist/components/LLMToolView/questionView/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/components/attributeList/index.js +1 -1
- package/dist/components/audioPlayer/index.js +1 -1
- package/dist/components/audioPlayer/useAudioScroll/index.js +1 -1
- package/dist/components/markdownView/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -1
- package/dist/components/predictTracking/previewResult/index.js +1 -1
- package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/dist/data/enums/ToolType.js +1 -1
- package/dist/index.css +71 -4
- package/dist/index.js +1 -1
- package/dist/store/LLMMultiWheel/index.js +1 -0
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/store/ctx.js +1 -1
- package/dist/store/toolConfig/baseToolConfig.js +1 -0
- package/dist/store/toolConfig/index.js +1 -0
- package/dist/store/toolConfig/pointCloudToolConfig.js +1 -0
- package/dist/types/App.d.ts +1 -0
- package/dist/types/components/AnnotationView/hooks/useFilterAnnotations.d.ts +2 -0
- package/dist/types/components/AnnotationView/index.d.ts +9 -0
- package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +15 -0
- package/dist/types/components/LLMMultiWheelView/index.d.ts +21 -0
- package/dist/types/components/LLMMultiWheelView/sidebar/index.d.ts +8 -0
- package/dist/types/components/LLMMultiWheelView/types.d.ts +62 -0
- package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +15 -0
- package/dist/types/components/LLMToolView/questionView/index.d.ts +7 -0
- package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +3 -0
- package/dist/types/components/LLMToolView/sidebar/components/modelAnswerSort/index.d.ts +30 -0
- package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +2 -2
- package/dist/types/components/LLMToolView/sidebar/index.d.ts +10 -0
- package/dist/types/components/LLMToolView/types.d.ts +6 -2
- package/dist/types/components/LLMToolView/utils/data.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +23 -1
- package/dist/types/components/pointCloudView/hooks/useUpdatePointCloudColor.d.ts +4 -0
- package/dist/types/components/pointCloudView/index.d.ts +1 -0
- package/dist/types/data/enums/ToolType.d.ts +2 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/store/LLMMultiWheel/index.d.ts +15 -0
- package/dist/types/store/annotation/actionCreators.d.ts +1 -1
- package/dist/types/store/ctx.d.ts +7 -0
- package/dist/types/store/toolConfig/baseToolConfig.d.ts +4 -0
- package/dist/types/store/toolConfig/index.d.ts +3 -0
- package/dist/types/store/toolConfig/pointCloudToolConfig.d.ts +4 -0
- package/dist/types/store/toolConfig/types.d.ts +10 -0
- package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +2 -1
- package/dist/types/views/MainView/LLMMultiWheelLayout/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.d.ts +3 -0
- package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -1
- package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -0
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/_virtual/2DViewWorker.js +1 -1
- package/es/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
- package/es/components/AnnotationView/index.js +1 -1
- package/es/components/LLMMultiWheelView/dialogView/index.js +1 -0
- package/es/components/LLMMultiWheelView/index.js +1 -0
- package/es/components/LLMMultiWheelView/sidebar/index.js +1 -0
- package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
- package/es/components/LLMToolView/questionView/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/components/attributeList/index.js +1 -1
- package/es/components/audioPlayer/index.js +1 -1
- package/es/components/audioPlayer/useAudioScroll/index.js +1 -1
- package/es/components/markdownView/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/index.js +1 -1
- package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
- package/es/components/predictTracking/previewResult/index.js +1 -1
- package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/es/data/enums/ToolType.js +1 -1
- package/es/index.css +71 -4
- package/es/index.js +1 -1
- package/es/store/LLMMultiWheel/index.js +1 -0
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/ctx.js +1 -1
- package/es/store/toolConfig/baseToolConfig.js +1 -0
- package/es/store/toolConfig/index.js +1 -0
- package/es/store/toolConfig/pointCloudToolConfig.js +1 -0
- package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -1
- package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -0
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ViewportProvider as b}from"../../components/customResizeHook/index.js";import{prefix as C}from"../../constant/index.js";import{Spin as A}from"antd";import{Layout as
|
|
1
|
+
import{ViewportProvider as b}from"../../components/customResizeHook/index.js";import{prefix as C}from"../../constant/index.js";import{Spin as A}from"antd";import{Layout as E}from"antd/es";import t,{useState as O}from"react";import V from"./annotationOperation/index.js";import W from"./annotationTips/index.js";import k from"./sidebar/index.js";import g from"./toolFooter/index.js";import F from"./toolHeader/index.js";import{getStepConfig as _}from"../../store/annotation/reducer.js";import I from"../../components/videoAnnotate/index.js";import{connect as R}from"react-redux";import h from"../../utils/ToolUtils.js";import B from"../../components/pointCloudView/index.js";import{getClassName as $}from"../../utils/dom.js";import{classnames as H}from"../../utils/index.js";import D from"../../components/predictTracking/previewResult/index.js";import{LabelBeeContext as U}from"../../store/ctx.js";import{EToolName as m}from"../../data/enums/ToolType.js";import z from"./LLMLayout/index.js";import q from"./NLPLayout/index.js";import G from"../../components/audioAnnotate/index.js";import{LoadingOutlined as J}from"@ant-design/icons";import{useTranslation as K}from"react-i18next";import{EPointCloudName as Q}from"@labelbee/lb-annotation";import X from"./LLMMultiWheelLayout/index.js";var Y=Object.defineProperty,T=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,P=(e,o,n)=>o in e?Y(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,l=(e,o)=>{for(var n in o||(o={}))Z.call(o,n)&&P(e,n,o[n]);if(T)for(var n of T(o))p.call(o,n)&&P(e,n,o[n]);return e};const{Sider:ee,Content:te}=E,L=`${C}-layout`,oe=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(W,{path:e.path,tips:e.tips}),t.createElement(V,l({},e)),t.createElement(g,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},ne=e=>{var o;return t.createElement(t.Fragment,null,t.createElement(B,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible,setResourceLoading:e.setResourceLoading}),t.createElement(g,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},le=e=>{var o;const{stepList:n,step:r}=e,a=(o=_(n,r))==null?void 0:o.tool,d=h.isPointCloudTool(a),i=h.isVideoTool(a);return d?t.createElement(ne,l({},e)):i?t.createElement(I,{drawLayerSlot:e.drawLayerSlot,footer:e.footer,annotationBefore:e==null?void 0:e.annotationBefore}):t.createElement(oe,l({},e))},s=e=>{var o,n,r;const{t:a}=K(),{stepList:d,step:i}=e,c=(o=_(d,i))==null?void 0:o.tool,u=![m.LLM,m.NLP,m.LLMMultiWheel].includes(c),v=![m.LLM,m.NLP,m.LLMMultiWheel].includes(c),y=[Q.PointCloud].includes(c);return t.createElement(b,null,t.createElement(A,{spinning:e.loading,indicator:t.createElement(J,null),tip:t.createElement("span",{style:{marginTop:200}},a("LoadingTips")),delay:500},t.createElement(E,{className:H([L,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${L}__header`,style:(r=e.style)==null?void 0:r.header},t.createElement(F,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:u,hasHeaderOption:v,hasPredictTrackingIcon:y})),e.children)))},ie=e=>{var o,n,r,a,d,i,c;const[u,v]=O(void 0),y=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:x,step:j}=e,f=(r=_(x,j))==null?void 0:r.tool,M=m.LLM===f,N=m.NLP===f,w=m.LLMMultiWheel===f,S=h.isAudioTool(f);return w?t.createElement(s,l({},e),t.createElement(X,l({},e))):M?t.createElement(s,l({},e),t.createElement(z,l({},e))):N?t.createElement(s,l({},e),t.createElement(q,l({},e))):S?t.createElement(s,l({},e),t.createElement(G,l({},e))):t.createElement(s,l({},e),t.createElement(E,{className:$("layout","container")},e==null?void 0:e.leftSider,t.createElement(te,{className:`${L}__content`},t.createElement(le,l({},e)),t.createElement(D,null)),t.createElement(ee,{className:`${L}__side`,width:(a=u!=null?u:y)!=null?a:240,style:(d=e.style)==null?void 0:d.sider},t.createElement(k,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:v,propsSiderWidth:(c=(i=e.style)==null?void 0:i.sider)==null?void 0:c.width}))))},re=({annotation:e})=>{var o,n,r;const{imgList:a,loading:d}=e,i=(o=a[e.imgIndex])!=null?o:{};return{path:(r=(n=i==null?void 0:i.path)!=null?n:i==null?void 0:i.url)!=null?r:"",loading:d}};var ae=R(re,null,null,{context:U})(ie);export{ae as default};
|
package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useEffect as i}from"react";import{Switch as c}from"antd";import l from"../../../../../../store/toolConfig/index.js";import{useTranslation as m}from"react-i18next";import a from"./index.module.scss.js";const f=()=>{const{t:o}=m(),{onlyLoadFirstData:s,setOnlyLoadFirstData:t}=l();i(()=>{t(!1)},[]);const r=n=>{t(n)};return e.createElement("div",{className:a.switchBox},e.createElement("div",{className:a.switchLabel},o("OnlyLoadTheFirstFramePreAnnotation")),e.createElement(c,{defaultChecked:!1,checked:s,onChange:r}))};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={switchBox:"index-module_switchBox__6DlnW"};export{e as default};
|
package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useEffect as n}from"react";import{Tooltip as a,Switch as r}from"antd";import m from"../../../../../../store/toolConfig/index.js";import{useTranslation as d}from"react-i18next";import{QuestionCircleOutlined as f}from"@ant-design/icons";import t from"./index.module.scss.js";const p=()=>{const{t:i}=d(),{selectBoxVisibleSwitch:l,setSelectBoxVisibleSwitch:s}=m();n(()=>{s(!1)},[]);const o=c=>{s(c)};return e.createElement("div",{className:t.switchBox},e.createElement("div",{className:t.switchLeft},e.createElement("div",{className:t.switchTitle},i("SelectBoxToDisplayIndependently")),e.createElement(a,{placement:"top",title:e.createElement("div",{style:{width:"210px"}},i("SelectBoxSwitchTips"))},e.createElement(f,null))),e.createElement(r,{defaultChecked:!1,checked:l,onChange:o}))};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={switchBox:"index-module_switchBox__mLSzh",switchLeft:"index-module_switchLeft__7qd-2",switchTitle:"index-module_switchTitle__de9li"};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as
|
|
1
|
+
import e,{useState as y,useContext as I,useEffect as L}from"react";import{EditFilled as ot}from"@ant-design/icons";import{ToolIcons as nt}from"../ToolIcons.js";import{EToolName as lt}from"../../../../data/enums/ToolType.js";import{cTool as it}from"@labelbee/lb-annotation";import{PointCloudContext as T}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as w,Input as rt,message as D}from"antd";import st from"../../../../utils/StepUtils.js";import{connect as at}from"react-redux";import{jsonParser as ct,classnames as ut}from"../../../../utils/index.js";import{useStatus as R}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as $}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as B}from"react-i18next";import{LabelBeeContext as mt,useDispatch as dt}from"../../../../store/ctx.js";import pt from"./components/batchUpdateModal/index.js";import ft from"./components/annotatedBox/index.js";import vt from"./components/rectRotateSensitivitySlider/index.js";import gt from"./components/findTrackIDIndex/index.js";import St from"./components/firstFrameDataSwitch/index.js";import bt from"./components/selectBoxVisibleSwitch/index.js";import{EPointCloudSegmentStatus as h,EPointCloudPattern as Ct}from"@labelbee/lb-utils";import xt from"../../../../components/attributeList/index.js";import{useAttribute as Et}from"../../../../components/pointCloudView/hooks/useAttribute.js";import Pt from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import yt from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import wt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Dt from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import ht from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as j}from"../index.js";import{SetTaskStepList as jt}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as It}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Lt from"../../../../components/subAttributeList/index.js";import Tt from"../../../../components/DynamicResizer/DynamicResizer.js";var Bt=Object.defineProperty,Vt=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,F=(o,t,n)=>t in o?Bt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,V=(o,t)=>{for(var n in t||(t={}))At.call(t,n)&&F(o,n,t[n]);if(z)for(var n of z(t))Nt.call(t,n)&&F(o,n,t[n]);return o},k=(o,t)=>Vt(o,kt(t));const Ot=()=>{const[o,t]=y(!1),n=I(T),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:l}=$(),[u,m]=y(""),{t:v}=B(),p=c==null?void 0:c.info.trackID,s=d=>!!a.find(b=>b.trackID===d&&b.id!==(c==null?void 0:c.info.id)),r=(d=!1)=>{const f=parseInt(u,10);if(d&&t(!1),isNaN(f)){D.error(v("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){D.error(v("NotAllowDecimalPointsInTrackID"));return}if(s(f)){D.error(v("DuplicateTrackIDsExist"));return}if(!(f>0)){D.error(v("PositiveIntegerCheck"));return}S(f)};L(()=>{t(!1)},[p]);const S=d=>{var f;const b=l({trackID:d});(f=n==null?void 0:n.topViewInstance)==null||f.updatePolygonList(b!=null?b:[]),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,v("CurrentBoxTrackIDs")),p&&e.createElement(pt,{id:p,updateCurrentPolygonList:d=>S(d)})),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},o&&p?e.createElement(rt,{defaultValue:p,onChange:d=>{m(d.target.value)},disabled:!p,size:"small",onBlur:()=>{r()},onPressEnter:()=>{r(!0)}}):e.createElement("span",null,p),e.createElement(ot,{style:{color:"#999",marginLeft:16,cursor:typeof p!="undefined"?"pointer":"not-allowed"},onClick:()=>{p&&t(!o)}})))},U=({segmentStatus:o,globalPattern:t})=>t===Ct.Segmentation&&![h.Edit,h.Ready].includes(o),H=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:l,enableColorPicker:u})=>{const[m,v]=y({segmentStatus:h.Ready}),{selectedBox:p}=$(),s=I(T),{ptSegmentInstance:r}=s,{t:S}=B(),{defaultAttribute:d}=Et(),f=It(),{isPointCloudSegmentationPattern:b}=R(),W=dt(),J={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};L(()=>{if(!!r)return r.on("syncPointCloudStatus",v),()=>{r.unbind("syncPointCloudStatus",v)}},[r]);const K=(i,C)=>{var x,E,P,A,N;const _=(x=a==null?void 0:a.attributeList)==null?void 0:x.map(g=>g.value===i?k(V({},g),{color:C}):g),O=k(V({},a),{attributeList:_}),tt=JSON.stringify(O),et=c==null?void 0:c.map(g=>(g==null?void 0:g.step)===(l==null?void 0:l.step)?k(V({},g),{config:tt}):g);(E=s==null?void 0:s.topViewInstance)==null||E.updateAttributeList(_),(P=s==null?void 0:s.sideViewInstance)==null||P.updateAttributeList(_),(A=s==null?void 0:s.backViewInstance)==null||A.updateAttributeList(_),(N=s==null?void 0:s.mainViewInstance)==null||N.setConfig(O),W(jt({stepList:et}))},X=i=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(i)},Y=i=>{U({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setDefaultAttribute(i)},q=(i,C)=>{U({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setSubAttribute(i,C)},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===h.Edit,Z=b;return e.createElement("div",{style:{height:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},e.createElement("div",{style:J},S("Attribute")),e.createElement("div",{style:{height:0,flex:1,overflowY:"auto",overflowX:"hidden"}},e.createElement(xt,{list:G,forbidDefault:!0,selectedAttribute:d!=null?d:"",attributeChanged:i=>Y(i),updateColorConfig:K,enableColorPicker:u,updateSize:X,forbidShowLimitPopover:Z}),e.createElement(w,{style:{margin:0}}),Q&&e.createElement(Lt,{subAttributeList:t,setSubAttribute:q,getValue:i=>{var C,x,E,P;return((x=(C=s.selectedPointCloudBox)==null?void 0:C.subAttribute)==null?void 0:x[i.value])||((P=(E=m.cacheSegData)==null?void 0:E.subAttribute)==null?void 0:P[i.value])}})))},Rt=[{toolName:"LassoSelector",commonSvg:Pt,selectedSvg:_t},{toolName:"RectSelector",commonSvg:Dt,selectedSvg:ht},{toolName:"CircleSelector",commonSvg:yt,selectedSvg:wt}],M=({toolInstance:o})=>{const{ptSegmentInstance:t}=I(T),[n,a]=y("LassoSelector"),{t:c}=B();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:`${j}__level`},Rt.map(l=>{const u=n===l.toolName;return e.createElement("span",{className:`${j}__toolOption`,key:l.toolName,onClick:()=>t==null?void 0:t.emit(l.toolName)},e.createElement("img",{className:`${j}__singleTool`,src:u?l==null?void 0:l.selectedSvg:l==null?void 0:l.commonSvg}),e.createElement("span",{className:ut({[`${j}__toolOption__selected`]:u})},c(l.toolName)))}))},$t=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:l})=>{var u,m;const{updatePointCloudPattern:v,pointCloudPattern:p,isPointCloudSegmentationPattern:s}=R(),r=ct(o.config),S=(u=r==null?void 0:r.attributeList)!=null?u:[],d=(r==null?void 0:r.secondaryAttributeConfigurable)===!0?(m=r==null?void 0:r.inputList)!=null?m:[]:[];return s?e.createElement(e.Fragment,null,e.createElement(M,{toolInstance:t}),e.createElement(H,{toolInstance:t,attributeList:S,subAttributeList:d,config:r,stepList:c,stepInfo:o,enableColorPicker:l})):e.createElement(e.Fragment,null,e.createElement(nt,{toolName:it.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>v==null?void 0:v(f)}),e.createElement("div",{style:{flex:1,overflow:"hidden"}},e.createElement(Tt,{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(H,{toolInstance:t,attributeList:S,subAttributeList:d,config:r,stepList:c,stepInfo:o,enableColorPicker:l}),(r==null?void 0:r.trackConfigurable)===!0&&p===lt.Rect?e.createElement("div",{style:{height:"100%",overflow:"auto"}},e.createElement(Ot,null),e.createElement(w,{style:{margin:0}}),e.createElement(ft,{imgList:n,imgIndex:a}),e.createElement(w,{style:{margin:0}}),e.createElement(gt,{imgList:n,imgIndex:a}),e.createElement(w,{style:{margin:0}}),e.createElement(vt,null),o.loadPreStep>0&&e.createElement(St,null),e.createElement(bt,null)):e.createElement("div",null))))},zt=o=>{var t,n,a,c;const l=st.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 Ft=at(zt,null,null,{context:mt})($t);export{M as PointCloudSegToolIcon,Ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{prefix as
|
|
1
|
+
import{prefix as R}from"../../../constant/index.js";import{EToolName as n}from"../../../data/enums/ToolType.js";import W from"../../../utils/StepUtils.js";import{Collapse as u}from"antd/es";import e,{useState as z}from"react";import{useTranslation as D}from"react-i18next";import G from"./AnnotationText/index.js";import U from"./ClearIcon/index.js";import q,{PointCloudOperation as y}from"./GeneralOperation/index.js";import H from"./ImgAttributeInfo/index.js";import J from"./SwitchAttributeList/index.js";import p,{expandIconFuc as _}from"./TagSidebar/index.js";import f from"./TextToolSidebar/index.js";import $ from"./PointCloudToolSidebar/index.js";import Q from"./ToolStyle/index.js";import{cTool as X}from"@labelbee/lb-annotation";import Y from"./ScribbleSidebar/index.js";import{ToolIcons as Z}from"./ToolIcons.js";import{useSelector as ee}from"../../../store/ctx.js";import{Tabs as I}from"antd";import{classnames as te}from"../../../utils/index.js";import P from"../../../assets/annotation/common/icon_menu_fold.svg.js";import oe from"../../../components/LLMToolView/sidebar/index.js";import ne from"../../../components/LLMMultiWheelView/sidebar/index.js";import re from"./NLPSidebar/index.js";import ie from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";const{EVideoToolName:E,EPointCloudName:le}=X,{Panel:A}=u,t=`${R}-sidebar`,ae=({sider:l,enableColorPicker:w,setSiderWidth:b,propsSiderWidth:se,checkMode:c})=>{const x=ee(r=>W.getCurrentStepInfo(r.annotation.step,r.annotation.stepList)),[m,M]=z(!0),o=x==null?void 0:x.tool,{t:S}=D();if(!o)return null;const V=r=>{const s=e.createElement(Q,null);return e.createElement(A,{header:S("Style"),className:"panel",key:r},s)},T=e.createElement(Z,{toolName:o,onChange:()=>{}}),a=e.createElement(J,null),g=e.createElement(G,null),N=e.createElement(u,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},V("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(U,null)),className:"panel",key:"imgAttribute"},e.createElement(H,null))),i=e.createElement(q,null),B=e.createElement(p,null),O=r=>e.createElement(f,{disabled:r}),L=e.createElement(Y,{onChange:(r,s)=>{}}),v=e.createElement(ie,null),C=e.createElement(oe,{checkMode:c}),k=e.createElement(ne,{checkMode:c}),j=e.createElement(re,{checkMode:c}),d=e.createElement("div",{className:`${t}__horizontal`}),F=e.createElement($,{enableColorPicker:w}),K=e.createElement(y,null);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:B,textToolSideBar:O,horizontal:d,pointCloudToolSidebar:F,pointCloudOperation:K,scribbleSidebar:L,LLMSidebar:C,LLMMultiWheelSidebar:k,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===le.PointCloud){const r=()=>{M(!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:te({[`${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{ae as default,t as sidebarCls};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useContext as
|
|
1
|
+
import e,{useContext as L}from"react";import k from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js";import N from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js";import{EToolName as o}from"../../../../../data/enums/ToolType.js";import w from"./rectToolShortCutTable/index.js";import O from"./point/index.js";import I from"./polygon/index.js";import H from"./line/index.js";import M from"./tag/index.js";import R from"./text/index.js";import G from"./videoTag/index.js";import K,{pointCloudShortCutTable_POLYGON as V,pointCloudShortCutTable_SEGMENT as A}from"./pointCloud/index.js";import W from"./scribble/index.js";import Y from"./cuboid/index.js";import T from"./LLM/index.js";import $ from"./NLP/index.js";import B from"./audioText/index.js";import{footerCls as D}from"../../index.js";import{useTranslation as F}from"react-i18next";import{EAudioToolName as z,cTool as U}from"@labelbee/lb-annotation";import{PointCloudContext as q}from"../../../../../components/pointCloudView/PointCloudContext.js";import J from"../../FooterPopover.js";import{EPointCloudPattern as C}from"@labelbee/lb-utils";var Q=Object.defineProperty,b=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,E=(r,n,t)=>n in r?Q(r,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[n]=t,ee=(r,n)=>{for(var t in n||(n={}))X.call(n,t)&&E(r,t,n[t]);if(b)for(var t of b(n))Z.call(n,t)&&E(r,t,n[t]);return r};const{EVideoToolName:te,EPointCloudName:u}=U,f={[o.Rect]:w,[o.Tag]:M,[o.Point]:O,[o.Polygon]:I,[o.Line]:H,[o.Text]:R,[te.VideoTagTool]:G,[u.PointCloud]:K,[u.PointCloud+"_POLYGON"]:V,[u.PointCloud+"_SEGMENT"]:A,[o.ScribbleTool]:W,[o.Cuboid]:Y,[o.LLM]:T,[o.LLMMultiWheel]:T,[o.NLP]:$,[z.AudioTextTool]:B},oe=({icon:r})=>typeof r=="string"?e.createElement("img",{width:16,height:16,src:r}):r||null,x=({title:r,style:n,shortCutList:t})=>{const{t:m}=F(),d={width:320,display:"flex",justifyContent:"space-between",margin:16},s={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},y=(a,c)=>e.createElement("div",{style:d,key:c},e.createElement("span",{style:{display:"flex",alignItems:"center"}},e.createElement(oe,{icon:a.icon}),e.createElement("span",{style:{marginLeft:a.icon?16:0}},m(a.name))),e.createElement("span",{style:{display:"flex",alignItems:"center"}},a.noticeInfo&&e.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},m(a.noticeInfo)),S(a.shortCut,a.shortCutUseHtml,a.linkSymbol))),S=(a,c=!1,j="+")=>{if(!a)return null;const v=a.map((l,i)=>{var h,g;const p={display:"flex",alignItems:"center"};return c?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s,dangerouslySetInnerHTML:{__html:l}})):i<a.length-1?typeof l=="number"?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},l),e.createElement("span",{style:{marginRight:"3px"}},"~")):((h=l==null?void 0:l.startsWith)==null?void 0:h.call(l,"data"))?e.createElement("span",{key:i,style:p},e.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:l})),e.createElement("span",{style:{marginRight:"3px"}},"+")):e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},l),e.createElement("span",{style:{marginRight:"3px"}},j)):typeof l=="number"?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},l)):((g=l==null?void 0:l.startsWith)==null?void 0:g.call(l,"data"))?e.createElement("span",{className:"shortCutButton",key:i,style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:l})):e.createElement("span",{style:s,key:i},l)});return e.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},v)},P=e.createElement("div",{className:`${D}__hotkey-content`},t==null?void 0:t.map((a,c)=>y(a,c))),_=n||{};return e.createElement(J,{hoverIcon:N,icon:k,title:m("Hotkeys"),content:P,containerStyle:_})},re=({style:r,title:n,toolName:t})=>{const{pointCloudPattern:m,globalPattern:d}=L(q);if(!t||!f[t])return null;let s=t;switch(d){case C.Detection:switch(m){case o.Polygon:s+="_POLYGON";break;case o.Line:s=o.Line;break;case o.Point:s=o.Point;break}break;case C.Segmentation:s=u.PointCloud+"_SEGMENT";break}const y={style:r,title:n,shortCutList:f[s]};return e.createElement(x,ee({},y))};export{x as ToolHotKeyCom,re as default,f as shortCutTable};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labelbee/lb-components",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.1-alpha.1",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ant-design/icons": "^4.6.2",
|
|
46
|
-
"@labelbee/lb-annotation": "1.27.0
|
|
47
|
-
"@labelbee/lb-utils": "1.19.0
|
|
48
|
-
"@labelbee/wavesurfer": "1.
|
|
46
|
+
"@labelbee/lb-annotation": "1.27.0",
|
|
47
|
+
"@labelbee/lb-utils": "1.19.0",
|
|
48
|
+
"@labelbee/wavesurfer": "1.1.0",
|
|
49
49
|
"@types/react-dom": "^18.2.7",
|
|
50
50
|
"@types/react-transition-group": "^4.4.9",
|
|
51
51
|
"ahooks": "^3.4.0",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"redux-actions": "^2.6.5",
|
|
68
68
|
"redux-thunk": "^2.3.0",
|
|
69
69
|
"rehype-katex": "^6.0.3",
|
|
70
|
+
"rehype-raw": "^7.0.0",
|
|
70
71
|
"remark-gfm": "^3.0.1",
|
|
71
72
|
"remark-math": "^5.1.1",
|
|
72
73
|
"resize-observer-polyfill": "^1.5.1",
|