@orbe-agro/client-core 5.6.343 → 5.6.345
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/@ecme/assets/styles/app.css +52 -26
- package/dist/@ecme/assets/styles/tailwind/index.css +52 -26
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/components/view/ChatBox/ChatBox.js +3 -1
- package/dist/@ecme/components/view/ChatBox/ChatBox.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +19 -16
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/index.js +3 -1
- package/dist/@ecme/services/AiService.js +31 -2
- package/dist/@ecme/services/AiService.js.map +1 -1
- package/dist/@ecme/services/index.js +3 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +55 -43
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/FormatoCard.js +81 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/FormatoCard.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ImagensDaMensagem.js +35 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ImagensDaMensagem.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.js +142 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.js +47 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.js +64 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ToolCallChip.js +9 -4
- package/dist/@ecme/views/concepts/ai/Chat/components/ToolCallChip.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/toolPresentation.js +18 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/toolPresentation.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useChatSend.js +96 -51
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useChatSend.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useImagemDoStorage.js +31 -0
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useImagemDoStorage.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useModelos.js +31 -0
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useModelos.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/imagens.js +57 -0
- package/dist/@ecme/views/concepts/ai/Chat/imagens.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/store/modeloStore.js +15 -0
- package/dist/@ecme/views/concepts/ai/Chat/store/modeloStore.js.map +1 -0
- package/dist/@types/@ecme/components/view/ChatBox/ChatBox.d.ts.map +1 -1
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts +3 -0
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts.map +1 -1
- package/dist/@types/@ecme/services/AiService.d.ts +25 -5
- package/dist/@types/@ecme/services/AiService.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ChatView.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/FormatoCard.d.ts +16 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/FormatoCard.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ImagensDaMensagem.d.ts +13 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ImagensDaMensagem.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.d.ts +16 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.d.ts +14 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.d.ts +15 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ToolCallChip.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/toolPresentation.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useChatSend.d.ts +3 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useChatSend.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useImagemDoStorage.d.ts +16 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useImagemDoStorage.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useModelos.d.ts +26 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useModelos.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/imagens.d.ts +27 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/imagens.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/store/modeloStore.d.ts +27 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/store/modeloStore.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/types.d.ts +148 -24
- package/dist/@types/@ecme/views/concepts/ai/Chat/types.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/transportadora/contratoFrete.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/transportadora/contratoFrete.d.ts.map +1 -1
- package/dist/@types/base/services/modules/transportadora/ContratoFrete/ContratoFreteService.d.ts +2 -0
- package/dist/@types/base/services/modules/transportadora/ContratoFrete/ContratoFreteService.d.ts.map +1 -1
- package/dist/base/assets/styles/init.css +59 -30
- package/dist/base/configs/endpoints.config/transportadora/contratoFrete.js +3 -1
- package/dist/base/configs/endpoints.config/transportadora/contratoFrete.js.map +1 -1
- package/dist/base/index.js +3 -1
- package/dist/base/services/index.js +3 -1
- package/dist/base/services/modules/index.js +3 -1
- package/dist/base/services/modules/transportadora/ContratoFrete/ContratoFreteService.js +14 -0
- package/dist/base/services/modules/transportadora/ContratoFrete/ContratoFreteService.js.map +1 -1
- package/dist/base/services/modules/transportadora/index.js +3 -1
- package/lib/@ecme/components/view/ChatBox/ChatBox.tsx +2 -0
- package/lib/@ecme/components/view/ChatBox/components/ChatInput.tsx +23 -16
- package/lib/@ecme/services/AiService.ts +57 -5
- package/lib/@ecme/views/concepts/ai/Chat/components/ChatView.tsx +59 -40
- package/lib/@ecme/views/concepts/ai/Chat/components/FormatoCard.tsx +123 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/ImagensDaMensagem.tsx +54 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.tsx +200 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.tsx +65 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.tsx +77 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/ToolCallChip.tsx +18 -9
- package/lib/@ecme/views/concepts/ai/Chat/components/toolPresentation.ts +20 -0
- package/lib/@ecme/views/concepts/ai/Chat/hooks/useChatSend.ts +193 -78
- package/lib/@ecme/views/concepts/ai/Chat/hooks/useImagemDoStorage.ts +53 -0
- package/lib/@ecme/views/concepts/ai/Chat/hooks/useModelos.ts +63 -0
- package/lib/@ecme/views/concepts/ai/Chat/imagens.ts +86 -0
- package/lib/@ecme/views/concepts/ai/Chat/store/modeloStore.ts +25 -0
- package/lib/@ecme/views/concepts/ai/Chat/types.ts +157 -24
- package/lib/base/configs/endpoints.config/transportadora/contratoFrete.ts +2 -0
- package/lib/base/services/modules/transportadora/ContratoFrete/ContratoFreteService.ts +14 -0
- package/package.json +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.js +0 -85
- package/dist/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.js.map +0 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.d.ts +0 -14
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.d.ts.map +0 -1
- package/lib/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.tsx +0 -115
|
@@ -5588,6 +5588,9 @@ video {
|
|
|
5588
5588
|
.h-\[60px\]{
|
|
5589
5589
|
height: 60px;
|
|
5590
5590
|
}
|
|
5591
|
+
.h-\[70vh\]{
|
|
5592
|
+
height: 70vh;
|
|
5593
|
+
}
|
|
5591
5594
|
.h-\[calc\(100\%-100px\)\]{
|
|
5592
5595
|
height: calc(100% - 100px);
|
|
5593
5596
|
}
|
|
@@ -5654,9 +5657,15 @@ video {
|
|
|
5654
5657
|
.max-h-\[600px\]{
|
|
5655
5658
|
max-height: 600px;
|
|
5656
5659
|
}
|
|
5660
|
+
.max-h-\[60vh\]{
|
|
5661
|
+
max-height: 60vh;
|
|
5662
|
+
}
|
|
5657
5663
|
.max-h-\[700px\]{
|
|
5658
5664
|
max-height: 700px;
|
|
5659
5665
|
}
|
|
5666
|
+
.max-h-\[760px\]{
|
|
5667
|
+
max-height: 760px;
|
|
5668
|
+
}
|
|
5660
5669
|
.max-h-full{
|
|
5661
5670
|
max-height: 100%;
|
|
5662
5671
|
}
|
|
@@ -5699,6 +5708,9 @@ video {
|
|
|
5699
5708
|
.min-h-\[320px\]{
|
|
5700
5709
|
min-height: 320px;
|
|
5701
5710
|
}
|
|
5711
|
+
.min-h-\[360px\]{
|
|
5712
|
+
min-height: 360px;
|
|
5713
|
+
}
|
|
5702
5714
|
.min-h-\[46px\]{
|
|
5703
5715
|
min-height: 46px;
|
|
5704
5716
|
}
|
|
@@ -5751,6 +5763,9 @@ video {
|
|
|
5751
5763
|
.w-4{
|
|
5752
5764
|
width: 1rem;
|
|
5753
5765
|
}
|
|
5766
|
+
.w-40{
|
|
5767
|
+
width: 10rem;
|
|
5768
|
+
}
|
|
5754
5769
|
.w-5{
|
|
5755
5770
|
width: 1.25rem;
|
|
5756
5771
|
}
|
|
@@ -5912,6 +5927,9 @@ video {
|
|
|
5912
5927
|
.min-w-\[330px\]{
|
|
5913
5928
|
min-width: 330px;
|
|
5914
5929
|
}
|
|
5930
|
+
.min-w-\[6rem\]{
|
|
5931
|
+
min-width: 6rem;
|
|
5932
|
+
}
|
|
5915
5933
|
.min-w-full{
|
|
5916
5934
|
min-width: 100%;
|
|
5917
5935
|
}
|
|
@@ -5933,6 +5951,9 @@ video {
|
|
|
5933
5951
|
.max-w-\[200px\]{
|
|
5934
5952
|
max-width: 200px;
|
|
5935
5953
|
}
|
|
5954
|
+
.max-w-\[240px\]{
|
|
5955
|
+
max-width: 240px;
|
|
5956
|
+
}
|
|
5936
5957
|
.max-w-\[250px\]{
|
|
5937
5958
|
max-width: 250px;
|
|
5938
5959
|
}
|
|
@@ -5978,6 +5999,9 @@ video {
|
|
|
5978
5999
|
.max-w-\[900px\]{
|
|
5979
6000
|
max-width: 900px;
|
|
5980
6001
|
}
|
|
6002
|
+
.max-w-\[9rem\]{
|
|
6003
|
+
max-width: 9rem;
|
|
6004
|
+
}
|
|
5981
6005
|
.max-w-full{
|
|
5982
6006
|
max-width: 100%;
|
|
5983
6007
|
}
|
|
@@ -6423,10 +6447,6 @@ video {
|
|
|
6423
6447
|
.border-none{
|
|
6424
6448
|
border-style: none;
|
|
6425
6449
|
}
|
|
6426
|
-
.border-emerald-300{
|
|
6427
|
-
--tw-border-opacity: 1;
|
|
6428
|
-
border-color: rgb(110 231 183 / var(--tw-border-opacity, 1));
|
|
6429
|
-
}
|
|
6430
6450
|
.border-error{
|
|
6431
6451
|
border-color: var(--error);
|
|
6432
6452
|
}
|
|
@@ -6574,10 +6594,6 @@ video {
|
|
|
6574
6594
|
--tw-bg-opacity: 1;
|
|
6575
6595
|
background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));
|
|
6576
6596
|
}
|
|
6577
|
-
.bg-emerald-50{
|
|
6578
|
-
--tw-bg-opacity: 1;
|
|
6579
|
-
background-color: rgb(236 253 245 / var(--tw-bg-opacity, 1));
|
|
6580
|
-
}
|
|
6581
6597
|
.bg-emerald-500{
|
|
6582
6598
|
--tw-bg-opacity: 1;
|
|
6583
6599
|
background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));
|
|
@@ -6812,6 +6828,9 @@ video {
|
|
|
6812
6828
|
--tw-bg-opacity: 1;
|
|
6813
6829
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
6814
6830
|
}
|
|
6831
|
+
.bg-white\/10{
|
|
6832
|
+
background-color: rgb(255 255 255 / 0.1);
|
|
6833
|
+
}
|
|
6815
6834
|
.bg-yellow-200{
|
|
6816
6835
|
--tw-bg-opacity: 1;
|
|
6817
6836
|
background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));
|
|
@@ -6936,6 +6955,10 @@ video {
|
|
|
6936
6955
|
.stroke-transparent{
|
|
6937
6956
|
stroke: transparent;
|
|
6938
6957
|
}
|
|
6958
|
+
.object-cover{
|
|
6959
|
+
-o-object-fit: cover;
|
|
6960
|
+
object-fit: cover;
|
|
6961
|
+
}
|
|
6939
6962
|
.\!p-2\.5{
|
|
6940
6963
|
padding: 0.625rem !important;
|
|
6941
6964
|
}
|
|
@@ -7275,10 +7298,6 @@ video {
|
|
|
7275
7298
|
--tw-text-opacity: 1;
|
|
7276
7299
|
color: rgb(5 150 105 / var(--tw-text-opacity, 1));
|
|
7277
7300
|
}
|
|
7278
|
-
.text-emerald-700{
|
|
7279
|
-
--tw-text-opacity: 1;
|
|
7280
|
-
color: rgb(4 120 87 / var(--tw-text-opacity, 1));
|
|
7281
|
-
}
|
|
7282
7301
|
.text-error{
|
|
7283
7302
|
color: var(--error);
|
|
7284
7303
|
}
|
|
@@ -7701,10 +7720,6 @@ video {
|
|
|
7701
7720
|
--tw-bg-opacity: 1;
|
|
7702
7721
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
7703
7722
|
}
|
|
7704
|
-
.hover\:bg-emerald-100:hover{
|
|
7705
|
-
--tw-bg-opacity: 1;
|
|
7706
|
-
background-color: rgb(209 250 229 / var(--tw-bg-opacity, 1));
|
|
7707
|
-
}
|
|
7708
7723
|
.hover\:bg-gray-100:hover{
|
|
7709
7724
|
background-color: var(--gray-100);
|
|
7710
7725
|
}
|
|
@@ -7850,6 +7865,24 @@ video {
|
|
|
7850
7865
|
.active\:bg-gray-100:active{
|
|
7851
7866
|
background-color: var(--gray-100);
|
|
7852
7867
|
}
|
|
7868
|
+
.enabled\:hover\:border-primary:hover:enabled{
|
|
7869
|
+
border-color: var(--primary);
|
|
7870
|
+
}
|
|
7871
|
+
.enabled\:hover\:bg-gray-50:hover:enabled{
|
|
7872
|
+
background-color: var(--gray-50);
|
|
7873
|
+
}
|
|
7874
|
+
.enabled\:hover\:text-primary:hover:enabled{
|
|
7875
|
+
color: var(--primary);
|
|
7876
|
+
}
|
|
7877
|
+
.disabled\:cursor-not-allowed:disabled{
|
|
7878
|
+
cursor: not-allowed;
|
|
7879
|
+
}
|
|
7880
|
+
.disabled\:opacity-40:disabled{
|
|
7881
|
+
opacity: 0.4;
|
|
7882
|
+
}
|
|
7883
|
+
.disabled\:opacity-60:disabled{
|
|
7884
|
+
opacity: 0.6;
|
|
7885
|
+
}
|
|
7853
7886
|
.group:hover .group-hover\:block{
|
|
7854
7887
|
display: block;
|
|
7855
7888
|
}
|
|
@@ -7977,10 +8010,6 @@ video {
|
|
|
7977
8010
|
.dark\:border-solid:is(.dark *){
|
|
7978
8011
|
border-style: solid;
|
|
7979
8012
|
}
|
|
7980
|
-
.dark\:border-emerald-700:is(.dark *){
|
|
7981
|
-
--tw-border-opacity: 1;
|
|
7982
|
-
border-color: rgb(4 120 87 / var(--tw-border-opacity, 1));
|
|
7983
|
-
}
|
|
7984
8013
|
.dark\:border-gray-500:is(.dark *){
|
|
7985
8014
|
border-color: var(--gray-500);
|
|
7986
8015
|
}
|
|
@@ -8050,9 +8079,6 @@ video {
|
|
|
8050
8079
|
.dark\:bg-emerald-500\/20:is(.dark *){
|
|
8051
8080
|
background-color: rgb(16 185 129 / 0.2);
|
|
8052
8081
|
}
|
|
8053
|
-
.dark\:bg-emerald-900\/30:is(.dark *){
|
|
8054
|
-
background-color: rgb(6 78 59 / 0.3);
|
|
8055
|
-
}
|
|
8056
8082
|
.dark\:bg-fuchsia-200:is(.dark *){
|
|
8057
8083
|
--tw-bg-opacity: 1;
|
|
8058
8084
|
background-color: rgb(245 208 254 / var(--tw-bg-opacity, 1));
|
|
@@ -8331,9 +8357,6 @@ video {
|
|
|
8331
8357
|
--tw-bg-opacity: 1;
|
|
8332
8358
|
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
8333
8359
|
}
|
|
8334
|
-
.dark\:hover\:bg-emerald-900\/50:hover:is(.dark *){
|
|
8335
|
-
background-color: rgb(6 78 59 / 0.5);
|
|
8336
|
-
}
|
|
8337
8360
|
.dark\:hover\:bg-gray-200:hover:is(.dark *){
|
|
8338
8361
|
background-color: var(--gray-200);
|
|
8339
8362
|
}
|
|
@@ -8392,6 +8415,9 @@ video {
|
|
|
8392
8415
|
.dark\:active\:bg-opacity-40:active:is(.dark *){
|
|
8393
8416
|
--tw-bg-opacity: 0.4;
|
|
8394
8417
|
}
|
|
8418
|
+
.dark\:enabled\:hover\:bg-gray-700:hover:enabled:is(.dark *){
|
|
8419
|
+
background-color: var(--gray-700);
|
|
8420
|
+
}
|
|
8395
8421
|
.group:hover .dark\:group-hover\:bg-gray-800:is(.dark *){
|
|
8396
8422
|
background-color: var(--gray-800);
|
|
8397
8423
|
}
|
|
@@ -1665,6 +1665,9 @@ video {
|
|
|
1665
1665
|
.h-\[60px\] {
|
|
1666
1666
|
height: 60px;
|
|
1667
1667
|
}
|
|
1668
|
+
.h-\[70vh\] {
|
|
1669
|
+
height: 70vh;
|
|
1670
|
+
}
|
|
1668
1671
|
.h-\[calc\(100\%-100px\)\] {
|
|
1669
1672
|
height: calc(100% - 100px);
|
|
1670
1673
|
}
|
|
@@ -1731,9 +1734,15 @@ video {
|
|
|
1731
1734
|
.max-h-\[600px\] {
|
|
1732
1735
|
max-height: 600px;
|
|
1733
1736
|
}
|
|
1737
|
+
.max-h-\[60vh\] {
|
|
1738
|
+
max-height: 60vh;
|
|
1739
|
+
}
|
|
1734
1740
|
.max-h-\[700px\] {
|
|
1735
1741
|
max-height: 700px;
|
|
1736
1742
|
}
|
|
1743
|
+
.max-h-\[760px\] {
|
|
1744
|
+
max-height: 760px;
|
|
1745
|
+
}
|
|
1737
1746
|
.max-h-full {
|
|
1738
1747
|
max-height: 100%;
|
|
1739
1748
|
}
|
|
@@ -1776,6 +1785,9 @@ video {
|
|
|
1776
1785
|
.min-h-\[320px\] {
|
|
1777
1786
|
min-height: 320px;
|
|
1778
1787
|
}
|
|
1788
|
+
.min-h-\[360px\] {
|
|
1789
|
+
min-height: 360px;
|
|
1790
|
+
}
|
|
1779
1791
|
.min-h-\[46px\] {
|
|
1780
1792
|
min-height: 46px;
|
|
1781
1793
|
}
|
|
@@ -1828,6 +1840,9 @@ video {
|
|
|
1828
1840
|
.w-4 {
|
|
1829
1841
|
width: 1rem;
|
|
1830
1842
|
}
|
|
1843
|
+
.w-40 {
|
|
1844
|
+
width: 10rem;
|
|
1845
|
+
}
|
|
1831
1846
|
.w-5 {
|
|
1832
1847
|
width: 1.25rem;
|
|
1833
1848
|
}
|
|
@@ -1989,6 +2004,9 @@ video {
|
|
|
1989
2004
|
.min-w-\[330px\] {
|
|
1990
2005
|
min-width: 330px;
|
|
1991
2006
|
}
|
|
2007
|
+
.min-w-\[6rem\] {
|
|
2008
|
+
min-width: 6rem;
|
|
2009
|
+
}
|
|
1992
2010
|
.min-w-full {
|
|
1993
2011
|
min-width: 100%;
|
|
1994
2012
|
}
|
|
@@ -2010,6 +2028,9 @@ video {
|
|
|
2010
2028
|
.max-w-\[200px\] {
|
|
2011
2029
|
max-width: 200px;
|
|
2012
2030
|
}
|
|
2031
|
+
.max-w-\[240px\] {
|
|
2032
|
+
max-width: 240px;
|
|
2033
|
+
}
|
|
2013
2034
|
.max-w-\[250px\] {
|
|
2014
2035
|
max-width: 250px;
|
|
2015
2036
|
}
|
|
@@ -2055,6 +2076,9 @@ video {
|
|
|
2055
2076
|
.max-w-\[900px\] {
|
|
2056
2077
|
max-width: 900px;
|
|
2057
2078
|
}
|
|
2079
|
+
.max-w-\[9rem\] {
|
|
2080
|
+
max-width: 9rem;
|
|
2081
|
+
}
|
|
2058
2082
|
.max-w-full {
|
|
2059
2083
|
max-width: 100%;
|
|
2060
2084
|
}
|
|
@@ -2502,10 +2526,6 @@ video {
|
|
|
2502
2526
|
.border-none {
|
|
2503
2527
|
border-style: none;
|
|
2504
2528
|
}
|
|
2505
|
-
.border-emerald-300 {
|
|
2506
|
-
--tw-border-opacity: 1;
|
|
2507
|
-
border-color: rgb(110 231 183 / var(--tw-border-opacity, 1));
|
|
2508
|
-
}
|
|
2509
2529
|
.border-error {
|
|
2510
2530
|
border-color: var(--error);
|
|
2511
2531
|
}
|
|
@@ -2653,10 +2673,6 @@ video {
|
|
|
2653
2673
|
--tw-bg-opacity: 1;
|
|
2654
2674
|
background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));
|
|
2655
2675
|
}
|
|
2656
|
-
.bg-emerald-50 {
|
|
2657
|
-
--tw-bg-opacity: 1;
|
|
2658
|
-
background-color: rgb(236 253 245 / var(--tw-bg-opacity, 1));
|
|
2659
|
-
}
|
|
2660
2676
|
.bg-emerald-500 {
|
|
2661
2677
|
--tw-bg-opacity: 1;
|
|
2662
2678
|
background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));
|
|
@@ -2891,6 +2907,9 @@ video {
|
|
|
2891
2907
|
--tw-bg-opacity: 1;
|
|
2892
2908
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
2893
2909
|
}
|
|
2910
|
+
.bg-white\/10 {
|
|
2911
|
+
background-color: rgb(255 255 255 / 0.1);
|
|
2912
|
+
}
|
|
2894
2913
|
.bg-yellow-200 {
|
|
2895
2914
|
--tw-bg-opacity: 1;
|
|
2896
2915
|
background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));
|
|
@@ -3015,6 +3034,10 @@ video {
|
|
|
3015
3034
|
.stroke-transparent {
|
|
3016
3035
|
stroke: transparent;
|
|
3017
3036
|
}
|
|
3037
|
+
.object-cover {
|
|
3038
|
+
-o-object-fit: cover;
|
|
3039
|
+
object-fit: cover;
|
|
3040
|
+
}
|
|
3018
3041
|
.\!p-2\.5 {
|
|
3019
3042
|
padding: 0.625rem !important;
|
|
3020
3043
|
}
|
|
@@ -3354,10 +3377,6 @@ video {
|
|
|
3354
3377
|
--tw-text-opacity: 1;
|
|
3355
3378
|
color: rgb(5 150 105 / var(--tw-text-opacity, 1));
|
|
3356
3379
|
}
|
|
3357
|
-
.text-emerald-700 {
|
|
3358
|
-
--tw-text-opacity: 1;
|
|
3359
|
-
color: rgb(4 120 87 / var(--tw-text-opacity, 1));
|
|
3360
|
-
}
|
|
3361
3380
|
.text-error {
|
|
3362
3381
|
color: var(--error);
|
|
3363
3382
|
}
|
|
@@ -3780,10 +3799,6 @@ video {
|
|
|
3780
3799
|
--tw-bg-opacity: 1;
|
|
3781
3800
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
3782
3801
|
}
|
|
3783
|
-
.hover\:bg-emerald-100:hover {
|
|
3784
|
-
--tw-bg-opacity: 1;
|
|
3785
|
-
background-color: rgb(209 250 229 / var(--tw-bg-opacity, 1));
|
|
3786
|
-
}
|
|
3787
3802
|
.hover\:bg-gray-100:hover {
|
|
3788
3803
|
background-color: var(--gray-100);
|
|
3789
3804
|
}
|
|
@@ -3929,6 +3944,24 @@ video {
|
|
|
3929
3944
|
.active\:bg-gray-100:active {
|
|
3930
3945
|
background-color: var(--gray-100);
|
|
3931
3946
|
}
|
|
3947
|
+
.enabled\:hover\:border-primary:hover:enabled {
|
|
3948
|
+
border-color: var(--primary);
|
|
3949
|
+
}
|
|
3950
|
+
.enabled\:hover\:bg-gray-50:hover:enabled {
|
|
3951
|
+
background-color: var(--gray-50);
|
|
3952
|
+
}
|
|
3953
|
+
.enabled\:hover\:text-primary:hover:enabled {
|
|
3954
|
+
color: var(--primary);
|
|
3955
|
+
}
|
|
3956
|
+
.disabled\:cursor-not-allowed:disabled {
|
|
3957
|
+
cursor: not-allowed;
|
|
3958
|
+
}
|
|
3959
|
+
.disabled\:opacity-40:disabled {
|
|
3960
|
+
opacity: 0.4;
|
|
3961
|
+
}
|
|
3962
|
+
.disabled\:opacity-60:disabled {
|
|
3963
|
+
opacity: 0.6;
|
|
3964
|
+
}
|
|
3932
3965
|
.group:hover .group-hover\:block {
|
|
3933
3966
|
display: block;
|
|
3934
3967
|
}
|
|
@@ -4074,10 +4107,6 @@ video {
|
|
|
4074
4107
|
.dark\:border-solid:is(.dark *) {
|
|
4075
4108
|
border-style: solid;
|
|
4076
4109
|
}
|
|
4077
|
-
.dark\:border-emerald-700:is(.dark *) {
|
|
4078
|
-
--tw-border-opacity: 1;
|
|
4079
|
-
border-color: rgb(4 120 87 / var(--tw-border-opacity, 1));
|
|
4080
|
-
}
|
|
4081
4110
|
.dark\:border-gray-500:is(.dark *) {
|
|
4082
4111
|
border-color: var(--gray-500);
|
|
4083
4112
|
}
|
|
@@ -4147,9 +4176,6 @@ video {
|
|
|
4147
4176
|
.dark\:bg-emerald-500\/20:is(.dark *) {
|
|
4148
4177
|
background-color: rgb(16 185 129 / 0.2);
|
|
4149
4178
|
}
|
|
4150
|
-
.dark\:bg-emerald-900\/30:is(.dark *) {
|
|
4151
|
-
background-color: rgb(6 78 59 / 0.3);
|
|
4152
|
-
}
|
|
4153
4179
|
.dark\:bg-fuchsia-200:is(.dark *) {
|
|
4154
4180
|
--tw-bg-opacity: 1;
|
|
4155
4181
|
background-color: rgb(245 208 254 / var(--tw-bg-opacity, 1));
|
|
@@ -4428,9 +4454,6 @@ video {
|
|
|
4428
4454
|
--tw-bg-opacity: 1;
|
|
4429
4455
|
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
4430
4456
|
}
|
|
4431
|
-
.dark\:hover\:bg-emerald-900\/50:hover:is(.dark *) {
|
|
4432
|
-
background-color: rgb(6 78 59 / 0.5);
|
|
4433
|
-
}
|
|
4434
4457
|
.dark\:hover\:bg-gray-200:hover:is(.dark *) {
|
|
4435
4458
|
background-color: var(--gray-200);
|
|
4436
4459
|
}
|
|
@@ -4489,6 +4512,9 @@ video {
|
|
|
4489
4512
|
.dark\:active\:bg-opacity-40:active:is(.dark *) {
|
|
4490
4513
|
--tw-bg-opacity: 0.4;
|
|
4491
4514
|
}
|
|
4515
|
+
.dark\:enabled\:hover\:bg-gray-700:hover:enabled:is(.dark *) {
|
|
4516
|
+
background-color: var(--gray-700);
|
|
4517
|
+
}
|
|
4492
4518
|
.group:hover .dark\:group-hover\:bg-gray-800:is(.dark *) {
|
|
4493
4519
|
background-color: var(--gray-800);
|
|
4494
4520
|
}
|
|
@@ -3,7 +3,7 @@ import Container from "../shared/Container.js";
|
|
|
3
3
|
import classNames from "../../utils/classNames.js";
|
|
4
4
|
import { APP_NAME } from "../../constants/app.constant.js";
|
|
5
5
|
import { PAGE_CONTAINER_GUTTER_X } from "../../constants/theme.constant.js";
|
|
6
|
-
const version = true ? "5.6.
|
|
6
|
+
const version = true ? "5.6.345" : "0.0.0";
|
|
7
7
|
const FooterContent = () => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-auto items-center justify-between", children: [
|
|
9
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -12,6 +12,7 @@ const ChatBox = forwardRef((props, ref) => {
|
|
|
12
12
|
placeholder,
|
|
13
13
|
onInputChange,
|
|
14
14
|
inputActions,
|
|
15
|
+
uploadProps,
|
|
15
16
|
showAvatar,
|
|
16
17
|
avatarGap,
|
|
17
18
|
customRenderer,
|
|
@@ -35,7 +36,8 @@ const ChatBox = forwardRef((props, ref) => {
|
|
|
35
36
|
{
|
|
36
37
|
placeholder,
|
|
37
38
|
onInputChange,
|
|
38
|
-
inputActions
|
|
39
|
+
inputActions,
|
|
40
|
+
uploadProps
|
|
39
41
|
}
|
|
40
42
|
),
|
|
41
43
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBox.js","sources":["../../../../../lib/@ecme/components/view/ChatBox/ChatBox.tsx"],"sourcesContent":["import ChatContainer from './components/ChatContainer'\nimport MessageList from './components/MessageList'\nimport ChatInput from './components/ChatInput'\nimport type { MessageListProps } from './components/MessageList'\nimport type { ChatContainerProps } from './components/ChatContainer'\nimport type { ChatInputProps } from './components/ChatInput'\nimport type { ReactNode } from 'react'\nimport { forwardRef } from 'react'\nimport type { ScrollBarRef } from '@/components/ui/ScrollBar'\n\nexport type MessageList = MessageListProps['list']\n\nexport type ChatBoxProps = {\n messageList: MessageList\n header?: ChatContainerProps['header']\n showMessageList?: boolean\n children?: ReactNode\n containerClass?: string\n} & Omit<MessageListProps, 'list'> &\n ChatInputProps\n\nconst ChatBox = forwardRef<ScrollBarRef, ChatBoxProps>((props, ref) => {\n const {\n messageList,\n showMessageList = true,\n children,\n header,\n placeholder,\n onInputChange,\n inputActions,\n showAvatar,\n avatarGap,\n customRenderer,\n customAction,\n bubbleClass,\n myBubbleClass,\n botBubbleClass,\n errorBubbleClass,\n renderTyping,\n typing,\n messageListClass,\n containerClass,\n } = props\n\n return (\n <ChatContainer\n className={containerClass}\n header={header}\n input={\n <ChatInput\n placeholder={placeholder}\n onInputChange={onInputChange}\n inputActions={inputActions}\n />\n }\n >\n {showMessageList && (\n <MessageList\n ref={ref}\n list={messageList}\n showAvatar={showAvatar}\n avatarGap={avatarGap}\n customRenderer={customRenderer}\n customAction={customAction}\n typing={typing}\n messageListClass={messageListClass}\n bubbleClass={bubbleClass}\n myBubbleClass={myBubbleClass}\n botBubbleClass={botBubbleClass}\n errorBubbleClass={errorBubbleClass}\n renderTyping={renderTyping}\n /> )}\n {children}\n </ChatContainer>\n )\n})\n\nChatBox.displayName = 'ChatBox'\n\nexport default ChatBox\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,UAAU,WAAuC,CAAC,OAAO,QAAQ;AACnE,QAAM;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACA;AAEJ,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,MACX;AAAA,MACA,OACI;AAAA,QAAC;AAAA,QAAA;AAAA,UACG;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MAAA;AAAA,MAIP,UAAA;AAAA,QAAA,mBACG;AAAA,UAAC;AAAA,UAAA;AAAA,YACG;AAAA,YACA,MAAM;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGb,CAAC;AAED,QAAQ,cAAc;"}
|
|
1
|
+
{"version":3,"file":"ChatBox.js","sources":["../../../../../lib/@ecme/components/view/ChatBox/ChatBox.tsx"],"sourcesContent":["import ChatContainer from './components/ChatContainer'\nimport MessageList from './components/MessageList'\nimport ChatInput from './components/ChatInput'\nimport type { MessageListProps } from './components/MessageList'\nimport type { ChatContainerProps } from './components/ChatContainer'\nimport type { ChatInputProps } from './components/ChatInput'\nimport type { ReactNode } from 'react'\nimport { forwardRef } from 'react'\nimport type { ScrollBarRef } from '@/components/ui/ScrollBar'\n\nexport type MessageList = MessageListProps['list']\n\nexport type ChatBoxProps = {\n messageList: MessageList\n header?: ChatContainerProps['header']\n showMessageList?: boolean\n children?: ReactNode\n containerClass?: string\n} & Omit<MessageListProps, 'list'> &\n ChatInputProps\n\nconst ChatBox = forwardRef<ScrollBarRef, ChatBoxProps>((props, ref) => {\n const {\n messageList,\n showMessageList = true,\n children,\n header,\n placeholder,\n onInputChange,\n inputActions,\n uploadProps,\n showAvatar,\n avatarGap,\n customRenderer,\n customAction,\n bubbleClass,\n myBubbleClass,\n botBubbleClass,\n errorBubbleClass,\n renderTyping,\n typing,\n messageListClass,\n containerClass,\n } = props\n\n return (\n <ChatContainer\n className={containerClass}\n header={header}\n input={\n <ChatInput\n placeholder={placeholder}\n onInputChange={onInputChange}\n inputActions={inputActions}\n uploadProps={uploadProps}\n />\n }\n >\n {showMessageList && (\n <MessageList\n ref={ref}\n list={messageList}\n showAvatar={showAvatar}\n avatarGap={avatarGap}\n customRenderer={customRenderer}\n customAction={customAction}\n typing={typing}\n messageListClass={messageListClass}\n bubbleClass={bubbleClass}\n myBubbleClass={myBubbleClass}\n botBubbleClass={botBubbleClass}\n errorBubbleClass={errorBubbleClass}\n renderTyping={renderTyping}\n /> )}\n {children}\n </ChatContainer>\n )\n})\n\nChatBox.displayName = 'ChatBox'\n\nexport default ChatBox\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,UAAU,WAAuC,CAAC,OAAO,QAAQ;AACnE,QAAM;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACA;AAEJ,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,MACX;AAAA,MACA,OACI;AAAA,QAAC;AAAA,QAAA;AAAA,UACG;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MAAA;AAAA,MAIP,UAAA;AAAA,QAAA,mBACG;AAAA,UAAC;AAAA,UAAA;AAAA,YACG;AAAA,YACA,MAAM;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGb,CAAC;AAED,QAAQ,cAAc;"}
|
|
@@ -9,7 +9,13 @@ import Button from "../../../ui/Button/Button.js";
|
|
|
9
9
|
const { useMergeRef } = hooks;
|
|
10
10
|
const ChatInput = (props) => {
|
|
11
11
|
const [attachments, setAttachments] = useState([]);
|
|
12
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
placeholder,
|
|
14
|
+
onInputChange,
|
|
15
|
+
ref = null,
|
|
16
|
+
inputActions,
|
|
17
|
+
uploadProps
|
|
18
|
+
} = props;
|
|
13
19
|
const inputRef = useRef(null);
|
|
14
20
|
const handleInputClear = () => {
|
|
15
21
|
if (inputRef.current) {
|
|
@@ -17,22 +23,17 @@ const ChatInput = (props) => {
|
|
|
17
23
|
}
|
|
18
24
|
setAttachments([]);
|
|
19
25
|
};
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
attachments
|
|
25
|
-
});
|
|
26
|
-
handleInputClear();
|
|
26
|
+
const enviar = () => {
|
|
27
|
+
const value = inputRef.current?.value ?? "";
|
|
28
|
+
if (!value.trim() && attachments.length === 0) {
|
|
29
|
+
return;
|
|
27
30
|
}
|
|
31
|
+
onInputChange?.({ value, attachments });
|
|
32
|
+
handleInputClear();
|
|
28
33
|
};
|
|
29
34
|
const handleKeyDown = (event) => {
|
|
30
35
|
if (event.key === "Enter") {
|
|
31
|
-
|
|
32
|
-
value: inputRef.current?.value || "",
|
|
33
|
-
attachments
|
|
34
|
-
});
|
|
35
|
-
handleInputClear();
|
|
36
|
+
enviar();
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
return /* @__PURE__ */ jsxs("div", { className: "border-2 border-gray-200 dark:border-gray-700 rounded-xl min-h-[50px] px-3 flex flex-col", children: [
|
|
@@ -50,14 +51,16 @@ const ChatInput = (props) => {
|
|
|
50
51
|
/* @__PURE__ */ jsx(
|
|
51
52
|
Upload,
|
|
52
53
|
{
|
|
54
|
+
...uploadProps,
|
|
53
55
|
fileList: attachments,
|
|
54
56
|
showList: false,
|
|
55
57
|
onChange: setAttachments,
|
|
56
58
|
children: /* @__PURE__ */ jsx(
|
|
57
59
|
"button",
|
|
58
60
|
{
|
|
59
|
-
className: "text-xl heading-text hover:text-primary px-1 py-2",
|
|
61
|
+
className: "text-xl heading-text enabled:hover:text-primary disabled:cursor-not-allowed disabled:opacity-40 px-1 py-2",
|
|
60
62
|
type: "button",
|
|
63
|
+
disabled: uploadProps?.disabled,
|
|
61
64
|
children: /* @__PURE__ */ jsx(TbPhotoPlus, {})
|
|
62
65
|
}
|
|
63
66
|
)
|
|
@@ -67,7 +70,7 @@ const ChatInput = (props) => {
|
|
|
67
70
|
"input",
|
|
68
71
|
{
|
|
69
72
|
ref: useMergeRef(inputRef, ref),
|
|
70
|
-
className: "flex-1 h-full placeholder:text-gray-400 bg-transparent focus:outline-none heading-text",
|
|
73
|
+
className: "flex-1 min-w-[6rem] h-full placeholder:text-gray-400 bg-transparent focus:outline-none heading-text",
|
|
71
74
|
placeholder,
|
|
72
75
|
onKeyDown: handleKeyDown
|
|
73
76
|
}
|
|
@@ -80,7 +83,7 @@ const ChatInput = (props) => {
|
|
|
80
83
|
shape: "circle",
|
|
81
84
|
variant: "solid",
|
|
82
85
|
icon: /* @__PURE__ */ jsx(TbArrowRight, {}),
|
|
83
|
-
onClick:
|
|
86
|
+
onClick: enviar
|
|
84
87
|
}
|
|
85
88
|
)
|
|
86
89
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.js","sources":["../../../../../../lib/@ecme/components/view/ChatBox/components/ChatInput.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Button from '@/components/ui/Button'\nimport Upload from '@/components/ui/Upload'\nimport hooks from '@/components/ui/hooks'\nimport { TbPhotoPlus, TbArrowRight } from 'react-icons/tb'\nimport type { KeyboardEvent, ReactNode, Ref } from 'react'\n\nexport type ChatInputProps = {\n placeholder?: string\n onInputChange?: (payload: { value: string; attachments: File[] }) => void\n ref?: Ref<HTMLInputElement>\n /** Controles extras dentro da caixa, logo antes do botão de enviar. */\n inputActions?: ReactNode\n}\n\nconst { useMergeRef } = hooks\n\nconst ChatInput = (props: ChatInputProps) => {\n const [attachments, setAttachments] = useState<File[]>([])\n\n const {
|
|
1
|
+
{"version":3,"file":"ChatInput.js","sources":["../../../../../../lib/@ecme/components/view/ChatBox/components/ChatInput.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Button from '@/components/ui/Button'\nimport Upload from '@/components/ui/Upload'\nimport hooks from '@/components/ui/hooks'\nimport { TbPhotoPlus, TbArrowRight } from 'react-icons/tb'\nimport type { UploadProps } from '@/components/ui/Upload'\nimport type { KeyboardEvent, ReactNode, Ref } from 'react'\n\nexport type ChatInputProps = {\n placeholder?: string\n onInputChange?: (payload: { value: string; attachments: File[] }) => void\n ref?: Ref<HTMLInputElement>\n /** Controles extras dentro da caixa, logo antes do botão de enviar. */\n inputActions?: ReactNode\n /** Restrições do seletor de anexos (tipos aceitos, validação e bloqueio). */\n uploadProps?: Pick<UploadProps, 'accept' | 'beforeUpload' | 'disabled'>\n}\n\nconst { useMergeRef } = hooks\n\nconst ChatInput = (props: ChatInputProps) => {\n const [attachments, setAttachments] = useState<File[]>([])\n\n const {\n placeholder,\n onInputChange,\n ref = null,\n inputActions,\n uploadProps,\n } = props\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const handleInputClear = () => {\n if (inputRef.current) {\n inputRef.current.value = ''\n }\n setAttachments([])\n }\n\n /** Envia texto, anexos ou os dois; com a caixa vazia não faz nada. */\n const enviar = () => {\n const value = inputRef.current?.value ?? ''\n if (!value.trim() && attachments.length === 0) {\n return\n }\n onInputChange?.({ value, attachments })\n handleInputClear()\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n enviar()\n }\n }\n\n return (\n <div className=\"border-2 border-gray-200 dark:border-gray-700 rounded-xl min-h-[50px] px-3 flex flex-col\">\n {attachments.length > 0 && (\n <Upload\n fileList={attachments}\n fileListClass=\"flex gap-4\"\n fileItemClass=\"flex gap-8\"\n onFileRemove={setAttachments}\n >\n <></>\n </Upload>\n )}\n <div className=\"flex items-center gap-2 w-full h-[50px]\">\n <Upload\n {...uploadProps}\n fileList={attachments}\n showList={false}\n onChange={setAttachments}\n >\n <button\n className=\"text-xl heading-text enabled:hover:text-primary disabled:cursor-not-allowed disabled:opacity-40 px-1 py-2\"\n type=\"button\"\n disabled={uploadProps?.disabled}\n >\n <TbPhotoPlus />\n </button>\n </Upload>\n <input\n ref={useMergeRef(inputRef, ref)}\n className=\"flex-1 min-w-[6rem] h-full placeholder:text-gray-400 bg-transparent focus:outline-none heading-text\"\n placeholder={placeholder}\n onKeyDown={handleKeyDown}\n />\n {inputActions}\n <Button\n size=\"xs\"\n shape=\"circle\"\n variant=\"solid\"\n icon={<TbArrowRight />}\n onClick={enviar}\n />\n </div>\n </div>\n )\n}\n\nexport default ChatInput\n"],"names":[],"mappings":";;;;;;;;AAkBA,MAAM,EAAE,gBAAgB;AAExB,MAAM,YAAY,CAAC,UAA0B;AACzC,QAAM,CAAC,aAAa,cAAc,IAAI,SAAiB,CAAA,CAAE;AAEzD,QAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EAAA,IACA;AAEJ,QAAM,WAAW,OAAyB,IAAI;AAE9C,QAAM,mBAAmB,MAAM;AAC3B,QAAI,SAAS,SAAS;AAClB,eAAS,QAAQ,QAAQ;AAAA,IAC7B;AACA,mBAAe,CAAA,CAAE;AAAA,EACrB;AAGA,QAAM,SAAS,MAAM;AACjB,UAAM,QAAQ,SAAS,SAAS,SAAS;AACzC,QAAI,CAAC,MAAM,KAAA,KAAU,YAAY,WAAW,GAAG;AAC3C;AAAA,IACJ;AACA,oBAAgB,EAAE,OAAO,aAAa;AACtC,qBAAA;AAAA,EACJ;AAEA,QAAM,gBAAgB,CAAC,UAA2C;AAC9D,QAAI,MAAM,QAAQ,SAAS;AACvB,aAAA;AAAA,IACJ;AAAA,EACJ;AAEA,SACI,qBAAC,OAAA,EAAI,WAAU,4FACV,UAAA;AAAA,IAAA,YAAY,SAAS,KAClB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,UAAU;AAAA,QACV,eAAc;AAAA,QACd,eAAc;AAAA,QACd,cAAc;AAAA,QAEd,UAAA,oBAAA,UAAA,CAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,IAGV,qBAAC,OAAA,EAAI,WAAU,2CACX,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACI,GAAG;AAAA,UACJ,UAAU;AAAA,UACV,UAAU;AAAA,UACV,UAAU;AAAA,UAEV,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,WAAU;AAAA,cACV,MAAK;AAAA,cACL,UAAU,aAAa;AAAA,cAEvB,8BAAC,aAAA,CAAA,CAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MAAA;AAAA,MAEJ;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,KAAK,YAAY,UAAU,GAAG;AAAA,UAC9B,WAAU;AAAA,UACV;AAAA,UACA,WAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAEd;AAAA,MACD;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,MAAK;AAAA,UACL,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,0BAAO,cAAA,EAAa;AAAA,UACpB,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACb,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;"}
|
package/dist/@ecme/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import "./auth/index.js";
|
|
|
10
10
|
import "./assets/index.js";
|
|
11
11
|
import "./locales/index.js";
|
|
12
12
|
import { ADMIN, USER } from "./constants/roles.constant.js";
|
|
13
|
-
import { AI_API_URL, apiDeleteConversation, apiGetChatHistory, apiGetConversations, apiGetImages, apiPostImages, apiRenameConversation, resumeChat, streamChat } from "./services/AiService.js";
|
|
13
|
+
import { AI_API_URL, apiDeleteConversation, apiGetChatHistory, apiGetConversations, apiGetImagemDoChat, apiGetImages, apiGetModelos, apiPostImages, apiRenameConversation, resumeChat, streamChat } from "./services/AiService.js";
|
|
14
14
|
import { APP_NAME, REDIRECT_URL_KEY } from "./constants/app.constant.js";
|
|
15
15
|
import { AUTH_PREFIX_PATH, CONCEPTS_PREFIX_PATH, DASHBOARDS_PREFIX_PATH, GUIDE_PREFIX_PATH, PAGES_PREFIX_PATH, ROOT, UI_COMPONENTS_PREFIX_PATH } from "./constants/route.constant.js";
|
|
16
16
|
import { default as default2 } from "./components/shared/AbbreviateNumber.js";
|
|
@@ -392,11 +392,13 @@ export {
|
|
|
392
392
|
apiGetCustomersList,
|
|
393
393
|
apiGetEcommerceDashboard,
|
|
394
394
|
apiGetFiles,
|
|
395
|
+
apiGetImagemDoChat,
|
|
395
396
|
apiGetImages,
|
|
396
397
|
apiGetLogs,
|
|
397
398
|
apiGetMail,
|
|
398
399
|
apiGetMails,
|
|
399
400
|
apiGetMarketingDashboard,
|
|
401
|
+
apiGetModelos,
|
|
400
402
|
apiGetNotificationCount,
|
|
401
403
|
apiGetNotificationList,
|
|
402
404
|
apiGetOrder,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import "../../base/configs/index.js";
|
|
1
2
|
import { authHeaders } from "./aiAuthHeaders.js";
|
|
2
3
|
import ApiService from "./ApiService.js";
|
|
3
4
|
import { readSse } from "./sseParser.js";
|
|
5
|
+
import endpointNavigationConfig from "../../base/configs/endpoints.config/endpoints.navigation.js";
|
|
4
6
|
const AI_DEV_URL = "http://localhost:8000";
|
|
5
7
|
const AI_QAS_URL = "https://orbe-ai.apps.qas.orbeagro.com.br";
|
|
6
8
|
const AI_PRD_URL = "https://orbe-ai.apps.prd.orbeagro.com.br";
|
|
@@ -46,31 +48,56 @@ async function apiDeleteConversation(conversationId) {
|
|
|
46
48
|
method: "delete"
|
|
47
49
|
});
|
|
48
50
|
}
|
|
51
|
+
async function apiGetModelos() {
|
|
52
|
+
return aiRequest({
|
|
53
|
+
url: "/ai/chat/models",
|
|
54
|
+
method: "get"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
49
57
|
async function streamChat({
|
|
50
58
|
prompt,
|
|
51
59
|
conversationId,
|
|
52
60
|
esforco,
|
|
61
|
+
modelo,
|
|
62
|
+
imagens,
|
|
53
63
|
signal,
|
|
54
64
|
onEvent
|
|
55
65
|
}) {
|
|
56
66
|
await postarEConsumir(
|
|
57
67
|
"/ai/chat/stream",
|
|
58
|
-
{ prompt, conversation_id: conversationId, esforco },
|
|
68
|
+
{ prompt, conversation_id: conversationId, esforco, modelo, imagens },
|
|
59
69
|
onEvent,
|
|
60
70
|
signal
|
|
61
71
|
);
|
|
62
72
|
}
|
|
73
|
+
async function apiGetImagemDoChat(objectName) {
|
|
74
|
+
return ApiService.fetchDataWithAxios({
|
|
75
|
+
url: endpointNavigationConfig.objectStorage.minio.download,
|
|
76
|
+
method: "get",
|
|
77
|
+
params: { fileName: objectName },
|
|
78
|
+
skipGlobalLoading: true
|
|
79
|
+
});
|
|
80
|
+
}
|
|
63
81
|
async function resumeChat({
|
|
64
82
|
approved,
|
|
65
83
|
dados,
|
|
84
|
+
formato,
|
|
66
85
|
conversationId,
|
|
67
86
|
esforco,
|
|
87
|
+
modelo,
|
|
68
88
|
signal,
|
|
69
89
|
onEvent
|
|
70
90
|
}) {
|
|
71
91
|
await postarEConsumir(
|
|
72
92
|
"/ai/chat/resume",
|
|
73
|
-
{
|
|
93
|
+
{
|
|
94
|
+
approved,
|
|
95
|
+
dados,
|
|
96
|
+
formato,
|
|
97
|
+
conversation_id: conversationId,
|
|
98
|
+
esforco,
|
|
99
|
+
modelo
|
|
100
|
+
},
|
|
74
101
|
onEvent,
|
|
75
102
|
signal
|
|
76
103
|
);
|
|
@@ -115,7 +142,9 @@ export {
|
|
|
115
142
|
apiDeleteConversation,
|
|
116
143
|
apiGetChatHistory,
|
|
117
144
|
apiGetConversations,
|
|
145
|
+
apiGetImagemDoChat,
|
|
118
146
|
apiGetImages,
|
|
147
|
+
apiGetModelos,
|
|
119
148
|
apiPostImages,
|
|
120
149
|
apiRenameConversation,
|
|
121
150
|
resumeChat,
|