Skip to content

Commit

Permalink
merge release v0.1.0 into main (#102)
Browse files Browse the repository at this point in the history
* feat: add begin, finish and change report

* feat/1349: block editor while speaking (#9)

* feat: block editor while speaking

* fix: VAD supports and function name changed

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* feat: handle trailing spaces and capitalization (#10)

* feat: add methods to get previous and next words

* feat: handle capitalization and more space cases

* Feat: PRT-1761 - Salvamento Automático do laudo no adapters (#11)

* feat: add _onContentChange to observe changes

* feat: saving content in adpater

* feat: change name to spanSavingReport

* fix: remove NodeJS.Timeout typing

* feat:1769 - Insert template in editor (#13)

* rebase

* rebase

* fixes to dev

* feat: header of converter optimized

* adjusts of request

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* Feat/prt 1774 - Iara comands copy and finalize (#15)

* rebase

* feat:1774 - Iara comands copy and finalize

* adjusts of request

* fix: finish report function

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* Feat/prt 1768 get editor content (#17)

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* feat: add change font family and size methods

* rebase

* feat-1792 - font change function

* feat-1792 - font change size and family

* fix pr

* fix pr

* fix var unused

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* Feat/prt 1773 - formatter commands (#20)

* rebase

* feat-1773: formmat text command

* feat:PRT-1773 - formatter commands

* fix pr conversation

* fix pr conversation

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* implement get content at editor (#23)

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* feat: get html content from editor correction (#24)

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* feat: add color in span

* Feature/prt 1775 - Editor formatter and calculate volume (#25)

* feat: fixes for estimate volume

* fix:volume estimate

* fix pr conversation

* fix pr conversation

* fix conflicts

* fix pr conversation

* fix pr for formatter editor

* feat-177: editor formatter and calculate volume

* feat: get html content from editor correction (#24)

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* fix: name of _inferenceFormatter

---------

Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>

* feat: add onDestroy (#26)

* feat: add onDestroy

* fix: change name method

* Feature/prt 1750 (#27)

* build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#5)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add new toolbar

* feat: add new configs toolbar

* fix: remove unusual component

* fix: remove unusual functions

* fix: remove unusual

* feat: add verify to see toolbar config

* fix: add document to selection

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: fix broken references to documentEditor

* feat: improve syncfusion adapter content management (#28)

* feat: improve content management and major refactorings

* fix: fix insertTemplate method

* fix: fix build errors

* feat: add verify to templates (#30)

* fix: add method onEditorDestroy (#29)

* fix: add method onEditorDestroy

* feat: update name method

* feat: get editor RTF content (#32)

* feat: call QA api for RTF conversion

* feat: replace the QA toRtf url with prod one

* Feature/prt 1772 1 (#31)

* feat: add shortcuts

* feat: add shortcuts manager

* feat: order by template first

* merge dev

* feat: add init method shortcutsManeger

* feat: improve modal

* fix: add correct type

* Bugfix/prt 1819 (#33)

* fix: resolve mouse position

* fix: inference when documento dont exists

* fix: remove listener when destroy editor

* fix: remove iara text when calling a template (#34)

* Feature/prt 1772 1 (#35)

* feat: add shortcuts

* feat: add shortcuts manager

* feat: order by template first

* merge dev

* feat: add init method shortcutsManeger

* feat: improve modal

* fix: add correct type

* feat: change type in update template in listView

* feat: update syncfusion pack

* Feature/prt 1772 1 (#38)

* feat: add shortcuts

* feat: add shortcuts manager

* feat: order by template first

* merge dev

* feat: add init method shortcutsManeger

* feat: improve modal

* fix: add correct type

* feat: change type in update template in listView

* feat: update syncfusion pack

* feat: sort order and add plural

* Feature/prt 1774 (#36)

* feat: add replaceCommand true

* feat: add callback to finishReport

* feat: remove enableLocalPaste (#37)

* Feature/prt 1772 1 (#40)

* feat: add shortcuts

* feat: add shortcuts manager

* feat: order by template first

* merge dev

* feat: add init method shortcutsManeger

* feat: improve modal

* fix: add correct type

* feat: change type in update template in listView

* feat: update syncfusion pack

* feat: sort order and add plural

* feat: get name of templates/phrases in metadata

* feat: verify inference is final (#39)

* feat: improve debounce logic to save (#41)

* Feature/prt 1761 1 (#43)

* feat: improve debounce logic to save

* feat: add rich and text to get id

* Feature/prt 1774 (#42)

* feat: add replaceCommand true

* feat: add callback to finishReport

* feat: add sdk method to copy

* feat: add a custom toolbar locale (#44)

* feat: add a custom toolbar locale

* feat: add locale package

* fix: improve name variable and add pack

* fix: fix syncfusion locale pkg version

* mudanças para lançar configs de fonte e tamanho do portal para o editor (#45)

* Feature/prt 1774 (#46)

* feat: add replaceCommand true

* feat: add callback to finishReport

* feat: add sdk method to copy

* feat: add recognition stop

* fix: fix styling commands not being correctly applied (#47)

* refactor: rename editorContainer references

* [WIP] feat: revert selection format after checking for boundaries

* fix: fix selection style resetting

* fix: remove unused import to SelectionCharacterFormat

* fix: get moveNextPosition from editor

* feat: verify is Template (#48)

* feat: verify is Template

* fix: remove log

* Feature/prt 1761 1 (#49)

* feat: improve debounce logic to save

* feat: add rich and text to get id

* fix: add id undefined when begin

* fix: remove log

* fix: remove close tag error (#51)

* feat: add logic to save when editor created (#52)

* Feature/prt 1774 (#50)

* feat: add replaceCommand true

* feat: add callback to finishReport

* feat: add sdk method to copy

* feat: add recognition stop

* feat: add await getPlain func

* feat: add await to copy content

* fix: split template richTranscript into prefix and template (#53)

* Feature/prt 1774 (#54)

* feat: add replaceCommand true

* feat: add callback to finishReport

* feat: add sdk method to copy

* feat: add recognition stop

* feat: add await getPlain func

* feat: add await to copy content

* feat: change onFinishedReport to onIaraCommand to know the command is use

* Feat/prt 1833 adapters (#55)

* melhorias aplicadas na tarefa PRT-1833

* Revert "melhorias aplicadas na tarefa PRT-1833"

This reverts commit fa414ae.

* mudanças para manter o cursor na posicao original no middle click

* correcao na funcao

* alteracoes

* alteração de final de linha para LF

* fix: handle case and special chars in iara texto regex

* feat: add logic to save when editor created (#57)

* Feat/prt 1830 (#58)

* feat: allow inserting template from other formats

* feat: allow fetching sfdt content with editor content

* feat: prevent saving race condition

---------

Co-authored-by: Daniel Souza <dsouza1995@gmail.com>

* fix: prevent resetting selection on scroll click while recording (#59)

* Feat/prt 1848 (#60)

* melhorias aplicadas na tarefa PRT-1833

* Revert "melhorias aplicadas na tarefa PRT-1833"

This reverts commit fa414ae.

* corrigindo letra minuscula apos o ponto

* Feat/prt 1844 (#63)

* feat: add ribbon component

* feat: add configs ribbon styles

* feat: remove toolbar element

* feat: add ribbon in toolbar content

* feat: update package

* Feat/prt 1864 adapter (#61)

* melhorias aplicadas na tarefa PRT-1833

* Revert "melhorias aplicadas na tarefa PRT-1833"

This reverts commit fa414ae.

* alterações conforme as sugestoes do Daniel, funcionou perfeitamente.

* fix: prevent content dirty race condition error (#62)

* debug: add save report logs

* fix: prevent content dirty race condition error

* refactor: remove debug logs on report save

* implementado uppercase no adapters (#65)

* adicionando config ao ribbon

* adaptaçoes para mudança dinamica de cor de fonte

* Feat/prt 1825 (#67)

* adicionando config ao ribbon

* adaptaçoes para mudança dinamica de cor de fonte

* fix: pass logic to method and adjust the height (#66)

* remoca do darkmode do services

* devolvendo a logica anterior

* Feat/prt 1864 2 (#69)

* trabalhando no espaço antes do ponto

* conversao do capitalize para versao anterior, aparentemente corrigindo o problema com o vad

* limpeza do codigo apos os testes

* retornando o codigo ao formato original apos limpeza

---------

Co-authored-by: Daniel Souza <dsouza1995@gmail.com>

* fix: fix import syntax error

* fix: set font color according to theme

* feat: add nbsp or zwnj (#71)

* feat: add space after

* synfusion setando fontes e tamanhos a partir do config do portal (#70)

* synfusion setando fontes e tamanhos a partir do config do portal

* fix: change line feed

---------

Co-authored-by: Daniel Souza <dsouza1995@gmail.com>

* Fix/prt 1872 (#72)

* feat: add nbsp or zwnj

* fix: add nbspOrZwnj to capitalize

* fix: fix @ shortcut for mac and phrase insertion

* fix: prevent selection being lost by listening to scroll mouseup (#74)

* fix: prevent selection being lost by listening to scroll mouseup

* fix: remove unused variables

* fix: improve selection logic for word after and before (#76)

* Feat/prd 1832 (#73)

* ajustando o toPDF e merge com a dev

* lançando o botao de export com o cuidado de trocar a cor da fonte no dark mode

* limpeza do codigo para entrega

* melhorias e correções - nome do documento.pdf e no modo light ocorria de a fonte cair para branco apos o export, sem o cuidado do isdarkmode

* ajuste para documento sem titulo e conflito vercel

* ajuste vercel

* alteração no nome padrao do PDF para data-hora-minuto

* fix: remove xml tag at start of html (#75)

* Feat/prt 1878 (#77)

* inserido o menu de espaçamento, falta manter o valor selecionado

* resolvido o problema de setar o valor do espaçamento no select

* removendo opcoes de spacing do bloco do switch

* atualizacao com a dev

* corrigindo conflitos

* inseridas alterações de CSS no caso de darkmode para alterar cursor e msg de salvando/salvo (#78)

* Fix/prt 1882 (#79)

* fix: improve code

* feat: report config style

* feat: add font style status (#80)

* feat: stop using undo on insertInference (#82)

* refactor: refactor export to PDF method

* fix: prevent adding unnecessary trailing spaces (#83)

* devolução do botao export to pdf (#84)

* devolução do botao export to pdf

* correção para o darkmode

* correção da correção

* Feat/prt 1886 (#81)

* adição de novos botoes

* finalizacao das implementacoes

* testes finais e limpeza de codigo

* aplicando solicitacoes do code review

* corrigindo erro vercel

---------

Co-authored-by: Daniel Souza <dsouza1995@gmail.com>

* fix: fix broken toolbar config call

* feat: add classic mode to ribbon (#86)

* tema escuro carregando sem flash (#85)

* tema escuro carregando sem flash

* correção vercel

* feat: add popup to insert number of columns (#87)

* feat: add translate and heitgh of menu ribbon (#88)

* fix: fix several inference insertion errors (#91)

* fix: don't format empty inferences

* fix: ignore spaces when capitalizing

* fix: trim spaces in the end of inference text

* fix: fix add traling spaces corner cases

* fix: set default font when loading template

* fix: don't add space after newline in text

* fix: handle punctiation leading spaces

* fix: fix table insertion with dark theme

* fix: throw error on content conversion error

* Atualizacao do CSS o Sync para ultima versao (#93)

* fix: fix inference insertion with paragraphs (#94)

* fix: handle malformed htmls with unclosed br tag

* feat: add replace paragraph by index method

* fix: replace all open br tags for syncfusion

* fix: use regex for br tags replace

* feat: hack tinymce pasting by disguising as gdocs (#97)

* fix: fix examples and default configuration values

* fix: fix adapters import from html

* fix: fix adapters import from demo html

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Itallo <dornelaszxd@gmail.com>
Co-authored-by: André Canuto <andrecanutoc@gmail.com>
Co-authored-by: André Canuto <andrecanuto@MacBook-Pro-de-Andre.local>
Co-authored-by: Itallo Dornelas <72089253+ItalloDornelas@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Braun <151561345+BraunAugusto@users.noreply.github.com>
Co-authored-by: Augusto Braun <augusto@iarahealth.com>
  • Loading branch information
8 people authored Mar 22, 2024
1 parent d3fd41f commit 1e6f719
Show file tree
Hide file tree
Showing 19 changed files with 5,988 additions and 331 deletions.
39 changes: 23 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
rel="nofollow"
/>

<link
href="https://cdn.syncfusion.com/ej2/24.1.41/ej2-ribbon/styles/material.css"
rel="stylesheet"
type="text/css"
rel="nofollow"
/>

<!-- EJ2 Document Editor dependent scripts -->
<script
src="https://cdn.syncfusion.com/ej2/22.1.34/ej2-base/dist/global/ej2-base.min.js"
Expand Down Expand Up @@ -184,7 +191,7 @@ <h3>Dados de acesso:</h3>
<button id="btnStop">Parar</button>

<script type="module">
import { IaraSyncfusionAdapter } from "/dist/index.js";
import { IaraSyncfusionAdapter } from "/dist/adapters.mjs";

window.onload = () => {
window.ej.documenteditor.DocumentEditorContainer.Inject(
Expand All @@ -199,31 +206,31 @@ <h3>Dados de acesso:</h3>
});
editorContainer.appendTo("#editor-container");

// Elementos na página usados para gravar audio.
var botaoStart = document.getElementById("btnStart");
var botaoStop = document.getElementById("btnStop");
var elementoConsole = document.getElementById("console");
var elementoSaidaStatus = document.getElementById("saidaStatus");
// Elementos na página usados para graconst audio.
const botaoStart = document.getElementById("btnStart");
const botaoStop = document.getElementById("btnStop");
const elementoConsole = document.getElementById("console");
const elementoSaidaStatus = document.getElementById("saidaStatus");

// Informações de conexão aos serviços da Iara
var myUserId = document.getElementById("userId").value;
var myApiToken = document.getElementById("apiToken").value;
const myUserId = document.getElementById("userId").value;
const myApiToken = document.getElementById("apiToken").value;

// Instancia o reconhecedor da Iara e informa que resultados intermediários
// de inferência devem ser emitidos.
var recognition = new IaraSpeechRecognition();
const recognition = new IaraSpeechRecognition();
recognition.interimResults = true;

const syncfusionAdapter = new IaraSyncfusionAdapter(
recognition,
editorContainer.documentEditor
editorContainer,
recognition
);

// Botão de Stop só é ativado quando o usuário clica no botão "Iniciar".
botaoStop.disabled = true;

// Define o botão que salva as credenciais e sua função
var botaoSalvar = document.getElementById("btnSalvar");
const botaoSalvar = document.getElementById("btnSalvar");
botaoSalvar.addEventListener("click", function () {
elementoSaidaStatus.innerHTML =
"Inicializando com base nas credenciais informadas...";
Expand All @@ -232,8 +239,8 @@ <h3>Dados de acesso:</h3>

function salvaCredenciaisDepoisInicializa() {
// Informações de conexão aos serviços da Iara
var myUserId = document.getElementById("userId").value;
var myApiToken = document.getElementById("apiToken").value;
const myUserId = document.getElementById("userId").value;
const myApiToken = document.getElementById("apiToken").value;

// Inicializa o SDK, i.e. autenticação, checa o ALS, baixa modelo de voz, etc.
recognition
Expand All @@ -256,8 +263,8 @@ <h3>Dados de acesso:</h3>
// resultado contém o texto que a Iara reconheceu baseados no audio de entrada.
// Além disso, a propriedade "isFinal" do objeto "detail" informa se essa
// inferência é intermediária (isFinal=false) ou final (isFinal=true).
var text = event.detail.transcript.toLowerCase();
var intermediate = event.detail.isFinal == false;
const text = event.detail.transcript.toLowerCase();
const intermediate = event.detail.isFinal == false;

elementoSaidaStatus.innerText = JSON.stringify(
event.detail,
Expand Down
Loading

0 comments on commit 1e6f719

Please sign in to comment.