@agilant/toga-blox 1.0.56 → 1.0.57
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SearchInputProps } from "./SearchInput.types";
|
|
2
|
-
declare const SearchInput: <T extends object>({ bgColor, textHighlight, inputType, dropdownIconProp, dropdownOptions, selectedDropdownOption, onDropdownOptionSelect, searchItems, setSearchItems, toggleStatus, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, onChange, selectedValue, selectedDate, onDateSelect, selectedStartDate, onStartDateSelect, selectedEndDate, onEndDateSelect, handleFilter, }: SearchInputProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const SearchInput: <T extends object>({ bgColor, textHighlight, inputType, dropdownIconProp, dropdownOptions, selectedDropdownOption, onDropdownOptionSelect, searchItems, setSearchItems, toggleStatus, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, onChange, selectedValue, selectedDate, onDateSelect, selectedStartDate, onStartDateSelect, selectedEndDate, onEndDateSelect, handleFilter, localStorageKey, }: SearchInputProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SearchInput;
|
|
@@ -9,7 +9,7 @@ const SearchInput = ({ bgColor = "bg-sky-500", textHighlight = "text-sky-500", i
|
|
|
9
9
|
name: "chevronDown",
|
|
10
10
|
weight: "bold",
|
|
11
11
|
iconClasses: "text-black",
|
|
12
|
-
}, dropdownOptions = [], selectedDropdownOption = "", onDropdownOptionSelect, searchItems = [], setSearchItems, toggleStatus = false, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, onChange, selectedValue, selectedDate, onDateSelect, selectedStartDate, onStartDateSelect, selectedEndDate, onEndDateSelect, handleFilter, }) => {
|
|
12
|
+
}, dropdownOptions = [], selectedDropdownOption = "", onDropdownOptionSelect, searchItems = [], setSearchItems, toggleStatus = false, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, onChange, selectedValue, selectedDate, onDateSelect, selectedStartDate, onStartDateSelect, selectedEndDate, onEndDateSelect, handleFilter, localStorageKey, }) => {
|
|
13
13
|
const containerRef = useRef(null);
|
|
14
14
|
const inputRef = useRef(null);
|
|
15
15
|
useEffect(() => {
|
|
@@ -18,7 +18,7 @@ const SearchInput = ({ bgColor = "bg-sky-500", textHighlight = "text-sky-500", i
|
|
|
18
18
|
return (_jsx("div", { ref: containerRef, className: "", children: (() => {
|
|
19
19
|
switch (inputType) {
|
|
20
20
|
case "text":
|
|
21
|
-
return (_jsx(SearchTextInput, { dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, searchItems: searchItems, setSearchItems: setSearchItems, handleFilter: handleFilter, column: undefined }));
|
|
21
|
+
return (_jsx(SearchTextInput, { dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, searchItems: searchItems, setSearchItems: setSearchItems, handleFilter: handleFilter, column: undefined, localStorageKey: "AYO" }));
|
|
22
22
|
case "number":
|
|
23
23
|
return (_jsx(SearchNumberInput, { dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, toggleStatus: toggleStatus, setToggleStatus: setToggleStatus, minValue: minValue, maxValue: maxValue, setMinValue: setMinValue, setMaxValue: setMaxValue, handleFilter: handleFilter }));
|
|
24
24
|
case "multiSelect":
|
|
@@ -7,7 +7,7 @@ export type SearchInputProps<T extends object> = {
|
|
|
7
7
|
handleFilter: () => void;
|
|
8
8
|
bgColor?: string;
|
|
9
9
|
textHighlight?: string;
|
|
10
|
-
inputType?:
|
|
10
|
+
inputType?: "text" | "number" | "date" | "boolean" | "multiSelect";
|
|
11
11
|
dropdownOptions?: string[] | OptionType[] | number[];
|
|
12
12
|
selectedDropdownOption?: string | OptionType | number;
|
|
13
13
|
onDropdownOptionSelect?: (option: string) => void;
|
|
@@ -29,6 +29,7 @@ export type SearchInputProps<T extends object> = {
|
|
|
29
29
|
onStartDateSelect?: (date: Date) => void;
|
|
30
30
|
selectedEndDate?: Date;
|
|
31
31
|
onEndDateSelect?: (date: Date) => void;
|
|
32
|
+
localStorageKey?: string;
|
|
32
33
|
};
|
|
33
34
|
export interface OptionType {
|
|
34
35
|
uuid: string;
|