@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.
Files changed (133) hide show
  1. package/dist/_virtual/2DViewWorker.js +1 -1
  2. package/dist/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
  3. package/dist/components/AnnotationView/index.js +1 -1
  4. package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -0
  5. package/dist/components/LLMMultiWheelView/index.js +1 -0
  6. package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -0
  7. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  8. package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  9. package/dist/components/LLMToolView/questionView/index.js +1 -1
  10. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  11. package/dist/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
  12. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  13. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  14. package/dist/components/attributeList/index.js +1 -1
  15. package/dist/components/audioPlayer/index.js +1 -1
  16. package/dist/components/audioPlayer/useAudioScroll/index.js +1 -1
  17. package/dist/components/markdownView/index.js +1 -1
  18. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  19. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  20. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  21. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  22. package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  23. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  24. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  25. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  26. package/dist/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
  27. package/dist/components/pointCloudView/index.js +1 -1
  28. package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -1
  29. package/dist/components/predictTracking/previewResult/index.js +1 -1
  30. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  31. package/dist/data/enums/ToolType.js +1 -1
  32. package/dist/index.css +71 -4
  33. package/dist/index.js +1 -1
  34. package/dist/store/LLMMultiWheel/index.js +1 -0
  35. package/dist/store/annotation/actionCreators.js +1 -1
  36. package/dist/store/annotation/reducer.js +1 -1
  37. package/dist/store/ctx.js +1 -1
  38. package/dist/store/toolConfig/baseToolConfig.js +1 -0
  39. package/dist/store/toolConfig/index.js +1 -0
  40. package/dist/store/toolConfig/pointCloudToolConfig.js +1 -0
  41. package/dist/types/App.d.ts +1 -0
  42. package/dist/types/components/AnnotationView/hooks/useFilterAnnotations.d.ts +2 -0
  43. package/dist/types/components/AnnotationView/index.d.ts +9 -0
  44. package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +15 -0
  45. package/dist/types/components/LLMMultiWheelView/index.d.ts +21 -0
  46. package/dist/types/components/LLMMultiWheelView/sidebar/index.d.ts +8 -0
  47. package/dist/types/components/LLMMultiWheelView/types.d.ts +62 -0
  48. package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +15 -0
  49. package/dist/types/components/LLMToolView/questionView/index.d.ts +7 -0
  50. package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +3 -0
  51. package/dist/types/components/LLMToolView/sidebar/components/modelAnswerSort/index.d.ts +30 -0
  52. package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +2 -2
  53. package/dist/types/components/LLMToolView/sidebar/index.d.ts +10 -0
  54. package/dist/types/components/LLMToolView/types.d.ts +6 -2
  55. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -0
  56. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
  57. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +23 -1
  58. package/dist/types/components/pointCloudView/hooks/useUpdatePointCloudColor.d.ts +4 -0
  59. package/dist/types/components/pointCloudView/index.d.ts +1 -0
  60. package/dist/types/data/enums/ToolType.d.ts +2 -1
  61. package/dist/types/index.d.ts +3 -1
  62. package/dist/types/store/LLMMultiWheel/index.d.ts +15 -0
  63. package/dist/types/store/annotation/actionCreators.d.ts +1 -1
  64. package/dist/types/store/ctx.d.ts +7 -0
  65. package/dist/types/store/toolConfig/baseToolConfig.d.ts +4 -0
  66. package/dist/types/store/toolConfig/index.d.ts +3 -0
  67. package/dist/types/store/toolConfig/pointCloudToolConfig.d.ts +4 -0
  68. package/dist/types/store/toolConfig/types.d.ts +10 -0
  69. package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +2 -1
  70. package/dist/types/views/MainView/LLMMultiWheelLayout/index.d.ts +9 -0
  71. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.d.ts +3 -0
  72. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.d.ts +3 -0
  73. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -1
  74. package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -0
  75. package/dist/views/MainView/index.js +1 -1
  76. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  77. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  78. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
  79. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
  80. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  81. package/dist/views/MainView/sidebar/index.js +1 -1
  82. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  83. package/es/_virtual/2DViewWorker.js +1 -1
  84. package/es/components/AnnotationView/hooks/useFilterAnnotations.js +1 -0
  85. package/es/components/AnnotationView/index.js +1 -1
  86. package/es/components/LLMMultiWheelView/dialogView/index.js +1 -0
  87. package/es/components/LLMMultiWheelView/index.js +1 -0
  88. package/es/components/LLMMultiWheelView/sidebar/index.js +1 -0
  89. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  90. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  91. package/es/components/LLMToolView/questionView/index.js +1 -1
  92. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  93. package/es/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
  94. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  95. package/es/components/LLMToolView/sidebar/index.js +1 -1
  96. package/es/components/attributeList/index.js +1 -1
  97. package/es/components/audioPlayer/index.js +1 -1
  98. package/es/components/audioPlayer/useAudioScroll/index.js +1 -1
  99. package/es/components/markdownView/index.js +1 -1
  100. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  101. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  102. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  103. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  104. package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  105. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  106. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  107. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  108. package/es/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
  109. package/es/components/pointCloudView/index.js +1 -1
  110. package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
  111. package/es/components/predictTracking/previewResult/index.js +1 -1
  112. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  113. package/es/data/enums/ToolType.js +1 -1
  114. package/es/index.css +71 -4
  115. package/es/index.js +1 -1
  116. package/es/store/LLMMultiWheel/index.js +1 -0
  117. package/es/store/annotation/actionCreators.js +1 -1
  118. package/es/store/annotation/reducer.js +1 -1
  119. package/es/store/ctx.js +1 -1
  120. package/es/store/toolConfig/baseToolConfig.js +1 -0
  121. package/es/store/toolConfig/index.js +1 -0
  122. package/es/store/toolConfig/pointCloudToolConfig.js +1 -0
  123. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -1
  124. package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -0
  125. package/es/views/MainView/index.js +1 -1
  126. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  127. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  128. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
  129. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
  130. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  131. package/es/views/MainView/sidebar/index.js +1 -1
  132. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  133. 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 y}from"antd/es";import t,{useState as O}from"react";import V from"./annotationOperation/index.js";import M from"./annotationTips/index.js";import k from"./sidebar/index.js";import h from"./toolFooter/index.js";import F from"./toolHeader/index.js";import{getStepConfig as E}from"../../store/annotation/reducer.js";import I from"../../components/videoAnnotate/index.js";import{connect as B}from"react-redux";import g from"../../utils/ToolUtils.js";import $ from"../../components/pointCloudView/index.js";import{getClassName as H}from"../../utils/dom.js";import{classnames as R}from"../../utils/index.js";import W from"../../components/predictTracking/previewResult/index.js";import{LabelBeeContext as D}from"../../store/ctx.js";import{EToolName as c}from"../../data/enums/ToolType.js";import U from"./LLMLayout/index.js";import z from"./NLPLayout/index.js";import q from"../../components/audioAnnotate/index.js";import{LoadingOutlined as G}from"@ant-design/icons";import{useTranslation as J}from"react-i18next";import{EPointCloudName as K}from"@labelbee/lb-annotation";var Q=Object.defineProperty,T=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,P=(e,o,n)=>o in e?Q(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,i=(e,o)=>{for(var n in o||(o={}))X.call(o,n)&&P(e,n,o[n]);if(T)for(var n of T(o))Y.call(o,n)&&P(e,n,o[n]);return e};const{Sider:Z,Content:p}=y,u=`${C}-layout`,ee=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(M,{path:e.path,tips:e.tips}),t.createElement(V,i({},e)),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},te=e=>{var o;return t.createElement(t.Fragment,null,t.createElement($,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible}),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},oe=e=>{var o;const{stepList:n,step:r}=e,a=(o=E(n,r))==null?void 0:o.tool,m=g.isPointCloudTool(a),l=g.isVideoTool(a);return m?t.createElement(te,i({},e)):l?t.createElement(I,{drawLayerSlot:e.drawLayerSlot,footer:e.footer,annotationBefore:e==null?void 0:e.annotationBefore}):t.createElement(ee,i({},e))},f=e=>{var o,n,r;const{t:a}=J(),{stepList:m,step:l}=e,d=(o=E(m,l))==null?void 0:o.tool,s=![c.LLM,c.NLP].includes(d),v=![c.LLM,c.NLP].includes(d),L=[K.PointCloud].includes(d);return t.createElement(b,null,t.createElement(A,{spinning:e.loading,indicator:t.createElement(G,null),tip:t.createElement("span",{style:{marginTop:200}},a("LoadingTips")),delay:500},t.createElement(y,{className:R([u,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${u}__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:s,hasHeaderOption:v,hasPredictTrackingIcon:L})),e.children)))},ne=e=>{var o,n,r,a,m,l,d;const[s,v]=O(void 0),L=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:x,step:N}=e,_=(r=E(x,N))==null?void 0:r.tool,j=c.LLM===_,w=c.NLP===_,S=g.isAudioTool(_);return j?t.createElement(f,i({},e),t.createElement(U,i({},e))):w?t.createElement(f,i({},e),t.createElement(z,i({},e))):S?t.createElement(f,i({},e),t.createElement(q,i({},e))):t.createElement(f,i({},e),t.createElement(y,{className:H("layout","container")},e==null?void 0:e.leftSider,t.createElement(p,{className:`${u}__content`},t.createElement(oe,i({},e)),t.createElement(W,null)),t.createElement(Z,{className:`${u}__side`,width:(a=s!=null?s:L)!=null?a:240,style:(m=e.style)==null?void 0:m.sider},t.createElement(k,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:v,propsSiderWidth:(d=(l=e.style)==null?void 0:l.sider)==null?void 0:d.width}))))},le=({annotation:e})=>{var o,n,r;const{imgList:a,loading:m}=e,l=(o=a[e.imgIndex])!=null?o:{};return{path:(r=(n=l==null?void 0:l.path)!=null?n:l==null?void 0:l.url)!=null?r:"",loading:m}};var ie=B(le,null,null,{context:D})(ne);export{ie as default};
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};
@@ -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};
@@ -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 P,useContext as j,useEffect as I}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 rt}from"@labelbee/lb-annotation";import{PointCloudContext as h}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as w,Input as it,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 k}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{EPointCloudSegmentStatus as L,EPointCloudPattern as St}from"@labelbee/lb-utils";import bt from"../../../../components/attributeList/index.js";import{useAttribute as Ct}from"../../../../components/pointCloudView/hooks/useAttribute.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import yt from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import Et from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import xt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Pt from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import wt from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as T}from"../index.js";import{SetTaskStepList as Dt}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as Lt}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Tt from"../../../../components/subAttributeList/index.js";import jt from"../../../../components/DynamicResizer/DynamicResizer.js";var It=Object.defineProperty,ht=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,U=(o,t,n)=>t in o?It(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,A=(o,t)=>{for(var n in t||(t={}))At.call(t,n)&&U(o,n,t[n]);if(z)for(var n of z(t))Vt.call(t,n)&&U(o,n,t[n]);return o},V=(o,t)=>ht(o,kt(t));const Bt=()=>{const[o,t]=P(!1),n=j(h),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:l}=$(),[u,m]=P(""),{t:v}=k(),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)),i=(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)};I(()=>{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:[])};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(it,{defaultValue:p,onChange:d=>{m(d.target.value)},disabled:!p,size:"small",onBlur:()=>{i()},onPressEnter:()=>{i(!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)}})))},F=({segmentStatus:o,globalPattern:t})=>t===St.Segmentation&&![L.Edit,L.Ready].includes(o),H=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:l,enableColorPicker:u})=>{const[m,v]=P({segmentStatus:L.Ready}),{selectedBox:p}=$(),s=j(h),{ptSegmentInstance:i}=s,{t:S}=k(),{defaultAttribute:d}=Ct(),f=Lt(),{isPointCloudSegmentationPattern:b}=R(),W=dt(),J={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};I(()=>{if(!!i)return i.on("syncPointCloudStatus",v),()=>{i.unbind("syncPointCloudStatus",v)}},[i]);const K=(r,C)=>{var _,y,E,B,N;const x=(_=a==null?void 0:a.attributeList)==null?void 0:_.map(g=>g.value===r?V(A({},g),{color:C}):g),O=V(A({},a),{attributeList:x}),tt=JSON.stringify(O),et=c==null?void 0:c.map(g=>(g==null?void 0:g.step)===(l==null?void 0:l.step)?V(A({},g),{config:tt}):g);(y=s==null?void 0:s.topViewInstance)==null||y.updateAttributeList(x),(E=s==null?void 0:s.sideViewInstance)==null||E.updateAttributeList(x),(B=s==null?void 0:s.backViewInstance)==null||B.updateAttributeList(x),(N=s==null?void 0:s.mainViewInstance)==null||N.setConfig(O),W(Dt({stepList:et}))},X=r=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(r)},Y=r=>{F({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setDefaultAttribute(r)},q=(r,C)=>{F({globalPattern:s.globalPattern,segmentStatus:m.segmentStatus})||n.setSubAttribute(r,C)},G=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})),Q=p||m.cacheSegData&&m.segmentStatus===L.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(bt,{list:G,forbidDefault:!0,selectedAttribute:d!=null?d:"",attributeChanged:r=>Y(r),updateColorConfig:K,enableColorPicker:u,updateSize:X,forbidShowLimitPopover:Z}),e.createElement(w,{style:{margin:0}}),Q&&e.createElement(Tt,{subAttributeList:t,setSubAttribute:q,getValue:r=>{var C,_,y,E;return((_=(C=s.selectedPointCloudBox)==null?void 0:C.subAttribute)==null?void 0:_[r.value])||((E=(y=m.cacheSegData)==null?void 0:y.subAttribute)==null?void 0:E[r.value])}})))},Nt=[{toolName:"LassoSelector",commonSvg:_t,selectedSvg:yt},{toolName:"RectSelector",commonSvg:Pt,selectedSvg:wt},{toolName:"CircleSelector",commonSvg:Et,selectedSvg:xt}],M=({toolInstance:o})=>{const{ptSegmentInstance:t}=j(h),[n,a]=P("LassoSelector"),{t:c}=k();return I(()=>{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:`${T}__level`},Nt.map(l=>{const u=n===l.toolName;return e.createElement("span",{className:`${T}__toolOption`,key:l.toolName,onClick:()=>t==null?void 0:t.emit(l.toolName)},e.createElement("img",{className:`${T}__singleTool`,src:u?l==null?void 0:l.selectedSvg:l==null?void 0:l.commonSvg}),e.createElement("span",{className:ut({[`${T}__toolOption__selected`]:u})},c(l.toolName)))}))},Ot=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:l})=>{var u,m;const{updatePointCloudPattern:v,pointCloudPattern:p,isPointCloudSegmentationPattern:s}=R(),i=ct(o.config),S=(u=i==null?void 0:i.attributeList)!=null?u:[],d=(i==null?void 0:i.secondaryAttributeConfigurable)===!0?(m=i==null?void 0:i.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:i,stepList:c,stepInfo:o,enableColorPicker:l})):e.createElement(e.Fragment,null,e.createElement(nt,{toolName:rt.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>v==null?void 0:v(f)}),e.createElement("div",{style:{flex:1,overflow:"hidden"}},e.createElement(jt,{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:i,stepList:c,stepInfo:o,enableColorPicker:l}),(i==null?void 0:i.trackConfigurable)===!0&&p===lt.Rect?e.createElement("div",{style:{height:"100%",overflow:"auto"}},e.createElement(Bt,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)):e.createElement("div",null))))},Rt=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 $t=at(Rt,null,null,{context:mt})(Ot);export{M as PointCloudSegToolIcon,$t as default};
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 M}from"../../../constant/index.js";import{EToolName as o}from"../../../data/enums/ToolType.js";import R from"../../../utils/StepUtils.js";import{Collapse as d}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 _}from"./GeneralOperation/index.js";import H from"./ImgAttributeInfo/index.js";import J from"./SwitchAttributeList/index.js";import u,{expandIconFuc as L}from"./TagSidebar/index.js";import p from"./TextToolSidebar/index.js";import $ from"./PointCloudToolSidebar/index.js";import Q from"./ToolStyle/index.js";import{cTool as W}from"@labelbee/lb-annotation";import X from"./ScribbleSidebar/index.js";import{ToolIcons as Y}from"./ToolIcons.js";import{useSelector as Z}from"../../../store/ctx.js";import{Tabs as I}from"antd";import{classnames as ee}from"../../../utils/index.js";import P from"../../../assets/annotation/common/icon_menu_fold.svg.js";import te from"../../../components/LLMToolView/sidebar/index.js";import ne from"./NLPSidebar/index.js";import oe from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";const{EVideoToolName:f,EPointCloudName:re}=W,{Panel:A}=d,t=`${M}-sidebar`,ie=({sider:l,enableColorPicker:w,setSiderWidth:E,propsSiderWidth:le,checkMode:b})=>{const x=Z(r=>R.getCurrentStepInfo(r.annotation.step,r.annotation.stepList)),[c,V]=z(!0),n=x==null?void 0:x.tool,{t:S}=D();if(!n)return null;const k=r=>{const s=e.createElement(Q,null);return e.createElement(A,{header:S("Style"),className:"panel",key:r},s)},T=e.createElement(Y,{toolName:n,onChange:()=>{}}),a=e.createElement(J,null),g=e.createElement(G,null),N=e.createElement(d,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:L},k("1")),v=e.createElement(d,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:L},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(u,null),O=r=>e.createElement(p,{disabled:r}),h=e.createElement(X,{onChange:(r,s)=>{}}),C=e.createElement(oe,null),y=e.createElement(te,{checkMode:b}),j=e.createElement(ne,{checkMode:b}),m=e.createElement("div",{className:`${t}__horizontal`}),F=e.createElement($,{enableColorPicker:w}),K=e.createElement(_,null);if(l)return typeof l=="function"?e.createElement("div",{className:`${t}`},l({toolIcon:T,attributeList:a,annotationText:g,toolStyle:N,imageAttributeInfo:v,operation:i,tagToolSideBar:B,textToolSideBar:O,horizontal:m,pointCloudToolSidebar:F,pointCloudOperation:K,scribbleSidebar:h,LLMSidebar:y,videoClipSidebar:C,NLPSidebar:j})):l;if([o.Rect,o.Point,o.Line,o.Rect,o.Polygon,o.Cuboid].includes(n))return e.createElement("div",{className:`${t}`},T,m,a,g,m,e.createElement("div",{className:`${t}__content`},N,v),i);if(n===o.Tag)return e.createElement("div",{className:`${t}`},e.createElement(u,null));if(n===f.VideoClipTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},C,a),i);if(n===f.VideoTagTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(u,null)),i);if(n===f.VideoTextTool)return e.createElement("div",{className:`${t}`},e.createElement(p,null));if(n===o.Text)return e.createElement("div",{className:`${t}`},"s",e.createElement(p,null));if(n===re.PointCloud){const r=()=>{V(!c),E&&E(c?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 c?e.createElement(I,{type:"card",activeKey:"1",className:ee({[`${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(_,null))):s}return n===o.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},h,a),i):n===o.LLM?y:n===o.NLP?j:null};export{ie as default,t as sidebarCls};
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 v}from"react";import k from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js";import L from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js";import{EToolName as l}from"../../../../../data/enums/ToolType.js";import N from"./rectToolShortCutTable/index.js";import w from"./point/index.js";import O from"./polygon/index.js";import I from"./line/index.js";import H from"./tag/index.js";import R from"./text/index.js";import G from"./videoTag/index.js";import M,{pointCloudShortCutTable_POLYGON as K,pointCloudShortCutTable_SEGMENT as V}from"./pointCloud/index.js";import A from"./scribble/index.js";import W from"./cuboid/index.js";import Y 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 T}from"@labelbee/lb-utils";var Q=Object.defineProperty,C=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,b=(o,r,t)=>r in o?Q(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,ee=(o,r)=>{for(var t in r||(r={}))X.call(r,t)&&b(o,t,r[t]);if(C)for(var t of C(r))Z.call(r,t)&&b(o,t,r[t]);return o};const{EVideoToolName:te,EPointCloudName:u}=U,f={[l.Rect]:N,[l.Tag]:H,[l.Point]:w,[l.Polygon]:O,[l.Line]:I,[l.Text]:R,[te.VideoTagTool]:G,[u.PointCloud]:M,[u.PointCloud+"_POLYGON"]:K,[u.PointCloud+"_SEGMENT"]:V,[l.ScribbleTool]:A,[l.Cuboid]:W,[l.LLM]:Y,[l.NLP]:$,[z.AudioTextTool]:B},oe=({icon:o})=>typeof o=="string"?e.createElement("img",{width:16,height:16,src:o}):o||null,E=({title:o,style:r,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)),x(a.shortCut,a.shortCutUseHtml,a.linkSymbol))),x=(a,c=!1,_="+")=>{if(!a)return null;const j=a.map((n,i)=>{var g,h;const p={display:"flex",alignItems:"center"};return c?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s,dangerouslySetInnerHTML:{__html:n}})):i<a.length-1?typeof n=="number"?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},n),e.createElement("span",{style:{marginRight:"3px"}},"~")):((g=n==null?void 0:n.startsWith)==null?void 0:g.call(n,"data"))?e.createElement("span",{key:i,style:p},e.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:n})),e.createElement("span",{style:{marginRight:"3px"}},"+")):e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},n),e.createElement("span",{style:{marginRight:"3px"}},_)):typeof n=="number"?e.createElement("span",{key:i,style:p},e.createElement("span",{style:s},n)):((h=n==null?void 0:n.startsWith)==null?void 0:h.call(n,"data"))?e.createElement("span",{className:"shortCutButton",key:i,style:{marginRight:"3px"}},e.createElement("img",{width:16,height:23,src:n})):e.createElement("span",{style:s,key:i},n)});return e.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},j)},S=e.createElement("div",{className:`${D}__hotkey-content`},t==null?void 0:t.map((a,c)=>y(a,c))),P=r||{};return e.createElement(J,{hoverIcon:L,icon:k,title:m("Hotkeys"),content:S,containerStyle:P})},re=({style:o,title:r,toolName:t})=>{const{pointCloudPattern:m,globalPattern:d}=v(q);if(!t||!f[t])return null;let s=t;switch(d){case T.Detection:switch(m){case l.Polygon:s+="_POLYGON";break;case l.Line:s=l.Line;break;case l.Point:s=l.Point;break}break;case T.Segmentation:s=u.PointCloud+"_SEGMENT";break}const y={style:o,title:r,shortCutList:f[s]};return e.createElement(E,ee({},y))};export{E as ToolHotKeyCom,re as default,f as shortCutTable};
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.0-alpha.99",
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-alpha.49",
47
- "@labelbee/lb-utils": "1.19.0-alpha.20",
48
- "@labelbee/wavesurfer": "1.0.0",
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",