@natoora-libs/core 0.2.8 → 0.2.9

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.
@@ -5,7 +5,7 @@ import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as Heade
5
5
  export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-CZe649rr.cjs';
6
6
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
7
7
  import { UseMutateAsyncFunction } from 'react-query';
8
- import { SxProps, Theme, MenuProps, Typography } from '@mui/material';
8
+ import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
9
9
  import { DateRangePickerShape } from 'react-dates';
10
10
 
11
11
  type ActiveFiltersIconButtonProps = {
@@ -847,89 +847,29 @@ type Option = {
847
847
  disabled?: boolean;
848
848
  };
849
849
  interface SmartSelectProps {
850
- /**
851
- * The current selected value of the select input. It can be a string, number, or null.
852
- * If null, it indicates that no value is selected.
853
- */
854
850
  value?: string | number | null;
855
- /**
856
- * The default option that is displayed when no value is selected.
857
- * This is an object with a value and a label. If null, no default option is shown.
858
- */
859
851
  defaultOption?: Option;
860
- /**
861
- * An array of available options to display in the select dropdown.
862
- * Each option is an object with `value` and `label` properties.
863
- */
864
852
  options?: Option[];
865
- /**
866
- * A function to refetch data if there are no options available in the dropdown.
867
- * It can be called when the dropdown is opened and the list of options is empty.
868
- */
869
853
  refetch?: () => void;
870
- /**
871
- * A boolean indicating whether the component is fetching data.
872
- * If true, the loading spinner will be shown in the dropdown.
873
- */
874
854
  isFetching?: boolean;
875
- /**
876
- * Callback function called when an option is selected from the dropdown.
877
- * The selected option is passed as an argument to this function.
878
- */
879
855
  onChange: (selectedOption: Option) => void;
880
- /**
881
- * A label for the select input. It will be displayed above the select dropdown.
882
- */
883
856
  inputLabel?: string;
884
- /**
885
- * Style variant to choose.
886
- */
887
- variant?: 'standard' | 'outlined' | 'filled';
888
- /**
889
- * Size to choose.
890
- */
891
- size?: 'medium' | 'small';
892
- /**
893
- * A boolean indicating validation error.
894
- * It allows use of error styling when validation is required.
895
- */
857
+ variant?: SelectProps['variant'];
858
+ size?: SelectProps['size'];
896
859
  error?: boolean;
897
- /**
898
- * Helper text that is displayed below the select input.
899
- * It can be used to provide additional information or instructions to the user.
900
- */
901
860
  helperText?: string;
902
- /**
903
- * A boolean indicating whether the select input is disabled.
904
- * If true, the input will be disabled, and users will not be able to interact with it.
905
- */
906
861
  disabled?: boolean;
907
- /**
908
- * A boolean indicating whether the select should include a blank option.
909
- */
910
862
  allowBlankOption?: boolean;
911
- /**
912
- * The `data-testid` attribute used for testing purposes.
913
- * It is helpful to uniquely identify the component in automated tests.
914
- */
915
863
  'data-testid'?: string;
916
- /**
917
- * A message to display when there are no options available in the dropdown.
918
- * It will be shown when `isFetching` is false and `options` is empty.
919
- * The default message is 'No options'.
920
- */
921
864
  emptyMessage?: string;
922
- /**
923
- * Manage the MenuProps
924
- */
925
865
  menuProps?: Partial<MenuProps>;
926
866
  }
927
867
  declare const SmartSelect: React.ForwardRefExoticComponent<SmartSelectProps & React.RefAttributes<unknown>>;
928
868
 
929
869
  type SmartMultipleSelectProps = {
930
870
  inputLabel?: string;
931
- variant?: 'standard' | 'filled' | 'outlined';
932
- size?: 'small' | 'medium';
871
+ variant?: SelectProps['variant'];
872
+ size?: SelectProps['size'];
933
873
  values?: Option[];
934
874
  defaultValues?: Option[];
935
875
  onOpen?: () => void;
@@ -940,6 +880,7 @@ type SmartMultipleSelectProps = {
940
880
  disabled?: boolean;
941
881
  emptyMessage?: string;
942
882
  helperText?: string;
883
+ menuProps?: Partial<MenuProps>;
943
884
  };
944
885
  declare const SmartMultipleSelect: FC<SmartMultipleSelectProps>;
945
886
 
@@ -5,7 +5,7 @@ import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as Heade
5
5
  export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-CZe649rr.js';
6
6
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
7
7
  import { UseMutateAsyncFunction } from 'react-query';
8
- import { SxProps, Theme, MenuProps, Typography } from '@mui/material';
8
+ import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
9
9
  import { DateRangePickerShape } from 'react-dates';
10
10
 
11
11
  type ActiveFiltersIconButtonProps = {
@@ -847,89 +847,29 @@ type Option = {
847
847
  disabled?: boolean;
848
848
  };
849
849
  interface SmartSelectProps {
850
- /**
851
- * The current selected value of the select input. It can be a string, number, or null.
852
- * If null, it indicates that no value is selected.
853
- */
854
850
  value?: string | number | null;
855
- /**
856
- * The default option that is displayed when no value is selected.
857
- * This is an object with a value and a label. If null, no default option is shown.
858
- */
859
851
  defaultOption?: Option;
860
- /**
861
- * An array of available options to display in the select dropdown.
862
- * Each option is an object with `value` and `label` properties.
863
- */
864
852
  options?: Option[];
865
- /**
866
- * A function to refetch data if there are no options available in the dropdown.
867
- * It can be called when the dropdown is opened and the list of options is empty.
868
- */
869
853
  refetch?: () => void;
870
- /**
871
- * A boolean indicating whether the component is fetching data.
872
- * If true, the loading spinner will be shown in the dropdown.
873
- */
874
854
  isFetching?: boolean;
875
- /**
876
- * Callback function called when an option is selected from the dropdown.
877
- * The selected option is passed as an argument to this function.
878
- */
879
855
  onChange: (selectedOption: Option) => void;
880
- /**
881
- * A label for the select input. It will be displayed above the select dropdown.
882
- */
883
856
  inputLabel?: string;
884
- /**
885
- * Style variant to choose.
886
- */
887
- variant?: 'standard' | 'outlined' | 'filled';
888
- /**
889
- * Size to choose.
890
- */
891
- size?: 'medium' | 'small';
892
- /**
893
- * A boolean indicating validation error.
894
- * It allows use of error styling when validation is required.
895
- */
857
+ variant?: SelectProps['variant'];
858
+ size?: SelectProps['size'];
896
859
  error?: boolean;
897
- /**
898
- * Helper text that is displayed below the select input.
899
- * It can be used to provide additional information or instructions to the user.
900
- */
901
860
  helperText?: string;
902
- /**
903
- * A boolean indicating whether the select input is disabled.
904
- * If true, the input will be disabled, and users will not be able to interact with it.
905
- */
906
861
  disabled?: boolean;
907
- /**
908
- * A boolean indicating whether the select should include a blank option.
909
- */
910
862
  allowBlankOption?: boolean;
911
- /**
912
- * The `data-testid` attribute used for testing purposes.
913
- * It is helpful to uniquely identify the component in automated tests.
914
- */
915
863
  'data-testid'?: string;
916
- /**
917
- * A message to display when there are no options available in the dropdown.
918
- * It will be shown when `isFetching` is false and `options` is empty.
919
- * The default message is 'No options'.
920
- */
921
864
  emptyMessage?: string;
922
- /**
923
- * Manage the MenuProps
924
- */
925
865
  menuProps?: Partial<MenuProps>;
926
866
  }
927
867
  declare const SmartSelect: React.ForwardRefExoticComponent<SmartSelectProps & React.RefAttributes<unknown>>;
928
868
 
929
869
  type SmartMultipleSelectProps = {
930
870
  inputLabel?: string;
931
- variant?: 'standard' | 'filled' | 'outlined';
932
- size?: 'small' | 'medium';
871
+ variant?: SelectProps['variant'];
872
+ size?: SelectProps['size'];
933
873
  values?: Option[];
934
874
  defaultValues?: Option[];
935
875
  onOpen?: () => void;
@@ -940,6 +880,7 @@ type SmartMultipleSelectProps = {
940
880
  disabled?: boolean;
941
881
  emptyMessage?: string;
942
882
  helperText?: string;
883
+ menuProps?: Partial<MenuProps>;
943
884
  };
944
885
  declare const SmartMultipleSelect: FC<SmartMultipleSelectProps>;
945
886