react-core-ts 1.9.18 → 2.0.1

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.
Files changed (33) hide show
  1. package/dist/AutoCompleteWithTabFilter.d.ts +4 -0
  2. package/dist/AutoCompleteWithTabFilter.js +743 -0
  3. package/dist/AutoCompleteWithTabFilter.js.map +1 -0
  4. package/dist/AutoCompleteWithTreeStructure.js +3 -3
  5. package/dist/AutoCompleteWithTreeStructure.js.map +1 -1
  6. package/dist/ReactTextField.js +1 -1
  7. package/dist/ReactTextField.js.map +1 -1
  8. package/dist/commontypes.d.ts +13 -1
  9. package/dist/dropdownFilterTabs.d.ts +7 -0
  10. package/dist/dropdownFilterTabs.js +647 -0
  11. package/dist/dropdownFilterTabs.js.map +1 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +3 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/styles/components/selectedautocomplete.css +11 -0
  16. package/dist/styles/styles/components/autocomplete.css +717 -0
  17. package/dist/styles/styles/components/selectedautocomplete.css +179 -0
  18. package/dist/styles/styles/components/tooltip.css +497 -0
  19. package/dist/styles/styles/components/treedropdown.css +97 -0
  20. package/dist/styles/styles/global.css +8 -0
  21. package/dist/utilities/icons.d.ts +1 -0
  22. package/dist/utilities/icons.js +6 -1
  23. package/dist/utilities/icons.js.map +1 -1
  24. package/docs/App.tsx +109 -8
  25. package/package.json +1 -1
  26. package/src/AutoCompleteWithTabFilter.tsx +1244 -0
  27. package/src/AutoCompleteWithTreeStructure.tsx +4 -8
  28. package/src/ReactTextField.tsx +12 -4
  29. package/src/commontypes.ts +14 -1
  30. package/src/dropdownFilterTabs.tsx +1002 -0
  31. package/src/index.tsx +1 -0
  32. package/src/styles/components/selectedautocomplete.css +11 -0
  33. package/src/utilities/icons.tsx +10 -0
@@ -1,11 +1,4 @@
1
- import React, {
2
- forwardRef,
3
- useCallback,
4
- useEffect,
5
- useImperativeHandle,
6
- useRef,
7
- useState,
8
- } from 'react';
1
+ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
9
2
  import ReactDOM from 'react-dom';
10
3
 
11
4
  import { AutoSuggestionInputProps } from './commontypes';
@@ -73,6 +66,7 @@ const AutoCompleteWithTreeStructure = forwardRef<
73
66
  inputType = 'text',
74
67
  onFocusTreeDropdown,
75
68
  filterCondition,
69
+ singleSelectIcon,
76
70
  },
77
71
  ref
78
72
  ) => {
@@ -454,6 +448,7 @@ const AutoCompleteWithTreeStructure = forwardRef<
454
448
  updateNode={updateNode}
455
449
  desc={desc}
456
450
  descId={descId}
451
+ singleSelectIcon={singleSelectIcon}
457
452
  toggleExpand={toggleExpand}
458
453
  >
459
454
  {node.expanded &&
@@ -769,6 +764,7 @@ const AutoCompleteWithTreeStructure = forwardRef<
769
764
  hasDisableSelection={hasDisableSelection?.(suggestion)}
770
765
  updateNode={updateNode}
771
766
  desc={desc}
767
+ singleSelectIcon={singleSelectIcon}
772
768
  descId={descId}
773
769
  toggleExpand={toggleExpand}
774
770
  >
@@ -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<HTMLDivElement>(null);
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
- <div className={`${generateClassName("search")}`} ref={searchBtnRef}>
361
- <CustomIcons name="search" type="medium" onClick={() => onSearchClick?.(inputRef.current?.value || value || '')} />
362
- </div>
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) ||
@@ -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,19 @@ 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;
100
+ singleSelectIcon?: any;
88
101
  }
89
102
  export interface IconsProps {
90
103
  name: any;