@labelbee/lb-components 1.23.0-alpha.4 → 1.23.0-alpha.40

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 (126) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/assets/annotation/icon_link.svg.js +1 -0
  3. package/dist/assets/annotation/icon_unlink.svg.js +1 -0
  4. package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  5. package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  6. package/dist/components/LLMToolView/index.js +1 -1
  7. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  8. package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  9. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  10. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  11. package/dist/components/LLMToolView/utils/data.js +1 -1
  12. package/dist/components/NLPToolView/index.js +1 -1
  13. package/dist/components/NLPToolView/textContent/index.js +1 -1
  14. package/dist/components/audioAnnotate/audioContext/index.js +1 -1
  15. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
  16. package/dist/components/audioAnnotate/index.js +1 -1
  17. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  18. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  19. package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
  20. package/dist/components/audioPlayer/clipRegion/index.js +1 -1
  21. package/dist/components/audioPlayer/index.js +1 -1
  22. package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
  23. package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
  24. package/dist/components/longText/index.js +1 -1
  25. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  26. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  27. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  28. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  29. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  30. package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  31. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  32. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  33. package/dist/components/pointCloudView/index.js +1 -1
  34. package/dist/components/subAttributeList/index.js +1 -0
  35. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
  36. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  37. package/dist/index.css +31 -9
  38. package/dist/index.js +1 -1
  39. package/dist/store/Actions.js +1 -1
  40. package/dist/store/annotation/actionCreators.js +1 -1
  41. package/dist/store/annotation/reducer.js +1 -1
  42. package/dist/types/App.d.ts +3 -1
  43. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
  44. package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
  45. package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
  46. package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
  47. package/dist/types/components/audioPlayer/index.d.ts +28 -21
  48. package/dist/types/components/longText/index.d.ts +1 -0
  49. package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
  50. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -1
  51. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +12 -1
  52. package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +21 -0
  53. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +5 -0
  54. package/dist/types/components/subAttributeList/index.d.ts +10 -0
  55. package/dist/types/components/videoAnnotate/index.d.ts +2 -1
  56. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
  57. package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
  58. package/dist/types/index.d.ts +4 -1
  59. package/dist/types/store/Actions.d.ts +1 -0
  60. package/dist/types/store/annotation/actionCreators.d.ts +3 -2
  61. package/dist/types/store/annotation/reducer.d.ts +1 -0
  62. package/dist/types/store/annotation/types.d.ts +9 -2
  63. package/dist/types/utils/AnnotationDataUtils.d.ts +57 -1
  64. package/dist/types/utils/index.d.ts +25 -1
  65. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
  66. package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
  67. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
  68. package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
  69. package/dist/utils/AnnotationDataUtils.js +1 -1
  70. package/dist/utils/index.js +1 -1
  71. package/dist/views/MainView/index.js +1 -1
  72. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  73. package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  74. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  75. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  76. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  77. package/es/App.js +1 -1
  78. package/es/assets/annotation/icon_link.svg.js +1 -0
  79. package/es/assets/annotation/icon_unlink.svg.js +1 -0
  80. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  81. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  82. package/es/components/LLMToolView/index.js +1 -1
  83. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  84. package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  85. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  86. package/es/components/LLMToolView/sidebar/index.js +1 -1
  87. package/es/components/LLMToolView/utils/data.js +1 -1
  88. package/es/components/NLPToolView/index.js +1 -1
  89. package/es/components/NLPToolView/textContent/index.js +1 -1
  90. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  91. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
  92. package/es/components/audioAnnotate/index.js +1 -1
  93. package/es/components/audioAnnotate/textInput/index.js +1 -1
  94. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  95. package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
  96. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  97. package/es/components/audioPlayer/index.js +1 -1
  98. package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
  99. package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
  100. package/es/components/longText/index.js +1 -1
  101. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  102. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  103. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  104. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  105. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  106. package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  107. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  108. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  109. package/es/components/pointCloudView/index.js +1 -1
  110. package/es/components/subAttributeList/index.js +1 -0
  111. package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
  112. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  113. package/es/index.css +31 -9
  114. package/es/index.js +1 -1
  115. package/es/store/Actions.js +1 -1
  116. package/es/store/annotation/actionCreators.js +1 -1
  117. package/es/store/annotation/reducer.js +1 -1
  118. package/es/utils/AnnotationDataUtils.js +1 -1
  119. package/es/utils/index.js +1 -1
  120. package/es/views/MainView/index.js +1 -1
  121. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  122. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  123. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  124. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  125. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  126. package/package.json +3 -3
@@ -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 $}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
+ 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 +1 @@
1
- import t,{useRef as d,useState as v}from"react";import{Col as p,Popconfirm as C}from"antd";import{useTranslation as s}from"react-i18next";import{prefix as E}from"../../../../constant/index.js";const y={color:"#CCCCCC"},f=({info:r})=>{const{t:e}=s();return r.key.startsWith("sure")?t.createElement("div",{key:r.key},`${e("ConfirmTo")}${r.name.slice(0)}\uFF1F`):t.createElement("span",null,r.name)},k=({icon:r})=>typeof r=="string"?t.createElement("img",{width:23,height:25,src:r}):r,i=({isHover:r,info:e})=>{const n=!!e.forbidOperation,o=e.key===r&&!n;let a={color:o?"#666fff":""};return n&&(a=y),t.createElement("div",{style:{cursor:n?"not-allowed":"default"},onClick:()=>{var c;return(e==null?void 0:e.forbidConfirm)&&!n&&((c=e==null?void 0:e.onClick)==null?void 0:c.call(e))}},t.createElement("div",{className:"icon"},t.createElement(k,{icon:o?e.hoverSvg:e.imgSvg})),t.createElement("div",{className:"toolName",style:a},e.name))},g=({allOperation:r})=>{const e=d(null),[n,o]=v(null),{t:a}=s(),c=Math.floor(24/r.length);return t.createElement("div",{className:"generalOperation",ref:e},r.map((l,u)=>t.createElement(p,{span:c,key:u},t.createElement("div",{key:l.key,className:"item",onMouseEnter:()=>{o(l.key)},onMouseLeave:()=>{o(null)}},l.forbidConfirm?t.createElement(i,{info:l,isHover:n}):t.createElement(C,{title:t.createElement(f,{info:l}),placement:"topRight",okText:a("Confirm"),cancelText:a("Cancel"),getPopupContainer:()=>{var m;return(m=e.current)!=null?m:document.body},onConfirm:l.onClick,overlayClassName:`${E}-pop-confirm`},t.createElement("div",null,t.createElement(i,{info:l,isHover:n})))))))};export{g as default};
1
+ import t,{useRef as d,useState as p}from"react";import{Col as v,Popconfirm as C}from"antd";import{useTranslation as m}from"react-i18next";import{prefix as E}from"../../../../constant/index.js";const y={color:"#CCCCCC"},f=({info:r})=>{const{t:e}=m();return r.key.startsWith("sure")?t.createElement("div",{key:r.key},`${e("ConfirmTo")}${r.name.slice(0)}\uFF1F`):t.createElement("span",null,r.name)},g=({icon:r})=>typeof r=="string"?t.createElement("img",{width:23,height:25,src:r}):r,i=({isHover:r,info:e})=>{const n=!!e.forbidOperation,o=e.key===r&&!n;let a={color:o?"#666fff":""};return n&&(a=y),t.createElement("div",{style:{cursor:n?"not-allowed":"default"},onClick:()=>{var c;return(e==null?void 0:e.forbidConfirm)&&!n&&((c=e==null?void 0:e.onClick)==null?void 0:c.call(e))}},t.createElement("div",{className:"icon"},t.createElement(g,{icon:o?e.hoverSvg:e.imgSvg})),t.createElement("div",{className:"toolName",style:a},e.name))},k=({allOperation:r})=>{const e=d(null),[n,o]=p(null),{t:a}=m(),c=Math.floor(24/r.length);return t.createElement("div",{className:"generalOperation",ref:e},r.map((l,u)=>t.createElement(v,{span:c,key:u,className:"generalOperation-col"},t.createElement("div",{key:l.key,className:"item",onMouseEnter:()=>{o(l.key)},onMouseLeave:()=>{o(null)}},l.forbidConfirm?t.createElement(i,{info:l,isHover:n}):t.createElement(C,{title:t.createElement(f,{info:l}),placement:"topRight",okText:a("Confirm"),cancelText:a("Cancel"),getPopupContainer:()=>{var s;return(s=e.current)!=null?s:document.body},onConfirm:l.onClick,overlayClassName:`${E}-pop-confirm`},t.createElement("div",null,t.createElement(i,{info:l,isHover:n})))))))};export{k as default};
@@ -1 +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};
1
+ import i,{useState as P,useRef as A,useEffect as S}from"react";import{connect as w}from"react-redux";import I from"../../../../utils/StepUtils.js";import{useTranslation as R}from"react-i18next";import{LabelBeeContext as D}from"../../../../store/ctx.js";import{prefix as b}from"../../../../constant/index.js";import{jsonParser as B,classnames as H}from"../../../../utils/index.js";import{Row as K,Col as h,Popconfirm as k}from"antd";import{CloseOutlined as F}from"@ant-design/icons";import L from"../../../../components/longText/index.js";var U=Object.defineProperty,M=Object.defineProperties,V=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,T=(n,t,e)=>t in n?U(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,G=(n,t)=>{for(var e in t||(t={}))q.call(t,e)&&T(n,e,t[e]);if(C)for(var e of C(t))z.call(t,e)&&T(n,e,t[e]);return n},J=(n,t)=>M(n,V(t));const c=`${b}-sidebar`,Q=(n,t,e)=>{const l=(n==null?void 0:n.attributeList)||[],m=t.map(a=>{var p,o;const _=((o=(p=l.filter(d=>d.value===a.attribute))==null?void 0:p[0])==null?void 0:o.key)||"";return J(G({},a),{label:_})});return(e==null?void 0:e.length)>0?m.filter(a=>e.includes(a.attribute)):m},W=n=>{var t,e,l;const[m,a]=P(0),p=A(null),{toolInstance:o,checkMode:_,stepInfo:d}=n,{t:u}=R(),y=B(d.config),[g,E]=P("");S(()=>(o&&o.on("changeAttributeSidebar",r=>{a(s=>s+1)}),()=>{o==null||o.unbindAll("changeAttributeSidebar")}),[o,p]);const[x]=o.exportData(),O=(e=(t=x==null?void 0:x[0])==null?void 0:t.textAnnotation)!=null?e:[],f=Q(y,O,(l=o==null?void 0:o.attributeLockList)!=null?l:[]),N=r=>{let s=r===g?"":r;o==null||o.setHighlightKey(s),E(s)},j=r=>{o==null||o.deleteTextAnnotation(r.id)};return(f==null?void 0:f.length)===0?null:i.createElement("div",{className:`${c}__content__NLPList`},f.map((r,s)=>{const $=g===r.id;return i.createElement("div",{key:s,className:H({[`${c}__content__NLPList__item`]:!0,[`${c}__content__NLPList__item__active`]:$}),onClick:()=>N(r.id)},i.createElement(K,{className:`${c}__content__NLPList__item__text`},i.createElement(h,{span:7},i.createElement(L,{text:`${r.label}\uFF0C${u("textTool")}: `,openByText:!0,isToolTips:!0})),i.createElement(h,{span:16,offset:1},i.createElement(L,{text:r.text,openByText:!0,isToolTips:!0}))),!_&&i.createElement(k,{title:u("DeleteCommentConfirm"),placement:"topRight",okText:u("Confirm"),cancelText:u("Cancel"),getPopupContainer:v=>v.parentElement,onConfirm:()=>j(r),overlayClassName:`${b}-pop-confirm`},i.createElement(F,{className:`${c}-pop-remove`,onClick:v=>{v.stopPropagation()}})))}))},X=n=>{var t,e;const l=I.getCurrentStepInfo((t=n.annotation)==null?void 0:t.step,(e=n.annotation)==null?void 0:e.stepList);return{toolInstance:n.annotation.toolInstance,stepInfo:l}};var Y=w(X,null,null,{context:D})(W);export{Y as default,c as sidebarCls};
@@ -1 +1 @@
1
- import t,{useState as D,useContext as N,useEffect as V}from"react";import{EditFilled as re}from"@ant-design/icons";import{ToolIcons as ae}from"../ToolIcons.js";import{EToolName as ie}from"../../../../data/enums/ToolType.js";import{cTool as se}from"@labelbee/lb-annotation";import{PointCloudContext as O}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as L,Input as ce,Select as U,message as j}from"antd";import ue from"../../../../utils/StepUtils.js";import{connect as de}from"react-redux";import{jsonParser as me,classnames as pe}from"../../../../utils/index.js";import{useStatus as F}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as W}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as A}from"react-i18next";import{LabelBeeContext as fe,useDispatch as ve}from"../../../../store/ctx.js";import ge from"./components/batchUpdateModal/index.js";import Se from"./components/annotatedBox/index.js";import Ce from"./components/findTrackIDIndex/index.js";import{EPointCloudSegmentStatus as k,EPointCloudPattern as be}from"@labelbee/lb-utils";import M from"../../../../components/attributeList/index.js";import{useAttribute as _e}from"../../../../components/pointCloudView/hooks/useAttribute.js";import xe from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import Pe from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import ye from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import Ee from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Ie from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import we from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as B}from"../index.js";import{SetTaskStepList as Te}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as he}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";var De=Object.defineProperty,Le=Object.defineProperties,je=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,J=(n,e,l)=>e in n?De(n,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[e]=l,$=(n,e)=>{for(var l in e||(e={}))ke.call(e,l)&&J(n,l,e[l]);if(H)for(var l of H(e))Be.call(e,l)&&J(n,l,e[l]);return n},R=(n,e)=>Le(n,je(e));const Ne=()=>{const[n,e]=D(!1),l=N(O),{pointCloudBoxList:c}=l,{selectedBox:u,updateSelectedBox:r}=W(),[d,s]=D(""),{t:g}=A(),p=u==null?void 0:u.info.trackID,i=m=>!!c.find(b=>b.trackID===m&&b.id!==(u==null?void 0:u.info.id)),a=(m=!1)=>{const f=parseInt(d,10);if(m&&e(!1),isNaN(f)){j.error(g("PositiveIntegerCheck"));return}if(d.indexOf(".")>-1){j.error(g("NotAllowDecimalPointsInTrackID"));return}if(i(f)){j.error(g("DuplicateTrackIDsExist"));return}if(!(f>0)){j.error(g("PositiveIntegerCheck"));return}S(f)};V(()=>{e(!1)},[p]);const S=m=>{var f;const b=r({trackID:m});(f=l==null?void 0:l.topViewInstance)==null||f.updatePolygonList(b!=null?b:[])};return t.createElement("div",{style:{padding:24}},t.createElement("div",{style:{marginBottom:16,display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",null,g("CurrentBoxTrackIDs")),p&&t.createElement(ge,{id:p,updateCurrentPolygonList:m=>S(m)})),t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},n&&p?t.createElement(ce,{defaultValue:p,onChange:m=>{s(m.target.value)},disabled:!p,size:"small",onBlur:()=>{a()},onPressEnter:()=>{a(!0)}}):t.createElement("span",null,p),t.createElement(re,{style:{color:"#999",marginLeft:16,cursor:typeof p!="undefined"?"pointer":"not-allowed"},onClick:()=>{p&&e(!n)}})))},X=({segmentStatus:n,globalPattern:e})=>e===be.Segmentation&&![k.Edit,k.Ready].includes(n),Y=({attributeList:n,subAttributeList:e,toolInstance:l,config:c,stepList:u,stepInfo:r,enableColorPicker:d})=>{const[s,g]=D({segmentStatus:k.Ready}),{selectedBox:p}=W(),i=N(O),{ptSegmentInstance:a}=i,{t:S}=A(),{defaultAttribute:m}=_e(),f=he(),{isPointCloudSegmentationPattern:b}=F(),G=ve(),K={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"},Q={margin:"12px 20px 8px",fontSize:14,fontWeight:500,wordWrap:"break-word"};V(()=>{if(!!a)return a.on("syncPointCloudStatus",g),()=>{a.unbind("syncPointCloudStatus",g)}},[a]);const Z=(o,x)=>{var P,y,E,I,w;const _=(P=c==null?void 0:c.attributeList)==null?void 0:P.map(C=>C.value===o?R($({},C),{color:x}):C),T=R($({},c),{attributeList:_}),h=JSON.stringify(T),v=u==null?void 0:u.map(C=>(C==null?void 0:C.step)===(r==null?void 0:r.step)?R($({},C),{config:h}):C);(y=i==null?void 0:i.topViewInstance)==null||y.updateAttributeList(_),(E=i==null?void 0:i.sideViewInstance)==null||E.updateAttributeList(_),(I=i==null?void 0:i.backViewInstance)==null||I.updateAttributeList(_),(w=i==null?void 0:i.mainViewInstance)==null||w.setConfig(T),G(Te({stepList:v}))},ee=o=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(o)},te=o=>{X({globalPattern:i.globalPattern,segmentStatus:s.segmentStatus})||l.setDefaultAttribute(o)},z=(o,x)=>{X({globalPattern:i.globalPattern,segmentStatus:s.segmentStatus})||l.setSubAttribute(o,x)},oe=n.map(o=>({label:o.key,value:o.value,color:o==null?void 0:o.color,limit:o==null?void 0:o.limit,isDefault:o==null?void 0:o.isDefault})),ne=p||s.cacheSegData&&s.segmentStatus===k.Edit,le=b;return t.createElement("div",{style:{flex:1,overflowX:"hidden",overflowY:"auto"}},t.createElement("div",{style:K},S("Attribute")),t.createElement(M,{list:oe,forbidDefault:!0,selectedAttribute:m!=null?m:"",attributeChanged:o=>te(o),updateColorConfig:Z,enableColorPicker:d,updateSize:ee,forbidShowLimitPopover:le}),t.createElement(L,{style:{margin:0}}),ne&&t.createElement(t.Fragment,null,e.map(o=>{var x,P,y,E,I,w,_,T,h;return(o==null?void 0:o.subSelected)&&t.createElement("div",{style:{marginTop:12},key:o.value},t.createElement("div",{style:Q},S("SubAttribute"),"-",o.key),((x=o.subSelected)==null?void 0:x.length)<5?t.createElement(M,{list:o.subSelected.map(v=>({label:v.key,value:v.value})),selectedAttribute:((y=(P=i.selectedPointCloudBox)==null?void 0:P.subAttribute)==null?void 0:y[o.value])||((I=(E=s.cacheSegData)==null?void 0:E.subAttribute)==null?void 0:I[o.value]),num:"-",forbidColor:!0,forbidDefault:!0,attributeChanged:v=>z(o.value,v),style:{marginBottom:12}}):t.createElement(U,{style:{margin:"0px 21px 17px 16px",width:"87%"},value:((_=(w=i.selectedPointCloudBox)==null?void 0:w.subAttribute)==null?void 0:_[o.value])||((h=(T=s.cacheSegData)==null?void 0:T.subAttribute)==null?void 0:h[o.value]),placeholder:S("PleaseSelect"),onChange:v=>z(o.value,v),allowClear:!0},o.subSelected.map(v=>t.createElement(U.Option,{key:v.value,value:v.value},v.key))),t.createElement(L,{style:{margin:0}}))})))},Ve=[{toolName:"LassoSelector",commonSvg:xe,selectedSvg:Pe},{toolName:"RectSelector",commonSvg:Ie,selectedSvg:we},{toolName:"CircleSelector",commonSvg:ye,selectedSvg:Ee}],q=({toolInstance:n})=>{const{ptSegmentInstance:e}=N(O),[l,c]=D("LassoSelector"),{t:u}=A();return V(()=>{if(!e)return;const r=()=>{c("LassoSelector")},d=()=>{c("RectSelector")},s=()=>{c("CircleSelector")};return e.on("LassoSelector",r),e.on("RectSelector",d),e.on("CircleSelector",s),()=>{e.unbind("LassoSelector",r),e.unbind("RectSelector",d),e.unbind("CircleSelector",s)}},[e]),t.createElement("div",{className:`${B}__level`},Ve.map(r=>{const d=l===r.toolName;return t.createElement("span",{className:`${B}__toolOption`,key:r.toolName,onClick:()=>e==null?void 0:e.emit(r.toolName)},t.createElement("img",{className:`${B}__singleTool`,src:d?r==null?void 0:r.selectedSvg:r==null?void 0:r.commonSvg}),t.createElement("span",{className:pe({[`${B}__toolOption__selected`]:d})},u(r.toolName)))}))},Oe=({stepInfo:n,toolInstance:e,imgList:l,imgIndex:c,stepList:u,enableColorPicker:r})=>{var d,s;const{updatePointCloudPattern:g,pointCloudPattern:p,isPointCloudSegmentationPattern:i}=F(),a=me(n.config),S=(d=a==null?void 0:a.attributeList)!=null?d:[],m=(a==null?void 0:a.secondaryAttributeConfigurable)===!0?(s=a==null?void 0:a.inputList)!=null?s:[]:[];return i?t.createElement(t.Fragment,null,t.createElement(q,{toolInstance:e}),t.createElement(Y,{toolInstance:e,attributeList:S,subAttributeList:m,config:a,stepList:u,stepInfo:n,enableColorPicker:r})):t.createElement(t.Fragment,null,t.createElement(ae,{toolName:se.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>g==null?void 0:g(f)}),t.createElement(Y,{toolInstance:e,attributeList:S,subAttributeList:m,config:a,stepList:u,stepInfo:n,enableColorPicker:r}),(a==null?void 0:a.trackConfigurable)===!0&&p===ie.Rect&&t.createElement("div",{style:{flexShrink:0,height:280,overflow:"auto"}},t.createElement(Ne,null),t.createElement(L,{style:{margin:0}}),t.createElement(Se,{imgList:l,imgIndex:c}),t.createElement(L,{style:{margin:0}}),t.createElement(Ce,{imgList:l,imgIndex:c})))},Ae=n=>{var e,l,c,u;const r=ue.getCurrentStepInfo((e=n.annotation)==null?void 0:e.step,(l=n.annotation)==null?void 0:l.stepList),d=(c=n.annotation)==null?void 0:c.toolInstance,s=(u=n.annotation)==null?void 0:u.stepList;return{stepInfo:r,toolInstance:d,imgList:n.annotation.imgList,imgIndex:n.annotation.imgIndex,stepList:s}};var $e=de(Ae,null,null,{context:fe})(Oe);export{q as PointCloudSegToolIcon,$e as default};
1
+ import e,{useState as y,useContext as T,useEffect as j}from"react";import{EditFilled as ot}from"@ant-design/icons";import{ToolIcons as nt}from"../ToolIcons.js";import{EToolName as rt}from"../../../../data/enums/ToolType.js";import{cTool as lt}from"@labelbee/lb-annotation";import{PointCloudContext as D}from"../../../../components/pointCloudView/PointCloudContext.js";import{Divider as h,Input as it,message as I}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 $}from"../../../../components/pointCloudView/hooks/useStatus.js";import{useSingleBox as R}from"../../../../components/pointCloudView/hooks/useSingleBox.js";import{useTranslation as k}from"react-i18next";import{LabelBeeContext as dt,useDispatch as mt}from"../../../../store/ctx.js";import pt from"./components/batchUpdateModal/index.js";import ft from"./components/annotatedBox/index.js";import gt from"./components/findTrackIDIndex/index.js";import{EPointCloudSegmentStatus as w,EPointCloudPattern as vt}from"@labelbee/lb-utils";import St from"../../../../components/attributeList/index.js";import{useAttribute as bt}from"../../../../components/pointCloudView/hooks/useAttribute.js";import Ct from"../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import _t from"../../../../assets/annotation/pointCloudTool/lassoSelector_a.svg.js";import Pt from"../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import xt from"../../../../assets/annotation/pointCloudTool/circleSelector_a.svg.js";import Et from"../../../../assets/annotation/rectTool/icon_rect.svg.js";import yt from"../../../../assets/annotation/rectTool/icon_rect_a.svg.js";import{sidebarCls as L}from"../index.js";import{SetTaskStepList as It}from"../../../../store/annotation/actionCreators.js";import{usePointCloudViews as wt}from"../../../../components/pointCloudView/hooks/usePointCloudViews.js";import Lt from"../../../../components/subAttributeList/index.js";var Tt=Object.defineProperty,jt=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,z=(o,t,n)=>t in o?Tt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,A=(o,t)=>{for(var n in t||(t={}))ht.call(t,n)&&z(o,n,t[n]);if(U)for(var n of U(t))kt.call(t,n)&&z(o,n,t[n]);return o},V=(o,t)=>jt(o,Dt(t));const At=()=>{const[o,t]=y(!1),n=T(D),{pointCloudBoxList:a}=n,{selectedBox:c,updateSelectedBox:r}=R(),[u,d]=y(""),{t:g}=k(),p=c==null?void 0:c.info.trackID,s=m=>!!a.find(b=>b.trackID===m&&b.id!==(c==null?void 0:c.info.id)),i=(m=!1)=>{const f=parseInt(u,10);if(m&&t(!1),isNaN(f)){I.error(g("PositiveIntegerCheck"));return}if(u.indexOf(".")>-1){I.error(g("NotAllowDecimalPointsInTrackID"));return}if(s(f)){I.error(g("DuplicateTrackIDsExist"));return}if(!(f>0)){I.error(g("PositiveIntegerCheck"));return}S(f)};j(()=>{t(!1)},[p]);const S=m=>{var f;const b=r({trackID:m});(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,g("CurrentBoxTrackIDs")),p&&e.createElement(pt,{id:p,updateCurrentPolygonList:m=>S(m)})),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",lineHeight:"12px"}},o&&p?e.createElement(it,{defaultValue:p,onChange:m=>{d(m.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===vt.Segmentation&&![w.Edit,w.Ready].includes(o),M=({attributeList:o,subAttributeList:t,toolInstance:n,config:a,stepList:c,stepInfo:r,enableColorPicker:u})=>{const[d,g]=y({segmentStatus:w.Ready}),{selectedBox:p}=R(),s=T(D),{ptSegmentInstance:i}=s,{t:S}=k(),{defaultAttribute:m}=bt(),f=wt(),{isPointCloudSegmentationPattern:b}=$(),H=mt(),J={fontWeight:500,fontSize:14,margin:"12px 0 8px 20px"};j(()=>{if(!!i)return i.on("syncPointCloudStatus",g),()=>{i.unbind("syncPointCloudStatus",g)}},[i]);const X=(l,C)=>{var _,P,x,B,N;const E=(_=a==null?void 0:a.attributeList)==null?void 0:_.map(v=>v.value===l?V(A({},v),{color:C}):v),O=V(A({},a),{attributeList:E}),tt=JSON.stringify(O),et=c==null?void 0:c.map(v=>(v==null?void 0:v.step)===(r==null?void 0:r.step)?V(A({},v),{config:tt}):v);(P=s==null?void 0:s.topViewInstance)==null||P.updateAttributeList(E),(x=s==null?void 0:s.sideViewInstance)==null||x.updateAttributeList(E),(B=s==null?void 0:s.backViewInstance)==null||B.updateAttributeList(E),(N=s==null?void 0:s.mainViewInstance)==null||N.setConfig(O),H(It({stepList:et}))},Y=l=>{f.updateViewsByDefaultSize&&f.updateViewsByDefaultSize(l)},q=l=>{F({globalPattern:s.globalPattern,segmentStatus:d.segmentStatus})||n.setDefaultAttribute(l)},G=(l,C)=>{F({globalPattern:s.globalPattern,segmentStatus:d.segmentStatus})||n.setSubAttribute(l,C)},K=o.map(l=>({label:l.key,value:l.value,color:l==null?void 0:l.color,limit:l==null?void 0:l.limit,isDefault:l==null?void 0:l.isDefault})),Q=p||d.cacheSegData&&d.segmentStatus===w.Edit,Z=b;return e.createElement("div",{style:{flex:1,overflowX:"hidden",overflowY:"auto"}},e.createElement("div",{style:J},S("Attribute")),e.createElement(St,{list:K,forbidDefault:!0,selectedAttribute:m!=null?m:"",attributeChanged:l=>q(l),updateColorConfig:X,enableColorPicker:u,updateSize:Y,forbidShowLimitPopover:Z}),e.createElement(h,{style:{margin:0}}),Q&&e.createElement(Lt,{subAttributeList:t,setSubAttribute:G,getValue:l=>{var C,_,P,x;return((_=(C=s.selectedPointCloudBox)==null?void 0:C.subAttribute)==null?void 0:_[l.value])||((x=(P=d.cacheSegData)==null?void 0:P.subAttribute)==null?void 0:x[l.value])}}))},Vt=[{toolName:"LassoSelector",commonSvg:Ct,selectedSvg:_t},{toolName:"RectSelector",commonSvg:Et,selectedSvg:yt},{toolName:"CircleSelector",commonSvg:Pt,selectedSvg:xt}],W=({toolInstance:o})=>{const{ptSegmentInstance:t}=T(D),[n,a]=y("LassoSelector"),{t:c}=k();return j(()=>{if(!t)return;const r=()=>{a("LassoSelector")},u=()=>{a("RectSelector")},d=()=>{a("CircleSelector")};return t.on("LassoSelector",r),t.on("RectSelector",u),t.on("CircleSelector",d),()=>{t.unbind("LassoSelector",r),t.unbind("RectSelector",u),t.unbind("CircleSelector",d)}},[t]),e.createElement("div",{className:`${L}__level`},Vt.map(r=>{const u=n===r.toolName;return e.createElement("span",{className:`${L}__toolOption`,key:r.toolName,onClick:()=>t==null?void 0:t.emit(r.toolName)},e.createElement("img",{className:`${L}__singleTool`,src:u?r==null?void 0:r.selectedSvg:r==null?void 0:r.commonSvg}),e.createElement("span",{className:ut({[`${L}__toolOption__selected`]:u})},c(r.toolName)))}))},Bt=({stepInfo:o,toolInstance:t,imgList:n,imgIndex:a,stepList:c,enableColorPicker:r})=>{var u,d;const{updatePointCloudPattern:g,pointCloudPattern:p,isPointCloudSegmentationPattern:s}=$(),i=ct(o.config),S=(u=i==null?void 0:i.attributeList)!=null?u:[],m=(i==null?void 0:i.secondaryAttributeConfigurable)===!0?(d=i==null?void 0:i.inputList)!=null?d:[]:[];return s?e.createElement(e.Fragment,null,e.createElement(W,{toolInstance:t}),e.createElement(M,{toolInstance:t,attributeList:S,subAttributeList:m,config:i,stepList:c,stepInfo:o,enableColorPicker:r})):e.createElement(e.Fragment,null,e.createElement(nt,{toolName:lt.EPointCloudName.PointCloud,selectedToolName:p,onChange:f=>g==null?void 0:g(f)}),e.createElement(M,{toolInstance:t,attributeList:S,subAttributeList:m,config:i,stepList:c,stepInfo:o,enableColorPicker:r}),(i==null?void 0:i.trackConfigurable)===!0&&p===rt.Rect&&e.createElement("div",{style:{flexShrink:0,height:280,overflow:"auto"}},e.createElement(At,null),e.createElement(h,{style:{margin:0}}),e.createElement(ft,{imgList:n,imgIndex:a}),e.createElement(h,{style:{margin:0}}),e.createElement(gt,{imgList:n,imgIndex:a})))},Nt=o=>{var t,n,a,c;const r=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,d=(c=o.annotation)==null?void 0:c.stepList;return{stepInfo:r,toolInstance:u,imgList:o.annotation.imgList,imgIndex:o.annotation.imgIndex,stepList:d}};var Ot=at(Nt,null,null,{context:dt})(Bt);export{W as PointCloudSegToolIcon,Ot as default};
@@ -1 +1 @@
1
- import K from"../../../../components/attributeList/index.js";import M from"../../../../components/checkboxList/index.js";import{CaretRightOutlined as P}from"@ant-design/icons";import{Collapse as T,Tooltip as H,Badge as x}from"antd/es";import{cloneDeep as F}from"lodash";import n,{useState as v,useRef as U,useEffect as p,useCallback as q}from"react";import z from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import G from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{TagUtils as J}from"@labelbee/lb-annotation";import{connect as Q}from"react-redux";import{useTranslation as V}from"react-i18next";import{LabelBeeContext as W}from"../../../../store/ctx.js";const{Panel:X}=T,$=({isActive:a})=>n.createElement(P,{rotate:a?90:0}),Y=({toolInstance:a,imgIndex:N})=>{const[s,g]=v([]),i=U(null),[,j]=v(0),[w,f]=v(-1),{t:b}=V();p(()=>{var r,t;a&&(g((t=(r=a.config)==null?void 0:r.inputList)==null?void 0:t.map(e=>e.value)),a.singleOn("render",()=>{j(e=>e+1)}))},[a]),p(()=>{if(a&&(a.singleOn("expend",O),a.labelSelectedList.length===1)){let r=0;for(let t=0;t<a.labelSelectedList[0];t++)r+=46,o[t]&&s[t]!==""&&o[t].subSelected.forEach(e=>{r+=40});i.current&&(i.current.children[0].scrollTop=r)}}),p(()=>{i.current&&(i.current.children[0].scrollTop=0)},[N]);const O=()=>{var r;const t=a.labelSelectedList[0],e=(r=o.filter((l,m)=>m===t)[0])==null?void 0:r.value;h(t,e,!0)},h=q((r,t,e)=>{const l=F(s);l[r]===""||e===!0?l[r]=t:l[r]="",g(l)},[s]);if(!a)return null;const{labelSelectedList:u,config:{inputList:o},currentTagResult:c,setLabel:E}=a,A=r=>u.length>0&&u[0]===r?n.createElement("span",{className:"keyDownIconActive"},r+1):n.createElement("span",{className:"keyDownIcon"},r+1),y=(r,t=-1)=>r?r.map((e,l)=>{var m,L,_,k,C;if(e.subSelected){const R=J.judgeResultIsInInputList(e.value,(m=c==null?void 0:c.result)==null?void 0:m[e.value],o);return n.createElement(T,{bordered:!1,expandIcon:$,key:`collapse_${l}_${t+1}`,onChange:()=>h(l,e.value),activeKey:[s[l]]},n.createElement(X,{header:n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flex:1}},n.createElement("span",null,e.key,n.createElement(H,{placement:"bottom",title:b("ClearThisOption")},n.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:D=>{D.stopPropagation(),a.clearResult(!0,e.value)},src:w===l||R?G:z,onMouseEnter:()=>{f(l)},onMouseLeave:()=>{f(-1)}})),R&&s[l]===""&&n.createElement(x,{color:"#87d068"})),(o==null?void 0:o.length)>1&&A(l)),key:e.value},n.createElement("div",{className:"level",style:{backgroundColor:u.length>0&&u[0]===l?"rgba(158, 158, 158, 0.18)":""}},y(e.subSelected,l))))}const d=(o==null?void 0:o[t])?o==null?void 0:o[t].value:0,S=((k=(_=(L=c==null?void 0:c.result)==null?void 0:L[d])==null?void 0:_.split(";"))==null?void 0:k.indexOf(e.value))>-1?e.value:"";return((C=o==null?void 0:o[t])==null?void 0:C.isMulti)===!0?n.createElement("div",{className:"singleBar",key:`${d}_${t}_${l}`},n.createElement(M,{attributeChanged:()=>E(t,l),selectedAttribute:[S],list:[{value:e.value,label:e.key}],num:l+1})):n.createElement("div",{className:"singleBar",key:`${d}_${t}_${l}`},n.createElement(K,{forbidColor:!0,attributeChanged:()=>E(t,l),selectedAttribute:S,list:[{value:e.value,label:e.key}],num:l+1}))}):null,B=window.innerHeight-61-80;return n.createElement("div",{className:"tagOperationMenu",ref:i},(o==null?void 0:o.length)===0?n.createElement("div",{style:{padding:20,textAlign:"center"}},b("NoConfiguration")):n.createElement("div",{className:"main",style:{height:B}},y(o)))};function Z(a){return{toolInstance:a.annotation.toolInstance,imgIndex:a.annotation.imgIndex}}var I=Q(Z,null,null,{context:W})(Y);export{I as default,$ as expandIconFuc};
1
+ import K from"../../../../components/attributeList/index.js";import M from"../../../../components/checkboxList/index.js";import{CaretRightOutlined as P}from"@ant-design/icons";import{Collapse as T,Tooltip as H,Badge as x}from"antd/es";import{cloneDeep as F}from"lodash";import a,{useState as v,useRef as U,useEffect as p,useCallback as q}from"react";import z from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import G from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{TagUtils as J}from"@labelbee/lb-annotation";import{connect as Q}from"react-redux";import{useTranslation as V}from"react-i18next";import{LabelBeeContext as W}from"../../../../store/ctx.js";const{Panel:X}=T,$=({isActive:n})=>a.createElement(P,{rotate:n?90:0}),Y=({toolInstance:n,imgIndex:N})=>{const[s,g]=v([]),i=U(null),[,j]=v(0),[w,f]=v(-1),{t:b}=V();p(()=>{var r,l;n&&(g((l=(r=n.config)==null?void 0:r.inputList)==null?void 0:l.map(e=>e.value)),n.singleOn("render",()=>{j(e=>e+1)}))},[n]),p(()=>{var r;if(n&&(n.singleOn("expend",O),((r=n==null?void 0:n.labelSelectedList)==null?void 0:r.length)===1)){let l=0;for(let e=0;e<n.labelSelectedList[0];e++)l+=46,o[e]&&s[e]!==""&&o[e].subSelected.forEach(t=>{l+=40});i.current&&(i.current.children[0].scrollTop=l)}}),p(()=>{i.current&&(i.current.children[0].scrollTop=0)},[N]);const O=()=>{var r;const l=n.labelSelectedList[0],e=(r=o.filter((t,m)=>m===l)[0])==null?void 0:r.value;h(l,e,!0)},h=q((r,l,e)=>{const t=F(s);t[r]===""||e===!0?t[r]=l:t[r]="",g(t)},[s]);if(!n)return null;const{labelSelectedList:u,config:{inputList:o},currentTagResult:c,setLabel:E}=n,A=r=>u.length>0&&u[0]===r?a.createElement("span",{className:"keyDownIconActive"},r+1):a.createElement("span",{className:"keyDownIcon"},r+1),y=(r,l=-1)=>r?r.map((e,t)=>{var m,_,L,k,C;if(e.subSelected){const R=J.judgeResultIsInInputList(e.value,(m=c==null?void 0:c.result)==null?void 0:m[e.value],o);return a.createElement(T,{bordered:!1,expandIcon:$,key:`collapse_${t}_${l+1}`,onChange:()=>h(t,e.value),activeKey:[s[t]]},a.createElement(X,{header:a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flex:1}},a.createElement("span",null,e.key,a.createElement(H,{placement:"bottom",title:b("ClearThisOption")},a.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:D=>{D.stopPropagation(),n.clearResult(!0,e.value)},src:w===t||R?G:z,onMouseEnter:()=>{f(t)},onMouseLeave:()=>{f(-1)}})),R&&s[t]===""&&a.createElement(x,{color:"#87d068"})),(o==null?void 0:o.length)>1&&A(t)),key:e.value},a.createElement("div",{className:"level",style:{backgroundColor:u.length>0&&u[0]===t?"rgba(158, 158, 158, 0.18)":""}},y(e.subSelected,t))))}const d=(o==null?void 0:o[l])?o==null?void 0:o[l].value:0,S=((k=(L=(_=c==null?void 0:c.result)==null?void 0:_[d])==null?void 0:L.split(";"))==null?void 0:k.indexOf(e.value))>-1?e.value:"";return((C=o==null?void 0:o[l])==null?void 0:C.isMulti)===!0?a.createElement("div",{className:"singleBar",key:`${d}_${l}_${t}`},a.createElement(M,{attributeChanged:()=>E(l,t),selectedAttribute:[S],list:[{value:e.value,label:e.key}],num:t+1})):a.createElement("div",{className:"singleBar",key:`${d}_${l}_${t}`},a.createElement(K,{forbidColor:!0,attributeChanged:()=>E(l,t),selectedAttribute:S,list:[{value:e.value,label:e.key}],num:t+1}))}):null,B=window.innerHeight-61-80;return a.createElement("div",{className:"tagOperationMenu",ref:i},(o==null?void 0:o.length)===0?a.createElement("div",{style:{padding:20,textAlign:"center"}},b("NoConfiguration")):a.createElement("div",{className:"main",style:{height:B}},y(o)))};function Z(n){return{toolInstance:n.annotation.toolInstance,imgIndex:n.annotation.imgIndex}}var I=Q(Z,null,null,{context:W})(Y);export{I as default,$ as expandIconFuc};
@@ -1 +1 @@
1
- import o,{useState as u,useEffect as h,useRef as I}from"react";import{connect as M}from"react-redux";import{cloneDeep as z}from"lodash";import{classnames as S}from"../../../../utils/index.js";import{Switch as W,Input as J}from"antd/es";import{cKeyCode as G,cTool as H}from"@labelbee/lb-annotation";import{PageForward as Q}from"../../../../store/annotation/actionCreators.js";import{ConfigUtils as X}from"../../../../utils/ConfigUtils.js";import{useTranslation as A}from"react-i18next";import{LabelBeeContext as Y}from"../../../../store/ctx.js";var Z=Object.defineProperty,K=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&$(e,r,t[r]);if(K)for(var r of K(t))te.call(t,r)&&$(e,r,t[r]);return e};const j=G.default,{EVideoToolName:oe}=H,V=e=>{e.stopPropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},D=e=>{const{textareaProps:t,footer:r}=e;return o.createElement(o.Fragment,null,o.createElement(J.TextArea,ne({key:`${t.id}-${t.defaultValue}`,bordered:!1,rows:6,onKeyDown:V,onKeyUp:V},t)),o.createElement("div",{className:S({textAreaLength:!0})},r))},q=e=>{var t;const r=I(null),[E,f]=u(!1),[N,P]=u(!1),{t:w}=A(),{disabled:s,config:i,result:m,updateText:p,index:d,switchToNextTextarea:y,hasMultiple:L,onNext:b}=e,{maxLength:g}=i,c=m?m[i.key]:"",[_,C]=u((t=c==null?void 0:c.length)!=null?t:0);h(()=>{var n;C((n=c==null?void 0:c.length)!=null?n:0)},[c]);const v=(n,T)=>{p&&(p(n,i.key,T),i.required&&P(!n))},x=L&&y,k={id:`textInput-${d}`,ref:r,disabled:s,defaultValue:c,maxLength:g,autoSize:{minRows:2,maxRows:6},onChange:n=>{const T=n.target.value;C(n.target.value.length),v(T,!1)},onFocus:()=>{f(!0)},onBlur:n=>{f(!1),v(n.target.value,!0),i.required&&P(!n.target.value)},style:{resize:"none",wordBreak:"break-all"},onKeyDownCapture:n=>{n.ctrlKey&&n.keyCode===j.Enter&&(b&&b(),n.preventDefault()),n.keyCode===j.Tab&&x&&(n.preventDefault(),n.nativeEvent.stopImmediatePropagation(),y(d)),n.nativeEvent.stopPropagation()}},F=o.createElement("div",{className:"textAreaFooter"},o.createElement("div",{className:"hotkeyTip"},x&&o.createElement("span",null,`[${w("Switch")}]Tab`),o.createElement("span",null,`[${w("TurnPage")}]Ctrl+Enter`)),o.createElement("div",{className:"wordCount"},o.createElement("span",{className:_>=g?"warning":""},_),"/",o.createElement("span",null,g)));return h(()=>{s&&f(!1)},[s]),o.createElement("div",{className:"textField"},o.createElement("div",{className:"label"},o.createElement("span",{className:S({required:i.required})},i.label),o.createElement("i",{className:S({clearText:!0,disabled:s}),onClick:()=>{s||v("",!0)}})),o.createElement("div",{className:S({disabled:s,"textarea-outline":!0,"ant-input-focused":E,textareaContainer:!0,focus:E,invalid:N})},o.createElement(D,{footer:F,textareaProps:k})))},ae=({toolInstance:e,imgIndex:t,dispatch:r,triggerEventAfterIndexChanged:E,step:f,stepList:N,basicResultList:P,disabled:w})=>{var s,i,m,p;const[d,y]=u([]),[L,b]=u(0),[g,c]=u(!0),[,_]=u(0),{t:C}=A(),v=a=>{const l=(a+1)%d.length;x(l)},x=a=>{setTimeout(()=>{const l=document.getElementById(`textInput-${a}`);l&&(b(a),l.focus(),l.select(),l.scrollIntoView({behavior:"smooth",block:"center"}))})};h(()=>{e&&e.singleOn("valueUpdated",()=>{_(a=>a+1)})},[e]),h(()=>{var a;e&&y(z((a=e==null?void 0:e.config)==null?void 0:a.configList))},[JSON.stringify((s=e==null?void 0:e.config)==null?void 0:s.configList)]);const k=(p=(m=(i=e==null?void 0:e.textList)==null?void 0:i[0])==null?void 0:m.value)!=null?p:{},F=(a,l,U=!1)=>{var O,R;(R=e==null?void 0:e.updateTextValue)==null||R.call(e,l,a,U,(O=e==null?void 0:e.textList)==null?void 0:O[0])};h(()=>{t>-1&&E&&x(0)},[t]);const n=()=>{r(Q(!0))},T=a=>{c(a),e==null||e.toggleShowText(a)},B=X.getStepConfig(N,f).tool===oe.VideoTextTool;return e&&o.createElement("div",{className:"textToolOperationMenu"},d.map((a,l)=>o.createElement(q,{config:a,key:a.key,index:l,result:k,updateText:F,switchToNextTextarea:v,hasMultiple:d.length>1,focus:L===l,onNext:n,disabled:w})),B&&o.createElement("div",{className:"textToolSwitchItem"},C("toggleShowText"),o.createElement(W,{style:{alignSelf:"center"},checked:g,onChange:a=>{T(a)}})))};function re(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex,step:e.annotation.step,basicResultList:e.annotation.basicResultList,stepList:e.annotation.stepList,triggerEventAfterIndexChanged:e.annotation.triggerEventAfterIndexChanged}}var le=M(re,null,null,{context:Y})(ae);export{q as SingleTextInput,D as TextareaWithFooter,le as default};
1
+ import o,{useState as d,useEffect as h,useRef as I}from"react";import{connect as M}from"react-redux";import{cloneDeep as z}from"lodash";import{classnames as S}from"../../../../utils/index.js";import{Switch as W,Input as J}from"antd/es";import{cKeyCode as G,cTool as H}from"@labelbee/lb-annotation";import{PageForward as Q}from"../../../../store/annotation/actionCreators.js";import{ConfigUtils as X}from"../../../../utils/ConfigUtils.js";import{useTranslation as A}from"react-i18next";import{LabelBeeContext as Y}from"../../../../store/ctx.js";var Z=Object.defineProperty,K=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&$(e,r,t[r]);if(K)for(var r of K(t))te.call(t,r)&&$(e,r,t[r]);return e};const j=G.default,{EVideoToolName:oe}=H,V=e=>{e.stopPropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},D=e=>{const{textareaProps:t,footer:r}=e;return o.createElement(o.Fragment,null,o.createElement(J.TextArea,ne({key:`${t.id}-${t.defaultValue}`,bordered:!1,rows:6,onKeyDown:V,onKeyUp:V},t)),o.createElement("div",{className:S({textAreaLength:!0})},r))},q=e=>{var t;const r=I(null),[E,f]=d(!1),[N,P]=d(!1),{t:w}=A(),{disabled:s,config:i,result:m,updateText:p,index:u,switchToNextTextarea:y,hasMultiple:L,onNext:b}=e,{maxLength:g}=i,c=m?m[i.key]:"",[_,C]=d((t=c==null?void 0:c.length)!=null?t:0);h(()=>{var n;C((n=c==null?void 0:c.length)!=null?n:0)},[c]);const v=(n,T)=>{p&&(p(n,i.key,T),i.required&&P(!n))},x=L&&y,k={id:`textInput-${u}`,ref:r,disabled:s,defaultValue:c,maxLength:g,autoSize:{minRows:2,maxRows:6},onChange:n=>{const T=n.target.value;C(n.target.value.length),v(T,!1)},onFocus:()=>{f(!0)},onBlur:n=>{f(!1),v(n.target.value,!0),i.required&&P(!n.target.value)},style:{resize:"none",wordBreak:"break-all"},onKeyDownCapture:n=>{n.ctrlKey&&n.keyCode===j.Enter&&(b&&b(),n.preventDefault()),n.keyCode===j.Tab&&x&&(n.preventDefault(),n.nativeEvent.stopImmediatePropagation(),y(u)),n.nativeEvent.stopPropagation()}},F=o.createElement("div",{className:"textAreaFooter"},o.createElement("div",{className:"hotkeyTip"},x&&o.createElement("span",null,`[${w("Switch")}]Tab`),o.createElement("span",null,`[${w("TurnPage")}]Ctrl+Enter`)),o.createElement("div",{className:"wordCount"},o.createElement("span",{className:_>=g?"warning":""},_),"/",o.createElement("span",null,g)));return h(()=>{s&&f(!1)},[s]),o.createElement("div",{className:"textField"},o.createElement("div",{className:"label"},o.createElement("span",{className:S({required:i.required})},i.label),o.createElement("i",{className:S({clearText:!0,disabled:s}),onClick:()=>{s||v("",!0)}})),o.createElement("div",{className:S({disabled:s,"textarea-outline":!0,"ant-input-focused":E,textareaContainer:!0,focus:E,invalid:N})},o.createElement(D,{footer:F,textareaProps:k})))},ae=({toolInstance:e,imgIndex:t,dispatch:r,triggerEventAfterIndexChanged:E,step:f,stepList:N,basicResultList:P,disabled:w})=>{var s,i,m,p;const[u,y]=d([]),[L,b]=d(0),[g,c]=d(!0),[,_]=d(0),{t:C}=A(),v=a=>{const l=(a+1)%u.length;x(l)},x=a=>{setTimeout(()=>{const l=document.getElementById(`textInput-${a}`);l&&(b(a),l.focus(),l.select(),l.scrollIntoView({behavior:"smooth",block:"center"}))})};h(()=>{e&&e.singleOn("valueUpdated",()=>{_(a=>a+1)})},[e]),h(()=>{var a;e&&y(z((a=e==null?void 0:e.config)==null?void 0:a.configList))},[JSON.stringify((s=e==null?void 0:e.config)==null?void 0:s.configList)]);const k=(p=(m=(i=e==null?void 0:e.textList)==null?void 0:i[0])==null?void 0:m.value)!=null?p:{},F=(a,l,U=!1)=>{var O,R;(R=e==null?void 0:e.updateTextValue)==null||R.call(e,l,a,U,(O=e==null?void 0:e.textList)==null?void 0:O[0])};h(()=>{t>-1&&E&&x(0)},[t]);const n=()=>{r(Q(!0))},T=a=>{c(a),e==null||e.toggleShowText(a)},B=X.getStepConfig(N,f).tool===oe.VideoTextTool;return e&&o.createElement("div",{className:"textToolOperationMenu"},u==null?void 0:u.map((a,l)=>o.createElement(q,{config:a,key:a.key,index:l,result:k,updateText:F,switchToNextTextarea:v,hasMultiple:u.length>1,focus:L===l,onNext:n,disabled:w})),B&&o.createElement("div",{className:"textToolSwitchItem"},C("toggleShowText"),o.createElement(W,{style:{alignSelf:"center"},checked:g,onChange:a=>{T(a)}})))};function re(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex,step:e.annotation.step,basicResultList:e.annotation.basicResultList,stepList:e.annotation.stepList,triggerEventAfterIndexChanged:e.annotation.triggerEventAfterIndexChanged}}var le=M(re,null,null,{context:Y})(ae);export{q as SingleTextInput,D as TextareaWithFooter,le as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.23.0-alpha.4",
3
+ "version": "1.23.0-alpha.40",
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.27.0-alpha.3",
47
- "@labelbee/lb-utils": "1.19.0-alpha.1",
46
+ "@labelbee/lb-annotation": "1.27.0-alpha.20",
47
+ "@labelbee/lb-utils": "1.19.0-alpha.14",
48
48
  "@labelbee/wavesurfer": "1.0.0",
49
49
  "@types/react-dom": "^18.2.7",
50
50
  "@types/react-transition-group": "^4.4.9",