funda-ui 3.9.289 → 3.9.320

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/Date/index.css CHANGED
@@ -6,6 +6,7 @@
6
6
  --date2d-trigger-focus-box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
7
7
  --date2d-trigger-clear-bg: rgb(156, 156, 156);
8
8
  width: 100%;
9
+ /* tools */
9
10
  }
10
11
  .date2d__trigger.focus .date2d__control input {
11
12
  box-shadow: var(--date2d-trigger-focus-box-shadow);
@@ -19,19 +20,26 @@
19
20
  color: transparent;
20
21
  pointer-events: none;
21
22
  }
22
- .date2d__trigger .date2d__control .date2d__control__icon {
23
+ .date2d__trigger .date2d__control .date2d__control-tools {
23
24
  position: absolute;
24
25
  top: 0.3rem;
25
26
  right: 0.5rem;
26
27
  z-index: 6;
27
28
  cursor: pointer;
29
+ height: 1.5rem;
30
+ line-height: 1.5rem;
28
31
  }
29
- .date2d__trigger .date2d__control .date2d__control__icon .date2d__control__icon__close {
32
+ .date2d__trigger .date2d__control .date2d__control-tools.date2d__control-tools--hover-show-tools {
33
+ transform: scale(0);
34
+ transition: 0.1s ease-in-out;
35
+ transition-delay: 0.25s;
36
+ }
37
+ .date2d__trigger .date2d__control .date2d__control-tools .date2d__control-tools__close {
30
38
  display: inline-block;
31
39
  margin-right: 0.2rem;
32
40
  pointer-events: all;
33
41
  }
34
- .date2d__trigger .date2d__control .date2d__control__icon .date2d__control__icon__close svg path {
42
+ .date2d__trigger .date2d__control .date2d__control-tools .date2d__control-tools__close svg path {
35
43
  fill: var(--date2d-trigger-clear-bg);
36
44
  }
37
45
  .date2d__trigger .date2d__control__inputplaceholder {
@@ -68,6 +76,9 @@
68
76
  .date2d__trigger .date2d__control .input-group:not(.has-left-content) .date2d__control__inputplaceholder {
69
77
  left: 0.5rem;
70
78
  }
79
+ .date2d__trigger.date2d__trigger--hover-show-tools:hover .date2d__control-tools.date2d__control-tools--hover-show-tools {
80
+ transform: scale(1);
81
+ }
71
82
 
72
83
  .date2d__wrapper {
73
84
  --date2d-box-shadow: 0 5px 15px 0 rgba(0,0,0,.07), 0 15px 35px 0 rgba(50,50,93,.1);
package/Date/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  declare type DateProps = {
3
+ contentRef?: React.RefObject<any>;
3
4
  popupRef?: React.RefObject<any>;
4
5
  popupClassName?: string;
5
6
  triggerClassName?: string;
@@ -8,6 +9,8 @@ declare type DateProps = {
8
9
  controlGroupWrapperClassName?: string;
9
10
  controlGroupTextClassName?: string;
10
11
  delimiter?: string;
12
+ hideClearButton?: boolean;
13
+ showToolsWhenHover?: boolean;
11
14
  offset?: number;
12
15
  exceededSidePosOffset?: number;
13
16
  localization?: 'en_US' | 'zh_CN';
@@ -35,10 +38,10 @@ declare type DateProps = {
35
38
  autoComplete?: string;
36
39
  tabIndex?: number;
37
40
  [key: `data-${string}`]: string | undefined;
38
- onLoad?: (e: any, data: any) => void;
39
- onChange?: (e: any, data: any, isValidDate: boolean) => void;
40
- onBlur?: (e: any) => void;
41
- onFocus?: (e: any) => void;
41
+ onLoad?: (e: any, data: any, allSplittingInputs: any[]) => void;
42
+ onChange?: (e: any, data: any, isValidDate: boolean, allSplittingInputs: any[]) => void;
43
+ onBlur?: (e: any, allSplittingInputs: any[]) => void;
44
+ onFocus?: (e: any, allSplittingInputs: any[]) => void;
42
45
  onOpenPopup?: (allSplittingInputs: any[]) => void;
43
46
  onClosePopup?: (allSplittingInputs: any[]) => void;
44
47
  onChangeDate?: (currentData: any) => void;
package/Date/index.js CHANGED
@@ -2092,7 +2092,7 @@ var zh_CN_default = /*#__PURE__*/__webpack_require__.n(zh_CN);
2092
2092
  // EXTERNAL MODULE: ./src/utils/performance.js
2093
2093
  var performance = __webpack_require__(342);
2094
2094
  ;// CONCATENATED MODULE: ./src/index.tsx
2095
- var _excluded = ["popupRef", "triggerClassName", "popupClassName", "wrapperClassName", "controlClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "delimiter", "offset", "exceededSidePosOffset", "localization", "type", "onlyTime", "truncateSeconds", "valueUseSlash", "disabled", "required", "readOnly", "value", "clickInitValue", "min", "max", "placeholder", "label", "units", "name", "alt", "id", "iconLeft", "iconRight", "autoComplete", "style", "tabIndex", "onLoad", "onChange", "onBlur", "onFocus", "onOpenPopup", "onClosePopup", "onChangeDate", "onChangeMonth", "onChangeYear", "onChangeToday", "onChangeHours", "onChangeMinutes", "onChangeSeconds", "langHoursTitle", "langMinutesTitle", "langSecondsTitle", "langWeek", "langWeekFull", "langMonths", "langMonthsFull", "langToday"];
2095
+ var _excluded = ["contentRef", "popupRef", "triggerClassName", "popupClassName", "wrapperClassName", "controlClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "delimiter", "hideClearButton", "showToolsWhenHover", "offset", "exceededSidePosOffset", "localization", "type", "onlyTime", "truncateSeconds", "valueUseSlash", "disabled", "required", "readOnly", "value", "clickInitValue", "min", "max", "placeholder", "label", "units", "name", "alt", "id", "iconLeft", "iconRight", "autoComplete", "style", "tabIndex", "onLoad", "onChange", "onBlur", "onFocus", "onOpenPopup", "onClosePopup", "onChangeDate", "onChangeMonth", "onChangeYear", "onChangeToday", "onChangeHours", "onChangeMinutes", "onChangeSeconds", "langHoursTitle", "langMinutesTitle", "langSecondsTitle", "langWeek", "langWeekFull", "langMonths", "langMonthsFull", "langToday"];
2096
2096
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2097
2097
  function src_slicedToArray(arr, i) { return src_arrayWithHoles(arr) || src_iterableToArrayLimit(arr, i) || src_unsupportedIterableToArray(arr, i) || src_nonIterableRest(); }
2098
2098
  function src_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -2114,7 +2114,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
2114
2114
 
2115
2115
 
2116
2116
  var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, _ref) {
2117
- var popupRef = props.popupRef,
2117
+ var contentRef = props.contentRef,
2118
+ popupRef = props.popupRef,
2118
2119
  triggerClassName = props.triggerClassName,
2119
2120
  popupClassName = props.popupClassName,
2120
2121
  wrapperClassName = props.wrapperClassName,
@@ -2122,6 +2123,8 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2122
2123
  controlGroupWrapperClassName = props.controlGroupWrapperClassName,
2123
2124
  controlGroupTextClassName = props.controlGroupTextClassName,
2124
2125
  delimiter = props.delimiter,
2126
+ hideClearButton = props.hideClearButton,
2127
+ showToolsWhenHover = props.showToolsWhenHover,
2125
2128
  offset = props.offset,
2126
2129
  exceededSidePosOffset = props.exceededSidePosOffset,
2127
2130
  localization = props.localization,
@@ -2184,6 +2187,8 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2184
2187
  //
2185
2188
  var DELIMITER_DATE = delimiter || '/';
2186
2189
  var DELIMITER_TIME = ':';
2190
+ var SHOW_TOOLS_ENABLED = !(typeof showToolsWhenHover === 'undefined' || showToolsWhenHover === false);
2191
+ var HIDE_CLEAR_BTN_ENABLED = !(typeof hideClearButton === 'undefined' || hideClearButton === false);
2187
2192
 
2188
2193
  // placeholder
2189
2194
  var datePlaceholder = placeholder || placeholder === '' ? placeholder : 'yyyy/MM/dd HH:mm:ss';
@@ -2264,6 +2269,11 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2264
2269
  // blur for popup window
2265
2270
  var popupBlurEnabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false); // DO NOT USE 'useState()'
2266
2271
 
2272
+ //
2273
+ var getAllSplittingInputs = function getAllSplittingInputs() {
2274
+ return [partedInputYear.current, partedInputMonth.current, partedInputDay.current, partedInputHours.current, partedInputMinutes.current, partedInputSeconds.current];
2275
+ };
2276
+
2267
2277
  // exposes the following methods
2268
2278
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(popupRef, function () {
2269
2279
  return {
@@ -2273,6 +2283,30 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2273
2283
  }
2274
2284
  };
2275
2285
  }, [popupRef]);
2286
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(contentRef, function () {
2287
+ return {
2288
+ clear: function clear(cb) {
2289
+ clearAll();
2290
+ cb === null || cb === void 0 ? void 0 : cb();
2291
+ },
2292
+ blur: function blur(cb) {
2293
+ getAllSplittingInputs().forEach(function (el) {
2294
+ if (el !== null) el.blur();
2295
+ });
2296
+ handleBlur(null);
2297
+ cb === null || cb === void 0 ? void 0 : cb();
2298
+ },
2299
+ /*
2300
+ set('2024-04-18 21:54:09', () => { console.log('callback') }])
2301
+ */
2302
+ set: function set(value, cb) {
2303
+ var _defaultValueIsEmpty = typeof value === 'undefined' || value === null || value === 'null' || value === '';
2304
+ setDateDefaultValueExist(_defaultValueIsEmpty ? false : true);
2305
+ initValue(value);
2306
+ cb === null || cb === void 0 ? void 0 : cb();
2307
+ }
2308
+ };
2309
+ }, [contentRef]);
2276
2310
  var windowScrollUpdate = (0,performance.debounce)(handleScrollEvent, 50);
2277
2311
  var eventFire = function eventFire(el, etype) {
2278
2312
  if (el.fireEvent) {
@@ -2323,8 +2357,6 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2323
2357
  //
2324
2358
  var MIN = typeof min !== 'undefined' && min !== '' && min !== null && (0,utils_date.isValidDate)(min) ? getFullTimeData(min) : '';
2325
2359
  var MAX = typeof max !== 'undefined' && max !== '' && max !== null && (0,utils_date.isValidDate)(max) ? getFullTimeData(max) : '';
2326
- var currentMinDateDisabled = MIN !== '' ? Number(new window.Date().getTime()) < Number(new window.Date(MIN.res).getTime()) ? true : false : false;
2327
- var currentMaxDateDisabled = MAX !== '' ? Number(new window.Date().getTime()) > Number(new window.Date(MAX.res).getTime()) ? true : false : false;
2328
2360
  var getActualDefaultValue = function getActualDefaultValue(v) {
2329
2361
  var init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2330
2362
  var _v = getFullTimeData((0,utils_date.getNow)());
@@ -2433,7 +2465,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2433
2465
  }
2434
2466
  function popwinPosHide() {
2435
2467
  setIsShow(false);
2436
- onClosePopup === null || onClosePopup === void 0 ? void 0 : onClosePopup([partedInputYear.current, partedInputMonth.current, partedInputDay.current, partedInputHours.current, partedInputMinutes.current, partedInputSeconds.current]);
2468
+ onClosePopup === null || onClosePopup === void 0 ? void 0 : onClosePopup(getAllSplittingInputs());
2437
2469
  }
2438
2470
  function handleClickOutside(event) {
2439
2471
  if (event.target.closest(".date2d__wrapper") === null && event.target.closest(".date2d-cal__wrapper") === null) {
@@ -2445,7 +2477,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2445
2477
 
2446
2478
  // move out the popup window
2447
2479
  if (popupBlurEnabled.current) {
2448
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(inputRef.current);
2480
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(inputRef.current, getAllSplittingInputs());
2449
2481
  popupBlurEnabled.current = false;
2450
2482
  }
2451
2483
  }
@@ -2454,7 +2486,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2454
2486
  setIsShow(true);
2455
2487
  setTimeout(function () {
2456
2488
  popwinPosInit();
2457
- onOpenPopup === null || onOpenPopup === void 0 ? void 0 : onOpenPopup([partedInputYear.current, partedInputMonth.current, partedInputDay.current, partedInputHours.current, partedInputMinutes.current, partedInputSeconds.current]);
2489
+ onOpenPopup === null || onOpenPopup === void 0 ? void 0 : onOpenPopup(getAllSplittingInputs());
2458
2490
  }, 0);
2459
2491
 
2460
2492
  // focus
@@ -2465,13 +2497,13 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2465
2497
  (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.classList.add('focus');
2466
2498
 
2467
2499
  //
2468
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(inputRef.current);
2500
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(inputRef.current, getAllSplittingInputs());
2469
2501
  }
2470
2502
  function handleChange(event) {
2471
2503
  var val = event.target.value;
2472
2504
 
2473
2505
  //
2474
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, val, (0,utils_date.isValidDate)(val));
2506
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, val, (0,utils_date.isValidDate)(val), getAllSplittingInputs());
2475
2507
  }
2476
2508
  function handleBlur(event) {
2477
2509
  var _rootRef$current3;
@@ -2479,7 +2511,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2479
2511
  (_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
2480
2512
 
2481
2513
  //
2482
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(inputRef.current);
2514
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(inputRef.current, getAllSplittingInputs());
2483
2515
  }
2484
2516
  function handleInitSplitClickEv(e) {
2485
2517
  e.preventDefault();
@@ -2489,11 +2521,20 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2489
2521
  resetDefauleValueExist();
2490
2522
  var _date = "".concat(splitVals[0], "-").concat(splitVals[1], "-").concat(splitVals[2]);
2491
2523
  var _full = "".concat(_date, " ").concat(splitVals[3], ":").concat(splitVals[4], ":").concat(splitVals[5]);
2492
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2524
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2525
+ }
2526
+ function handleKeypress(event) {
2527
+ if (event.code == "Enter") {
2528
+ event.preventDefault();
2529
+ getAllSplittingInputs().forEach(function (el) {
2530
+ if (el !== null) el.blur();
2531
+ });
2532
+ handleBlur(null);
2533
+ }
2493
2534
  }
2494
2535
  function clearAll() {
2495
2536
  setDateDefaultValueExist(false);
2496
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, '', false);
2537
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, '', false, getAllSplittingInputs());
2497
2538
  }
2498
2539
  function resetDefauleValueExist() {
2499
2540
  if (!dateDefaultValueExist) setDateDefaultValueExist(true);
@@ -2665,7 +2706,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2665
2706
  _initValue2 = src_slicedToArray(_initValue, 2),
2666
2707
  a = _initValue2[0],
2667
2708
  b = _initValue2[1];
2668
- onLoad === null || onLoad === void 0 ? void 0 : onLoad(a, getFullTimeData(b));
2709
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(a, getFullTimeData(b), getAllSplittingInputs());
2669
2710
 
2670
2711
  //--------------
2671
2712
  document.removeEventListener('pointerdown', handleClickOutside);
@@ -2687,24 +2728,27 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2687
2728
  // window.removeEventListener('touchmove', windowScrollUpdate);
2688
2729
  };
2689
2730
  }, [value]);
2690
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2731
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, label ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2691
2732
  className: "date2d__label"
2692
- }, label ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
2733
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
2693
2734
  htmlFor: idRes,
2694
2735
  className: "form-label",
2695
2736
  dangerouslySetInnerHTML: {
2696
2737
  __html: "".concat(label)
2697
2738
  }
2698
- }) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
2739
+ })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2740
+ className: "date2d__label"
2741
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
2699
2742
  htmlFor: idRes,
2700
2743
  className: "form-label"
2701
- }, label)) : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2744
+ }, label))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2702
2745
  ref: rootRef,
2703
2746
  "data-overlay-id": "date2d__wrapper-".concat(idRes),
2704
- className: "date2d__trigger d-inline-block is-".concat(type, " ").concat(triggerClassName || ''),
2747
+ className: "date2d__trigger d-inline-block is-".concat(type, " ").concat(triggerClassName || '', " ").concat(SHOW_TOOLS_ENABLED ? 'date2d__trigger--hover-show-tools' : ''),
2705
2748
  onClick: handleShow,
2706
2749
  onFocus: handleFocus,
2707
- onBlur: handleBlur
2750
+ onBlur: handleBlur,
2751
+ onKeyDown: handleKeypress
2708
2752
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2709
2753
  className: "date2d__control"
2710
2754
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), _extends({
@@ -2756,7 +2800,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2756
2800
  if (_val !== '' && !(0,utils_date.isValidYear)(_val) && !(0,utils_date.isNumeric)(_val)) _val = "".concat((0,utils_date.getCurrentYear)());
2757
2801
  var _date = "".concat(_val, "-").concat(splitVals[1], "-").concat(splitVals[2]);
2758
2802
  var _full = "".concat(_date, " ").concat(splitVals[3], ":").concat(splitVals[4], ":").concat(splitVals[5]);
2759
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2803
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2760
2804
  setSplitVals(function (prevState) {
2761
2805
  return [_val, prevState[1], prevState[2], prevState[3], prevState[4], prevState[5]];
2762
2806
  });
@@ -2786,7 +2830,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2786
2830
  if (_val !== '' && !(0,utils_date.isValidMonth)(_val) && !(0,utils_date.isNumeric)(_val)) _val = "".concat((0,utils_date.getCurrentMonth)());
2787
2831
  var _date = "".concat(splitVals[0], "-").concat(_val, "-").concat(splitVals[2]);
2788
2832
  var _full = "".concat(_date, " ").concat(splitVals[3], ":").concat(splitVals[4], ":").concat(splitVals[5]);
2789
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2833
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2790
2834
  setSplitVals(function (prevState) {
2791
2835
  return [prevState[0], _val, prevState[2], prevState[3], prevState[4], prevState[5]];
2792
2836
  });
@@ -2821,7 +2865,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2821
2865
  if (_val !== '' && !(0,utils_date.isValidDay)(_val) && !(0,utils_date.isNumeric)(_val)) _val = "".concat((0,utils_date.getCurrentDay)());
2822
2866
  var _date = "".concat(splitVals[0], "-").concat(splitVals[1], "-").concat(_val);
2823
2867
  var _full = "".concat(_date, " ").concat(splitVals[3], ":").concat(splitVals[4], ":").concat(splitVals[5]);
2824
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2868
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2825
2869
  setSplitVals(function (prevState) {
2826
2870
  return [prevState[0], prevState[1], _val, prevState[3], prevState[4], prevState[5]];
2827
2871
  });
@@ -2848,7 +2892,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2848
2892
  if (_val !== '' && !(0,utils_date.isValidHours)(_val) && !(0,utils_date.isNumeric)(_val)) _val = '00';
2849
2893
  var _date = "".concat(splitVals[0], "-").concat(splitVals[1], "-").concat(splitVals[2]);
2850
2894
  var _full = "".concat(_date, " ").concat(_val, ":").concat(splitVals[4], ":").concat(splitVals[5]);
2851
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2895
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2852
2896
  setSplitVals(function (prevState) {
2853
2897
  return [prevState[0], prevState[1], prevState[2], _val, prevState[4], prevState[5]];
2854
2898
  });
@@ -2875,7 +2919,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2875
2919
  if (_val !== '' && !(0,utils_date.isValidMinutesAndSeconds)(_val) && !(0,utils_date.isNumeric)(_val)) _val = '00';
2876
2920
  var _date = "".concat(splitVals[0], "-").concat(splitVals[1], "-").concat(splitVals[2]);
2877
2921
  var _full = "".concat(_date, " ").concat(splitVals[3], ":").concat(_val, ":").concat(splitVals[5]);
2878
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2922
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2879
2923
  setSplitVals(function (prevState) {
2880
2924
  return [prevState[0], prevState[1], prevState[2], prevState[3], _val, prevState[5]];
2881
2925
  });
@@ -2902,7 +2946,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2902
2946
  if (_val !== '' && !(0,utils_date.isValidMinutesAndSeconds)(_val) && !(0,utils_date.isNumeric)(_val)) _val = '00';
2903
2947
  var _date = "".concat(splitVals[0], "-").concat(splitVals[1], "-").concat(splitVals[2]);
2904
2948
  var _full = "".concat(_date, " ").concat(splitVals[3], ":").concat(splitVals[4], ":").concat(_val);
2905
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full));
2949
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, valueResConverter(_full), (0,utils_date.isValidDate)(_full), getAllSplittingInputs());
2906
2950
  setSplitVals(function (prevState) {
2907
2951
  return [prevState[0], prevState[1], prevState[2], prevState[3], prevState[4], _val];
2908
2952
  });
@@ -2915,11 +2959,11 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2915
2959
  }, attributes))) : null) : null)),
2916
2960
  style: style
2917
2961
  }, attributes)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
2918
- className: "date2d__control__icon"
2962
+ className: "date2d__control-tools ".concat(SHOW_TOOLS_ENABLED ? 'date2d__control-tools--hover-show-tools' : '')
2919
2963
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
2920
2964
  tabIndex: -1,
2921
2965
  href: "#",
2922
- className: "date2d__control__icon__close ".concat(dateDefaultValueExist ? '' : 'd-none'),
2966
+ className: "date2d__control-tools__close ".concat(HIDE_CLEAR_BTN_ENABLED ? 'd-none' : '', " ").concat(dateDefaultValueExist ? '' : 'd-none'),
2923
2967
  onClick: function onClick(e) {
2924
2968
  e.preventDefault();
2925
2969
  e.stopPropagation(); // Avoid triggering pop-ups
@@ -2977,7 +3021,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2977
3021
  setSplitVals(function (prevState) {
2978
3022
  return [_v.year, _v.month, _v.day, prevState[3], prevState[4], prevState[5]];
2979
3023
  });
2980
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3024
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
2981
3025
 
2982
3026
  //
2983
3027
  _onChangeDate === null || _onChangeDate === void 0 ? void 0 : _onChangeDate(_v);
@@ -2996,7 +3040,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
2996
3040
  setSplitVals(function (prevState) {
2997
3041
  return [_v.year, _v.month, _v.day, prevState[3], prevState[4], prevState[5]];
2998
3042
  });
2999
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3043
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
3000
3044
 
3001
3045
  //
3002
3046
  _onChangeToday === null || _onChangeToday === void 0 ? void 0 : _onChangeToday(_v);
@@ -3015,7 +3059,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
3015
3059
  setSplitVals(function (prevState) {
3016
3060
  return [_v.year, _v.month, _v.day, prevState[3], prevState[4], prevState[5]];
3017
3061
  });
3018
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3062
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
3019
3063
 
3020
3064
  //
3021
3065
  _onChangeMonth === null || _onChangeMonth === void 0 ? void 0 : _onChangeMonth(_v);
@@ -3034,7 +3078,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
3034
3078
  setSplitVals(function (prevState) {
3035
3079
  return [_v.year, _v.month, _v.day, prevState[3], prevState[4], prevState[5]];
3036
3080
  });
3037
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3081
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
3038
3082
 
3039
3083
  //
3040
3084
  _onChangeYear === null || _onChangeYear === void 0 ? void 0 : _onChangeYear(_v);
@@ -3066,7 +3110,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
3066
3110
  setSplitVals(function (prevState) {
3067
3111
  return [prevState[0], prevState[1], prevState[2], _v.hours, prevState[4], prevState[5]];
3068
3112
  });
3069
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3113
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
3070
3114
 
3071
3115
  //
3072
3116
  onChangeHours === null || onChangeHours === void 0 ? void 0 : onChangeHours(_v);
@@ -3100,7 +3144,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
3100
3144
  setSplitVals(function (prevState) {
3101
3145
  return [prevState[0], prevState[1], prevState[2], prevState[3], _v.minutes, prevState[5]];
3102
3146
  });
3103
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3147
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
3104
3148
 
3105
3149
  //
3106
3150
  onChangeMinutes === null || onChangeMinutes === void 0 ? void 0 : onChangeMinutes(_v);
@@ -3134,7 +3178,7 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
3134
3178
  setSplitVals(function (prevState) {
3135
3179
  return [prevState[0], prevState[1], prevState[2], prevState[3], prevState[5], _v.seconds];
3136
3180
  });
3137
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true);
3181
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(inputRef.current, _v, true, getAllSplittingInputs());
3138
3182
 
3139
3183
  //
3140
3184
  onChangeSeconds === null || onChangeSeconds === void 0 ? void 0 : onChangeSeconds(_v);
@@ -1282,7 +1282,7 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
1282
1282
  cb === null || cb === void 0 ? void 0 : cb();
1283
1283
  },
1284
1284
  /*
1285
- set([{"label": "Option 1","listItemLabel":"Option 1 (No: 001)","value": "value-1","queryString": "option1"}, () => { console.log('callback') }])
1285
+ set([{"label": "Option 1","listItemLabel":"Option 1 (No: 001)","value": "value-1","queryString": "option1"}], () => { console.log('callback') }])
1286
1286
  */
1287
1287
  set: function set(value, cb) {
1288
1288
  if (MULTI_SEL_VALID) {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  declare type DateProps = {
3
+ contentRef?: React.RefObject<any>;
3
4
  popupRef?: React.RefObject<any>;
4
5
  popupClassName?: string;
5
6
  triggerClassName?: string;
@@ -8,6 +9,8 @@ declare type DateProps = {
8
9
  controlGroupWrapperClassName?: string;
9
10
  controlGroupTextClassName?: string;
10
11
  delimiter?: string;
12
+ hideClearButton?: boolean;
13
+ showToolsWhenHover?: boolean;
11
14
  offset?: number;
12
15
  exceededSidePosOffset?: number;
13
16
  localization?: 'en_US' | 'zh_CN';
@@ -35,10 +38,10 @@ declare type DateProps = {
35
38
  autoComplete?: string;
36
39
  tabIndex?: number;
37
40
  [key: `data-${string}`]: string | undefined;
38
- onLoad?: (e: any, data: any) => void;
39
- onChange?: (e: any, data: any, isValidDate: boolean) => void;
40
- onBlur?: (e: any) => void;
41
- onFocus?: (e: any) => void;
41
+ onLoad?: (e: any, data: any, allSplittingInputs: any[]) => void;
42
+ onChange?: (e: any, data: any, isValidDate: boolean, allSplittingInputs: any[]) => void;
43
+ onBlur?: (e: any, allSplittingInputs: any[]) => void;
44
+ onFocus?: (e: any, allSplittingInputs: any[]) => void;
42
45
  onOpenPopup?: (allSplittingInputs: any[]) => void;
43
46
  onClosePopup?: (allSplittingInputs: any[]) => void;
44
47
  onChangeDate?: (currentData: any) => void;