funda-ui 4.7.333 → 4.7.335

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/Select/index.js CHANGED
@@ -3846,19 +3846,22 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3846
3846
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(contentRef, function () {
3847
3847
  return {
3848
3848
  active: function active() {
3849
+ var _selectInputRef$curre;
3849
3850
  handleShowList();
3850
- selectInputRef.current.select();
3851
+ (_selectInputRef$curre = selectInputRef.current) === null || _selectInputRef$curre === void 0 ? void 0 : _selectInputRef$curre.select();
3851
3852
  },
3852
3853
  focus: function focus() {
3853
- selectInputRef.current.select();
3854
+ var _selectInputRef$curre2;
3855
+ (_selectInputRef$curre2 = selectInputRef.current) === null || _selectInputRef$curre2 === void 0 ? void 0 : _selectInputRef$curre2.select();
3854
3856
  },
3855
3857
  clear: function clear(cb) {
3858
+ var _selectInputRef$curre3;
3856
3859
  if (MULTI_SEL_VALID) {
3857
3860
  updateOptionCheckboxes('remove');
3858
3861
  } else {
3859
3862
  handleClearValue();
3860
3863
  }
3861
- selectInputRef.current.blur();
3864
+ (_selectInputRef$curre3 = selectInputRef.current) === null || _selectInputRef$curre3 === void 0 ? void 0 : _selectInputRef$curre3.blur();
3862
3865
  cb === null || cb === void 0 ? void 0 : cb();
3863
3866
  },
3864
3867
  /*
@@ -3881,7 +3884,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3881
3884
  cb === null || cb === void 0 ? void 0 : cb();
3882
3885
  }
3883
3886
  };
3884
- }, [contentRef]);
3887
+ }, [contentRef, selectInputRef]);
3885
3888
 
3886
3889
  // click outside
3887
3890
  useClickOutside_default()({
@@ -4628,6 +4631,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4628
4631
  $el,
4629
4632
  _selected,
4630
4633
  _selectedVal,
4634
+ _selectInputRef$curre4,
4631
4635
  _curItem$callback,
4632
4636
  _value2,
4633
4637
  _label2,
@@ -4636,6 +4640,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4636
4640
  _$el,
4637
4641
  _selected2,
4638
4642
  _selectedVal2,
4643
+ _selectInputRef$curre5,
4639
4644
  _args3 = arguments;
4640
4645
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
4641
4646
  while (1) switch (_context3.prev = _context3.next) {
@@ -4776,7 +4781,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4776
4781
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? curItem : multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
4777
4782
  case 25:
4778
4783
  //
4779
- selectInputRef.current.blur();
4784
+ (_selectInputRef$curre4 = selectInputRef.current) === null || _selectInputRef$curre4 === void 0 ? void 0 : _selectInputRef$curre4.blur();
4780
4785
  case 26:
4781
4786
  _context3.next = 42;
4782
4787
  break;
@@ -4884,7 +4889,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4884
4889
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? curItem : multipleSelectionCallback(_currentControlValueArr, _currentControlLabelArr));
4885
4890
  case 41:
4886
4891
  //
4887
- selectInputRef.current.blur();
4892
+ (_selectInputRef$curre5 = selectInputRef.current) === null || _selectInputRef$curre5 === void 0 ? void 0 : _selectInputRef$curre5.blur();
4888
4893
  case 42:
4889
4894
  // Fixed an out-of-focus issue
4890
4895
  fixFocusStatus();
@@ -5020,7 +5025,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5020
5025
  }
5021
5026
  function _handleMultiControlItemRemove() {
5022
5027
  _handleMultiControlItemRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(event) {
5023
- var valueToRemove, getCurrentIndex, currentControlValueArr, currentControlLabelArr, _value, _label;
5028
+ var valueToRemove, getCurrentIndex, currentControlValueArr, currentControlLabelArr, _value, _label, _selectInputRef$curre6;
5024
5029
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5025
5030
  while (1) switch (_context5.prev = _context5.next) {
5026
5031
  case 0:
@@ -5057,7 +5062,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5057
5062
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
5058
5063
  case 15:
5059
5064
  //
5060
- selectInputRef.current.blur();
5065
+ (_selectInputRef$curre6 = selectInputRef.current) === null || _selectInputRef$curre6 === void 0 ? void 0 : _selectInputRef$curre6.blur();
5061
5066
  case 16:
5062
5067
  case "end":
5063
5068
  return _context5.stop();
@@ -5246,7 +5251,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5246
5251
  }
5247
5252
  function _handleKeyPressed() {
5248
5253
  _handleKeyPressed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(event) {
5249
- var key, res, currentIndex, currentData, currentControlValueArr, currentControlLabelArr, htmlOptions;
5254
+ var key, res, currentIndex, currentData, currentControlValueArr, currentControlLabelArr, htmlOptions, _selectInputRef$curre7;
5250
5255
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
5251
5256
  while (1) switch (_context8.prev = _context8.next) {
5252
5257
  case 0:
@@ -5314,7 +5319,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5314
5319
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? currentData : multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
5315
5320
  case 25:
5316
5321
  //
5317
- selectInputRef.current.blur();
5322
+ (_selectInputRef$curre7 = selectInputRef.current) === null || _selectInputRef$curre7 === void 0 ? void 0 : _selectInputRef$curre7.blur();
5318
5323
  case 26:
5319
5324
  if (!(key === 'ArrowUp')) {
5320
5325
  _context8.next = 30;
@@ -3846,19 +3846,22 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3846
3846
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(contentRef, function () {
3847
3847
  return {
3848
3848
  active: function active() {
3849
+ var _selectInputRef$curre;
3849
3850
  handleShowList();
3850
- selectInputRef.current.select();
3851
+ (_selectInputRef$curre = selectInputRef.current) === null || _selectInputRef$curre === void 0 ? void 0 : _selectInputRef$curre.select();
3851
3852
  },
3852
3853
  focus: function focus() {
3853
- selectInputRef.current.select();
3854
+ var _selectInputRef$curre2;
3855
+ (_selectInputRef$curre2 = selectInputRef.current) === null || _selectInputRef$curre2 === void 0 ? void 0 : _selectInputRef$curre2.select();
3854
3856
  },
3855
3857
  clear: function clear(cb) {
3858
+ var _selectInputRef$curre3;
3856
3859
  if (MULTI_SEL_VALID) {
3857
3860
  updateOptionCheckboxes('remove');
3858
3861
  } else {
3859
3862
  handleClearValue();
3860
3863
  }
3861
- selectInputRef.current.blur();
3864
+ (_selectInputRef$curre3 = selectInputRef.current) === null || _selectInputRef$curre3 === void 0 ? void 0 : _selectInputRef$curre3.blur();
3862
3865
  cb === null || cb === void 0 ? void 0 : cb();
3863
3866
  },
3864
3867
  /*
@@ -3881,7 +3884,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3881
3884
  cb === null || cb === void 0 ? void 0 : cb();
3882
3885
  }
3883
3886
  };
3884
- }, [contentRef]);
3887
+ }, [contentRef, selectInputRef]);
3885
3888
 
3886
3889
  // click outside
3887
3890
  useClickOutside_default()({
@@ -4628,6 +4631,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4628
4631
  $el,
4629
4632
  _selected,
4630
4633
  _selectedVal,
4634
+ _selectInputRef$curre4,
4631
4635
  _curItem$callback,
4632
4636
  _value2,
4633
4637
  _label2,
@@ -4636,6 +4640,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4636
4640
  _$el,
4637
4641
  _selected2,
4638
4642
  _selectedVal2,
4643
+ _selectInputRef$curre5,
4639
4644
  _args3 = arguments;
4640
4645
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
4641
4646
  while (1) switch (_context3.prev = _context3.next) {
@@ -4776,7 +4781,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4776
4781
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? curItem : multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
4777
4782
  case 25:
4778
4783
  //
4779
- selectInputRef.current.blur();
4784
+ (_selectInputRef$curre4 = selectInputRef.current) === null || _selectInputRef$curre4 === void 0 ? void 0 : _selectInputRef$curre4.blur();
4780
4785
  case 26:
4781
4786
  _context3.next = 42;
4782
4787
  break;
@@ -4884,7 +4889,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4884
4889
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? curItem : multipleSelectionCallback(_currentControlValueArr, _currentControlLabelArr));
4885
4890
  case 41:
4886
4891
  //
4887
- selectInputRef.current.blur();
4892
+ (_selectInputRef$curre5 = selectInputRef.current) === null || _selectInputRef$curre5 === void 0 ? void 0 : _selectInputRef$curre5.blur();
4888
4893
  case 42:
4889
4894
  // Fixed an out-of-focus issue
4890
4895
  fixFocusStatus();
@@ -5020,7 +5025,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5020
5025
  }
5021
5026
  function _handleMultiControlItemRemove() {
5022
5027
  _handleMultiControlItemRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(event) {
5023
- var valueToRemove, getCurrentIndex, currentControlValueArr, currentControlLabelArr, _value, _label;
5028
+ var valueToRemove, getCurrentIndex, currentControlValueArr, currentControlLabelArr, _value, _label, _selectInputRef$curre6;
5024
5029
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5025
5030
  while (1) switch (_context5.prev = _context5.next) {
5026
5031
  case 0:
@@ -5057,7 +5062,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5057
5062
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
5058
5063
  case 15:
5059
5064
  //
5060
- selectInputRef.current.blur();
5065
+ (_selectInputRef$curre6 = selectInputRef.current) === null || _selectInputRef$curre6 === void 0 ? void 0 : _selectInputRef$curre6.blur();
5061
5066
  case 16:
5062
5067
  case "end":
5063
5068
  return _context5.stop();
@@ -5246,7 +5251,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5246
5251
  }
5247
5252
  function _handleKeyPressed() {
5248
5253
  _handleKeyPressed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(event) {
5249
- var key, res, currentIndex, currentData, currentControlValueArr, currentControlLabelArr, htmlOptions;
5254
+ var key, res, currentIndex, currentData, currentControlValueArr, currentControlLabelArr, htmlOptions, _selectInputRef$curre7;
5250
5255
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
5251
5256
  while (1) switch (_context8.prev = _context8.next) {
5252
5257
  case 0:
@@ -5314,7 +5319,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
5314
5319
  return onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? currentData : multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
5315
5320
  case 25:
5316
5321
  //
5317
- selectInputRef.current.blur();
5322
+ (_selectInputRef$curre7 = selectInputRef.current) === null || _selectInputRef$curre7 === void 0 ? void 0 : _selectInputRef$curre7.blur();
5318
5323
  case 26:
5319
5324
  if (!(key === 'ArrowUp')) {
5320
5325
  _context8.next = 30;
@@ -391,11 +391,11 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
391
391
  () => ({
392
392
  active: () => {
393
393
  handleShowList();
394
- selectInputRef.current.select();
394
+ selectInputRef.current?.select();
395
395
  },
396
396
 
397
397
  focus: () => {
398
- selectInputRef.current.select();
398
+ selectInputRef.current?.select();
399
399
  },
400
400
  clear: (cb?: any) => {
401
401
 
@@ -405,7 +405,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
405
405
  handleClearValue();
406
406
  }
407
407
 
408
- selectInputRef.current.blur();
408
+ selectInputRef.current?.blur();
409
409
 
410
410
  cb?.();
411
411
  },
@@ -428,7 +428,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
428
428
  cb?.();
429
429
  }
430
430
  }),
431
- [contentRef],
431
+ [contentRef, selectInputRef],
432
432
  );
433
433
 
434
434
 
@@ -1435,7 +1435,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
1435
1435
 
1436
1436
 
1437
1437
  //
1438
- selectInputRef.current.blur();
1438
+ selectInputRef.current?.blur();
1439
1439
  }
1440
1440
 
1441
1441
 
@@ -1580,7 +1580,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
1580
1580
 
1581
1581
 
1582
1582
  //
1583
- selectInputRef.current.blur();
1583
+ selectInputRef.current?.blur();
1584
1584
  }
1585
1585
  }
1586
1586
 
@@ -1765,7 +1765,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
1765
1765
 
1766
1766
 
1767
1767
  //
1768
- selectInputRef.current.blur();
1768
+ selectInputRef.current?.blur();
1769
1769
  }
1770
1770
 
1771
1771
  }
@@ -2004,7 +2004,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
2004
2004
 
2005
2005
 
2006
2006
  //
2007
- selectInputRef.current.blur();
2007
+ selectInputRef.current?.blur();
2008
2008
  }
2009
2009
 
2010
2010
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "UIUX Lab",
3
3
  "email": "uiuxlab@gmail.com",
4
4
  "name": "funda-ui",
5
- "version": "4.7.333",
5
+ "version": "4.7.335",
6
6
  "description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
7
7
  "repository": {
8
8
  "type": "git",