@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.
Files changed (134) hide show
  1. package/dist/_virtual/2DViewWorker.js +1 -1
  2. package/dist/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +2 -2
  3. package/dist/_virtual/highlightSegmentWorker.js +1 -1
  4. package/dist/assets/annotation/rectTool/three_points_rect.svg.js +1 -0
  5. package/dist/assets/annotation/rectTool/two_points_rect.svg.js +1 -0
  6. package/dist/components/DynamicResizer/DynamicResizer.js +1 -1
  7. package/dist/components/DynamicResizer/hooks/useDrag.js +1 -1
  8. package/dist/components/DynamicResizer/hooks/useDraggingAllowed.js +1 -0
  9. package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -1
  10. package/dist/components/DynamicResizer/utils/index.js +1 -0
  11. package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -1
  12. package/dist/components/LLMMultiWheelView/index.js +1 -1
  13. package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -1
  14. package/dist/components/LLMToolView/index.js +1 -1
  15. package/dist/components/LLMToolView/questionView/components/audioView/index.js +1 -0
  16. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  17. package/dist/components/LLMToolView/questionView/index.js +1 -1
  18. package/dist/components/attributeList/index.js +1 -1
  19. package/dist/components/audioAnnotate/index.js +1 -1
  20. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  21. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  22. package/dist/components/audioPlayer/index.js +1 -1
  23. package/dist/components/longText/index.js +1 -1
  24. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  25. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  26. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  27. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  28. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  29. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  30. package/dist/components/pointCloudView/components/TitleButton/index.js +1 -1
  31. package/dist/components/pointCloudView/components/UnifyParamsModal/index.js +1 -1
  32. package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
  33. package/dist/components/pointCloudView/hooks/usePointCloudAttribute.js +1 -0
  34. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  35. package/dist/components/pointCloudView/index.js +1 -1
  36. package/dist/components/tagList/index.js +1 -1
  37. package/dist/constant/index.js +1 -1
  38. package/dist/index.css +118 -90
  39. package/dist/store/annotation/actionCreators.js +1 -1
  40. package/dist/store/annotation/reducer.js +1 -1
  41. package/dist/store/toolConfig/pointCloudToolConfig.js +1 -1
  42. package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +3 -3
  43. package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +24 -7
  44. package/dist/types/components/DynamicResizer/hooks/useDraggingAllowed.d.ts +12 -0
  45. package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +10 -21
  46. package/dist/types/components/DynamicResizer/types/interface.d.ts +14 -6
  47. package/dist/types/components/DynamicResizer/utils/index.d.ts +4 -0
  48. package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +2 -0
  49. package/dist/types/components/LLMMultiWheelView/index.d.ts +2 -0
  50. package/dist/types/components/LLMToolView/questionView/components/audioView/index.d.ts +8 -0
  51. package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +3 -1
  52. package/dist/types/components/attributeList/components/limitPopover/index.d.ts +2 -2
  53. package/dist/types/components/longText/index.d.ts +1 -1
  54. package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +0 -1
  55. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +4 -0
  56. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
  57. package/dist/types/components/pointCloudView/hooks/usePointCloudAttribute.d.ts +3 -0
  58. package/dist/types/components/pointCloudView/hooks/useRotate.d.ts +1 -2
  59. package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +1 -2
  60. package/dist/types/components/pointCloudView/index.d.ts +2 -0
  61. package/dist/types/constant/index.d.ts +2 -1
  62. package/dist/types/store/annotation/actionCreators.d.ts +1 -1
  63. package/dist/types/store/annotation/map.d.ts +1 -0
  64. package/dist/types/store/annotation/reducer.d.ts +4 -0
  65. package/dist/types/store/annotation/types.d.ts +3 -2
  66. package/dist/types/store/toolConfig/types.d.ts +2 -0
  67. package/dist/types/views/MainView/index.d.ts +2 -0
  68. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +3 -0
  69. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +9 -0
  70. package/dist/types/views/MainView/sidebar/index.d.ts +2 -0
  71. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -1
  72. package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -1
  73. package/dist/views/MainView/index.js +1 -1
  74. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  75. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  76. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  77. package/dist/views/MainView/sidebar/ToolIcons.js +1 -1
  78. package/dist/views/MainView/sidebar/index.js +1 -1
  79. package/es/_virtual/2DViewWorker.js +1 -1
  80. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +2 -2
  81. package/es/_virtual/highlightSegmentWorker.js +1 -1
  82. package/es/assets/annotation/rectTool/three_points_rect.svg.js +1 -0
  83. package/es/assets/annotation/rectTool/two_points_rect.svg.js +1 -0
  84. package/es/components/DynamicResizer/DynamicResizer.js +1 -1
  85. package/es/components/DynamicResizer/hooks/useDrag.js +1 -1
  86. package/es/components/DynamicResizer/hooks/useDraggingAllowed.js +1 -0
  87. package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -1
  88. package/es/components/DynamicResizer/utils/index.js +1 -0
  89. package/es/components/LLMMultiWheelView/dialogView/index.js +1 -1
  90. package/es/components/LLMMultiWheelView/index.js +1 -1
  91. package/es/components/LLMMultiWheelView/sidebar/index.js +1 -1
  92. package/es/components/LLMToolView/index.js +1 -1
  93. package/es/components/LLMToolView/questionView/components/audioView/index.js +1 -0
  94. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  95. package/es/components/LLMToolView/questionView/index.js +1 -1
  96. package/es/components/attributeList/index.js +1 -1
  97. package/es/components/audioAnnotate/index.js +1 -1
  98. package/es/components/audioAnnotate/textInput/index.js +1 -1
  99. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  100. package/es/components/audioPlayer/index.js +1 -1
  101. package/es/components/longText/index.js +1 -1
  102. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  103. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  104. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  105. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  106. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  107. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  108. package/es/components/pointCloudView/components/TitleButton/index.js +1 -1
  109. package/es/components/pointCloudView/components/UnifyParamsModal/index.js +1 -1
  110. package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
  111. package/es/components/pointCloudView/hooks/usePointCloudAttribute.js +1 -0
  112. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  113. package/es/components/pointCloudView/index.js +1 -1
  114. package/es/components/tagList/index.js +1 -1
  115. package/es/constant/index.js +1 -1
  116. package/es/index.css +118 -90
  117. package/es/store/annotation/actionCreators.js +1 -1
  118. package/es/store/annotation/reducer.js +1 -1
  119. package/es/store/toolConfig/pointCloudToolConfig.js +1 -1
  120. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -1
  121. package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -1
  122. package/es/views/MainView/index.js +1 -1
  123. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  124. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  125. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  126. package/es/views/MainView/sidebar/ToolIcons.js +1 -1
  127. package/es/views/MainView/sidebar/index.js +1 -1
  128. package/package.json +6 -6
  129. package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +0 -1
  130. package/dist/components/DynamicResizer/assets/divider.svg.js +0 -1
  131. package/dist/components/DynamicResizer/assets/topToZero.svg.js +0 -1
  132. package/es/components/DynamicResizer/assets/bottomToZero.svg.js +0 -1
  133. package/es/components/DynamicResizer/assets/divider.svg.js +0 -1
  134. package/es/components/DynamicResizer/assets/topToZero.svg.js +0 -1
@@ -1 +1 @@
1
- import r,{useRef as d,useState as v}from"react";import{Col as p,Popconfirm as C}from"antd";import{useTranslation as m}from"react-i18next";import{prefix as E}from"../../../../constant/index.js";const y={color:"#CCCCCC"},g=({info:e})=>{const{t}=m();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)},k=({icon:e})=>typeof e=="string"?r.createElement("img",{width:23,height:25,src:e}):e,i=({isHover:e,info:t})=>{const n=!!t.forbidOperation,o=t.key===e&&!n;let a={color:o?"#666fff":""};return n&&(a=y),r.createElement("div",{style:{cursor:n?"not-allowed":"default"},onClick:()=>{var c;return(t==null?void 0:t.forbidConfirm)&&!n&&((c=t==null?void 0:t.onClick)==null?void 0:c.call(t))}},r.createElement("div",{className:"icon"},r.createElement(k,{icon:o?t.hoverSvg:t.imgSvg})),r.createElement("div",{className:"toolName",style:a},t.name))},f=({allOperation:e})=>{const t=d(null),[n,o]=v(null),{t:a}=m(),c=Math.floor(24/e.length);return r.createElement("div",{className:"generalOperation",ref:t},e.map((l,u)=>r.createElement(p,{span:c,key:u,className:"generalOperation-col"},r.createElement("div",{key:l.key,className:"item",onMouseEnter:()=>{o(l.key)},onMouseLeave:()=>{o(null)}},l.forbidConfirm?r.createElement(i,{info:l,isHover:n}):r.createElement(C,{title:r.createElement(g,{info:l}),placement:"topRight",okText:a("Confirm"),cancelText:a("Cancel"),getPopupContainer:()=>{var s;return(s=t.current)!=null?s:document.body},onConfirm:l.onClick,overlayClassName:`${E}-pop-confirm`},r.createElement("div",null,r.createElement(i,{info:l,isHover:n})))))))};export{f as default};
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 d,useCallback as B}from"react";import{connect as g}from"react-redux";import I 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 U from"../../../../assets/annotation/pointCloudTool/unitAttribute.svg.js";import w from"../../../../assets/annotation/pointCloudTool/unitAttributeForbid.svg.js";import T from"../../../../assets/annotation/pointCloudTool/unitAttributeHover.svg.js";import{useTranslation as V}from"react-i18next";import A from"../../../../components/pointCloudView/components/UnifyParamsModal/index.js";import{useSingleBox as E}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{composeResultByToolInstance as M}from"../../../../store/annotation/reducer.js";import{useStatus as _}from"../../../../components/pointCloudView/hooks/useStatus.js";const x=o=>{var t,i;const n=I.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}},R=({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})},$=g(x,null,null,{context:S})(({toolInstance:o,stepInfo:t,imgList:i,stepList:n,imgIndex:r})=>{const{t:e}=V(),{selectedBox:m}=E(),u=y(o),[P,c]=d(!1),[j,L]=d([]),{isPointCloudDetectionPattern:b,isPointCloudSegmentationPattern:k}=_(),p=v(t.config);let a=[u.copyPrevious,u.empty,u.setValidity];if(b&&p.trackConfigurable===!0){const l=!m,O={name:e("UnifyParams"),key:"UnifyParams",imgSvg:l?w:U,hoverSvg:T,onClick:()=>{L(M({toolInstance:o,imgList:i,imgIndex:r,stepList:n})),c(!0)},forbidConfirm:!0,forbidOperation:l};a.unshift(O)}const h=B(()=>{c(!1)},[]),f=m==null?void 0:m.info;return k&&(a=a.filter(l=>!["setValidity","copyPrevious"].includes(l.key))),s.createElement(s.Fragment,null,s.createElement(C,{allOperation:a}),s.createElement(A,{id:f==null?void 0:f.trackID,visible:P,onCancel:h,config:p,imgList:j}))});var D=g(x,null,null,{context:S})(R);export{$ as PointCloudOperation,D as default};
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 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
+ 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 e}from"../../../data/enums/ToolType.js";import t from"react";import{sidebarCls as s}from"./index.js";import p from"../../../assets/annotation/lineTool/icon_line.svg.js";import _ from"../../../assets/annotation/lineTool/icon_line_a.svg.js";import v from"../../../assets/annotation/pointTool/icon_point.svg.js";import d from"../../../assets/annotation/pointTool/icon_point_a.svg.js";import u from"../../../assets/annotation/polygonTool/icon_polygon_a.svg.js";import N from"../../../assets/annotation/polygonTool/icon_polygon.svg.js";import T from"../../../assets/annotation/rectTool/icon_rect.svg.js";import f from"../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{cTool as S}from"@labelbee/lb-annotation";import $ from"classnames";import{useTranslation as j}from"react-i18next";const{EPointCloudName:E,TOOL_NAME:y,TOOL_NAME_EN:O}=S,m=[{toolName:e.Rect,commonSvg:T,selectedSvg:f},{toolName:e.Polygon,commonSvg:N,selectedSvg:u},{toolName:e.Line,commonSvg:p,selectedSvg:_},{toolName:e.Point,commonSvg:v,selectedSvg:d}],P=n=>n==="en"?O:y,L=({toolName:n,selectedToolName:r,onChange:l})=>{const{i18n:c}=j(),i=m==null?void 0:m.filter(o=>n===E.PointCloud?[e.Polygon,e.Rect,e.Point,e.Line].includes(o==null?void 0:o.toolName):(o==null?void 0:o.toolName)===n),g=i.length>1;return t.createElement("div",{className:`${s}__level`},i.map(o=>{const a=g&&r===o.toolName;return t.createElement("span",{className:`${s}__toolOption`,key:o.toolName,onClick:()=>l==null?void 0:l(o.toolName)},t.createElement("img",{className:`${s}__singleTool`,src:a?o==null?void 0:o.selectedSvg:o==null?void 0:o.commonSvg}),t.createElement("span",{className:$({[`${s}__toolOption__selected`]:a})},P(c.language)[o.toolName]))}))};export{L as ToolIcons};
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 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
+ 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",
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.2",
47
- "@labelbee/lb-utils": "1.19.0",
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": "^18.2.7",
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": "^6.9.9",
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": "^16.13.1",
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};