@campxdev/react-blueprint 2.1.1 → 2.1.3
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/README.md +158 -99
- package/dist/README.md +158 -99
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/assets/images/svg/ResourceNotFound.d.ts +1 -0
- package/dist/cjs/types/src/assets/images/svg/index.d.ts +1 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +1 -0
- package/dist/cjs/types/src/components/Assets/export.d.ts +1 -0
- package/dist/cjs/types/src/components/Input/export.d.ts +1 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/assets/images/svg/ResourceNotFound.d.ts +1 -0
- package/dist/esm/types/src/assets/images/svg/index.d.ts +1 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +1 -0
- package/dist/esm/types/src/components/Assets/export.d.ts +1 -0
- package/dist/esm/types/src/components/Input/export.d.ts +1 -2
- package/dist/index.d.ts +18 -59
- package/package.json +1 -1
- package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +0 -47
- package/dist/cjs/types/src/components/Input/MultiSelect/components/MenuFooter.d.ts +0 -3
- package/dist/cjs/types/src/components/Input/MultiSelect/components/MultiFilter.d.ts +0 -19
- package/dist/cjs/types/src/components/Input/MultiSelect/components/MultiInput.d.ts +0 -19
- package/dist/cjs/types/src/components/Input/MultiSelect/components/OptionsLoader.d.ts +0 -3
- package/dist/cjs/types/src/components/Input/MultiSelect/multiSelectReducer.d.ts +0 -42
- package/dist/cjs/types/src/stories/Input/MultiSelect.stories.d.ts +0 -16
- package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +0 -47
- package/dist/esm/types/src/components/Input/MultiSelect/components/MenuFooter.d.ts +0 -3
- package/dist/esm/types/src/components/Input/MultiSelect/components/MultiFilter.d.ts +0 -19
- package/dist/esm/types/src/components/Input/MultiSelect/components/MultiInput.d.ts +0 -19
- package/dist/esm/types/src/components/Input/MultiSelect/components/OptionsLoader.d.ts +0 -3
- package/dist/esm/types/src/components/Input/MultiSelect/multiSelectReducer.d.ts +0 -42
- package/dist/esm/types/src/stories/Input/MultiSelect.stories.d.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ResourceNotFound: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,5 @@ export declare const Svgs: {
|
|
|
6
6
|
Unauthorized: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
ComingSoon: () => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Empty: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
ResourceNotFound: () => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ResourceNotFound: (message: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,6 @@ export * from './ErrorPages/InternalServerError';
|
|
|
3
3
|
export * from './ErrorPages/NoInternetConnection';
|
|
4
4
|
export * from './ErrorPages/NoItemFound';
|
|
5
5
|
export * from './ErrorPages/PageNotFound';
|
|
6
|
+
export * from './ErrorPages/ResourceNotFound';
|
|
6
7
|
export * from './ErrorPages/UnAuthorized';
|
|
7
8
|
export * from './Icons/Icons';
|
|
@@ -8,14 +8,13 @@ export * from './FormWrapper/FormWrapper';
|
|
|
8
8
|
export * from './IconButtons/IconButtons';
|
|
9
9
|
export * from './LabelWrapper/LabelWrapper';
|
|
10
10
|
export * from './MultiCheckBox/MultiCheckBox';
|
|
11
|
+
export * from './OtpInput/OtpInput';
|
|
11
12
|
export * from './PasswordField/PasswordField';
|
|
12
13
|
export * from './RadioGroup/RadioGroup';
|
|
13
14
|
export * from './SearchBar/SearchBar';
|
|
14
15
|
export * from './Select/Select';
|
|
15
16
|
export * from './SingleCheckBox/SingleCheckBox';
|
|
16
17
|
export * from './SingleSelect/SingleSelect';
|
|
17
|
-
export * from './MultiSelect/MultiSelect';
|
|
18
18
|
export * from './Switch/Switch';
|
|
19
19
|
export * from './TextField/TextField';
|
|
20
20
|
export * from './TimePicker/TimePicker';
|
|
21
|
-
export * from './OtpInput/OtpInput';
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ declare const Svgs: {
|
|
|
38
38
|
Unauthorized: () => react_jsx_runtime.JSX.Element;
|
|
39
39
|
ComingSoon: () => react_jsx_runtime.JSX.Element;
|
|
40
40
|
Empty: () => react_jsx_runtime.JSX.Element;
|
|
41
|
+
ResourceNotFound: () => react_jsx_runtime.JSX.Element;
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
interface NoItemFoundProps$1 {
|
|
@@ -58,6 +59,8 @@ declare const NoItemFound: ({ title, description, }: NoItemFoundProps) => react_
|
|
|
58
59
|
|
|
59
60
|
declare const PageNotFound: () => react_jsx_runtime.JSX.Element;
|
|
60
61
|
|
|
62
|
+
declare const ResourceNotFound: (message: any) => react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
61
64
|
declare const UnAuthorized: ({ component }: {
|
|
62
65
|
component?: ReactNode;
|
|
63
66
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -774,6 +777,19 @@ type MultiCheckboxProps = {
|
|
|
774
777
|
};
|
|
775
778
|
declare const MultiCheckBox: ({ name, options, required, containerProps, label, direction, values, onChange, ...rest }: MultiCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
776
779
|
|
|
780
|
+
interface OtpInputProps {
|
|
781
|
+
length: number;
|
|
782
|
+
onChangeOtp: (otp: string) => void;
|
|
783
|
+
containerSx?: SxProps;
|
|
784
|
+
inputSx?: SxProps;
|
|
785
|
+
label?: string;
|
|
786
|
+
name?: string;
|
|
787
|
+
required?: boolean;
|
|
788
|
+
error?: boolean;
|
|
789
|
+
helperText?: string;
|
|
790
|
+
}
|
|
791
|
+
declare const OtpInput: ({ length, onChangeOtp, containerSx, inputSx, label, name, required, error, helperText, }: OtpInputProps) => react_jsx_runtime.JSX.Element;
|
|
792
|
+
|
|
777
793
|
type PasswordFieldProps = {
|
|
778
794
|
containerProps?: StackProps;
|
|
779
795
|
description?: string;
|
|
@@ -869,50 +885,6 @@ type SingleSelectProps = {
|
|
|
869
885
|
} | any, false, true, false>, 'options' | 'open' | 'onChange' | 'autoFocus' | 'PaperComponent' | 'renderOption' | 'options' | 'renderInput'>;
|
|
870
886
|
declare const SingleSelect: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, getValue, value, onChange, dbValueProps, dbLabelProps, onOpen, onClose, type, ...restProps }: SingleSelectProps) => react_jsx_runtime.JSX.Element;
|
|
871
887
|
|
|
872
|
-
declare module '@mui/material/Autocomplete' {
|
|
873
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
874
|
-
loadingOptions: boolean;
|
|
875
|
-
isSearch: boolean;
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
type MultiSelectProps = {
|
|
879
|
-
options?: {
|
|
880
|
-
label: string;
|
|
881
|
-
subLabel?: string;
|
|
882
|
-
value: any;
|
|
883
|
-
icon?: ReactNode;
|
|
884
|
-
}[] | any[];
|
|
885
|
-
optionsApiEndPoint?: string;
|
|
886
|
-
optionsApiEndpointParams?: any;
|
|
887
|
-
externalAxios?: AxiosInstance;
|
|
888
|
-
required?: boolean;
|
|
889
|
-
label?: string;
|
|
890
|
-
name?: string;
|
|
891
|
-
getValue?: (option: any) => any;
|
|
892
|
-
dbValueProps?: {
|
|
893
|
-
valueKey: string;
|
|
894
|
-
isObjectId?: boolean;
|
|
895
|
-
isInt?: boolean;
|
|
896
|
-
isFloat?: boolean;
|
|
897
|
-
};
|
|
898
|
-
dbLabelProps?: {
|
|
899
|
-
labelKey: string;
|
|
900
|
-
subLabelKey?: string;
|
|
901
|
-
useLabelStartCase?: boolean;
|
|
902
|
-
useSubLabelStartCase?: boolean;
|
|
903
|
-
};
|
|
904
|
-
onChange?: (value: any) => void;
|
|
905
|
-
error?: any;
|
|
906
|
-
helperText?: string;
|
|
907
|
-
type?: 'input' | 'filter';
|
|
908
|
-
disableClear?: boolean;
|
|
909
|
-
} & Omit<AutocompleteProps<{
|
|
910
|
-
label: string;
|
|
911
|
-
subLabel?: string;
|
|
912
|
-
value: any;
|
|
913
|
-
} | any, false, true, false>, 'options' | 'open' | 'onChange' | 'autoFocus' | 'PaperComponent' | 'renderOption' | 'options' | 'renderInput'>;
|
|
914
|
-
declare const MultiSelect: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, getValue, value, onChange, dbValueProps, dbLabelProps, onOpen, onClose, type, ...restProps }: MultiSelectProps) => react_jsx_runtime.JSX.Element;
|
|
915
|
-
|
|
916
888
|
type SwitchProps = {} & SwitchProps$1;
|
|
917
889
|
declare const Switch: (props: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
918
890
|
|
|
@@ -932,19 +904,6 @@ type TimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStr
|
|
|
932
904
|
} & TimePickerProps$1<TEnableAccessibleFieldDOMStructure>;
|
|
933
905
|
declare const TimePicker: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>({ label, name, value, format, views, helperText, placeholder, required, containerProps, ...rest }: TimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>) => react_jsx_runtime.JSX.Element;
|
|
934
906
|
|
|
935
|
-
interface OtpInputProps {
|
|
936
|
-
length: number;
|
|
937
|
-
onChangeOtp: (otp: string) => void;
|
|
938
|
-
containerSx?: SxProps;
|
|
939
|
-
inputSx?: SxProps;
|
|
940
|
-
label?: string;
|
|
941
|
-
name?: string;
|
|
942
|
-
required?: boolean;
|
|
943
|
-
error?: boolean;
|
|
944
|
-
helperText?: string;
|
|
945
|
-
}
|
|
946
|
-
declare const OtpInput: ({ length, onChangeOtp, containerSx, inputSx, label, name, required, error, helperText, }: OtpInputProps) => react_jsx_runtime.JSX.Element;
|
|
947
|
-
|
|
948
907
|
type AppHeaderProps = {
|
|
949
908
|
actions?: ReactNode[];
|
|
950
909
|
profileActions?: ReactNode[];
|
|
@@ -1244,5 +1203,5 @@ declare const splitBreadcrumbIdSlug: (param: string) => {
|
|
|
1244
1203
|
declare const isLocal: boolean;
|
|
1245
1204
|
declare const isDevelopment: boolean;
|
|
1246
1205
|
|
|
1247
|
-
export { Accordion, AccordionGroup, ActivityLogView, Alert, AnimatedGIFs, AppHeader, BarChart, Breadcrumbs, Button, Card, CellContainer, CenterBox, Chips, CircularAvatar, ComingSoon, ConfirmDialog, DataTable, DatePicker, DateTimePicker, DensitySelector, Dialog, DialogButton, DropDownButton, DropDownIcon, DropdownMenu, DropdownMenuItem, EditableDataTable, EditableTableCore, EmptyIllustration, FileUpload, FloatingContent, FooterContainerContainer, FormActions, FormControlWrapper, FormWrapper, IconButtons, Icons, InternalServerError, LabelWrapper, LineChart, MuiThemeProvider, MultiCheckBox,
|
|
1248
|
-
export type { AccordionProps, Activity, ActivityAction, AlertProps, AppHeaderProps, BarChartProps, BreadcrumbsProps, ButtonConfig, ButtonProps, CardProps, CheckboxProps, CircularAvatarProps, ConfirmDialogProps, ConfirmDialogType, DataTableProps, DensitySelectorProps, DialogButtonProps, DialogProps, DropdownMenuItemProps, DropdownMenuProps, EditableDataTableProps, FileUploadProps, FloatingContainerProps, FormActionsProps, IconComponent, IconProps, IconsType, LineChartProps, MultiCheckboxProps,
|
|
1206
|
+
export { Accordion, AccordionGroup, ActivityLogView, Alert, AnimatedGIFs, AppHeader, BarChart, Breadcrumbs, Button, Card, CellContainer, CenterBox, Chips, CircularAvatar, ComingSoon, ConfirmDialog, DataTable, DatePicker, DateTimePicker, DensitySelector, Dialog, DialogButton, DropDownButton, DropDownIcon, DropdownMenu, DropdownMenuItem, EditableDataTable, EditableTableCore, EmptyIllustration, FileUpload, FloatingContent, FooterContainerContainer, FormActions, FormControlWrapper, FormWrapper, IconButtons, Icons, InternalServerError, LabelWrapper, LineChart, MuiThemeProvider, MultiCheckBox, NoInterneConnection, NoItemFound, OtpInput, PageContent, PageHeader, PageNotFound, PasswordField, PieChart, PreviewFiles, ProgressCard, RadioGroup, ResourceNotFound, SearchBar, Select, SidePanel, SidePanelVariables, Sidebar, SingleCheckBox, SingleSelect, Snackbar, Spinner, SquareAvatar, StatusCard, Stepper, StyledContainer, Svgs, Switch, TableColumnsSelector, TableColumnsSelectorMenuFooter, TabsContainer, TabsLayout, TextField, TimePicker, Timeline, ToolTipContent, Tooltip, Tutorial, Typography, UnAuthorized, UploadDialog, createBreadcrumbIdSlug, darkTheme, getBreadcrumbsCharacter, isDevelopment, isLocal, lightTheme, reactBlueprintReducers, splitBreadcrumbIdSlug, usePageHeader, useParams, useUrlParams };
|
|
1207
|
+
export type { AccordionProps, Activity, ActivityAction, AlertProps, AppHeaderProps, BarChartProps, BreadcrumbsProps, ButtonConfig, ButtonProps, CardProps, CheckboxProps, CircularAvatarProps, ConfirmDialogProps, ConfirmDialogType, DataTableProps, DensitySelectorProps, DialogButtonProps, DialogProps, DropdownMenuItemProps, DropdownMenuProps, EditableDataTableProps, FileUploadProps, FloatingContainerProps, FormActionsProps, IconComponent, IconProps, IconsType, LineChartProps, MultiCheckboxProps, OtpInputProps, PageContentProps, PasswordFieldProps, PieChartProps, PreviewFilesProps, ProgressCardProps, RadioGroupProps, SearchBarProps, SelectProps, Severity, SideMenuItemProps, SidePanelProps, SingleSelectProps, SnackbarProps, SquareAvatarProps, StatusCardProps, SubMenuItemProps, SwitchProps, TableColumnsSelectorProps, TabsContainerProps, TextFieldProps, TimelineItems, TimelineProps, TooltipContentProps, TooltipProps, TypographyProps, UploadDialogProps };
|
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { AutocompleteProps } from '@mui/material';
|
|
2
|
-
import { AxiosInstance } from 'axios';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
declare module '@mui/material/Autocomplete' {
|
|
5
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
6
|
-
loadingOptions: boolean;
|
|
7
|
-
isSearch: boolean;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export type MultiSelectProps = {
|
|
11
|
-
options?: {
|
|
12
|
-
label: string;
|
|
13
|
-
subLabel?: string;
|
|
14
|
-
value: any;
|
|
15
|
-
icon?: ReactNode;
|
|
16
|
-
}[] | any[];
|
|
17
|
-
optionsApiEndPoint?: string;
|
|
18
|
-
optionsApiEndpointParams?: any;
|
|
19
|
-
externalAxios?: AxiosInstance;
|
|
20
|
-
required?: boolean;
|
|
21
|
-
label?: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
getValue?: (option: any) => any;
|
|
24
|
-
dbValueProps?: {
|
|
25
|
-
valueKey: string;
|
|
26
|
-
isObjectId?: boolean;
|
|
27
|
-
isInt?: boolean;
|
|
28
|
-
isFloat?: boolean;
|
|
29
|
-
};
|
|
30
|
-
dbLabelProps?: {
|
|
31
|
-
labelKey: string;
|
|
32
|
-
subLabelKey?: string;
|
|
33
|
-
useLabelStartCase?: boolean;
|
|
34
|
-
useSubLabelStartCase?: boolean;
|
|
35
|
-
};
|
|
36
|
-
onChange?: (value: any) => void;
|
|
37
|
-
error?: any;
|
|
38
|
-
helperText?: string;
|
|
39
|
-
type?: 'input' | 'filter';
|
|
40
|
-
disableClear?: boolean;
|
|
41
|
-
} & Omit<AutocompleteProps<{
|
|
42
|
-
label: string;
|
|
43
|
-
subLabel?: string;
|
|
44
|
-
value: any;
|
|
45
|
-
} | any, false, true, false>, 'options' | 'open' | 'onChange' | 'autoFocus' | 'PaperComponent' | 'renderOption' | 'options' | 'renderInput'>;
|
|
46
|
-
export declare const MultiSelect: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, getValue, value, onChange, dbValueProps, dbLabelProps, onOpen, onClose, type, ...restProps }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
-
export default MultiSelect;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AutocompleteCloseReason } from '@mui/material';
|
|
2
|
-
import { SyntheticEvent } from 'react';
|
|
3
|
-
import { MultiSelectProps } from '../../../export';
|
|
4
|
-
import { MultiSelectState } from '../multiSelectReducer';
|
|
5
|
-
declare module '@mui/material/Autocomplete' {
|
|
6
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
7
|
-
loadingOptions: boolean;
|
|
8
|
-
isSearch: boolean;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export type MultiFilterProps = {
|
|
12
|
-
onChange: (value: any) => void;
|
|
13
|
-
searchDb: (searchValue: string) => Promise<void>;
|
|
14
|
-
handleOpen: (event: SyntheticEvent) => Promise<void>;
|
|
15
|
-
handleClose: (event: SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
16
|
-
handleScroll: (event: any) => Promise<void>;
|
|
17
|
-
state: MultiSelectState;
|
|
18
|
-
} & MultiSelectProps;
|
|
19
|
-
export declare const MultiFilter: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, required, label, name, getValue, value, onChange, error, helperText, dbValueProps, dbLabelProps, onOpen, onClose, searchDb, handleOpen, handleClose, handleScroll, state, disableClear, ...restProps }: MultiFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AutocompleteCloseReason } from '@mui/material';
|
|
2
|
-
import { SyntheticEvent } from 'react';
|
|
3
|
-
import { MultiSelectProps } from '../../../export';
|
|
4
|
-
import { MultiSelectState } from '../multiSelectReducer';
|
|
5
|
-
declare module '@mui/material/Autocomplete' {
|
|
6
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
7
|
-
loadingOptions: boolean;
|
|
8
|
-
isSearch: boolean;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export type MultiInputProps = {
|
|
12
|
-
onChange: (value: any) => void;
|
|
13
|
-
searchDb: (searchValue: string) => Promise<void>;
|
|
14
|
-
handleOpen: (event: SyntheticEvent) => Promise<void>;
|
|
15
|
-
handleClose: (event: SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
16
|
-
handleScroll: (event: any) => Promise<void>;
|
|
17
|
-
state: MultiSelectState;
|
|
18
|
-
} & MultiSelectProps;
|
|
19
|
-
export declare const MultiInput: ({ required, optionsApiEndPoint, label, name, getValue, value, onChange, error, helperText, dbLabelProps, searchDb, handleOpen, handleClose, handleScroll, state, disableClear, ...restProps }: MultiInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Reducer } from 'react';
|
|
2
|
-
export declare enum MultiSelectActionsTypes {
|
|
3
|
-
OPEN = "open",
|
|
4
|
-
CLOSE = "close",
|
|
5
|
-
LOAD_INTERNAL_OPTIONS_START = "load_internal_options_start",
|
|
6
|
-
LOAD_INTERNAL_OPTIONS_END = "load_internal_options_end",
|
|
7
|
-
LOAD_SELECTED_OPTIONS_START = "load_selected_options_start",
|
|
8
|
-
LOAD_SELECTED_OPTIONS_END = "load_selected_options_end",
|
|
9
|
-
SET_NETWORK_ERROR = "set_network_error",
|
|
10
|
-
SET_INTERNAL_OPTIONS = "set_internal_options",
|
|
11
|
-
APPEND_INTERNAL_OPTIONS = "append_internal_options",
|
|
12
|
-
CHANGE_HAS_MORE_FLAG = "change_has_more_flag",
|
|
13
|
-
SET_SEARCH = "set_search",
|
|
14
|
-
CLEAR_SEARCH = "clear_search"
|
|
15
|
-
}
|
|
16
|
-
export type Option = {
|
|
17
|
-
label: string;
|
|
18
|
-
subLabel?: string;
|
|
19
|
-
value: any;
|
|
20
|
-
};
|
|
21
|
-
export type MultiSelectState = {
|
|
22
|
-
open: boolean;
|
|
23
|
-
loadingInternalOptions: boolean;
|
|
24
|
-
loadingInitialInternalOptions: boolean;
|
|
25
|
-
internalOptions: Option[];
|
|
26
|
-
internalOptionsMap: {
|
|
27
|
-
[x: string]: Option;
|
|
28
|
-
};
|
|
29
|
-
limit: number;
|
|
30
|
-
offset: number;
|
|
31
|
-
hasMore: boolean;
|
|
32
|
-
search: string | null;
|
|
33
|
-
error?: any;
|
|
34
|
-
};
|
|
35
|
-
export type MultiSelectAction = {
|
|
36
|
-
actionType: MultiSelectActionsTypes;
|
|
37
|
-
stateChanges?: Partial<MultiSelectState> & {
|
|
38
|
-
persistOffset?: boolean;
|
|
39
|
-
newOptions?: Option[];
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export declare const multiSelectReducer: Reducer<MultiSelectState, MultiSelectAction>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react';
|
|
2
|
-
import { MultiSelect, MultiSelectProps } from '../../components/Input/MultiSelect/MultiSelect';
|
|
3
|
-
declare const _default: Meta<typeof MultiSelect>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Default: {
|
|
6
|
-
render: (args: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
args: {
|
|
8
|
-
label: string;
|
|
9
|
-
required: boolean;
|
|
10
|
-
options: {
|
|
11
|
-
label: string;
|
|
12
|
-
value: number;
|
|
13
|
-
}[];
|
|
14
|
-
onChange: () => void;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { AutocompleteProps } from '@mui/material';
|
|
2
|
-
import { AxiosInstance } from 'axios';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
declare module '@mui/material/Autocomplete' {
|
|
5
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
6
|
-
loadingOptions: boolean;
|
|
7
|
-
isSearch: boolean;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export type MultiSelectProps = {
|
|
11
|
-
options?: {
|
|
12
|
-
label: string;
|
|
13
|
-
subLabel?: string;
|
|
14
|
-
value: any;
|
|
15
|
-
icon?: ReactNode;
|
|
16
|
-
}[] | any[];
|
|
17
|
-
optionsApiEndPoint?: string;
|
|
18
|
-
optionsApiEndpointParams?: any;
|
|
19
|
-
externalAxios?: AxiosInstance;
|
|
20
|
-
required?: boolean;
|
|
21
|
-
label?: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
getValue?: (option: any) => any;
|
|
24
|
-
dbValueProps?: {
|
|
25
|
-
valueKey: string;
|
|
26
|
-
isObjectId?: boolean;
|
|
27
|
-
isInt?: boolean;
|
|
28
|
-
isFloat?: boolean;
|
|
29
|
-
};
|
|
30
|
-
dbLabelProps?: {
|
|
31
|
-
labelKey: string;
|
|
32
|
-
subLabelKey?: string;
|
|
33
|
-
useLabelStartCase?: boolean;
|
|
34
|
-
useSubLabelStartCase?: boolean;
|
|
35
|
-
};
|
|
36
|
-
onChange?: (value: any) => void;
|
|
37
|
-
error?: any;
|
|
38
|
-
helperText?: string;
|
|
39
|
-
type?: 'input' | 'filter';
|
|
40
|
-
disableClear?: boolean;
|
|
41
|
-
} & Omit<AutocompleteProps<{
|
|
42
|
-
label: string;
|
|
43
|
-
subLabel?: string;
|
|
44
|
-
value: any;
|
|
45
|
-
} | any, false, true, false>, 'options' | 'open' | 'onChange' | 'autoFocus' | 'PaperComponent' | 'renderOption' | 'options' | 'renderInput'>;
|
|
46
|
-
export declare const MultiSelect: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, getValue, value, onChange, dbValueProps, dbLabelProps, onOpen, onClose, type, ...restProps }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
-
export default MultiSelect;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AutocompleteCloseReason } from '@mui/material';
|
|
2
|
-
import { SyntheticEvent } from 'react';
|
|
3
|
-
import { MultiSelectProps } from '../../../export';
|
|
4
|
-
import { MultiSelectState } from '../multiSelectReducer';
|
|
5
|
-
declare module '@mui/material/Autocomplete' {
|
|
6
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
7
|
-
loadingOptions: boolean;
|
|
8
|
-
isSearch: boolean;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export type MultiFilterProps = {
|
|
12
|
-
onChange: (value: any) => void;
|
|
13
|
-
searchDb: (searchValue: string) => Promise<void>;
|
|
14
|
-
handleOpen: (event: SyntheticEvent) => Promise<void>;
|
|
15
|
-
handleClose: (event: SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
16
|
-
handleScroll: (event: any) => Promise<void>;
|
|
17
|
-
state: MultiSelectState;
|
|
18
|
-
} & MultiSelectProps;
|
|
19
|
-
export declare const MultiFilter: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, required, label, name, getValue, value, onChange, error, helperText, dbValueProps, dbLabelProps, onOpen, onClose, searchDb, handleOpen, handleClose, handleScroll, state, disableClear, ...restProps }: MultiFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AutocompleteCloseReason } from '@mui/material';
|
|
2
|
-
import { SyntheticEvent } from 'react';
|
|
3
|
-
import { MultiSelectProps } from '../../../export';
|
|
4
|
-
import { MultiSelectState } from '../multiSelectReducer';
|
|
5
|
-
declare module '@mui/material/Autocomplete' {
|
|
6
|
-
interface AutocompletePaperSlotPropsOverrides {
|
|
7
|
-
loadingOptions: boolean;
|
|
8
|
-
isSearch: boolean;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export type MultiInputProps = {
|
|
12
|
-
onChange: (value: any) => void;
|
|
13
|
-
searchDb: (searchValue: string) => Promise<void>;
|
|
14
|
-
handleOpen: (event: SyntheticEvent) => Promise<void>;
|
|
15
|
-
handleClose: (event: SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
16
|
-
handleScroll: (event: any) => Promise<void>;
|
|
17
|
-
state: MultiSelectState;
|
|
18
|
-
} & MultiSelectProps;
|
|
19
|
-
export declare const MultiInput: ({ required, optionsApiEndPoint, label, name, getValue, value, onChange, error, helperText, dbLabelProps, searchDb, handleOpen, handleClose, handleScroll, state, disableClear, ...restProps }: MultiInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Reducer } from 'react';
|
|
2
|
-
export declare enum MultiSelectActionsTypes {
|
|
3
|
-
OPEN = "open",
|
|
4
|
-
CLOSE = "close",
|
|
5
|
-
LOAD_INTERNAL_OPTIONS_START = "load_internal_options_start",
|
|
6
|
-
LOAD_INTERNAL_OPTIONS_END = "load_internal_options_end",
|
|
7
|
-
LOAD_SELECTED_OPTIONS_START = "load_selected_options_start",
|
|
8
|
-
LOAD_SELECTED_OPTIONS_END = "load_selected_options_end",
|
|
9
|
-
SET_NETWORK_ERROR = "set_network_error",
|
|
10
|
-
SET_INTERNAL_OPTIONS = "set_internal_options",
|
|
11
|
-
APPEND_INTERNAL_OPTIONS = "append_internal_options",
|
|
12
|
-
CHANGE_HAS_MORE_FLAG = "change_has_more_flag",
|
|
13
|
-
SET_SEARCH = "set_search",
|
|
14
|
-
CLEAR_SEARCH = "clear_search"
|
|
15
|
-
}
|
|
16
|
-
export type Option = {
|
|
17
|
-
label: string;
|
|
18
|
-
subLabel?: string;
|
|
19
|
-
value: any;
|
|
20
|
-
};
|
|
21
|
-
export type MultiSelectState = {
|
|
22
|
-
open: boolean;
|
|
23
|
-
loadingInternalOptions: boolean;
|
|
24
|
-
loadingInitialInternalOptions: boolean;
|
|
25
|
-
internalOptions: Option[];
|
|
26
|
-
internalOptionsMap: {
|
|
27
|
-
[x: string]: Option;
|
|
28
|
-
};
|
|
29
|
-
limit: number;
|
|
30
|
-
offset: number;
|
|
31
|
-
hasMore: boolean;
|
|
32
|
-
search: string | null;
|
|
33
|
-
error?: any;
|
|
34
|
-
};
|
|
35
|
-
export type MultiSelectAction = {
|
|
36
|
-
actionType: MultiSelectActionsTypes;
|
|
37
|
-
stateChanges?: Partial<MultiSelectState> & {
|
|
38
|
-
persistOffset?: boolean;
|
|
39
|
-
newOptions?: Option[];
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export declare const multiSelectReducer: Reducer<MultiSelectState, MultiSelectAction>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react';
|
|
2
|
-
import { MultiSelect, MultiSelectProps } from '../../components/Input/MultiSelect/MultiSelect';
|
|
3
|
-
declare const _default: Meta<typeof MultiSelect>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Default: {
|
|
6
|
-
render: (args: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
args: {
|
|
8
|
-
label: string;
|
|
9
|
-
required: boolean;
|
|
10
|
-
options: {
|
|
11
|
-
label: string;
|
|
12
|
-
value: number;
|
|
13
|
-
}[];
|
|
14
|
-
onChange: () => void;
|
|
15
|
-
};
|
|
16
|
-
};
|