@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.
- package/dist/components/LLMToolView/index.js +1 -1
- package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/components/LLMToolView/utils/data.js +1 -1
- package/dist/components/NLPToolView/index.js +1 -0
- package/dist/components/NLPToolView/textContent/extraMask.js +1 -0
- package/dist/components/NLPToolView/textContent/index.js +1 -0
- package/dist/components/NLPToolView/utils/index.js +1 -0
- package/dist/components/messageMaskLayer/index.js +1 -0
- package/dist/components/tagList/components/overall/index.js +1 -0
- package/dist/components/tagList/components/portion/index.js +1 -0
- package/dist/components/tagList/index.js +1 -0
- package/dist/components/tagList/index.module.scss.js +1 -0
- package/dist/data/enums/ToolType.js +1 -1
- package/dist/hooks/annotation.js +1 -1
- package/dist/index.css +110 -0
- package/dist/index.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/store/ctx.js +1 -1
- package/dist/types/components/LLMToolView/index.d.ts +2 -0
- package/dist/types/components/LLMToolView/sidebar/components/answerList/index.d.ts +3 -10
- package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +1 -1
- package/dist/types/components/LLMToolView/sidebar/components/determineGroup/index.d.ts +1 -1
- package/dist/types/components/LLMToolView/sidebar/components/scoreGroupButton/index.d.ts +1 -1
- package/dist/types/components/LLMToolView/sidebar/components/textEditor/index.d.ts +1 -1
- package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +1 -1
- package/dist/types/components/LLMToolView/sidebar/index.d.ts +1 -3
- package/dist/types/components/LLMToolView/types.d.ts +27 -0
- package/dist/types/components/LLMToolView/utils/data.d.ts +14 -0
- package/dist/types/components/NLPToolView/index.d.ts +16 -0
- package/dist/types/components/NLPToolView/textContent/extraMask.d.ts +12 -0
- package/dist/types/components/NLPToolView/textContent/index.d.ts +16 -0
- package/dist/types/components/NLPToolView/types.d.ts +82 -0
- package/dist/types/components/NLPToolView/utils/index.d.ts +2 -0
- package/dist/types/components/attributeList/index.d.ts +1 -1
- package/dist/types/components/messageMaskLayer/index.d.ts +11 -0
- package/dist/types/components/tagList/components/overall/index.d.ts +4 -0
- package/dist/types/components/tagList/components/portion/index.d.ts +4 -0
- package/dist/types/components/tagList/index.d.ts +4 -0
- package/dist/types/components/tagList/types.d.ts +23 -0
- package/dist/types/data/enums/ToolType.d.ts +2 -1
- package/dist/types/hooks/annotation.d.ts +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/store/ctx.d.ts +5 -0
- package/dist/types/views/MainView/NLPLayout/index.d.ts +13 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +1 -0
- package/dist/types/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.d.ts +13 -0
- package/dist/types/views/MainView/sidebar/NLPSidebar/index.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/NLPSidebar/indicatorDetermine.d.ts +13 -0
- package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +2 -2
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.d.ts +6 -0
- package/dist/views/MainView/LLMLayout/index.js +1 -1
- package/dist/views/MainView/NLPLayout/index.js +1 -0
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
- package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -0
- package/dist/views/MainView/sidebar/NLPSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -0
- package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/components/LLMToolView/index.js +1 -1
- package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/components/LLMToolView/utils/data.js +1 -1
- package/es/components/NLPToolView/index.js +1 -0
- package/es/components/NLPToolView/textContent/extraMask.js +1 -0
- package/es/components/NLPToolView/textContent/index.js +1 -0
- package/es/components/NLPToolView/utils/index.js +1 -0
- package/es/components/messageMaskLayer/index.js +1 -0
- package/es/components/tagList/components/overall/index.js +1 -0
- package/es/components/tagList/components/portion/index.js +1 -0
- package/es/components/tagList/index.js +1 -0
- package/es/components/tagList/index.module.scss.js +1 -0
- package/es/data/enums/ToolType.js +1 -1
- package/es/hooks/annotation.js +1 -1
- package/es/index.css +110 -0
- package/es/index.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/ctx.js +1 -1
- package/es/views/MainView/LLMLayout/index.js +1 -1
- package/es/views/MainView/NLPLayout/index.js +1 -0
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
- package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -0
- package/es/views/MainView/sidebar/NLPSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -0
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/package.json +3 -3
package/es/store/ctx.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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{
|
|
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
|
|
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.
|
|
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.
|
|
47
|
-
"@labelbee/lb-utils": "1.
|
|
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",
|