@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,46 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import BlocoInerte from "../../../components/BlocoInerte.js";
|
|
4
|
+
import CtaAjudaCard from "../../../components/CtaAjudaCard.js";
|
|
5
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../../utils.js";
|
|
6
|
+
import ConteudoAnexos from "./ConteudoAnexos.js";
|
|
7
|
+
import ConteudoRelacionados from "./ConteudoRelacionados.js";
|
|
8
|
+
const ConteudoLateral = ({
|
|
9
|
+
faq,
|
|
10
|
+
somenteLeitura,
|
|
11
|
+
origemAnexos = "central"
|
|
12
|
+
}) => {
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
return /* @__PURE__ */ jsxs("aside", { className: "flex min-w-0 grow basis-[280px] flex-col gap-4", children: [
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
ConteudoAnexos,
|
|
17
|
+
{
|
|
18
|
+
faqId: faq.id,
|
|
19
|
+
anexos: faq.anexos ?? [],
|
|
20
|
+
origem: origemAnexos
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ jsxs(BlocoInerte, { ativo: somenteLeitura, children: [
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
ConteudoRelacionados,
|
|
26
|
+
{
|
|
27
|
+
faqId: faq.id,
|
|
28
|
+
categoriaId: faq.categorias?.[0]?.id
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
CtaAjudaCard,
|
|
33
|
+
{
|
|
34
|
+
titulo: t(
|
|
35
|
+
`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.aindaComDuvida`
|
|
36
|
+
),
|
|
37
|
+
assuntoDuvida: faq.titulo
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] })
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
ConteudoLateral as default
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=ConteudoLateral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoLateral.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoLateral.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { TFaq } from '@base/@types/models/faq/Faq'\nimport type { TOrigemAnexoFaq } from '@base/hooks/faq/useAnexoFaq'\nimport BlocoInerte from '../../../components/BlocoInerte'\nimport CtaAjudaCard from '../../../components/CtaAjudaCard'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\nimport ConteudoAnexos from './ConteudoAnexos'\nimport ConteudoRelacionados from './ConteudoRelacionados'\n\ntype ConteudoLateralProps = {\n faq: TFaq\n /** Mantém os anexos baixáveis, mas trava relacionados e atalhos (pré-visualização). */\n somenteLeitura?: boolean\n /** Endpoint dos anexos: `central` (só publicado) ou `cadastro` (pré-visualização de qualquer status). */\n origemAnexos?: TOrigemAnexoFaq\n}\n\n/** Coluna lateral do conteúdo: anexos, links relacionados e atalhos de ajuda. */\nconst ConteudoLateral = ({\n faq,\n somenteLeitura,\n origemAnexos = 'central',\n}: ConteudoLateralProps) => {\n const { t } = useTranslation()\n\n return (\n <aside className=\"flex min-w-0 grow basis-[280px] flex-col gap-4\">\n <ConteudoAnexos\n faqId={faq.id}\n anexos={faq.anexos ?? []}\n origem={origemAnexos}\n />\n <BlocoInerte ativo={somenteLeitura}>\n <ConteudoRelacionados\n faqId={faq.id}\n categoriaId={faq.categorias?.[0]?.id}\n />\n <CtaAjudaCard\n titulo={t(\n `${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.aindaComDuvida`,\n )}\n assuntoDuvida={faq.titulo}\n />\n </BlocoInerte>\n </aside>\n )\n}\n\nexport default ConteudoLateral\n"],"names":[],"mappings":";;;;;;;AAkBA,MAAM,kBAAkB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,eAAe;AACnB,MAA4B;AACxB,QAAM,EAAE,EAAA,IAAM,eAAA;AAEd,SACI,qBAAC,SAAA,EAAM,WAAU,kDACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,OAAO,IAAI;AAAA,QACX,QAAQ,IAAI,UAAU,CAAA;AAAA,QACtB,QAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,qBAAC,aAAA,EAAY,OAAO,gBAChB,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,OAAO,IAAI;AAAA,UACX,aAAa,IAAI,aAAa,CAAC,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtC;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,QAAQ;AAAA,YACJ,GAAG,0BAA0B;AAAA,UAAA;AAAA,UAEjC,eAAe,IAAI;AAAA,QAAA;AAAA,MAAA;AAAA,IACvB,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "../../../../../../@ecme/components/ui/Button/index.js";
|
|
3
|
+
import "../../../../../../@ecme/components/ui/Card/index.js";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import useFaqsPublicados from "../../../../../hooks/faq/useFaqsPublicados.js";
|
|
6
|
+
import SkeletonLinhas from "../../../components/SkeletonLinhas.js";
|
|
7
|
+
import { LIMITE_RELACIONADOS, TITULO_SECAO, ITEM_LATERAL } from "../../../constants.js";
|
|
8
|
+
import useNavegarAjuda from "../../../rota/useNavegarAjuda.js";
|
|
9
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../../utils.js";
|
|
10
|
+
import "./ConteudoAnexos.js";
|
|
11
|
+
import Card from "../../../../../../@ecme/components/ui/Card/Card.js";
|
|
12
|
+
import Button from "../../../../../../@ecme/components/ui/Button/Button.js";
|
|
13
|
+
const ConteudoRelacionados = ({
|
|
14
|
+
faqId,
|
|
15
|
+
categoriaId
|
|
16
|
+
}) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const { abrirConteudo } = useNavegarAjuda();
|
|
19
|
+
const { faqs, isLoading } = useFaqsPublicados(
|
|
20
|
+
categoriaId ? { categoriaId } : null
|
|
21
|
+
);
|
|
22
|
+
const relacionados = faqs.filter((faq) => faq.id !== faqId).slice(0, LIMITE_RELACIONADOS);
|
|
23
|
+
return /* @__PURE__ */ jsxs(Card, { bodyClass: "flex flex-col items-start gap-1", children: [
|
|
24
|
+
/* @__PURE__ */ jsx("h2", { className: TITULO_SECAO, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.relacionados`) }),
|
|
25
|
+
isLoading && /* @__PURE__ */ jsx(
|
|
26
|
+
SkeletonLinhas,
|
|
27
|
+
{
|
|
28
|
+
variante: "link",
|
|
29
|
+
quantidade: LIMITE_RELACIONADOS,
|
|
30
|
+
className: "w-full"
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
!isLoading && relacionados.length === 0 && /* @__PURE__ */ jsx("p", { children: t(
|
|
34
|
+
`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.semRelacionados`
|
|
35
|
+
) }),
|
|
36
|
+
relacionados.map((faq) => /* @__PURE__ */ jsx(
|
|
37
|
+
Button,
|
|
38
|
+
{
|
|
39
|
+
variant: "plain",
|
|
40
|
+
size: "sm",
|
|
41
|
+
className: ITEM_LATERAL,
|
|
42
|
+
onClick: () => abrirConteudo(faq),
|
|
43
|
+
children: faq.titulo
|
|
44
|
+
},
|
|
45
|
+
faq.id
|
|
46
|
+
))
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
ConteudoRelacionados as default
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=ConteudoRelacionados.js.map
|
package/dist/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoRelacionados.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoRelacionados.tsx"],"sourcesContent":["import Button from '@/components/ui/Button'\nimport Card from '@/components/ui/Card'\nimport { useTranslation } from 'react-i18next'\nimport useFaqsPublicados from '@base/hooks/faq/useFaqsPublicados'\nimport SkeletonLinhas from '../../../components/SkeletonLinhas'\nimport { LIMITE_RELACIONADOS } from '../../../constants'\nimport useNavegarAjuda from '../../../rota/useNavegarAjuda'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\nimport { ITEM_LATERAL, TITULO_SECAO } from './ConteudoAnexos'\n\ntype ConteudoRelacionadosProps = {\n faqId: number\n categoriaId?: number\n}\n\n/** Outros conteúdos publicados da mesma categoria (filtro `categoriaId` do find-monitor). */\nconst ConteudoRelacionados = ({\n faqId,\n categoriaId,\n}: ConteudoRelacionadosProps) => {\n const { t } = useTranslation()\n const { abrirConteudo } = useNavegarAjuda()\n const { faqs, isLoading } = useFaqsPublicados(\n categoriaId ? { categoriaId } : null,\n )\n\n const relacionados = faqs\n .filter((faq) => faq.id !== faqId)\n .slice(0, LIMITE_RELACIONADOS)\n\n return (\n <Card bodyClass=\"flex flex-col items-start gap-1\">\n <h2 className={TITULO_SECAO}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.relacionados`)}\n </h2>\n {isLoading && (\n <SkeletonLinhas\n variante=\"link\"\n quantidade={LIMITE_RELACIONADOS}\n className=\"w-full\"\n />\n )}\n {!isLoading && relacionados.length === 0 && (\n <p>\n {t(\n `${PREFIXO_I18N_CENTRAL_AJUDA}.conteudo.semRelacionados`,\n )}\n </p>\n )}\n {relacionados.map((faq) => (\n <Button\n key={faq.id}\n variant=\"plain\"\n size=\"sm\"\n className={ITEM_LATERAL}\n onClick={() => abrirConteudo(faq)}\n >\n {faq.titulo}\n </Button>\n ))}\n </Card>\n )\n}\n\nexport default ConteudoRelacionados\n"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,MAAM,uBAAuB,CAAC;AAAA,EAC1B;AAAA,EACA;AACJ,MAAiC;AAC7B,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,EAAE,cAAA,IAAkB,gBAAA;AAC1B,QAAM,EAAE,MAAM,UAAA,IAAc;AAAA,IACxB,cAAc,EAAE,gBAAgB;AAAA,EAAA;AAGpC,QAAM,eAAe,KAChB,OAAO,CAAC,QAAQ,IAAI,OAAO,KAAK,EAChC,MAAM,GAAG,mBAAmB;AAEjC,SACI,qBAAC,MAAA,EAAK,WAAU,mCACZ,UAAA;AAAA,IAAA,oBAAC,QAAG,WAAW,cACV,YAAE,GAAG,0BAA0B,wBAAwB,EAAA,CAC5D;AAAA,IACC,aACG;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,UAAS;AAAA,QACT,YAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAGjB,CAAC,aAAa,aAAa,WAAW,yBAClC,KAAA,EACI,UAAA;AAAA,MACG,GAAG,0BAA0B;AAAA,IAAA,GAErC;AAAA,IAEH,aAAa,IAAI,CAAC,QACf;AAAA,MAAC;AAAA,MAAA;AAAA,QAEG,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAW;AAAA,QACX,SAAS,MAAM,cAAc,GAAG;AAAA,QAE/B,UAAA,IAAI;AAAA,MAAA;AAAA,MANA,IAAI;AAAA,IAAA,CAQhB;AAAA,EAAA,GACL;AAER;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import "../../../../../../@ecme/components/ui/Button/index.js";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../../utils.js";
|
|
5
|
+
import Button from "../../../../../../@ecme/components/ui/Button/Button.js";
|
|
6
|
+
const LINK_TRILHA = "px-0 !font-medium text-gray-500 hover:text-primary dark:text-gray-400";
|
|
7
|
+
const ConteudoTrilha = ({
|
|
8
|
+
categoria,
|
|
9
|
+
onHome,
|
|
10
|
+
onCategoria
|
|
11
|
+
}) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
"nav",
|
|
15
|
+
{
|
|
16
|
+
"aria-label": t(`${PREFIXO_I18N_CENTRAL_AJUDA}.voceEstaEm`),
|
|
17
|
+
className: "flex flex-wrap items-center gap-2 text-gray-400",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
Button,
|
|
21
|
+
{
|
|
22
|
+
variant: "plain",
|
|
23
|
+
size: "sm",
|
|
24
|
+
className: LINK_TRILHA,
|
|
25
|
+
onClick: onHome,
|
|
26
|
+
children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.voltar`)
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
categoria && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "/" }),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
Button,
|
|
33
|
+
{
|
|
34
|
+
variant: "plain",
|
|
35
|
+
size: "sm",
|
|
36
|
+
className: LINK_TRILHA,
|
|
37
|
+
onClick: () => onCategoria?.(categoria.id),
|
|
38
|
+
children: categoria.nome
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
ConteudoTrilha as default
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ConteudoTrilha.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConteudoTrilha.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Conteudo/components/ConteudoTrilha.tsx"],"sourcesContent":["import Button from '@/components/ui/Button'\nimport { useTranslation } from 'react-i18next'\nimport type { TCategoriaFaq } from '@base/@types/models/faq/Faq'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\n\nconst LINK_TRILHA =\n 'px-0 !font-medium text-gray-500 hover:text-primary dark:text-gray-400'\n\ntype ConteudoTrilhaProps = {\n categoria?: TCategoriaFaq\n onHome?: () => void\n onCategoria?: (categoriaId: number) => void\n}\n\n/** Trilha \"Central de Ajuda / Categoria\" no topo do conteúdo. */\nconst ConteudoTrilha = ({\n categoria,\n onHome,\n onCategoria,\n}: ConteudoTrilhaProps) => {\n const { t } = useTranslation()\n\n return (\n <nav\n aria-label={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.voceEstaEm`)}\n className=\"flex flex-wrap items-center gap-2 text-gray-400\"\n >\n <Button\n variant=\"plain\"\n size=\"sm\"\n className={LINK_TRILHA}\n onClick={onHome}\n >\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.voltar`)}\n </Button>\n {categoria && (\n <>\n <span aria-hidden>/</span>\n <Button\n variant=\"plain\"\n size=\"sm\"\n className={LINK_TRILHA}\n onClick={() => onCategoria?.(categoria.id)}\n >\n {categoria.nome}\n </Button>\n </>\n )}\n </nav>\n )\n}\n\nexport default ConteudoTrilha\n"],"names":[],"mappings":";;;;;AAKA,MAAM,cACF;AASJ,MAAM,iBAAiB,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACJ,MAA2B;AACvB,QAAM,EAAE,EAAA,IAAM,eAAA;AAEd,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,cAAY,EAAE,GAAG,0BAA0B,aAAa;AAAA,MACxD,WAAU;AAAA,MAEV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,WAAW;AAAA,YACX,SAAS;AAAA,YAER,UAAA,EAAE,GAAG,0BAA0B,SAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAE5C,aACG,qBAAA,UAAA,EACI,UAAA;AAAA,UAAA,oBAAC,QAAA,EAAK,eAAW,MAAC,UAAA,KAAC;AAAA,UACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,WAAW;AAAA,cACX,SAAS,MAAM,cAAc,UAAU,EAAE;AAAA,cAExC,UAAA,UAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACf,EAAA,CACJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIhB;"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useMemo } from "react";
|
|
3
|
+
import { useForm, Controller } from "react-hook-form";
|
|
4
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
5
|
+
import "../../../../../@ecme/components/ui/Alert/index.js";
|
|
6
|
+
import "../../../../../@ecme/components/ui/Button/index.js";
|
|
7
|
+
import "../../../../../@ecme/components/ui/Card/index.js";
|
|
8
|
+
import { Form } from "../../../../../@ecme/components/ui/Form/Form.js";
|
|
9
|
+
import FormItem from "../../../../../@ecme/components/ui/Form/FormItem.js";
|
|
10
|
+
import "../../../../../@ecme/components/ui/Input/index.js";
|
|
11
|
+
import "../../../../../@ecme/components/ui/Select/index.js";
|
|
12
|
+
import { TbCircleCheck } from "react-icons/tb";
|
|
13
|
+
import { useTranslation } from "react-i18next";
|
|
14
|
+
import useCategoriasFaqDisponiveis from "../../../../hooks/faq/useCategoriasFaqDisponiveis.js";
|
|
15
|
+
import { centralAjudaService } from "../../../../services/modules/faq/CentralAjudaService.js";
|
|
16
|
+
import VoltarLink from "../../components/VoltarLink.js";
|
|
17
|
+
import { useCentralAjudaStore } from "../../store/centralAjudaStore.js";
|
|
18
|
+
import useNavegarAjuda from "../../rota/useNavegarAjuda.js";
|
|
19
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../utils.js";
|
|
20
|
+
import { criarDuvidaSchema } from "./duvidaSchema.js";
|
|
21
|
+
import Card from "../../../../../@ecme/components/ui/Card/Card.js";
|
|
22
|
+
import Input from "../../../../../@ecme/components/ui/Input/Input.js";
|
|
23
|
+
import Select from "../../../../../@ecme/components/ui/Select/Select.js";
|
|
24
|
+
import Alert from "../../../../../@ecme/components/ui/Alert/Alert.js";
|
|
25
|
+
import Button from "../../../../../@ecme/components/ui/Button/Button.js";
|
|
26
|
+
const DuvidaView = () => {
|
|
27
|
+
const { t } = useTranslation();
|
|
28
|
+
const { irParaInicio } = useNavegarAjuda();
|
|
29
|
+
const assuntoDuvida = useCentralAjudaStore((state) => state.assuntoDuvida);
|
|
30
|
+
const { categorias } = useCategoriasFaqDisponiveis();
|
|
31
|
+
const [enviada, setEnviada] = useState(null);
|
|
32
|
+
const [falhou, setFalhou] = useState(false);
|
|
33
|
+
const schema = useMemo(() => criarDuvidaSchema(t), [t]);
|
|
34
|
+
const valoresIniciais = {
|
|
35
|
+
assunto: assuntoDuvida,
|
|
36
|
+
categoriaId: null,
|
|
37
|
+
descricao: ""
|
|
38
|
+
};
|
|
39
|
+
const {
|
|
40
|
+
control,
|
|
41
|
+
handleSubmit,
|
|
42
|
+
reset,
|
|
43
|
+
formState: { errors, isSubmitting }
|
|
44
|
+
} = useForm({
|
|
45
|
+
resolver: zodResolver(schema),
|
|
46
|
+
defaultValues: valoresIniciais
|
|
47
|
+
});
|
|
48
|
+
const opcoesCategoria = categorias.map((categoria) => ({
|
|
49
|
+
value: categoria.id,
|
|
50
|
+
label: categoria.nome
|
|
51
|
+
}));
|
|
52
|
+
const enviar = async (dados) => {
|
|
53
|
+
setFalhou(false);
|
|
54
|
+
try {
|
|
55
|
+
await centralAjudaService.registrarDuvida(dados);
|
|
56
|
+
setEnviada(dados.assunto);
|
|
57
|
+
} catch {
|
|
58
|
+
setFalhou(true);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const novaDuvida = () => {
|
|
62
|
+
reset({ assunto: "", categoriaId: null, descricao: "" });
|
|
63
|
+
setEnviada(null);
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(VoltarLink, {}),
|
|
67
|
+
/* @__PURE__ */ jsx("h1", { className: "h3", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.titulo`) }),
|
|
68
|
+
enviada === null ? /* @__PURE__ */ jsx(Card, { bodyClass: "p-6 md:p-8", children: /* @__PURE__ */ jsxs(Form, { onSubmit: handleSubmit(enviar), children: [
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
FormItem,
|
|
71
|
+
{
|
|
72
|
+
asterisk: true,
|
|
73
|
+
label: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.assunto`),
|
|
74
|
+
htmlFor: "central-ajuda-duvida-assunto",
|
|
75
|
+
invalid: !!errors.assunto,
|
|
76
|
+
errorMessage: errors.assunto?.message,
|
|
77
|
+
children: /* @__PURE__ */ jsx(
|
|
78
|
+
Controller,
|
|
79
|
+
{
|
|
80
|
+
name: "assunto",
|
|
81
|
+
control,
|
|
82
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
83
|
+
Input,
|
|
84
|
+
{
|
|
85
|
+
...field,
|
|
86
|
+
id: "central-ajuda-duvida-assunto",
|
|
87
|
+
autoComplete: "off",
|
|
88
|
+
invalid: !!errors.assunto
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
FormItem,
|
|
97
|
+
{
|
|
98
|
+
label: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.categoria`),
|
|
99
|
+
children: /* @__PURE__ */ jsx(
|
|
100
|
+
Controller,
|
|
101
|
+
{
|
|
102
|
+
name: "categoriaId",
|
|
103
|
+
control,
|
|
104
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
105
|
+
Select,
|
|
106
|
+
{
|
|
107
|
+
isClearable: true,
|
|
108
|
+
options: opcoesCategoria,
|
|
109
|
+
placeholder: t(
|
|
110
|
+
`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.categoriaPlaceholder`
|
|
111
|
+
),
|
|
112
|
+
value: opcoesCategoria.find(
|
|
113
|
+
(opcao) => opcao.value === field.value
|
|
114
|
+
) ?? null,
|
|
115
|
+
onChange: (opcao) => field.onChange(opcao?.value ?? null)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
FormItem,
|
|
124
|
+
{
|
|
125
|
+
asterisk: true,
|
|
126
|
+
label: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.descricao`),
|
|
127
|
+
htmlFor: "central-ajuda-duvida-descricao",
|
|
128
|
+
invalid: !!errors.descricao,
|
|
129
|
+
errorMessage: errors.descricao?.message,
|
|
130
|
+
children: /* @__PURE__ */ jsx(
|
|
131
|
+
Controller,
|
|
132
|
+
{
|
|
133
|
+
name: "descricao",
|
|
134
|
+
control,
|
|
135
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
136
|
+
Input,
|
|
137
|
+
{
|
|
138
|
+
...field,
|
|
139
|
+
textArea: true,
|
|
140
|
+
rows: 6,
|
|
141
|
+
id: "central-ajuda-duvida-descricao",
|
|
142
|
+
placeholder: t(
|
|
143
|
+
`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.descricaoPlaceholder`
|
|
144
|
+
),
|
|
145
|
+
invalid: !!errors.descricao
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
falhou && /* @__PURE__ */ jsx(Alert, { showIcon: true, type: "danger", className: "mb-4", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.erro`) }),
|
|
153
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
154
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", variant: "solid", loading: isSubmitting, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.enviar`) }),
|
|
155
|
+
/* @__PURE__ */ jsx(Button, { type: "button", onClick: irParaInicio, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.cancelar`) })
|
|
156
|
+
] })
|
|
157
|
+
] }) }) : /* @__PURE__ */ jsxs(
|
|
158
|
+
Card,
|
|
159
|
+
{
|
|
160
|
+
role: "status",
|
|
161
|
+
className: "rounded-2xl",
|
|
162
|
+
bodyClass: "flex flex-col items-start gap-3 px-8 py-10",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ jsx(TbCircleCheck, { "aria-hidden": true, className: "text-4xl text-primary" }),
|
|
165
|
+
/* @__PURE__ */ jsx("h2", { className: "h4", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.sucessoTitulo`) }),
|
|
166
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-[56ch] text-gray-600 dark:text-gray-300", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.sucessoTexto`, {
|
|
167
|
+
assunto: enviada
|
|
168
|
+
}) }),
|
|
169
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap gap-2", children: [
|
|
170
|
+
/* @__PURE__ */ jsx(Button, { variant: "solid", onClick: irParaInicio, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.voltar`) }),
|
|
171
|
+
/* @__PURE__ */ jsx(Button, { onClick: novaDuvida, children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.outra`) })
|
|
172
|
+
] })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
] });
|
|
177
|
+
};
|
|
178
|
+
export {
|
|
179
|
+
DuvidaView as default
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=DuvidaView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DuvidaView.js","sources":["../../../../../../lib/base/components/centralAjuda/views/Duvida/DuvidaView.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { Controller, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport Alert from '@/components/ui/Alert'\nimport Button from '@/components/ui/Button'\nimport Card from '@/components/ui/Card'\nimport Form from '@/components/ui/Form/Form'\nimport FormItem from '@/components/ui/Form/FormItem'\nimport Input from '@/components/ui/Input'\nimport Select from '@/components/ui/Select'\nimport { TbCircleCheck } from 'react-icons/tb'\nimport { useTranslation } from 'react-i18next'\nimport useCategoriasFaqDisponiveis from '@base/hooks/faq/useCategoriasFaqDisponiveis'\nimport { centralAjudaService } from '@base/services/modules/faq/CentralAjudaService'\nimport VoltarLink from '../../components/VoltarLink'\nimport { useCentralAjudaStore } from '../../store/centralAjudaStore'\nimport useNavegarAjuda from '../../rota/useNavegarAjuda'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../utils'\nimport { criarDuvidaSchema, type TDuvidaForm } from './duvidaSchema'\n\ntype TOpcaoCategoria = { value: number; label: string }\n\nconst DuvidaView = () => {\n const { t } = useTranslation()\n const { irParaInicio } = useNavegarAjuda()\n const assuntoDuvida = useCentralAjudaStore((state) => state.assuntoDuvida)\n const { categorias } = useCategoriasFaqDisponiveis()\n\n const [enviada, setEnviada] = useState<string | null>(null)\n const [falhou, setFalhou] = useState(false)\n\n const schema = useMemo(() => criarDuvidaSchema(t), [t])\n const valoresIniciais: TDuvidaForm = {\n assunto: assuntoDuvida,\n categoriaId: null,\n descricao: '',\n }\n\n const {\n control,\n handleSubmit,\n reset,\n formState: { errors, isSubmitting },\n } = useForm<TDuvidaForm>({\n resolver: zodResolver(schema),\n defaultValues: valoresIniciais,\n })\n\n const opcoesCategoria: TOpcaoCategoria[] = categorias.map((categoria) => ({\n value: categoria.id,\n label: categoria.nome,\n }))\n\n const enviar = async (dados: TDuvidaForm) => {\n setFalhou(false)\n try {\n await centralAjudaService.registrarDuvida(dados)\n setEnviada(dados.assunto)\n } catch {\n setFalhou(true)\n }\n }\n\n const novaDuvida = () => {\n reset({ assunto: '', categoriaId: null, descricao: '' })\n setEnviada(null)\n }\n\n return (\n <div className=\"flex flex-col gap-5\">\n <VoltarLink />\n <h1 className=\"h3\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.titulo`)}\n </h1>\n\n {enviada === null ? (\n <Card bodyClass=\"p-6 md:p-8\">\n <Form onSubmit={handleSubmit(enviar)}>\n <FormItem\n asterisk\n label={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.assunto`)}\n htmlFor=\"central-ajuda-duvida-assunto\"\n invalid={!!errors.assunto}\n errorMessage={errors.assunto?.message}\n >\n <Controller\n name=\"assunto\"\n control={control}\n render={({ field }) => (\n <Input\n {...field}\n id=\"central-ajuda-duvida-assunto\"\n autoComplete=\"off\"\n invalid={!!errors.assunto}\n />\n )}\n />\n </FormItem>\n\n <FormItem\n label={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.categoria`)}\n >\n <Controller\n name=\"categoriaId\"\n control={control}\n render={({ field }) => (\n <Select<TOpcaoCategoria>\n isClearable\n options={opcoesCategoria}\n placeholder={t(\n `${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.categoriaPlaceholder`,\n )}\n value={\n opcoesCategoria.find(\n (opcao) => opcao.value === field.value,\n ) ?? null\n }\n onChange={(opcao) =>\n field.onChange(opcao?.value ?? null)\n }\n />\n )}\n />\n </FormItem>\n\n <FormItem\n asterisk\n label={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.descricao`)}\n htmlFor=\"central-ajuda-duvida-descricao\"\n invalid={!!errors.descricao}\n errorMessage={errors.descricao?.message}\n >\n <Controller\n name=\"descricao\"\n control={control}\n render={({ field }) => (\n <Input\n {...field}\n textArea\n rows={6}\n id=\"central-ajuda-duvida-descricao\"\n placeholder={t(\n `${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.descricaoPlaceholder`,\n )}\n invalid={!!errors.descricao}\n />\n )}\n />\n </FormItem>\n\n {falhou && (\n <Alert showIcon type=\"danger\" className=\"mb-4\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.erro`)}\n </Alert>\n )}\n\n <div className=\"flex flex-wrap gap-2\">\n <Button type=\"submit\" variant=\"solid\" loading={isSubmitting}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.enviar`)}\n </Button>\n <Button type=\"button\" onClick={irParaInicio}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.cancelar`)}\n </Button>\n </div>\n </Form>\n </Card>\n ) : (\n <Card\n role=\"status\"\n className=\"rounded-2xl\"\n bodyClass=\"flex flex-col items-start gap-3 px-8 py-10\"\n >\n <TbCircleCheck aria-hidden className=\"text-4xl text-primary\" />\n <h2 className=\"h4\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.sucessoTitulo`)}\n </h2>\n <p className=\"max-w-[56ch] text-gray-600 dark:text-gray-300\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.sucessoTexto`, {\n assunto: enviada,\n })}\n </p>\n <div className=\"mt-2 flex flex-wrap gap-2\">\n <Button variant=\"solid\" onClick={irParaInicio}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.voltar`)}\n </Button>\n <Button onClick={novaDuvida}>\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.outra`)}\n </Button>\n </div>\n </Card>\n )}\n </div>\n )\n}\n\nexport default DuvidaView\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,aAAa,MAAM;AACrB,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,EAAE,aAAA,IAAiB,gBAAA;AACzB,QAAM,gBAAgB,qBAAqB,CAAC,UAAU,MAAM,aAAa;AACzE,QAAM,EAAE,WAAA,IAAe,4BAAA;AAEvB,QAAM,CAAC,SAAS,UAAU,IAAI,SAAwB,IAAI;AAC1D,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,SAAS,QAAQ,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AACtD,QAAM,kBAA+B;AAAA,IACjC,SAAS;AAAA,IACT,aAAa;AAAA,IACb,WAAW;AAAA,EAAA;AAGf,QAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,EAAE,QAAQ,aAAA;AAAA,EAAa,IAClC,QAAqB;AAAA,IACrB,UAAU,YAAY,MAAM;AAAA,IAC5B,eAAe;AAAA,EAAA,CAClB;AAED,QAAM,kBAAqC,WAAW,IAAI,CAAC,eAAe;AAAA,IACtE,OAAO,UAAU;AAAA,IACjB,OAAO,UAAU;AAAA,EAAA,EACnB;AAEF,QAAM,SAAS,OAAO,UAAuB;AACzC,cAAU,KAAK;AACf,QAAI;AACA,YAAM,oBAAoB,gBAAgB,KAAK;AAC/C,iBAAW,MAAM,OAAO;AAAA,IAC5B,QAAQ;AACJ,gBAAU,IAAI;AAAA,IAClB;AAAA,EACJ;AAEA,QAAM,aAAa,MAAM;AACrB,UAAM,EAAE,SAAS,IAAI,aAAa,MAAM,WAAW,IAAI;AACvD,eAAW,IAAI;AAAA,EACnB;AAEA,SACI,qBAAC,OAAA,EAAI,WAAU,uBACX,UAAA;AAAA,IAAA,oBAAC,YAAA,EAAW;AAAA,IACZ,oBAAC,QAAG,WAAU,MACT,YAAE,GAAG,0BAA0B,gBAAgB,EAAA,CACpD;AAAA,IAEC,YAAY,OACT,oBAAC,MAAA,EAAK,WAAU,cACZ,UAAA,qBAAC,MAAA,EAAK,UAAU,aAAa,MAAM,GAC/B,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,UAAQ;AAAA,UACR,OAAO,EAAE,GAAG,0BAA0B,iBAAiB;AAAA,UACvD,SAAQ;AAAA,UACR,SAAS,CAAC,CAAC,OAAO;AAAA,UAClB,cAAc,OAAO,SAAS;AAAA,UAE9B,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,MAAK;AAAA,cACL;AAAA,cACA,QAAQ,CAAC,EAAE,MAAA,MACP;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACI,GAAG;AAAA,kBACJ,IAAG;AAAA,kBACH,cAAa;AAAA,kBACb,SAAS,CAAC,CAAC,OAAO;AAAA,gBAAA;AAAA,cAAA;AAAA,YACtB;AAAA,UAAA;AAAA,QAER;AAAA,MAAA;AAAA,MAGJ;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,OAAO,EAAE,GAAG,0BAA0B,mBAAmB;AAAA,UAEzD,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,MAAK;AAAA,cACL;AAAA,cACA,QAAQ,CAAC,EAAE,MAAA,MACP;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACG,aAAW;AAAA,kBACX,SAAS;AAAA,kBACT,aAAa;AAAA,oBACT,GAAG,0BAA0B;AAAA,kBAAA;AAAA,kBAEjC,OACI,gBAAgB;AAAA,oBACZ,CAAC,UAAU,MAAM,UAAU,MAAM;AAAA,kBAAA,KAChC;AAAA,kBAET,UAAU,CAAC,UACP,MAAM,SAAS,OAAO,SAAS,IAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YAE3C;AAAA,UAAA;AAAA,QAER;AAAA,MAAA;AAAA,MAGJ;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,UAAQ;AAAA,UACR,OAAO,EAAE,GAAG,0BAA0B,mBAAmB;AAAA,UACzD,SAAQ;AAAA,UACR,SAAS,CAAC,CAAC,OAAO;AAAA,UAClB,cAAc,OAAO,WAAW;AAAA,UAEhC,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,MAAK;AAAA,cACL;AAAA,cACA,QAAQ,CAAC,EAAE,MAAA,MACP;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACI,GAAG;AAAA,kBACJ,UAAQ;AAAA,kBACR,MAAM;AAAA,kBACN,IAAG;AAAA,kBACH,aAAa;AAAA,oBACT,GAAG,0BAA0B;AAAA,kBAAA;AAAA,kBAEjC,SAAS,CAAC,CAAC,OAAO;AAAA,gBAAA;AAAA,cAAA;AAAA,YACtB;AAAA,UAAA;AAAA,QAER;AAAA,MAAA;AAAA,MAGH,UACG,oBAAC,OAAA,EAAM,UAAQ,MAAC,MAAK,UAAS,WAAU,QACnC,UAAA,EAAE,GAAG,0BAA0B,cAAc,GAClD;AAAA,MAGJ,qBAAC,OAAA,EAAI,WAAU,wBACX,UAAA;AAAA,QAAA,oBAAC,QAAA,EAAO,MAAK,UAAS,SAAQ,SAAQ,SAAS,cAC1C,UAAA,EAAE,GAAG,0BAA0B,gBAAgB,GACpD;AAAA,QACA,oBAAC,QAAA,EAAO,MAAK,UAAS,SAAS,cAC1B,UAAA,EAAE,GAAG,0BAA0B,kBAAkB,EAAA,CACtD;AAAA,MAAA,EAAA,CACJ;AAAA,IAAA,EAAA,CACJ,GACJ,IAEA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,MAAK;AAAA,QACL,WAAU;AAAA,QACV,WAAU;AAAA,QAEV,UAAA;AAAA,UAAA,oBAAC,eAAA,EAAc,eAAW,MAAC,WAAU,yBAAwB;AAAA,UAC7D,oBAAC,QAAG,WAAU,MACT,YAAE,GAAG,0BAA0B,uBAAuB,EAAA,CAC3D;AAAA,8BACC,KAAA,EAAE,WAAU,iDACR,UAAA,EAAE,GAAG,0BAA0B,wBAAwB;AAAA,YACpD,SAAS;AAAA,UAAA,CACZ,GACL;AAAA,UACA,qBAAC,OAAA,EAAI,WAAU,6BACX,UAAA;AAAA,YAAA,oBAAC,QAAA,EAAO,SAAQ,SAAQ,SAAS,cAC5B,UAAA,EAAE,GAAG,0BAA0B,gBAAgB,EAAA,CACpD;AAAA,YACA,oBAAC,UAAO,SAAS,YACZ,YAAE,GAAG,0BAA0B,eAAe,EAAA,CACnD;AAAA,UAAA,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GAER;AAER;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../utils.js";
|
|
3
|
+
const criarDuvidaSchema = (t) => z.object({
|
|
4
|
+
assunto: z.string().trim().min(1, t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.assuntoObrigatorio`)).max(255),
|
|
5
|
+
categoriaId: z.number().nullable(),
|
|
6
|
+
descricao: z.string().trim().min(1, t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.descricaoObrigatoria`))
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
criarDuvidaSchema
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=duvidaSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duvidaSchema.js","sources":["../../../../../../lib/base/components/centralAjuda/views/Duvida/duvidaSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { TFunction } from 'i18next'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../utils'\n\nexport const criarDuvidaSchema = (t: TFunction) =>\n z.object({\n assunto: z\n .string()\n .trim()\n .min(1, t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.assuntoObrigatorio`))\n .max(255),\n categoriaId: z.number().nullable(),\n descricao: z\n .string()\n .trim()\n .min(1, t(`${PREFIXO_I18N_CENTRAL_AJUDA}.duvida.descricaoObrigatoria`)),\n })\n\nexport type TDuvidaForm = z.infer<ReturnType<typeof criarDuvidaSchema>>\n"],"names":[],"mappings":";;AAIO,MAAM,oBAAoB,CAAC,MAC9B,EAAE,OAAO;AAAA,EACL,SAAS,EACJ,OAAA,EACA,OACA,IAAI,GAAG,EAAE,GAAG,0BAA0B,4BAA4B,CAAC,EACnE,IAAI,GAAG;AAAA,EACZ,aAAa,EAAE,OAAA,EAAS,SAAA;AAAA,EACxB,WAAW,EACN,OAAA,EACA,KAAA,EACA,IAAI,GAAG,EAAE,GAAG,0BAA0B,8BAA8B,CAAC;AAC9E,CAAC;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import useCategoriasFaqDisponiveis from "../../../../hooks/faq/useCategoriasFaqDisponiveis.js";
|
|
5
|
+
import useFaqsPublicados from "../../../../hooks/faq/useFaqsPublicados.js";
|
|
6
|
+
import CtaAjudaCard from "../../components/CtaAjudaCard.js";
|
|
7
|
+
import ErroCarregamento from "../../components/ErroCarregamento.js";
|
|
8
|
+
import { LIMITE_MANUAIS_HOME, LIMITE_FAQS_HOME } from "../../constants.js";
|
|
9
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA } from "../../utils.js";
|
|
10
|
+
import CategoriasGrid from "./components/CategoriasGrid.js";
|
|
11
|
+
import FaqAccordion from "./components/FaqAccordion.js";
|
|
12
|
+
import HeroBusca from "./components/HeroBusca.js";
|
|
13
|
+
import ManuaisLista from "./components/ManuaisLista.js";
|
|
14
|
+
import ArtigosLista from "./components/ArtigosLista.js";
|
|
15
|
+
const HomeView = () => {
|
|
16
|
+
const { t } = useTranslation();
|
|
17
|
+
const conteudos = useFaqsPublicados({});
|
|
18
|
+
const categorias = useCategoriasFaqDisponiveis();
|
|
19
|
+
const manuais = useMemo(
|
|
20
|
+
() => conteudos.faqs.filter((faq) => faq.tipo === "MANUAL").slice(0, LIMITE_MANUAIS_HOME),
|
|
21
|
+
[conteudos.faqs]
|
|
22
|
+
);
|
|
23
|
+
const artigos = useMemo(
|
|
24
|
+
() => conteudos.faqs.filter((faq) => faq.tipo === "ARTIGO").slice(0, LIMITE_MANUAIS_HOME),
|
|
25
|
+
[conteudos.faqs]
|
|
26
|
+
);
|
|
27
|
+
const perguntas = useMemo(
|
|
28
|
+
() => conteudos.faqs.filter((faq) => faq.tipo === "FAQ").slice(0, LIMITE_FAQS_HOME),
|
|
29
|
+
[conteudos.faqs]
|
|
30
|
+
);
|
|
31
|
+
const erro = conteudos.error || categorias.error;
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-12", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(HeroBusca, {}),
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: "mx-auto px-4 pb-16 pt-6 sm:px-6", children: [
|
|
35
|
+
erro && /* @__PURE__ */ jsx(
|
|
36
|
+
ErroCarregamento,
|
|
37
|
+
{
|
|
38
|
+
onTentarNovamente: () => {
|
|
39
|
+
conteudos.mutate();
|
|
40
|
+
categorias.mutate();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
CategoriasGrid,
|
|
46
|
+
{
|
|
47
|
+
categorias: categorias.categorias,
|
|
48
|
+
carregando: categorias.isLoading || conteudos.isLoading
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ jsx(ManuaisLista, { manuais, carregando: conteudos.isLoading }),
|
|
52
|
+
/* @__PURE__ */ jsx(ArtigosLista, { artigos, carregando: conteudos.isLoading }),
|
|
53
|
+
/* @__PURE__ */ jsxs("section", { className: "flex flex-wrap items-start gap-8", children: [
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 grow-[999] basis-[520px] flex-col gap-2", children: [
|
|
55
|
+
/* @__PURE__ */ jsx("h2", { className: "h3", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.perguntasFrequentes`) }),
|
|
56
|
+
!conteudos.isLoading && perguntas.length === 0 ? /* @__PURE__ */ jsx("p", { className: "py-4", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.semConteudo`) }) : /* @__PURE__ */ jsx(
|
|
57
|
+
FaqAccordion,
|
|
58
|
+
{
|
|
59
|
+
faqs: perguntas,
|
|
60
|
+
carregando: conteudos.isLoading
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
CtaAjudaCard,
|
|
66
|
+
{
|
|
67
|
+
className: "min-w-0 grow basis-[300px]",
|
|
68
|
+
titulo: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.titulo`),
|
|
69
|
+
texto: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.texto`)
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] })
|
|
73
|
+
] })
|
|
74
|
+
] });
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
HomeView as default
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=HomeView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeView.js","sources":["../../../../../../lib/base/components/centralAjuda/views/Home/HomeView.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport useCategoriasFaqDisponiveis from '@base/hooks/faq/useCategoriasFaqDisponiveis'\nimport useFaqsPublicados from '@base/hooks/faq/useFaqsPublicados'\nimport CtaAjudaCard from '../../components/CtaAjudaCard'\nimport ErroCarregamento from '../../components/ErroCarregamento'\nimport { LIMITE_FAQS_HOME, LIMITE_MANUAIS_HOME } from '../../constants'\nimport { PREFIXO_I18N_CENTRAL_AJUDA } from '../../utils'\nimport CategoriasGrid from './components/CategoriasGrid'\nimport FaqAccordion from './components/FaqAccordion'\nimport HeroBusca from './components/HeroBusca'\nimport ManuaisLista from './components/ManuaisLista'\nimport ArtigosLista from './components/ArtigosLista'\n\nconst HomeView = () => {\n const { t } = useTranslation()\n const conteudos = useFaqsPublicados({})\n const categorias = useCategoriasFaqDisponiveis()\n\n const manuais = useMemo(\n () =>\n conteudos.faqs\n .filter((faq) => faq.tipo === 'MANUAL')\n .slice(0, LIMITE_MANUAIS_HOME),\n [conteudos.faqs],\n )\n\n const artigos = useMemo(\n () =>\n conteudos.faqs\n .filter((faq) => faq.tipo === 'ARTIGO')\n .slice(0, LIMITE_MANUAIS_HOME),\n [conteudos.faqs],\n )\n\n\n const perguntas = useMemo(\n () =>\n conteudos.faqs\n .filter((faq) => faq.tipo === 'FAQ')\n .slice(0, LIMITE_FAQS_HOME),\n [conteudos.faqs],\n )\n\n const erro = conteudos.error || categorias.error\n\n return (\n <div className=\"flex flex-col gap-12\">\n <HeroBusca />\n <div className=\"mx-auto px-4 pb-16 pt-6 sm:px-6\">\n {erro && (\n <ErroCarregamento\n onTentarNovamente={() => {\n conteudos.mutate()\n categorias.mutate()\n }}\n />\n )}\n\n <CategoriasGrid\n categorias={categorias.categorias}\n carregando={categorias.isLoading || conteudos.isLoading}\n />\n\n <ManuaisLista manuais={manuais} carregando={conteudos.isLoading} />\n\n <ArtigosLista artigos={artigos} carregando={conteudos.isLoading}/>\n\n <section className=\"flex flex-wrap items-start gap-8\">\n <div className=\"flex min-w-0 grow-[999] basis-[520px] flex-col gap-2\">\n <h2 className=\"h3\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.perguntasFrequentes`)}\n </h2>\n {!conteudos.isLoading && perguntas.length === 0 ? (\n <p className=\"py-4\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.semConteudo`)}\n </p>\n ) : (\n <FaqAccordion\n faqs={perguntas}\n carregando={conteudos.isLoading}\n />\n )}\n </div>\n <CtaAjudaCard\n className=\"min-w-0 grow basis-[300px]\"\n titulo={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.titulo`)}\n texto={t(`${PREFIXO_I18N_CENTRAL_AJUDA}.naoEncontrou.texto`)}\n />\n </section>\n </div>\n </div>\n )\n}\n\nexport default HomeView\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,WAAW,MAAM;AACnB,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,YAAY,kBAAkB,EAAE;AACtC,QAAM,aAAa,4BAAA;AAEnB,QAAM,UAAU;AAAA,IACZ,MACI,UAAU,KACL,OAAO,CAAC,QAAQ,IAAI,SAAS,QAAQ,EACrC,MAAM,GAAG,mBAAmB;AAAA,IACrC,CAAC,UAAU,IAAI;AAAA,EAAA;AAGnB,QAAM,UAAU;AAAA,IACZ,MACI,UAAU,KACL,OAAO,CAAC,QAAQ,IAAI,SAAS,QAAQ,EACrC,MAAM,GAAG,mBAAmB;AAAA,IACrC,CAAC,UAAU,IAAI;AAAA,EAAA;AAInB,QAAM,YAAY;AAAA,IACd,MACI,UAAU,KACL,OAAO,CAAC,QAAQ,IAAI,SAAS,KAAK,EAClC,MAAM,GAAG,gBAAgB;AAAA,IAClC,CAAC,UAAU,IAAI;AAAA,EAAA;AAGnB,QAAM,OAAO,UAAU,SAAS,WAAW;AAE3C,SACI,qBAAC,OAAA,EAAI,WAAU,wBACX,UAAA;AAAA,IAAA,oBAAC,WAAA,EAAU;AAAA,IACf,qBAAC,OAAA,EAAI,WAAU,mCACV,UAAA;AAAA,MAAA,QACG;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,mBAAmB,MAAM;AACrB,sBAAU,OAAA;AACV,uBAAW,OAAA;AAAA,UACf;AAAA,QAAA;AAAA,MAAA;AAAA,MAIR;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,YAAY,WAAW;AAAA,UACvB,YAAY,WAAW,aAAa,UAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAGlD,oBAAC,cAAA,EAAa,SAAkB,YAAY,UAAU,WAAW;AAAA,MAEjE,oBAAC,cAAA,EAAa,SAAkB,YAAY,UAAU,WAAU;AAAA,MAEhE,qBAAC,WAAA,EAAQ,WAAU,oCACf,UAAA;AAAA,QAAA,qBAAC,OAAA,EAAI,WAAU,wDACX,UAAA;AAAA,UAAA,oBAAC,QAAG,WAAU,MACT,YAAE,GAAG,0BAA0B,2BAA2B,EAAA,CAC/D;AAAA,UACC,CAAC,UAAU,aAAa,UAAU,WAAW,IAC1C,oBAAC,KAAA,EAAE,WAAU,QACR,UAAA,EAAE,GAAG,0BAA0B,mBAAmB,GACvD,IAEA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,MAAM;AAAA,cACN,YAAY,UAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1B,GAER;AAAA,QACA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAU;AAAA,YACV,QAAQ,EAAE,GAAG,0BAA0B,sBAAsB;AAAA,YAC7D,OAAO,EAAE,GAAG,0BAA0B,qBAAqB;AAAA,UAAA;AAAA,QAAA;AAAA,MAC/D,EAAA,CACJ;AAAA,IAAA,EAAA,CACA;AAAA,EAAA,GACJ;AAER;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "../../../../../../@ecme/components/ui/Button/index.js";
|
|
3
|
+
import { LuFileText } from "react-icons/lu";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import LinhaConteudo from "../../../components/LinhaConteudo.js";
|
|
6
|
+
import SkeletonLinhas from "../../../components/SkeletonLinhas.js";
|
|
7
|
+
import { LIMITE_MANUAIS_HOME } from "../../../constants.js";
|
|
8
|
+
import useNavegarAjuda from "../../../rota/useNavegarAjuda.js";
|
|
9
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA, metaDoConteudo } from "../../../utils.js";
|
|
10
|
+
import Button from "../../../../../../@ecme/components/ui/Button/Button.js";
|
|
11
|
+
const ArtigosLista = ({ artigos, carregando }) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const { abrirConteudo, verTipo } = useNavegarAjuda();
|
|
14
|
+
if (!carregando && artigos.length === 0) return null;
|
|
15
|
+
return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-2 pt-12", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("h2", { className: "h3", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.artigos`) }),
|
|
17
|
+
carregando ? /* @__PURE__ */ jsx(SkeletonLinhas, { quantidade: LIMITE_MANUAIS_HOME }) : /* @__PURE__ */ jsx("ul", { className: "divide-y divide-gray-200 dark:divide-gray-700", children: artigos.map((manual) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
18
|
+
LinhaConteudo,
|
|
19
|
+
{
|
|
20
|
+
icone: LuFileText,
|
|
21
|
+
titulo: manual.titulo,
|
|
22
|
+
meta: metaDoConteudo(manual),
|
|
23
|
+
onClick: () => abrirConteudo(manual)
|
|
24
|
+
}
|
|
25
|
+
) }, manual.id)) }),
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-end justify-end gap-4", children: /* @__PURE__ */ jsx(
|
|
27
|
+
Button,
|
|
28
|
+
{
|
|
29
|
+
variant: "plain",
|
|
30
|
+
size: "sm",
|
|
31
|
+
className: "px-0 text-primary",
|
|
32
|
+
onClick: () => verTipo("ARTIGO"),
|
|
33
|
+
children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.verTodosArtigos`)
|
|
34
|
+
}
|
|
35
|
+
) })
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
ArtigosLista as default
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=ArtigosLista.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArtigosLista.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Home/components/ArtigosLista.tsx"],"sourcesContent":["import Button from '@/components/ui/Button'\nimport { LuBookOpenText, LuFileText, LuNotebookTabs } from 'react-icons/lu'\nimport { useTranslation } from 'react-i18next'\nimport type { TFaqResumo } from '@base/@types/models/faq/Faq'\nimport LinhaConteudo from '../../../components/LinhaConteudo'\nimport SkeletonLinhas from '../../../components/SkeletonLinhas'\nimport { LIMITE_MANUAIS_HOME } from '../../../constants'\nimport useNavegarAjuda from '../../../rota/useNavegarAjuda'\nimport { metaDoConteudo, PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\n\n\ntype ArtigosListaProps = {\n artigos: TFaqResumo[]\n carregando: boolean\n}\n\n/** artigos em linhas, no estilo \"Popular Articles\" do Support Hub. */\nconst ArtigosLista = ({ artigos, carregando }: ArtigosListaProps) => {\n const { t } = useTranslation()\n const { abrirConteudo, verTipo } = useNavegarAjuda()\n\n if (!carregando && artigos.length === 0) return null\n\n return (\n <section className=\"flex flex-col gap-2 pt-12\">\n <h2 className=\"h3\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.artigos`)}\n </h2>\n {carregando ? (\n <SkeletonLinhas quantidade={LIMITE_MANUAIS_HOME} />\n ) : (\n <ul className=\"divide-y divide-gray-200 dark:divide-gray-700\">\n {artigos.map((manual) => (\n <li key={manual.id}>\n <LinhaConteudo\n icone={LuFileText}\n titulo={manual.titulo}\n meta={metaDoConteudo(manual)}\n onClick={() => abrirConteudo(manual)}\n />\n </li>\n ))}\n </ul>\n )}\n\n <div className=\"flex flex-wrap items-end justify-end gap-4\">\n <Button\n variant=\"plain\"\n size=\"sm\"\n className=\"px-0 text-primary\"\n onClick={() => verTipo('ARTIGO')}\n >\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.verTodosArtigos`)}\n </Button>\n </div>\n </section>\n )\n}\n\nexport default ArtigosLista\n"],"names":[],"mappings":";;;;;;;;;;AAiBA,MAAM,eAAe,CAAC,EAAE,SAAS,iBAAoC;AACjE,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,EAAE,eAAe,QAAA,IAAY,gBAAA;AAEnC,MAAI,CAAC,cAAc,QAAQ,WAAW,EAAG,QAAO;AAEhD,SACI,qBAAC,WAAA,EAAQ,WAAU,6BACf,UAAA;AAAA,IAAA,oBAAC,QAAG,WAAU,MACT,YAAE,GAAG,0BAA0B,eAAe,EAAA,CACnD;AAAA,IACC,aACG,oBAAC,gBAAA,EAAe,YAAY,qBAAqB,IAEjD,oBAAC,MAAA,EAAG,WAAU,iDACT,UAAA,QAAQ,IAAI,CAAC,+BACT,MAAA,EACG,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,OAAO;AAAA,QACP,QAAQ,OAAO;AAAA,QACf,MAAM,eAAe,MAAM;AAAA,QAC3B,SAAS,MAAM,cAAc,MAAM;AAAA,MAAA;AAAA,IAAA,EACvC,GANK,OAAO,EAOhB,CACH,GACL;AAAA,IAGJ,oBAAC,OAAA,EAAI,WAAU,8CACX,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QACV,SAAS,MAAM,QAAQ,QAAQ;AAAA,QAE9B,UAAA,EAAE,GAAG,0BAA0B,uBAAuB;AAAA,MAAA;AAAA,IAAA,EAC3D,CACJ;AAAA,EAAA,GACJ;AAER;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { Avatar } from "../../../../../../@ecme/components/ui/Avatar/index.js";
|
|
4
|
+
import "../../../../../../@ecme/components/ui/Skeleton/index.js";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import CartaoClicavel from "../../../components/CartaoClicavel.js";
|
|
7
|
+
import useNavegarAjuda from "../../../rota/useNavegarAjuda.js";
|
|
8
|
+
import { PREFIXO_I18N_CENTRAL_AJUDA, iconeDaCategoria } from "../../../utils.js";
|
|
9
|
+
import Skeleton from "../../../../../../@ecme/components/ui/Skeleton/Skeleton.js";
|
|
10
|
+
const NO_HOVER = "transition-colors group-hover:text-neutral";
|
|
11
|
+
const CategoriasGrid = ({ categorias, carregando }) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const { abrirCategoria } = useNavegarAjuda();
|
|
14
|
+
return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-6", children: [
|
|
15
|
+
/* @__PURE__ */ jsx("h2", { className: "h3", children: t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.categorias`) }),
|
|
16
|
+
/* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
style: {
|
|
20
|
+
display: "grid",
|
|
21
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
|
|
22
|
+
gap: "1rem"
|
|
23
|
+
},
|
|
24
|
+
children: [
|
|
25
|
+
carregando && Array.from({ length: 6 }).map((_, indice) => /* @__PURE__ */ jsx(Skeleton, { height: 160, className: "rounded-xl" }, indice)),
|
|
26
|
+
!carregando && categorias.map((categoria) => {
|
|
27
|
+
const Icone = iconeDaCategoria(categoria.nome);
|
|
28
|
+
return /* @__PURE__ */ jsxs(
|
|
29
|
+
CartaoClicavel,
|
|
30
|
+
{
|
|
31
|
+
variante: "tile",
|
|
32
|
+
onClick: () => abrirCategoria(categoria.id),
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
Avatar,
|
|
36
|
+
{
|
|
37
|
+
size: 56,
|
|
38
|
+
shape: "circle",
|
|
39
|
+
className: "bg-neutral text-primary transition-colors group-hover:bg-white/25 group-hover:text-neutral",
|
|
40
|
+
icon: /* @__PURE__ */ jsx(Icone, {})
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: classNames("h5 mt-3", NO_HOVER), children: categoria.nome })
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
categoria.id
|
|
47
|
+
);
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
CategoriasGrid as default
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=CategoriasGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoriasGrid.js","sources":["../../../../../../../lib/base/components/centralAjuda/views/Home/components/CategoriasGrid.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport Avatar from '@/components/ui/Avatar'\nimport Skeleton from '@/components/ui/Skeleton'\nimport { useTranslation } from 'react-i18next'\nimport type { TCategoriaFaqDisponivel } from '@base/@types/models/faq/Faq'\nimport CartaoClicavel from '../../../components/CartaoClicavel'\nimport useNavegarAjuda from '../../../rota/useNavegarAjuda'\nimport { iconeDaCategoria, PREFIXO_I18N_CENTRAL_AJUDA } from '../../../utils'\n\ntype CategoriasGridProps = {\n categorias: TCategoriaFaqDisponivel[]\n carregando: boolean\n}\n\nconst NO_HOVER = 'transition-colors group-hover:text-neutral'\n\n/** Tiles de categoria no estilo do Support Hub do template. */\nconst CategoriasGrid = ({ categorias, carregando }: CategoriasGridProps) => {\n const { t } = useTranslation()\n const { abrirCategoria } = useNavegarAjuda()\n\n return (\n <section className=\"flex flex-col gap-6\">\n <h2 className=\"h3\">\n {t(`${PREFIXO_I18N_CENTRAL_AJUDA}.home.categorias`)}\n </h2>\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(280px, 1fr))',\n gap: '1rem',\n }}\n >\n {carregando &&\n Array.from({ length: 6 }).map((_, indice) => (\n <Skeleton key={indice} height={160} className=\"rounded-xl\" />\n ))}\n {!carregando &&\n categorias.map((categoria) => {\n const Icone = iconeDaCategoria(categoria.nome)\n return (\n <CartaoClicavel\n key={categoria.id}\n variante=\"tile\"\n onClick={() => abrirCategoria(categoria.id)}\n >\n <Avatar\n size={56}\n shape=\"circle\"\n className=\"bg-neutral text-primary transition-colors group-hover:bg-white/25 group-hover:text-neutral\"\n icon={<Icone />}\n />\n <span className={classNames('h5 mt-3', NO_HOVER)}>\n {categoria.nome}\n </span>\n </CartaoClicavel>\n )\n })}\n </div>\n </section>\n )\n}\n\nexport default CategoriasGrid\n"],"names":[],"mappings":";;;;;;;;;AAcA,MAAM,WAAW;AAGjB,MAAM,iBAAiB,CAAC,EAAE,YAAY,iBAAsC;AACxE,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM,EAAE,eAAA,IAAmB,gBAAA;AAE3B,SACI,qBAAC,WAAA,EAAQ,WAAU,uBACf,UAAA;AAAA,IAAA,oBAAC,QAAG,WAAU,MACT,YAAE,GAAG,0BAA0B,kBAAkB,EAAA,CACtD;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,OAAO;AAAA,UACH,SAAS;AAAA,UACT,qBAAqB;AAAA,UACrB,KAAK;AAAA,QAAA;AAAA,QAGR,UAAA;AAAA,UAAA,cACG,MAAM,KAAK,EAAE,QAAQ,GAAG,EAAE,IAAI,CAAC,GAAG,+BAC7B,UAAA,EAAsB,QAAQ,KAAK,WAAU,aAAA,GAA/B,MAA4C,CAC9D;AAAA,UACJ,CAAC,cACE,WAAW,IAAI,CAAC,cAAc;AAC1B,kBAAM,QAAQ,iBAAiB,UAAU,IAAI;AAC7C,mBACI;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEG,UAAS;AAAA,gBACT,SAAS,MAAM,eAAe,UAAU,EAAE;AAAA,gBAE1C,UAAA;AAAA,kBAAA;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACG,MAAM;AAAA,sBACN,OAAM;AAAA,sBACN,WAAU;AAAA,sBACV,0BAAO,OAAA,CAAA,CAAM;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAEjB,oBAAC,UAAK,WAAW,WAAW,WAAW,QAAQ,GAC1C,oBAAU,KAAA,CACf;AAAA,gBAAA;AAAA,cAAA;AAAA,cAZK,UAAU;AAAA,YAAA;AAAA,UAe3B,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACT,GACJ;AAER;"}
|