@orbe-agro/client-core 5.6.188 → 5.6.193
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 +17 -0
- package/dist/@ecme/assets/styles/tailwind/index.css +17 -0
- package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js.map +1 -1
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/components/template/Header.stories.js.map +1 -1
- package/dist/@ecme/components/template/Search.js +276 -72
- package/dist/@ecme/components/template/Search.js.map +1 -1
- package/dist/@ecme/components/template/Search.stories.js +18 -2
- package/dist/@ecme/components/template/Search.stories.js.map +1 -1
- package/dist/@ecme/index.js +0 -3
- package/dist/@ecme/index.js.map +1 -1
- package/dist/@ecme/locales/index.js +1 -4
- package/dist/@ecme/locales/index.js.map +1 -1
- package/dist/@ecme/mock/data/favoritosMenuData.js +5 -0
- package/dist/@ecme/mock/data/favoritosMenuData.js.map +1 -0
- package/dist/@ecme/mock/fakeApi/favoritosMenuFakeApi.js +64 -0
- package/dist/@ecme/mock/fakeApi/favoritosMenuFakeApi.js.map +1 -0
- package/dist/@ecme/mock/index.js +1 -0
- package/dist/@ecme/mock/index.js.map +1 -1
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.d.ts +7 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.d.ts +7 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.d.ts +7 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.d.ts +7 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.d.ts +7 -0
- package/dist/@types/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/components/template/Header.stories.d.ts +7 -0
- package/dist/@types/@ecme/components/template/Header.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/components/template/Search.d.ts.map +1 -1
- package/dist/@types/@ecme/components/template/Search.stories.d.ts +9 -0
- package/dist/@types/@ecme/components/template/Search.stories.d.ts.map +1 -0
- package/dist/@types/@ecme/locales/index.d.ts +0 -1
- package/dist/@types/@ecme/locales/index.d.ts.map +1 -1
- package/dist/@types/@ecme/mock/data/favoritosMenuData.d.ts +3 -0
- package/dist/@types/@ecme/mock/data/favoritosMenuData.d.ts.map +1 -0
- package/dist/@types/@ecme/mock/fakeApi/favoritosMenuFakeApi.d.ts +2 -0
- package/dist/@types/@ecme/mock/fakeApi/favoritosMenuFakeApi.d.ts.map +1 -0
- package/dist/@types/@ecme/mock/index.d.ts +1 -0
- package/dist/@types/@ecme/mock/index.d.ts.map +1 -1
- package/dist/@types/base/@types/api/request/dm/TCreateFavoritoMenuRequest.d.ts +4 -0
- package/dist/@types/base/@types/api/request/dm/TCreateFavoritoMenuRequest.d.ts.map +1 -0
- package/dist/@types/base/@types/api/request/dm/TReorderFavoritosMenuRequest.d.ts +4 -0
- package/dist/@types/base/@types/api/request/dm/TReorderFavoritosMenuRequest.d.ts.map +1 -0
- package/dist/@types/base/@types/api/response/dadosMestres/TFavoritoMenuResponse.d.ts +8 -0
- package/dist/@types/base/@types/api/response/dadosMestres/TFavoritoMenuResponse.d.ts.map +1 -0
- package/dist/@types/base/@types/models/performance/ppr.d.ts +48 -0
- package/dist/@types/base/@types/models/performance/ppr.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/DadosMestres/FavoritoMenu/favoritoMenu.endpoint.config.d.ts +8 -0
- package/dist/@types/base/configs/endpoints.config/DadosMestres/FavoritoMenu/favoritoMenu.endpoint.config.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +7 -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 +1 -0
- package/dist/@types/base/configs/endpoints.config/performance/config/ppr.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/performance/performance.d.ts +1 -0
- package/dist/@types/base/configs/endpoints.config/performance/performance.d.ts.map +1 -1
- package/dist/@types/base/services/modules/DadosMestres/FavoritoMenu/FavoritoMenuService.d.ts +8 -0
- package/dist/@types/base/services/modules/DadosMestres/FavoritoMenu/FavoritoMenuService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/performance/PerformanceService.d.ts +3 -1
- package/dist/@types/base/services/modules/performance/PerformanceService.d.ts.map +1 -1
- package/dist/@types/base/utils/functions/stringUtils.d.ts.map +1 -1
- package/dist/base/@types/api/request/dm/TCreateFavoritoMenuRequest.js +2 -0
- package/dist/base/@types/api/request/dm/TCreateFavoritoMenuRequest.js.map +1 -0
- package/dist/base/@types/api/request/dm/TReorderFavoritosMenuRequest.js +2 -0
- package/dist/base/@types/api/request/dm/TReorderFavoritosMenuRequest.js.map +1 -0
- package/dist/base/@types/api/response/dadosMestres/TFavoritoMenuResponse.js +2 -0
- package/dist/base/@types/api/response/dadosMestres/TFavoritoMenuResponse.js.map +1 -0
- package/dist/base/assets/styles/init.css +18 -0
- package/dist/base/configs/api.config.js.map +1 -1
- package/dist/base/configs/endpoints.config/DadosMestres/FavoritoMenu/favoritoMenu.endpoint.config.js +11 -0
- package/dist/base/configs/endpoints.config/DadosMestres/FavoritoMenu/favoritoMenu.endpoint.config.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/performance/config/ppr.js +2 -1
- package/dist/base/configs/endpoints.config/performance/config/ppr.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/performance/config/exportarResultadosPpr.submenu.js +1 -1
- package/dist/base/configs/navigation.config/submenu/performance/config/exportarResultadosPpr.submenu.js.map +1 -1
- package/dist/base/index.js +3 -1
- package/dist/base/services/index.js +3 -1
- package/dist/base/services/modules/DadosMestres/FavoritoMenu/FavoritoMenuService.js +35 -0
- package/dist/base/services/modules/DadosMestres/FavoritoMenu/FavoritoMenuService.js.map +1 -0
- package/dist/base/services/modules/index.js +3 -1
- package/dist/base/services/modules/performance/PerformanceService.js +15 -0
- package/dist/base/services/modules/performance/PerformanceService.js.map +1 -1
- package/dist/base/services/modules/performance/index.js +3 -1
- package/dist/base/utils/functions/stringUtils.js +2 -0
- package/dist/base/utils/functions/stringUtils.js.map +1 -1
- package/lib/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.tsx +2 -2
- package/lib/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.tsx +2 -2
- package/lib/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.tsx +2 -2
- package/lib/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.tsx +2 -2
- package/lib/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.tsx +2 -2
- package/lib/@ecme/components/template/Header.stories.tsx +2 -2
- package/lib/@ecme/components/template/Search.stories.tsx +23 -5
- package/lib/@ecme/components/template/Search.tsx +366 -83
- package/lib/@ecme/locales/index.ts +0 -4
- package/lib/@ecme/mock/data/favoritosMenuData.ts +3 -0
- package/lib/@ecme/mock/fakeApi/favoritosMenuFakeApi.ts +87 -0
- package/lib/@ecme/mock/index.ts +1 -0
- package/lib/base/@types/api/request/dm/TCreateFavoritoMenuRequest.ts +3 -0
- package/lib/base/@types/api/request/dm/TReorderFavoritosMenuRequest.ts +3 -0
- package/lib/base/@types/api/response/dadosMestres/TFavoritoMenuResponse.ts +7 -0
- package/lib/base/@types/models/performance/ppr.ts +67 -0
- package/lib/base/configs/api.config.ts +2 -2
- package/lib/base/configs/endpoints.config/DadosMestres/FavoritoMenu/favoritoMenu.endpoint.config.ts +10 -0
- package/lib/base/configs/endpoints.config/endpoints.navigation.ts +2 -0
- package/lib/base/configs/endpoints.config/performance/config/ppr.ts +1 -0
- package/lib/base/configs/navigation.config/submenu/performance/config/exportarResultadosPpr.submenu.ts +1 -1
- package/lib/base/services/modules/DadosMestres/FavoritoMenu/FavoritoMenuService.ts +35 -0
- package/lib/base/services/modules/performance/PerformanceService.ts +16 -0
- package/lib/base/utils/functions/stringUtils.ts +2 -0
- package/package.json +1 -1
|
@@ -5722,6 +5722,9 @@ video {
|
|
|
5722
5722
|
.w-6{
|
|
5723
5723
|
width: 1.5rem;
|
|
5724
5724
|
}
|
|
5725
|
+
.w-72{
|
|
5726
|
+
width: 18rem;
|
|
5727
|
+
}
|
|
5725
5728
|
.w-8{
|
|
5726
5729
|
width: 2rem;
|
|
5727
5730
|
}
|
|
@@ -5954,6 +5957,12 @@ video {
|
|
|
5954
5957
|
.flex-auto{
|
|
5955
5958
|
flex: 1 1 auto;
|
|
5956
5959
|
}
|
|
5960
|
+
.flex-shrink-0{
|
|
5961
|
+
flex-shrink: 0;
|
|
5962
|
+
}
|
|
5963
|
+
.shrink-0{
|
|
5964
|
+
flex-shrink: 0;
|
|
5965
|
+
}
|
|
5957
5966
|
.grow{
|
|
5958
5967
|
flex-grow: 1;
|
|
5959
5968
|
}
|
|
@@ -6921,6 +6930,10 @@ video {
|
|
|
6921
6930
|
padding-top: 0.25rem;
|
|
6922
6931
|
padding-bottom: 0.25rem;
|
|
6923
6932
|
}
|
|
6933
|
+
.py-10{
|
|
6934
|
+
padding-top: 2.5rem;
|
|
6935
|
+
padding-bottom: 2.5rem;
|
|
6936
|
+
}
|
|
6924
6937
|
.py-12{
|
|
6925
6938
|
padding-top: 3rem;
|
|
6926
6939
|
padding-bottom: 3rem;
|
|
@@ -7613,6 +7626,10 @@ video {
|
|
|
7613
7626
|
.hover\:text-success:hover{
|
|
7614
7627
|
color: var(--success);
|
|
7615
7628
|
}
|
|
7629
|
+
.hover\:text-yellow-500:hover{
|
|
7630
|
+
--tw-text-opacity: 1;
|
|
7631
|
+
color: rgb(234 179 8 / var(--tw-text-opacity, 1));
|
|
7632
|
+
}
|
|
7616
7633
|
.hover\:underline:hover{
|
|
7617
7634
|
text-decoration-line: underline;
|
|
7618
7635
|
}
|
|
@@ -1799,6 +1799,9 @@ video {
|
|
|
1799
1799
|
.w-6 {
|
|
1800
1800
|
width: 1.5rem;
|
|
1801
1801
|
}
|
|
1802
|
+
.w-72 {
|
|
1803
|
+
width: 18rem;
|
|
1804
|
+
}
|
|
1802
1805
|
.w-8 {
|
|
1803
1806
|
width: 2rem;
|
|
1804
1807
|
}
|
|
@@ -2031,6 +2034,12 @@ video {
|
|
|
2031
2034
|
.flex-auto {
|
|
2032
2035
|
flex: 1 1 auto;
|
|
2033
2036
|
}
|
|
2037
|
+
.flex-shrink-0 {
|
|
2038
|
+
flex-shrink: 0;
|
|
2039
|
+
}
|
|
2040
|
+
.shrink-0 {
|
|
2041
|
+
flex-shrink: 0;
|
|
2042
|
+
}
|
|
2034
2043
|
.grow {
|
|
2035
2044
|
flex-grow: 1;
|
|
2036
2045
|
}
|
|
@@ -3000,6 +3009,10 @@ video {
|
|
|
3000
3009
|
padding-top: 0.25rem;
|
|
3001
3010
|
padding-bottom: 0.25rem;
|
|
3002
3011
|
}
|
|
3012
|
+
.py-10 {
|
|
3013
|
+
padding-top: 2.5rem;
|
|
3014
|
+
padding-bottom: 2.5rem;
|
|
3015
|
+
}
|
|
3003
3016
|
.py-12 {
|
|
3004
3017
|
padding-top: 3rem;
|
|
3005
3018
|
padding-bottom: 3rem;
|
|
@@ -3692,6 +3705,10 @@ video {
|
|
|
3692
3705
|
.hover\:text-success:hover {
|
|
3693
3706
|
color: var(--success);
|
|
3694
3707
|
}
|
|
3708
|
+
.hover\:text-yellow-500:hover {
|
|
3709
|
+
--tw-text-opacity: 1;
|
|
3710
|
+
color: rgb(234 179 8 / var(--tw-text-opacity, 1));
|
|
3711
|
+
}
|
|
3695
3712
|
.hover\:underline:hover {
|
|
3696
3713
|
text-decoration-line: underline;
|
|
3697
3714
|
}
|
package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleSide.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport CollapsibleSide from './CollapsibleSide'\n\nconst meta = {\n title: '@ecme/Layouts/PostLogin/CollapsibleSide',\n component: CollapsibleSide,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}
|
|
1
|
+
{"version":3,"file":"CollapsibleSide.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport CollapsibleSide from './CollapsibleSide'\n\nconst meta: Meta<typeof CollapsibleSide> = {\n title: '@ecme/Layouts/PostLogin/CollapsibleSide',\n component: CollapsibleSide,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}\n\nexport default meta\n\ntype TStory = StoryObj<typeof meta>\n\nexport const Default: TStory = {\n args: {\n pageTitle: 'Dashboard',\n },\n render: (args) => (\n <CollapsibleSide {...args}>\n <div className=\"p-4\">\n <div className=\"rounded border border-gray-200 p-4\">\n Conteudo da pagina\n </div>\n </div>\n </CollapsibleSide>\n ),\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,OAAqC;AAAA,EACvC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACR,QAAQ;AAAA,EAAA;AAAA,EAEZ,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA,IACR,CAAC,UACG,oBAAC,eAAA,EACG,UAAA,oBAAC,SAAM,EAAA,CACX;AAAA,EAAA;AAGZ;AAMO,MAAM,UAAkB;AAAA,EAC3B,MAAM;AAAA,IACF,WAAW;AAAA,EAAA;AAAA,EAEf,QAAQ,CAAC,SACL,oBAAC,iBAAA,EAAiB,GAAG,MACjB,UAAA,oBAAC,OAAA,EAAI,WAAU,OACX,UAAA,oBAAC,OAAA,EAAI,WAAU,sCAAqC,UAAA,sBAEpD,GACJ,EAAA,CACJ;AAER;"}
|
package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentOverlay.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport ContentOverlay from './ContentOverlay'\n\nconst meta = {\n title: '@ecme/Layouts/PostLogin/ContentOverlay',\n component: ContentOverlay,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}
|
|
1
|
+
{"version":3,"file":"ContentOverlay.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport ContentOverlay from './ContentOverlay'\n\nconst meta: Meta<typeof ContentOverlay> = {\n title: '@ecme/Layouts/PostLogin/ContentOverlay',\n component: ContentOverlay,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}\n\nexport default meta\n\ntype TStory = StoryObj<typeof meta>\n\nexport const Default: TStory = {\n render: () => (\n <ContentOverlay>\n <div className=\"p-4\">\n <div className=\"rounded border border-gray-200 bg-white p-4 dark:bg-gray-900\">\n Conteudo da pagina\n </div>\n </div>\n </ContentOverlay>\n ),\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,OAAoC;AAAA,EACtC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACR,QAAQ;AAAA,EAAA;AAAA,EAEZ,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA,IACR,CAAC,UACG,oBAAC,eAAA,EACG,UAAA,oBAAC,SAAM,EAAA,CACX;AAAA,EAAA;AAGZ;AAMO,MAAM,UAAkB;AAAA,EAC3B,QAAQ,MACJ,oBAAC,gBAAA,EACG,8BAAC,OAAA,EAAI,WAAU,OACX,UAAA,oBAAC,OAAA,EAAI,WAAU,gEAA+D,UAAA,sBAE9E,GACJ,EAAA,CACJ;AAER;"}
|
package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameLessSide.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport FrameLessSide from './FrameLessSide'\n\nconst meta = {\n title: '@ecme/Layouts/PostLogin/FrameLessSide',\n component: FrameLessSide,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}
|
|
1
|
+
{"version":3,"file":"FrameLessSide.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport FrameLessSide from './FrameLessSide'\n\nconst meta: Meta<typeof FrameLessSide> = {\n title: '@ecme/Layouts/PostLogin/FrameLessSide',\n component: FrameLessSide,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}\n\nexport default meta\n\ntype TStory = StoryObj<typeof meta>\n\nexport const Default: TStory = {\n render: () => (\n <FrameLessSide>\n <div className=\"p-4\">\n <div className=\"rounded border border-gray-200 bg-white p-4 dark:bg-gray-900\">\n Conteudo da pagina\n </div>\n </div>\n </FrameLessSide>\n ),\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,OAAmC;AAAA,EACrC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACR,QAAQ;AAAA,EAAA;AAAA,EAEZ,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA,IACR,CAAC,UACG,oBAAC,eAAA,EACG,UAAA,oBAAC,SAAM,EAAA,CACX;AAAA,EAAA;AAGZ;AAMO,MAAM,UAAkB;AAAA,EAC3B,QAAQ,MACJ,oBAAC,eAAA,EACG,8BAAC,OAAA,EAAI,WAAU,OACX,UAAA,oBAAC,OAAA,EAAI,WAAU,gEAA+D,UAAA,sBAE9E,GACJ,EAAA,CACJ;AAER;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedSide.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport StackedSide from './StackedSide'\n\nconst meta = {\n title: '@ecme/Layouts/PostLogin/StackedSide',\n component: StackedSide,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}
|
|
1
|
+
{"version":3,"file":"StackedSide.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport StackedSide from './StackedSide'\n\nconst meta: Meta<typeof StackedSide> = {\n title: '@ecme/Layouts/PostLogin/StackedSide',\n component: StackedSide,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}\n\nexport default meta\n\ntype TStory = StoryObj<typeof meta>\n\nexport const Default: TStory = {\n args: {\n pageTitle: 'Dashboard',\n },\n render: (args) => (\n <StackedSide {...args}>\n <div className=\"p-4\">\n <div className=\"rounded border border-gray-200 p-4\">\n Conteudo da pagina\n </div>\n </div>\n </StackedSide>\n ),\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,OAAiC;AAAA,EACnC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACR,QAAQ;AAAA,EAAA;AAAA,EAEZ,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA,IACR,CAAC,UACG,oBAAC,eAAA,EACG,UAAA,oBAAC,SAAM,EAAA,CACX;AAAA,EAAA;AAGZ;AAMO,MAAM,UAAkB;AAAA,EAC3B,MAAM;AAAA,IACF,WAAW;AAAA,EAAA;AAAA,EAEf,QAAQ,CAAC,SACL,oBAAC,aAAA,EAAa,GAAG,MACb,UAAA,oBAAC,OAAA,EAAI,WAAU,OACX,UAAA,oBAAC,OAAA,EAAI,WAAU,sCAAqC,UAAA,sBAEpD,GACJ,EAAA,CACJ;AAER;"}
|
package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBarClassic.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport TopBarClassic from './TopBarClassic'\n\nconst meta = {\n title: '@ecme/Layouts/PostLogin/TopBarClassic',\n component: TopBarClassic,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}
|
|
1
|
+
{"version":3,"file":"TopBarClassic.stories.js","sources":["../../../../../../lib/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport { BrowserRouter } from 'react-router-dom'\nimport TopBarClassic from './TopBarClassic'\n\nconst meta: Meta<typeof TopBarClassic> = {\n title: '@ecme/Layouts/PostLogin/TopBarClassic',\n component: TopBarClassic,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n decorators: [\n (Story) => (\n <BrowserRouter>\n <Story />\n </BrowserRouter>\n ),\n ],\n}\n\nexport default meta\n\ntype TStory = StoryObj<typeof meta>\n\nexport const Default: TStory = {\n args: {\n pageTitle: 'Dashboard',\n },\n render: (args) => (\n <TopBarClassic {...args}>\n <div className=\"p-4\">\n <div className=\"rounded border border-gray-200 p-4\">\n Conteudo da pagina\n </div>\n </div>\n </TopBarClassic>\n ),\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,OAAmC;AAAA,EACrC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACR,QAAQ;AAAA,EAAA;AAAA,EAEZ,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA,IACR,CAAC,UACG,oBAAC,eAAA,EACG,UAAA,oBAAC,SAAM,EAAA,CACX;AAAA,EAAA;AAGZ;AAMO,MAAM,UAAkB;AAAA,EAC3B,MAAM;AAAA,IACF,WAAW;AAAA,EAAA;AAAA,EAEf,QAAQ,CAAC,SACL,oBAAC,eAAA,EAAe,GAAG,MACf,UAAA,oBAAC,OAAA,EAAI,WAAU,OACX,UAAA,oBAAC,OAAA,EAAI,WAAU,sCAAqC,UAAA,sBAEpD,GACJ,EAAA,CACJ;AAER;"}
|
|
@@ -3,7 +3,7 @@ import Container from "../shared/Container.js";
|
|
|
3
3
|
import classNames from "../../utils/classNames.js";
|
|
4
4
|
import { APP_NAME } from "../../constants/app.constant.js";
|
|
5
5
|
import { PAGE_CONTAINER_GUTTER_X } from "../../constants/theme.constant.js";
|
|
6
|
-
const version = true ? "5.6.
|
|
6
|
+
const version = true ? "5.6.193" : "0.0.0";
|
|
7
7
|
const FooterContent = () => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-auto items-center justify-between", children: [
|
|
9
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.stories.js","sources":["../../../../lib/@ecme/components/template/Header.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport Header from './Header'\n\nconst meta = {\n title: '@ecme/Template/Header',\n component: Header,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n argTypes: {\n container: {\n control: 'boolean',\n },\n className: {\n control: 'text',\n },\n wrapperClass: {\n control: 'text',\n },\n },\n}
|
|
1
|
+
{"version":3,"file":"Header.stories.js","sources":["../../../../lib/@ecme/components/template/Header.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react'\nimport Header from './Header'\n\nconst meta: Meta<typeof Header> = {\n title: '@ecme/Template/Header',\n component: Header,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n argTypes: {\n container: {\n control: 'boolean',\n },\n className: {\n control: 'text',\n },\n wrapperClass: {\n control: 'text',\n },\n },\n}\n\nexport default meta\n\ntype TStory = StoryObj<typeof meta>\n\nexport const Default: TStory = {\n args: {\n container: false,\n className: '',\n wrapperClass: '',\n },\n render: (args) => (\n <Header\n {...args}\n headerStart={\n <div className=\"px-4 text-sm font-semibold\">Minha Marca</div>\n }\n headerMiddle={<div className=\"text-sm\">Área central</div>}\n headerEnd={\n <div className=\"px-4 text-sm text-gray-600\">Usuário</div>\n }\n />\n ),\n}\n"],"names":[],"mappings":";;AAGA,MAAM,OAA4B;AAAA,EAC9B,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACR,QAAQ;AAAA,EAAA;AAAA,EAEZ,MAAM,CAAC,UAAU;AAAA,EACjB,UAAU;AAAA,IACN,WAAW;AAAA,MACP,SAAS;AAAA,IAAA;AAAA,IAEb,WAAW;AAAA,MACP,SAAS;AAAA,IAAA;AAAA,IAEb,cAAc;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EACb;AAER;AAMO,MAAM,UAAkB;AAAA,EAC3B,MAAM;AAAA,IACF,WAAW;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,EAAA;AAAA,EAElB,QAAQ,CAAC,SACL;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,aACI,oBAAC,OAAA,EAAI,WAAU,8BAA6B,UAAA,eAAW;AAAA,MAE3D,cAAc,oBAAC,OAAA,EAAI,WAAU,WAAU,UAAA,gBAAY;AAAA,MACnD,WACI,oBAAC,OAAA,EAAI,WAAU,8BAA6B,UAAA,UAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAInE;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import "../ui/Button/index.js";
|
|
3
3
|
import "../ui/Dialog/index.js";
|
|
4
4
|
import "../ui/ScrollBar/index.js";
|
|
@@ -8,16 +8,21 @@ import { useSessionUser } from "../../store/authStore.js";
|
|
|
8
8
|
import classNames from "../../utils/classNames.js";
|
|
9
9
|
import withHeaderItem from "../../utils/hoc/withHeaderItem.js";
|
|
10
10
|
import debounce from "lodash/debounce";
|
|
11
|
-
import { useState,
|
|
11
|
+
import { useState, useEffect, useMemo, useRef } from "react";
|
|
12
12
|
import Highlighter from "react-highlight-words";
|
|
13
13
|
import { useTranslation } from "react-i18next";
|
|
14
|
-
import { HiChevronRight, HiOutlineSearch } from "react-icons/hi";
|
|
14
|
+
import { HiChevronRight, HiStar, HiOutlineStar, HiOutlineSearch, HiOutlineTrash } from "react-icons/hi";
|
|
15
15
|
import { PiMagnifyingGlassDuotone } from "react-icons/pi";
|
|
16
16
|
import { Link } from "react-router-dom";
|
|
17
17
|
import "../ui/index.js";
|
|
18
|
+
import "../ui/Notification/index.js";
|
|
19
|
+
import "../ui/toast/index.js";
|
|
20
|
+
import { apiFindFavoritosByUsuario, apiDeleteFavoritoMenu, apiCreateFavoritoMenu } from "../../../base/services/modules/DadosMestres/FavoritoMenu/FavoritoMenuService.js";
|
|
21
|
+
import Spinner from "../ui/Spinner/Spinner.js";
|
|
22
|
+
import toast from "../ui/toast/toast.js";
|
|
23
|
+
import Notification from "../ui/Notification/Notification.js";
|
|
18
24
|
import Dialog from "../ui/Dialog/Dialog.js";
|
|
19
25
|
import Button from "../ui/Button/Button.js";
|
|
20
|
-
import Spinner from "../ui/Spinner/Spinner.js";
|
|
21
26
|
import ScrollBar from "../ui/ScrollBar/ScrollBar.js";
|
|
22
27
|
const filterNavigationByAuthority = (navTree, userAuthority) => {
|
|
23
28
|
return navTree.reduce((acc, nav) => {
|
|
@@ -44,41 +49,185 @@ const filterNavigationByAuthority = (navTree, userAuthority) => {
|
|
|
44
49
|
}, []);
|
|
45
50
|
};
|
|
46
51
|
const ListItem = (props) => {
|
|
47
|
-
const {
|
|
52
|
+
const {
|
|
53
|
+
icon,
|
|
54
|
+
label,
|
|
55
|
+
url = "",
|
|
56
|
+
keyWord,
|
|
57
|
+
onNavigate,
|
|
58
|
+
breadcrumbs,
|
|
59
|
+
menuKey,
|
|
60
|
+
isFavorited,
|
|
61
|
+
favToggling,
|
|
62
|
+
onToggleFavorite
|
|
63
|
+
} = props;
|
|
48
64
|
const makeBreadcrumbs = (breadcrumbs2) => {
|
|
49
65
|
return breadcrumbs2.join(" / ");
|
|
50
66
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 pr-4", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Link, { to: url, onClick: onNavigate, className: "flex-1", children: /* @__PURE__ */ jsxs(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: classNames(
|
|
72
|
+
"flex items-center justify-between rounded-xl p-3 cursor-pointer user-select",
|
|
73
|
+
"hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
74
|
+
),
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsx("div", { className: "w-72", children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden text-gray-900 dark:text-gray-300", children: /* @__PURE__ */ jsx(
|
|
77
|
+
Highlighter,
|
|
78
|
+
{
|
|
79
|
+
autoEscape: true,
|
|
80
|
+
highlightClassName: classNames(
|
|
81
|
+
"text-primary",
|
|
82
|
+
"underline bg-transparent font-semibold dark:text-white"
|
|
83
|
+
),
|
|
84
|
+
searchWords: [keyWord],
|
|
85
|
+
textToHighlight: makeBreadcrumbs(breadcrumbs)
|
|
86
|
+
}
|
|
87
|
+
) }) }),
|
|
88
|
+
/* @__PURE__ */ jsx(HiChevronRight, { className: "shrink-0 text-lg" })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
) }),
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
className: "flex-shrink-0 rounded-lg p-2 text-lg transition-colors hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
97
|
+
disabled: favToggling,
|
|
98
|
+
onClick: (e) => {
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
onToggleFavorite(menuKey);
|
|
102
|
+
},
|
|
103
|
+
children: favToggling ? /* @__PURE__ */ jsx(Spinner, { size: 18 }) : isFavorited ? /* @__PURE__ */ jsx(HiStar, { className: "text-yellow-500" }) : /* @__PURE__ */ jsx(HiOutlineStar, { className: "text-gray-400 hover:text-yellow-500" })
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] });
|
|
107
|
+
};
|
|
108
|
+
const flattenNavTree = (navTree) => {
|
|
109
|
+
const map = /* @__PURE__ */ new Map();
|
|
110
|
+
const walk = (items) => {
|
|
111
|
+
for (const item of items) {
|
|
112
|
+
if (item.type === NAV_ITEM_TYPE_ITEM && item.path) {
|
|
113
|
+
map.set(item.key, {
|
|
114
|
+
key: item.key,
|
|
115
|
+
path: item.path,
|
|
116
|
+
title: item.title
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (item.subMenu && item.subMenu.length > 0) {
|
|
120
|
+
walk(item.subMenu);
|
|
121
|
+
}
|
|
73
122
|
}
|
|
74
|
-
|
|
123
|
+
};
|
|
124
|
+
walk(navTree);
|
|
125
|
+
return map;
|
|
75
126
|
};
|
|
127
|
+
const navItemMap = flattenNavTree(navigationConfig);
|
|
76
128
|
const _Search = ({ className }) => {
|
|
77
129
|
const [loading, setLoading] = useState(false);
|
|
78
130
|
const [searchDialogOpen, setSearchDialogOpen] = useState(false);
|
|
79
131
|
const [searchResult, setSearchResult] = useState([]);
|
|
80
132
|
const [noResult, setNoResult] = useState(false);
|
|
81
133
|
const userAuthority = useSessionUser((state) => state.user.authority);
|
|
134
|
+
const [favDialogOpen, setFavDialogOpen] = useState(false);
|
|
135
|
+
const [favLoading, setFavLoading] = useState(false);
|
|
136
|
+
const [favorites, setFavorites] = useState([]);
|
|
137
|
+
const [removingId, setRemovingId] = useState(null);
|
|
138
|
+
const [favoritedKeys, setFavoritedKeys] = useState(/* @__PURE__ */ new Set());
|
|
139
|
+
const [togglingKeys, setTogglingKeys] = useState(/* @__PURE__ */ new Set());
|
|
140
|
+
const userId = useSessionUser((state) => state.user.userId);
|
|
141
|
+
const loadFavorites = async () => {
|
|
142
|
+
if (!userId) return;
|
|
143
|
+
setFavLoading(true);
|
|
144
|
+
try {
|
|
145
|
+
const data = await apiFindFavoritosByUsuario(Number(userId));
|
|
146
|
+
setFavorites(data);
|
|
147
|
+
setFavoritedKeys(new Set(data.map((f) => f.menuKey)));
|
|
148
|
+
} catch {
|
|
149
|
+
toast.push(
|
|
150
|
+
/* @__PURE__ */ jsx(Notification, { title: "Erro", type: "danger", children: "Falha ao carregar favoritos." })
|
|
151
|
+
);
|
|
152
|
+
setFavorites([]);
|
|
153
|
+
setFavoritedKeys(/* @__PURE__ */ new Set());
|
|
154
|
+
} finally {
|
|
155
|
+
setFavLoading(false);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const handleFavRemove = async (id) => {
|
|
159
|
+
setRemovingId(id);
|
|
160
|
+
try {
|
|
161
|
+
await apiDeleteFavoritoMenu(id);
|
|
162
|
+
setFavorites((prev) => prev.filter((f) => f.id !== id));
|
|
163
|
+
setFavoritedKeys((prev) => {
|
|
164
|
+
const next = new Set(prev);
|
|
165
|
+
const removed = favorites.find((f) => f.id === id);
|
|
166
|
+
if (removed) next.delete(removed.menuKey);
|
|
167
|
+
return next;
|
|
168
|
+
});
|
|
169
|
+
} catch {
|
|
170
|
+
toast.push(
|
|
171
|
+
/* @__PURE__ */ jsx(Notification, { title: "Erro", type: "danger", children: "Falha ao remover favorito." })
|
|
172
|
+
);
|
|
173
|
+
} finally {
|
|
174
|
+
setRemovingId(null);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const handleFavToggle = async (menuKey) => {
|
|
178
|
+
if (!userId || togglingKeys.has(menuKey)) return;
|
|
179
|
+
setTogglingKeys((prev) => new Set(prev).add(menuKey));
|
|
180
|
+
try {
|
|
181
|
+
if (favoritedKeys.has(menuKey)) {
|
|
182
|
+
const fav = favorites.find((f) => f.menuKey === menuKey);
|
|
183
|
+
if (fav) {
|
|
184
|
+
await apiDeleteFavoritoMenu(fav.id);
|
|
185
|
+
setFavorites((prev) => prev.filter((f) => f.id !== fav.id));
|
|
186
|
+
setFavoritedKeys((prev) => {
|
|
187
|
+
const next = new Set(prev);
|
|
188
|
+
next.delete(menuKey);
|
|
189
|
+
return next;
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
} else {
|
|
193
|
+
const created = await apiCreateFavoritoMenu({ menuKey });
|
|
194
|
+
setFavorites((prev) => [...prev, created]);
|
|
195
|
+
setFavoritedKeys((prev) => new Set(prev).add(menuKey));
|
|
196
|
+
}
|
|
197
|
+
} catch {
|
|
198
|
+
toast.push(
|
|
199
|
+
/* @__PURE__ */ jsx(Notification, { title: "Erro", type: "danger", children: favoritedKeys.has(menuKey) ? "Falha ao remover favorito." : "Falha ao adicionar favorito." })
|
|
200
|
+
);
|
|
201
|
+
} finally {
|
|
202
|
+
setTogglingKeys((prev) => {
|
|
203
|
+
const next = new Set(prev);
|
|
204
|
+
next.delete(menuKey);
|
|
205
|
+
return next;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
const handleFavOpen = () => {
|
|
210
|
+
setFavDialogOpen(true);
|
|
211
|
+
};
|
|
212
|
+
const handleFavClose = () => {
|
|
213
|
+
setFavDialogOpen(false);
|
|
214
|
+
};
|
|
215
|
+
useEffect(() => {
|
|
216
|
+
if (favDialogOpen) {
|
|
217
|
+
loadFavorites();
|
|
218
|
+
}
|
|
219
|
+
}, [favDialogOpen, userId]);
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
if (searchDialogOpen && userId) {
|
|
222
|
+
loadFavorites();
|
|
223
|
+
}
|
|
224
|
+
}, [searchDialogOpen, userId]);
|
|
225
|
+
const enrichedFavorites = useMemo(() => {
|
|
226
|
+
return favorites.map((fav) => ({
|
|
227
|
+
...fav,
|
|
228
|
+
navInfo: navItemMap.get(fav.menuKey)
|
|
229
|
+
}));
|
|
230
|
+
}, [favorites]);
|
|
82
231
|
const inputRef = useRef(null);
|
|
83
232
|
const handleReset = () => {
|
|
84
233
|
setNoResult(false);
|
|
@@ -172,14 +321,24 @@ const _Search = ({ className }) => {
|
|
|
172
321
|
handleSearchClose();
|
|
173
322
|
};
|
|
174
323
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
324
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
325
|
+
/* @__PURE__ */ jsx(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
className: classNames(className, "text-2xl"),
|
|
329
|
+
onClick: handleSearchOpen,
|
|
330
|
+
children: /* @__PURE__ */ jsx(PiMagnifyingGlassDuotone, {})
|
|
331
|
+
}
|
|
332
|
+
),
|
|
333
|
+
/* @__PURE__ */ jsx(
|
|
334
|
+
"div",
|
|
335
|
+
{
|
|
336
|
+
className: classNames(className, "text-2xl"),
|
|
337
|
+
onClick: handleFavOpen,
|
|
338
|
+
children: /* @__PURE__ */ jsx(HiOutlineStar, {})
|
|
339
|
+
}
|
|
340
|
+
)
|
|
341
|
+
] }),
|
|
183
342
|
/* @__PURE__ */ jsx(
|
|
184
343
|
Dialog,
|
|
185
344
|
{
|
|
@@ -196,55 +355,100 @@ const _Search = ({ className }) => {
|
|
|
196
355
|
{
|
|
197
356
|
ref: inputRef,
|
|
198
357
|
className: "block w-full bg-transparent p-4 text-base text-gray-900 outline-none ring-0 dark:text-gray-100",
|
|
199
|
-
placeholder: t(
|
|
358
|
+
placeholder: t(
|
|
359
|
+
"common.input.placeholder.search"
|
|
360
|
+
),
|
|
200
361
|
onChange: handleSearch
|
|
201
362
|
}
|
|
202
363
|
)
|
|
203
364
|
] }),
|
|
204
365
|
/* @__PURE__ */ jsx(Button, { size: "xs", onClick: handleSearchClose, children: "Esc" })
|
|
205
366
|
] }),
|
|
206
|
-
/* @__PURE__ */ jsx("div", { className: "px-5 py-6", children: loading ? /* @__PURE__ */ jsx(
|
|
207
|
-
"div",
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
data.title + index
|
|
232
|
-
))
|
|
233
|
-
]
|
|
234
|
-
},
|
|
235
|
-
result.title
|
|
236
|
-
)),
|
|
367
|
+
/* @__PURE__ */ jsx("div", { className: "px-5 py-6", children: loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Spinner, { size: 40 }) }) : /* @__PURE__ */ jsxs(ScrollBar, { className: "max-h-[350px] overflow-y-auto", children: [
|
|
368
|
+
searchResult.map((result) => /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
369
|
+
/* @__PURE__ */ jsx("h6", { className: "mb-3", children: result.title }),
|
|
370
|
+
result.data.map((data, index) => /* @__PURE__ */ jsx(
|
|
371
|
+
ListItem,
|
|
372
|
+
{
|
|
373
|
+
icon: data.icon,
|
|
374
|
+
breadcrumbs: data.breadcrumbs,
|
|
375
|
+
label: data.title,
|
|
376
|
+
url: data.path,
|
|
377
|
+
keyWord: inputRef.current?.value || "",
|
|
378
|
+
onNavigate: handleNavigate,
|
|
379
|
+
menuKey: data.key,
|
|
380
|
+
isFavorited: favoritedKeys.has(
|
|
381
|
+
data.key
|
|
382
|
+
),
|
|
383
|
+
favToggling: togglingKeys.has(
|
|
384
|
+
data.key
|
|
385
|
+
),
|
|
386
|
+
onToggleFavorite: handleFavToggle
|
|
387
|
+
},
|
|
388
|
+
data.title + index
|
|
389
|
+
))
|
|
390
|
+
] }, result.title)),
|
|
237
391
|
searchResult.length === 0 && noResult && /* @__PURE__ */ jsxs("div", { className: "my-10 text-center text-lg", children: [
|
|
238
|
-
/* @__PURE__ */ jsx("span", { className: "pr-1", children: t(
|
|
239
|
-
"common.status.noResultsFor"
|
|
240
|
-
) }),
|
|
392
|
+
/* @__PURE__ */ jsx("span", { className: "pr-1", children: t("common.status.noResultsFor") }),
|
|
241
393
|
/* @__PURE__ */ jsxs("span", { className: "heading-text", children: [
|
|
242
394
|
`'`,
|
|
243
395
|
inputRef.current?.value,
|
|
244
396
|
`'`
|
|
245
397
|
] })
|
|
246
398
|
] })
|
|
247
|
-
] }) })
|
|
399
|
+
] }) })
|
|
400
|
+
] })
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
/* @__PURE__ */ jsx(
|
|
404
|
+
Dialog,
|
|
405
|
+
{
|
|
406
|
+
contentClassName: "p-0",
|
|
407
|
+
isOpen: favDialogOpen,
|
|
408
|
+
closable: false,
|
|
409
|
+
onRequestClose: handleFavClose,
|
|
410
|
+
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
411
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-gray-200 px-4 py-4 dark:border-gray-600", children: [
|
|
412
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
413
|
+
/* @__PURE__ */ jsx(HiStar, { className: "text-xl text-yellow-500" }),
|
|
414
|
+
/* @__PURE__ */ jsx("h6", { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: "Favoritos" })
|
|
415
|
+
] }),
|
|
416
|
+
/* @__PURE__ */ jsx(Button, { size: "xs", onClick: handleFavClose, children: "Esc" })
|
|
417
|
+
] }),
|
|
418
|
+
/* @__PURE__ */ jsx("div", { className: "px-5 py-6", children: favLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-10", children: /* @__PURE__ */ jsx(Spinner, { size: 40 }) }) : /* @__PURE__ */ jsx(ScrollBar, { className: "max-h-[350px] overflow-y-auto", children: enrichedFavorites.length === 0 ? /* @__PURE__ */ jsx("div", { className: "my-10 text-center text-lg text-gray-500", children: "Nenhum favorito salvo." }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: enrichedFavorites.map((fav) => /* @__PURE__ */ jsxs(
|
|
419
|
+
"div",
|
|
420
|
+
{
|
|
421
|
+
className: "flex items-center gap-1 pr-4",
|
|
422
|
+
children: [
|
|
423
|
+
/* @__PURE__ */ jsx(
|
|
424
|
+
Link,
|
|
425
|
+
{
|
|
426
|
+
to: fav.navInfo?.path || "#",
|
|
427
|
+
className: "flex-1",
|
|
428
|
+
onClick: handleFavClose,
|
|
429
|
+
children: /* @__PURE__ */ jsxs("div", { className: "user-select flex cursor-pointer items-center justify-between rounded-xl p-3 hover:bg-gray-100 dark:hover:bg-gray-700", children: [
|
|
430
|
+
/* @__PURE__ */ jsx("div", { className: "w-72", children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden text-gray-900 dark:text-gray-300", children: fav.navInfo?.title || fav.menuKey }) }),
|
|
431
|
+
/* @__PURE__ */ jsx(HiChevronRight, { className: "h-6 w-6 shrink-0" })
|
|
432
|
+
] })
|
|
433
|
+
}
|
|
434
|
+
),
|
|
435
|
+
/* @__PURE__ */ jsx(
|
|
436
|
+
"button",
|
|
437
|
+
{
|
|
438
|
+
type: "button",
|
|
439
|
+
className: "flex-shrink-0 rounded-lg p-2 text-lg text-gray-400 transition-colors hover:bg-gray-100 hover:text-red-500 dark:hover:bg-gray-700",
|
|
440
|
+
disabled: removingId === fav.id,
|
|
441
|
+
onClick: (e) => {
|
|
442
|
+
e.stopPropagation();
|
|
443
|
+
handleFavRemove(fav.id);
|
|
444
|
+
},
|
|
445
|
+
children: removingId === fav.id ? /* @__PURE__ */ jsx(Spinner, { size: 18 }) : /* @__PURE__ */ jsx(HiOutlineTrash, {})
|
|
446
|
+
}
|
|
447
|
+
)
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
fav.id
|
|
451
|
+
)) }) }) })
|
|
248
452
|
] })
|
|
249
453
|
}
|
|
250
454
|
)
|