@true-engineering/true-react-common-ui-kit 1.0.1 → 1.1.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.
@@ -246,28 +246,28 @@
246
246
  return null;
247
247
  }
248
248
  var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
249
- function error(format) {
249
+ function error(format2) {
250
250
  {
251
251
  {
252
252
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
253
253
  args[_key2 - 1] = arguments[_key2];
254
254
  }
255
- printWarning("error", format, args);
255
+ printWarning("error", format2, args);
256
256
  }
257
257
  }
258
258
  }
259
- function printWarning(level, format, args) {
259
+ function printWarning(level, format2, args) {
260
260
  {
261
261
  var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
262
262
  var stack = ReactDebugCurrentFrame2.getStackAddendum();
263
263
  if (stack !== "") {
264
- format += "%s";
264
+ format2 += "%s";
265
265
  args = args.concat([stack]);
266
266
  }
267
267
  var argsWithFormat = args.map(function(item) {
268
268
  return String(item);
269
269
  });
270
- argsWithFormat.unshift("Warning: " + format);
270
+ argsWithFormat.unshift("Warning: " + format2);
271
271
  Function.prototype.apply.call(console[level], console, argsWithFormat);
272
272
  }
273
273
  }
@@ -1396,8 +1396,7 @@
1396
1396
  };
1397
1397
  var _phone_dialCode, _phone_phoneNumber;
1398
1398
  var getFullPhone = function(phone) {
1399
- var _phone, _phone1;
1400
- return ((_phone_dialCode = (_phone = phone) === null || _phone === void 0 ? void 0 : _phone.dialCode) !== null && _phone_dialCode !== void 0 ? _phone_dialCode : "") + ((_phone_phoneNumber = (_phone1 = phone) === null || _phone1 === void 0 ? void 0 : _phone1.phoneNumber) !== null && _phone_phoneNumber !== void 0 ? _phone_phoneNumber : "");
1399
+ return ((_phone_dialCode = phone === null || phone === void 0 ? void 0 : phone.dialCode) !== null && _phone_dialCode !== void 0 ? _phone_dialCode : "") + ((_phone_phoneNumber = phone === null || phone === void 0 ? void 0 : phone.phoneNumber) !== null && _phone_phoneNumber !== void 0 ? _phone_phoneNumber : "");
1401
1400
  };
1402
1401
  var getCountryCodeFromPhone = function(phoneWithCode) {
1403
1402
  var _phoneInfo_find;
@@ -1418,10 +1417,10 @@
1418
1417
  return countryCode;
1419
1418
  };
1420
1419
  var getPhoneObjFromString = function(fullPhone, countryCode) {
1421
- var _findCountryByCode, _dialCode;
1420
+ var _findCountryByCode;
1422
1421
  var newCountryCode = countryCode !== null && countryCode !== void 0 ? countryCode : getCountryCodeFromPhone(fullPhone);
1423
1422
  var dialCode = (_findCountryByCode = findCountryByCode(newCountryCode)) === null || _findCountryByCode === void 0 ? void 0 : _findCountryByCode.dialCode;
1424
- var phoneNumber = fullPhone.slice((_dialCode = dialCode) === null || _dialCode === void 0 ? void 0 : _dialCode.length);
1423
+ var phoneNumber = fullPhone.slice(dialCode === null || dialCode === void 0 ? void 0 : dialCode.length);
1425
1424
  return {
1426
1425
  dialCode,
1427
1426
  phoneNumber,
@@ -1508,16 +1507,14 @@
1508
1507
  theme: commonTheme
1509
1508
  });
1510
1509
  var useTheme = function(componentName, styles2, tweakStyles, options) {
1511
- var _components;
1512
1510
  var theme = React.useContext(ThemeContext).theme;
1513
1511
  var components = theme.components;
1514
1512
  var _components_componentName;
1515
1513
  var newStyles = React.useMemo(function() {
1516
- var _components2;
1517
- return lodash.merge({}, styles2, (_components_componentName = (_components2 = components) === null || _components2 === void 0 ? void 0 : _components2[componentName]) !== null && _components_componentName !== void 0 ? _components_componentName : {}, tweakStyles);
1514
+ return lodash.merge({}, styles2, (_components_componentName = components === null || components === void 0 ? void 0 : components[componentName]) !== null && _components_componentName !== void 0 ? _components_componentName : {}, tweakStyles);
1518
1515
  }, [
1519
1516
  styles2,
1520
- (_components = components) === null || _components === void 0 ? void 0 : _components[componentName],
1517
+ components === null || components === void 0 ? void 0 : components[componentName],
1521
1518
  tweakStyles
1522
1519
  ]);
1523
1520
  return {
@@ -1554,19 +1551,21 @@
1554
1551
  return target;
1555
1552
  }
1556
1553
  function useMounted() {
1557
- const mounted = React.useRef(true);
1558
- const isMounted = React.useRef(() => mounted.current);
1559
- React.useEffect(() => {
1554
+ var mounted = React.useRef(true);
1555
+ var isMounted = React.useRef(function() {
1556
+ return mounted.current;
1557
+ });
1558
+ React.useEffect(function() {
1560
1559
  mounted.current = true;
1561
- return () => {
1560
+ return function() {
1562
1561
  mounted.current = false;
1563
1562
  };
1564
1563
  }, []);
1565
1564
  return isMounted.current;
1566
1565
  }
1567
1566
  function useSafeState(state) {
1568
- const isMounted = useMounted();
1569
- return [state[0], React.useCallback((nextState) => {
1567
+ var isMounted = useMounted();
1568
+ return [state[0], React.useCallback(function(nextState) {
1570
1569
  if (!isMounted())
1571
1570
  return;
1572
1571
  return state[1](nextState);
@@ -1850,7 +1849,15 @@
1850
1849
  return;
1851
1850
  }
1852
1851
  }
1852
+ if (process.env.NODE_ENV !== "production") {
1853
+ if (!isHTMLElement(arrowElement)) {
1854
+ console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "));
1855
+ }
1856
+ }
1853
1857
  if (!contains(state.elements.popper, arrowElement)) {
1858
+ if (process.env.NODE_ENV !== "production") {
1859
+ console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
1860
+ }
1854
1861
  return;
1855
1862
  }
1856
1863
  state.elements.arrow = arrowElement;
@@ -1951,6 +1958,14 @@
1951
1958
  function computeStyles(_ref5) {
1952
1959
  var state = _ref5.state, options = _ref5.options;
1953
1960
  var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
1961
+ if (process.env.NODE_ENV !== "production") {
1962
+ var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || "";
1963
+ if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) {
1964
+ return transitionProperty.indexOf(property) >= 0;
1965
+ })) {
1966
+ console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
1967
+ }
1968
+ }
1954
1969
  var commonStyles = {
1955
1970
  placement: getBasePlacement(state.placement),
1956
1971
  variation: getVariation(state.placement),
@@ -2279,6 +2294,9 @@
2279
2294
  });
2280
2295
  if (allowedPlacements.length === 0) {
2281
2296
  allowedPlacements = placements$1;
2297
+ if (process.env.NODE_ENV !== "production") {
2298
+ console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "));
2299
+ }
2282
2300
  }
2283
2301
  var overflows = allowedPlacements.reduce(function(acc, placement2) {
2284
2302
  acc[placement2] = detectOverflow(state, {
@@ -2700,6 +2718,86 @@
2700
2718
  return pending;
2701
2719
  };
2702
2720
  }
2721
+ function format(str) {
2722
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2723
+ args[_key - 1] = arguments[_key];
2724
+ }
2725
+ return [].concat(args).reduce(function(p, c) {
2726
+ return p.replace(/%s/, c);
2727
+ }, str);
2728
+ }
2729
+ var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
2730
+ var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
2731
+ var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
2732
+ function validateModifiers(modifiers) {
2733
+ modifiers.forEach(function(modifier) {
2734
+ [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self2) {
2735
+ return self2.indexOf(value) === index;
2736
+ }).forEach(function(key) {
2737
+ switch (key) {
2738
+ case "name":
2739
+ if (typeof modifier.name !== "string") {
2740
+ console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
2741
+ }
2742
+ break;
2743
+ case "enabled":
2744
+ if (typeof modifier.enabled !== "boolean") {
2745
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"'));
2746
+ }
2747
+ break;
2748
+ case "phase":
2749
+ if (modifierPhases.indexOf(modifier.phase) < 0) {
2750
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"'));
2751
+ }
2752
+ break;
2753
+ case "fn":
2754
+ if (typeof modifier.fn !== "function") {
2755
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"'));
2756
+ }
2757
+ break;
2758
+ case "effect":
2759
+ if (modifier.effect != null && typeof modifier.effect !== "function") {
2760
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"'));
2761
+ }
2762
+ break;
2763
+ case "requires":
2764
+ if (modifier.requires != null && !Array.isArray(modifier.requires)) {
2765
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"'));
2766
+ }
2767
+ break;
2768
+ case "requiresIfExists":
2769
+ if (!Array.isArray(modifier.requiresIfExists)) {
2770
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"'));
2771
+ }
2772
+ break;
2773
+ case "options":
2774
+ case "data":
2775
+ break;
2776
+ default:
2777
+ console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
2778
+ return '"' + s + '"';
2779
+ }).join(", ") + '; but "' + key + '" was provided.');
2780
+ }
2781
+ modifier.requires && modifier.requires.forEach(function(requirement) {
2782
+ if (modifiers.find(function(mod) {
2783
+ return mod.name === requirement;
2784
+ }) == null) {
2785
+ console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
2786
+ }
2787
+ });
2788
+ });
2789
+ });
2790
+ }
2791
+ function uniqueBy(arr, fn) {
2792
+ var identifiers = /* @__PURE__ */ new Set();
2793
+ return arr.filter(function(item) {
2794
+ var identifier = fn(item);
2795
+ if (!identifiers.has(identifier)) {
2796
+ identifiers.add(identifier);
2797
+ return true;
2798
+ }
2799
+ });
2800
+ }
2703
2801
  function mergeByName(modifiers) {
2704
2802
  var merged = modifiers.reduce(function(merged2, current) {
2705
2803
  var existing = merged2[current.name];
@@ -2713,6 +2811,8 @@
2713
2811
  return merged[key];
2714
2812
  });
2715
2813
  }
2814
+ var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
2815
+ var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.";
2716
2816
  var DEFAULT_OPTIONS = {
2717
2817
  placement: "bottom",
2718
2818
  modifiers: [],
@@ -2763,6 +2863,28 @@
2763
2863
  state.orderedModifiers = orderedModifiers.filter(function(m) {
2764
2864
  return m.enabled;
2765
2865
  });
2866
+ if (process.env.NODE_ENV !== "production") {
2867
+ var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) {
2868
+ var name = _ref.name;
2869
+ return name;
2870
+ });
2871
+ validateModifiers(modifiers);
2872
+ if (getBasePlacement(state.options.placement) === auto) {
2873
+ var flipModifier = state.orderedModifiers.find(function(_ref2) {
2874
+ var name = _ref2.name;
2875
+ return name === "flip";
2876
+ });
2877
+ if (!flipModifier) {
2878
+ console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
2879
+ }
2880
+ }
2881
+ var _getComputedStyle = getComputedStyle$1(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft;
2882
+ if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) {
2883
+ return parseFloat(margin);
2884
+ })) {
2885
+ console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
2886
+ }
2887
+ }
2766
2888
  runModifierEffects();
2767
2889
  return instance.update();
2768
2890
  },
@@ -2777,6 +2899,9 @@
2777
2899
  }
2778
2900
  var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
2779
2901
  if (!areValidElements(reference3, popper3)) {
2902
+ if (process.env.NODE_ENV !== "production") {
2903
+ console.error(INVALID_ELEMENT_ERROR);
2904
+ }
2780
2905
  return;
2781
2906
  }
2782
2907
  state.rects = {
@@ -2788,7 +2913,15 @@
2788
2913
  state.orderedModifiers.forEach(function(modifier) {
2789
2914
  return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
2790
2915
  });
2916
+ var __debug_loops__ = 0;
2791
2917
  for (var index = 0; index < state.orderedModifiers.length; index++) {
2918
+ if (process.env.NODE_ENV !== "production") {
2919
+ __debug_loops__ += 1;
2920
+ if (__debug_loops__ > 100) {
2921
+ console.error(INFINITE_LOOP_ERROR);
2922
+ break;
2923
+ }
2924
+ }
2792
2925
  if (state.reset === true) {
2793
2926
  state.reset = false;
2794
2927
  index = -1;
@@ -2819,6 +2952,9 @@
2819
2952
  }
2820
2953
  };
2821
2954
  if (!areValidElements(reference2, popper2)) {
2955
+ if (process.env.NODE_ENV !== "production") {
2956
+ console.error(INVALID_ELEMENT_ERROR);
2957
+ }
2822
2958
  return instance;
2823
2959
  }
2824
2960
  instance.setOptions(options).then(function(state2) {
@@ -2827,8 +2963,8 @@
2827
2963
  }
2828
2964
  });
2829
2965
  function runModifierEffects() {
2830
- state.orderedModifiers.forEach(function(_ref) {
2831
- var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect2 = _ref.effect;
2966
+ state.orderedModifiers.forEach(function(_ref3) {
2967
+ var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect;
2832
2968
  if (typeof effect2 === "function") {
2833
2969
  var cleanupFn = effect2({
2834
2970
  state,
@@ -3093,20 +3229,17 @@
3093
3229
  }
3094
3230
  React.useEffect(function() {
3095
3231
  if (dependenciesForPositionUpdating.length !== 0) {
3096
- var _popperData;
3097
- (_popperData = popperData) === null || _popperData === void 0 ? void 0 : _popperData.update();
3232
+ popperData === null || popperData === void 0 ? void 0 : popperData.update();
3098
3233
  }
3099
3234
  }, dependenciesForPositionUpdating);
3100
3235
  return popperData;
3101
3236
  };
3102
3237
  var useTweakStyles = function() {
3103
3238
  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;
3104
- var _tweakStyles;
3105
3239
  return React.useMemo(function() {
3106
- var _tweakStyles2;
3107
- return lodash.merge({}, componentStyles[className], (_tweakStyles2 = tweakStyles) === null || _tweakStyles2 === void 0 ? void 0 : _tweakStyles2[className]);
3240
+ return lodash.merge({}, componentStyles[className], tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]);
3108
3241
  }, [
3109
- (_tweakStyles = tweakStyles) === null || _tweakStyles === void 0 ? void 0 : _tweakStyles[className]
3242
+ tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]
3110
3243
  ]);
3111
3244
  };
3112
3245
  var useDidMountEffect = function(effect2, dependencies) {
@@ -4318,10 +4451,10 @@
4318
4451
  var items = param.items, testId = param.testId, data = param.data, tweakStyles = param.tweakStyles, onClick = param.onClick;
4319
4452
  var classes = useTheme("List", styles$J, tweakStyles).classes;
4320
4453
  var handleItemClick = function(item) {
4321
- var _onClick;
4322
4454
  item.onClick();
4323
- (_onClick = onClick) === null || _onClick === void 0 ? void 0 : _onClick();
4455
+ onClick === null || onClick === void 0 ? void 0 : onClick();
4324
4456
  };
4457
+ var _item_testId;
4325
4458
  return /* @__PURE__ */ jsx("div", _object_spread_props$z(_object_spread$I({
4326
4459
  className: classes.root
4327
4460
  }, addDataTestId(testId), addDataAttributes(data)), {
@@ -4334,7 +4467,9 @@
4334
4467
  }),
4335
4468
  /* @__PURE__ */ jsxs("div", _object_spread_props$z(_object_spread$I({
4336
4469
  className: clsx(classes.item, (_obj = {}, _define_property$K(_obj, classes.disabledItem, item.disabled), _define_property$K(_obj, classes.withIconGap, item.withIconGap), _obj))
4337
- }, addDataTestId(testId, "item-".concat(idx))), {
4470
+ }, addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
4471
+ disabled: item.disabled
4472
+ })), {
4338
4473
  onClick: item.disabled ? void 0 : function() {
4339
4474
  return handleItemClick(item);
4340
4475
  },
@@ -5178,13 +5313,11 @@
5178
5313
  ];
5179
5314
  var Button = function(param) {
5180
5315
  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;
5181
- var _tweakStyles;
5182
5316
  var _useTheme = useTheme("Button", styles$D, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
5183
5317
  var tweakPreloaderStyles = React.useMemo(function() {
5184
- var _tweakStyles2;
5185
- return lodash.merge({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, (_tweakStyles2 = tweakStyles) === null || _tweakStyles2 === void 0 ? void 0 : _tweakStyles2.tweakPreloader);
5318
+ return lodash.merge({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader);
5186
5319
  }, [
5187
- (_tweakStyles = tweakStyles) === null || _tweakStyles === void 0 ? void 0 : _tweakStyles.tweakPreloader,
5320
+ tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader,
5188
5321
  size
5189
5322
  ]);
5190
5323
  var hasIcon = isNotEmpty(icon);
@@ -6108,7 +6241,7 @@
6108
6241
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
6109
6242
  return _array_like_to_array$k(o, minLen);
6110
6243
  }
6111
- function _ts_generator$5(thisArg, body) {
6244
+ var __generator$5 = globalThis && globalThis.__generator || function(thisArg, body) {
6112
6245
  var f, y, t, g, _ = {
6113
6246
  label: 0,
6114
6247
  sent: function() {
@@ -6209,7 +6342,7 @@
6209
6342
  done: true
6210
6343
  };
6211
6344
  }
6212
- }
6345
+ };
6213
6346
  var DEFAULT_SIZE = 6;
6214
6347
  var Input = /* @__PURE__ */ React.forwardRef(function(param, ref) {
6215
6348
  var _param_value = param.value, value = _param_value === void 0 ? "" : _param_value, label = param.label, placeholder = param.placeholder, _param_type = param.type, type = _param_type === void 0 ? "text" : _param_type, isDisabled = param.isDisabled, isReadonly = param.isReadonly, _param_hasFloatingLabel = param.hasFloatingLabel, hasFloatingLabel = _param_hasFloatingLabel === void 0 ? true : _param_hasFloatingLabel, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isActive = param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_isClearable = param.isClearable, isClearable = _param_isClearable === void 0 ? false : _param_isClearable, infoMessage = param.infoMessage, errorMessage = param.errorMessage, _param_errorPosition = param.errorPosition, errorPosition = _param_errorPosition === void 0 ? "bottom" : _param_errorPosition, inlineStyle = param.inlineStyle, border = param.border, isRequired = param.isRequired, isLoading = param.isLoading, isAutoSizeable = param.isAutoSizeable, _param_defaultSize = param.defaultSize, defaultSize = _param_defaultSize === void 0 ? DEFAULT_SIZE : _param_defaultSize, iconType = param.iconType, name = param.name, mask = param.mask, maskPlaceholder = param.maskPlaceholder, hasRequiredLabel = param.hasRequiredLabel, data = param.data, tweakStyles = param.tweakStyles, maxLength = param.maxLength, shouldFocusOnMount = param.shouldFocusOnMount, units = param.units, testId = param.testId, tabIndex = param.tabIndex, onChange = param.onChange, onPaste = param.onPaste, onFocus = param.onFocus, onBlur = param.onBlur, onIconClick = param.onIconClick, onKeyDown = param.onKeyDown;
@@ -6220,19 +6353,17 @@
6220
6353
  onChange(event.currentTarget.value, event);
6221
6354
  };
6222
6355
  var handleFocus = function(event) {
6223
- var _onFocus;
6224
6356
  setFocused(true);
6225
- (_onFocus = onFocus) === null || _onFocus === void 0 ? void 0 : _onFocus(event);
6357
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
6226
6358
  };
6227
6359
  var handleBlur = function(event) {
6228
- var _onBlur;
6229
6360
  setFocused(false);
6230
- (_onBlur = onBlur) === null || _onBlur === void 0 ? void 0 : _onBlur(event);
6361
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
6231
6362
  };
6232
6363
  var handleOnInputClear = function() {
6233
6364
  var _ref = _async_to_generator$5(function(event) {
6234
6365
  var _input_current, input;
6235
- return _ts_generator$5(this, function(_state) {
6366
+ return __generator$5(this, function(_state) {
6236
6367
  switch (_state.label) {
6237
6368
  case 0:
6238
6369
  return [
@@ -6823,15 +6954,14 @@
6823
6954
  return obj;
6824
6955
  }
6825
6956
  function isOptionDisabled(option) {
6826
- var _option;
6827
6957
  var _option_isDisabled;
6828
- return typeof option === "object" && option !== null && ((_option_isDisabled = (_option = option) === null || _option === void 0 ? void 0 : _option.isDisabled) !== null && _option_isDisabled !== void 0 ? _option_isDisabled : false);
6958
+ return typeof option === "object" && option !== null && ((_option_isDisabled = option === null || option === void 0 ? void 0 : option.isDisabled) !== null && _option_isDisabled !== void 0 ? _option_isDisabled : false);
6829
6959
  }
6830
6960
  var DEFAULT_OPTION_INDEX = -1;
6831
6961
  function SelectList(param) {
6832
6962
  var options = param.options, onOptionClick = param.onOptionClick, 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, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList;
6833
6963
  var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
6834
- var activeValueId = convertValueToId(activeValue);
6964
+ var activeValueId = isNotEmpty(activeValue) ? convertValueToId(activeValue) : void 0;
6835
6965
  var convertedToStringOptions = React.useMemo(function() {
6836
6966
  return options.map(convertValueToString);
6837
6967
  }, [
@@ -6896,6 +7026,17 @@
6896
7026
  })
6897
7027
  });
6898
7028
  }
7029
+ var defaultConvertFunction$2 = function(v) {
7030
+ return v === void 0 ? void 0 : String(v);
7031
+ };
7032
+ var defaultCompareFunction = function(v1, v2) {
7033
+ return v1 === v2;
7034
+ };
7035
+ var getActiveValueIndex = function(options, value, convertFunc) {
7036
+ return isNotEmpty(value) ? options.findIndex(function(o) {
7037
+ return convertFunc(o) === convertFunc(value);
7038
+ }) : -1;
7039
+ };
6899
7040
  var styles$u = {
6900
7041
  root: {
6901
7042
  width: "100%",
@@ -6955,17 +7096,6 @@
6955
7096
  },
6956
7097
  tweakSelectList: {}
6957
7098
  };
6958
- var defaultConvertFunction$2 = function(v) {
6959
- return v === void 0 ? void 0 : String(v);
6960
- };
6961
- var defaultCompareFunction = function(v1, v2) {
6962
- return v1 === v2;
6963
- };
6964
- var getActiveValueIndex = function(options, value, convertFunc) {
6965
- return options.findIndex(function(o) {
6966
- return convertFunc(o) === convertFunc(value);
6967
- });
6968
- };
6969
7099
  function _array_like_to_array$j(arr, len) {
6970
7100
  if (len == null || len > arr.length)
6971
7101
  len = arr.length;
@@ -7137,7 +7267,7 @@
7137
7267
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
7138
7268
  return _array_like_to_array$j(o, minLen);
7139
7269
  }
7140
- function _ts_generator$4(thisArg, body) {
7270
+ var __generator$4 = globalThis && globalThis.__generator || function(thisArg, body) {
7141
7271
  var f, y, t, g, _ = {
7142
7272
  label: 0,
7143
7273
  sent: function() {
@@ -7238,9 +7368,9 @@
7238
7368
  done: true
7239
7369
  };
7240
7370
  }
7241
- }
7371
+ };
7242
7372
  function Select(_param) {
7243
- var options = _param.options, value = _param.value, onChange = _param.onChange, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, defaultOptionLabel = _param.defaultOptionLabel, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, optionsFilter = _param.optionsFilter, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, inputProps = _object_without_properties$6(_param, [
7373
+ var options = _param.options, value = _param.value, onChange = _param.onChange, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, defaultOptionLabel = _param.defaultOptionLabel, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, optionsFilter = _param.optionsFilter, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, inputProps = _object_without_properties$6(_param, [
7244
7374
  "options",
7245
7375
  "value",
7246
7376
  "onChange",
@@ -7263,9 +7393,9 @@
7263
7393
  "isDisabled",
7264
7394
  "dropdownOptions",
7265
7395
  "minSymbolsCountToOpenList",
7266
- "dropdownIcon"
7396
+ "dropdownIcon",
7397
+ "shouldScrollToList"
7267
7398
  ]);
7268
- var _tweakStyles, _popperData, _popperData1, _tweakStyles1;
7269
7399
  var _useTheme = useTheme("Select", styles$u, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
7270
7400
  var isMounted = useIsMounted();
7271
7401
  var _useState = _sliced_to_array$j(React.useState(false), 2), isListOpen = _useState[0], setIsListOpen = _useState[1];
@@ -7277,15 +7407,15 @@
7277
7407
  var inputWrapper = React.useRef(null);
7278
7408
  var list = React.useRef(null);
7279
7409
  var input = React.useRef(null);
7410
+ var stringValue = isNotEmpty(value) ? convertValueToString(value) : void 0;
7280
7411
  var filteredOptions = React.useMemo(function() {
7281
- var _searchValue;
7282
7412
  if (optionsMode !== "search") {
7283
7413
  return options;
7284
7414
  }
7285
7415
  if (optionsFilter) {
7286
7416
  return optionsFilter(options, searchValue);
7287
7417
  }
7288
- var lowerCaseValue = (_searchValue = searchValue) === null || _searchValue === void 0 ? void 0 : _searchValue.toLowerCase();
7418
+ var lowerCaseValue = searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase();
7289
7419
  return options.filter(function(option) {
7290
7420
  var convertedOption = convertValueToString(option);
7291
7421
  return convertedOption !== void 0 && convertedOption.toLowerCase().includes(lowerCaseValue);
@@ -7311,7 +7441,7 @@
7311
7441
  };
7312
7442
  var handleListOpen = function() {
7313
7443
  var _ref2 = _async_to_generator$4(function() {
7314
- return _ts_generator$4(this, function(_state) {
7444
+ return __generator$4(this, function(_state) {
7315
7445
  if (isListOpen) {
7316
7446
  return [
7317
7447
  2
@@ -7363,7 +7493,7 @@
7363
7493
  ]);
7364
7494
  var handleOnType = React.useCallback(function() {
7365
7495
  var _ref2 = _async_to_generator$4(function(v) {
7366
- return _ts_generator$4(this, function(_state) {
7496
+ return __generator$4(this, function(_state) {
7367
7497
  switch (_state.label) {
7368
7498
  case 0:
7369
7499
  if (onType === void 0) {
@@ -7481,14 +7611,13 @@
7481
7611
  var _inputProps_isReadonly = inputProps.isReadonly, isReadonly = _inputProps_isReadonly === void 0 ? true : _inputProps_isReadonly;
7482
7612
  var shouldUsePointerCursor = optionsMode === "normal" && isReadonly;
7483
7613
  var tweakInputStyles = React.useMemo(function() {
7484
- var _tweakStyles2;
7485
7614
  return lodash.merge({}, componentStyles.tweakInput, _object_spread$v({}, shouldUsePointerCursor ? {
7486
7615
  input: {
7487
7616
  cursor: "pointer"
7488
7617
  }
7489
- } : void 0), (_tweakStyles2 = tweakStyles) === null || _tweakStyles2 === void 0 ? void 0 : _tweakStyles2.tweakInput);
7618
+ } : void 0), tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakInput);
7490
7619
  }, [
7491
- (_tweakStyles = tweakStyles) === null || _tweakStyles === void 0 ? void 0 : _tweakStyles.tweakInput,
7620
+ tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakInput,
7492
7621
  shouldUsePointerCursor
7493
7622
  ]);
7494
7623
  var _ref = dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : {}, _ref_shouldUsePopper = _ref.shouldUsePopper, shouldUsePopper = _ref_shouldUsePopper === void 0 ? false : _ref_shouldUsePopper, _ref_shouldRenderInBody = _ref.shouldRenderInBody, shouldRenderInBody = _ref_shouldRenderInBody === void 0 ? false : _ref_shouldRenderInBody, _ref_shouldHideOnScroll = _ref.shouldHideOnScroll, shouldHideOnScroll = _ref_shouldHideOnScroll === void 0 ? false : _ref_shouldHideOnScroll;
@@ -7522,7 +7651,7 @@
7522
7651
  ref: inputWrapper,
7523
7652
  children: [
7524
7653
  /* @__PURE__ */ jsx(Input, _object_spread$v({
7525
- value: searchValue !== "" ? searchValue : convertValueToString(value),
7654
+ value: searchValue !== "" ? searchValue : stringValue,
7526
7655
  onChange: handleInputChange,
7527
7656
  isActive: isListOpen,
7528
7657
  isReadonly: optionsMode === "normal",
@@ -7555,8 +7684,8 @@
7555
7684
  onMouseDown: function(event) {
7556
7685
  return event.preventDefault();
7557
7686
  },
7558
- style: (_popperData = popperData) === null || _popperData === void 0 ? void 0 : _popperData.styles.popper
7559
- }, (_popperData1 = popperData) === null || _popperData1 === void 0 ? void 0 : _popperData1.attributes.popper), {
7687
+ style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper
7688
+ }, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
7560
7689
  children: isOpen && /* @__PURE__ */ jsx(SelectList, {
7561
7690
  options: filteredOptions,
7562
7691
  convertValueToString,
@@ -7569,9 +7698,9 @@
7569
7698
  activeValue: value,
7570
7699
  isLoading: inputProps.isLoading,
7571
7700
  loadingLabel,
7572
- tweakStyles: (_tweakStyles1 = tweakStyles) === null || _tweakStyles1 === void 0 ? void 0 : _tweakStyles1.tweakSelectList,
7701
+ tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
7573
7702
  testId: testId !== void 0 ? "".concat(testId, "-list") : void 0,
7574
- shouldScrollToList: !shouldUsePopper && !shouldHideOnScroll
7703
+ shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll
7575
7704
  })
7576
7705
  }))
7577
7706
  })
@@ -8874,7 +9003,7 @@
8874
9003
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
8875
9004
  return _array_like_to_array$g(o, minLen);
8876
9005
  }
8877
- function _ts_generator$3(thisArg, body) {
9006
+ var __generator$3 = globalThis && globalThis.__generator || function(thisArg, body) {
8878
9007
  var f, y, t, g, _ = {
8879
9008
  label: 0,
8880
9009
  sent: function() {
@@ -8975,7 +9104,7 @@
8975
9104
  done: true
8976
9105
  };
8977
9106
  }
8978
- }
9107
+ };
8979
9108
  var defaultConvertFunction$1 = function(val) {
8980
9109
  return String(val);
8981
9110
  };
@@ -9002,8 +9131,8 @@
9002
9131
  var hasFooter = isNotEmpty(footer);
9003
9132
  var handleSearchInputChange = React.useCallback(function() {
9004
9133
  var _ref = _async_to_generator$3(function(inputValue) {
9005
- var _inputValue, _inputValue_trim, response;
9006
- return _ts_generator$3(this, function(_state) {
9134
+ var _inputValue_trim, response;
9135
+ return __generator$3(this, function(_state) {
9007
9136
  switch (_state.label) {
9008
9137
  case 0:
9009
9138
  if (fetchOptions === void 0) {
@@ -9022,7 +9151,7 @@
9022
9151
  ]);
9023
9152
  return [
9024
9153
  4,
9025
- fetchOptions((_inputValue_trim = (_inputValue = inputValue) === null || _inputValue === void 0 ? void 0 : _inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
9154
+ fetchOptions((_inputValue_trim = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
9026
9155
  ];
9027
9156
  case 2:
9028
9157
  response = _state.sent();
@@ -9082,8 +9211,8 @@
9082
9211
  };
9083
9212
  var handleLoadItemsOnScroll = React.useCallback(function() {
9084
9213
  var _ref = _async_to_generator$3(function(inputValue, page) {
9085
- var _inputValue, _inputValue_trim, response;
9086
- return _ts_generator$3(this, function(_state) {
9214
+ var _inputValue_trim, response;
9215
+ return __generator$3(this, function(_state) {
9087
9216
  switch (_state.label) {
9088
9217
  case 0:
9089
9218
  if (fetchOptions === void 0) {
@@ -9102,7 +9231,7 @@
9102
9231
  ]);
9103
9232
  return [
9104
9233
  4,
9105
- fetchOptions((_inputValue_trim = (_inputValue = inputValue) === null || _inputValue === void 0 ? void 0 : _inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "", page !== null && page !== void 0 ? page : 0)
9234
+ fetchOptions((_inputValue_trim = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "", page !== null && page !== void 0 ? page : 0)
9106
9235
  ];
9107
9236
  case 2:
9108
9237
  response = _state.sent();
@@ -9148,7 +9277,7 @@
9148
9277
  }
9149
9278
  observer.current = new IntersectionObserver(function() {
9150
9279
  var _ref = _async_to_generator$3(function(entries) {
9151
- return _ts_generator$3(this, function(_state) {
9280
+ return __generator$3(this, function(_state) {
9152
9281
  switch (_state.label) {
9153
9282
  case 0:
9154
9283
  if (!entries[0].isIntersecting)
@@ -9197,7 +9326,7 @@
9197
9326
  var doFetchOptions = function() {
9198
9327
  var _ref = _async_to_generator$3(function() {
9199
9328
  var response;
9200
- return _ts_generator$3(this, function(_state) {
9329
+ return __generator$3(this, function(_state) {
9201
9330
  switch (_state.label) {
9202
9331
  case 0:
9203
9332
  setIsLoading(true);
@@ -10150,7 +10279,7 @@
10150
10279
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
10151
10280
  return _array_like_to_array$e(o, minLen);
10152
10281
  }
10153
- function _ts_generator$2(thisArg, body) {
10282
+ var __generator$2 = globalThis && globalThis.__generator || function(thisArg, body) {
10154
10283
  var f, y, t, g, _ = {
10155
10284
  label: 0,
10156
10285
  sent: function() {
@@ -10251,7 +10380,7 @@
10251
10380
  done: true
10252
10381
  };
10253
10382
  }
10254
- }
10383
+ };
10255
10384
  var NumberInput = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
10256
10385
  var value = _param.value, _param_canBeFloat = _param.canBeFloat, canBeFloat = _param_canBeFloat === void 0 ? false : _param_canBeFloat, defaultValue = _param.defaultValue, _param_precision = _param.precision, precision = _param_precision === void 0 ? 3 : _param_precision, _param_intPartPrecision = _param.intPartPrecision, intPartPrecision = _param_intPartPrecision === void 0 ? 7 : _param_intPartPrecision, onChange = _param.onChange, onBlur = _param.onBlur, min2 = _param.min, max2 = _param.max, props = _object_without_properties$3(_param, [
10257
10386
  "value",
@@ -10277,7 +10406,7 @@
10277
10406
  var handleChange = function() {
10278
10407
  var _ref = _async_to_generator$2(function(inputValue, event) {
10279
10408
  var oldValue, target, _target_selectionStart, defaultCaretPos, numString, intRegexp, floatRegexp, numberRegexp, hasDot, formattedValue, newValue;
10280
- return _ts_generator$2(this, function(_state) {
10409
+ return __generator$2(this, function(_state) {
10281
10410
  switch (_state.label) {
10282
10411
  case 0:
10283
10412
  oldValue = showedValue;
@@ -10472,7 +10601,6 @@
10472
10601
  };
10473
10602
  var FilterInterval = function(param) {
10474
10603
  var data = param.data, tweakStyles = param.tweakStyles, value = param.value, labelName = param.labelName, withFieldNameInLabel = param.withFieldNameInLabel, localeKey = param.localeKey, locale2 = param.locale, canBeFloat = param.canBeFloat, onChange = param.onChange, fromInput = param.fromInput, toInput = param.toInput, testId = param.testId;
10475
- var _value, _fromInput, _fromInput1, _fromInput2, _value1, _toInput, _toInput1, _toInput2;
10476
10604
  var _useTheme = useTheme("FilterInterval", styles$l, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
10477
10605
  var translates = React.useMemo(function() {
10478
10606
  return getLocale$1(localeKey, locale2);
@@ -10484,24 +10612,22 @@
10484
10612
  onChange(void 0);
10485
10613
  };
10486
10614
  var handleFromChange = function(v) {
10487
- var _value2, _value12;
10488
- if (v === void 0 && ((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2[1]) === void 0) {
10615
+ if (v === void 0 && (value === null || value === void 0 ? void 0 : value[1]) === void 0) {
10489
10616
  onChange(void 0);
10490
10617
  return;
10491
10618
  }
10492
10619
  onChange(sortValues([
10493
10620
  v,
10494
- (_value12 = value) === null || _value12 === void 0 ? void 0 : _value12[1]
10621
+ value === null || value === void 0 ? void 0 : value[1]
10495
10622
  ]));
10496
10623
  };
10497
10624
  var handleToChange = function(v) {
10498
- var _value2, _value12;
10499
- if (v === void 0 && ((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2[0]) === void 0) {
10625
+ if (v === void 0 && (value === null || value === void 0 ? void 0 : value[0]) === void 0) {
10500
10626
  onChange(void 0);
10501
10627
  return;
10502
10628
  }
10503
10629
  onChange(sortValues([
10504
- (_value12 = value) === null || _value12 === void 0 ? void 0 : _value12[0],
10630
+ value === null || value === void 0 ? void 0 : value[0],
10505
10631
  v
10506
10632
  ]));
10507
10633
  };
@@ -10518,14 +10644,14 @@
10518
10644
  children: [
10519
10645
  /* @__PURE__ */ jsx(NumberInput, {
10520
10646
  onChange: handleFromChange,
10521
- value: (_value = value) === null || _value === void 0 ? void 0 : _value[0],
10647
+ value: value === null || value === void 0 ? void 0 : value[0],
10522
10648
  label: withFieldNameInLabel ? "".concat(labelName, " ").concat(translates.from.toLocaleLowerCase()) : translates.from,
10523
10649
  border: "bottom",
10524
10650
  canBeFloat,
10525
10651
  isClearable: true,
10526
- min: (_fromInput = fromInput) === null || _fromInput === void 0 ? void 0 : _fromInput.min,
10527
- max: (_fromInput1 = fromInput) === null || _fromInput1 === void 0 ? void 0 : _fromInput1.max,
10528
- maxLength: (_fromInput2 = fromInput) === null || _fromInput2 === void 0 ? void 0 : _fromInput2.maxLength,
10652
+ min: fromInput === null || fromInput === void 0 ? void 0 : fromInput.min,
10653
+ max: fromInput === null || fromInput === void 0 ? void 0 : fromInput.max,
10654
+ maxLength: fromInput === null || fromInput === void 0 ? void 0 : fromInput.maxLength,
10529
10655
  tweakStyles: tweakInputStyles,
10530
10656
  testId: testId !== void 0 ? "".concat(testId, "-start") : void 0
10531
10657
  }),
@@ -10543,14 +10669,14 @@
10543
10669
  children: [
10544
10670
  /* @__PURE__ */ jsx(NumberInput, {
10545
10671
  onChange: handleToChange,
10546
- value: (_value1 = value) === null || _value1 === void 0 ? void 0 : _value1[1],
10672
+ value: value === null || value === void 0 ? void 0 : value[1],
10547
10673
  label: withFieldNameInLabel ? "".concat(labelName, " ").concat(translates.to.toLocaleLowerCase()) : translates.to,
10548
10674
  border: "bottom",
10549
10675
  canBeFloat,
10550
10676
  isClearable: true,
10551
- min: (_toInput = toInput) === null || _toInput === void 0 ? void 0 : _toInput.min,
10552
- max: (_toInput1 = toInput) === null || _toInput1 === void 0 ? void 0 : _toInput1.max,
10553
- maxLength: (_toInput2 = toInput) === null || _toInput2 === void 0 ? void 0 : _toInput2.maxLength,
10677
+ min: toInput === null || toInput === void 0 ? void 0 : toInput.min,
10678
+ max: toInput === null || toInput === void 0 ? void 0 : toInput.max,
10679
+ maxLength: toInput === null || toInput === void 0 ? void 0 : toInput.maxLength,
10554
10680
  tweakStyles: tweakInputStyles,
10555
10681
  testId: testId !== void 0 ? "".concat(testId, "-end") : void 0
10556
10682
  }),
@@ -10902,7 +11028,7 @@
10902
11028
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
10903
11029
  return _array_like_to_array$d(o, minLen);
10904
11030
  }
10905
- function _ts_generator$1(thisArg, body) {
11031
+ var __generator$1 = globalThis && globalThis.__generator || function(thisArg, body) {
10906
11032
  var f, y, t, g, _ = {
10907
11033
  label: 0,
10908
11034
  sent: function() {
@@ -11003,7 +11129,7 @@
11003
11129
  done: true
11004
11130
  };
11005
11131
  }
11006
- }
11132
+ };
11007
11133
  var defaultConvertFunction = function(val) {
11008
11134
  return String(val);
11009
11135
  };
@@ -11023,7 +11149,6 @@
11023
11149
  changeSearchValue(inputValue);
11024
11150
  }
11025
11151
  };
11026
- var _value, _chosenValues;
11027
11152
  var isMounted = useIsMounted();
11028
11153
  var _useTheme = useTheme("MultiSelectList", styles$k, tweakStyles, {
11029
11154
  width
@@ -11037,10 +11162,9 @@
11037
11162
  localeKey,
11038
11163
  locale2
11039
11164
  ]);
11040
- var chosenValues = (_value = value) === null || _value === void 0 ? void 0 : _value.include;
11165
+ var chosenValues = value === null || value === void 0 ? void 0 : value.include;
11041
11166
  var chosenValuesIds = React.useMemo(function() {
11042
- var _chosenValues2;
11043
- return (_chosenValues2 = chosenValues) === null || _chosenValues2 === void 0 ? void 0 : _chosenValues2.map(getValueId);
11167
+ return chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.map(getValueId);
11044
11168
  }, [
11045
11169
  getValueId,
11046
11170
  chosenValues
@@ -11055,8 +11179,7 @@
11055
11179
  var observer = React.useRef();
11056
11180
  var unchosenOptions = React.useMemo(function() {
11057
11181
  return allOptions.filter(function(v) {
11058
- var _chosenValuesIds;
11059
- return !((_chosenValuesIds = chosenValuesIds) === null || _chosenValuesIds === void 0 ? void 0 : _chosenValuesIds.includes(getValueId(v)));
11182
+ return !(chosenValuesIds === null || chosenValuesIds === void 0 ? void 0 : chosenValuesIds.includes(getValueId(v)));
11060
11183
  });
11061
11184
  }, [
11062
11185
  getValueId,
@@ -11065,8 +11188,8 @@
11065
11188
  ]);
11066
11189
  var handleSearchInputChange = React.useCallback(function() {
11067
11190
  var _ref = _async_to_generator$1(function(inputValue) {
11068
- var _inputValue, _inputValue_trim, response;
11069
- return _ts_generator$1(this, function(_state) {
11191
+ var _inputValue_trim, response;
11192
+ return __generator$1(this, function(_state) {
11070
11193
  switch (_state.label) {
11071
11194
  case 0:
11072
11195
  if (fetchOptions === void 0) {
@@ -11085,7 +11208,7 @@
11085
11208
  ]);
11086
11209
  return [
11087
11210
  4,
11088
- fetchOptions((_inputValue_trim = (_inputValue = inputValue) === null || _inputValue === void 0 ? void 0 : _inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
11211
+ fetchOptions((_inputValue_trim = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
11089
11212
  ];
11090
11213
  case 2:
11091
11214
  response = _state.sent();
@@ -11135,11 +11258,10 @@
11135
11258
  onChange(void 0);
11136
11259
  };
11137
11260
  var onSelect = function(val) {
11138
- var _chosenValues2;
11139
11261
  var _chosenValues_filter;
11140
11262
  handleSelectValue(val.isSelected ? _to_consumable_array$2(chosenValues !== null && chosenValues !== void 0 ? chosenValues : []).concat([
11141
11263
  val.value
11142
- ]) : (_chosenValues_filter = (_chosenValues2 = chosenValues) === null || _chosenValues2 === void 0 ? void 0 : _chosenValues2.filter(function(v) {
11264
+ ]) : (_chosenValues_filter = chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.filter(function(v) {
11143
11265
  return getValueId(v) !== getValueId(val.value);
11144
11266
  })) !== null && _chosenValues_filter !== void 0 ? _chosenValues_filter : []);
11145
11267
  };
@@ -11151,9 +11273,8 @@
11151
11273
  }
11152
11274
  }
11153
11275
  if (event.code === "ArrowDown") {
11154
- var _value2;
11155
11276
  var _value_include_length;
11156
- if (keyCursorOn < unchosenOptions.length + ((_value_include_length = (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.include.length) !== null && _value_include_length !== void 0 ? _value_include_length : 0) - 1) {
11277
+ if (keyCursorOn < unchosenOptions.length + ((_value_include_length = value === null || value === void 0 ? void 0 : value.include.length) !== null && _value_include_length !== void 0 ? _value_include_length : 0) - 1) {
11157
11278
  setKeyCursorOn(keyCursorOn + 1);
11158
11279
  }
11159
11280
  }
@@ -11191,15 +11312,14 @@
11191
11312
  }
11192
11313
  };
11193
11314
  var getIsValueChosen = function(id) {
11194
- var _chosenValues2;
11195
- return (_chosenValues2 = chosenValues) === null || _chosenValues2 === void 0 ? void 0 : _chosenValues2.some(function(v) {
11315
+ return chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.some(function(v) {
11196
11316
  return getValueId(v) === id;
11197
11317
  });
11198
11318
  };
11199
11319
  var handleLoadItemsOnScroll = React.useCallback(function() {
11200
11320
  var _ref = _async_to_generator$1(function(inputValue, page) {
11201
11321
  var response;
11202
- return _ts_generator$1(this, function(_state) {
11322
+ return __generator$1(this, function(_state) {
11203
11323
  switch (_state.label) {
11204
11324
  case 0:
11205
11325
  if (fetchOptions === void 0) {
@@ -11266,7 +11386,7 @@
11266
11386
  }
11267
11387
  observer.current = new IntersectionObserver(function() {
11268
11388
  var _ref = _async_to_generator$1(function(entries) {
11269
- return _ts_generator$1(this, function(_state) {
11389
+ return __generator$1(this, function(_state) {
11270
11390
  switch (_state.label) {
11271
11391
  case 0:
11272
11392
  if (!entries[0].isIntersecting)
@@ -11315,7 +11435,7 @@
11315
11435
  var doFetchOptions = function() {
11316
11436
  var _ref = _async_to_generator$1(function() {
11317
11437
  var response;
11318
- return _ts_generator$1(this, function(_state) {
11438
+ return __generator$1(this, function(_state) {
11319
11439
  switch (_state.label) {
11320
11440
  case 0:
11321
11441
  setIsLoading(true);
@@ -11401,7 +11521,7 @@
11401
11521
  className: clsx(classes.label, classes.labelChosen, !isSearchEnabled && classes.withoutTopGap),
11402
11522
  children: translates.chosen
11403
11523
  }),
11404
- (_chosenValues = chosenValues) === null || _chosenValues === void 0 ? void 0 : _chosenValues.map(function(val) {
11524
+ chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.map(function(val) {
11405
11525
  var id = getValueId(val);
11406
11526
  var view = getValueView(val);
11407
11527
  return /* @__PURE__ */ jsx("div", {
@@ -11734,8 +11854,8 @@
11734
11854
  return function() {
11735
11855
  var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
11736
11856
  var width = options.width ? String(options.width) : args.defaultWidth;
11737
- var format = args.formats[width] || args.formats[args.defaultWidth];
11738
- return format;
11857
+ var format2 = args.formats[width] || args.formats[args.defaultWidth];
11858
+ return format2;
11739
11859
  };
11740
11860
  }
11741
11861
  var dateFormats$1 = {
@@ -11898,11 +12018,11 @@
11898
12018
  other: "P"
11899
12019
  };
11900
12020
  var formatRelative$2 = function formatRelative2(token, date, baseDate, options) {
11901
- var format = formatRelativeLocale$1[token];
11902
- if (typeof format === "function") {
11903
- return format(date, baseDate, options);
12021
+ var format2 = formatRelativeLocale$1[token];
12022
+ if (typeof format2 === "function") {
12023
+ return format2(date, baseDate, options);
11904
12024
  }
11905
- return format;
12025
+ return format2;
11906
12026
  };
11907
12027
  const formatRelative$3 = formatRelative$2;
11908
12028
  function buildLocalizeFn(args) {
@@ -12755,7 +12875,6 @@
12755
12875
  var DATE_FORMAT = "dd.MM.yyyy";
12756
12876
  var FilterWithDates = function(param) {
12757
12877
  var value = param.value, onChange = param.onChange, localeKey = param.localeKey, locale2 = param.locale, onStartBtnSubmit = param.onStartBtnSubmit, onEndBtnSubmit = param.onEndBtnSubmit, data = param.data, tweakStyles = param.tweakStyles, testId = param.testId, _param_startPickerProps = param.startPickerProps, startPickerProps = _param_startPickerProps === void 0 ? emptyPickerProps : _param_startPickerProps, _param_endPickerProps = param.endPickerProps, endPickerProps = _param_endPickerProps === void 0 ? emptyPickerProps : _param_endPickerProps, _param_isClearable = param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable;
12758
- var _value, _value1, _value2, _value3, _value4, _value5;
12759
12878
  var _useTheme = useTheme("FilterWithDates", styles$j, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
12760
12879
  var _useState = _sliced_to_array$c(React.useState(false), 2), isOpenFrom = _useState[0], setOpenFrom = _useState[1];
12761
12880
  var _useState1 = _sliced_to_array$c(React.useState(false), 2), isOpenTo = _useState1[0], setOpenTo = _useState1[1];
@@ -12775,19 +12894,17 @@
12775
12894
  var ref = React.useRef(null);
12776
12895
  var isOpenCalendar = isOpenFrom || isOpenTo;
12777
12896
  var handleFromSelected = function(val) {
12778
- var _value6;
12779
12897
  var _value_to2;
12780
12898
  onChange({
12781
12899
  from: val,
12782
- to: (_value_to2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12900
+ to: (_value_to2 = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12783
12901
  });
12784
12902
  setOpenFrom(false);
12785
12903
  };
12786
12904
  var handleToSelected = function(val) {
12787
- var _value6;
12788
12905
  var _value_from2;
12789
12906
  onChange({
12790
- from: (_value_from2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12907
+ from: (_value_from2 = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12791
12908
  to: val
12792
12909
  });
12793
12910
  setOpenTo(false);
@@ -12799,11 +12916,10 @@
12799
12916
  to: val
12800
12917
  });
12801
12918
  } else {
12802
- var _value6;
12803
12919
  var _value_to2;
12804
12920
  onChange({
12805
12921
  from: val,
12806
- to: (_value_to2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12922
+ to: (_value_to2 = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12807
12923
  });
12808
12924
  }
12809
12925
  };
@@ -12814,10 +12930,9 @@
12814
12930
  to: value.from
12815
12931
  });
12816
12932
  } else {
12817
- var _value6;
12818
12933
  var _value_from2;
12819
12934
  onChange({
12820
- from: (_value_from2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12935
+ from: (_value_from2 = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12821
12936
  to: val
12822
12937
  });
12823
12938
  }
@@ -12835,8 +12950,8 @@
12835
12950
  /* @__PURE__ */ jsx("div", {
12836
12951
  className: classes.containerItem,
12837
12952
  children: /* @__PURE__ */ jsx(DatePicker, _object_spread$j({
12838
- selectedDate: (_value_from = (_value = value) === null || _value === void 0 ? void 0 : _value.from) !== null && _value_from !== void 0 ? _value_from : null,
12839
- maxDate: (_value1 = value) === null || _value1 === void 0 ? void 0 : _value1.to,
12953
+ selectedDate: (_value_from = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from !== void 0 ? _value_from : null,
12954
+ maxDate: value === null || value === void 0 ? void 0 : value.to,
12840
12955
  label: translates.from,
12841
12956
  months: translates.months,
12842
12957
  locale: dateLocale,
@@ -12852,10 +12967,10 @@
12852
12967
  /* @__PURE__ */ jsx("div", {
12853
12968
  className: classes.containerItem,
12854
12969
  children: /* @__PURE__ */ jsx(DatePicker, _object_spread$j({
12855
- selectedDate: (_value_to = (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.to) !== null && _value_to !== void 0 ? _value_to : null,
12970
+ selectedDate: (_value_to = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to !== void 0 ? _value_to : null,
12856
12971
  label: translates.to,
12857
12972
  months: translates.months,
12858
- minDate: (_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.from,
12973
+ minDate: value === null || value === void 0 ? void 0 : value.from,
12859
12974
  locale: dateLocale,
12860
12975
  onChangeDate: handleChangeTo,
12861
12976
  topPosition,
@@ -12898,7 +13013,7 @@
12898
13013
  ref,
12899
13014
  className: classes.datepicker,
12900
13015
  children: /* @__PURE__ */ jsx(DatePicker, {
12901
- selectedDate: (_ref = isOpenFrom ? (_value4 = value) === null || _value4 === void 0 ? void 0 : _value4.from : (_value5 = value) === null || _value5 === void 0 ? void 0 : _value5.to) !== null && _ref !== void 0 ? _ref : null,
13016
+ selectedDate: (_ref = isOpenFrom ? value === null || value === void 0 ? void 0 : value.from : value === null || value === void 0 ? void 0 : value.to) !== null && _ref !== void 0 ? _ref : null,
12902
13017
  label: "",
12903
13018
  locale: dateLocale,
12904
13019
  months: translates.months,
@@ -13086,7 +13201,6 @@
13086
13201
  };
13087
13202
  var FilterWithPeriod = function(param) {
13088
13203
  var value = param.value, localeKey = param.localeKey, locale2 = param.locale, onChange = param.onChange, onClose = param.onClose, periods = param.periods, tweakStyles = param.tweakStyles, testId = param.testId;
13089
- var _value, _value1, _value2, _value3, _value4, _period;
13090
13204
  var _useTheme = useTheme("FilterWithPeriod", styles$i, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
13091
13205
  var translates = React.useMemo(function() {
13092
13206
  return getLocale$1(localeKey, locale2);
@@ -13094,13 +13208,12 @@
13094
13208
  localeKey,
13095
13209
  locale2
13096
13210
  ]);
13097
- var _useState = _sliced_to_array$b(React.useState(((_value = value) === null || _value === void 0 ? void 0 : _value.periodType) !== "CUSTOM"), 2), isPeriodPickerShown = _useState[0], setIsPeriodPickerShown = _useState[1];
13098
- var _useState1 = _sliced_to_array$b(React.useState(((_value1 = value) === null || _value1 === void 0 ? void 0 : _value1.periodType) === "CUSTOM"), 2), isDatePickerShown = _useState1[0], setIsDatePickerShown = _useState1[1];
13211
+ var _useState = _sliced_to_array$b(React.useState((value === null || value === void 0 ? void 0 : value.periodType) !== "CUSTOM"), 2), isPeriodPickerShown = _useState[0], setIsPeriodPickerShown = _useState[1];
13212
+ var _useState1 = _sliced_to_array$b(React.useState((value === null || value === void 0 ? void 0 : value.periodType) === "CUSTOM"), 2), isDatePickerShown = _useState1[0], setIsDatePickerShown = _useState1[1];
13099
13213
  var _useState2 = _sliced_to_array$b(React.useState(value), 2), period = _useState2[0], setPeriod = _useState2[1];
13100
13214
  var periodGetters = React.useMemo(function() {
13101
- var _periods;
13102
13215
  var result = _object_spread$i({}, PERIODS_GETTERS);
13103
- (_periods = periods) === null || _periods === void 0 ? void 0 : _periods.forEach(function(p) {
13216
+ periods === null || periods === void 0 ? void 0 : periods.forEach(function(p) {
13104
13217
  if (Array.isArray(p)) {
13105
13218
  result[p[0]] = p[1];
13106
13219
  }
@@ -13173,8 +13286,7 @@
13173
13286
  }
13174
13287
  };
13175
13288
  useOnClickOutside(refDatePicker, function() {
13176
- var _period2, _period1;
13177
- if (!((_period2 = period) === null || _period2 === void 0 ? void 0 : _period2.from) && !((_period1 = period) === null || _period1 === void 0 ? void 0 : _period1.to)) {
13289
+ if (!(period === null || period === void 0 ? void 0 : period.from) && !(period === null || period === void 0 ? void 0 : period.to)) {
13178
13290
  setPeriod(void 0);
13179
13291
  }
13180
13292
  setIsDatePickerShown(false);
@@ -13183,9 +13295,9 @@
13183
13295
  setPeriod(value);
13184
13296
  }, [
13185
13297
  value,
13186
- (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.from,
13187
- (_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.to,
13188
- (_value4 = value) === null || _value4 === void 0 ? void 0 : _value4.periodType
13298
+ value === null || value === void 0 ? void 0 : value.from,
13299
+ value === null || value === void 0 ? void 0 : value.to,
13300
+ value === null || value === void 0 ? void 0 : value.periodType
13189
13301
  ]);
13190
13302
  var tweakSelectStyles = useTweakStyles(componentStyles, tweakStyles, "tweakSelect");
13191
13303
  return /* @__PURE__ */ jsxs("div", {
@@ -13196,7 +13308,7 @@
13196
13308
  ref: refPeriodPicker,
13197
13309
  children: /* @__PURE__ */ jsx(FilterSelect, {
13198
13310
  options: periodsList,
13199
- value: (_period = period) === null || _period === void 0 ? void 0 : _period.periodType,
13311
+ value: period === null || period === void 0 ? void 0 : period.periodType,
13200
13312
  onChange: onPeriodChange,
13201
13313
  localeKey,
13202
13314
  locale: translates,
@@ -13579,8 +13691,7 @@
13579
13691
  }
13580
13692
  }, parentRef);
13581
13693
  React.useLayoutEffect(function() {
13582
- var _filtersPaneRef;
13583
- if (ref.current === null || filtersPaneRef === void 0 || filtersPaneRef === null || ((_filtersPaneRef = filtersPaneRef) === null || _filtersPaneRef === void 0 ? void 0 : _filtersPaneRef.current) === null) {
13694
+ if (ref.current === null || filtersPaneRef === void 0 || filtersPaneRef === null || (filtersPaneRef === null || filtersPaneRef === void 0 ? void 0 : filtersPaneRef.current) === null) {
13584
13695
  return;
13585
13696
  }
13586
13697
  var _ref_current_getBoundingClientRect = ref.current.getBoundingClientRect(), width = _ref_current_getBoundingClientRect.width, left2 = _ref_current_getBoundingClientRect.left;
@@ -13807,7 +13918,7 @@
13807
13918
  testId: testId !== void 0 ? "".concat(testId, "-search") : void 0
13808
13919
  })),
13809
13920
  filtersKeys.map(function(key, index) {
13810
- var _filter_requiredFilledFilters, _filter;
13921
+ var _filter_requiredFilledFilters;
13811
13922
  var isLast = index === filtersKeys.length - 1;
13812
13923
  var currentValue = values[key];
13813
13924
  var filter = filtersConfig[key];
@@ -13826,7 +13937,7 @@
13826
13937
  return onChangeFilters(_object_spread_props$e(_object_spread$g({}, values), _define_property$h({}, key, value)));
13827
13938
  },
13828
13939
  value: currentValue,
13829
- isDisabled: isDisabled || ((_filter = filter) === null || _filter === void 0 ? void 0 : (_filter_requiredFilledFilters = _filter.requiredFilledFilters) === null || _filter_requiredFilledFilters === void 0 ? void 0 : _filter_requiredFilledFilters.some(function(item) {
13940
+ isDisabled: isDisabled || (filter === null || filter === void 0 ? void 0 : (_filter_requiredFilledFilters = filter.requiredFilledFilters) === null || _filter_requiredFilledFilters === void 0 ? void 0 : _filter_requiredFilledFilters.some(function(item) {
13830
13941
  return !values[item];
13831
13942
  })),
13832
13943
  filtersPaneRef: ref,
@@ -19995,13 +20106,11 @@
19995
20106
  var DEFAULT_DATE_FORMAT = "dd.MM.yyyy";
19996
20107
  function TableValue(param) {
19997
20108
  var item = param.item, columnName = param.columnName, config = param.config, classes = param.classes, isFocusedRow = param.isFocusedRow, isSecond = param.isSecond, isSticky = param.isSticky, isNestedComponentExpanded = param.isNestedComponentExpanded, isRowNestedComponentExpanded = param.isRowNestedComponentExpanded, onSetNestedComponent = param.onSetNestedComponent;
19998
- var _config, _itemConfig, _itemConfig1, _itemConfig2, _itemConfig3, _itemConfig4, _itemConfig5;
19999
- var itemConfig = (_config = config) === null || _config === void 0 ? void 0 : _config[columnName];
20109
+ var itemConfig = config === null || config === void 0 ? void 0 : config[columnName];
20000
20110
  var value = item[columnName];
20001
20111
  var content = null;
20002
- if ((_itemConfig = itemConfig) === null || _itemConfig === void 0 ? void 0 : _itemConfig.component) {
20003
- var _itemConfig6;
20004
- var ValueComponent = (_itemConfig6 = itemConfig) === null || _itemConfig6 === void 0 ? void 0 : _itemConfig6.component;
20112
+ if (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.component) {
20113
+ var ValueComponent = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.component;
20005
20114
  content = /* @__PURE__ */ jsx(ValueComponent, {
20006
20115
  value,
20007
20116
  row: item,
@@ -20013,17 +20122,16 @@
20013
20122
  } else if (typeof value === "string" || typeof value === "number") {
20014
20123
  content = value;
20015
20124
  } else if (_instanceof(value, Date)) {
20016
- var _itemConfig7;
20017
- content = dateFns.format(value, ((_itemConfig7 = itemConfig) === null || _itemConfig7 === void 0 ? void 0 : _itemConfig7.dateFormat) || DEFAULT_DATE_FORMAT);
20125
+ content = dateFns.format(value, (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.dateFormat) || DEFAULT_DATE_FORMAT);
20018
20126
  }
20019
20127
  return /* @__PURE__ */ jsx("td", {
20020
20128
  className: clsx(classes.root, isSticky && classes.sticky, isSecond && classes.second),
20021
20129
  style: {
20022
- textAlign: (_itemConfig1 = itemConfig) === null || _itemConfig1 === void 0 ? void 0 : _itemConfig1.cellAlign,
20023
- position: isSticky ? "sticky" : (_itemConfig2 = itemConfig) === null || _itemConfig2 === void 0 ? void 0 : _itemConfig2.position,
20024
- right: (_itemConfig3 = itemConfig) === null || _itemConfig3 === void 0 ? void 0 : _itemConfig3.right,
20025
- left: isSticky ? 0 : (_itemConfig4 = itemConfig) === null || _itemConfig4 === void 0 ? void 0 : _itemConfig4.left,
20026
- verticalAlign: (_itemConfig5 = itemConfig) === null || _itemConfig5 === void 0 ? void 0 : _itemConfig5.cellVerticalAlign
20130
+ textAlign: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.cellAlign,
20131
+ position: isSticky ? "sticky" : itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.position,
20132
+ right: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.right,
20133
+ left: isSticky ? 0 : itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.left,
20134
+ verticalAlign: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.cellVerticalAlign
20027
20135
  },
20028
20136
  children: content
20029
20137
  }, columnName);
@@ -20140,12 +20248,11 @@
20140
20248
  }
20141
20249
  function TableRow(param) {
20142
20250
  var item = param.item, uniqueField = param.uniqueField, isFirstColumnSticky = param.isFirstColumnSticky, isActive = param.isActive, config = param.config, enabledColumns = param.enabledColumns, onRowHover = param.onRowHover, onRowClick = param.onRowClick, rowAttributes = param.rowAttributes, expandableRowComponent = param.expandableRowComponent, classes = param.classes;
20143
- var _rowAttributes;
20144
20251
  var _useState = _sliced_to_array$9(React.useState(false), 2), isFocused = _useState[0], setFocused = _useState[1];
20145
20252
  var _useState1 = _sliced_to_array$9(React.useState({
20146
20253
  isOpen: false
20147
20254
  }), 2), nestedComponent = _useState1[0], setNestedComponent = _useState1[1];
20148
- var rowData = (_rowAttributes = rowAttributes) === null || _rowAttributes === void 0 ? void 0 : _rowAttributes.reduce(function(acc, cur) {
20255
+ var rowData = rowAttributes === null || rowAttributes === void 0 ? void 0 : rowAttributes.reduce(function(acc, cur) {
20149
20256
  var val = item[cur];
20150
20257
  if (val !== void 0) {
20151
20258
  acc[cur] = String(item[cur]);
@@ -20174,8 +20281,7 @@
20174
20281
  };
20175
20282
  var handleRowClick = function() {
20176
20283
  if (uniqueField !== void 0) {
20177
- var _onRowClick;
20178
- (_onRowClick = onRowClick) === null || _onRowClick === void 0 ? void 0 : _onRowClick(item[uniqueField]);
20284
+ onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(item[uniqueField]);
20179
20285
  }
20180
20286
  if (expandableRowComponent !== void 0) {
20181
20287
  var newNestedComponent = expandableRowComponent(item, true, closeNestedComponent);
@@ -20467,7 +20573,6 @@
20467
20573
  }
20468
20574
  function FlexibleTable(param) {
20469
20575
  var data = param.data, tweakStyles = param.tweakStyles, content = param.content, headerContent = param.headerContent, config = param.config, activeRows = param.activeRows, enabledColumns = param.enabledColumns, isHorizontallyScrollable = param.isHorizontallyScrollable, isFirstColumnSticky = param.isFirstColumnSticky, infinityScrollConfig = param.infinityScrollConfig, uniqueField = param.uniqueField, onHeadClick = param.onHeadClick, onRowHover = param.onRowHover, onRowClick = param.onRowClick, refForScroll = param.refForScroll, rowAttributes = param.rowAttributes, nothingFoundContent = param.nothingFoundContent, testId = param.testId, expandableRowComponent = param.expandableRowComponent;
20470
- var _infinityScrollConfig, _infinityScrollConfig1, _infinityScrollConfig2, _infinityScrollConfig3, _infinityScrollConfig4;
20471
20576
  var classes = useTheme("FlexibleTable", styles$f, tweakStyles).classes;
20472
20577
  var observer = React.useRef();
20473
20578
  var scrollRef = React.useRef(null);
@@ -20490,9 +20595,9 @@
20490
20595
  }
20491
20596
  }
20492
20597
  }, [
20493
- (_infinityScrollConfig = infinityScrollConfig) === null || _infinityScrollConfig === void 0 ? void 0 : _infinityScrollConfig.activePage,
20494
- (_infinityScrollConfig1 = infinityScrollConfig) === null || _infinityScrollConfig1 === void 0 ? void 0 : _infinityScrollConfig1.totalPages,
20495
- (_infinityScrollConfig2 = infinityScrollConfig) === null || _infinityScrollConfig2 === void 0 ? void 0 : _infinityScrollConfig2.onInfinityScroll
20598
+ infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.activePage,
20599
+ infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.totalPages,
20600
+ infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.onInfinityScroll
20496
20601
  ]);
20497
20602
  var tableRowClasses = React.useMemo(function() {
20498
20603
  return {
@@ -20536,25 +20641,23 @@
20536
20641
  children: /* @__PURE__ */ jsx("tr", {
20537
20642
  className: clsx(classes.row, classes.headerRow),
20538
20643
  children: (enabledColumns || Object.keys(content[0])).map(function(key, idx) {
20539
- var _config, _itemConfig, _itemConfig1, _itemConfig2, _itemConfig3, _itemConfig4, _itemConfig5;
20540
- var itemConfig = (_config = config) === null || _config === void 0 ? void 0 : _config[key];
20644
+ var itemConfig = config === null || config === void 0 ? void 0 : config[key];
20541
20645
  var _itemConfig_title;
20542
- var titleContent = (_itemConfig_title = (_itemConfig = itemConfig) === null || _itemConfig === void 0 ? void 0 : _itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : "";
20543
- if (((_itemConfig1 = itemConfig) === null || _itemConfig1 === void 0 ? void 0 : _itemConfig1.titleComponent) !== void 0) {
20544
- var _itemConfig6, _headerContent;
20545
- var TitleComponent = (_itemConfig6 = itemConfig) === null || _itemConfig6 === void 0 ? void 0 : _itemConfig6.titleComponent;
20646
+ var titleContent = (_itemConfig_title = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : "";
20647
+ if ((itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleComponent) !== void 0) {
20648
+ var TitleComponent = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleComponent;
20546
20649
  titleContent = /* @__PURE__ */ jsx(TitleComponent, {
20547
- value: (_headerContent = headerContent) === null || _headerContent === void 0 ? void 0 : _headerContent[key]
20650
+ value: headerContent === null || headerContent === void 0 ? void 0 : headerContent[key]
20548
20651
  });
20549
20652
  }
20550
20653
  var _itemConfig_titleAlign;
20551
20654
  return /* @__PURE__ */ jsx("th", {
20552
20655
  className: clsx(classes.header, isFirstColumnSticky && idx === 0 && classes.headerSticky, isFirstColumnSticky && idx === 1 && classes.headerSecond),
20553
20656
  style: {
20554
- minWidth: (_itemConfig2 = itemConfig) === null || _itemConfig2 === void 0 ? void 0 : _itemConfig2.minWidth,
20555
- width: (_itemConfig3 = itemConfig) === null || _itemConfig3 === void 0 ? void 0 : _itemConfig3.width,
20556
- maxWidth: (_itemConfig4 = itemConfig) === null || _itemConfig4 === void 0 ? void 0 : _itemConfig4.maxWidth,
20557
- textAlign: (_itemConfig_titleAlign = (_itemConfig5 = itemConfig) === null || _itemConfig5 === void 0 ? void 0 : _itemConfig5.titleAlign) !== null && _itemConfig_titleAlign !== void 0 ? _itemConfig_titleAlign : "left"
20657
+ minWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.minWidth,
20658
+ width: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.width,
20659
+ maxWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.maxWidth,
20660
+ textAlign: (_itemConfig_titleAlign = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleAlign) !== null && _itemConfig_titleAlign !== void 0 ? _itemConfig_titleAlign : "left"
20558
20661
  },
20559
20662
  onClick: function() {
20560
20663
  return onHeadClick ? onHeadClick(key) : void 0;
@@ -20566,18 +20669,17 @@
20566
20669
  }),
20567
20670
  /* @__PURE__ */ jsxs("tbody", {
20568
20671
  children: [
20569
- content.length === 0 && nothingFoundContent !== void 0 && !((_infinityScrollConfig3 = infinityScrollConfig) === null || _infinityScrollConfig3 === void 0 ? void 0 : _infinityScrollConfig3.isLoading) && (((_infinityScrollConfig4 = infinityScrollConfig) === null || _infinityScrollConfig4 === void 0 ? void 0 : _infinityScrollConfig4.isLastPage) === void 0 || infinityScrollConfig.isLastPage) && /* @__PURE__ */ jsx("tr", {
20672
+ content.length === 0 && nothingFoundContent !== void 0 && !(infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.isLoading) && ((infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.isLastPage) === void 0 || infinityScrollConfig.isLastPage) && /* @__PURE__ */ jsx("tr", {
20570
20673
  children: /* @__PURE__ */ jsx("td", {
20571
20674
  colSpan: (enabledColumns || Object.keys(content[0])).length,
20572
20675
  children: nothingFoundContent
20573
20676
  })
20574
20677
  }),
20575
20678
  content.map(function(item, idx) {
20576
- var _activeRows;
20577
- return /* @__PURE__ */ jsx(TableRow$1, {
20679
+ return jsx(TableRow$1, {
20578
20680
  item,
20579
20681
  uniqueField,
20580
- isActive: (_activeRows_includes = (_activeRows = activeRows) === null || _activeRows === void 0 ? void 0 : _activeRows.includes(idx)) !== null && _activeRows_includes !== void 0 ? _activeRows_includes : false,
20682
+ isActive: (_activeRows_includes = activeRows === null || activeRows === void 0 ? void 0 : activeRows.includes(idx)) !== null && _activeRows_includes !== void 0 ? _activeRows_includes : false,
20581
20683
  isFirstColumnSticky,
20582
20684
  onRowClick,
20583
20685
  onRowHover,
@@ -21353,7 +21455,8 @@
21353
21455
  top: "100%",
21354
21456
  right: 0,
21355
21457
  marginTop: 6
21356
- }
21458
+ },
21459
+ tweakList: {}
21357
21460
  };
21358
21461
  function _array_like_to_array$6(arr, len) {
21359
21462
  if (len == null || len > arr.length)
@@ -21466,43 +21569,37 @@
21466
21569
  return _array_like_to_array$6(o, minLen);
21467
21570
  }
21468
21571
  var MoreMenu = function(param) {
21469
- var items = param.items, isDisabled = param.isDisabled, data = param.data, tweakStyles = param.tweakStyles, onMenuOpen = param.onMenuOpen, onMenuClose = param.onMenuClose, _param_hasDefaultStateBackground = param.hasDefaultStateBackground, hasDefaultStateBackground = _param_hasDefaultStateBackground === void 0 ? true : _param_hasDefaultStateBackground, testId = param.testId;
21470
- var classes = useTheme("MoreMenu", styles$c, tweakStyles).classes;
21572
+ var items = param.items, isDisabled = param.isDisabled, _param_hasDefaultStateBackground = param.hasDefaultStateBackground, hasDefaultStateBackground = _param_hasDefaultStateBackground === void 0 ? true : _param_hasDefaultStateBackground, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, onMenuOpen = param.onMenuOpen, onMenuClose = param.onMenuClose;
21573
+ var _useTheme = useTheme("MoreMenu", styles$c, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
21574
+ var tweakListStyles = useTweakStyles(componentStyles, tweakStyles, "tweakList");
21471
21575
  var _useState = _sliced_to_array$6(React.useState(false), 2), isMenuShown = _useState[0], setIsMenuShown = _useState[1];
21472
21576
  var list = React.useRef(null);
21473
21577
  var button = React.useRef(null);
21578
+ var isButtonDisabled = isDisabled || items.length === 0;
21474
21579
  var toggleMenu = function(event) {
21475
21580
  var isShown = !isMenuShown;
21476
21581
  event.stopPropagation();
21477
21582
  setIsMenuShown(isShown);
21478
21583
  if (isShown) {
21479
- if (onMenuOpen !== void 0) {
21480
- onMenuOpen();
21481
- }
21584
+ onMenuOpen === null || onMenuOpen === void 0 ? void 0 : onMenuOpen();
21482
21585
  } else {
21483
- if (onMenuClose !== void 0) {
21484
- onMenuClose();
21485
- }
21586
+ onMenuClose === null || onMenuClose === void 0 ? void 0 : onMenuClose();
21486
21587
  }
21487
21588
  };
21488
21589
  var handleCloseMenu = function() {
21489
21590
  setIsMenuShown(false);
21490
- if (onMenuClose !== void 0) {
21491
- onMenuClose();
21492
- }
21591
+ onMenuClose === null || onMenuClose === void 0 ? void 0 : onMenuClose();
21493
21592
  };
21494
21593
  useOnClickOutsideWithRef(list, handleCloseMenu, button);
21495
- var isButtonDisabled = isDisabled || items.length === 0;
21496
21594
  var _obj;
21497
21595
  return /* @__PURE__ */ jsxs("div", {
21498
21596
  className: classes.root,
21499
21597
  children: [
21500
21598
  /* @__PURE__ */ jsx("button", _object_spread_props$9(_object_spread$b({
21501
- className: clsx(classes.button, (_obj = {}, _define_property$c(_obj, classes.hasCircle, hasDefaultStateBackground), _define_property$c(_obj, classes.disabled, isButtonDisabled), _define_property$c(_obj, classes.active, isMenuShown), _obj)),
21502
- onClick: !isButtonDisabled ? toggleMenu : void 0,
21503
21599
  ref: button,
21504
- "data-testid": testId
21505
- }, addDataAttributes(data)), {
21600
+ className: clsx(classes.button, (_obj = {}, _define_property$c(_obj, classes.hasCircle, hasDefaultStateBackground), _define_property$c(_obj, classes.disabled, isButtonDisabled), _define_property$c(_obj, classes.active, isMenuShown), _obj))
21601
+ }, addDataTestId(testId), addDataAttributes(data)), {
21602
+ onClick: !isButtonDisabled ? toggleMenu : void 0,
21506
21603
  children: /* @__PURE__ */ jsx("div", {
21507
21604
  className: classes.icon,
21508
21605
  children: /* @__PURE__ */ jsx(Icon, {
@@ -21515,8 +21612,9 @@
21515
21612
  ref: list,
21516
21613
  children: /* @__PURE__ */ jsx(List, {
21517
21614
  items,
21518
- onClick: handleCloseMenu,
21519
- testId: testId !== void 0 ? "".concat(testId, "-list") : void 0
21615
+ testId: getTestId(testId, "list"),
21616
+ tweakStyles: tweakListStyles,
21617
+ onClick: handleCloseMenu
21520
21618
  })
21521
21619
  })
21522
21620
  ]
@@ -21590,9 +21688,8 @@
21590
21688
  };
21591
21689
  function MultiSelectInput(param) {
21592
21690
  var v = param.value, isOpen = param.isOpen, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "" : _param_placeholder, onToggle = param.onToggle;
21593
- var _v;
21594
21691
  var classes = useTheme("MultiSelectInput", styles$b).classes;
21595
- var value = (_v = v) === null || _v === void 0 ? void 0 : _v.include;
21692
+ var value = v === null || v === void 0 ? void 0 : v.include;
21596
21693
  return /* @__PURE__ */ jsxs("div", {
21597
21694
  className: classes.root,
21598
21695
  onClick: function() {
@@ -22157,7 +22254,6 @@
22157
22254
  value
22158
22255
  ]);
22159
22256
  var handleChange = function(str, event) {
22160
- var _event;
22161
22257
  var mappedValue = str.split("").map(function(symbol) {
22162
22258
  return regex.test(symbol) ? symbol : transformCaseSensitive(smartType, smartType !== "email" ? CharactersMap : _object_spread_props$7(_object_spread$9({}, CharactersMap), {
22163
22259
  '"': "@"
@@ -22165,7 +22261,7 @@
22165
22261
  }).filter(function(symbol) {
22166
22262
  return regex.test(symbol);
22167
22263
  }).join("");
22168
- var domElement = (_event = event) === null || _event === void 0 ? void 0 : _event.currentTarget;
22264
+ var domElement = event === null || event === void 0 ? void 0 : event.currentTarget;
22169
22265
  if (domElement) {
22170
22266
  if (!input) {
22171
22267
  setInput(domElement);
@@ -22180,7 +22276,6 @@
22180
22276
  }
22181
22277
  };
22182
22278
  var handlePaste = function(event) {
22183
- var _currentValue, _currentValue1;
22184
22279
  var str = event.clipboardData.getData("text/plain").split("").join("");
22185
22280
  var domElement = event.currentTarget;
22186
22281
  if (!input) {
@@ -22201,7 +22296,7 @@
22201
22296
  var validMappedValueLength = mappedValue.length - (newValueLength - maxLength);
22202
22297
  mappedValue = mappedValue.substring(0, validMappedValueLength);
22203
22298
  }
22204
- var newValue = getUpperCaseIfNeeded("".concat((_currentValue = currentValue) === null || _currentValue === void 0 ? void 0 : _currentValue.substring(0, selectionStart)).concat(mappedValue).concat((_currentValue1 = currentValue) === null || _currentValue1 === void 0 ? void 0 : _currentValue1.substring(selectionEnd)));
22299
+ var newValue = getUpperCaseIfNeeded("".concat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.substring(0, selectionStart)).concat(mappedValue).concat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.substring(selectionEnd)));
22205
22300
  setCaretPosition2(selectionStart + mappedValue.length);
22206
22301
  setCurrentValue(newValue);
22207
22302
  onChange(newValue);
@@ -25359,8 +25454,7 @@
25359
25454
  var phoneWithCode = getFullPhone(value);
25360
25455
  var _value_countryCode;
25361
25456
  var countryCode = React.useMemo(function() {
25362
- var _value;
25363
- return (_value_countryCode = (_value = value) === null || _value === void 0 ? void 0 : _value.countryCode) !== null && _value_countryCode !== void 0 ? _value_countryCode : getCountryCodeFromPhone(phoneWithCode);
25457
+ return (_value_countryCode = value === null || value === void 0 ? void 0 : value.countryCode) !== null && _value_countryCode !== void 0 ? _value_countryCode : getCountryCodeFromPhone(phoneWithCode);
25364
25458
  }, [
25365
25459
  value.dialCode,
25366
25460
  value.phoneNumber
@@ -25390,7 +25484,6 @@
25390
25484
  }
25391
25485
  };
25392
25486
  var handleSelect = function(newPhoneInfo, event) {
25393
- var _inputRef;
25394
25487
  if (newPhoneInfo.countryCode !== countryCode) {
25395
25488
  onChange({
25396
25489
  phoneNumber: "",
@@ -25399,7 +25492,7 @@
25399
25492
  }, event);
25400
25493
  }
25401
25494
  handleClose();
25402
- var input = (_inputRef = inputRef) === null || _inputRef === void 0 ? void 0 : _inputRef.current;
25495
+ var input = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
25403
25496
  if (input !== null) {
25404
25497
  input.focus();
25405
25498
  }
@@ -25407,15 +25500,13 @@
25407
25500
  var handleFocus = function(event) {
25408
25501
  setFocused(true);
25409
25502
  if (inputProps.onFocus !== void 0) {
25410
- var _inputProps;
25411
- (_inputProps = inputProps) === null || _inputProps === void 0 ? void 0 : _inputProps.onFocus(event);
25503
+ inputProps === null || inputProps === void 0 ? void 0 : inputProps.onFocus(event);
25412
25504
  }
25413
25505
  };
25414
25506
  var handleBlur = function(event) {
25415
25507
  setFocused(false);
25416
25508
  if (inputProps.onBlur !== void 0) {
25417
- var _inputProps;
25418
- (_inputProps = inputProps) === null || _inputProps === void 0 ? void 0 : _inputProps.onBlur(event);
25509
+ inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur(event);
25419
25510
  }
25420
25511
  };
25421
25512
  useOnClickOutsideWithRef(list, handleClose, inputWrapper);
@@ -26670,7 +26761,7 @@
26670
26761
  }
26671
26762
  return target;
26672
26763
  }
26673
- function _ts_generator(thisArg, body) {
26764
+ var __generator = globalThis && globalThis.__generator || function(thisArg, body) {
26674
26765
  var f, y, t, g, _ = {
26675
26766
  label: 0,
26676
26767
  sent: function() {
@@ -26771,7 +26862,7 @@
26771
26862
  done: true
26772
26863
  };
26773
26864
  }
26774
- }
26865
+ };
26775
26866
  var DEFAULT_TIMEOUT = 7 * 1e3;
26776
26867
  var Toaster = function(param) {
26777
26868
  var title = param.title, _param_type = param.type, type = _param_type === void 0 ? "error" : _param_type, text = param.text, _param_timeout = param.timeout, timeout = _param_timeout === void 0 ? DEFAULT_TIMEOUT : _param_timeout, data = param.data, tweakStyles = param.tweakStyles, _param_hasCloseButton = param.hasCloseButton, hasCloseButton = _param_hasCloseButton === void 0 ? false : _param_hasCloseButton, _param_shouldCloseOnClick = param.shouldCloseOnClick, shouldCloseOnClick = _param_shouldCloseOnClick === void 0 ? false : _param_shouldCloseOnClick, children = param.children, onClose = param.onClose, onTimeEnd = param.onTimeEnd;
@@ -26783,7 +26874,7 @@
26783
26874
  }
26784
26875
  var disappear = function() {
26785
26876
  var _ref = _async_to_generator(function() {
26786
- return _ts_generator(this, function(_state) {
26877
+ return __generator(this, function(_state) {
26787
26878
  switch (_state.label) {
26788
26879
  case 0:
26789
26880
  return [