@archbase/components 3.0.25 → 4.0.1
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/buttons/ArchbaseSpeedDial.d.ts +59 -0
- package/dist/buttons/index.d.ts +2 -0
- package/dist/charts/ArchbaseArcGauge.d.ts +55 -0
- package/dist/charts/ArchbaseGantt.d.ts +70 -0
- package/dist/charts/ArchbaseLinearGauge.d.ts +55 -0
- package/dist/charts/ArchbaseResourceTimeline.d.ts +61 -0
- package/dist/charts/ArchbaseSparkline.d.ts +45 -0
- package/dist/charts/index.d.ts +10 -0
- package/dist/containers/ArchbaseExpansionPanel.d.ts +60 -0
- package/dist/containers/ArchbaseFloatingPanel.d.ts +91 -0
- package/dist/containers/index.d.ts +4 -0
- package/dist/datagrid/export/ArchbaseDataGridExcelExport.d.ts +67 -0
- package/dist/datagrid/export/index.d.ts +2 -0
- package/dist/datagrid/index.d.ts +1 -0
- package/dist/display/ArchbaseAnimationWrapper.d.ts +73 -0
- package/dist/display/ArchbaseBarcodeGenerator.d.ts +50 -0
- package/dist/display/ArchbaseCarousel.d.ts +100 -0
- package/dist/display/ArchbaseCodeViewer.d.ts +63 -0
- package/dist/display/ArchbaseDiffViewer.d.ts +41 -0
- package/dist/display/ArchbaseJsonTree.d.ts +34 -0
- package/dist/display/ArchbaseLightbox.d.ts +89 -0
- package/dist/display/ArchbaseMarquee.d.ts +46 -0
- package/dist/display/ArchbasePhotoAlbum.d.ts +58 -0
- package/dist/display/ArchbaseQRCode.d.ts +44 -0
- package/dist/display/ArchbaseTooltipRich.d.ts +82 -0
- package/dist/display/ArchbaseVirtualList.d.ts +116 -0
- package/dist/display/index.d.ts +24 -0
- package/dist/editors/ArchbaseAIPromptInput.d.ts +69 -0
- package/dist/editors/ArchbaseAsyncMultiSelect.d.ts +1 -1
- package/dist/editors/ArchbaseAsyncSelect.d.ts +1 -1
- package/dist/editors/ArchbaseBarcodeScanner.d.ts +63 -0
- package/dist/editors/ArchbaseCepInput.d.ts +26 -0
- package/dist/editors/ArchbaseColorGradientPicker.d.ts +80 -0
- package/dist/editors/ArchbaseCpfCnpjInput.d.ts +21 -0
- package/dist/editors/ArchbaseCurrencyInput.d.ts +25 -0
- package/dist/editors/ArchbaseDualListbox.d.ts +61 -0
- package/dist/editors/ArchbaseInPlaceEditor.d.ts +67 -0
- package/dist/editors/ArchbaseLightGrid.d.ts +56 -0
- package/dist/editors/ArchbaseMentionInput.d.ts +75 -0
- package/dist/editors/ArchbaseMultiEmail.d.ts +53 -0
- package/dist/editors/ArchbaseMultiViewCalendar.d.ts +47 -0
- package/dist/editors/ArchbaseNumberStepper.d.ts +66 -0
- package/dist/editors/ArchbaseOTPInput.d.ts +27 -0
- package/dist/editors/ArchbasePhoneInput.d.ts +52 -0
- package/dist/editors/ArchbaseRangeSlider.d.ts +22 -0
- package/dist/editors/ArchbaseSignaturePad.d.ts +60 -0
- package/dist/editors/ArchbaseSpeechToTextInput.d.ts +106 -0
- package/dist/editors/ArchbaseSpreadsheet.d.ts +56 -0
- package/dist/editors/ArchbaseTagInput.d.ts +55 -0
- package/dist/editors/index.d.ts +40 -0
- package/dist/feedback/ArchbaseChunkProgressBar.d.ts +35 -0
- package/dist/feedback/ArchbaseRipple.d.ts +43 -0
- package/dist/feedback/ArchbaseSkeleton.d.ts +115 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/filters/ArchbaseColumnSelector.d.ts +38 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/forms/ArchbaseFieldArray.d.ts +80 -0
- package/dist/forms/ArchbaseFormWizard.d.ts +73 -0
- package/dist/forms/ArchbaseStepper.d.ts +51 -0
- package/dist/forms/index.d.ts +8 -0
- package/dist/forms/useArchbaseFormWizard.d.ts +74 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useArchbaseConfirm.d.ts +59 -0
- package/dist/image/editor/index.d.ts +43 -4
- package/dist/image/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22510 -13820
- package/dist/list/ArchbaseTreeList.d.ts +76 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/navigation/ArchbaseActionSheet.d.ts +70 -0
- package/dist/navigation/ArchbaseAppBar.d.ts +63 -0
- package/dist/navigation/ArchbaseBottomNavigation.d.ts +61 -0
- package/dist/navigation/ArchbaseContextMenu.d.ts +76 -0
- package/dist/navigation/ArchbaseKeyboardShortcuts.d.ts +85 -0
- package/dist/navigation/ArchbaseSpotlight.d.ts +69 -0
- package/dist/navigation/index.d.ts +12 -0
- package/dist/notification/ArchbaseNotificationCenter.d.ts +56 -0
- package/dist/notification/index.d.ts +2 -0
- package/dist/onboarding/ArchbaseOnboardingTour.d.ts +27 -76
- package/dist/viewers/ArchbaseDocViewer.d.ts +40 -0
- package/dist/viewers/ArchbasePdfBuilder.d.ts +53 -0
- package/dist/viewers/ArchbaseXmlViewer.d.ts +36 -0
- package/dist/viewers/index.d.ts +6 -0
- package/package.json +41 -18
- package/src/buttons/ArchbaseSpeedDial.tsx +282 -0
- package/src/buttons/index.ts +3 -0
- package/src/charts/ArchbaseArcGauge.tsx +325 -0
- package/src/charts/ArchbaseGantt.tsx +494 -0
- package/src/charts/ArchbaseLinearGauge.tsx +288 -0
- package/src/charts/ArchbaseResourceTimeline.tsx +433 -0
- package/src/charts/ArchbaseSparkline.tsx +193 -0
- package/src/charts/index.ts +20 -1
- package/src/containers/ArchbaseExpansionPanel.tsx +208 -0
- package/src/containers/ArchbaseFloatingPanel.tsx +448 -0
- package/src/containers/index.ts +17 -0
- package/src/datagrid/components/pagination/grid-pagination.tsx +2 -2
- package/src/datagrid/export/ArchbaseDataGridExcelExport.tsx +293 -0
- package/src/datagrid/export/index.ts +8 -0
- package/src/datagrid/index.tsx +2 -0
- package/src/display/ArchbaseAnimationWrapper.tsx +272 -0
- package/src/display/ArchbaseBarcodeGenerator.tsx +303 -0
- package/src/display/ArchbaseCarousel.tsx +679 -0
- package/src/display/ArchbaseCodeViewer.tsx +271 -0
- package/src/display/ArchbaseDiffViewer.tsx +108 -0
- package/src/display/ArchbaseJsonTree.tsx +150 -0
- package/src/display/ArchbaseLightbox.tsx +279 -0
- package/src/display/ArchbaseMarquee.tsx +268 -0
- package/src/display/ArchbasePhotoAlbum.tsx +415 -0
- package/src/display/ArchbaseQRCode.tsx +137 -0
- package/src/display/ArchbaseTooltipRich.tsx +317 -0
- package/src/display/ArchbaseVirtualList.tsx +618 -0
- package/src/display/index.ts +94 -1
- package/src/editors/ArchbaseAIPromptInput.tsx +432 -0
- package/src/editors/ArchbaseBarcodeScanner.tsx +570 -0
- package/src/editors/ArchbaseCepInput.tsx +173 -0
- package/src/editors/ArchbaseColorGradientPicker.tsx +460 -0
- package/src/editors/ArchbaseCpfCnpjInput.tsx +193 -0
- package/src/editors/ArchbaseCurrencyInput.tsx +100 -0
- package/src/editors/ArchbaseDualListbox.tsx +671 -0
- package/src/editors/ArchbaseInPlaceEditor.tsx +406 -0
- package/src/editors/ArchbaseLightGrid.tsx +538 -0
- package/src/editors/ArchbaseMentionInput.tsx +384 -0
- package/src/editors/ArchbaseMultiEmail.tsx +367 -0
- package/src/editors/ArchbaseMultiViewCalendar.tsx +439 -0
- package/src/editors/ArchbaseNumberStepper.tsx +219 -0
- package/src/editors/ArchbaseOTPInput.tsx +133 -0
- package/src/editors/ArchbaseOperationHoursEditor.tsx +1 -1
- package/src/editors/ArchbasePhoneInput.tsx +355 -0
- package/src/editors/ArchbaseRangeSlider.tsx +109 -0
- package/src/editors/ArchbaseSignaturePad.tsx +425 -0
- package/src/editors/ArchbaseSpeechToTextInput.tsx +444 -0
- package/src/editors/ArchbaseSpreadsheet.tsx +388 -0
- package/src/editors/ArchbaseTagInput.tsx +326 -0
- package/src/editors/index.tsx +92 -0
- package/src/feedback/ArchbaseChunkProgressBar.tsx +156 -0
- package/src/feedback/ArchbaseRipple.tsx +278 -0
- package/src/feedback/ArchbaseSkeleton.tsx +419 -0
- package/src/feedback/index.ts +22 -1
- package/src/filters/ArchbaseColumnSelector.tsx +268 -0
- package/src/filters/index.ts +2 -0
- package/src/forms/ArchbaseFieldArray.tsx +305 -0
- package/src/forms/ArchbaseFormWizard.tsx +284 -0
- package/src/forms/ArchbaseStepper.tsx +137 -0
- package/src/forms/index.ts +24 -2
- package/src/forms/useArchbaseFormWizard.ts +283 -0
- package/src/hooks/index.ts +12 -0
- package/src/hooks/useArchbaseConfirm.ts +293 -0
- package/src/image/editor/functions/image-processing.ts +5 -0
- package/src/image/editor/index.tsx +305 -391
- package/src/image/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/list/ArchbaseTreeList.tsx +422 -0
- package/src/list/index.ts +3 -0
- package/src/navigation/ArchbaseActionSheet.tsx +301 -0
- package/src/navigation/ArchbaseAppBar.tsx +233 -0
- package/src/navigation/ArchbaseBottomNavigation.tsx +243 -0
- package/src/navigation/ArchbaseContextMenu.tsx +298 -0
- package/src/navigation/ArchbaseKeyboardShortcuts.tsx +472 -0
- package/src/navigation/ArchbaseSpotlight.tsx +483 -0
- package/src/navigation/index.ts +48 -1
- package/src/notification/ArchbaseNotificationCenter.tsx +502 -0
- package/src/notification/index.ts +2 -0
- package/src/onboarding/ArchbaseOnboardingTour.tsx +229 -102
- package/src/viewers/ArchbaseDocViewer.tsx +584 -0
- package/src/viewers/ArchbasePdfBuilder.tsx +291 -0
- package/src/viewers/ArchbaseXmlViewer.tsx +142 -0
- package/src/viewers/index.ts +12 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
export interface ArchbaseLightGridColumn<T> {
|
|
4
|
+
/** Campo do registro (keyof T ou path com notação de ponto) */
|
|
5
|
+
field: keyof T | string;
|
|
6
|
+
/** Texto do cabeçalho */
|
|
7
|
+
header: string;
|
|
8
|
+
/** Largura da coluna em pixels */
|
|
9
|
+
width?: number;
|
|
10
|
+
/** Tipo de dado da coluna */
|
|
11
|
+
type?: 'text' | 'number' | 'date' | 'boolean' | 'currency' | 'custom';
|
|
12
|
+
/** Formato (ex.: "DD/MM/YYYY", "0,0.00", "R$ #.##0,00") */
|
|
13
|
+
format?: string;
|
|
14
|
+
/** Se a coluna e editavel */
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
/** Se a coluna deve ficar fixa a esquerda */
|
|
17
|
+
frozen?: boolean;
|
|
18
|
+
/** Alinhamento do texto */
|
|
19
|
+
align?: 'left' | 'center' | 'right';
|
|
20
|
+
}
|
|
21
|
+
export interface ArchbaseLightGridProps<T, ID> {
|
|
22
|
+
/** Fonte de dados */
|
|
23
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
24
|
+
/** Definicao das colunas */
|
|
25
|
+
columns: ArchbaseLightGridColumn<T>[];
|
|
26
|
+
/** Dados standalone (usado quando nao ha dataSource) */
|
|
27
|
+
data?: T[];
|
|
28
|
+
/** Habilita edicao de celulas */
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
/** Altura do grid */
|
|
31
|
+
height?: string | number;
|
|
32
|
+
/** Largura do grid */
|
|
33
|
+
width?: string | number;
|
|
34
|
+
/** Exibe numeracao de linhas */
|
|
35
|
+
showRowNumbers?: boolean;
|
|
36
|
+
/** Callback quando uma celula e alterada */
|
|
37
|
+
onCellChange?: (record: T, field: string, oldValue: any, newValue: any) => void;
|
|
38
|
+
/** Callback quando a selecao muda */
|
|
39
|
+
onSelectionChange?: (selection: {
|
|
40
|
+
row: number;
|
|
41
|
+
col: number;
|
|
42
|
+
}[]) => void;
|
|
43
|
+
/** Somente leitura (sobrescreve editable) */
|
|
44
|
+
readOnly?: boolean;
|
|
45
|
+
/** Label exibido acima do grid */
|
|
46
|
+
label?: string;
|
|
47
|
+
/** Descricao exibida abaixo do label */
|
|
48
|
+
description?: string;
|
|
49
|
+
/** Estilo CSS do container */
|
|
50
|
+
style?: CSSProperties;
|
|
51
|
+
/** Classe CSS do container */
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
declare function ArchbaseLightGridInner<T, ID>(props: ArchbaseLightGridProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const ArchbaseLightGrid: typeof ArchbaseLightGridInner;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { MantineSize } from '@mantine/core';
|
|
2
|
+
import { CSSProperties, FocusEventHandler, default as React } from 'react';
|
|
3
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
4
|
+
export interface ArchbaseMentionConfig {
|
|
5
|
+
/** Caractere gatilho da mention (ex: '@', '#') */
|
|
6
|
+
trigger: string;
|
|
7
|
+
/** Lista estatica ou funcao async que retorna sugestoes */
|
|
8
|
+
data: Array<{
|
|
9
|
+
id: string;
|
|
10
|
+
display: string;
|
|
11
|
+
}> | ((search: string, callback: (data: Array<{
|
|
12
|
+
id: string;
|
|
13
|
+
display: string;
|
|
14
|
+
}>) => void) => void);
|
|
15
|
+
/** Markup template. Padrao: '[__display__](__id__)' */
|
|
16
|
+
markup?: string;
|
|
17
|
+
/** Funcao para transformar exibicao */
|
|
18
|
+
displayTransform?: (id: string, display: string) => string;
|
|
19
|
+
/** Permite espacos na busca */
|
|
20
|
+
allowSpaceInQuery?: boolean;
|
|
21
|
+
/** Estilos customizados para a mention */
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
export interface ArchbaseMentionInputProps<T, ID> {
|
|
25
|
+
/** Fonte de dados onde sera atribuido o valor (V1 ou V2) */
|
|
26
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
27
|
+
/** Campo onde devera ser atribuido o valor na fonte de dados */
|
|
28
|
+
dataField?: string;
|
|
29
|
+
/** Valor controlado (standalone) */
|
|
30
|
+
value?: string;
|
|
31
|
+
/** Valor padrao (standalone) */
|
|
32
|
+
defaultValue?: string;
|
|
33
|
+
/** Titulo do campo */
|
|
34
|
+
label?: string;
|
|
35
|
+
/** Descricao do campo */
|
|
36
|
+
description?: string;
|
|
37
|
+
/** Ultimo erro ocorrido */
|
|
38
|
+
error?: string;
|
|
39
|
+
/** Texto sugestao */
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
/** Indicador se o preenchimento e obrigatorio */
|
|
42
|
+
required?: boolean;
|
|
43
|
+
/** Indicador se o campo esta desabilitado */
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Indicador se o campo e somente leitura */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/** Configuracoes de mention (triggers, data, etc.) */
|
|
48
|
+
mentions: ArchbaseMentionConfig[];
|
|
49
|
+
/** Modo linha unica */
|
|
50
|
+
singleLine?: boolean;
|
|
51
|
+
/** Permitir sugestoes acima do cursor */
|
|
52
|
+
allowSuggestionsAboveCursor?: boolean;
|
|
53
|
+
/** Evento quando o valor e alterado */
|
|
54
|
+
onChangeValue?: (value: string, event: any) => void;
|
|
55
|
+
/** Evento quando o campo recebe foco */
|
|
56
|
+
onFocusEnter?: FocusEventHandler<HTMLTextAreaElement | HTMLInputElement>;
|
|
57
|
+
/** Evento quando o foco sai do campo */
|
|
58
|
+
onFocusExit?: FocusEventHandler<HTMLTextAreaElement | HTMLInputElement>;
|
|
59
|
+
/** Referencia para o componente interno */
|
|
60
|
+
innerRef?: React.RefObject<HTMLTextAreaElement | HTMLInputElement>;
|
|
61
|
+
/** Estilos customizados */
|
|
62
|
+
style?: CSSProperties;
|
|
63
|
+
/** Classes CSS customizadas */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** Largura do campo */
|
|
66
|
+
width?: string | number;
|
|
67
|
+
/** Altura do campo */
|
|
68
|
+
height?: string | number;
|
|
69
|
+
/** Tamanho do campo (Mantine) */
|
|
70
|
+
size?: MantineSize;
|
|
71
|
+
}
|
|
72
|
+
export declare function ArchbaseMentionInput<T, ID>({ dataSource, dataField, value: valueProp, defaultValue, label, description, error, placeholder, required, disabled, readOnly, mentions, singleLine, allowSuggestionsAboveCursor, onChangeValue, onFocusEnter, onFocusExit, innerRef, style, className, width, height, size, }: ArchbaseMentionInputProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare namespace ArchbaseMentionInput {
|
|
74
|
+
var displayName: string;
|
|
75
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MantineSize } from '@mantine/core';
|
|
2
|
+
import { CSSProperties, FocusEventHandler, default as React } from 'react';
|
|
3
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
4
|
+
export interface ArchbaseMultiEmailProps<T, ID> {
|
|
5
|
+
/** Fonte de dados onde sera atribuido o valor (V1 ou V2) */
|
|
6
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
7
|
+
/** Campo onde devera ser atribuido o valor na fonte de dados */
|
|
8
|
+
dataField?: string;
|
|
9
|
+
/** Valor controlado (array de emails) */
|
|
10
|
+
value?: string[];
|
|
11
|
+
/** Valor padrao nao controlado */
|
|
12
|
+
defaultValue?: string[];
|
|
13
|
+
/** Delimitador para converter string do datasource em array (padrao ';') */
|
|
14
|
+
delimiter?: string;
|
|
15
|
+
/** Titulo do campo */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Descricao do campo */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Ultimo erro ocorrido */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** Texto de sugestao */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/** Indicador se o preenchimento e obrigatorio */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/** Indicador se o campo esta desabilitado */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Indicador se o campo e somente leitura */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** Numero maximo de emails permitidos */
|
|
30
|
+
max?: number;
|
|
31
|
+
/** Funcao customizada de validacao de email */
|
|
32
|
+
validateEmail?: (email: string) => boolean;
|
|
33
|
+
/** Evento quando o valor e alterado */
|
|
34
|
+
onChangeValue?: (emails: string[]) => void;
|
|
35
|
+
/** Evento quando o campo recebe o foco */
|
|
36
|
+
onFocusEnter?: FocusEventHandler<HTMLInputElement> | undefined;
|
|
37
|
+
/** Evento quando o foco sai do campo */
|
|
38
|
+
onFocusExit?: FocusEventHandler<HTMLInputElement> | undefined;
|
|
39
|
+
/** Referencia para o componente interno */
|
|
40
|
+
innerRef?: React.RefObject<HTMLDivElement> | undefined;
|
|
41
|
+
/** Estilo do componente */
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
/** Classe CSS */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Largura do componente */
|
|
46
|
+
width?: string | number;
|
|
47
|
+
/** Tamanho do componente */
|
|
48
|
+
size?: MantineSize;
|
|
49
|
+
}
|
|
50
|
+
export declare function ArchbaseMultiEmail<T, ID>({ dataSource, dataField, value, defaultValue, delimiter, label, description, error, placeholder, required, disabled, readOnly, max, validateEmail, onChangeValue, onFocusEnter, onFocusExit, innerRef, style, className, width, size, }: ArchbaseMultiEmailProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare namespace ArchbaseMultiEmail {
|
|
52
|
+
var displayName: string;
|
|
53
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DatePickerInputProps, DatesRangeValue } from '@mantine/dates';
|
|
2
|
+
export interface DateRangePreset {
|
|
3
|
+
/** Identificador único */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Label exibido */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Função que retorna o range */
|
|
8
|
+
getValue: () => [Date, Date];
|
|
9
|
+
}
|
|
10
|
+
export interface ArchbaseMultiViewCalendarProps extends Omit<DatePickerInputProps<'range'>, 'value' | 'onChange' | 'type' | 'numberOfColumns' | 'presets'> {
|
|
11
|
+
/** Valor atual [startDate, endDate] */
|
|
12
|
+
value?: DatesRangeValue;
|
|
13
|
+
/** Callback ao mudar */
|
|
14
|
+
onChange?: (value: DatesRangeValue) => void;
|
|
15
|
+
/** Número de colunas (meses visíveis) */
|
|
16
|
+
numberOfColumns?: number;
|
|
17
|
+
/** Presets de data rápidos */
|
|
18
|
+
presets?: DateRangePreset[];
|
|
19
|
+
/** Mostrar presets */
|
|
20
|
+
showPresets?: boolean;
|
|
21
|
+
/** Locale (padrão: pt-BR) */
|
|
22
|
+
locale?: string;
|
|
23
|
+
/** Formato de exibição */
|
|
24
|
+
valueFormat?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const defaultDatePresets: DateRangePreset[];
|
|
27
|
+
export declare function ArchbaseMultiViewCalendar({ value, onChange, numberOfColumns, presets, showPresets, locale, valueFormat, ...props }: ArchbaseMultiViewCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface ArchbaseMultiViewCalendarWithPresetsProps extends Omit<ArchbaseMultiViewCalendarProps, 'showPresets'> {
|
|
29
|
+
/** Presets de data rápidos */
|
|
30
|
+
presets?: DateRangePreset[];
|
|
31
|
+
/** Label para seção de presets */
|
|
32
|
+
presetsLabel?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function ArchbaseMultiViewCalendarWithPresets({ value, onChange, numberOfColumns, presets, presetsLabel, locale, valueFormat, ...props }: ArchbaseMultiViewCalendarWithPresetsProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface ArchbaseDateRangeQuickPickerProps {
|
|
36
|
+
/** Valor atual [startDate, endDate] */
|
|
37
|
+
value?: DatesRangeValue;
|
|
38
|
+
/** Callback ao mudar */
|
|
39
|
+
onChange?: (value: DatesRangeValue) => void;
|
|
40
|
+
/** Presets disponíveis */
|
|
41
|
+
presets?: DateRangePreset[];
|
|
42
|
+
/** Colunas de presets */
|
|
43
|
+
columns?: number;
|
|
44
|
+
}
|
|
45
|
+
export declare function ArchbaseDateRangeQuickPicker({ value, onChange, presets, columns, }: ArchbaseDateRangeQuickPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function createDatePreset(id: string, label: string, getValue: () => [Date, Date]): DateRangePreset;
|
|
47
|
+
export default ArchbaseMultiViewCalendar;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NumberInputProps, MantineSize } from '@mantine/core';
|
|
3
|
+
import { ArchbaseDataSource } from '@archbase/data';
|
|
4
|
+
export interface ArchbaseNumberStepperProps<T extends object, ID> extends Omit<NumberInputProps, 'value' | 'onChange'> {
|
|
5
|
+
/** Fonte de dados */
|
|
6
|
+
dataSource?: ArchbaseDataSource<T, ID>;
|
|
7
|
+
/** Campo do DataSource */
|
|
8
|
+
dataField?: string;
|
|
9
|
+
/** Valor controlado */
|
|
10
|
+
value?: number | string;
|
|
11
|
+
/** Valor padrão */
|
|
12
|
+
defaultValue?: number | string;
|
|
13
|
+
/** Callback de mudança */
|
|
14
|
+
onChange?: (value: number | string) => void;
|
|
15
|
+
/** Valor mínimo */
|
|
16
|
+
min?: number;
|
|
17
|
+
/** Valor máximo */
|
|
18
|
+
max?: number;
|
|
19
|
+
/** Passo de incremento */
|
|
20
|
+
step?: number;
|
|
21
|
+
/** Número de casas decimais */
|
|
22
|
+
decimalScale?: number;
|
|
23
|
+
/** Se deve fixar casas decimais */
|
|
24
|
+
fixedDecimalScale?: boolean;
|
|
25
|
+
/** Separador de milhar */
|
|
26
|
+
thousandSeparator?: string | boolean;
|
|
27
|
+
/** Separador decimal */
|
|
28
|
+
decimalSeparator?: string;
|
|
29
|
+
/** Prefixo */
|
|
30
|
+
prefix?: string;
|
|
31
|
+
/** Sufixo */
|
|
32
|
+
suffix?: string;
|
|
33
|
+
/** Comportamento ao atingir limite */
|
|
34
|
+
clampBehavior?: 'strict' | 'blur' | 'none';
|
|
35
|
+
/** Se permite valores negativos */
|
|
36
|
+
allowNegative?: boolean;
|
|
37
|
+
/** Se permite entrada decimal */
|
|
38
|
+
allowDecimal?: boolean;
|
|
39
|
+
/** Se deve esconder controles */
|
|
40
|
+
hideControls?: boolean;
|
|
41
|
+
/** Tamanho */
|
|
42
|
+
size?: MantineSize;
|
|
43
|
+
/** Se está desabilitado */
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Se é somente leitura */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/** Label */
|
|
48
|
+
label?: string;
|
|
49
|
+
/** Descrição */
|
|
50
|
+
description?: string;
|
|
51
|
+
/** Erro */
|
|
52
|
+
error?: string | boolean;
|
|
53
|
+
/** Se é obrigatório */
|
|
54
|
+
required?: boolean;
|
|
55
|
+
/** Placeholder */
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
/** Largura */
|
|
58
|
+
width?: number | string;
|
|
59
|
+
/** Classe CSS */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** Estilo */
|
|
62
|
+
style?: React.CSSProperties;
|
|
63
|
+
}
|
|
64
|
+
export declare const ArchbaseNumberStepper: <T extends object = any, ID = string>(props: ArchbaseNumberStepperProps<T, ID> & {
|
|
65
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
66
|
+
}) => React.ReactElement;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PinInputProps } from '@mantine/core';
|
|
2
|
+
export interface ArchbaseOTPInputProps extends Omit<PinInputProps, 'value' | 'onChange' | 'error'> {
|
|
3
|
+
/** Número de dígitos (padrão: 6) */
|
|
4
|
+
length?: number;
|
|
5
|
+
/** Valor atual */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Callback ao mudar */
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
/** Callback ao completar */
|
|
10
|
+
onComplete?: (value: string) => void;
|
|
11
|
+
/** Mostrar botão de reenviar */
|
|
12
|
+
showResend?: boolean;
|
|
13
|
+
/** Callback ao reenviar */
|
|
14
|
+
onResend?: () => void;
|
|
15
|
+
/** Tempo de espera para reenviar (segundos) */
|
|
16
|
+
resendCooldown?: number;
|
|
17
|
+
/** Texto do botão reenviar */
|
|
18
|
+
resendText?: string;
|
|
19
|
+
/** Erro */
|
|
20
|
+
errorMessage?: string;
|
|
21
|
+
/** Máscara */
|
|
22
|
+
mask?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function ArchbaseOTPInput({ length, value, onChange, onComplete, showResend, onResend, resendCooldown, resendText, errorMessage, mask, ...props }: ArchbaseOTPInputProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function ArchbaseOTP4Input(props: Omit<ArchbaseOTPInputProps, 'length'>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function ArchbaseOTP6Input(props: Omit<ArchbaseOTPInputProps, 'length'>): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default ArchbaseOTPInput;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { MantineSize } from '@mantine/core';
|
|
2
|
+
import { CSSProperties, FocusEventHandler, default as React } from 'react';
|
|
3
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
4
|
+
import { CountryCode } from 'libphonenumber-js';
|
|
5
|
+
export interface ArchbasePhoneInputProps<T, ID> {
|
|
6
|
+
/** Fonte de dados onde será atribuído o valor do phone input (V1 ou V2) */
|
|
7
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
8
|
+
/** Campo onde deverá ser atribuído o valor do phone input na fonte de dados */
|
|
9
|
+
dataField?: string;
|
|
10
|
+
/** Valor controlado do phone input (modo standalone) */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Valor padrão do phone input (modo standalone) */
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
/** País padrão selecionado no seletor de bandeiras */
|
|
15
|
+
defaultCountry?: CountryCode;
|
|
16
|
+
/** Se true, exibe o número em formato internacional (+55 ...) */
|
|
17
|
+
international?: boolean;
|
|
18
|
+
/** Título/label do phone input */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Descrição exibida abaixo do label */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Mensagem de erro a ser exibida */
|
|
23
|
+
error?: string;
|
|
24
|
+
/** Texto de placeholder do phone input */
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
/** Indicador se o preenchimento é obrigatório */
|
|
27
|
+
required?: boolean;
|
|
28
|
+
/** Indicador se o phone input está desabilitado */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Indicador se o phone input é somente leitura. Obs: usado em conjunto com o status da fonte de dados */
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
/** Evento quando o valor do phone input é alterado */
|
|
33
|
+
onChangeValue?: (value: string | undefined) => void;
|
|
34
|
+
/** Evento quando o phone input recebe o foco */
|
|
35
|
+
onFocusEnter?: FocusEventHandler<HTMLInputElement> | undefined;
|
|
36
|
+
/** Evento quando o foco sai do phone input */
|
|
37
|
+
onFocusExit?: FocusEventHandler<HTMLInputElement> | undefined;
|
|
38
|
+
/** Referência para o componente interno */
|
|
39
|
+
innerRef?: React.RefObject<HTMLInputElement> | undefined;
|
|
40
|
+
/** Estilo CSS customizado aplicado ao wrapper */
|
|
41
|
+
style?: CSSProperties;
|
|
42
|
+
/** Classe CSS customizada aplicada ao wrapper */
|
|
43
|
+
className?: string;
|
|
44
|
+
/** Largura do componente */
|
|
45
|
+
width?: string | number;
|
|
46
|
+
/** Tamanho do componente seguindo o padrão Mantine */
|
|
47
|
+
size?: MantineSize;
|
|
48
|
+
}
|
|
49
|
+
export declare function ArchbasePhoneInput<T, ID>({ dataSource, dataField, value: valueProp, defaultValue, defaultCountry, international, label, description, error, placeholder, required, disabled, readOnly, onChangeValue, onFocusEnter, onFocusExit, innerRef, style, className, width, size, }: ArchbasePhoneInputProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare namespace ArchbasePhoneInput {
|
|
51
|
+
var displayName: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RangeSliderProps } from '@mantine/core';
|
|
2
|
+
export type RangeValue = [number, number];
|
|
3
|
+
export interface ArchbaseRangeSliderProps extends Omit<RangeSliderProps, 'value' | 'onChange'> {
|
|
4
|
+
/** Valor atual [min, max] */
|
|
5
|
+
value?: RangeValue;
|
|
6
|
+
/** Callback ao mudar */
|
|
7
|
+
onChange?: (value: RangeValue) => void;
|
|
8
|
+
/** Callback ao soltar o slider */
|
|
9
|
+
onChangeEnd?: (value: RangeValue) => void;
|
|
10
|
+
/** Mostrar valores */
|
|
11
|
+
showValues?: boolean;
|
|
12
|
+
/** Formatador de valores */
|
|
13
|
+
formatValue?: (value: number) => string;
|
|
14
|
+
/** Prefixo dos valores */
|
|
15
|
+
valuePrefix?: string;
|
|
16
|
+
/** Sufixo dos valores */
|
|
17
|
+
valueSuffix?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function ArchbaseRangeSlider({ value, onChange, onChangeEnd, showValues, formatValue, valuePrefix, valueSuffix, min, max, ...props }: ArchbaseRangeSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function ArchbasePriceRangeSlider(props: Omit<ArchbaseRangeSliderProps, 'valuePrefix'>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function ArchbasePercentRangeSlider(props: Omit<ArchbaseRangeSliderProps, 'valueSuffix' | 'min' | 'max'>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default ArchbaseRangeSlider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
import { MantineSize } from '@mantine/core';
|
|
3
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
4
|
+
export interface ArchbaseSignaturePadProps<T, ID> {
|
|
5
|
+
/** Fonte de dados onde sera atribuido o valor da assinatura (V1 ou V2) */
|
|
6
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
7
|
+
/** Campo onde devera ser atribuido o valor da assinatura na fonte de dados */
|
|
8
|
+
dataField?: string;
|
|
9
|
+
/** Valor controlado (base64 data URL) */
|
|
10
|
+
value?: string;
|
|
11
|
+
/** Valor padrao (base64 data URL) */
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
/** Titulo do campo */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Descricao do campo */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Ultimo erro ocorrido */
|
|
18
|
+
error?: string;
|
|
19
|
+
/** Indicador se o preenchimento e obrigatorio */
|
|
20
|
+
required?: boolean;
|
|
21
|
+
/** Indicador se esta desabilitado */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Indicador se e somente leitura */
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
/** Cor da caneta */
|
|
26
|
+
penColor?: string;
|
|
27
|
+
/** Cor de fundo do canvas */
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
/** Largura do canvas */
|
|
30
|
+
width?: number;
|
|
31
|
+
/** Altura do canvas */
|
|
32
|
+
height?: number;
|
|
33
|
+
/** Exibir botao limpar */
|
|
34
|
+
showClearButton?: boolean;
|
|
35
|
+
/** Exibir botao confirmar */
|
|
36
|
+
showConfirmButton?: boolean;
|
|
37
|
+
/** Texto do botao limpar */
|
|
38
|
+
clearLabel?: string;
|
|
39
|
+
/** Texto do botao confirmar */
|
|
40
|
+
confirmLabel?: string;
|
|
41
|
+
/** Evento quando o valor muda (retorna base64 data URL) */
|
|
42
|
+
onChangeValue?: (value: string | undefined) => void;
|
|
43
|
+
/** Evento quando o foco entra */
|
|
44
|
+
onFocusEnter?: React.FocusEventHandler<any>;
|
|
45
|
+
/** Evento quando o foco sai */
|
|
46
|
+
onFocusExit?: React.FocusEventHandler<any>;
|
|
47
|
+
/** Evento quando o usuario confirma a assinatura */
|
|
48
|
+
onConfirm?: (value: string | undefined) => void;
|
|
49
|
+
/** Estilo do componente */
|
|
50
|
+
style?: CSSProperties;
|
|
51
|
+
/** Classe CSS */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** Formato da imagem gerada */
|
|
54
|
+
imageFormat?: 'png' | 'jpeg' | 'svg';
|
|
55
|
+
/** Tamanho do componente */
|
|
56
|
+
size?: MantineSize;
|
|
57
|
+
}
|
|
58
|
+
declare function ArchbaseSignaturePadInner<T, ID>({ dataSource, dataField, value: valueProp, defaultValue, label, description, error, required, disabled, readOnly, penColor, backgroundColor, width, height, showClearButton, showConfirmButton, clearLabel, confirmLabel, onChangeValue, onFocusEnter, onFocusExit, onConfirm, style, className, imageFormat, size, }: ArchbaseSignaturePadProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare const ArchbaseSignaturePad: typeof ArchbaseSignaturePadInner;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { TextInputProps, TextareaProps } from '@mantine/core';
|
|
2
|
+
interface SpeechRecognitionEvent {
|
|
3
|
+
resultIndex: number;
|
|
4
|
+
results: SpeechRecognitionResultList;
|
|
5
|
+
}
|
|
6
|
+
interface SpeechRecognitionErrorEvent {
|
|
7
|
+
error: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
interface SpeechRecognition extends EventTarget {
|
|
11
|
+
continuous: boolean;
|
|
12
|
+
interimResults: boolean;
|
|
13
|
+
lang: string;
|
|
14
|
+
start: () => void;
|
|
15
|
+
stop: () => void;
|
|
16
|
+
abort: () => void;
|
|
17
|
+
onresult: ((event: SpeechRecognitionEvent) => void) | null;
|
|
18
|
+
onerror: ((event: SpeechRecognitionErrorEvent) => void) | null;
|
|
19
|
+
onend: (() => void) | null;
|
|
20
|
+
onstart: (() => void) | null;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface Window {
|
|
24
|
+
SpeechRecognition: new () => SpeechRecognition;
|
|
25
|
+
webkitSpeechRecognition: new () => SpeechRecognition;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export interface UseArchbaseSpeechToTextOptions {
|
|
29
|
+
/** Idioma (padrão: pt-BR) */
|
|
30
|
+
lang?: string;
|
|
31
|
+
/** Modo contínuo */
|
|
32
|
+
continuous?: boolean;
|
|
33
|
+
/** Resultados intermediários */
|
|
34
|
+
interimResults?: boolean;
|
|
35
|
+
/** Callback ao obter transcrição */
|
|
36
|
+
onTranscript?: (transcript: string, isFinal: boolean) => void;
|
|
37
|
+
/** Callback em caso de erro */
|
|
38
|
+
onError?: (error: string) => void;
|
|
39
|
+
/** Callback ao iniciar */
|
|
40
|
+
onStart?: () => void;
|
|
41
|
+
/** Callback ao parar */
|
|
42
|
+
onEnd?: () => void;
|
|
43
|
+
}
|
|
44
|
+
export interface UseArchbaseSpeechToTextReturn {
|
|
45
|
+
/** Se está gravando */
|
|
46
|
+
isListening: boolean;
|
|
47
|
+
/** Transcrição atual */
|
|
48
|
+
transcript: string;
|
|
49
|
+
/** Se o browser suporta */
|
|
50
|
+
isSupported: boolean;
|
|
51
|
+
/** Último erro */
|
|
52
|
+
error: string | null;
|
|
53
|
+
/** Iniciar gravação */
|
|
54
|
+
start: () => void;
|
|
55
|
+
/** Parar gravação */
|
|
56
|
+
stop: () => void;
|
|
57
|
+
/** Limpar transcrição */
|
|
58
|
+
clear: () => void;
|
|
59
|
+
}
|
|
60
|
+
export declare function useArchbaseSpeechToText({ lang, continuous, interimResults, onTranscript, onError, onStart, onEnd, }?: UseArchbaseSpeechToTextOptions): UseArchbaseSpeechToTextReturn;
|
|
61
|
+
export interface ArchbaseSpeechToTextButtonProps {
|
|
62
|
+
/** Callback ao obter transcrição */
|
|
63
|
+
onTranscript: (transcript: string) => void;
|
|
64
|
+
/** Idioma (padrão: pt-BR) */
|
|
65
|
+
lang?: string;
|
|
66
|
+
/** Modo contínuo */
|
|
67
|
+
continuous?: boolean;
|
|
68
|
+
/** Desabilitado */
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/** Tamanho do botão */
|
|
71
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
72
|
+
/** Cor */
|
|
73
|
+
color?: string;
|
|
74
|
+
/** Tooltip quando desabilitado/não suportado */
|
|
75
|
+
unsupportedTooltip?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare function ArchbaseSpeechToTextButton({ onTranscript, lang, continuous, disabled, size, color, unsupportedTooltip, }: ArchbaseSpeechToTextButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export interface ArchbaseSpeechToTextInputProps extends Omit<TextInputProps, 'value' | 'onChange'> {
|
|
79
|
+
/** Valor atual */
|
|
80
|
+
value?: string;
|
|
81
|
+
/** Callback ao mudar */
|
|
82
|
+
onChange?: (value: string) => void;
|
|
83
|
+
/** Idioma (padrão: pt-BR) */
|
|
84
|
+
lang?: string;
|
|
85
|
+
/** Modo contínuo */
|
|
86
|
+
continuous?: boolean;
|
|
87
|
+
/** Substituir ou anexar transcrição */
|
|
88
|
+
mode?: 'replace' | 'append';
|
|
89
|
+
/** Mostrar indicador de gravação */
|
|
90
|
+
showRecordingIndicator?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export declare function ArchbaseSpeechToTextInput({ value, onChange, lang, continuous, mode, showRecordingIndicator, ...props }: ArchbaseSpeechToTextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
export interface ArchbaseSpeechToTextAreaProps extends Omit<TextareaProps, 'value' | 'onChange'> {
|
|
94
|
+
/** Valor atual */
|
|
95
|
+
value?: string;
|
|
96
|
+
/** Callback ao mudar */
|
|
97
|
+
onChange?: (value: string) => void;
|
|
98
|
+
/** Idioma (padrão: pt-BR) */
|
|
99
|
+
lang?: string;
|
|
100
|
+
/** Modo contínuo */
|
|
101
|
+
continuous?: boolean;
|
|
102
|
+
/** Substituir ou anexar transcrição */
|
|
103
|
+
mode?: 'replace' | 'append';
|
|
104
|
+
}
|
|
105
|
+
export declare function ArchbaseSpeechToTextArea({ value, onChange, lang, continuous, mode, ...props }: ArchbaseSpeechToTextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
export default ArchbaseSpeechToTextInput;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
3
|
+
export type ArchbaseColumnType = 'text' | 'number' | 'date' | 'boolean' | 'currency';
|
|
4
|
+
export interface ArchbaseColumnDef<T> {
|
|
5
|
+
/** Campo do registro mapeado para esta coluna */
|
|
6
|
+
field: keyof T | string;
|
|
7
|
+
/** Cabeçalho exibido na planilha */
|
|
8
|
+
header: string;
|
|
9
|
+
/** Largura da coluna em pixels */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Tipo do dado */
|
|
12
|
+
type?: ArchbaseColumnType;
|
|
13
|
+
/** Formato numérico (ex: '#,##0.00') */
|
|
14
|
+
format?: string;
|
|
15
|
+
/** Se a coluna é editável */
|
|
16
|
+
editable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ArchbaseSpreadsheetProps<T, ID> {
|
|
19
|
+
/** Fonte de dados que fornece os registros */
|
|
20
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
21
|
+
/** Definição de colunas para mapeamento DataSource -> planilha */
|
|
22
|
+
columns?: ArchbaseColumnDef<T>[];
|
|
23
|
+
/** Dados standalone no formato Sheet[] do fortune-sheet */
|
|
24
|
+
data?: any[];
|
|
25
|
+
/** Permite edição (default: true) */
|
|
26
|
+
editable?: boolean;
|
|
27
|
+
/** Exibe a toolbar (default: true) */
|
|
28
|
+
showToolbar?: boolean;
|
|
29
|
+
/** Exibe a barra de fórmulas (default: true) */
|
|
30
|
+
showFormulaBar?: boolean;
|
|
31
|
+
/** Exibe as abas de planilhas (default: true) */
|
|
32
|
+
showSheetTabs?: boolean;
|
|
33
|
+
/** Altura do componente */
|
|
34
|
+
height?: string | number;
|
|
35
|
+
/** Largura do componente */
|
|
36
|
+
width?: string | number;
|
|
37
|
+
/** Callback quando uma célula é alterada */
|
|
38
|
+
onCellChange?: (row: number, col: number, oldValue: any, newValue: any) => void;
|
|
39
|
+
/** Callback quando a seleção muda */
|
|
40
|
+
onSelectionChange?: (ranges: any[]) => void;
|
|
41
|
+
/** Rótulo (Input.Wrapper) */
|
|
42
|
+
label?: string;
|
|
43
|
+
/** Descrição (Input.Wrapper) */
|
|
44
|
+
description?: string;
|
|
45
|
+
/** Somente leitura */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/** Locale (default: 'pt-BR') */
|
|
48
|
+
locale?: string;
|
|
49
|
+
/** Estilo adicional do container */
|
|
50
|
+
style?: CSSProperties;
|
|
51
|
+
/** Classe CSS adicional */
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
declare function ArchbaseSpreadsheetInner<T, ID>(props: ArchbaseSpreadsheetProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const ArchbaseSpreadsheet: typeof ArchbaseSpreadsheetInner;
|
|
56
|
+
export {};
|