@lax-wp/design-system 0.3.114 → 0.3.115
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/components/button/Button.d.ts +25 -0
- package/dist/components/button/ButtonGroup.d.ts +6 -0
- package/dist/components/button/ButtonThreeDots.d.ts +3 -0
- package/dist/components/button/IconButton.d.ts +14 -0
- package/dist/components/button/Radio.d.ts +8 -0
- package/dist/components/buttons/option-button/OptionButton.d.ts +60 -0
- package/dist/components/cards/card-header-view/CardHeaderView.d.ts +33 -0
- package/dist/components/cards/card-header-view/index.d.ts +2 -0
- package/dist/components/cards/card-main/CardMain.d.ts +25 -0
- package/dist/components/cards/card-main/index.d.ts +2 -0
- package/dist/components/cards/tab-content/TabContent.d.ts +30 -0
- package/dist/components/cards/tab-content/index.d.ts +2 -0
- package/dist/components/data-display/access-denied-modal/AccessDeniedModal.d.ts +21 -0
- package/dist/components/data-display/badge/Badge.d.ts +44 -0
- package/dist/components/data-display/banner/Banner.d.ts +37 -0
- package/dist/components/data-display/card/Card.d.ts +31 -0
- package/dist/components/data-display/code-editor/CodeEditor.d.ts +6 -0
- package/dist/components/data-display/code-editor/JsonGrid.d.ts +37 -0
- package/dist/components/data-display/code-editor/Tabs.d.ts +12 -0
- package/dist/components/data-display/comparison/Comparison.d.ts +34 -0
- package/dist/components/data-display/comparison/ComparisonContext.d.ts +36 -0
- package/dist/components/data-display/comparison/components/GridItemHandle.d.ts +7 -0
- package/dist/components/data-display/comparison/components/GridLayout.d.ts +3 -0
- package/dist/components/data-display/comparison/components/Header.d.ts +9 -0
- package/dist/components/data-display/comparison/components/NoAvailableContent.d.ts +2 -0
- package/dist/components/data-display/comparison/components/SortableItem.d.ts +7 -0
- package/dist/components/data-display/comparison/constants.d.ts +15 -0
- package/dist/components/data-display/comparison/icons/CloseIcon.d.ts +7 -0
- package/dist/components/data-display/comparison/icons/ExitIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/LayoutOneIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/LayoutThreeIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/LayoutTwoIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/SearchIcon.d.ts +8 -0
- package/dist/components/data-display/comparison/icons/index.d.ts +12 -0
- package/dist/components/data-display/comparison/index.d.ts +9 -0
- package/dist/components/data-display/comparison/utils.d.ts +15 -0
- package/dist/components/data-display/context-menu/ContextMenu.d.ts +42 -0
- package/dist/components/data-display/datatype-icon/DataTypeIcon.d.ts +104 -0
- package/dist/components/data-display/delete-modal/DeleteModal.d.ts +40 -0
- package/dist/components/data-display/diff-viewer/DiffViewer.d.ts +64 -0
- package/dist/components/data-display/divider/Divider.d.ts +21 -0
- package/dist/components/data-display/dynamic-data-modal/DynamicDataModal.d.ts +26 -0
- package/dist/components/data-display/dynamic-items-cell/DynamicItemsCell.d.ts +50 -0
- package/dist/components/data-display/empty-state/EmptyEvent.d.ts +5 -0
- package/dist/components/data-display/empty-state/NoDataFound.d.ts +27 -0
- package/dist/components/data-display/empty-state/NoDataFoundWidgets.d.ts +20 -0
- package/dist/components/data-display/empty-state/PageNotFound.d.ts +33 -0
- package/dist/components/data-display/empty-state/UserNotFound.d.ts +28 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyBarChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyCardChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyContentChart.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyCountWidgetData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyDonutChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyPieChatData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyTableWidgetData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyTimelineChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/index.d.ts +8 -0
- package/dist/components/data-display/empty-state/index.d.ts +11 -0
- package/dist/components/data-display/error-modal/ErrorModal.d.ts +22 -0
- package/dist/components/data-display/floating-element-wrapper/floating-element-dragger.d.ts +1 -0
- package/dist/components/data-display/in-progress/InProgress.d.ts +13 -0
- package/dist/components/data-display/json-grid-viewer/AddKeyModal.d.ts +7 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridBulkFloatingBar.d.ts +2 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridCore.d.ts +3 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridViewer.d.ts +47 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridViewerContext.d.ts +4 -0
- package/dist/components/data-display/json-grid-viewer/JsonValueDisplay.d.ts +8 -0
- package/dist/components/data-display/json-grid-viewer/NestedJsonGrid.d.ts +7 -0
- package/dist/components/data-display/json-grid-viewer/hooks.d.ts +6 -0
- package/dist/components/data-display/json-grid-viewer/index.d.ts +12 -0
- package/dist/components/data-display/json-grid-viewer/types.d.ts +64 -0
- package/dist/components/data-display/json-grid-viewer/utils.d.ts +4 -0
- package/dist/components/data-display/label/Label.d.ts +10 -0
- package/dist/components/data-display/label-value/LabelValue.d.ts +139 -0
- package/dist/components/data-display/lottie-animation/LottieAnimation.d.ts +34 -0
- package/dist/components/data-display/modal/Modal.d.ts +41 -0
- package/dist/components/data-display/pdf-viewer/PdfViewer.d.ts +45 -0
- package/dist/components/data-display/permission-wrapper/PermissionWrapper.d.ts +28 -0
- package/dist/components/data-display/popper/Popper.d.ts +57 -0
- package/dist/components/data-display/progress-bar/CircularProgressBar.d.ts +23 -0
- package/dist/components/data-display/progress-bar/LinearProgressBar.d.ts +27 -0
- package/dist/components/data-display/progress-bar/index.d.ts +4 -0
- package/dist/components/data-display/resizable-sidebar/ResizableSidebar.d.ts +48 -0
- package/dist/components/data-display/skeleton/Skeleton.d.ts +18 -0
- package/dist/components/data-display/status-color-mapping/StatusColorMapping.d.ts +29 -0
- package/dist/components/data-display/tag/Tag.d.ts +53 -0
- package/dist/components/data-display/text/Text.d.ts +41 -0
- package/dist/components/data-display/text-with-strike/TextWithStrike.d.ts +19 -0
- package/dist/components/data-display/typography/Typography.d.ts +15 -0
- package/dist/components/data-display/unsaved-changes-modal/UnsavedChangesModal.d.ts +30 -0
- package/dist/components/drag-and-drop/drag-overlay/DragOverlay.d.ts +25 -0
- package/dist/components/drag-and-drop/drag-overlay/index.d.ts +2 -0
- package/dist/components/drag-and-drop/draggable-container/DraggableContainer.d.ts +29 -0
- package/dist/components/drag-and-drop/draggable-container/index.d.ts +2 -0
- package/dist/components/feedback/confirmation-modal/ConfirmationModal.d.ts +38 -0
- package/dist/components/feedback/toast/Toast.d.ts +29 -0
- package/dist/components/floating-bar/FloatingBar.d.ts +91 -0
- package/dist/components/forms/base-input-field/BaseInputField.d.ts +128 -0
- package/dist/components/forms/checkbox/Checkbox.d.ts +55 -0
- package/dist/components/forms/checkbox/CheckboxComponent.d.ts +9 -0
- package/dist/components/forms/color-picker/ColorPicker.d.ts +60 -0
- package/dist/components/forms/creatable-select/CreatableSelect.d.ts +86 -0
- package/dist/components/forms/currency-input/CurrencyInputField.d.ts +110 -0
- package/dist/components/forms/currency-input/currency.constant.d.ts +13 -0
- package/dist/components/forms/customizable-select-field/CustomizableSelectField.d.ts +126 -0
- package/dist/components/forms/date-range/DateRange.d.ts +73 -0
- package/dist/components/forms/date-range/DateRange2.d.ts +72 -0
- package/dist/components/forms/date-time-field/DateTimeField.d.ts +129 -0
- package/dist/components/forms/debounce-input/DebounceInputField.d.ts +66 -0
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.d.ts +64 -0
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.d.ts +118 -0
- package/dist/components/forms/field-options/FieldOptions.d.ts +5 -0
- package/dist/components/forms/field-options/Header.d.ts +7 -0
- package/dist/components/forms/field-options/Icon.d.ts +6 -0
- package/dist/components/forms/field-options/Item.d.ts +7 -0
- package/dist/components/forms/field-options/index.d.ts +2 -0
- package/dist/components/forms/field-options/types.d.ts +11 -0
- package/dist/components/forms/file-upload-dragger/FileUpload.d.ts +83 -0
- package/dist/components/forms/file-upload-dragger/icons.d.ts +12 -0
- package/dist/components/forms/formula-input/FormulaInput.d.ts +33 -0
- package/dist/components/forms/formula-input/index.d.ts +3 -0
- package/dist/components/forms/formula-input/utils.d.ts +31 -0
- package/dist/components/forms/icon-picker/IconPicker.d.ts +20 -0
- package/dist/components/forms/input-field/InputField.d.ts +62 -0
- package/dist/components/forms/master-data-input/MasterDataInputField.d.ts +135 -0
- package/dist/components/forms/md-input/MdInput.d.ts +46 -0
- package/dist/components/forms/multi-file-upload/MultiFileUpload.d.ts +78 -0
- package/dist/components/forms/number-input-field/NumberInputField.d.ts +47 -0
- package/dist/components/forms/percentage-input/PercentageInputField.d.ts +107 -0
- package/dist/components/forms/search-bar/SearchBar.d.ts +28 -0
- package/dist/components/forms/select-field/SelectField.d.ts +162 -0
- package/dist/components/forms/text-area-field/TextAreaField.d.ts +114 -0
- package/dist/components/forms/text-field/TextField.d.ts +48 -0
- package/dist/components/forms/toggle/Toggle.d.ts +108 -0
- package/dist/components/icons/AIExtractedIndicator.d.ts +7 -0
- package/dist/components/icons/AIStarIcon.d.ts +8 -0
- package/dist/components/icons/ArchivedIcon.d.ts +7 -0
- package/dist/components/icons/CheckCircle.d.ts +7 -0
- package/dist/components/icons/CheckSmallIcon.d.ts +7 -0
- package/dist/components/icons/CloseIcon.d.ts +16 -0
- package/dist/components/icons/CloseRounded.d.ts +9 -0
- package/dist/components/icons/ComingSoonIcon.d.ts +7 -0
- package/dist/components/icons/EditIcon.d.ts +7 -0
- package/dist/components/icons/HelpIcon.d.ts +6 -0
- package/dist/components/icons/InfoAlert.d.ts +7 -0
- package/dist/components/icons/InfoCircleIcon.d.ts +7 -0
- package/dist/components/icons/LaxIcon.d.ts +6 -0
- package/dist/components/icons/Required.d.ts +3 -0
- package/dist/components/icons/SearchIcon.d.ts +9 -0
- package/dist/components/layout/ComponentLoader.d.ts +20 -0
- package/dist/components/layout/CustomScrollbar.d.ts +46 -0
- package/dist/components/layout/Helmet.d.ts +29 -0
- package/dist/components/layout/HelmetTitle.d.ts +23 -0
- package/dist/components/layout/LogoLoader.d.ts +22 -0
- package/dist/components/layout/PageContainer.d.ts +51 -0
- package/dist/components/layout/index.d.ts +12 -0
- package/dist/components/modal/confirm-popup/ConfirmPopUp.d.ts +26 -0
- package/dist/components/modal/confirm-popup/index.d.ts +2 -0
- package/dist/components/modal/drawer/Drawer.d.ts +35 -0
- package/dist/components/modal/drawer/index.d.ts +2 -0
- package/dist/components/navigation/accordion/Accordion.d.ts +39 -0
- package/dist/components/navigation/accordion/index.d.ts +2 -0
- package/dist/components/navigation/breadcrumbs/BreadCrumb.d.ts +52 -0
- package/dist/components/navigation/breadcrumbs/BreadCrumbItem.d.ts +39 -0
- package/dist/components/navigation/breadcrumbs/index.d.ts +4 -0
- package/dist/components/navigation/stepper/Stepper.d.ts +45 -0
- package/dist/components/navigation/stepper/index.d.ts +2 -0
- package/dist/components/sidebar/Sidebar.d.ts +15 -0
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/tooltip/Tooltip.d.ts +16 -0
- package/dist/components/user-avatar/NameInitialLogo.d.ts +15 -0
- package/dist/components/user-avatar/PersonIcon.d.ts +7 -0
- package/dist/components/user-avatar/StatusInfoRow.d.ts +5 -0
- package/dist/components/user-avatar/UserAvatar.d.ts +53 -0
- package/dist/components/user-avatar/UserAvatarPopper.d.ts +11 -0
- package/dist/components/user-avatar/UserProfilePic.d.ts +15 -0
- package/dist/components/user-avatar/constants.d.ts +8 -0
- package/dist/components/user-avatar/index.d.ts +13 -0
- package/dist/components/user-avatar/useDynamicPosition.d.ts +13 -0
- package/dist/constants/colors.d.ts +263 -0
- package/dist/constants/layout.d.ts +15 -0
- package/dist/constants/toggle.d.ts +12 -0
- package/dist/hooks/useEventListener.d.ts +4 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/hooks/useModalContainer.d.ts +23 -0
- package/dist/hooks/useOS.d.ts +32 -0
- package/dist/hooks/useOutsideClick.d.ts +28 -0
- package/dist/hooks/usePythonSyntax.d.ts +28 -0
- package/dist/hooks/useScrollToTop.d.ts +5 -0
- package/dist/hooks/useTheme.d.ts +6 -0
- package/dist/index.d.ts +212 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/services/monacoManager.d.ts +28 -0
- package/dist/types/icon-picker.d.ts +2 -0
- package/dist/types/index.d.ts +70 -0
- package/dist/utils/countryFlags.d.ts +5 -0
- package/dist/utils/formatters.d.ts +24 -0
- package/dist/utils/messageConstants.d.ts +88 -0
- package/dist/utils/tagUtils.d.ts +12 -0
- package/dist/utils/utilities.d.ts +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { LabelType } from "../../data-display/label/Label";
|
|
2
|
+
/**
|
|
3
|
+
* Risk details interface for risk analysis integration
|
|
4
|
+
*/
|
|
5
|
+
export interface RiskDetails {
|
|
6
|
+
color?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
hexBgColor?: string;
|
|
9
|
+
hexBorderColor?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Risk details card component props - generic to allow consumer-specific risk types
|
|
14
|
+
*/
|
|
15
|
+
export interface RiskDetailsCardProps<T = any> {
|
|
16
|
+
riskDetails: T;
|
|
17
|
+
maxWidth?: string;
|
|
18
|
+
showAllRisksSuggestions?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Props for the DynamicDataModal component
|
|
22
|
+
*/
|
|
23
|
+
export interface DynamicDataModalProps {
|
|
24
|
+
isVisible: boolean;
|
|
25
|
+
onSelect: (data: string | number | readonly string[] | undefined) => void;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
dataKey: string;
|
|
28
|
+
dataSource: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props for the DynamicDataInputField component
|
|
32
|
+
*/
|
|
33
|
+
export interface DynamicDataInputFieldProps {
|
|
34
|
+
/** Unique identifier for the input */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Label text to display above the input */
|
|
37
|
+
label: string;
|
|
38
|
+
/** Placeholder text for the input */
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
/** Color for the input text */
|
|
41
|
+
color?: string;
|
|
42
|
+
/** Current value of the input */
|
|
43
|
+
value: string | number | readonly string[] | undefined;
|
|
44
|
+
/** Whether the field is required */
|
|
45
|
+
required?: boolean;
|
|
46
|
+
/** Whether the required indicator shows as conditional (yellow instead of red) */
|
|
47
|
+
isRequiredConditional?: boolean;
|
|
48
|
+
/** Tags/labels to display next to the label */
|
|
49
|
+
tags?: (string | LabelType)[];
|
|
50
|
+
/** Error message to display below the input */
|
|
51
|
+
errorMessage?: string;
|
|
52
|
+
/** Default value for the input */
|
|
53
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
54
|
+
/** Data source for dynamic data */
|
|
55
|
+
dataSource: string;
|
|
56
|
+
/** Data key for dynamic data */
|
|
57
|
+
dataKey: string;
|
|
58
|
+
/** Tooltip text for the help icon */
|
|
59
|
+
tooltip?: string;
|
|
60
|
+
/** Whether this is a GTN (Global Term Name) field */
|
|
61
|
+
isGTN?: boolean;
|
|
62
|
+
/** GTN field name for document integration */
|
|
63
|
+
gtnName?: string;
|
|
64
|
+
/** Whether the value was AI extracted */
|
|
65
|
+
isAiExtracted?: boolean;
|
|
66
|
+
/** Whether the input is disabled */
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
/** Callback function called when value changes */
|
|
69
|
+
onChange: (value: string | number | readonly string[] | undefined) => void;
|
|
70
|
+
/** Additional CSS classes for the label */
|
|
71
|
+
labelClassName?: string;
|
|
72
|
+
/** Whether this is a live field */
|
|
73
|
+
isLiveField?: boolean;
|
|
74
|
+
/** Whether to preserve original case in the label */
|
|
75
|
+
originalCase?: boolean;
|
|
76
|
+
/** Handler for adding GTN to document */
|
|
77
|
+
onAddGTNToDocument?: (keyValuePair: {
|
|
78
|
+
key: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}) => void;
|
|
81
|
+
/** Risk details data */
|
|
82
|
+
riskDetails?: RiskDetails;
|
|
83
|
+
/** Whether risk analysis is open */
|
|
84
|
+
isRiskAnalysisOpen?: boolean;
|
|
85
|
+
/** Custom risk details card component */
|
|
86
|
+
RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;
|
|
87
|
+
/** Primary color shades for styling */
|
|
88
|
+
primaryColorShades?: Record<number, string>;
|
|
89
|
+
/** Whether recording is active (for pilot context) */
|
|
90
|
+
isRecording?: boolean;
|
|
91
|
+
/** Whether playback is active (for pilot context) */
|
|
92
|
+
isPlaying?: boolean;
|
|
93
|
+
/** Callback to set disable actions state */
|
|
94
|
+
setDisableActions?: (disabled: boolean) => void;
|
|
95
|
+
/** Toast function for deprecated field warning */
|
|
96
|
+
showDeprecatedFieldWarning?: () => void;
|
|
97
|
+
/** Dynamic data modal component */
|
|
98
|
+
DynamicDataModal?: React.ComponentType<DynamicDataModalProps>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A highly customizable dynamic data input component with label, validation, and styling support.
|
|
102
|
+
* Features dynamic data modal integration, GTN support, risk analysis support,
|
|
103
|
+
* and comprehensive prop support for various use cases.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <DynamicDataInputField
|
|
108
|
+
* id="dynamic-field"
|
|
109
|
+
* label="Dynamic Field"
|
|
110
|
+
* value={fieldValue}
|
|
111
|
+
* onChange={(value) => setFieldValue(value)}
|
|
112
|
+
* dataSource="sourceTable"
|
|
113
|
+
* dataKey="fieldKey"
|
|
114
|
+
* required
|
|
115
|
+
* />
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export declare const DynamicDataInputField: import("react").ForwardRefExoticComponent<DynamicDataInputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type TFieldOptionsProps } from './types';
|
|
3
|
+
type TProps = Pick<TFieldOptionsProps, 'value' | 'onOptionChange' | 'onSaveOption' | 'onDeleteAll' | 'required' | 'errorMessage'> & {
|
|
4
|
+
hasChoices: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const Header: FC<TProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type TFieldOptionsProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
onSaveOption(): void;
|
|
4
|
+
onOptionChange(value: string): void;
|
|
5
|
+
onDeleteItem(index: number): void;
|
|
6
|
+
onChoicesUpdate(nextChoices: string[]): void;
|
|
7
|
+
onDeleteAll?(): void;
|
|
8
|
+
choices: string[];
|
|
9
|
+
required?: boolean;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Context interface for global agreement draggable functionality
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobalAgreementDraggableContext {
|
|
6
|
+
isOpenedAnotherFileUpload?: boolean;
|
|
7
|
+
setIsOpenedAnotherFileUpload?: (value: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* File upload service interface
|
|
11
|
+
*/
|
|
12
|
+
export interface FileUploadService {
|
|
13
|
+
uploadFileToFileServer: (formData: FormData, queryParams: string) => Promise<{
|
|
14
|
+
fileUrl: string;
|
|
15
|
+
fileName: string;
|
|
16
|
+
}>;
|
|
17
|
+
deleteFileFromFileServer: (fileName: string, queryParams: string) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* System messages interface
|
|
21
|
+
*/
|
|
22
|
+
export interface SystemMessages {
|
|
23
|
+
fileSizeLimit: (size: string, unit: string) => string;
|
|
24
|
+
}
|
|
25
|
+
export type FileUploadDraggerProps = {
|
|
26
|
+
/** Callback to receive the uploaded file */
|
|
27
|
+
getFile: (file: any, fileName?: string) => any;
|
|
28
|
+
/** Description text to display */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Error message to display */
|
|
31
|
+
errorMessage?: string;
|
|
32
|
+
/** Whether the upload is disabled */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** Default file to display */
|
|
35
|
+
defaultFile?: any;
|
|
36
|
+
/** Accepted file types */
|
|
37
|
+
acceptedFiles?: string;
|
|
38
|
+
/** Whether loading state is active */
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
/** Convert file to base64 */
|
|
41
|
+
asBase64?: boolean;
|
|
42
|
+
/** Upload to file server */
|
|
43
|
+
toFileServer?: boolean;
|
|
44
|
+
/** Whether file is currently uploading */
|
|
45
|
+
fileUploading?: boolean;
|
|
46
|
+
/** Callback to set file uploading state */
|
|
47
|
+
setFileUploading?: (fileUploading: boolean) => void;
|
|
48
|
+
/** Upload to document server path */
|
|
49
|
+
uploadToDocServer?: boolean;
|
|
50
|
+
/** Unique identifier for the upload */
|
|
51
|
+
id?: string;
|
|
52
|
+
/** Allow multiple file uploads */
|
|
53
|
+
multiple?: boolean;
|
|
54
|
+
/** Get original file name */
|
|
55
|
+
getRealFileName?: boolean;
|
|
56
|
+
/** Callback when file is deleted */
|
|
57
|
+
onDelete?: () => void;
|
|
58
|
+
/** Hide the selected file display */
|
|
59
|
+
hideSelectedFile?: boolean;
|
|
60
|
+
/** Maximum file size in bytes */
|
|
61
|
+
maxSize?: number;
|
|
62
|
+
/** Toast function for notifications */
|
|
63
|
+
toast?: {
|
|
64
|
+
error: (message: string, options?: {
|
|
65
|
+
toastId: string;
|
|
66
|
+
}) => void;
|
|
67
|
+
};
|
|
68
|
+
/** File upload service */
|
|
69
|
+
fileUploadService?: FileUploadService;
|
|
70
|
+
/** System messages */
|
|
71
|
+
systemMessages?: SystemMessages;
|
|
72
|
+
/** Build query params function */
|
|
73
|
+
buildQueryParams?: (params: Record<string, string | null>) => string;
|
|
74
|
+
/** Get token function */
|
|
75
|
+
getToken?: () => string | null;
|
|
76
|
+
/** Context for global agreement draggable */
|
|
77
|
+
globalAgreementDraggableContext?: GlobalAgreementDraggableContext;
|
|
78
|
+
/** Custom click to upload text */
|
|
79
|
+
clickToUploadText?: string;
|
|
80
|
+
/** Custom drag and drop text */
|
|
81
|
+
dragAndDropText?: string;
|
|
82
|
+
};
|
|
83
|
+
export declare const FileUpload: FC<FileUploadDraggerProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, SVGProps } from 'react';
|
|
2
|
+
interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'fill'> {
|
|
3
|
+
fill?: string;
|
|
4
|
+
size?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const TrashOutlineIcon: FC<IconProps>;
|
|
8
|
+
export declare const DownloadIcon: FC<IconProps>;
|
|
9
|
+
export declare const FilePdfIcon: FC<IconProps>;
|
|
10
|
+
export declare const FileDescriptionIcon: FC<IconProps>;
|
|
11
|
+
export declare const SpinnerIcon: FC<IconProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormulaInputProps {
|
|
3
|
+
/** Current value of the input */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Callback when value changes */
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
/** Callback when input receives focus */
|
|
8
|
+
onFocus?: () => void;
|
|
9
|
+
/** Callback when input loses focus */
|
|
10
|
+
onBlur?: () => void;
|
|
11
|
+
/** Label for the input field */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** Unique identifier for the input */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Whether the field is required */
|
|
16
|
+
required?: boolean;
|
|
17
|
+
/** Tooltip text displayed next to the label */
|
|
18
|
+
tooltip?: string;
|
|
19
|
+
/** Placeholder text */
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/** Whether the input is disabled */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Error message to display */
|
|
24
|
+
errorMessage?: string;
|
|
25
|
+
/** Width of the input */
|
|
26
|
+
width?: string;
|
|
27
|
+
/** List of suggestions for autocomplete */
|
|
28
|
+
suggestions?: string[];
|
|
29
|
+
/** Whether to show the raw value instead of pills */
|
|
30
|
+
showRawValue?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const _default: React.NamedExoticComponent<FormulaInputProps>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as FormulaInput } from './FormulaInput';
|
|
2
|
+
export type { FormulaInputProps } from './FormulaInput';
|
|
3
|
+
export { convertToPills, convertFromPills, getCursorPosition, setCursorPosition, getTextBeforeCursor, getCursorCoordinates, insertTextAtCursor, } from './utils';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts {{variable}} syntax to styled pill marks
|
|
3
|
+
*/
|
|
4
|
+
export declare const convertToPills: (str: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Converts pill marks back to {{variable}} syntax
|
|
7
|
+
*/
|
|
8
|
+
export declare const convertFromPills: (str: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the current cursor position in the contenteditable element
|
|
11
|
+
*/
|
|
12
|
+
export declare const getCursorPosition: () => number;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the cursor position in a contenteditable element
|
|
15
|
+
*/
|
|
16
|
+
export declare const setCursorPosition: (element: HTMLElement, position: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the text content before the cursor, useful for detecting {{ trigger
|
|
19
|
+
*/
|
|
20
|
+
export declare const getTextBeforeCursor: () => string;
|
|
21
|
+
/**
|
|
22
|
+
* Gets cursor coordinates for positioning the suggestion dropdown
|
|
23
|
+
*/
|
|
24
|
+
export declare const getCursorCoordinates: () => {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Inserts text at the current cursor position
|
|
30
|
+
*/
|
|
31
|
+
export declare const insertTextAtCursor: (text: string) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SvgIconOwnProps } from '@mui/material';
|
|
3
|
+
export interface IconPickerContentProps {
|
|
4
|
+
selectedIcon: string | null;
|
|
5
|
+
onChange: (iconName: string | null) => void;
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
allowClear?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
}
|
|
12
|
+
interface IconRendererProps {
|
|
13
|
+
iconName: string;
|
|
14
|
+
sx?: SvgIconOwnProps['sx'];
|
|
15
|
+
className?: string;
|
|
16
|
+
isHovering?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const IconRenderer: ({ iconName, sx, className, isHovering }: IconRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const IconPicker: React.LazyExoticComponent<(props: IconPickerContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the InputField component
|
|
4
|
+
*/
|
|
5
|
+
export interface InputFieldProps {
|
|
6
|
+
/** Unique identifier for the input field */
|
|
7
|
+
id: string;
|
|
8
|
+
/** The current value of the input field */
|
|
9
|
+
value?: string;
|
|
10
|
+
/** Callback function called when the input value changes */
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
/** Callback function called on key down events */
|
|
13
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
+
/** Error message to display below the input */
|
|
15
|
+
message?: string;
|
|
16
|
+
/** Success message to display below the input */
|
|
17
|
+
messageType?: "success" | "error" | "info" | "default";
|
|
18
|
+
/** Default value for the input field */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/** Whether the input field is disabled */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Maximum value for number inputs */
|
|
23
|
+
max?: number;
|
|
24
|
+
/** Minimum value for number inputs */
|
|
25
|
+
min?: number;
|
|
26
|
+
/** Whether the field is required */
|
|
27
|
+
required?: boolean;
|
|
28
|
+
/** Label text for the input field */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Input type (text, email, password, number, etc.) */
|
|
31
|
+
type?: string;
|
|
32
|
+
/** Placeholder text for the input */
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/** Icon or element to display at the end of the input */
|
|
35
|
+
fieldSuffix?: React.ReactNode;
|
|
36
|
+
/** Additional CSS classes for the wrapper container */
|
|
37
|
+
wrapperClassNames?: string;
|
|
38
|
+
/** Additional CSS classes for the input element */
|
|
39
|
+
inputClassNames?: string;
|
|
40
|
+
/** Inline styles for the input element */
|
|
41
|
+
inputStyle?: React.CSSProperties;
|
|
42
|
+
/** Additional props to pass to the input element */
|
|
43
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A highly customizable input field component with label, validation, and styling support.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <InputField
|
|
51
|
+
* id="email"
|
|
52
|
+
* label="Email Address"
|
|
53
|
+
* type="email"
|
|
54
|
+
* value={email}
|
|
55
|
+
* onChange={setEmail}
|
|
56
|
+
* placeholder="Enter your email"
|
|
57
|
+
* required
|
|
58
|
+
* errorMessage={emailError}
|
|
59
|
+
* />
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { LabelType } from "../../data-display/label/Label";
|
|
2
|
+
/**
|
|
3
|
+
* Risk details interface for risk analysis integration
|
|
4
|
+
*/
|
|
5
|
+
export interface RiskDetails {
|
|
6
|
+
color?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
hexBgColor?: string;
|
|
9
|
+
hexBorderColor?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Risk details card component props - generic to allow consumer-specific risk types
|
|
14
|
+
*/
|
|
15
|
+
export interface RiskDetailsCardProps<T = any> {
|
|
16
|
+
riskDetails: T;
|
|
17
|
+
maxWidth?: string;
|
|
18
|
+
showAllRisksSuggestions?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Props for the MasterDataModal component
|
|
22
|
+
*/
|
|
23
|
+
export interface MasterDataModalProps {
|
|
24
|
+
isVisible: boolean;
|
|
25
|
+
onSelected?: (masterDataValue: any, masterDataRow?: any) => void;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
masterDataColumnName?: string;
|
|
28
|
+
masterDataFilters?: any;
|
|
29
|
+
masterDataName?: string;
|
|
30
|
+
masterDataId: string | null;
|
|
31
|
+
showFilters?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Props for the MasterDataInputField component
|
|
35
|
+
*/
|
|
36
|
+
export interface MasterDataInputFieldProps {
|
|
37
|
+
/** Unique identifier for the input */
|
|
38
|
+
id: string;
|
|
39
|
+
/** Label text to display above the input */
|
|
40
|
+
label: string;
|
|
41
|
+
/** Placeholder text for the input */
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
/** Current value of the input */
|
|
44
|
+
value: any;
|
|
45
|
+
/** Callback function called when value changes */
|
|
46
|
+
onChange: (value: any, masterDataRowValue?: any) => void;
|
|
47
|
+
/** Error message to display below the input */
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
/** Callback to set error message */
|
|
50
|
+
setErrorMessage: (message: string) => void;
|
|
51
|
+
/** Callback to remove error message */
|
|
52
|
+
removeErrorMessage: () => void;
|
|
53
|
+
/** Default value for the input */
|
|
54
|
+
defaultValue?: any;
|
|
55
|
+
/** Whether the field is required */
|
|
56
|
+
required?: boolean;
|
|
57
|
+
/** Whether the required indicator shows as conditional (yellow instead of red) */
|
|
58
|
+
isRequiredConditional?: boolean;
|
|
59
|
+
/** Name of the master data source */
|
|
60
|
+
masterDataName: string;
|
|
61
|
+
/** Column name in the master data */
|
|
62
|
+
masterDataColumnName: string;
|
|
63
|
+
/** Formula for computing master data value */
|
|
64
|
+
masterDataFormula?: string;
|
|
65
|
+
/** Filters for master data */
|
|
66
|
+
masterDataFilters?: any;
|
|
67
|
+
/** Tags/labels to display next to the label */
|
|
68
|
+
tags?: (string | LabelType)[];
|
|
69
|
+
/** Index for array fields */
|
|
70
|
+
index?: number;
|
|
71
|
+
/** Tooltip text for the help icon */
|
|
72
|
+
tooltip?: string;
|
|
73
|
+
/** Whether to preserve original case in the label */
|
|
74
|
+
originalCase?: boolean;
|
|
75
|
+
/** Color for the input text */
|
|
76
|
+
color?: string;
|
|
77
|
+
/** Whether this is a GTN (Global Term Name) field */
|
|
78
|
+
isGTN?: boolean;
|
|
79
|
+
/** GTN field name for document integration */
|
|
80
|
+
gtnName?: any;
|
|
81
|
+
/** Whether the value was AI extracted */
|
|
82
|
+
isAiExtracted?: boolean;
|
|
83
|
+
/** Reference data for formula computation */
|
|
84
|
+
reference?: any;
|
|
85
|
+
/** Whether the input is disabled */
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
/** Additional CSS classes for the label */
|
|
88
|
+
labelClassName?: string;
|
|
89
|
+
/** Whether this is a live field */
|
|
90
|
+
isLiveField?: boolean;
|
|
91
|
+
/** Callback function called when input loses focus */
|
|
92
|
+
onBlur?: () => void;
|
|
93
|
+
/** Handler for adding GTN to document */
|
|
94
|
+
onAddGTNToDocument?: (keyValuePair: {
|
|
95
|
+
key: string;
|
|
96
|
+
value: string;
|
|
97
|
+
}) => void;
|
|
98
|
+
/** Risk details data */
|
|
99
|
+
riskDetails?: RiskDetails;
|
|
100
|
+
/** Whether risk analysis is open */
|
|
101
|
+
isRiskAnalysisOpen?: boolean;
|
|
102
|
+
/** Custom risk details card component */
|
|
103
|
+
RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;
|
|
104
|
+
/** Primary color shades for styling */
|
|
105
|
+
primaryColorShades?: Record<number, string>;
|
|
106
|
+
/** Callback to set disable actions state */
|
|
107
|
+
setDisableActions?: (disabled: boolean) => void;
|
|
108
|
+
/** Toast function for deprecated field warning */
|
|
109
|
+
showDeprecatedFieldWarning?: () => void;
|
|
110
|
+
/** Master data modal component */
|
|
111
|
+
MasterDataModal?: React.ComponentType<MasterDataModalProps>;
|
|
112
|
+
/** Function to parse master data formula */
|
|
113
|
+
parseMasterDataFormula?: (formula: string, row: any) => string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A highly customizable master data input component with label, validation, and styling support.
|
|
117
|
+
* Features master data modal integration, GTN support, risk analysis support,
|
|
118
|
+
* and comprehensive prop support for various use cases.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```tsx
|
|
122
|
+
* <MasterDataInputField
|
|
123
|
+
* id="master-field"
|
|
124
|
+
* label="Master Field"
|
|
125
|
+
* value={fieldValue}
|
|
126
|
+
* onChange={(value, rowValue) => setFieldValue(value)}
|
|
127
|
+
* setErrorMessage={(msg) => setError(msg)}
|
|
128
|
+
* removeErrorMessage={() => setError('')}
|
|
129
|
+
* masterDataName="customers"
|
|
130
|
+
* masterDataColumnName="name"
|
|
131
|
+
* required
|
|
132
|
+
* />
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export declare const MasterDataInputField: import("react").ForwardRefExoticComponent<MasterDataInputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the MdInput component
|
|
3
|
+
*/
|
|
4
|
+
export interface MdInputProps {
|
|
5
|
+
/** Unique identifier for the markdown input */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Current markdown value */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Callback function called when the markdown value changes */
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
/** Placeholder text for the textarea */
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/** Number of visible text lines for the textarea */
|
|
14
|
+
rows?: number;
|
|
15
|
+
/** Whether the input is disabled */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Additional CSS classes for the wrapper container */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Additional CSS classes for the textarea */
|
|
20
|
+
textareaClassName?: string;
|
|
21
|
+
/** Additional CSS classes for the preview container */
|
|
22
|
+
previewClassName?: string;
|
|
23
|
+
/** Initial mode (markdown or preview) */
|
|
24
|
+
defaultMode?: "markdown" | "preview";
|
|
25
|
+
/** Current mode (markdown or preview) */
|
|
26
|
+
mode?: "markdown" | "preview";
|
|
27
|
+
/** Label text to display above the input */
|
|
28
|
+
label?: string;
|
|
29
|
+
/** Whether the field is required */
|
|
30
|
+
required?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A markdown input component with preview mode support.
|
|
34
|
+
* Features a toggle switch to switch between markdown editing and preview modes.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <MdInput
|
|
39
|
+
* value={markdown}
|
|
40
|
+
* onChange={setMarkdown}
|
|
41
|
+
* placeholder="Enter markdown content..."
|
|
42
|
+
* defaultMode="markdown"
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare const MdInput: ({ id, value, onChange, placeholder, rows: minRows, disabled, className, textareaClassName, previewClassName, defaultMode, mode: modeProp, label, required, }: MdInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File upload result interface
|
|
3
|
+
*/
|
|
4
|
+
export interface FileUploadResult {
|
|
5
|
+
filename: string;
|
|
6
|
+
content?: string;
|
|
7
|
+
fileUrl?: string;
|
|
8
|
+
fileName?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Union type for file change callback parameter
|
|
12
|
+
*/
|
|
13
|
+
export type FileChangeValue = File | File[] | FileUploadResult | FileUploadResult[] | string | string[] | null;
|
|
14
|
+
/**
|
|
15
|
+
* Props for the MultiFileUpload component
|
|
16
|
+
*/
|
|
17
|
+
export interface MultiFileUploadProps {
|
|
18
|
+
/** Unique identifier for the upload component */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** Callback function called when files are selected/uploaded */
|
|
21
|
+
onFileChange: (files: FileChangeValue, fileName?: string) => void;
|
|
22
|
+
/** Description text to display in the upload area */
|
|
23
|
+
description?: string;
|
|
24
|
+
/** Error message to display */
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
/** Whether the upload is disabled */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Default file to display */
|
|
29
|
+
defaultFile?: File | null;
|
|
30
|
+
/** Accepted file types (e.g., ".pdf,.doc,.docx") */
|
|
31
|
+
acceptedFiles?: string;
|
|
32
|
+
/** Whether the component is in loading state */
|
|
33
|
+
isLoading?: boolean;
|
|
34
|
+
/** Whether to convert files to base64 */
|
|
35
|
+
asBase64?: boolean;
|
|
36
|
+
/** Whether to upload files to server */
|
|
37
|
+
toFileServer?: boolean;
|
|
38
|
+
/** Whether files are currently uploading */
|
|
39
|
+
fileUploading?: boolean;
|
|
40
|
+
/** Callback to set file uploading state */
|
|
41
|
+
setFileUploading?: (fileUploading: boolean | string | null) => void;
|
|
42
|
+
/** Whether to upload to document server */
|
|
43
|
+
uploadToDocServer?: boolean;
|
|
44
|
+
/** Whether to allow multiple file selection */
|
|
45
|
+
multiple?: boolean;
|
|
46
|
+
/** Whether to get real file name */
|
|
47
|
+
getRealFileName?: boolean;
|
|
48
|
+
/** Maximum file size in bytes (default: 50MB) */
|
|
49
|
+
maxSize?: number;
|
|
50
|
+
/** Custom upload handler function */
|
|
51
|
+
onUpload?: (files: File[]) => Promise<FileUploadResult[]>;
|
|
52
|
+
/** Custom delete handler function */
|
|
53
|
+
onDelete?: (fileData?: FileUploadResult) => Promise<void>;
|
|
54
|
+
/** Additional CSS classes for the wrapper */
|
|
55
|
+
wrapperClassName?: string;
|
|
56
|
+
/** Additional CSS classes for the upload area */
|
|
57
|
+
uploadClassName?: string;
|
|
58
|
+
/** Whether to show file size */
|
|
59
|
+
showFileSize?: boolean;
|
|
60
|
+
/** Custom file size formatter */
|
|
61
|
+
formatFileSize?: (size: number) => string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A highly customizable multi-file upload component with drag-and-drop support.
|
|
65
|
+
* Features file validation, base64 conversion, server upload, and comprehensive styling options.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <MultiFileUpload
|
|
70
|
+
* id="file-upload"
|
|
71
|
+
* description="Upload your documents"
|
|
72
|
+
* onFileChange={(files) => console.log(files)}
|
|
73
|
+
* multiple
|
|
74
|
+
* maxSize={10 * 1024 * 1024} // 10MB
|
|
75
|
+
* />
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare const MultiFileUpload: import("react").ForwardRefExoticComponent<MultiFileUploadProps & import("react").RefAttributes<HTMLDivElement>>;
|