@labelbee/lb-components 1.23.0-alpha.86 → 1.23.0-alpha.87

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.
@@ -1 +1 @@
1
- import{prefix as n,ESubmitType as R}from"../../../constant/index.js";import A from"../../../hooks/useSize.js";import{ToSubmitFileData as B,ToNextStep as v,loadImgList as Q}from"../../../store/annotation/actionCreators.js";import{LeftOutlined as U}from"@ant-design/icons";import{i18n as $}from"@labelbee/lb-utils";import{Tooltip as W,Button as q}from"antd/es";import L from"classnames";import{last as G}from"lodash";import e,{useReducer as J,useRef as K}from"react";import{useTranslation as T}from"react-i18next";import{connect as M}from"react-redux";import{LabelBeeContext as V,useDispatch as X}from"../../../store/ctx.js";import{store as Y}from"../../../index.js";import Z from"./ExportData/index.js";import ee from"./headerOption/index.js";import te from"./StepSwitch/index.js";import ne from"../../../components/predictTracking/predictTrackingIcon/index.js";import j from"./SwitchPattern/index.js";const w=({disabled:t,imgList:r})=>{const{t:o}=T(),i=()=>{const{dispatch:a,getState:s}=Y;r[0]?a(v(0)):Q(a,s,0).then(l=>{l&&a(v(0))})};return e.createElement(q,{type:"primary",style:{marginLeft:10},onClick:i,disabled:t},o("NextStep"))},oe=({step:t,stepProgress:r,stepList:o,imgList:i})=>{var a;const{t:s}=T(),l=(a=G(o))==null?void 0:a.step;if(o.length<2||t===l)return null;const c=r<1;return c?e.createElement(W,{title:s("StepNotFinishedNotify")},e.createElement("span",null,e.createElement(w,{disabled:c,imgList:i}))):e.createElement(w,{disabled:c,imgList:i})},ae=({goBack:t,exportData:r,header:o,headerName:i,imgList:a,stepProgress:s,stepInfo:l,stepList:c,step:b,annotationEngine:d,hasLangNode:k,hasHeaderOption:C,hasPredictTrackingIcon:P})=>{var u;const y=X(),[,D]=J(m=>m+1,0),p=K(null),f=A(p),O=e.createElement(Z,{exportData:r}),F=()=>{y(B(R.Quit)),t&&t(a)},E=m=>{$.changeLanguage(m),d==null||d.setLang(m),D()},N=$.language,I=(u=f==null?void 0:f.width)!=null?u:window.innerWidth,h=e.createElement(U,{className:`${n}-header__icon`,onClick:F}),g=i?e.createElement("span",{className:`${n}-header__name`},i):"",x=c.length>1&&e.createElement(e.Fragment,null,e.createElement(te,{stepProgress:s}),e.createElement(oe,{step:b,stepProgress:s,stepList:c,imgList:a})),_=C?e.createElement(ee,{stepInfo:l}):null,z=j,H=e.createElement("div",{className:`${n}-header__lang`},e.createElement("span",{className:`${n}-langCN ${N==="cn"?"active":""}`,onClick:()=>E("cn")},"\u4E2D\u6587")," / ",e.createElement("span",{className:`${n}-langEN ${N==="en"?"active":""}`,onClick:()=>E("en")},"En")),S=e.createElement(e.Fragment,null,P&&e.createElement(ne,null),k&&H);return o?typeof o=="function"?e.createElement("div",{className:L(`${n}-header`),ref:p},e.createElement("div",{className:`${n}-header__title`},o({backNode:h,headerNameNode:g,stepListNode:x,headerOptionNode:_,langNode:S,PointCloudSwitchPattern:z}))):o:e.createElement("div",{className:L(`${n}-header`),ref:p},e.createElement("div",{className:`${n}-header__title`},h,g,x,O,e.createElement("div",{id:"operationNode",className:`${n}-header__operationNode`,style:{left:I/2-174/2}},_),e.createElement("div",{className:`${n}-header__titlePlacement`}),e.createElement(j,null),S))},re=t=>{var r;return{imgList:t.annotation.imgList,annotationEngine:t.annotation.annotationEngine,stepProgress:t.annotation.stepProgress,toolName:(r=t.annotation.stepList[t.annotation.step-1])==null?void 0:r.tool,stepList:t.annotation.stepList,stepInfo:t.annotation.stepList[t.annotation.step-1],step:t.annotation.step}};var ie=M(re,null,null,{context:V})(ae);export{ie as default};
1
+ import{prefix as n,ESubmitType as W}from"../../../constant/index.js";import q from"../../../hooks/useSize.js";import{ToSubmitFileData as G,ToNextStep as T,loadImgList as J}from"../../../store/annotation/actionCreators.js";import{LeftOutlined as K}from"@ant-design/icons";import{i18n as b}from"@labelbee/lb-utils";import{Tooltip as M,Button as V}from"antd/es";import L from"classnames";import{last as X}from"lodash";import e,{useReducer as Y,useRef as Z}from"react";import{useTranslation as w}from"react-i18next";import{connect as ee}from"react-redux";import{LabelBeeContext as te,useDispatch as ne}from"../../../store/ctx.js";import{store as oe}from"../../../index.js";import ae from"./ExportData/index.js";import re from"./headerOption/index.js";import ie from"./StepSwitch/index.js";import se from"../../../components/predictTracking/predictTrackingIcon/index.js";import C from"./SwitchPattern/index.js";import{getStepConfig as ce}from"../../../store/annotation/reducer.js";import{jsonParser as le}from"../../../utils/index.js";const P=({disabled:t,imgList:r})=>{const{t:o}=w(),i=()=>{const{dispatch:a,getState:c}=oe;r[0]?a(T(0)):J(a,c,0).then(l=>{l&&a(T(0))})};return e.createElement(V,{type:"primary",style:{marginLeft:10},onClick:i,disabled:t},o("NextStep"))},me=({step:t,stepProgress:r,stepList:o,imgList:i})=>{var a;const{t:c}=w(),l=(a=X(o))==null?void 0:a.step;if(o.length<2||t===l)return null;const s=r<1;return s?e.createElement(M,{title:c("StepNotFinishedNotify")},e.createElement("span",null,e.createElement(P,{disabled:s,imgList:i}))):e.createElement(P,{disabled:s,imgList:i})},de=({goBack:t,exportData:r,header:o,headerName:i,imgList:a,stepProgress:c,stepInfo:l,stepList:s,step:p,annotationEngine:u,hasLangNode:k,hasHeaderOption:y,hasPredictTrackingIcon:D})=>{var f,g,E;const O=ne(),[,F]=Y(m=>m+1,0),d=Z(null),I=(f=ce(s,p))==null?void 0:f.config,z=(g=le(I))!=null?g:{},{enableSegment:H=!1}=z,N=q(d),R=e.createElement(ae,{exportData:r}),A=()=>{O(G(W.Quit)),t&&t(a)},h=m=>{b.changeLanguage(m),u==null||u.setLang(m),F()},x=b.language,B=(E=N==null?void 0:N.width)!=null?E:window.innerWidth,S=e.createElement(K,{className:`${n}-header__icon`,onClick:A}),_=i?e.createElement("span",{className:`${n}-header__name`},i):"",v=s.length>1&&e.createElement(e.Fragment,null,e.createElement(ie,{stepProgress:c}),e.createElement(me,{step:p,stepProgress:c,stepList:s,imgList:a})),$=y?e.createElement(re,{stepInfo:l}):null,Q=C,U=e.createElement("div",{className:`${n}-header__lang`},e.createElement("span",{className:`${n}-langCN ${x==="cn"?"active":""}`,onClick:()=>h("cn")},"\u4E2D\u6587")," / ",e.createElement("span",{className:`${n}-langEN ${x==="en"?"active":""}`,onClick:()=>h("en")},"En")),j=e.createElement(e.Fragment,null,D&&e.createElement(se,null),k&&U);return o?typeof o=="function"?e.createElement("div",{className:L(`${n}-header`),ref:d},e.createElement("div",{className:`${n}-header__title`},o({backNode:S,headerNameNode:_,stepListNode:v,headerOptionNode:$,langNode:j,PointCloudSwitchPattern:Q}))):o:e.createElement("div",{className:L(`${n}-header`),ref:d},e.createElement("div",{className:`${n}-header__title`},S,_,v,R,e.createElement("div",{id:"operationNode",className:`${n}-header__operationNode`,style:{left:B/2-174/2}},$),e.createElement("div",{className:`${n}-header__titlePlacement`}),H&&e.createElement(C,null),j))},pe=t=>{var r;return{imgList:t.annotation.imgList,annotationEngine:t.annotation.annotationEngine,stepProgress:t.annotation.stepProgress,toolName:(r=t.annotation.stepList[t.annotation.step-1])==null?void 0:r.tool,stepList:t.annotation.stepList,stepInfo:t.annotation.stepList[t.annotation.step-1],step:t.annotation.step}};var ue=ee(pe,null,null,{context:te})(de);export{ue as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.23.0-alpha.86",
3
+ "version": "1.23.0-alpha.87",
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.45",
47
- "@labelbee/lb-utils": "1.19.0-alpha.19",
46
+ "@labelbee/lb-annotation": "1.27.0-alpha.46",
47
+ "@labelbee/lb-utils": "1.19.0-alpha.20",
48
48
  "@labelbee/wavesurfer": "1.0.0",
49
49
  "@types/react-dom": "^18.2.7",
50
50
  "@types/react-transition-group": "^4.4.9",