hplx-react-elements-dev 1.0.80 → 1.0.81

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/esm/index.js CHANGED
@@ -17701,28 +17701,32 @@ var InputTag = function InputTag(_a) {
17701
17701
  _g = _a.onDropdownClick,
17702
17702
  onDropdownClick = _g === void 0 ? function (_) {} : _g,
17703
17703
  _h = _a.allowDuplicates,
17704
- allowDuplicates = _h === void 0 ? false : _h;
17705
-
17706
- var _j = inputProps || {},
17707
- disabled = _j.disabled,
17708
- onFocus = _j.onFocus,
17709
- onBlur = _j.onBlur;
17704
+ allowDuplicates = _h === void 0 ? false : _h,
17705
+ _j = _a.getInputValue,
17706
+ getInputValue = _j === void 0 ? function (input) {
17707
+ return input;
17708
+ } : _j;
17710
17709
 
17711
- var _k = useState(false),
17712
- active = _k[0],
17713
- setActive = _k[1];
17710
+ var _k = inputProps || {},
17711
+ disabled = _k.disabled,
17712
+ onFocus = _k.onFocus,
17713
+ onBlur = _k.onBlur;
17714
17714
 
17715
17715
  var _l = useState(false),
17716
- showDropdown = _l[0],
17717
- setShowDropdown = _l[1];
17716
+ active = _l[0],
17717
+ setActive = _l[1];
17718
17718
 
17719
- var _m = useState(""),
17720
- dropdownOffset = _m[0],
17721
- setdropdownOffset = _m[1];
17719
+ var _m = useState(false),
17720
+ showDropdown = _m[0],
17721
+ setShowDropdown = _m[1];
17722
17722
 
17723
17723
  var _o = useState(""),
17724
- value = _o[0],
17725
- setValue = _o[1]; // tag string
17724
+ dropdownOffset = _o[0],
17725
+ setdropdownOffset = _o[1];
17726
+
17727
+ var _p = useState(""),
17728
+ value = _p[0],
17729
+ setValue = _p[1]; // tag string
17726
17730
 
17727
17731
 
17728
17732
  var wrapperRef = useRef(null);
@@ -17731,47 +17735,47 @@ var InputTag = function InputTag(_a) {
17731
17735
  var editRef = useRef(null);
17732
17736
  var spanRef = useRef(null);
17733
17737
 
17734
- var _p = useState([]),
17735
- dropdownArr = _p[0],
17736
- setDropdownArr = _p[1];
17738
+ var _q = useState([]),
17739
+ dropdownArr = _q[0],
17740
+ setDropdownArr = _q[1];
17737
17741
 
17738
- var _q = useState(""),
17739
- tagInputValue = _q[0],
17740
- setTagInputValue = _q[1]; // input field state
17742
+ var _r = useState(""),
17743
+ tagInputValue = _r[0],
17744
+ setTagInputValue = _r[1]; // input field state
17741
17745
 
17742
17746
 
17743
- var _r = useState(__spreadArray(__spreadArray([], tagList.filter(Boolean), true), tagString.split(",").filter(Boolean).map(function (item) {
17747
+ var _s = useState(__spreadArray(__spreadArray([], tagList.filter(Boolean), true), tagString.split(",").filter(Boolean).map(function (item) {
17744
17748
  return item.trim();
17745
17749
  }), true)),
17746
- tags = _r[0],
17747
- setTags = _r[1]; // tag array
17750
+ tags = _s[0],
17751
+ setTags = _s[1]; // tag array
17748
17752
 
17749
17753
 
17750
- var _s = useState(-1),
17751
- focusIndex = _s[0],
17752
- setFocusIndex = _s[1];
17754
+ var _t = useState(-1),
17755
+ focusIndex = _t[0],
17756
+ setFocusIndex = _t[1];
17753
17757
 
17754
- var _t = useState(true),
17755
- changeLeft = _t[0],
17756
- setChangeLeft = _t[1];
17758
+ var _u = useState(true),
17759
+ changeLeft = _u[0],
17760
+ setChangeLeft = _u[1];
17757
17761
 
17758
- var _u = useState(-1),
17759
- editIndex = _u[0],
17760
- setEditIndex = _u[1];
17762
+ var _v = useState(-1),
17763
+ editIndex = _v[0],
17764
+ setEditIndex = _v[1];
17761
17765
 
17762
- var _v = useState(""),
17763
- editInputValue = _v[0],
17764
- setEditInputValue = _v[1];
17766
+ var _w = useState(""),
17767
+ editInputValue = _w[0],
17768
+ setEditInputValue = _w[1];
17765
17769
 
17766
17770
  var dropdownClickedRef = useRef(false);
17767
17771
 
17768
- var _w = useState(""),
17769
- content = _w[0],
17770
- setContent = _w[1];
17772
+ var _x = useState(""),
17773
+ content = _x[0],
17774
+ setContent = _x[1];
17771
17775
 
17772
- var _x = useState(0),
17773
- width = _x[0],
17774
- setWidth = _x[1]; // Handle the change event of the input element
17776
+ var _y = useState(0),
17777
+ width = _y[0],
17778
+ setWidth = _y[1]; // Handle the change event of the input element
17775
17779
 
17776
17780
 
17777
17781
  var handleValueChange = function handleValueChange(e) {
@@ -18092,6 +18096,7 @@ var InputTag = function InputTag(_a) {
18092
18096
  className: "hplxt-flex-1 placeholder:hplxt-text-Gray-500 focus-visible:hplxt-outline-0 hplxt-border-0 focus:hplxt-border-0",
18093
18097
  placeholder: "Enter Text",
18094
18098
  onChange: function onChange(e) {
18099
+ getInputValue(e.target.value);
18095
18100
  setTagInputValue(e.target.value);
18096
18101
  handleValueChange(e);
18097
18102
  },
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { InputTagProps } from "../types";
3
- declare const InputTag: ({ inputProps, className, dropdownClassName, options, tagList, tagString, handleValChange, onDropdownClick, allowDuplicates, }: InputTagProps) => JSX.Element;
3
+ declare const InputTag: ({ inputProps, className, dropdownClassName, options, tagList, tagString, handleValChange, onDropdownClick, allowDuplicates, getInputValue, }: InputTagProps) => JSX.Element;
4
4
  export default InputTag;
@@ -438,5 +438,6 @@ export interface InputTagProps {
438
438
  inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
439
439
  handleValChange?: (value: any) => void;
440
440
  allowDuplicates?: boolean;
441
+ getInputValue?: (value: string) => void;
441
442
  }
442
443
  export {};
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.80",
12
+ "version": "1.0.81",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",