@true-engineering/true-react-common-ui-kit 1.8.1 → 1.10.0
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/Input/Input.styles.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +12 -3
- package/dist/components/Select/Select.styles.d.ts +10 -0
- package/dist/components/Select/SelectList/SelectList.d.ts +6 -4
- package/dist/components/Select/SelectList/SelectList.styles.d.ts +5 -0
- package/dist/components/Select/SelectListItem/SelectListItem.d.ts +14 -0
- package/dist/components/Select/SelectListItem/SelectListItem.styles.d.ts +2 -0
- package/dist/components/Select/constants.d.ts +2 -0
- package/dist/components/Select/helpers.d.ts +4 -1
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/types.d.ts +1 -0
- package/dist/helpers/utils.d.ts +3 -1
- package/dist/true-react-common-ui-kit.js +1133 -217
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +1105 -188
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/FiltersPane/FilterSelect/locales.ts +1 -1
- package/src/components/FiltersPane/locales.ts +1 -1
- package/src/components/Input/Input.styles.ts +2 -0
- package/src/components/Input/Input.tsx +4 -1
- package/src/components/MultiSelectList/locales.ts +1 -1
- package/src/components/Select/MultiSelect.stories.tsx +262 -0
- package/src/components/Select/Select.styles.ts +13 -0
- package/src/components/Select/Select.tsx +218 -117
- package/src/components/Select/SelectList/SelectList.styles.ts +6 -2
- package/src/components/Select/SelectList/SelectList.tsx +64 -39
- package/src/components/Select/SelectListItem/SelectListItem.styles.ts +14 -0
- package/src/components/Select/SelectListItem/SelectListItem.tsx +73 -0
- package/src/components/Select/constants.ts +2 -0
- package/src/components/Select/helpers.ts +16 -8
- package/src/components/Select/index.ts +1 -0
- package/src/components/Select/types.ts +1 -0
- package/src/helpers/utils.ts +33 -2
- package/src/hooks/use-theme.ts +1 -1
- package/src/hooks/use-tweak-styles.ts +1 -1
|
@@ -3,7 +3,6 @@ import { CSSTransition } from "react-transition-group";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import hexToRgba from "hex-to-rgba";
|
|
5
5
|
import { createUseStyles } from "react-jss";
|
|
6
|
-
import { merge } from "lodash";
|
|
7
6
|
import InputMask from "react-input-mask";
|
|
8
7
|
import ReactDatepicker from "react-datepicker";
|
|
9
8
|
import { getYear, getMonth, format as format$1, isValid, parse, isAfter, isBefore, startOfMonth, endOfMonth, sub, startOfYear, endOfYear } from "date-fns";
|
|
@@ -627,7 +626,7 @@ function requireReactJsxRuntime_development() {
|
|
|
627
626
|
}
|
|
628
627
|
return "";
|
|
629
628
|
}
|
|
630
|
-
var
|
|
629
|
+
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
631
630
|
var loggedTypeFailures = {};
|
|
632
631
|
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
633
632
|
function setCurrentlyValidatingElement(element) {
|
|
@@ -643,7 +642,7 @@ function requireReactJsxRuntime_development() {
|
|
|
643
642
|
}
|
|
644
643
|
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
645
644
|
{
|
|
646
|
-
var has = Function.call.bind(
|
|
645
|
+
var has = Function.call.bind(hasOwnProperty2);
|
|
647
646
|
for (var typeSpecName in typeSpecs) {
|
|
648
647
|
if (has(typeSpecs, typeSpecName)) {
|
|
649
648
|
var error$1 = void 0;
|
|
@@ -673,7 +672,7 @@ function requireReactJsxRuntime_development() {
|
|
|
673
672
|
}
|
|
674
673
|
}
|
|
675
674
|
var isArrayImpl = Array.isArray;
|
|
676
|
-
function
|
|
675
|
+
function isArray2(a) {
|
|
677
676
|
return isArrayImpl(a);
|
|
678
677
|
}
|
|
679
678
|
function typeName(value) {
|
|
@@ -719,7 +718,7 @@ function requireReactJsxRuntime_development() {
|
|
|
719
718
|
}
|
|
720
719
|
function hasValidRef(config) {
|
|
721
720
|
{
|
|
722
|
-
if (
|
|
721
|
+
if (hasOwnProperty2.call(config, "ref")) {
|
|
723
722
|
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
724
723
|
if (getter && getter.isReactWarning) {
|
|
725
724
|
return false;
|
|
@@ -730,7 +729,7 @@ function requireReactJsxRuntime_development() {
|
|
|
730
729
|
}
|
|
731
730
|
function hasValidKey(config) {
|
|
732
731
|
{
|
|
733
|
-
if (
|
|
732
|
+
if (hasOwnProperty2.call(config, "key")) {
|
|
734
733
|
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
735
734
|
if (getter && getter.isReactWarning) {
|
|
736
735
|
return false;
|
|
@@ -739,9 +738,9 @@ function requireReactJsxRuntime_development() {
|
|
|
739
738
|
}
|
|
740
739
|
return config.key !== void 0;
|
|
741
740
|
}
|
|
742
|
-
function warnIfStringRefCannotBeAutoConverted(config,
|
|
741
|
+
function warnIfStringRefCannotBeAutoConverted(config, self2) {
|
|
743
742
|
{
|
|
744
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current &&
|
|
743
|
+
if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
|
|
745
744
|
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
746
745
|
if (!didWarnAboutStringRefs[componentName]) {
|
|
747
746
|
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
@@ -780,7 +779,7 @@ function requireReactJsxRuntime_development() {
|
|
|
780
779
|
});
|
|
781
780
|
}
|
|
782
781
|
}
|
|
783
|
-
var ReactElement = function(type, key, ref,
|
|
782
|
+
var ReactElement = function(type, key, ref, self2, source, owner, props) {
|
|
784
783
|
var element = {
|
|
785
784
|
// This tag allows us to uniquely identify this as a React Element
|
|
786
785
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
@@ -804,7 +803,7 @@ function requireReactJsxRuntime_development() {
|
|
|
804
803
|
configurable: false,
|
|
805
804
|
enumerable: false,
|
|
806
805
|
writable: false,
|
|
807
|
-
value:
|
|
806
|
+
value: self2
|
|
808
807
|
});
|
|
809
808
|
Object.defineProperty(element, "_source", {
|
|
810
809
|
configurable: false,
|
|
@@ -819,7 +818,7 @@ function requireReactJsxRuntime_development() {
|
|
|
819
818
|
}
|
|
820
819
|
return element;
|
|
821
820
|
};
|
|
822
|
-
function jsxDEV(type, config, maybeKey, source,
|
|
821
|
+
function jsxDEV(type, config, maybeKey, source, self2) {
|
|
823
822
|
{
|
|
824
823
|
var propName;
|
|
825
824
|
var props = {};
|
|
@@ -839,10 +838,10 @@ function requireReactJsxRuntime_development() {
|
|
|
839
838
|
}
|
|
840
839
|
if (hasValidRef(config)) {
|
|
841
840
|
ref = config.ref;
|
|
842
|
-
warnIfStringRefCannotBeAutoConverted(config,
|
|
841
|
+
warnIfStringRefCannotBeAutoConverted(config, self2);
|
|
843
842
|
}
|
|
844
843
|
for (propName in config) {
|
|
845
|
-
if (
|
|
844
|
+
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
846
845
|
props[propName] = config[propName];
|
|
847
846
|
}
|
|
848
847
|
}
|
|
@@ -863,7 +862,7 @@ function requireReactJsxRuntime_development() {
|
|
|
863
862
|
defineRefPropWarningGetter(props, displayName);
|
|
864
863
|
}
|
|
865
864
|
}
|
|
866
|
-
return ReactElement(type, key, ref,
|
|
865
|
+
return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
|
|
867
866
|
}
|
|
868
867
|
}
|
|
869
868
|
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
@@ -947,7 +946,7 @@ function requireReactJsxRuntime_development() {
|
|
|
947
946
|
if (typeof node !== "object") {
|
|
948
947
|
return;
|
|
949
948
|
}
|
|
950
|
-
if (
|
|
949
|
+
if (isArray2(node)) {
|
|
951
950
|
for (var i = 0; i < node.length; i++) {
|
|
952
951
|
var child = node[i];
|
|
953
952
|
if (isValidElement(child)) {
|
|
@@ -1022,7 +1021,7 @@ function requireReactJsxRuntime_development() {
|
|
|
1022
1021
|
}
|
|
1023
1022
|
}
|
|
1024
1023
|
}
|
|
1025
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source,
|
|
1024
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
|
|
1026
1025
|
{
|
|
1027
1026
|
var validType = isValidElementType(type);
|
|
1028
1027
|
if (!validType) {
|
|
@@ -1039,7 +1038,7 @@ function requireReactJsxRuntime_development() {
|
|
|
1039
1038
|
var typeString;
|
|
1040
1039
|
if (type === null) {
|
|
1041
1040
|
typeString = "null";
|
|
1042
|
-
} else if (
|
|
1041
|
+
} else if (isArray2(type)) {
|
|
1043
1042
|
typeString = "array";
|
|
1044
1043
|
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1045
1044
|
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
@@ -1049,7 +1048,7 @@ function requireReactJsxRuntime_development() {
|
|
|
1049
1048
|
}
|
|
1050
1049
|
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1051
1050
|
}
|
|
1052
|
-
var element = jsxDEV(type, props, key, source,
|
|
1051
|
+
var element = jsxDEV(type, props, key, source, self2);
|
|
1053
1052
|
if (element == null) {
|
|
1054
1053
|
return element;
|
|
1055
1054
|
}
|
|
@@ -1057,7 +1056,7 @@ function requireReactJsxRuntime_development() {
|
|
|
1057
1056
|
var children = props.children;
|
|
1058
1057
|
if (children !== void 0) {
|
|
1059
1058
|
if (isStaticChildren) {
|
|
1060
|
-
if (
|
|
1059
|
+
if (isArray2(children)) {
|
|
1061
1060
|
for (var i = 0; i < children.length; i++) {
|
|
1062
1061
|
validateChildKeys(children[i], type);
|
|
1063
1062
|
}
|
|
@@ -1099,11 +1098,11 @@ function requireReactJsxRuntime_development() {
|
|
|
1099
1098
|
}
|
|
1100
1099
|
return reactJsxRuntime_development;
|
|
1101
1100
|
}
|
|
1102
|
-
(function(
|
|
1101
|
+
(function(module2) {
|
|
1103
1102
|
if (process.env.NODE_ENV === "production") {
|
|
1104
|
-
|
|
1103
|
+
module2.exports = requireReactJsxRuntime_production_min();
|
|
1105
1104
|
} else {
|
|
1106
|
-
|
|
1105
|
+
module2.exports = requireReactJsxRuntime_development();
|
|
1107
1106
|
}
|
|
1108
1107
|
})(jsxRuntime);
|
|
1109
1108
|
const Fragment = jsxRuntime.exports.Fragment;
|
|
@@ -1121,11 +1120,11 @@ function _array_with_holes$o(arr) {
|
|
|
1121
1120
|
if (Array.isArray(arr))
|
|
1122
1121
|
return arr;
|
|
1123
1122
|
}
|
|
1124
|
-
function _array_without_holes$
|
|
1123
|
+
function _array_without_holes$7(arr) {
|
|
1125
1124
|
if (Array.isArray(arr))
|
|
1126
1125
|
return _array_like_to_array$q(arr);
|
|
1127
1126
|
}
|
|
1128
|
-
function _iterable_to_array$
|
|
1127
|
+
function _iterable_to_array$7(iter) {
|
|
1129
1128
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1130
1129
|
return Array.from(iter);
|
|
1131
1130
|
}
|
|
@@ -1160,14 +1159,14 @@ function _iterable_to_array_limit$o(arr, i) {
|
|
|
1160
1159
|
function _non_iterable_rest$o() {
|
|
1161
1160
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1162
1161
|
}
|
|
1163
|
-
function _non_iterable_spread$
|
|
1162
|
+
function _non_iterable_spread$7() {
|
|
1164
1163
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1165
1164
|
}
|
|
1166
1165
|
function _sliced_to_array$o(arr, i) {
|
|
1167
1166
|
return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$o();
|
|
1168
1167
|
}
|
|
1169
|
-
function _to_consumable_array$
|
|
1170
|
-
return _array_without_holes$
|
|
1168
|
+
function _to_consumable_array$7(arr) {
|
|
1169
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$7();
|
|
1171
1170
|
}
|
|
1172
1171
|
function _unsupported_iterable_to_array$q(o, minLen) {
|
|
1173
1172
|
if (!o)
|
|
@@ -1205,7 +1204,7 @@ var hasExactParent = function(element, parent) {
|
|
|
1205
1204
|
};
|
|
1206
1205
|
var _element_parentNode;
|
|
1207
1206
|
var getParentNode$1 = function(element) {
|
|
1208
|
-
return element.nodeName === "HTML" ? element : (_element_parentNode = element.parentNode) !== null && _element_parentNode !== void 0 ? _element_parentNode : element.host;
|
|
1207
|
+
return element.nodeName === "HTML" || element === document ? element : (_element_parentNode = element.parentNode) !== null && _element_parentNode !== void 0 ? _element_parentNode : element.host;
|
|
1209
1208
|
};
|
|
1210
1209
|
var getStyleComputedProperty = function(element) {
|
|
1211
1210
|
return element.nodeType !== 1 ? {} : getComputedStyle(element, null);
|
|
@@ -1302,6 +1301,9 @@ var getNumberLength = function(n) {
|
|
|
1302
1301
|
var isNotEmpty = function(val) {
|
|
1303
1302
|
return typeof val === "string" ? val.trim() !== "" : val !== null && val !== void 0;
|
|
1304
1303
|
};
|
|
1304
|
+
var isStringNotEmpty = function(value) {
|
|
1305
|
+
return (value !== null && value !== void 0 ? value : "").trim() !== "";
|
|
1306
|
+
};
|
|
1305
1307
|
var trimStringToMaxLength = function(val, maxLength) {
|
|
1306
1308
|
return val.length > maxLength ? val.slice(0, maxLength) : val;
|
|
1307
1309
|
};
|
|
@@ -1319,7 +1321,7 @@ var addDataTestId = function() {
|
|
|
1319
1321
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1320
1322
|
args[_key] = arguments[_key];
|
|
1321
1323
|
}
|
|
1322
|
-
var testId = getTestId.apply(void 0, _to_consumable_array$
|
|
1324
|
+
var testId = getTestId.apply(void 0, _to_consumable_array$7(args));
|
|
1323
1325
|
return isNotEmpty(testId) ? {
|
|
1324
1326
|
"data-testid": testId
|
|
1325
1327
|
} : void 0;
|
|
@@ -1347,6 +1349,21 @@ var addClickHandler = function(cb) {
|
|
|
1347
1349
|
tabIndex: -1
|
|
1348
1350
|
};
|
|
1349
1351
|
};
|
|
1352
|
+
var createFilter = function(getter) {
|
|
1353
|
+
return function(items, query) {
|
|
1354
|
+
return items.filter(function(item) {
|
|
1355
|
+
var possibleValues = getter(item).reduce(function(acc, cur) {
|
|
1356
|
+
return _to_consumable_array$7(acc).concat(_to_consumable_array$7(isStringNotEmpty(cur) ? [
|
|
1357
|
+
cur === null || cur === void 0 ? void 0 : cur.toLowerCase()
|
|
1358
|
+
] : []));
|
|
1359
|
+
}, []);
|
|
1360
|
+
var queryString = query.toLowerCase().trim();
|
|
1361
|
+
return possibleValues.some(function(v) {
|
|
1362
|
+
return v === null || v === void 0 ? void 0 : v.includes(queryString);
|
|
1363
|
+
});
|
|
1364
|
+
});
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
1350
1367
|
var minWidthModifier = {
|
|
1351
1368
|
name: "minWidth",
|
|
1352
1369
|
enabled: true,
|
|
@@ -1370,19 +1387,19 @@ function _array_like_to_array$p(arr, len) {
|
|
|
1370
1387
|
arr2[i] = arr[i];
|
|
1371
1388
|
return arr2;
|
|
1372
1389
|
}
|
|
1373
|
-
function _array_without_holes$
|
|
1390
|
+
function _array_without_holes$6(arr) {
|
|
1374
1391
|
if (Array.isArray(arr))
|
|
1375
1392
|
return _array_like_to_array$p(arr);
|
|
1376
1393
|
}
|
|
1377
|
-
function _iterable_to_array$
|
|
1394
|
+
function _iterable_to_array$6(iter) {
|
|
1378
1395
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1379
1396
|
return Array.from(iter);
|
|
1380
1397
|
}
|
|
1381
|
-
function _non_iterable_spread$
|
|
1398
|
+
function _non_iterable_spread$6() {
|
|
1382
1399
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1383
1400
|
}
|
|
1384
|
-
function _to_consumable_array$
|
|
1385
|
-
return _array_without_holes$
|
|
1401
|
+
function _to_consumable_array$6(arr) {
|
|
1402
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$p(arr) || _non_iterable_spread$6();
|
|
1386
1403
|
}
|
|
1387
1404
|
function _unsupported_iterable_to_array$p(o, minLen) {
|
|
1388
1405
|
if (!o)
|
|
@@ -1422,7 +1439,7 @@ var checkSearchStringInCountry = function(country, searchString) {
|
|
|
1422
1439
|
var possibleValues = [
|
|
1423
1440
|
country.countryRu,
|
|
1424
1441
|
country.countryEn
|
|
1425
|
-
].concat(_to_consumable_array$
|
|
1442
|
+
].concat(_to_consumable_array$6(country.countryRu.split(" ")), _to_consumable_array$6(country.countryEn.split(" ")), [
|
|
1426
1443
|
country.dialCode
|
|
1427
1444
|
]).map(function(part) {
|
|
1428
1445
|
return part.toLowerCase();
|
|
@@ -1540,6 +1557,746 @@ function useOnClickOutside(ref, handler, ignoreClassName, ignoreRef) {
|
|
|
1540
1557
|
ignoreClassName
|
|
1541
1558
|
]);
|
|
1542
1559
|
}
|
|
1560
|
+
function listCacheClear() {
|
|
1561
|
+
this.__data__ = [];
|
|
1562
|
+
this.size = 0;
|
|
1563
|
+
}
|
|
1564
|
+
function eq(value, other) {
|
|
1565
|
+
return value === other || value !== value && other !== other;
|
|
1566
|
+
}
|
|
1567
|
+
function assocIndexOf(array, key) {
|
|
1568
|
+
var length = array.length;
|
|
1569
|
+
while (length--) {
|
|
1570
|
+
if (eq(array[length][0], key)) {
|
|
1571
|
+
return length;
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
return -1;
|
|
1575
|
+
}
|
|
1576
|
+
var arrayProto = Array.prototype;
|
|
1577
|
+
var splice = arrayProto.splice;
|
|
1578
|
+
function listCacheDelete(key) {
|
|
1579
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1580
|
+
if (index < 0) {
|
|
1581
|
+
return false;
|
|
1582
|
+
}
|
|
1583
|
+
var lastIndex = data.length - 1;
|
|
1584
|
+
if (index == lastIndex) {
|
|
1585
|
+
data.pop();
|
|
1586
|
+
} else {
|
|
1587
|
+
splice.call(data, index, 1);
|
|
1588
|
+
}
|
|
1589
|
+
--this.size;
|
|
1590
|
+
return true;
|
|
1591
|
+
}
|
|
1592
|
+
function listCacheGet(key) {
|
|
1593
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1594
|
+
return index < 0 ? void 0 : data[index][1];
|
|
1595
|
+
}
|
|
1596
|
+
function listCacheHas(key) {
|
|
1597
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
1598
|
+
}
|
|
1599
|
+
function listCacheSet(key, value) {
|
|
1600
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1601
|
+
if (index < 0) {
|
|
1602
|
+
++this.size;
|
|
1603
|
+
data.push([key, value]);
|
|
1604
|
+
} else {
|
|
1605
|
+
data[index][1] = value;
|
|
1606
|
+
}
|
|
1607
|
+
return this;
|
|
1608
|
+
}
|
|
1609
|
+
function ListCache(entries) {
|
|
1610
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1611
|
+
this.clear();
|
|
1612
|
+
while (++index < length) {
|
|
1613
|
+
var entry = entries[index];
|
|
1614
|
+
this.set(entry[0], entry[1]);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
ListCache.prototype.clear = listCacheClear;
|
|
1618
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
1619
|
+
ListCache.prototype.get = listCacheGet;
|
|
1620
|
+
ListCache.prototype.has = listCacheHas;
|
|
1621
|
+
ListCache.prototype.set = listCacheSet;
|
|
1622
|
+
function stackClear() {
|
|
1623
|
+
this.__data__ = new ListCache();
|
|
1624
|
+
this.size = 0;
|
|
1625
|
+
}
|
|
1626
|
+
function stackDelete(key) {
|
|
1627
|
+
var data = this.__data__, result = data["delete"](key);
|
|
1628
|
+
this.size = data.size;
|
|
1629
|
+
return result;
|
|
1630
|
+
}
|
|
1631
|
+
function stackGet(key) {
|
|
1632
|
+
return this.__data__.get(key);
|
|
1633
|
+
}
|
|
1634
|
+
function stackHas(key) {
|
|
1635
|
+
return this.__data__.has(key);
|
|
1636
|
+
}
|
|
1637
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
1638
|
+
const freeGlobal$1 = freeGlobal;
|
|
1639
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
1640
|
+
var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
1641
|
+
const root$1 = root;
|
|
1642
|
+
var Symbol$1 = root$1.Symbol;
|
|
1643
|
+
const Symbol$2 = Symbol$1;
|
|
1644
|
+
var objectProto$a = Object.prototype;
|
|
1645
|
+
var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
|
|
1646
|
+
var nativeObjectToString$1 = objectProto$a.toString;
|
|
1647
|
+
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
1648
|
+
function getRawTag(value) {
|
|
1649
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
1650
|
+
try {
|
|
1651
|
+
value[symToStringTag$1] = void 0;
|
|
1652
|
+
var unmasked = true;
|
|
1653
|
+
} catch (e) {
|
|
1654
|
+
}
|
|
1655
|
+
var result = nativeObjectToString$1.call(value);
|
|
1656
|
+
if (unmasked) {
|
|
1657
|
+
if (isOwn) {
|
|
1658
|
+
value[symToStringTag$1] = tag;
|
|
1659
|
+
} else {
|
|
1660
|
+
delete value[symToStringTag$1];
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
return result;
|
|
1664
|
+
}
|
|
1665
|
+
var objectProto$9 = Object.prototype;
|
|
1666
|
+
var nativeObjectToString = objectProto$9.toString;
|
|
1667
|
+
function objectToString(value) {
|
|
1668
|
+
return nativeObjectToString.call(value);
|
|
1669
|
+
}
|
|
1670
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
1671
|
+
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
1672
|
+
function baseGetTag(value) {
|
|
1673
|
+
if (value == null) {
|
|
1674
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
1675
|
+
}
|
|
1676
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
1677
|
+
}
|
|
1678
|
+
function isObject(value) {
|
|
1679
|
+
var type = typeof value;
|
|
1680
|
+
return value != null && (type == "object" || type == "function");
|
|
1681
|
+
}
|
|
1682
|
+
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
1683
|
+
function isFunction(value) {
|
|
1684
|
+
if (!isObject(value)) {
|
|
1685
|
+
return false;
|
|
1686
|
+
}
|
|
1687
|
+
var tag = baseGetTag(value);
|
|
1688
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1689
|
+
}
|
|
1690
|
+
var coreJsData = root$1["__core-js_shared__"];
|
|
1691
|
+
const coreJsData$1 = coreJsData;
|
|
1692
|
+
var maskSrcKey = function() {
|
|
1693
|
+
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
|
|
1694
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
1695
|
+
}();
|
|
1696
|
+
function isMasked(func) {
|
|
1697
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
1698
|
+
}
|
|
1699
|
+
var funcProto$2 = Function.prototype;
|
|
1700
|
+
var funcToString$2 = funcProto$2.toString;
|
|
1701
|
+
function toSource(func) {
|
|
1702
|
+
if (func != null) {
|
|
1703
|
+
try {
|
|
1704
|
+
return funcToString$2.call(func);
|
|
1705
|
+
} catch (e) {
|
|
1706
|
+
}
|
|
1707
|
+
try {
|
|
1708
|
+
return func + "";
|
|
1709
|
+
} catch (e) {
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
return "";
|
|
1713
|
+
}
|
|
1714
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1715
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1716
|
+
var funcProto$1 = Function.prototype, objectProto$8 = Object.prototype;
|
|
1717
|
+
var funcToString$1 = funcProto$1.toString;
|
|
1718
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
1719
|
+
var reIsNative = RegExp(
|
|
1720
|
+
"^" + funcToString$1.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1721
|
+
);
|
|
1722
|
+
function baseIsNative(value) {
|
|
1723
|
+
if (!isObject(value) || isMasked(value)) {
|
|
1724
|
+
return false;
|
|
1725
|
+
}
|
|
1726
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
1727
|
+
return pattern.test(toSource(value));
|
|
1728
|
+
}
|
|
1729
|
+
function getValue(object, key) {
|
|
1730
|
+
return object == null ? void 0 : object[key];
|
|
1731
|
+
}
|
|
1732
|
+
function getNative(object, key) {
|
|
1733
|
+
var value = getValue(object, key);
|
|
1734
|
+
return baseIsNative(value) ? value : void 0;
|
|
1735
|
+
}
|
|
1736
|
+
var Map$1 = getNative(root$1, "Map");
|
|
1737
|
+
const Map$2 = Map$1;
|
|
1738
|
+
var nativeCreate = getNative(Object, "create");
|
|
1739
|
+
const nativeCreate$1 = nativeCreate;
|
|
1740
|
+
function hashClear() {
|
|
1741
|
+
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
|
|
1742
|
+
this.size = 0;
|
|
1743
|
+
}
|
|
1744
|
+
function hashDelete(key) {
|
|
1745
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
1746
|
+
this.size -= result ? 1 : 0;
|
|
1747
|
+
return result;
|
|
1748
|
+
}
|
|
1749
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
1750
|
+
var objectProto$7 = Object.prototype;
|
|
1751
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
1752
|
+
function hashGet(key) {
|
|
1753
|
+
var data = this.__data__;
|
|
1754
|
+
if (nativeCreate$1) {
|
|
1755
|
+
var result = data[key];
|
|
1756
|
+
return result === HASH_UNDEFINED$1 ? void 0 : result;
|
|
1757
|
+
}
|
|
1758
|
+
return hasOwnProperty$6.call(data, key) ? data[key] : void 0;
|
|
1759
|
+
}
|
|
1760
|
+
var objectProto$6 = Object.prototype;
|
|
1761
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
1762
|
+
function hashHas(key) {
|
|
1763
|
+
var data = this.__data__;
|
|
1764
|
+
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$5.call(data, key);
|
|
1765
|
+
}
|
|
1766
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1767
|
+
function hashSet(key, value) {
|
|
1768
|
+
var data = this.__data__;
|
|
1769
|
+
this.size += this.has(key) ? 0 : 1;
|
|
1770
|
+
data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED : value;
|
|
1771
|
+
return this;
|
|
1772
|
+
}
|
|
1773
|
+
function Hash(entries) {
|
|
1774
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1775
|
+
this.clear();
|
|
1776
|
+
while (++index < length) {
|
|
1777
|
+
var entry = entries[index];
|
|
1778
|
+
this.set(entry[0], entry[1]);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
Hash.prototype.clear = hashClear;
|
|
1782
|
+
Hash.prototype["delete"] = hashDelete;
|
|
1783
|
+
Hash.prototype.get = hashGet;
|
|
1784
|
+
Hash.prototype.has = hashHas;
|
|
1785
|
+
Hash.prototype.set = hashSet;
|
|
1786
|
+
function mapCacheClear() {
|
|
1787
|
+
this.size = 0;
|
|
1788
|
+
this.__data__ = {
|
|
1789
|
+
"hash": new Hash(),
|
|
1790
|
+
"map": new (Map$2 || ListCache)(),
|
|
1791
|
+
"string": new Hash()
|
|
1792
|
+
};
|
|
1793
|
+
}
|
|
1794
|
+
function isKeyable(value) {
|
|
1795
|
+
var type = typeof value;
|
|
1796
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
1797
|
+
}
|
|
1798
|
+
function getMapData(map, key) {
|
|
1799
|
+
var data = map.__data__;
|
|
1800
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1801
|
+
}
|
|
1802
|
+
function mapCacheDelete(key) {
|
|
1803
|
+
var result = getMapData(this, key)["delete"](key);
|
|
1804
|
+
this.size -= result ? 1 : 0;
|
|
1805
|
+
return result;
|
|
1806
|
+
}
|
|
1807
|
+
function mapCacheGet(key) {
|
|
1808
|
+
return getMapData(this, key).get(key);
|
|
1809
|
+
}
|
|
1810
|
+
function mapCacheHas(key) {
|
|
1811
|
+
return getMapData(this, key).has(key);
|
|
1812
|
+
}
|
|
1813
|
+
function mapCacheSet(key, value) {
|
|
1814
|
+
var data = getMapData(this, key), size = data.size;
|
|
1815
|
+
data.set(key, value);
|
|
1816
|
+
this.size += data.size == size ? 0 : 1;
|
|
1817
|
+
return this;
|
|
1818
|
+
}
|
|
1819
|
+
function MapCache(entries) {
|
|
1820
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1821
|
+
this.clear();
|
|
1822
|
+
while (++index < length) {
|
|
1823
|
+
var entry = entries[index];
|
|
1824
|
+
this.set(entry[0], entry[1]);
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
1828
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
1829
|
+
MapCache.prototype.get = mapCacheGet;
|
|
1830
|
+
MapCache.prototype.has = mapCacheHas;
|
|
1831
|
+
MapCache.prototype.set = mapCacheSet;
|
|
1832
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
1833
|
+
function stackSet(key, value) {
|
|
1834
|
+
var data = this.__data__;
|
|
1835
|
+
if (data instanceof ListCache) {
|
|
1836
|
+
var pairs = data.__data__;
|
|
1837
|
+
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
1838
|
+
pairs.push([key, value]);
|
|
1839
|
+
this.size = ++data.size;
|
|
1840
|
+
return this;
|
|
1841
|
+
}
|
|
1842
|
+
data = this.__data__ = new MapCache(pairs);
|
|
1843
|
+
}
|
|
1844
|
+
data.set(key, value);
|
|
1845
|
+
this.size = data.size;
|
|
1846
|
+
return this;
|
|
1847
|
+
}
|
|
1848
|
+
function Stack(entries) {
|
|
1849
|
+
var data = this.__data__ = new ListCache(entries);
|
|
1850
|
+
this.size = data.size;
|
|
1851
|
+
}
|
|
1852
|
+
Stack.prototype.clear = stackClear;
|
|
1853
|
+
Stack.prototype["delete"] = stackDelete;
|
|
1854
|
+
Stack.prototype.get = stackGet;
|
|
1855
|
+
Stack.prototype.has = stackHas;
|
|
1856
|
+
Stack.prototype.set = stackSet;
|
|
1857
|
+
var defineProperty = function() {
|
|
1858
|
+
try {
|
|
1859
|
+
var func = getNative(Object, "defineProperty");
|
|
1860
|
+
func({}, "", {});
|
|
1861
|
+
return func;
|
|
1862
|
+
} catch (e) {
|
|
1863
|
+
}
|
|
1864
|
+
}();
|
|
1865
|
+
const defineProperty$1 = defineProperty;
|
|
1866
|
+
function baseAssignValue(object, key, value) {
|
|
1867
|
+
if (key == "__proto__" && defineProperty$1) {
|
|
1868
|
+
defineProperty$1(object, key, {
|
|
1869
|
+
"configurable": true,
|
|
1870
|
+
"enumerable": true,
|
|
1871
|
+
"value": value,
|
|
1872
|
+
"writable": true
|
|
1873
|
+
});
|
|
1874
|
+
} else {
|
|
1875
|
+
object[key] = value;
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
function assignMergeValue(object, key, value) {
|
|
1879
|
+
if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
|
|
1880
|
+
baseAssignValue(object, key, value);
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
function createBaseFor(fromRight) {
|
|
1884
|
+
return function(object, iteratee, keysFunc) {
|
|
1885
|
+
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
1886
|
+
while (length--) {
|
|
1887
|
+
var key = props[fromRight ? length : ++index];
|
|
1888
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1889
|
+
break;
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
return object;
|
|
1893
|
+
};
|
|
1894
|
+
}
|
|
1895
|
+
var baseFor = createBaseFor();
|
|
1896
|
+
const baseFor$1 = baseFor;
|
|
1897
|
+
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1898
|
+
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
1899
|
+
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
1900
|
+
var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0;
|
|
1901
|
+
function cloneBuffer(buffer, isDeep) {
|
|
1902
|
+
if (isDeep) {
|
|
1903
|
+
return buffer.slice();
|
|
1904
|
+
}
|
|
1905
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
1906
|
+
buffer.copy(result);
|
|
1907
|
+
return result;
|
|
1908
|
+
}
|
|
1909
|
+
var Uint8Array = root$1.Uint8Array;
|
|
1910
|
+
const Uint8Array$1 = Uint8Array;
|
|
1911
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
1912
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
1913
|
+
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
1914
|
+
return result;
|
|
1915
|
+
}
|
|
1916
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
1917
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
1918
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1919
|
+
}
|
|
1920
|
+
function copyArray(source, array) {
|
|
1921
|
+
var index = -1, length = source.length;
|
|
1922
|
+
array || (array = Array(length));
|
|
1923
|
+
while (++index < length) {
|
|
1924
|
+
array[index] = source[index];
|
|
1925
|
+
}
|
|
1926
|
+
return array;
|
|
1927
|
+
}
|
|
1928
|
+
var objectCreate = Object.create;
|
|
1929
|
+
var baseCreate = function() {
|
|
1930
|
+
function object() {
|
|
1931
|
+
}
|
|
1932
|
+
return function(proto) {
|
|
1933
|
+
if (!isObject(proto)) {
|
|
1934
|
+
return {};
|
|
1935
|
+
}
|
|
1936
|
+
if (objectCreate) {
|
|
1937
|
+
return objectCreate(proto);
|
|
1938
|
+
}
|
|
1939
|
+
object.prototype = proto;
|
|
1940
|
+
var result = new object();
|
|
1941
|
+
object.prototype = void 0;
|
|
1942
|
+
return result;
|
|
1943
|
+
};
|
|
1944
|
+
}();
|
|
1945
|
+
const baseCreate$1 = baseCreate;
|
|
1946
|
+
function overArg(func, transform) {
|
|
1947
|
+
return function(arg) {
|
|
1948
|
+
return func(transform(arg));
|
|
1949
|
+
};
|
|
1950
|
+
}
|
|
1951
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
1952
|
+
const getPrototype$1 = getPrototype;
|
|
1953
|
+
var objectProto$5 = Object.prototype;
|
|
1954
|
+
function isPrototype(value) {
|
|
1955
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$5;
|
|
1956
|
+
return value === proto;
|
|
1957
|
+
}
|
|
1958
|
+
function initCloneObject(object) {
|
|
1959
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
|
|
1960
|
+
}
|
|
1961
|
+
function isObjectLike(value) {
|
|
1962
|
+
return value != null && typeof value == "object";
|
|
1963
|
+
}
|
|
1964
|
+
var argsTag$1 = "[object Arguments]";
|
|
1965
|
+
function baseIsArguments(value) {
|
|
1966
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$1;
|
|
1967
|
+
}
|
|
1968
|
+
var objectProto$4 = Object.prototype;
|
|
1969
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
1970
|
+
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
1971
|
+
var isArguments = baseIsArguments(function() {
|
|
1972
|
+
return arguments;
|
|
1973
|
+
}()) ? baseIsArguments : function(value) {
|
|
1974
|
+
return isObjectLike(value) && hasOwnProperty$4.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
1975
|
+
};
|
|
1976
|
+
const isArguments$1 = isArguments;
|
|
1977
|
+
var isArray = Array.isArray;
|
|
1978
|
+
const isArray$1 = isArray;
|
|
1979
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
1980
|
+
function isLength(value) {
|
|
1981
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
|
|
1982
|
+
}
|
|
1983
|
+
function isArrayLike(value) {
|
|
1984
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
1985
|
+
}
|
|
1986
|
+
function isArrayLikeObject(value) {
|
|
1987
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
1988
|
+
}
|
|
1989
|
+
function stubFalse() {
|
|
1990
|
+
return false;
|
|
1991
|
+
}
|
|
1992
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1993
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
1994
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
1995
|
+
var Buffer = moduleExports$1 ? root$1.Buffer : void 0;
|
|
1996
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
1997
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1998
|
+
const isBuffer$1 = isBuffer;
|
|
1999
|
+
var objectTag$1 = "[object Object]";
|
|
2000
|
+
var funcProto = Function.prototype, objectProto$3 = Object.prototype;
|
|
2001
|
+
var funcToString = funcProto.toString;
|
|
2002
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
2003
|
+
var objectCtorString = funcToString.call(Object);
|
|
2004
|
+
function isPlainObject(value) {
|
|
2005
|
+
if (!isObjectLike(value) || baseGetTag(value) != objectTag$1) {
|
|
2006
|
+
return false;
|
|
2007
|
+
}
|
|
2008
|
+
var proto = getPrototype$1(value);
|
|
2009
|
+
if (proto === null) {
|
|
2010
|
+
return true;
|
|
2011
|
+
}
|
|
2012
|
+
var Ctor = hasOwnProperty$3.call(proto, "constructor") && proto.constructor;
|
|
2013
|
+
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
2014
|
+
}
|
|
2015
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]";
|
|
2016
|
+
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
2017
|
+
var typedArrayTags = {};
|
|
2018
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
2019
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
2020
|
+
function baseIsTypedArray(value) {
|
|
2021
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
2022
|
+
}
|
|
2023
|
+
function baseUnary(func) {
|
|
2024
|
+
return function(value) {
|
|
2025
|
+
return func(value);
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
2029
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
2030
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2031
|
+
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
2032
|
+
var nodeUtil = function() {
|
|
2033
|
+
try {
|
|
2034
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
2035
|
+
if (types) {
|
|
2036
|
+
return types;
|
|
2037
|
+
}
|
|
2038
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
2039
|
+
} catch (e) {
|
|
2040
|
+
}
|
|
2041
|
+
}();
|
|
2042
|
+
const nodeUtil$1 = nodeUtil;
|
|
2043
|
+
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
2044
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
2045
|
+
const isTypedArray$1 = isTypedArray;
|
|
2046
|
+
function safeGet(object, key) {
|
|
2047
|
+
if (key === "constructor" && typeof object[key] === "function") {
|
|
2048
|
+
return;
|
|
2049
|
+
}
|
|
2050
|
+
if (key == "__proto__") {
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
return object[key];
|
|
2054
|
+
}
|
|
2055
|
+
var objectProto$2 = Object.prototype;
|
|
2056
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
2057
|
+
function assignValue(object, key, value) {
|
|
2058
|
+
var objValue = object[key];
|
|
2059
|
+
if (!(hasOwnProperty$2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
2060
|
+
baseAssignValue(object, key, value);
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
function copyObject(source, props, object, customizer) {
|
|
2064
|
+
var isNew = !object;
|
|
2065
|
+
object || (object = {});
|
|
2066
|
+
var index = -1, length = props.length;
|
|
2067
|
+
while (++index < length) {
|
|
2068
|
+
var key = props[index];
|
|
2069
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
|
|
2070
|
+
if (newValue === void 0) {
|
|
2071
|
+
newValue = source[key];
|
|
2072
|
+
}
|
|
2073
|
+
if (isNew) {
|
|
2074
|
+
baseAssignValue(object, key, newValue);
|
|
2075
|
+
} else {
|
|
2076
|
+
assignValue(object, key, newValue);
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
return object;
|
|
2080
|
+
}
|
|
2081
|
+
function baseTimes(n, iteratee) {
|
|
2082
|
+
var index = -1, result = Array(n);
|
|
2083
|
+
while (++index < n) {
|
|
2084
|
+
result[index] = iteratee(index);
|
|
2085
|
+
}
|
|
2086
|
+
return result;
|
|
2087
|
+
}
|
|
2088
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
2089
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
2090
|
+
function isIndex(value, length) {
|
|
2091
|
+
var type = typeof value;
|
|
2092
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
2093
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
2094
|
+
}
|
|
2095
|
+
var objectProto$1 = Object.prototype;
|
|
2096
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
2097
|
+
function arrayLikeKeys(value, inherited) {
|
|
2098
|
+
var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
2099
|
+
for (var key in value) {
|
|
2100
|
+
if ((inherited || hasOwnProperty$1.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2101
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2102
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2103
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
2104
|
+
isIndex(key, length)))) {
|
|
2105
|
+
result.push(key);
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
return result;
|
|
2109
|
+
}
|
|
2110
|
+
function nativeKeysIn(object) {
|
|
2111
|
+
var result = [];
|
|
2112
|
+
if (object != null) {
|
|
2113
|
+
for (var key in Object(object)) {
|
|
2114
|
+
result.push(key);
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
return result;
|
|
2118
|
+
}
|
|
2119
|
+
var objectProto = Object.prototype;
|
|
2120
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2121
|
+
function baseKeysIn(object) {
|
|
2122
|
+
if (!isObject(object)) {
|
|
2123
|
+
return nativeKeysIn(object);
|
|
2124
|
+
}
|
|
2125
|
+
var isProto = isPrototype(object), result = [];
|
|
2126
|
+
for (var key in object) {
|
|
2127
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
2128
|
+
result.push(key);
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
return result;
|
|
2132
|
+
}
|
|
2133
|
+
function keysIn(object) {
|
|
2134
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
2135
|
+
}
|
|
2136
|
+
function toPlainObject(value) {
|
|
2137
|
+
return copyObject(value, keysIn(value));
|
|
2138
|
+
}
|
|
2139
|
+
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
2140
|
+
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
|
|
2141
|
+
if (stacked) {
|
|
2142
|
+
assignMergeValue(object, key, stacked);
|
|
2143
|
+
return;
|
|
2144
|
+
}
|
|
2145
|
+
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
|
|
2146
|
+
var isCommon = newValue === void 0;
|
|
2147
|
+
if (isCommon) {
|
|
2148
|
+
var isArr = isArray$1(srcValue), isBuff = !isArr && isBuffer$1(srcValue), isTyped = !isArr && !isBuff && isTypedArray$1(srcValue);
|
|
2149
|
+
newValue = srcValue;
|
|
2150
|
+
if (isArr || isBuff || isTyped) {
|
|
2151
|
+
if (isArray$1(objValue)) {
|
|
2152
|
+
newValue = objValue;
|
|
2153
|
+
} else if (isArrayLikeObject(objValue)) {
|
|
2154
|
+
newValue = copyArray(objValue);
|
|
2155
|
+
} else if (isBuff) {
|
|
2156
|
+
isCommon = false;
|
|
2157
|
+
newValue = cloneBuffer(srcValue, true);
|
|
2158
|
+
} else if (isTyped) {
|
|
2159
|
+
isCommon = false;
|
|
2160
|
+
newValue = cloneTypedArray(srcValue, true);
|
|
2161
|
+
} else {
|
|
2162
|
+
newValue = [];
|
|
2163
|
+
}
|
|
2164
|
+
} else if (isPlainObject(srcValue) || isArguments$1(srcValue)) {
|
|
2165
|
+
newValue = objValue;
|
|
2166
|
+
if (isArguments$1(objValue)) {
|
|
2167
|
+
newValue = toPlainObject(objValue);
|
|
2168
|
+
} else if (!isObject(objValue) || isFunction(objValue)) {
|
|
2169
|
+
newValue = initCloneObject(srcValue);
|
|
2170
|
+
}
|
|
2171
|
+
} else {
|
|
2172
|
+
isCommon = false;
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
if (isCommon) {
|
|
2176
|
+
stack.set(srcValue, newValue);
|
|
2177
|
+
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
2178
|
+
stack["delete"](srcValue);
|
|
2179
|
+
}
|
|
2180
|
+
assignMergeValue(object, key, newValue);
|
|
2181
|
+
}
|
|
2182
|
+
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
2183
|
+
if (object === source) {
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
baseFor$1(source, function(srcValue, key) {
|
|
2187
|
+
stack || (stack = new Stack());
|
|
2188
|
+
if (isObject(srcValue)) {
|
|
2189
|
+
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
2190
|
+
} else {
|
|
2191
|
+
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
|
|
2192
|
+
if (newValue === void 0) {
|
|
2193
|
+
newValue = srcValue;
|
|
2194
|
+
}
|
|
2195
|
+
assignMergeValue(object, key, newValue);
|
|
2196
|
+
}
|
|
2197
|
+
}, keysIn);
|
|
2198
|
+
}
|
|
2199
|
+
function identity(value) {
|
|
2200
|
+
return value;
|
|
2201
|
+
}
|
|
2202
|
+
function apply(func, thisArg, args) {
|
|
2203
|
+
switch (args.length) {
|
|
2204
|
+
case 0:
|
|
2205
|
+
return func.call(thisArg);
|
|
2206
|
+
case 1:
|
|
2207
|
+
return func.call(thisArg, args[0]);
|
|
2208
|
+
case 2:
|
|
2209
|
+
return func.call(thisArg, args[0], args[1]);
|
|
2210
|
+
case 3:
|
|
2211
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
2212
|
+
}
|
|
2213
|
+
return func.apply(thisArg, args);
|
|
2214
|
+
}
|
|
2215
|
+
var nativeMax = Math.max;
|
|
2216
|
+
function overRest(func, start2, transform) {
|
|
2217
|
+
start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
|
|
2218
|
+
return function() {
|
|
2219
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
|
|
2220
|
+
while (++index < length) {
|
|
2221
|
+
array[index] = args[start2 + index];
|
|
2222
|
+
}
|
|
2223
|
+
index = -1;
|
|
2224
|
+
var otherArgs = Array(start2 + 1);
|
|
2225
|
+
while (++index < start2) {
|
|
2226
|
+
otherArgs[index] = args[index];
|
|
2227
|
+
}
|
|
2228
|
+
otherArgs[start2] = transform(array);
|
|
2229
|
+
return apply(func, this, otherArgs);
|
|
2230
|
+
};
|
|
2231
|
+
}
|
|
2232
|
+
function constant(value) {
|
|
2233
|
+
return function() {
|
|
2234
|
+
return value;
|
|
2235
|
+
};
|
|
2236
|
+
}
|
|
2237
|
+
var baseSetToString = !defineProperty$1 ? identity : function(func, string) {
|
|
2238
|
+
return defineProperty$1(func, "toString", {
|
|
2239
|
+
"configurable": true,
|
|
2240
|
+
"enumerable": false,
|
|
2241
|
+
"value": constant(string),
|
|
2242
|
+
"writable": true
|
|
2243
|
+
});
|
|
2244
|
+
};
|
|
2245
|
+
const baseSetToString$1 = baseSetToString;
|
|
2246
|
+
var HOT_COUNT = 800, HOT_SPAN = 16;
|
|
2247
|
+
var nativeNow = Date.now;
|
|
2248
|
+
function shortOut(func) {
|
|
2249
|
+
var count = 0, lastCalled = 0;
|
|
2250
|
+
return function() {
|
|
2251
|
+
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
2252
|
+
lastCalled = stamp;
|
|
2253
|
+
if (remaining > 0) {
|
|
2254
|
+
if (++count >= HOT_COUNT) {
|
|
2255
|
+
return arguments[0];
|
|
2256
|
+
}
|
|
2257
|
+
} else {
|
|
2258
|
+
count = 0;
|
|
2259
|
+
}
|
|
2260
|
+
return func.apply(void 0, arguments);
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
var setToString = shortOut(baseSetToString$1);
|
|
2264
|
+
const setToString$1 = setToString;
|
|
2265
|
+
function baseRest(func, start2) {
|
|
2266
|
+
return setToString$1(overRest(func, start2, identity), func + "");
|
|
2267
|
+
}
|
|
2268
|
+
function isIterateeCall(value, index, object) {
|
|
2269
|
+
if (!isObject(object)) {
|
|
2270
|
+
return false;
|
|
2271
|
+
}
|
|
2272
|
+
var type = typeof index;
|
|
2273
|
+
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
2274
|
+
return eq(object[index], value);
|
|
2275
|
+
}
|
|
2276
|
+
return false;
|
|
2277
|
+
}
|
|
2278
|
+
function createAssigner(assigner) {
|
|
2279
|
+
return baseRest(function(object, sources) {
|
|
2280
|
+
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
|
|
2281
|
+
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
|
|
2282
|
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
2283
|
+
customizer = length < 3 ? void 0 : customizer;
|
|
2284
|
+
length = 1;
|
|
2285
|
+
}
|
|
2286
|
+
object = Object(object);
|
|
2287
|
+
while (++index < length) {
|
|
2288
|
+
var source = sources[index];
|
|
2289
|
+
if (source) {
|
|
2290
|
+
assigner(object, source, index, customizer);
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
return object;
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
2296
|
+
var merge = createAssigner(function(object, source, srcIndex) {
|
|
2297
|
+
baseMerge(object, source, srcIndex);
|
|
2298
|
+
});
|
|
2299
|
+
const merge$1 = merge;
|
|
1543
2300
|
var ThemeContext = createContext({
|
|
1544
2301
|
theme: commonTheme
|
|
1545
2302
|
});
|
|
@@ -1548,7 +2305,7 @@ var useTheme = function(componentName, styles2, tweakStyles, options) {
|
|
|
1548
2305
|
var components = theme.components;
|
|
1549
2306
|
var _components_componentName;
|
|
1550
2307
|
var newStyles = useMemo(function() {
|
|
1551
|
-
return merge({}, styles2, (_components_componentName = components === null || components === void 0 ? void 0 : components[componentName]) !== null && _components_componentName !== void 0 ? _components_componentName : {}, tweakStyles);
|
|
2308
|
+
return merge$1({}, styles2, (_components_componentName = components === null || components === void 0 ? void 0 : components[componentName]) !== null && _components_componentName !== void 0 ? _components_componentName : {}, tweakStyles);
|
|
1552
2309
|
}, [
|
|
1553
2310
|
styles2,
|
|
1554
2311
|
components === null || components === void 0 ? void 0 : components[componentName],
|
|
@@ -2768,8 +3525,8 @@ var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" mo
|
|
|
2768
3525
|
var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
|
2769
3526
|
function validateModifiers(modifiers) {
|
|
2770
3527
|
modifiers.forEach(function(modifier) {
|
|
2771
|
-
[].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index,
|
|
2772
|
-
return
|
|
3528
|
+
[].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self2) {
|
|
3529
|
+
return self2.indexOf(value) === index;
|
|
2773
3530
|
}).forEach(function(key) {
|
|
2774
3531
|
switch (key) {
|
|
2775
3532
|
case "name":
|
|
@@ -3162,11 +3919,11 @@ function _array_like_to_array$o(arr, len) {
|
|
|
3162
3919
|
arr2[i] = arr[i];
|
|
3163
3920
|
return arr2;
|
|
3164
3921
|
}
|
|
3165
|
-
function _array_without_holes$
|
|
3922
|
+
function _array_without_holes$5(arr) {
|
|
3166
3923
|
if (Array.isArray(arr))
|
|
3167
3924
|
return _array_like_to_array$o(arr);
|
|
3168
3925
|
}
|
|
3169
|
-
function _define_property$
|
|
3926
|
+
function _define_property$P(obj, key, value) {
|
|
3170
3927
|
if (key in obj) {
|
|
3171
3928
|
Object.defineProperty(obj, key, {
|
|
3172
3929
|
value,
|
|
@@ -3179,11 +3936,11 @@ function _define_property$O(obj, key, value) {
|
|
|
3179
3936
|
}
|
|
3180
3937
|
return obj;
|
|
3181
3938
|
}
|
|
3182
|
-
function _iterable_to_array$
|
|
3939
|
+
function _iterable_to_array$5(iter) {
|
|
3183
3940
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
3184
3941
|
return Array.from(iter);
|
|
3185
3942
|
}
|
|
3186
|
-
function _non_iterable_spread$
|
|
3943
|
+
function _non_iterable_spread$5() {
|
|
3187
3944
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3188
3945
|
}
|
|
3189
3946
|
function _object_spread$N(target) {
|
|
@@ -3196,13 +3953,13 @@ function _object_spread$N(target) {
|
|
|
3196
3953
|
}));
|
|
3197
3954
|
}
|
|
3198
3955
|
ownKeys2.forEach(function(key) {
|
|
3199
|
-
_define_property$
|
|
3956
|
+
_define_property$P(target, key, source[key]);
|
|
3200
3957
|
});
|
|
3201
3958
|
}
|
|
3202
3959
|
return target;
|
|
3203
3960
|
}
|
|
3204
|
-
function _to_consumable_array$
|
|
3205
|
-
return _array_without_holes$
|
|
3961
|
+
function _to_consumable_array$5(arr) {
|
|
3962
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$5();
|
|
3206
3963
|
}
|
|
3207
3964
|
function _unsupported_iterable_to_array$o(o, minLen) {
|
|
3208
3965
|
if (!o)
|
|
@@ -3238,7 +3995,7 @@ var useDropdown = function(param) {
|
|
|
3238
3995
|
popperData = usePopper(referenceElement, dropdownElement, {
|
|
3239
3996
|
enabled: isOpen,
|
|
3240
3997
|
placement,
|
|
3241
|
-
modifiers: _to_consumable_array$
|
|
3998
|
+
modifiers: _to_consumable_array$5(shouldRenderInBody ? [
|
|
3242
3999
|
minWidthModifier
|
|
3243
4000
|
] : []).concat([
|
|
3244
4001
|
{
|
|
@@ -3261,7 +4018,7 @@ var useDropdown = function(param) {
|
|
|
3261
4018
|
]
|
|
3262
4019
|
}, flipOptions)
|
|
3263
4020
|
}
|
|
3264
|
-
], _to_consumable_array$
|
|
4021
|
+
], _to_consumable_array$5(modifiers))
|
|
3265
4022
|
});
|
|
3266
4023
|
}
|
|
3267
4024
|
useEffect(function() {
|
|
@@ -3274,7 +4031,7 @@ var useDropdown = function(param) {
|
|
|
3274
4031
|
var useTweakStyles = function() {
|
|
3275
4032
|
var componentStyles = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, tweakStyles = arguments.length > 1 ? arguments[1] : void 0, className = arguments.length > 2 ? arguments[2] : void 0;
|
|
3276
4033
|
return useMemo(function() {
|
|
3277
|
-
return merge({}, componentStyles[className], tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]);
|
|
4034
|
+
return merge$1({}, componentStyles[className], tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]);
|
|
3278
4035
|
}, [
|
|
3279
4036
|
tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]
|
|
3280
4037
|
]);
|
|
@@ -4121,7 +4878,7 @@ var icons = checkIcons({
|
|
|
4121
4878
|
]
|
|
4122
4879
|
}
|
|
4123
4880
|
});
|
|
4124
|
-
function _define_property$
|
|
4881
|
+
function _define_property$O(obj, key, value) {
|
|
4125
4882
|
if (key in obj) {
|
|
4126
4883
|
Object.defineProperty(obj, key, {
|
|
4127
4884
|
value,
|
|
@@ -4144,7 +4901,7 @@ function _object_spread$M(target) {
|
|
|
4144
4901
|
}));
|
|
4145
4902
|
}
|
|
4146
4903
|
ownKeys2.forEach(function(key) {
|
|
4147
|
-
_define_property$
|
|
4904
|
+
_define_property$O(target, key, source[key]);
|
|
4148
4905
|
});
|
|
4149
4906
|
}
|
|
4150
4907
|
return target;
|
|
@@ -4271,7 +5028,7 @@ const avatarGreen = ` <svg\r
|
|
|
4271
5028
|
var complexIcons = {
|
|
4272
5029
|
avatar: avatarGreen
|
|
4273
5030
|
};
|
|
4274
|
-
function _define_property$
|
|
5031
|
+
function _define_property$N(obj, key, value) {
|
|
4275
5032
|
if (key in obj) {
|
|
4276
5033
|
Object.defineProperty(obj, key, {
|
|
4277
5034
|
value,
|
|
@@ -4294,7 +5051,7 @@ function _object_spread$L(target) {
|
|
|
4294
5051
|
}));
|
|
4295
5052
|
}
|
|
4296
5053
|
ownKeys2.forEach(function(key) {
|
|
4297
|
-
_define_property$
|
|
5054
|
+
_define_property$N(target, key, source[key]);
|
|
4298
5055
|
});
|
|
4299
5056
|
}
|
|
4300
5057
|
return target;
|
|
@@ -4318,7 +5075,7 @@ var styles$K = {
|
|
|
4318
5075
|
alignItems: "center"
|
|
4319
5076
|
}
|
|
4320
5077
|
};
|
|
4321
|
-
function _define_property$
|
|
5078
|
+
function _define_property$M(obj, key, value) {
|
|
4322
5079
|
if (key in obj) {
|
|
4323
5080
|
Object.defineProperty(obj, key, {
|
|
4324
5081
|
value,
|
|
@@ -4341,7 +5098,7 @@ function _object_spread$K(target) {
|
|
|
4341
5098
|
}));
|
|
4342
5099
|
}
|
|
4343
5100
|
ownKeys2.forEach(function(key) {
|
|
4344
|
-
_define_property$
|
|
5101
|
+
_define_property$M(target, key, source[key]);
|
|
4345
5102
|
});
|
|
4346
5103
|
}
|
|
4347
5104
|
return target;
|
|
@@ -4432,7 +5189,7 @@ var styles$J = {
|
|
|
4432
5189
|
},
|
|
4433
5190
|
content: {}
|
|
4434
5191
|
};
|
|
4435
|
-
function _define_property$
|
|
5192
|
+
function _define_property$L(obj, key, value) {
|
|
4436
5193
|
if (key in obj) {
|
|
4437
5194
|
Object.defineProperty(obj, key, {
|
|
4438
5195
|
value,
|
|
@@ -4455,7 +5212,7 @@ function _object_spread$J(target) {
|
|
|
4455
5212
|
}));
|
|
4456
5213
|
}
|
|
4457
5214
|
ownKeys2.forEach(function(key) {
|
|
4458
|
-
_define_property$
|
|
5215
|
+
_define_property$L(target, key, source[key]);
|
|
4459
5216
|
});
|
|
4460
5217
|
}
|
|
4461
5218
|
return target;
|
|
@@ -4503,7 +5260,7 @@ var List = function(param) {
|
|
|
4503
5260
|
className: classes.spacer
|
|
4504
5261
|
}),
|
|
4505
5262
|
/* @__PURE__ */ jsxs("div", _object_spread_props$A(_object_spread$J({
|
|
4506
|
-
className: clsx(classes.item, (_obj = {}, _define_property$
|
|
5263
|
+
className: clsx(classes.item, (_obj = {}, _define_property$L(_obj, classes.disabledItem, item.disabled), _define_property$L(_obj, classes.withIconGap, item.withIconGap), _obj))
|
|
4507
5264
|
}, addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
|
|
4508
5265
|
disabled: item.disabled
|
|
4509
5266
|
})), {
|
|
@@ -4531,7 +5288,7 @@ var List = function(param) {
|
|
|
4531
5288
|
})
|
|
4532
5289
|
}));
|
|
4533
5290
|
};
|
|
4534
|
-
function _define_property$
|
|
5291
|
+
function _define_property$K(obj, key, value) {
|
|
4535
5292
|
if (key in obj) {
|
|
4536
5293
|
Object.defineProperty(obj, key, {
|
|
4537
5294
|
value,
|
|
@@ -4554,7 +5311,7 @@ function _object_spread$I(target) {
|
|
|
4554
5311
|
}));
|
|
4555
5312
|
}
|
|
4556
5313
|
ownKeys2.forEach(function(key) {
|
|
4557
|
-
_define_property$
|
|
5314
|
+
_define_property$K(target, key, source[key]);
|
|
4558
5315
|
});
|
|
4559
5316
|
}
|
|
4560
5317
|
return target;
|
|
@@ -4638,7 +5395,7 @@ function _array_with_holes$n(arr) {
|
|
|
4638
5395
|
if (Array.isArray(arr))
|
|
4639
5396
|
return arr;
|
|
4640
5397
|
}
|
|
4641
|
-
function _define_property$
|
|
5398
|
+
function _define_property$J(obj, key, value) {
|
|
4642
5399
|
if (key in obj) {
|
|
4643
5400
|
Object.defineProperty(obj, key, {
|
|
4644
5401
|
value,
|
|
@@ -4692,7 +5449,7 @@ function _object_spread$H(target) {
|
|
|
4692
5449
|
}));
|
|
4693
5450
|
}
|
|
4694
5451
|
ownKeys2.forEach(function(key) {
|
|
4695
|
-
_define_property$
|
|
5452
|
+
_define_property$J(target, key, source[key]);
|
|
4696
5453
|
});
|
|
4697
5454
|
}
|
|
4698
5455
|
return target;
|
|
@@ -4833,7 +5590,7 @@ var styles$H = {
|
|
|
4833
5590
|
width: "100%"
|
|
4834
5591
|
}
|
|
4835
5592
|
};
|
|
4836
|
-
function _define_property$
|
|
5593
|
+
function _define_property$I(obj, key, value) {
|
|
4837
5594
|
if (key in obj) {
|
|
4838
5595
|
Object.defineProperty(obj, key, {
|
|
4839
5596
|
value,
|
|
@@ -4856,7 +5613,7 @@ function _object_spread$G(target) {
|
|
|
4856
5613
|
}));
|
|
4857
5614
|
}
|
|
4858
5615
|
ownKeys2.forEach(function(key) {
|
|
4859
|
-
_define_property$
|
|
5616
|
+
_define_property$I(target, key, source[key]);
|
|
4860
5617
|
});
|
|
4861
5618
|
}
|
|
4862
5619
|
return target;
|
|
@@ -5050,7 +5807,7 @@ var styles$E = {
|
|
|
5050
5807
|
},
|
|
5051
5808
|
tweakPreloaderComponent: {}
|
|
5052
5809
|
};
|
|
5053
|
-
function _define_property$
|
|
5810
|
+
function _define_property$H(obj, key, value) {
|
|
5054
5811
|
if (key in obj) {
|
|
5055
5812
|
Object.defineProperty(obj, key, {
|
|
5056
5813
|
value,
|
|
@@ -5073,7 +5830,7 @@ function _object_spread$F(target) {
|
|
|
5073
5830
|
}));
|
|
5074
5831
|
}
|
|
5075
5832
|
ownKeys2.forEach(function(key) {
|
|
5076
|
-
_define_property$
|
|
5833
|
+
_define_property$H(target, key, source[key]);
|
|
5077
5834
|
});
|
|
5078
5835
|
}
|
|
5079
5836
|
return target;
|
|
@@ -5107,7 +5864,7 @@ var ThemedPreloader = function(param) {
|
|
|
5107
5864
|
var _useTheme = useTheme("ThemedPreloader", styles$E, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
5108
5865
|
var preloaderComponentStyles = useTweakStyles(componentStyles, tweakStyles, "tweakPreloaderComponent");
|
|
5109
5866
|
return /* @__PURE__ */ jsx("div", _object_spread_props$w(_object_spread$F({
|
|
5110
|
-
className: clsx(classes.root, classes[type], _define_property$
|
|
5867
|
+
className: clsx(classes.root, classes[type], _define_property$H({}, classes.currentColor, useCurrentColor))
|
|
5111
5868
|
}, addDataAttributes(data)), {
|
|
5112
5869
|
children: type === "dots" ? /* @__PURE__ */ jsx(DotsPreloader, {
|
|
5113
5870
|
tweakStyles: preloaderComponentStyles
|
|
@@ -5287,7 +6044,7 @@ var dotsPreloaderStyles = {
|
|
|
5287
6044
|
}
|
|
5288
6045
|
}
|
|
5289
6046
|
};
|
|
5290
|
-
function _define_property$
|
|
6047
|
+
function _define_property$G(obj, key, value) {
|
|
5291
6048
|
if (key in obj) {
|
|
5292
6049
|
Object.defineProperty(obj, key, {
|
|
5293
6050
|
value,
|
|
@@ -5310,7 +6067,7 @@ function _object_spread$E(target) {
|
|
|
5310
6067
|
}));
|
|
5311
6068
|
}
|
|
5312
6069
|
ownKeys2.forEach(function(key) {
|
|
5313
|
-
_define_property$
|
|
6070
|
+
_define_property$G(target, key, source[key]);
|
|
5314
6071
|
});
|
|
5315
6072
|
}
|
|
5316
6073
|
return target;
|
|
@@ -5352,7 +6109,7 @@ var Button = function(param) {
|
|
|
5352
6109
|
var _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, children = param.children, _param_size = param.size, size = _param_size === void 0 ? "l" : _param_size, _param_view = param.view, view = _param_view === void 0 ? "primary" : _param_view, _param_isFullWidth = param.isFullWidth, isFullWidth = _param_isFullWidth === void 0 ? false : _param_isFullWidth, _param_isInline = param.isInline, isInline = _param_isInline === void 0 ? false : _param_isInline, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isActive = param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_shouldSkipTabNavigation = param.shouldSkipTabNavigation, shouldSkipTabNavigation = _param_shouldSkipTabNavigation === void 0 ? false : _param_shouldSkipTabNavigation, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, icon = param.icon, _param_iconPosition = param.iconPosition, iconPosition = _param_iconPosition === void 0 ? "left" : _param_iconPosition, _param_preloaderType = param.preloaderType, preloaderType = _param_preloaderType === void 0 ? "dots" : _param_preloaderType, onClick = param.onClick, onMouseDown = param.onMouseDown;
|
|
5353
6110
|
var _useTheme = useTheme("Button", styles$D, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
5354
6111
|
var tweakPreloaderStyles = useMemo(function() {
|
|
5355
|
-
return merge({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader);
|
|
6112
|
+
return merge$1({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader);
|
|
5356
6113
|
}, [
|
|
5357
6114
|
tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader,
|
|
5358
6115
|
size
|
|
@@ -5363,7 +6120,7 @@ var Button = function(param) {
|
|
|
5363
6120
|
var _obj, _obj1;
|
|
5364
6121
|
return /* @__PURE__ */ jsxs("button", _object_spread_props$v(_object_spread$E({
|
|
5365
6122
|
type,
|
|
5366
|
-
className: clsx(classes.root, classes[size], classes[view], (_obj = {}, _define_property$
|
|
6123
|
+
className: clsx(classes.root, classes[size], classes[view], (_obj = {}, _define_property$G(_obj, classes.disabled, isDisabled), _define_property$G(_obj, classes.fullWidth, isFullWidth), _define_property$G(_obj, classes.inline, isInline), _define_property$G(_obj, classes.active, isActive), _define_property$G(_obj, classes.loading, isLoading), _define_property$G(_obj, classes.onlyIcon, hasIcon && !hasChildren), _obj)),
|
|
5367
6124
|
tabIndex: shouldSkipTabNavigation ? -1 : void 0,
|
|
5368
6125
|
disabled: hasNoAction,
|
|
5369
6126
|
onClick: !hasNoAction ? onClick : void 0,
|
|
@@ -5371,7 +6128,7 @@ var Button = function(param) {
|
|
|
5371
6128
|
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
5372
6129
|
children: [
|
|
5373
6130
|
/* @__PURE__ */ jsxs("span", {
|
|
5374
|
-
className: clsx(classes.content, (_obj1 = {}, _define_property$
|
|
6131
|
+
className: clsx(classes.content, (_obj1 = {}, _define_property$G(_obj1, classes.iconFromRight, hasChildren && hasIcon && iconPosition === "right"), _define_property$G(_obj1, classes.iconFromLeft, hasChildren && hasIcon && iconPosition === "left"), _obj1)),
|
|
5375
6132
|
children: [
|
|
5376
6133
|
hasIcon && /* @__PURE__ */ jsx("span", {
|
|
5377
6134
|
className: classes.icon,
|
|
@@ -5463,7 +6220,7 @@ function _array_with_holes$m(arr) {
|
|
|
5463
6220
|
if (Array.isArray(arr))
|
|
5464
6221
|
return arr;
|
|
5465
6222
|
}
|
|
5466
|
-
function _define_property$
|
|
6223
|
+
function _define_property$F(obj, key, value) {
|
|
5467
6224
|
if (key in obj) {
|
|
5468
6225
|
Object.defineProperty(obj, key, {
|
|
5469
6226
|
value,
|
|
@@ -5517,7 +6274,7 @@ function _object_spread$D(target) {
|
|
|
5517
6274
|
}));
|
|
5518
6275
|
}
|
|
5519
6276
|
ownKeys2.forEach(function(key) {
|
|
5520
|
-
_define_property$
|
|
6277
|
+
_define_property$F(target, key, source[key]);
|
|
5521
6278
|
});
|
|
5522
6279
|
}
|
|
5523
6280
|
return target;
|
|
@@ -5586,7 +6343,7 @@ function Checkbox(param) {
|
|
|
5586
6343
|
]);
|
|
5587
6344
|
var _obj;
|
|
5588
6345
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$u(_object_spread$D({
|
|
5589
|
-
className: clsx(classes.root, (_obj = {}, _define_property$
|
|
6346
|
+
className: clsx(classes.root, (_obj = {}, _define_property$F(_obj, classes.disabled, isDisabled), _define_property$F(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
|
|
5590
6347
|
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
5591
6348
|
children: [
|
|
5592
6349
|
/* @__PURE__ */ jsx("input", _object_spread$D({
|
|
@@ -5637,7 +6394,7 @@ var styles$B = {
|
|
|
5637
6394
|
}
|
|
5638
6395
|
}
|
|
5639
6396
|
};
|
|
5640
|
-
function _define_property$
|
|
6397
|
+
function _define_property$E(obj, key, value) {
|
|
5641
6398
|
if (key in obj) {
|
|
5642
6399
|
Object.defineProperty(obj, key, {
|
|
5643
6400
|
value,
|
|
@@ -5660,7 +6417,7 @@ function _object_spread$C(target) {
|
|
|
5660
6417
|
}));
|
|
5661
6418
|
}
|
|
5662
6419
|
ownKeys2.forEach(function(key) {
|
|
5663
|
-
_define_property$
|
|
6420
|
+
_define_property$E(target, key, source[key]);
|
|
5664
6421
|
});
|
|
5665
6422
|
}
|
|
5666
6423
|
return target;
|
|
@@ -5835,7 +6592,7 @@ var styles$z = {
|
|
|
5835
6592
|
},
|
|
5836
6593
|
root: {}
|
|
5837
6594
|
};
|
|
5838
|
-
function _define_property$
|
|
6595
|
+
function _define_property$D(obj, key, value) {
|
|
5839
6596
|
if (key in obj) {
|
|
5840
6597
|
Object.defineProperty(obj, key, {
|
|
5841
6598
|
value,
|
|
@@ -5858,7 +6615,7 @@ function _object_spread$B(target) {
|
|
|
5858
6615
|
}));
|
|
5859
6616
|
}
|
|
5860
6617
|
ownKeys2.forEach(function(key) {
|
|
5861
|
-
_define_property$
|
|
6618
|
+
_define_property$D(target, key, source[key]);
|
|
5862
6619
|
});
|
|
5863
6620
|
}
|
|
5864
6621
|
return target;
|
|
@@ -6143,6 +6900,7 @@ var styles$y = {
|
|
|
6143
6900
|
paddingLeft: 13
|
|
6144
6901
|
},
|
|
6145
6902
|
loading: {},
|
|
6903
|
+
withUnits: {},
|
|
6146
6904
|
tweakPreloader: {}
|
|
6147
6905
|
};
|
|
6148
6906
|
var renderIcon = function(icon) {
|
|
@@ -6177,9 +6935,9 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
6177
6935
|
}
|
|
6178
6936
|
function _async_to_generator$5(fn3) {
|
|
6179
6937
|
return function() {
|
|
6180
|
-
var
|
|
6938
|
+
var self2 = this, args = arguments;
|
|
6181
6939
|
return new Promise(function(resolve, reject) {
|
|
6182
|
-
var gen = fn3.apply(
|
|
6940
|
+
var gen = fn3.apply(self2, args);
|
|
6183
6941
|
function _next(value) {
|
|
6184
6942
|
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
|
|
6185
6943
|
}
|
|
@@ -6190,7 +6948,7 @@ function _async_to_generator$5(fn3) {
|
|
|
6190
6948
|
});
|
|
6191
6949
|
};
|
|
6192
6950
|
}
|
|
6193
|
-
function _define_property$
|
|
6951
|
+
function _define_property$C(obj, key, value) {
|
|
6194
6952
|
if (key in obj) {
|
|
6195
6953
|
Object.defineProperty(obj, key, {
|
|
6196
6954
|
value,
|
|
@@ -6244,7 +7002,7 @@ function _object_spread$A(target) {
|
|
|
6244
7002
|
}));
|
|
6245
7003
|
}
|
|
6246
7004
|
ownKeys2.forEach(function(key) {
|
|
6247
|
-
_define_property$
|
|
7005
|
+
_define_property$C(target, key, source[key]);
|
|
6248
7006
|
});
|
|
6249
7007
|
}
|
|
6250
7008
|
return target;
|
|
@@ -6439,9 +7197,10 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6439
7197
|
var hasUnits = units !== void 0 && units !== "";
|
|
6440
7198
|
var hasLabel = isNotEmpty(label);
|
|
6441
7199
|
var hasPlaceholder = (!hasLabel || hasFocus && !isReadonly) && isNotEmpty(placeholder);
|
|
7200
|
+
var shouldShowUnits = (hasValue || isFocused && !hasPlaceholder) && hasUnits;
|
|
6442
7201
|
var _obj;
|
|
6443
7202
|
var props = _object_spread$A({
|
|
6444
|
-
className: clsx(classes.input, (_obj = {}, _define_property$
|
|
7203
|
+
className: clsx(classes.input, (_obj = {}, _define_property$C(_obj, classes.withFloatingLabel, hasFloatingLabel && hasLabel), _define_property$C(_obj, classes.withIcons, hasControls), _define_property$C(_obj, classes.withControls, hasControls), _define_property$C(_obj, classes.withUnits, shouldShowUnits), _define_property$C(_obj, classes.floatingLabelWithoutPadding, hasFloatingLabel && hasLabel && border === "bottom"), _obj)),
|
|
6445
7204
|
onFocus: handleFocus,
|
|
6446
7205
|
onBlur: handleBlur,
|
|
6447
7206
|
onChange: handleChange,
|
|
@@ -6464,7 +7223,7 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6464
7223
|
className: classes.root,
|
|
6465
7224
|
children: [
|
|
6466
7225
|
/* @__PURE__ */ jsxs("div", _object_spread_props$s(_object_spread$A({
|
|
6467
|
-
className: clsx(classes.inputWrapper, (_obj1 = {}, _define_property$
|
|
7226
|
+
className: clsx(classes.inputWrapper, (_obj1 = {}, _define_property$C(_obj1, classes.required, isRequired && !hasRequiredLabel), _define_property$C(_obj1, classes.invalid, isInvalid), _define_property$C(_obj1, classes.focused, hasFocus), _define_property$C(_obj1, classes.disabled, isDisabled), _define_property$C(_obj1, classes.autosize, isAutoSizeable), _obj1), inlineStyle !== void 0 && classes[inlineStyle], border !== void 0 && classes["border-".concat(border)]),
|
|
6468
7227
|
"data-value": isAutoSizeable ? value : void 0
|
|
6469
7228
|
}, addDataAttributes(data)), {
|
|
6470
7229
|
children: [
|
|
@@ -6478,12 +7237,12 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6478
7237
|
beforeMaskedStateChange
|
|
6479
7238
|
}, props)),
|
|
6480
7239
|
hasLabel && /* @__PURE__ */ jsx("span", {
|
|
6481
|
-
className: clsx(classes.label, (_obj2 = {}, _define_property$
|
|
6482
|
-
_define_property$
|
|
7240
|
+
className: clsx(classes.label, (_obj2 = {}, _define_property$C(_obj2, classes.invalidLabel, isInvalid), _define_property$C(_obj2, classes.requiredLabel, hasRequiredLabel && !isRequired), _define_property$C(_obj2, classes.activeLabel, hasFocus && !isReadonly || hasValue), _define_property$C(_obj2, classes.floating, hasFloatingLabel), // Обсуждаемо, сделал так, потому что не хочется создавать новую пропсу, на каждый чих в стилях
|
|
7241
|
+
_define_property$C(_obj2, classes.floatingWithoutPadding, hasFloatingLabel && border === "bottom"), _obj2)),
|
|
6483
7242
|
children: label
|
|
6484
7243
|
}),
|
|
6485
|
-
|
|
6486
|
-
className: clsx(classes.unitsWrapper, _define_property$
|
|
7244
|
+
shouldShowUnits && /* @__PURE__ */ jsxs("div", {
|
|
7245
|
+
className: clsx(classes.unitsWrapper, _define_property$C({}, classes.withFloatingLabel, hasFloatingLabel && hasLabel)),
|
|
6487
7246
|
children: [
|
|
6488
7247
|
/* @__PURE__ */ jsx("span", {
|
|
6489
7248
|
className: classes.fakeValue,
|
|
@@ -6515,7 +7274,7 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6515
7274
|
})
|
|
6516
7275
|
}),
|
|
6517
7276
|
iconType !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
6518
|
-
className: clsx(classes.inputIcon, _define_property$
|
|
7277
|
+
className: clsx(classes.inputIcon, _define_property$C({}, classes.activeIcon, !isDisabled && onIconClick !== void 0)),
|
|
6519
7278
|
onClick: !isDisabled ? onIconClick : void 0,
|
|
6520
7279
|
children: renderIcon(iconType)
|
|
6521
7280
|
})
|
|
@@ -6543,7 +7302,7 @@ var styles$x = {
|
|
|
6543
7302
|
},
|
|
6544
7303
|
tweakInput: {}
|
|
6545
7304
|
};
|
|
6546
|
-
function _define_property$
|
|
7305
|
+
function _define_property$B(obj, key, value) {
|
|
6547
7306
|
if (key in obj) {
|
|
6548
7307
|
Object.defineProperty(obj, key, {
|
|
6549
7308
|
value,
|
|
@@ -6566,7 +7325,7 @@ function _object_spread$z(target) {
|
|
|
6566
7325
|
}));
|
|
6567
7326
|
}
|
|
6568
7327
|
ownKeys2.forEach(function(key) {
|
|
6569
|
-
_define_property$
|
|
7328
|
+
_define_property$B(target, key, source[key]);
|
|
6570
7329
|
});
|
|
6571
7330
|
}
|
|
6572
7331
|
return target;
|
|
@@ -6692,11 +7451,11 @@ var DatePickerInput = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6692
7451
|
})
|
|
6693
7452
|
});
|
|
6694
7453
|
});
|
|
6695
|
-
function _assert_this_initialized(
|
|
6696
|
-
if (
|
|
7454
|
+
function _assert_this_initialized(self2) {
|
|
7455
|
+
if (self2 === void 0) {
|
|
6697
7456
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6698
7457
|
}
|
|
6699
|
-
return
|
|
7458
|
+
return self2;
|
|
6700
7459
|
}
|
|
6701
7460
|
function _class_call_check(instance, Constructor) {
|
|
6702
7461
|
if (!(instance instanceof Constructor)) {
|
|
@@ -6720,7 +7479,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
6720
7479
|
_defineProperties(Constructor, staticProps);
|
|
6721
7480
|
return Constructor;
|
|
6722
7481
|
}
|
|
6723
|
-
function _define_property$
|
|
7482
|
+
function _define_property$A(obj, key, value) {
|
|
6724
7483
|
if (key in obj) {
|
|
6725
7484
|
Object.defineProperty(obj, key, {
|
|
6726
7485
|
value,
|
|
@@ -6763,7 +7522,7 @@ function _object_spread$y(target) {
|
|
|
6763
7522
|
}));
|
|
6764
7523
|
}
|
|
6765
7524
|
ownKeys2.forEach(function(key) {
|
|
6766
|
-
_define_property$
|
|
7525
|
+
_define_property$A(target, key, source[key]);
|
|
6767
7526
|
});
|
|
6768
7527
|
}
|
|
6769
7528
|
return target;
|
|
@@ -6800,11 +7559,11 @@ function _object_without_properties_loose$7(source, excluded) {
|
|
|
6800
7559
|
}
|
|
6801
7560
|
return target;
|
|
6802
7561
|
}
|
|
6803
|
-
function _possible_constructor_return(
|
|
7562
|
+
function _possible_constructor_return(self2, call) {
|
|
6804
7563
|
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
6805
7564
|
return call;
|
|
6806
7565
|
}
|
|
6807
|
-
return _assert_this_initialized(
|
|
7566
|
+
return _assert_this_initialized(self2);
|
|
6808
7567
|
}
|
|
6809
7568
|
function _set_prototype_of(o, p) {
|
|
6810
7569
|
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
@@ -6861,8 +7620,8 @@ var ScrollIntoViewIfNeeded = /* @__PURE__ */ function(PureComponent2) {
|
|
|
6861
7620
|
_class_call_check(this, ScrollIntoViewIfNeeded2);
|
|
6862
7621
|
var _this;
|
|
6863
7622
|
_this = _super.apply(this, arguments);
|
|
6864
|
-
_define_property$
|
|
6865
|
-
_define_property$
|
|
7623
|
+
_define_property$A(_assert_this_initialized(_this), "node", createRef());
|
|
7624
|
+
_define_property$A(_assert_this_initialized(_this), "handleScrollIntoViewIfNeeded", function() {
|
|
6866
7625
|
var options = _this.props.options;
|
|
6867
7626
|
var _this_node = _this.node, node = _this_node.current;
|
|
6868
7627
|
if (node) {
|
|
@@ -6912,8 +7671,8 @@ var ScrollIntoViewIfNeeded = /* @__PURE__ */ function(PureComponent2) {
|
|
|
6912
7671
|
]);
|
|
6913
7672
|
return ScrollIntoViewIfNeeded2;
|
|
6914
7673
|
}(PureComponent);
|
|
6915
|
-
_define_property$
|
|
6916
|
-
function _define_property$
|
|
7674
|
+
_define_property$A(ScrollIntoViewIfNeeded, "defaultProps", ScrollIntoViewIfNeededDefaultProps);
|
|
7675
|
+
function _define_property$z(obj, key, value) {
|
|
6917
7676
|
if (key in obj) {
|
|
6918
7677
|
Object.defineProperty(obj, key, {
|
|
6919
7678
|
value,
|
|
@@ -6936,7 +7695,7 @@ function _object_spread$x(target) {
|
|
|
6936
7695
|
}));
|
|
6937
7696
|
}
|
|
6938
7697
|
ownKeys2.forEach(function(key) {
|
|
6939
|
-
_define_property$
|
|
7698
|
+
_define_property$z(target, key, source[key]);
|
|
6940
7699
|
});
|
|
6941
7700
|
}
|
|
6942
7701
|
return target;
|
|
@@ -6987,6 +7746,9 @@ var styles$v = {
|
|
|
6987
7746
|
boxSizing: "border-box",
|
|
6988
7747
|
fontSize: 14
|
|
6989
7748
|
},
|
|
7749
|
+
cellWithCheckbox: {
|
|
7750
|
+
padding: 0
|
|
7751
|
+
},
|
|
6990
7752
|
noMatchesLabel: {
|
|
6991
7753
|
pointerEvents: "none"
|
|
6992
7754
|
},
|
|
@@ -7001,7 +7763,17 @@ var styles$v = {
|
|
|
7001
7763
|
},
|
|
7002
7764
|
defaultCell: {}
|
|
7003
7765
|
};
|
|
7004
|
-
|
|
7766
|
+
var checkboxStyles = {
|
|
7767
|
+
root: {
|
|
7768
|
+
padding: CELL_PADDING,
|
|
7769
|
+
width: "100%"
|
|
7770
|
+
},
|
|
7771
|
+
input: {
|
|
7772
|
+
// иначе будет фокуситься и энтер будет вызывать изменение нескольких опций
|
|
7773
|
+
display: "none"
|
|
7774
|
+
}
|
|
7775
|
+
};
|
|
7776
|
+
function _define_property$y(obj, key, value) {
|
|
7005
7777
|
if (key in obj) {
|
|
7006
7778
|
Object.defineProperty(obj, key, {
|
|
7007
7779
|
value,
|
|
@@ -7024,7 +7796,7 @@ function _object_spread$w(target) {
|
|
|
7024
7796
|
}));
|
|
7025
7797
|
}
|
|
7026
7798
|
ownKeys2.forEach(function(key) {
|
|
7027
|
-
_define_property$
|
|
7799
|
+
_define_property$y(target, key, source[key]);
|
|
7028
7800
|
});
|
|
7029
7801
|
}
|
|
7030
7802
|
return target;
|
|
@@ -7053,15 +7825,67 @@ function _object_spread_props$q(target, source) {
|
|
|
7053
7825
|
}
|
|
7054
7826
|
return target;
|
|
7055
7827
|
}
|
|
7056
|
-
var
|
|
7828
|
+
var SelectListItem = function(param) {
|
|
7829
|
+
var classes = param.classes, index = param.index, isSemiChecked = param.isSemiChecked, isDisabled = param.isDisabled, isActive = param.isActive, children = param.children, isFocused = param.isFocused, onOptionSelect = param.onOptionSelect, onToggleCheckbox = param.onToggleCheckbox;
|
|
7830
|
+
var isMultiSelect = isNotEmpty(onToggleCheckbox);
|
|
7831
|
+
var _obj;
|
|
7832
|
+
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$q(_object_spread$w({
|
|
7833
|
+
active: isFocused,
|
|
7834
|
+
options: {
|
|
7835
|
+
block: "nearest"
|
|
7836
|
+
},
|
|
7837
|
+
className: clsx(classes.cell, (_obj = {}, _define_property$y(_obj, classes.cellWithCheckbox, isMultiSelect), _define_property$y(_obj, classes.focused, isFocused), _define_property$y(_obj, classes.active, isActive && !isMultiSelect), _define_property$y(_obj, classes.disabled, isDisabled), _obj))
|
|
7838
|
+
}, addDataAttributes({
|
|
7839
|
+
disabled: isDisabled,
|
|
7840
|
+
active: isActive,
|
|
7841
|
+
focused: isFocused
|
|
7842
|
+
})), {
|
|
7843
|
+
onClick: !isDisabled && !isMultiSelect ? function(event) {
|
|
7844
|
+
return onOptionSelect(index, event);
|
|
7845
|
+
} : void 0,
|
|
7846
|
+
children: isMultiSelect ? /* @__PURE__ */ jsx(Checkbox, {
|
|
7847
|
+
value: index,
|
|
7848
|
+
isChecked: isActive || isSemiChecked,
|
|
7849
|
+
isSemiChecked,
|
|
7850
|
+
isDisabled,
|
|
7851
|
+
tweakStyles: checkboxStyles,
|
|
7852
|
+
onSelect: function(v) {
|
|
7853
|
+
return onToggleCheckbox(index, v.isSelected);
|
|
7854
|
+
},
|
|
7855
|
+
children
|
|
7856
|
+
}) : children
|
|
7857
|
+
}));
|
|
7858
|
+
};
|
|
7859
|
+
var DEFAULT_OPTION_INDEX = -2;
|
|
7860
|
+
var ALL_OPTION_INDEX = -1;
|
|
7861
|
+
function _define_property$x(obj, key, value) {
|
|
7862
|
+
if (key in obj) {
|
|
7863
|
+
Object.defineProperty(obj, key, {
|
|
7864
|
+
value,
|
|
7865
|
+
enumerable: true,
|
|
7866
|
+
configurable: true,
|
|
7867
|
+
writable: true
|
|
7868
|
+
});
|
|
7869
|
+
} else {
|
|
7870
|
+
obj[key] = value;
|
|
7871
|
+
}
|
|
7872
|
+
return obj;
|
|
7873
|
+
}
|
|
7057
7874
|
function SelectList(param) {
|
|
7058
|
-
var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, customListHeader = param.customListHeader, isOptionDisabled = param.isOptionDisabled,
|
|
7875
|
+
var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, customListHeader = param.customListHeader, isOptionDisabled = param.isOptionDisabled, allOptionsLabel = param.allOptionsLabel, onOptionSelect = param.onOptionSelect, onToggleCheckbox = param.onToggleCheckbox, convertValueToString = param.convertValueToString, _param_convertValueToReactNode = param.convertValueToReactNode, convertValueToReactNode = _param_convertValueToReactNode === void 0 ? convertValueToString : _param_convertValueToReactNode, convertValueToId = param.convertValueToId;
|
|
7059
7876
|
var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
|
|
7060
|
-
var
|
|
7061
|
-
var
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
var
|
|
7877
|
+
var isMultiSelect = isNotEmpty(onToggleCheckbox);
|
|
7878
|
+
var multiSelectValue = activeValue;
|
|
7879
|
+
var _multiSelectValue_length;
|
|
7880
|
+
var selectedOptionsCount = (_multiSelectValue_length = multiSelectValue === null || multiSelectValue === void 0 ? void 0 : multiSelectValue.length) !== null && _multiSelectValue_length !== void 0 ? _multiSelectValue_length : 0;
|
|
7881
|
+
var _multiSelectValue_map;
|
|
7882
|
+
var activeOptionsIdMap = useMemo(function() {
|
|
7883
|
+
return isMultiSelect ? (_multiSelectValue_map = multiSelectValue === null || multiSelectValue === void 0 ? void 0 : multiSelectValue.map(convertValueToId)) !== null && _multiSelectValue_map !== void 0 ? _multiSelectValue_map : [] : [];
|
|
7884
|
+
}, [
|
|
7885
|
+
isMultiSelect,
|
|
7886
|
+
multiSelectValue,
|
|
7887
|
+
convertValueToId
|
|
7888
|
+
]);
|
|
7065
7889
|
var optionsDisableMap = useMemo(function() {
|
|
7066
7890
|
return options.map(function(o) {
|
|
7067
7891
|
return isOptionDisabled(o);
|
|
@@ -7072,15 +7896,18 @@ function SelectList(param) {
|
|
|
7072
7896
|
]);
|
|
7073
7897
|
var listOptions = useMemo(function() {
|
|
7074
7898
|
return options.map(function(opt, i) {
|
|
7075
|
-
return
|
|
7899
|
+
return convertValueToReactNode(opt, optionsDisableMap[i]);
|
|
7076
7900
|
});
|
|
7077
7901
|
}, [
|
|
7078
7902
|
options,
|
|
7079
|
-
|
|
7903
|
+
convertValueToReactNode,
|
|
7080
7904
|
optionsDisableMap
|
|
7081
7905
|
]);
|
|
7906
|
+
var isActiveOption = function(item) {
|
|
7907
|
+
return isMultiSelect ? activeOptionsIdMap.includes(convertValueToId(item)) : isNotEmpty(activeValue) && convertValueToId(activeValue) === convertValueToId(item);
|
|
7908
|
+
};
|
|
7082
7909
|
return /* @__PURE__ */ jsxs(ScrollIntoViewIfNeeded, {
|
|
7083
|
-
active: shouldScrollToList,
|
|
7910
|
+
active: shouldScrollToList && !isMultiSelect,
|
|
7084
7911
|
className: clsx(classes.root, _define_property$x({}, classes.withListHeader, isNotEmpty(customListHeader))),
|
|
7085
7912
|
children: [
|
|
7086
7913
|
isNotEmpty(customListHeader) && /* @__PURE__ */ jsx("div", {
|
|
@@ -7095,39 +7922,42 @@ function SelectList(param) {
|
|
|
7095
7922
|
children: loadingLabel
|
|
7096
7923
|
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
7097
7924
|
children: [
|
|
7098
|
-
defaultOptionLabel
|
|
7925
|
+
isNotEmpty(defaultOptionLabel) && /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
|
|
7099
7926
|
active: focusedIndex === DEFAULT_OPTION_INDEX,
|
|
7100
7927
|
options: {
|
|
7101
7928
|
block: "nearest"
|
|
7102
7929
|
},
|
|
7103
7930
|
className: clsx(classes.cell, classes.defaultCell, focusedIndex === DEFAULT_OPTION_INDEX && classes.focused),
|
|
7104
7931
|
onClick: function(event) {
|
|
7105
|
-
return
|
|
7932
|
+
return onOptionSelect(DEFAULT_OPTION_INDEX, event);
|
|
7106
7933
|
},
|
|
7107
7934
|
children: defaultOptionLabel
|
|
7108
7935
|
}),
|
|
7936
|
+
isNotEmpty(allOptionsLabel) && /* @__PURE__ */ jsx(SelectListItem, {
|
|
7937
|
+
classes,
|
|
7938
|
+
index: ALL_OPTION_INDEX,
|
|
7939
|
+
isSemiChecked: selectedOptionsCount > 0 && selectedOptionsCount < options.length,
|
|
7940
|
+
isActive: selectedOptionsCount === options.length,
|
|
7941
|
+
isFocused: focusedIndex === ALL_OPTION_INDEX,
|
|
7942
|
+
onOptionSelect,
|
|
7943
|
+
onToggleCheckbox,
|
|
7944
|
+
children: allOptionsLabel
|
|
7945
|
+
}),
|
|
7109
7946
|
listOptions.map(function(opt, i) {
|
|
7110
7947
|
var optionValue = options[i];
|
|
7111
|
-
var isFocused =
|
|
7948
|
+
var isFocused = focusedIndex === i;
|
|
7112
7949
|
var isActive = isActiveOption(optionValue);
|
|
7113
7950
|
var isDisabled = optionsDisableMap[i];
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
disabled: isDisabled,
|
|
7123
|
-
active: isActive,
|
|
7124
|
-
focused: isFocused
|
|
7125
|
-
})), {
|
|
7126
|
-
onClick: !isDisabled ? function(event) {
|
|
7127
|
-
return onOptionClick(i, event);
|
|
7128
|
-
} : void 0,
|
|
7951
|
+
return /* @__PURE__ */ jsx(SelectListItem, {
|
|
7952
|
+
classes,
|
|
7953
|
+
index: i,
|
|
7954
|
+
isDisabled,
|
|
7955
|
+
isActive,
|
|
7956
|
+
isFocused,
|
|
7957
|
+
onOptionSelect,
|
|
7958
|
+
onToggleCheckbox,
|
|
7129
7959
|
children: opt
|
|
7130
|
-
}
|
|
7960
|
+
}, i);
|
|
7131
7961
|
}),
|
|
7132
7962
|
listOptions.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
7133
7963
|
className: clsx(classes.cell, classes.noMatchesLabel),
|
|
@@ -7149,10 +7979,13 @@ var defaultConvertFunction$2 = function(v) {
|
|
|
7149
7979
|
var defaultCompareFunction = function(v1, v2) {
|
|
7150
7980
|
return v1 === v2;
|
|
7151
7981
|
};
|
|
7152
|
-
var
|
|
7153
|
-
return
|
|
7154
|
-
return
|
|
7155
|
-
}
|
|
7982
|
+
var getDefaultConvertToIdFunction = function(convertValueToString) {
|
|
7983
|
+
return function(value) {
|
|
7984
|
+
return isNotEmpty(value === null || value === void 0 ? void 0 : value.id) ? String(value.id) : convertValueToString(value);
|
|
7985
|
+
};
|
|
7986
|
+
};
|
|
7987
|
+
var isMultiSelectValue = function(props, _value) {
|
|
7988
|
+
return props.isMultiSelect === true;
|
|
7156
7989
|
};
|
|
7157
7990
|
var styles$u = {
|
|
7158
7991
|
root: {
|
|
@@ -7202,6 +8035,21 @@ var styles$u = {
|
|
|
7202
8035
|
input: {
|
|
7203
8036
|
paddingRight: 32
|
|
7204
8037
|
},
|
|
8038
|
+
withUnits: {
|
|
8039
|
+
paddingRight: 8
|
|
8040
|
+
},
|
|
8041
|
+
unitsWrapper: {
|
|
8042
|
+
position: "unset",
|
|
8043
|
+
padding: [
|
|
8044
|
+
0,
|
|
8045
|
+
32,
|
|
8046
|
+
0,
|
|
8047
|
+
0
|
|
8048
|
+
]
|
|
8049
|
+
},
|
|
8050
|
+
fakeValue: {
|
|
8051
|
+
display: "none"
|
|
8052
|
+
},
|
|
7205
8053
|
disabled: {
|
|
7206
8054
|
"& $input": {
|
|
7207
8055
|
cursor: "default"
|
|
@@ -7386,6 +8234,10 @@ function _array_with_holes$j(arr) {
|
|
|
7386
8234
|
if (Array.isArray(arr))
|
|
7387
8235
|
return arr;
|
|
7388
8236
|
}
|
|
8237
|
+
function _array_without_holes$4(arr) {
|
|
8238
|
+
if (Array.isArray(arr))
|
|
8239
|
+
return _array_like_to_array$j(arr);
|
|
8240
|
+
}
|
|
7389
8241
|
function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7390
8242
|
try {
|
|
7391
8243
|
var info = gen[key](arg);
|
|
@@ -7402,9 +8254,9 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
7402
8254
|
}
|
|
7403
8255
|
function _async_to_generator$4(fn3) {
|
|
7404
8256
|
return function() {
|
|
7405
|
-
var
|
|
8257
|
+
var self2 = this, args = arguments;
|
|
7406
8258
|
return new Promise(function(resolve, reject) {
|
|
7407
|
-
var gen = fn3.apply(
|
|
8259
|
+
var gen = fn3.apply(self2, args);
|
|
7408
8260
|
function _next(value) {
|
|
7409
8261
|
asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
|
|
7410
8262
|
}
|
|
@@ -7428,6 +8280,10 @@ function _define_property$v(obj, key, value) {
|
|
|
7428
8280
|
}
|
|
7429
8281
|
return obj;
|
|
7430
8282
|
}
|
|
8283
|
+
function _iterable_to_array$4(iter) {
|
|
8284
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
8285
|
+
return Array.from(iter);
|
|
8286
|
+
}
|
|
7431
8287
|
function _iterable_to_array_limit$j(arr, i) {
|
|
7432
8288
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
7433
8289
|
if (_i == null)
|
|
@@ -7459,6 +8315,9 @@ function _iterable_to_array_limit$j(arr, i) {
|
|
|
7459
8315
|
function _non_iterable_rest$j() {
|
|
7460
8316
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7461
8317
|
}
|
|
8318
|
+
function _non_iterable_spread$4() {
|
|
8319
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8320
|
+
}
|
|
7462
8321
|
function _object_spread$u(target) {
|
|
7463
8322
|
for (var i = 1; i < arguments.length; i++) {
|
|
7464
8323
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -7533,6 +8392,9 @@ function _object_without_properties_loose$5(source, excluded) {
|
|
|
7533
8392
|
function _sliced_to_array$j(arr, i) {
|
|
7534
8393
|
return _array_with_holes$j(arr) || _iterable_to_array_limit$j(arr, i) || _unsupported_iterable_to_array$j(arr, i) || _non_iterable_rest$j();
|
|
7535
8394
|
}
|
|
8395
|
+
function _to_consumable_array$4(arr) {
|
|
8396
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$j(arr) || _non_iterable_spread$4();
|
|
8397
|
+
}
|
|
7536
8398
|
function _unsupported_iterable_to_array$j(o, minLen) {
|
|
7537
8399
|
if (!o)
|
|
7538
8400
|
return;
|
|
@@ -7648,11 +8510,12 @@ var __generator$4 = globalThis && globalThis.__generator || function(thisArg, bo
|
|
|
7648
8510
|
};
|
|
7649
8511
|
}
|
|
7650
8512
|
};
|
|
7651
|
-
function Select(
|
|
7652
|
-
var options =
|
|
8513
|
+
function Select(props) {
|
|
8514
|
+
var options = props.options, value = props.value, defaultOptionLabel = props.defaultOptionLabel, allOptionsLabel = props.allOptionsLabel, _props_debounceTime = props.debounceTime, debounceTime = _props_debounceTime === void 0 ? 400 : _props_debounceTime, _props_optionsMode = props.optionsMode, optionsMode = _props_optionsMode === void 0 ? "normal" : _props_optionsMode, noMatchesLabel = props.noMatchesLabel, loadingLabel = props.loadingLabel, tweakStyles = props.tweakStyles, testId = props.testId, isReadonly = props.isReadonly, isDisabled = props.isDisabled, dropdownOptions = props.dropdownOptions, _props_minSymbolsCountToOpenList = props.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _props_minSymbolsCountToOpenList === void 0 ? 0 : _props_minSymbolsCountToOpenList, _props_dropdownIcon = props.dropdownIcon, dropdownIcon = _props_dropdownIcon === void 0 ? "chevron-down" : _props_dropdownIcon, _props_shouldScrollToList = props.shouldScrollToList, shouldScrollToList = _props_shouldScrollToList === void 0 ? true : _props_shouldScrollToList, searchInput = props.searchInput, units = props.units, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, onType = props.onType, onOpen = props.onOpen, _props_isOptionDisabled = props.isOptionDisabled, isOptionDisabled = _props_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _props_isOptionDisabled, _props_compareValuesOnChange = props.compareValuesOnChange, compareValuesOnChange = _props_compareValuesOnChange === void 0 ? defaultCompareFunction : _props_compareValuesOnChange, _props_convertValueToString = props.convertValueToString, convertValueToString = _props_convertValueToString === void 0 ? defaultConvertFunction$2 : _props_convertValueToString, convertValueToId = props.convertValueToId, convertValueToReactNode = props.convertValueToReactNode, optionsFilter = props.optionsFilter, inputProps = _object_without_properties$5(props, [
|
|
7653
8515
|
"options",
|
|
7654
8516
|
"value",
|
|
7655
8517
|
"defaultOptionLabel",
|
|
8518
|
+
"allOptionsLabel",
|
|
7656
8519
|
"debounceTime",
|
|
7657
8520
|
"optionsMode",
|
|
7658
8521
|
"noMatchesLabel",
|
|
@@ -7666,6 +8529,7 @@ function Select(_param) {
|
|
|
7666
8529
|
"dropdownIcon",
|
|
7667
8530
|
"shouldScrollToList",
|
|
7668
8531
|
"searchInput",
|
|
8532
|
+
"units",
|
|
7669
8533
|
"onChange",
|
|
7670
8534
|
"onFocus",
|
|
7671
8535
|
"onBlur",
|
|
@@ -7682,8 +8546,8 @@ function Select(_param) {
|
|
|
7682
8546
|
var isMounted = useIsMounted();
|
|
7683
8547
|
var _useState = _sliced_to_array$j(useState(false), 2), isListOpen = _useState[0], setIsListOpen = _useState[1];
|
|
7684
8548
|
var _useState1 = _sliced_to_array$j(useState(false), 2), areOptionsLoading = _useState1[0], setAreOptionsLoading = _useState1[1];
|
|
7685
|
-
var hasDefaultOption = defaultOptionLabel
|
|
7686
|
-
var _useState2 = _sliced_to_array$j(useState(
|
|
8549
|
+
var hasDefaultOption = isStringNotEmpty(defaultOptionLabel);
|
|
8550
|
+
var _useState2 = _sliced_to_array$j(useState(DEFAULT_OPTION_INDEX), 2), focusedListCellIndex = _useState2[0], setFocusedListCellIndex = _useState2[1];
|
|
7687
8551
|
var _useState3 = _sliced_to_array$j(useState(""), 2), searchValue = _useState3[0], setSearchValue = _useState3[1];
|
|
7688
8552
|
var _useState4 = _sliced_to_array$j(useState(true), 2), shouldShowDefaultOption = _useState4[0], setShouldShowDefaultOption = _useState4[1];
|
|
7689
8553
|
var inputWrapper = useRef(null);
|
|
@@ -7691,31 +8555,50 @@ function Select(_param) {
|
|
|
7691
8555
|
var input = useRef(null);
|
|
7692
8556
|
var shouldRenderSearchInputInList = (searchInput === null || searchInput === void 0 ? void 0 : searchInput.shouldRenderInList) === true;
|
|
7693
8557
|
var hasSearchInputInList = optionsMode !== "normal" && shouldRenderSearchInputInList;
|
|
7694
|
-
var
|
|
8558
|
+
var isMultiSelect = isMultiSelectValue(props);
|
|
8559
|
+
var strValue = isMultiSelect ? value === null || value === void 0 ? void 0 : value[0] : value;
|
|
8560
|
+
var shouldShowAllOption = isMultiSelect && isNotEmpty(allOptionsLabel) && searchValue === "";
|
|
7695
8561
|
var filteredOptions = useMemo(function() {
|
|
7696
8562
|
if (optionsMode !== "search") {
|
|
7697
8563
|
return options;
|
|
7698
8564
|
}
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
var convertedOption = convertValueToString(option);
|
|
7705
|
-
return convertedOption !== void 0 && convertedOption.toLowerCase().includes(lowerCaseValue);
|
|
8565
|
+
var _convertValueToString;
|
|
8566
|
+
var filter = optionsFilter !== null && optionsFilter !== void 0 ? optionsFilter : createFilter(function(option) {
|
|
8567
|
+
return [
|
|
8568
|
+
(_convertValueToString = convertValueToString(option)) !== null && _convertValueToString !== void 0 ? _convertValueToString : ""
|
|
8569
|
+
];
|
|
7706
8570
|
});
|
|
8571
|
+
return filter(options, searchValue);
|
|
7707
8572
|
}, [
|
|
7708
|
-
optionsMode,
|
|
7709
8573
|
optionsFilter,
|
|
7710
8574
|
options,
|
|
7711
8575
|
convertValueToString,
|
|
7712
|
-
searchValue
|
|
8576
|
+
searchValue,
|
|
8577
|
+
optionsMode
|
|
7713
8578
|
]);
|
|
7714
|
-
|
|
7715
|
-
|
|
8579
|
+
var optionsIndexesForNavigation = useMemo(function() {
|
|
8580
|
+
var result = [];
|
|
8581
|
+
if (shouldShowDefaultOption && hasDefaultOption) {
|
|
8582
|
+
result.push(DEFAULT_OPTION_INDEX);
|
|
8583
|
+
}
|
|
8584
|
+
if (shouldShowAllOption) {
|
|
8585
|
+
result.push(ALL_OPTION_INDEX);
|
|
8586
|
+
}
|
|
8587
|
+
return result.concat(filteredOptions.reduce(function(acc, cur, i) {
|
|
8588
|
+
if (!isOptionDisabled(cur)) {
|
|
8589
|
+
acc.push(i);
|
|
8590
|
+
}
|
|
8591
|
+
return acc;
|
|
8592
|
+
}, []));
|
|
7716
8593
|
}, [
|
|
7717
|
-
filteredOptions
|
|
7718
|
-
|
|
8594
|
+
filteredOptions
|
|
8595
|
+
]);
|
|
8596
|
+
var stringValue = isNotEmpty(strValue) ? convertValueToString(strValue) : void 0;
|
|
8597
|
+
var showedStringValue = isMultiSelect && (value === null || value === void 0 ? void 0 : value.length) === filteredOptions.length && isNotEmpty(allOptionsLabel) ? allOptionsLabel : stringValue;
|
|
8598
|
+
var convertToId = useCallback(function(v) {
|
|
8599
|
+
return (convertValueToId !== null && convertValueToId !== void 0 ? convertValueToId : getDefaultConvertToIdFunction(convertValueToString))(v);
|
|
8600
|
+
}, [
|
|
8601
|
+
convertValueToId,
|
|
7719
8602
|
convertValueToString
|
|
7720
8603
|
]);
|
|
7721
8604
|
var handleListClose = useCallback(function(event) {
|
|
@@ -7752,11 +8635,9 @@ function Select(_param) {
|
|
|
7752
8635
|
}
|
|
7753
8636
|
};
|
|
7754
8637
|
var handleOnChange = useCallback(function(newValue) {
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
return;
|
|
8638
|
+
if (!compareValuesOnChange(value, newValue)) {
|
|
8639
|
+
onChange(newValue);
|
|
7758
8640
|
}
|
|
7759
|
-
onChange(newValue);
|
|
7760
8641
|
}, [
|
|
7761
8642
|
value,
|
|
7762
8643
|
compareValuesOnChange,
|
|
@@ -7764,7 +8645,7 @@ function Select(_param) {
|
|
|
7764
8645
|
]);
|
|
7765
8646
|
var handleOptionSelect = useCallback(function(index, event) {
|
|
7766
8647
|
var _input_current;
|
|
7767
|
-
handleOnChange(index ===
|
|
8648
|
+
handleOnChange(index === DEFAULT_OPTION_INDEX ? void 0 : filteredOptions[index]);
|
|
7768
8649
|
handleListClose(event);
|
|
7769
8650
|
(_input_current = input.current) === null || _input_current === void 0 ? void 0 : _input_current.blur();
|
|
7770
8651
|
}, [
|
|
@@ -7772,6 +8653,36 @@ function Select(_param) {
|
|
|
7772
8653
|
handleListClose,
|
|
7773
8654
|
filteredOptions
|
|
7774
8655
|
]);
|
|
8656
|
+
var handleToggleOptionCheckbox = useCallback(function(index, isSelected) {
|
|
8657
|
+
if (!isMultiSelect) {
|
|
8658
|
+
return;
|
|
8659
|
+
}
|
|
8660
|
+
if (index === DEFAULT_OPTION_INDEX || index === ALL_OPTION_INDEX && !isSelected) {
|
|
8661
|
+
handleOnChange(void 0);
|
|
8662
|
+
return;
|
|
8663
|
+
}
|
|
8664
|
+
if (index === ALL_OPTION_INDEX && isSelected) {
|
|
8665
|
+
handleOnChange(options);
|
|
8666
|
+
return;
|
|
8667
|
+
}
|
|
8668
|
+
var option = filteredOptions[index];
|
|
8669
|
+
handleOnChange(isSelected ? (
|
|
8670
|
+
// Добавляем
|
|
8671
|
+
_to_consumable_array$4(value !== null && value !== void 0 ? value : []).concat([
|
|
8672
|
+
option
|
|
8673
|
+
])
|
|
8674
|
+
) : (
|
|
8675
|
+
// Убираем
|
|
8676
|
+
value === null || value === void 0 ? void 0 : value.filter(function(o) {
|
|
8677
|
+
return convertToId(o) !== convertToId(option);
|
|
8678
|
+
})
|
|
8679
|
+
));
|
|
8680
|
+
}, [
|
|
8681
|
+
handleOnChange,
|
|
8682
|
+
filteredOptions,
|
|
8683
|
+
isMultiSelect,
|
|
8684
|
+
value
|
|
8685
|
+
]);
|
|
7775
8686
|
var handleOnType = useCallback(function() {
|
|
7776
8687
|
var _ref2 = _async_to_generator$4(function(v) {
|
|
7777
8688
|
return __generator$4(this, function(_state) {
|
|
@@ -7831,47 +8742,43 @@ function Select(_param) {
|
|
|
7831
8742
|
return;
|
|
7832
8743
|
}
|
|
7833
8744
|
event.stopPropagation();
|
|
8745
|
+
var curIndexInNavigation = optionsIndexesForNavigation.findIndex(function(index) {
|
|
8746
|
+
return index === focusedListCellIndex;
|
|
8747
|
+
});
|
|
7834
8748
|
switch (event.code) {
|
|
7835
8749
|
case "Enter":
|
|
7836
8750
|
case "NumpadEnter": {
|
|
7837
|
-
var
|
|
7838
|
-
if (
|
|
7839
|
-
|
|
8751
|
+
var indexToSelect = focusedListCellIndex;
|
|
8752
|
+
if (indexToSelect === DEFAULT_OPTION_INDEX && filteredOptions.length === 1) {
|
|
8753
|
+
indexToSelect = 0;
|
|
8754
|
+
}
|
|
8755
|
+
if (isMultiSelect) {
|
|
8756
|
+
var isThisValueAlreadySelected;
|
|
8757
|
+
if (indexToSelect === ALL_OPTION_INDEX) {
|
|
8758
|
+
isThisValueAlreadySelected = (value === null || value === void 0 ? void 0 : value.length) === options.length;
|
|
8759
|
+
} else {
|
|
8760
|
+
var valueIdToSelect = convertToId(filteredOptions[indexToSelect]);
|
|
8761
|
+
var _value_some;
|
|
8762
|
+
isThisValueAlreadySelected = (_value_some = value === null || value === void 0 ? void 0 : value.some(function(opt) {
|
|
8763
|
+
return convertToId(opt) === valueIdToSelect;
|
|
8764
|
+
})) !== null && _value_some !== void 0 ? _value_some : false;
|
|
8765
|
+
}
|
|
8766
|
+
handleToggleOptionCheckbox(indexToSelect, !isThisValueAlreadySelected);
|
|
8767
|
+
} else {
|
|
8768
|
+
handleOptionSelect(indexToSelect, event);
|
|
7840
8769
|
}
|
|
7841
|
-
handleOptionSelect(indexToClick, event);
|
|
7842
8770
|
break;
|
|
7843
8771
|
}
|
|
7844
8772
|
case "ArrowDown": {
|
|
7845
8773
|
event.preventDefault();
|
|
7846
|
-
var
|
|
7847
|
-
|
|
7848
|
-
var targetIndex = (i + 1) % filteredOptions.length;
|
|
7849
|
-
if (shouldShowDefaultOption && hasDefaultOption && newIndex > -1 && targetIndex === 0) {
|
|
7850
|
-
newIndex = -1;
|
|
7851
|
-
break;
|
|
7852
|
-
}
|
|
7853
|
-
if (!isOptionDisabled(filteredOptions[targetIndex])) {
|
|
7854
|
-
newIndex = targetIndex;
|
|
7855
|
-
break;
|
|
7856
|
-
}
|
|
7857
|
-
}
|
|
7858
|
-
setFocusedListCellIndex(newIndex);
|
|
8774
|
+
var targetIndexInNavigation = (curIndexInNavigation + 1) % optionsIndexesForNavigation.length;
|
|
8775
|
+
setFocusedListCellIndex(optionsIndexesForNavigation[targetIndexInNavigation]);
|
|
7859
8776
|
break;
|
|
7860
8777
|
}
|
|
7861
8778
|
case "ArrowUp": {
|
|
7862
8779
|
event.preventDefault();
|
|
7863
|
-
var
|
|
7864
|
-
|
|
7865
|
-
var targetIndex1 = (i1 > 0 ? i1 : filteredOptions.length + i1) - 1;
|
|
7866
|
-
if (shouldShowDefaultOption && hasDefaultOption && focusedListCellIndex !== -1 && targetIndex1 === filteredOptions.length - 1) {
|
|
7867
|
-
setFocusedListCellIndex(-1);
|
|
7868
|
-
break;
|
|
7869
|
-
}
|
|
7870
|
-
if (!isOptionDisabled(filteredOptions[targetIndex1])) {
|
|
7871
|
-
setFocusedListCellIndex(targetIndex1);
|
|
7872
|
-
break;
|
|
7873
|
-
}
|
|
7874
|
-
}
|
|
8780
|
+
var targetIndexInNavigation1 = (curIndexInNavigation - 1 + optionsIndexesForNavigation.length) % optionsIndexesForNavigation.length;
|
|
8781
|
+
setFocusedListCellIndex(optionsIndexesForNavigation[targetIndexInNavigation1]);
|
|
7875
8782
|
break;
|
|
7876
8783
|
}
|
|
7877
8784
|
}
|
|
@@ -7900,7 +8807,7 @@ function Select(_param) {
|
|
|
7900
8807
|
);
|
|
7901
8808
|
var hasReadonlyInput = isReadonly || optionsMode === "normal" || shouldRenderSearchInputInList;
|
|
7902
8809
|
var tweakInputStyles = useMemo(function() {
|
|
7903
|
-
return merge({}, componentStyles.tweakInput, _object_spread$u({}, hasReadonlyInput && {
|
|
8810
|
+
return merge$1({}, componentStyles.tweakInput, _object_spread$u({}, hasReadonlyInput && {
|
|
7904
8811
|
input: {
|
|
7905
8812
|
cursor: "pointer"
|
|
7906
8813
|
}
|
|
@@ -7923,12 +8830,16 @@ function Select(_param) {
|
|
|
7923
8830
|
]
|
|
7924
8831
|
});
|
|
7925
8832
|
useEffect(function() {
|
|
7926
|
-
|
|
7927
|
-
|
|
8833
|
+
var val = isMultiSelect ? value === null || value === void 0 ? void 0 : value[0] : value;
|
|
8834
|
+
var _optionsIndexesForNavigation_find;
|
|
8835
|
+
setFocusedListCellIndex((_optionsIndexesForNavigation_find = optionsIndexesForNavigation.find(function(index) {
|
|
8836
|
+
return filteredOptions[index] === val;
|
|
8837
|
+
})) !== null && _optionsIndexesForNavigation_find !== void 0 ? _optionsIndexesForNavigation_find : optionsIndexesForNavigation[0]);
|
|
8838
|
+
if (isOpen) {
|
|
8839
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
7928
8840
|
}
|
|
7929
8841
|
}, [
|
|
7930
|
-
isOpen
|
|
7931
|
-
onOpen
|
|
8842
|
+
isOpen
|
|
7932
8843
|
]);
|
|
7933
8844
|
var _obj;
|
|
7934
8845
|
var listEl = /* @__PURE__ */ jsx("div", _object_spread_props$o(_object_spread$u({
|
|
@@ -7940,6 +8851,7 @@ function Select(_param) {
|
|
|
7940
8851
|
children: isOpen && /* @__PURE__ */ jsx(SelectList, {
|
|
7941
8852
|
options: filteredOptions,
|
|
7942
8853
|
defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption ? defaultOptionLabel : void 0,
|
|
8854
|
+
allOptionsLabel: shouldShowAllOption ? allOptionsLabel : void 0,
|
|
7943
8855
|
customListHeader: hasSearchInputInList ? /* @__PURE__ */ jsx(SearchInput, _object_spread$u({
|
|
7944
8856
|
value: searchValue,
|
|
7945
8857
|
onChange: handleInputChange,
|
|
@@ -7957,8 +8869,9 @@ function Select(_param) {
|
|
|
7957
8869
|
isOptionDisabled,
|
|
7958
8870
|
convertValueToString,
|
|
7959
8871
|
convertValueToReactNode,
|
|
7960
|
-
convertValueToId,
|
|
7961
|
-
|
|
8872
|
+
convertValueToId: convertToId,
|
|
8873
|
+
onOptionSelect: handleOptionSelect,
|
|
8874
|
+
onToggleCheckbox: isMultiSelect ? handleToggleOptionCheckbox : void 0
|
|
7962
8875
|
})
|
|
7963
8876
|
}));
|
|
7964
8877
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -7971,7 +8884,7 @@ function Select(_param) {
|
|
|
7971
8884
|
ref: inputWrapper,
|
|
7972
8885
|
children: [
|
|
7973
8886
|
/* @__PURE__ */ jsx(Input, _object_spread$u({
|
|
7974
|
-
value: searchValue !== "" && !shouldRenderSearchInputInList ? searchValue :
|
|
8887
|
+
value: searchValue !== "" && !shouldRenderSearchInputInList ? searchValue : showedStringValue,
|
|
7975
8888
|
onChange: handleInputChange,
|
|
7976
8889
|
isActive: isListOpen,
|
|
7977
8890
|
isReadonly: hasReadonlyInput,
|
|
@@ -7981,7 +8894,8 @@ function Select(_param) {
|
|
|
7981
8894
|
ref: input,
|
|
7982
8895
|
isLoading: areOptionsLoading,
|
|
7983
8896
|
tweakStyles: tweakInputStyles,
|
|
7984
|
-
testId
|
|
8897
|
+
testId,
|
|
8898
|
+
units: isMultiSelect && isNotEmpty(value) && value.length > 1 && value.length !== options.length ? "(+".concat(value.length - 1, ")") : units
|
|
7985
8899
|
}, inputProps)),
|
|
7986
8900
|
/* @__PURE__ */ jsx("div", {
|
|
7987
8901
|
onMouseDown: function(event) {
|
|
@@ -8818,7 +9732,7 @@ var SelectLocales = {
|
|
|
8818
9732
|
var DEFAULT_LOCALE$2 = "en";
|
|
8819
9733
|
var getLocale$2 = function() {
|
|
8820
9734
|
var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_LOCALE$2, custom = arguments.length > 1 ? arguments[1] : void 0, custom2 = arguments.length > 2 ? arguments[2] : void 0;
|
|
8821
|
-
return merge({}, SelectLocales[key], custom, custom2);
|
|
9735
|
+
return merge$1({}, SelectLocales[key], custom, custom2);
|
|
8822
9736
|
};
|
|
8823
9737
|
function _define_property$s(obj, key, value) {
|
|
8824
9738
|
if (key in obj) {
|
|
@@ -9027,9 +9941,9 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
9027
9941
|
}
|
|
9028
9942
|
function _async_to_generator$3(fn3) {
|
|
9029
9943
|
return function() {
|
|
9030
|
-
var
|
|
9944
|
+
var self2 = this, args = arguments;
|
|
9031
9945
|
return new Promise(function(resolve, reject) {
|
|
9032
|
-
var gen = fn3.apply(
|
|
9946
|
+
var gen = fn3.apply(self2, args);
|
|
9033
9947
|
function _next(value) {
|
|
9034
9948
|
asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
|
|
9035
9949
|
}
|
|
@@ -9718,7 +10632,7 @@ var FilterLocales = {
|
|
|
9718
10632
|
var DEFAULT_LOCALE$1 = "en";
|
|
9719
10633
|
var getLocale$1 = function() {
|
|
9720
10634
|
var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_LOCALE$1, custom = arguments.length > 1 ? arguments[1] : void 0, custom2 = arguments.length > 2 ? arguments[2] : void 0;
|
|
9721
|
-
return merge({}, FilterLocales[key], custom, custom2);
|
|
10635
|
+
return merge$1({}, FilterLocales[key], custom, custom2);
|
|
9722
10636
|
};
|
|
9723
10637
|
var FILTER_HEIGHT = 36;
|
|
9724
10638
|
var styles$o = {
|
|
@@ -10312,9 +11226,9 @@ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
10312
11226
|
}
|
|
10313
11227
|
function _async_to_generator$2(fn3) {
|
|
10314
11228
|
return function() {
|
|
10315
|
-
var
|
|
11229
|
+
var self2 = this, args = arguments;
|
|
10316
11230
|
return new Promise(function(resolve, reject) {
|
|
10317
|
-
var gen = fn3.apply(
|
|
11231
|
+
var gen = fn3.apply(self2, args);
|
|
10318
11232
|
function _next(value) {
|
|
10319
11233
|
asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
|
|
10320
11234
|
}
|
|
@@ -10882,7 +11796,7 @@ var MultiSelectLocales = {
|
|
|
10882
11796
|
var DEFAULT_LOCALE = "en";
|
|
10883
11797
|
var getLocale = function() {
|
|
10884
11798
|
var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_LOCALE, custom = arguments.length > 1 ? arguments[1] : void 0, custom2 = arguments.length > 2 ? arguments[2] : void 0;
|
|
10885
|
-
return merge({}, MultiSelectLocales[key], custom, custom2);
|
|
11799
|
+
return merge$1({}, MultiSelectLocales[key], custom, custom2);
|
|
10886
11800
|
};
|
|
10887
11801
|
function _define_property$n(obj, key, value) {
|
|
10888
11802
|
if (key in obj) {
|
|
@@ -11063,9 +11977,9 @@ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
11063
11977
|
}
|
|
11064
11978
|
function _async_to_generator$1(fn3) {
|
|
11065
11979
|
return function() {
|
|
11066
|
-
var
|
|
11980
|
+
var self2 = this, args = arguments;
|
|
11067
11981
|
return new Promise(function(resolve, reject) {
|
|
11068
|
-
var gen = fn3.apply(
|
|
11982
|
+
var gen = fn3.apply(self2, args);
|
|
11069
11983
|
function _next(value) {
|
|
11070
11984
|
asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
|
|
11071
11985
|
}
|
|
@@ -26575,7 +27489,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
26575
27489
|
var TextWithTooltip = function(param) {
|
|
26576
27490
|
var children = param.children, tooltipText = param.tooltipText, _param_tooltipPosition = param.tooltipPosition, tooltipPosition = _param_tooltipPosition === void 0 ? "top" : _param_tooltipPosition, _param_tooltipView = param.tooltipView, tooltipView = _param_tooltipView === void 0 ? "tooltip" : _param_tooltipView, tooltipType = param.tooltipType, _param_tooltipModifiers = param.tooltipModifiers, tooltipModifiers = _param_tooltipModifiers === void 0 ? [] : _param_tooltipModifiers, tooltipOffsetOptions = param.tooltipOffsetOptions, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_shouldRenderInBody = param.shouldRenderInBody, shouldRenderInBody = _param_shouldRenderInBody === void 0 ? true : _param_shouldRenderInBody, _param_mouseEventType = param.mouseEventType, mouseEventType = _param_mouseEventType === void 0 ? "hover" : _param_mouseEventType, hoverDelay = param.hoverDelay, data = param.data, tweakStyles = param.tweakStyles;
|
|
26577
27491
|
var _useTheme = useTheme("TextWithTooltip", styles$2, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
26578
|
-
var
|
|
27492
|
+
var root2 = useRef(null);
|
|
26579
27493
|
var tooltip = useRef(null);
|
|
26580
27494
|
var _useState = _sliced_to_array(useState(false), 2), isTooltipVisible = _useState[0], setIsTooltipVisible = _useState[1];
|
|
26581
27495
|
var _useState1 = _sliced_to_array(useState(), 2), tooltipTimeout = _useState1[0], setTooltipTimeout = _useState1[1];
|
|
@@ -26601,7 +27515,7 @@ var TextWithTooltip = function(param) {
|
|
|
26601
27515
|
return clearTimeout(tooltipTimeout);
|
|
26602
27516
|
};
|
|
26603
27517
|
}, []);
|
|
26604
|
-
var _usePopper = usePopper(
|
|
27518
|
+
var _usePopper = usePopper(root2.current, tooltip.current, {
|
|
26605
27519
|
enabled: isTooltipVisible,
|
|
26606
27520
|
placement: tooltipPosition,
|
|
26607
27521
|
modifiers: [
|
|
@@ -26620,7 +27534,7 @@ var TextWithTooltip = function(param) {
|
|
|
26620
27534
|
if (mouseEventType === "click") {
|
|
26621
27535
|
setIsTooltipVisible(false);
|
|
26622
27536
|
}
|
|
26623
|
-
},
|
|
27537
|
+
}, root2);
|
|
26624
27538
|
var props = mouseEventType === "click" ? {
|
|
26625
27539
|
onClick: function() {
|
|
26626
27540
|
return setIsTooltipVisible(true);
|
|
@@ -26634,10 +27548,10 @@ var TextWithTooltip = function(param) {
|
|
|
26634
27548
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$2(_object_spread$2({
|
|
26635
27549
|
className: clsx(classes.root, mouseEventType === "click" && shouldShowTooltip && classes.clickable)
|
|
26636
27550
|
}, shouldShowTooltip ? props : void 0, addDataAttributes(data)), {
|
|
26637
|
-
ref:
|
|
27551
|
+
ref: root2,
|
|
26638
27552
|
children: [
|
|
26639
27553
|
shouldShowTooltip && /* @__PURE__ */ jsx(Portal, {
|
|
26640
|
-
container: shouldRenderInBody ? document.body :
|
|
27554
|
+
container: shouldRenderInBody ? document.body : root2.current,
|
|
26641
27555
|
children: /* @__PURE__ */ jsx("div", _object_spread_props$2(_object_spread$2({
|
|
26642
27556
|
className: classes.tooltip,
|
|
26643
27557
|
style: popperStyles.popper
|
|
@@ -26855,9 +27769,9 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
26855
27769
|
}
|
|
26856
27770
|
function _async_to_generator(fn3) {
|
|
26857
27771
|
return function() {
|
|
26858
|
-
var
|
|
27772
|
+
var self2 = this, args = arguments;
|
|
26859
27773
|
return new Promise(function(resolve, reject) {
|
|
26860
|
-
var gen = fn3.apply(
|
|
27774
|
+
var gen = fn3.apply(self2, args);
|
|
26861
27775
|
function _next(value) {
|
|
26862
27776
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
26863
27777
|
}
|
|
@@ -27160,6 +28074,7 @@ export {
|
|
|
27160
28074
|
checkElementParentsClassNames,
|
|
27161
28075
|
checkSearchStringInCountry,
|
|
27162
28076
|
commonTheme,
|
|
28077
|
+
createFilter,
|
|
27163
28078
|
defaultConvertFunction$1 as defaultConvertFunction,
|
|
27164
28079
|
findCountryByCode,
|
|
27165
28080
|
findCountryIndexByCode,
|
|
@@ -27184,6 +28099,7 @@ export {
|
|
|
27184
28099
|
isInt,
|
|
27185
28100
|
isNotEmpty,
|
|
27186
28101
|
isSpaceChar,
|
|
28102
|
+
isStringNotEmpty,
|
|
27187
28103
|
minWidthModifier,
|
|
27188
28104
|
phoneInfo,
|
|
27189
28105
|
removeStringFormat,
|