@rufous/ui 0.3.15 → 0.3.18
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/main.cjs +706 -448
- package/dist/main.css +53 -0
- package/dist/main.d.cts +110 -2
- package/dist/main.d.ts +110 -2
- package/dist/main.js +617 -359
- package/package.json +1 -1
package/dist/main.css
CHANGED
|
@@ -507,6 +507,21 @@
|
|
|
507
507
|
.dg-th-label.no-sort {
|
|
508
508
|
cursor: default;
|
|
509
509
|
}
|
|
510
|
+
.dg-sort-icon {
|
|
511
|
+
display: flex;
|
|
512
|
+
align-items: center;
|
|
513
|
+
opacity: 0;
|
|
514
|
+
transition: opacity 0.15s;
|
|
515
|
+
flex-shrink: 0;
|
|
516
|
+
color: var(--text-secondary);
|
|
517
|
+
}
|
|
518
|
+
.dg-sort-icon--active {
|
|
519
|
+
opacity: 1;
|
|
520
|
+
color: var(--primary-color);
|
|
521
|
+
}
|
|
522
|
+
.dg-thead-cell:hover .dg-sort-icon {
|
|
523
|
+
opacity: 1;
|
|
524
|
+
}
|
|
510
525
|
.dg-th-actions {
|
|
511
526
|
display: flex;
|
|
512
527
|
align-items: center;
|
|
@@ -534,6 +549,20 @@
|
|
|
534
549
|
background: var(--border-color);
|
|
535
550
|
color: var(--text-color);
|
|
536
551
|
}
|
|
552
|
+
.dg-th-filter-btn {
|
|
553
|
+
background: none;
|
|
554
|
+
border: none;
|
|
555
|
+
cursor: pointer;
|
|
556
|
+
padding: 3px;
|
|
557
|
+
border-radius: 4px;
|
|
558
|
+
color: var(--primary-color);
|
|
559
|
+
display: flex;
|
|
560
|
+
align-items: center;
|
|
561
|
+
transition: background 0.15s;
|
|
562
|
+
}
|
|
563
|
+
.dg-th-filter-btn:hover {
|
|
564
|
+
background: rgba(164, 27, 6, 0.08);
|
|
565
|
+
}
|
|
537
566
|
.dg-resizer {
|
|
538
567
|
width: 4px;
|
|
539
568
|
height: 16px;
|
|
@@ -2879,6 +2908,7 @@ pre {
|
|
|
2879
2908
|
.rf-select__display {
|
|
2880
2909
|
display: flex;
|
|
2881
2910
|
align-items: center;
|
|
2911
|
+
gap: 8px;
|
|
2882
2912
|
flex: 1;
|
|
2883
2913
|
min-width: 0;
|
|
2884
2914
|
padding: 16.5px 14px;
|
|
@@ -3048,6 +3078,27 @@ pre {
|
|
|
3048
3078
|
cursor: default;
|
|
3049
3079
|
pointer-events: none;
|
|
3050
3080
|
}
|
|
3081
|
+
.rf-select__option-icon {
|
|
3082
|
+
display: flex;
|
|
3083
|
+
align-items: center;
|
|
3084
|
+
justify-content: center;
|
|
3085
|
+
flex-shrink: 0;
|
|
3086
|
+
max-width: 18px;
|
|
3087
|
+
max-height: 18px;
|
|
3088
|
+
overflow: hidden;
|
|
3089
|
+
color: inherit;
|
|
3090
|
+
}
|
|
3091
|
+
.rf-select__option-icon > * {
|
|
3092
|
+
max-width: 18px;
|
|
3093
|
+
max-height: 18px;
|
|
3094
|
+
}
|
|
3095
|
+
.rf-select__option-icon-img {
|
|
3096
|
+
width: 18px;
|
|
3097
|
+
height: 18px;
|
|
3098
|
+
object-fit: cover;
|
|
3099
|
+
border-radius: 3px;
|
|
3100
|
+
display: block;
|
|
3101
|
+
}
|
|
3051
3102
|
.rf-select__option-label {
|
|
3052
3103
|
flex: 1;
|
|
3053
3104
|
overflow: hidden;
|
|
@@ -6283,6 +6334,8 @@ pre {
|
|
|
6283
6334
|
font-size: 14px;
|
|
6284
6335
|
}
|
|
6285
6336
|
|
|
6337
|
+
/* lib/styles/smart-select.css */
|
|
6338
|
+
|
|
6286
6339
|
/* lib/styles/button.css */
|
|
6287
6340
|
.btn {
|
|
6288
6341
|
padding: 10px 20px;
|
package/dist/main.d.cts
CHANGED
|
@@ -850,6 +850,12 @@ interface Column<T> {
|
|
|
850
850
|
row: T;
|
|
851
851
|
field: string;
|
|
852
852
|
}) => string;
|
|
853
|
+
/**
|
|
854
|
+
* Override the value written to CSV export for this column.
|
|
855
|
+
* Receives the raw field value and the full row item.
|
|
856
|
+
* Takes precedence over valueGetter / valueFormatter for export purposes.
|
|
857
|
+
*/
|
|
858
|
+
exportValue?: (value: any, item: T) => string;
|
|
853
859
|
width?: string | number;
|
|
854
860
|
minWidth?: string | number;
|
|
855
861
|
maxWidth?: string | number;
|
|
@@ -875,6 +881,12 @@ interface Column<T> {
|
|
|
875
881
|
disableColumnMenu?: boolean;
|
|
876
882
|
isExportable?: boolean;
|
|
877
883
|
}
|
|
884
|
+
interface FilterState {
|
|
885
|
+
column: string;
|
|
886
|
+
operator: string;
|
|
887
|
+
value: string;
|
|
888
|
+
logic: 'AND' | 'OR';
|
|
889
|
+
}
|
|
878
890
|
interface Action<T> {
|
|
879
891
|
label: string;
|
|
880
892
|
icon: React__default.ReactNode;
|
|
@@ -932,17 +944,41 @@ interface DataGridProps<T> {
|
|
|
932
944
|
headerActions?: DataGridToolbarSlot;
|
|
933
945
|
/** Extra content rendered in a second row below the header */
|
|
934
946
|
toolbarContent?: DataGridToolbarSlot;
|
|
947
|
+
/**
|
|
948
|
+
* Limit global search to these column field names.
|
|
949
|
+
* When omitted, all visible columns are searched.
|
|
950
|
+
*/
|
|
951
|
+
searchableColumns?: string[];
|
|
952
|
+
/**
|
|
953
|
+
* Called when the search query finds no local results.
|
|
954
|
+
* Use this to trigger a server-side search.
|
|
955
|
+
*/
|
|
956
|
+
onSearchChange?: (query: string) => void;
|
|
957
|
+
/** Called whenever the applied advanced filters change. */
|
|
958
|
+
onFiltersChange?: (filters: FilterState[]) => void;
|
|
959
|
+
/** Hide the "Export CSV" button in the header toolbar. */
|
|
960
|
+
hideTopExport?: boolean;
|
|
935
961
|
}
|
|
936
962
|
|
|
937
963
|
declare function DataGrid<T extends {
|
|
938
964
|
id: string | number;
|
|
939
|
-
}>({ columns: initialColumnsProp, data, actions, loading, pagination, paginationMode, rowCount, paginationModel, onPaginationModelChange, pageSize: initialPageSize, pageSizeOptions, title, className, sx, onRowDoubleClick, onCellDoubleClick, headerActions, toolbarContent, }: DataGridProps<T>): React__default.JSX.Element;
|
|
965
|
+
}>({ columns: initialColumnsProp, data, actions, loading, pagination, paginationMode, rowCount, paginationModel, onPaginationModelChange, pageSize: initialPageSize, pageSizeOptions, title, className, sx, onRowDoubleClick, onCellDoubleClick, headerActions, toolbarContent, searchableColumns, onSearchChange, onFiltersChange, hideTopExport, }: DataGridProps<T>): React__default.JSX.Element;
|
|
940
966
|
|
|
941
967
|
type SelectOption = {
|
|
942
968
|
value: string | number;
|
|
943
969
|
label: string;
|
|
944
970
|
disabled?: boolean;
|
|
945
971
|
group?: string;
|
|
972
|
+
/**
|
|
973
|
+
* Optional icon rendered to the left of the label in both the dropdown and the trigger.
|
|
974
|
+
* Pass a React component (e.g. a Lucide icon) **or** an image URL string.
|
|
975
|
+
* Max size is capped to 18 × 18 px via CSS.
|
|
976
|
+
*/
|
|
977
|
+
icon?: React__default.ComponentType<{
|
|
978
|
+
size?: number;
|
|
979
|
+
className?: string;
|
|
980
|
+
style?: React__default.CSSProperties;
|
|
981
|
+
}> | string;
|
|
946
982
|
};
|
|
947
983
|
interface SelectProps {
|
|
948
984
|
options: SelectOption[] | string[];
|
|
@@ -1864,6 +1900,78 @@ interface UserSelectionFieldProps {
|
|
|
1864
1900
|
}
|
|
1865
1901
|
declare function UserSelectionField({ value, onChange, options, loading, onSearchChange, label, multiple, limitTags, size, variant, disabled, error, helperText, fullWidth, required, filterOptions: filterOptionsProp, className, style, sx, }: UserSelectionFieldProps): React__default.JSX.Element;
|
|
1866
1902
|
|
|
1903
|
+
interface SmartSelectProps<T = any> {
|
|
1904
|
+
/** Options array — can be flat or hierarchical (via getOptionChildren) */
|
|
1905
|
+
options: T[];
|
|
1906
|
+
/** Controlled value. Single: T | null. Multiple: T[] */
|
|
1907
|
+
value?: T | T[] | null;
|
|
1908
|
+
/** Called when selection changes */
|
|
1909
|
+
onChange?: (value: T | T[] | null) => void;
|
|
1910
|
+
/**
|
|
1911
|
+
* Called when the typed text finds no local match —
|
|
1912
|
+
* use this to trigger an API / server search.
|
|
1913
|
+
*/
|
|
1914
|
+
onSearchChange?: (query: string) => void;
|
|
1915
|
+
/**
|
|
1916
|
+
* Debounce delay in ms before `onSearchChange` fires.
|
|
1917
|
+
* Defaults to 300 ms. Pass 0 to disable debouncing.
|
|
1918
|
+
*/
|
|
1919
|
+
debounceMs?: number;
|
|
1920
|
+
/** Primary display label for an option (required) */
|
|
1921
|
+
getOptionLabel: (option: T) => string;
|
|
1922
|
+
/** Unique key for an option — defaults to the label string */
|
|
1923
|
+
getOptionValue?: (option: T) => string | number;
|
|
1924
|
+
/** Optional secondary line shown below the label */
|
|
1925
|
+
getOptionSubLabel?: (option: T) => string | undefined;
|
|
1926
|
+
/**
|
|
1927
|
+
* Return child options to create a hierarchical list.
|
|
1928
|
+
* The tree is flattened with indentation for display.
|
|
1929
|
+
*/
|
|
1930
|
+
getOptionChildren?: (option: T) => T[] | undefined;
|
|
1931
|
+
/** Allow selecting multiple options */
|
|
1932
|
+
multiple?: boolean;
|
|
1933
|
+
/**
|
|
1934
|
+
* When **true** (default) selecting a parent selects all its descendants.
|
|
1935
|
+
* When **false** every option is selected / deselected independently.
|
|
1936
|
+
* Only relevant when getOptionChildren is provided and multiple is true.
|
|
1937
|
+
*/
|
|
1938
|
+
allowChildNodesSelection?: boolean;
|
|
1939
|
+
/** Show a loading spinner in the dropdown */
|
|
1940
|
+
loading?: boolean;
|
|
1941
|
+
/** Content shown while loading */
|
|
1942
|
+
loadingText?: ReactNode;
|
|
1943
|
+
/**
|
|
1944
|
+
* Override the default label + sub-label filter.
|
|
1945
|
+
* Pass `(opts) => opts` to bypass when options are pre-filtered externally.
|
|
1946
|
+
*/
|
|
1947
|
+
filterOptions?: (options: T[], inputValue: string) => T[];
|
|
1948
|
+
/**
|
|
1949
|
+
* Custom option renderer. Receives the li props, option, and { selected } state.
|
|
1950
|
+
* When provided, overrides the default Select-style rendering.
|
|
1951
|
+
*/
|
|
1952
|
+
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement> & {
|
|
1953
|
+
key: React__default.Key;
|
|
1954
|
+
}, option: T, state: {
|
|
1955
|
+
selected: boolean;
|
|
1956
|
+
index: number;
|
|
1957
|
+
}) => ReactNode;
|
|
1958
|
+
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
1959
|
+
limitTags?: number;
|
|
1960
|
+
label?: string;
|
|
1961
|
+
placeholder?: string;
|
|
1962
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
1963
|
+
size?: 'small' | 'medium';
|
|
1964
|
+
disabled?: boolean;
|
|
1965
|
+
error?: boolean;
|
|
1966
|
+
helperText?: ReactNode;
|
|
1967
|
+
fullWidth?: boolean;
|
|
1968
|
+
required?: boolean;
|
|
1969
|
+
className?: string;
|
|
1970
|
+
style?: CSSProperties;
|
|
1971
|
+
sx?: SxProp;
|
|
1972
|
+
}
|
|
1973
|
+
declare function SmartSelect<T = any>({ options, value, onChange, onSearchChange, debounceMs, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
1974
|
+
|
|
1867
1975
|
type ToolbarButton = 'undo' | 'redo' | 'ai' | 'paragraph' | 'fontsize' | 'font' | 'color' | 'bold' | 'italic' | 'strike' | 'link' | 'lineheight' | 'ul' | 'ol' | 'align' | 'indent' | 'outdent' | 'table' | 'image' | 'video' | 'cut' | 'copy' | 'paste' | 'specialchars' | 'code' | 'fullscreen' | 'tts' | 'stt' | 'translate' | 'todo' | '|';
|
|
1868
1976
|
type EditorVariant = 'default' | 'basic';
|
|
1869
1977
|
interface RufousTextEditorProps {
|
|
@@ -1950,4 +2058,4 @@ interface MentionItemData {
|
|
|
1950
2058
|
shortName?: string;
|
|
1951
2059
|
}
|
|
1952
2060
|
|
|
1953
|
-
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, type UserOption, UserSelectionField, type UserSelectionFieldProps, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|
|
2061
|
+
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, SmartSelect, type SmartSelectProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, type UserOption, UserSelectionField, type UserSelectionFieldProps, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|
package/dist/main.d.ts
CHANGED
|
@@ -850,6 +850,12 @@ interface Column<T> {
|
|
|
850
850
|
row: T;
|
|
851
851
|
field: string;
|
|
852
852
|
}) => string;
|
|
853
|
+
/**
|
|
854
|
+
* Override the value written to CSV export for this column.
|
|
855
|
+
* Receives the raw field value and the full row item.
|
|
856
|
+
* Takes precedence over valueGetter / valueFormatter for export purposes.
|
|
857
|
+
*/
|
|
858
|
+
exportValue?: (value: any, item: T) => string;
|
|
853
859
|
width?: string | number;
|
|
854
860
|
minWidth?: string | number;
|
|
855
861
|
maxWidth?: string | number;
|
|
@@ -875,6 +881,12 @@ interface Column<T> {
|
|
|
875
881
|
disableColumnMenu?: boolean;
|
|
876
882
|
isExportable?: boolean;
|
|
877
883
|
}
|
|
884
|
+
interface FilterState {
|
|
885
|
+
column: string;
|
|
886
|
+
operator: string;
|
|
887
|
+
value: string;
|
|
888
|
+
logic: 'AND' | 'OR';
|
|
889
|
+
}
|
|
878
890
|
interface Action<T> {
|
|
879
891
|
label: string;
|
|
880
892
|
icon: React__default.ReactNode;
|
|
@@ -932,17 +944,41 @@ interface DataGridProps<T> {
|
|
|
932
944
|
headerActions?: DataGridToolbarSlot;
|
|
933
945
|
/** Extra content rendered in a second row below the header */
|
|
934
946
|
toolbarContent?: DataGridToolbarSlot;
|
|
947
|
+
/**
|
|
948
|
+
* Limit global search to these column field names.
|
|
949
|
+
* When omitted, all visible columns are searched.
|
|
950
|
+
*/
|
|
951
|
+
searchableColumns?: string[];
|
|
952
|
+
/**
|
|
953
|
+
* Called when the search query finds no local results.
|
|
954
|
+
* Use this to trigger a server-side search.
|
|
955
|
+
*/
|
|
956
|
+
onSearchChange?: (query: string) => void;
|
|
957
|
+
/** Called whenever the applied advanced filters change. */
|
|
958
|
+
onFiltersChange?: (filters: FilterState[]) => void;
|
|
959
|
+
/** Hide the "Export CSV" button in the header toolbar. */
|
|
960
|
+
hideTopExport?: boolean;
|
|
935
961
|
}
|
|
936
962
|
|
|
937
963
|
declare function DataGrid<T extends {
|
|
938
964
|
id: string | number;
|
|
939
|
-
}>({ columns: initialColumnsProp, data, actions, loading, pagination, paginationMode, rowCount, paginationModel, onPaginationModelChange, pageSize: initialPageSize, pageSizeOptions, title, className, sx, onRowDoubleClick, onCellDoubleClick, headerActions, toolbarContent, }: DataGridProps<T>): React__default.JSX.Element;
|
|
965
|
+
}>({ columns: initialColumnsProp, data, actions, loading, pagination, paginationMode, rowCount, paginationModel, onPaginationModelChange, pageSize: initialPageSize, pageSizeOptions, title, className, sx, onRowDoubleClick, onCellDoubleClick, headerActions, toolbarContent, searchableColumns, onSearchChange, onFiltersChange, hideTopExport, }: DataGridProps<T>): React__default.JSX.Element;
|
|
940
966
|
|
|
941
967
|
type SelectOption = {
|
|
942
968
|
value: string | number;
|
|
943
969
|
label: string;
|
|
944
970
|
disabled?: boolean;
|
|
945
971
|
group?: string;
|
|
972
|
+
/**
|
|
973
|
+
* Optional icon rendered to the left of the label in both the dropdown and the trigger.
|
|
974
|
+
* Pass a React component (e.g. a Lucide icon) **or** an image URL string.
|
|
975
|
+
* Max size is capped to 18 × 18 px via CSS.
|
|
976
|
+
*/
|
|
977
|
+
icon?: React__default.ComponentType<{
|
|
978
|
+
size?: number;
|
|
979
|
+
className?: string;
|
|
980
|
+
style?: React__default.CSSProperties;
|
|
981
|
+
}> | string;
|
|
946
982
|
};
|
|
947
983
|
interface SelectProps {
|
|
948
984
|
options: SelectOption[] | string[];
|
|
@@ -1864,6 +1900,78 @@ interface UserSelectionFieldProps {
|
|
|
1864
1900
|
}
|
|
1865
1901
|
declare function UserSelectionField({ value, onChange, options, loading, onSearchChange, label, multiple, limitTags, size, variant, disabled, error, helperText, fullWidth, required, filterOptions: filterOptionsProp, className, style, sx, }: UserSelectionFieldProps): React__default.JSX.Element;
|
|
1866
1902
|
|
|
1903
|
+
interface SmartSelectProps<T = any> {
|
|
1904
|
+
/** Options array — can be flat or hierarchical (via getOptionChildren) */
|
|
1905
|
+
options: T[];
|
|
1906
|
+
/** Controlled value. Single: T | null. Multiple: T[] */
|
|
1907
|
+
value?: T | T[] | null;
|
|
1908
|
+
/** Called when selection changes */
|
|
1909
|
+
onChange?: (value: T | T[] | null) => void;
|
|
1910
|
+
/**
|
|
1911
|
+
* Called when the typed text finds no local match —
|
|
1912
|
+
* use this to trigger an API / server search.
|
|
1913
|
+
*/
|
|
1914
|
+
onSearchChange?: (query: string) => void;
|
|
1915
|
+
/**
|
|
1916
|
+
* Debounce delay in ms before `onSearchChange` fires.
|
|
1917
|
+
* Defaults to 300 ms. Pass 0 to disable debouncing.
|
|
1918
|
+
*/
|
|
1919
|
+
debounceMs?: number;
|
|
1920
|
+
/** Primary display label for an option (required) */
|
|
1921
|
+
getOptionLabel: (option: T) => string;
|
|
1922
|
+
/** Unique key for an option — defaults to the label string */
|
|
1923
|
+
getOptionValue?: (option: T) => string | number;
|
|
1924
|
+
/** Optional secondary line shown below the label */
|
|
1925
|
+
getOptionSubLabel?: (option: T) => string | undefined;
|
|
1926
|
+
/**
|
|
1927
|
+
* Return child options to create a hierarchical list.
|
|
1928
|
+
* The tree is flattened with indentation for display.
|
|
1929
|
+
*/
|
|
1930
|
+
getOptionChildren?: (option: T) => T[] | undefined;
|
|
1931
|
+
/** Allow selecting multiple options */
|
|
1932
|
+
multiple?: boolean;
|
|
1933
|
+
/**
|
|
1934
|
+
* When **true** (default) selecting a parent selects all its descendants.
|
|
1935
|
+
* When **false** every option is selected / deselected independently.
|
|
1936
|
+
* Only relevant when getOptionChildren is provided and multiple is true.
|
|
1937
|
+
*/
|
|
1938
|
+
allowChildNodesSelection?: boolean;
|
|
1939
|
+
/** Show a loading spinner in the dropdown */
|
|
1940
|
+
loading?: boolean;
|
|
1941
|
+
/** Content shown while loading */
|
|
1942
|
+
loadingText?: ReactNode;
|
|
1943
|
+
/**
|
|
1944
|
+
* Override the default label + sub-label filter.
|
|
1945
|
+
* Pass `(opts) => opts` to bypass when options are pre-filtered externally.
|
|
1946
|
+
*/
|
|
1947
|
+
filterOptions?: (options: T[], inputValue: string) => T[];
|
|
1948
|
+
/**
|
|
1949
|
+
* Custom option renderer. Receives the li props, option, and { selected } state.
|
|
1950
|
+
* When provided, overrides the default Select-style rendering.
|
|
1951
|
+
*/
|
|
1952
|
+
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement> & {
|
|
1953
|
+
key: React__default.Key;
|
|
1954
|
+
}, option: T, state: {
|
|
1955
|
+
selected: boolean;
|
|
1956
|
+
index: number;
|
|
1957
|
+
}) => ReactNode;
|
|
1958
|
+
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
1959
|
+
limitTags?: number;
|
|
1960
|
+
label?: string;
|
|
1961
|
+
placeholder?: string;
|
|
1962
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
1963
|
+
size?: 'small' | 'medium';
|
|
1964
|
+
disabled?: boolean;
|
|
1965
|
+
error?: boolean;
|
|
1966
|
+
helperText?: ReactNode;
|
|
1967
|
+
fullWidth?: boolean;
|
|
1968
|
+
required?: boolean;
|
|
1969
|
+
className?: string;
|
|
1970
|
+
style?: CSSProperties;
|
|
1971
|
+
sx?: SxProp;
|
|
1972
|
+
}
|
|
1973
|
+
declare function SmartSelect<T = any>({ options, value, onChange, onSearchChange, debounceMs, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
1974
|
+
|
|
1867
1975
|
type ToolbarButton = 'undo' | 'redo' | 'ai' | 'paragraph' | 'fontsize' | 'font' | 'color' | 'bold' | 'italic' | 'strike' | 'link' | 'lineheight' | 'ul' | 'ol' | 'align' | 'indent' | 'outdent' | 'table' | 'image' | 'video' | 'cut' | 'copy' | 'paste' | 'specialchars' | 'code' | 'fullscreen' | 'tts' | 'stt' | 'translate' | 'todo' | '|';
|
|
1868
1976
|
type EditorVariant = 'default' | 'basic';
|
|
1869
1977
|
interface RufousTextEditorProps {
|
|
@@ -1950,4 +2058,4 @@ interface MentionItemData {
|
|
|
1950
2058
|
shortName?: string;
|
|
1951
2059
|
}
|
|
1952
2060
|
|
|
1953
|
-
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, type UserOption, UserSelectionField, type UserSelectionFieldProps, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|
|
2061
|
+
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, SmartSelect, type SmartSelectProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, type UserOption, UserSelectionField, type UserSelectionFieldProps, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|