@labelbee/lb-components 1.12.2-alpha.2 → 1.13.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 -0
- package/dist/components/LLMToolView/questionView/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/index.js +1 -0
- package/dist/components/LLMToolView/utils/data.js +1 -0
- package/dist/components/longText/index.js +1 -0
- package/dist/components/predictTracking/previewResult/util.js +1 -1
- package/dist/data/enums/ToolType.js +1 -1
- package/dist/index.css +132 -0
- package/dist/index.js +1 -1
- package/dist/store/annotation/actionCreators.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 +10 -0
- package/dist/types/components/LLMToolView/questionView/index.d.ts +10 -0
- package/dist/types/components/LLMToolView/sidebar/components/answerList/index.d.ts +18 -0
- package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +10 -0
- package/dist/types/components/LLMToolView/sidebar/components/determineGroup/index.d.ts +9 -0
- package/dist/types/components/LLMToolView/sidebar/components/scoreGroupButton/index.d.ts +10 -0
- package/dist/types/components/LLMToolView/sidebar/index.d.ts +11 -0
- package/dist/types/components/LLMToolView/types.d.ts +54 -0
- package/dist/types/components/LLMToolView/utils/data.d.ts +2 -0
- package/dist/types/components/longText/index.d.ts +18 -0
- package/dist/types/data/enums/ToolType.d.ts +2 -1
- package/dist/types/hooks/annotation.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/store/ctx.d.ts +7 -0
- package/dist/types/utils/ToolUtils.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.d.ts +6 -0
- package/dist/utils/ToolUtils.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolHeader/index.js +1 -1
- package/es/components/LLMToolView/index.js +1 -0
- package/es/components/LLMToolView/questionView/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -0
- package/es/components/LLMToolView/sidebar/index.js +1 -0
- package/es/components/LLMToolView/utils/data.js +1 -0
- package/es/components/longText/index.js +1 -0
- package/es/components/predictTracking/previewResult/util.js +1 -1
- package/es/data/enums/ToolType.js +1 -1
- package/es/index.css +132 -0
- package/es/index.js +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/ctx.js +1 -1
- package/es/utils/ToolUtils.js +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/views/MainView/toolHeader/index.js +1 -1
- package/package.json +3 -3
- package/dist/components/predictTracking/previewResult/index.js +0 -1
- package/dist/types/components/predictTracking/previewResult/index.d.ts +0 -10
- package/es/components/predictTracking/previewResult/index.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labelbee/lb-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.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.17.0-alpha.1",
|
|
47
|
+
"@labelbee/lb-utils": "1.9.0-alpha.1",
|
|
48
48
|
"ahooks": "^3.4.0",
|
|
49
49
|
"classnames": "^2.3.0",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var classNames=require("classnames"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),PointCloudContext=require("../../pointCloudView/PointCloudContext.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),ctx=require("../../../store/ctx.js"),dom=require("../../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),util=require("./util.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,a)=>new Promise((c,n)=>{var o=i=>{try{l(a.next(i))}catch(s){n(s)}},r=i=>{try{l(a.throw(i))}catch(s){n(s)}},l=i=>i.done?c(i.value):Promise.resolve(i.value).then(o,r);l((a=a.apply(e,t)).next())});const PreviewResult=e=>{const{predictionResult:t,predictionResultVisible:a,imgList:c}=e,[n,o]=React.useState([]),r=ctx.useDispatch(),{t:l}=reactI18next.useTranslation(),i=()=>{actionCreators.SetPredictResultVisible(r,!1),actionCreators.SetPredictResult(r,[]),o([])},s=()=>__async(void 0,null,function*(){actionCreators.SetPointCloudLoading(r,!0),yield r(actionCreators.BatchUpdateImgListResultByPredictResult()),actionCreators.SetPointCloudLoading(r,!1),i()});return a?React__default.default.createElement(React__default.default.Fragment,null,n.length>0&&React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","bar")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","title")},React__default.default.createElement("div",null,l("ComplementaryTrackingPrediction"),n.length>0?`\uFF08${n.length}\uFF09`:""),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","option")},React__default.default.createElement("div",{className:classNames__default.default([dom.getClassName("point-cloud-predict-tracking-container","cancelOption"),dom.getClassName("point-cloud-predict-tracking-container","button")]),onClick:i},l("Cancel")),React__default.default.createElement("div",{className:classNames__default.default([dom.getClassName("point-cloud-predict-tracking-container","okOption"),dom.getClassName("point-cloud-predict-tracking-container","button")]),onClick:s},l("Apply")))),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","content")},React__default.default.createElement(Result,{list:n})))),t.length>0&&React__default.default.createElement(GenerateViewsDataUrl,{result:t,imgList:c,setList:o})):null},Result=e=>{const{list:t}=e,{t:a}=reactI18next.useTranslation(),c=[a("TopView"),a("SideView"),a("BackView")];return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","left")},c.map(n=>React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","title"),key:n},n))),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","right")},t.map(n=>React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","item"),key:n.id},util.views.map(o=>{const r=n[o];return React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","view"),key:`${n.id}-${o}`},React__default.default.createElement("img",{src:r}))})))))},GenerateViewsDataUrl=e=>{const t=React__default.default.useContext(PointCloudContext.PointCloudContext),a=ctx.useDispatch(),{result:c,imgList:n,setList:o}=e,r=React.useRef(null),l={width:600,height:600};return React.useEffect(()=>{(()=>__async(void 0,null,function*(){var s,f,g,v,C,P;const p=(s=t.mainViewInstance)==null?void 0:s.config;if(p&&r.current){const y=lbUtils.PointCloudUtils.getDefaultOrthographicParams(l),u=new lbAnnotation.PointCloud({container:r.current,isOrthographicCamera:!0,orthographicParams:y,config:p});u.setShowDirection(!1);for(const d of c){const{index:m}=d,N=n[m].url?n[m].url:(C=(v=(g=(f=n[m])==null?void 0:f.webPointCloudFile)==null?void 0:g.lidar)==null?void 0:v.url)!=null?C:"";yield u.loadPCDFileByBox(N,d,{width:2,height:2,depth:2}),yield u.updateCameraZoom(t.zoom);const _=(P=lbUtils.toolStyleConverter.getColorFromConfig({attribute:d.attribute},__spreadProps(__spreadValues({},p),{attributeConfigurable:!0}),{}))==null?void 0:P.fill;u.generateBox(d,_),yield util.sleep(500),yield util.getViewsDataUrl(u,d,t.zoom),yield u.removeObjectByName(d.id,"box"),yield u.clearPointCloudAndRender()}o(c),actionCreators.SetPointCloudLoading(a,!1)}}))()},[]),React__default.default.createElement("div",{style:l,ref:r,className:"generate-view"})},mapStateToProps=e=>({predictionResult:e.annotation.predictionResult,predictionResultVisible:e.annotation.predictionResultVisible,imgList:e.annotation.imgList});var PreviewResult$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PreviewResult);module.exports=PreviewResult$1;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IPointCloudBoxWithIndex } from '@/store/annotation/types';
|
|
3
|
-
import { IFileItem } from '@/types/data';
|
|
4
|
-
interface IProps {
|
|
5
|
-
imgList: IFileItem[];
|
|
6
|
-
predictionResultVisible: boolean;
|
|
7
|
-
predictionResult: IPointCloudBoxWithIndex[];
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgList" | "predictionResult" | "predictionResultVisible">>;
|
|
10
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import w from"classnames";import n,{useState as j,useRef as S,useEffect as F}from"react";import{useTranslation as _}from"react-i18next";import{connect as L}from"react-redux";import{PointCloudContext as B}from"../../pointCloudView/PointCloudContext.js";import{SetPredictResultVisible as D,SetPredictResult as T,SetPointCloudLoading as v,BatchUpdateImgListResultByPredictResult as I}from"../../../store/annotation/actionCreators.js";import{LabelBeeContext as U,useDispatch as E}from"../../../store/ctx.js";import{getClassName as o}from"../../../utils/dom.js";import{PointCloud as $}from"@labelbee/lb-annotation";import{PointCloudUtils as z,toolStyleConverter as A}from"@labelbee/lb-utils";import{views as G,sleep as Z,getViewsDataUrl as q}from"./util.js";var H=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,N=(i,e,t)=>e in i?H(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,W=(i,e)=>{for(var t in e||(e={}))M.call(e,t)&&N(i,t,e[t]);if(k)for(var t of k(e))Q.call(e,t)&&N(i,t,e[t]);return i},X=(i,e)=>J(i,K(e)),O=(i,e,t)=>new Promise((d,r)=>{var s=a=>{try{c(t.next(a))}catch(u){r(u)}},l=a=>{try{c(t.throw(a))}catch(u){r(u)}},c=a=>a.done?d(a.value):Promise.resolve(a.value).then(s,l);c((t=t.apply(i,e)).next())});const Y=i=>{const{predictionResult:e,predictionResultVisible:t,imgList:d}=i,[r,s]=j([]),l=E(),{t:c}=_(),a=()=>{D(l,!1),T(l,[]),s([])},u=()=>O(void 0,null,function*(){v(l,!0),yield l(I()),v(l,!1),a()});return t?n.createElement(n.Fragment,null,r.length>0&&n.createElement("div",{className:o("point-cloud-predict-tracking-container")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","bar")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","title")},n.createElement("div",null,c("ComplementaryTrackingPrediction"),r.length>0?`\uFF08${r.length}\uFF09`:""),n.createElement("div",{className:o("point-cloud-predict-tracking-container","option")},n.createElement("div",{className:w([o("point-cloud-predict-tracking-container","cancelOption"),o("point-cloud-predict-tracking-container","button")]),onClick:a},c("Cancel")),n.createElement("div",{className:w([o("point-cloud-predict-tracking-container","okOption"),o("point-cloud-predict-tracking-container","button")]),onClick:u},c("Apply")))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","content")},n.createElement(ee,{list:r})))),e.length>0&&n.createElement(te,{result:e,imgList:d,setList:s})):null},ee=i=>{const{list:e}=i,{t}=_(),d=[t("TopView"),t("SideView"),t("BackView")];return n.createElement(n.Fragment,null,n.createElement("div",{className:o("point-cloud-predict-tracking-container","left")},d.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","title"),key:r},r))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","right")},e.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","item"),key:r.id},G.map(s=>{const l=r[s];return n.createElement("div",{className:o("point-cloud-predict-tracking-container","view"),key:`${r.id}-${s}`},n.createElement("img",{src:l}))})))))},te=i=>{const e=n.useContext(B),t=E(),{result:d,imgList:r,setList:s}=i,l=S(null),c={width:600,height:600};return F(()=>{(()=>O(void 0,null,function*(){var u,P,h,y,C,b;const f=(u=e.mainViewInstance)==null?void 0:u.config;if(f&&l.current){const R=z.getDefaultOrthographicParams(c),p=new $({container:l.current,isOrthographicCamera:!0,orthographicParams:R,config:f});p.setShowDirection(!1);for(const m of d){const{index:g}=m,x=r[g].url?r[g].url:(C=(y=(h=(P=r[g])==null?void 0:P.webPointCloudFile)==null?void 0:h.lidar)==null?void 0:y.url)!=null?C:"";yield p.loadPCDFileByBox(x,m,{width:2,height:2,depth:2}),yield p.updateCameraZoom(e.zoom);const V=(b=A.getColorFromConfig({attribute:m.attribute},X(W({},f),{attributeConfigurable:!0}),{}))==null?void 0:b.fill;p.generateBox(m,V),yield Z(500),yield q(p,m,e.zoom),yield p.removeObjectByName(m.id,"box"),yield p.clearPointCloudAndRender()}s(d),v(t,!1)}}))()},[]),n.createElement("div",{style:c,ref:l,className:"generate-view"})},ne=i=>({predictionResult:i.annotation.predictionResult,predictionResultVisible:i.annotation.predictionResultVisible,imgList:i.annotation.imgList});var ie=L(ne,null,null,{context:U})(Y);export{ie as default};
|