@labelbee/lb-components 1.24.0-alpha.33 → 1.24.0-alpha.35

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,2 +1,2 @@
1
- function i(o,t){var e=atob(o);if(t){for(var r=new Uint8Array(e.length),n=0,a=e.length;n<a;++n)r[n]=e.charCodeAt(n);return new TextDecoder("utf-16le").decode(new Uint16Array(r.buffer))}return e}function u(o,t,e){var r=t===void 0?null:t,n=e===void 0?!1:e,a=i(o,n),c=a.indexOf(`
2
- `,10)+1,d=a.substring(c)+(r?"//# sourceMappingURL="+r:""),f=new Blob([d],{type:"application/javascript"});return URL.createObjectURL(f)}function v(o,t,e){var r;return function(a){return r=r||u(o,t,e),new Worker(r,a)}}export{v as createBase64WorkerFactory,u as createURL};
1
+ function i(o,a){var r=atob(o);if(a){for(var e=new Uint8Array(r.length),n=0,t=r.length;n<t;++n)e[n]=r.charCodeAt(n);return String.fromCharCode.apply(null,new Uint16Array(e.buffer))}return r}function l(o,a,r){var e=a===void 0?null:a,n=r===void 0?!1:r,t=i(o,n),u=t.indexOf(`
2
+ `,10)+1,c=t.substring(u)+(e?"//# sourceMappingURL="+e:""),f=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(f)}function v(o,a,r){var e;return function(t){return e=e||l(o,a,r),new Worker(e,t)}}export{v as createBase64WorkerFactory};
@@ -1 +1 @@
1
- import{createBase64WorkerFactory as l}from"./_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js";var Z=l("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIGM9T2JqZWN0LmRlZmluZVByb3BlcnR5LG89T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyxsPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksZj1PYmplY3QucHJvdG90eXBlLnByb3BlcnR5SXNFbnVtZXJhYmxlLGE9KHIsZSx0KT0+ZSBpbiByP2MocixlLHtlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMCx2YWx1ZTp0fSk6cltlXT10LHU9KHIsZSk9Pntmb3IodmFyIHQgaW4gZXx8KGU9e30pKWwuY2FsbChlLHQpJiZhKHIsdCxlW3RdKTtpZihvKWZvcih2YXIgdCBvZiBvKGUpKWYuY2FsbChlLHQpJiZhKHIsdCxlW3RdKTtyZXR1cm4gcn07b25tZXNzYWdlPWZ1bmN0aW9uKGUpe2NvbnN0e2NhY2hlTWFwOnQsaW5kZXhlczpzLGRlZmF1bHRSR0JBOl99PWUuZGF0YSxkPXMubGVuZ3RoLHA9W107Zm9yKGxldCBuPTA7bjxkO249bisxKXtjb25zdCBpPXRbc1tuXV07aSYmcC5wdXNoKHUoe30saSkpfXBvc3RNZXNzYWdlKHthbm5vdGF0aW9uczpbe3R5cGU6InBpeGVsUG9pbnRzIixhbm5vdGF0aW9uOnAsZGVmYXVsdFJHQkE6X31dfSl9fSkoKTsKCg==",null,!1);export{Z as default};
1
+ import{createBase64WorkerFactory as l}from"./_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js";var Z=l("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIGU9T2JqZWN0LmRlZmluZVByb3BlcnR5LHQ9T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyxuPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksbz1PYmplY3QucHJvdG90eXBlLnByb3BlcnR5SXNFbnVtZXJhYmxlLGE9KHQsbixvKT0+biBpbiB0P2UodCxuLHtlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMCx2YWx1ZTpvfSk6dFtuXT1vLHI9KGUscik9Pntmb3IodmFyIHMgaW4gcnx8KHI9e30pKW4uY2FsbChyLHMpJiZhKGUscyxyW3NdKTtpZih0KWZvcih2YXIgcyBvZiB0KHIpKW8uY2FsbChyLHMpJiZhKGUscyxyW3NdKTtyZXR1cm4gZX07b25tZXNzYWdlPWZ1bmN0aW9uKGUpe2NvbnN0e2NhY2hlTWFwOnQsaW5kZXhlczpuLGRlZmF1bHRSR0JBOm99PWUuZGF0YSxhPW4ubGVuZ3RoLHM9W107Zm9yKGxldCBlPTA7ZTxhO2UrPTEpe2NvbnN0IG89dFtuW2VdXTtvJiZzLnB1c2gocih7fSxvKSl9cG9zdE1lc3NhZ2Uoe2Fubm90YXRpb25zOlt7dHlwZToicGl4ZWxQb2ludHMiLGFubm90YXRpb246cyxkZWZhdWx0UkdCQTpvfV19KX19KCk7Cgo=",null,!1);export{Z as default};
@@ -1 +1 @@
1
- import{BatchUpdateResultByTrackID as q}from"../../../../store/annotation/actionCreators.js";import{LabelBeeContext as V,useDispatch as N}from"../../../../store/ctx.js";import{Form as o,Modal as $,InputNumber as C,Radio as O,Select as v,Popover as G,message as H}from"antd";import e,{useState as K,useEffect as Q,useCallback as W}from"react";import{useTranslation as k}from"react-i18next";import{QuestionCircleOutlined as J}from"@ant-design/icons";import{PointCloudUtils as D}from"@labelbee/lb-utils";import{connect as X}from"react-redux";import{useSingleBox as Y}from"../../hooks/useSingleBox.js";import{MathUtils as Z}from"@labelbee/lb-annotation";var ee=Object.defineProperty,te=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,j=(r,n,a)=>n in r?ee(r,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[n]=a,B=(r,n)=>{for(var a in n||(n={}))re.call(n,a)&&j(r,a,n[a]);if(U)for(var a of U(n))ae.call(n,a)&&j(r,a,n[a]);return r},le=(r,n)=>te(r,ne(n));const ie={labelCol:{span:8},wrapperCol:{span:16}},z=[{required:!0,message:"\u8BF7\u586B\u5199\u4E00\u4E2A\u6570\u5B57"}],ue=[{required:!0,message:"\u8BF7\u9009\u62E9\u4E3B\u5C5E\u6027"}],S=2,M=({text:r})=>e.createElement("span",{style:{borderRadius:"4px 0px 0px 4px",padding:"0px 12px",background:"#FAFAFA",border:"1px solid rgb(217 217 217)",borderRight:"0",display:"flex",alignItems:"center",height:32}},r),oe=r=>{const{t:n}=k(),{size:a,isMax:s,selectedBox:m}=r;if(!a||!m)return null;const f={marginRight:16},h=B(B({},m),s&&a),{length:l,width:p,height:E}=D.transferBox2Kitti(h);return e.createElement("div",null,e.createElement("span",{style:f},n("Length"),": ",l.toFixed(S)),e.createElement("span",{style:f},n("Width"),": ",p.toFixed(S)),e.createElement("span",{style:f},n("Height"),": ",E.toFixed(S)),e.createElement(G,{placement:"rightBottom",content:`\u7EDF\u4E00\u5C3A\u5BF8\u4E3A\u8BE5ID\u7684\u6240\u6709\u6807\u6CE8\u6846${s?"\u4E2D\u6700\u5927\u7684\u5C3A\u5BF8":"\u4EE5\u5F53\u524D\u5E27\u6846\u5C3A\u5BF8\u4E3A\u6807\u51C6"}`},e.createElement(J,null)))},se=[{value:"current",label:"\u5F53\u524D\u5E27\u5C3A\u5BF8"},{value:"max",label:"\u6700\u5927\u5C3A\u5BF8"}],ce=({id:r,visible:n,onCancel:a,config:s,imgList:m,imgIndex:f})=>{const h=N(),{selectedBox:l}=Y(),[p,E]=K(),[g]=o.useForm(),{t:c}=k();Q(()=>{n===!1?(g.resetFields(),E(void 0)):F()},[n]);const R=t=>{var i,u,d,y;if(!r)return;if(!p){H.info("\u8BE5\u8303\u56F4\u4E0D\u5B58\u5728\u66F4\u6539\u6570\u636E, \u8BF7\u66F4\u6539\u7EDF\u4E00\u8303\u56F4");return}const b={attribute:t.attribute};if(s.secondaryAttributeConfigurable){const _={};(i=s.inputList)==null||i.forEach(w=>{const x=t[w.value];if(x!==void 0){const T=Array.isArray(x)?x.join(";"):x;Object.assign(_,{[w.value]:T})}}),Object.keys(_).length>0&&Object.assign(b,{subAttribute:_})}const{UnifySize:P}=t;Object.assign(b,p&&P==="max"?p:{width:(u=l==null?void 0:l.info)==null?void 0:u.width,height:(d=l==null?void 0:l.info)==null?void 0:d.height,depth:(y=l==null?void 0:l.info)==null?void 0:y.depth}),h(q(r,b,[t.prevPage-1,t.nextPage-1],m)),a()},F=W(()=>{var t;const{prevPage:i,nextPage:u}=g.getFieldsValue(["prevPage","nextPage"]),d=m.filter((b,P)=>Z.isInRange(P,[i-1,u-1]));if(!((d==null?void 0:d.length)>0)||!(l==null?void 0:l.info)||((t=l==null?void 0:l.info)==null?void 0:t.trackID)===void 0){E(void 0);return}const y=D.getMaxSizeFromBox({trackID:l.info.trackID,imgList:d});E(y)},[m,l,f]),L=()=>g.submit(),A={width:"200px"},I={marginBottom:"24px",display:"flex",alignItems:"center"};return e.createElement($,{title:c("UnifyParams"),visible:n,onCancel:a,onOk:L,wrapClassName:"labelbee-custom-modal"},e.createElement(e.Fragment,null,e.createElement("div",{style:{marginBottom:"20px",color:"#f00"}},c("UnifyParamsTips")),e.createElement(o,le(B({},ie),{form:g,onFinish:R}),e.createElement(o.Item,{name:"id",label:c("UnifyTrackID")},r),e.createElement(o.Item,{label:c("UnifyAttributeRange"),required:!0},e.createElement(o.Item,{style:{display:"inline-block"},rules:z,name:"prevPage",noStyle:!0,initialValue:1},e.createElement(C,{precision:0,min:1,style:{width:"80px"},onChange:()=>F()})),e.createElement("span",{style:{display:"inline-block",width:"24px",textAlign:"center"}},"-"),e.createElement(o.Item,{style:{display:"inline-block"},rules:z,name:"nextPage",noStyle:!0,initialValue:m.length},e.createElement(C,{precision:0,min:1,style:{width:"80px"},onChange:()=>F()})),e.createElement("span",{style:{display:"inline-block",width:"40x",marginLeft:"10px",textAlign:"center"}},c("Page"))),e.createElement(o.Item,{name:"UnifySize",label:c("UnifySize"),required:!0,initialValue:"current"},e.createElement(O.Group,{onChange:t=>{g.setFieldValue("UnifySize",t.target.value)}},se.map(t=>{const{value:i,label:u}=t;return e.createElement(O,{value:i,key:i},e.createElement("div",null,u),e.createElement(oe,{selectedBox:l==null?void 0:l.info,size:p,isMax:i==="max"}))}))),e.createElement(o.Item,{label:c("UnifyTag"),required:!0},e.createElement("div",{style:I},e.createElement(M,{text:c("Attribute")}),e.createElement(o.Item,{name:"attribute",noStyle:!0,rules:ue},e.createElement(v,{style:A},s.attributeList.map(t=>e.createElement(v.Option,{key:t.value,value:t.value},t.key))))),s.secondaryAttributeConfigurable&&s.inputList.map(t=>{var i;return e.createElement("div",{key:t.value,style:I},e.createElement(M,{text:t.key}),e.createElement(o.Item,{name:t.value,noStyle:!0,required:!1},e.createElement(v,{style:A,mode:t.isMulti?"multiple":void 0},(i=t.subSelected)==null?void 0:i.map(u=>e.createElement(v.Option,{key:u.value,value:u.value},u.key)))))})))))},me=r=>({imgIndex:r.annotation.imgIndex});var pe=X(me,null,null,{context:V})(ce);export{pe as default};
1
+ import{BatchUpdateResultByTrackID as q}from"../../../../store/annotation/actionCreators.js";import{LabelBeeContext as V,useDispatch as N}from"../../../../store/ctx.js";import{Form as o,Modal as $,InputNumber as C,Radio as O,Select as v,Popover as G,message as H}from"antd";import e,{useState as K,useEffect as Q,useCallback as W}from"react";import{useTranslation as k}from"react-i18next";import{QuestionCircleOutlined as J}from"@ant-design/icons";import{PointCloudUtils as D}from"@labelbee/lb-utils";import{connect as X}from"react-redux";import{useSingleBox as Y}from"../../hooks/useSingleBox.js";import{MathUtils as Z}from"@labelbee/lb-annotation";var ee=Object.defineProperty,te=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,z=(r,n,a)=>n in r?ee(r,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[n]=a,_=(r,n)=>{for(var a in n||(n={}))re.call(n,a)&&z(r,a,n[a]);if(U)for(var a of U(n))ae.call(n,a)&&z(r,a,n[a]);return r},le=(r,n)=>te(r,ne(n));const ie={labelCol:{span:8},wrapperCol:{span:16}},j=[{required:!0,message:"\u8BF7\u586B\u5199\u4E00\u4E2A\u6570\u5B57"}],ue=[{required:!0,message:"\u8BF7\u9009\u62E9\u4E3B\u5C5E\u6027"}],B=2,M=({text:r})=>e.createElement("span",{style:{borderRadius:"4px 0px 0px 4px",padding:"0px 12px",background:"#FAFAFA",border:"1px solid rgb(217 217 217)",borderRight:"0",display:"flex",alignItems:"center",height:32}},r),oe=r=>{const{t:n}=k(),{size:a,isMax:s,selectedBox:m}=r;if(!a||!m)return null;const f={marginRight:16},h=_(_({},m),s&&a),{length:l,width:p,height:E}=D.transferBox2Kitti(h);return e.createElement("div",null,e.createElement("span",{style:f},n("Length"),": ",l.toFixed(B)),e.createElement("span",{style:f},n("Width"),": ",p.toFixed(B)),e.createElement("span",{style:f},n("Height"),": ",E.toFixed(B)),e.createElement(G,{placement:"rightBottom",content:`\u7EDF\u4E00\u5C3A\u5BF8\u4E3A\u8BE5ID\u7684\u6240\u6709\u6807\u6CE8\u6846${s?"\u4E2D\u6700\u5927\u7684\u5C3A\u5BF8":"\u4EE5\u5F53\u524D\u5E27\u6846\u5C3A\u5BF8\u4E3A\u6807\u51C6"}`},e.createElement(J,null)))},se=[{value:"current",label:"\u5F53\u524D\u5E27\u5C3A\u5BF8"},{value:"max",label:"\u6700\u5927\u5C3A\u5BF8"},{value:"ignore",label:"\u5FFD\u7565"}],ce=({id:r,visible:n,onCancel:a,config:s,imgList:m,imgIndex:f})=>{const h=N(),{selectedBox:l}=Y(),[p,E]=K(),[g]=o.useForm(),{t:c}=k();Q(()=>{n===!1?(g.resetFields(),E(void 0)):F()},[n]);const R=t=>{var i,u,d,y;if(!r)return;if(!p){H.info("\u8BE5\u8303\u56F4\u4E0D\u5B58\u5728\u66F4\u6539\u6570\u636E, \u8BF7\u66F4\u6539\u7EDF\u4E00\u8303\u56F4");return}const b={attribute:t.attribute};if(s.secondaryAttributeConfigurable){const S={};(i=s.inputList)==null||i.forEach(w=>{const x=t[w.value];if(x!==void 0){const T=Array.isArray(x)?x.join(";"):x;Object.assign(S,{[w.value]:T})}}),Object.keys(S).length>0&&Object.assign(b,{subAttribute:S})}const{UnifySize:P}=t;t.UnifySize!=="ignore"&&Object.assign(b,p&&P==="max"?p:{width:(u=l==null?void 0:l.info)==null?void 0:u.width,height:(d=l==null?void 0:l.info)==null?void 0:d.height,depth:(y=l==null?void 0:l.info)==null?void 0:y.depth}),h(q(r,b,[t.prevPage-1,t.nextPage-1],m)),a()},F=W(()=>{var t;const{prevPage:i,nextPage:u}=g.getFieldsValue(["prevPage","nextPage"]),d=m.filter((b,P)=>Z.isInRange(P,[i-1,u-1]));if(!((d==null?void 0:d.length)>0)||!(l==null?void 0:l.info)||((t=l==null?void 0:l.info)==null?void 0:t.trackID)===void 0){E(void 0);return}const y=D.getMaxSizeFromBox({trackID:l.info.trackID,imgList:d});E(y)},[m,l,f]),L=()=>g.submit(),A={width:"200px"},I={marginBottom:"24px",display:"flex",alignItems:"center"};return e.createElement($,{title:c("UnifyParams"),visible:n,onCancel:a,onOk:L,wrapClassName:"labelbee-custom-modal"},e.createElement(e.Fragment,null,e.createElement("div",{style:{marginBottom:"20px",color:"#f00"}},c("UnifyParamsTips")),e.createElement(o,le(_({},ie),{form:g,onFinish:R}),e.createElement(o.Item,{name:"id",label:c("UnifyTrackID")},r),e.createElement(o.Item,{label:c("UnifyAttributeRange"),required:!0},e.createElement(o.Item,{style:{display:"inline-block"},rules:j,name:"prevPage",noStyle:!0,initialValue:1},e.createElement(C,{precision:0,min:1,style:{width:"80px"},onChange:()=>F()})),e.createElement("span",{style:{display:"inline-block",width:"24px",textAlign:"center"}},"-"),e.createElement(o.Item,{style:{display:"inline-block"},rules:j,name:"nextPage",noStyle:!0,initialValue:m.length},e.createElement(C,{precision:0,min:1,style:{width:"80px"},onChange:()=>F()})),e.createElement("span",{style:{display:"inline-block",width:"40x",marginLeft:"10px",textAlign:"center"}},c("Page"))),e.createElement(o.Item,{name:"UnifySize",label:c("UnifySize"),required:!0,initialValue:"current"},e.createElement(O.Group,{onChange:t=>{g.setFieldValue("UnifySize",t.target.value)}},se.map(t=>{const{value:i,label:u}=t;return e.createElement(O,{value:i,key:i},e.createElement("div",null,u),i!=="ignore"&&e.createElement(oe,{selectedBox:l==null?void 0:l.info,size:p,isMax:i==="max"}))}))),e.createElement(o.Item,{label:c("UnifyTag"),required:!0},e.createElement("div",{style:I},e.createElement(M,{text:c("Attribute")}),e.createElement(o.Item,{name:"attribute",noStyle:!0,rules:ue},e.createElement(v,{style:A},s.attributeList.map(t=>e.createElement(v.Option,{key:t.value,value:t.value},t.key))))),s.secondaryAttributeConfigurable&&s.inputList.map(t=>{var i;return e.createElement("div",{key:t.value,style:I},e.createElement(M,{text:t.key}),e.createElement(o.Item,{name:t.value,noStyle:!0,required:!1},e.createElement(v,{style:A,mode:t.isMulti?"multiple":void 0},(i=t.subSelected)==null?void 0:i.map(u=>e.createElement(v.Option,{key:u.value,value:u.value},u.key)))))})))))},me=r=>({imgIndex:r.annotation.imgIndex});var pe=X(me,null,null,{context:V})(ce);export{pe as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.24.0-alpha.33",
3
+ "version": "1.24.0-alpha.35",
4
4
  "description": "Provide a complete library of annotation components",
5
5
  "main": "./dist/index.js",
6
6
  "es": "./es/index.js",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "^4.6.2",
46
- "@labelbee/lb-annotation": "1.28.0-alpha.19",
46
+ "@labelbee/lb-annotation": "1.28.0-alpha.20",
47
47
  "@labelbee/lb-utils": "1.20.0-alpha.3",
48
48
  "@labelbee/wavesurfer": "1.1.0",
49
49
  "@types/react-dom": "18.3.1",
@@ -114,7 +114,7 @@
114
114
  "rollup-plugin-esbuild": "^3.0.2",
115
115
  "rollup-plugin-postcss": "^4.0.2",
116
116
  "rollup-plugin-terser": "^7.0.2",
117
- "rollup-plugin-web-worker-loader": "^1.6.1",
117
+ "rollup-plugin-web-worker-loader": "1.6.1",
118
118
  "sass": "^1.53.0",
119
119
  "typescript": "^4.2.3"
120
120
  },