@orbe-agro/client-core 5.6.122 → 5.6.124

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.
Files changed (70) hide show
  1. package/dist/@ecme/assets/styles/app.css +15 -0
  2. package/dist/@ecme/assets/styles/tailwind/index.css +15 -0
  3. package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js +31 -6
  4. package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js.map +1 -1
  5. package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.js +234 -0
  6. package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.js.map +1 -0
  7. package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js +18 -40
  8. package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js.map +1 -1
  9. package/dist/@ecme/components/ui/Button/Button.stories.js +17 -0
  10. package/dist/@ecme/components/ui/Button/Button.stories.js.map +1 -0
  11. package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.d.ts +3 -3
  12. package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.d.ts.map +1 -1
  13. package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.d.ts +3 -3
  14. package/dist/@types/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.d.ts.map +1 -1
  15. package/dist/@types/@ecme/components/ui/Button/Button.stories.d.ts +9 -0
  16. package/dist/@types/@ecme/components/ui/Button/Button.stories.d.ts.map +1 -0
  17. package/dist/@types/base/@types/models/ativos/centralAtivosUser.d.ts +42 -0
  18. package/dist/@types/base/@types/models/ativos/centralAtivosUser.d.ts.map +1 -0
  19. package/dist/@types/base/@types/models/ativos/tipo.d.ts +1 -0
  20. package/dist/@types/base/@types/models/ativos/tipo.d.ts.map +1 -1
  21. package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts +26 -0
  22. package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts.map +1 -1
  23. package/dist/@types/base/configs/endpoints.config/ativos/config/centralAtivosUser.d.ts +24 -0
  24. package/dist/@types/base/configs/endpoints.config/ativos/config/centralAtivosUser.d.ts.map +1 -0
  25. package/dist/@types/base/configs/endpoints.config/ativos/config/tipo.d.ts +4 -0
  26. package/dist/@types/base/configs/endpoints.config/ativos/config/tipo.d.ts.map +1 -1
  27. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +26 -0
  28. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
  29. package/dist/@types/base/configs/navigation.config/submenu/ativos/ativos.submenu.d.ts.map +1 -1
  30. package/dist/@types/base/configs/navigation.config/submenu/ativos/config/centralAtivosUser.submenu.d.ts +4 -0
  31. package/dist/@types/base/configs/navigation.config/submenu/ativos/config/centralAtivosUser.submenu.d.ts.map +1 -0
  32. package/dist/@types/base/services/modules/ativos/centralAtivosUser/CentralAtivosUserService.d.ts +8 -0
  33. package/dist/@types/base/services/modules/ativos/centralAtivosUser/CentralAtivosUserService.d.ts.map +1 -0
  34. package/dist/@types/base/services/modules/ativos/tipo/TipoService.d.ts +4 -0
  35. package/dist/@types/base/services/modules/ativos/tipo/TipoService.d.ts.map +1 -1
  36. package/dist/base/@types/models/ativos/centralAtivosUser.js +2 -0
  37. package/dist/base/@types/models/ativos/centralAtivosUser.js.map +1 -0
  38. package/dist/base/assets/styles/init.css +15 -0
  39. package/dist/base/configs/endpoints.config/ativos/ativos.js +2 -0
  40. package/dist/base/configs/endpoints.config/ativos/ativos.js.map +1 -1
  41. package/dist/base/configs/endpoints.config/ativos/config/centralAtivosUser.js +12 -0
  42. package/dist/base/configs/endpoints.config/ativos/config/centralAtivosUser.js.map +1 -0
  43. package/dist/base/configs/endpoints.config/ativos/config/tipo.js +2 -1
  44. package/dist/base/configs/endpoints.config/ativos/config/tipo.js.map +1 -1
  45. package/dist/base/configs/navigation.config/submenu/ativos/ativos.submenu.js +2 -0
  46. package/dist/base/configs/navigation.config/submenu/ativos/ativos.submenu.js.map +1 -1
  47. package/dist/base/configs/navigation.config/submenu/ativos/config/centralAtivosUser.submenu.js +16 -0
  48. package/dist/base/configs/navigation.config/submenu/ativos/config/centralAtivosUser.submenu.js.map +1 -0
  49. package/dist/base/index.js +2 -1
  50. package/dist/base/services/index.js +2 -1
  51. package/dist/base/services/modules/ativos/centralAtivosUser/CentralAtivosUserService.js +44 -0
  52. package/dist/base/services/modules/ativos/centralAtivosUser/CentralAtivosUserService.js.map +1 -0
  53. package/dist/base/services/modules/ativos/index.js +2 -1
  54. package/dist/base/services/modules/ativos/tipo/TipoService.js +8 -0
  55. package/dist/base/services/modules/ativos/tipo/TipoService.js.map +1 -1
  56. package/dist/base/services/modules/index.js +2 -1
  57. package/lib/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.stories.tsx +244 -0
  58. package/lib/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.tsx +203 -172
  59. package/lib/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx +135 -157
  60. package/lib/@ecme/components/ui/Button/Button.stories.tsx +22 -0
  61. package/lib/base/@types/models/ativos/centralAtivosUser.ts +42 -0
  62. package/lib/base/@types/models/ativos/tipo.ts +1 -0
  63. package/lib/base/configs/endpoints.config/ativos/ativos.ts +2 -0
  64. package/lib/base/configs/endpoints.config/ativos/config/centralAtivosUser.ts +11 -0
  65. package/lib/base/configs/endpoints.config/ativos/config/tipo.ts +1 -0
  66. package/lib/base/configs/navigation.config/submenu/ativos/ativos.submenu.ts +2 -0
  67. package/lib/base/configs/navigation.config/submenu/ativos/config/centralAtivosUser.submenu.ts +16 -0
  68. package/lib/base/services/modules/ativos/centralAtivosUser/CentralAtivosUserService.ts +44 -0
  69. package/lib/base/services/modules/ativos/tipo/TipoService.ts +8 -0
  70. package/package.json +9 -1
@@ -1,179 +1,157 @@
1
- import Tooltip from "@/components/ui/Tooltip";
2
- import Menu from "@/components/ui/Menu";
3
- import AuthorityCheck from "@/components/shared/AuthorityCheck";
4
- import VerticalMenuIcon from "./VerticalMenuIcon";
5
- import { Link } from "react-router-dom";
6
- import Dropdown from "@/components/ui/Dropdown";
7
- import type { CommonProps } from "@/@types/common";
8
- import type { Direction } from "@/@types/theme";
9
- import type { NavigationTree } from "@/@types/navigation";
1
+ import Tooltip from '@/components/ui/Tooltip'
2
+ import Menu from '@/components/ui/Menu'
3
+ import ScrollBar from '@/components/ui/ScrollBar'
4
+ import VerticalMenuIcon from './VerticalMenuIcon'
5
+ import { Link } from 'react-router-dom'
6
+ import type { CommonProps } from '@/@types/common'
7
+ import type { Direction } from '@/@types/theme'
8
+ import type { NavigationTree } from '@/@types/navigation'
10
9
 
11
- const { MenuItem } = Menu;
10
+ const { MenuItem } = Menu
12
11
 
13
12
  type LinkRenderer = (
14
- nav: NavigationTree,
15
- children: React.ReactNode
16
- ) => React.ReactNode;
13
+ nav: NavigationTree,
14
+ children: React.ReactNode,
15
+ ) => React.ReactNode
17
16
 
18
17
  interface CollapsedItemProps extends CommonProps {
19
- nav: NavigationTree;
20
- direction?: Direction;
21
- linkRenderer?: LinkRenderer;
22
- onLinkClick?: (link: { key: string; title: string; path: string }) => void;
23
- t: (
24
- key: string,
25
- fallback?: string | Record<string, string | number>
26
- ) => string;
27
- renderAsIcon?: boolean;
28
- userAuthority: string[];
29
- currentKey?: string;
30
- parentKeys?: string[];
18
+ nav: NavigationTree
19
+ direction?: Direction
20
+ linkRenderer?: LinkRenderer
21
+ onLinkClick?: (link: { key: string; title: string; path: string }) => void
22
+ t: (
23
+ key: string,
24
+ fallback?: string | Record<string, string | number>,
25
+ ) => string
26
+ renderAsIcon?: boolean
27
+ userAuthority: string[]
28
+ currentKey?: string
29
+ parentKeys?: string[]
31
30
  }
32
31
 
33
32
  interface DefaultItemProps {
34
- nav: NavigationTree;
35
- onLinkClick?: (link: { key: string; title: string; path: string }) => void;
36
- sideCollapsed?: boolean;
37
- t: (
38
- key: string,
39
- fallback?: string | Record<string, string | number>
40
- ) => string;
41
- indent?: boolean;
42
- userAuthority: string[];
43
- showIcon?: boolean;
44
- showTitle?: boolean;
45
- linkRenderer?: LinkRenderer;
33
+ nav: NavigationTree
34
+ onLinkClick?: (link: { key: string; title: string; path: string }) => void
35
+ sideCollapsed?: boolean
36
+ t: (
37
+ key: string,
38
+ fallback?: string | Record<string, string | number>,
39
+ ) => string
40
+ indent?: boolean
41
+ userAuthority: string[]
42
+ showIcon?: boolean
43
+ showTitle?: boolean
44
+ linkRenderer?: LinkRenderer
46
45
  }
47
46
 
48
47
  interface VerticalMenuItemProps extends CollapsedItemProps, DefaultItemProps {}
49
48
 
50
- const CollapsedItem = ({
51
- nav,
52
- children,
53
- direction,
54
- renderAsIcon,
55
- onLinkClick,
56
- userAuthority,
57
- t,
58
- currentKey,
59
- linkRenderer,
60
- }: CollapsedItemProps) => {
61
- const linkContent = <span>{t(nav.translateKey, nav.title)}</span>;
62
-
63
- const renderLink = () => {
64
- if (linkRenderer) {
65
- return linkRenderer(nav, linkContent);
66
- }
67
-
68
- return (
69
- <Link
70
- id={nav.path}
71
- className="flex h-full w-full items-center outline-none"
72
- to={nav.path}
73
- target={nav.isExternalLink ? "_blank" : ""}
74
- onClick={() =>
75
- onLinkClick?.({
76
- key: nav.key,
77
- title: nav.title,
78
- path: nav.path,
79
- })
80
- }
81
- >
82
- {linkContent}
83
- </Link>
84
- );
85
- };
86
-
87
- return (
88
- <Dropdown.Item active={currentKey === nav.key}>
89
- {nav.path ? renderLink() : <span>{t(nav.translateKey, nav.title)}</span>}
90
- </Dropdown.Item>
91
- );
92
- };
93
-
94
49
  const DefaultItem = (props: DefaultItemProps) => {
95
- const {
96
- nav,
97
- onLinkClick,
98
- showTitle,
99
- indent,
100
- showIcon = true,
101
- userAuthority,
102
- t,
103
- linkRenderer,
104
- } = props;
105
-
106
- const linkContent = (
107
- <>
108
- {showIcon && <VerticalMenuIcon icon={nav.icon} />}
109
- {showTitle && <span>{t(nav.translateKey, nav.title)}</span>}
110
- </>
111
- );
50
+ const {
51
+ nav,
52
+ onLinkClick,
53
+ showTitle,
54
+ indent,
55
+ showIcon = true,
56
+ t,
57
+ linkRenderer,
58
+ } = props
59
+
60
+ const translatedTitle = t(nav.translateKey, nav.title)
61
+
62
+ const renderItemContent = (titleClassName?: string) => (
63
+ <>
64
+ {showIcon && <VerticalMenuIcon icon={nav.icon} />}
65
+ {showTitle && (
66
+ <span className={titleClassName}>{translatedTitle}</span>
67
+ )}
68
+ </>
69
+ )
70
+
71
+ const linkContent = (
72
+ <span className="relative flex min-w-0 flex-1 items-center gap-2">
73
+ <span className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
74
+ {renderItemContent('truncate')}
75
+ </span>
76
+ {showTitle && (
77
+ <div className="w-100 absolute -left-3 top-1/2 z-20 hidden min-w-[calc(100%+1.5rem)] -translate-y-1/2 group-hover/item:block group-focus-visible/item:block">
78
+ <ScrollBar
79
+ autoHide
80
+ className="max-h-16 rounded-lg bg-gray-100 text-gray-900 dark:bg-gray-700 dark:text-gray-100"
81
+ >
82
+ <div className="flex h-full w-max min-w-full items-center gap-2 whitespace-nowrap rounded-lg px-3 font-semibold">
83
+ {renderItemContent()}
84
+ </div>
85
+ </ScrollBar>
86
+ </div>
87
+ )}
88
+ </span>
89
+ )
90
+
91
+ const renderLink = () => {
92
+ if (linkRenderer) {
93
+ return linkRenderer(nav, linkContent)
94
+ }
112
95
 
113
- const renderLink = () => {
114
- if (linkRenderer) {
115
- return linkRenderer(nav, linkContent);
96
+ return (
97
+ <Link
98
+ to={nav.path}
99
+ className="group/item relative flex w-full min-w-0 items-center gap-2"
100
+ target={nav.isExternalLink ? '_blank' : ''}
101
+ onClick={() =>
102
+ onLinkClick?.({
103
+ key: nav.key,
104
+ title: nav.title,
105
+ path: nav.path,
106
+ })
107
+ }
108
+ >
109
+ {linkContent}
110
+ </Link>
111
+ )
116
112
  }
117
113
 
118
114
  return (
119
- <Link
120
- to={nav.path}
121
- className="flex h-full w-full items-center gap-2"
122
- target={nav.isExternalLink ? "_blank" : ""}
123
- onClick={() =>
124
- onLinkClick?.({
125
- key: nav.key,
126
- title: nav.title,
127
- path: nav.path,
128
- })
129
- }
130
- >
131
- {linkContent}
132
- </Link>
133
- );
134
- };
135
-
136
- return (
137
- <MenuItem key={nav.key} eventKey={nav.key} dotIndent={indent}>
138
- {renderLink()}
139
- </MenuItem>
140
- );
141
- };
115
+ <MenuItem key={nav.key} eventKey={nav.key} dotIndent={indent}>
116
+ {renderLink()}
117
+ </MenuItem>
118
+ )
119
+ }
142
120
  const VerticalSingleMenuItem = (props: VerticalMenuItemProps) => {
143
- const { sideCollapsed, nav, t, userAuthority, onLinkClick, linkRenderer } =
144
- props;
121
+ const { sideCollapsed, nav, t, userAuthority, onLinkClick, linkRenderer } =
122
+ props
123
+
124
+ if (sideCollapsed) {
125
+ return (
126
+ <Tooltip
127
+ title={t(nav.translateKey, nav.title)}
128
+ placement={props.direction === 'rtl' ? 'left' : 'right'}
129
+ >
130
+ <DefaultItem
131
+ nav={nav}
132
+ onLinkClick={onLinkClick}
133
+ t={t}
134
+ userAuthority={userAuthority}
135
+ linkRenderer={linkRenderer}
136
+ showIcon={true}
137
+ showTitle={false}
138
+ indent={props.indent}
139
+ />
140
+ </Tooltip>
141
+ )
142
+ }
145
143
 
146
- if (sideCollapsed) {
147
144
  return (
148
- <Tooltip
149
- title={t(nav.translateKey, nav.title)}
150
- placement={props.direction === "rtl" ? "left" : "right"}
151
- >
152
145
  <DefaultItem
153
- nav={nav}
154
- onLinkClick={onLinkClick}
155
- t={t}
156
- userAuthority={userAuthority}
157
- linkRenderer={linkRenderer}
158
- showIcon={true}
159
- showTitle={false}
160
- indent={props.indent}
146
+ nav={nav}
147
+ onLinkClick={onLinkClick}
148
+ t={t}
149
+ userAuthority={userAuthority}
150
+ linkRenderer={linkRenderer}
151
+ showIcon={true}
152
+ showTitle={true}
153
+ indent={props.indent}
161
154
  />
162
- </Tooltip>
163
- );
164
- }
165
-
166
- return (
167
- <DefaultItem
168
- nav={nav}
169
- onLinkClick={onLinkClick}
170
- t={t}
171
- userAuthority={userAuthority}
172
- linkRenderer={linkRenderer}
173
- showIcon={true}
174
- showTitle={true}
175
- indent={props.indent}
176
- />
177
- );
178
- };
179
- export default VerticalSingleMenuItem;
155
+ )
156
+ }
157
+ export default VerticalSingleMenuItem
@@ -0,0 +1,22 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite'
2
+ import Button from '../Button'
3
+
4
+ // Define os metadados utilizados pelo Storybook para expor o componente na lista de componentes
5
+ // e garante que o objeto esteja de acordo com a tipagem esperada pelo Storybook.
6
+ const meta = {
7
+ title: '@ecme/Components/Button',
8
+ component: Button,
9
+ } satisfies Meta<typeof Button>
10
+
11
+ // Exporta para o Storybook identificar o novo story.
12
+ export default meta
13
+
14
+ // Tipo do Story baseado no tipo do meta, garantindo que os argumentos estejam de acordo com as props do componente.
15
+ type TStory = StoryObj<typeof meta>
16
+
17
+ export const Sandbox: TStory = {
18
+ args: {
19
+ children: 'Click Me',
20
+ disabled: false,
21
+ },
22
+ }
@@ -0,0 +1,42 @@
1
+ export type TCentralAtivosUserColumnDef = {
2
+ id: number
3
+ dataCriacao: string
4
+ usuarioCriacaoId: number
5
+ usuarioCriacaoNome: string
6
+ ativoId: number
7
+ formularioCamposId: number
8
+ item: string
9
+ categoriaId: number
10
+ categoria: string
11
+ modeloId: number
12
+ modelo: string
13
+ empresaId: number
14
+ empresaBusinessPartner: string
15
+ empresaNomeCompleto: string
16
+ fabricanteId: number
17
+ fabricanteBusinessPartner: string
18
+ fabricanteNomeCompleto: string
19
+ statusAtivo: string
20
+ statusContrato: string
21
+ departamentoId: number
22
+ departamento: string
23
+ responsavelAtivoId: number
24
+ responsavelAtivoNome: string
25
+ contratoId?: number | null
26
+ contratoDocusignId?: string | null
27
+ }
28
+
29
+ export type TCentralAtivosUser = {
30
+ id?: number
31
+ ativoId: number
32
+ categoriaId: number
33
+ modeloId: number
34
+ empresaId: number
35
+ fabricanteId: number
36
+ statusAtivo: string
37
+ statusContrato: string
38
+ departamentoId: number
39
+ responsavelAtivoId: number
40
+ contratoId?: number | null
41
+ contratoDocusignId?: string | null
42
+ }
@@ -9,4 +9,5 @@ export type TTipoColumnDef = {
9
9
  export type TTipo = {
10
10
  id?: number
11
11
  tipo: string
12
+ formularioCamposId?: number | null
12
13
  }
@@ -2,6 +2,7 @@ import aplicacao from "./config/aplicacao"
2
2
  import ativo from "./config/ativo"
3
3
  import bancoDados from "./config/bancoDados"
4
4
  import categoria from "./config/categoria"
5
+ import centralAtivosUser from "./config/centralAtivosUser"
5
6
  import documentacao from "./config/documentacao"
6
7
  import formularioCampos from "./config/formularioCampos"
7
8
  import hardDisk from "./config/hardDisk"
@@ -25,6 +26,7 @@ const ativos = {
25
26
  ativo: ativo,
26
27
  bancoDados: bancoDados,
27
28
  categoria: categoria,
29
+ centralAtivosUser: centralAtivosUser,
28
30
  documentacao: documentacao,
29
31
  formularioCampos: formularioCampos,
30
32
  hardDisk: hardDisk,
@@ -0,0 +1,11 @@
1
+ const CENTRAL_ATIVOS_USER_BASE_URL = '/ativos/api/ativos/central-ativos-user'
2
+
3
+ const centralAtivosUser = {
4
+ findOne: { endpoint: `${CENTRAL_ATIVOS_USER_BASE_URL}/`, method: 'get' },
5
+ add: { endpoint: `${CENTRAL_ATIVOS_USER_BASE_URL}`, method: 'post' },
6
+ update: { endpoint: `${CENTRAL_ATIVOS_USER_BASE_URL}`, method: 'put' },
7
+ delete: { endpoint: `${CENTRAL_ATIVOS_USER_BASE_URL}/`, method: 'delete' },
8
+ findMonitor: { endpoint: `${CENTRAL_ATIVOS_USER_BASE_URL}/find-monitor`, method: 'post' },
9
+ }
10
+
11
+ export default centralAtivosUser
@@ -6,6 +6,7 @@ const tipo = {
6
6
  update: { endpoint: `${TIPO_BASE_URL}`, method: 'put' },
7
7
  delete: { endpoint: `${TIPO_BASE_URL}/`, method: 'delete' },
8
8
  findMonitor: { endpoint: `${TIPO_BASE_URL}/find-monitor`, method: 'post' },
9
+ findByTipoAndFormulario: { endpoint: `${TIPO_BASE_URL}/find-by-tipo-and-formulario`, method: 'post' },
9
10
  }
10
11
 
11
12
  export default tipo
@@ -2,9 +2,11 @@ import type { NavigationTree } from '@/@types/navigation'
2
2
  import subMenuCadastros from '../../modules.submenu/ativos/cadastros/submenu.cadastro'
3
3
  import subMenuDocumentacoes from '../../modules.submenu/ativos/documentacoes/submenu.documentacoes'
4
4
  import ativoSubmenu from './config/ativo.submenu'
5
+ import centralAtivosUserSubmenu from './config/centralAtivosUser.submenu'
5
6
 
6
7
  const ativosSubmenu: NavigationTree[] = [
7
8
  subMenuCadastros,
9
+ centralAtivosUserSubmenu,
8
10
  subMenuDocumentacoes,
9
11
  ativoSubmenu
10
12
  ]
@@ -0,0 +1,16 @@
1
+ import { NAV_ITEM_TYPE_ITEM } from '@/constants/navigation.constant'
2
+ import { ADMIN } from '@/constants/roles.constant'
3
+ import { NavigationTree } from '@/@types/navigation'
4
+
5
+ const centralAtivosUserSubmenu: NavigationTree = {
6
+ key: 'modules.ativos.centralAtivosUser',
7
+ path: '/ativos/central-ativos-user',
8
+ title: 'Central de Ativos por Usuário',
9
+ translateKey: 'nav.modules.ativos.centralAtivosUser',
10
+ icon: 'centralAtivosUser',
11
+ type: NAV_ITEM_TYPE_ITEM,
12
+ authority: [ADMIN],
13
+ subMenu: [],
14
+ }
15
+
16
+ export default centralAtivosUserSubmenu
@@ -0,0 +1,44 @@
1
+ import ApiService from "@/services/ApiService";
2
+ import { IFilterParams, TQueryResponse } from "@base/@types/api";
3
+ import { TCentralAtivosUser } from "@base/@types/models/ativos/centralAtivosUser";
4
+ import endpointConfig from "@base/configs/endpoints.config/endpoints.navigation";
5
+
6
+ const CENTRAL_ATIVOS_USER_ENDPOINT = endpointConfig.ativos.centralAtivosUser;
7
+
8
+ export async function apiGetAtivosCentralAtivosUser(id: number) {
9
+ return ApiService.fetchDataWithAxios<TCentralAtivosUser>({
10
+ url: CENTRAL_ATIVOS_USER_ENDPOINT.findOne.endpoint + `${id}`,
11
+ method: CENTRAL_ATIVOS_USER_ENDPOINT.findOne.method,
12
+ })
13
+ }
14
+
15
+ export async function apiAddAtivosCentralAtivosUser(body: TCentralAtivosUser) {
16
+ return ApiService.fetchDataWithAxios<TQueryResponse<TCentralAtivosUser>>({
17
+ url: CENTRAL_ATIVOS_USER_ENDPOINT.add.endpoint,
18
+ method: CENTRAL_ATIVOS_USER_ENDPOINT.add.method,
19
+ data: body,
20
+ })
21
+ }
22
+
23
+ export async function apiUpdateAtivosCentralAtivosUser(body: TCentralAtivosUser) {
24
+ return ApiService.fetchDataWithAxios<TQueryResponse<TCentralAtivosUser>>({
25
+ url: CENTRAL_ATIVOS_USER_ENDPOINT.update.endpoint,
26
+ method: CENTRAL_ATIVOS_USER_ENDPOINT.update.method,
27
+ data: body,
28
+ })
29
+ }
30
+
31
+ export async function apiDeleteAtivosCentralAtivosUser(id: number) {
32
+ return ApiService.fetchDataWithAxios<TQueryResponse<TCentralAtivosUser>>({
33
+ url: CENTRAL_ATIVOS_USER_ENDPOINT.delete.endpoint + `${id}`,
34
+ method: CENTRAL_ATIVOS_USER_ENDPOINT.delete.method,
35
+ })
36
+ }
37
+
38
+ export async function apiFindMonitorAtivosCentralAtivosUser(body?: IFilterParams) {
39
+ return ApiService.fetchDataWithAxios<TQueryResponse<TCentralAtivosUser>>({
40
+ url: CENTRAL_ATIVOS_USER_ENDPOINT.findMonitor.endpoint,
41
+ method: CENTRAL_ATIVOS_USER_ENDPOINT.findMonitor.method,
42
+ data: body,
43
+ })
44
+ }
@@ -42,3 +42,11 @@ export async function apiFindMonitorAtivosTipo(body?: IFilterParams) {
42
42
  data: body,
43
43
  })
44
44
  }
45
+
46
+ export async function apiFindByTipoAndFormulario(body: { tipo: string; formularioCamposId?: number | null }) {
47
+ return ApiService.fetchDataWithAxios<any[]>({
48
+ url: TIPO_ENDPOINT.findByTipoAndFormulario.endpoint,
49
+ method: TIPO_ENDPOINT.findByTipoAndFormulario.method,
50
+ data: body,
51
+ })
52
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbe-agro/client-core",
3
- "version": "5.6.122",
3
+ "version": "5.6.124",
4
4
  "description": "Biblioteca principal de componentes e utilidades para os microfrontends do Orbe Agro.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -123,6 +123,11 @@
123
123
  },
124
124
  "devDependencies": {
125
125
  "@arethetypeswrong/cli": "^0.18.1",
126
+ "@storybook/addon-links": "^10.4.4",
127
+ "@storybook/addon-onboarding": "^10.4.4",
128
+ "@storybook/addon-styling-webpack": "^3.0.2",
129
+ "@storybook/react": "^10.4.4",
130
+ "@storybook/react-vite": "^10.4.4",
126
131
  "@tailwindcss/typography": "^0.5.15",
127
132
  "@types/d3-fetch": "^3.0.7",
128
133
  "@types/d3-scale": "^4.0.8",
@@ -146,6 +151,7 @@
146
151
  "postcss": "^8.4.45",
147
152
  "postcss-nesting": "^13.0.0",
148
153
  "prettier": "^3.3.3",
154
+ "storybook": "^10.4.4",
149
155
  "tailwindcss": "^3.4.10",
150
156
  "tw-colors": "^3.3.2",
151
157
  "typescript": "^5.7.2",
@@ -181,6 +187,8 @@
181
187
  "dev": "vite",
182
188
  "build:dev": "tsc -b ./tsconfig.lib.json && vite build --mode development",
183
189
  "build:lib": "tsc -b ./tsconfig.lib.json && vite build --mode production",
190
+ "storybook": "storybook dev -p 6006",
191
+ "storybook:build": "storybook build",
184
192
  "lint": "oxlint .",
185
193
  "bump": "pnpm version patch --git-tag-version false"
186
194
  }