funda-ui 4.2.711 → 4.2.717

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.
@@ -2462,13 +2462,6 @@ var EventCalendar = function EventCalendar(props) {
2462
2462
 
2463
2463
  // close win
2464
2464
  setWinYear(false);
2465
-
2466
- //
2467
- onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
2468
- day: padZero(day),
2469
- month: padZero(month + 1),
2470
- year: currentValue.toString()
2471
- });
2472
2465
  }
2473
2466
  function handleMonthChange(currentIndex) {
2474
2467
  setSelectedMonth(currentIndex);
@@ -2517,6 +2510,14 @@ var EventCalendar = function EventCalendar(props) {
2517
2510
  }
2518
2511
  setYearsCollection(years);
2519
2512
  }, [selectedYear]);
2513
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2514
+ // Guaranteed year change triggered by the front and rear buttons
2515
+ onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
2516
+ day: padZero(day),
2517
+ month: padZero(month + 1),
2518
+ year: year.toString()
2519
+ });
2520
+ }, [year]);
2520
2521
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2521
2522
  setTodayDate(date);
2522
2523
  }, [date]);
@@ -26,6 +26,7 @@
26
26
  --e-cal-tl-footer-today-btn-bg: rgba(0, 58, 166, 1);
27
27
  --e-cal-tl-footer-today-btn-color: #fff;
28
28
  position: relative;
29
+ z-index: 3;
29
30
  min-width: var(--e-cal-tl-wrapper-min-width);
30
31
  border: 1px solid var(--e-cal-tl-border-color);
31
32
  /* --HEADER --*/
@@ -194,6 +195,8 @@
194
195
  height: 100%; /* Required */
195
196
  font-size: var(--e-cal-tl-table-bodycell-font-size);
196
197
  margin-top: -1px;
198
+ position: relative;
199
+ z-index: 2;
197
200
  /* list section */
198
201
  /* datagrid title */
199
202
  /* datagrid content */
@@ -3496,13 +3496,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
3496
3496
  // close win
3497
3497
  setWinYear(false);
3498
3498
 
3499
- //
3500
- onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
3501
- day: padZero(day),
3502
- month: padZero(month + 1),
3503
- year: currentValue.toString()
3504
- });
3505
-
3506
3499
  // restore table grid init status
3507
3500
  restoreTableGridInitStatus();
3508
3501
  }
@@ -4220,6 +4213,14 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
4220
4213
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4221
4214
  setTodayDate(date);
4222
4215
  }, [date]);
4216
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4217
+ // Guaranteed year change triggered by the front and rear buttons
4218
+ onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
4219
+ day: padZero(day),
4220
+ month: padZero(month + 1),
4221
+ year: year.toString()
4222
+ });
4223
+ }, [year]);
4223
4224
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4224
4225
  // update events value
4225
4226
  if (Array.isArray(eventsValue)) setVal(eventsValue);
@@ -1255,6 +1255,13 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1255
1255
  _useState4 = _slicedToArray(_useState3, 2),
1256
1256
  dataInit = _useState4[0],
1257
1257
  setDataInit = _useState4[1];
1258
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
1259
+ allData.forEach(function (item) {
1260
+ if (typeof item.optgroup !== 'undefined') {
1261
+ item.value = String(Math.random());
1262
+ }
1263
+ });
1264
+ };
1258
1265
  var optionsFlat = function optionsFlat(allData) {
1259
1266
  var flatItems = [];
1260
1267
  allData.forEach(function (item) {
@@ -1325,7 +1332,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1325
1332
 
1326
1333
  //
1327
1334
  if (!(_typeof(fetchFuncAsync) === 'object')) {
1328
- _context.next = 15;
1335
+ _context.next = 17;
1329
1336
  break;
1330
1337
  }
1331
1338
  _context.next = 4;
@@ -1344,6 +1351,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1344
1351
  }
1345
1352
 
1346
1353
  // remove Duplicate objects from JSON Array
1354
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
1347
1355
  _ORGIN_DATA = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
1348
1356
 
1349
1357
  //
@@ -1354,9 +1362,11 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1354
1362
 
1355
1363
  //
1356
1364
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
1365
+ console.log('======', _ORGIN_DATA);
1357
1366
  return _context.abrupt("return", _ORGIN_DATA);
1358
- case 15:
1367
+ case 17:
1359
1368
  // remove Duplicate objects from JSON Array
1369
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
1360
1370
  optionsDataInit = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__.removeArrDuplicateItems)(optionsDataInit, 'value');
1361
1371
 
1362
1372
  //
@@ -1367,8 +1377,9 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1367
1377
 
1368
1378
  //
1369
1379
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
1380
+ console.log('======', optionsDataInit);
1370
1381
  return _context.abrupt("return", optionsDataInit);
1371
- case 20:
1382
+ case 24:
1372
1383
  case "end":
1373
1384
  return _context.stop();
1374
1385
  }
@@ -1322,6 +1322,13 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1322
1322
  _useState6 = _slicedToArray(_useState5, 2),
1323
1323
  controlValue = _useState6[0],
1324
1324
  setControlValue = _useState6[1];
1325
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
1326
+ allData.forEach(function (item) {
1327
+ if (typeof item.optgroup !== 'undefined') {
1328
+ item.value = String(Math.random());
1329
+ }
1330
+ });
1331
+ };
1325
1332
  function fetchData(_x2) {
1326
1333
  return _fetchData.apply(this, arguments);
1327
1334
  } //
@@ -1336,7 +1343,7 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1336
1343
 
1337
1344
  //
1338
1345
  if (!(_typeof(fetchFuncAsync) === 'object')) {
1339
- _context.next = 16;
1346
+ _context.next = 17;
1340
1347
  break;
1341
1348
  }
1342
1349
  _context.next = 4;
@@ -1365,6 +1372,7 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1365
1372
  }
1366
1373
 
1367
1374
  // remove Duplicate objects from JSON Array
1375
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
1368
1376
  _ORGIN_DATA = (0,object.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
1369
1377
 
1370
1378
  //
@@ -1373,11 +1381,12 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1373
1381
  //
1374
1382
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
1375
1383
  return _context.abrupt("return", _ORGIN_DATA);
1376
- case 16:
1384
+ case 17:
1377
1385
  // set "<select>" value
1378
1386
  setControlValue(value); // value must be initialized
1379
1387
 
1380
1388
  // remove Duplicate objects from JSON Array
1389
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
1381
1390
  optionsDataInit = (0,object.removeArrDuplicateItems)(optionsDataInit, 'value');
1382
1391
 
1383
1392
  //
@@ -1386,7 +1395,7 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1386
1395
  //
1387
1396
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
1388
1397
  return _context.abrupt("return", optionsDataInit);
1389
- case 21:
1398
+ case 23:
1390
1399
  case "end":
1391
1400
  return _context.stop();
1392
1401
  }
package/Radio/index.js CHANGED
@@ -913,6 +913,13 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
913
913
 
914
914
  // return a array of options
915
915
  var optionsDataInit = optionsRes;
916
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
917
+ allData.forEach(function (item) {
918
+ if (typeof item.optgroup !== 'undefined') {
919
+ item.value = String(Math.random());
920
+ }
921
+ });
922
+ };
916
923
 
917
924
  //
918
925
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(optionsDataInit),
@@ -1011,7 +1018,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1011
1018
 
1012
1019
  //
1013
1020
  if (!(_typeof(fetchFuncAsync) === 'object')) {
1014
- _context.next = 22;
1021
+ _context.next = 23;
1015
1022
  break;
1016
1023
  }
1017
1024
  _context.next = 5;
@@ -1049,6 +1056,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1049
1056
  setControlValue(_realValue); // value must be initialized
1050
1057
 
1051
1058
  // remove Duplicate objects from JSON Array
1059
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
1052
1060
  _ORGIN_DATA = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
1053
1061
 
1054
1062
  //
@@ -1060,7 +1068,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1060
1068
  //
1061
1069
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(_ORGIN_DATA, _realValue, rootRef.current);
1062
1070
  return _context.abrupt("return", _ORGIN_DATA);
1063
- case 22:
1071
+ case 23:
1064
1072
  // If the default value is label, match value
1065
1073
  _realValue2 = value;
1066
1074
  _filterRes = [];
@@ -1080,6 +1088,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1080
1088
  setControlValue(_realValue2); // value must be initialized
1081
1089
 
1082
1090
  // remove Duplicate objects from JSON Array
1091
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
1083
1092
  optionsDataInit = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__.removeArrDuplicateItems)(optionsDataInit, 'value');
1084
1093
 
1085
1094
  //
@@ -1091,7 +1100,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1091
1100
  //
1092
1101
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(optionsDataInit, _realValue2, rootRef.current);
1093
1102
  return _context.abrupt("return", optionsDataInit);
1094
- case 33:
1103
+ case 35:
1095
1104
  case "end":
1096
1105
  return _context.stop();
1097
1106
  }
package/Select/index.js CHANGED
@@ -3614,6 +3614,13 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3614
3614
  // clean trigger
3615
3615
  var CLEAN_TRIGGER_VALID = typeof cleanTrigger === 'undefined' ? false : cleanTrigger ? cleanTrigger.valid : false;
3616
3616
  var CLEAN_TRIGGER_LABEL = cleanTrigger ? cleanTrigger.cleanValueLabel : 'Clean';
3617
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
3618
+ allData.forEach(function (item) {
3619
+ if (typeof item.optgroup !== 'undefined') {
3620
+ item.value = String(Math.random());
3621
+ }
3622
+ });
3623
+ };
3617
3624
 
3618
3625
  // exposes the following methods
3619
3626
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(popupRef, function () {
@@ -3792,7 +3799,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3792
3799
  incomingOptionsData = valueInputRef.current.dataset.options; // Determine whether the default value is user query input or default input
3793
3800
  defaultValue = init ? inputDefaultValue : '';
3794
3801
  if (!(_typeof(fetchFuncAsync) === 'object')) {
3795
- _context.next = 24;
3802
+ _context.next = 25;
3796
3803
  break;
3797
3804
  }
3798
3805
  _context.next = 6;
@@ -3926,6 +3933,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3926
3933
  // STEP 6: ===========
3927
3934
  //
3928
3935
  // remove Duplicate objects from JSON Array
3936
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
3929
3937
  _ORGIN_DATA = (0,object.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
3930
3938
  setOptionsData(_ORGIN_DATA); // data must be initialized
3931
3939
 
@@ -3938,7 +3946,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3938
3946
 
3939
3947
  //
3940
3948
  return _context.abrupt("return", _ORGIN_DATA);
3941
- case 24:
3949
+ case 25:
3942
3950
  // STEP 1: ===========
3943
3951
  // get incoming options from `data-options` of component
3944
3952
  if (typeof incomingOptionsData !== 'undefined') {
@@ -4044,6 +4052,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4044
4052
  // STEP 6: ===========
4045
4053
  //
4046
4054
  // remove Duplicate objects from JSON Array
4055
+ optionsFormatGroupOpt(staticOptionsData); // prevent the value from being filtered out
4047
4056
  staticOptionsData = (0,object.removeArrDuplicateItems)(staticOptionsData, 'value');
4048
4057
  setOptionsData(staticOptionsData); // data must be initialized
4049
4058
 
@@ -4056,7 +4065,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4056
4065
 
4057
4066
  //
4058
4067
  return _context.abrupt("return", staticOptionsData);
4059
- case 39:
4068
+ case 41:
4060
4069
  case "end":
4061
4070
  return _context.stop();
4062
4071
  }
@@ -2462,13 +2462,6 @@ var EventCalendar = function EventCalendar(props) {
2462
2462
 
2463
2463
  // close win
2464
2464
  setWinYear(false);
2465
-
2466
- //
2467
- onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
2468
- day: padZero(day),
2469
- month: padZero(month + 1),
2470
- year: currentValue.toString()
2471
- });
2472
2465
  }
2473
2466
  function handleMonthChange(currentIndex) {
2474
2467
  setSelectedMonth(currentIndex);
@@ -2517,6 +2510,14 @@ var EventCalendar = function EventCalendar(props) {
2517
2510
  }
2518
2511
  setYearsCollection(years);
2519
2512
  }, [selectedYear]);
2513
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2514
+ // Guaranteed year change triggered by the front and rear buttons
2515
+ onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
2516
+ day: padZero(day),
2517
+ month: padZero(month + 1),
2518
+ year: year.toString()
2519
+ });
2520
+ }, [year]);
2520
2521
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2521
2522
  setTodayDate(date);
2522
2523
  }, [date]);
@@ -3496,13 +3496,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
3496
3496
  // close win
3497
3497
  setWinYear(false);
3498
3498
 
3499
- //
3500
- onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
3501
- day: padZero(day),
3502
- month: padZero(month + 1),
3503
- year: currentValue.toString()
3504
- });
3505
-
3506
3499
  // restore table grid init status
3507
3500
  restoreTableGridInitStatus();
3508
3501
  }
@@ -4220,6 +4213,14 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
4220
4213
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4221
4214
  setTodayDate(date);
4222
4215
  }, [date]);
4216
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4217
+ // Guaranteed year change triggered by the front and rear buttons
4218
+ onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
4219
+ day: padZero(day),
4220
+ month: padZero(month + 1),
4221
+ year: year.toString()
4222
+ });
4223
+ }, [year]);
4223
4224
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4224
4225
  // update events value
4225
4226
  if (Array.isArray(eventsValue)) setVal(eventsValue);
@@ -1255,6 +1255,13 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1255
1255
  _useState4 = _slicedToArray(_useState3, 2),
1256
1256
  dataInit = _useState4[0],
1257
1257
  setDataInit = _useState4[1];
1258
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
1259
+ allData.forEach(function (item) {
1260
+ if (typeof item.optgroup !== 'undefined') {
1261
+ item.value = String(Math.random());
1262
+ }
1263
+ });
1264
+ };
1258
1265
  var optionsFlat = function optionsFlat(allData) {
1259
1266
  var flatItems = [];
1260
1267
  allData.forEach(function (item) {
@@ -1325,7 +1332,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1325
1332
 
1326
1333
  //
1327
1334
  if (!(_typeof(fetchFuncAsync) === 'object')) {
1328
- _context.next = 15;
1335
+ _context.next = 17;
1329
1336
  break;
1330
1337
  }
1331
1338
  _context.next = 4;
@@ -1344,6 +1351,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1344
1351
  }
1345
1352
 
1346
1353
  // remove Duplicate objects from JSON Array
1354
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
1347
1355
  _ORGIN_DATA = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
1348
1356
 
1349
1357
  //
@@ -1354,9 +1362,11 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1354
1362
 
1355
1363
  //
1356
1364
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
1365
+ console.log('======', _ORGIN_DATA);
1357
1366
  return _context.abrupt("return", _ORGIN_DATA);
1358
- case 15:
1367
+ case 17:
1359
1368
  // remove Duplicate objects from JSON Array
1369
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
1360
1370
  optionsDataInit = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__.removeArrDuplicateItems)(optionsDataInit, 'value');
1361
1371
 
1362
1372
  //
@@ -1367,8 +1377,9 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
1367
1377
 
1368
1378
  //
1369
1379
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
1380
+ console.log('======', optionsDataInit);
1370
1381
  return _context.abrupt("return", optionsDataInit);
1371
- case 20:
1382
+ case 24:
1372
1383
  case "end":
1373
1384
  return _context.stop();
1374
1385
  }
@@ -1322,6 +1322,13 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1322
1322
  _useState6 = _slicedToArray(_useState5, 2),
1323
1323
  controlValue = _useState6[0],
1324
1324
  setControlValue = _useState6[1];
1325
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
1326
+ allData.forEach(function (item) {
1327
+ if (typeof item.optgroup !== 'undefined') {
1328
+ item.value = String(Math.random());
1329
+ }
1330
+ });
1331
+ };
1325
1332
  function fetchData(_x2) {
1326
1333
  return _fetchData.apply(this, arguments);
1327
1334
  } //
@@ -1336,7 +1343,7 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1336
1343
 
1337
1344
  //
1338
1345
  if (!(_typeof(fetchFuncAsync) === 'object')) {
1339
- _context.next = 16;
1346
+ _context.next = 17;
1340
1347
  break;
1341
1348
  }
1342
1349
  _context.next = 4;
@@ -1365,6 +1372,7 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1365
1372
  }
1366
1373
 
1367
1374
  // remove Duplicate objects from JSON Array
1375
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
1368
1376
  _ORGIN_DATA = (0,object.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
1369
1377
 
1370
1378
  //
@@ -1373,11 +1381,12 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1373
1381
  //
1374
1382
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
1375
1383
  return _context.abrupt("return", _ORGIN_DATA);
1376
- case 16:
1384
+ case 17:
1377
1385
  // set "<select>" value
1378
1386
  setControlValue(value); // value must be initialized
1379
1387
 
1380
1388
  // remove Duplicate objects from JSON Array
1389
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
1381
1390
  optionsDataInit = (0,object.removeArrDuplicateItems)(optionsDataInit, 'value');
1382
1391
 
1383
1392
  //
@@ -1386,7 +1395,7 @@ var NativeSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
1386
1395
  //
1387
1396
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
1388
1397
  return _context.abrupt("return", optionsDataInit);
1389
- case 21:
1398
+ case 23:
1390
1399
  case "end":
1391
1400
  return _context.stop();
1392
1401
  }
@@ -913,6 +913,13 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
913
913
 
914
914
  // return a array of options
915
915
  var optionsDataInit = optionsRes;
916
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
917
+ allData.forEach(function (item) {
918
+ if (typeof item.optgroup !== 'undefined') {
919
+ item.value = String(Math.random());
920
+ }
921
+ });
922
+ };
916
923
 
917
924
  //
918
925
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(optionsDataInit),
@@ -1011,7 +1018,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1011
1018
 
1012
1019
  //
1013
1020
  if (!(_typeof(fetchFuncAsync) === 'object')) {
1014
- _context.next = 22;
1021
+ _context.next = 23;
1015
1022
  break;
1016
1023
  }
1017
1024
  _context.next = 5;
@@ -1049,6 +1056,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1049
1056
  setControlValue(_realValue); // value must be initialized
1050
1057
 
1051
1058
  // remove Duplicate objects from JSON Array
1059
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
1052
1060
  _ORGIN_DATA = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
1053
1061
 
1054
1062
  //
@@ -1060,7 +1068,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1060
1068
  //
1061
1069
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(_ORGIN_DATA, _realValue, rootRef.current);
1062
1070
  return _context.abrupt("return", _ORGIN_DATA);
1063
- case 22:
1071
+ case 23:
1064
1072
  // If the default value is label, match value
1065
1073
  _realValue2 = value;
1066
1074
  _filterRes = [];
@@ -1080,6 +1088,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1080
1088
  setControlValue(_realValue2); // value must be initialized
1081
1089
 
1082
1090
  // remove Duplicate objects from JSON Array
1091
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
1083
1092
  optionsDataInit = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__.removeArrDuplicateItems)(optionsDataInit, 'value');
1084
1093
 
1085
1094
  //
@@ -1091,7 +1100,7 @@ var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1091
1100
  //
1092
1101
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(optionsDataInit, _realValue2, rootRef.current);
1093
1102
  return _context.abrupt("return", optionsDataInit);
1094
- case 33:
1103
+ case 35:
1095
1104
  case "end":
1096
1105
  return _context.stop();
1097
1106
  }
@@ -3614,6 +3614,13 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3614
3614
  // clean trigger
3615
3615
  var CLEAN_TRIGGER_VALID = typeof cleanTrigger === 'undefined' ? false : cleanTrigger ? cleanTrigger.valid : false;
3616
3616
  var CLEAN_TRIGGER_LABEL = cleanTrigger ? cleanTrigger.cleanValueLabel : 'Clean';
3617
+ var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
3618
+ allData.forEach(function (item) {
3619
+ if (typeof item.optgroup !== 'undefined') {
3620
+ item.value = String(Math.random());
3621
+ }
3622
+ });
3623
+ };
3617
3624
 
3618
3625
  // exposes the following methods
3619
3626
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(popupRef, function () {
@@ -3792,7 +3799,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3792
3799
  incomingOptionsData = valueInputRef.current.dataset.options; // Determine whether the default value is user query input or default input
3793
3800
  defaultValue = init ? inputDefaultValue : '';
3794
3801
  if (!(_typeof(fetchFuncAsync) === 'object')) {
3795
- _context.next = 24;
3802
+ _context.next = 25;
3796
3803
  break;
3797
3804
  }
3798
3805
  _context.next = 6;
@@ -3926,6 +3933,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3926
3933
  // STEP 6: ===========
3927
3934
  //
3928
3935
  // remove Duplicate objects from JSON Array
3936
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
3929
3937
  _ORGIN_DATA = (0,object.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
3930
3938
  setOptionsData(_ORGIN_DATA); // data must be initialized
3931
3939
 
@@ -3938,7 +3946,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
3938
3946
 
3939
3947
  //
3940
3948
  return _context.abrupt("return", _ORGIN_DATA);
3941
- case 24:
3949
+ case 25:
3942
3950
  // STEP 1: ===========
3943
3951
  // get incoming options from `data-options` of component
3944
3952
  if (typeof incomingOptionsData !== 'undefined') {
@@ -4044,6 +4052,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4044
4052
  // STEP 6: ===========
4045
4053
  //
4046
4054
  // remove Duplicate objects from JSON Array
4055
+ optionsFormatGroupOpt(staticOptionsData); // prevent the value from being filtered out
4047
4056
  staticOptionsData = (0,object.removeArrDuplicateItems)(staticOptionsData, 'value');
4048
4057
  setOptionsData(staticOptionsData); // data must be initialized
4049
4058
 
@@ -4056,7 +4065,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
4056
4065
 
4057
4066
  //
4058
4067
  return _context.abrupt("return", staticOptionsData);
4059
- case 39:
4068
+ case 41:
4060
4069
  case "end":
4061
4070
  return _context.stop();
4062
4071
  }
@@ -26,6 +26,7 @@
26
26
  --e-cal-tl-footer-today-btn-bg: rgba(0, 58, 166, 1);
27
27
  --e-cal-tl-footer-today-btn-color: #fff;
28
28
  position: relative;
29
+ z-index: 3;
29
30
  min-width: var(--e-cal-tl-wrapper-min-width);
30
31
  border: 1px solid var(--e-cal-tl-border-color);
31
32
  /* --HEADER --*/
@@ -194,6 +195,8 @@
194
195
  height: 100%; /* Required */
195
196
  font-size: var(--e-cal-tl-table-bodycell-font-size);
196
197
  margin-top: -1px;
198
+ position: relative;
199
+ z-index: 2;
197
200
  /* list section */
198
201
  /* datagrid title */
199
202
  /* datagrid content */
@@ -303,6 +303,7 @@ const EventCalendar = (props: EventCalendarProps) => {
303
303
  year: _date.getFullYear().toString()
304
304
  });
305
305
 
306
+
306
307
  return _date;
307
308
  });
308
309
 
@@ -340,13 +341,6 @@ const EventCalendar = (props: EventCalendarProps) => {
340
341
  // close win
341
342
  setWinYear(false);
342
343
 
343
- //
344
- onChangeYear?.({
345
- day: padZero(day),
346
- month: padZero(month+1),
347
- year: currentValue.toString()
348
- });
349
-
350
344
  }
351
345
 
352
346
 
@@ -405,6 +399,16 @@ const EventCalendar = (props: EventCalendarProps) => {
405
399
  }, [selectedYear]);
406
400
 
407
401
 
402
+ useEffect(() => {
403
+ // Guaranteed year change triggered by the front and rear buttons
404
+ onChangeYear?.({
405
+ day: padZero(day),
406
+ month: padZero(month+1),
407
+ year: year.toString()
408
+ });
409
+ }, [year]);
410
+
411
+
408
412
 
409
413
  useEffect(() => {
410
414
  setTodayDate(date);
@@ -39,6 +39,7 @@
39
39
 
40
40
 
41
41
  position: relative;
42
+ z-index: 3;
42
43
  min-width: var(--e-cal-tl-wrapper-min-width);
43
44
  border: 1px solid var(--e-cal-tl-border-color);
44
45
 
@@ -257,6 +258,8 @@
257
258
  height: 100%; /* Required */
258
259
  font-size: var(--e-cal-tl-table-bodycell-font-size);
259
260
  margin-top: -1px;
261
+ position: relative;
262
+ z-index: 2;
260
263
 
261
264
  .e-cal-tl-table__timeline-table {
262
265
  border: var(--e-cal-tl-table-primary-border);
@@ -11,6 +11,8 @@ import {
11
11
  } from 'funda-utils/dist/cjs/getElementProperty';
12
12
  import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
13
13
 
14
+
15
+
14
16
  export interface EventsValueConfig {
15
17
  id: string | number;
16
18
  date: string,
@@ -208,8 +210,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
208
210
  const [showEdit, setShowEdit] = useState<boolean>(false);
209
211
  const [showDelete, setShowDelete] = useState<boolean>(false);
210
212
 
211
-
212
-
213
213
  // table grid
214
214
  const AUTO_SCROLL = autoScroll || false;
215
215
  const SHOW_WEEK = showWeek || false;
@@ -547,7 +547,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
547
547
  year: _date.getFullYear().toString()
548
548
  });
549
549
 
550
-
551
550
  // restore table grid init status
552
551
  restoreTableGridInitStatus();
553
552
 
@@ -595,14 +594,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
595
594
  // close win
596
595
  setWinYear(false);
597
596
 
598
-
599
- //
600
- onChangeYear?.({
601
- day: padZero(day),
602
- month: padZero(month+1),
603
- year: currentValue.toString()
604
- });
605
-
606
597
  // restore table grid init status
607
598
  restoreTableGridInitStatus();
608
599
 
@@ -624,7 +615,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
624
615
  month: padZero(currentIndex+1),
625
616
  year: year.toString()
626
617
  });
627
-
618
+
628
619
  // restore table grid init status
629
620
  restoreTableGridInitStatus();
630
621
 
@@ -1521,6 +1512,16 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1521
1512
  }, [date]);
1522
1513
 
1523
1514
 
1515
+ useEffect(() => {
1516
+ // Guaranteed year change triggered by the front and rear buttons
1517
+ onChangeYear?.({
1518
+ day: padZero(day),
1519
+ month: padZero(month+1),
1520
+ year: year.toString()
1521
+ });
1522
+ }, [year]);
1523
+
1524
+
1524
1525
  useEffect(() => {
1525
1526
 
1526
1527
  // update events value
@@ -13,6 +13,7 @@ import {
13
13
  } from 'funda-utils/dist/cjs/bodyScrollLock';
14
14
 
15
15
 
16
+
16
17
  declare global {
17
18
  interface Window {
18
19
  curVideo?: any;
@@ -108,6 +108,13 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
108
108
  const [dataInit, setDataInit] = useState<OptionConfig[]>(optionsDataInit);
109
109
 
110
110
 
111
+ const optionsFormatGroupOpt = (allData: any[]) => {
112
+ allData.forEach((item: any) => {
113
+ if (typeof item.optgroup !== 'undefined') {
114
+ item.value = String(Math.random());
115
+ }
116
+ });
117
+ };
111
118
 
112
119
  const optionsFlat = (allData: any[]) => {
113
120
 
@@ -192,7 +199,10 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
192
199
  _ORGIN_DATA = [];
193
200
  }
194
201
 
202
+
203
+
195
204
  // remove Duplicate objects from JSON Array
205
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
196
206
  _ORGIN_DATA = removeArrDuplicateItems(_ORGIN_DATA, 'value');
197
207
 
198
208
 
@@ -206,12 +216,13 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
206
216
  //
207
217
  onFetch?.(_ORGIN_DATA);
208
218
 
209
-
219
+ console.log('======', _ORGIN_DATA)
210
220
  return _ORGIN_DATA;
211
221
  } else {
212
222
 
213
223
 
214
224
  // remove Duplicate objects from JSON Array
225
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
215
226
  optionsDataInit = removeArrDuplicateItems(optionsDataInit, 'value');
216
227
 
217
228
  //
@@ -224,6 +235,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
224
235
  onFetch?.(optionsDataInit);
225
236
 
226
237
 
238
+ console.log('======', optionsDataInit)
227
239
  return optionsDataInit;
228
240
  }
229
241
 
@@ -102,6 +102,15 @@ const NativeSelect = forwardRef((props: NativeSelectProps, externalRef: any) =>
102
102
  const [controlValue, setControlValue] = useState<string | undefined>('');
103
103
 
104
104
 
105
+ const optionsFormatGroupOpt = (allData: any[]) => {
106
+ allData.forEach((item: any) => {
107
+ if (typeof item.optgroup !== 'undefined') {
108
+ item.value = String(Math.random());
109
+ }
110
+ });
111
+ };
112
+
113
+
105
114
 
106
115
  async function fetchData(params: any) {
107
116
 
@@ -136,6 +145,7 @@ const NativeSelect = forwardRef((props: NativeSelectProps, externalRef: any) =>
136
145
  }
137
146
 
138
147
  // remove Duplicate objects from JSON Array
148
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
139
149
  _ORGIN_DATA = removeArrDuplicateItems(_ORGIN_DATA, 'value');
140
150
 
141
151
  //
@@ -152,6 +162,7 @@ const NativeSelect = forwardRef((props: NativeSelectProps, externalRef: any) =>
152
162
 
153
163
 
154
164
  // remove Duplicate objects from JSON Array
165
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
155
166
  optionsDataInit = removeArrDuplicateItems(optionsDataInit, 'value');
156
167
 
157
168
  //
@@ -102,6 +102,15 @@ const Radio = forwardRef((props: RadioProps, externalRef: any) => {
102
102
  // return a array of options
103
103
  let optionsDataInit: OptionConfig[] = optionsRes;
104
104
 
105
+ const optionsFormatGroupOpt = (allData: any[]) => {
106
+ allData.forEach((item: any) => {
107
+ if (typeof item.optgroup !== 'undefined') {
108
+ item.value = String(Math.random());
109
+ }
110
+ });
111
+ };
112
+
113
+
105
114
 
106
115
  //
107
116
  const [dataInit, setDataInit] = useState<OptionConfig[]>(optionsDataInit);
@@ -220,6 +229,7 @@ const Radio = forwardRef((props: RadioProps, externalRef: any) => {
220
229
 
221
230
 
222
231
  // remove Duplicate objects from JSON Array
232
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
223
233
  _ORGIN_DATA = removeArrDuplicateItems(_ORGIN_DATA, 'value');
224
234
 
225
235
 
@@ -258,6 +268,7 @@ const Radio = forwardRef((props: RadioProps, externalRef: any) => {
258
268
 
259
269
 
260
270
  // remove Duplicate objects from JSON Array
271
+ optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
261
272
  optionsDataInit = removeArrDuplicateItems(optionsDataInit, 'value');
262
273
 
263
274
  //
@@ -278,6 +278,15 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
278
278
  const CLEAN_TRIGGER_LABEL = cleanTrigger ? cleanTrigger.cleanValueLabel : 'Clean';
279
279
 
280
280
 
281
+ const optionsFormatGroupOpt = (allData: any[]) => {
282
+ allData.forEach((item: any) => {
283
+ if (typeof item.optgroup !== 'undefined') {
284
+ item.value = String(Math.random());
285
+ }
286
+ });
287
+ };
288
+
289
+
281
290
 
282
291
  // exposes the following methods
283
292
  useImperativeHandle(
@@ -611,6 +620,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
611
620
  // STEP 6: ===========
612
621
  //
613
622
  // remove Duplicate objects from JSON Array
623
+ optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
614
624
  _ORGIN_DATA = removeArrDuplicateItems(_ORGIN_DATA, 'value');
615
625
 
616
626
  setOptionsData(_ORGIN_DATA); // data must be initialized
@@ -746,6 +756,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
746
756
  // STEP 6: ===========
747
757
  //
748
758
  // remove Duplicate objects from JSON Array
759
+ optionsFormatGroupOpt(staticOptionsData); // prevent the value from being filtered out
749
760
  staticOptionsData = removeArrDuplicateItems(staticOptionsData, 'value');
750
761
 
751
762
 
@@ -28,7 +28,7 @@ console.log(combinedCls('a-1', 'a-2', 'a-3', {
28
28
  undefined
29
29
  })); // a-1 a-2 a-3 p-3 p-5 p-7
30
30
  */
31
- function combinedCls(...args) {
31
+ function combinedCls(...args: any[]): string | undefined {
32
32
  if (args) {
33
33
  let classes: any[] = [];
34
34
 
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.2.711",
5
+ "version": "4.2.717",
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",