@orbe-agro/client-core-prod 5.6.136 → 5.6.137
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 +3 -15
- package/dist/@ecme/assets/styles/tailwind/index.css +3 -15
- package/dist/@ecme/components/index.js +8 -6
- package/dist/@ecme/components/index.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js +25 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js.map +1 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js +22 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js.map +1 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js +22 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js.map +1 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js +25 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js.map +1 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js +25 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js.map +1 -0
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/components/template/Header.stories.js +42 -0
- package/dist/@ecme/components/template/Header.stories.js.map +1 -0
- package/dist/@ecme/components/template/Search.js +32 -2
- package/dist/@ecme/components/template/Search.js.map +1 -1
- package/dist/@ecme/components/template/Search.stories.js +61 -0
- package/dist/@ecme/components/template/Search.stories.js.map +1 -0
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.js +10 -241
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js +3 -17
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js.map +1 -1
- package/dist/@ecme/components/ui/UploadCustom/UploadCustom.js +134 -0
- package/dist/@ecme/components/ui/UploadCustom/UploadCustom.js.map +1 -0
- package/dist/@ecme/components/ui/UploadCustom/index.js +6 -0
- package/dist/@ecme/components/ui/UploadCustom/index.js.map +1 -0
- package/dist/@ecme/components/ui/index.js +5 -2
- package/dist/@ecme/components/ui/index.js.map +1 -1
- package/dist/@ecme/index.js +79 -74
- package/dist/@ecme/index.js.map +1 -1
- package/dist/@ecme/locales/index.js +4 -1
- package/dist/@ecme/locales/index.js.map +1 -1
- package/dist/@ecme/locales/initAll.js +26 -0
- package/dist/@ecme/locales/initAll.js.map +1 -0
- package/dist/@ecme/locales/lang/en/common.js +43 -0
- package/dist/@ecme/locales/lang/en/common.js.map +1 -1
- package/dist/@ecme/locales/lang/en/index.js +3 -1
- package/dist/@ecme/locales/lang/en/index.js.map +1 -1
- package/dist/@ecme/locales/lang/ptBR/common.js +43 -0
- package/dist/@ecme/locales/lang/ptBR/common.js.map +1 -1
- package/dist/@ecme/locales/lang/ptBR/index.js +3 -1
- package/dist/@ecme/locales/lang/ptBR/index.js.map +1 -1
- package/dist/@ecme/locales/lang/ptBR/nav.js +307 -4
- package/dist/@ecme/locales/lang/ptBR/nav.js.map +1 -1
- package/dist/@ecme/services/ApiServiceJ.js +26 -0
- package/dist/@ecme/services/ApiServiceJ.js.map +1 -0
- package/dist/@ecme/views/auth/lang/index.js +2 -2
- package/dist/@ecme/views/auth/lang/index.js.map +1 -1
- package/dist/@types/@ecme/components/template/Search.d.ts.map +1 -1
- package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.d.ts +0 -8
- package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.d.ts.map +1 -1
- package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.d.ts.map +1 -1
- package/dist/@types/@ecme/components/ui/UploadCustom/UploadCustom.d.ts +15 -0
- package/dist/@types/@ecme/components/ui/UploadCustom/UploadCustom.d.ts.map +1 -0
- package/dist/@types/@ecme/components/ui/UploadCustom/index.d.ts +5 -0
- package/dist/@types/@ecme/components/ui/UploadCustom/index.d.ts.map +1 -0
- package/dist/@types/@ecme/components/ui/index.d.ts +2 -0
- package/dist/@types/@ecme/components/ui/index.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/index.d.ts +1 -0
- package/dist/@types/@ecme/locales/index.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/initAll.d.ts +3 -0
- package/dist/@types/@ecme/locales/initAll.d.ts.map +1 -0
- package/dist/@types/@ecme/locales/lang/en/common.d.ts +43 -0
- package/dist/@types/@ecme/locales/lang/en/common.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/en/index.d.ts +98 -0
- package/dist/@types/@ecme/locales/lang/en/index.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/ptBR/common.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts +98 -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/@ecme/services/ApiServiceJ.d.ts +8 -0
- package/dist/@types/@ecme/services/ApiServiceJ.d.ts.map +1 -0
- package/dist/@types/base/@types/api/request/juridico/termos/termo.d.ts +54 -0
- package/dist/@types/base/@types/api/request/juridico/termos/termo.d.ts.map +1 -0
- package/dist/@types/base/@types/api/request/juridico/termos/types.d.ts +102 -0
- package/dist/@types/base/@types/api/request/juridico/termos/types.d.ts.map +1 -0
- package/dist/@types/base/@types/api/response/bayer/TFindAllRetencaoResponse.d.ts +2 -2
- package/dist/@types/base/@types/api/response/bayer/TFindAllRetencaoResponse.d.ts.map +1 -1
- package/dist/@types/base/@types/models/ativos/anexoComponente.d.ts +1 -0
- package/dist/@types/base/@types/models/ativos/anexoComponente.d.ts.map +1 -1
- package/dist/@types/base/@types/models/ativos/documentacao.d.ts +4 -3
- package/dist/@types/base/@types/models/ativos/documentacao.d.ts.map +1 -1
- package/dist/@types/base/@types/models/ativos/sistemaOperacional.d.ts +3 -3
- package/dist/@types/base/@types/models/ativos/sistemaOperacional.d.ts.map +1 -1
- package/dist/@types/base/@types/models/ativos/software.d.ts +7 -7
- package/dist/@types/base/@types/models/ativos/software.d.ts.map +1 -1
- package/dist/@types/base/@types/models/ativos/versaoMSOffice.d.ts +4 -4
- package/dist/@types/base/@types/models/ativos/versaoMSOffice.d.ts.map +1 -1
- package/dist/@types/base/@types/models/performance/index.d.ts +1 -0
- package/dist/@types/base/@types/models/performance/index.d.ts.map +1 -1
- package/dist/@types/base/@types/models/performance/ppr.d.ts +22 -0
- package/dist/@types/base/@types/models/performance/ppr.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/HubFiscal/nfe.endpoint.config.d.ts +2 -0
- package/dist/@types/base/configs/endpoints.config/HubFiscal/nfe.endpoint.config.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/ativos/config/modelo.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/modelo.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/bayer/bayer.d.ts +1 -0
- package/dist/@types/base/configs/endpoints.config/bayer/bayer.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/bayer/config/retencaoBayer.d.ts +1 -0
- package/dist/@types/base/configs/endpoints.config/bayer/config/retencaoBayer.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/centralNfe/centralNfe.d.ts +14 -0
- package/dist/@types/base/configs/endpoints.config/centralNfe/centralNfe.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/centralNfe/config/recepcaoFisica.d.ts +16 -0
- package/dist/@types/base/configs/endpoints.config/centralNfe/config/recepcaoFisica.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +25 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/performance/config/ppr.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/performance/config/ppr.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/performance/performance.d.ts +6 -0
- package/dist/@types/base/configs/endpoints.config/performance/performance.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/modules.submenu/centralNfe/submenu.centralNfe.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/submenu/centralNfe/config/recepcaoFisica.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/centralNfe/config/recepcaoFisica.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/config/ppr.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/config/ppr.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/performance/performance.submenu.d.ts.map +1 -1
- package/dist/@types/base/services/modules/HubFiscal/NfeService.d.ts +2 -0
- package/dist/@types/base/services/modules/HubFiscal/NfeService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/ativos/modelo/ModeloService.d.ts +4 -0
- package/dist/@types/base/services/modules/ativos/modelo/ModeloService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/bayer/retencaoBayerService.d.ts +1 -0
- package/dist/@types/base/services/modules/bayer/retencaoBayerService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/centralNfe/index.d.ts +1 -0
- package/dist/@types/base/services/modules/centralNfe/index.d.ts.map +1 -1
- package/dist/@types/base/services/modules/centralNfe/recepcaoFisica/RecepcaoFisicaService.d.ts +7 -0
- package/dist/@types/base/services/modules/centralNfe/recepcaoFisica/RecepcaoFisicaService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/juridico/JuridicoService.d.ts +4 -0
- package/dist/@types/base/services/modules/juridico/JuridicoService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/juridico/docusignService.d.ts +32 -0
- package/dist/@types/base/services/modules/juridico/docusignService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/juridico/municipiosService.d.ts +4 -0
- package/dist/@types/base/services/modules/juridico/municipiosService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/juridico/termosService.d.ts +28 -0
- package/dist/@types/base/services/modules/juridico/termosService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/performance/PerformanceService.d.ts +5 -0
- package/dist/@types/base/services/modules/performance/PerformanceService.d.ts.map +1 -1
- package/dist/base/@types/api/request/juridico/termos/termo.js +2 -0
- package/dist/base/@types/api/request/juridico/termos/termo.js.map +1 -0
- package/dist/base/@types/api/request/juridico/termos/types.js +48 -0
- package/dist/base/@types/api/request/juridico/termos/types.js.map +1 -0
- package/dist/base/@types/models/performance/index.js +1 -0
- package/dist/base/@types/models/performance/index.js.map +1 -1
- package/dist/base/@types/models/performance/ppr.js +2 -0
- package/dist/base/@types/models/performance/ppr.js.map +1 -0
- package/dist/base/assets/styles/init.css +3 -15
- package/dist/base/configs/endpoints.config/HubFiscal/nfe.endpoint.config.js +3 -1
- package/dist/base/configs/endpoints.config/HubFiscal/nfe.endpoint.config.js.map +1 -1
- package/dist/base/configs/endpoints.config/ativos/config/modelo.js +2 -1
- package/dist/base/configs/endpoints.config/ativos/config/modelo.js.map +1 -1
- package/dist/base/configs/endpoints.config/bayer/config/retencaoBayer.js +2 -1
- package/dist/base/configs/endpoints.config/bayer/config/retencaoBayer.js.map +1 -1
- package/dist/base/configs/endpoints.config/centralNfe/centralNfe.js +3 -1
- package/dist/base/configs/endpoints.config/centralNfe/centralNfe.js.map +1 -1
- package/dist/base/configs/endpoints.config/centralNfe/config/recepcaoFisica.js +10 -0
- package/dist/base/configs/endpoints.config/centralNfe/config/recepcaoFisica.js.map +1 -0
- package/dist/base/configs/endpoints.config/performance/config/ppr.js +10 -0
- package/dist/base/configs/endpoints.config/performance/config/ppr.js.map +1 -0
- package/dist/base/configs/endpoints.config/performance/performance.js +3 -1
- package/dist/base/configs/endpoints.config/performance/performance.js.map +1 -1
- package/dist/base/configs/navigation.config/modules.submenu/centralNfe/submenu.centralNfe.js +2 -0
- package/dist/base/configs/navigation.config/modules.submenu/centralNfe/submenu.centralNfe.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/centralNfe/config/recepcaoFisica.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/centralNfe/config/recepcaoFisica.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.js +17 -0
- package/dist/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.js +25 -0
- package/dist/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/performance/config/ppr.submenu.js +19 -0
- package/dist/base/configs/navigation.config/submenu/performance/config/ppr.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/performance/performance.submenu.js +4 -8
- package/dist/base/configs/navigation.config/submenu/performance/performance.submenu.js.map +1 -1
- package/dist/base/index.js +9 -3
- package/dist/base/locales/index.js +2 -2
- package/dist/base/locales/index.js.map +1 -1
- package/dist/base/services/index.js +9 -3
- package/dist/base/services/modules/HubFiscal/NfeService.js +15 -0
- package/dist/base/services/modules/HubFiscal/NfeService.js.map +1 -1
- package/dist/base/services/modules/ativos/index.js +2 -1
- package/dist/base/services/modules/ativos/modelo/ModeloService.js +8 -0
- package/dist/base/services/modules/ativos/modelo/ModeloService.js.map +1 -1
- package/dist/base/services/modules/bayer/index.js +2 -1
- package/dist/base/services/modules/bayer/retencaoBayerService.js +7 -0
- package/dist/base/services/modules/bayer/retencaoBayerService.js.map +1 -1
- package/dist/base/services/modules/centralNfe/index.js +4 -0
- package/dist/base/services/modules/centralNfe/index.js.map +1 -1
- package/dist/base/services/modules/centralNfe/recepcaoFisica/RecepcaoFisicaService.js +31 -0
- package/dist/base/services/modules/centralNfe/recepcaoFisica/RecepcaoFisicaService.js.map +1 -0
- package/dist/base/services/modules/index.js +7 -2
- package/dist/base/services/modules/juridico/JuridicoService.js +48 -0
- package/dist/base/services/modules/juridico/JuridicoService.js.map +1 -0
- package/dist/base/services/modules/juridico/docusignService.js +112 -0
- package/dist/base/services/modules/juridico/docusignService.js.map +1 -0
- package/dist/base/services/modules/juridico/municipiosService.js +42 -0
- package/dist/base/services/modules/juridico/municipiosService.js.map +1 -0
- package/dist/base/services/modules/juridico/termosService.js +108 -0
- package/dist/base/services/modules/juridico/termosService.js.map +1 -0
- package/dist/base/services/modules/performance/PerformanceService.js +31 -0
- package/dist/base/services/modules/performance/PerformanceService.js.map +1 -1
- package/dist/base/services/modules/performance/index.js +5 -1
- package/lib/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.tsx +38 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.tsx +35 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.tsx +35 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.tsx +38 -0
- package/lib/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.tsx +38 -0
- package/lib/@ecme/components/template/Header.stories.tsx +46 -0
- package/lib/@ecme/components/template/Search.stories.tsx +79 -0
- package/lib/@ecme/components/template/Search.tsx +41 -14
- package/lib/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.tsx +13 -252
- package/lib/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx +3 -25
- package/lib/@ecme/components/ui/UploadCustom/UploadCustom.tsx +169 -0
- package/lib/@ecme/components/ui/UploadCustom/index.tsx +6 -0
- package/lib/@ecme/components/ui/index.ts +2 -0
- package/lib/@ecme/locales/index.ts +4 -0
- package/lib/@ecme/locales/initAll.ts +25 -0
- package/lib/@ecme/locales/lang/en/common.ts +43 -0
- package/lib/@ecme/locales/lang/en/index.ts +2 -0
- package/lib/@ecme/locales/lang/ptBR/common.ts +44 -1
- package/lib/@ecme/locales/lang/ptBR/index.ts +2 -0
- package/lib/@ecme/locales/lang/ptBR/nav.ts +308 -5
- package/lib/@ecme/services/ApiServiceJ.ts +30 -0
- package/lib/@ecme/views/auth/lang/index.ts +2 -2
- package/lib/base/@types/api/request/juridico/termos/termo.ts +53 -0
- package/lib/base/@types/api/request/juridico/termos/types.ts +112 -0
- package/lib/base/@types/api/response/bayer/TFindAllRetencaoResponse.ts +2 -2
- package/lib/base/@types/models/ativos/anexoComponente.ts +1 -0
- package/lib/base/@types/models/ativos/documentacao.ts +4 -3
- package/lib/base/@types/models/ativos/sistemaOperacional.ts +3 -3
- package/lib/base/@types/models/ativos/software.ts +7 -7
- package/lib/base/@types/models/ativos/versaoMSOffice.ts +4 -4
- package/lib/base/@types/models/performance/index.ts +6 -5
- package/lib/base/@types/models/performance/ppr.ts +24 -0
- package/lib/base/configs/endpoints.config/HubFiscal/nfe.endpoint.config.ts +3 -1
- package/lib/base/configs/endpoints.config/ativos/config/modelo.ts +1 -0
- package/lib/base/configs/endpoints.config/bayer/config/retencaoBayer.ts +1 -0
- package/lib/base/configs/endpoints.config/centralNfe/centralNfe.ts +3 -1
- package/lib/base/configs/endpoints.config/centralNfe/config/recepcaoFisica.ts +9 -0
- package/lib/base/configs/endpoints.config/performance/config/ppr.ts +8 -0
- package/lib/base/configs/endpoints.config/performance/performance.ts +3 -1
- package/lib/base/configs/navigation.config/modules.submenu/centralNfe/submenu.centralNfe.ts +2 -0
- package/lib/base/configs/navigation.config/submenu/centralNfe/config/recepcaoFisica.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.ts +17 -0
- package/lib/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.ts +25 -0
- package/lib/base/configs/navigation.config/submenu/performance/config/ppr.submenu.ts +19 -0
- package/lib/base/configs/navigation.config/submenu/performance/performance.submenu.ts +4 -8
- package/lib/base/locales/index.ts +2 -2
- package/lib/base/services/modules/HubFiscal/NfeService.ts +15 -0
- package/lib/base/services/modules/ativos/modelo/ModeloService.ts +8 -0
- package/lib/base/services/modules/bayer/retencaoBayerService.ts +7 -0
- package/lib/base/services/modules/centralNfe/index.ts +2 -1
- package/lib/base/services/modules/centralNfe/recepcaoFisica/RecepcaoFisicaService.ts +32 -0
- package/lib/base/services/modules/juridico/JuridicoService.ts +52 -0
- package/lib/base/services/modules/juridico/docusignService.ts +154 -0
- package/lib/base/services/modules/juridico/municipiosService.ts +46 -0
- package/lib/base/services/modules/juridico/termosService.ts +118 -0
- package/lib/base/services/modules/performance/PerformanceService.ts +32 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
import CollapsibleSide from './CollapsibleSide'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: '@ecme/Layouts/PostLogin/CollapsibleSide',
|
|
7
|
+
component: CollapsibleSide,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (
|
|
14
|
+
<BrowserRouter>
|
|
15
|
+
<Story />
|
|
16
|
+
</BrowserRouter>
|
|
17
|
+
),
|
|
18
|
+
],
|
|
19
|
+
} satisfies Meta<typeof CollapsibleSide>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
|
|
23
|
+
type TStory = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
export const Default: TStory = {
|
|
26
|
+
args: {
|
|
27
|
+
pageTitle: 'Dashboard',
|
|
28
|
+
},
|
|
29
|
+
render: (args) => (
|
|
30
|
+
<CollapsibleSide {...args}>
|
|
31
|
+
<div className="p-4">
|
|
32
|
+
<div className="rounded border border-gray-200 p-4">
|
|
33
|
+
Conteudo da pagina
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</CollapsibleSide>
|
|
37
|
+
),
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
import ContentOverlay from './ContentOverlay'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: '@ecme/Layouts/PostLogin/ContentOverlay',
|
|
7
|
+
component: ContentOverlay,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (
|
|
14
|
+
<BrowserRouter>
|
|
15
|
+
<Story />
|
|
16
|
+
</BrowserRouter>
|
|
17
|
+
),
|
|
18
|
+
],
|
|
19
|
+
} satisfies Meta<typeof ContentOverlay>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
|
|
23
|
+
type TStory = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
export const Default: TStory = {
|
|
26
|
+
render: () => (
|
|
27
|
+
<ContentOverlay>
|
|
28
|
+
<div className="p-4">
|
|
29
|
+
<div className="rounded border border-gray-200 bg-white p-4 dark:bg-gray-900">
|
|
30
|
+
Conteudo da pagina
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</ContentOverlay>
|
|
34
|
+
),
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
import FrameLessSide from './FrameLessSide'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: '@ecme/Layouts/PostLogin/FrameLessSide',
|
|
7
|
+
component: FrameLessSide,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (
|
|
14
|
+
<BrowserRouter>
|
|
15
|
+
<Story />
|
|
16
|
+
</BrowserRouter>
|
|
17
|
+
),
|
|
18
|
+
],
|
|
19
|
+
} satisfies Meta<typeof FrameLessSide>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
|
|
23
|
+
type TStory = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
export const Default: TStory = {
|
|
26
|
+
render: () => (
|
|
27
|
+
<FrameLessSide>
|
|
28
|
+
<div className="p-4">
|
|
29
|
+
<div className="rounded border border-gray-200 bg-white p-4 dark:bg-gray-900">
|
|
30
|
+
Conteudo da pagina
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</FrameLessSide>
|
|
34
|
+
),
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
import StackedSide from './StackedSide'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: '@ecme/Layouts/PostLogin/StackedSide',
|
|
7
|
+
component: StackedSide,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (
|
|
14
|
+
<BrowserRouter>
|
|
15
|
+
<Story />
|
|
16
|
+
</BrowserRouter>
|
|
17
|
+
),
|
|
18
|
+
],
|
|
19
|
+
} satisfies Meta<typeof StackedSide>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
|
|
23
|
+
type TStory = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
export const Default: TStory = {
|
|
26
|
+
args: {
|
|
27
|
+
pageTitle: 'Dashboard',
|
|
28
|
+
},
|
|
29
|
+
render: (args) => (
|
|
30
|
+
<StackedSide {...args}>
|
|
31
|
+
<div className="p-4">
|
|
32
|
+
<div className="rounded border border-gray-200 p-4">
|
|
33
|
+
Conteudo da pagina
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</StackedSide>
|
|
37
|
+
),
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
import TopBarClassic from './TopBarClassic'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: '@ecme/Layouts/PostLogin/TopBarClassic',
|
|
7
|
+
component: TopBarClassic,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (
|
|
14
|
+
<BrowserRouter>
|
|
15
|
+
<Story />
|
|
16
|
+
</BrowserRouter>
|
|
17
|
+
),
|
|
18
|
+
],
|
|
19
|
+
} satisfies Meta<typeof TopBarClassic>
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
|
|
23
|
+
type TStory = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
export const Default: TStory = {
|
|
26
|
+
args: {
|
|
27
|
+
pageTitle: 'Dashboard',
|
|
28
|
+
},
|
|
29
|
+
render: (args) => (
|
|
30
|
+
<TopBarClassic {...args}>
|
|
31
|
+
<div className="p-4">
|
|
32
|
+
<div className="rounded border border-gray-200 p-4">
|
|
33
|
+
Conteudo da pagina
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</TopBarClassic>
|
|
37
|
+
),
|
|
38
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import Header from './Header'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: '@ecme/Template/Header',
|
|
6
|
+
component: Header,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
container: {
|
|
13
|
+
control: 'boolean',
|
|
14
|
+
},
|
|
15
|
+
className: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
},
|
|
18
|
+
wrapperClass: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta<typeof Header>
|
|
23
|
+
|
|
24
|
+
export default meta
|
|
25
|
+
|
|
26
|
+
type TStory = StoryObj<typeof meta>
|
|
27
|
+
|
|
28
|
+
export const Default: TStory = {
|
|
29
|
+
args: {
|
|
30
|
+
container: false,
|
|
31
|
+
className: '',
|
|
32
|
+
wrapperClass: '',
|
|
33
|
+
},
|
|
34
|
+
render: (args) => (
|
|
35
|
+
<Header
|
|
36
|
+
{...args}
|
|
37
|
+
headerStart={
|
|
38
|
+
<div className="px-4 text-sm font-semibold">Minha Marca</div>
|
|
39
|
+
}
|
|
40
|
+
headerMiddle={<div className="text-sm">Área central</div>}
|
|
41
|
+
headerEnd={
|
|
42
|
+
<div className="px-4 text-sm text-gray-600">Usuário</div>
|
|
43
|
+
}
|
|
44
|
+
/>
|
|
45
|
+
),
|
|
46
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { useEffect } from 'react'
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
4
|
+
import navigationConfig from '@/configs/navigation.config'
|
|
5
|
+
import type { NavigationTree } from '@/@types/navigation'
|
|
6
|
+
import { useSessionUser } from '@/store/authStore'
|
|
7
|
+
import Search from './Search'
|
|
8
|
+
|
|
9
|
+
const collectAuthorityPaths = (navTree: NavigationTree[]): string[] => {
|
|
10
|
+
return navTree.reduce((acc: string[], node) => {
|
|
11
|
+
if (node.path) {
|
|
12
|
+
acc.push(node.path)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (node.subMenu?.length) {
|
|
16
|
+
acc.push(...collectAuthorityPaths(node.subMenu))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return acc
|
|
20
|
+
}, [])
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const allAuthority = Array.from(new Set(collectAuthorityPaths(navigationConfig)))
|
|
24
|
+
|
|
25
|
+
const WithSimulatedAuthorities = ({
|
|
26
|
+
children,
|
|
27
|
+
}: {
|
|
28
|
+
children: React.ReactNode
|
|
29
|
+
}) => {
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const previousUser = useSessionUser.getState().user
|
|
32
|
+
|
|
33
|
+
useSessionUser.setState({
|
|
34
|
+
user: {
|
|
35
|
+
...previousUser,
|
|
36
|
+
authority: allAuthority,
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return () => {
|
|
41
|
+
useSessionUser.setState({ user: previousUser })
|
|
42
|
+
}
|
|
43
|
+
}, [])
|
|
44
|
+
|
|
45
|
+
return <>{children}</>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const meta = {
|
|
49
|
+
title: '@ecme/Template/Search',
|
|
50
|
+
component: Search,
|
|
51
|
+
parameters: {
|
|
52
|
+
layout: 'padded',
|
|
53
|
+
},
|
|
54
|
+
tags: ['autodocs'],
|
|
55
|
+
decorators: [
|
|
56
|
+
(Story) => (
|
|
57
|
+
<BrowserRouter>
|
|
58
|
+
<WithSimulatedAuthorities>
|
|
59
|
+
<Story />
|
|
60
|
+
</WithSimulatedAuthorities>
|
|
61
|
+
</BrowserRouter>
|
|
62
|
+
),
|
|
63
|
+
],
|
|
64
|
+
argTypes: {
|
|
65
|
+
className: {
|
|
66
|
+
control: 'text',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
} satisfies Meta<typeof Search>
|
|
70
|
+
|
|
71
|
+
export default meta
|
|
72
|
+
|
|
73
|
+
type TStory = StoryObj<typeof meta>
|
|
74
|
+
|
|
75
|
+
export const Default: TStory = {
|
|
76
|
+
args: {
|
|
77
|
+
className: '',
|
|
78
|
+
},
|
|
79
|
+
}
|
|
@@ -2,22 +2,11 @@ import { NavigationTree } from '@/@types/navigation'
|
|
|
2
2
|
import Button from '@/components/ui/Button'
|
|
3
3
|
import Dialog from '@/components/ui/Dialog'
|
|
4
4
|
import ScrollBar from '@/components/ui/ScrollBar'
|
|
5
|
-
import navigationIcon from '@/configs/navigation-icon.config'
|
|
6
5
|
import navigationConfig from '@/configs/navigation.config'
|
|
7
6
|
import { NAV_ITEM_TYPE_ITEM } from '@/constants/navigation.constant'
|
|
8
|
-
import {
|
|
9
|
-
GUIDE_PREFIX_PATH,
|
|
10
|
-
UI_COMPONENTS_PREFIX_PATH,
|
|
11
|
-
} from '@/constants/route.constant'
|
|
7
|
+
import { useSessionUser } from '@/store/authStore'
|
|
12
8
|
import classNames from '@/utils/classNames'
|
|
13
9
|
import withHeaderItem from '@/utils/hoc/withHeaderItem'
|
|
14
|
-
import {
|
|
15
|
-
filterDeep,
|
|
16
|
-
findDeep,
|
|
17
|
-
findPathDeep,
|
|
18
|
-
findValueDeep,
|
|
19
|
-
} from 'deepdash-es/standalone'
|
|
20
|
-
import { flatten, flattenDeep } from 'lodash'
|
|
21
10
|
import debounce from 'lodash/debounce'
|
|
22
11
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
|
23
12
|
import Highlighter from 'react-highlight-words'
|
|
@@ -42,6 +31,38 @@ type SearchResult = {
|
|
|
42
31
|
data: SearchData[]
|
|
43
32
|
}
|
|
44
33
|
|
|
34
|
+
const filterNavigationByAuthority = (
|
|
35
|
+
navTree: NavigationTree[],
|
|
36
|
+
userAuthority: string[],
|
|
37
|
+
): NavigationTree[] => {
|
|
38
|
+
return navTree.reduce((acc: NavigationTree[], nav) => {
|
|
39
|
+
if (nav.excludeWhenHasPaths && nav.excludeWhenHasPaths.length > 0) {
|
|
40
|
+
const shouldExclude = nav.excludeWhenHasPaths.some((path) =>
|
|
41
|
+
userAuthority.includes(path),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
if (shouldExclude) {
|
|
45
|
+
return acc
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (nav.subMenu && nav.subMenu.length > 0) {
|
|
50
|
+
const filteredSubMenu = filterNavigationByAuthority(
|
|
51
|
+
nav.subMenu,
|
|
52
|
+
userAuthority,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
if (filteredSubMenu.length > 0) {
|
|
56
|
+
acc.push({ ...nav, subMenu: filteredSubMenu })
|
|
57
|
+
}
|
|
58
|
+
} else if ((nav.path && userAuthority.includes(nav.path)) || !nav.path) {
|
|
59
|
+
acc.push(nav)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return acc
|
|
63
|
+
}, [])
|
|
64
|
+
}
|
|
65
|
+
|
|
45
66
|
const ListItem = (props: {
|
|
46
67
|
icon: string
|
|
47
68
|
label: string
|
|
@@ -98,6 +119,7 @@ const _Search = ({ className }: { className?: string }) => {
|
|
|
98
119
|
const [searchDialogOpen, setSearchDialogOpen] = useState(false)
|
|
99
120
|
const [searchResult, setSearchResult] = useState<SearchResult[]>([])
|
|
100
121
|
const [noResult, setNoResult] = useState(false)
|
|
122
|
+
const userAuthority = useSessionUser((state) => state.user.authority)
|
|
101
123
|
|
|
102
124
|
const inputRef = useRef<HTMLInputElement>(null)
|
|
103
125
|
|
|
@@ -121,6 +143,10 @@ const _Search = ({ className }: { className?: string }) => {
|
|
|
121
143
|
|
|
122
144
|
const flatNavTree = useMemo(() => {
|
|
123
145
|
const arr: NavigationTreeFlat[] = []
|
|
146
|
+
const filteredNavigationTree = filterNavigationByAuthority(
|
|
147
|
+
navigationConfig,
|
|
148
|
+
userAuthority || [],
|
|
149
|
+
)
|
|
124
150
|
|
|
125
151
|
const makeflat = (item: NavigationTree, parents: string[]) => {
|
|
126
152
|
if (Array.isArray(item.subMenu) && item.subMenu.length > 0) {
|
|
@@ -131,11 +157,12 @@ const _Search = ({ className }: { className?: string }) => {
|
|
|
131
157
|
arr.push({ ...item, parents })
|
|
132
158
|
}
|
|
133
159
|
|
|
134
|
-
|
|
160
|
+
filteredNavigationTree.forEach(function f(item) {
|
|
135
161
|
makeflat(item, [t(item.translateKey)])
|
|
136
162
|
})
|
|
163
|
+
|
|
137
164
|
return arr
|
|
138
|
-
}, [
|
|
165
|
+
}, [userAuthority, t])
|
|
139
166
|
|
|
140
167
|
const filterNavigationTreeFlat = (
|
|
141
168
|
text: string,
|
|
@@ -2,12 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'
|
|
|
2
2
|
import { BrowserRouter } from 'react-router-dom'
|
|
3
3
|
import VerticalMenuContent from './VerticalMenuContent'
|
|
4
4
|
import type { NavigationTree } from '@/@types/navigation'
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
NAV_ITEM_TYPE_COLLAPSE,
|
|
8
|
-
NAV_ITEM_TYPE_ITEM,
|
|
9
|
-
NAV_ITEM_TYPE_TITLE,
|
|
10
|
-
} from '@/constants/navigation.constant'
|
|
5
|
+
import modulesNavigationConfig from '@base/configs/navigation.config/modules.navigation'
|
|
11
6
|
|
|
12
7
|
const collectAuthorityPaths = (navTree: NavigationTree[]): string[] => {
|
|
13
8
|
return navTree.reduce((acc: string[], node) => {
|
|
@@ -23,151 +18,10 @@ const collectAuthorityPaths = (navTree: NavigationTree[]): string[] => {
|
|
|
23
18
|
}, [])
|
|
24
19
|
}
|
|
25
20
|
|
|
26
|
-
const
|
|
27
|
-
new Set(collectAuthorityPaths(
|
|
21
|
+
const allAuthority = Array.from(
|
|
22
|
+
new Set(collectAuthorityPaths(modulesNavigationConfig)),
|
|
28
23
|
)
|
|
29
24
|
|
|
30
|
-
const ticketSubmenuAllExpanded: NavigationTree[] = ticketNavigationConfig.map(
|
|
31
|
-
(menu) => {
|
|
32
|
-
if (menu.key !== 'ticket') {
|
|
33
|
-
return menu
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
...menu,
|
|
38
|
-
subMenu: menu.subMenu.map((subMenu) => {
|
|
39
|
-
if (
|
|
40
|
-
subMenu.key === 'ticket.relatorios' ||
|
|
41
|
-
subMenu.key === 'ticket.cadastros'
|
|
42
|
-
) {
|
|
43
|
-
return {
|
|
44
|
-
...subMenu,
|
|
45
|
-
type: NAV_ITEM_TYPE_TITLE,
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return subMenu
|
|
50
|
-
}),
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
const mockNavigationTree: NavigationTree[] = [
|
|
56
|
-
{
|
|
57
|
-
key: 'inicio',
|
|
58
|
-
path: '/inicio',
|
|
59
|
-
title: 'Início',
|
|
60
|
-
translateKey: 'nav.inicio',
|
|
61
|
-
icon: '',
|
|
62
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
63
|
-
authority: ['/inicio'],
|
|
64
|
-
subMenu: [],
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
key: 'cadastros',
|
|
68
|
-
path: '',
|
|
69
|
-
title: 'Cadastros',
|
|
70
|
-
translateKey: 'nav.cadastros',
|
|
71
|
-
icon: '',
|
|
72
|
-
type: NAV_ITEM_TYPE_COLLAPSE,
|
|
73
|
-
authority: ['/cadastros'],
|
|
74
|
-
subMenu: [
|
|
75
|
-
{
|
|
76
|
-
key: 'clientes',
|
|
77
|
-
path: '/cadastros/clientes',
|
|
78
|
-
title: 'Clientes',
|
|
79
|
-
translateKey: 'nav.clientes',
|
|
80
|
-
icon: '',
|
|
81
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
82
|
-
authority: ['/cadastros/clientes'],
|
|
83
|
-
subMenu: [],
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: 'fornecedores',
|
|
87
|
-
path: '/cadastros/fornecedores',
|
|
88
|
-
title: 'Fornecedores',
|
|
89
|
-
translateKey: 'nav.fornecedores',
|
|
90
|
-
icon: '',
|
|
91
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
92
|
-
authority: ['/cadastros/fornecedores'],
|
|
93
|
-
subMenu: [],
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
key: 'relatorios',
|
|
99
|
-
path: '/relatorios',
|
|
100
|
-
title: 'Relatórios',
|
|
101
|
-
translateKey: 'nav.relatorios',
|
|
102
|
-
icon: 'ChartBarIcon',
|
|
103
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
104
|
-
authority: ['/relatorios'],
|
|
105
|
-
subMenu: [],
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
key: 'configuracoes',
|
|
109
|
-
path: '',
|
|
110
|
-
title: 'Configurações',
|
|
111
|
-
translateKey: 'nav.configuracoes',
|
|
112
|
-
icon: '',
|
|
113
|
-
type: NAV_ITEM_TYPE_COLLAPSE,
|
|
114
|
-
authority: ['/configuracoes'],
|
|
115
|
-
subMenu: [
|
|
116
|
-
{
|
|
117
|
-
key: 'perfil',
|
|
118
|
-
path: '/configuracoes/perfil',
|
|
119
|
-
title: 'Perfil',
|
|
120
|
-
translateKey: 'nav.perfil',
|
|
121
|
-
icon: '',
|
|
122
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
123
|
-
authority: ['/configuracoes/perfil'],
|
|
124
|
-
subMenu: [],
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
key: 'integracoes',
|
|
128
|
-
path: '',
|
|
129
|
-
title: 'Integrações',
|
|
130
|
-
translateKey: 'nav.integracoes',
|
|
131
|
-
icon: '',
|
|
132
|
-
type: NAV_ITEM_TYPE_COLLAPSE,
|
|
133
|
-
authority: ['/configuracoes/integracoes'],
|
|
134
|
-
subMenu: [
|
|
135
|
-
{
|
|
136
|
-
key: 'webhooks',
|
|
137
|
-
path: '/configuracoes/integracoes/webhooks',
|
|
138
|
-
title: 'Webhooks',
|
|
139
|
-
translateKey: 'nav.webhooks',
|
|
140
|
-
icon: 'WebhookIcon',
|
|
141
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
142
|
-
authority: ['/configuracoes/integracoes/webhooks'],
|
|
143
|
-
subMenu: [],
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
key: 'lorem.ipsum',
|
|
147
|
-
path: '/configuracoes/integracoes/lorem-ipsum',
|
|
148
|
-
title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
149
|
-
translateKey: 'nav.loremIpsum',
|
|
150
|
-
icon: 'LoremIpsumIcon',
|
|
151
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
152
|
-
authority: ['/configuracoes/integracoes/lorem-ipsum'],
|
|
153
|
-
subMenu: [],
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
},
|
|
159
|
-
]
|
|
160
|
-
|
|
161
|
-
const allUserAuthority = [
|
|
162
|
-
'/inicio',
|
|
163
|
-
'/cadastros/clientes',
|
|
164
|
-
'/cadastros/fornecedores',
|
|
165
|
-
'/relatorios',
|
|
166
|
-
'/configuracoes/perfil',
|
|
167
|
-
'/configuracoes/integracoes/webhooks',
|
|
168
|
-
'/configuracoes/integracoes/lorem-ipsum',
|
|
169
|
-
]
|
|
170
|
-
|
|
171
25
|
const meta: Meta<typeof VerticalMenuContent> = {
|
|
172
26
|
title: '@ecme/Template/VerticalMenuContent',
|
|
173
27
|
component: VerticalMenuContent,
|
|
@@ -202,110 +56,17 @@ type TStory = StoryObj<typeof VerticalMenuContent>
|
|
|
202
56
|
export const Default: TStory = {
|
|
203
57
|
args: {
|
|
204
58
|
collapsed: false,
|
|
205
|
-
routeKey: '
|
|
206
|
-
navigationTree:
|
|
207
|
-
userAuthority:
|
|
208
|
-
direction: 'ltr',
|
|
209
|
-
translationSetup: true,
|
|
210
|
-
},
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export const Collapsed: TStory = {
|
|
214
|
-
args: {
|
|
215
|
-
collapsed: true,
|
|
216
|
-
routeKey: '/cadastros/clientes',
|
|
217
|
-
navigationTree: mockNavigationTree,
|
|
218
|
-
userAuthority: allUserAuthority,
|
|
219
|
-
direction: 'ltr',
|
|
220
|
-
translationSetup: true,
|
|
221
|
-
},
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export const WithExpandedMenu: TStory = {
|
|
225
|
-
args: {
|
|
226
|
-
collapsed: false,
|
|
227
|
-
routeKey: '/configuracoes/integracoes/webhooks',
|
|
228
|
-
navigationTree: mockNavigationTree,
|
|
229
|
-
userAuthority: allUserAuthority,
|
|
230
|
-
direction: 'ltr',
|
|
231
|
-
translationSetup: true,
|
|
232
|
-
},
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export const LimitedAuthority: TStory = {
|
|
236
|
-
args: {
|
|
237
|
-
collapsed: false,
|
|
238
|
-
routeKey: '/inicio',
|
|
239
|
-
navigationTree: mockNavigationTree,
|
|
240
|
-
userAuthority: ['/inicio', '/relatorios'],
|
|
241
|
-
direction: 'ltr',
|
|
242
|
-
translationSetup: true,
|
|
243
|
-
},
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export const RTLDirection: TStory = {
|
|
247
|
-
args: {
|
|
248
|
-
collapsed: false,
|
|
249
|
-
routeKey: '/inicio',
|
|
250
|
-
navigationTree: mockNavigationTree,
|
|
251
|
-
userAuthority: allUserAuthority,
|
|
252
|
-
direction: 'rtl',
|
|
253
|
-
translationSetup: true,
|
|
254
|
-
},
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export const MinimalNavigation: TStory = {
|
|
258
|
-
args: {
|
|
259
|
-
collapsed: false,
|
|
260
|
-
routeKey: '/inicio',
|
|
261
|
-
navigationTree: [
|
|
262
|
-
{
|
|
263
|
-
key: 'inicio',
|
|
264
|
-
path: '/inicio',
|
|
265
|
-
title: 'Início',
|
|
266
|
-
translateKey: 'nav.inicio',
|
|
267
|
-
icon: '',
|
|
268
|
-
type: NAV_ITEM_TYPE_ITEM,
|
|
269
|
-
authority: ['/inicio'],
|
|
270
|
-
subMenu: [],
|
|
271
|
-
},
|
|
272
|
-
],
|
|
273
|
-
userAuthority: ['/inicio'],
|
|
274
|
-
direction: 'ltr',
|
|
275
|
-
translationSetup: true,
|
|
276
|
-
},
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export const WithMenuClick: TStory = {
|
|
280
|
-
args: {
|
|
281
|
-
collapsed: false,
|
|
282
|
-
routeKey: '/inicio',
|
|
283
|
-
navigationTree: mockNavigationTree,
|
|
284
|
-
userAuthority: allUserAuthority,
|
|
285
|
-
direction: 'ltr',
|
|
286
|
-
translationSetup: true,
|
|
287
|
-
onMenuItemClick: () => alert('Menu item clicked!'),
|
|
288
|
-
},
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export const TicketSubmenu: TStory = {
|
|
292
|
-
args: {
|
|
293
|
-
collapsed: false,
|
|
294
|
-
routeKey: 'ticket',
|
|
295
|
-
navigationTree: ticketNavigationConfig,
|
|
296
|
-
userAuthority: ticketAuthority,
|
|
297
|
-
direction: 'ltr',
|
|
298
|
-
translationSetup: true,
|
|
299
|
-
},
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export const TicketSubmenuSortOrderStable: TStory = {
|
|
303
|
-
args: {
|
|
304
|
-
collapsed: false,
|
|
305
|
-
routeKey: 'ticket',
|
|
306
|
-
navigationTree: ticketSubmenuAllExpanded,
|
|
307
|
-
userAuthority: ticketAuthority,
|
|
59
|
+
routeKey: 'modules',
|
|
60
|
+
navigationTree: modulesNavigationConfig,
|
|
61
|
+
userAuthority: allAuthority,
|
|
308
62
|
direction: 'ltr',
|
|
309
63
|
translationSetup: true,
|
|
310
64
|
},
|
|
65
|
+
decorators: [
|
|
66
|
+
(Story) => (
|
|
67
|
+
<div style={{ maxWidth: '25vw' }}>
|
|
68
|
+
<Story />
|
|
69
|
+
</div>
|
|
70
|
+
),
|
|
71
|
+
],
|
|
311
72
|
}
|