@labelbee/lb-components 1.23.0-alpha.3 → 1.23.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +1 -1
- package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/dist/components/LLMToolView/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.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 -1
- package/dist/components/NLPToolView/textContent/index.js +1 -1
- package/dist/components/audioAnnotate/audioContext/index.js +1 -1
- package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
- package/dist/components/audioAnnotate/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
- package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
- package/dist/components/audioPlayer/clipRegion/index.js +1 -1
- package/dist/components/audioPlayer/index.js +1 -1
- package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
- package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
- package/dist/components/longText/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/subAttributeList/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
- package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/dist/index.css +35 -9
- package/dist/index.js +1 -1
- package/dist/store/Actions.js +1 -1
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/App.d.ts +3 -1
- package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
- package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
- package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
- package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
- package/dist/types/components/audioPlayer/index.d.ts +28 -21
- package/dist/types/components/longText/index.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +6 -1
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +5 -0
- package/dist/types/components/subAttributeList/index.d.ts +9 -0
- package/dist/types/components/videoAnnotate/index.d.ts +2 -1
- package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
- package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/store/Actions.d.ts +1 -0
- package/dist/types/store/annotation/actionCreators.d.ts +3 -2
- package/dist/types/store/annotation/reducer.d.ts +1 -0
- package/dist/types/store/annotation/types.d.ts +9 -2
- package/dist/types/utils/AnnotationDataUtils.d.ts +54 -1
- package/dist/types/utils/index.d.ts +25 -1
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
- package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
- package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
- package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
- package/dist/utils/AnnotationDataUtils.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/es/App.js +1 -1
- package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/es/components/LLMToolView/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- 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 -1
- package/es/components/NLPToolView/textContent/index.js +1 -1
- package/es/components/audioAnnotate/audioContext/index.js +1 -1
- package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
- package/es/components/audioAnnotate/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
- package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
- package/es/components/audioPlayer/clipRegion/index.js +1 -1
- package/es/components/audioPlayer/index.js +1 -1
- package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
- package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
- package/es/components/longText/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/index.js +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/subAttributeList/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
- package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/es/index.css +35 -9
- package/es/index.js +1 -1
- package/es/store/Actions.js +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/utils/AnnotationDataUtils.js +1 -1
- package/es/utils/index.js +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
- package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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.
|
|
3
|
+
"version": "1.23.0-alpha.31",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ant-design/icons": "^4.6.2",
|
|
46
|
-
"@labelbee/lb-annotation": "1.27.0-alpha.
|
|
47
|
-
"@labelbee/lb-utils": "1.19.0-alpha.
|
|
46
|
+
"@labelbee/lb-annotation": "1.27.0-alpha.13",
|
|
47
|
+
"@labelbee/lb-utils": "1.19.0-alpha.8",
|
|
48
48
|
"@labelbee/wavesurfer": "1.0.0",
|
|
49
49
|
"@types/react-dom": "^18.2.7",
|
|
50
50
|
"@types/react-transition-group": "^4.4.9",
|