@true-engineering/true-react-common-ui-kit 4.0.0-alpha28 → 4.0.0-alpha29.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.
- package/dist/components/DateInput/DateInput.d.ts +1 -2
- package/dist/components/DatePicker/DatePicker.d.ts +3 -2
- package/dist/components/DatePicker/components/DatePickerBase/DatePickerBase.d.ts +5 -0
- package/dist/components/DatePicker/components/DatePickerBase/index.d.ts +1 -0
- package/dist/components/DatePicker/components/index.d.ts +1 -0
- package/dist/components/DatePicker/constants.d.ts +7 -2
- package/dist/components/DatePicker/helpers.d.ts +0 -3
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/types.d.ts +1 -3
- package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +1 -1
- package/dist/components/Input/InputBase.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.styles.d.ts +1 -1
- package/dist/hooks/index.d.ts +7 -6
- package/dist/hooks/use-latest-ref.d.ts +2 -0
- package/dist/hooks/use-on-click-outside.d.ts +2 -2
- package/dist/true-react-common-ui-kit.js +393 -265
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +393 -265
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/DateInput/DateInput.tsx +3 -4
- package/src/components/DatePicker/DatePicker.tsx +38 -15
- package/src/components/DatePicker/components/DatePickerBase/DatePickerBase.tsx +14 -0
- package/src/components/DatePicker/components/DatePickerBase/index.ts +1 -0
- package/src/components/DatePicker/components/index.ts +1 -0
- package/src/components/DatePicker/constants.ts +9 -3
- package/src/components/DatePicker/helpers.ts +1 -13
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/DatePicker/types.ts +1 -4
- package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +2 -1
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.ts +5 -0
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.tsx +4 -1
- package/src/components/Input/InputBase.tsx +1 -1
- package/src/components/WithPopup/WithPopup.tsx +7 -6
- package/src/hooks/index.ts +7 -6
- package/src/hooks/use-intersection-ref.ts +4 -4
- package/src/hooks/use-latest-ref.ts +7 -0
- package/src/hooks/use-on-click-outside.ts +22 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { createContext, useMemo, useContext, useInsertionEffect, useRef, useEffect, useCallback, useState, createElement, Fragment as Fragment$1, forwardRef, createRef, PureComponent, memo } from "react";
|
|
2
2
|
import { jss, JssContext as JssContext$1, createUseStyles } from "react-jss";
|
|
3
|
-
import { isNotEmpty, isArrayNotEmpty, mergeStyles, joinStrings, isObject as isObject$1, isStringEmpty, isString, isStringNotEmpty, mergeRefs, addDataTestId, applyAction, addDataAttributes as addDataAttributes$1, stopPropagation, isReactNodeNotEmpty, addClickHandler, getTestId, getSelectKeyHandler, isArrayLikeNotEmpty, getArray, createFilter,
|
|
3
|
+
import { isNotEmpty, isArrayNotEmpty, mergeStyles, joinStrings, isObject as isObject$1, isStringEmpty, isString, isStringNotEmpty, mergeRefs, isFunction as isFunction$1, isEmpty, addDataTestId, applyAction, addDataAttributes as addDataAttributes$1, stopPropagation, isReactNodeNotEmpty, addClickHandler, getTestId, getSelectKeyHandler, isArrayLikeNotEmpty, doNothing, getArray, createFilter, getTransition, indexMap, isNumberInteger, hasDuplicates, isArrayEmpty } from "@true-engineering/true-react-platform-helpers";
|
|
4
4
|
import { merge as merge$2 } from "lodash-es";
|
|
5
5
|
import { CSSTransition } from "react-transition-group";
|
|
6
6
|
import clsx from "clsx";
|
|
@@ -8,10 +8,10 @@ import hexToRgba from "hex-to-rgba";
|
|
|
8
8
|
import { size, useFloating, offset as offset$2, flip as flip$2, arrow as arrow$2, autoUpdate, useHover, safePolygon, useFocus, useClick, useDismiss, useInteractions, useTransitionStatus, FloatingPortal, FloatingArrow } from "@floating-ui/react";
|
|
9
9
|
import InputMask from "react-input-mask";
|
|
10
10
|
import { getYear, getMonth, format, parse, isSameDay, isValid, isAfter, isBefore, startOfMonth, endOfMonth, sub, startOfYear, endOfYear } from "date-fns";
|
|
11
|
+
import ReactDatePicker from "react-datepicker";
|
|
11
12
|
import { Portal } from "react-overlays";
|
|
12
13
|
import { debounce as debounce$1 } from "ts-debounce";
|
|
13
14
|
import scrollIntoViewIfNeeded from "scroll-into-view-if-needed";
|
|
14
|
-
import ReactDatePicker from "react-datepicker";
|
|
15
15
|
import { filesize } from "filesize";
|
|
16
16
|
import { hasFlag } from "country-flag-icons";
|
|
17
17
|
import { RemoveScroll } from "react-remove-scroll";
|
|
@@ -1292,7 +1292,7 @@ function _class_apply_descriptor_set$1(receiver, descriptor, value) {
|
|
|
1292
1292
|
descriptor.value = value;
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
function _class_call_check$
|
|
1295
|
+
function _class_call_check$3(instance, Constructor) {
|
|
1296
1296
|
if (!(instance instanceof Constructor)) {
|
|
1297
1297
|
throw new TypeError("Cannot call a class as a function");
|
|
1298
1298
|
}
|
|
@@ -1333,7 +1333,7 @@ function _create_class$2(Constructor, protoProps, staticProps) {
|
|
|
1333
1333
|
_defineProperties$2(Constructor, staticProps);
|
|
1334
1334
|
return Constructor;
|
|
1335
1335
|
}
|
|
1336
|
-
function _define_property$
|
|
1336
|
+
function _define_property$1d(obj, key, value) {
|
|
1337
1337
|
if (key in obj) {
|
|
1338
1338
|
Object.defineProperty(obj, key, {
|
|
1339
1339
|
value,
|
|
@@ -1394,7 +1394,7 @@ function _object_spread$1a(target) {
|
|
|
1394
1394
|
}));
|
|
1395
1395
|
}
|
|
1396
1396
|
ownKeys2.forEach(function(key) {
|
|
1397
|
-
_define_property$
|
|
1397
|
+
_define_property$1d(target, key, source[key]);
|
|
1398
1398
|
});
|
|
1399
1399
|
}
|
|
1400
1400
|
return target;
|
|
@@ -1425,7 +1425,7 @@ var _map = /* @__PURE__ */ new WeakMap(), _sheet = /* @__PURE__ */ new WeakMap()
|
|
|
1425
1425
|
var TweakStylesManager = /* @__PURE__ */ function() {
|
|
1426
1426
|
function TweakStylesManager2(param) {
|
|
1427
1427
|
var sheet = param.sheet, classes = param.classes, _param_tweak = param.tweak, tweak = _param_tweak === void 0 ? [] : _param_tweak;
|
|
1428
|
-
_class_call_check$
|
|
1428
|
+
_class_call_check$3(this, TweakStylesManager2);
|
|
1429
1429
|
_class_private_field_init$1(this, _map, {
|
|
1430
1430
|
writable: true,
|
|
1431
1431
|
value: /* @__PURE__ */ new WeakMap()
|
|
@@ -1620,7 +1620,7 @@ function _class_apply_descriptor_set(receiver, descriptor, value) {
|
|
|
1620
1620
|
descriptor.value = value;
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
function _class_call_check$
|
|
1623
|
+
function _class_call_check$2(instance, Constructor) {
|
|
1624
1624
|
if (!(instance instanceof Constructor)) {
|
|
1625
1625
|
throw new TypeError("Cannot call a class as a function");
|
|
1626
1626
|
}
|
|
@@ -1661,7 +1661,7 @@ function _create_class$1(Constructor, protoProps, staticProps) {
|
|
|
1661
1661
|
_defineProperties$1(Constructor, staticProps);
|
|
1662
1662
|
return Constructor;
|
|
1663
1663
|
}
|
|
1664
|
-
function _define_property$
|
|
1664
|
+
function _define_property$1c(obj, key, value) {
|
|
1665
1665
|
if (key in obj) {
|
|
1666
1666
|
Object.defineProperty(obj, key, {
|
|
1667
1667
|
value,
|
|
@@ -1684,7 +1684,7 @@ function _object_spread$19(target) {
|
|
|
1684
1684
|
}));
|
|
1685
1685
|
}
|
|
1686
1686
|
ownKeys2.forEach(function(key) {
|
|
1687
|
-
_define_property$
|
|
1687
|
+
_define_property$1c(target, key, source[key]);
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
1690
1690
|
return target;
|
|
@@ -1694,7 +1694,7 @@ var _styleSheetMap = /* @__PURE__ */ new WeakMap(), _styles = /* @__PURE__ */ ne
|
|
|
1694
1694
|
var ThemedStylesManager = /* @__PURE__ */ function() {
|
|
1695
1695
|
function ThemedStylesManager2(param) {
|
|
1696
1696
|
var styles = param.styles, name = param.name;
|
|
1697
|
-
_class_call_check$
|
|
1697
|
+
_class_call_check$2(this, ThemedStylesManager2);
|
|
1698
1698
|
_class_private_field_init(this, _styleSheetMap, {
|
|
1699
1699
|
writable: true,
|
|
1700
1700
|
value: /* @__PURE__ */ new Map()
|
|
@@ -1797,7 +1797,7 @@ var ThemedStylesManager = /* @__PURE__ */ function() {
|
|
|
1797
1797
|
]);
|
|
1798
1798
|
return ThemedStylesManager2;
|
|
1799
1799
|
}();
|
|
1800
|
-
function _define_property$
|
|
1800
|
+
function _define_property$1b(obj, key, value) {
|
|
1801
1801
|
if (key in obj) {
|
|
1802
1802
|
Object.defineProperty(obj, key, {
|
|
1803
1803
|
value,
|
|
@@ -1820,7 +1820,7 @@ function _object_spread$18(target) {
|
|
|
1820
1820
|
}));
|
|
1821
1821
|
}
|
|
1822
1822
|
ownKeys2.forEach(function(key) {
|
|
1823
|
-
_define_property$
|
|
1823
|
+
_define_property$1b(target, key, source[key]);
|
|
1824
1824
|
});
|
|
1825
1825
|
}
|
|
1826
1826
|
return target;
|
|
@@ -1893,7 +1893,7 @@ function _array_with_holes$q(arr) {
|
|
|
1893
1893
|
if (Array.isArray(arr))
|
|
1894
1894
|
return arr;
|
|
1895
1895
|
}
|
|
1896
|
-
function _define_property$
|
|
1896
|
+
function _define_property$1a(obj, key, value) {
|
|
1897
1897
|
if (key in obj) {
|
|
1898
1898
|
Object.defineProperty(obj, key, {
|
|
1899
1899
|
value,
|
|
@@ -1947,7 +1947,7 @@ function _object_spread$17(target) {
|
|
|
1947
1947
|
}));
|
|
1948
1948
|
}
|
|
1949
1949
|
ownKeys2.forEach(function(key) {
|
|
1950
|
-
_define_property$
|
|
1950
|
+
_define_property$1a(target, key, source[key]);
|
|
1951
1951
|
});
|
|
1952
1952
|
}
|
|
1953
1953
|
return target;
|
|
@@ -5048,68 +5048,22 @@ var addDataAttributes = function() {
|
|
|
5048
5048
|
] : [];
|
|
5049
5049
|
}));
|
|
5050
5050
|
};
|
|
5051
|
-
var
|
|
5052
|
-
var
|
|
5051
|
+
var useDidMountEffect = function(effect3, dependencies) {
|
|
5052
|
+
var isMountedRef = useRef(false);
|
|
5053
5053
|
useEffect(function() {
|
|
5054
|
-
|
|
5054
|
+
var unmount;
|
|
5055
|
+
if (isMountedRef.current) {
|
|
5056
|
+
unmount = effect3();
|
|
5057
|
+
} else {
|
|
5058
|
+
isMountedRef.current = true;
|
|
5059
|
+
}
|
|
5055
5060
|
return function() {
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
}, []);
|
|
5059
|
-
return useCallback(function() {
|
|
5060
|
-
return isMounted.current;
|
|
5061
|
-
}, []);
|
|
5062
|
-
};
|
|
5063
|
-
var checkElementParentsClassNames = function(element, className) {
|
|
5064
|
-
if (element.classList.contains(className)) {
|
|
5065
|
-
return true;
|
|
5066
|
-
}
|
|
5067
|
-
if (element === document.body) {
|
|
5068
|
-
return false;
|
|
5069
|
-
}
|
|
5070
|
-
if (element.parentElement) {
|
|
5071
|
-
return checkElementParentsClassNames(element.parentElement, className);
|
|
5072
|
-
}
|
|
5073
|
-
return false;
|
|
5074
|
-
};
|
|
5075
|
-
var isElementOneOfParents = function(element, elToSearch) {
|
|
5076
|
-
if (element === elToSearch) {
|
|
5077
|
-
return true;
|
|
5078
|
-
}
|
|
5079
|
-
if (element === document.body) {
|
|
5080
|
-
return false;
|
|
5081
|
-
}
|
|
5082
|
-
if (element.parentElement) {
|
|
5083
|
-
return isElementOneOfParents(element.parentElement, elToSearch);
|
|
5084
|
-
}
|
|
5085
|
-
return false;
|
|
5086
|
-
};
|
|
5087
|
-
function useOnClickOutsideWithRef(ref, handler, ignoreRef) {
|
|
5088
|
-
useOnClickOutside(ref, handler, void 0, ignoreRef);
|
|
5089
|
-
}
|
|
5090
|
-
function useOnClickOutside(ref, handler, ignoreClassName, ignoreRef) {
|
|
5091
|
-
useEffect(function() {
|
|
5092
|
-
var listener = function(event) {
|
|
5093
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
5094
|
-
return;
|
|
5095
|
-
}
|
|
5096
|
-
if (ignoreClassName !== void 0 && checkElementParentsClassNames(event.target, ignoreClassName) || ignoreRef !== void 0 && ignoreRef.current !== null && isElementOneOfParents(event.target, ignoreRef.current)) {
|
|
5097
|
-
return;
|
|
5061
|
+
if (unmount !== void 0) {
|
|
5062
|
+
unmount();
|
|
5098
5063
|
}
|
|
5099
|
-
handler(event);
|
|
5100
|
-
};
|
|
5101
|
-
document.addEventListener("mousedown", listener);
|
|
5102
|
-
document.addEventListener("touchstart", listener);
|
|
5103
|
-
return function() {
|
|
5104
|
-
document.removeEventListener("mousedown", listener);
|
|
5105
|
-
document.removeEventListener("touchstart", listener);
|
|
5106
5064
|
};
|
|
5107
|
-
},
|
|
5108
|
-
|
|
5109
|
-
handler,
|
|
5110
|
-
ignoreClassName
|
|
5111
|
-
]);
|
|
5112
|
-
}
|
|
5065
|
+
}, dependencies);
|
|
5066
|
+
};
|
|
5113
5067
|
function _extends$1() {
|
|
5114
5068
|
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
5115
5069
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -6578,7 +6532,7 @@ function _array_without_holes$a(arr) {
|
|
|
6578
6532
|
if (Array.isArray(arr))
|
|
6579
6533
|
return _array_like_to_array$p(arr);
|
|
6580
6534
|
}
|
|
6581
|
-
function _define_property$
|
|
6535
|
+
function _define_property$19(obj, key, value) {
|
|
6582
6536
|
if (key in obj) {
|
|
6583
6537
|
Object.defineProperty(obj, key, {
|
|
6584
6538
|
value,
|
|
@@ -6608,7 +6562,7 @@ function _object_spread$16(target) {
|
|
|
6608
6562
|
}));
|
|
6609
6563
|
}
|
|
6610
6564
|
ownKeys2.forEach(function(key) {
|
|
6611
|
-
_define_property$
|
|
6565
|
+
_define_property$19(target, key, source[key]);
|
|
6612
6566
|
});
|
|
6613
6567
|
}
|
|
6614
6568
|
return target;
|
|
@@ -6683,6 +6637,11 @@ var useDropdown = function(param) {
|
|
|
6683
6637
|
}, dependenciesForPositionUpdating);
|
|
6684
6638
|
return popperData;
|
|
6685
6639
|
};
|
|
6640
|
+
var useLatestRef = function(value) {
|
|
6641
|
+
var ref = useRef(value);
|
|
6642
|
+
ref.current = value;
|
|
6643
|
+
return ref;
|
|
6644
|
+
};
|
|
6686
6645
|
function _array_like_to_array$o(arr, len) {
|
|
6687
6646
|
if (len == null || len > arr.length)
|
|
6688
6647
|
len = arr.length;
|
|
@@ -6694,25 +6653,39 @@ function _array_with_holes$o(arr) {
|
|
|
6694
6653
|
if (Array.isArray(arr))
|
|
6695
6654
|
return arr;
|
|
6696
6655
|
}
|
|
6697
|
-
function
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6656
|
+
function _iterable_to_array_limit$n(arr, i) {
|
|
6657
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
6658
|
+
if (_i == null)
|
|
6659
|
+
return;
|
|
6660
|
+
var _arr = [];
|
|
6661
|
+
var _n = true;
|
|
6662
|
+
var _d = false;
|
|
6663
|
+
var _s, _e;
|
|
6664
|
+
try {
|
|
6665
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
6666
|
+
_arr.push(_s.value);
|
|
6667
|
+
if (i && _arr.length === i)
|
|
6668
|
+
break;
|
|
6669
|
+
}
|
|
6670
|
+
} catch (err) {
|
|
6671
|
+
_d = true;
|
|
6672
|
+
_e = err;
|
|
6673
|
+
} finally {
|
|
6674
|
+
try {
|
|
6675
|
+
if (!_n && _i["return"] != null)
|
|
6676
|
+
_i["return"]();
|
|
6677
|
+
} finally {
|
|
6678
|
+
if (_d)
|
|
6679
|
+
throw _e;
|
|
6680
|
+
}
|
|
6681
|
+
}
|
|
6682
|
+
return _arr;
|
|
6704
6683
|
}
|
|
6705
6684
|
function _non_iterable_rest$o() {
|
|
6706
6685
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6707
6686
|
}
|
|
6708
|
-
function
|
|
6709
|
-
|
|
6710
|
-
}
|
|
6711
|
-
function _to_array(arr) {
|
|
6712
|
-
return _array_with_holes$o(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_rest$o();
|
|
6713
|
-
}
|
|
6714
|
-
function _to_consumable_array$9(arr) {
|
|
6715
|
-
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$9();
|
|
6687
|
+
function _sliced_to_array$n(arr, i) {
|
|
6688
|
+
return _array_with_holes$o(arr) || _iterable_to_array_limit$n(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$o();
|
|
6716
6689
|
}
|
|
6717
6690
|
function _unsupported_iterable_to_array$o(o, minLen) {
|
|
6718
6691
|
if (!o)
|
|
@@ -6727,64 +6700,41 @@ function _unsupported_iterable_to_array$o(o, minLen) {
|
|
|
6727
6700
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
6728
6701
|
return _array_like_to_array$o(o, minLen);
|
|
6729
6702
|
}
|
|
6730
|
-
var
|
|
6731
|
-
var
|
|
6732
|
-
var theme = useTheme();
|
|
6733
|
-
var isMergeDisabled = isNotEmpty(useContext(JssContext).tweakStylesArch);
|
|
6703
|
+
var useIntersectionRef = function(options) {
|
|
6704
|
+
var optionsRef = useLatestRef(options);
|
|
6734
6705
|
return useMemo(function() {
|
|
6735
|
-
var
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
}
|
|
6753
|
-
if (!areStylesThemed(maybeInnerStyles)) {
|
|
6754
|
-
themedStyles(maybeInnerStyles, maybeThemeStyles);
|
|
6755
|
-
}
|
|
6756
|
-
return [
|
|
6757
|
-
maybeInnerStyles
|
|
6758
|
-
];
|
|
6706
|
+
var observer = new IntersectionObserver(function(param) {
|
|
6707
|
+
var _param = _sliced_to_array$n(param, 1), isIntersecting = _param[0].isIntersecting;
|
|
6708
|
+
var current = optionsRef.current;
|
|
6709
|
+
if (current === null || current === void 0 ? void 0 : current.isDisabled) {
|
|
6710
|
+
return;
|
|
6711
|
+
}
|
|
6712
|
+
if (isIntersecting) {
|
|
6713
|
+
var _current_onIntersection;
|
|
6714
|
+
current === null || current === void 0 ? void 0 : (_current_onIntersection = current.onIntersection) === null || _current_onIntersection === void 0 ? void 0 : _current_onIntersection.call(current);
|
|
6715
|
+
} else {
|
|
6716
|
+
var _current_onIntersectionEnd;
|
|
6717
|
+
current === null || current === void 0 ? void 0 : (_current_onIntersectionEnd = current.onIntersectionEnd) === null || _current_onIntersectionEnd === void 0 ? void 0 : _current_onIntersectionEnd.call(current);
|
|
6718
|
+
}
|
|
6719
|
+
});
|
|
6720
|
+
return function(node) {
|
|
6721
|
+
return isNotEmpty(node) ? observer.observe(node) : observer.disconnect();
|
|
6722
|
+
};
|
|
6759
6723
|
}, [
|
|
6760
|
-
|
|
6761
|
-
className,
|
|
6762
|
-
currentComponentName,
|
|
6763
|
-
tweakStyles,
|
|
6764
|
-
theme,
|
|
6765
|
-
isMergeDisabled
|
|
6724
|
+
optionsRef
|
|
6766
6725
|
]);
|
|
6767
6726
|
};
|
|
6768
|
-
var
|
|
6769
|
-
var
|
|
6727
|
+
var useIsMounted = function() {
|
|
6728
|
+
var isMounted = useRef(false);
|
|
6770
6729
|
useEffect(function() {
|
|
6771
|
-
|
|
6772
|
-
if (isMountedRef.current) {
|
|
6773
|
-
unmount = effect3();
|
|
6774
|
-
} else {
|
|
6775
|
-
isMountedRef.current = true;
|
|
6776
|
-
}
|
|
6730
|
+
isMounted.current = true;
|
|
6777
6731
|
return function() {
|
|
6778
|
-
|
|
6779
|
-
unmount();
|
|
6780
|
-
}
|
|
6732
|
+
isMounted.current = false;
|
|
6781
6733
|
};
|
|
6782
|
-
},
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
return mergeRefs(refs);
|
|
6787
|
-
}, refs);
|
|
6734
|
+
}, []);
|
|
6735
|
+
return useCallback(function() {
|
|
6736
|
+
return isMounted.current;
|
|
6737
|
+
}, []);
|
|
6788
6738
|
};
|
|
6789
6739
|
var useMerge = function(one, two) {
|
|
6790
6740
|
return useMemo(function() {
|
|
@@ -6794,6 +6744,68 @@ var useMerge = function(one, two) {
|
|
|
6794
6744
|
two
|
|
6795
6745
|
]);
|
|
6796
6746
|
};
|
|
6747
|
+
var useMergedRefs = function(refs) {
|
|
6748
|
+
return useMemo(function() {
|
|
6749
|
+
return mergeRefs(refs);
|
|
6750
|
+
}, refs);
|
|
6751
|
+
};
|
|
6752
|
+
var checkElementParentsClassNames = function(element, className) {
|
|
6753
|
+
if (element.classList.contains(className)) {
|
|
6754
|
+
return true;
|
|
6755
|
+
}
|
|
6756
|
+
if (element === document.body) {
|
|
6757
|
+
return false;
|
|
6758
|
+
}
|
|
6759
|
+
if (element.parentElement) {
|
|
6760
|
+
return checkElementParentsClassNames(element.parentElement, className);
|
|
6761
|
+
}
|
|
6762
|
+
return false;
|
|
6763
|
+
};
|
|
6764
|
+
var isElementOneOfParents = function(element, elToSearch) {
|
|
6765
|
+
if (element === elToSearch) {
|
|
6766
|
+
return true;
|
|
6767
|
+
}
|
|
6768
|
+
if (element === document.body) {
|
|
6769
|
+
return false;
|
|
6770
|
+
}
|
|
6771
|
+
if (element.parentElement) {
|
|
6772
|
+
return isElementOneOfParents(element.parentElement, elToSearch);
|
|
6773
|
+
}
|
|
6774
|
+
return false;
|
|
6775
|
+
};
|
|
6776
|
+
function useOnClickOutsideWithRef(refOrGetter, handler, ignoreRef) {
|
|
6777
|
+
useOnClickOutside(refOrGetter, handler, void 0, ignoreRef);
|
|
6778
|
+
}
|
|
6779
|
+
function useOnClickOutside(refOrGetter, handler, ignoreClassName, ignoreRef) {
|
|
6780
|
+
var optionsRef = useLatestRef({
|
|
6781
|
+
refOrGetter,
|
|
6782
|
+
ignoreRef,
|
|
6783
|
+
ignoreClassName,
|
|
6784
|
+
handler
|
|
6785
|
+
});
|
|
6786
|
+
useEffect(function() {
|
|
6787
|
+
var listener = function(event) {
|
|
6788
|
+
var _options_refOrGetter, _options_ignoreRef;
|
|
6789
|
+
var options = optionsRef.current;
|
|
6790
|
+
var elem = isFunction$1(options.refOrGetter) ? options.refOrGetter() : (_options_refOrGetter = options.refOrGetter) === null || _options_refOrGetter === void 0 ? void 0 : _options_refOrGetter.current;
|
|
6791
|
+
var ignoreElem = (_options_ignoreRef = options.ignoreRef) === null || _options_ignoreRef === void 0 ? void 0 : _options_ignoreRef.current;
|
|
6792
|
+
var target = event.target;
|
|
6793
|
+
if (isEmpty(elem) || // Do nothing if clicking ref's element or descendent elements
|
|
6794
|
+
elem.contains(target) || isNotEmpty(options.ignoreClassName) && checkElementParentsClassNames(target, options.ignoreClassName) || isNotEmpty(ignoreElem) && isElementOneOfParents(target, ignoreElem)) {
|
|
6795
|
+
return;
|
|
6796
|
+
}
|
|
6797
|
+
options.handler(event);
|
|
6798
|
+
};
|
|
6799
|
+
document.addEventListener("mousedown", listener);
|
|
6800
|
+
document.addEventListener("touchstart", listener);
|
|
6801
|
+
return function() {
|
|
6802
|
+
document.removeEventListener("mousedown", listener);
|
|
6803
|
+
document.removeEventListener("touchstart", listener);
|
|
6804
|
+
};
|
|
6805
|
+
}, [
|
|
6806
|
+
optionsRef
|
|
6807
|
+
]);
|
|
6808
|
+
}
|
|
6797
6809
|
function _array_like_to_array$n(arr, len) {
|
|
6798
6810
|
if (len == null || len > arr.length)
|
|
6799
6811
|
len = arr.length;
|
|
@@ -6805,39 +6817,25 @@ function _array_with_holes$n(arr) {
|
|
|
6805
6817
|
if (Array.isArray(arr))
|
|
6806
6818
|
return arr;
|
|
6807
6819
|
}
|
|
6808
|
-
function
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
var _s, _e;
|
|
6816
|
-
try {
|
|
6817
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
6818
|
-
_arr.push(_s.value);
|
|
6819
|
-
if (i && _arr.length === i)
|
|
6820
|
-
break;
|
|
6821
|
-
}
|
|
6822
|
-
} catch (err) {
|
|
6823
|
-
_d = true;
|
|
6824
|
-
_e = err;
|
|
6825
|
-
} finally {
|
|
6826
|
-
try {
|
|
6827
|
-
if (!_n && _i["return"] != null)
|
|
6828
|
-
_i["return"]();
|
|
6829
|
-
} finally {
|
|
6830
|
-
if (_d)
|
|
6831
|
-
throw _e;
|
|
6832
|
-
}
|
|
6833
|
-
}
|
|
6834
|
-
return _arr;
|
|
6820
|
+
function _array_without_holes$9(arr) {
|
|
6821
|
+
if (Array.isArray(arr))
|
|
6822
|
+
return _array_like_to_array$n(arr);
|
|
6823
|
+
}
|
|
6824
|
+
function _iterable_to_array$9(iter) {
|
|
6825
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
6826
|
+
return Array.from(iter);
|
|
6835
6827
|
}
|
|
6836
6828
|
function _non_iterable_rest$n() {
|
|
6837
6829
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6838
6830
|
}
|
|
6839
|
-
function
|
|
6840
|
-
|
|
6831
|
+
function _non_iterable_spread$9() {
|
|
6832
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6833
|
+
}
|
|
6834
|
+
function _to_array(arr) {
|
|
6835
|
+
return _array_with_holes$n(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_rest$n();
|
|
6836
|
+
}
|
|
6837
|
+
function _to_consumable_array$9(arr) {
|
|
6838
|
+
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_spread$9();
|
|
6841
6839
|
}
|
|
6842
6840
|
function _unsupported_iterable_to_array$n(o, minLen) {
|
|
6843
6841
|
if (!o)
|
|
@@ -6852,28 +6850,43 @@ function _unsupported_iterable_to_array$n(o, minLen) {
|
|
|
6852
6850
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
6853
6851
|
return _array_like_to_array$n(o, minLen);
|
|
6854
6852
|
}
|
|
6855
|
-
var
|
|
6856
|
-
var
|
|
6857
|
-
|
|
6853
|
+
var useTweakStyles = function(param) {
|
|
6854
|
+
var innerStyles = param.innerStyles, tweakStyles = param.tweakStyles, className = param.className, currentComponentName = param.currentComponentName;
|
|
6855
|
+
var theme = useTheme();
|
|
6856
|
+
var isMergeDisabled = isNotEmpty(useContext(JssContext).tweakStylesArch);
|
|
6858
6857
|
return useMemo(function() {
|
|
6859
|
-
var
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6858
|
+
var _theme_components;
|
|
6859
|
+
var themeStyles = isNotEmpty(currentComponentName) ? (_theme_components = theme.components) === null || _theme_components === void 0 ? void 0 : _theme_components[currentComponentName] : void 0;
|
|
6860
|
+
var resultStyles = mixStyles(innerStyles, mixStyles(themeStyles, tweakStyles).map(function(style) {
|
|
6861
|
+
return style[className];
|
|
6862
|
+
}));
|
|
6863
|
+
if (isMergeDisabled || resultStyles.length < 2) {
|
|
6864
|
+
return resultStyles;
|
|
6865
|
+
}
|
|
6866
|
+
var _resultStyles = _to_array(resultStyles), maybeInnerStyles = _resultStyles[0], maybeThemeStyles = _resultStyles[1], rest = _resultStyles.slice(2);
|
|
6867
|
+
if (maybeThemeStyles !== (themeStyles === null || themeStyles === void 0 ? void 0 : themeStyles[className]) || // Если нет themeStyles или innerStyles
|
|
6868
|
+
isArrayNotEmpty(rest)) {
|
|
6869
|
+
return [
|
|
6870
|
+
mergeStyles.apply(void 0, [
|
|
6871
|
+
maybeInnerStyles,
|
|
6872
|
+
maybeThemeStyles
|
|
6873
|
+
].concat(_to_consumable_array$9(rest)))
|
|
6874
|
+
];
|
|
6875
|
+
}
|
|
6876
|
+
if (!areStylesThemed(maybeInnerStyles)) {
|
|
6877
|
+
themedStyles(maybeInnerStyles, maybeThemeStyles);
|
|
6878
|
+
}
|
|
6879
|
+
return [
|
|
6880
|
+
maybeInnerStyles
|
|
6881
|
+
];
|
|
6882
|
+
}, [
|
|
6883
|
+
innerStyles,
|
|
6884
|
+
className,
|
|
6885
|
+
currentComponentName,
|
|
6886
|
+
tweakStyles,
|
|
6887
|
+
theme,
|
|
6888
|
+
isMergeDisabled
|
|
6889
|
+
]);
|
|
6877
6890
|
};
|
|
6878
6891
|
const avatarGreen = ` <svg
|
|
6879
6892
|
width="100%"
|
|
@@ -6950,7 +6963,7 @@ var complexIcons = {
|
|
|
6950
6963
|
"file-xml": fileXml,
|
|
6951
6964
|
"file-zip": fileZip
|
|
6952
6965
|
};
|
|
6953
|
-
function _define_property$
|
|
6966
|
+
function _define_property$18(obj, key, value) {
|
|
6954
6967
|
if (key in obj) {
|
|
6955
6968
|
Object.defineProperty(obj, key, {
|
|
6956
6969
|
value,
|
|
@@ -6973,7 +6986,7 @@ function _object_spread$15(target) {
|
|
|
6973
6986
|
}));
|
|
6974
6987
|
}
|
|
6975
6988
|
ownKeys2.forEach(function(key) {
|
|
6976
|
-
_define_property$
|
|
6989
|
+
_define_property$18(target, key, source[key]);
|
|
6977
6990
|
});
|
|
6978
6991
|
}
|
|
6979
6992
|
return target;
|
|
@@ -7853,7 +7866,7 @@ var iconsList = checkIcons({
|
|
|
7853
7866
|
]
|
|
7854
7867
|
}
|
|
7855
7868
|
});
|
|
7856
|
-
function _define_property$
|
|
7869
|
+
function _define_property$17(obj, key, value) {
|
|
7857
7870
|
if (key in obj) {
|
|
7858
7871
|
Object.defineProperty(obj, key, {
|
|
7859
7872
|
value,
|
|
@@ -7876,7 +7889,7 @@ function _object_spread$14(target) {
|
|
|
7876
7889
|
}));
|
|
7877
7890
|
}
|
|
7878
7891
|
ownKeys2.forEach(function(key) {
|
|
7879
|
-
_define_property$
|
|
7892
|
+
_define_property$17(target, key, source[key]);
|
|
7880
7893
|
});
|
|
7881
7894
|
}
|
|
7882
7895
|
return target;
|
|
@@ -7949,7 +7962,7 @@ var useStyles$W = createThemedStyles("Icon", {
|
|
|
7949
7962
|
alignItems: "center"
|
|
7950
7963
|
}
|
|
7951
7964
|
});
|
|
7952
|
-
function _define_property$
|
|
7965
|
+
function _define_property$16(obj, key, value) {
|
|
7953
7966
|
if (key in obj) {
|
|
7954
7967
|
Object.defineProperty(obj, key, {
|
|
7955
7968
|
value,
|
|
@@ -7972,7 +7985,7 @@ function _object_spread$13(target) {
|
|
|
7972
7985
|
}));
|
|
7973
7986
|
}
|
|
7974
7987
|
ownKeys2.forEach(function(key) {
|
|
7975
|
-
_define_property$
|
|
7988
|
+
_define_property$16(target, key, source[key]);
|
|
7976
7989
|
});
|
|
7977
7990
|
}
|
|
7978
7991
|
return target;
|
|
@@ -8077,7 +8090,7 @@ function _array_without_holes$8(arr) {
|
|
|
8077
8090
|
if (Array.isArray(arr))
|
|
8078
8091
|
return _array_like_to_array$m(arr);
|
|
8079
8092
|
}
|
|
8080
|
-
function _define_property$
|
|
8093
|
+
function _define_property$15(obj, key, value) {
|
|
8081
8094
|
if (key in obj) {
|
|
8082
8095
|
Object.defineProperty(obj, key, {
|
|
8083
8096
|
value,
|
|
@@ -8138,7 +8151,7 @@ function _object_spread$12(target) {
|
|
|
8138
8151
|
}));
|
|
8139
8152
|
}
|
|
8140
8153
|
ownKeys2.forEach(function(key) {
|
|
8141
|
-
_define_property$
|
|
8154
|
+
_define_property$15(target, key, source[key]);
|
|
8142
8155
|
});
|
|
8143
8156
|
}
|
|
8144
8157
|
return target;
|
|
@@ -8192,17 +8205,18 @@ var WithPopup = function(param) {
|
|
|
8192
8205
|
theme: tweakStyles
|
|
8193
8206
|
});
|
|
8194
8207
|
var _useState = _sliced_to_array$m(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
8208
|
+
var isActive = isOpen && !isDisabled;
|
|
8195
8209
|
var arrowRef = useRef(null);
|
|
8196
|
-
var handleToggle = function(
|
|
8210
|
+
var handleToggle = function(next, event) {
|
|
8197
8211
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
8198
|
-
onToggle === null || onToggle === void 0 ? void 0 : onToggle(
|
|
8199
|
-
setIsOpen(
|
|
8212
|
+
onToggle === null || onToggle === void 0 ? void 0 : onToggle(next, event);
|
|
8213
|
+
setIsOpen(next);
|
|
8200
8214
|
};
|
|
8201
8215
|
var handleClose = function(event) {
|
|
8202
8216
|
handleToggle(false, event);
|
|
8203
8217
|
};
|
|
8204
8218
|
var _useFloating = useFloating({
|
|
8205
|
-
open:
|
|
8219
|
+
open: isActive,
|
|
8206
8220
|
middleware: [
|
|
8207
8221
|
offset$2(popupOffset),
|
|
8208
8222
|
canBeFlipped && flip$2({
|
|
@@ -8255,7 +8269,7 @@ var WithPopup = function(param) {
|
|
|
8255
8269
|
var triggerElement = applyAction(trigger, {
|
|
8256
8270
|
referenceProps: !isTriggerWrapped ? referenceProps : void 0,
|
|
8257
8271
|
triggerProps: _object_spread$12({
|
|
8258
|
-
isActive
|
|
8272
|
+
isActive,
|
|
8259
8273
|
isDisabled
|
|
8260
8274
|
}, !isTriggerWrapped && _object_spread$12({
|
|
8261
8275
|
data,
|
|
@@ -8266,7 +8280,7 @@ var WithPopup = function(param) {
|
|
|
8266
8280
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
8267
8281
|
children: [
|
|
8268
8282
|
isTriggerWrapped ? /* @__PURE__ */ jsx("div", _object_spread_props$S(_object_spread$12({
|
|
8269
|
-
className: clsx(classes.trigger, (_obj2 = {}, _define_property$
|
|
8283
|
+
className: clsx(classes.trigger, (_obj2 = {}, _define_property$15(_obj2, classes.clickable, eventType === "click"), _define_property$15(_obj2, classes.disabled, isDisabled), _define_property$15(_obj2, classes.active, isActive), _obj2))
|
|
8270
8284
|
}, referenceProps, addDataAttributes$1(data, testId)), {
|
|
8271
8285
|
children: triggerElement
|
|
8272
8286
|
})) : triggerElement,
|
|
@@ -8338,7 +8352,7 @@ var useStyles$U = createThemedStyles("ListItem", {
|
|
|
8338
8352
|
flexGrow: 1
|
|
8339
8353
|
}
|
|
8340
8354
|
});
|
|
8341
|
-
function _define_property$
|
|
8355
|
+
function _define_property$14(obj, key, value) {
|
|
8342
8356
|
if (key in obj) {
|
|
8343
8357
|
Object.defineProperty(obj, key, {
|
|
8344
8358
|
value,
|
|
@@ -8361,7 +8375,7 @@ function _object_spread$11(target) {
|
|
|
8361
8375
|
}));
|
|
8362
8376
|
}
|
|
8363
8377
|
ownKeys2.forEach(function(key) {
|
|
8364
|
-
_define_property$
|
|
8378
|
+
_define_property$14(target, key, source[key]);
|
|
8365
8379
|
});
|
|
8366
8380
|
}
|
|
8367
8381
|
return target;
|
|
@@ -8402,7 +8416,7 @@ var ListItem = function(param) {
|
|
|
8402
8416
|
className: classes.spacer
|
|
8403
8417
|
}),
|
|
8404
8418
|
/* @__PURE__ */ jsxs("div", _object_spread_props$R(_object_spread$11({
|
|
8405
|
-
className: clsx(classes.root, classes[view], (_obj2 = {}, _define_property$
|
|
8419
|
+
className: clsx(classes.root, classes[view], (_obj2 = {}, _define_property$14(_obj2, classes.disabledItem, isDisabled), _define_property$14(_obj2, classes.withIconGap, withIconGap), _define_property$14(_obj2, classes.focused, isFocused), _obj2))
|
|
8406
8420
|
}, addClickHandler(onClick, !isDisabled), addDataTestId(testId), addDataAttributes(_object_spread_props$R(_object_spread$11({}, data), {
|
|
8407
8421
|
disabled: isDisabled ? true : void 0
|
|
8408
8422
|
}))), {
|
|
@@ -8450,7 +8464,7 @@ var withPopupStyles$1 = {
|
|
|
8450
8464
|
width: "100%"
|
|
8451
8465
|
}
|
|
8452
8466
|
};
|
|
8453
|
-
function _define_property$
|
|
8467
|
+
function _define_property$13(obj, key, value) {
|
|
8454
8468
|
if (key in obj) {
|
|
8455
8469
|
Object.defineProperty(obj, key, {
|
|
8456
8470
|
value,
|
|
@@ -8473,7 +8487,7 @@ function _object_spread$10(target) {
|
|
|
8473
8487
|
}));
|
|
8474
8488
|
}
|
|
8475
8489
|
ownKeys2.forEach(function(key) {
|
|
8476
|
-
_define_property$
|
|
8490
|
+
_define_property$13(target, key, source[key]);
|
|
8477
8491
|
});
|
|
8478
8492
|
}
|
|
8479
8493
|
return target;
|
|
@@ -8557,7 +8571,7 @@ var List = function(param) {
|
|
|
8557
8571
|
}));
|
|
8558
8572
|
};
|
|
8559
8573
|
var ANIMATION_TIMEOUT = 150;
|
|
8560
|
-
function _define_property$
|
|
8574
|
+
function _define_property$12(obj, key, value) {
|
|
8561
8575
|
if (key in obj) {
|
|
8562
8576
|
Object.defineProperty(obj, key, {
|
|
8563
8577
|
value,
|
|
@@ -8580,7 +8594,7 @@ function _object_spread$$(target) {
|
|
|
8580
8594
|
}));
|
|
8581
8595
|
}
|
|
8582
8596
|
ownKeys2.forEach(function(key) {
|
|
8583
|
-
_define_property$
|
|
8597
|
+
_define_property$12(target, key, source[key]);
|
|
8584
8598
|
});
|
|
8585
8599
|
}
|
|
8586
8600
|
return target;
|
|
@@ -8639,7 +8653,7 @@ function _array_with_holes$l(arr) {
|
|
|
8639
8653
|
if (Array.isArray(arr))
|
|
8640
8654
|
return arr;
|
|
8641
8655
|
}
|
|
8642
|
-
function _define_property$
|
|
8656
|
+
function _define_property$11(obj, key, value) {
|
|
8643
8657
|
if (key in obj) {
|
|
8644
8658
|
Object.defineProperty(obj, key, {
|
|
8645
8659
|
value,
|
|
@@ -8693,7 +8707,7 @@ function _object_spread$_(target) {
|
|
|
8693
8707
|
}));
|
|
8694
8708
|
}
|
|
8695
8709
|
ownKeys2.forEach(function(key) {
|
|
8696
|
-
_define_property$
|
|
8710
|
+
_define_property$11(target, key, source[key]);
|
|
8697
8711
|
});
|
|
8698
8712
|
}
|
|
8699
8713
|
return target;
|
|
@@ -8836,7 +8850,7 @@ var useStyles$R = createThemedStyles("AddButton", {
|
|
|
8836
8850
|
width: "100%"
|
|
8837
8851
|
}
|
|
8838
8852
|
});
|
|
8839
|
-
function _define_property
|
|
8853
|
+
function _define_property$10(obj, key, value) {
|
|
8840
8854
|
if (key in obj) {
|
|
8841
8855
|
Object.defineProperty(obj, key, {
|
|
8842
8856
|
value,
|
|
@@ -8859,7 +8873,7 @@ function _object_spread$Z(target) {
|
|
|
8859
8873
|
}));
|
|
8860
8874
|
}
|
|
8861
8875
|
ownKeys2.forEach(function(key) {
|
|
8862
|
-
_define_property
|
|
8876
|
+
_define_property$10(target, key, source[key]);
|
|
8863
8877
|
});
|
|
8864
8878
|
}
|
|
8865
8879
|
return target;
|
|
@@ -9059,7 +9073,7 @@ var useStyles$O = createThemedStyles("ThemedPreloader", {
|
|
|
9059
9073
|
color: "currentColor"
|
|
9060
9074
|
}
|
|
9061
9075
|
});
|
|
9062
|
-
function _define_property
|
|
9076
|
+
function _define_property$$(obj, key, value) {
|
|
9063
9077
|
if (key in obj) {
|
|
9064
9078
|
Object.defineProperty(obj, key, {
|
|
9065
9079
|
value,
|
|
@@ -9082,7 +9096,7 @@ function _object_spread$Y(target) {
|
|
|
9082
9096
|
}));
|
|
9083
9097
|
}
|
|
9084
9098
|
ownKeys2.forEach(function(key) {
|
|
9085
|
-
_define_property
|
|
9099
|
+
_define_property$$(target, key, source[key]);
|
|
9086
9100
|
});
|
|
9087
9101
|
}
|
|
9088
9102
|
return target;
|
|
@@ -9127,7 +9141,7 @@ var ThemedPreloader = function(param) {
|
|
|
9127
9141
|
currentComponentName: "ThemedPreloader"
|
|
9128
9142
|
});
|
|
9129
9143
|
return /* @__PURE__ */ jsx("div", _object_spread_props$N(_object_spread$Y({
|
|
9130
|
-
className: clsx(classes.root, classes[type], _define_property
|
|
9144
|
+
className: clsx(classes.root, classes[type], _define_property$$({}, classes.currentColor, useCurrentColor))
|
|
9131
9145
|
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
9132
9146
|
children: type === "dots" ? /* @__PURE__ */ jsx(DotsPreloader, {
|
|
9133
9147
|
tweakStyles: tweakDotsPreloaderStyles
|
|
@@ -9308,7 +9322,7 @@ var dotsPreloaderStyles = {
|
|
|
9308
9322
|
var getPreloaderStyles = function(size2) {
|
|
9309
9323
|
return size2 === "s" || size2 === "m" ? dotsPreloaderStyles : void 0;
|
|
9310
9324
|
};
|
|
9311
|
-
function _define_property$
|
|
9325
|
+
function _define_property$_(obj, key, value) {
|
|
9312
9326
|
if (key in obj) {
|
|
9313
9327
|
Object.defineProperty(obj, key, {
|
|
9314
9328
|
value,
|
|
@@ -9331,7 +9345,7 @@ function _object_spread$X(target) {
|
|
|
9331
9345
|
}));
|
|
9332
9346
|
}
|
|
9333
9347
|
ownKeys2.forEach(function(key) {
|
|
9334
|
-
_define_property$
|
|
9348
|
+
_define_property$_(target, key, source[key]);
|
|
9335
9349
|
});
|
|
9336
9350
|
}
|
|
9337
9351
|
return target;
|
|
@@ -9427,13 +9441,13 @@ var Button = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
9427
9441
|
return /* @__PURE__ */ jsxs("button", _object_spread_props$M(_object_spread$X({
|
|
9428
9442
|
ref,
|
|
9429
9443
|
type,
|
|
9430
|
-
className: clsx(classes.root, classes[size2], classes[view], (_obj2 = {}, _define_property$
|
|
9444
|
+
className: clsx(classes.root, classes[size2], classes[view], (_obj2 = {}, _define_property$_(_obj2, classes.disabled, isDisabled), _define_property$_(_obj2, classes.fullWidth, isFullWidth), _define_property$_(_obj2, classes.inline, isInline), _define_property$_(_obj2, classes.active, isActive), _define_property$_(_obj2, classes.loading, isLoading), _define_property$_(_obj2, classes.onlyIcon, hasIcon && !hasChildren), _obj2)),
|
|
9431
9445
|
tabIndex: shouldSkipTabNavigation ? -1 : void 0,
|
|
9432
9446
|
disabled: hasNoAction
|
|
9433
9447
|
}, interactions, addDataTestId(testId), addDataAttributes(data)), {
|
|
9434
9448
|
children: [
|
|
9435
9449
|
/* @__PURE__ */ jsxs("span", {
|
|
9436
|
-
className: clsx(classes.content, (_obj1 = {}, _define_property$
|
|
9450
|
+
className: clsx(classes.content, (_obj1 = {}, _define_property$_(_obj1, classes.iconFromRight, hasChildren && hasIcon && iconPosition === "right"), _define_property$_(_obj1, classes.iconFromLeft, hasChildren && hasIcon && iconPosition === "left"), _obj1)),
|
|
9437
9451
|
children: [
|
|
9438
9452
|
hasIcon && /* @__PURE__ */ jsx("span", {
|
|
9439
9453
|
className: classes.icon,
|
|
@@ -9494,7 +9508,7 @@ var useStyles$M = createThemedStyles("Checkbox", {
|
|
|
9494
9508
|
flexDirection: "row-reverse"
|
|
9495
9509
|
}
|
|
9496
9510
|
});
|
|
9497
|
-
function _define_property$
|
|
9511
|
+
function _define_property$Z(obj, key, value) {
|
|
9498
9512
|
if (key in obj) {
|
|
9499
9513
|
Object.defineProperty(obj, key, {
|
|
9500
9514
|
value,
|
|
@@ -9517,7 +9531,7 @@ function _object_spread$W(target) {
|
|
|
9517
9531
|
}));
|
|
9518
9532
|
}
|
|
9519
9533
|
ownKeys2.forEach(function(key) {
|
|
9520
|
-
_define_property$
|
|
9534
|
+
_define_property$Z(target, key, source[key]);
|
|
9521
9535
|
});
|
|
9522
9536
|
}
|
|
9523
9537
|
return target;
|
|
@@ -9561,7 +9575,7 @@ function Checkbox(param) {
|
|
|
9561
9575
|
};
|
|
9562
9576
|
var _obj2;
|
|
9563
9577
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$L(_object_spread$W({
|
|
9564
|
-
className: clsx(classes.root, (_obj2 = {}, _define_property$
|
|
9578
|
+
className: clsx(classes.root, (_obj2 = {}, _define_property$Z(_obj2, classes.checked, isSelected), _define_property$Z(_obj2, classes.invalid, isInvalid), _define_property$Z(_obj2, classes.disabled, isDisabled), _define_property$Z(_obj2, classes.labelPositionLeft, labelPosition === "left"), _obj2))
|
|
9565
9579
|
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
9566
9580
|
children: [
|
|
9567
9581
|
/* @__PURE__ */ jsx("input", _object_spread$W({
|
|
@@ -9613,7 +9627,7 @@ var useStyles$L = createThemedStyles("CloseButton", {
|
|
|
9613
9627
|
}
|
|
9614
9628
|
}
|
|
9615
9629
|
});
|
|
9616
|
-
function _define_property$
|
|
9630
|
+
function _define_property$Y(obj, key, value) {
|
|
9617
9631
|
if (key in obj) {
|
|
9618
9632
|
Object.defineProperty(obj, key, {
|
|
9619
9633
|
value,
|
|
@@ -9636,7 +9650,7 @@ function _object_spread$V(target) {
|
|
|
9636
9650
|
}));
|
|
9637
9651
|
}
|
|
9638
9652
|
ownKeys2.forEach(function(key) {
|
|
9639
|
-
_define_property$
|
|
9653
|
+
_define_property$Y(target, key, source[key]);
|
|
9640
9654
|
});
|
|
9641
9655
|
}
|
|
9642
9656
|
return target;
|
|
@@ -9812,7 +9826,7 @@ var useStyles$J = createThemedStyles("CssBaseline", {
|
|
|
9812
9826
|
},
|
|
9813
9827
|
root: {}
|
|
9814
9828
|
});
|
|
9815
|
-
function _define_property$
|
|
9829
|
+
function _define_property$X(obj, key, value) {
|
|
9816
9830
|
if (key in obj) {
|
|
9817
9831
|
Object.defineProperty(obj, key, {
|
|
9818
9832
|
value,
|
|
@@ -9835,7 +9849,7 @@ function _object_spread$U(target) {
|
|
|
9835
9849
|
}));
|
|
9836
9850
|
}
|
|
9837
9851
|
ownKeys2.forEach(function(key) {
|
|
9838
|
-
_define_property$
|
|
9852
|
+
_define_property$X(target, key, source[key]);
|
|
9839
9853
|
});
|
|
9840
9854
|
}
|
|
9841
9855
|
return target;
|
|
@@ -9883,7 +9897,7 @@ var useStyles$I = createThemedStyles("WithMessages", {
|
|
|
9883
9897
|
},
|
|
9884
9898
|
children: {}
|
|
9885
9899
|
});
|
|
9886
|
-
function _define_property$
|
|
9900
|
+
function _define_property$W(obj, key, value) {
|
|
9887
9901
|
if (key in obj) {
|
|
9888
9902
|
Object.defineProperty(obj, key, {
|
|
9889
9903
|
value,
|
|
@@ -9906,7 +9920,7 @@ function _object_spread$T(target) {
|
|
|
9906
9920
|
}));
|
|
9907
9921
|
}
|
|
9908
9922
|
ownKeys2.forEach(function(key) {
|
|
9909
|
-
_define_property$
|
|
9923
|
+
_define_property$W(target, key, source[key]);
|
|
9910
9924
|
});
|
|
9911
9925
|
}
|
|
9912
9926
|
return target;
|
|
@@ -9950,7 +9964,7 @@ var WithMessages = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
9950
9964
|
}, addDataAttributes$1(data, testId)), {
|
|
9951
9965
|
children: [
|
|
9952
9966
|
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
9953
|
-
className: clsx(classes.children, (_obj2 = {}, _define_property$
|
|
9967
|
+
className: clsx(classes.children, (_obj2 = {}, _define_property$W(_obj2, classes.horizontal, controlsDirection === "horizontal"), _define_property$W(_obj2, classes.vertical, controlsDirection === "vertical"), _obj2)),
|
|
9954
9968
|
children
|
|
9955
9969
|
}),
|
|
9956
9970
|
(shouldShowError || shouldShowInfo) && /* @__PURE__ */ jsxs("div", {
|
|
@@ -10123,7 +10137,7 @@ var useStyles$H = createThemedStyles("ControlWrapper", {
|
|
|
10123
10137
|
borderRadius: 0
|
|
10124
10138
|
}
|
|
10125
10139
|
});
|
|
10126
|
-
function _define_property$
|
|
10140
|
+
function _define_property$V(obj, key, value) {
|
|
10127
10141
|
if (key in obj) {
|
|
10128
10142
|
Object.defineProperty(obj, key, {
|
|
10129
10143
|
value,
|
|
@@ -10146,7 +10160,7 @@ function _object_spread$S(target) {
|
|
|
10146
10160
|
}));
|
|
10147
10161
|
}
|
|
10148
10162
|
ownKeys2.forEach(function(key) {
|
|
10149
|
-
_define_property$
|
|
10163
|
+
_define_property$V(target, key, source[key]);
|
|
10150
10164
|
});
|
|
10151
10165
|
}
|
|
10152
10166
|
return target;
|
|
@@ -10191,11 +10205,11 @@ var ControlWrapper = function(param) {
|
|
|
10191
10205
|
});
|
|
10192
10206
|
var _obj2, _obj1, _obj22;
|
|
10193
10207
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$I(_object_spread$S({
|
|
10194
|
-
className: clsx(classes.controlWrapper, isNotEmpty(groupPlacement) && classes["placement-".concat(groupPlacement)], isNotEmpty(size2) && classes[size2], (_obj2 = {}, _define_property$
|
|
10208
|
+
className: clsx(classes.controlWrapper, isNotEmpty(groupPlacement) && classes["placement-".concat(groupPlacement)], isNotEmpty(size2) && classes[size2], (_obj2 = {}, _define_property$V(_obj2, classes.invalid, isInvalid), _define_property$V(_obj2, classes.focused, isFocused), _define_property$V(_obj2, classes.withValue, hasValue), _define_property$V(_obj2, classes.disabled, isDisabled), _define_property$V(_obj2, classes.loading, isLoading), _define_property$V(_obj2, classes.minContent, !isFullWidth), _obj2))
|
|
10195
10209
|
}, addDataAttributes$1(data, testId)), {
|
|
10196
10210
|
children: [
|
|
10197
10211
|
isReactNodeNotEmpty(label) && /* @__PURE__ */ jsx("div", {
|
|
10198
|
-
className: clsx(classes.label, (_obj1 = {}, _define_property$
|
|
10212
|
+
className: clsx(classes.label, (_obj1 = {}, _define_property$V(_obj1, classes.requiredLabel, isRequired), _define_property$V(_obj1, classes.disabledLabel, isDisabled), _define_property$V(_obj1, classes.activeLabel, isActive), _obj1)),
|
|
10199
10213
|
children: label
|
|
10200
10214
|
}),
|
|
10201
10215
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -10216,7 +10230,7 @@ var ControlWrapper = function(param) {
|
|
|
10216
10230
|
})
|
|
10217
10231
|
})),
|
|
10218
10232
|
hasEndIcon && /* @__PURE__ */ jsx("div", _object_spread_props$I(_object_spread$S({
|
|
10219
|
-
className: clsx(classes.icon, classes.endIcon, (_obj22 = {}, _define_property$
|
|
10233
|
+
className: clsx(classes.icon, classes.endIcon, (_obj22 = {}, _define_property$V(_obj22, classes.activeIcon, !isDisabled && isNotEmpty(onIconClick)), _define_property$V(_obj22, classes.customIcon, !isString(icon)), _obj22))
|
|
10220
10234
|
}, addClickHandler(onIconClick, !isDisabled), addDataTestId(testId, "icon")), {
|
|
10221
10235
|
children: /* @__PURE__ */ jsx("div", {
|
|
10222
10236
|
className: classes.iconInner,
|
|
@@ -10354,7 +10368,7 @@ function _async_to_generator$5(fn3) {
|
|
|
10354
10368
|
});
|
|
10355
10369
|
};
|
|
10356
10370
|
}
|
|
10357
|
-
function _define_property$
|
|
10371
|
+
function _define_property$U(obj, key, value) {
|
|
10358
10372
|
if (key in obj) {
|
|
10359
10373
|
Object.defineProperty(obj, key, {
|
|
10360
10374
|
value,
|
|
@@ -10408,7 +10422,7 @@ function _object_spread$R(target) {
|
|
|
10408
10422
|
}));
|
|
10409
10423
|
}
|
|
10410
10424
|
ownKeys2.forEach(function(key) {
|
|
10411
|
-
_define_property$
|
|
10425
|
+
_define_property$U(target, key, source[key]);
|
|
10412
10426
|
});
|
|
10413
10427
|
}
|
|
10414
10428
|
return target;
|
|
@@ -10668,7 +10682,7 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10668
10682
|
]);
|
|
10669
10683
|
var _obj2;
|
|
10670
10684
|
var props = _object_spread$R({
|
|
10671
|
-
className: clsx(classes.input, (_obj2 = {}, _define_property$
|
|
10685
|
+
className: clsx(classes.input, (_obj2 = {}, _define_property$U(_obj2, classes.withUnits, hasUnits), _define_property$U(_obj2, classes.withValue, hasValue), _define_property$U(_obj2, classes.withLabel, isReactNodeNotEmpty(label)), _define_property$U(_obj2, classes.autoSized, isAutoSized), _define_property$U(_obj2, classes.focusedInput, isFocused), _define_property$U(_obj2, classes.disabledInput, isDisabled), _define_property$U(_obj2, classes.invalidInput, isInvalid), _obj2)),
|
|
10672
10686
|
style: hasUnits && hasValue ? {
|
|
10673
10687
|
"--units-width": "".concat(unitsWidth, "px")
|
|
10674
10688
|
} : void 0,
|
|
@@ -10741,7 +10755,7 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10741
10755
|
]
|
|
10742
10756
|
});
|
|
10743
10757
|
});
|
|
10744
|
-
function _define_property$
|
|
10758
|
+
function _define_property$T(obj, key, value) {
|
|
10745
10759
|
if (key in obj) {
|
|
10746
10760
|
Object.defineProperty(obj, key, {
|
|
10747
10761
|
value,
|
|
@@ -10764,7 +10778,7 @@ function _object_spread$Q(target) {
|
|
|
10764
10778
|
}));
|
|
10765
10779
|
}
|
|
10766
10780
|
ownKeys2.forEach(function(key) {
|
|
10767
|
-
_define_property$
|
|
10781
|
+
_define_property$T(target, key, source[key]);
|
|
10768
10782
|
});
|
|
10769
10783
|
}
|
|
10770
10784
|
return target;
|
|
@@ -10860,7 +10874,7 @@ var useStyles$F = createThemedStyles("DateInput", {
|
|
|
10860
10874
|
position: "relative"
|
|
10861
10875
|
}
|
|
10862
10876
|
});
|
|
10863
|
-
function _define_property$
|
|
10877
|
+
function _define_property$S(obj, key, value) {
|
|
10864
10878
|
if (key in obj) {
|
|
10865
10879
|
Object.defineProperty(obj, key, {
|
|
10866
10880
|
value,
|
|
@@ -10883,7 +10897,7 @@ function _object_spread$P(target) {
|
|
|
10883
10897
|
}));
|
|
10884
10898
|
}
|
|
10885
10899
|
ownKeys2.forEach(function(key) {
|
|
10886
|
-
_define_property$
|
|
10900
|
+
_define_property$S(target, key, source[key]);
|
|
10887
10901
|
});
|
|
10888
10902
|
}
|
|
10889
10903
|
return target;
|
|
@@ -10986,9 +11000,9 @@ var DateInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10986
11000
|
onChange === null || onChange === void 0 ? void 0 : onChange(event, value);
|
|
10987
11001
|
};
|
|
10988
11002
|
return /* @__PURE__ */ jsx("div", _object_spread_props$G(_object_spread$P({
|
|
10989
|
-
className: clsx(classes.root, className)
|
|
10990
|
-
|
|
10991
|
-
|
|
11003
|
+
className: clsx(classes.root, className)
|
|
11004
|
+
}, addDataAttributes$1(data)), {
|
|
11005
|
+
onClick,
|
|
10992
11006
|
children: /* @__PURE__ */ jsx(Input, _object_spread_props$G(_object_spread$P({}, inputProps), {
|
|
10993
11007
|
ref,
|
|
10994
11008
|
value: isRange ? "".concat(startDate).concat(endDate) : date,
|
|
@@ -11001,6 +11015,109 @@ var DateInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
11001
11015
|
}));
|
|
11002
11016
|
});
|
|
11003
11017
|
const reactDatepicker = "";
|
|
11018
|
+
function _assert_this_initialized$1(self2) {
|
|
11019
|
+
if (self2 === void 0) {
|
|
11020
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
11021
|
+
}
|
|
11022
|
+
return self2;
|
|
11023
|
+
}
|
|
11024
|
+
function _class_call_check$1(instance, Constructor) {
|
|
11025
|
+
if (!(instance instanceof Constructor)) {
|
|
11026
|
+
throw new TypeError("Cannot call a class as a function");
|
|
11027
|
+
}
|
|
11028
|
+
}
|
|
11029
|
+
function _define_property$R(obj, key, value) {
|
|
11030
|
+
if (key in obj) {
|
|
11031
|
+
Object.defineProperty(obj, key, {
|
|
11032
|
+
value,
|
|
11033
|
+
enumerable: true,
|
|
11034
|
+
configurable: true,
|
|
11035
|
+
writable: true
|
|
11036
|
+
});
|
|
11037
|
+
} else {
|
|
11038
|
+
obj[key] = value;
|
|
11039
|
+
}
|
|
11040
|
+
return obj;
|
|
11041
|
+
}
|
|
11042
|
+
function _get_prototype_of$1(o) {
|
|
11043
|
+
_get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
11044
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
11045
|
+
};
|
|
11046
|
+
return _get_prototype_of$1(o);
|
|
11047
|
+
}
|
|
11048
|
+
function _inherits$1(subClass, superClass) {
|
|
11049
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
11050
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
11051
|
+
}
|
|
11052
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
11053
|
+
constructor: {
|
|
11054
|
+
value: subClass,
|
|
11055
|
+
writable: true,
|
|
11056
|
+
configurable: true
|
|
11057
|
+
}
|
|
11058
|
+
});
|
|
11059
|
+
if (superClass)
|
|
11060
|
+
_set_prototype_of$1(subClass, superClass);
|
|
11061
|
+
}
|
|
11062
|
+
function _possible_constructor_return$1(self2, call) {
|
|
11063
|
+
if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
|
|
11064
|
+
return call;
|
|
11065
|
+
}
|
|
11066
|
+
return _assert_this_initialized$1(self2);
|
|
11067
|
+
}
|
|
11068
|
+
function _set_prototype_of$1(o, p) {
|
|
11069
|
+
_set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
11070
|
+
o2.__proto__ = p2;
|
|
11071
|
+
return o2;
|
|
11072
|
+
};
|
|
11073
|
+
return _set_prototype_of$1(o, p);
|
|
11074
|
+
}
|
|
11075
|
+
function _type_of$1(obj) {
|
|
11076
|
+
"@swc/helpers - typeof";
|
|
11077
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
11078
|
+
}
|
|
11079
|
+
function _is_native_reflect_construct$1() {
|
|
11080
|
+
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
11081
|
+
return false;
|
|
11082
|
+
if (Reflect.construct.sham)
|
|
11083
|
+
return false;
|
|
11084
|
+
if (typeof Proxy === "function")
|
|
11085
|
+
return true;
|
|
11086
|
+
try {
|
|
11087
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
11088
|
+
}));
|
|
11089
|
+
return true;
|
|
11090
|
+
} catch (e) {
|
|
11091
|
+
return false;
|
|
11092
|
+
}
|
|
11093
|
+
}
|
|
11094
|
+
function _create_super$1(Derived) {
|
|
11095
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$1();
|
|
11096
|
+
return function _createSuperInternal() {
|
|
11097
|
+
var Super = _get_prototype_of$1(Derived), result;
|
|
11098
|
+
if (hasNativeReflectConstruct) {
|
|
11099
|
+
var NewTarget = _get_prototype_of$1(this).constructor;
|
|
11100
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
11101
|
+
} else {
|
|
11102
|
+
result = Super.apply(this, arguments);
|
|
11103
|
+
}
|
|
11104
|
+
return _possible_constructor_return$1(this, result);
|
|
11105
|
+
};
|
|
11106
|
+
}
|
|
11107
|
+
var DatePickerBase = /* @__PURE__ */ function(ReactDatePicker2) {
|
|
11108
|
+
_inherits$1(DatePickerBase2, ReactDatePicker2);
|
|
11109
|
+
var _super = _create_super$1(DatePickerBase2);
|
|
11110
|
+
function DatePickerBase2(props) {
|
|
11111
|
+
_class_call_check$1(this, DatePickerBase2);
|
|
11112
|
+
var _this;
|
|
11113
|
+
_this = _super.call(this, props);
|
|
11114
|
+
_define_property$R(_assert_this_initialized$1(_this), "handleClickOutside", void 0);
|
|
11115
|
+
_this.handleClickOutside = _this.handleCalendarClickOutside;
|
|
11116
|
+
_this.handleCalendarClickOutside = doNothing;
|
|
11117
|
+
return _this;
|
|
11118
|
+
}
|
|
11119
|
+
return DatePickerBase2;
|
|
11120
|
+
}(ReactDatePicker);
|
|
11004
11121
|
var inputStyles$4 = {
|
|
11005
11122
|
tweakControlWrapper: {
|
|
11006
11123
|
endIcon: {
|
|
@@ -12707,9 +12824,6 @@ var PopperContainer = function(props) {
|
|
|
12707
12824
|
root: document.body
|
|
12708
12825
|
}, props));
|
|
12709
12826
|
};
|
|
12710
|
-
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
12711
|
-
var _ReactDatePicker_default;
|
|
12712
|
-
var DatePickerComponent = (_ReactDatePicker_default = ReactDatePicker.default) !== null && _ReactDatePicker_default !== void 0 ? _ReactDatePicker_default : ReactDatePicker;
|
|
12713
12827
|
function buildFormatLongFn(args) {
|
|
12714
12828
|
return (options = {}) => {
|
|
12715
12829
|
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
@@ -13889,6 +14003,12 @@ const ru = {
|
|
|
13889
14003
|
firstWeekContainsDate: 1
|
|
13890
14004
|
}
|
|
13891
14005
|
};
|
|
14006
|
+
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
14007
|
+
var OUTSIDE_CLICK_IGNORE_CLASS = "react-datepicker-ignore-onclickoutside";
|
|
14008
|
+
var LocalesMap = {
|
|
14009
|
+
ru,
|
|
14010
|
+
en: enUS
|
|
14011
|
+
};
|
|
13892
14012
|
var getDateFormatter = function(dateFormat) {
|
|
13893
14013
|
return function(date) {
|
|
13894
14014
|
return isNotEmpty(date) ? format(date, dateFormat) : "";
|
|
@@ -13903,15 +14023,6 @@ var getDateValueParser = function(dateFormat) {
|
|
|
13903
14023
|
var areDatesEquals = function(date1, date2) {
|
|
13904
14024
|
return isEmpty(date1) && isEmpty(date2) || isNotEmpty(date1) && isNotEmpty(date2) && isSameDay(date1, date2);
|
|
13905
14025
|
};
|
|
13906
|
-
var preparateDatePickerLocale = function(locale) {
|
|
13907
|
-
if (locale === "ru") {
|
|
13908
|
-
return ru;
|
|
13909
|
-
}
|
|
13910
|
-
if (locale === "en") {
|
|
13911
|
-
return enUS;
|
|
13912
|
-
}
|
|
13913
|
-
return locale;
|
|
13914
|
-
};
|
|
13915
14026
|
var useStyles$B = createThemedStyles("DatePicker", {
|
|
13916
14027
|
root: {
|
|
13917
14028
|
width: "100%",
|
|
@@ -14156,6 +14267,11 @@ var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
14156
14267
|
}, [
|
|
14157
14268
|
dateFormat
|
|
14158
14269
|
]), formatDate = _useMemo.formatDate, parseDateValue = _useMemo.parseDateValue;
|
|
14270
|
+
var datePickerRef = useRef();
|
|
14271
|
+
var componentRef = useMergedRefs([
|
|
14272
|
+
ref,
|
|
14273
|
+
datePickerRef
|
|
14274
|
+
]);
|
|
14159
14275
|
var _useState = _sliced_to_array$h(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
14160
14276
|
var _useState1 = _sliced_to_array$h(useState(formatDate(selectedDate)), 2), dateValue = _useState1[0], setDateValue = _useState1[1];
|
|
14161
14277
|
var _useState2 = _sliced_to_array$h(useState(startDate), 2), start2 = _useState2[0], setStart = _useState2[1];
|
|
@@ -14261,14 +14377,21 @@ var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
14261
14377
|
startDate,
|
|
14262
14378
|
endDate
|
|
14263
14379
|
]);
|
|
14380
|
+
useOnClickOutside(function() {
|
|
14381
|
+
var _datePickerRef_current_calendar_containerRef, _datePickerRef_current_calendar, _datePickerRef_current;
|
|
14382
|
+
return (_datePickerRef_current = datePickerRef.current) === null || _datePickerRef_current === void 0 ? void 0 : (_datePickerRef_current_calendar = _datePickerRef_current.calendar) === null || _datePickerRef_current_calendar === void 0 ? void 0 : (_datePickerRef_current_calendar_containerRef = _datePickerRef_current_calendar.containerRef) === null || _datePickerRef_current_calendar_containerRef === void 0 ? void 0 : _datePickerRef_current_calendar_containerRef.current;
|
|
14383
|
+
}, function(event) {
|
|
14384
|
+
var _datePickerRef_current;
|
|
14385
|
+
return (_datePickerRef_current = datePickerRef.current) === null || _datePickerRef_current === void 0 ? void 0 : _datePickerRef_current.handleClickOutside(event);
|
|
14386
|
+
}, OUTSIDE_CLICK_IGNORE_CLASS);
|
|
14264
14387
|
return /* @__PURE__ */ jsx("div", _object_spread_props$C(_object_spread$H({
|
|
14265
14388
|
className: classes.root
|
|
14266
|
-
}, addDataAttributes(data)), {
|
|
14267
|
-
children: /* @__PURE__ */ jsx(
|
|
14268
|
-
ref,
|
|
14389
|
+
}, addDataAttributes$1(data)), {
|
|
14390
|
+
children: /* @__PURE__ */ jsx(DatePickerBase, _object_spread$H({
|
|
14391
|
+
ref: componentRef,
|
|
14269
14392
|
minDate,
|
|
14270
14393
|
maxDate,
|
|
14271
|
-
locale:
|
|
14394
|
+
locale: isString(locale) ? LocalesMap[locale] : locale,
|
|
14272
14395
|
dateFormat,
|
|
14273
14396
|
placeholderText: placeholder,
|
|
14274
14397
|
calendarStartDay,
|
|
@@ -20008,6 +20131,10 @@ var useStyles$o = createThemedStyles("FiltersPaneSearch", {
|
|
|
20008
20131
|
cursor: "default"
|
|
20009
20132
|
}
|
|
20010
20133
|
},
|
|
20134
|
+
hasValue: {
|
|
20135
|
+
backgroundColor: colors.CLASSIC_WHITE,
|
|
20136
|
+
borderColor: colors.BORDER_MAIN
|
|
20137
|
+
},
|
|
20011
20138
|
selectWrapper: {
|
|
20012
20139
|
position: "relative",
|
|
20013
20140
|
display: "flex",
|
|
@@ -20237,7 +20364,7 @@ function FiltersPaneSearch(param) {
|
|
|
20237
20364
|
};
|
|
20238
20365
|
var _obj2;
|
|
20239
20366
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$p(_object_spread$q({
|
|
20240
|
-
className: clsx(classes.root, (_obj2 = {}, _define_property$r(_obj2, classes.focused, isInputFocused), _define_property$r(_obj2, classes.disabled, isDisabled), _obj2)),
|
|
20367
|
+
className: clsx(classes.root, (_obj2 = {}, _define_property$r(_obj2, classes.focused, isInputFocused), _define_property$r(_obj2, classes.disabled, isDisabled), _define_property$r(_obj2, classes.hasValue, isArrayLikeNotEmpty(value)), _obj2)),
|
|
20241
20368
|
ref: refRoot
|
|
20242
20369
|
}, addDataAttributes$1(data, testId)), {
|
|
20243
20370
|
children: [
|
|
@@ -20259,7 +20386,7 @@ function FiltersPaneSearch(param) {
|
|
|
20259
20386
|
/* @__PURE__ */ jsxs("div", {
|
|
20260
20387
|
className: classes.selectWrapper,
|
|
20261
20388
|
children: [
|
|
20262
|
-
fields
|
|
20389
|
+
isArrayNotEmpty(fields) && /* @__PURE__ */ jsxs("div", _object_spread_props$p(_object_spread$q({
|
|
20263
20390
|
className: classes.selectBlock,
|
|
20264
20391
|
onClick: !isDisabled ? function() {
|
|
20265
20392
|
return setIsOpen(!isOpen);
|
|
@@ -32717,6 +32844,7 @@ export {
|
|
|
32717
32844
|
useDropdown,
|
|
32718
32845
|
useIntersectionRef,
|
|
32719
32846
|
useIsMounted,
|
|
32847
|
+
useLatestRef,
|
|
32720
32848
|
useMerge,
|
|
32721
32849
|
useMergedRefs,
|
|
32722
32850
|
useMixedStyles,
|