@labelbee/lb-components 1.22.0 → 1.23.0-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 (107) hide show
  1. package/dist/components/LLMToolView/index.js +1 -1
  2. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  3. package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  4. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  5. package/dist/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
  6. package/dist/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  7. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
  8. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  9. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  10. package/dist/components/LLMToolView/utils/data.js +1 -1
  11. package/dist/components/NLPToolView/index.js +1 -0
  12. package/dist/components/NLPToolView/textContent/extraMask.js +1 -0
  13. package/dist/components/NLPToolView/textContent/index.js +1 -0
  14. package/dist/components/NLPToolView/utils/index.js +1 -0
  15. package/dist/components/messageMaskLayer/index.js +1 -0
  16. package/dist/components/tagList/components/overall/index.js +1 -0
  17. package/dist/components/tagList/components/portion/index.js +1 -0
  18. package/dist/components/tagList/index.js +1 -0
  19. package/dist/components/tagList/index.module.scss.js +1 -0
  20. package/dist/data/enums/ToolType.js +1 -1
  21. package/dist/hooks/annotation.js +1 -1
  22. package/dist/index.css +110 -0
  23. package/dist/index.js +1 -1
  24. package/dist/store/annotation/reducer.js +1 -1
  25. package/dist/store/ctx.js +1 -1
  26. package/dist/types/components/LLMToolView/index.d.ts +2 -0
  27. package/dist/types/components/LLMToolView/sidebar/components/answerList/index.d.ts +3 -10
  28. package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +1 -1
  29. package/dist/types/components/LLMToolView/sidebar/components/determineGroup/index.d.ts +1 -1
  30. package/dist/types/components/LLMToolView/sidebar/components/scoreGroupButton/index.d.ts +1 -1
  31. package/dist/types/components/LLMToolView/sidebar/components/textEditor/index.d.ts +1 -1
  32. package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +1 -1
  33. package/dist/types/components/LLMToolView/sidebar/index.d.ts +1 -3
  34. package/dist/types/components/LLMToolView/types.d.ts +27 -0
  35. package/dist/types/components/LLMToolView/utils/data.d.ts +14 -0
  36. package/dist/types/components/NLPToolView/index.d.ts +16 -0
  37. package/dist/types/components/NLPToolView/textContent/extraMask.d.ts +12 -0
  38. package/dist/types/components/NLPToolView/textContent/index.d.ts +16 -0
  39. package/dist/types/components/NLPToolView/types.d.ts +82 -0
  40. package/dist/types/components/NLPToolView/utils/index.d.ts +2 -0
  41. package/dist/types/components/attributeList/index.d.ts +1 -1
  42. package/dist/types/components/messageMaskLayer/index.d.ts +11 -0
  43. package/dist/types/components/tagList/components/overall/index.d.ts +4 -0
  44. package/dist/types/components/tagList/components/portion/index.d.ts +4 -0
  45. package/dist/types/components/tagList/index.d.ts +4 -0
  46. package/dist/types/components/tagList/types.d.ts +23 -0
  47. package/dist/types/data/enums/ToolType.d.ts +2 -1
  48. package/dist/types/hooks/annotation.d.ts +1 -0
  49. package/dist/types/index.d.ts +2 -1
  50. package/dist/types/store/ctx.d.ts +5 -0
  51. package/dist/types/views/MainView/NLPLayout/index.d.ts +13 -0
  52. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +1 -0
  53. package/dist/types/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.d.ts +13 -0
  54. package/dist/types/views/MainView/sidebar/NLPSidebar/index.d.ts +12 -0
  55. package/dist/types/views/MainView/sidebar/NLPSidebar/indicatorDetermine.d.ts +13 -0
  56. package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +2 -2
  57. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.d.ts +6 -0
  58. package/dist/views/MainView/LLMLayout/index.js +1 -1
  59. package/dist/views/MainView/NLPLayout/index.js +1 -0
  60. package/dist/views/MainView/index.js +1 -1
  61. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  62. package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -0
  63. package/dist/views/MainView/sidebar/NLPSidebar/index.js +1 -0
  64. package/dist/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -0
  65. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  66. package/dist/views/MainView/sidebar/index.js +1 -1
  67. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
  68. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +1 -0
  69. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  70. package/es/components/LLMToolView/index.js +1 -1
  71. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  72. package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  73. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  74. package/es/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
  75. package/es/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  76. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  77. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  78. package/es/components/LLMToolView/sidebar/index.js +1 -1
  79. package/es/components/LLMToolView/utils/data.js +1 -1
  80. package/es/components/NLPToolView/index.js +1 -0
  81. package/es/components/NLPToolView/textContent/extraMask.js +1 -0
  82. package/es/components/NLPToolView/textContent/index.js +1 -0
  83. package/es/components/NLPToolView/utils/index.js +1 -0
  84. package/es/components/messageMaskLayer/index.js +1 -0
  85. package/es/components/tagList/components/overall/index.js +1 -0
  86. package/es/components/tagList/components/portion/index.js +1 -0
  87. package/es/components/tagList/index.js +1 -0
  88. package/es/components/tagList/index.module.scss.js +1 -0
  89. package/es/data/enums/ToolType.js +1 -1
  90. package/es/hooks/annotation.js +1 -1
  91. package/es/index.css +110 -0
  92. package/es/index.js +1 -1
  93. package/es/store/annotation/reducer.js +1 -1
  94. package/es/store/ctx.js +1 -1
  95. package/es/views/MainView/LLMLayout/index.js +1 -1
  96. package/es/views/MainView/NLPLayout/index.js +1 -0
  97. package/es/views/MainView/index.js +1 -1
  98. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  99. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -0
  100. package/es/views/MainView/sidebar/NLPSidebar/index.js +1 -0
  101. package/es/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -0
  102. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  103. package/es/views/MainView/sidebar/index.js +1 -1
  104. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
  105. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +1 -0
  106. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  107. package/package.json +3 -3
package/es/store/ctx.js CHANGED
@@ -1 +1 @@
1
- import t from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const e=t.createContext(void 0),r=o(e),c=s(e),n=t.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}});export{n as LLMContext,e as LabelBeeContext,r as useDispatch,c as useSelector};
1
+ import e from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const t=e.createContext(void 0),r=o(t),c=s(t),n=e.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),a=e.createContext({highlightKey:"",setHighlightKey:()=>{}});export{n as LLMContext,t as LabelBeeContext,a as NLPContext,r as useDispatch,c as useSelector};
@@ -1 +1 @@
1
- import{prefix as a}from"../../../constant/index.js";import{Layout as m}from"antd/es";import t,{useState as o,useMemo as L}from"react";import v from"../sidebar/index.js";import y from"../toolFooter/index.js";import{getClassName as M}from"../../../utils/dom.js";import{classnames as w}from"../../../utils/index.js";import{LLMContext as x}from"../../../store/ctx.js";import h from"../../../components/LLMToolView/index.js";const{Sider:_,Content:j}=m,c=`${a}-layout`,E=e=>{var l,n;const[s,d]=o(-1),[i,u]=o([]),[r,f]=o([]);return t.createElement(m,{className:M("layout","container")},t.createElement(x.Provider,{value:L(()=>({hoverKey:s,setHoverKey:d,modelAPIResponse:i,setModelAPIResponse:u,newAnswerList:r,setNewAnswerList:f}),[s,i,r])},e==null?void 0:e.leftSider,t.createElement(j,{className:w({[`${c}__content`]:!0,[`${a}-LLMLayout`]:!0})},t.createElement(h,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips}),t.createElement(y,{style:(l=e.style)==null?void 0:l.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(_,{className:`${c}__side`,width:600,style:{position:"relative"}},t.createElement(v,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(n=e.drawLayerSlot)==null?void 0:n.call(e,{}))))};export{E as default};
1
+ import{prefix as i}from"../../../constant/index.js";import{Layout as a}from"antd/es";import t,{useState as o,useMemo as L}from"react";import f from"../sidebar/index.js";import y from"../toolFooter/index.js";import{getClassName as v}from"../../../utils/dom.js";import{classnames as w}from"../../../utils/index.js";import{LLMContext as M}from"../../../store/ctx.js";import x from"../../../components/LLMToolView/index.js";const{Sider:h,Content:j}=a,m=`${i}-layout`,E=e=>{var r;const[s,d]=o(-1),[l,c]=o([]),[n,u]=o([]);return t.createElement(a,{className:v("layout","container")},t.createElement(M.Provider,{value:L(()=>({hoverKey:s,setHoverKey:d,modelAPIResponse:l,setModelAPIResponse:c,newAnswerList:n,setNewAnswerList:u}),[s,l,n])},e==null?void 0:e.leftSider,t.createElement(j,{className:w({[`${m}__content`]:!0,[`${i}-LLMLayout`]:!0})},t.createElement(x,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),t.createElement(y,{style:(r=e.style)==null?void 0:r.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(h,{className:`${m}__side`,width:600,style:{position:"relative"}},t.createElement(f,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}))))};export{E as default};
@@ -0,0 +1 @@
1
+ import{prefix as l}from"../../../constant/index.js";import{Layout as i}from"antd/es";import t,{useState as d,useMemo as c}from"react";import u from"../sidebar/index.js";import s from"../toolFooter/index.js";import{getClassName as f}from"../../../utils/dom.js";import{classnames as h}from"../../../utils/index.js";import{NLPContext as v}from"../../../store/ctx.js";import y from"../../../components/NLPToolView/index.js";const{Sider:x,Content:L}=i,m=`${l}-layout`,N=e=>{var o,a;const[n,r]=d("");return t.createElement(i,{className:f("layout","container")},t.createElement(v.Provider,{value:c(()=>({highlightKey:n,setHighlightKey:r}),[n])},e==null?void 0:e.leftSider,t.createElement(L,{className:h({[`${m}__content`]:!0,[`${l}-NLPLayout`]:!0})},t.createElement(y,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips,extraLayer:e==null?void 0:e.extraLayer,extraData:e==null?void 0:e.extraData,onChangeAnnotation:e==null?void 0:e.onChangeAnnotation,customAnnotationData:e==null?void 0:e.customAnnotationData}),t.createElement(s,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(x,{className:`${m}__side`,width:400,style:{position:"relative"}},t.createElement(u,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(a=e.drawLayerSlot)==null?void 0:a.call(e,{}))))};export{N as default};
@@ -1 +1 @@
1
- import{ViewportProvider as S}from"../../components/customResizeHook/index.js";import{prefix as b}from"../../constant/index.js";import{Spin as C}from"antd";import{Layout as v}from"antd/es";import t,{useState as A}from"react";import O from"./annotationOperation/index.js";import V from"./annotationTips/index.js";import M from"./sidebar/index.js";import h from"./toolFooter/index.js";import k from"./toolHeader/index.js";import{getStepConfig as _}from"../../store/annotation/reducer.js";import F from"../../components/videoAnnotate/index.js";import{connect as I}from"react-redux";import y 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 B}from"../../store/ctx.js";import{EToolName as E}from"../../data/enums/ToolType.js";import D from"./LLMLayout/index.js";import U from"../../components/audioAnnotate/index.js";import{LoadingOutlined as z}from"@ant-design/icons";import{useTranslation as q}from"react-i18next";import{EPointCloudName as G}from"@labelbee/lb-annotation";var J=Object.defineProperty,T=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,x=(e,o,n)=>o in e?J(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,a=(e,o)=>{for(var n in o||(o={}))K.call(o,n)&&x(e,n,o[n]);if(T)for(var n of T(o))Q.call(o,n)&&x(e,n,o[n]);return e};const{Sider:X,Content:Y}=v,c=`${b}-layout`,Z=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(V,{path:e.path,tips:e.tips}),t.createElement(O,a({},e)),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},p=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}))},ee=e=>{var o;const{stepList:n,step:i}=e,r=(o=_(n,i))==null?void 0:o.tool,d=y.isPointCloudTool(r),l=y.isVideoTool(r);return d?t.createElement(p,a({},e)):l?t.createElement(F,{drawLayerSlot:e.drawLayerSlot,footer:e.footer}):t.createElement(Z,a({},e))},L=e=>{var o,n,i;const{t:r}=q(),{stepList:d,step:l}=e,m=(o=_(d,l))==null?void 0:o.tool,s=![E.LLM].includes(m),u=![E.LLM].includes(m),f=[G.PointCloud].includes(m);return t.createElement(S,null,t.createElement(C,{spinning:e.loading,indicator:t.createElement(z,null),tip:t.createElement("span",{style:{marginTop:200}},r("LoadingTips")),delay:500},t.createElement(v,{className:R([c,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${c}__header`,style:(i=e.style)==null?void 0:i.header},t.createElement(k,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:s,hasHeaderOption:u,hasPredictTrackingIcon:f})),e.children)))},te=e=>{var o,n,i,r,d,l,m;const[s,u]=A(void 0),f=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:w,step:j}=e,g=(i=_(w,j))==null?void 0:i.tool,P=E.LLM===g,N=y.isAudioTool(g);return P?t.createElement(L,a({},e),t.createElement(D,a({},e))):N?t.createElement(L,a({},e),t.createElement(U,a({},e))):t.createElement(L,a({},e),t.createElement(v,{className:H("layout","container")},e==null?void 0:e.leftSider,t.createElement(Y,{className:`${c}__content`},t.createElement(ee,a({},e)),t.createElement(W,null)),t.createElement(X,{className:`${c}__side`,width:(r=s!=null?s:f)!=null?r:240,style:(d=e.style)==null?void 0:d.sider},t.createElement(M,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:u,propsSiderWidth:(m=(l=e.style)==null?void 0:l.sider)==null?void 0:m.width}))))},oe=({annotation:e})=>{var o,n,i;const{imgList:r,loading:d}=e,l=(o=r[e.imgIndex])!=null?o:{};return{path:(i=(n=l==null?void 0:l.path)!=null?n:l==null?void 0:l.url)!=null?i:"",loading:d}};var ne=I(oe,null,null,{context:B})(te);export{ne 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 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 $}from"react-redux";import g from"../../utils/ToolUtils.js";import H from"../../components/pointCloudView/index.js";import{getClassName as R}from"../../utils/dom.js";import{classnames as W}from"../../utils/index.js";import B 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(H,{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}):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:W([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:R("layout","container")},e==null?void 0:e.leftSider,t.createElement(p,{className:`${u}__content`},t.createElement(oe,i({},e)),t.createElement(B,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=$(le,null,null,{context:D})(ne);export{ie as default};
@@ -1 +1 @@
1
- import s,{useState as f,useCallback as B}from"react";import{connect as d}from"react-redux";import I from"../../../../utils/StepUtils.js";import{jsonParser as g}from"../../../../utils/index.js";import v from"./ActionsConfirm.js";import C from"./useOperationList.js";import{LabelBeeContext as y}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 S=o=>{var t,n;const i=I.getCurrentStepInfo((t=o.annotation)==null?void 0:t.step,(n=o.annotation)==null?void 0:n.stepList);return{toolInstance:o.annotation.toolInstance,stepInfo:i,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:o.annotation.stepList}},R=({toolInstance:o,stepInfo:t})=>{const n=C(o),i=g(t==null?void 0:t.config),e=[n.empty];return(t==null?void 0:t.dataSourceStep)===0&&e.push(n.setValidity),(i==null?void 0:i.copyBackwardResult)&&e.push(n.copyPrevious),s.createElement(v,{allOperation:e})},$=d(S,null,null,{context:y})(({toolInstance:o,stepInfo:t,imgList:n,stepList:i,imgIndex:e})=>{const{t:x}=V(),{selectedBox:l}=E(),m=C(o),[P,u]=f(!1),[j,L]=f([]),{isPointCloudDetectionPattern:b,isPointCloudSegmentationPattern:k}=_(),c=g(t.config);let r=[m.copyPrevious,m.empty,m.setValidity];if(b&&c.trackConfigurable===!0){const a=!l,O={name:x("UnifyParams"),key:"UnifyParams",imgSvg:a?w:U,hoverSvg:T,onClick:()=>{L(M({toolInstance:o,imgList:n,imgIndex:e,stepList:i})),u(!0)},forbidConfirm:!0,forbidOperation:a};r.unshift(O)}const h=B(()=>{u(!1)},[]),p=l==null?void 0:l.info;return k&&(r=r.filter(a=>!["setValidity","copyPrevious"].includes(a.key))),s.createElement(s.Fragment,null,s.createElement(v,{allOperation:r}),s.createElement(A,{id:p==null?void 0:p.trackID,visible:P,onCancel:h,config:c,imgList:j}))});var D=d(S,null,null,{context:y})(R);export{$ as PointCloudOperation,D as default};
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};
@@ -0,0 +1 @@
1
+ import a,{useState as g,useRef as E,useEffect as $}from"react";import{connect as S}from"react-redux";import j from"../../../../utils/StepUtils.js";import{useTranslation as I}from"react-i18next";import{LabelBeeContext as w}from"../../../../store/ctx.js";import{prefix as P}from"../../../../constant/index.js";import{jsonParser as T,classnames as D}from"../../../../utils/index.js";import{Tooltip as R,Popconfirm as F}from"antd";import{CloseOutlined as H}from"@ant-design/icons";var k=Object.defineProperty,K=Object.defineProperties,U=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,b=(e,t,n)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t)=>{for(var n in t||(t={}))B.call(t,n)&&b(e,n,t[n]);if(x)for(var n of x(t))M.call(t,n)&&b(e,n,t[n]);return e},q=(e,t)=>K(e,U(t));const l=`${P}-sidebar`,z=(e,t)=>{const n=(e==null?void 0:e.attributeList)||[];return t.map(s=>{var p,u;const o=((u=(p=n.filter(m=>m.value===s.attribute))==null?void 0:p[0])==null?void 0:u.key)||"";return q(V({},s),{label:o})})},G=e=>{var t,n;const[s,p]=g(0),u=E(null),{toolInstance:o,checkMode:m,stepInfo:h}=e,{t:c}=I(),L=T(h.config),[f,y]=g("");$(()=>(o&&o.on("changeAttributeSidebar",r=>{p(i=>i+1)}),()=>{o==null||o.unbindAll("changeAttributeSidebar")}),[o,u]);const[v]=o.exportData(),C=(n=(t=v==null?void 0:v[0])==null?void 0:t.textAnnotation)!=null?n:[],_=z(L,C),N=r=>{let i=r===f?"":r;o==null||o.setHighlightKey(i),y(i)},O=r=>{o==null||o.deleteTextAnnotation(r.id)};return(_==null?void 0:_.length)===0?null:a.createElement("div",{className:`${l}__content__NLPList`},_.map((r,i)=>{const A=f===r.id;return a.createElement("div",{key:i,className:D({[`${l}__content__NLPList__item`]:!0,[`${l}__content__NLPList__item__active`]:A}),onClick:()=>N(r.id)},a.createElement("span",{className:`${l}__content__NLPList__item__text`},a.createElement(R,{title:r.text,overlayInnerStyle:{maxHeight:"400px",overflow:"auto"}},a.createElement("span",null,`${r.label||c("NoAttribute")}\uFF0C${c("textTool")}\uFF1A${r.text}`))),!m&&a.createElement(F,{title:c("DeleteCommentConfirm"),placement:"topRight",okText:c("Confirm"),cancelText:c("Cancel"),getPopupContainer:d=>d.parentElement,onConfirm:()=>O(r),overlayClassName:`${P}-pop-confirm`},a.createElement(H,{className:`${l}-pop-remove`,onClick:d=>{d.stopPropagation()}})))}))},J=e=>{var t,n;const s=j.getCurrentStepInfo((t=e.annotation)==null?void 0:t.step,(n=e.annotation)==null?void 0:n.stepList);return{toolInstance:e.annotation.toolInstance,stepInfo:s}};var Q=S(J,null,null,{context:w})(G);export{Q as default,l as sidebarCls};
@@ -0,0 +1 @@
1
+ import t from"react";import{connect as i}from"react-redux";import{LabelBeeContext as o}from"../../../../store/ctx.js";import{prefix as a}from"../../../../constant/index.js";import l from"../SwitchAttributeList/index.js";import m from"../GeneralOperation/index.js";import s from"./NLPAnnotatedList.js";import c from"./indicatorDetermine.js";const d=({checkMode:e})=>e?null:t.createElement(l,null),r=`${a}-sidebar`,u=({toolInstance:e,checkMode:n})=>t.createElement("div",{className:`${r}`},t.createElement("div",{className:`${r}__content`},t.createElement(c,{disabeledAll:n}),t.createElement(d,{checkMode:n}),t.createElement(s,{checkMode:n})),!n&&t.createElement(m,{hideValidity:!0}));function p(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex}}var f=i(p,null,null,{context:o})(u);export{f as default,r as sidebarCls};
@@ -0,0 +1 @@
1
+ import c,{useState as I,useEffect as D}from"react";import{connect as j}from"react-redux";import h from"../../../../utils/StepUtils.js";import{useTranslation as R}from"react-i18next";import{LabelBeeContext as S}from"../../../../store/ctx.js";import{jsonParser as E}from"../../../../utils/index.js";import V from"../../../../components/LLMToolView/sidebar/components/determineGroup/index.js";import{getCurrentResultFromResultList as C}from"../../../../components/LLMToolView/utils/data.js";var T=Object.defineProperty,A=Object.defineProperties,B=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,P=(t,e,n)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_=(t,e)=>{for(var n in e||(e={}))G.call(e,n)&&P(t,n,e[n]);if(y)for(var n of y(e))H.call(e,n)&&P(t,n,e[n]);return t},M=(t,e)=>A(t,B(e));const U=t=>{const{toolInstance:e,stepInfo:n,disabeledAll:u,imgIndex:p,imgList:d}=t,[g]=e.exportData(),[a,x]=I(g==null?void 0:g[0]),{t:L}=R(),[F,O]=I(0);D(()=>{var o;if(!d[p])return;const r=(o=d[p])!=null?o:{},i=C((r==null?void 0:r.result)||"");x(i)},[p,d]),D(()=>(e&&e.on("changeIndicatorDetermine",o=>{const[r]=e.exportData();x(r==null?void 0:r[0]),O(i=>i+1)}),()=>{e==null||e.unbindAll("changeIndicatorDetermine")}),[e]);const b=E(n.config),{indicatorDetermine:m}=b,w=o=>{var r;const{value:i,key:l}=o;if(l){const f={[l]:i},s=(r=a==null?void 0:a.indicatorDetermine)!=null?r:{},v=M(_({},a),{indicatorDetermine:_(_({},s),f)});e.updateResult(v)}};if((m==null?void 0:m.length)>0){const o=m.filter(r=>r==null?void 0:r.label);return c.createElement("div",{style:{padding:"12px",marginBottom:"12px"}},c.createElement("div",{style:{fontSize:"16px",fontWeight:500,lineHeight:"46px"}},L("IndicatorJudgment")),c.createElement("div",{style:{maxHeight:"400px",overflow:"auto"}},o.map((r,i)=>{var l;const{label:f,value:s}=r;return c.createElement(V,{selectValue:(l=a==null?void 0:a.indicatorDetermine)==null?void 0:l[s],title:f,updateValue:v=>{w({key:s,value:v})},key:i,disabeledAll:u})})))}return null},k=t=>{var e,n;const u=h.getCurrentStepInfo((e=t.annotation)==null?void 0:e.step,(n=t.annotation)==null?void 0:n.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:u,imgIndex:t.annotation.imgIndex,imgList:t.annotation.imgList}};var z=j(k,null,null,{context:S})(U);export{z as default};
@@ -1 +1 @@
1
- import d,{useState as m,useRef as p,useEffect as v}from"react";import{connect as S}from"react-redux";import A from"../../../../components/attributeList/index.js";import g from"../../../../utils/StepUtils.js";import{jsonParser as I}from"../../../../utils/index.js";import{useTranslation as x}from"react-i18next";import{EToolName as L}from"../../../../data/enums/ToolType.js";import{LabelBeeContext as h}from"../../../../store/ctx.js";const T=t=>{var o;const[c,l]=m(0),i=p(null),{toolInstance:e}=t,{t:f}=x();if(v(()=>(e&&e.singleOn("changeAttributeSidebar",a=>{var s;l(n=>n+1),!!i.current&&((s=i.current.children[a])==null||s.scrollIntoView({block:"center"}))}),()=>{e==null||e.unbindAll("changeAttributeSidebar")}),[e,i]),!t.stepInfo)return null;const r=I(t.stepInfo.config),u=t.stepInfo.tool===L.ScribbleTool;if(r.attributeConfigurable!==!0&&!u)return null;if((r.attributeConfigurable===!0||u)&&(r==null?void 0:r.attributeList)){const a=r.attributeList.map(n=>({label:n.key,value:n.value,color:n==null?void 0:n.color}));u||a.unshift({label:f("NoAttribute"),value:""});const s=n=>{e.setDefaultAttribute(n),l(b=>b+1)};return d.createElement(A,{list:a,attributeChanged:s,selectedAttribute:(o=e==null?void 0:e.defaultAttribute)!=null?o:"",ref:i,forbidDefault:u})}return null},_=t=>{var o,c;const l=g.getCurrentStepInfo((o=t.annotation)==null?void 0:o.step,(c=t.annotation)==null?void 0:c.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:l}};var j=S(_,null,null,{context:h})(T);export{j as default};
1
+ import m,{useState as p,useRef as v,useEffect as L}from"react";import{connect as A}from"react-redux";import S from"../../../../components/attributeList/index.js";import g from"../../../../utils/StepUtils.js";import{jsonParser as I}from"../../../../utils/index.js";import{useTranslation as h}from"react-i18next";import{EToolName as x}from"../../../../data/enums/ToolType.js";import{LabelBeeContext as T}from"../../../../store/ctx.js";const _=e=>{var r;const[a,l]=p(0),u=v(null),{toolInstance:t}=e,{t:f}=h(),b=o=>{t==null||t.setAttributeLockList(o)};if(L(()=>(t&&t.singleOn("changeAttributeSidebar",o=>{var s;l(n=>n+1),!!u.current&&((s=u.current.children[o])==null||s.scrollIntoView({block:"center"}))}),()=>{t==null||t.unbindAll("changeAttributeSidebar")}),[t,u]),!e.stepInfo)return null;const i=I(e.stepInfo.config),c=e.stepInfo.tool===x.ScribbleTool;if(i.attributeConfigurable!==!0&&!c)return null;if((i.attributeConfigurable===!0||c)&&(i==null?void 0:i.attributeList)){const o=i.attributeList.map(n=>({label:n.key,value:n.value,color:n==null?void 0:n.color}));c||o.unshift({label:f("NoAttribute"),value:""});const s=n=>{t&&(t.setDefaultAttribute(n),l(d=>d+1))};return m.createElement(S,{list:o,attributeChanged:s,selectedAttribute:(r=t==null?void 0:t.defaultAttribute)!=null?r:"",ref:u,attributeLockChange:b})}return null},j=e=>{var r,a;const l=g.getCurrentStepInfo((r=e.annotation)==null?void 0:r.step,(a=e.annotation)==null?void 0:a.stepList);return{toolInstance:e.annotation.toolInstance,stepInfo:l}};var C=A(j,null,null,{context:T})(_);export{C as default};
@@ -1 +1 @@
1
- import{prefix as F}from"../../../constant/index.js";import{EToolName as r}from"../../../data/enums/ToolType.js";import K from"../../../utils/StepUtils.js";import{Collapse as d}from"antd/es";import e,{useState as R}from"react";import{useTranslation as z}from"react-i18next";import D from"./AnnotationText/index.js";import G from"./ClearIcon/index.js";import U,{PointCloudOperation as N}from"./GeneralOperation/index.js";import q from"./ImgAttributeInfo/index.js";import H from"./SwitchAttributeList/index.js";import u,{expandIconFuc as _}from"./TagSidebar/index.js";import p from"./TextToolSidebar/index.js";import j from"./PointCloudToolSidebar/index.js";import J from"./ToolStyle/index.js";import{cTool as Q}from"@labelbee/lb-annotation";import W from"./ScribbleSidebar/index.js";import{ToolIcons as X}from"./ToolIcons.js";import{useSelector as Y}from"../../../store/ctx.js";import{Tabs as $}from"antd";import{classnames as Z}from"../../../utils/index.js";import I from"../../../assets/annotation/common/icon_menu_fold.svg.js";import ee from"../../../components/LLMToolView/sidebar/index.js";import te from"../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js";const{EVideoToolName:f,EPointCloudName:ne}=Q,{Panel:L}=d,t=`${F}-sidebar`,oe=({sider:i,enableColorPicker:A,setSiderWidth:E,propsSiderWidth:re,checkMode:P})=>{const b=Y(o=>K.getCurrentStepInfo(o.annotation.step,o.annotation.stepList)),[s,w]=R(!0),n=b==null?void 0:b.tool,{t:x}=z();if(!n)return null;const V=o=>{const c=e.createElement(J,null);return e.createElement(L,{header:x("Style"),className:"panel",key:o},c)},T=e.createElement(X,{toolName:n,onChange:()=>{}}),a=e.createElement(H,null),S=e.createElement(D,null),g=e.createElement(d,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},V("1")),h=e.createElement(d,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${t}__content`,expandIcon:_},e.createElement(L,{header:e.createElement("div",null,x("Adjust"),e.createElement(G,null)),className:"panel",key:"imgAttribute"},e.createElement(q,null))),l=e.createElement(U,null),k=e.createElement(u,null),B=o=>e.createElement(p,{disabled:o}),v=e.createElement(W,{onChange:(o,c)=>{}}),C=e.createElement(te,null),y=e.createElement(ee,{checkMode:P}),m=e.createElement("div",{className:`${t}__horizontal`}),M=e.createElement(j,{enableColorPicker:A}),O=e.createElement(N,null);if(i)return typeof i=="function"?e.createElement("div",{className:`${t}`},i({toolIcon:T,attributeList:a,annotationText:S,toolStyle:g,imageAttributeInfo:h,operation:l,tagToolSideBar:k,textToolSideBar:B,horizontal:m,pointCloudToolSidebar:M,pointCloudOperation:O,scribbleSidebar:v,LLMSidebar:y,videoClipSidebar:C})):i;if([r.Rect,r.Point,r.Line,r.Rect,r.Polygon,r.Cuboid].includes(n))return e.createElement("div",{className:`${t}`},T,m,a,S,m,e.createElement("div",{className:`${t}__content`},g,h),l);if(n===r.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),l);if(n===f.VideoTagTool)return e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},e.createElement(u,null)),l);if(n===f.VideoTextTool)return e.createElement("div",{className:`${t}`},e.createElement(p,null));if(n===r.Text)return e.createElement("div",{className:`${t}`},"s",e.createElement(p,null));if(n===ne.PointCloud){const o=()=>{w(!s),E&&E(s?48:void 0)},c=e.createElement("div",{style:{width:"48px",height:"100%",display:"flex",justifyContent:"center",background:"#ffffff"}},e.createElement("span",{onClick:()=>o()},e.createElement("img",{style:{width:"16px",height:"16px",marginTop:"18px",cursor:"pointer",transform:"rotate(180deg)"},src:I})));return s?e.createElement($,{type:"card",activeKey:"1",className:Z({[`${t}`]:!0,[`${t}__pointCloud`]:!0}),tabBarExtraContent:{left:e.createElement("span",{onClick:()=>o(),style:{padding:"0px 4px"}},e.createElement("img",{style:{width:"16px",height:"16px",marginLeft:"4px",cursor:"pointer"},src:I}))}},e.createElement($.TabPane,{tab:"\u5DE5\u5177\u9762\u677F",key:"1",style:{height:"100%",display:"flex",flexDirection:"column"}},e.createElement("div",{className:`${t}__content`},e.createElement(j,null)),e.createElement(N,null))):c}return n===r.ScribbleTool?e.createElement("div",{className:`${t}`},e.createElement("div",{className:`${t}__content`},v,a),l):n===r.LLM?y:null};export{oe as default,t as sidebarCls};
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 +1 @@
1
- import{backward as t,forward as r}from"../common/index.js";import n from"../../../../../../assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js";const o={name:"Save",icon:n,shortCut:["Ctrl","Enter"]},a=[t,r,o];export{a as default,o as forwardWithEnter};
1
+ import{setValid as t,backward as r,forward as n}from"../common/index.js";import a from"../../../../../../assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js";const o={name:"Save",icon:a,shortCut:["Ctrl","Enter"]},e=[t,r,n,o];export{e as default,o as forwardWithEnter};
@@ -0,0 +1 @@
1
+ import{backward as o,forward as r}from"../common/index.js";const a=[o,r];export{a as default};
@@ -1 +1 @@
1
- import e,{useContext as v}from"react";import k from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js";import w from"../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js";import{EToolName as a}from"../../../../../data/enums/ToolType.js";import L from"./rectToolShortCutTable/index.js";import N 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"./audioText/index.js";import{footerCls as B}from"../../index.js";import{useTranslation as D}from"react-i18next";import{EAudioToolName as F,cTool as z}from"@labelbee/lb-annotation";import{PointCloudContext as U}from"../../../../../components/pointCloudView/PointCloudContext.js";import q from"../../FooterPopover.js";import{EPointCloudPattern as T}from"@labelbee/lb-utils";var J=Object.defineProperty,C=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,b=(o,r,t)=>r in o?J(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,Z=(o,r)=>{for(var t in r||(r={}))Q.call(r,t)&&b(o,t,r[t]);if(C)for(var t of C(r))X.call(r,t)&&b(o,t,r[t]);return o};const{EVideoToolName:ee,EPointCloudName:u}=z,f={[a.Rect]:L,[a.Tag]:H,[a.Point]:N,[a.Polygon]:O,[a.Line]:I,[a.Text]:R,[ee.VideoTagTool]:G,[u.PointCloud]:M,[u.PointCloud+"_POLYGON"]:K,[u.PointCloud+"_SEGMENT"]:V,[a.ScribbleTool]:A,[a.Cuboid]:W,[a.LLM]:Y,[F.AudioTextTool]:$},te=({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}=D(),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=(l,c)=>e.createElement("div",{style:d,key:c},e.createElement("span",{style:{display:"flex",alignItems:"center"}},e.createElement(te,{icon:l.icon}),e.createElement("span",{style:{marginLeft:l.icon?16:0}},m(l.name))),e.createElement("span",{style:{display:"flex",alignItems:"center"}},l.noticeInfo&&e.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},m(l.noticeInfo)),x(l.shortCut,l.shortCutUseHtml,l.linkSymbol))),x=(l,c=!1,P="+")=>{if(!l)return null;const j=l.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<l.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"}},P)):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:`${B}__hotkey-content`},t==null?void 0:t.map((l,c)=>y(l,c))),_=r||{};return e.createElement(q,{hoverIcon:w,icon:k,title:m("Hotkeys"),content:S,containerStyle:_})},oe=({style:o,title:r,toolName:t})=>{const{pointCloudPattern:m,globalPattern:d}=v(U);if(!t||!f[t])return null;let s=t;switch(d){case T.Detection:switch(m){case a.Polygon:s+="_POLYGON";break;case a.Line:s=a.Line;break;case a.Point:s=a.Point;break}break;case T.Segmentation:s=u.PointCloud+"_SEGMENT";break}const y={style:o,title:r,shortCutList:f[s]};return e.createElement(E,Z({},y))};export{E as ToolHotKeyCom,oe as default,f as shortCutTable};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.22.0",
3
+ "version": "1.23.0-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,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "^4.6.2",
46
- "@labelbee/lb-annotation": "1.26.0",
47
- "@labelbee/lb-utils": "1.18.0",
46
+ "@labelbee/lb-annotation": "1.27.0-alpha.1",
47
+ "@labelbee/lb-utils": "1.19.0-alpha.1",
48
48
  "@labelbee/wavesurfer": "1.0.0",
49
49
  "@types/react-dom": "^18.2.7",
50
50
  "@types/react-transition-group": "^4.4.9",