react-core-ts 1.9.18 → 2.0.0
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/AutoCompleteWithTabFilter.d.ts +4 -0
- package/dist/AutoCompleteWithTabFilter.js +743 -0
- package/dist/AutoCompleteWithTabFilter.js.map +1 -0
- package/dist/ReactTextField.js +1 -1
- package/dist/ReactTextField.js.map +1 -1
- package/dist/commontypes.d.ts +12 -1
- package/dist/dropdownFilterTabs.d.ts +7 -0
- package/dist/dropdownFilterTabs.js +647 -0
- package/dist/dropdownFilterTabs.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/components/selectedautocomplete.css +11 -0
- package/dist/utilities/icons.d.ts +1 -0
- package/dist/utilities/icons.js +6 -1
- package/dist/utilities/icons.js.map +1 -1
- package/docs/App.tsx +109 -8
- package/package.json +1 -1
- package/src/AutoCompleteWithTabFilter.tsx +1244 -0
- package/src/ReactTextField.tsx +12 -4
- package/src/commontypes.ts +13 -1
- package/src/dropdownFilterTabs.tsx +1002 -0
- package/src/index.tsx +1 -0
- package/src/styles/components/selectedautocomplete.css +11 -0
- package/src/utilities/icons.tsx +10 -0
package/src/ReactTextField.tsx
CHANGED
|
@@ -60,7 +60,7 @@ const TextField: React.FC<TextFieldProps> = ({
|
|
|
60
60
|
const intervalRef = useRef<any>(null);
|
|
61
61
|
const clickTimeoutRef = useRef<any>(null);
|
|
62
62
|
const [isHolding, setIsHolding] = useState<boolean>(false);
|
|
63
|
-
const searchBtnRef = useRef<
|
|
63
|
+
const searchBtnRef = useRef<HTMLButtonElement>(null);
|
|
64
64
|
const onLabelClick = () => {
|
|
65
65
|
if (!isDisabled) {
|
|
66
66
|
inputRef?.current?.focus();
|
|
@@ -357,9 +357,17 @@ const TextField: React.FC<TextFieldProps> = ({
|
|
|
357
357
|
)}
|
|
358
358
|
</div>
|
|
359
359
|
{enableSearch && (
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
360
|
+
<button
|
|
361
|
+
disabled={disabled ?? readOnly}
|
|
362
|
+
onClick={() => onSearchClick?.(inputRef.current?.value || value || '')}
|
|
363
|
+
className={`${generateClassName("search")}`}
|
|
364
|
+
data-testid="tools-drop-arrow"
|
|
365
|
+
type="button"
|
|
366
|
+
id="search-btn-textfield"
|
|
367
|
+
ref={searchBtnRef}
|
|
368
|
+
>
|
|
369
|
+
<CustomIcons name="search" type="medium" />
|
|
370
|
+
</button>
|
|
363
371
|
)}
|
|
364
372
|
{(adorement ||
|
|
365
373
|
(showInfo && infoTitle) ||
|
package/src/commontypes.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldErrors, UseFormRegister } from 'react-hook-form';
|
|
2
2
|
|
|
3
3
|
export type ValueProps = {
|
|
4
|
-
[key: string]: string;
|
|
4
|
+
[key: string]: string | number | any;
|
|
5
5
|
};
|
|
6
6
|
export type TabPops = {
|
|
7
7
|
id: number | string;
|
|
@@ -85,6 +85,18 @@ export interface AutoSuggestionInputProps {
|
|
|
85
85
|
matchFromStart?: boolean // match data's from the starting position
|
|
86
86
|
autoDropdown?: boolean; // enable all items list items
|
|
87
87
|
enableSelectAll?: boolean // enable select all option
|
|
88
|
+
|
|
89
|
+
tabName?: string;
|
|
90
|
+
tabDesc?: string;
|
|
91
|
+
tabDescId?: string;
|
|
92
|
+
tabSelectedItems?: any[];
|
|
93
|
+
getTabData?: (key?: string) => Promise<any>;
|
|
94
|
+
tabData?: any[];
|
|
95
|
+
enableToolsTab?: boolean;
|
|
96
|
+
toolTabs?: TabPops[];
|
|
97
|
+
toolTabClearSwitch?: boolean;
|
|
98
|
+
onToolTabChange?: (value?: ValueProps | ValueProps[]) => void;
|
|
99
|
+
autoRefreshMainDropdown?: boolean;
|
|
88
100
|
}
|
|
89
101
|
export interface IconsProps {
|
|
90
102
|
name: any;
|