@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
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-jss"), require("@true-engineering/true-react-platform-helpers"), require("lodash-es"), require("react-transition-group"), require("clsx"), require("hex-to-rgba"), require("@floating-ui/react"), require("react-input-mask"), require("date-fns"), require("react-overlays"), require("ts-debounce"), require("scroll-into-view-if-needed"), require("
|
|
3
|
-
})(this, function(exports2, React, reactJss, trueReactPlatformHelpers, lodashEs, reactTransitionGroup, clsx, hexToRgba, react, InputMask, dateFns, reactOverlays, tsDebounce, scrollIntoViewIfNeeded,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-jss"), require("@true-engineering/true-react-platform-helpers"), require("lodash-es"), require("react-transition-group"), require("clsx"), require("hex-to-rgba"), require("@floating-ui/react"), require("react-input-mask"), require("date-fns"), require("react-datepicker"), require("react-overlays"), require("ts-debounce"), require("scroll-into-view-if-needed"), require("filesize"), require("country-flag-icons"), require("react-remove-scroll")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-jss", "@true-engineering/true-react-platform-helpers", "lodash-es", "react-transition-group", "clsx", "hex-to-rgba", "@floating-ui/react", "react-input-mask", "date-fns", "react-datepicker", "react-overlays", "ts-debounce", "scroll-into-view-if-needed", "filesize", "country-flag-icons", "react-remove-scroll"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.TrueReactKitUiKit = {}, global2.React, global2.reactJss, global2.trueReactPlatformHelpers, global2.lodashEs, global2.reactTransitionGroup, global2.clsx, global2.hexToRgba, global2.react, global2.InputMask, global2.dateFns, global2.ReactDatePicker, global2.reactOverlays, global2.tsDebounce, global2.scrollIntoViewIfNeeded, global2.filesize, global2.countryFlagIcons, global2.reactRemoveScroll));
|
|
3
|
+
})(this, function(exports2, React, reactJss, trueReactPlatformHelpers, lodashEs, reactTransitionGroup, clsx, hexToRgba, react, InputMask, dateFns, ReactDatePicker, reactOverlays, tsDebounce, scrollIntoViewIfNeeded, filesize, countryFlagIcons, reactRemoveScroll) {
|
|
4
4
|
"use strict";
|
|
5
5
|
var jsxRuntime = { exports: {} };
|
|
6
6
|
var reactJsxRuntime_production_min = {};
|
|
@@ -1279,7 +1279,7 @@
|
|
|
1279
1279
|
descriptor.value = value;
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
function _class_call_check$
|
|
1282
|
+
function _class_call_check$3(instance, Constructor) {
|
|
1283
1283
|
if (!(instance instanceof Constructor)) {
|
|
1284
1284
|
throw new TypeError("Cannot call a class as a function");
|
|
1285
1285
|
}
|
|
@@ -1320,7 +1320,7 @@
|
|
|
1320
1320
|
_defineProperties$2(Constructor, staticProps);
|
|
1321
1321
|
return Constructor;
|
|
1322
1322
|
}
|
|
1323
|
-
function _define_property$
|
|
1323
|
+
function _define_property$1d(obj, key, value) {
|
|
1324
1324
|
if (key in obj) {
|
|
1325
1325
|
Object.defineProperty(obj, key, {
|
|
1326
1326
|
value,
|
|
@@ -1381,7 +1381,7 @@
|
|
|
1381
1381
|
}));
|
|
1382
1382
|
}
|
|
1383
1383
|
ownKeys2.forEach(function(key) {
|
|
1384
|
-
_define_property$
|
|
1384
|
+
_define_property$1d(target, key, source[key]);
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
1387
|
return target;
|
|
@@ -1412,7 +1412,7 @@
|
|
|
1412
1412
|
var TweakStylesManager = /* @__PURE__ */ function() {
|
|
1413
1413
|
function TweakStylesManager2(param) {
|
|
1414
1414
|
var sheet = param.sheet, classes = param.classes, _param_tweak = param.tweak, tweak = _param_tweak === void 0 ? [] : _param_tweak;
|
|
1415
|
-
_class_call_check$
|
|
1415
|
+
_class_call_check$3(this, TweakStylesManager2);
|
|
1416
1416
|
_class_private_field_init$1(this, _map, {
|
|
1417
1417
|
writable: true,
|
|
1418
1418
|
value: /* @__PURE__ */ new WeakMap()
|
|
@@ -1607,7 +1607,7 @@
|
|
|
1607
1607
|
descriptor.value = value;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
function _class_call_check$
|
|
1610
|
+
function _class_call_check$2(instance, Constructor) {
|
|
1611
1611
|
if (!(instance instanceof Constructor)) {
|
|
1612
1612
|
throw new TypeError("Cannot call a class as a function");
|
|
1613
1613
|
}
|
|
@@ -1648,7 +1648,7 @@
|
|
|
1648
1648
|
_defineProperties$1(Constructor, staticProps);
|
|
1649
1649
|
return Constructor;
|
|
1650
1650
|
}
|
|
1651
|
-
function _define_property$
|
|
1651
|
+
function _define_property$1c(obj, key, value) {
|
|
1652
1652
|
if (key in obj) {
|
|
1653
1653
|
Object.defineProperty(obj, key, {
|
|
1654
1654
|
value,
|
|
@@ -1671,7 +1671,7 @@
|
|
|
1671
1671
|
}));
|
|
1672
1672
|
}
|
|
1673
1673
|
ownKeys2.forEach(function(key) {
|
|
1674
|
-
_define_property$
|
|
1674
|
+
_define_property$1c(target, key, source[key]);
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
1677
|
return target;
|
|
@@ -1681,7 +1681,7 @@
|
|
|
1681
1681
|
var ThemedStylesManager = /* @__PURE__ */ function() {
|
|
1682
1682
|
function ThemedStylesManager2(param) {
|
|
1683
1683
|
var styles = param.styles, name = param.name;
|
|
1684
|
-
_class_call_check$
|
|
1684
|
+
_class_call_check$2(this, ThemedStylesManager2);
|
|
1685
1685
|
_class_private_field_init(this, _styleSheetMap, {
|
|
1686
1686
|
writable: true,
|
|
1687
1687
|
value: /* @__PURE__ */ new Map()
|
|
@@ -1784,7 +1784,7 @@
|
|
|
1784
1784
|
]);
|
|
1785
1785
|
return ThemedStylesManager2;
|
|
1786
1786
|
}();
|
|
1787
|
-
function _define_property$
|
|
1787
|
+
function _define_property$1b(obj, key, value) {
|
|
1788
1788
|
if (key in obj) {
|
|
1789
1789
|
Object.defineProperty(obj, key, {
|
|
1790
1790
|
value,
|
|
@@ -1807,7 +1807,7 @@
|
|
|
1807
1807
|
}));
|
|
1808
1808
|
}
|
|
1809
1809
|
ownKeys2.forEach(function(key) {
|
|
1810
|
-
_define_property$
|
|
1810
|
+
_define_property$1b(target, key, source[key]);
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
1813
|
return target;
|
|
@@ -1880,7 +1880,7 @@
|
|
|
1880
1880
|
if (Array.isArray(arr))
|
|
1881
1881
|
return arr;
|
|
1882
1882
|
}
|
|
1883
|
-
function _define_property$
|
|
1883
|
+
function _define_property$1a(obj, key, value) {
|
|
1884
1884
|
if (key in obj) {
|
|
1885
1885
|
Object.defineProperty(obj, key, {
|
|
1886
1886
|
value,
|
|
@@ -1934,7 +1934,7 @@
|
|
|
1934
1934
|
}));
|
|
1935
1935
|
}
|
|
1936
1936
|
ownKeys2.forEach(function(key) {
|
|
1937
|
-
_define_property$
|
|
1937
|
+
_define_property$1a(target, key, source[key]);
|
|
1938
1938
|
});
|
|
1939
1939
|
}
|
|
1940
1940
|
return target;
|
|
@@ -5035,68 +5035,22 @@
|
|
|
5035
5035
|
] : [];
|
|
5036
5036
|
}));
|
|
5037
5037
|
};
|
|
5038
|
-
var
|
|
5039
|
-
var
|
|
5038
|
+
var useDidMountEffect = function(effect2, dependencies) {
|
|
5039
|
+
var isMountedRef = React.useRef(false);
|
|
5040
5040
|
React.useEffect(function() {
|
|
5041
|
-
|
|
5041
|
+
var unmount;
|
|
5042
|
+
if (isMountedRef.current) {
|
|
5043
|
+
unmount = effect2();
|
|
5044
|
+
} else {
|
|
5045
|
+
isMountedRef.current = true;
|
|
5046
|
+
}
|
|
5042
5047
|
return function() {
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
}, []);
|
|
5046
|
-
return React.useCallback(function() {
|
|
5047
|
-
return isMounted.current;
|
|
5048
|
-
}, []);
|
|
5049
|
-
};
|
|
5050
|
-
var checkElementParentsClassNames = function(element, className) {
|
|
5051
|
-
if (element.classList.contains(className)) {
|
|
5052
|
-
return true;
|
|
5053
|
-
}
|
|
5054
|
-
if (element === document.body) {
|
|
5055
|
-
return false;
|
|
5056
|
-
}
|
|
5057
|
-
if (element.parentElement) {
|
|
5058
|
-
return checkElementParentsClassNames(element.parentElement, className);
|
|
5059
|
-
}
|
|
5060
|
-
return false;
|
|
5061
|
-
};
|
|
5062
|
-
var isElementOneOfParents = function(element, elToSearch) {
|
|
5063
|
-
if (element === elToSearch) {
|
|
5064
|
-
return true;
|
|
5065
|
-
}
|
|
5066
|
-
if (element === document.body) {
|
|
5067
|
-
return false;
|
|
5068
|
-
}
|
|
5069
|
-
if (element.parentElement) {
|
|
5070
|
-
return isElementOneOfParents(element.parentElement, elToSearch);
|
|
5071
|
-
}
|
|
5072
|
-
return false;
|
|
5073
|
-
};
|
|
5074
|
-
function useOnClickOutsideWithRef(ref, handler, ignoreRef) {
|
|
5075
|
-
useOnClickOutside(ref, handler, void 0, ignoreRef);
|
|
5076
|
-
}
|
|
5077
|
-
function useOnClickOutside(ref, handler, ignoreClassName, ignoreRef) {
|
|
5078
|
-
React.useEffect(function() {
|
|
5079
|
-
var listener = function(event) {
|
|
5080
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
5081
|
-
return;
|
|
5082
|
-
}
|
|
5083
|
-
if (ignoreClassName !== void 0 && checkElementParentsClassNames(event.target, ignoreClassName) || ignoreRef !== void 0 && ignoreRef.current !== null && isElementOneOfParents(event.target, ignoreRef.current)) {
|
|
5084
|
-
return;
|
|
5048
|
+
if (unmount !== void 0) {
|
|
5049
|
+
unmount();
|
|
5085
5050
|
}
|
|
5086
|
-
handler(event);
|
|
5087
|
-
};
|
|
5088
|
-
document.addEventListener("mousedown", listener);
|
|
5089
|
-
document.addEventListener("touchstart", listener);
|
|
5090
|
-
return function() {
|
|
5091
|
-
document.removeEventListener("mousedown", listener);
|
|
5092
|
-
document.removeEventListener("touchstart", listener);
|
|
5093
5051
|
};
|
|
5094
|
-
},
|
|
5095
|
-
|
|
5096
|
-
handler,
|
|
5097
|
-
ignoreClassName
|
|
5098
|
-
]);
|
|
5099
|
-
}
|
|
5052
|
+
}, dependencies);
|
|
5053
|
+
};
|
|
5100
5054
|
function _extends$1() {
|
|
5101
5055
|
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
5102
5056
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -6565,7 +6519,7 @@
|
|
|
6565
6519
|
if (Array.isArray(arr))
|
|
6566
6520
|
return _array_like_to_array$p(arr);
|
|
6567
6521
|
}
|
|
6568
|
-
function _define_property$
|
|
6522
|
+
function _define_property$19(obj, key, value) {
|
|
6569
6523
|
if (key in obj) {
|
|
6570
6524
|
Object.defineProperty(obj, key, {
|
|
6571
6525
|
value,
|
|
@@ -6595,7 +6549,7 @@
|
|
|
6595
6549
|
}));
|
|
6596
6550
|
}
|
|
6597
6551
|
ownKeys2.forEach(function(key) {
|
|
6598
|
-
_define_property$
|
|
6552
|
+
_define_property$19(target, key, source[key]);
|
|
6599
6553
|
});
|
|
6600
6554
|
}
|
|
6601
6555
|
return target;
|
|
@@ -6670,6 +6624,11 @@
|
|
|
6670
6624
|
}, dependenciesForPositionUpdating);
|
|
6671
6625
|
return popperData;
|
|
6672
6626
|
};
|
|
6627
|
+
var useLatestRef = function(value) {
|
|
6628
|
+
var ref = React.useRef(value);
|
|
6629
|
+
ref.current = value;
|
|
6630
|
+
return ref;
|
|
6631
|
+
};
|
|
6673
6632
|
function _array_like_to_array$o(arr, len) {
|
|
6674
6633
|
if (len == null || len > arr.length)
|
|
6675
6634
|
len = arr.length;
|
|
@@ -6681,25 +6640,39 @@
|
|
|
6681
6640
|
if (Array.isArray(arr))
|
|
6682
6641
|
return arr;
|
|
6683
6642
|
}
|
|
6684
|
-
function
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6643
|
+
function _iterable_to_array_limit$n(arr, i) {
|
|
6644
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
6645
|
+
if (_i == null)
|
|
6646
|
+
return;
|
|
6647
|
+
var _arr = [];
|
|
6648
|
+
var _n = true;
|
|
6649
|
+
var _d = false;
|
|
6650
|
+
var _s, _e;
|
|
6651
|
+
try {
|
|
6652
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
6653
|
+
_arr.push(_s.value);
|
|
6654
|
+
if (i && _arr.length === i)
|
|
6655
|
+
break;
|
|
6656
|
+
}
|
|
6657
|
+
} catch (err) {
|
|
6658
|
+
_d = true;
|
|
6659
|
+
_e = err;
|
|
6660
|
+
} finally {
|
|
6661
|
+
try {
|
|
6662
|
+
if (!_n && _i["return"] != null)
|
|
6663
|
+
_i["return"]();
|
|
6664
|
+
} finally {
|
|
6665
|
+
if (_d)
|
|
6666
|
+
throw _e;
|
|
6667
|
+
}
|
|
6668
|
+
}
|
|
6669
|
+
return _arr;
|
|
6691
6670
|
}
|
|
6692
6671
|
function _non_iterable_rest$o() {
|
|
6693
6672
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6694
6673
|
}
|
|
6695
|
-
function
|
|
6696
|
-
|
|
6697
|
-
}
|
|
6698
|
-
function _to_array(arr) {
|
|
6699
|
-
return _array_with_holes$o(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_rest$o();
|
|
6700
|
-
}
|
|
6701
|
-
function _to_consumable_array$9(arr) {
|
|
6702
|
-
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$9();
|
|
6674
|
+
function _sliced_to_array$n(arr, i) {
|
|
6675
|
+
return _array_with_holes$o(arr) || _iterable_to_array_limit$n(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$o();
|
|
6703
6676
|
}
|
|
6704
6677
|
function _unsupported_iterable_to_array$o(o, minLen) {
|
|
6705
6678
|
if (!o)
|
|
@@ -6714,64 +6687,41 @@
|
|
|
6714
6687
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
6715
6688
|
return _array_like_to_array$o(o, minLen);
|
|
6716
6689
|
}
|
|
6717
|
-
var
|
|
6718
|
-
var
|
|
6719
|
-
var theme = useTheme();
|
|
6720
|
-
var isMergeDisabled = trueReactPlatformHelpers.isNotEmpty(React.useContext(JssContext).tweakStylesArch);
|
|
6690
|
+
var useIntersectionRef = function(options) {
|
|
6691
|
+
var optionsRef = useLatestRef(options);
|
|
6721
6692
|
return React.useMemo(function() {
|
|
6722
|
-
var
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
}
|
|
6740
|
-
if (!areStylesThemed(maybeInnerStyles)) {
|
|
6741
|
-
themedStyles(maybeInnerStyles, maybeThemeStyles);
|
|
6742
|
-
}
|
|
6743
|
-
return [
|
|
6744
|
-
maybeInnerStyles
|
|
6745
|
-
];
|
|
6693
|
+
var observer = new IntersectionObserver(function(param) {
|
|
6694
|
+
var _param = _sliced_to_array$n(param, 1), isIntersecting = _param[0].isIntersecting;
|
|
6695
|
+
var current = optionsRef.current;
|
|
6696
|
+
if (current === null || current === void 0 ? void 0 : current.isDisabled) {
|
|
6697
|
+
return;
|
|
6698
|
+
}
|
|
6699
|
+
if (isIntersecting) {
|
|
6700
|
+
var _current_onIntersection;
|
|
6701
|
+
current === null || current === void 0 ? void 0 : (_current_onIntersection = current.onIntersection) === null || _current_onIntersection === void 0 ? void 0 : _current_onIntersection.call(current);
|
|
6702
|
+
} else {
|
|
6703
|
+
var _current_onIntersectionEnd;
|
|
6704
|
+
current === null || current === void 0 ? void 0 : (_current_onIntersectionEnd = current.onIntersectionEnd) === null || _current_onIntersectionEnd === void 0 ? void 0 : _current_onIntersectionEnd.call(current);
|
|
6705
|
+
}
|
|
6706
|
+
});
|
|
6707
|
+
return function(node) {
|
|
6708
|
+
return trueReactPlatformHelpers.isNotEmpty(node) ? observer.observe(node) : observer.disconnect();
|
|
6709
|
+
};
|
|
6746
6710
|
}, [
|
|
6747
|
-
|
|
6748
|
-
className,
|
|
6749
|
-
currentComponentName,
|
|
6750
|
-
tweakStyles,
|
|
6751
|
-
theme,
|
|
6752
|
-
isMergeDisabled
|
|
6711
|
+
optionsRef
|
|
6753
6712
|
]);
|
|
6754
6713
|
};
|
|
6755
|
-
var
|
|
6756
|
-
var
|
|
6714
|
+
var useIsMounted = function() {
|
|
6715
|
+
var isMounted = React.useRef(false);
|
|
6757
6716
|
React.useEffect(function() {
|
|
6758
|
-
|
|
6759
|
-
if (isMountedRef.current) {
|
|
6760
|
-
unmount = effect2();
|
|
6761
|
-
} else {
|
|
6762
|
-
isMountedRef.current = true;
|
|
6763
|
-
}
|
|
6717
|
+
isMounted.current = true;
|
|
6764
6718
|
return function() {
|
|
6765
|
-
|
|
6766
|
-
unmount();
|
|
6767
|
-
}
|
|
6719
|
+
isMounted.current = false;
|
|
6768
6720
|
};
|
|
6769
|
-
},
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
return trueReactPlatformHelpers.mergeRefs(refs);
|
|
6774
|
-
}, refs);
|
|
6721
|
+
}, []);
|
|
6722
|
+
return React.useCallback(function() {
|
|
6723
|
+
return isMounted.current;
|
|
6724
|
+
}, []);
|
|
6775
6725
|
};
|
|
6776
6726
|
var useMerge = function(one, two) {
|
|
6777
6727
|
return React.useMemo(function() {
|
|
@@ -6781,6 +6731,68 @@
|
|
|
6781
6731
|
two
|
|
6782
6732
|
]);
|
|
6783
6733
|
};
|
|
6734
|
+
var useMergedRefs = function(refs) {
|
|
6735
|
+
return React.useMemo(function() {
|
|
6736
|
+
return trueReactPlatformHelpers.mergeRefs(refs);
|
|
6737
|
+
}, refs);
|
|
6738
|
+
};
|
|
6739
|
+
var checkElementParentsClassNames = function(element, className) {
|
|
6740
|
+
if (element.classList.contains(className)) {
|
|
6741
|
+
return true;
|
|
6742
|
+
}
|
|
6743
|
+
if (element === document.body) {
|
|
6744
|
+
return false;
|
|
6745
|
+
}
|
|
6746
|
+
if (element.parentElement) {
|
|
6747
|
+
return checkElementParentsClassNames(element.parentElement, className);
|
|
6748
|
+
}
|
|
6749
|
+
return false;
|
|
6750
|
+
};
|
|
6751
|
+
var isElementOneOfParents = function(element, elToSearch) {
|
|
6752
|
+
if (element === elToSearch) {
|
|
6753
|
+
return true;
|
|
6754
|
+
}
|
|
6755
|
+
if (element === document.body) {
|
|
6756
|
+
return false;
|
|
6757
|
+
}
|
|
6758
|
+
if (element.parentElement) {
|
|
6759
|
+
return isElementOneOfParents(element.parentElement, elToSearch);
|
|
6760
|
+
}
|
|
6761
|
+
return false;
|
|
6762
|
+
};
|
|
6763
|
+
function useOnClickOutsideWithRef(refOrGetter, handler, ignoreRef) {
|
|
6764
|
+
useOnClickOutside(refOrGetter, handler, void 0, ignoreRef);
|
|
6765
|
+
}
|
|
6766
|
+
function useOnClickOutside(refOrGetter, handler, ignoreClassName, ignoreRef) {
|
|
6767
|
+
var optionsRef = useLatestRef({
|
|
6768
|
+
refOrGetter,
|
|
6769
|
+
ignoreRef,
|
|
6770
|
+
ignoreClassName,
|
|
6771
|
+
handler
|
|
6772
|
+
});
|
|
6773
|
+
React.useEffect(function() {
|
|
6774
|
+
var listener = function(event) {
|
|
6775
|
+
var _options_refOrGetter, _options_ignoreRef;
|
|
6776
|
+
var options = optionsRef.current;
|
|
6777
|
+
var elem = trueReactPlatformHelpers.isFunction(options.refOrGetter) ? options.refOrGetter() : (_options_refOrGetter = options.refOrGetter) === null || _options_refOrGetter === void 0 ? void 0 : _options_refOrGetter.current;
|
|
6778
|
+
var ignoreElem = (_options_ignoreRef = options.ignoreRef) === null || _options_ignoreRef === void 0 ? void 0 : _options_ignoreRef.current;
|
|
6779
|
+
var target = event.target;
|
|
6780
|
+
if (trueReactPlatformHelpers.isEmpty(elem) || // Do nothing if clicking ref's element or descendent elements
|
|
6781
|
+
elem.contains(target) || trueReactPlatformHelpers.isNotEmpty(options.ignoreClassName) && checkElementParentsClassNames(target, options.ignoreClassName) || trueReactPlatformHelpers.isNotEmpty(ignoreElem) && isElementOneOfParents(target, ignoreElem)) {
|
|
6782
|
+
return;
|
|
6783
|
+
}
|
|
6784
|
+
options.handler(event);
|
|
6785
|
+
};
|
|
6786
|
+
document.addEventListener("mousedown", listener);
|
|
6787
|
+
document.addEventListener("touchstart", listener);
|
|
6788
|
+
return function() {
|
|
6789
|
+
document.removeEventListener("mousedown", listener);
|
|
6790
|
+
document.removeEventListener("touchstart", listener);
|
|
6791
|
+
};
|
|
6792
|
+
}, [
|
|
6793
|
+
optionsRef
|
|
6794
|
+
]);
|
|
6795
|
+
}
|
|
6784
6796
|
function _array_like_to_array$n(arr, len) {
|
|
6785
6797
|
if (len == null || len > arr.length)
|
|
6786
6798
|
len = arr.length;
|
|
@@ -6792,39 +6804,25 @@
|
|
|
6792
6804
|
if (Array.isArray(arr))
|
|
6793
6805
|
return arr;
|
|
6794
6806
|
}
|
|
6795
|
-
function
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
var _s, _e;
|
|
6803
|
-
try {
|
|
6804
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
6805
|
-
_arr.push(_s.value);
|
|
6806
|
-
if (i && _arr.length === i)
|
|
6807
|
-
break;
|
|
6808
|
-
}
|
|
6809
|
-
} catch (err) {
|
|
6810
|
-
_d = true;
|
|
6811
|
-
_e = err;
|
|
6812
|
-
} finally {
|
|
6813
|
-
try {
|
|
6814
|
-
if (!_n && _i["return"] != null)
|
|
6815
|
-
_i["return"]();
|
|
6816
|
-
} finally {
|
|
6817
|
-
if (_d)
|
|
6818
|
-
throw _e;
|
|
6819
|
-
}
|
|
6820
|
-
}
|
|
6821
|
-
return _arr;
|
|
6807
|
+
function _array_without_holes$9(arr) {
|
|
6808
|
+
if (Array.isArray(arr))
|
|
6809
|
+
return _array_like_to_array$n(arr);
|
|
6810
|
+
}
|
|
6811
|
+
function _iterable_to_array$9(iter) {
|
|
6812
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
6813
|
+
return Array.from(iter);
|
|
6822
6814
|
}
|
|
6823
6815
|
function _non_iterable_rest$n() {
|
|
6824
6816
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6825
6817
|
}
|
|
6826
|
-
function
|
|
6827
|
-
|
|
6818
|
+
function _non_iterable_spread$9() {
|
|
6819
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6820
|
+
}
|
|
6821
|
+
function _to_array(arr) {
|
|
6822
|
+
return _array_with_holes$n(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_rest$n();
|
|
6823
|
+
}
|
|
6824
|
+
function _to_consumable_array$9(arr) {
|
|
6825
|
+
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_spread$9();
|
|
6828
6826
|
}
|
|
6829
6827
|
function _unsupported_iterable_to_array$n(o, minLen) {
|
|
6830
6828
|
if (!o)
|
|
@@ -6839,28 +6837,43 @@
|
|
|
6839
6837
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
6840
6838
|
return _array_like_to_array$n(o, minLen);
|
|
6841
6839
|
}
|
|
6842
|
-
var
|
|
6843
|
-
var
|
|
6844
|
-
|
|
6840
|
+
var useTweakStyles = function(param) {
|
|
6841
|
+
var innerStyles = param.innerStyles, tweakStyles = param.tweakStyles, className = param.className, currentComponentName = param.currentComponentName;
|
|
6842
|
+
var theme = useTheme();
|
|
6843
|
+
var isMergeDisabled = trueReactPlatformHelpers.isNotEmpty(React.useContext(JssContext).tweakStylesArch);
|
|
6845
6844
|
return React.useMemo(function() {
|
|
6846
|
-
var
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6845
|
+
var _theme_components;
|
|
6846
|
+
var themeStyles = trueReactPlatformHelpers.isNotEmpty(currentComponentName) ? (_theme_components = theme.components) === null || _theme_components === void 0 ? void 0 : _theme_components[currentComponentName] : void 0;
|
|
6847
|
+
var resultStyles = mixStyles(innerStyles, mixStyles(themeStyles, tweakStyles).map(function(style) {
|
|
6848
|
+
return style[className];
|
|
6849
|
+
}));
|
|
6850
|
+
if (isMergeDisabled || resultStyles.length < 2) {
|
|
6851
|
+
return resultStyles;
|
|
6852
|
+
}
|
|
6853
|
+
var _resultStyles = _to_array(resultStyles), maybeInnerStyles = _resultStyles[0], maybeThemeStyles = _resultStyles[1], rest = _resultStyles.slice(2);
|
|
6854
|
+
if (maybeThemeStyles !== (themeStyles === null || themeStyles === void 0 ? void 0 : themeStyles[className]) || // Если нет themeStyles или innerStyles
|
|
6855
|
+
trueReactPlatformHelpers.isArrayNotEmpty(rest)) {
|
|
6856
|
+
return [
|
|
6857
|
+
trueReactPlatformHelpers.mergeStyles.apply(void 0, [
|
|
6858
|
+
maybeInnerStyles,
|
|
6859
|
+
maybeThemeStyles
|
|
6860
|
+
].concat(_to_consumable_array$9(rest)))
|
|
6861
|
+
];
|
|
6862
|
+
}
|
|
6863
|
+
if (!areStylesThemed(maybeInnerStyles)) {
|
|
6864
|
+
themedStyles(maybeInnerStyles, maybeThemeStyles);
|
|
6865
|
+
}
|
|
6866
|
+
return [
|
|
6867
|
+
maybeInnerStyles
|
|
6868
|
+
];
|
|
6869
|
+
}, [
|
|
6870
|
+
innerStyles,
|
|
6871
|
+
className,
|
|
6872
|
+
currentComponentName,
|
|
6873
|
+
tweakStyles,
|
|
6874
|
+
theme,
|
|
6875
|
+
isMergeDisabled
|
|
6876
|
+
]);
|
|
6864
6877
|
};
|
|
6865
6878
|
const avatarGreen = ` <svg
|
|
6866
6879
|
width="100%"
|
|
@@ -6937,7 +6950,7 @@
|
|
|
6937
6950
|
"file-xml": fileXml,
|
|
6938
6951
|
"file-zip": fileZip
|
|
6939
6952
|
};
|
|
6940
|
-
function _define_property$
|
|
6953
|
+
function _define_property$18(obj, key, value) {
|
|
6941
6954
|
if (key in obj) {
|
|
6942
6955
|
Object.defineProperty(obj, key, {
|
|
6943
6956
|
value,
|
|
@@ -6960,7 +6973,7 @@
|
|
|
6960
6973
|
}));
|
|
6961
6974
|
}
|
|
6962
6975
|
ownKeys2.forEach(function(key) {
|
|
6963
|
-
_define_property$
|
|
6976
|
+
_define_property$18(target, key, source[key]);
|
|
6964
6977
|
});
|
|
6965
6978
|
}
|
|
6966
6979
|
return target;
|
|
@@ -7840,7 +7853,7 @@
|
|
|
7840
7853
|
]
|
|
7841
7854
|
}
|
|
7842
7855
|
});
|
|
7843
|
-
function _define_property$
|
|
7856
|
+
function _define_property$17(obj, key, value) {
|
|
7844
7857
|
if (key in obj) {
|
|
7845
7858
|
Object.defineProperty(obj, key, {
|
|
7846
7859
|
value,
|
|
@@ -7863,7 +7876,7 @@
|
|
|
7863
7876
|
}));
|
|
7864
7877
|
}
|
|
7865
7878
|
ownKeys2.forEach(function(key) {
|
|
7866
|
-
_define_property$
|
|
7879
|
+
_define_property$17(target, key, source[key]);
|
|
7867
7880
|
});
|
|
7868
7881
|
}
|
|
7869
7882
|
return target;
|
|
@@ -7936,7 +7949,7 @@
|
|
|
7936
7949
|
alignItems: "center"
|
|
7937
7950
|
}
|
|
7938
7951
|
});
|
|
7939
|
-
function _define_property$
|
|
7952
|
+
function _define_property$16(obj, key, value) {
|
|
7940
7953
|
if (key in obj) {
|
|
7941
7954
|
Object.defineProperty(obj, key, {
|
|
7942
7955
|
value,
|
|
@@ -7959,7 +7972,7 @@
|
|
|
7959
7972
|
}));
|
|
7960
7973
|
}
|
|
7961
7974
|
ownKeys2.forEach(function(key) {
|
|
7962
|
-
_define_property$
|
|
7975
|
+
_define_property$16(target, key, source[key]);
|
|
7963
7976
|
});
|
|
7964
7977
|
}
|
|
7965
7978
|
return target;
|
|
@@ -8064,7 +8077,7 @@
|
|
|
8064
8077
|
if (Array.isArray(arr))
|
|
8065
8078
|
return _array_like_to_array$m(arr);
|
|
8066
8079
|
}
|
|
8067
|
-
function _define_property$
|
|
8080
|
+
function _define_property$15(obj, key, value) {
|
|
8068
8081
|
if (key in obj) {
|
|
8069
8082
|
Object.defineProperty(obj, key, {
|
|
8070
8083
|
value,
|
|
@@ -8125,7 +8138,7 @@
|
|
|
8125
8138
|
}));
|
|
8126
8139
|
}
|
|
8127
8140
|
ownKeys2.forEach(function(key) {
|
|
8128
|
-
_define_property$
|
|
8141
|
+
_define_property$15(target, key, source[key]);
|
|
8129
8142
|
});
|
|
8130
8143
|
}
|
|
8131
8144
|
return target;
|
|
@@ -8179,17 +8192,18 @@
|
|
|
8179
8192
|
theme: tweakStyles
|
|
8180
8193
|
});
|
|
8181
8194
|
var _useState = _sliced_to_array$m(React.useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
8195
|
+
var isActive = isOpen && !isDisabled;
|
|
8182
8196
|
var arrowRef = React.useRef(null);
|
|
8183
|
-
var handleToggle = function(
|
|
8197
|
+
var handleToggle = function(next, event) {
|
|
8184
8198
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
8185
|
-
onToggle === null || onToggle === void 0 ? void 0 : onToggle(
|
|
8186
|
-
setIsOpen(
|
|
8199
|
+
onToggle === null || onToggle === void 0 ? void 0 : onToggle(next, event);
|
|
8200
|
+
setIsOpen(next);
|
|
8187
8201
|
};
|
|
8188
8202
|
var handleClose = function(event) {
|
|
8189
8203
|
handleToggle(false, event);
|
|
8190
8204
|
};
|
|
8191
8205
|
var _useFloating = react.useFloating({
|
|
8192
|
-
open:
|
|
8206
|
+
open: isActive,
|
|
8193
8207
|
middleware: [
|
|
8194
8208
|
react.offset(popupOffset),
|
|
8195
8209
|
canBeFlipped && react.flip({
|
|
@@ -8242,7 +8256,7 @@
|
|
|
8242
8256
|
var triggerElement = trueReactPlatformHelpers.applyAction(trigger, {
|
|
8243
8257
|
referenceProps: !isTriggerWrapped ? referenceProps : void 0,
|
|
8244
8258
|
triggerProps: _object_spread$12({
|
|
8245
|
-
isActive
|
|
8259
|
+
isActive,
|
|
8246
8260
|
isDisabled
|
|
8247
8261
|
}, !isTriggerWrapped && _object_spread$12({
|
|
8248
8262
|
data,
|
|
@@ -8253,7 +8267,7 @@
|
|
|
8253
8267
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
8254
8268
|
children: [
|
|
8255
8269
|
isTriggerWrapped ? /* @__PURE__ */ jsx("div", _object_spread_props$S(_object_spread$12({
|
|
8256
|
-
className: clsx(classes.trigger, (_obj2 = {}, _define_property$
|
|
8270
|
+
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))
|
|
8257
8271
|
}, referenceProps, trueReactPlatformHelpers.addDataAttributes(data, testId)), {
|
|
8258
8272
|
children: triggerElement
|
|
8259
8273
|
})) : triggerElement,
|
|
@@ -8325,7 +8339,7 @@
|
|
|
8325
8339
|
flexGrow: 1
|
|
8326
8340
|
}
|
|
8327
8341
|
});
|
|
8328
|
-
function _define_property$
|
|
8342
|
+
function _define_property$14(obj, key, value) {
|
|
8329
8343
|
if (key in obj) {
|
|
8330
8344
|
Object.defineProperty(obj, key, {
|
|
8331
8345
|
value,
|
|
@@ -8348,7 +8362,7 @@
|
|
|
8348
8362
|
}));
|
|
8349
8363
|
}
|
|
8350
8364
|
ownKeys2.forEach(function(key) {
|
|
8351
|
-
_define_property$
|
|
8365
|
+
_define_property$14(target, key, source[key]);
|
|
8352
8366
|
});
|
|
8353
8367
|
}
|
|
8354
8368
|
return target;
|
|
@@ -8389,7 +8403,7 @@
|
|
|
8389
8403
|
className: classes.spacer
|
|
8390
8404
|
}),
|
|
8391
8405
|
/* @__PURE__ */ jsxs("div", _object_spread_props$R(_object_spread$11({
|
|
8392
|
-
className: clsx(classes.root, classes[view], (_obj2 = {}, _define_property$
|
|
8406
|
+
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))
|
|
8393
8407
|
}, trueReactPlatformHelpers.addClickHandler(onClick, !isDisabled), trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(_object_spread_props$R(_object_spread$11({}, data), {
|
|
8394
8408
|
disabled: isDisabled ? true : void 0
|
|
8395
8409
|
}))), {
|
|
@@ -8437,7 +8451,7 @@
|
|
|
8437
8451
|
width: "100%"
|
|
8438
8452
|
}
|
|
8439
8453
|
};
|
|
8440
|
-
function _define_property$
|
|
8454
|
+
function _define_property$13(obj, key, value) {
|
|
8441
8455
|
if (key in obj) {
|
|
8442
8456
|
Object.defineProperty(obj, key, {
|
|
8443
8457
|
value,
|
|
@@ -8460,7 +8474,7 @@
|
|
|
8460
8474
|
}));
|
|
8461
8475
|
}
|
|
8462
8476
|
ownKeys2.forEach(function(key) {
|
|
8463
|
-
_define_property$
|
|
8477
|
+
_define_property$13(target, key, source[key]);
|
|
8464
8478
|
});
|
|
8465
8479
|
}
|
|
8466
8480
|
return target;
|
|
@@ -8544,7 +8558,7 @@
|
|
|
8544
8558
|
}));
|
|
8545
8559
|
};
|
|
8546
8560
|
var ANIMATION_TIMEOUT = 150;
|
|
8547
|
-
function _define_property$
|
|
8561
|
+
function _define_property$12(obj, key, value) {
|
|
8548
8562
|
if (key in obj) {
|
|
8549
8563
|
Object.defineProperty(obj, key, {
|
|
8550
8564
|
value,
|
|
@@ -8567,7 +8581,7 @@
|
|
|
8567
8581
|
}));
|
|
8568
8582
|
}
|
|
8569
8583
|
ownKeys2.forEach(function(key) {
|
|
8570
|
-
_define_property$
|
|
8584
|
+
_define_property$12(target, key, source[key]);
|
|
8571
8585
|
});
|
|
8572
8586
|
}
|
|
8573
8587
|
return target;
|
|
@@ -8626,7 +8640,7 @@
|
|
|
8626
8640
|
if (Array.isArray(arr))
|
|
8627
8641
|
return arr;
|
|
8628
8642
|
}
|
|
8629
|
-
function _define_property$
|
|
8643
|
+
function _define_property$11(obj, key, value) {
|
|
8630
8644
|
if (key in obj) {
|
|
8631
8645
|
Object.defineProperty(obj, key, {
|
|
8632
8646
|
value,
|
|
@@ -8680,7 +8694,7 @@
|
|
|
8680
8694
|
}));
|
|
8681
8695
|
}
|
|
8682
8696
|
ownKeys2.forEach(function(key) {
|
|
8683
|
-
_define_property$
|
|
8697
|
+
_define_property$11(target, key, source[key]);
|
|
8684
8698
|
});
|
|
8685
8699
|
}
|
|
8686
8700
|
return target;
|
|
@@ -8823,7 +8837,7 @@
|
|
|
8823
8837
|
width: "100%"
|
|
8824
8838
|
}
|
|
8825
8839
|
});
|
|
8826
|
-
function _define_property
|
|
8840
|
+
function _define_property$10(obj, key, value) {
|
|
8827
8841
|
if (key in obj) {
|
|
8828
8842
|
Object.defineProperty(obj, key, {
|
|
8829
8843
|
value,
|
|
@@ -8846,7 +8860,7 @@
|
|
|
8846
8860
|
}));
|
|
8847
8861
|
}
|
|
8848
8862
|
ownKeys2.forEach(function(key) {
|
|
8849
|
-
_define_property
|
|
8863
|
+
_define_property$10(target, key, source[key]);
|
|
8850
8864
|
});
|
|
8851
8865
|
}
|
|
8852
8866
|
return target;
|
|
@@ -9046,7 +9060,7 @@
|
|
|
9046
9060
|
color: "currentColor"
|
|
9047
9061
|
}
|
|
9048
9062
|
});
|
|
9049
|
-
function _define_property
|
|
9063
|
+
function _define_property$$(obj, key, value) {
|
|
9050
9064
|
if (key in obj) {
|
|
9051
9065
|
Object.defineProperty(obj, key, {
|
|
9052
9066
|
value,
|
|
@@ -9069,7 +9083,7 @@
|
|
|
9069
9083
|
}));
|
|
9070
9084
|
}
|
|
9071
9085
|
ownKeys2.forEach(function(key) {
|
|
9072
|
-
_define_property
|
|
9086
|
+
_define_property$$(target, key, source[key]);
|
|
9073
9087
|
});
|
|
9074
9088
|
}
|
|
9075
9089
|
return target;
|
|
@@ -9114,7 +9128,7 @@
|
|
|
9114
9128
|
currentComponentName: "ThemedPreloader"
|
|
9115
9129
|
});
|
|
9116
9130
|
return /* @__PURE__ */ jsx("div", _object_spread_props$N(_object_spread$Y({
|
|
9117
|
-
className: clsx(classes.root, classes[type], _define_property
|
|
9131
|
+
className: clsx(classes.root, classes[type], _define_property$$({}, classes.currentColor, useCurrentColor))
|
|
9118
9132
|
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
9119
9133
|
children: type === "dots" ? /* @__PURE__ */ jsx(DotsPreloader, {
|
|
9120
9134
|
tweakStyles: tweakDotsPreloaderStyles
|
|
@@ -9295,7 +9309,7 @@
|
|
|
9295
9309
|
var getPreloaderStyles = function(size) {
|
|
9296
9310
|
return size === "s" || size === "m" ? dotsPreloaderStyles : void 0;
|
|
9297
9311
|
};
|
|
9298
|
-
function _define_property$
|
|
9312
|
+
function _define_property$_(obj, key, value) {
|
|
9299
9313
|
if (key in obj) {
|
|
9300
9314
|
Object.defineProperty(obj, key, {
|
|
9301
9315
|
value,
|
|
@@ -9318,7 +9332,7 @@
|
|
|
9318
9332
|
}));
|
|
9319
9333
|
}
|
|
9320
9334
|
ownKeys2.forEach(function(key) {
|
|
9321
|
-
_define_property$
|
|
9335
|
+
_define_property$_(target, key, source[key]);
|
|
9322
9336
|
});
|
|
9323
9337
|
}
|
|
9324
9338
|
return target;
|
|
@@ -9414,13 +9428,13 @@
|
|
|
9414
9428
|
return /* @__PURE__ */ jsxs("button", _object_spread_props$M(_object_spread$X({
|
|
9415
9429
|
ref,
|
|
9416
9430
|
type,
|
|
9417
|
-
className: clsx(classes.root, classes[size], classes[view], (_obj2 = {}, _define_property$
|
|
9431
|
+
className: clsx(classes.root, classes[size], 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)),
|
|
9418
9432
|
tabIndex: shouldSkipTabNavigation ? -1 : void 0,
|
|
9419
9433
|
disabled: hasNoAction
|
|
9420
9434
|
}, interactions, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
9421
9435
|
children: [
|
|
9422
9436
|
/* @__PURE__ */ jsxs("span", {
|
|
9423
|
-
className: clsx(classes.content, (_obj1 = {}, _define_property$
|
|
9437
|
+
className: clsx(classes.content, (_obj1 = {}, _define_property$_(_obj1, classes.iconFromRight, hasChildren && hasIcon && iconPosition === "right"), _define_property$_(_obj1, classes.iconFromLeft, hasChildren && hasIcon && iconPosition === "left"), _obj1)),
|
|
9424
9438
|
children: [
|
|
9425
9439
|
hasIcon && /* @__PURE__ */ jsx("span", {
|
|
9426
9440
|
className: classes.icon,
|
|
@@ -9481,7 +9495,7 @@
|
|
|
9481
9495
|
flexDirection: "row-reverse"
|
|
9482
9496
|
}
|
|
9483
9497
|
});
|
|
9484
|
-
function _define_property$
|
|
9498
|
+
function _define_property$Z(obj, key, value) {
|
|
9485
9499
|
if (key in obj) {
|
|
9486
9500
|
Object.defineProperty(obj, key, {
|
|
9487
9501
|
value,
|
|
@@ -9504,7 +9518,7 @@
|
|
|
9504
9518
|
}));
|
|
9505
9519
|
}
|
|
9506
9520
|
ownKeys2.forEach(function(key) {
|
|
9507
|
-
_define_property$
|
|
9521
|
+
_define_property$Z(target, key, source[key]);
|
|
9508
9522
|
});
|
|
9509
9523
|
}
|
|
9510
9524
|
return target;
|
|
@@ -9548,7 +9562,7 @@
|
|
|
9548
9562
|
};
|
|
9549
9563
|
var _obj2;
|
|
9550
9564
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$L(_object_spread$W({
|
|
9551
|
-
className: clsx(classes.root, (_obj2 = {}, _define_property$
|
|
9565
|
+
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))
|
|
9552
9566
|
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
9553
9567
|
children: [
|
|
9554
9568
|
/* @__PURE__ */ jsx("input", _object_spread$W({
|
|
@@ -9600,7 +9614,7 @@
|
|
|
9600
9614
|
}
|
|
9601
9615
|
}
|
|
9602
9616
|
});
|
|
9603
|
-
function _define_property$
|
|
9617
|
+
function _define_property$Y(obj, key, value) {
|
|
9604
9618
|
if (key in obj) {
|
|
9605
9619
|
Object.defineProperty(obj, key, {
|
|
9606
9620
|
value,
|
|
@@ -9623,7 +9637,7 @@
|
|
|
9623
9637
|
}));
|
|
9624
9638
|
}
|
|
9625
9639
|
ownKeys2.forEach(function(key) {
|
|
9626
|
-
_define_property$
|
|
9640
|
+
_define_property$Y(target, key, source[key]);
|
|
9627
9641
|
});
|
|
9628
9642
|
}
|
|
9629
9643
|
return target;
|
|
@@ -9799,7 +9813,7 @@
|
|
|
9799
9813
|
},
|
|
9800
9814
|
root: {}
|
|
9801
9815
|
});
|
|
9802
|
-
function _define_property$
|
|
9816
|
+
function _define_property$X(obj, key, value) {
|
|
9803
9817
|
if (key in obj) {
|
|
9804
9818
|
Object.defineProperty(obj, key, {
|
|
9805
9819
|
value,
|
|
@@ -9822,7 +9836,7 @@
|
|
|
9822
9836
|
}));
|
|
9823
9837
|
}
|
|
9824
9838
|
ownKeys2.forEach(function(key) {
|
|
9825
|
-
_define_property$
|
|
9839
|
+
_define_property$X(target, key, source[key]);
|
|
9826
9840
|
});
|
|
9827
9841
|
}
|
|
9828
9842
|
return target;
|
|
@@ -9870,7 +9884,7 @@
|
|
|
9870
9884
|
},
|
|
9871
9885
|
children: {}
|
|
9872
9886
|
});
|
|
9873
|
-
function _define_property$
|
|
9887
|
+
function _define_property$W(obj, key, value) {
|
|
9874
9888
|
if (key in obj) {
|
|
9875
9889
|
Object.defineProperty(obj, key, {
|
|
9876
9890
|
value,
|
|
@@ -9893,7 +9907,7 @@
|
|
|
9893
9907
|
}));
|
|
9894
9908
|
}
|
|
9895
9909
|
ownKeys2.forEach(function(key) {
|
|
9896
|
-
_define_property$
|
|
9910
|
+
_define_property$W(target, key, source[key]);
|
|
9897
9911
|
});
|
|
9898
9912
|
}
|
|
9899
9913
|
return target;
|
|
@@ -9937,7 +9951,7 @@
|
|
|
9937
9951
|
}, trueReactPlatformHelpers.addDataAttributes(data, testId)), {
|
|
9938
9952
|
children: [
|
|
9939
9953
|
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
9940
|
-
className: clsx(classes.children, (_obj2 = {}, _define_property$
|
|
9954
|
+
className: clsx(classes.children, (_obj2 = {}, _define_property$W(_obj2, classes.horizontal, controlsDirection === "horizontal"), _define_property$W(_obj2, classes.vertical, controlsDirection === "vertical"), _obj2)),
|
|
9941
9955
|
children
|
|
9942
9956
|
}),
|
|
9943
9957
|
(shouldShowError || shouldShowInfo) && /* @__PURE__ */ jsxs("div", {
|
|
@@ -10110,7 +10124,7 @@
|
|
|
10110
10124
|
borderRadius: 0
|
|
10111
10125
|
}
|
|
10112
10126
|
});
|
|
10113
|
-
function _define_property$
|
|
10127
|
+
function _define_property$V(obj, key, value) {
|
|
10114
10128
|
if (key in obj) {
|
|
10115
10129
|
Object.defineProperty(obj, key, {
|
|
10116
10130
|
value,
|
|
@@ -10133,7 +10147,7 @@
|
|
|
10133
10147
|
}));
|
|
10134
10148
|
}
|
|
10135
10149
|
ownKeys2.forEach(function(key) {
|
|
10136
|
-
_define_property$
|
|
10150
|
+
_define_property$V(target, key, source[key]);
|
|
10137
10151
|
});
|
|
10138
10152
|
}
|
|
10139
10153
|
return target;
|
|
@@ -10178,11 +10192,11 @@
|
|
|
10178
10192
|
});
|
|
10179
10193
|
var _obj2, _obj1, _obj22;
|
|
10180
10194
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$I(_object_spread$S({
|
|
10181
|
-
className: clsx(classes.controlWrapper, trueReactPlatformHelpers.isNotEmpty(groupPlacement) && classes["placement-".concat(groupPlacement)], trueReactPlatformHelpers.isNotEmpty(size) && classes[size], (_obj2 = {}, _define_property$
|
|
10195
|
+
className: clsx(classes.controlWrapper, trueReactPlatformHelpers.isNotEmpty(groupPlacement) && classes["placement-".concat(groupPlacement)], trueReactPlatformHelpers.isNotEmpty(size) && classes[size], (_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))
|
|
10182
10196
|
}, trueReactPlatformHelpers.addDataAttributes(data, testId)), {
|
|
10183
10197
|
children: [
|
|
10184
10198
|
trueReactPlatformHelpers.isReactNodeNotEmpty(label) && /* @__PURE__ */ jsx("div", {
|
|
10185
|
-
className: clsx(classes.label, (_obj1 = {}, _define_property$
|
|
10199
|
+
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)),
|
|
10186
10200
|
children: label
|
|
10187
10201
|
}),
|
|
10188
10202
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -10203,7 +10217,7 @@
|
|
|
10203
10217
|
})
|
|
10204
10218
|
})),
|
|
10205
10219
|
hasEndIcon && /* @__PURE__ */ jsx("div", _object_spread_props$I(_object_spread$S({
|
|
10206
|
-
className: clsx(classes.icon, classes.endIcon, (_obj22 = {}, _define_property$
|
|
10220
|
+
className: clsx(classes.icon, classes.endIcon, (_obj22 = {}, _define_property$V(_obj22, classes.activeIcon, !isDisabled && trueReactPlatformHelpers.isNotEmpty(onIconClick)), _define_property$V(_obj22, classes.customIcon, !trueReactPlatformHelpers.isString(icon)), _obj22))
|
|
10207
10221
|
}, trueReactPlatformHelpers.addClickHandler(onIconClick, !isDisabled), trueReactPlatformHelpers.addDataTestId(testId, "icon")), {
|
|
10208
10222
|
children: /* @__PURE__ */ jsx("div", {
|
|
10209
10223
|
className: classes.iconInner,
|
|
@@ -10341,7 +10355,7 @@
|
|
|
10341
10355
|
});
|
|
10342
10356
|
};
|
|
10343
10357
|
}
|
|
10344
|
-
function _define_property$
|
|
10358
|
+
function _define_property$U(obj, key, value) {
|
|
10345
10359
|
if (key in obj) {
|
|
10346
10360
|
Object.defineProperty(obj, key, {
|
|
10347
10361
|
value,
|
|
@@ -10395,7 +10409,7 @@
|
|
|
10395
10409
|
}));
|
|
10396
10410
|
}
|
|
10397
10411
|
ownKeys2.forEach(function(key) {
|
|
10398
|
-
_define_property$
|
|
10412
|
+
_define_property$U(target, key, source[key]);
|
|
10399
10413
|
});
|
|
10400
10414
|
}
|
|
10401
10415
|
return target;
|
|
@@ -10655,7 +10669,7 @@
|
|
|
10655
10669
|
]);
|
|
10656
10670
|
var _obj2;
|
|
10657
10671
|
var props = _object_spread$R({
|
|
10658
|
-
className: clsx(classes.input, (_obj2 = {}, _define_property$
|
|
10672
|
+
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, trueReactPlatformHelpers.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)),
|
|
10659
10673
|
style: hasUnits && hasValue ? {
|
|
10660
10674
|
"--units-width": "".concat(unitsWidth, "px")
|
|
10661
10675
|
} : void 0,
|
|
@@ -10728,7 +10742,7 @@
|
|
|
10728
10742
|
]
|
|
10729
10743
|
});
|
|
10730
10744
|
});
|
|
10731
|
-
function _define_property$
|
|
10745
|
+
function _define_property$T(obj, key, value) {
|
|
10732
10746
|
if (key in obj) {
|
|
10733
10747
|
Object.defineProperty(obj, key, {
|
|
10734
10748
|
value,
|
|
@@ -10751,7 +10765,7 @@
|
|
|
10751
10765
|
}));
|
|
10752
10766
|
}
|
|
10753
10767
|
ownKeys2.forEach(function(key) {
|
|
10754
|
-
_define_property$
|
|
10768
|
+
_define_property$T(target, key, source[key]);
|
|
10755
10769
|
});
|
|
10756
10770
|
}
|
|
10757
10771
|
return target;
|
|
@@ -10847,7 +10861,7 @@
|
|
|
10847
10861
|
position: "relative"
|
|
10848
10862
|
}
|
|
10849
10863
|
});
|
|
10850
|
-
function _define_property$
|
|
10864
|
+
function _define_property$S(obj, key, value) {
|
|
10851
10865
|
if (key in obj) {
|
|
10852
10866
|
Object.defineProperty(obj, key, {
|
|
10853
10867
|
value,
|
|
@@ -10870,7 +10884,7 @@
|
|
|
10870
10884
|
}));
|
|
10871
10885
|
}
|
|
10872
10886
|
ownKeys2.forEach(function(key) {
|
|
10873
|
-
_define_property$
|
|
10887
|
+
_define_property$S(target, key, source[key]);
|
|
10874
10888
|
});
|
|
10875
10889
|
}
|
|
10876
10890
|
return target;
|
|
@@ -10973,9 +10987,9 @@
|
|
|
10973
10987
|
onChange === null || onChange === void 0 ? void 0 : onChange(event, value);
|
|
10974
10988
|
};
|
|
10975
10989
|
return /* @__PURE__ */ jsx("div", _object_spread_props$G(_object_spread$P({
|
|
10976
|
-
className: clsx(classes.root, className)
|
|
10977
|
-
|
|
10978
|
-
|
|
10990
|
+
className: clsx(classes.root, className)
|
|
10991
|
+
}, trueReactPlatformHelpers.addDataAttributes(data)), {
|
|
10992
|
+
onClick,
|
|
10979
10993
|
children: /* @__PURE__ */ jsx(Input, _object_spread_props$G(_object_spread$P({}, inputProps), {
|
|
10980
10994
|
ref,
|
|
10981
10995
|
value: isRange ? "".concat(startDate).concat(endDate) : date,
|
|
@@ -10988,6 +11002,109 @@
|
|
|
10988
11002
|
}));
|
|
10989
11003
|
});
|
|
10990
11004
|
const reactDatepicker = "";
|
|
11005
|
+
function _assert_this_initialized$1(self2) {
|
|
11006
|
+
if (self2 === void 0) {
|
|
11007
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
11008
|
+
}
|
|
11009
|
+
return self2;
|
|
11010
|
+
}
|
|
11011
|
+
function _class_call_check$1(instance, Constructor) {
|
|
11012
|
+
if (!(instance instanceof Constructor)) {
|
|
11013
|
+
throw new TypeError("Cannot call a class as a function");
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
function _define_property$R(obj, key, value) {
|
|
11017
|
+
if (key in obj) {
|
|
11018
|
+
Object.defineProperty(obj, key, {
|
|
11019
|
+
value,
|
|
11020
|
+
enumerable: true,
|
|
11021
|
+
configurable: true,
|
|
11022
|
+
writable: true
|
|
11023
|
+
});
|
|
11024
|
+
} else {
|
|
11025
|
+
obj[key] = value;
|
|
11026
|
+
}
|
|
11027
|
+
return obj;
|
|
11028
|
+
}
|
|
11029
|
+
function _get_prototype_of$1(o) {
|
|
11030
|
+
_get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
11031
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
11032
|
+
};
|
|
11033
|
+
return _get_prototype_of$1(o);
|
|
11034
|
+
}
|
|
11035
|
+
function _inherits$1(subClass, superClass) {
|
|
11036
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
11037
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
11038
|
+
}
|
|
11039
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
11040
|
+
constructor: {
|
|
11041
|
+
value: subClass,
|
|
11042
|
+
writable: true,
|
|
11043
|
+
configurable: true
|
|
11044
|
+
}
|
|
11045
|
+
});
|
|
11046
|
+
if (superClass)
|
|
11047
|
+
_set_prototype_of$1(subClass, superClass);
|
|
11048
|
+
}
|
|
11049
|
+
function _possible_constructor_return$1(self2, call) {
|
|
11050
|
+
if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
|
|
11051
|
+
return call;
|
|
11052
|
+
}
|
|
11053
|
+
return _assert_this_initialized$1(self2);
|
|
11054
|
+
}
|
|
11055
|
+
function _set_prototype_of$1(o, p) {
|
|
11056
|
+
_set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
11057
|
+
o2.__proto__ = p2;
|
|
11058
|
+
return o2;
|
|
11059
|
+
};
|
|
11060
|
+
return _set_prototype_of$1(o, p);
|
|
11061
|
+
}
|
|
11062
|
+
function _type_of$1(obj) {
|
|
11063
|
+
"@swc/helpers - typeof";
|
|
11064
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
11065
|
+
}
|
|
11066
|
+
function _is_native_reflect_construct$1() {
|
|
11067
|
+
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
11068
|
+
return false;
|
|
11069
|
+
if (Reflect.construct.sham)
|
|
11070
|
+
return false;
|
|
11071
|
+
if (typeof Proxy === "function")
|
|
11072
|
+
return true;
|
|
11073
|
+
try {
|
|
11074
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
11075
|
+
}));
|
|
11076
|
+
return true;
|
|
11077
|
+
} catch (e) {
|
|
11078
|
+
return false;
|
|
11079
|
+
}
|
|
11080
|
+
}
|
|
11081
|
+
function _create_super$1(Derived) {
|
|
11082
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$1();
|
|
11083
|
+
return function _createSuperInternal() {
|
|
11084
|
+
var Super = _get_prototype_of$1(Derived), result;
|
|
11085
|
+
if (hasNativeReflectConstruct) {
|
|
11086
|
+
var NewTarget = _get_prototype_of$1(this).constructor;
|
|
11087
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
11088
|
+
} else {
|
|
11089
|
+
result = Super.apply(this, arguments);
|
|
11090
|
+
}
|
|
11091
|
+
return _possible_constructor_return$1(this, result);
|
|
11092
|
+
};
|
|
11093
|
+
}
|
|
11094
|
+
var DatePickerBase = /* @__PURE__ */ function(ReactDatePicker2) {
|
|
11095
|
+
_inherits$1(DatePickerBase2, ReactDatePicker2);
|
|
11096
|
+
var _super = _create_super$1(DatePickerBase2);
|
|
11097
|
+
function DatePickerBase2(props) {
|
|
11098
|
+
_class_call_check$1(this, DatePickerBase2);
|
|
11099
|
+
var _this;
|
|
11100
|
+
_this = _super.call(this, props);
|
|
11101
|
+
_define_property$R(_assert_this_initialized$1(_this), "handleClickOutside", void 0);
|
|
11102
|
+
_this.handleClickOutside = _this.handleCalendarClickOutside;
|
|
11103
|
+
_this.handleCalendarClickOutside = trueReactPlatformHelpers.doNothing;
|
|
11104
|
+
return _this;
|
|
11105
|
+
}
|
|
11106
|
+
return DatePickerBase2;
|
|
11107
|
+
}(ReactDatePicker);
|
|
10991
11108
|
var inputStyles$4 = {
|
|
10992
11109
|
tweakControlWrapper: {
|
|
10993
11110
|
endIcon: {
|
|
@@ -12694,9 +12811,6 @@
|
|
|
12694
12811
|
root: document.body
|
|
12695
12812
|
}, props));
|
|
12696
12813
|
};
|
|
12697
|
-
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
12698
|
-
var _ReactDatePicker_default;
|
|
12699
|
-
var DatePickerComponent = (_ReactDatePicker_default = ReactDatePicker.default) !== null && _ReactDatePicker_default !== void 0 ? _ReactDatePicker_default : ReactDatePicker;
|
|
12700
12814
|
function buildFormatLongFn(args) {
|
|
12701
12815
|
return (options = {}) => {
|
|
12702
12816
|
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
@@ -13876,6 +13990,12 @@
|
|
|
13876
13990
|
firstWeekContainsDate: 1
|
|
13877
13991
|
}
|
|
13878
13992
|
};
|
|
13993
|
+
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
13994
|
+
var OUTSIDE_CLICK_IGNORE_CLASS = "react-datepicker-ignore-onclickoutside";
|
|
13995
|
+
var LocalesMap = {
|
|
13996
|
+
ru,
|
|
13997
|
+
en: enUS
|
|
13998
|
+
};
|
|
13879
13999
|
var getDateFormatter = function(dateFormat) {
|
|
13880
14000
|
return function(date) {
|
|
13881
14001
|
return trueReactPlatformHelpers.isNotEmpty(date) ? dateFns.format(date, dateFormat) : "";
|
|
@@ -13890,15 +14010,6 @@
|
|
|
13890
14010
|
var areDatesEquals = function(date1, date2) {
|
|
13891
14011
|
return trueReactPlatformHelpers.isEmpty(date1) && trueReactPlatformHelpers.isEmpty(date2) || trueReactPlatformHelpers.isNotEmpty(date1) && trueReactPlatformHelpers.isNotEmpty(date2) && dateFns.isSameDay(date1, date2);
|
|
13892
14012
|
};
|
|
13893
|
-
var preparateDatePickerLocale = function(locale) {
|
|
13894
|
-
if (locale === "ru") {
|
|
13895
|
-
return ru;
|
|
13896
|
-
}
|
|
13897
|
-
if (locale === "en") {
|
|
13898
|
-
return enUS;
|
|
13899
|
-
}
|
|
13900
|
-
return locale;
|
|
13901
|
-
};
|
|
13902
14013
|
var useStyles$B = createThemedStyles("DatePicker", {
|
|
13903
14014
|
root: {
|
|
13904
14015
|
width: "100%",
|
|
@@ -14143,6 +14254,11 @@
|
|
|
14143
14254
|
}, [
|
|
14144
14255
|
dateFormat
|
|
14145
14256
|
]), formatDate = _useMemo.formatDate, parseDateValue = _useMemo.parseDateValue;
|
|
14257
|
+
var datePickerRef = React.useRef();
|
|
14258
|
+
var componentRef = useMergedRefs([
|
|
14259
|
+
ref,
|
|
14260
|
+
datePickerRef
|
|
14261
|
+
]);
|
|
14146
14262
|
var _useState = _sliced_to_array$h(React.useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
14147
14263
|
var _useState1 = _sliced_to_array$h(React.useState(formatDate(selectedDate)), 2), dateValue = _useState1[0], setDateValue = _useState1[1];
|
|
14148
14264
|
var _useState2 = _sliced_to_array$h(React.useState(startDate), 2), start2 = _useState2[0], setStart = _useState2[1];
|
|
@@ -14248,14 +14364,21 @@
|
|
|
14248
14364
|
startDate,
|
|
14249
14365
|
endDate
|
|
14250
14366
|
]);
|
|
14367
|
+
useOnClickOutside(function() {
|
|
14368
|
+
var _datePickerRef_current_calendar_containerRef, _datePickerRef_current_calendar, _datePickerRef_current;
|
|
14369
|
+
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;
|
|
14370
|
+
}, function(event) {
|
|
14371
|
+
var _datePickerRef_current;
|
|
14372
|
+
return (_datePickerRef_current = datePickerRef.current) === null || _datePickerRef_current === void 0 ? void 0 : _datePickerRef_current.handleClickOutside(event);
|
|
14373
|
+
}, OUTSIDE_CLICK_IGNORE_CLASS);
|
|
14251
14374
|
return /* @__PURE__ */ jsx("div", _object_spread_props$C(_object_spread$H({
|
|
14252
14375
|
className: classes.root
|
|
14253
|
-
}, addDataAttributes(data)), {
|
|
14254
|
-
children: /* @__PURE__ */ jsx(
|
|
14255
|
-
ref,
|
|
14376
|
+
}, trueReactPlatformHelpers.addDataAttributes(data)), {
|
|
14377
|
+
children: /* @__PURE__ */ jsx(DatePickerBase, _object_spread$H({
|
|
14378
|
+
ref: componentRef,
|
|
14256
14379
|
minDate,
|
|
14257
14380
|
maxDate,
|
|
14258
|
-
locale:
|
|
14381
|
+
locale: trueReactPlatformHelpers.isString(locale) ? LocalesMap[locale] : locale,
|
|
14259
14382
|
dateFormat,
|
|
14260
14383
|
placeholderText: placeholder,
|
|
14261
14384
|
calendarStartDay,
|
|
@@ -19995,6 +20118,10 @@
|
|
|
19995
20118
|
cursor: "default"
|
|
19996
20119
|
}
|
|
19997
20120
|
},
|
|
20121
|
+
hasValue: {
|
|
20122
|
+
backgroundColor: colors.CLASSIC_WHITE,
|
|
20123
|
+
borderColor: colors.BORDER_MAIN
|
|
20124
|
+
},
|
|
19998
20125
|
selectWrapper: {
|
|
19999
20126
|
position: "relative",
|
|
20000
20127
|
display: "flex",
|
|
@@ -20224,7 +20351,7 @@
|
|
|
20224
20351
|
};
|
|
20225
20352
|
var _obj2;
|
|
20226
20353
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$p(_object_spread$q({
|
|
20227
|
-
className: clsx(classes.root, (_obj2 = {}, _define_property$r(_obj2, classes.focused, isInputFocused), _define_property$r(_obj2, classes.disabled, isDisabled), _obj2)),
|
|
20354
|
+
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, trueReactPlatformHelpers.isArrayLikeNotEmpty(value)), _obj2)),
|
|
20228
20355
|
ref: refRoot
|
|
20229
20356
|
}, trueReactPlatformHelpers.addDataAttributes(data, testId)), {
|
|
20230
20357
|
children: [
|
|
@@ -20246,7 +20373,7 @@
|
|
|
20246
20373
|
/* @__PURE__ */ jsxs("div", {
|
|
20247
20374
|
className: classes.selectWrapper,
|
|
20248
20375
|
children: [
|
|
20249
|
-
fields
|
|
20376
|
+
trueReactPlatformHelpers.isArrayNotEmpty(fields) && /* @__PURE__ */ jsxs("div", _object_spread_props$p(_object_spread$q({
|
|
20250
20377
|
className: classes.selectBlock,
|
|
20251
20378
|
onClick: !isDisabled ? function() {
|
|
20252
20379
|
return setIsOpen(!isOpen);
|
|
@@ -32703,6 +32830,7 @@
|
|
|
32703
32830
|
exports2.useDropdown = useDropdown;
|
|
32704
32831
|
exports2.useIntersectionRef = useIntersectionRef;
|
|
32705
32832
|
exports2.useIsMounted = useIsMounted;
|
|
32833
|
+
exports2.useLatestRef = useLatestRef;
|
|
32706
32834
|
exports2.useMerge = useMerge;
|
|
32707
32835
|
exports2.useMergedRefs = useMergedRefs;
|
|
32708
32836
|
exports2.useMixedStyles = useMixedStyles;
|