@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.
@@ -6,7 +6,7 @@ import { createUseStyles } from "react-jss";
6
6
  import { merge } from "lodash";
7
7
  import InputMask from "react-input-mask";
8
8
  import ReactDatepicker from "react-datepicker";
9
- import { getYear, getMonth, format, isValid, parse, isAfter, isBefore, startOfMonth, endOfMonth, sub, startOfYear, endOfYear } from "date-fns";
9
+ import { getYear, getMonth, format as format$1, isValid, parse, isAfter, isBefore, startOfMonth, endOfMonth, sub, startOfYear, endOfYear } from "date-fns";
10
10
  import { Portal } from "react-overlays";
11
11
  import scrollIntoViewIfNeeded from "scroll-into-view-if-needed";
12
12
  import { debounce as debounce$1 } from "ts-debounce";
@@ -1406,8 +1406,7 @@ var checkSearchStringInCountry = function(country, searchString) {
1406
1406
  };
1407
1407
  var _phone_dialCode, _phone_phoneNumber;
1408
1408
  var getFullPhone = function(phone) {
1409
- var _phone, _phone1;
1410
- 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 : "");
1409
+ 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 : "");
1411
1410
  };
1412
1411
  var getCountryCodeFromPhone = function(phoneWithCode) {
1413
1412
  var _phoneInfo_find;
@@ -1428,10 +1427,10 @@ var getCountryCodeFromPhone = function(phoneWithCode) {
1428
1427
  return countryCode;
1429
1428
  };
1430
1429
  var getPhoneObjFromString = function(fullPhone, countryCode) {
1431
- var _findCountryByCode, _dialCode;
1430
+ var _findCountryByCode;
1432
1431
  var newCountryCode = countryCode !== null && countryCode !== void 0 ? countryCode : getCountryCodeFromPhone(fullPhone);
1433
1432
  var dialCode = (_findCountryByCode = findCountryByCode(newCountryCode)) === null || _findCountryByCode === void 0 ? void 0 : _findCountryByCode.dialCode;
1434
- var phoneNumber = fullPhone.slice((_dialCode = dialCode) === null || _dialCode === void 0 ? void 0 : _dialCode.length);
1433
+ var phoneNumber = fullPhone.slice(dialCode === null || dialCode === void 0 ? void 0 : dialCode.length);
1435
1434
  return {
1436
1435
  dialCode,
1437
1436
  phoneNumber,
@@ -1518,16 +1517,14 @@ var ThemeContext = createContext({
1518
1517
  theme: commonTheme
1519
1518
  });
1520
1519
  var useTheme = function(componentName, styles2, tweakStyles, options) {
1521
- var _components;
1522
1520
  var theme = useContext(ThemeContext).theme;
1523
1521
  var components = theme.components;
1524
1522
  var _components_componentName;
1525
1523
  var newStyles = useMemo(function() {
1526
- var _components2;
1527
- return merge({}, styles2, (_components_componentName = (_components2 = components) === null || _components2 === void 0 ? void 0 : _components2[componentName]) !== null && _components_componentName !== void 0 ? _components_componentName : {}, tweakStyles);
1524
+ return merge({}, styles2, (_components_componentName = components === null || components === void 0 ? void 0 : components[componentName]) !== null && _components_componentName !== void 0 ? _components_componentName : {}, tweakStyles);
1528
1525
  }, [
1529
1526
  styles2,
1530
- (_components = components) === null || _components === void 0 ? void 0 : _components[componentName],
1527
+ components === null || components === void 0 ? void 0 : components[componentName],
1531
1528
  tweakStyles
1532
1529
  ]);
1533
1530
  return {
@@ -1564,19 +1561,21 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
1564
1561
  return target;
1565
1562
  }
1566
1563
  function useMounted() {
1567
- const mounted = useRef(true);
1568
- const isMounted = useRef(() => mounted.current);
1569
- useEffect(() => {
1564
+ var mounted = useRef(true);
1565
+ var isMounted = useRef(function() {
1566
+ return mounted.current;
1567
+ });
1568
+ useEffect(function() {
1570
1569
  mounted.current = true;
1571
- return () => {
1570
+ return function() {
1572
1571
  mounted.current = false;
1573
1572
  };
1574
1573
  }, []);
1575
1574
  return isMounted.current;
1576
1575
  }
1577
1576
  function useSafeState(state) {
1578
- const isMounted = useMounted();
1579
- return [state[0], useCallback((nextState) => {
1577
+ var isMounted = useMounted();
1578
+ return [state[0], useCallback(function(nextState) {
1580
1579
  if (!isMounted())
1581
1580
  return;
1582
1581
  return state[1](nextState);
@@ -1860,7 +1859,15 @@ function effect$1(_ref2) {
1860
1859
  return;
1861
1860
  }
1862
1861
  }
1862
+ if (process.env.NODE_ENV !== "production") {
1863
+ if (!isHTMLElement(arrowElement)) {
1864
+ 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(" "));
1865
+ }
1866
+ }
1863
1867
  if (!contains(state.elements.popper, arrowElement)) {
1868
+ if (process.env.NODE_ENV !== "production") {
1869
+ console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
1870
+ }
1864
1871
  return;
1865
1872
  }
1866
1873
  state.elements.arrow = arrowElement;
@@ -1961,6 +1968,14 @@ function mapToStyles(_ref2) {
1961
1968
  function computeStyles(_ref5) {
1962
1969
  var state = _ref5.state, options = _ref5.options;
1963
1970
  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;
1971
+ if (process.env.NODE_ENV !== "production") {
1972
+ var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || "";
1973
+ if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) {
1974
+ return transitionProperty.indexOf(property) >= 0;
1975
+ })) {
1976
+ 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(" "));
1977
+ }
1978
+ }
1964
1979
  var commonStyles = {
1965
1980
  placement: getBasePlacement(state.placement),
1966
1981
  variation: getVariation(state.placement),
@@ -2289,6 +2304,9 @@ function computeAutoPlacement(state, options) {
2289
2304
  });
2290
2305
  if (allowedPlacements.length === 0) {
2291
2306
  allowedPlacements = placements$1;
2307
+ if (process.env.NODE_ENV !== "production") {
2308
+ 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(" "));
2309
+ }
2292
2310
  }
2293
2311
  var overflows = allowedPlacements.reduce(function(acc, placement2) {
2294
2312
  acc[placement2] = detectOverflow(state, {
@@ -2710,6 +2728,86 @@ function debounce(fn3) {
2710
2728
  return pending;
2711
2729
  };
2712
2730
  }
2731
+ function format(str) {
2732
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2733
+ args[_key - 1] = arguments[_key];
2734
+ }
2735
+ return [].concat(args).reduce(function(p, c) {
2736
+ return p.replace(/%s/, c);
2737
+ }, str);
2738
+ }
2739
+ var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
2740
+ var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
2741
+ var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
2742
+ function validateModifiers(modifiers) {
2743
+ modifiers.forEach(function(modifier) {
2744
+ [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) {
2745
+ return self.indexOf(value) === index;
2746
+ }).forEach(function(key) {
2747
+ switch (key) {
2748
+ case "name":
2749
+ if (typeof modifier.name !== "string") {
2750
+ console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
2751
+ }
2752
+ break;
2753
+ case "enabled":
2754
+ if (typeof modifier.enabled !== "boolean") {
2755
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"'));
2756
+ }
2757
+ break;
2758
+ case "phase":
2759
+ if (modifierPhases.indexOf(modifier.phase) < 0) {
2760
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"'));
2761
+ }
2762
+ break;
2763
+ case "fn":
2764
+ if (typeof modifier.fn !== "function") {
2765
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"'));
2766
+ }
2767
+ break;
2768
+ case "effect":
2769
+ if (modifier.effect != null && typeof modifier.effect !== "function") {
2770
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"'));
2771
+ }
2772
+ break;
2773
+ case "requires":
2774
+ if (modifier.requires != null && !Array.isArray(modifier.requires)) {
2775
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"'));
2776
+ }
2777
+ break;
2778
+ case "requiresIfExists":
2779
+ if (!Array.isArray(modifier.requiresIfExists)) {
2780
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"'));
2781
+ }
2782
+ break;
2783
+ case "options":
2784
+ case "data":
2785
+ break;
2786
+ default:
2787
+ console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
2788
+ return '"' + s + '"';
2789
+ }).join(", ") + '; but "' + key + '" was provided.');
2790
+ }
2791
+ modifier.requires && modifier.requires.forEach(function(requirement) {
2792
+ if (modifiers.find(function(mod) {
2793
+ return mod.name === requirement;
2794
+ }) == null) {
2795
+ console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
2796
+ }
2797
+ });
2798
+ });
2799
+ });
2800
+ }
2801
+ function uniqueBy(arr, fn3) {
2802
+ var identifiers = /* @__PURE__ */ new Set();
2803
+ return arr.filter(function(item) {
2804
+ var identifier = fn3(item);
2805
+ if (!identifiers.has(identifier)) {
2806
+ identifiers.add(identifier);
2807
+ return true;
2808
+ }
2809
+ });
2810
+ }
2713
2811
  function mergeByName(modifiers) {
2714
2812
  var merged = modifiers.reduce(function(merged2, current) {
2715
2813
  var existing = merged2[current.name];
@@ -2723,6 +2821,8 @@ function mergeByName(modifiers) {
2723
2821
  return merged[key];
2724
2822
  });
2725
2823
  }
2824
+ var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
2825
+ 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.";
2726
2826
  var DEFAULT_OPTIONS = {
2727
2827
  placement: "bottom",
2728
2828
  modifiers: [],
@@ -2773,6 +2873,28 @@ function popperGenerator(generatorOptions) {
2773
2873
  state.orderedModifiers = orderedModifiers.filter(function(m) {
2774
2874
  return m.enabled;
2775
2875
  });
2876
+ if (process.env.NODE_ENV !== "production") {
2877
+ var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) {
2878
+ var name = _ref.name;
2879
+ return name;
2880
+ });
2881
+ validateModifiers(modifiers);
2882
+ if (getBasePlacement(state.options.placement) === auto) {
2883
+ var flipModifier = state.orderedModifiers.find(function(_ref2) {
2884
+ var name = _ref2.name;
2885
+ return name === "flip";
2886
+ });
2887
+ if (!flipModifier) {
2888
+ console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
2889
+ }
2890
+ }
2891
+ var _getComputedStyle = getComputedStyle$1(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft;
2892
+ if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) {
2893
+ return parseFloat(margin);
2894
+ })) {
2895
+ 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(" "));
2896
+ }
2897
+ }
2776
2898
  runModifierEffects();
2777
2899
  return instance.update();
2778
2900
  },
@@ -2787,6 +2909,9 @@ function popperGenerator(generatorOptions) {
2787
2909
  }
2788
2910
  var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
2789
2911
  if (!areValidElements(reference3, popper3)) {
2912
+ if (process.env.NODE_ENV !== "production") {
2913
+ console.error(INVALID_ELEMENT_ERROR);
2914
+ }
2790
2915
  return;
2791
2916
  }
2792
2917
  state.rects = {
@@ -2798,7 +2923,15 @@ function popperGenerator(generatorOptions) {
2798
2923
  state.orderedModifiers.forEach(function(modifier) {
2799
2924
  return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
2800
2925
  });
2926
+ var __debug_loops__ = 0;
2801
2927
  for (var index = 0; index < state.orderedModifiers.length; index++) {
2928
+ if (process.env.NODE_ENV !== "production") {
2929
+ __debug_loops__ += 1;
2930
+ if (__debug_loops__ > 100) {
2931
+ console.error(INFINITE_LOOP_ERROR);
2932
+ break;
2933
+ }
2934
+ }
2802
2935
  if (state.reset === true) {
2803
2936
  state.reset = false;
2804
2937
  index = -1;
@@ -2829,6 +2962,9 @@ function popperGenerator(generatorOptions) {
2829
2962
  }
2830
2963
  };
2831
2964
  if (!areValidElements(reference2, popper2)) {
2965
+ if (process.env.NODE_ENV !== "production") {
2966
+ console.error(INVALID_ELEMENT_ERROR);
2967
+ }
2832
2968
  return instance;
2833
2969
  }
2834
2970
  instance.setOptions(options).then(function(state2) {
@@ -2837,8 +2973,8 @@ function popperGenerator(generatorOptions) {
2837
2973
  }
2838
2974
  });
2839
2975
  function runModifierEffects() {
2840
- state.orderedModifiers.forEach(function(_ref) {
2841
- var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect3 = _ref.effect;
2976
+ state.orderedModifiers.forEach(function(_ref3) {
2977
+ var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect3 = _ref3.effect;
2842
2978
  if (typeof effect3 === "function") {
2843
2979
  var cleanupFn = effect3({
2844
2980
  state,
@@ -3103,20 +3239,17 @@ var useDropdown = function(param) {
3103
3239
  }
3104
3240
  useEffect(function() {
3105
3241
  if (dependenciesForPositionUpdating.length !== 0) {
3106
- var _popperData;
3107
- (_popperData = popperData) === null || _popperData === void 0 ? void 0 : _popperData.update();
3242
+ popperData === null || popperData === void 0 ? void 0 : popperData.update();
3108
3243
  }
3109
3244
  }, dependenciesForPositionUpdating);
3110
3245
  return popperData;
3111
3246
  };
3112
3247
  var useTweakStyles = function() {
3113
3248
  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;
3114
- var _tweakStyles;
3115
3249
  return useMemo(function() {
3116
- var _tweakStyles2;
3117
- return merge({}, componentStyles[className], (_tweakStyles2 = tweakStyles) === null || _tweakStyles2 === void 0 ? void 0 : _tweakStyles2[className]);
3250
+ return merge({}, componentStyles[className], tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]);
3118
3251
  }, [
3119
- (_tweakStyles = tweakStyles) === null || _tweakStyles === void 0 ? void 0 : _tweakStyles[className]
3252
+ tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles[className]
3120
3253
  ]);
3121
3254
  };
3122
3255
  var useDidMountEffect = function(effect3, dependencies) {
@@ -4328,10 +4461,10 @@ var List = function(param) {
4328
4461
  var items = param.items, testId = param.testId, data = param.data, tweakStyles = param.tweakStyles, onClick = param.onClick;
4329
4462
  var classes = useTheme("List", styles$J, tweakStyles).classes;
4330
4463
  var handleItemClick = function(item) {
4331
- var _onClick;
4332
4464
  item.onClick();
4333
- (_onClick = onClick) === null || _onClick === void 0 ? void 0 : _onClick();
4465
+ onClick === null || onClick === void 0 ? void 0 : onClick();
4334
4466
  };
4467
+ var _item_testId;
4335
4468
  return /* @__PURE__ */ jsx("div", _object_spread_props$z(_object_spread$I({
4336
4469
  className: classes.root
4337
4470
  }, addDataTestId(testId), addDataAttributes(data)), {
@@ -4344,7 +4477,9 @@ var List = function(param) {
4344
4477
  }),
4345
4478
  /* @__PURE__ */ jsxs("div", _object_spread_props$z(_object_spread$I({
4346
4479
  className: clsx(classes.item, (_obj = {}, _define_property$K(_obj, classes.disabledItem, item.disabled), _define_property$K(_obj, classes.withIconGap, item.withIconGap), _obj))
4347
- }, addDataTestId(testId, "item-".concat(idx))), {
4480
+ }, addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
4481
+ disabled: item.disabled
4482
+ })), {
4348
4483
  onClick: item.disabled ? void 0 : function() {
4349
4484
  return handleItemClick(item);
4350
4485
  },
@@ -5188,13 +5323,11 @@ var BUTTON_VIEWS = [
5188
5323
  ];
5189
5324
  var Button = function(param) {
5190
5325
  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;
5191
- var _tweakStyles;
5192
5326
  var _useTheme = useTheme("Button", styles$D, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
5193
5327
  var tweakPreloaderStyles = useMemo(function() {
5194
- var _tweakStyles2;
5195
- return merge({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, (_tweakStyles2 = tweakStyles) === null || _tweakStyles2 === void 0 ? void 0 : _tweakStyles2.tweakPreloader);
5328
+ return merge({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader);
5196
5329
  }, [
5197
- (_tweakStyles = tweakStyles) === null || _tweakStyles === void 0 ? void 0 : _tweakStyles.tweakPreloader,
5330
+ tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader,
5198
5331
  size
5199
5332
  ]);
5200
5333
  var hasIcon = isNotEmpty(icon);
@@ -6118,7 +6251,7 @@ function _unsupported_iterable_to_array$k(o, minLen) {
6118
6251
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
6119
6252
  return _array_like_to_array$k(o, minLen);
6120
6253
  }
6121
- function _ts_generator$5(thisArg, body) {
6254
+ var __generator$5 = globalThis && globalThis.__generator || function(thisArg, body) {
6122
6255
  var f, y, t, g, _ = {
6123
6256
  label: 0,
6124
6257
  sent: function() {
@@ -6219,7 +6352,7 @@ function _ts_generator$5(thisArg, body) {
6219
6352
  done: true
6220
6353
  };
6221
6354
  }
6222
- }
6355
+ };
6223
6356
  var DEFAULT_SIZE = 6;
6224
6357
  var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
6225
6358
  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;
@@ -6230,19 +6363,17 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
6230
6363
  onChange(event.currentTarget.value, event);
6231
6364
  };
6232
6365
  var handleFocus = function(event) {
6233
- var _onFocus;
6234
6366
  setFocused(true);
6235
- (_onFocus = onFocus) === null || _onFocus === void 0 ? void 0 : _onFocus(event);
6367
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
6236
6368
  };
6237
6369
  var handleBlur = function(event) {
6238
- var _onBlur;
6239
6370
  setFocused(false);
6240
- (_onBlur = onBlur) === null || _onBlur === void 0 ? void 0 : _onBlur(event);
6371
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
6241
6372
  };
6242
6373
  var handleOnInputClear = function() {
6243
6374
  var _ref = _async_to_generator$5(function(event) {
6244
6375
  var _input_current, input;
6245
- return _ts_generator$5(this, function(_state) {
6376
+ return __generator$5(this, function(_state) {
6246
6377
  switch (_state.label) {
6247
6378
  case 0:
6248
6379
  return [
@@ -6833,15 +6964,14 @@ function _define_property$x(obj, key, value) {
6833
6964
  return obj;
6834
6965
  }
6835
6966
  function isOptionDisabled(option) {
6836
- var _option;
6837
6967
  var _option_isDisabled;
6838
- 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);
6968
+ 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);
6839
6969
  }
6840
6970
  var DEFAULT_OPTION_INDEX = -1;
6841
6971
  function SelectList(param) {
6842
6972
  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;
6843
6973
  var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
6844
- var activeValueId = convertValueToId(activeValue);
6974
+ var activeValueId = isNotEmpty(activeValue) ? convertValueToId(activeValue) : void 0;
6845
6975
  var convertedToStringOptions = useMemo(function() {
6846
6976
  return options.map(convertValueToString);
6847
6977
  }, [
@@ -6906,6 +7036,17 @@ function SelectList(param) {
6906
7036
  })
6907
7037
  });
6908
7038
  }
7039
+ var defaultConvertFunction$2 = function(v) {
7040
+ return v === void 0 ? void 0 : String(v);
7041
+ };
7042
+ var defaultCompareFunction = function(v1, v2) {
7043
+ return v1 === v2;
7044
+ };
7045
+ var getActiveValueIndex = function(options, value, convertFunc) {
7046
+ return isNotEmpty(value) ? options.findIndex(function(o) {
7047
+ return convertFunc(o) === convertFunc(value);
7048
+ }) : -1;
7049
+ };
6909
7050
  var styles$u = {
6910
7051
  root: {
6911
7052
  width: "100%",
@@ -6965,17 +7106,6 @@ var styles$u = {
6965
7106
  },
6966
7107
  tweakSelectList: {}
6967
7108
  };
6968
- var defaultConvertFunction$2 = function(v) {
6969
- return v === void 0 ? void 0 : String(v);
6970
- };
6971
- var defaultCompareFunction = function(v1, v2) {
6972
- return v1 === v2;
6973
- };
6974
- var getActiveValueIndex = function(options, value, convertFunc) {
6975
- return options.findIndex(function(o) {
6976
- return convertFunc(o) === convertFunc(value);
6977
- });
6978
- };
6979
7109
  function _array_like_to_array$j(arr, len) {
6980
7110
  if (len == null || len > arr.length)
6981
7111
  len = arr.length;
@@ -7147,7 +7277,7 @@ function _unsupported_iterable_to_array$j(o, minLen) {
7147
7277
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
7148
7278
  return _array_like_to_array$j(o, minLen);
7149
7279
  }
7150
- function _ts_generator$4(thisArg, body) {
7280
+ var __generator$4 = globalThis && globalThis.__generator || function(thisArg, body) {
7151
7281
  var f, y, t, g, _ = {
7152
7282
  label: 0,
7153
7283
  sent: function() {
@@ -7248,9 +7378,9 @@ function _ts_generator$4(thisArg, body) {
7248
7378
  done: true
7249
7379
  };
7250
7380
  }
7251
- }
7381
+ };
7252
7382
  function Select(_param) {
7253
- 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, [
7383
+ 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, [
7254
7384
  "options",
7255
7385
  "value",
7256
7386
  "onChange",
@@ -7273,9 +7403,9 @@ function Select(_param) {
7273
7403
  "isDisabled",
7274
7404
  "dropdownOptions",
7275
7405
  "minSymbolsCountToOpenList",
7276
- "dropdownIcon"
7406
+ "dropdownIcon",
7407
+ "shouldScrollToList"
7277
7408
  ]);
7278
- var _tweakStyles, _popperData, _popperData1, _tweakStyles1;
7279
7409
  var _useTheme = useTheme("Select", styles$u, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
7280
7410
  var isMounted = useIsMounted();
7281
7411
  var _useState = _sliced_to_array$j(useState(false), 2), isListOpen = _useState[0], setIsListOpen = _useState[1];
@@ -7287,15 +7417,15 @@ function Select(_param) {
7287
7417
  var inputWrapper = useRef(null);
7288
7418
  var list = useRef(null);
7289
7419
  var input = useRef(null);
7420
+ var stringValue = isNotEmpty(value) ? convertValueToString(value) : void 0;
7290
7421
  var filteredOptions = useMemo(function() {
7291
- var _searchValue;
7292
7422
  if (optionsMode !== "search") {
7293
7423
  return options;
7294
7424
  }
7295
7425
  if (optionsFilter) {
7296
7426
  return optionsFilter(options, searchValue);
7297
7427
  }
7298
- var lowerCaseValue = (_searchValue = searchValue) === null || _searchValue === void 0 ? void 0 : _searchValue.toLowerCase();
7428
+ var lowerCaseValue = searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase();
7299
7429
  return options.filter(function(option) {
7300
7430
  var convertedOption = convertValueToString(option);
7301
7431
  return convertedOption !== void 0 && convertedOption.toLowerCase().includes(lowerCaseValue);
@@ -7321,7 +7451,7 @@ function Select(_param) {
7321
7451
  };
7322
7452
  var handleListOpen = function() {
7323
7453
  var _ref2 = _async_to_generator$4(function() {
7324
- return _ts_generator$4(this, function(_state) {
7454
+ return __generator$4(this, function(_state) {
7325
7455
  if (isListOpen) {
7326
7456
  return [
7327
7457
  2
@@ -7373,7 +7503,7 @@ function Select(_param) {
7373
7503
  ]);
7374
7504
  var handleOnType = useCallback(function() {
7375
7505
  var _ref2 = _async_to_generator$4(function(v) {
7376
- return _ts_generator$4(this, function(_state) {
7506
+ return __generator$4(this, function(_state) {
7377
7507
  switch (_state.label) {
7378
7508
  case 0:
7379
7509
  if (onType === void 0) {
@@ -7491,14 +7621,13 @@ function Select(_param) {
7491
7621
  var _inputProps_isReadonly = inputProps.isReadonly, isReadonly = _inputProps_isReadonly === void 0 ? true : _inputProps_isReadonly;
7492
7622
  var shouldUsePointerCursor = optionsMode === "normal" && isReadonly;
7493
7623
  var tweakInputStyles = useMemo(function() {
7494
- var _tweakStyles2;
7495
7624
  return merge({}, componentStyles.tweakInput, _object_spread$v({}, shouldUsePointerCursor ? {
7496
7625
  input: {
7497
7626
  cursor: "pointer"
7498
7627
  }
7499
- } : void 0), (_tweakStyles2 = tweakStyles) === null || _tweakStyles2 === void 0 ? void 0 : _tweakStyles2.tweakInput);
7628
+ } : void 0), tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakInput);
7500
7629
  }, [
7501
- (_tweakStyles = tweakStyles) === null || _tweakStyles === void 0 ? void 0 : _tweakStyles.tweakInput,
7630
+ tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakInput,
7502
7631
  shouldUsePointerCursor
7503
7632
  ]);
7504
7633
  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;
@@ -7532,7 +7661,7 @@ function Select(_param) {
7532
7661
  ref: inputWrapper,
7533
7662
  children: [
7534
7663
  /* @__PURE__ */ jsx(Input, _object_spread$v({
7535
- value: searchValue !== "" ? searchValue : convertValueToString(value),
7664
+ value: searchValue !== "" ? searchValue : stringValue,
7536
7665
  onChange: handleInputChange,
7537
7666
  isActive: isListOpen,
7538
7667
  isReadonly: optionsMode === "normal",
@@ -7565,8 +7694,8 @@ function Select(_param) {
7565
7694
  onMouseDown: function(event) {
7566
7695
  return event.preventDefault();
7567
7696
  },
7568
- style: (_popperData = popperData) === null || _popperData === void 0 ? void 0 : _popperData.styles.popper
7569
- }, (_popperData1 = popperData) === null || _popperData1 === void 0 ? void 0 : _popperData1.attributes.popper), {
7697
+ style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper
7698
+ }, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
7570
7699
  children: isOpen && /* @__PURE__ */ jsx(SelectList, {
7571
7700
  options: filteredOptions,
7572
7701
  convertValueToString,
@@ -7579,9 +7708,9 @@ function Select(_param) {
7579
7708
  activeValue: value,
7580
7709
  isLoading: inputProps.isLoading,
7581
7710
  loadingLabel,
7582
- tweakStyles: (_tweakStyles1 = tweakStyles) === null || _tweakStyles1 === void 0 ? void 0 : _tweakStyles1.tweakSelectList,
7711
+ tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
7583
7712
  testId: testId !== void 0 ? "".concat(testId, "-list") : void 0,
7584
- shouldScrollToList: !shouldUsePopper && !shouldHideOnScroll
7713
+ shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll
7585
7714
  })
7586
7715
  }))
7587
7716
  })
@@ -7985,11 +8114,11 @@ var DatePicker = function(_param) {
7985
8114
  }).classes;
7986
8115
  var _useState = _sliced_to_array$i(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
7987
8116
  var _useState1 = _sliced_to_array$i(useState(selectedDate), 2), date = _useState1[0], setDate = _useState1[1];
7988
- var _useState2 = _sliced_to_array$i(useState(selectedDate ? format(selectedDate, dateFormat) : ""), 2), dateValue = _useState2[0], setDateValue = _useState2[1];
8117
+ var _useState2 = _sliced_to_array$i(useState(selectedDate ? format$1(selectedDate, dateFormat) : ""), 2), dateValue = _useState2[0], setDateValue = _useState2[1];
7989
8118
  var _useState3 = _sliced_to_array$i(useState(startDate), 2), start2 = _useState3[0], setStart = _useState3[1];
7990
8119
  var _useState4 = _sliced_to_array$i(useState(endDate), 2), end2 = _useState4[0], setEnd = _useState4[1];
7991
- var _useState5 = _sliced_to_array$i(useState(startDate ? format(startDate, dateFormat) : ""), 2), startDateValue = _useState5[0], setStartDateValue = _useState5[1];
7992
- var _useState6 = _sliced_to_array$i(useState(endDate ? format(endDate, dateFormat) : ""), 2), endDateValue = _useState6[0], setEndDateValue = _useState6[1];
8120
+ var _useState5 = _sliced_to_array$i(useState(startDate ? format$1(startDate, dateFormat) : ""), 2), startDateValue = _useState5[0], setStartDateValue = _useState5[1];
8121
+ var _useState6 = _sliced_to_array$i(useState(endDate ? format$1(endDate, dateFormat) : ""), 2), endDateValue = _useState6[0], setEndDateValue = _useState6[1];
7993
8122
  var isDateValid = function(value) {
7994
8123
  return isValid(parse(value, dateFormat, new Date()));
7995
8124
  };
@@ -8043,9 +8172,9 @@ var DatePicker = function(_param) {
8043
8172
  setDate(selectedDate);
8044
8173
  setStart(startDate);
8045
8174
  setEnd(endDate);
8046
- setStartDateValue(startDate ? format(startDate, dateFormat) : "");
8047
- setEndDateValue(endDate ? format(endDate, dateFormat) : "");
8048
- setDateValue(selectedDate ? format(selectedDate, dateFormat) : "");
8175
+ setStartDateValue(startDate ? format$1(startDate, dateFormat) : "");
8176
+ setEndDateValue(endDate ? format$1(endDate, dateFormat) : "");
8177
+ setDateValue(selectedDate ? format$1(selectedDate, dateFormat) : "");
8049
8178
  }, [
8050
8179
  selectedDate,
8051
8180
  startDate,
@@ -8884,7 +9013,7 @@ function _unsupported_iterable_to_array$g(o, minLen) {
8884
9013
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
8885
9014
  return _array_like_to_array$g(o, minLen);
8886
9015
  }
8887
- function _ts_generator$3(thisArg, body) {
9016
+ var __generator$3 = globalThis && globalThis.__generator || function(thisArg, body) {
8888
9017
  var f, y, t, g, _ = {
8889
9018
  label: 0,
8890
9019
  sent: function() {
@@ -8985,7 +9114,7 @@ function _ts_generator$3(thisArg, body) {
8985
9114
  done: true
8986
9115
  };
8987
9116
  }
8988
- }
9117
+ };
8989
9118
  var defaultConvertFunction$1 = function(val) {
8990
9119
  return String(val);
8991
9120
  };
@@ -9012,8 +9141,8 @@ function FilterSelect(param) {
9012
9141
  var hasFooter = isNotEmpty(footer);
9013
9142
  var handleSearchInputChange = useCallback(function() {
9014
9143
  var _ref = _async_to_generator$3(function(inputValue) {
9015
- var _inputValue, _inputValue_trim, response;
9016
- return _ts_generator$3(this, function(_state) {
9144
+ var _inputValue_trim, response;
9145
+ return __generator$3(this, function(_state) {
9017
9146
  switch (_state.label) {
9018
9147
  case 0:
9019
9148
  if (fetchOptions === void 0) {
@@ -9032,7 +9161,7 @@ function FilterSelect(param) {
9032
9161
  ]);
9033
9162
  return [
9034
9163
  4,
9035
- fetchOptions((_inputValue_trim = (_inputValue = inputValue) === null || _inputValue === void 0 ? void 0 : _inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
9164
+ fetchOptions((_inputValue_trim = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
9036
9165
  ];
9037
9166
  case 2:
9038
9167
  response = _state.sent();
@@ -9092,8 +9221,8 @@ function FilterSelect(param) {
9092
9221
  };
9093
9222
  var handleLoadItemsOnScroll = useCallback(function() {
9094
9223
  var _ref = _async_to_generator$3(function(inputValue, page) {
9095
- var _inputValue, _inputValue_trim, response;
9096
- return _ts_generator$3(this, function(_state) {
9224
+ var _inputValue_trim, response;
9225
+ return __generator$3(this, function(_state) {
9097
9226
  switch (_state.label) {
9098
9227
  case 0:
9099
9228
  if (fetchOptions === void 0) {
@@ -9112,7 +9241,7 @@ function FilterSelect(param) {
9112
9241
  ]);
9113
9242
  return [
9114
9243
  4,
9115
- 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)
9244
+ 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)
9116
9245
  ];
9117
9246
  case 2:
9118
9247
  response = _state.sent();
@@ -9158,7 +9287,7 @@ function FilterSelect(param) {
9158
9287
  }
9159
9288
  observer.current = new IntersectionObserver(function() {
9160
9289
  var _ref = _async_to_generator$3(function(entries) {
9161
- return _ts_generator$3(this, function(_state) {
9290
+ return __generator$3(this, function(_state) {
9162
9291
  switch (_state.label) {
9163
9292
  case 0:
9164
9293
  if (!entries[0].isIntersecting)
@@ -9207,7 +9336,7 @@ function FilterSelect(param) {
9207
9336
  var doFetchOptions = function() {
9208
9337
  var _ref = _async_to_generator$3(function() {
9209
9338
  var response;
9210
- return _ts_generator$3(this, function(_state) {
9339
+ return __generator$3(this, function(_state) {
9211
9340
  switch (_state.label) {
9212
9341
  case 0:
9213
9342
  setIsLoading(true);
@@ -9871,7 +10000,7 @@ function FilterValueView(param) {
9871
10000
  return "";
9872
10001
  }
9873
10002
  if (_instanceof$1(v, Date)) {
9874
- return format(v, filter.dateFormat || DEFAULT_DATE_FORMAT$1);
10003
+ return format$1(v, filter.dateFormat || DEFAULT_DATE_FORMAT$1);
9875
10004
  }
9876
10005
  if (typeof v === "object" && v.value !== void 0) {
9877
10006
  return String(v.value);
@@ -10160,7 +10289,7 @@ function _unsupported_iterable_to_array$e(o, minLen) {
10160
10289
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
10161
10290
  return _array_like_to_array$e(o, minLen);
10162
10291
  }
10163
- function _ts_generator$2(thisArg, body) {
10292
+ var __generator$2 = globalThis && globalThis.__generator || function(thisArg, body) {
10164
10293
  var f, y, t, g, _ = {
10165
10294
  label: 0,
10166
10295
  sent: function() {
@@ -10261,7 +10390,7 @@ function _ts_generator$2(thisArg, body) {
10261
10390
  done: true
10262
10391
  };
10263
10392
  }
10264
- }
10393
+ };
10265
10394
  var NumberInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
10266
10395
  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, [
10267
10396
  "value",
@@ -10287,7 +10416,7 @@ var NumberInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
10287
10416
  var handleChange = function() {
10288
10417
  var _ref = _async_to_generator$2(function(inputValue, event) {
10289
10418
  var oldValue, target, _target_selectionStart, defaultCaretPos, numString, intRegexp, floatRegexp, numberRegexp, hasDot, formattedValue, newValue;
10290
- return _ts_generator$2(this, function(_state) {
10419
+ return __generator$2(this, function(_state) {
10291
10420
  switch (_state.label) {
10292
10421
  case 0:
10293
10422
  oldValue = showedValue;
@@ -10482,7 +10611,6 @@ var sortValues = function(arr) {
10482
10611
  };
10483
10612
  var FilterInterval = function(param) {
10484
10613
  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;
10485
- var _value, _fromInput, _fromInput1, _fromInput2, _value1, _toInput, _toInput1, _toInput2;
10486
10614
  var _useTheme = useTheme("FilterInterval", styles$l, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
10487
10615
  var translates = useMemo(function() {
10488
10616
  return getLocale$1(localeKey, locale2);
@@ -10494,24 +10622,22 @@ var FilterInterval = function(param) {
10494
10622
  onChange(void 0);
10495
10623
  };
10496
10624
  var handleFromChange = function(v) {
10497
- var _value2, _value12;
10498
- if (v === void 0 && ((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2[1]) === void 0) {
10625
+ if (v === void 0 && (value === null || value === void 0 ? void 0 : value[1]) === void 0) {
10499
10626
  onChange(void 0);
10500
10627
  return;
10501
10628
  }
10502
10629
  onChange(sortValues([
10503
10630
  v,
10504
- (_value12 = value) === null || _value12 === void 0 ? void 0 : _value12[1]
10631
+ value === null || value === void 0 ? void 0 : value[1]
10505
10632
  ]));
10506
10633
  };
10507
10634
  var handleToChange = function(v) {
10508
- var _value2, _value12;
10509
- if (v === void 0 && ((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2[0]) === void 0) {
10635
+ if (v === void 0 && (value === null || value === void 0 ? void 0 : value[0]) === void 0) {
10510
10636
  onChange(void 0);
10511
10637
  return;
10512
10638
  }
10513
10639
  onChange(sortValues([
10514
- (_value12 = value) === null || _value12 === void 0 ? void 0 : _value12[0],
10640
+ value === null || value === void 0 ? void 0 : value[0],
10515
10641
  v
10516
10642
  ]));
10517
10643
  };
@@ -10528,14 +10654,14 @@ var FilterInterval = function(param) {
10528
10654
  children: [
10529
10655
  /* @__PURE__ */ jsx(NumberInput, {
10530
10656
  onChange: handleFromChange,
10531
- value: (_value = value) === null || _value === void 0 ? void 0 : _value[0],
10657
+ value: value === null || value === void 0 ? void 0 : value[0],
10532
10658
  label: withFieldNameInLabel ? "".concat(labelName, " ").concat(translates.from.toLocaleLowerCase()) : translates.from,
10533
10659
  border: "bottom",
10534
10660
  canBeFloat,
10535
10661
  isClearable: true,
10536
- min: (_fromInput = fromInput) === null || _fromInput === void 0 ? void 0 : _fromInput.min,
10537
- max: (_fromInput1 = fromInput) === null || _fromInput1 === void 0 ? void 0 : _fromInput1.max,
10538
- maxLength: (_fromInput2 = fromInput) === null || _fromInput2 === void 0 ? void 0 : _fromInput2.maxLength,
10662
+ min: fromInput === null || fromInput === void 0 ? void 0 : fromInput.min,
10663
+ max: fromInput === null || fromInput === void 0 ? void 0 : fromInput.max,
10664
+ maxLength: fromInput === null || fromInput === void 0 ? void 0 : fromInput.maxLength,
10539
10665
  tweakStyles: tweakInputStyles,
10540
10666
  testId: testId !== void 0 ? "".concat(testId, "-start") : void 0
10541
10667
  }),
@@ -10553,14 +10679,14 @@ var FilterInterval = function(param) {
10553
10679
  children: [
10554
10680
  /* @__PURE__ */ jsx(NumberInput, {
10555
10681
  onChange: handleToChange,
10556
- value: (_value1 = value) === null || _value1 === void 0 ? void 0 : _value1[1],
10682
+ value: value === null || value === void 0 ? void 0 : value[1],
10557
10683
  label: withFieldNameInLabel ? "".concat(labelName, " ").concat(translates.to.toLocaleLowerCase()) : translates.to,
10558
10684
  border: "bottom",
10559
10685
  canBeFloat,
10560
10686
  isClearable: true,
10561
- min: (_toInput = toInput) === null || _toInput === void 0 ? void 0 : _toInput.min,
10562
- max: (_toInput1 = toInput) === null || _toInput1 === void 0 ? void 0 : _toInput1.max,
10563
- maxLength: (_toInput2 = toInput) === null || _toInput2 === void 0 ? void 0 : _toInput2.maxLength,
10687
+ min: toInput === null || toInput === void 0 ? void 0 : toInput.min,
10688
+ max: toInput === null || toInput === void 0 ? void 0 : toInput.max,
10689
+ maxLength: toInput === null || toInput === void 0 ? void 0 : toInput.maxLength,
10564
10690
  tweakStyles: tweakInputStyles,
10565
10691
  testId: testId !== void 0 ? "".concat(testId, "-end") : void 0
10566
10692
  }),
@@ -10912,7 +11038,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
10912
11038
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
10913
11039
  return _array_like_to_array$d(o, minLen);
10914
11040
  }
10915
- function _ts_generator$1(thisArg, body) {
11041
+ var __generator$1 = globalThis && globalThis.__generator || function(thisArg, body) {
10916
11042
  var f, y, t, g, _ = {
10917
11043
  label: 0,
10918
11044
  sent: function() {
@@ -11013,7 +11139,7 @@ function _ts_generator$1(thisArg, body) {
11013
11139
  done: true
11014
11140
  };
11015
11141
  }
11016
- }
11142
+ };
11017
11143
  var defaultConvertFunction = function(val) {
11018
11144
  return String(val);
11019
11145
  };
@@ -11033,7 +11159,6 @@ function MultiSelectList(param) {
11033
11159
  changeSearchValue(inputValue);
11034
11160
  }
11035
11161
  };
11036
- var _value, _chosenValues;
11037
11162
  var isMounted = useIsMounted();
11038
11163
  var _useTheme = useTheme("MultiSelectList", styles$k, tweakStyles, {
11039
11164
  width
@@ -11047,10 +11172,9 @@ function MultiSelectList(param) {
11047
11172
  localeKey,
11048
11173
  locale2
11049
11174
  ]);
11050
- var chosenValues = (_value = value) === null || _value === void 0 ? void 0 : _value.include;
11175
+ var chosenValues = value === null || value === void 0 ? void 0 : value.include;
11051
11176
  var chosenValuesIds = useMemo(function() {
11052
- var _chosenValues2;
11053
- return (_chosenValues2 = chosenValues) === null || _chosenValues2 === void 0 ? void 0 : _chosenValues2.map(getValueId);
11177
+ return chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.map(getValueId);
11054
11178
  }, [
11055
11179
  getValueId,
11056
11180
  chosenValues
@@ -11065,8 +11189,7 @@ function MultiSelectList(param) {
11065
11189
  var observer = useRef();
11066
11190
  var unchosenOptions = useMemo(function() {
11067
11191
  return allOptions.filter(function(v) {
11068
- var _chosenValuesIds;
11069
- return !((_chosenValuesIds = chosenValuesIds) === null || _chosenValuesIds === void 0 ? void 0 : _chosenValuesIds.includes(getValueId(v)));
11192
+ return !(chosenValuesIds === null || chosenValuesIds === void 0 ? void 0 : chosenValuesIds.includes(getValueId(v)));
11070
11193
  });
11071
11194
  }, [
11072
11195
  getValueId,
@@ -11075,8 +11198,8 @@ function MultiSelectList(param) {
11075
11198
  ]);
11076
11199
  var handleSearchInputChange = useCallback(function() {
11077
11200
  var _ref = _async_to_generator$1(function(inputValue) {
11078
- var _inputValue, _inputValue_trim, response;
11079
- return _ts_generator$1(this, function(_state) {
11201
+ var _inputValue_trim, response;
11202
+ return __generator$1(this, function(_state) {
11080
11203
  switch (_state.label) {
11081
11204
  case 0:
11082
11205
  if (fetchOptions === void 0) {
@@ -11095,7 +11218,7 @@ function MultiSelectList(param) {
11095
11218
  ]);
11096
11219
  return [
11097
11220
  4,
11098
- fetchOptions((_inputValue_trim = (_inputValue = inputValue) === null || _inputValue === void 0 ? void 0 : _inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
11221
+ fetchOptions((_inputValue_trim = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim()) !== null && _inputValue_trim !== void 0 ? _inputValue_trim : "")
11099
11222
  ];
11100
11223
  case 2:
11101
11224
  response = _state.sent();
@@ -11145,11 +11268,10 @@ function MultiSelectList(param) {
11145
11268
  onChange(void 0);
11146
11269
  };
11147
11270
  var onSelect = function(val) {
11148
- var _chosenValues2;
11149
11271
  var _chosenValues_filter;
11150
11272
  handleSelectValue(val.isSelected ? _to_consumable_array$2(chosenValues !== null && chosenValues !== void 0 ? chosenValues : []).concat([
11151
11273
  val.value
11152
- ]) : (_chosenValues_filter = (_chosenValues2 = chosenValues) === null || _chosenValues2 === void 0 ? void 0 : _chosenValues2.filter(function(v) {
11274
+ ]) : (_chosenValues_filter = chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.filter(function(v) {
11153
11275
  return getValueId(v) !== getValueId(val.value);
11154
11276
  })) !== null && _chosenValues_filter !== void 0 ? _chosenValues_filter : []);
11155
11277
  };
@@ -11161,9 +11283,8 @@ function MultiSelectList(param) {
11161
11283
  }
11162
11284
  }
11163
11285
  if (event.code === "ArrowDown") {
11164
- var _value2;
11165
11286
  var _value_include_length;
11166
- 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) {
11287
+ 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) {
11167
11288
  setKeyCursorOn(keyCursorOn + 1);
11168
11289
  }
11169
11290
  }
@@ -11201,15 +11322,14 @@ function MultiSelectList(param) {
11201
11322
  }
11202
11323
  };
11203
11324
  var getIsValueChosen = function(id) {
11204
- var _chosenValues2;
11205
- return (_chosenValues2 = chosenValues) === null || _chosenValues2 === void 0 ? void 0 : _chosenValues2.some(function(v) {
11325
+ return chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.some(function(v) {
11206
11326
  return getValueId(v) === id;
11207
11327
  });
11208
11328
  };
11209
11329
  var handleLoadItemsOnScroll = useCallback(function() {
11210
11330
  var _ref = _async_to_generator$1(function(inputValue, page) {
11211
11331
  var response;
11212
- return _ts_generator$1(this, function(_state) {
11332
+ return __generator$1(this, function(_state) {
11213
11333
  switch (_state.label) {
11214
11334
  case 0:
11215
11335
  if (fetchOptions === void 0) {
@@ -11276,7 +11396,7 @@ function MultiSelectList(param) {
11276
11396
  }
11277
11397
  observer.current = new IntersectionObserver(function() {
11278
11398
  var _ref = _async_to_generator$1(function(entries) {
11279
- return _ts_generator$1(this, function(_state) {
11399
+ return __generator$1(this, function(_state) {
11280
11400
  switch (_state.label) {
11281
11401
  case 0:
11282
11402
  if (!entries[0].isIntersecting)
@@ -11325,7 +11445,7 @@ function MultiSelectList(param) {
11325
11445
  var doFetchOptions = function() {
11326
11446
  var _ref = _async_to_generator$1(function() {
11327
11447
  var response;
11328
- return _ts_generator$1(this, function(_state) {
11448
+ return __generator$1(this, function(_state) {
11329
11449
  switch (_state.label) {
11330
11450
  case 0:
11331
11451
  setIsLoading(true);
@@ -11411,7 +11531,7 @@ function MultiSelectList(param) {
11411
11531
  className: clsx(classes.label, classes.labelChosen, !isSearchEnabled && classes.withoutTopGap),
11412
11532
  children: translates.chosen
11413
11533
  }),
11414
- (_chosenValues = chosenValues) === null || _chosenValues === void 0 ? void 0 : _chosenValues.map(function(val) {
11534
+ chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.map(function(val) {
11415
11535
  var id = getValueId(val);
11416
11536
  var view = getValueView(val);
11417
11537
  return /* @__PURE__ */ jsx("div", {
@@ -12765,7 +12885,6 @@ var emptyPickerProps = {};
12765
12885
  var DATE_FORMAT = "dd.MM.yyyy";
12766
12886
  var FilterWithDates = function(param) {
12767
12887
  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;
12768
- var _value, _value1, _value2, _value3, _value4, _value5;
12769
12888
  var _useTheme = useTheme("FilterWithDates", styles$j, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
12770
12889
  var _useState = _sliced_to_array$c(useState(false), 2), isOpenFrom = _useState[0], setOpenFrom = _useState[1];
12771
12890
  var _useState1 = _sliced_to_array$c(useState(false), 2), isOpenTo = _useState1[0], setOpenTo = _useState1[1];
@@ -12785,19 +12904,17 @@ var FilterWithDates = function(param) {
12785
12904
  var ref = useRef(null);
12786
12905
  var isOpenCalendar = isOpenFrom || isOpenTo;
12787
12906
  var handleFromSelected = function(val) {
12788
- var _value6;
12789
12907
  var _value_to2;
12790
12908
  onChange({
12791
12909
  from: val,
12792
- to: (_value_to2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12910
+ to: (_value_to2 = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12793
12911
  });
12794
12912
  setOpenFrom(false);
12795
12913
  };
12796
12914
  var handleToSelected = function(val) {
12797
- var _value6;
12798
12915
  var _value_from2;
12799
12916
  onChange({
12800
- from: (_value_from2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12917
+ from: (_value_from2 = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12801
12918
  to: val
12802
12919
  });
12803
12920
  setOpenTo(false);
@@ -12809,11 +12926,10 @@ var FilterWithDates = function(param) {
12809
12926
  to: val
12810
12927
  });
12811
12928
  } else {
12812
- var _value6;
12813
12929
  var _value_to2;
12814
12930
  onChange({
12815
12931
  from: val,
12816
- to: (_value_to2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12932
+ to: (_value_to2 = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to2 !== void 0 ? _value_to2 : null
12817
12933
  });
12818
12934
  }
12819
12935
  };
@@ -12824,10 +12940,9 @@ var FilterWithDates = function(param) {
12824
12940
  to: value.from
12825
12941
  });
12826
12942
  } else {
12827
- var _value6;
12828
12943
  var _value_from2;
12829
12944
  onChange({
12830
- from: (_value_from2 = (_value6 = value) === null || _value6 === void 0 ? void 0 : _value6.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12945
+ from: (_value_from2 = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from2 !== void 0 ? _value_from2 : null,
12831
12946
  to: val
12832
12947
  });
12833
12948
  }
@@ -12845,8 +12960,8 @@ var FilterWithDates = function(param) {
12845
12960
  /* @__PURE__ */ jsx("div", {
12846
12961
  className: classes.containerItem,
12847
12962
  children: /* @__PURE__ */ jsx(DatePicker, _object_spread$j({
12848
- selectedDate: (_value_from = (_value = value) === null || _value === void 0 ? void 0 : _value.from) !== null && _value_from !== void 0 ? _value_from : null,
12849
- maxDate: (_value1 = value) === null || _value1 === void 0 ? void 0 : _value1.to,
12963
+ selectedDate: (_value_from = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from !== void 0 ? _value_from : null,
12964
+ maxDate: value === null || value === void 0 ? void 0 : value.to,
12850
12965
  label: translates.from,
12851
12966
  months: translates.months,
12852
12967
  locale: dateLocale,
@@ -12862,10 +12977,10 @@ var FilterWithDates = function(param) {
12862
12977
  /* @__PURE__ */ jsx("div", {
12863
12978
  className: classes.containerItem,
12864
12979
  children: /* @__PURE__ */ jsx(DatePicker, _object_spread$j({
12865
- selectedDate: (_value_to = (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.to) !== null && _value_to !== void 0 ? _value_to : null,
12980
+ selectedDate: (_value_to = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to !== void 0 ? _value_to : null,
12866
12981
  label: translates.to,
12867
12982
  months: translates.months,
12868
- minDate: (_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.from,
12983
+ minDate: value === null || value === void 0 ? void 0 : value.from,
12869
12984
  locale: dateLocale,
12870
12985
  onChangeDate: handleChangeTo,
12871
12986
  topPosition,
@@ -12908,7 +13023,7 @@ var FilterWithDates = function(param) {
12908
13023
  ref,
12909
13024
  className: classes.datepicker,
12910
13025
  children: /* @__PURE__ */ jsx(DatePicker, {
12911
- 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,
13026
+ 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,
12912
13027
  label: "",
12913
13028
  locale: dateLocale,
12914
13029
  months: translates.months,
@@ -13096,7 +13211,6 @@ var PERIODS_GETTERS = {
13096
13211
  };
13097
13212
  var FilterWithPeriod = function(param) {
13098
13213
  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;
13099
- var _value, _value1, _value2, _value3, _value4, _period;
13100
13214
  var _useTheme = useTheme("FilterWithPeriod", styles$i, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
13101
13215
  var translates = useMemo(function() {
13102
13216
  return getLocale$1(localeKey, locale2);
@@ -13104,13 +13218,12 @@ var FilterWithPeriod = function(param) {
13104
13218
  localeKey,
13105
13219
  locale2
13106
13220
  ]);
13107
- var _useState = _sliced_to_array$b(useState(((_value = value) === null || _value === void 0 ? void 0 : _value.periodType) !== "CUSTOM"), 2), isPeriodPickerShown = _useState[0], setIsPeriodPickerShown = _useState[1];
13108
- var _useState1 = _sliced_to_array$b(useState(((_value1 = value) === null || _value1 === void 0 ? void 0 : _value1.periodType) === "CUSTOM"), 2), isDatePickerShown = _useState1[0], setIsDatePickerShown = _useState1[1];
13221
+ var _useState = _sliced_to_array$b(useState((value === null || value === void 0 ? void 0 : value.periodType) !== "CUSTOM"), 2), isPeriodPickerShown = _useState[0], setIsPeriodPickerShown = _useState[1];
13222
+ var _useState1 = _sliced_to_array$b(useState((value === null || value === void 0 ? void 0 : value.periodType) === "CUSTOM"), 2), isDatePickerShown = _useState1[0], setIsDatePickerShown = _useState1[1];
13109
13223
  var _useState2 = _sliced_to_array$b(useState(value), 2), period = _useState2[0], setPeriod = _useState2[1];
13110
13224
  var periodGetters = useMemo(function() {
13111
- var _periods;
13112
13225
  var result = _object_spread$i({}, PERIODS_GETTERS);
13113
- (_periods = periods) === null || _periods === void 0 ? void 0 : _periods.forEach(function(p) {
13226
+ periods === null || periods === void 0 ? void 0 : periods.forEach(function(p) {
13114
13227
  if (Array.isArray(p)) {
13115
13228
  result[p[0]] = p[1];
13116
13229
  }
@@ -13183,8 +13296,7 @@ var FilterWithPeriod = function(param) {
13183
13296
  }
13184
13297
  };
13185
13298
  useOnClickOutside(refDatePicker, function() {
13186
- var _period2, _period1;
13187
- if (!((_period2 = period) === null || _period2 === void 0 ? void 0 : _period2.from) && !((_period1 = period) === null || _period1 === void 0 ? void 0 : _period1.to)) {
13299
+ if (!(period === null || period === void 0 ? void 0 : period.from) && !(period === null || period === void 0 ? void 0 : period.to)) {
13188
13300
  setPeriod(void 0);
13189
13301
  }
13190
13302
  setIsDatePickerShown(false);
@@ -13193,9 +13305,9 @@ var FilterWithPeriod = function(param) {
13193
13305
  setPeriod(value);
13194
13306
  }, [
13195
13307
  value,
13196
- (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.from,
13197
- (_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.to,
13198
- (_value4 = value) === null || _value4 === void 0 ? void 0 : _value4.periodType
13308
+ value === null || value === void 0 ? void 0 : value.from,
13309
+ value === null || value === void 0 ? void 0 : value.to,
13310
+ value === null || value === void 0 ? void 0 : value.periodType
13199
13311
  ]);
13200
13312
  var tweakSelectStyles = useTweakStyles(componentStyles, tweakStyles, "tweakSelect");
13201
13313
  return /* @__PURE__ */ jsxs("div", {
@@ -13206,7 +13318,7 @@ var FilterWithPeriod = function(param) {
13206
13318
  ref: refPeriodPicker,
13207
13319
  children: /* @__PURE__ */ jsx(FilterSelect, {
13208
13320
  options: periodsList,
13209
- value: (_period = period) === null || _period === void 0 ? void 0 : _period.periodType,
13321
+ value: period === null || period === void 0 ? void 0 : period.periodType,
13210
13322
  onChange: onPeriodChange,
13211
13323
  localeKey,
13212
13324
  locale: translates,
@@ -13589,8 +13701,7 @@ function Filter(param) {
13589
13701
  }
13590
13702
  }, parentRef);
13591
13703
  useLayoutEffect(function() {
13592
- var _filtersPaneRef;
13593
- if (ref.current === null || filtersPaneRef === void 0 || filtersPaneRef === null || ((_filtersPaneRef = filtersPaneRef) === null || _filtersPaneRef === void 0 ? void 0 : _filtersPaneRef.current) === null) {
13704
+ if (ref.current === null || filtersPaneRef === void 0 || filtersPaneRef === null || (filtersPaneRef === null || filtersPaneRef === void 0 ? void 0 : filtersPaneRef.current) === null) {
13594
13705
  return;
13595
13706
  }
13596
13707
  var _ref_current_getBoundingClientRect = ref.current.getBoundingClientRect(), width = _ref_current_getBoundingClientRect.width, left2 = _ref_current_getBoundingClientRect.left;
@@ -13817,7 +13928,7 @@ function FiltersPane(param) {
13817
13928
  testId: testId !== void 0 ? "".concat(testId, "-search") : void 0
13818
13929
  })),
13819
13930
  filtersKeys.map(function(key, index) {
13820
- var _filter_requiredFilledFilters, _filter;
13931
+ var _filter_requiredFilledFilters;
13821
13932
  var isLast = index === filtersKeys.length - 1;
13822
13933
  var currentValue = values[key];
13823
13934
  var filter = filtersConfig[key];
@@ -13836,7 +13947,7 @@ function FiltersPane(param) {
13836
13947
  return onChangeFilters(_object_spread_props$e(_object_spread$g({}, values), _define_property$h({}, key, value)));
13837
13948
  },
13838
13949
  value: currentValue,
13839
- 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) {
13950
+ 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) {
13840
13951
  return !values[item];
13841
13952
  })),
13842
13953
  filtersPaneRef: ref,
@@ -20005,13 +20116,11 @@ function _instanceof(left2, right2) {
20005
20116
  var DEFAULT_DATE_FORMAT = "dd.MM.yyyy";
20006
20117
  function TableValue(param) {
20007
20118
  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;
20008
- var _config, _itemConfig, _itemConfig1, _itemConfig2, _itemConfig3, _itemConfig4, _itemConfig5;
20009
- var itemConfig = (_config = config) === null || _config === void 0 ? void 0 : _config[columnName];
20119
+ var itemConfig = config === null || config === void 0 ? void 0 : config[columnName];
20010
20120
  var value = item[columnName];
20011
20121
  var content = null;
20012
- if ((_itemConfig = itemConfig) === null || _itemConfig === void 0 ? void 0 : _itemConfig.component) {
20013
- var _itemConfig6;
20014
- var ValueComponent = (_itemConfig6 = itemConfig) === null || _itemConfig6 === void 0 ? void 0 : _itemConfig6.component;
20122
+ if (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.component) {
20123
+ var ValueComponent = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.component;
20015
20124
  content = /* @__PURE__ */ jsx(ValueComponent, {
20016
20125
  value,
20017
20126
  row: item,
@@ -20023,17 +20132,16 @@ function TableValue(param) {
20023
20132
  } else if (typeof value === "string" || typeof value === "number") {
20024
20133
  content = value;
20025
20134
  } else if (_instanceof(value, Date)) {
20026
- var _itemConfig7;
20027
- content = format(value, ((_itemConfig7 = itemConfig) === null || _itemConfig7 === void 0 ? void 0 : _itemConfig7.dateFormat) || DEFAULT_DATE_FORMAT);
20135
+ content = format$1(value, (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.dateFormat) || DEFAULT_DATE_FORMAT);
20028
20136
  }
20029
20137
  return /* @__PURE__ */ jsx("td", {
20030
20138
  className: clsx(classes.root, isSticky && classes.sticky, isSecond && classes.second),
20031
20139
  style: {
20032
- textAlign: (_itemConfig1 = itemConfig) === null || _itemConfig1 === void 0 ? void 0 : _itemConfig1.cellAlign,
20033
- position: isSticky ? "sticky" : (_itemConfig2 = itemConfig) === null || _itemConfig2 === void 0 ? void 0 : _itemConfig2.position,
20034
- right: (_itemConfig3 = itemConfig) === null || _itemConfig3 === void 0 ? void 0 : _itemConfig3.right,
20035
- left: isSticky ? 0 : (_itemConfig4 = itemConfig) === null || _itemConfig4 === void 0 ? void 0 : _itemConfig4.left,
20036
- verticalAlign: (_itemConfig5 = itemConfig) === null || _itemConfig5 === void 0 ? void 0 : _itemConfig5.cellVerticalAlign
20140
+ textAlign: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.cellAlign,
20141
+ position: isSticky ? "sticky" : itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.position,
20142
+ right: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.right,
20143
+ left: isSticky ? 0 : itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.left,
20144
+ verticalAlign: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.cellVerticalAlign
20037
20145
  },
20038
20146
  children: content
20039
20147
  }, columnName);
@@ -20150,12 +20258,11 @@ function _unsupported_iterable_to_array$9(o, minLen) {
20150
20258
  }
20151
20259
  function TableRow(param) {
20152
20260
  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;
20153
- var _rowAttributes;
20154
20261
  var _useState = _sliced_to_array$9(useState(false), 2), isFocused = _useState[0], setFocused = _useState[1];
20155
20262
  var _useState1 = _sliced_to_array$9(useState({
20156
20263
  isOpen: false
20157
20264
  }), 2), nestedComponent = _useState1[0], setNestedComponent = _useState1[1];
20158
- var rowData = (_rowAttributes = rowAttributes) === null || _rowAttributes === void 0 ? void 0 : _rowAttributes.reduce(function(acc, cur) {
20265
+ var rowData = rowAttributes === null || rowAttributes === void 0 ? void 0 : rowAttributes.reduce(function(acc, cur) {
20159
20266
  var val = item[cur];
20160
20267
  if (val !== void 0) {
20161
20268
  acc[cur] = String(item[cur]);
@@ -20184,8 +20291,7 @@ function TableRow(param) {
20184
20291
  };
20185
20292
  var handleRowClick = function() {
20186
20293
  if (uniqueField !== void 0) {
20187
- var _onRowClick;
20188
- (_onRowClick = onRowClick) === null || _onRowClick === void 0 ? void 0 : _onRowClick(item[uniqueField]);
20294
+ onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(item[uniqueField]);
20189
20295
  }
20190
20296
  if (expandableRowComponent !== void 0) {
20191
20297
  var newNestedComponent = expandableRowComponent(item, true, closeNestedComponent);
@@ -20477,7 +20583,6 @@ function _unsupported_iterable_to_array$8(o, minLen) {
20477
20583
  }
20478
20584
  function FlexibleTable(param) {
20479
20585
  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;
20480
- var _infinityScrollConfig, _infinityScrollConfig1, _infinityScrollConfig2, _infinityScrollConfig3, _infinityScrollConfig4;
20481
20586
  var classes = useTheme("FlexibleTable", styles$f, tweakStyles).classes;
20482
20587
  var observer = useRef();
20483
20588
  var scrollRef = useRef(null);
@@ -20500,9 +20605,9 @@ function FlexibleTable(param) {
20500
20605
  }
20501
20606
  }
20502
20607
  }, [
20503
- (_infinityScrollConfig = infinityScrollConfig) === null || _infinityScrollConfig === void 0 ? void 0 : _infinityScrollConfig.activePage,
20504
- (_infinityScrollConfig1 = infinityScrollConfig) === null || _infinityScrollConfig1 === void 0 ? void 0 : _infinityScrollConfig1.totalPages,
20505
- (_infinityScrollConfig2 = infinityScrollConfig) === null || _infinityScrollConfig2 === void 0 ? void 0 : _infinityScrollConfig2.onInfinityScroll
20608
+ infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.activePage,
20609
+ infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.totalPages,
20610
+ infinityScrollConfig === null || infinityScrollConfig === void 0 ? void 0 : infinityScrollConfig.onInfinityScroll
20506
20611
  ]);
20507
20612
  var tableRowClasses = useMemo(function() {
20508
20613
  return {
@@ -20546,25 +20651,23 @@ function FlexibleTable(param) {
20546
20651
  children: /* @__PURE__ */ jsx("tr", {
20547
20652
  className: clsx(classes.row, classes.headerRow),
20548
20653
  children: (enabledColumns || Object.keys(content[0])).map(function(key, idx) {
20549
- var _config, _itemConfig, _itemConfig1, _itemConfig2, _itemConfig3, _itemConfig4, _itemConfig5;
20550
- var itemConfig = (_config = config) === null || _config === void 0 ? void 0 : _config[key];
20654
+ var itemConfig = config === null || config === void 0 ? void 0 : config[key];
20551
20655
  var _itemConfig_title;
20552
- var titleContent = (_itemConfig_title = (_itemConfig = itemConfig) === null || _itemConfig === void 0 ? void 0 : _itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : "";
20553
- if (((_itemConfig1 = itemConfig) === null || _itemConfig1 === void 0 ? void 0 : _itemConfig1.titleComponent) !== void 0) {
20554
- var _itemConfig6, _headerContent;
20555
- var TitleComponent = (_itemConfig6 = itemConfig) === null || _itemConfig6 === void 0 ? void 0 : _itemConfig6.titleComponent;
20656
+ var titleContent = (_itemConfig_title = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : "";
20657
+ if ((itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleComponent) !== void 0) {
20658
+ var TitleComponent = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleComponent;
20556
20659
  titleContent = /* @__PURE__ */ jsx(TitleComponent, {
20557
- value: (_headerContent = headerContent) === null || _headerContent === void 0 ? void 0 : _headerContent[key]
20660
+ value: headerContent === null || headerContent === void 0 ? void 0 : headerContent[key]
20558
20661
  });
20559
20662
  }
20560
20663
  var _itemConfig_titleAlign;
20561
20664
  return /* @__PURE__ */ jsx("th", {
20562
20665
  className: clsx(classes.header, isFirstColumnSticky && idx === 0 && classes.headerSticky, isFirstColumnSticky && idx === 1 && classes.headerSecond),
20563
20666
  style: {
20564
- minWidth: (_itemConfig2 = itemConfig) === null || _itemConfig2 === void 0 ? void 0 : _itemConfig2.minWidth,
20565
- width: (_itemConfig3 = itemConfig) === null || _itemConfig3 === void 0 ? void 0 : _itemConfig3.width,
20566
- maxWidth: (_itemConfig4 = itemConfig) === null || _itemConfig4 === void 0 ? void 0 : _itemConfig4.maxWidth,
20567
- textAlign: (_itemConfig_titleAlign = (_itemConfig5 = itemConfig) === null || _itemConfig5 === void 0 ? void 0 : _itemConfig5.titleAlign) !== null && _itemConfig_titleAlign !== void 0 ? _itemConfig_titleAlign : "left"
20667
+ minWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.minWidth,
20668
+ width: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.width,
20669
+ maxWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.maxWidth,
20670
+ textAlign: (_itemConfig_titleAlign = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleAlign) !== null && _itemConfig_titleAlign !== void 0 ? _itemConfig_titleAlign : "left"
20568
20671
  },
20569
20672
  onClick: function() {
20570
20673
  return onHeadClick ? onHeadClick(key) : void 0;
@@ -20576,18 +20679,17 @@ function FlexibleTable(param) {
20576
20679
  }),
20577
20680
  /* @__PURE__ */ jsxs("tbody", {
20578
20681
  children: [
20579
- 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", {
20682
+ 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", {
20580
20683
  children: /* @__PURE__ */ jsx("td", {
20581
20684
  colSpan: (enabledColumns || Object.keys(content[0])).length,
20582
20685
  children: nothingFoundContent
20583
20686
  })
20584
20687
  }),
20585
20688
  content.map(function(item, idx) {
20586
- var _activeRows;
20587
- return /* @__PURE__ */ jsx(TableRow$1, {
20689
+ return jsx(TableRow$1, {
20588
20690
  item,
20589
20691
  uniqueField,
20590
- isActive: (_activeRows_includes = (_activeRows = activeRows) === null || _activeRows === void 0 ? void 0 : _activeRows.includes(idx)) !== null && _activeRows_includes !== void 0 ? _activeRows_includes : false,
20692
+ isActive: (_activeRows_includes = activeRows === null || activeRows === void 0 ? void 0 : activeRows.includes(idx)) !== null && _activeRows_includes !== void 0 ? _activeRows_includes : false,
20591
20693
  isFirstColumnSticky,
20592
20694
  onRowClick,
20593
20695
  onRowHover,
@@ -21363,7 +21465,8 @@ var styles$c = {
21363
21465
  top: "100%",
21364
21466
  right: 0,
21365
21467
  marginTop: 6
21366
- }
21468
+ },
21469
+ tweakList: {}
21367
21470
  };
21368
21471
  function _array_like_to_array$6(arr, len) {
21369
21472
  if (len == null || len > arr.length)
@@ -21476,43 +21579,37 @@ function _unsupported_iterable_to_array$6(o, minLen) {
21476
21579
  return _array_like_to_array$6(o, minLen);
21477
21580
  }
21478
21581
  var MoreMenu = function(param) {
21479
- 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;
21480
- var classes = useTheme("MoreMenu", styles$c, tweakStyles).classes;
21582
+ 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;
21583
+ var _useTheme = useTheme("MoreMenu", styles$c, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
21584
+ var tweakListStyles = useTweakStyles(componentStyles, tweakStyles, "tweakList");
21481
21585
  var _useState = _sliced_to_array$6(useState(false), 2), isMenuShown = _useState[0], setIsMenuShown = _useState[1];
21482
21586
  var list = useRef(null);
21483
21587
  var button = useRef(null);
21588
+ var isButtonDisabled = isDisabled || items.length === 0;
21484
21589
  var toggleMenu = function(event) {
21485
21590
  var isShown = !isMenuShown;
21486
21591
  event.stopPropagation();
21487
21592
  setIsMenuShown(isShown);
21488
21593
  if (isShown) {
21489
- if (onMenuOpen !== void 0) {
21490
- onMenuOpen();
21491
- }
21594
+ onMenuOpen === null || onMenuOpen === void 0 ? void 0 : onMenuOpen();
21492
21595
  } else {
21493
- if (onMenuClose !== void 0) {
21494
- onMenuClose();
21495
- }
21596
+ onMenuClose === null || onMenuClose === void 0 ? void 0 : onMenuClose();
21496
21597
  }
21497
21598
  };
21498
21599
  var handleCloseMenu = function() {
21499
21600
  setIsMenuShown(false);
21500
- if (onMenuClose !== void 0) {
21501
- onMenuClose();
21502
- }
21601
+ onMenuClose === null || onMenuClose === void 0 ? void 0 : onMenuClose();
21503
21602
  };
21504
21603
  useOnClickOutsideWithRef(list, handleCloseMenu, button);
21505
- var isButtonDisabled = isDisabled || items.length === 0;
21506
21604
  var _obj;
21507
21605
  return /* @__PURE__ */ jsxs("div", {
21508
21606
  className: classes.root,
21509
21607
  children: [
21510
21608
  /* @__PURE__ */ jsx("button", _object_spread_props$9(_object_spread$b({
21511
- 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)),
21512
- onClick: !isButtonDisabled ? toggleMenu : void 0,
21513
21609
  ref: button,
21514
- "data-testid": testId
21515
- }, addDataAttributes(data)), {
21610
+ 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))
21611
+ }, addDataTestId(testId), addDataAttributes(data)), {
21612
+ onClick: !isButtonDisabled ? toggleMenu : void 0,
21516
21613
  children: /* @__PURE__ */ jsx("div", {
21517
21614
  className: classes.icon,
21518
21615
  children: /* @__PURE__ */ jsx(Icon, {
@@ -21525,8 +21622,9 @@ var MoreMenu = function(param) {
21525
21622
  ref: list,
21526
21623
  children: /* @__PURE__ */ jsx(List, {
21527
21624
  items,
21528
- onClick: handleCloseMenu,
21529
- testId: testId !== void 0 ? "".concat(testId, "-list") : void 0
21625
+ testId: getTestId(testId, "list"),
21626
+ tweakStyles: tweakListStyles,
21627
+ onClick: handleCloseMenu
21530
21628
  })
21531
21629
  })
21532
21630
  ]
@@ -21600,9 +21698,8 @@ var styles$b = {
21600
21698
  };
21601
21699
  function MultiSelectInput(param) {
21602
21700
  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;
21603
- var _v;
21604
21701
  var classes = useTheme("MultiSelectInput", styles$b).classes;
21605
- var value = (_v = v) === null || _v === void 0 ? void 0 : _v.include;
21702
+ var value = v === null || v === void 0 ? void 0 : v.include;
21606
21703
  return /* @__PURE__ */ jsxs("div", {
21607
21704
  className: classes.root,
21608
21705
  onClick: function() {
@@ -22167,7 +22264,6 @@ var SmartInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
22167
22264
  value
22168
22265
  ]);
22169
22266
  var handleChange = function(str, event) {
22170
- var _event;
22171
22267
  var mappedValue = str.split("").map(function(symbol) {
22172
22268
  return regex.test(symbol) ? symbol : transformCaseSensitive(smartType, smartType !== "email" ? CharactersMap : _object_spread_props$7(_object_spread$9({}, CharactersMap), {
22173
22269
  '"': "@"
@@ -22175,7 +22271,7 @@ var SmartInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
22175
22271
  }).filter(function(symbol) {
22176
22272
  return regex.test(symbol);
22177
22273
  }).join("");
22178
- var domElement = (_event = event) === null || _event === void 0 ? void 0 : _event.currentTarget;
22274
+ var domElement = event === null || event === void 0 ? void 0 : event.currentTarget;
22179
22275
  if (domElement) {
22180
22276
  if (!input) {
22181
22277
  setInput(domElement);
@@ -22190,7 +22286,6 @@ var SmartInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
22190
22286
  }
22191
22287
  };
22192
22288
  var handlePaste = function(event) {
22193
- var _currentValue, _currentValue1;
22194
22289
  var str = event.clipboardData.getData("text/plain").split("").join("");
22195
22290
  var domElement = event.currentTarget;
22196
22291
  if (!input) {
@@ -22211,7 +22306,7 @@ var SmartInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
22211
22306
  var validMappedValueLength = mappedValue.length - (newValueLength - maxLength);
22212
22307
  mappedValue = mappedValue.substring(0, validMappedValueLength);
22213
22308
  }
22214
- 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)));
22309
+ 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)));
22215
22310
  setCaretPosition2(selectionStart + mappedValue.length);
22216
22311
  setCurrentValue(newValue);
22217
22312
  onChange(newValue);
@@ -25369,8 +25464,7 @@ var PhoneInput = function(_param) {
25369
25464
  var phoneWithCode = getFullPhone(value);
25370
25465
  var _value_countryCode;
25371
25466
  var countryCode = useMemo(function() {
25372
- var _value;
25373
- return (_value_countryCode = (_value = value) === null || _value === void 0 ? void 0 : _value.countryCode) !== null && _value_countryCode !== void 0 ? _value_countryCode : getCountryCodeFromPhone(phoneWithCode);
25467
+ return (_value_countryCode = value === null || value === void 0 ? void 0 : value.countryCode) !== null && _value_countryCode !== void 0 ? _value_countryCode : getCountryCodeFromPhone(phoneWithCode);
25374
25468
  }, [
25375
25469
  value.dialCode,
25376
25470
  value.phoneNumber
@@ -25400,7 +25494,6 @@ var PhoneInput = function(_param) {
25400
25494
  }
25401
25495
  };
25402
25496
  var handleSelect = function(newPhoneInfo, event) {
25403
- var _inputRef;
25404
25497
  if (newPhoneInfo.countryCode !== countryCode) {
25405
25498
  onChange({
25406
25499
  phoneNumber: "",
@@ -25409,7 +25502,7 @@ var PhoneInput = function(_param) {
25409
25502
  }, event);
25410
25503
  }
25411
25504
  handleClose();
25412
- var input = (_inputRef = inputRef) === null || _inputRef === void 0 ? void 0 : _inputRef.current;
25505
+ var input = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
25413
25506
  if (input !== null) {
25414
25507
  input.focus();
25415
25508
  }
@@ -25417,15 +25510,13 @@ var PhoneInput = function(_param) {
25417
25510
  var handleFocus = function(event) {
25418
25511
  setFocused(true);
25419
25512
  if (inputProps.onFocus !== void 0) {
25420
- var _inputProps;
25421
- (_inputProps = inputProps) === null || _inputProps === void 0 ? void 0 : _inputProps.onFocus(event);
25513
+ inputProps === null || inputProps === void 0 ? void 0 : inputProps.onFocus(event);
25422
25514
  }
25423
25515
  };
25424
25516
  var handleBlur = function(event) {
25425
25517
  setFocused(false);
25426
25518
  if (inputProps.onBlur !== void 0) {
25427
- var _inputProps;
25428
- (_inputProps = inputProps) === null || _inputProps === void 0 ? void 0 : _inputProps.onBlur(event);
25519
+ inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur(event);
25429
25520
  }
25430
25521
  };
25431
25522
  useOnClickOutsideWithRef(list, handleClose, inputWrapper);
@@ -26680,7 +26771,7 @@ function _object_spread_props(target, source) {
26680
26771
  }
26681
26772
  return target;
26682
26773
  }
26683
- function _ts_generator(thisArg, body) {
26774
+ var __generator = globalThis && globalThis.__generator || function(thisArg, body) {
26684
26775
  var f, y, t, g, _ = {
26685
26776
  label: 0,
26686
26777
  sent: function() {
@@ -26781,7 +26872,7 @@ function _ts_generator(thisArg, body) {
26781
26872
  done: true
26782
26873
  };
26783
26874
  }
26784
- }
26875
+ };
26785
26876
  var DEFAULT_TIMEOUT = 7 * 1e3;
26786
26877
  var Toaster = function(param) {
26787
26878
  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;
@@ -26793,7 +26884,7 @@ var Toaster = function(param) {
26793
26884
  }
26794
26885
  var disappear = function() {
26795
26886
  var _ref = _async_to_generator(function() {
26796
- return _ts_generator(this, function(_state) {
26887
+ return __generator(this, function(_state) {
26797
26888
  switch (_state.label) {
26798
26889
  case 0:
26799
26890
  return [