teraprox-ui-kit 0.1.8 → 0.1.10
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/index.css +725 -0
- package/dist/index.d.mts +1189 -0
- package/dist/index.d.ts +1189 -0
- package/dist/index.js +3656 -0
- package/dist/index.mjs +3582 -0
- package/package.json +19 -14
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1189 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps, FormCheckProps, ModalProps } from 'react-bootstrap';
|
|
3
|
+
import { Accept } from 'react-dropzone';
|
|
4
|
+
|
|
5
|
+
interface AddButtonProps {
|
|
6
|
+
callback: () => void;
|
|
7
|
+
hiddenBool?: boolean;
|
|
8
|
+
size?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const AddButton: React.FC<AddButtonProps>;
|
|
11
|
+
|
|
12
|
+
interface DeleteButtonProps {
|
|
13
|
+
title: string;
|
|
14
|
+
onDeleteClick: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const DeleteButton: React.FC<DeleteButtonProps>;
|
|
17
|
+
|
|
18
|
+
interface ActionButtonsProps {
|
|
19
|
+
/** Botão Salvar */
|
|
20
|
+
onSave?: () => void;
|
|
21
|
+
saveLabel?: string;
|
|
22
|
+
saveVariant?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Botão Excluir */
|
|
25
|
+
onDelete?: (details?: string) => void;
|
|
26
|
+
deleteLabel?: string;
|
|
27
|
+
deleteConfirmMsg?: string;
|
|
28
|
+
needExclusionDetails?: boolean;
|
|
29
|
+
/** Botão Voltar */
|
|
30
|
+
onBack?: () => void;
|
|
31
|
+
backLabel?: string;
|
|
32
|
+
/** Botão Cancelar Edição */
|
|
33
|
+
onCancelEdit?: () => void;
|
|
34
|
+
cancelEditLabel?: string;
|
|
35
|
+
/** Botão Copiar Form */
|
|
36
|
+
onCopy?: () => void;
|
|
37
|
+
copyLabel?: string;
|
|
38
|
+
/** Meta-estado */
|
|
39
|
+
isEditing?: boolean;
|
|
40
|
+
/** Configuração Especial: Deleção com Delay (Hold for 3s) */
|
|
41
|
+
useDelayedDelete?: boolean;
|
|
42
|
+
delayedDeleteTimeout?: number;
|
|
43
|
+
/** Wrapper opcional para controle de permissões (ex: PermissionContainer) */
|
|
44
|
+
PermissionWrapper?: React.ComponentType<{
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
id?: string;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Agrupamento de botões de ação (Salvar, Excluir, Voltar, etc) padronizado.
|
|
51
|
+
* Agrega funcionalidade de confirmação de deleção e animação de 'hold-to-delete'.
|
|
52
|
+
*/
|
|
53
|
+
declare const ActionButtons: React.FC<ActionButtonsProps>;
|
|
54
|
+
|
|
55
|
+
interface ApproveAndReproveButtonsProps {
|
|
56
|
+
/** Tamanho dos ícones (padrão: 25) */
|
|
57
|
+
buttonSize?: number;
|
|
58
|
+
/** Callback para aprovação */
|
|
59
|
+
approveCallback: () => void;
|
|
60
|
+
/** Callback para reprovação */
|
|
61
|
+
reproveCallback: () => void;
|
|
62
|
+
/** Callback para cancelamento (ao pressionar ESC) */
|
|
63
|
+
cancelCallback: () => void;
|
|
64
|
+
/** Texto opcional do cabeçalho */
|
|
65
|
+
headerText?: string;
|
|
66
|
+
/** Texto opcional do botão de aprovação */
|
|
67
|
+
approveText?: string;
|
|
68
|
+
/** Texto opcional do botão de reprovação */
|
|
69
|
+
repproveText?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Componente de botões de Aprovação e Reprovação (Check e Close).
|
|
73
|
+
*/
|
|
74
|
+
declare const ApproveAndReproveButtons: React.FC<ApproveAndReproveButtonsProps>;
|
|
75
|
+
|
|
76
|
+
interface AsyncButtonProps {
|
|
77
|
+
/** Função assíncrona a ser executada no clique */
|
|
78
|
+
onClick: () => Promise<void> | void;
|
|
79
|
+
/** Conteúdo do botão */
|
|
80
|
+
children: React.ReactNode;
|
|
81
|
+
/** Componente de loading customizado (padrão: <LoadingProgress />) */
|
|
82
|
+
loadingComponent?: React.ReactNode;
|
|
83
|
+
/** Props adicionais para o componente Button do react-bootstrap */
|
|
84
|
+
buttonProps?: ButtonProps;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Componente de botão para operações assíncronas com tratamento interno de estado.
|
|
88
|
+
*/
|
|
89
|
+
declare const AsyncButton: React.FC<AsyncButtonProps>;
|
|
90
|
+
|
|
91
|
+
interface BonusButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
92
|
+
/** Condição para renderizar o botão */
|
|
93
|
+
renderCondition?: boolean;
|
|
94
|
+
/** Callback chamando ao clicar */
|
|
95
|
+
onClickCallback: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
96
|
+
/** Texto do botão */
|
|
97
|
+
label: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Botão chamativo com animação de 'glow'. usado para ações de destaque.
|
|
101
|
+
*/
|
|
102
|
+
declare const BonusButton: React.FC<BonusButtonProps>;
|
|
103
|
+
|
|
104
|
+
interface ButtonWithDropdownOption {
|
|
105
|
+
label: string;
|
|
106
|
+
callback: () => void;
|
|
107
|
+
}
|
|
108
|
+
interface ButtonWithDropdownProps {
|
|
109
|
+
/** Texto do botão principal */
|
|
110
|
+
title: string;
|
|
111
|
+
/** Callback ao clicar no botão principal */
|
|
112
|
+
onClickButton: () => void;
|
|
113
|
+
/** Lista de opções para o dropdown */
|
|
114
|
+
options: ButtonWithDropdownOption[];
|
|
115
|
+
/** Varinate do menu (padrão: light) */
|
|
116
|
+
menuVariant?: "light" | "dark";
|
|
117
|
+
/** Variante do botão (padrão: primary) */
|
|
118
|
+
variant?: ButtonProps["variant"];
|
|
119
|
+
/** Variante do toggle (padrão: coincide com variant) */
|
|
120
|
+
toggleVariant?: ButtonProps["variant"];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Botão principal com um dropdown (split button) que ocupa 100% da largura.
|
|
124
|
+
*/
|
|
125
|
+
declare const ButtonWithDropdown: React.FC<ButtonWithDropdownProps>;
|
|
126
|
+
|
|
127
|
+
interface CheckBoxOption {
|
|
128
|
+
valor: string | number;
|
|
129
|
+
[key: string]: any;
|
|
130
|
+
}
|
|
131
|
+
interface CheckBoxProps {
|
|
132
|
+
/** Lista de opções para renderizar */
|
|
133
|
+
opcoes: CheckBoxOption[];
|
|
134
|
+
/** Modo edição/hover para alteração de nomes */
|
|
135
|
+
isHover?: boolean;
|
|
136
|
+
/** Modo 'criador' (novo item) */
|
|
137
|
+
isCreator?: boolean;
|
|
138
|
+
/** Callback para atualizar valor (modo hover) */
|
|
139
|
+
updateEvent?: (event: React.ChangeEvent<any>, index: number) => void;
|
|
140
|
+
/** Callback para deletar opção (modo hover) */
|
|
141
|
+
deleteEvent?: () => void;
|
|
142
|
+
/** Callback para a tecla Enter (modo hover) */
|
|
143
|
+
enterEvent?: (event: React.KeyboardEvent<any>, index: number, opcao: CheckBoxOption) => void;
|
|
144
|
+
/** Desabilita interação */
|
|
145
|
+
disabled?: boolean;
|
|
146
|
+
/** Classe CSS customizada */
|
|
147
|
+
className?: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Componente de CheckBox múltiplo com suporte a modo de edição dinâmica (hover).
|
|
151
|
+
*/
|
|
152
|
+
declare const CheckBox: React.FC<CheckBoxProps>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Representa um evento/ação no menu de 3 pontos.
|
|
156
|
+
*/
|
|
157
|
+
declare class MenuEvent {
|
|
158
|
+
label: string;
|
|
159
|
+
callback: () => void;
|
|
160
|
+
variant: string;
|
|
161
|
+
renderCondition: boolean | (() => boolean);
|
|
162
|
+
section: string;
|
|
163
|
+
/**
|
|
164
|
+
* @param label - O texto que aparecerá no botão.
|
|
165
|
+
* @param callback - A função a ser chamada quando o botão for clicado.
|
|
166
|
+
* @param variant - A variante do botão (padrão: 'primary').
|
|
167
|
+
* @param renderCondition - Condição para renderizar o botão.
|
|
168
|
+
* @param section - A seção para organizar os botões (padrão: 'default').
|
|
169
|
+
*/
|
|
170
|
+
constructor(label: string, callback: () => void, variant?: string, renderCondition?: boolean | (() => boolean), section?: string);
|
|
171
|
+
}
|
|
172
|
+
interface Generic3DotMenuProps {
|
|
173
|
+
/** Lista de eventos (opções) do menu */
|
|
174
|
+
events: MenuEvent[];
|
|
175
|
+
/** Título exibido no modal do menu */
|
|
176
|
+
tittle?: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Menu de 3 pontos que abre um Modal com opções organizadas por seções.
|
|
180
|
+
*/
|
|
181
|
+
declare const Generic3DotMenu: React.FC<Generic3DotMenuProps>;
|
|
182
|
+
|
|
183
|
+
interface LoadingButtonProps extends ButtonProps {
|
|
184
|
+
/** Função de clique */
|
|
185
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
186
|
+
/** Estado de carregamento */
|
|
187
|
+
loading?: boolean;
|
|
188
|
+
/** Label do botão (string ou ReactNode) */
|
|
189
|
+
label?: React.ReactNode;
|
|
190
|
+
/** Ícone opcional */
|
|
191
|
+
icon?: React.ReactNode;
|
|
192
|
+
/** Texto exibido durante o loading */
|
|
193
|
+
loadingLabel?: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Botão com estado de carregamento integrado e suporte a ícones.
|
|
197
|
+
*/
|
|
198
|
+
declare const LoadingButton: React.FC<LoadingButtonProps>;
|
|
199
|
+
|
|
200
|
+
interface NavigateButtonProps extends ButtonProps {
|
|
201
|
+
/** Nome exibido no botão */
|
|
202
|
+
displayName: React.ReactNode;
|
|
203
|
+
/** Caminho para navegação */
|
|
204
|
+
path: string;
|
|
205
|
+
/** Configurações extras de navegação */
|
|
206
|
+
config?: any;
|
|
207
|
+
/** Nome da página para rastreamento/contexto */
|
|
208
|
+
pageName?: string;
|
|
209
|
+
/** Função de navegação (ex: vinda do useNavigator ou useNavigate) */
|
|
210
|
+
navigator: (path: string, config?: any, pageName?: string) => void;
|
|
211
|
+
/** Callback opcional antes de mudar de página */
|
|
212
|
+
onBeforeNavigate?: () => void;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Botão de navegação agnóstico.
|
|
216
|
+
* Requer que a função de navegação seja passada via props.
|
|
217
|
+
*/
|
|
218
|
+
declare const NavigateButton: React.FC<NavigateButtonProps>;
|
|
219
|
+
|
|
220
|
+
interface StatusBadgeProps {
|
|
221
|
+
/** Texto do status */
|
|
222
|
+
status: string;
|
|
223
|
+
/** Se deve exibir um checkbox de seleção ao lado */
|
|
224
|
+
showCheckbox?: boolean;
|
|
225
|
+
/** Estado do checkbox */
|
|
226
|
+
checked?: boolean;
|
|
227
|
+
/** Callback para alteração do checkbox */
|
|
228
|
+
onToggle?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
229
|
+
/** Estado de carregamento */
|
|
230
|
+
loading?: boolean;
|
|
231
|
+
/** Mapeamento customizado de classes de status (padrão: PENDENTE, EXECUTANDO, CONCLUIDO, CANCELED) */
|
|
232
|
+
customStatusClasses?: Record<string, string>;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Badge de Status com suporte opcional a checkbox e spinner.
|
|
236
|
+
*/
|
|
237
|
+
declare const StatusBadge: React.FC<StatusBadgeProps>;
|
|
238
|
+
|
|
239
|
+
interface SwitchOnClickProps {
|
|
240
|
+
/** Conteúdo exibido quando clicado. Recebe objeto com handleClose para fechar internamente. */
|
|
241
|
+
children: (props: {
|
|
242
|
+
handleClose: () => void;
|
|
243
|
+
}) => React.ReactNode;
|
|
244
|
+
/** Elemento exibido antes do clique (padrão: ícone de Adicionar) */
|
|
245
|
+
placeHolder?: React.ReactNode;
|
|
246
|
+
/** Callback chamado ao clicar no placeholder */
|
|
247
|
+
onSwitchClick?: () => void;
|
|
248
|
+
/** Callback chamado ao cancelar/fechar */
|
|
249
|
+
onCancel?: () => void;
|
|
250
|
+
/** Classe CSS adicional para o container */
|
|
251
|
+
containerClassName?: string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Componente que alterna entre um Placeholder (ex: botão de adicionar)
|
|
255
|
+
* e um formulário/conteúdo detalhado.
|
|
256
|
+
*/
|
|
257
|
+
declare const SwitchOnClick: React.FC<SwitchOnClickProps>;
|
|
258
|
+
|
|
259
|
+
interface GenericChartProps {
|
|
260
|
+
chartType: any;
|
|
261
|
+
graphID: string;
|
|
262
|
+
width?: string;
|
|
263
|
+
height?: string;
|
|
264
|
+
columns: any[];
|
|
265
|
+
rows: any[][];
|
|
266
|
+
chartEvents?: any[];
|
|
267
|
+
options?: Record<string, any>;
|
|
268
|
+
/** Callback opcional para customizar os tooltips */
|
|
269
|
+
tooltipFormatter?: (row: any[]) => string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Wrapper para Google Charts com suporte a tooltips HTML customizados.
|
|
273
|
+
*/
|
|
274
|
+
declare const GenericChart: React.FC<GenericChartProps>;
|
|
275
|
+
|
|
276
|
+
interface GenericREchartProps {
|
|
277
|
+
/** Dados para o gráfico */
|
|
278
|
+
data: any[];
|
|
279
|
+
/** Configuração das linhas (Array de props para o componente <Line />) */
|
|
280
|
+
lines: any[];
|
|
281
|
+
/** Chave do objeto para o eixo X */
|
|
282
|
+
xAxisKey?: string;
|
|
283
|
+
/** Exibe o grid de fundo */
|
|
284
|
+
showGrid?: boolean;
|
|
285
|
+
/** Exibe a legenda */
|
|
286
|
+
showLegend?: boolean;
|
|
287
|
+
/** Exibe o tooltip */
|
|
288
|
+
showTooltip?: boolean;
|
|
289
|
+
/** Largura do container (padrão: 100%) */
|
|
290
|
+
width?: string | number;
|
|
291
|
+
/** Altura do container (padrão: 400) */
|
|
292
|
+
height?: string | number;
|
|
293
|
+
/** Oculta o eixo Y */
|
|
294
|
+
hideYAxis?: boolean;
|
|
295
|
+
/** Unidade para o eixo Y (ex: %) */
|
|
296
|
+
unit?: string;
|
|
297
|
+
/** Margens internas do gráfico */
|
|
298
|
+
margin?: {
|
|
299
|
+
top: number;
|
|
300
|
+
right: number;
|
|
301
|
+
left: number;
|
|
302
|
+
bottom: number;
|
|
303
|
+
};
|
|
304
|
+
/** Range do eixo Y (padrão: [0, 'auto']) */
|
|
305
|
+
YAxisRange?: [number | string, number | string];
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Wrapper performático para Recharts (LineChart) com ordenação automática de datas.
|
|
309
|
+
*/
|
|
310
|
+
declare const GenericREchart: React.FC<GenericREchartProps>;
|
|
311
|
+
|
|
312
|
+
interface ResponsiveContainerProps {
|
|
313
|
+
title?: string;
|
|
314
|
+
show: boolean;
|
|
315
|
+
setShow: (show: boolean) => void;
|
|
316
|
+
children: React.ReactNode;
|
|
317
|
+
onClose?: () => void;
|
|
318
|
+
scrollable?: boolean;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* ResponsiveContainer Component
|
|
322
|
+
*
|
|
323
|
+
* Renders a Modal for displaying content in a responsive container.
|
|
324
|
+
* Previously used GenericOffCanvas for mobile, now uses Modal consistently.
|
|
325
|
+
*
|
|
326
|
+
* @param title - The title of the modal.
|
|
327
|
+
* @param show - Controls the visibility of the modal.
|
|
328
|
+
* @param setShow - Function to update the visibility state.
|
|
329
|
+
* @param children - Content to be rendered inside the modal.
|
|
330
|
+
* @param onClose - Optional function to be executed on close.
|
|
331
|
+
* @param scrollable - Optional prop to enable scrolling the content.
|
|
332
|
+
*/
|
|
333
|
+
declare const ResponsiveContainer: React.FC<ResponsiveContainerProps>;
|
|
334
|
+
|
|
335
|
+
interface ExpandableCardItemObject {
|
|
336
|
+
content: React.ReactNode;
|
|
337
|
+
label?: React.ReactNode;
|
|
338
|
+
clickable?: boolean;
|
|
339
|
+
}
|
|
340
|
+
type ExpandableCardItem = string | React.ReactNode | ExpandableCardItemObject;
|
|
341
|
+
interface ExpandableCardProps {
|
|
342
|
+
/** Lista de itens a serem exibidos. Pode ser string, Nodo ou Objeto estruturado */
|
|
343
|
+
items: ExpandableCardItem[];
|
|
344
|
+
/** Quantidade inicial de itens visíveis (padrão: 3) */
|
|
345
|
+
initialVisibleCount?: number;
|
|
346
|
+
/** Habilita a funcionalidade de expansão */
|
|
347
|
+
expandable?: boolean;
|
|
348
|
+
/** Conteúdo para a lateral esquerda */
|
|
349
|
+
leftSideContent?: React.ReactNode;
|
|
350
|
+
/** Conteúdo para a lateral direita */
|
|
351
|
+
rightSideContent?: React.ReactNode;
|
|
352
|
+
/** Classe CSS para o Card */
|
|
353
|
+
cardClassName?: string;
|
|
354
|
+
/** Classe CSS para o Body */
|
|
355
|
+
cardBodyClassName?: string;
|
|
356
|
+
/** Estilo CSS para o Body */
|
|
357
|
+
cardBodyStyle?: React.CSSProperties;
|
|
358
|
+
/** Detecta modo Mobile para layout empilhado */
|
|
359
|
+
isMobile?: boolean;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Card expansível com suporte a listagem parcial de itens e conteúdos laterais.
|
|
363
|
+
* Layout otimizado para visualização de densidade variável.
|
|
364
|
+
*/
|
|
365
|
+
declare const ExpandableCard: React.FC<ExpandableCardProps>;
|
|
366
|
+
|
|
367
|
+
interface UuidPillProps {
|
|
368
|
+
uuid: string | null | undefined;
|
|
369
|
+
bg?: string;
|
|
370
|
+
textColor?: string;
|
|
371
|
+
short?: number;
|
|
372
|
+
}
|
|
373
|
+
declare const UuidPill: React.FC<UuidPillProps>;
|
|
374
|
+
|
|
375
|
+
declare class ConfigObject {
|
|
376
|
+
dotNotation: string;
|
|
377
|
+
style?: React.CSSProperties;
|
|
378
|
+
onClick?: () => void;
|
|
379
|
+
onBlur?: () => void;
|
|
380
|
+
onHideClick?: () => void;
|
|
381
|
+
hidden?: boolean;
|
|
382
|
+
mapData?: any;
|
|
383
|
+
additionalComponents?: (() => React.ReactNode)[];
|
|
384
|
+
constructor(dotNotation: string, style?: React.CSSProperties, onClick?: () => void, onBlur?: () => void, onHideClick?: () => void, hidden?: boolean, mapData?: any, additionalComponents?: (() => React.ReactNode)[]);
|
|
385
|
+
}
|
|
386
|
+
interface GenericDisplayProps {
|
|
387
|
+
ops?: any[];
|
|
388
|
+
loadFunc?: () => Promise<any>;
|
|
389
|
+
configObjects?: ConfigObject[];
|
|
390
|
+
rootName?: string;
|
|
391
|
+
context?: string;
|
|
392
|
+
/** Optional hook to call on mount/context update. Replaces the app-specific useContextUpdateHandler. */
|
|
393
|
+
onRefresh?: (refreshFunc: () => void) => void;
|
|
394
|
+
/** Optional renderer for edit buttons on root objects. */
|
|
395
|
+
editButtonRenderer?: (obj: any, location: string | null) => React.ReactNode;
|
|
396
|
+
}
|
|
397
|
+
declare const GenericDisplay: React.FC<GenericDisplayProps>;
|
|
398
|
+
|
|
399
|
+
interface StatusIndicatorProps {
|
|
400
|
+
/** Status (pendente, executando, concluido, canceled, naoAtribuida) */
|
|
401
|
+
status: string;
|
|
402
|
+
/** Quantidade/Contagem associada ao status */
|
|
403
|
+
count?: number | string;
|
|
404
|
+
/** Classe CSS adicional para o container */
|
|
405
|
+
containerClassName?: string;
|
|
406
|
+
/** Mapeamento customizado de labels de status */
|
|
407
|
+
customLabels?: Record<string, string>;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Indicador de status tipo 'Flag' com destaque de cor e contagem.
|
|
411
|
+
*/
|
|
412
|
+
declare const StatusIndicator: React.FC<StatusIndicatorProps>;
|
|
413
|
+
|
|
414
|
+
interface VerticalItemsDisplayProps {
|
|
415
|
+
/** Conteúdo do primeiro item vertical */
|
|
416
|
+
item1?: React.ReactNode;
|
|
417
|
+
/** Conteúdo do segundo item vertical */
|
|
418
|
+
item2?: React.ReactNode;
|
|
419
|
+
/** Conteúdo do terceiro item vertical */
|
|
420
|
+
item3?: React.ReactNode;
|
|
421
|
+
/** Classe CSS adicional */
|
|
422
|
+
className?: string;
|
|
423
|
+
/** Estilo CSS customizado */
|
|
424
|
+
style?: React.CSSProperties;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Exibidor simples de até 3 itens empilhados verticalmente.
|
|
428
|
+
*/
|
|
429
|
+
declare const VerticalItemsDisplay: React.FC<VerticalItemsDisplayProps>;
|
|
430
|
+
|
|
431
|
+
interface StatusLightProps {
|
|
432
|
+
/** Se a luz deve estar ativa (verde) ou inativa (cinza) */
|
|
433
|
+
active?: boolean;
|
|
434
|
+
/** Cor customizada para o estado ativo (padrão: green) */
|
|
435
|
+
activeLightColor?: string;
|
|
436
|
+
/** Cor customizada para o estado inativo (padrão: gray) */
|
|
437
|
+
inactiveLightColor?: string;
|
|
438
|
+
/** Tamanho do círculo (padrão: 20px) */
|
|
439
|
+
size?: number | string;
|
|
440
|
+
/** Classe CSS adicional */
|
|
441
|
+
className?: string;
|
|
442
|
+
/** Estilo CSS customizado */
|
|
443
|
+
style?: React.CSSProperties;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Componente de luz indicativa para status binários (Ativo/Inativo, Online/Offline, etc).
|
|
447
|
+
*/
|
|
448
|
+
declare const StatusLight: React.FC<StatusLightProps>;
|
|
449
|
+
|
|
450
|
+
interface TimerDisplayProps {
|
|
451
|
+
/** ID único do timer ou da entidade relacionada */
|
|
452
|
+
id?: string | number;
|
|
453
|
+
/** Tempo atual em segundos */
|
|
454
|
+
tempo?: number;
|
|
455
|
+
/** Se o timer já foi encerrado definitivamente */
|
|
456
|
+
isStopped?: boolean;
|
|
457
|
+
/** Exibe o botão de pausa */
|
|
458
|
+
pausable?: boolean;
|
|
459
|
+
/** Exibe o botão de play */
|
|
460
|
+
playable?: boolean;
|
|
461
|
+
/** Se falso, exibe um placeholder de visualização (ex: - : - : -) */
|
|
462
|
+
enableView?: boolean;
|
|
463
|
+
/** Callback chamado ao clicar em pausar */
|
|
464
|
+
onPause?: (id: string | number) => void;
|
|
465
|
+
/** Callback chamado ao clicar em iniciar/continuar */
|
|
466
|
+
onPlay?: (id: string | number) => void;
|
|
467
|
+
/** Label customizado para quando o timer não foi iniciado */
|
|
468
|
+
emptyMessage?: string;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Componente visual para exibição e controle básico de timers.
|
|
472
|
+
* Mantém-se agnóstico à lógica de persistência e notificações do host.
|
|
473
|
+
*/
|
|
474
|
+
declare const TimerDisplay: React.FC<TimerDisplayProps>;
|
|
475
|
+
|
|
476
|
+
type RecursoMode = 'manutencao' | 'processo';
|
|
477
|
+
interface RecursoDisplayerProps {
|
|
478
|
+
mode?: RecursoMode;
|
|
479
|
+
controller: any;
|
|
480
|
+
selectedList?: any[];
|
|
481
|
+
onSaveRecurso: (recursos: any[]) => void;
|
|
482
|
+
singleReturn?: boolean;
|
|
483
|
+
}
|
|
484
|
+
declare const RecursoDisplayer: React.FC<RecursoDisplayerProps>;
|
|
485
|
+
|
|
486
|
+
interface StatusMeta {
|
|
487
|
+
label: string;
|
|
488
|
+
color: string;
|
|
489
|
+
count?: number;
|
|
490
|
+
}
|
|
491
|
+
interface StatusPillsProps {
|
|
492
|
+
/** Objeto contendo os metadados de cada status (Chave -> Meta) */
|
|
493
|
+
statuses: Record<string, StatusMeta>;
|
|
494
|
+
/** Chaves dos status atualmente ativos/selecionados */
|
|
495
|
+
activeKeys: string[];
|
|
496
|
+
/** Callback chamado quando a seleção muda */
|
|
497
|
+
onSelectionChange: (keys: string[]) => void;
|
|
498
|
+
/** Se deve permitir seleção de múltiplos status (padrão: true) */
|
|
499
|
+
multiSelect?: boolean;
|
|
500
|
+
/** Classe CSS adicional */
|
|
501
|
+
className?: string;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Filtro rápido de status usando 'Pills' clicáveis.
|
|
505
|
+
* Altamente performático por ser puramente visual e controlado via props.
|
|
506
|
+
*/
|
|
507
|
+
declare const StatusPills: React.FC<StatusPillsProps>;
|
|
508
|
+
|
|
509
|
+
type PeriodPreset = "today" | "week" | "fortnight" | "month" | "year";
|
|
510
|
+
interface PeriodSelectorProps {
|
|
511
|
+
/** Data inicial formatada (YYYY-MM-DDTHH:mm) */
|
|
512
|
+
startDate: string;
|
|
513
|
+
/** Data final formatada (YYYY-MM-DDTHH:mm) */
|
|
514
|
+
endDate: string;
|
|
515
|
+
/** Callback quando a data inicial muda */
|
|
516
|
+
onStartDateChange: (date: string) => void;
|
|
517
|
+
/** Callback quando a data final muda */
|
|
518
|
+
onEndDateChange: (date: string) => void;
|
|
519
|
+
/** Callback opcional quando um atalho é selecionado */
|
|
520
|
+
onPresetSelect?: (preset: PeriodPreset) => void;
|
|
521
|
+
/** Título do componente */
|
|
522
|
+
label?: string;
|
|
523
|
+
/** Se permite selecionar datas futuras (padrão: false) */
|
|
524
|
+
allowFuture?: boolean;
|
|
525
|
+
/** Classe CSS adicional */
|
|
526
|
+
className?: string;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Seletor de período (datas) com visão compacta e atalhos rápidos.
|
|
530
|
+
*/
|
|
531
|
+
declare const PeriodSelector: React.FC<PeriodSelectorProps>;
|
|
532
|
+
|
|
533
|
+
interface AdvancedFilterBarProps {
|
|
534
|
+
/** Conteúdo dos filtros (grid de filtros) */
|
|
535
|
+
children: React.ReactNode;
|
|
536
|
+
/** Título da barra (padrão: Filtros) */
|
|
537
|
+
title?: string;
|
|
538
|
+
/** Quantidade de filtros ativos para exibir no badge */
|
|
539
|
+
activeFiltersCount?: number;
|
|
540
|
+
/** Callback para limpar todos os filtros */
|
|
541
|
+
onClearAll?: () => void;
|
|
542
|
+
/** Se deve iniciar expandido (padrão: false) */
|
|
543
|
+
defaultExpanded?: boolean;
|
|
544
|
+
/** Classe CSS adicional */
|
|
545
|
+
className?: string;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Container colapsável para filtros complexos.
|
|
549
|
+
* Organiza filtros em um grid limpo e fornece ações de clearing.
|
|
550
|
+
*/
|
|
551
|
+
declare const AdvancedFilterBar: React.FC<AdvancedFilterBarProps>;
|
|
552
|
+
|
|
553
|
+
interface MailSenderProps {
|
|
554
|
+
/** Conteúdo HTML a ser enviado no corpo do e-mail */
|
|
555
|
+
htmlContent: string;
|
|
556
|
+
/** Nome da empresa para o assunto/corpo padrão */
|
|
557
|
+
companyName: string;
|
|
558
|
+
/** Callback para buscar a lista de e-mails da companhia */
|
|
559
|
+
onFetchEmails: () => Promise<Array<{
|
|
560
|
+
email: string;
|
|
561
|
+
}>>;
|
|
562
|
+
/** Callback para enviar o e-mail consolidado */
|
|
563
|
+
onSendEmail: (emailData: {
|
|
564
|
+
to: string;
|
|
565
|
+
subject: string;
|
|
566
|
+
text: string;
|
|
567
|
+
html: string;
|
|
568
|
+
}) => Promise<void>;
|
|
569
|
+
/** Flag para ocultar o componente */
|
|
570
|
+
hide?: boolean;
|
|
571
|
+
/** Render prop opcional para o botão de ativação customizado */
|
|
572
|
+
renderTrigger?: (props: {
|
|
573
|
+
onClick: () => void;
|
|
574
|
+
loading: boolean;
|
|
575
|
+
}) => React.ReactNode;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Componente para seleção de destinatários e envio de e-mails.
|
|
579
|
+
* Refatorado para ser agnóstico a implementações de hooks/endpoints específicos das apps.
|
|
580
|
+
*/
|
|
581
|
+
declare const MailSender: React.FC<MailSenderProps>;
|
|
582
|
+
|
|
583
|
+
interface DeleteConfirmProps {
|
|
584
|
+
/** Controla visibilidade do modal */
|
|
585
|
+
show: boolean;
|
|
586
|
+
/** Fecha o modal */
|
|
587
|
+
onHide: (show: boolean) => void;
|
|
588
|
+
/** Callback chamado ao confirmar a exclusão */
|
|
589
|
+
onConfirm: (details: string) => void;
|
|
590
|
+
/** Título do modal */
|
|
591
|
+
title?: string;
|
|
592
|
+
/** Texto do corpo do modal (pode ser string ou função que recebe payload) */
|
|
593
|
+
dialogText?: string | ((payload: any) => string);
|
|
594
|
+
/** Dados extras para o dialogText */
|
|
595
|
+
payload?: any;
|
|
596
|
+
/** Se true, exige um campo de 'Motivo' com pelo menos 8 caracteres */
|
|
597
|
+
needExclusionDetails?: boolean;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Modal de confirmação de exclusão padronizado.
|
|
601
|
+
*/
|
|
602
|
+
declare const DeleteConfirm: React.FC<DeleteConfirmProps>;
|
|
603
|
+
|
|
604
|
+
interface AutoCompleteProps {
|
|
605
|
+
className?: string;
|
|
606
|
+
/** Opções estáticas iniciais */
|
|
607
|
+
ops?: any[];
|
|
608
|
+
/** Chave para ordenação */
|
|
609
|
+
sortKey?: string;
|
|
610
|
+
/** Chave para exibição no input */
|
|
611
|
+
displayKey?: string;
|
|
612
|
+
/** Chaves para exibição concatenada */
|
|
613
|
+
displayKeys?: string[];
|
|
614
|
+
/** Callback de alteração no input */
|
|
615
|
+
onValueChanged?: (val: string) => void;
|
|
616
|
+
/** Callback ao clicar em uma sugestão */
|
|
617
|
+
onSelectedClick: (li: any, index: number, lItem: any[]) => void;
|
|
618
|
+
/** Valor controlado */
|
|
619
|
+
value?: string;
|
|
620
|
+
/** Botão de ação opcional (ex: clear) */
|
|
621
|
+
actionButton?: (clear: () => void) => React.ReactNode;
|
|
622
|
+
/** Segundo botão de ação opcional */
|
|
623
|
+
actionButton2?: (input: string) => React.ReactNode;
|
|
624
|
+
placeH?: string;
|
|
625
|
+
title?: string;
|
|
626
|
+
/** Valor para filtrar a lista inicial */
|
|
627
|
+
filter?: any;
|
|
628
|
+
filterField?: string;
|
|
629
|
+
/** Função de carregamento assíncrono */
|
|
630
|
+
loadFunc?: () => Promise<any[]>;
|
|
631
|
+
/** Condição para disparar o carregamento */
|
|
632
|
+
loadCondition?: boolean;
|
|
633
|
+
onBlurEvent?: (e: React.FocusEvent<HTMLInputElement>, input: string) => void;
|
|
634
|
+
/** Função customizada para formatar a label da lista */
|
|
635
|
+
formatationFunc?: (item: any) => string;
|
|
636
|
+
onEscKeyDown?: () => void;
|
|
637
|
+
onEnterKeyDown?: (input: string) => void;
|
|
638
|
+
/** Margem superior */
|
|
639
|
+
margT?: number;
|
|
640
|
+
/** Margem inferior */
|
|
641
|
+
margB?: number;
|
|
642
|
+
hideComponent?: boolean;
|
|
643
|
+
disableComponent?: boolean;
|
|
644
|
+
disableSelect?: boolean;
|
|
645
|
+
autoFocusConfig?: boolean;
|
|
646
|
+
onLoad?: (data: any[]) => void;
|
|
647
|
+
/** Chave para cache em memória */
|
|
648
|
+
cacheKey?: string;
|
|
649
|
+
/** Mínimo de caracteres para mostrar a lista */
|
|
650
|
+
minChars?: number;
|
|
651
|
+
/** Limite de itens na lista */
|
|
652
|
+
maxItems?: number;
|
|
653
|
+
/** Se deve mostrar a lista ao focar */
|
|
654
|
+
showListOnFocus?: boolean;
|
|
655
|
+
/** Se deve carregar sob demanda ao digitar */
|
|
656
|
+
lazyLoad?: boolean;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Componente de Input com Auto-complete dinâmico.
|
|
660
|
+
* Suporta cache em memória compartilhada entre instâncias via window.
|
|
661
|
+
*/
|
|
662
|
+
declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
663
|
+
|
|
664
|
+
interface SelectOption {
|
|
665
|
+
label: string;
|
|
666
|
+
value: string | number;
|
|
667
|
+
}
|
|
668
|
+
interface FieldDefinition {
|
|
669
|
+
label: string;
|
|
670
|
+
key: string;
|
|
671
|
+
type: 'text' | 'number' | 'select' | 'date' | 'custom-select';
|
|
672
|
+
options?: SelectOption[];
|
|
673
|
+
placeholder?: string;
|
|
674
|
+
required?: boolean;
|
|
675
|
+
}
|
|
676
|
+
interface GenericFormProps {
|
|
677
|
+
fields: FieldDefinition[];
|
|
678
|
+
onSubmit: (values: Record<string, any>) => void;
|
|
679
|
+
/** Optional custom select renderer. If not provided, custom-select falls back to native select. */
|
|
680
|
+
renderCustomSelect?: (props: {
|
|
681
|
+
label: string;
|
|
682
|
+
value: any;
|
|
683
|
+
options?: SelectOption[];
|
|
684
|
+
onChange: (value: any) => void;
|
|
685
|
+
placeholder?: string;
|
|
686
|
+
}) => React.ReactNode;
|
|
687
|
+
}
|
|
688
|
+
declare const GenericForm: React.FC<GenericFormProps>;
|
|
689
|
+
|
|
690
|
+
interface GenericSelectProps {
|
|
691
|
+
noLabel?: boolean;
|
|
692
|
+
title?: string;
|
|
693
|
+
onChange: (value: any) => void;
|
|
694
|
+
ops?: any[];
|
|
695
|
+
selection?: any;
|
|
696
|
+
returnType?: string;
|
|
697
|
+
displayType?: string;
|
|
698
|
+
filter?: string;
|
|
699
|
+
filterField?: string;
|
|
700
|
+
valueType?: string;
|
|
701
|
+
loadFunc?: () => Promise<any>;
|
|
702
|
+
loadCondition?: boolean;
|
|
703
|
+
actionClick?: () => React.ReactNode;
|
|
704
|
+
locked?: boolean;
|
|
705
|
+
isBold?: boolean;
|
|
706
|
+
default?: string;
|
|
707
|
+
}
|
|
708
|
+
declare class GenericSelectOps {
|
|
709
|
+
noLabel?: boolean;
|
|
710
|
+
title?: string;
|
|
711
|
+
onChange?: (value: any) => void;
|
|
712
|
+
ops?: any[];
|
|
713
|
+
selection?: any;
|
|
714
|
+
returnType?: string;
|
|
715
|
+
displayType?: string;
|
|
716
|
+
filter?: string;
|
|
717
|
+
filterField?: string;
|
|
718
|
+
valueType?: string;
|
|
719
|
+
loadFunc?: () => Promise<any>;
|
|
720
|
+
loadCondition?: boolean;
|
|
721
|
+
actionClick?: () => React.ReactNode;
|
|
722
|
+
locked?: boolean;
|
|
723
|
+
constructor(noLabel?: boolean, title?: string, onChange?: (value: any) => void, ops?: any[], selection?: any, returnType?: string, displayType?: string, filter?: string, filterField?: string, valueType?: string, loadFunc?: () => Promise<any>, loadCondition?: boolean, actionClick?: () => React.ReactNode, locked?: boolean);
|
|
724
|
+
}
|
|
725
|
+
declare const GenericSelect: React.FC<GenericSelectProps>;
|
|
726
|
+
|
|
727
|
+
interface FormFieldProps {
|
|
728
|
+
/** Valor do campo */
|
|
729
|
+
val?: string | number;
|
|
730
|
+
/** Callback quando o valor muda */
|
|
731
|
+
onValueUpdate?: (val: string, event: React.ChangeEvent<any>) => void;
|
|
732
|
+
/** Callback no blur */
|
|
733
|
+
onBlur?: (val: string, event: React.FocusEvent<any>) => void;
|
|
734
|
+
/** Label exibida no FloatingLabel */
|
|
735
|
+
label?: string;
|
|
736
|
+
/** Tipo do input (text, number, password, etc) */
|
|
737
|
+
ty?: string;
|
|
738
|
+
/** Callback para botão de ação à direita */
|
|
739
|
+
actionClick?: () => React.ReactNode;
|
|
740
|
+
/** Callback para segundo botão de ação à direita */
|
|
741
|
+
actionClick2?: () => React.ReactNode;
|
|
742
|
+
/** Referência para o input */
|
|
743
|
+
reference?: React.Ref<any>;
|
|
744
|
+
/** Outros props para o Form.Control */
|
|
745
|
+
others?: any;
|
|
746
|
+
/** Objeto de estilo customizado para o container */
|
|
747
|
+
styleObj?: React.CSSProperties;
|
|
748
|
+
/** Se o campo está bloqueado/desabilitado */
|
|
749
|
+
locked?: boolean;
|
|
750
|
+
/** Se o campo deve ser escondido */
|
|
751
|
+
hide?: boolean;
|
|
752
|
+
/** Callback no mouse leave */
|
|
753
|
+
onMouseLv?: () => void;
|
|
754
|
+
/** Callback ao pressionar Enter */
|
|
755
|
+
onEnterPress?: (val: string) => void;
|
|
756
|
+
/** Classe CSS customizada */
|
|
757
|
+
className?: string;
|
|
758
|
+
/** Se o estado é inválido */
|
|
759
|
+
isInvalid?: boolean;
|
|
760
|
+
/** Mensagem de erro/feedback */
|
|
761
|
+
feedback?: string;
|
|
762
|
+
/** Callback no foco */
|
|
763
|
+
onFocus?: (val: string) => void;
|
|
764
|
+
/** Número de linhas para textarea */
|
|
765
|
+
rows?: number;
|
|
766
|
+
/** Se deve renderizar como textarea */
|
|
767
|
+
asTextArea?: boolean;
|
|
768
|
+
/** ID único para o controle */
|
|
769
|
+
controlId?: string;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Campo de formulário padronizado com suporte a FloatingLabel e botões de ação laterais.
|
|
773
|
+
*/
|
|
774
|
+
declare const FormField: React.FC<FormFieldProps>;
|
|
775
|
+
|
|
776
|
+
interface ClickToWriteFieldProps {
|
|
777
|
+
/** Valor exibido no botão inicial */
|
|
778
|
+
buttonDisplay: React.ReactNode | (() => React.ReactNode);
|
|
779
|
+
/** Tipo do campo de input (default: 'text') */
|
|
780
|
+
fieldType?: string;
|
|
781
|
+
/** Texto/Label para o FormField */
|
|
782
|
+
fieldLabel?: string;
|
|
783
|
+
/** Props para o botão inicial */
|
|
784
|
+
buttonProps?: ButtonProps;
|
|
785
|
+
/** Props extras para o FormField */
|
|
786
|
+
fieldProps?: any;
|
|
787
|
+
/** Callback chamado ao digitar no campo */
|
|
788
|
+
onFieldValueUpdate: (val: string) => void;
|
|
789
|
+
/** Habilita botão de ação extra no campo de input */
|
|
790
|
+
enableFieldActionButton?: boolean;
|
|
791
|
+
/** Ícone para o botão extra */
|
|
792
|
+
fieldActionButtonIcon?: () => React.ReactNode;
|
|
793
|
+
/** Props para o botão extra */
|
|
794
|
+
fieldActionButtonProps?: ButtonProps;
|
|
795
|
+
/** Callback para o botão extra */
|
|
796
|
+
fieldActionButtonCallback?: (ref: React.RefObject<HTMLInputElement>) => void;
|
|
797
|
+
/** Callback ao pressionar Enter */
|
|
798
|
+
onEnterPress?: (ref: React.RefObject<HTMLInputElement>) => void;
|
|
799
|
+
/** Callback para limpar o input ao abrir */
|
|
800
|
+
cleanRef?: (ref: React.RefObject<HTMLInputElement>) => void;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Componente que exibe um botão e, ao ser clicado, alterna para um campo de input.
|
|
804
|
+
* Ideal para edições rápidas in-place.
|
|
805
|
+
*/
|
|
806
|
+
declare const ClickToWriteField: React.FC<ClickToWriteFieldProps>;
|
|
807
|
+
|
|
808
|
+
interface ColorPickerProps {
|
|
809
|
+
/** Cor selecionada atualmente */
|
|
810
|
+
selectedColor: string;
|
|
811
|
+
/** Callback para quando a cor muda */
|
|
812
|
+
onColorChange: (color: string) => void;
|
|
813
|
+
/** Lista de cores sugeridas para a paleta rápida */
|
|
814
|
+
presetColors?: string[];
|
|
815
|
+
/** Título do componente (padrão: 'Cor de Identificação') */
|
|
816
|
+
title?: string;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Seletor de cores com preview e paleta de cores pré-definidas.
|
|
820
|
+
*/
|
|
821
|
+
declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
822
|
+
|
|
823
|
+
interface SwitchProps extends Omit<FormCheckProps, 'onChange' | 'value'> {
|
|
824
|
+
/** Rótulo do switch */
|
|
825
|
+
label?: string;
|
|
826
|
+
/** Valor atual (checked) */
|
|
827
|
+
value?: boolean;
|
|
828
|
+
/** Callback chamado quando o valor muda */
|
|
829
|
+
onSwitchChange?: (val: boolean) => void;
|
|
830
|
+
/** Valor padrão inicial (se não for controlado) */
|
|
831
|
+
defaultChecked?: boolean;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Componente de Switch (Checkbox tipo switch) padronizado.
|
|
835
|
+
*/
|
|
836
|
+
declare const Switch: React.FC<SwitchProps>;
|
|
837
|
+
|
|
838
|
+
interface UploadAreaProps {
|
|
839
|
+
/** Callback chamado ao selecionar um arquivo */
|
|
840
|
+
onFilePut: (file: File) => void;
|
|
841
|
+
/** Objeto do arquivo já anexado (opcional) */
|
|
842
|
+
anexo?: {
|
|
843
|
+
name: string;
|
|
844
|
+
} | null;
|
|
845
|
+
/** Tipos de arquivos aceitos (padrão: JPEG, PNG) */
|
|
846
|
+
accept?: Accept;
|
|
847
|
+
/** Tamanho máximo em bytes (padrão: 50MB) */
|
|
848
|
+
maxSize?: number;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Área de upload com suporte a Drag & Drop e indicação de arquivo anexado.
|
|
852
|
+
*/
|
|
853
|
+
declare const UploadArea: React.FC<UploadAreaProps>;
|
|
854
|
+
|
|
855
|
+
interface FindRecursoByTagFieldProps {
|
|
856
|
+
/** Callback chamado quando um recurso é selecionado ou lido via QR. */
|
|
857
|
+
callback: (recurso: any, confirmed: boolean) => void;
|
|
858
|
+
/** Controller de recurso injetado (deve implementar read, get e findByTagDescription) */
|
|
859
|
+
recursoController?: {
|
|
860
|
+
read: (endpoint: string, data?: any) => Promise<any>;
|
|
861
|
+
get: (endpoint: string) => Promise<any>;
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Componente para encontrar um recurso por sua tag (descrição ou ID).
|
|
866
|
+
* Suporta busca via AutoComplete e leitura via QR Code.
|
|
867
|
+
*/
|
|
868
|
+
declare const FindRecursoByTagField: React.FC<FindRecursoByTagFieldProps>;
|
|
869
|
+
|
|
870
|
+
interface Sector {
|
|
871
|
+
id: string | number;
|
|
872
|
+
nome: string;
|
|
873
|
+
}
|
|
874
|
+
interface SectorSelectorProps {
|
|
875
|
+
/** Lista de setores a serem exibidos */
|
|
876
|
+
setores: Sector[];
|
|
877
|
+
/** Callback quando um setor é selecionado */
|
|
878
|
+
onSectorSelect: (setor: Sector) => void;
|
|
879
|
+
/** Label exibido acima do seletor */
|
|
880
|
+
selectionLabel?: string;
|
|
881
|
+
/** Placeholder quando nada está selecionado */
|
|
882
|
+
selectionPlaceholder?: string;
|
|
883
|
+
/** Permite selecionar a opção "Todos" */
|
|
884
|
+
allowAll?: boolean;
|
|
885
|
+
/** Nome do setor selecionado por padrão/externamente */
|
|
886
|
+
defaultSectorName?: string | false;
|
|
887
|
+
/** Oculta o componente */
|
|
888
|
+
hideComponent?: boolean;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Seletor de setores customizado com dropdown estilizado.
|
|
892
|
+
* Totalmente desacoplado do Redux/API; dados devem ser injetados via props.
|
|
893
|
+
*/
|
|
894
|
+
declare const SectorSelector: React.FC<SectorSelectorProps>;
|
|
895
|
+
|
|
896
|
+
interface UnidadeMaterialValue {
|
|
897
|
+
material?: {
|
|
898
|
+
id: string | number;
|
|
899
|
+
nome: string;
|
|
900
|
+
} | null;
|
|
901
|
+
quantidade?: number | string;
|
|
902
|
+
unidade?: {
|
|
903
|
+
id: string | number;
|
|
904
|
+
nome: string;
|
|
905
|
+
} | null;
|
|
906
|
+
}
|
|
907
|
+
interface UnidadeMaterialFormProps {
|
|
908
|
+
/** Valor atual da composição Unidade-Material */
|
|
909
|
+
value: UnidadeMaterialValue;
|
|
910
|
+
/** Calback quando o material é selecionado */
|
|
911
|
+
onMaterialSelected: (material: any) => void;
|
|
912
|
+
/** Callback quando a quantidade é alterada */
|
|
913
|
+
onQuantidadeUpdate: (qtd: string) => void;
|
|
914
|
+
/** Callback quando a unidade de medida é selecionada */
|
|
915
|
+
onUnidadeSelected: (unidade: any) => void;
|
|
916
|
+
/** Callback para o botão 'Novo Material' */
|
|
917
|
+
onNavigateToCreateMaterial?: () => void;
|
|
918
|
+
/** Callback para o botão 'Nova Unidade' */
|
|
919
|
+
onNavigateToCreateUnidade?: () => void;
|
|
920
|
+
/** Função que retorna a Promise de carregamento de materiais */
|
|
921
|
+
loadMaterialsFunc: () => Promise<any[]>;
|
|
922
|
+
/** Função que retorna a Promise de carregamento de unidades */
|
|
923
|
+
loadUnidadesFunc: () => Promise<any[]>;
|
|
924
|
+
/** Label para o campo de Material (padrão: Materia Prima) */
|
|
925
|
+
materialLabel?: string;
|
|
926
|
+
/** Oculta campos específicos se necessário */
|
|
927
|
+
hideMaterial?: boolean;
|
|
928
|
+
hideQuantidade?: boolean;
|
|
929
|
+
hideUnidade?: boolean;
|
|
930
|
+
/** Classe CSS customizada */
|
|
931
|
+
className?: string;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Componente de formulário para associação de Materiais e Unidades com quantidades.
|
|
935
|
+
* Agnóstico ao Redux; deve ser controlado pelo componente pai.
|
|
936
|
+
*/
|
|
937
|
+
declare const UnidadeMaterialForm: React.FC<UnidadeMaterialFormProps>;
|
|
938
|
+
|
|
939
|
+
interface IconLabelItemProps {
|
|
940
|
+
/** Ícone a ser exibido (ex: vindo de react-icons) */
|
|
941
|
+
icon: React.ReactNode;
|
|
942
|
+
/** Texto/Label associado ao ícone */
|
|
943
|
+
label: React.ReactNode;
|
|
944
|
+
/** Classe CSS para o container principal */
|
|
945
|
+
containerClassName?: string;
|
|
946
|
+
/** Classe CSS para o label */
|
|
947
|
+
labelClassName?: string;
|
|
948
|
+
/** Callback de clique */
|
|
949
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
950
|
+
/** Estilo CSS opcional para o container */
|
|
951
|
+
style?: React.CSSProperties;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Componente que agrupa um ícone e um label.
|
|
955
|
+
*/
|
|
956
|
+
declare const IconLabelItem: React.FC<IconLabelItemProps>;
|
|
957
|
+
|
|
958
|
+
interface IconLabelListItem {
|
|
959
|
+
/** Ícone para o item */
|
|
960
|
+
icon: React.ReactNode;
|
|
961
|
+
/** Label para o item */
|
|
962
|
+
label: React.ReactNode;
|
|
963
|
+
/** Callback de clique opcional para este item específico */
|
|
964
|
+
onClick?: () => void;
|
|
965
|
+
}
|
|
966
|
+
interface IconLabelListProps {
|
|
967
|
+
/** Lista de itens a serem exibidos */
|
|
968
|
+
items: IconLabelListItem[];
|
|
969
|
+
/** Classe CSS adicional para o container da lista */
|
|
970
|
+
className?: string;
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* Lista horizontal de ícones com labels.
|
|
974
|
+
*/
|
|
975
|
+
declare const IconLabelList: React.FC<IconLabelListProps>;
|
|
976
|
+
|
|
977
|
+
interface Notification {
|
|
978
|
+
id: string | number;
|
|
979
|
+
context?: string;
|
|
980
|
+
contextId?: string | number;
|
|
981
|
+
content?: string;
|
|
982
|
+
status: 'read' | 'unread';
|
|
983
|
+
createdAt: string | number | Date;
|
|
984
|
+
readAt?: string | number | Date | null;
|
|
985
|
+
}
|
|
986
|
+
interface NotificationItemProps {
|
|
987
|
+
/** Objeto da notificação */
|
|
988
|
+
notification: Notification;
|
|
989
|
+
/** Callback ao clicar para ler/expandir */
|
|
990
|
+
onRead: (notification: Notification) => void;
|
|
991
|
+
/** Callback para descartar/deletar a notificação */
|
|
992
|
+
onDismiss: (notification: Notification) => void;
|
|
993
|
+
/** Tradução customizada para campos vazios */
|
|
994
|
+
emptyContentLabel?: string;
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* Item individual de notificação com suporte a preview, modal de detalhes e ações rápidas.
|
|
998
|
+
*/
|
|
999
|
+
declare const NotificationItem: React.FC<NotificationItemProps>;
|
|
1000
|
+
|
|
1001
|
+
interface NotificationBellProps {
|
|
1002
|
+
/** Lista de notificações a serem exibidas no dropdown */
|
|
1003
|
+
notifications: Notification[];
|
|
1004
|
+
/** Callback quando uma notificação é lida */
|
|
1005
|
+
onItemRead: (n: Notification) => void;
|
|
1006
|
+
/** Callback quando uma notificação é descartada */
|
|
1007
|
+
onItemDismiss: (n: Notification) => void;
|
|
1008
|
+
/** Callback para 'Marcar todas como lidas' */
|
|
1009
|
+
onMarkAllRead?: () => void;
|
|
1010
|
+
/** Tamanho do ícone do sino (padrão: 20) */
|
|
1011
|
+
size?: number;
|
|
1012
|
+
/** Classe CSS para o container */
|
|
1013
|
+
className?: string;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Sino de notificações com contador de mensagens não lidas e dropdown de itens.
|
|
1017
|
+
*/
|
|
1018
|
+
declare const NotificationBell: React.FC<NotificationBellProps>;
|
|
1019
|
+
|
|
1020
|
+
interface ModalBasicTemplateProps {
|
|
1021
|
+
/** Se o modal deve ser exibido */
|
|
1022
|
+
show: boolean;
|
|
1023
|
+
/** Callback para fechar o modal */
|
|
1024
|
+
closeFunc: () => void;
|
|
1025
|
+
/** Conteúdo do Body (React Node ou Função que retorna Node) */
|
|
1026
|
+
body: React.ReactNode | (() => React.ReactNode);
|
|
1027
|
+
/** Conteúdo do Header (opcional) */
|
|
1028
|
+
header?: React.ReactNode | (() => React.ReactNode);
|
|
1029
|
+
/** Conteúdo do Footer (opcional) */
|
|
1030
|
+
footer?: React.ReactNode | (() => React.ReactNode);
|
|
1031
|
+
/** Props adicionais para o componente Modal do Bootstrap */
|
|
1032
|
+
props?: ModalProps & {
|
|
1033
|
+
bodyStyle?: React.CSSProperties;
|
|
1034
|
+
dialogStyle?: React.CSSProperties;
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* Template base flexível para criação de modais consistentes.
|
|
1039
|
+
*/
|
|
1040
|
+
declare const ModalBasicTemplate: React.FC<ModalBasicTemplateProps>;
|
|
1041
|
+
|
|
1042
|
+
interface SelectDateModalProps {
|
|
1043
|
+
/** Se o modal deve ser exibido */
|
|
1044
|
+
show: boolean;
|
|
1045
|
+
/** Callback para fechar o modal */
|
|
1046
|
+
onClose: () => void;
|
|
1047
|
+
/** Callback quando uma data é selecionada/confirmada */
|
|
1048
|
+
onSelect: (date: string) => void;
|
|
1049
|
+
/** Título do modal (padrão: Selecionar Data) */
|
|
1050
|
+
title?: string;
|
|
1051
|
+
/** Label do campo de data (padrão: Escolha a data) */
|
|
1052
|
+
label?: string;
|
|
1053
|
+
/** Data inicial (padrão: agora) */
|
|
1054
|
+
initialDate?: string;
|
|
1055
|
+
/** Permite datas futuras? */
|
|
1056
|
+
allowFuture?: boolean;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Modal simples para seleção de uma única data/hora.
|
|
1060
|
+
*/
|
|
1061
|
+
declare const SelectDateModal: React.FC<SelectDateModalProps>;
|
|
1062
|
+
|
|
1063
|
+
interface Justificativa {
|
|
1064
|
+
id: string | number;
|
|
1065
|
+
descricao: string;
|
|
1066
|
+
user?: {
|
|
1067
|
+
userId: string | number;
|
|
1068
|
+
userName?: string;
|
|
1069
|
+
firstName?: string;
|
|
1070
|
+
};
|
|
1071
|
+
createdAt: string | number | Date;
|
|
1072
|
+
removed?: boolean;
|
|
1073
|
+
isNew?: boolean;
|
|
1074
|
+
}
|
|
1075
|
+
interface JustificativaModalProps {
|
|
1076
|
+
/** Se o modal está aberto */
|
|
1077
|
+
show: boolean;
|
|
1078
|
+
/** Callback para fechar */
|
|
1079
|
+
onClose: () => void;
|
|
1080
|
+
/** Lista atual de justificativas */
|
|
1081
|
+
justificativas: Justificativa[];
|
|
1082
|
+
/** ID do usuário atual (para indentificar autoria) */
|
|
1083
|
+
currentUserId: string | number;
|
|
1084
|
+
/** Nome/Primeiro nome do usuário atual */
|
|
1085
|
+
currentUserName: string;
|
|
1086
|
+
/** Callback quando uma nova justificativa é adicionada ou a lista é alterada */
|
|
1087
|
+
onUpdateJustificativas: (justificativas: Justificativa[]) => Promise<void> | void;
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Modal de Justificativas com estilo de chat e suporte a edição/exclusão lógica.
|
|
1091
|
+
*/
|
|
1092
|
+
declare const JustificativaModal: React.FC<JustificativaModalProps>;
|
|
1093
|
+
|
|
1094
|
+
interface ImageData {
|
|
1095
|
+
key: string;
|
|
1096
|
+
author?: string;
|
|
1097
|
+
signedUrl?: string;
|
|
1098
|
+
dataContext?: string;
|
|
1099
|
+
dataId?: string | number;
|
|
1100
|
+
}
|
|
1101
|
+
interface ImageViewModalProps {
|
|
1102
|
+
/** Se o modal está aberto */
|
|
1103
|
+
show: boolean;
|
|
1104
|
+
/** Callback para fechar */
|
|
1105
|
+
onHide: () => void;
|
|
1106
|
+
/** Lista de imagens disponíveis para visualização */
|
|
1107
|
+
imagesData: ImageData[];
|
|
1108
|
+
/** Imagem inicial selecionada */
|
|
1109
|
+
initialImageData?: ImageData;
|
|
1110
|
+
/** Texto alternativo para a imagem */
|
|
1111
|
+
imageAltText?: string;
|
|
1112
|
+
/** Callback para resolver a URL final da imagem caso não tenha signedUrl */
|
|
1113
|
+
resolveImageUrl?: (key: string) => string;
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* Modal especializado para visualização de uma ou mais imagens com seletor de galeria.
|
|
1117
|
+
*/
|
|
1118
|
+
declare const ImageViewModal: React.FC<ImageViewModalProps>;
|
|
1119
|
+
|
|
1120
|
+
interface LoadingProgressProps {
|
|
1121
|
+
hidden?: boolean;
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Componente de indicador de carregamento (Spinner) padronizado.
|
|
1125
|
+
*/
|
|
1126
|
+
declare const LoadingProgress: React.FC<LoadingProgressProps>;
|
|
1127
|
+
|
|
1128
|
+
interface QrReaderProps {
|
|
1129
|
+
/** Callback chamado com o valor lido do QR Code */
|
|
1130
|
+
callback: (result: string) => void;
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Componente para leitura de QR Code usando a câmera do dispositivo.
|
|
1134
|
+
*/
|
|
1135
|
+
declare const QrReader: React.FC<QrReaderProps>;
|
|
1136
|
+
|
|
1137
|
+
interface QrCodeScanButtonProps {
|
|
1138
|
+
/** Callback chamado com o valor lido do QR Code */
|
|
1139
|
+
callback: (result: string) => void;
|
|
1140
|
+
/** Tamanho do ícone (padrão: 25) */
|
|
1141
|
+
size?: number;
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* Botão que alterna a visualização do scanner de QR Code.
|
|
1145
|
+
*/
|
|
1146
|
+
declare const QrCodeScanButton: React.FC<QrCodeScanButtonProps>;
|
|
1147
|
+
|
|
1148
|
+
interface ReusableTableColumnConfig {
|
|
1149
|
+
columns: string[];
|
|
1150
|
+
dataObj: any;
|
|
1151
|
+
}
|
|
1152
|
+
interface ReusableTableWithModalProps {
|
|
1153
|
+
/** Promise que resolve para os dados brutos */
|
|
1154
|
+
fetchDataCallback: () => Promise<any[]>;
|
|
1155
|
+
/** Callback para configurar colunas de cada linha */
|
|
1156
|
+
configureColumnsCallback: (item: any) => ReusableTableColumnConfig;
|
|
1157
|
+
/** Cabeçalhos da tabela */
|
|
1158
|
+
headers: string[];
|
|
1159
|
+
/** Callback chamado pelo botão principal do modal */
|
|
1160
|
+
modalButtonCallback?: (selectedItem: any) => void;
|
|
1161
|
+
/** Conteúdo customizado do modal */
|
|
1162
|
+
modalContent?: (selectedItem: any) => React.ReactNode;
|
|
1163
|
+
/** Label para o botão de confirmação do modal */
|
|
1164
|
+
confirmLabel?: string;
|
|
1165
|
+
/** Callback opcional quando os dados são carregados */
|
|
1166
|
+
onFetchData?: (data: any[]) => void;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Tabela interativa que abre um modal de detalhes ao clicar na linha.
|
|
1170
|
+
* Combina carregamento de dados e apresentação modal em um único componente.
|
|
1171
|
+
*/
|
|
1172
|
+
declare const ReusableTableWithModal: React.FC<ReusableTableWithModalProps>;
|
|
1173
|
+
|
|
1174
|
+
interface TextWithMoreProps {
|
|
1175
|
+
/** Texto a ser exibido */
|
|
1176
|
+
text?: string;
|
|
1177
|
+
/** Comprimento máximo antes de truncar */
|
|
1178
|
+
maxLength: number;
|
|
1179
|
+
/** Label para 'ver mais' (padrão: ver mais) */
|
|
1180
|
+
moreLabel?: string;
|
|
1181
|
+
/** Label para 'ver menos' (padrão: ver menos) */
|
|
1182
|
+
lessLabel?: string;
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Componente que trunca textos longos com opção de expansão in-place.
|
|
1186
|
+
*/
|
|
1187
|
+
declare const TextWithMore: React.FC<TextWithMoreProps>;
|
|
1188
|
+
|
|
1189
|
+
export { ActionButtons, type ActionButtonsProps, AddButton, AdvancedFilterBar, type AdvancedFilterBarProps, ApproveAndReproveButtons, type ApproveAndReproveButtonsProps, AsyncButton, type AsyncButtonProps, AutoComplete, type AutoCompleteProps, BonusButton, type BonusButtonProps, ButtonWithDropdown, type ButtonWithDropdownOption, type ButtonWithDropdownProps, CheckBox, type CheckBoxOption, type CheckBoxProps, ClickToWriteField, type ClickToWriteFieldProps, ColorPicker, type ColorPickerProps, ConfigObject, DeleteButton, DeleteConfirm, type DeleteConfirmProps, ExpandableCard, type ExpandableCardItem, type ExpandableCardItemObject, type ExpandableCardProps, FindRecursoByTagField, type FindRecursoByTagFieldProps, FormField, type FormFieldProps, Generic3DotMenu, type Generic3DotMenuProps, GenericChart, type GenericChartProps, GenericDisplay, GenericForm, GenericREchart, type GenericREchartProps, GenericSelect, GenericSelectOps, IconLabelItem, type IconLabelItemProps, IconLabelList, type IconLabelListItem, type IconLabelListProps, type ImageData, ImageViewModal, type ImageViewModalProps, type Justificativa, JustificativaModal, type JustificativaModalProps, LoadingButton, type LoadingButtonProps, LoadingProgress, type LoadingProgressProps, MailSender, type MailSenderProps, MenuEvent, ModalBasicTemplate, type ModalBasicTemplateProps, NavigateButton, type NavigateButtonProps, type Notification, NotificationBell, type NotificationBellProps, NotificationItem, type NotificationItemProps, type PeriodPreset, PeriodSelector, type PeriodSelectorProps, QrCodeScanButton, type QrCodeScanButtonProps, QrReader, type QrReaderProps, RecursoDisplayer, type RecursoDisplayerProps, type RecursoMode, ResponsiveContainer, type ReusableTableColumnConfig, ReusableTableWithModal, type ReusableTableWithModalProps, type Sector, SectorSelector, type SectorSelectorProps, SelectDateModal, type SelectDateModalProps, StatusBadge, type StatusBadgeProps, StatusIndicator, type StatusIndicatorProps, StatusLight, type StatusLightProps, type StatusMeta, StatusPills, type StatusPillsProps, Switch, SwitchOnClick, type SwitchOnClickProps, type SwitchProps, TextWithMore, type TextWithMoreProps, TimerDisplay, type TimerDisplayProps, UnidadeMaterialForm, type UnidadeMaterialFormProps, type UnidadeMaterialValue, UploadArea, type UploadAreaProps, UuidPill, VerticalItemsDisplay, type VerticalItemsDisplayProps };
|