@orbe-agro/client-core 5.6.354 → 5.6.356
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 +214 -0
- package/dist/@ecme/assets/styles/tailwind/index.css +215 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js +3 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.js +4 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js +4 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.js +4 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.js +4 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.js +4 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.js.map +1 -1
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/locales/lang/ptBR/nav.js +18 -0
- package/dist/@ecme/locales/lang/ptBR/nav.js.map +1 -1
- package/dist/@ecme/store/localeStore.js +1 -2
- package/dist/@ecme/store/localeStore.js.map +1 -1
- package/dist/@ecme/views/auth/lang/index.js +1 -1
- package/dist/@ecme/views/auth/lang/index.js.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.d.ts.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.d.ts.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.d.ts.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.d.ts.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/StackedSide.d.ts.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/en/index.d.ts +121 -0
- package/dist/@types/@ecme/locales/lang/en/index.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts +121 -0
- package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/ptBR/nav.d.ts.map +1 -1
- package/dist/@types/base/@types/models/dm/user.d.ts +1 -0
- package/dist/@types/base/@types/models/dm/user.d.ts.map +1 -1
- package/dist/@types/base/@types/models/faq/Faq.d.ts +221 -0
- package/dist/@types/base/@types/models/faq/Faq.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/CentralAjuda.d.ts +10 -0
- package/dist/@types/base/components/centralAjuda/CentralAjuda.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/CentralAjudaDrawer.d.ts +12 -0
- package/dist/@types/base/components/centralAjuda/CentralAjudaDrawer.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/CentralAjudaPreview.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/CentralAjudaPreview.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/CentralAjudaToggle.d.ts +3 -0
- package/dist/@types/base/components/centralAjuda/CentralAjudaToggle.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/__mocks__/centralAjudaExemplo.d.ts +20 -0
- package/dist/@types/base/components/centralAjuda/__mocks__/centralAjudaExemplo.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/__mocks__/centralAjudaExemplo.dados.d.ts +34 -0
- package/dist/@types/base/components/centralAjuda/__mocks__/centralAjudaExemplo.dados.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/AnexoMoldura.d.ts +17 -0
- package/dist/@types/base/components/centralAjuda/components/AnexoMoldura.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/BlocoInerte.d.ts +13 -0
- package/dist/@types/base/components/centralAjuda/components/BlocoInerte.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/BuscaForm.d.ts +12 -0
- package/dist/@types/base/components/centralAjuda/components/BuscaForm.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/CartaoClicavel.d.ts +14 -0
- package/dist/@types/base/components/centralAjuda/components/CartaoClicavel.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/ConteudoHtml.d.ts +8 -0
- package/dist/@types/base/components/centralAjuda/components/ConteudoHtml.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/CtaAjudaCard.d.ts +13 -0
- package/dist/@types/base/components/centralAjuda/components/CtaAjudaCard.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/ErroCarregamento.d.ts +7 -0
- package/dist/@types/base/components/centralAjuda/components/ErroCarregamento.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/LinhaConteudo.d.ts +13 -0
- package/dist/@types/base/components/centralAjuda/components/LinhaConteudo.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/PainelCabecalho.d.ts +16 -0
- package/dist/@types/base/components/centralAjuda/components/PainelCabecalho.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/SkeletonConteudo.d.ts +4 -0
- package/dist/@types/base/components/centralAjuda/components/SkeletonConteudo.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/SkeletonLinhas.d.ts +17 -0
- package/dist/@types/base/components/centralAjuda/components/SkeletonLinhas.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/TipoFaqTag.d.ts +8 -0
- package/dist/@types/base/components/centralAjuda/components/TipoFaqTag.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/components/VoltarLink.d.ts +4 -0
- package/dist/@types/base/components/centralAjuda/components/VoltarLink.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/constants.d.ts +43 -0
- package/dist/@types/base/components/centralAjuda/constants.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/index.d.ts +12 -0
- package/dist/@types/base/components/centralAjuda/index.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/RotaDaAjuda.d.ts +8 -0
- package/dist/@types/base/components/centralAjuda/rota/RotaDaAjuda.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/ajudaPendente.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/rota/ajudaPendente.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/rotaAjuda.d.ts +47 -0
- package/dist/@types/base/components/centralAjuda/rota/rotaAjuda.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/useManterAjudaEntrePaginas.d.ts +12 -0
- package/dist/@types/base/components/centralAjuda/rota/useManterAjudaEntrePaginas.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/useNavegarAjuda.d.ts +29 -0
- package/dist/@types/base/components/centralAjuda/rota/useNavegarAjuda.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/useReabrirAjudaAposLogin.d.ts +7 -0
- package/dist/@types/base/components/centralAjuda/rota/useReabrirAjudaAposLogin.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/rota/useRotaAjuda.d.ts +4 -0
- package/dist/@types/base/components/centralAjuda/rota/useRotaAjuda.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/store/centralAjudaStore.d.ts +40 -0
- package/dist/@types/base/components/centralAjuda/store/centralAjudaStore.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/utils.d.ts +21 -0
- package/dist/@types/base/components/centralAjuda/utils.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/ConteudoDetalhe.d.ts +22 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/ConteudoDetalhe.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/ConteudoView.d.ts +11 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/ConteudoView.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexoItem.d.ts +14 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexoItem.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexos.d.ts +13 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexos.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoArtigo.d.ts +10 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoArtigo.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoFeedback.d.ts +11 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoFeedback.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoLateral.d.ts +13 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoLateral.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.d.ts +8 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoTrilha.d.ts +10 -0
- package/dist/@types/base/components/centralAjuda/views/Conteudo/components/ConteudoTrilha.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Duvida/DuvidaView.d.ts +3 -0
- package/dist/@types/base/components/centralAjuda/views/Duvida/DuvidaView.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Duvida/duvidaSchema.d.ts +17 -0
- package/dist/@types/base/components/centralAjuda/views/Duvida/duvidaSchema.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Home/HomeView.d.ts +3 -0
- package/dist/@types/base/components/centralAjuda/views/Home/HomeView.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/ArtigosLista.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/ArtigosLista.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/CategoriasGrid.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/CategoriasGrid.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/FaqAccordion.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/FaqAccordion.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/HeroBusca.d.ts +4 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/HeroBusca.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/ManuaisLista.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/views/Home/components/ManuaisLista.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/OrbeAi/OrbeAiView.d.ts +3 -0
- package/dist/@types/base/components/centralAjuda/views/OrbeAi/OrbeAiView.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/OrbeAi/components/RespostaOrbeAi.d.ts +9 -0
- package/dist/@types/base/components/centralAjuda/views/OrbeAi/components/RespostaOrbeAi.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/ResultadosView.d.ts +8 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/ResultadosView.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/components/FiltrosResultados.d.ts +25 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/components/FiltrosResultados.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/components/ListaResultados.d.ts +8 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/components/ListaResultados.d.ts.map +1 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/components/ResultadosVazio.d.ts +7 -0
- package/dist/@types/base/components/centralAjuda/views/Resultados/components/ResultadosVazio.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +152 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/faq/config/categoria.d.ts +36 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/categoria.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/central.d.ts +31 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/central.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/faq.d.ts +40 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/faq.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/modulo.d.ts +28 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/modulo.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/tag.d.ts +36 -0
- package/dist/@types/base/configs/endpoints.config/faq/config/tag.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/faq/index.d.ts +154 -0
- package/dist/@types/base/configs/endpoints.config/faq/index.d.ts.map +1 -0
- package/dist/@types/base/configs/faq.config.d.ts +16 -0
- package/dist/@types/base/configs/faq.config.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/modules.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/modules.submenu/faq/cadastros/submenu.cadastro.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/modules.submenu/faq/cadastros/submenu.cadastro.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/modules.submenu/faq/submenu.faq.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/modules.submenu/faq/submenu.faq.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/modules.submenu/index.d.ts +1 -0
- package/dist/@types/base/configs/navigation.config/modules.submenu/index.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/submenu/faq/cadastros.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/cadastros.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/categoria.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/categoria.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/faq.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/faq.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/modulo.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/modulo.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/tag.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/config/tag.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/faq.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/faq/faq.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/index.d.ts +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/index.d.ts.map +1 -1
- package/dist/@types/base/hooks/faq/useAnexoFaq.d.ts +29 -0
- package/dist/@types/base/hooks/faq/useAnexoFaq.d.ts.map +1 -0
- package/dist/@types/base/hooks/faq/useArtigoCentralAjuda.d.ts +12 -0
- package/dist/@types/base/hooks/faq/useArtigoCentralAjuda.d.ts.map +1 -0
- package/dist/@types/base/hooks/faq/useCategoriasFaqDisponiveis.d.ts +9 -0
- package/dist/@types/base/hooks/faq/useCategoriasFaqDisponiveis.d.ts.map +1 -0
- package/dist/@types/base/hooks/faq/useFaq.d.ts +9 -0
- package/dist/@types/base/hooks/faq/useFaq.d.ts.map +1 -0
- package/dist/@types/base/hooks/faq/useFaqsPublicados.d.ts +12 -0
- package/dist/@types/base/hooks/faq/useFaqsPublicados.d.ts.map +1 -0
- package/dist/@types/base/hooks/index.d.ts +4 -0
- package/dist/@types/base/hooks/index.d.ts.map +1 -1
- package/dist/@types/base/locales/lang/en/index.d.ts +121 -0
- package/dist/@types/base/locales/lang/en/index.d.ts.map +1 -1
- package/dist/@types/base/locales/lang/en/modules/faq/centralAjuda.d.ts +125 -0
- package/dist/@types/base/locales/lang/en/modules/faq/centralAjuda.d.ts.map +1 -0
- package/dist/@types/base/locales/lang/ptBR/index.d.ts.map +1 -1
- package/dist/@types/base/locales/lang/ptBR/modules/faq/centralAjuda.d.ts +4 -0
- package/dist/@types/base/locales/lang/ptBR/modules/faq/centralAjuda.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/CentralAjudaService.d.ts +34 -0
- package/dist/@types/base/services/modules/faq/CentralAjudaService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/FaqService.d.ts +56 -0
- package/dist/@types/base/services/modules/faq/FaqService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/categoria/CategoriaFaqService.d.ts +10 -0
- package/dist/@types/base/services/modules/faq/categoria/CategoriaFaqService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/faqAnexo.d.ts +9 -0
- package/dist/@types/base/services/modules/faq/faqAnexo.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/faqTexto.d.ts +5 -0
- package/dist/@types/base/services/modules/faq/faqTexto.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/index.d.ts +8 -0
- package/dist/@types/base/services/modules/faq/index.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/modulo/ModuloFaqService.d.ts +9 -0
- package/dist/@types/base/services/modules/faq/modulo/ModuloFaqService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/faq/tag/TagFaqService.d.ts +11 -0
- package/dist/@types/base/services/modules/faq/tag/TagFaqService.d.ts.map +1 -0
- package/dist/base/@types/models/faq/Faq.js +2 -0
- package/dist/base/@types/models/faq/Faq.js.map +1 -0
- package/dist/base/assets/styles/init.css +218 -0
- package/dist/base/components/centralAjuda/CentralAjuda.js +49 -0
- package/dist/base/components/centralAjuda/CentralAjuda.js.map +1 -0
- package/dist/base/components/centralAjuda/CentralAjudaDrawer.js +123 -0
- package/dist/base/components/centralAjuda/CentralAjudaDrawer.js.map +1 -0
- package/dist/base/components/centralAjuda/CentralAjudaPreview.js +53 -0
- package/dist/base/components/centralAjuda/CentralAjudaPreview.js.map +1 -0
- package/dist/base/components/centralAjuda/CentralAjudaToggle.js +43 -0
- package/dist/base/components/centralAjuda/CentralAjudaToggle.js.map +1 -0
- package/dist/base/components/centralAjuda/components/AnexoMoldura.js +49 -0
- package/dist/base/components/centralAjuda/components/AnexoMoldura.js.map +1 -0
- package/dist/base/components/centralAjuda/components/BlocoInerte.js +9 -0
- package/dist/base/components/centralAjuda/components/BlocoInerte.js.map +1 -0
- package/dist/base/components/centralAjuda/components/BuscaForm.js +69 -0
- package/dist/base/components/centralAjuda/components/BuscaForm.js.map +1 -0
- package/dist/base/components/centralAjuda/components/CartaoClicavel.js +51 -0
- package/dist/base/components/centralAjuda/components/CartaoClicavel.js.map +1 -0
- package/dist/base/components/centralAjuda/components/ConteudoHtml.js +134 -0
- package/dist/base/components/centralAjuda/components/ConteudoHtml.js.map +1 -0
- package/dist/base/components/centralAjuda/components/CtaAjudaCard.js +64 -0
- package/dist/base/components/centralAjuda/components/CtaAjudaCard.js.map +1 -0
- package/dist/base/components/centralAjuda/components/ErroCarregamento.js +21 -0
- package/dist/base/components/centralAjuda/components/ErroCarregamento.js.map +1 -0
- package/dist/base/components/centralAjuda/components/LinhaConteudo.js +34 -0
- package/dist/base/components/centralAjuda/components/LinhaConteudo.js.map +1 -0
- package/dist/base/components/centralAjuda/components/PainelCabecalho.js +115 -0
- package/dist/base/components/centralAjuda/components/PainelCabecalho.js.map +1 -0
- package/dist/base/components/centralAjuda/components/SkeletonConteudo.js +19 -0
- package/dist/base/components/centralAjuda/components/SkeletonConteudo.js.map +1 -0
- package/dist/base/components/centralAjuda/components/SkeletonLinhas.js +88 -0
- package/dist/base/components/centralAjuda/components/SkeletonLinhas.js.map +1 -0
- package/dist/base/components/centralAjuda/components/TipoFaqTag.js +19 -0
- package/dist/base/components/centralAjuda/components/TipoFaqTag.js.map +1 -0
- package/dist/base/components/centralAjuda/components/VoltarLink.js +30 -0
- package/dist/base/components/centralAjuda/components/VoltarLink.js.map +1 -0
- package/dist/base/components/centralAjuda/constants.js +59 -0
- package/dist/base/components/centralAjuda/constants.js.map +1 -0
- package/dist/base/components/centralAjuda/index.js +24 -0
- package/dist/base/components/centralAjuda/index.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/RotaDaAjuda.js +11 -0
- package/dist/base/components/centralAjuda/rota/RotaDaAjuda.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/ajudaPendente.js +58 -0
- package/dist/base/components/centralAjuda/rota/ajudaPendente.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/rotaAjuda.js +105 -0
- package/dist/base/components/centralAjuda/rota/rotaAjuda.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/useManterAjudaEntrePaginas.js +30 -0
- package/dist/base/components/centralAjuda/rota/useManterAjudaEntrePaginas.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/useNavegarAjuda.js +48 -0
- package/dist/base/components/centralAjuda/rota/useNavegarAjuda.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/useReabrirAjudaAposLogin.js +28 -0
- package/dist/base/components/centralAjuda/rota/useReabrirAjudaAposLogin.js.map +1 -0
- package/dist/base/components/centralAjuda/rota/useRotaAjuda.js +11 -0
- package/dist/base/components/centralAjuda/rota/useRotaAjuda.js.map +1 -0
- package/dist/base/components/centralAjuda/store/centralAjudaStore.js +40 -0
- package/dist/base/components/centralAjuda/store/centralAjudaStore.js.map +1 -0
- package/dist/base/components/centralAjuda/utils.js +47 -0
- package/dist/base/components/centralAjuda/utils.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/ConteudoDetalhe.js +38 -0
- package/dist/base/components/centralAjuda/views/Conteudo/ConteudoDetalhe.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/ConteudoView.js +44 -0
- package/dist/base/components/centralAjuda/views/Conteudo/ConteudoView.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexoItem.js +83 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexoItem.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexos.js +34 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexos.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoArtigo.js +15 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoArtigo.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoFeedback.js +66 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoFeedback.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoLateral.js +46 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoLateral.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.js +52 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoTrilha.js +49 -0
- package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoTrilha.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Duvida/DuvidaView.js +181 -0
- package/dist/base/components/centralAjuda/views/Duvida/DuvidaView.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Duvida/duvidaSchema.js +11 -0
- package/dist/base/components/centralAjuda/views/Duvida/duvidaSchema.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Home/HomeView.js +79 -0
- package/dist/base/components/centralAjuda/views/Home/HomeView.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Home/components/ArtigosLista.js +41 -0
- package/dist/base/components/centralAjuda/views/Home/components/ArtigosLista.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Home/components/CategoriasGrid.js +57 -0
- package/dist/base/components/centralAjuda/views/Home/components/CategoriasGrid.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Home/components/FaqAccordion.js +84 -0
- package/dist/base/components/centralAjuda/views/Home/components/FaqAccordion.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Home/components/HeroBusca.js +42 -0
- package/dist/base/components/centralAjuda/views/Home/components/HeroBusca.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Home/components/ManuaisLista.js +41 -0
- package/dist/base/components/centralAjuda/views/Home/components/ManuaisLista.js.map +1 -0
- package/dist/base/components/centralAjuda/views/OrbeAi/OrbeAiView.js +154 -0
- package/dist/base/components/centralAjuda/views/OrbeAi/OrbeAiView.js.map +1 -0
- package/dist/base/components/centralAjuda/views/OrbeAi/components/RespostaOrbeAi.js +49 -0
- package/dist/base/components/centralAjuda/views/OrbeAi/components/RespostaOrbeAi.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Resultados/ResultadosView.js +137 -0
- package/dist/base/components/centralAjuda/views/Resultados/ResultadosView.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Resultados/components/FiltrosResultados.js +81 -0
- package/dist/base/components/centralAjuda/views/Resultados/components/FiltrosResultados.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Resultados/components/ListaResultados.js +24 -0
- package/dist/base/components/centralAjuda/views/Resultados/components/ListaResultados.js.map +1 -0
- package/dist/base/components/centralAjuda/views/Resultados/components/ResultadosVazio.js +36 -0
- package/dist/base/components/centralAjuda/views/Resultados/components/ResultadosVazio.js.map +1 -0
- package/dist/base/configs/endpoints.config/endpoints.navigation.js +2 -0
- package/dist/base/configs/endpoints.config/endpoints.navigation.js.map +1 -1
- package/dist/base/configs/endpoints.config/faq/config/categoria.js +40 -0
- package/dist/base/configs/endpoints.config/faq/config/categoria.js.map +1 -0
- package/dist/base/configs/endpoints.config/faq/config/central.js +31 -0
- package/dist/base/configs/endpoints.config/faq/config/central.js.map +1 -0
- package/dist/base/configs/endpoints.config/faq/config/faq.js +44 -0
- package/dist/base/configs/endpoints.config/faq/config/faq.js.map +1 -0
- package/dist/base/configs/endpoints.config/faq/config/modulo.js +32 -0
- package/dist/base/configs/endpoints.config/faq/config/modulo.js.map +1 -0
- package/dist/base/configs/endpoints.config/faq/config/tag.js +40 -0
- package/dist/base/configs/endpoints.config/faq/config/tag.js.map +1 -0
- package/dist/base/configs/endpoints.config/faq/index.js +16 -0
- package/dist/base/configs/endpoints.config/faq/index.js.map +1 -0
- package/dist/base/configs/faq.config.js +9 -0
- package/dist/base/configs/faq.config.js.map +1 -0
- package/dist/base/configs/index.js +48 -44
- package/dist/base/configs/index.js.map +1 -1
- package/dist/base/configs/navigation.config/index.js +46 -42
- package/dist/base/configs/navigation.config/index.js.map +1 -1
- package/dist/base/configs/navigation.config/modules.navigation.js +2 -0
- package/dist/base/configs/navigation.config/modules.navigation.js.map +1 -1
- package/dist/base/configs/navigation.config/modules.submenu/faq/cadastros/submenu.cadastro.js +17 -0
- package/dist/base/configs/navigation.config/modules.submenu/faq/cadastros/submenu.cadastro.js.map +1 -0
- package/dist/base/configs/navigation.config/modules.submenu/faq/submenu.faq.js +17 -0
- package/dist/base/configs/navigation.config/modules.submenu/faq/submenu.faq.js.map +1 -0
- package/dist/base/configs/navigation.config/modules.submenu/index.js +4 -2
- package/dist/base/configs/navigation.config/modules.submenu/index.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/faq/cadastros.submenu.js +14 -0
- package/dist/base/configs/navigation.config/submenu/faq/cadastros.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/categoria.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/categoria.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/faq.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/faq.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/modulo.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/modulo.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/tag.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/faq/config/tag.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/faq/faq.submenu.js +8 -0
- package/dist/base/configs/navigation.config/submenu/faq/faq.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/index.js +4 -2
- package/dist/base/configs/navigation.config/submenu/index.js.map +1 -1
- package/dist/base/hooks/faq/useAnexoFaq.js +42 -0
- package/dist/base/hooks/faq/useAnexoFaq.js.map +1 -0
- package/dist/base/hooks/faq/useArtigoCentralAjuda.js +20 -0
- package/dist/base/hooks/faq/useArtigoCentralAjuda.js.map +1 -0
- package/dist/base/hooks/faq/useCategoriasFaqDisponiveis.js +16 -0
- package/dist/base/hooks/faq/useCategoriasFaqDisponiveis.js.map +1 -0
- package/dist/base/hooks/faq/useFaq.js +16 -0
- package/dist/base/hooks/faq/useFaq.js.map +1 -0
- package/dist/base/hooks/faq/useFaqsPublicados.js +35 -0
- package/dist/base/hooks/faq/useFaqsPublicados.js.map +1 -0
- package/dist/base/hooks/index.js +8 -0
- package/dist/base/hooks/index.js.map +1 -1
- package/dist/base/index.js +216 -204
- package/dist/base/index.js.map +1 -1
- package/dist/base/locales/index.js +1 -1
- package/dist/base/locales/index.js.map +1 -1
- package/dist/base/locales/lang/en/index.js +2 -1
- package/dist/base/locales/lang/en/index.js.map +1 -1
- package/dist/base/locales/lang/en/modules/faq/centralAjuda.js +127 -0
- package/dist/base/locales/lang/en/modules/faq/centralAjuda.js.map +1 -0
- package/dist/base/locales/lang/ptBR/index.js +2 -1
- package/dist/base/locales/lang/ptBR/index.js.map +1 -1
- package/dist/base/locales/lang/ptBR/modules/faq/centralAjuda.js +127 -0
- package/dist/base/locales/lang/ptBR/modules/faq/centralAjuda.js.map +1 -0
- package/dist/base/services/modules/faq/CentralAjudaService.js +51 -0
- package/dist/base/services/modules/faq/CentralAjudaService.js.map +1 -0
- package/dist/base/services/modules/faq/FaqService.js +171 -0
- package/dist/base/services/modules/faq/FaqService.js.map +1 -0
- package/dist/base/services/modules/faq/categoria/CategoriaFaqService.js +58 -0
- package/dist/base/services/modules/faq/categoria/CategoriaFaqService.js.map +1 -0
- package/dist/base/services/modules/faq/faqAnexo.js +21 -0
- package/dist/base/services/modules/faq/faqAnexo.js.map +1 -0
- package/dist/base/services/modules/faq/faqTexto.js +7 -0
- package/dist/base/services/modules/faq/faqTexto.js.map +1 -0
- package/dist/base/services/modules/faq/index.js +52 -0
- package/dist/base/services/modules/faq/index.js.map +1 -0
- package/dist/base/services/modules/faq/modulo/ModuloFaqService.js +51 -0
- package/dist/base/services/modules/faq/modulo/ModuloFaqService.js.map +1 -0
- package/dist/base/services/modules/faq/tag/TagFaqService.js +65 -0
- package/dist/base/services/modules/faq/tag/TagFaqService.js.map +1 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.tsx +5 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.tsx +6 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.tsx +6 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.tsx +6 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/StackedSide.tsx +6 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.tsx +6 -0
- package/lib/@ecme/locales/lang/ptBR/nav.ts +18 -0
- package/lib/@ecme/store/localeStore.ts +1 -1
- package/lib/@ecme/views/auth/lang/index.ts +1 -1
- package/lib/base/@types/models/dm/user.ts +1 -0
- package/lib/base/@types/models/faq/Faq.ts +249 -0
- package/lib/base/components/centralAjuda/CentralAjuda.stories.tsx +161 -0
- package/lib/base/components/centralAjuda/CentralAjuda.tsx +61 -0
- package/lib/base/components/centralAjuda/CentralAjudaDrawer.tsx +153 -0
- package/lib/base/components/centralAjuda/CentralAjudaPreview.tsx +67 -0
- package/lib/base/components/centralAjuda/CentralAjudaToggle.tsx +47 -0
- package/lib/base/components/centralAjuda/__mocks__/centralAjudaExemplo.dados.ts +391 -0
- package/lib/base/components/centralAjuda/__mocks__/centralAjudaExemplo.ts +285 -0
- package/lib/base/components/centralAjuda/components/AnexoMoldura.tsx +64 -0
- package/lib/base/components/centralAjuda/components/BlocoInerte.tsx +23 -0
- package/lib/base/components/centralAjuda/components/BuscaForm.tsx +74 -0
- package/lib/base/components/centralAjuda/components/CartaoClicavel.tsx +64 -0
- package/lib/base/components/centralAjuda/components/ConteudoHtml.tsx +209 -0
- package/lib/base/components/centralAjuda/components/CtaAjudaCard.tsx +67 -0
- package/lib/base/components/centralAjuda/components/ErroCarregamento.tsx +31 -0
- package/lib/base/components/centralAjuda/components/LinhaConteudo.tsx +51 -0
- package/lib/base/components/centralAjuda/components/PainelCabecalho.tsx +147 -0
- package/lib/base/components/centralAjuda/components/SkeletonConteudo.tsx +22 -0
- package/lib/base/components/centralAjuda/components/SkeletonLinhas.tsx +110 -0
- package/lib/base/components/centralAjuda/components/TipoFaqTag.tsx +28 -0
- package/lib/base/components/centralAjuda/components/VoltarLink.tsx +28 -0
- package/lib/base/components/centralAjuda/constants.ts +79 -0
- package/lib/base/components/centralAjuda/index.ts +19 -0
- package/lib/base/components/centralAjuda/rota/RotaDaAjuda.tsx +15 -0
- package/lib/base/components/centralAjuda/rota/ajudaPendente.ts +103 -0
- package/lib/base/components/centralAjuda/rota/rotaAjuda.ts +170 -0
- package/lib/base/components/centralAjuda/rota/useManterAjudaEntrePaginas.ts +42 -0
- package/lib/base/components/centralAjuda/rota/useNavegarAjuda.ts +79 -0
- package/lib/base/components/centralAjuda/rota/useReabrirAjudaAposLogin.ts +38 -0
- package/lib/base/components/centralAjuda/rota/useRotaAjuda.ts +11 -0
- package/lib/base/components/centralAjuda/store/centralAjudaStore.ts +66 -0
- package/lib/base/components/centralAjuda/utils.ts +75 -0
- package/lib/base/components/centralAjuda/views/Conteudo/ConteudoDetalhe.tsx +58 -0
- package/lib/base/components/centralAjuda/views/Conteudo/ConteudoView.tsx +63 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexoItem.tsx +100 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexos.tsx +48 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoArtigo.tsx +27 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoFeedback.tsx +94 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoLateral.tsx +49 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.tsx +65 -0
- package/lib/base/components/centralAjuda/views/Conteudo/components/ConteudoTrilha.tsx +53 -0
- package/lib/base/components/centralAjuda/views/Duvida/DuvidaView.tsx +196 -0
- package/lib/base/components/centralAjuda/views/Duvida/duvidaSchema.ts +19 -0
- package/lib/base/components/centralAjuda/views/Home/HomeView.tsx +96 -0
- package/lib/base/components/centralAjuda/views/Home/components/ArtigosLista.tsx +60 -0
- package/lib/base/components/centralAjuda/views/Home/components/CategoriasGrid.tsx +64 -0
- package/lib/base/components/centralAjuda/views/Home/components/FaqAccordion.tsx +100 -0
- package/lib/base/components/centralAjuda/views/Home/components/HeroBusca.tsx +44 -0
- package/lib/base/components/centralAjuda/views/Home/components/ManuaisLista.tsx +60 -0
- package/lib/base/components/centralAjuda/views/OrbeAi/OrbeAiView.tsx +175 -0
- package/lib/base/components/centralAjuda/views/OrbeAi/components/RespostaOrbeAi.tsx +69 -0
- package/lib/base/components/centralAjuda/views/Resultados/ResultadosView.tsx +177 -0
- package/lib/base/components/centralAjuda/views/Resultados/components/FiltrosResultados.tsx +110 -0
- package/lib/base/components/centralAjuda/views/Resultados/components/ListaResultados.tsx +34 -0
- package/lib/base/components/centralAjuda/views/Resultados/components/ResultadosVazio.tsx +53 -0
- package/lib/base/configs/endpoints.config/endpoints.navigation.ts +2 -0
- package/lib/base/configs/endpoints.config/faq/config/categoria.ts +40 -0
- package/lib/base/configs/endpoints.config/faq/config/central.ts +37 -0
- package/lib/base/configs/endpoints.config/faq/config/faq.ts +43 -0
- package/lib/base/configs/endpoints.config/faq/config/modulo.ts +32 -0
- package/lib/base/configs/endpoints.config/faq/config/tag.ts +40 -0
- package/lib/base/configs/endpoints.config/faq/index.ts +15 -0
- package/lib/base/configs/faq.config.ts +16 -0
- package/lib/base/configs/navigation.config/modules.navigation.ts +2 -0
- package/lib/base/configs/navigation.config/modules.submenu/faq/cadastros/submenu.cadastro.ts +17 -0
- package/lib/base/configs/navigation.config/modules.submenu/faq/submenu.faq.ts +18 -0
- package/lib/base/configs/navigation.config/modules.submenu/index.ts +1 -0
- package/lib/base/configs/navigation.config/submenu/faq/cadastros.submenu.ts +14 -0
- package/lib/base/configs/navigation.config/submenu/faq/config/categoria.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/faq/config/faq.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/faq/config/modulo.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/faq/config/tag.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/faq/faq.submenu.ts +8 -0
- package/lib/base/configs/navigation.config/submenu/index.ts +1 -0
- package/lib/base/hooks/faq/useAnexoFaq.tsx +79 -0
- package/lib/base/hooks/faq/useArtigoCentralAjuda.tsx +25 -0
- package/lib/base/hooks/faq/useCategoriasFaqDisponiveis.tsx +16 -0
- package/lib/base/hooks/faq/useFaq.tsx +16 -0
- package/lib/base/hooks/faq/useFaqsPublicados.tsx +45 -0
- package/lib/base/hooks/index.ts +5 -1
- package/lib/base/locales/index.ts +1 -1
- package/lib/base/locales/lang/en/index.ts +2 -1
- package/lib/base/locales/lang/en/modules/faq/centralAjuda.ts +129 -0
- package/lib/base/locales/lang/ptBR/index.ts +2 -1
- package/lib/base/locales/lang/ptBR/modules/faq/centralAjuda.ts +131 -0
- package/lib/base/services/modules/faq/CentralAjudaService.ts +92 -0
- package/lib/base/services/modules/faq/FaqService.ts +235 -0
- package/lib/base/services/modules/faq/categoria/CategoriaFaqService.ts +62 -0
- package/lib/base/services/modules/faq/faqAnexo.ts +23 -0
- package/lib/base/services/modules/faq/faqTexto.ts +12 -0
- package/lib/base/services/modules/faq/index.ts +7 -0
- package/lib/base/services/modules/faq/modulo/ModuloFaqService.ts +56 -0
- package/lib/base/services/modules/faq/tag/TagFaqService.ts +70 -0
- package/package.json +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js +0 -25
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js.map +0 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js +0 -22
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js.map +0 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js +0 -22
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js.map +0 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js +0 -25
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js.map +0 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js +0 -25
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js.map +0 -1
- package/dist/@ecme/components/template/Header.stories.js +0 -42
- package/dist/@ecme/components/template/Header.stories.js.map +0 -1
- package/dist/@ecme/components/template/Search.stories.js +0 -76
- package/dist/@ecme/components/template/Search.stories.js.map +0 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.js +0 -59
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.js.map +0 -1
- package/dist/@ecme/components/ui/Button/Button.stories.js +0 -17
- package/dist/@ecme/components/ui/Button/Button.stories.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
|
+
import { useLocation, useNavigationType, useNavigate } from "react-router-dom";
|
|
3
|
+
import { lerRotaAjuda, montarSearch } from "./rotaAjuda.js";
|
|
4
|
+
const useManterAjudaEntrePaginas = () => {
|
|
5
|
+
const location = useLocation();
|
|
6
|
+
const tipoNavegacao = useNavigationType();
|
|
7
|
+
const navigate = useNavigate();
|
|
8
|
+
const anterior = useRef(location);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const antes = anterior.current;
|
|
11
|
+
anterior.current = location;
|
|
12
|
+
const mudouDePagina = tipoNavegacao !== "POP" && antes.pathname !== location.pathname;
|
|
13
|
+
const rotaAnterior = lerRotaAjuda(antes.search);
|
|
14
|
+
if (!mudouDePagina || !rotaAnterior || lerRotaAjuda(location.search)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
navigate(
|
|
18
|
+
{
|
|
19
|
+
pathname: location.pathname,
|
|
20
|
+
search: montarSearch(location.search, rotaAnterior),
|
|
21
|
+
hash: location.hash
|
|
22
|
+
},
|
|
23
|
+
{ replace: true, state: location.state }
|
|
24
|
+
);
|
|
25
|
+
}, [location, tipoNavegacao, navigate]);
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
useManterAjudaEntrePaginas as default
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useManterAjudaEntrePaginas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useManterAjudaEntrePaginas.js","sources":["../../../../../lib/base/components/centralAjuda/rota/useManterAjudaEntrePaginas.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\nimport { useLocation, useNavigate, useNavigationType } from 'react-router-dom'\nimport { lerRotaAjuda, montarSearch } from './rotaAjuda'\n\n/**\n * Mantém a ajuda aberta quando o app troca de página (menu, links, redirecionamentos).\n *\n * O app navega sem saber da ajuda, então a URL da página nova chega sem o `?ajuda=`: a rota\n * anterior é recolocada na query (replace). Hash e `state` da página seguem junto — sem o\n * `state`, telas que recebem dados por ele (ex.: gerar contrato a partir do pré-contrato)\n * perderiam o que receberam.\n * O voltar do navegador (POP) é respeitado: pode fechar ou trocar a tela da ajuda.\n */\nconst useManterAjudaEntrePaginas = () => {\n const location = useLocation()\n const tipoNavegacao = useNavigationType()\n const navigate = useNavigate()\n const anterior = useRef(location)\n\n useEffect(() => {\n const antes = anterior.current\n anterior.current = location\n\n const mudouDePagina =\n tipoNavegacao !== 'POP' && antes.pathname !== location.pathname\n const rotaAnterior = lerRotaAjuda(antes.search)\n if (!mudouDePagina || !rotaAnterior || lerRotaAjuda(location.search)) {\n return\n }\n\n navigate(\n {\n pathname: location.pathname,\n search: montarSearch(location.search, rotaAnterior),\n hash: location.hash,\n },\n { replace: true, state: location.state },\n )\n }, [location, tipoNavegacao, navigate])\n}\n\nexport default useManterAjudaEntrePaginas\n"],"names":[],"mappings":";;;AAaA,MAAM,6BAA6B,MAAM;AACrC,QAAM,WAAW,YAAA;AACjB,QAAM,gBAAgB,kBAAA;AACtB,QAAM,WAAW,YAAA;AACjB,QAAM,WAAW,OAAO,QAAQ;AAEhC,YAAU,MAAM;AACZ,UAAM,QAAQ,SAAS;AACvB,aAAS,UAAU;AAEnB,UAAM,gBACF,kBAAkB,SAAS,MAAM,aAAa,SAAS;AAC3D,UAAM,eAAe,aAAa,MAAM,MAAM;AAC9C,QAAI,CAAC,iBAAiB,CAAC,gBAAgB,aAAa,SAAS,MAAM,GAAG;AAClE;AAAA,IACJ;AAEA;AAAA,MACI;AAAA,QACI,UAAU,SAAS;AAAA,QACnB,QAAQ,aAAa,SAAS,QAAQ,YAAY;AAAA,QAClD,MAAM,SAAS;AAAA,MAAA;AAAA,MAEnB,EAAE,SAAS,MAAM,OAAO,SAAS,MAAA;AAAA,IAAM;AAAA,EAE/C,GAAG,CAAC,UAAU,eAAe,QAAQ,CAAC;AAC1C;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useMemo, useCallback } from "react";
|
|
2
|
+
import { useNavigate, useLocation } from "react-router-dom";
|
|
3
|
+
import { useCentralAjudaStore } from "../store/centralAjudaStore.js";
|
|
4
|
+
import { lerRotaAjuda, montarSearch, rotaBusca, ROTA_INICIO } from "./rotaAjuda.js";
|
|
5
|
+
const useNavegarAjuda = () => {
|
|
6
|
+
const navigate = useNavigate();
|
|
7
|
+
const { pathname, search, hash, state: estadoDaPagina } = useLocation();
|
|
8
|
+
const setPerguntaIa = useCentralAjudaStore((state) => state.setPerguntaIa);
|
|
9
|
+
const setAssuntoDuvida = useCentralAjudaStore(
|
|
10
|
+
(state) => state.setAssuntoDuvida
|
|
11
|
+
);
|
|
12
|
+
const rotaAtual = useMemo(() => lerRotaAjuda(search), [search]);
|
|
13
|
+
const ir = useCallback(
|
|
14
|
+
(rota, { substituir = false } = {}) => navigate(
|
|
15
|
+
{ pathname, search: montarSearch(search, rota), hash },
|
|
16
|
+
{ replace: substituir, state: estadoDaPagina }
|
|
17
|
+
),
|
|
18
|
+
[navigate, pathname, search, hash, estadoDaPagina]
|
|
19
|
+
);
|
|
20
|
+
return useMemo(() => {
|
|
21
|
+
const filtrosAtuais = rotaAtual?.tela === "busca" ? rotaAtual : rotaBusca();
|
|
22
|
+
return {
|
|
23
|
+
ir,
|
|
24
|
+
fechar: () => ir(null),
|
|
25
|
+
alternar: () => ir(rotaAtual ? null : ROTA_INICIO),
|
|
26
|
+
irParaInicio: () => ir(ROTA_INICIO),
|
|
27
|
+
buscar: (texto) => ir(rotaBusca({ busca: texto.trim() })),
|
|
28
|
+
/** Muda só os filtros informados, mantendo os outros da busca atual. */
|
|
29
|
+
filtrar: (filtros) => ir(rotaBusca({ ...filtrosAtuais, ...filtros })),
|
|
30
|
+
limparFiltros: () => ir(rotaBusca()),
|
|
31
|
+
abrirCategoria: (categoriaId) => ir(rotaBusca({ categoriaId })),
|
|
32
|
+
verTipo: (tipo) => ir(rotaBusca({ tipo })),
|
|
33
|
+
abrirConteudo: ({ identificador }, opcoes) => ir({ tela: "artigo", identificador }, opcoes),
|
|
34
|
+
abrirOrbeAi: (pergunta = "") => {
|
|
35
|
+
setPerguntaIa(pergunta.trim());
|
|
36
|
+
ir({ tela: "orbeAi" });
|
|
37
|
+
},
|
|
38
|
+
abrirDuvida: (assunto = "") => {
|
|
39
|
+
setAssuntoDuvida(assunto.trim());
|
|
40
|
+
ir({ tela: "duvida" });
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}, [ir, rotaAtual, setPerguntaIa, setAssuntoDuvida]);
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
useNavegarAjuda as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=useNavegarAjuda.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavegarAjuda.js","sources":["../../../../../lib/base/components/centralAjuda/rota/useNavegarAjuda.ts"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\nimport { useCentralAjudaStore } from '../store/centralAjudaStore'\nimport {\n lerRotaAjuda,\n montarSearch,\n ROTA_INICIO,\n rotaBusca,\n type TFiltroTipoAjuda,\n type TFiltrosBuscaAjuda,\n type TRotaAjuda,\n} from './rotaAjuda'\n\ntype TOpcoesNavegacao = {\n /** Troca a entrada atual do histórico em vez de criar outra (ex.: corrigir o título no link). */\n substituir?: boolean\n}\n\n/**\n * Ações de navegação do widget de ajuda: a única porta para mudar de tela.\n * Cada ação troca só o `?ajuda=` da URL (push no histórico), então o voltar do navegador volta\n * dentro da ajuda e a URL pode ser compartilhada. Caminho, hash e `state` da página ficam como estão.\n */\nconst useNavegarAjuda = () => {\n const navigate = useNavigate()\n const { pathname, search, hash, state: estadoDaPagina } = useLocation()\n const setPerguntaIa = useCentralAjudaStore((state) => state.setPerguntaIa)\n const setAssuntoDuvida = useCentralAjudaStore(\n (state) => state.setAssuntoDuvida,\n )\n\n const rotaAtual = useMemo(() => lerRotaAjuda(search), [search])\n\n const ir = useCallback(\n (\n rota: TRotaAjuda | null,\n { substituir = false }: TOpcoesNavegacao = {},\n ) =>\n navigate(\n { pathname, search: montarSearch(search, rota), hash },\n { replace: substituir, state: estadoDaPagina },\n ),\n [navigate, pathname, search, hash, estadoDaPagina],\n )\n\n return useMemo(() => {\n const filtrosAtuais =\n rotaAtual?.tela === 'busca' ? rotaAtual : rotaBusca()\n\n return {\n ir,\n fechar: () => ir(null),\n alternar: () => ir(rotaAtual ? null : ROTA_INICIO),\n irParaInicio: () => ir(ROTA_INICIO),\n buscar: (texto: string) => ir(rotaBusca({ busca: texto.trim() })),\n /** Muda só os filtros informados, mantendo os outros da busca atual. */\n filtrar: (filtros: TFiltrosBuscaAjuda) =>\n ir(rotaBusca({ ...filtrosAtuais, ...filtros })),\n limparFiltros: () => ir(rotaBusca()),\n abrirCategoria: (categoriaId: number) =>\n ir(rotaBusca({ categoriaId })),\n verTipo: (tipo: TFiltroTipoAjuda) => ir(rotaBusca({ tipo })),\n abrirConteudo: (\n { identificador }: { identificador: string },\n opcoes?: TOpcoesNavegacao,\n ) => ir({ tela: 'artigo', identificador }, opcoes),\n abrirOrbeAi: (pergunta = '') => {\n setPerguntaIa(pergunta.trim())\n ir({ tela: 'orbeAi' })\n },\n abrirDuvida: (assunto = '') => {\n setAssuntoDuvida(assunto.trim())\n ir({ tela: 'duvida' })\n },\n }\n }, [ir, rotaAtual, setPerguntaIa, setAssuntoDuvida])\n}\n\nexport default useNavegarAjuda\n"],"names":[],"mappings":";;;;AAuBA,MAAM,kBAAkB,MAAM;AAC1B,QAAM,WAAW,YAAA;AACjB,QAAM,EAAE,UAAU,QAAQ,MAAM,OAAO,eAAA,IAAmB,YAAA;AAC1D,QAAM,gBAAgB,qBAAqB,CAAC,UAAU,MAAM,aAAa;AACzE,QAAM,mBAAmB;AAAA,IACrB,CAAC,UAAU,MAAM;AAAA,EAAA;AAGrB,QAAM,YAAY,QAAQ,MAAM,aAAa,MAAM,GAAG,CAAC,MAAM,CAAC;AAE9D,QAAM,KAAK;AAAA,IACP,CACI,MACA,EAAE,aAAa,MAAA,IAA4B,CAAA,MAE3C;AAAA,MACI,EAAE,UAAU,QAAQ,aAAa,QAAQ,IAAI,GAAG,KAAA;AAAA,MAChD,EAAE,SAAS,YAAY,OAAO,eAAA;AAAA,IAAe;AAAA,IAErD,CAAC,UAAU,UAAU,QAAQ,MAAM,cAAc;AAAA,EAAA;AAGrD,SAAO,QAAQ,MAAM;AACjB,UAAM,gBACF,WAAW,SAAS,UAAU,YAAY,UAAA;AAE9C,WAAO;AAAA,MACH;AAAA,MACA,QAAQ,MAAM,GAAG,IAAI;AAAA,MACrB,UAAU,MAAM,GAAG,YAAY,OAAO,WAAW;AAAA,MACjD,cAAc,MAAM,GAAG,WAAW;AAAA,MAClC,QAAQ,CAAC,UAAkB,GAAG,UAAU,EAAE,OAAO,MAAM,KAAA,EAAK,CAAG,CAAC;AAAA;AAAA,MAEhE,SAAS,CAAC,YACN,GAAG,UAAU,EAAE,GAAG,eAAe,GAAG,QAAA,CAAS,CAAC;AAAA,MAClD,eAAe,MAAM,GAAG,WAAW;AAAA,MACnC,gBAAgB,CAAC,gBACb,GAAG,UAAU,EAAE,YAAA,CAAa,CAAC;AAAA,MACjC,SAAS,CAAC,SAA2B,GAAG,UAAU,EAAE,KAAA,CAAM,CAAC;AAAA,MAC3D,eAAe,CACX,EAAE,cAAA,GACF,WACC,GAAG,EAAE,MAAM,UAAU,cAAA,GAAiB,MAAM;AAAA,MACjD,aAAa,CAAC,WAAW,OAAO;AAC5B,sBAAc,SAAS,MAAM;AAC7B,WAAG,EAAE,MAAM,UAAU;AAAA,MACzB;AAAA,MACA,aAAa,CAAC,UAAU,OAAO;AAC3B,yBAAiB,QAAQ,MAAM;AAC/B,WAAG,EAAE,MAAM,UAAU;AAAA,MACzB;AAAA,IAAA;AAAA,EAER,GAAG,CAAC,IAAI,WAAW,eAAe,gBAAgB,CAAC;AACvD;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useLocation, useNavigate } from "react-router-dom";
|
|
3
|
+
import { descartarAjudaPendente, consumirAjudaPendente } from "./ajudaPendente.js";
|
|
4
|
+
import { lerRotaAjuda, montarSearch } from "./rotaAjuda.js";
|
|
5
|
+
const useReabrirAjudaAposLogin = () => {
|
|
6
|
+
const location = useLocation();
|
|
7
|
+
const navigate = useNavigate();
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (lerRotaAjuda(location.search)) {
|
|
10
|
+
descartarAjudaPendente();
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const rota = consumirAjudaPendente(location.pathname);
|
|
14
|
+
if (!rota) return;
|
|
15
|
+
navigate(
|
|
16
|
+
{
|
|
17
|
+
pathname: location.pathname,
|
|
18
|
+
search: montarSearch(location.search, rota),
|
|
19
|
+
hash: location.hash
|
|
20
|
+
},
|
|
21
|
+
{ replace: true, state: location.state }
|
|
22
|
+
);
|
|
23
|
+
}, [location, navigate]);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
useReabrirAjudaAposLogin as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=useReabrirAjudaAposLogin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReabrirAjudaAposLogin.js","sources":["../../../../../lib/base/components/centralAjuda/rota/useReabrirAjudaAposLogin.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\nimport {\n consumirAjudaPendente,\n descartarAjudaPendente,\n} from './ajudaPendente'\nimport { lerRotaAjuda, montarSearch } from './rotaAjuda'\n\n/**\n * Reabre a ajuda que chegou por link antes do login (ver `ajudaPendente`).\n * Só roda com o widget montado, ou seja, com o usuário logado e com a funcionalidade.\n */\nconst useReabrirAjudaAposLogin = () => {\n const location = useLocation()\n const navigate = useNavigate()\n\n useEffect(() => {\n if (lerRotaAjuda(location.search)) {\n // A ajuda já está aberta (link aberto já logado, ou aberta pelo \"?\"): o pendente não vale mais.\n descartarAjudaPendente()\n return\n }\n\n const rota = consumirAjudaPendente(location.pathname)\n if (!rota) return\n\n navigate(\n {\n pathname: location.pathname,\n search: montarSearch(location.search, rota),\n hash: location.hash,\n },\n { replace: true, state: location.state },\n )\n }, [location, navigate])\n}\n\nexport default useReabrirAjudaAposLogin\n"],"names":[],"mappings":";;;;AAYA,MAAM,2BAA2B,MAAM;AACnC,QAAM,WAAW,YAAA;AACjB,QAAM,WAAW,YAAA;AAEjB,YAAU,MAAM;AACZ,QAAI,aAAa,SAAS,MAAM,GAAG;AAE/B,6BAAA;AACA;AAAA,IACJ;AAEA,UAAM,OAAO,sBAAsB,SAAS,QAAQ;AACpD,QAAI,CAAC,KAAM;AAEX;AAAA,MACI;AAAA,QACI,UAAU,SAAS;AAAA,QACnB,QAAQ,aAAa,SAAS,QAAQ,IAAI;AAAA,QAC1C,MAAM,SAAS;AAAA,MAAA;AAAA,MAEnB,EAAE,SAAS,MAAM,OAAO,SAAS,MAAA;AAAA,IAAM;AAAA,EAE/C,GAAG,CAAC,UAAU,QAAQ,CAAC;AAC3B;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useLocation } from "react-router-dom";
|
|
3
|
+
import { lerRotaAjuda } from "./rotaAjuda.js";
|
|
4
|
+
const useRotaAjuda = () => {
|
|
5
|
+
const { search } = useLocation();
|
|
6
|
+
return useMemo(() => lerRotaAjuda(search), [search]);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
useRotaAjuda as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useRotaAjuda.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRotaAjuda.js","sources":["../../../../../lib/base/components/centralAjuda/rota/useRotaAjuda.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport { lerRotaAjuda } from './rotaAjuda'\n\n/** Rota atual do widget de ajuda (`null` = fechado), lida do parâmetro `?ajuda=` da URL. */\nconst useRotaAjuda = () => {\n const { search } = useLocation()\n return useMemo(() => lerRotaAjuda(search), [search])\n}\n\nexport default useRotaAjuda\n"],"names":[],"mappings":";;;AAKA,MAAM,eAAe,MAAM;AACvB,QAAM,EAAE,OAAA,IAAW,YAAA;AACnB,SAAO,QAAQ,MAAM,aAAa,MAAM,GAAG,CAAC,MAAM,CAAC;AACvD;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
import { persist } from "zustand/middleware";
|
|
3
|
+
const MODOS_CENTRAL_AJUDA = [
|
|
4
|
+
"flutuante",
|
|
5
|
+
"drawer",
|
|
6
|
+
"full"
|
|
7
|
+
];
|
|
8
|
+
const MODO_PADRAO = "flutuante";
|
|
9
|
+
const ehModoValido = (valor) => MODOS_CENTRAL_AJUDA.includes(valor);
|
|
10
|
+
const useCentralAjudaStore = create()(
|
|
11
|
+
persist(
|
|
12
|
+
(set) => ({
|
|
13
|
+
modo: MODO_PADRAO,
|
|
14
|
+
perguntaIa: "",
|
|
15
|
+
assuntoDuvida: "",
|
|
16
|
+
setModo: (modo) => set({ modo: ehModoValido(modo) ? modo : MODO_PADRAO }),
|
|
17
|
+
setPerguntaIa: (pergunta) => set({ perguntaIa: pergunta }),
|
|
18
|
+
consumirPerguntaIa: () => set({ perguntaIa: "" }),
|
|
19
|
+
setAssuntoDuvida: (assunto) => set({ assuntoDuvida: assunto })
|
|
20
|
+
}),
|
|
21
|
+
{
|
|
22
|
+
name: "central-ajuda",
|
|
23
|
+
version: 1,
|
|
24
|
+
partialize: (state) => ({ modo: state.modo }),
|
|
25
|
+
// Valor salvo desconhecido (corrompido, editado à mão ou de outra versão) volta ao padrão.
|
|
26
|
+
merge: (salvo, atual) => {
|
|
27
|
+
const modo = salvo?.modo;
|
|
28
|
+
return {
|
|
29
|
+
...atual,
|
|
30
|
+
modo: ehModoValido(modo) ? modo : MODO_PADRAO
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
export {
|
|
37
|
+
MODOS_CENTRAL_AJUDA,
|
|
38
|
+
useCentralAjudaStore
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=centralAjudaStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"centralAjudaStore.js","sources":["../../../../../lib/base/components/centralAjuda/store/centralAjudaStore.ts"],"sourcesContent":["import { create } from 'zustand'\nimport { persist } from 'zustand/middleware'\n\n/** Flutuante: card que não trava a página. Drawer: Drawer do Ecme (modal). Full: tela cheia. */\nexport type TCentralAjudaModo = 'flutuante' | 'drawer' | 'full'\n\nexport const MODOS_CENTRAL_AJUDA: TCentralAjudaModo[] = [\n 'flutuante',\n 'drawer',\n 'full',\n]\n\nconst MODO_PADRAO: TCentralAjudaModo = 'flutuante'\n\nconst ehModoValido = (valor: unknown): valor is TCentralAjudaModo =>\n MODOS_CENTRAL_AJUDA.includes(valor as TCentralAjudaModo)\n\nexport type CentralAjudaState = {\n modo: TCentralAjudaModo\n /** Pergunta enviada ao abrir o OrbeAI (consumida pela tela). */\n perguntaIa: string\n /** Assunto sugerido ao abrir o registro de dúvida. */\n assuntoDuvida: string\n}\n\ntype CentralAjudaAction = {\n setModo: (modo: TCentralAjudaModo) => void\n setPerguntaIa: (pergunta: string) => void\n consumirPerguntaIa: () => void\n setAssuntoDuvida: (assunto: string) => void\n}\n\n/**\n * Estado da Central de Ajuda que **não** é navegação.\n * A navegação (aberta, tela, busca, filtros, artigo) vive na URL: veja `rota/`.\n * Só o `modo` é lembrado no navegador (mesmo padrão do tema: persist do zustand no localStorage).\n */\nexport const useCentralAjudaStore = create<\n CentralAjudaState & CentralAjudaAction\n>()(\n persist(\n (set) => ({\n modo: MODO_PADRAO,\n perguntaIa: '',\n assuntoDuvida: '',\n setModo: (modo) =>\n set({ modo: ehModoValido(modo) ? modo : MODO_PADRAO }),\n setPerguntaIa: (pergunta) => set({ perguntaIa: pergunta }),\n consumirPerguntaIa: () => set({ perguntaIa: '' }),\n setAssuntoDuvida: (assunto) => set({ assuntoDuvida: assunto }),\n }),\n {\n name: 'central-ajuda',\n version: 1,\n partialize: (state) => ({ modo: state.modo }),\n // Valor salvo desconhecido (corrompido, editado à mão ou de outra versão) volta ao padrão.\n merge: (salvo, atual) => {\n const modo = (salvo as { modo?: unknown } | undefined)?.modo\n return {\n ...atual,\n modo: ehModoValido(modo) ? modo : MODO_PADRAO,\n }\n },\n },\n ),\n)\n"],"names":[],"mappings":";;AAMO,MAAM,sBAA2C;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AACJ;AAEA,MAAM,cAAiC;AAEvC,MAAM,eAAe,CAAC,UAClB,oBAAoB,SAAS,KAA0B;AAsBpD,MAAM,uBAAuB,OAAA;AAAA,EAGhC;AAAA,IACI,CAAC,SAAS;AAAA,MACN,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,SAAS,CAAC,SACN,IAAI,EAAE,MAAM,aAAa,IAAI,IAAI,OAAO,aAAa;AAAA,MACzD,eAAe,CAAC,aAAa,IAAI,EAAE,YAAY,UAAU;AAAA,MACzD,oBAAoB,MAAM,IAAI,EAAE,YAAY,IAAI;AAAA,MAChD,kBAAkB,CAAC,YAAY,IAAI,EAAE,eAAe,SAAS;AAAA,IAAA;AAAA,IAEjE;AAAA,MACI,MAAM;AAAA,MACN,SAAS;AAAA,MACT,YAAY,CAAC,WAAW,EAAE,MAAM,MAAM,KAAA;AAAA;AAAA,MAEtC,OAAO,CAAC,OAAO,UAAU;AACrB,cAAM,OAAQ,OAA0C;AACxD,eAAO;AAAA,UACH,GAAG;AAAA,UACH,MAAM,aAAa,IAAI,IAAI,OAAO;AAAA,QAAA;AAAA,MAE1C;AAAA,IAAA;AAAA,EACJ;AAER;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import { blobDoAnexoFaq } from "../../services/modules/faq/faqAnexo.js";
|
|
3
|
+
import { normalizarTextoFaq } from "../../services/modules/faq/faqTexto.js";
|
|
4
|
+
import { ICONES_CATEGORIA, ICONE_CATEGORIA_PADRAO, ICONES_TIPO } from "./constants.js";
|
|
5
|
+
const PREFIXO_I18N_CENTRAL_AJUDA = "base.centralAjuda";
|
|
6
|
+
const iconeDaCategoria = (nome) => ICONES_CATEGORIA[normalizarTextoFaq(nome).trim()] ?? ICONE_CATEGORIA_PADRAO;
|
|
7
|
+
const iconeDoConteudo = (item) => ICONES_TIPO[item.tipo];
|
|
8
|
+
const metaDoConteudo = (item) => [item.responsavelNome, dayjs(item.dataCriacao).format("DD/MM/YYYY")];
|
|
9
|
+
const rotuloDoAnexo = (t, anexo) => t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.anexoNumero`, {
|
|
10
|
+
numero: anexo.numero,
|
|
11
|
+
extensao: anexo.extensao.toUpperCase() || "?"
|
|
12
|
+
});
|
|
13
|
+
const nomeArquivoDoAnexo = (t, anexo) => {
|
|
14
|
+
const nome = t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.anexoArquivo`, {
|
|
15
|
+
numero: anexo.numero
|
|
16
|
+
});
|
|
17
|
+
return anexo.extensao ? `${nome}.${anexo.extensao}` : nome;
|
|
18
|
+
};
|
|
19
|
+
const tipoFileIcon = (extensao) => {
|
|
20
|
+
if (["xls", "xlsx", "csv"].includes(extensao)) return "xls";
|
|
21
|
+
if (["doc", "docx"].includes(extensao)) return "doc";
|
|
22
|
+
if (["ppt", "pptx"].includes(extensao)) return "ppt";
|
|
23
|
+
if (["pdf", "jpg", "jpeg", "png"].includes(extensao)) return extensao;
|
|
24
|
+
return "";
|
|
25
|
+
};
|
|
26
|
+
const salvarArquivo = (arquivo, nome) => {
|
|
27
|
+
const link = document.createElement("a");
|
|
28
|
+
link.href = URL.createObjectURL(blobDoAnexoFaq(arquivo));
|
|
29
|
+
link.download = nome || arquivo.fileName;
|
|
30
|
+
link.click();
|
|
31
|
+
URL.revokeObjectURL(link.href);
|
|
32
|
+
};
|
|
33
|
+
const textoContagem = (t, chave, quantidade) => quantidade === 1 ? t(`${PREFIXO_I18N_CENTRAL_AJUDA}.contagem.${chave}`) : t(`${PREFIXO_I18N_CENTRAL_AJUDA}.contagem.${chave}s`, {
|
|
34
|
+
quantidade
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
PREFIXO_I18N_CENTRAL_AJUDA,
|
|
38
|
+
iconeDaCategoria,
|
|
39
|
+
iconeDoConteudo,
|
|
40
|
+
metaDoConteudo,
|
|
41
|
+
nomeArquivoDoAnexo,
|
|
42
|
+
rotuloDoAnexo,
|
|
43
|
+
salvarArquivo,
|
|
44
|
+
textoContagem,
|
|
45
|
+
tipoFileIcon
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../lib/base/components/centralAjuda/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport type { TFunction } from 'i18next'\nimport type {\n TFaqAnexo,\n TFaqAnexoDownload,\n TFaqResumo,\n} from '@base/@types/models/faq/Faq'\nimport { blobDoAnexoFaq } from '@base/services/modules/faq/faqAnexo'\nimport { normalizarTextoFaq } from '@base/services/modules/faq/faqTexto'\nimport {\n ICONE_CATEGORIA_PADRAO,\n ICONES_CATEGORIA,\n ICONES_TIPO,\n} from './constants'\n\nexport const PREFIXO_I18N_CENTRAL_AJUDA = 'base.centralAjuda'\n\nexport const iconeDaCategoria = (nome?: string | null) =>\n ICONES_CATEGORIA[normalizarTextoFaq(nome).trim()] ?? ICONE_CATEGORIA_PADRAO\n\n/** Ícone da linha pelo tipo (a listagem do backend não traz categorias). */\nexport const iconeDoConteudo = (item: Pick<TFaqResumo, 'tipo'>) =>\n ICONES_TIPO[item.tipo]\n\n/** Detalhes da linha: \"Responsável • dd/mm/aaaa\" (campos do find-monitor). */\nexport const metaDoConteudo = (\n item: Pick<TFaqResumo, 'responsavelNome' | 'dataCriacao'>,\n) => [item.responsavelNome, dayjs(item.dataCriacao).format('DD/MM/YYYY')]\n\n/**\n * O backend não guarda o nome original do arquivo nem expõe a chave do object-storage,\n * então o anexo é exibido pelo número: \"Anexo 1 (PDF)\".\n */\nexport const rotuloDoAnexo = (t: TFunction, anexo: TFaqAnexo) =>\n t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.anexoNumero`, {\n numero: anexo.numero,\n extensao: anexo.extensao.toUpperCase() || '?',\n })\n\n/** Nome com que o anexo é salvo no computador: \"Anexo 1.pdf\". */\nexport const nomeArquivoDoAnexo = (t: TFunction, anexo: TFaqAnexo) => {\n const nome = t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.anexoArquivo`, {\n numero: anexo.numero,\n })\n return anexo.extensao ? `${nome}.${anexo.extensao}` : nome\n}\n\n/** Tipo aceito pelo `FileIcon` do template (ou vazio quando não há ícone). */\nexport const tipoFileIcon = (extensao: string) => {\n if (['xls', 'xlsx', 'csv'].includes(extensao)) return 'xls'\n if (['doc', 'docx'].includes(extensao)) return 'doc'\n if (['ppt', 'pptx'].includes(extensao)) return 'ppt'\n if (['pdf', 'jpg', 'jpeg', 'png'].includes(extensao)) return extensao\n return ''\n}\n\n/** Salva no navegador o anexo devolvido pelo backend-faq (bytes em base64). */\nexport const salvarArquivo = (arquivo: TFaqAnexoDownload, nome?: string) => {\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blobDoAnexoFaq(arquivo))\n link.download = nome || arquivo.fileName\n link.click()\n URL.revokeObjectURL(link.href)\n}\n\nexport const textoContagem = (\n t: TFunction,\n chave: 'resultado',\n quantidade: number,\n) =>\n quantidade === 1\n ? t(`${PREFIXO_I18N_CENTRAL_AJUDA}.contagem.${chave}`)\n : t(`${PREFIXO_I18N_CENTRAL_AJUDA}.contagem.${chave}s`, {\n quantidade,\n })\n"],"names":[],"mappings":";;;;AAeO,MAAM,6BAA6B;AAEnC,MAAM,mBAAmB,CAAC,SAC7B,iBAAiB,mBAAmB,IAAI,EAAE,KAAA,CAAM,KAAK;AAGlD,MAAM,kBAAkB,CAAC,SAC5B,YAAY,KAAK,IAAI;AAGlB,MAAM,iBAAiB,CAC1B,SACC,CAAC,KAAK,iBAAiB,MAAM,KAAK,WAAW,EAAE,OAAO,YAAY,CAAC;AAMjE,MAAM,gBAAgB,CAAC,GAAc,UACxC,EAAE,GAAG,0BAA0B,yBAAyB;AAAA,EACpD,QAAQ,MAAM;AAAA,EACd,UAAU,MAAM,SAAS,iBAAiB;AAC9C,CAAC;AAGE,MAAM,qBAAqB,CAAC,GAAc,UAAqB;AAClE,QAAM,OAAO,EAAE,GAAG,0BAA0B,0BAA0B;AAAA,IAClE,QAAQ,MAAM;AAAA,EAAA,CACjB;AACD,SAAO,MAAM,WAAW,GAAG,IAAI,IAAI,MAAM,QAAQ,KAAK;AAC1D;AAGO,MAAM,eAAe,CAAC,aAAqB;AAC9C,MAAI,CAAC,OAAO,QAAQ,KAAK,EAAE,SAAS,QAAQ,EAAG,QAAO;AACtD,MAAI,CAAC,OAAO,MAAM,EAAE,SAAS,QAAQ,EAAG,QAAO;AAC/C,MAAI,CAAC,OAAO,MAAM,EAAE,SAAS,QAAQ,EAAG,QAAO;AAC/C,MAAI,CAAC,OAAO,OAAO,QAAQ,KAAK,EAAE,SAAS,QAAQ,EAAG,QAAO;AAC7D,SAAO;AACX;AAGO,MAAM,gBAAgB,CAAC,SAA4B,SAAkB;AACxE,QAAM,OAAO,SAAS,cAAc,GAAG;AACvC,OAAK,OAAO,IAAI,gBAAgB,eAAe,OAAO,CAAC;AACvD,OAAK,WAAW,QAAQ,QAAQ;AAChC,OAAK,MAAA;AACL,MAAI,gBAAgB,KAAK,IAAI;AACjC;AAEO,MAAM,gBAAgB,CACzB,GACA,OACA,eAEA,eAAe,IACT,EAAE,GAAG,0BAA0B,aAAa,KAAK,EAAE,IACnD,EAAE,GAAG,0BAA0B,aAAa,KAAK,KAAK;AAAA,EAClD;AACJ,CAAC;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import BlocoInerte from "../../components/BlocoInerte.js";
|
|
3
|
+
import ConteudoArtigo from "./components/ConteudoArtigo.js";
|
|
4
|
+
import ConteudoLateral from "./components/ConteudoLateral.js";
|
|
5
|
+
import ConteudoTrilha from "./components/ConteudoTrilha.js";
|
|
6
|
+
const ConteudoDetalhe = ({
|
|
7
|
+
faq,
|
|
8
|
+
somenteLeitura,
|
|
9
|
+
origemAnexos,
|
|
10
|
+
onHome,
|
|
11
|
+
onCategoria,
|
|
12
|
+
children
|
|
13
|
+
}) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(BlocoInerte, { ativo: somenteLeitura, children: /* @__PURE__ */ jsx(
|
|
15
|
+
ConteudoTrilha,
|
|
16
|
+
{
|
|
17
|
+
categoria: faq?.categorias?.[0],
|
|
18
|
+
onHome,
|
|
19
|
+
onCategoria
|
|
20
|
+
}
|
|
21
|
+
) }),
|
|
22
|
+
children,
|
|
23
|
+
faq && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-start gap-10", children: [
|
|
24
|
+
/* @__PURE__ */ jsx(ConteudoArtigo, { faq, somenteLeitura }),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
ConteudoLateral,
|
|
27
|
+
{
|
|
28
|
+
faq,
|
|
29
|
+
somenteLeitura,
|
|
30
|
+
origemAnexos
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] })
|
|
34
|
+
] });
|
|
35
|
+
export {
|
|
36
|
+
ConteudoDetalhe as default
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=ConteudoDetalhe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoDetalhe.js","sources":["../../../../../../lib/base/components/centralAjuda/views/Conteudo/ConteudoDetalhe.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TFaq } from '@base/@types/models/faq/Faq'\nimport type { TOrigemAnexoFaq } from '@base/hooks/faq/useAnexoFaq'\nimport BlocoInerte from '../../components/BlocoInerte'\nimport ConteudoArtigo from './components/ConteudoArtigo'\nimport ConteudoLateral from './components/ConteudoLateral'\nimport ConteudoTrilha from './components/ConteudoTrilha'\n\ntype ConteudoDetalheProps = {\n /** Ausente enquanto carrega ou quando a busca falha. */\n faq?: TFaq\n /** Mesma tela, sem navegação nem envio de feedback (pré-visualização). */\n somenteLeitura?: boolean\n /** Endpoint dos anexos (padrão `central`); a pré-visualização do cadastro usa `cadastro`. */\n origemAnexos?: TOrigemAnexoFaq\n onHome?: () => void\n onCategoria?: (categoriaId: number) => void\n /** Estados de carregamento e erro, exibidos entre a trilha e o conteúdo. */\n children?: ReactNode\n}\n\n/**\n * Tela de um conteúdo da Central de Ajuda, só apresentação: recebe a FAQ pronta.\n * Usada pelo `ConteudoView` (Central) e pelo `CentralAjudaPreview` (cadastro de FAQ).\n */\nconst ConteudoDetalhe = ({\n faq,\n somenteLeitura,\n origemAnexos,\n onHome,\n onCategoria,\n children,\n}: ConteudoDetalheProps) => (\n <div className=\"flex flex-col gap-6\">\n <BlocoInerte ativo={somenteLeitura}>\n <ConteudoTrilha\n categoria={faq?.categorias?.[0]}\n onHome={onHome}\n onCategoria={onCategoria}\n />\n </BlocoInerte>\n\n {children}\n\n {faq && (\n <div className=\"flex flex-wrap items-start gap-10\">\n <ConteudoArtigo faq={faq} somenteLeitura={somenteLeitura} />\n <ConteudoLateral\n faq={faq}\n somenteLeitura={somenteLeitura}\n origemAnexos={origemAnexos}\n />\n </div>\n )}\n </div>\n)\n\nexport default ConteudoDetalhe\n"],"names":[],"mappings":";;;;;AAyBA,MAAM,kBAAkB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,MACI,qBAAC,OAAA,EAAI,WAAU,uBACX,UAAA;AAAA,EAAA,oBAAC,aAAA,EAAY,OAAO,gBAChB,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW,KAAK,aAAa,CAAC;AAAA,MAC9B;AAAA,MACA;AAAA,IAAA;AAAA,EAAA,GAER;AAAA,EAEC;AAAA,EAEA,OACG,qBAAC,OAAA,EAAI,WAAU,qCACX,UAAA;AAAA,IAAA,oBAAC,gBAAA,EAAe,KAAU,eAAA,CAAgC;AAAA,IAC1D;AAAA,MAAC;AAAA,MAAA;AAAA,QACG;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,EAAA,CACJ;AAAA,EAAA,CAER;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import "../../../../../@ecme/components/ui/Alert/index.js";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import useArtigoCentralAjuda from "../../../../hooks/faq/useArtigoCentralAjuda.js";
|
|
6
|
+
import ErroCarregamento from "../../components/ErroCarregamento.js";
|
|
7
|
+
import SkeletonConteudo from "../../components/SkeletonConteudo.js";
|
|
8
|
+
import useNavegarAjuda from "../../rota/useNavegarAjuda.js";
|
|
9
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../utils.js";
|
|
10
|
+
import ConteudoDetalhe from "./ConteudoDetalhe.js";
|
|
11
|
+
import Alert from "../../../../../@ecme/components/ui/Alert/Alert.js";
|
|
12
|
+
const ehNaoEncontrado = (erro) => erro?.response?.status === 404;
|
|
13
|
+
const ConteudoView = ({ identificador }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const { irParaInicio, abrirCategoria, abrirConteudo } = useNavegarAjuda();
|
|
16
|
+
const { faq, isLoading, error, mutate } = useArtigoCentralAjuda(identificador);
|
|
17
|
+
const identificadorAtual = faq?.identificador;
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (identificadorAtual && identificadorAtual !== identificador) {
|
|
20
|
+
abrirConteudo(
|
|
21
|
+
{ identificador: identificadorAtual },
|
|
22
|
+
{ substituir: true }
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}, [identificadorAtual, identificador, abrirConteudo]);
|
|
26
|
+
const naoEncontrado = ehNaoEncontrado(error);
|
|
27
|
+
return /* @__PURE__ */ jsxs(
|
|
28
|
+
ConteudoDetalhe,
|
|
29
|
+
{
|
|
30
|
+
faq,
|
|
31
|
+
onHome: irParaInicio,
|
|
32
|
+
onCategoria: abrirCategoria,
|
|
33
|
+
children: [
|
|
34
|
+
naoEncontrado && /* @__PURE__ */ jsx(Alert, { showIcon: true, type: "warning", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.naoEncontrado`) }),
|
|
35
|
+
error && !naoEncontrado && /* @__PURE__ */ jsx(ErroCarregamento, { onTentarNovamente: () => mutate() }),
|
|
36
|
+
isLoading && /* @__PURE__ */ jsx(SkeletonConteudo, {})
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
ConteudoView as default
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=ConteudoView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoView.js","sources":["../../../../../../lib/base/components/centralAjuda/views/Conteudo/ConteudoView.tsx"],"sourcesContent":["import { useEffect } from 'react'\nimport Alert from '@/components/ui/Alert'\nimport { useTranslation } from 'react-i18next'\nimport useArtigoCentralAjuda from '@base/hooks/faq/useArtigoCentralAjuda'\nimport ErroCarregamento from '../../components/ErroCarregamento'\nimport SkeletonConteudo from '../../components/SkeletonConteudo'\nimport useNavegarAjuda from '../../rota/useNavegarAjuda'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../utils'\nimport ConteudoDetalhe from './ConteudoDetalhe'\n\ntype ConteudoViewProps = {\n /** Identificador da rota `?ajuda=artigo/<identificador>` (`<slug>-<codigo>`). */\n identificador: string\n}\n\nconst ehNaoEncontrado = (erro: unknown) =>\n (erro as { response?: { status?: number } } | undefined)?.response\n ?.status === 404\n\n/**\n * Conteúdo aberto na Central, carregado pelo identificador da URL.\n * Se o título mudou desde que o link foi gerado, troca a URL pela atual sem criar entrada no histórico.\n */\nconst ConteudoView = ({ identificador }: ConteudoViewProps) => {\n const { t } = useTranslation()\n const { irParaInicio, abrirCategoria, abrirConteudo } = useNavegarAjuda()\n const { faq, isLoading, error, mutate } =\n useArtigoCentralAjuda(identificador)\n\n const identificadorAtual = faq?.identificador\n useEffect(() => {\n if (identificadorAtual && identificadorAtual !== identificador) {\n abrirConteudo(\n { identificador: identificadorAtual },\n { substituir: true },\n )\n }\n }, [identificadorAtual, identificador, abrirConteudo])\n\n const naoEncontrado = ehNaoEncontrado(error)\n\n return (\n <ConteudoDetalhe\n faq={faq}\n onHome={irParaInicio}\n onCategoria={abrirCategoria}\n >\n {naoEncontrado && (\n <Alert showIcon type=\"warning\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.naoEncontrado`)}\n </Alert>\n )}\n\n {error && !naoEncontrado && (\n <ErroCarregamento onTentarNovamente={() => mutate()} />\n )}\n\n {isLoading && <SkeletonConteudo />}\n </ConteudoDetalhe>\n )\n}\n\nexport default ConteudoView\n"],"names":[],"mappings":";;;;;;;;;;;AAeA,MAAM,kBAAkB,CAAC,SACpB,MAAyD,UACpD,WAAW;AAMrB,MAAM,eAAe,CAAC,EAAE,oBAAuC;AAC3D,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,EAAE,cAAc,gBAAgB,cAAA,IAAkB,gBAAA;AACxD,QAAM,EAAE,KAAK,WAAW,OAAO,OAAA,IAC3B,sBAAsB,aAAa;AAEvC,QAAM,qBAAqB,KAAK;AAChC,YAAU,MAAM;AACZ,QAAI,sBAAsB,uBAAuB,eAAe;AAC5D;AAAA,QACI,EAAE,eAAe,mBAAA;AAAA,QACjB,EAAE,YAAY,KAAA;AAAA,MAAK;AAAA,IAE3B;AAAA,EACJ,GAAG,CAAC,oBAAoB,eAAe,aAAa,CAAC;AAErD,QAAM,gBAAgB,gBAAgB,KAAK;AAE3C,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG;AAAA,MACA,QAAQ;AAAA,MACR,aAAa;AAAA,MAEZ,UAAA;AAAA,QAAA,iBACG,oBAAC,OAAA,EAAM,UAAQ,MAAC,MAAK,WAChB,UAAA,EAAE,GAAG,0BAA0B,yBAAyB,EAAA,CAC7D;AAAA,QAGH,SAAS,CAAC,iBACP,oBAAC,oBAAiB,mBAAmB,MAAM,UAAU;AAAA,QAGxD,iCAAc,kBAAA,CAAA,CAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5C;"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { Avatar } from "../../../../../../@ecme/components/ui/Avatar/index.js";
|
|
5
|
+
import "../../../../../../@ecme/components/ui/Button/index.js";
|
|
6
|
+
import "../../../../../../@ecme/components/ui/Notification/index.js";
|
|
7
|
+
import "../../../../../../@ecme/components/ui/toast/index.js";
|
|
8
|
+
import "../../../../../../@ecme/components/view/FileIcon/index.js";
|
|
9
|
+
import { TbFile, TbDownload } from "react-icons/tb";
|
|
10
|
+
import { useTranslation } from "react-i18next";
|
|
11
|
+
import useAnexoFaq from "../../../../../hooks/faq/useAnexoFaq.js";
|
|
12
|
+
import { ehImagemFaq } from "../../../../../services/modules/faq/faqAnexo.js";
|
|
13
|
+
import AnexoMoldura from "../../../components/AnexoMoldura.js";
|
|
14
|
+
import { ITEM_LATERAL } from "../../../constants.js";
|
|
15
|
+
import { rotuloDoAnexo, tipoFileIcon, salvarArquivo, nomeArquivoDoAnexo, PREFIXO_I18N_CENTRAL_AJUDA } from "../../../utils.js";
|
|
16
|
+
import toast from "../../../../../../@ecme/components/ui/toast/toast.js";
|
|
17
|
+
import Notification from "../../../../../../@ecme/components/ui/Notification/Notification.js";
|
|
18
|
+
import Button from "../../../../../../@ecme/components/ui/Button/Button.js";
|
|
19
|
+
import FileIcon from "../../../../../../@ecme/components/view/FileIcon/FileIcon.js";
|
|
20
|
+
const ConteudoAnexoItem = ({ faqId, anexo, origem }) => {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const [baixando, setBaixando] = useState(false);
|
|
23
|
+
const imagem = ehImagemFaq(anexo.extensao);
|
|
24
|
+
const { urlLocal, isLoading, error, obterArquivo } = useAnexoFaq({
|
|
25
|
+
faqId,
|
|
26
|
+
numero: anexo.numero,
|
|
27
|
+
origem,
|
|
28
|
+
carregarAoMontar: imagem
|
|
29
|
+
});
|
|
30
|
+
const nome = rotuloDoAnexo(t, anexo);
|
|
31
|
+
const tipoIcone = tipoFileIcon(anexo.extensao);
|
|
32
|
+
const baixar = async () => {
|
|
33
|
+
setBaixando(true);
|
|
34
|
+
try {
|
|
35
|
+
salvarArquivo(await obterArquivo(), nomeArquivoDoAnexo(t, anexo));
|
|
36
|
+
} catch {
|
|
37
|
+
toast.push(
|
|
38
|
+
/* @__PURE__ */ jsx(Notification, { type: "danger", duration: 3e3, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.downloadErro`, {
|
|
39
|
+
nome
|
|
40
|
+
}) }),
|
|
41
|
+
{ placement: "top-center" }
|
|
42
|
+
);
|
|
43
|
+
} finally {
|
|
44
|
+
setBaixando(false);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
48
|
+
imagem && /* @__PURE__ */ jsx(
|
|
49
|
+
AnexoMoldura,
|
|
50
|
+
{
|
|
51
|
+
src: urlLocal,
|
|
52
|
+
alt: nome,
|
|
53
|
+
carregando: isLoading,
|
|
54
|
+
erro: Boolean(error),
|
|
55
|
+
tipoIcone: tipoIcone || "png",
|
|
56
|
+
className: "mt-2"
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsxs(
|
|
60
|
+
Button,
|
|
61
|
+
{
|
|
62
|
+
block: true,
|
|
63
|
+
variant: "plain",
|
|
64
|
+
clickFeedback: false,
|
|
65
|
+
loading: baixando,
|
|
66
|
+
"aria-label": t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.baixar`, {
|
|
67
|
+
nome
|
|
68
|
+
}),
|
|
69
|
+
className: classNames("flex items-center gap-3", ITEM_LATERAL),
|
|
70
|
+
onClick: baixar,
|
|
71
|
+
children: [
|
|
72
|
+
tipoIcone ? /* @__PURE__ */ jsx(FileIcon, { type: tipoIcone, size: 36 }) : /* @__PURE__ */ jsx(Avatar, { size: 36, shape: "round", icon: /* @__PURE__ */ jsx(TbFile, {}) }),
|
|
73
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 grow break-words", children: nome }),
|
|
74
|
+
/* @__PURE__ */ jsx(TbDownload, { "aria-hidden": true, className: "shrink-0 text-lg" })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] });
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
ConteudoAnexoItem as default
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=ConteudoAnexoItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoAnexoItem.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexoItem.tsx"],"sourcesContent":["import { useState } from 'react'\nimport classNames from 'classnames'\nimport Avatar from '@/components/ui/Avatar'\nimport Button from '@/components/ui/Button'\nimport Notification from '@/components/ui/Notification'\nimport toast from '@/components/ui/toast'\nimport FileIcon from '@/components/view/FileIcon'\nimport { TbDownload, TbFile } from 'react-icons/tb'\nimport { useTranslation } from 'react-i18next'\nimport type { TFaqAnexo } from '@base/@types/models/faq/Faq'\nimport useAnexoFaq, { type TOrigemAnexoFaq } from '@base/hooks/faq/useAnexoFaq'\nimport { ehImagemFaq } from '@base/services/modules/faq/faqAnexo'\nimport AnexoMoldura from '../../../components/AnexoMoldura'\nimport { ITEM_LATERAL } from '../../../constants'\nimport {\n nomeArquivoDoAnexo,\n PREFIXO_I18N_CENTRAL_AJUDA,\n rotuloDoAnexo,\n salvarArquivo,\n tipoFileIcon,\n} from '../../../utils'\n\ntype ConteudoAnexoItemProps = {\n faqId: number\n anexo: TFaqAnexo\n origem: TOrigemAnexoFaq\n}\n\n/**\n * Um anexo do conteúdo. Imagem: carrega na abertura e aparece em moldura (o download reaproveita o que já veio).\n * Outros tipos: só baixam no clique.\n */\nconst ConteudoAnexoItem = ({ faqId, anexo, origem }: ConteudoAnexoItemProps) => {\n const { t } = useTranslation()\n const [baixando, setBaixando] = useState(false)\n const imagem = ehImagemFaq(anexo.extensao)\n const { urlLocal, isLoading, error, obterArquivo } = useAnexoFaq({\n faqId,\n numero: anexo.numero,\n origem,\n carregarAoMontar: imagem,\n })\n\n const nome = rotuloDoAnexo(t, anexo)\n const tipoIcone = tipoFileIcon(anexo.extensao)\n\n const baixar = async () => {\n setBaixando(true)\n try {\n salvarArquivo(await obterArquivo(), nomeArquivoDoAnexo(t, anexo))\n } catch {\n toast.push(\n <Notification type=\"danger\" duration={3000}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.downloadErro`, {\n nome,\n })}\n </Notification>,\n { placement: 'top-center' },\n )\n } finally {\n setBaixando(false)\n }\n }\n\n return (\n <div className=\"flex flex-col gap-1\">\n {imagem && (\n <AnexoMoldura\n src={urlLocal}\n alt={nome}\n carregando={isLoading}\n erro={Boolean(error)}\n tipoIcone={tipoIcone || 'png'}\n className=\"mt-2\"\n />\n )}\n <Button\n block\n variant=\"plain\"\n clickFeedback={false}\n loading={baixando}\n aria-label={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.baixar`, {\n nome,\n })}\n className={classNames('flex items-center gap-3', ITEM_LATERAL)}\n onClick={baixar}\n >\n {tipoIcone ? (\n <FileIcon type={tipoIcone} size={36} />\n ) : (\n <Avatar size={36} shape=\"round\" icon={<TbFile />} />\n )}\n <span className=\"min-w-0 grow break-words\">{nome}</span>\n <TbDownload aria-hidden className=\"shrink-0 text-lg\" />\n </Button>\n </div>\n )\n}\n\nexport default ConteudoAnexoItem\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAgCA,MAAM,oBAAoB,CAAC,EAAE,OAAO,OAAO,aAAqC;AAC5E,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,SAAS,YAAY,MAAM,QAAQ;AACzC,QAAM,EAAE,UAAU,WAAW,OAAO,aAAA,IAAiB,YAAY;AAAA,IAC7D;AAAA,IACA,QAAQ,MAAM;AAAA,IACd;AAAA,IACA,kBAAkB;AAAA,EAAA,CACrB;AAED,QAAM,OAAO,cAAc,GAAG,KAAK;AACnC,QAAM,YAAY,aAAa,MAAM,QAAQ;AAE7C,QAAM,SAAS,YAAY;AACvB,gBAAY,IAAI;AAChB,QAAI;AACA,oBAAc,MAAM,aAAA,GAAgB,mBAAmB,GAAG,KAAK,CAAC;AAAA,IACpE,QAAQ;AACJ,YAAM;AAAA,QACF,oBAAC,gBAAa,MAAK,UAAS,UAAU,KACjC,UAAA,EAAE,GAAG,0BAA0B,0BAA0B;AAAA,UACtD;AAAA,QAAA,CACH,GACL;AAAA,QACA,EAAE,WAAW,aAAA;AAAA,MAAa;AAAA,IAElC,UAAA;AACI,kBAAY,KAAK;AAAA,IACrB;AAAA,EACJ;AAEA,SACI,qBAAC,OAAA,EAAI,WAAU,uBACV,UAAA;AAAA,IAAA,UACG;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAK;AAAA,QACL,KAAK;AAAA,QACL,YAAY;AAAA,QACZ,MAAM,QAAQ,KAAK;AAAA,QACnB,WAAW,aAAa;AAAA,QACxB,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAGlB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,OAAK;AAAA,QACL,SAAQ;AAAA,QACR,eAAe;AAAA,QACf,SAAS;AAAA,QACT,cAAY,EAAE,GAAG,0BAA0B,oBAAoB;AAAA,UAC3D;AAAA,QAAA,CACH;AAAA,QACD,WAAW,WAAW,2BAA2B,YAAY;AAAA,QAC7D,SAAS;AAAA,QAER,UAAA;AAAA,UAAA,gCACI,UAAA,EAAS,MAAM,WAAW,MAAM,IAAI,IAErC,oBAAC,QAAA,EAAO,MAAM,IAAI,OAAM,SAAQ,MAAM,oBAAC,UAAO,GAAI;AAAA,UAEtD,oBAAC,QAAA,EAAK,WAAU,4BAA4B,UAAA,MAAK;AAAA,UACjD,oBAAC,YAAA,EAAW,eAAW,MAAC,WAAU,mBAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACzD,GACJ;AAER;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import "../../../../../../@ecme/components/ui/Card/index.js";
|
|
4
|
+
import { TITULO_SECAO } from "../../../constants.js";
|
|
5
|
+
import { ITEM_LATERAL } from "../../../constants.js";
|
|
6
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../../utils.js";
|
|
7
|
+
import ConteudoAnexoItem from "./ConteudoAnexoItem.js";
|
|
8
|
+
import Card from "../../../../../../@ecme/components/ui/Card/Card.js";
|
|
9
|
+
const ConteudoAnexos = ({
|
|
10
|
+
faqId,
|
|
11
|
+
anexos,
|
|
12
|
+
origem = "central"
|
|
13
|
+
}) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
return /* @__PURE__ */ jsxs(Card, { bodyClass: "flex flex-col gap-1", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("h2", { className: TITULO_SECAO, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.anexos`) }),
|
|
17
|
+
anexos.length === 0 && /* @__PURE__ */ jsx("p", { children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.semAnexos`) }),
|
|
18
|
+
anexos.map((anexo) => /* @__PURE__ */ jsx(
|
|
19
|
+
ConteudoAnexoItem,
|
|
20
|
+
{
|
|
21
|
+
faqId,
|
|
22
|
+
anexo,
|
|
23
|
+
origem
|
|
24
|
+
},
|
|
25
|
+
anexo.numero
|
|
26
|
+
))
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
ITEM_LATERAL,
|
|
31
|
+
TITULO_SECAO,
|
|
32
|
+
ConteudoAnexos as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ConteudoAnexos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoAnexos.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoAnexos.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport Card from '@/components/ui/Card'\nimport type { TFaqAnexo } from '@base/@types/models/faq/Faq'\nimport type { TOrigemAnexoFaq } from '@base/hooks/faq/useAnexoFaq'\nimport { TITULO_SECAO } from '../../../constants'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\nimport ConteudoAnexoItem from './ConteudoAnexoItem'\n\nexport { ITEM_LATERAL, TITULO_SECAO } from '../../../constants'\n\ntype ConteudoAnexosProps = {\n faqId: number\n anexos: TFaqAnexo[]\n /** Endpoint dos anexos: `central` (só publicado) ou `cadastro` (pré-visualização). */\n origem?: TOrigemAnexoFaq\n}\n\n/** Card de anexos do conteúdo: imagens aparecem em moldura; todos baixam pelo backend-faq. */\nconst ConteudoAnexos = ({\n faqId,\n anexos,\n origem = 'central',\n}: ConteudoAnexosProps) => {\n const { t } = useTranslation()\n\n return (\n <Card bodyClass=\"flex flex-col gap-1\">\n <h2 className={TITULO_SECAO}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.anexos`)}\n </h2>\n {anexos.length === 0 && (\n <p>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.semAnexos`)}\n </p>\n )}\n {anexos.map((anexo) => (\n <ConteudoAnexoItem\n key={anexo.numero}\n faqId={faqId}\n anexo={anexo}\n origem={origem}\n />\n ))}\n </Card>\n )\n}\n\nexport default ConteudoAnexos\n"],"names":[],"mappings":";;;;;;;;AAkBA,MAAM,iBAAiB,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA,SAAS;AACb,MAA2B;AACvB,QAAM,EAAE,EAAA,IAAM,eAAA;AAEd,SACI,qBAAC,MAAA,EAAK,WAAU,uBACZ,UAAA;AAAA,IAAA,oBAAC,QAAG,WAAW,cACV,YAAE,GAAG,0BAA0B,kBAAkB,EAAA,CACtD;AAAA,IACC,OAAO,WAAW,KACf,oBAAC,OACI,UAAA,EAAE,GAAG,0BAA0B,qBAAqB,EAAA,CACzD;AAAA,IAEH,OAAO,IAAI,CAAC,UACT;AAAA,MAAC;AAAA,MAAA;AAAA,QAEG;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAHK,MAAM;AAAA,IAAA,CAKlB;AAAA,EAAA,GACL;AAER;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import BlocoInerte from "../../../components/BlocoInerte.js";
|
|
3
|
+
import ConteudoHtml from "../../../components/ConteudoHtml.js";
|
|
4
|
+
import TipoFaqTag from "../../../components/TipoFaqTag.js";
|
|
5
|
+
import ConteudoFeedback from "./ConteudoFeedback.js";
|
|
6
|
+
const ConteudoArtigo = ({ faq, somenteLeitura }) => /* @__PURE__ */ jsxs("article", { className: "flex min-w-0 max-w-[800px] grow-[999] basis-[560px] flex-col gap-6", children: [
|
|
7
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TipoFaqTag, { tipo: faq.tipo }) }),
|
|
8
|
+
/* @__PURE__ */ jsx("h1", { className: "h3 text-balance", children: faq.titulo }),
|
|
9
|
+
/* @__PURE__ */ jsx(ConteudoHtml, { html: faq.conteudo }),
|
|
10
|
+
/* @__PURE__ */ jsx(BlocoInerte, { ativo: somenteLeitura, children: /* @__PURE__ */ jsx(ConteudoFeedback, { faqId: faq.id, titulo: faq.titulo }, faq.id) })
|
|
11
|
+
] });
|
|
12
|
+
export {
|
|
13
|
+
ConteudoArtigo as default
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=ConteudoArtigo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoArtigo.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoArtigo.tsx"],"sourcesContent":["import type { TFaq } from '@base/@types/models/faq/Faq'\nimport BlocoInerte from '../../../components/BlocoInerte'\nimport ConteudoHtml from '../../../components/ConteudoHtml'\nimport TipoFaqTag from '../../../components/TipoFaqTag'\nimport ConteudoFeedback from './ConteudoFeedback'\n\ntype ConteudoArtigoProps = {\n faq: TFaq\n /** Mostra o feedback sem permitir resposta (pré-visualização). */\n somenteLeitura?: boolean\n}\n\n/** Coluna principal do conteúdo: tipo, título, texto e \"Este conteúdo ajudou?\". */\nconst ConteudoArtigo = ({ faq, somenteLeitura }: ConteudoArtigoProps) => (\n <article className=\"flex min-w-0 max-w-[800px] grow-[999] basis-[560px] flex-col gap-6\">\n <div>\n <TipoFaqTag tipo={faq.tipo} />\n </div>\n <h1 className=\"h3 text-balance\">{faq.titulo}</h1>\n <ConteudoHtml html={faq.conteudo} />\n <BlocoInerte ativo={somenteLeitura}>\n <ConteudoFeedback key={faq.id} faqId={faq.id} titulo={faq.titulo} />\n </BlocoInerte>\n </article>\n)\n\nexport default ConteudoArtigo\n"],"names":[],"mappings":";;;;;AAaA,MAAM,iBAAiB,CAAC,EAAE,KAAK,qBAC3B,qBAAC,WAAA,EAAQ,WAAU,sEACf,UAAA;AAAA,EAAA,oBAAC,SACG,UAAA,oBAAC,YAAA,EAAW,MAAM,IAAI,MAAM,GAChC;AAAA,EACA,oBAAC,MAAA,EAAG,WAAU,mBAAmB,cAAI,QAAO;AAAA,EAC5C,oBAAC,cAAA,EAAa,MAAM,IAAI,SAAA,CAAU;AAAA,EAClC,oBAAC,aAAA,EAAY,OAAO,gBAChB,8BAAC,kBAAA,EAA8B,OAAO,IAAI,IAAI,QAAQ,IAAI,UAAnC,IAAI,EAAuC,EAAA,CACtE;AAAA,EAAA,CACJ;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import "../../../../../../@ecme/components/ui/Alert/index.js";
|
|
4
|
+
import "../../../../../../@ecme/components/ui/Button/index.js";
|
|
5
|
+
import "../../../../../../@ecme/components/ui/Card/index.js";
|
|
6
|
+
import { TbCheck, TbX } from "react-icons/tb";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import { centralAjudaService } from "../../../../../services/modules/faq/CentralAjudaService.js";
|
|
9
|
+
import useNavegarAjuda from "../../../rota/useNavegarAjuda.js";
|
|
10
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../../utils.js";
|
|
11
|
+
import Card from "../../../../../../@ecme/components/ui/Card/Card.js";
|
|
12
|
+
import Button from "../../../../../../@ecme/components/ui/Button/Button.js";
|
|
13
|
+
import Alert from "../../../../../../@ecme/components/ui/Alert/Alert.js";
|
|
14
|
+
const ConteudoFeedback = ({ faqId, titulo }) => {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
const { abrirOrbeAi, abrirDuvida } = useNavegarAjuda();
|
|
17
|
+
const [ajudou, setAjudou] = useState(null);
|
|
18
|
+
const responder = (valor) => {
|
|
19
|
+
if (ajudou === valor) return;
|
|
20
|
+
setAjudou(valor);
|
|
21
|
+
centralAjudaService.enviarFeedback({ faqId, ajudou: valor }).catch(() => void 0);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs(Card, { bordered: true, className: "mt-2", bodyClass: "flex flex-col gap-4", children: [
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("h2", { className: "h5", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.ajudou`) }),
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
Button,
|
|
29
|
+
{
|
|
30
|
+
"aria-pressed": ajudou === true,
|
|
31
|
+
icon: ajudou === true ? /* @__PURE__ */ jsx(TbCheck, {}) : void 0,
|
|
32
|
+
variant: ajudou === true ? "solid" : "default",
|
|
33
|
+
onClick: () => responder(true),
|
|
34
|
+
children: /* @__PURE__ */ jsx("span", { children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.sim`) })
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
Button,
|
|
39
|
+
{
|
|
40
|
+
"aria-pressed": ajudou === false,
|
|
41
|
+
icon: ajudou === false ? /* @__PURE__ */ jsx(TbX, {}) : void 0,
|
|
42
|
+
variant: ajudou === false ? "solid" : "default",
|
|
43
|
+
onClick: () => responder(false),
|
|
44
|
+
children: /* @__PURE__ */ jsx("span", { children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.nao`) })
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] })
|
|
48
|
+
] }),
|
|
49
|
+
ajudou === true && /* @__PURE__ */ jsx("div", { role: "status", children: /* @__PURE__ */ jsx(Alert, { showIcon: true, type: "success", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.obrigado`) }) }),
|
|
50
|
+
ajudou === false && /* @__PURE__ */ jsxs("div", { role: "status", className: "flex flex-col gap-3", children: [
|
|
51
|
+
/* @__PURE__ */ jsx("p", { className: "heading-text font-medium", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.quePena`) }),
|
|
52
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Button, { variant: "solid", onClick: () => abrirOrbeAi(), children: t(
|
|
54
|
+
`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.perguntarIa`
|
|
55
|
+
) }),
|
|
56
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => abrirDuvida(titulo), children: t(
|
|
57
|
+
`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.registrarDuvida`
|
|
58
|
+
) })
|
|
59
|
+
] })
|
|
60
|
+
] })
|
|
61
|
+
] });
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
ConteudoFeedback as default
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=ConteudoFeedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoFeedback.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoFeedback.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Alert from '@/components/ui/Alert'\nimport Button from '@/components/ui/Button'\nimport Card from '@/components/ui/Card'\nimport { TbCheck, TbX } from 'react-icons/tb'\nimport { useTranslation } from 'react-i18next'\nimport { centralAjudaService } from '@base/services/modules/faq/CentralAjudaService'\nimport useNavegarAjuda from '../../../rota/useNavegarAjuda'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\n\ntype ConteudoFeedbackProps = {\n faqId: number\n titulo: string\n}\n\n/**\n * \"Este conteúdo ajudou?\" no card do template (ArticleAction).\n * O estado é por conteúdo (use `key={faqId}`).\n */\nconst ConteudoFeedback = ({ faqId, titulo }: ConteudoFeedbackProps) => {\n const { t } = useTranslation()\n const { abrirOrbeAi, abrirDuvida } = useNavegarAjuda()\n const [ajudou, setAjudou] = useState<boolean | null>(null)\n\n const responder = (valor: boolean) => {\n if (ajudou === valor) return\n setAjudou(valor)\n centralAjudaService\n .enviarFeedback({ faqId, ajudou: valor })\n .catch(() => undefined)\n }\n\n return (\n <Card bordered className=\"mt-2\" bodyClass=\"flex flex-col gap-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <h2 className=\"h5\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.ajudou`)}\n </h2>\n <div className=\"flex gap-2\">\n <Button\n aria-pressed={ajudou === true}\n icon={ajudou === true ? <TbCheck /> : undefined}\n variant={ajudou === true ? 'solid' : 'default'}\n onClick={() => responder(true)}\n >\n <span>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.sim`)}\n </span>\n </Button>\n <Button\n aria-pressed={ajudou === false}\n icon={ajudou === false ? <TbX /> : undefined}\n variant={ajudou === false ? 'solid' : 'default'}\n onClick={() => responder(false)}\n >\n <span>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.nao`)}\n </span>\n </Button>\n </div>\n </div>\n\n {ajudou === true && (\n <div role=\"status\">\n <Alert showIcon type=\"success\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.obrigado`)}\n </Alert>\n </div>\n )}\n\n {ajudou === false && (\n <div role=\"status\" className=\"flex flex-col gap-3\">\n <p className=\"heading-text font-medium\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.quePena`)}\n </p>\n <div className=\"flex flex-wrap gap-2\">\n <Button variant=\"solid\" onClick={() => abrirOrbeAi()}>\n {t(\n `${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.perguntarIa`,\n )}\n </Button>\n <Button onClick={() => abrirDuvida(titulo)}>\n {t(\n `${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.registrarDuvida`,\n )}\n </Button>\n </div>\n </div>\n )}\n </Card>\n )\n}\n\nexport default ConteudoFeedback\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmBA,MAAM,mBAAmB,CAAC,EAAE,OAAO,aAAoC;AACnE,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,EAAE,aAAa,YAAA,IAAgB,gBAAA;AACrC,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAyB,IAAI;AAEzD,QAAM,YAAY,CAAC,UAAmB;AAClC,QAAI,WAAW,MAAO;AACtB,cAAU,KAAK;AACf,wBACK,eAAe,EAAE,OAAO,QAAQ,OAAO,EACvC,MAAM,MAAM,MAAS;AAAA,EAC9B;AAEA,8BACK,MAAA,EAAK,UAAQ,MAAC,WAAU,QAAO,WAAU,uBACtC,UAAA;AAAA,IAAA,qBAAC,OAAA,EAAI,WAAU,qDACX,UAAA;AAAA,MAAA,oBAAC,QAAG,WAAU,MACT,YAAE,GAAG,0BAA0B,kBAAkB,EAAA,CACtD;AAAA,MACA,qBAAC,OAAA,EAAI,WAAU,cACX,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,gBAAc,WAAW;AAAA,YACzB,MAAM,WAAW,OAAO,oBAAC,WAAQ,IAAK;AAAA,YACtC,SAAS,WAAW,OAAO,UAAU;AAAA,YACrC,SAAS,MAAM,UAAU,IAAI;AAAA,YAE7B,8BAAC,QAAA,EACI,UAAA,EAAE,GAAG,0BAA0B,eAAe,EAAA,CACnD;AAAA,UAAA;AAAA,QAAA;AAAA,QAEJ;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,gBAAc,WAAW;AAAA,YACzB,MAAM,WAAW,QAAQ,oBAAC,OAAI,IAAK;AAAA,YACnC,SAAS,WAAW,QAAQ,UAAU;AAAA,YACtC,SAAS,MAAM,UAAU,KAAK;AAAA,YAE9B,8BAAC,QAAA,EACI,UAAA,EAAE,GAAG,0BAA0B,eAAe,EAAA,CACnD;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ,EAAA,CACJ;AAAA,IAAA,GACJ;AAAA,IAEC,WAAW,QACR,oBAAC,OAAA,EAAI,MAAK,UACN,UAAA,oBAAC,OAAA,EAAM,UAAQ,MAAC,MAAK,WAChB,UAAA,EAAE,GAAG,0BAA0B,oBAAoB,GACxD,GACJ;AAAA,IAGH,WAAW,SACR,qBAAC,SAAI,MAAK,UAAS,WAAU,uBACzB,UAAA;AAAA,MAAA,oBAAC,OAAE,WAAU,4BACR,YAAE,GAAG,0BAA0B,mBAAmB,EAAA,CACvD;AAAA,MACA,qBAAC,OAAA,EAAI,WAAU,wBACX,UAAA;AAAA,QAAA,oBAAC,UAAO,SAAQ,SAAQ,SAAS,MAAM,eAClC,UAAA;AAAA,UACG,GAAG,0BAA0B;AAAA,QAAA,GAErC;AAAA,4BACC,QAAA,EAAO,SAAS,MAAM,YAAY,MAAM,GACpC,UAAA;AAAA,UACG,GAAG,0BAA0B;AAAA,QAAA,EACjC,CACJ;AAAA,MAAA,EAAA,CACJ;AAAA,IAAA,EAAA,CACJ;AAAA,EAAA,GAER;AAER;"}
|