forlogic-core 3.0.5 → 3.0.7
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/crud/createCrudPage.d.ts +3 -0
- package/dist/crud/createSimpleService.d.ts +2 -0
- package/dist/crud/hooks/useCrud.d.ts +5 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/updates/components/UpdatesFeedPage.d.ts +5 -0
- package/dist/updates/hooks/useUpdatesFeed.d.ts +22 -0
- package/dist/updates/index.d.ts +3 -0
- package/docs/design-system/patterns/crud-config-props.md +1 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -67,10 +67,14 @@ export interface CrudManager<T extends BaseEntity> {
|
|
|
67
67
|
searchTerm: string;
|
|
68
68
|
sortField: string;
|
|
69
69
|
sortDirection: SortDirection;
|
|
70
|
+
/** `true` quando a ordenação atual veio de uma escolha salva no navegador (localStorage), não do default. */
|
|
71
|
+
hasStoredSort?: boolean;
|
|
70
72
|
currentPage: number;
|
|
71
73
|
itemsPerPage: number;
|
|
72
74
|
handleSearch: (search: string) => void;
|
|
73
75
|
handleSort: (field: string) => void;
|
|
76
|
+
/** Define a ordenação diretamente, sem alternar asc/desc. Usado para aplicar `defaultSort` inicial. */
|
|
77
|
+
setSort?: (field: string, direction: SortDirection) => void;
|
|
74
78
|
handlePageChange: (page: number) => void;
|
|
75
79
|
handleItemsPerPageChange: (limit: number) => void;
|
|
76
80
|
clearFilters: () => void;
|
|
@@ -337,6 +341,9 @@ export interface CrudPageConfig<T extends CrudEntity> {
|
|
|
337
341
|
customListView?: (items: T[], manager?: CrudManager<T>) => React.ReactNode;
|
|
338
342
|
/** Colunas ocultas por padrão (antes de qualquer interação do usuário). */
|
|
339
343
|
defaultHiddenColumns?: string[];
|
|
344
|
+
/** Exibir ação "Excluir" na linha e no dialog de confirmação (default: true). Use `false`
|
|
345
|
+
* quando a entidade não suporta exclusão de verdade (ex.: só "ignorar"/soft actions). */
|
|
346
|
+
showDeleteAction?: boolean;
|
|
340
347
|
}
|
|
341
348
|
export interface EntityWithId {
|
|
342
349
|
id: string | number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface UpdateFeedItem {
|
|
2
|
+
releaseUpdate: string;
|
|
3
|
+
softwares: string | null;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UpdateFeedSoftware {
|
|
8
|
+
id: number;
|
|
9
|
+
alias: string;
|
|
10
|
+
namePtBr: string;
|
|
11
|
+
nameUs?: string;
|
|
12
|
+
nameEs?: string;
|
|
13
|
+
indent: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Lista todas as atualizações do sistema (tela "ver todas as atualizações" do cafézinho).
|
|
17
|
+
*/
|
|
18
|
+
export declare function useUpdatesFeed(): import("@tanstack/react-query").UseQueryResult<UpdateFeedItem[], Error>;
|
|
19
|
+
/**
|
|
20
|
+
* Softwares (módulos) do Qualiex, ordenados para exibição.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useUpdatesSoftwares(): import("@tanstack/react-query").UseQueryResult<UpdateFeedSoftware[], Error>;
|
package/dist/updates/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export type { UpdatesBarProps } from './components/UpdatesBar';
|
|
|
3
3
|
export { UpdatesDialog } from './components/UpdatesDialog';
|
|
4
4
|
export type { UpdatesDialogProps } from './components/UpdatesDialog';
|
|
5
5
|
export { UserUpdatesViewer } from './components/UserUpdatesViewer';
|
|
6
|
+
export { UpdatesFeedPage } from './components/UpdatesFeedPage';
|
|
7
|
+
export { useUpdatesFeed, useUpdatesSoftwares } from './hooks/useUpdatesFeed';
|
|
8
|
+
export type { UpdateFeedItem, UpdateFeedSoftware } from './hooks/useUpdatesFeed';
|
|
6
9
|
export { useUserUpdatesBar, useUserUpdatesDialog, markUpdateVisualized, } from './hooks/useUserUpdates';
|
|
7
10
|
export type { UserUpdateBarItem, UserUpdateDialogItem, UpdateTypeId } from './types';
|
|
8
11
|
export { getCommonBaseUrl, getIdentBaseUrl, buildQualiexHeaders, qualiexFetch, } from '../qualiex/services/qualiexApiService';
|
|
@@ -12,5 +12,6 @@ A interface CrudPageConfig foi estendida para padronizar a UX em todos os CRUDs
|
|
|
12
12
|
| `showActionBar` | `true` | Exibe a barra de ações (substitui `hideActionBar`) |
|
|
13
13
|
| `newButtonLabel` | — | Customiza texto do botão de criação |
|
|
14
14
|
| `searchPlaceholder` | — | Customiza placeholder da busca |
|
|
15
|
+
| `showDeleteAction` | `true` | Exibe ação "Excluir" na linha e no dialog de confirmação. Use `false` quando a entidade não suporta exclusão de verdade (ex.: só "ignorar"/soft actions) |
|
|
15
16
|
|
|
16
17
|
Esta padronização garante que todos os CRUDs ofereçam as mesmas capacidades de busca, criação e ações em lote de forma consistente.
|