@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
|
|
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.
|
|
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.
|
|
47
|
-
"@labelbee/lb-utils": "1.19.0-alpha.
|
|
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",
|