code7-leia 0.1.31 → 0.1.40
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/code7-leia.cjs.development.js +155 -19
- package/dist/code7-leia.cjs.development.js.map +1 -1
- package/dist/code7-leia.cjs.production.min.js +1 -1
- package/dist/code7-leia.cjs.production.min.js.map +1 -1
- package/dist/code7-leia.esm.js +156 -20
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/components/TestArea/components/InputTest/index.d.ts +8 -0
- package/dist/components/TestArea/components/InputTest/styles.d.ts +5 -0
- package/dist/components/TestArea/components/Select/index.d.ts +12 -0
- package/dist/components/TestArea/components/Select/styles.d.ts +3 -0
- package/dist/components/TestArea/styles.d.ts +5 -0
- package/package.json +1 -1
- package/src/components/{FileArea/components/EmptyState → EmptyState}/styles.tsx +4 -2
- package/src/components/FileArea/index.tsx +44 -43
- package/src/components/TestArea/components/InputTest/index.tsx +25 -0
- package/src/components/TestArea/components/InputTest/styles.tsx +27 -0
- package/src/components/TestArea/components/Select/index.tsx +41 -0
- package/src/components/TestArea/components/Select/styles.tsx +21 -0
- package/src/components/TestArea/index.tsx +99 -5
- package/src/components/TestArea/styles.tsx +47 -0
- package/src/types/image.d.ts +4 -0
- package/src/assets/icon_search.svg +0 -3
- /package/dist/components/{FileArea/components/EmptyState → EmptyState}/index.d.ts +0 -0
- /package/dist/components/{FileArea/components/EmptyState → EmptyState}/styles.d.ts +0 -0
- /package/src/components/{FileArea/components/EmptyState → EmptyState}/index.tsx +0 -0
|
@@ -1,10 +1,104 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { getLanguage } from '../../utils/getLanguage'
|
|
3
|
+
import * as S from './styles';
|
|
4
|
+
import Select from './components/Select'
|
|
5
|
+
import InputTest from './components/InputTest'
|
|
6
|
+
import { PiWaveformBold } from 'react-icons/pi';
|
|
7
|
+
import { FaList } from 'react-icons/fa';
|
|
8
|
+
import EmptyState from '../EmptyState';
|
|
9
|
+
// import IconLeia from '../../assets/icon_leia.svg';
|
|
10
|
+
import { MdPerson2 } from "react-icons/md";
|
|
2
11
|
|
|
3
12
|
export const TestArea = () => {
|
|
13
|
+
const t = getLanguage('pt-br')
|
|
14
|
+
const [results, setResults] = useState({ "message": "" });
|
|
15
|
+
const [search, setSearch] = useState('');
|
|
16
|
+
const tags = [
|
|
17
|
+
"pae",
|
|
18
|
+
"boteria",
|
|
19
|
+
"vr",
|
|
20
|
+
"code7",
|
|
21
|
+
"vidalink"
|
|
22
|
+
]
|
|
23
|
+
const personas = [
|
|
24
|
+
{
|
|
25
|
+
"description": "Seriedade e profundidade ao explicar. Usa linguagem acadêmica e é preciso em temas específicos da área.",
|
|
26
|
+
"name": "College professor"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"description": "Abordagem descontraída, direto ao ponto. Linguagem simples, exemplos práticos para facilitar compreensão rápida.",
|
|
30
|
+
"name": "School Teacher"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"description": "Estilo descontraído, senso de humor único. Piadas e trocadilhos até em assuntos sérios.",
|
|
34
|
+
"name": "Humorist"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "Postura centrada, comunicação direta e focada em resultados. Prioriza eficiência e precisão.",
|
|
38
|
+
"name": "Military"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"description": "Estilo único e carismático. Usa linguagem moderna, compartilha informações cativantes de forma descontraída.",
|
|
42
|
+
"name": "Digital Influencer"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
const optionsPersona = personas.map(persona => {
|
|
47
|
+
return { label: persona.name, value: persona.description }
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const optionsPresset = tags.map(tag => {
|
|
51
|
+
return { label: tag, value: tag }
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const handleSelect = (value: string | number) => {
|
|
55
|
+
console.log(value);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const handleSearch = (value: string) => {
|
|
59
|
+
setSearch(value);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const handleRecordAudio = () => {
|
|
63
|
+
console.log('Iniciando gravação de áudio...');
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const handleTest = () => {
|
|
67
|
+
console.log('Pesquisa: ', search)
|
|
68
|
+
setResults({
|
|
69
|
+
"message": "Você precisa seguir algumas etapas importantes para ter um chatbot perfeito. Primeiro, defina claramente o objetivo do seu chatbot. Em seguida, crie uma mensagem de saudação cativante para atrair a atenção dos usuários. Não se esqueça de pedir feedbacks para melhorar constantemente o desempenho do seu chatbot. Além disso, construa um fluxo de conversa simples e utilize respostas curtas para manter a interação rápida e eficiente. Também é importante incorporar inteligência artificial para tornar o seu chatbot especialista em determinado assunto. Teste o seu bot antes de lançá-lo e personalize-o de acordo com as necessidades dos usuários. Por fim, direcione os usuários para um atendimento humano quando necessário. Seguindo essas dicas, você estará no caminho certo para ter um chatbot perfeito!"
|
|
70
|
+
})
|
|
71
|
+
};
|
|
72
|
+
|
|
4
73
|
return (
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
74
|
+
<S.Container>
|
|
75
|
+
<S.Header>
|
|
76
|
+
<div className='infos'>
|
|
77
|
+
<h2>{t.test}</h2>
|
|
78
|
+
<p>{t.testArea.description}</p>
|
|
79
|
+
</div>
|
|
80
|
+
</S.Header>
|
|
81
|
+
<S.Inputs>
|
|
82
|
+
<InputTest placeholder={t.testArea.typeSentence} onChange={handleSearch} onRecordAudio={handleRecordAudio} />
|
|
83
|
+
<Select placeholder={t.testArea.selectPersona} options={optionsPersona} onSelect={handleSelect} />
|
|
84
|
+
<Select placeholder={t.testArea.selectPresset} options={optionsPresset} onSelect={handleSelect} />
|
|
85
|
+
<button onClick={handleTest}><PiWaveformBold /> {t.buttons.test}</button>
|
|
86
|
+
</S.Inputs>
|
|
87
|
+
{
|
|
88
|
+
results.message === '' ? (
|
|
89
|
+
<EmptyState
|
|
90
|
+
icon={<FaList></FaList>}
|
|
91
|
+
title={t.testArea.emptyState.title}
|
|
92
|
+
description={t.testArea.emptyState.description}
|
|
93
|
+
activeButton={false}
|
|
94
|
+
/>
|
|
95
|
+
) : <S.Result>
|
|
96
|
+
<div className='icon'>
|
|
97
|
+
<MdPerson2 />
|
|
98
|
+
</div>
|
|
99
|
+
<div className='text'>{results.message}</div>
|
|
100
|
+
</S.Result>
|
|
101
|
+
}
|
|
102
|
+
</S.Container>
|
|
9
103
|
);
|
|
10
104
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
|
|
5
|
+
`;
|
|
6
|
+
|
|
7
|
+
export const Header = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
.infos {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
padding: 14px 0;
|
|
14
|
+
|
|
15
|
+
h2 {
|
|
16
|
+
font-size: 20px
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
p {
|
|
20
|
+
font-size: 14px
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`
|
|
24
|
+
|
|
25
|
+
export const Inputs = styled.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
|
|
29
|
+
button {
|
|
30
|
+
background: #102693;
|
|
31
|
+
padding: 10px 20px;
|
|
32
|
+
color: white;
|
|
33
|
+
border-radius: 4px;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
export const Result = styled.div`
|
|
38
|
+
display: flex;
|
|
39
|
+
justify-content: left;
|
|
40
|
+
background: #DADCE3;
|
|
41
|
+
margin: 5px;
|
|
42
|
+
|
|
43
|
+
.text{
|
|
44
|
+
margin-left: 5px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
`
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M15.75 14.0312L11.875 10.1562C12.5625 9.09375 13 7.84375 13 6.5C13 2.9375 10.0625 0 6.5 0C2.90625 0 0 2.9375 0 6.5C0 10.0938 2.90625 13 6.5 13C7.8125 13 9.0625 12.5938 10.125 11.9062L14 15.7812C14.2812 16.0938 14.75 16.0938 15.0625 15.7812L15.75 15.0938C16.0625 14.7812 16.0625 14.3125 15.75 14.0312ZM2.5 6.5C2.5 4.3125 4.28125 2.5 6.5 2.5C8.6875 2.5 10.5 4.3125 10.5 6.5C10.5 8.71875 8.6875 10.5 6.5 10.5C4.28125 10.5 2.5 8.71875 2.5 6.5Z" fill="#5A5D68"/>
|
|
3
|
-
</svg>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|