@true-engineering/true-react-common-ui-kit 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/README.md +16 -0
- package/dist/components/Button/Button.d.ts +3 -4
- package/dist/components/Flag/augment.d.ts +1 -1
- package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +3 -4
- package/dist/components/List/List.d.ts +3 -4
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +4 -4
- package/dist/components/Select/Select.d.ts +2 -3
- package/dist/helpers/deprecated.d.ts +12 -0
- package/dist/helpers/index.d.ts +2 -2
- package/dist/helpers/misc.d.ts +19 -0
- package/dist/helpers/snippets.d.ts +3 -3
- package/dist/true-react-common-ui-kit.js +389 -405
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +389 -406
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/vite-env.d.ts +1 -1
- package/package.json +93 -92
- package/src/components/AccountInfo/AccountInfo.stories.tsx +32 -32
- package/src/components/AccountInfo/AccountInfo.styles.ts +55 -55
- package/src/components/AccountInfo/AccountInfo.tsx +77 -77
- package/src/components/AccountInfo/index.ts +2 -2
- package/src/components/AddButton/AddButton.stories.tsx +21 -21
- package/src/components/AddButton/AddButton.styles.ts +34 -34
- package/src/components/AddButton/AddButton.tsx +48 -48
- package/src/components/AddButton/index.ts +2 -2
- package/src/components/Button/Button.stories.tsx +52 -52
- package/src/components/Button/Button.styles.ts +196 -196
- package/src/components/Button/Button.tsx +167 -187
- package/src/components/Button/index.ts +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +32 -32
- package/src/components/Checkbox/Checkbox.styles.ts +62 -62
- package/src/components/Checkbox/Checkbox.tsx +105 -100
- package/src/components/Checkbox/index.ts +2 -2
- package/src/components/CloseButton/CloseButton.styles.ts +34 -34
- package/src/components/CloseButton/CloseButton.tsx +35 -35
- package/src/components/CloseButton/index.ts +2 -2
- package/src/components/Colors/Colors.stories.tsx +7 -7
- package/src/components/Colors/Colors.styles.ts +38 -38
- package/src/components/Colors/Colors.tsx +26 -26
- package/src/components/Colors/index.ts +2 -2
- package/src/components/CssBaseline/CssBaseline.styles.ts +15 -15
- package/src/components/CssBaseline/CssBaseline.tsx +15 -15
- package/src/components/CssBaseline/index.ts +2 -2
- package/src/components/DateInput/DateInput.stories.tsx +61 -61
- package/src/components/DateInput/DateInput.styles.ts +14 -14
- package/src/components/DateInput/DateInput.tsx +82 -82
- package/src/components/DateInput/constants.ts +2 -2
- package/src/components/DateInput/index.ts +3 -3
- package/src/components/DatePicker/DatePicker.stories.tsx +87 -87
- package/src/components/DatePicker/DatePicker.styles.ts +44 -44
- package/src/components/DatePicker/DatePicker.tsx +327 -322
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.ts +84 -84
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.tsx +79 -79
- package/src/components/DatePicker/DatePickerHeader/index.ts +2 -2
- package/src/components/DatePicker/constants.ts +1 -1
- package/src/components/DatePicker/helpers.ts +23 -19
- package/src/components/DatePicker/index.ts +3 -3
- package/src/components/DatePicker/types.ts +45 -45
- package/src/components/Description/Description.stories.tsx +27 -27
- package/src/components/Description/Description.styles.ts +31 -31
- package/src/components/Description/Description.tsx +60 -60
- package/src/components/Description/index.ts +2 -2
- package/src/components/FiltersPane/FilterInterval/FilterInterval.styles.ts +64 -64
- package/src/components/FiltersPane/FilterInterval/FilterInterval.tsx +143 -143
- package/src/components/FiltersPane/FilterInterval/index.ts +1 -1
- package/src/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.tsx +10 -10
- package/src/components/FiltersPane/FilterMultiSelect/index.ts +1 -1
- package/src/components/FiltersPane/FilterSelect/FilterSelect.styles.ts +143 -143
- package/src/components/FiltersPane/FilterSelect/FilterSelect.tsx +348 -347
- package/src/components/FiltersPane/FilterSelect/index.ts +1 -1
- package/src/components/FiltersPane/FilterSelect/locales.ts +37 -37
- package/src/components/FiltersPane/FilterValueView/FilterValueView.styles.tsx +15 -15
- package/src/components/FiltersPane/FilterValueView/FilterValueView.tsx +166 -166
- package/src/components/FiltersPane/FilterValueView/index.tsx +1 -1
- package/src/components/FiltersPane/FilterWithDates/FilterWithDates.styles.ts +60 -60
- package/src/components/FiltersPane/FilterWithDates/FilterWithDates.tsx +184 -183
- package/src/components/FiltersPane/FilterWithDates/index.ts +1 -1
- package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.ts +17 -17
- package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.tsx +198 -198
- package/src/components/FiltersPane/FilterWithPeriod/index.ts +1 -1
- package/src/components/FiltersPane/FilterWrapper/FilterWrapper.styles.ts +110 -110
- package/src/components/FiltersPane/FilterWrapper/FilterWrapper.tsx +346 -346
- package/src/components/FiltersPane/FilterWrapper/index.ts +1 -1
- package/src/components/FiltersPane/FiltersPane.stories.tsx +295 -295
- package/src/components/FiltersPane/FiltersPane.styles.ts +71 -71
- package/src/components/FiltersPane/FiltersPane.tsx +151 -151
- package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.ts +109 -109
- package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.tsx +155 -155
- package/src/components/FiltersPane/FiltersPaneSearch/index.ts +1 -1
- package/src/components/FiltersPane/index.ts +20 -20
- package/src/components/FiltersPane/locales.ts +107 -107
- package/src/components/FiltersPane/types.ts +112 -112
- package/src/components/Flag/Flag.stories.tsx +29 -29
- package/src/components/Flag/Flag.styles.ts +18 -18
- package/src/components/Flag/Flag.tsx +27 -27
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/Flag/index.ts +2 -2
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +84 -84
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +131 -131
- package/src/components/FlexibleTable/FlexibleTable.tsx +205 -205
- package/src/components/FlexibleTable/TableRow.tsx +152 -152
- package/src/components/FlexibleTable/TableValue.tsx +75 -75
- package/src/components/FlexibleTable/fixture-test.ts +254 -254
- package/src/components/FlexibleTable/index.ts +3 -3
- package/src/components/FlexibleTable/types.ts +52 -52
- package/src/components/Icon/ComplexIconBoilerplate.tsx +17 -17
- package/src/components/Icon/Icon.stories.tsx +85 -85
- package/src/components/Icon/Icon.styles.ts +10 -10
- package/src/components/Icon/Icon.tsx +32 -32
- package/src/components/Icon/IconBoilerplate.tsx +42 -42
- package/src/components/Icon/complexIcons/augment.d.ts +1 -1
- package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
- package/src/components/Icon/complexIcons/icons.ts +7 -7
- package/src/components/Icon/complexIcons/index.ts +1 -1
- package/src/components/Icon/icons/icons.ts +838 -838
- package/src/components/Icon/icons/index.ts +1 -1
- package/src/components/Icon/index.ts +4 -4
- package/src/components/IncrementInput/ChangeButton.tsx +33 -33
- package/src/components/IncrementInput/IncrementInput.stories.tsx +31 -31
- package/src/components/IncrementInput/IncrementInput.styles.ts +77 -77
- package/src/components/IncrementInput/IncrementInput.tsx +80 -79
- package/src/components/IncrementInput/index.ts +2 -2
- package/src/components/Input/Input.stories.tsx +86 -86
- package/src/components/Input/Input.styles.ts +307 -307
- package/src/components/Input/Input.tsx +311 -306
- package/src/components/Input/index.ts +2 -2
- package/src/components/List/List.stories.tsx +62 -62
- package/src/components/List/List.styles.ts +52 -52
- package/src/components/List/List.tsx +64 -61
- package/src/components/List/index.ts +2 -2
- package/src/components/Modal/Modal.stories.tsx +105 -105
- package/src/components/Modal/Modal.styles.ts +305 -305
- package/src/components/Modal/Modal.tsx +200 -181
- package/src/components/Modal/index.ts +2 -2
- package/src/components/MoreMenu/MoreMenu.stories.tsx +46 -46
- package/src/components/MoreMenu/MoreMenu.styles.ts +70 -70
- package/src/components/MoreMenu/MoreMenu.tsx +90 -89
- package/src/components/MoreMenu/index.ts +2 -2
- package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
- package/src/components/MultiSelect/MultiSelect.styles.ts +55 -55
- package/src/components/MultiSelect/MultiSelect.tsx +89 -89
- package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.ts +73 -73
- package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.tsx +51 -51
- package/src/components/MultiSelect/MultiSelectInput/index.ts +1 -1
- package/src/components/MultiSelect/index.ts +3 -3
- package/src/components/MultiSelectList/MultiSelectList.styles.ts +124 -124
- package/src/components/MultiSelectList/MultiSelectList.tsx +451 -451
- package/src/components/MultiSelectList/index.ts +2 -2
- package/src/components/MultiSelectList/locales.ts +37 -37
- package/src/components/Notification/Notification.stories.tsx +46 -46
- package/src/components/Notification/Notification.styles.ts +50 -50
- package/src/components/Notification/Notification.tsx +79 -75
- package/src/components/Notification/index.ts +2 -2
- package/src/components/NumberInput/NumberInput.stories.tsx +35 -35
- package/src/components/NumberInput/NumberInput.tsx +133 -133
- package/src/components/NumberInput/helpers.ts +86 -85
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/PhoneInput.stories.tsx +70 -70
- package/src/components/PhoneInput/PhoneInput.styles.ts +84 -84
- package/src/components/PhoneInput/PhoneInput.tsx +194 -194
- package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.stories.tsx +21 -21
- package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.ts +100 -100
- package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.tsx +147 -147
- package/src/components/PhoneInput/PhoneInputCountryList/index.ts +2 -2
- package/src/components/PhoneInput/index.ts +6 -6
- package/src/components/PhoneInput/phone-info.ts +2147 -2147
- package/src/components/PhoneInput/types.ts +16 -16
- package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
- package/src/components/RadioButton/RadioButton.styles.ts +37 -37
- package/src/components/RadioButton/RadioButton.tsx +55 -54
- package/src/components/RadioButton/index.ts +2 -2
- package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +61 -61
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/SearchInput/SearchInput.stories.tsx +23 -23
- package/src/components/SearchInput/SearchInput.styles.ts +50 -50
- package/src/components/SearchInput/SearchInput.tsx +50 -49
- package/src/components/SearchInput/index.ts +2 -2
- package/src/components/Select/MultiSelect.stories.tsx +240 -240
- package/src/components/Select/Select.stories.tsx +235 -235
- package/src/components/Select/Select.styles.ts +96 -96
- package/src/components/Select/Select.tsx +575 -575
- package/src/components/Select/SelectList/SelectList.styles.ts +72 -72
- package/src/components/Select/SelectList/SelectList.tsx +158 -152
- package/src/components/Select/SelectList/index.ts +1 -1
- package/src/components/Select/SelectListItem/SelectListItem.styles.ts +14 -14
- package/src/components/Select/SelectListItem/SelectListItem.tsx +68 -67
- package/src/components/Select/constants.ts +2 -2
- package/src/components/Select/helpers.ts +26 -26
- package/src/components/Select/index.ts +4 -4
- package/src/components/Select/types.ts +1 -1
- package/src/components/SmartInput/SmartInput.stories.tsx +50 -50
- package/src/components/SmartInput/SmartInput.tsx +147 -147
- package/src/components/SmartInput/helpers.ts +85 -85
- package/src/components/SmartInput/index.ts +1 -1
- package/src/components/Switch/Switch.stories.tsx +40 -40
- package/src/components/Switch/Switch.styles.ts +75 -75
- package/src/components/Switch/Switch.tsx +83 -82
- package/src/components/Switch/index.ts +2 -2
- package/src/components/TextArea/TextArea.stories.tsx +35 -35
- package/src/components/TextArea/TextArea.styles.ts +153 -153
- package/src/components/TextArea/TextArea.tsx +165 -165
- package/src/components/TextArea/index.ts +2 -2
- package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
- package/src/components/TextWithInfo/TextWithInfo.styles.ts +60 -60
- package/src/components/TextWithInfo/TextWithInfo.tsx +60 -60
- package/src/components/TextWithInfo/index.ts +2 -2
- package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
- package/src/components/TextWithTooltip/TextWithTooltip.styles.ts +19 -19
- package/src/components/TextWithTooltip/TextWithTooltip.tsx +143 -143
- package/src/components/TextWithTooltip/index.ts +2 -2
- package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
- package/src/components/ThemedPreloader/ThemedPreloader.styles.ts +21 -21
- package/src/components/ThemedPreloader/ThemedPreloader.tsx +50 -50
- package/src/components/ThemedPreloader/components/DefaultPreloader/DefaultPreloader.tsx +29 -29
- package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
- package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.ts +54 -54
- package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.tsx +18 -18
- package/src/components/ThemedPreloader/components/DotsPreloader/index.ts +2 -2
- package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.ts +11 -11
- package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.tsx +25 -25
- package/src/components/ThemedPreloader/components/SvgPreloader/index.ts +2 -2
- package/src/components/ThemedPreloader/components/index.ts +2 -2
- package/src/components/ThemedPreloader/index.ts +2 -2
- package/src/components/Toaster/Toaster.stories.tsx +30 -30
- package/src/components/Toaster/Toaster.styles.ts +59 -59
- package/src/components/Toaster/Toaster.tsx +110 -105
- package/src/components/Toaster/index.ts +2 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +19 -19
- package/src/components/Tooltip/Tooltip.styles.ts +45 -45
- package/src/components/Tooltip/Tooltip.tsx +35 -35
- package/src/components/Tooltip/index.ts +3 -3
- package/src/components/Tooltip/types.ts +1 -1
- package/src/components/index.ts +36 -36
- package/src/helpers/deprecated.ts +22 -0
- package/src/helpers/index.ts +4 -4
- package/src/helpers/{utils.ts → misc.ts} +158 -231
- package/src/helpers/phone.ts +87 -87
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/helpers/snippets.tsx +6 -5
- package/src/hooks/index.ts +6 -6
- package/src/hooks/use-did-mount-effect.ts +18 -18
- package/src/hooks/use-dropdown.ts +82 -82
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/hooks/use-on-click-outside.ts +77 -77
- package/src/hooks/use-theme.ts +32 -32
- package/src/hooks/use-tweak-styles.ts +13 -13
- package/src/index.ts +6 -6
- package/src/theme.ts +149 -149
- package/src/types.ts +107 -98
- package/src/vite-env.d.ts +1 -1
- package/dist/helpers/colors.d.ts +0 -2
- package/dist/helpers/utils.d.ts +0 -43
- package/src/helpers/colors.ts +0 -3
- package/src/helpers/dateHelpers/date-helpers.ts +0 -9
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useCallback, createContext, useContext, useMemo, useState, createElement, Fragment as Fragment$1, forwardRef, createRef, PureComponent, useLayoutEffect } from "react";
|
|
2
2
|
import { CSSTransition } from "react-transition-group";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import
|
|
4
|
+
import { isNotEmpty as isNotEmpty$1, isEmpty as isEmpty$1, isString, isStringNotEmpty as isStringNotEmpty$1, isNumberInteger, addClickHandler as addClickHandler$1, addDataTestId as addDataTestId$1, createFilter as createFilter$1, getSelectKeyHandler as getSelectKeyHandler$1, getTestId as getTestId$1, isReactNodeNotEmpty } from "@true-engineering/true-react-platform-helpers";
|
|
5
5
|
import { createUseStyles } from "react-jss";
|
|
6
6
|
import InputMask from "react-input-mask";
|
|
7
|
+
import hexToRgba from "hex-to-rgba";
|
|
7
8
|
import ReactDatePicker from "react-datepicker";
|
|
8
9
|
import { Portal } from "react-overlays";
|
|
9
10
|
import { getYear, getMonth, format as format$1, parse, isSameDay, isValid, isAfter, isBefore, startOfMonth, endOfMonth, sub, startOfYear, endOfYear } from "date-fns";
|
|
@@ -1108,7 +1109,22 @@ function requireReactJsxRuntime_development() {
|
|
|
1108
1109
|
const Fragment = jsxRuntime.exports.Fragment;
|
|
1109
1110
|
const jsx = jsxRuntime.exports.jsx;
|
|
1110
1111
|
const jsxs = jsxRuntime.exports.jsxs;
|
|
1111
|
-
var
|
|
1112
|
+
var minWidthModifier = {
|
|
1113
|
+
name: "minWidth",
|
|
1114
|
+
enabled: true,
|
|
1115
|
+
phase: "beforeWrite",
|
|
1116
|
+
requires: [
|
|
1117
|
+
"computeStyles"
|
|
1118
|
+
],
|
|
1119
|
+
fn: function(param) {
|
|
1120
|
+
var state = param.state;
|
|
1121
|
+
state.styles.popper.minWidth = "".concat(state.rects.reference.width, "px");
|
|
1122
|
+
},
|
|
1123
|
+
effect: function(param) {
|
|
1124
|
+
var state = param.state;
|
|
1125
|
+
state.elements.popper.style.minWidth = "".concat(state.elements.reference.offsetWidth, "px");
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1112
1128
|
function _array_like_to_array$q(arr, len) {
|
|
1113
1129
|
if (len == null || len > arr.length)
|
|
1114
1130
|
len = arr.length;
|
|
@@ -1116,18 +1132,125 @@ function _array_like_to_array$q(arr, len) {
|
|
|
1116
1132
|
arr2[i] = arr[i];
|
|
1117
1133
|
return arr2;
|
|
1118
1134
|
}
|
|
1119
|
-
function
|
|
1120
|
-
if (Array.isArray(arr))
|
|
1121
|
-
return arr;
|
|
1122
|
-
}
|
|
1123
|
-
function _array_without_holes$7(arr) {
|
|
1135
|
+
function _array_without_holes$6(arr) {
|
|
1124
1136
|
if (Array.isArray(arr))
|
|
1125
1137
|
return _array_like_to_array$q(arr);
|
|
1126
1138
|
}
|
|
1127
|
-
function _iterable_to_array$
|
|
1139
|
+
function _iterable_to_array$6(iter) {
|
|
1128
1140
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1129
1141
|
return Array.from(iter);
|
|
1130
1142
|
}
|
|
1143
|
+
function _non_iterable_spread$6() {
|
|
1144
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1145
|
+
}
|
|
1146
|
+
function _to_consumable_array$6(arr) {
|
|
1147
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
|
|
1148
|
+
}
|
|
1149
|
+
function _unsupported_iterable_to_array$q(o, minLen) {
|
|
1150
|
+
if (!o)
|
|
1151
|
+
return;
|
|
1152
|
+
if (typeof o === "string")
|
|
1153
|
+
return _array_like_to_array$q(o, minLen);
|
|
1154
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1155
|
+
if (n === "Object" && o.constructor)
|
|
1156
|
+
n = o.constructor.name;
|
|
1157
|
+
if (n === "Map" || n === "Set")
|
|
1158
|
+
return Array.from(n);
|
|
1159
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1160
|
+
return _array_like_to_array$q(o, minLen);
|
|
1161
|
+
}
|
|
1162
|
+
var findCountryByCode = function(countryCode) {
|
|
1163
|
+
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1164
|
+
return isNotEmpty$1(countryCode) ? countriesList.find(function(info) {
|
|
1165
|
+
return info.countryCode === countryCode;
|
|
1166
|
+
}) : void 0;
|
|
1167
|
+
};
|
|
1168
|
+
var findCountryIndexByCode = function(countryCode) {
|
|
1169
|
+
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1170
|
+
return isNotEmpty$1(countryCode) ? countriesList.findIndex(function(info) {
|
|
1171
|
+
return info.countryCode === countryCode;
|
|
1172
|
+
}) : -1;
|
|
1173
|
+
};
|
|
1174
|
+
var getCountryTextByLocale = function(country, locale2) {
|
|
1175
|
+
return locale2.toLowerCase() === "ru" ? country.countryRu : country.countryEn;
|
|
1176
|
+
};
|
|
1177
|
+
var sortCountriesByLocale = function(countriesList, locale2) {
|
|
1178
|
+
return countriesList.sort(function(countryA, countryB) {
|
|
1179
|
+
return getCountryTextByLocale(countryA, locale2).localeCompare(getCountryTextByLocale(countryB, locale2));
|
|
1180
|
+
});
|
|
1181
|
+
};
|
|
1182
|
+
var checkSearchStringInCountry = function(country, searchString) {
|
|
1183
|
+
var checkValue = searchString.toLowerCase().trim().replace("+", "");
|
|
1184
|
+
var possibleValues = [
|
|
1185
|
+
country.countryRu,
|
|
1186
|
+
country.countryEn
|
|
1187
|
+
].concat(_to_consumable_array$6(country.countryRu.split(" ")), _to_consumable_array$6(country.countryEn.split(" ")), [
|
|
1188
|
+
country.dialCode
|
|
1189
|
+
]).map(function(part) {
|
|
1190
|
+
return part.toLowerCase();
|
|
1191
|
+
});
|
|
1192
|
+
return possibleValues.some(function(v) {
|
|
1193
|
+
return v.startsWith(checkValue);
|
|
1194
|
+
});
|
|
1195
|
+
};
|
|
1196
|
+
var _phone_dialCode, _phone_phoneNumber;
|
|
1197
|
+
var getFullPhone = function(phone) {
|
|
1198
|
+
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 : "");
|
|
1199
|
+
};
|
|
1200
|
+
var getCountryCodeFromPhone = function(phoneWithCode) {
|
|
1201
|
+
var _phoneInfo_find;
|
|
1202
|
+
var countryCode = (_phoneInfo_find = phoneInfo.find(function(info) {
|
|
1203
|
+
return info.fullCodes.some(function(code) {
|
|
1204
|
+
return phoneWithCode.startsWith(code);
|
|
1205
|
+
});
|
|
1206
|
+
})) === null || _phoneInfo_find === void 0 ? void 0 : _phoneInfo_find.countryCode;
|
|
1207
|
+
if (isEmpty$1(countryCode) && isNotEmpty$1(phoneWithCode)) {
|
|
1208
|
+
var _phoneInfo_filter_sort_;
|
|
1209
|
+
var _infoA_dialCodePriority, _infoB_dialCodePriority;
|
|
1210
|
+
countryCode = (_phoneInfo_filter_sort_ = phoneInfo.filter(function(info) {
|
|
1211
|
+
return phoneWithCode.startsWith(info.dialCode);
|
|
1212
|
+
}).sort(function(infoA, infoB) {
|
|
1213
|
+
return ((_infoA_dialCodePriority = infoA.dialCodePriority) !== null && _infoA_dialCodePriority !== void 0 ? _infoA_dialCodePriority : 1e3) - ((_infoB_dialCodePriority = infoB.dialCodePriority) !== null && _infoB_dialCodePriority !== void 0 ? _infoB_dialCodePriority : 1e3);
|
|
1214
|
+
})[0]) === null || _phoneInfo_filter_sort_ === void 0 ? void 0 : _phoneInfo_filter_sort_.countryCode;
|
|
1215
|
+
}
|
|
1216
|
+
return countryCode;
|
|
1217
|
+
};
|
|
1218
|
+
var getPhoneObjFromString = function(fullPhone, countryCode) {
|
|
1219
|
+
var _findCountryByCode;
|
|
1220
|
+
var newCountryCode = countryCode !== null && countryCode !== void 0 ? countryCode : getCountryCodeFromPhone(fullPhone);
|
|
1221
|
+
var dialCode = (_findCountryByCode = findCountryByCode(newCountryCode)) === null || _findCountryByCode === void 0 ? void 0 : _findCountryByCode.dialCode;
|
|
1222
|
+
var phoneNumber = fullPhone.slice(dialCode === null || dialCode === void 0 ? void 0 : dialCode.length);
|
|
1223
|
+
return {
|
|
1224
|
+
dialCode,
|
|
1225
|
+
phoneNumber,
|
|
1226
|
+
countryCode: newCountryCode
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
var DEFAULT_PHONE_MASK = "+ 9 999 999 999 999 99";
|
|
1230
|
+
var getPhoneMask = function(countryCode) {
|
|
1231
|
+
var mask = DEFAULT_PHONE_MASK;
|
|
1232
|
+
if (isNotEmpty$1(countryCode)) {
|
|
1233
|
+
var countrySettings = findCountryByCode(countryCode);
|
|
1234
|
+
if (countrySettings !== void 0) {
|
|
1235
|
+
var dialCodeLength = countrySettings.dialCode.length;
|
|
1236
|
+
var _countrySettings_phoneMask;
|
|
1237
|
+
var areaAndPhoneMask = (_countrySettings_phoneMask = countrySettings.phoneMask) !== null && _countrySettings_phoneMask !== void 0 ? _countrySettings_phoneMask : mask.substring(2, mask.length - dialCodeLength);
|
|
1238
|
+
mask = "+ ".concat("9".repeat(dialCodeLength), " ").concat(areaAndPhoneMask);
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
return mask;
|
|
1242
|
+
};
|
|
1243
|
+
function _array_like_to_array$p(arr, len) {
|
|
1244
|
+
if (len == null || len > arr.length)
|
|
1245
|
+
len = arr.length;
|
|
1246
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
1247
|
+
arr2[i] = arr[i];
|
|
1248
|
+
return arr2;
|
|
1249
|
+
}
|
|
1250
|
+
function _array_with_holes$o(arr) {
|
|
1251
|
+
if (Array.isArray(arr))
|
|
1252
|
+
return arr;
|
|
1253
|
+
}
|
|
1131
1254
|
function _iterable_to_array_limit$o(arr, i) {
|
|
1132
1255
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1133
1256
|
if (_i == null)
|
|
@@ -1159,28 +1282,23 @@ function _iterable_to_array_limit$o(arr, i) {
|
|
|
1159
1282
|
function _non_iterable_rest$o() {
|
|
1160
1283
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1161
1284
|
}
|
|
1162
|
-
function _non_iterable_spread$7() {
|
|
1163
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1164
|
-
}
|
|
1165
1285
|
function _sliced_to_array$o(arr, i) {
|
|
1166
|
-
return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$
|
|
1167
|
-
}
|
|
1168
|
-
function _to_consumable_array$7(arr) {
|
|
1169
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$7();
|
|
1286
|
+
return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$p(arr, i) || _non_iterable_rest$o();
|
|
1170
1287
|
}
|
|
1171
|
-
function _unsupported_iterable_to_array$
|
|
1288
|
+
function _unsupported_iterable_to_array$p(o, minLen) {
|
|
1172
1289
|
if (!o)
|
|
1173
1290
|
return;
|
|
1174
1291
|
if (typeof o === "string")
|
|
1175
|
-
return _array_like_to_array$
|
|
1292
|
+
return _array_like_to_array$p(o, minLen);
|
|
1176
1293
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1177
1294
|
if (n === "Object" && o.constructor)
|
|
1178
1295
|
n = o.constructor.name;
|
|
1179
1296
|
if (n === "Map" || n === "Set")
|
|
1180
1297
|
return Array.from(n);
|
|
1181
1298
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1182
|
-
return _array_like_to_array$
|
|
1299
|
+
return _array_like_to_array$p(o, minLen);
|
|
1183
1300
|
}
|
|
1301
|
+
var rgba = hexToRgba;
|
|
1184
1302
|
var transformToKebab = function(string) {
|
|
1185
1303
|
var result = "";
|
|
1186
1304
|
string.split("").forEach(function(char) {
|
|
@@ -1292,21 +1410,9 @@ var setCaretPosition = function(elem, caretPos) {
|
|
|
1292
1410
|
var isSpaceChar = function(char) {
|
|
1293
1411
|
return char !== void 0 && char.match(/\s/) !== null;
|
|
1294
1412
|
};
|
|
1295
|
-
var isInt = function(n) {
|
|
1296
|
-
return n % 1 === 0;
|
|
1297
|
-
};
|
|
1298
1413
|
var getNumberLength = function(n) {
|
|
1299
1414
|
return n === void 0 || isNaN(n) ? 0 : n.toString().length;
|
|
1300
1415
|
};
|
|
1301
|
-
var isNotEmpty = function(val) {
|
|
1302
|
-
return typeof val === "string" ? val.trim() !== "" : val !== null && val !== void 0;
|
|
1303
|
-
};
|
|
1304
|
-
var isEmpty = function(val) {
|
|
1305
|
-
return val === null || val === void 0;
|
|
1306
|
-
};
|
|
1307
|
-
var isStringNotEmpty = function(value) {
|
|
1308
|
-
return (value !== null && value !== void 0 ? value : "").trim() !== "";
|
|
1309
|
-
};
|
|
1310
1416
|
var trimStringToMaxLength = function(val, maxLength) {
|
|
1311
1417
|
return val.length > maxLength ? val.slice(0, maxLength) : val;
|
|
1312
1418
|
};
|
|
@@ -1314,191 +1420,22 @@ var addDataAttributes = function() {
|
|
|
1314
1420
|
var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1315
1421
|
return Object.fromEntries(Object.entries(data).map(function(param) {
|
|
1316
1422
|
var _param = _sliced_to_array$o(param, 2), key = _param[0], value = _param[1];
|
|
1317
|
-
return isNotEmpty(value) ? [
|
|
1423
|
+
return isString(value) && isStringNotEmpty$1(value) || isNotEmpty$1(value) ? [
|
|
1318
1424
|
"data-".concat(transformToKebab(key)),
|
|
1319
1425
|
value
|
|
1320
1426
|
] : [];
|
|
1321
1427
|
}));
|
|
1322
1428
|
};
|
|
1323
|
-
var
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
if (!isNotEmpty(testId)) {
|
|
1334
|
-
return void 0;
|
|
1335
|
-
}
|
|
1336
|
-
return isNotEmpty(postfix) ? "".concat(testId, "-").concat(postfix) : testId;
|
|
1337
|
-
};
|
|
1338
|
-
var getSelectKeyHandler = function(cb) {
|
|
1339
|
-
return function(e) {
|
|
1340
|
-
if (e.code === "Enter" || e.code === "NumpadEnter") {
|
|
1341
|
-
cb(e);
|
|
1342
|
-
}
|
|
1343
|
-
};
|
|
1344
|
-
};
|
|
1345
|
-
var addClickHandler = function(cb) {
|
|
1346
|
-
var hasAction = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
1347
|
-
return hasAction && isNotEmpty(cb) ? {
|
|
1348
|
-
tabIndex: 0,
|
|
1349
|
-
onClick: cb,
|
|
1350
|
-
onKeyDown: getSelectKeyHandler(cb)
|
|
1351
|
-
} : {
|
|
1352
|
-
tabIndex: -1
|
|
1353
|
-
};
|
|
1354
|
-
};
|
|
1355
|
-
var createFilter = function(getter, compareFn) {
|
|
1356
|
-
return function(items, query) {
|
|
1357
|
-
return items.filter(function(item) {
|
|
1358
|
-
var possibleValues = getter(item).reduce(function(acc, cur) {
|
|
1359
|
-
return _to_consumable_array$7(acc).concat(_to_consumable_array$7(isStringNotEmpty(cur) ? [
|
|
1360
|
-
cur.toLowerCase()
|
|
1361
|
-
] : []));
|
|
1362
|
-
}, []);
|
|
1363
|
-
var queryString = query.toLowerCase().trim();
|
|
1364
|
-
return possibleValues.some(function(v) {
|
|
1365
|
-
return (compareFn !== null && compareFn !== void 0 ? compareFn : function() {
|
|
1366
|
-
return v === null || v === void 0 ? void 0 : v.includes(queryString);
|
|
1367
|
-
})(v, queryString);
|
|
1368
|
-
});
|
|
1369
|
-
});
|
|
1370
|
-
};
|
|
1371
|
-
};
|
|
1372
|
-
var minWidthModifier = {
|
|
1373
|
-
name: "minWidth",
|
|
1374
|
-
enabled: true,
|
|
1375
|
-
phase: "beforeWrite",
|
|
1376
|
-
requires: [
|
|
1377
|
-
"computeStyles"
|
|
1378
|
-
],
|
|
1379
|
-
fn: function(param) {
|
|
1380
|
-
var state = param.state;
|
|
1381
|
-
state.styles.popper.minWidth = "".concat(state.rects.reference.width, "px");
|
|
1382
|
-
},
|
|
1383
|
-
effect: function(param) {
|
|
1384
|
-
var state = param.state;
|
|
1385
|
-
state.elements.popper.style.minWidth = "".concat(state.elements.reference.offsetWidth, "px");
|
|
1386
|
-
}
|
|
1387
|
-
};
|
|
1388
|
-
function _array_like_to_array$p(arr, len) {
|
|
1389
|
-
if (len == null || len > arr.length)
|
|
1390
|
-
len = arr.length;
|
|
1391
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
1392
|
-
arr2[i] = arr[i];
|
|
1393
|
-
return arr2;
|
|
1394
|
-
}
|
|
1395
|
-
function _array_without_holes$6(arr) {
|
|
1396
|
-
if (Array.isArray(arr))
|
|
1397
|
-
return _array_like_to_array$p(arr);
|
|
1398
|
-
}
|
|
1399
|
-
function _iterable_to_array$6(iter) {
|
|
1400
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1401
|
-
return Array.from(iter);
|
|
1402
|
-
}
|
|
1403
|
-
function _non_iterable_spread$6() {
|
|
1404
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1405
|
-
}
|
|
1406
|
-
function _to_consumable_array$6(arr) {
|
|
1407
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$p(arr) || _non_iterable_spread$6();
|
|
1408
|
-
}
|
|
1409
|
-
function _unsupported_iterable_to_array$p(o, minLen) {
|
|
1410
|
-
if (!o)
|
|
1411
|
-
return;
|
|
1412
|
-
if (typeof o === "string")
|
|
1413
|
-
return _array_like_to_array$p(o, minLen);
|
|
1414
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1415
|
-
if (n === "Object" && o.constructor)
|
|
1416
|
-
n = o.constructor.name;
|
|
1417
|
-
if (n === "Map" || n === "Set")
|
|
1418
|
-
return Array.from(n);
|
|
1419
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1420
|
-
return _array_like_to_array$p(o, minLen);
|
|
1421
|
-
}
|
|
1422
|
-
var findCountryByCode = function(countryCode) {
|
|
1423
|
-
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1424
|
-
return countryCode !== void 0 ? countriesList.find(function(info) {
|
|
1425
|
-
return info.countryCode === countryCode;
|
|
1426
|
-
}) : void 0;
|
|
1427
|
-
};
|
|
1428
|
-
var findCountryIndexByCode = function(countryCode) {
|
|
1429
|
-
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1430
|
-
return countryCode !== void 0 ? countriesList.findIndex(function(info) {
|
|
1431
|
-
return info.countryCode === countryCode;
|
|
1432
|
-
}) : -1;
|
|
1433
|
-
};
|
|
1434
|
-
var getCountryTextByLocale = function(country, locale2) {
|
|
1435
|
-
return locale2.toLowerCase() === "ru" ? country.countryRu : country.countryEn;
|
|
1436
|
-
};
|
|
1437
|
-
var sortCountriesByLocale = function(countriesList, locale2) {
|
|
1438
|
-
return countriesList.sort(function(countryA, countryB) {
|
|
1439
|
-
return getCountryTextByLocale(countryA, locale2).localeCompare(getCountryTextByLocale(countryB, locale2));
|
|
1440
|
-
});
|
|
1441
|
-
};
|
|
1442
|
-
var checkSearchStringInCountry = function(country, searchString) {
|
|
1443
|
-
var checkValue = searchString.toLowerCase().trim().replace("+", "");
|
|
1444
|
-
var possibleValues = [
|
|
1445
|
-
country.countryRu,
|
|
1446
|
-
country.countryEn
|
|
1447
|
-
].concat(_to_consumable_array$6(country.countryRu.split(" ")), _to_consumable_array$6(country.countryEn.split(" ")), [
|
|
1448
|
-
country.dialCode
|
|
1449
|
-
]).map(function(part) {
|
|
1450
|
-
return part.toLowerCase();
|
|
1451
|
-
});
|
|
1452
|
-
return possibleValues.some(function(v) {
|
|
1453
|
-
return v.startsWith(checkValue);
|
|
1454
|
-
});
|
|
1455
|
-
};
|
|
1456
|
-
var _phone_dialCode, _phone_phoneNumber;
|
|
1457
|
-
var getFullPhone = function(phone) {
|
|
1458
|
-
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 : "");
|
|
1459
|
-
};
|
|
1460
|
-
var getCountryCodeFromPhone = function(phoneWithCode) {
|
|
1461
|
-
var _phoneInfo_find;
|
|
1462
|
-
var countryCode = (_phoneInfo_find = phoneInfo.find(function(info) {
|
|
1463
|
-
return info.fullCodes.some(function(code) {
|
|
1464
|
-
return phoneWithCode.startsWith(code);
|
|
1465
|
-
});
|
|
1466
|
-
})) === null || _phoneInfo_find === void 0 ? void 0 : _phoneInfo_find.countryCode;
|
|
1467
|
-
if (countryCode === void 0 && isNotEmpty(phoneWithCode)) {
|
|
1468
|
-
var _phoneInfo_filter_sort_;
|
|
1469
|
-
var _infoA_dialCodePriority, _infoB_dialCodePriority;
|
|
1470
|
-
countryCode = (_phoneInfo_filter_sort_ = phoneInfo.filter(function(info) {
|
|
1471
|
-
return phoneWithCode.startsWith(info.dialCode);
|
|
1472
|
-
}).sort(function(infoA, infoB) {
|
|
1473
|
-
return ((_infoA_dialCodePriority = infoA.dialCodePriority) !== null && _infoA_dialCodePriority !== void 0 ? _infoA_dialCodePriority : 1e3) - ((_infoB_dialCodePriority = infoB.dialCodePriority) !== null && _infoB_dialCodePriority !== void 0 ? _infoB_dialCodePriority : 1e3);
|
|
1474
|
-
})[0]) === null || _phoneInfo_filter_sort_ === void 0 ? void 0 : _phoneInfo_filter_sort_.countryCode;
|
|
1475
|
-
}
|
|
1476
|
-
return countryCode;
|
|
1477
|
-
};
|
|
1478
|
-
var getPhoneObjFromString = function(fullPhone, countryCode) {
|
|
1479
|
-
var _findCountryByCode;
|
|
1480
|
-
var newCountryCode = countryCode !== null && countryCode !== void 0 ? countryCode : getCountryCodeFromPhone(fullPhone);
|
|
1481
|
-
var dialCode = (_findCountryByCode = findCountryByCode(newCountryCode)) === null || _findCountryByCode === void 0 ? void 0 : _findCountryByCode.dialCode;
|
|
1482
|
-
var phoneNumber = fullPhone.slice(dialCode === null || dialCode === void 0 ? void 0 : dialCode.length);
|
|
1483
|
-
return {
|
|
1484
|
-
dialCode,
|
|
1485
|
-
phoneNumber,
|
|
1486
|
-
countryCode: newCountryCode
|
|
1487
|
-
};
|
|
1488
|
-
};
|
|
1489
|
-
var DEFAULT_PHONE_MASK = "+ 9 999 999 999 999 99";
|
|
1490
|
-
var getPhoneMask = function(countryCode) {
|
|
1491
|
-
var mask = DEFAULT_PHONE_MASK;
|
|
1492
|
-
if (countryCode !== void 0) {
|
|
1493
|
-
var countrySettings = findCountryByCode(countryCode);
|
|
1494
|
-
if (countrySettings !== void 0) {
|
|
1495
|
-
var dialCodeLength = countrySettings.dialCode.length;
|
|
1496
|
-
var _countrySettings_phoneMask;
|
|
1497
|
-
var areaAndPhoneMask = (_countrySettings_phoneMask = countrySettings.phoneMask) !== null && _countrySettings_phoneMask !== void 0 ? _countrySettings_phoneMask : mask.substring(2, mask.length - dialCodeLength);
|
|
1498
|
-
mask = "+ ".concat("9".repeat(dialCodeLength), " ").concat(areaAndPhoneMask);
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
return mask;
|
|
1429
|
+
var isInt = isNumberInteger;
|
|
1430
|
+
var addClickHandler = addClickHandler$1;
|
|
1431
|
+
var addDataTestId = addDataTestId$1;
|
|
1432
|
+
var createFilter = createFilter$1;
|
|
1433
|
+
var getSelectKeyHandler = getSelectKeyHandler$1;
|
|
1434
|
+
var getTestId = getTestId$1;
|
|
1435
|
+
var isStringNotEmpty = isStringNotEmpty$1;
|
|
1436
|
+
var isEmpty = isEmpty$1;
|
|
1437
|
+
var isNotEmpty = function(val) {
|
|
1438
|
+
return isString(val) && isStringNotEmpty(val) || isNotEmpty(val);
|
|
1502
1439
|
};
|
|
1503
1440
|
var useIsMounted = function() {
|
|
1504
1441
|
var isMounted = useRef(false);
|
|
@@ -4057,63 +3994,63 @@ var useDidMountEffect = function(effect3, dependencies) {
|
|
|
4057
3994
|
};
|
|
4058
3995
|
}, dependencies);
|
|
4059
3996
|
};
|
|
4060
|
-
const avatarGreen = ` <svg
|
|
4061
|
-
width="100%"
|
|
4062
|
-
height="100%"
|
|
4063
|
-
viewBox="0 0 32 32"
|
|
4064
|
-
fill="none"
|
|
4065
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4066
|
-
|
|
4067
|
-
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED"
|
|
4068
|
-
<mask
|
|
4069
|
-
id="mask0_0_12744"
|
|
4070
|
-
style="mask-type: 'alpha';"
|
|
4071
|
-
maskUnits="userSpaceOnUse"
|
|
4072
|
-
x="0"
|
|
4073
|
-
y="0"
|
|
4074
|
-
width="32"
|
|
4075
|
-
height="32"
|
|
4076
|
-
|
|
4077
|
-
<circle cx="16" cy="16" r="16" fill="white"
|
|
4078
|
-
</mask
|
|
4079
|
-
<g mask="url(#mask0_0_12744)"
|
|
4080
|
-
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)"
|
|
4081
|
-
<mask
|
|
4082
|
-
id="mask1_0_12744"
|
|
4083
|
-
style="mask-type: 'alpha';"
|
|
4084
|
-
maskUnits="userSpaceOnUse"
|
|
4085
|
-
x="3"
|
|
4086
|
-
y="16"
|
|
4087
|
-
width="26"
|
|
4088
|
-
height="26"
|
|
4089
|
-
|
|
4090
|
-
<circle cx="16" cy="29" r="13" fill="white"
|
|
4091
|
-
</mask
|
|
4092
|
-
<g mask="url(#mask1_0_12744)"
|
|
4093
|
-
<ellipse
|
|
4094
|
-
cx="16"
|
|
4095
|
-
cy="17.5"
|
|
4096
|
-
rx="6"
|
|
4097
|
-
ry="7.5"
|
|
4098
|
-
fill="#505F79"
|
|
4099
|
-
fill-opacity="0.204983"
|
|
4100
|
-
|
|
4101
|
-
</g
|
|
4102
|
-
</g
|
|
4103
|
-
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white"
|
|
4104
|
-
<defs
|
|
4105
|
-
<linearGradient
|
|
4106
|
-
id="paint0_linear_0_12744"
|
|
4107
|
-
x1="13.347"
|
|
4108
|
-
y1="46.279"
|
|
4109
|
-
x2="33.5318"
|
|
4110
|
-
y2="30.8088"
|
|
4111
|
-
gradientUnits="userSpaceOnUse"
|
|
4112
|
-
|
|
4113
|
-
<stop stop-color="#ABD229"
|
|
4114
|
-
<stop offset="1" stop-color="#9CD03F"
|
|
4115
|
-
</linearGradient
|
|
4116
|
-
</defs
|
|
3997
|
+
const avatarGreen = ` <svg
|
|
3998
|
+
width="100%"
|
|
3999
|
+
height="100%"
|
|
4000
|
+
viewBox="0 0 32 32"
|
|
4001
|
+
fill="none"
|
|
4002
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4003
|
+
>
|
|
4004
|
+
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
|
|
4005
|
+
<mask
|
|
4006
|
+
id="mask0_0_12744"
|
|
4007
|
+
style="mask-type: 'alpha';"
|
|
4008
|
+
maskUnits="userSpaceOnUse"
|
|
4009
|
+
x="0"
|
|
4010
|
+
y="0"
|
|
4011
|
+
width="32"
|
|
4012
|
+
height="32"
|
|
4013
|
+
>
|
|
4014
|
+
<circle cx="16" cy="16" r="16" fill="white" />
|
|
4015
|
+
</mask>
|
|
4016
|
+
<g mask="url(#mask0_0_12744)">
|
|
4017
|
+
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
|
|
4018
|
+
<mask
|
|
4019
|
+
id="mask1_0_12744"
|
|
4020
|
+
style="mask-type: 'alpha';"
|
|
4021
|
+
maskUnits="userSpaceOnUse"
|
|
4022
|
+
x="3"
|
|
4023
|
+
y="16"
|
|
4024
|
+
width="26"
|
|
4025
|
+
height="26"
|
|
4026
|
+
>
|
|
4027
|
+
<circle cx="16" cy="29" r="13" fill="white" />
|
|
4028
|
+
</mask>
|
|
4029
|
+
<g mask="url(#mask1_0_12744)">
|
|
4030
|
+
<ellipse
|
|
4031
|
+
cx="16"
|
|
4032
|
+
cy="17.5"
|
|
4033
|
+
rx="6"
|
|
4034
|
+
ry="7.5"
|
|
4035
|
+
fill="#505F79"
|
|
4036
|
+
fill-opacity="0.204983"
|
|
4037
|
+
/>
|
|
4038
|
+
</g>
|
|
4039
|
+
</g>
|
|
4040
|
+
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
|
|
4041
|
+
<defs>
|
|
4042
|
+
<linearGradient
|
|
4043
|
+
id="paint0_linear_0_12744"
|
|
4044
|
+
x1="13.347"
|
|
4045
|
+
y1="46.279"
|
|
4046
|
+
x2="33.5318"
|
|
4047
|
+
y2="30.8088"
|
|
4048
|
+
gradientUnits="userSpaceOnUse"
|
|
4049
|
+
>
|
|
4050
|
+
<stop stop-color="#ABD229" />
|
|
4051
|
+
<stop offset="1" stop-color="#9CD03F" />
|
|
4052
|
+
</linearGradient>
|
|
4053
|
+
</defs>
|
|
4117
4054
|
</svg>`;
|
|
4118
4055
|
var complexIcons = {
|
|
4119
4056
|
avatar: avatarGreen
|
|
@@ -5148,6 +5085,11 @@ var Icon = function(param) {
|
|
|
5148
5085
|
})
|
|
5149
5086
|
}));
|
|
5150
5087
|
};
|
|
5088
|
+
var renderIcon = function(icon) {
|
|
5089
|
+
return typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, {
|
|
5090
|
+
type: icon
|
|
5091
|
+
}) : icon;
|
|
5092
|
+
};
|
|
5151
5093
|
var ITEM_HORIZONTAL_PADDING = 16;
|
|
5152
5094
|
var ICON_SIZE = 20;
|
|
5153
5095
|
var ICON_GAP = 12;
|
|
@@ -5256,7 +5198,7 @@ var List = function(param) {
|
|
|
5256
5198
|
var _item_testId;
|
|
5257
5199
|
return /* @__PURE__ */ jsx("div", _object_spread_props$A(_object_spread$J({
|
|
5258
5200
|
className: classes.root
|
|
5259
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
5201
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
5260
5202
|
children: items.map(function(item, idx) {
|
|
5261
5203
|
var _obj;
|
|
5262
5204
|
return /* @__PURE__ */ jsxs(Fragment$1, {
|
|
@@ -5265,19 +5207,17 @@ var List = function(param) {
|
|
|
5265
5207
|
className: classes.spacer
|
|
5266
5208
|
}),
|
|
5267
5209
|
/* @__PURE__ */ jsxs("div", _object_spread_props$A(_object_spread$J({
|
|
5268
|
-
className: clsx(classes.item, (_obj = {}, _define_property$L(_obj, classes.disabledItem, item.disabled), _define_property$L(_obj, classes.withIconGap, item.withIconGap), _obj))
|
|
5269
|
-
}, addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
|
|
5270
|
-
disabled: item.disabled
|
|
5271
|
-
})), {
|
|
5210
|
+
className: clsx(classes.item, (_obj = {}, _define_property$L(_obj, classes.disabledItem, item.disabled), _define_property$L(_obj, classes.withIconGap, item.withIconGap), _obj)),
|
|
5272
5211
|
onClick: item.disabled ? void 0 : function() {
|
|
5273
5212
|
return handleItemClick(item);
|
|
5274
|
-
}
|
|
5213
|
+
}
|
|
5214
|
+
}, addDataTestId$1((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId$1(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
|
|
5215
|
+
disabled: item.disabled
|
|
5216
|
+
})), {
|
|
5275
5217
|
children: [
|
|
5276
|
-
|
|
5218
|
+
isReactNodeNotEmpty(item.icon) && /* @__PURE__ */ jsx("span", {
|
|
5277
5219
|
className: classes.icon,
|
|
5278
|
-
children:
|
|
5279
|
-
type: item.icon
|
|
5280
|
-
}) : item.icon
|
|
5220
|
+
children: renderIcon(item.icon)
|
|
5281
5221
|
}),
|
|
5282
5222
|
/* @__PURE__ */ jsx("span", {
|
|
5283
5223
|
className: classes.content,
|
|
@@ -6119,8 +6059,8 @@ var Button = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6119
6059
|
tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader,
|
|
6120
6060
|
size
|
|
6121
6061
|
]);
|
|
6122
|
-
var hasIcon =
|
|
6123
|
-
var hasChildren =
|
|
6062
|
+
var hasIcon = isReactNodeNotEmpty(icon);
|
|
6063
|
+
var hasChildren = isReactNodeNotEmpty(children);
|
|
6124
6064
|
var hasNoAction = isDisabled || isLoading;
|
|
6125
6065
|
var _obj, _obj1;
|
|
6126
6066
|
return /* @__PURE__ */ jsxs("button", _object_spread_props$v(_object_spread$E({
|
|
@@ -6131,16 +6071,14 @@ var Button = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6131
6071
|
disabled: hasNoAction,
|
|
6132
6072
|
onClick: !hasNoAction ? onClick : void 0,
|
|
6133
6073
|
onMouseDown: !hasNoAction ? onMouseDown : void 0
|
|
6134
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
6074
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
6135
6075
|
children: [
|
|
6136
6076
|
/* @__PURE__ */ jsxs("span", {
|
|
6137
6077
|
className: clsx(classes.content, (_obj1 = {}, _define_property$G(_obj1, classes.iconFromRight, hasChildren && hasIcon && iconPosition === "right"), _define_property$G(_obj1, classes.iconFromLeft, hasChildren && hasIcon && iconPosition === "left"), _obj1)),
|
|
6138
6078
|
children: [
|
|
6139
6079
|
hasIcon && /* @__PURE__ */ jsx("span", {
|
|
6140
6080
|
className: classes.icon,
|
|
6141
|
-
children:
|
|
6142
|
-
type: icon
|
|
6143
|
-
}) : icon
|
|
6081
|
+
children: isReactNodeNotEmpty(icon) && renderIcon(icon)
|
|
6144
6082
|
}),
|
|
6145
6083
|
hasChildren && /* @__PURE__ */ jsx("span", {
|
|
6146
6084
|
className: clsx(classes.children, hasIcon && classes.withIcon),
|
|
@@ -6350,7 +6288,7 @@ function Checkbox(param) {
|
|
|
6350
6288
|
var _obj;
|
|
6351
6289
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$u(_object_spread$D({
|
|
6352
6290
|
className: clsx(classes.root, (_obj = {}, _define_property$F(_obj, classes.disabled, isDisabled), _define_property$F(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
|
|
6353
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
6291
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
6354
6292
|
children: [
|
|
6355
6293
|
/* @__PURE__ */ jsx("input", _object_spread$D({
|
|
6356
6294
|
type: "checkbox",
|
|
@@ -6360,7 +6298,7 @@ function Checkbox(param) {
|
|
|
6360
6298
|
readOnly: isReadonly
|
|
6361
6299
|
}, hasAction && {
|
|
6362
6300
|
onChange: onToggle,
|
|
6363
|
-
onKeyDown: getSelectKeyHandler(onToggle)
|
|
6301
|
+
onKeyDown: getSelectKeyHandler$1(onToggle)
|
|
6364
6302
|
})),
|
|
6365
6303
|
/* @__PURE__ */ jsx("div", {
|
|
6366
6304
|
className: clsx(classes.check, isSelected && classes.checked),
|
|
@@ -6368,7 +6306,7 @@ function Checkbox(param) {
|
|
|
6368
6306
|
type: isSemiChecked ? "minus" : "check"
|
|
6369
6307
|
})
|
|
6370
6308
|
}),
|
|
6371
|
-
|
|
6309
|
+
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
6372
6310
|
className: classes.children,
|
|
6373
6311
|
children
|
|
6374
6312
|
})
|
|
@@ -6633,11 +6571,6 @@ var CssBaseline = function(param) {
|
|
|
6633
6571
|
className: classes.root
|
|
6634
6572
|
}, addDataAttributes(data)));
|
|
6635
6573
|
};
|
|
6636
|
-
var renderIcon = function(icon) {
|
|
6637
|
-
return typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, {
|
|
6638
|
-
type: icon
|
|
6639
|
-
}) : icon;
|
|
6640
|
-
};
|
|
6641
6574
|
var PADDING_X$1 = 12;
|
|
6642
6575
|
var AUTOSIZE_MAX_WIDTH = 480;
|
|
6643
6576
|
var styles$x = {
|
|
@@ -7201,8 +7134,8 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
7201
7134
|
var hasControls = hasClearIcon || iconType !== void 0 || isLoading;
|
|
7202
7135
|
var hasValue = value !== void 0 && value !== "";
|
|
7203
7136
|
var hasUnits = units !== void 0 && units !== "";
|
|
7204
|
-
var hasLabel =
|
|
7205
|
-
var hasPlaceholder = (!hasLabel || hasFocus && !isReadonly) &&
|
|
7137
|
+
var hasLabel = isStringNotEmpty$1(label);
|
|
7138
|
+
var hasPlaceholder = (!hasLabel || hasFocus && !isReadonly) && isStringNotEmpty$1(placeholder);
|
|
7206
7139
|
var shouldShowUnits = (hasValue || isFocused && !hasPlaceholder) && hasUnits;
|
|
7207
7140
|
var _obj;
|
|
7208
7141
|
var props = _object_spread$A({
|
|
@@ -7222,7 +7155,7 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
7222
7155
|
readOnly: isReadonly,
|
|
7223
7156
|
size: isAutoSizeable ? defaultSize : void 0,
|
|
7224
7157
|
tabIndex
|
|
7225
|
-
}, addDataTestId(testId));
|
|
7158
|
+
}, addDataTestId$1(testId));
|
|
7226
7159
|
var tweakPreloaderStyles = useTweakStyles(componentStyles, tweakStyles, "tweakPreloader");
|
|
7227
7160
|
var _obj1, _obj2;
|
|
7228
7161
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -7279,7 +7212,7 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
7279
7212
|
type: "close"
|
|
7280
7213
|
})
|
|
7281
7214
|
}),
|
|
7282
|
-
iconType
|
|
7215
|
+
isReactNodeNotEmpty(iconType) && /* @__PURE__ */ jsx("div", {
|
|
7283
7216
|
className: clsx(classes.inputIcon, _define_property$C({}, classes.activeIcon, !isDisabled && onIconClick !== void 0)),
|
|
7284
7217
|
onClick: !isDisabled ? onIconClick : void 0,
|
|
7285
7218
|
children: renderIcon(iconType)
|
|
@@ -7288,11 +7221,11 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
7288
7221
|
})
|
|
7289
7222
|
]
|
|
7290
7223
|
})),
|
|
7291
|
-
|
|
7224
|
+
isStringNotEmpty$1(infoMessage) && /* @__PURE__ */ jsx("div", {
|
|
7292
7225
|
className: classes.info,
|
|
7293
7226
|
children: infoMessage
|
|
7294
7227
|
}),
|
|
7295
|
-
|
|
7228
|
+
isStringNotEmpty$1(errorMessage) && /* @__PURE__ */ jsx("div", {
|
|
7296
7229
|
className: clsx(classes.error, classes["error-".concat(errorPosition)]),
|
|
7297
7230
|
children: errorMessage
|
|
7298
7231
|
})
|
|
@@ -7362,10 +7295,10 @@ function _object_spread_props$r(target, source) {
|
|
|
7362
7295
|
}
|
|
7363
7296
|
return target;
|
|
7364
7297
|
}
|
|
7365
|
-
function _object_without_properties$
|
|
7298
|
+
function _object_without_properties$9(source, excluded) {
|
|
7366
7299
|
if (source == null)
|
|
7367
7300
|
return {};
|
|
7368
|
-
var target = _object_without_properties_loose$
|
|
7301
|
+
var target = _object_without_properties_loose$9(source, excluded);
|
|
7369
7302
|
var key, i;
|
|
7370
7303
|
if (Object.getOwnPropertySymbols) {
|
|
7371
7304
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7380,7 +7313,7 @@ function _object_without_properties$8(source, excluded) {
|
|
|
7380
7313
|
}
|
|
7381
7314
|
return target;
|
|
7382
7315
|
}
|
|
7383
|
-
function _object_without_properties_loose$
|
|
7316
|
+
function _object_without_properties_loose$9(source, excluded) {
|
|
7384
7317
|
if (source == null)
|
|
7385
7318
|
return {};
|
|
7386
7319
|
var target = {};
|
|
@@ -7395,7 +7328,7 @@ function _object_without_properties_loose$8(source, excluded) {
|
|
|
7395
7328
|
return target;
|
|
7396
7329
|
}
|
|
7397
7330
|
var DateInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
7398
|
-
var date = _param.date, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? "" : _param_startDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? "" : _param_endDate, mask = _param.mask, className = _param.className, placeholder = _param.placeholder, data = _param.data, isRange = _param.isRange, tweakStyles = _param.tweakStyles, onClick = _param.onClick, onChange = _param.onChange, inputProps = _object_without_properties$
|
|
7331
|
+
var date = _param.date, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? "" : _param_startDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? "" : _param_endDate, mask = _param.mask, className = _param.className, placeholder = _param.placeholder, data = _param.data, isRange = _param.isRange, tweakStyles = _param.tweakStyles, onClick = _param.onClick, onChange = _param.onChange, inputProps = _object_without_properties$9(_param, [
|
|
7399
7332
|
"date",
|
|
7400
7333
|
"startDate",
|
|
7401
7334
|
"endDate",
|
|
@@ -7567,10 +7500,10 @@ function _object_spread_props$q(target, source) {
|
|
|
7567
7500
|
}
|
|
7568
7501
|
return target;
|
|
7569
7502
|
}
|
|
7570
|
-
function _object_without_properties$
|
|
7503
|
+
function _object_without_properties$8(source, excluded) {
|
|
7571
7504
|
if (source == null)
|
|
7572
7505
|
return {};
|
|
7573
|
-
var target = _object_without_properties_loose$
|
|
7506
|
+
var target = _object_without_properties_loose$8(source, excluded);
|
|
7574
7507
|
var key, i;
|
|
7575
7508
|
if (Object.getOwnPropertySymbols) {
|
|
7576
7509
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7585,7 +7518,7 @@ function _object_without_properties$7(source, excluded) {
|
|
|
7585
7518
|
}
|
|
7586
7519
|
return target;
|
|
7587
7520
|
}
|
|
7588
|
-
function _object_without_properties_loose$
|
|
7521
|
+
function _object_without_properties_loose$8(source, excluded) {
|
|
7589
7522
|
if (source == null)
|
|
7590
7523
|
return {};
|
|
7591
7524
|
var target = {};
|
|
@@ -7600,7 +7533,7 @@ function _object_without_properties_loose$7(source, excluded) {
|
|
|
7600
7533
|
return target;
|
|
7601
7534
|
}
|
|
7602
7535
|
var SearchInput = function(_param) {
|
|
7603
|
-
var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$
|
|
7536
|
+
var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$8(_param, [
|
|
7604
7537
|
"isClearable",
|
|
7605
7538
|
"tweakStyles",
|
|
7606
7539
|
"testId",
|
|
@@ -7610,7 +7543,7 @@ var SearchInput = function(_param) {
|
|
|
7610
7543
|
var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
|
|
7611
7544
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$q(_object_spread$y({
|
|
7612
7545
|
className: classes.root
|
|
7613
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
7546
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
7614
7547
|
children: [
|
|
7615
7548
|
/* @__PURE__ */ jsx("div", {
|
|
7616
7549
|
className: classes.icon,
|
|
@@ -7621,7 +7554,7 @@ var SearchInput = function(_param) {
|
|
|
7621
7554
|
/* @__PURE__ */ jsx(Input, _object_spread$y({
|
|
7622
7555
|
isClearable,
|
|
7623
7556
|
isActive: props.value !== "" && props.value !== void 0,
|
|
7624
|
-
testId: getTestId(testId, "input"),
|
|
7557
|
+
testId: getTestId$1(testId, "input"),
|
|
7625
7558
|
tweakStyles: tweakInputStyles,
|
|
7626
7559
|
hasFloatingLabel: false,
|
|
7627
7560
|
label: props.placeholder
|
|
@@ -7783,10 +7716,10 @@ function _object_spread$x(target) {
|
|
|
7783
7716
|
}
|
|
7784
7717
|
return target;
|
|
7785
7718
|
}
|
|
7786
|
-
function _object_without_properties$
|
|
7719
|
+
function _object_without_properties$7(source, excluded) {
|
|
7787
7720
|
if (source == null)
|
|
7788
7721
|
return {};
|
|
7789
|
-
var target = _object_without_properties_loose$
|
|
7722
|
+
var target = _object_without_properties_loose$7(source, excluded);
|
|
7790
7723
|
var key, i;
|
|
7791
7724
|
if (Object.getOwnPropertySymbols) {
|
|
7792
7725
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7801,7 +7734,7 @@ function _object_without_properties$6(source, excluded) {
|
|
|
7801
7734
|
}
|
|
7802
7735
|
return target;
|
|
7803
7736
|
}
|
|
7804
|
-
function _object_without_properties_loose$
|
|
7737
|
+
function _object_without_properties_loose$7(source, excluded) {
|
|
7805
7738
|
if (source == null)
|
|
7806
7739
|
return {};
|
|
7807
7740
|
var target = {};
|
|
@@ -7913,7 +7846,7 @@ var ScrollIntoViewIfNeeded = /* @__PURE__ */ function(PureComponent2) {
|
|
|
7913
7846
|
_this_props.active;
|
|
7914
7847
|
var elementType = _this_props.elementType, children = _this_props.children;
|
|
7915
7848
|
_this_props.options;
|
|
7916
|
-
var wrapperProps = _object_without_properties$
|
|
7849
|
+
var wrapperProps = _object_without_properties$7(_this_props, [
|
|
7917
7850
|
"active",
|
|
7918
7851
|
"elementType",
|
|
7919
7852
|
"children",
|
|
@@ -8083,7 +8016,7 @@ function _object_spread_props$p(target, source) {
|
|
|
8083
8016
|
}
|
|
8084
8017
|
var SelectListItem = function(param) {
|
|
8085
8018
|
var classes = param.classes, index = param.index, isSemiChecked = param.isSemiChecked, isDisabled = param.isDisabled, isActive = param.isActive, children = param.children, isFocused = param.isFocused, onOptionSelect = param.onOptionSelect, onToggleCheckbox = param.onToggleCheckbox;
|
|
8086
|
-
var isMultiSelect = isNotEmpty(onToggleCheckbox);
|
|
8019
|
+
var isMultiSelect = isNotEmpty$1(onToggleCheckbox);
|
|
8087
8020
|
var _obj;
|
|
8088
8021
|
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$p(_object_spread$v({
|
|
8089
8022
|
active: isFocused,
|
|
@@ -8130,7 +8063,7 @@ function _define_property$w(obj, key, value) {
|
|
|
8130
8063
|
function SelectList(param) {
|
|
8131
8064
|
var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, areAllOptionsSelected = param.areAllOptionsSelected, customListHeader = param.customListHeader, isOptionDisabled = param.isOptionDisabled, allOptionsLabel = param.allOptionsLabel, onOptionSelect = param.onOptionSelect, onToggleCheckbox = param.onToggleCheckbox, convertValueToString = param.convertValueToString, _param_convertValueToReactNode = param.convertValueToReactNode, convertValueToReactNode = _param_convertValueToReactNode === void 0 ? convertValueToString : _param_convertValueToReactNode, convertValueToId = param.convertValueToId;
|
|
8132
8065
|
var classes = useTheme("SelectList", styles$s, tweakStyles).classes;
|
|
8133
|
-
var isMultiSelect = isNotEmpty(onToggleCheckbox);
|
|
8066
|
+
var isMultiSelect = isNotEmpty$1(onToggleCheckbox);
|
|
8134
8067
|
var multiSelectValue = activeValue;
|
|
8135
8068
|
var _multiSelectValue_length;
|
|
8136
8069
|
var selectedOptionsCount = (_multiSelectValue_length = multiSelectValue === null || multiSelectValue === void 0 ? void 0 : multiSelectValue.length) !== null && _multiSelectValue_length !== void 0 ? _multiSelectValue_length : 0;
|
|
@@ -8160,13 +8093,13 @@ function SelectList(param) {
|
|
|
8160
8093
|
optionsDisableMap
|
|
8161
8094
|
]);
|
|
8162
8095
|
var isActiveOption = function(item) {
|
|
8163
|
-
return isMultiSelect ? activeOptionsIdMap.includes(convertValueToId(item)) : isNotEmpty(activeValue) && convertValueToId(activeValue) === convertValueToId(item);
|
|
8096
|
+
return isMultiSelect ? activeOptionsIdMap.includes(convertValueToId(item)) : isNotEmpty$1(activeValue) && convertValueToId(activeValue) === convertValueToId(item);
|
|
8164
8097
|
};
|
|
8165
8098
|
return /* @__PURE__ */ jsxs(ScrollIntoViewIfNeeded, {
|
|
8166
8099
|
active: shouldScrollToList && !isMultiSelect,
|
|
8167
|
-
className: clsx(classes.root, _define_property$w({}, classes.withListHeader,
|
|
8100
|
+
className: clsx(classes.root, _define_property$w({}, classes.withListHeader, isReactNodeNotEmpty(customListHeader))),
|
|
8168
8101
|
children: [
|
|
8169
|
-
|
|
8102
|
+
isReactNodeNotEmpty(customListHeader) && /* @__PURE__ */ jsx("div", {
|
|
8170
8103
|
className: classes.listHeader,
|
|
8171
8104
|
children: customListHeader
|
|
8172
8105
|
}),
|
|
@@ -8178,7 +8111,7 @@ function SelectList(param) {
|
|
|
8178
8111
|
children: loadingLabel
|
|
8179
8112
|
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
8180
8113
|
children: [
|
|
8181
|
-
|
|
8114
|
+
isStringNotEmpty$1(defaultOptionLabel) && /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
|
|
8182
8115
|
active: focusedIndex === DEFAULT_OPTION_INDEX,
|
|
8183
8116
|
options: {
|
|
8184
8117
|
block: "nearest"
|
|
@@ -8189,7 +8122,7 @@ function SelectList(param) {
|
|
|
8189
8122
|
},
|
|
8190
8123
|
children: defaultOptionLabel
|
|
8191
8124
|
}),
|
|
8192
|
-
|
|
8125
|
+
isStringNotEmpty$1(allOptionsLabel) && /* @__PURE__ */ jsx(SelectListItem, {
|
|
8193
8126
|
classes,
|
|
8194
8127
|
index: ALL_OPTION_INDEX,
|
|
8195
8128
|
isSemiChecked: selectedOptionsCount > 0 && !areAllOptionsSelected,
|
|
@@ -8237,7 +8170,7 @@ var defaultCompareFunction = function(v1, v2) {
|
|
|
8237
8170
|
};
|
|
8238
8171
|
var getDefaultConvertToIdFunction = function(convertValueToString) {
|
|
8239
8172
|
return function(value) {
|
|
8240
|
-
return isNotEmpty(value === null || value === void 0 ? void 0 : value.id) ? String(value.id) : convertValueToString(value);
|
|
8173
|
+
return isNotEmpty$1(value === null || value === void 0 ? void 0 : value.id) ? String(value.id) : convertValueToString(value);
|
|
8241
8174
|
};
|
|
8242
8175
|
};
|
|
8243
8176
|
var isMultiSelectValue = function(props, _value) {
|
|
@@ -8377,10 +8310,10 @@ function _object_spread_props$o(target, source) {
|
|
|
8377
8310
|
}
|
|
8378
8311
|
return target;
|
|
8379
8312
|
}
|
|
8380
|
-
function _object_without_properties$
|
|
8313
|
+
function _object_without_properties$6(source, excluded) {
|
|
8381
8314
|
if (source == null)
|
|
8382
8315
|
return {};
|
|
8383
|
-
var target = _object_without_properties_loose$
|
|
8316
|
+
var target = _object_without_properties_loose$6(source, excluded);
|
|
8384
8317
|
var key, i;
|
|
8385
8318
|
if (Object.getOwnPropertySymbols) {
|
|
8386
8319
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -8395,7 +8328,7 @@ function _object_without_properties$5(source, excluded) {
|
|
|
8395
8328
|
}
|
|
8396
8329
|
return target;
|
|
8397
8330
|
}
|
|
8398
|
-
function _object_without_properties_loose$
|
|
8331
|
+
function _object_without_properties_loose$6(source, excluded) {
|
|
8399
8332
|
if (source == null)
|
|
8400
8333
|
return {};
|
|
8401
8334
|
var target = {};
|
|
@@ -8531,7 +8464,7 @@ var __generator$4 = globalThis && globalThis.__generator || function(thisArg, bo
|
|
|
8531
8464
|
}
|
|
8532
8465
|
};
|
|
8533
8466
|
function Select(props) {
|
|
8534
|
-
var options = props.options, value = props.value, defaultOptionLabel = props.defaultOptionLabel, allOptionsLabel = props.allOptionsLabel, _props_debounceTime = props.debounceTime, debounceTime = _props_debounceTime === void 0 ? 400 : _props_debounceTime, _props_optionsMode = props.optionsMode, optionsMode = _props_optionsMode === void 0 ? "normal" : _props_optionsMode, noMatchesLabel = props.noMatchesLabel, loadingLabel = props.loadingLabel, tweakStyles = props.tweakStyles, testId = props.testId, isReadonly = props.isReadonly, isDisabled = props.isDisabled, dropdownOptions = props.dropdownOptions, _props_minSymbolsCountToOpenList = props.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _props_minSymbolsCountToOpenList === void 0 ? 0 : _props_minSymbolsCountToOpenList, _props_dropdownIcon = props.dropdownIcon, dropdownIcon = _props_dropdownIcon === void 0 ? "chevron-down" : _props_dropdownIcon, _props_shouldScrollToList = props.shouldScrollToList, shouldScrollToList = _props_shouldScrollToList === void 0 ? true : _props_shouldScrollToList, searchInput = props.searchInput, iconType = props.iconType, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, onType = props.onType, onOpen = props.onOpen, _props_isOptionDisabled = props.isOptionDisabled, isOptionDisabled = _props_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _props_isOptionDisabled, _props_compareValuesOnChange = props.compareValuesOnChange, compareValuesOnChange = _props_compareValuesOnChange === void 0 ? defaultCompareFunction : _props_compareValuesOnChange, _props_convertValueToString = props.convertValueToString, convertValueToString = _props_convertValueToString === void 0 ? defaultConvertFunction$2 : _props_convertValueToString, convertValueToId = props.convertValueToId, convertValueToReactNode = props.convertValueToReactNode, optionsFilter = props.optionsFilter, inputProps = _object_without_properties$
|
|
8467
|
+
var options = props.options, value = props.value, defaultOptionLabel = props.defaultOptionLabel, allOptionsLabel = props.allOptionsLabel, _props_debounceTime = props.debounceTime, debounceTime = _props_debounceTime === void 0 ? 400 : _props_debounceTime, _props_optionsMode = props.optionsMode, optionsMode = _props_optionsMode === void 0 ? "normal" : _props_optionsMode, noMatchesLabel = props.noMatchesLabel, loadingLabel = props.loadingLabel, tweakStyles = props.tweakStyles, testId = props.testId, isReadonly = props.isReadonly, isDisabled = props.isDisabled, dropdownOptions = props.dropdownOptions, _props_minSymbolsCountToOpenList = props.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _props_minSymbolsCountToOpenList === void 0 ? 0 : _props_minSymbolsCountToOpenList, _props_dropdownIcon = props.dropdownIcon, dropdownIcon = _props_dropdownIcon === void 0 ? "chevron-down" : _props_dropdownIcon, _props_shouldScrollToList = props.shouldScrollToList, shouldScrollToList = _props_shouldScrollToList === void 0 ? true : _props_shouldScrollToList, searchInput = props.searchInput, iconType = props.iconType, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, onType = props.onType, onOpen = props.onOpen, _props_isOptionDisabled = props.isOptionDisabled, isOptionDisabled = _props_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _props_isOptionDisabled, _props_compareValuesOnChange = props.compareValuesOnChange, compareValuesOnChange = _props_compareValuesOnChange === void 0 ? defaultCompareFunction : _props_compareValuesOnChange, _props_convertValueToString = props.convertValueToString, convertValueToString = _props_convertValueToString === void 0 ? defaultConvertFunction$2 : _props_convertValueToString, convertValueToId = props.convertValueToId, convertValueToReactNode = props.convertValueToReactNode, optionsFilter = props.optionsFilter, inputProps = _object_without_properties$6(props, [
|
|
8535
8468
|
"options",
|
|
8536
8469
|
"value",
|
|
8537
8470
|
"defaultOptionLabel",
|
|
@@ -8566,7 +8499,7 @@ function Select(props) {
|
|
|
8566
8499
|
var isMounted = useIsMounted();
|
|
8567
8500
|
var _useState = _sliced_to_array$j(useState(false), 2), isListOpen = _useState[0], setIsListOpen = _useState[1];
|
|
8568
8501
|
var _useState1 = _sliced_to_array$j(useState(false), 2), areOptionsLoading = _useState1[0], setAreOptionsLoading = _useState1[1];
|
|
8569
|
-
var hasDefaultOption = isStringNotEmpty(defaultOptionLabel);
|
|
8502
|
+
var hasDefaultOption = isStringNotEmpty$1(defaultOptionLabel);
|
|
8570
8503
|
var _useState2 = _sliced_to_array$j(useState(DEFAULT_OPTION_INDEX), 2), focusedListCellIndex = _useState2[0], setFocusedListCellIndex = _useState2[1];
|
|
8571
8504
|
var _useState3 = _sliced_to_array$j(useState(""), 2), searchValue = _useState3[0], setSearchValue = _useState3[1];
|
|
8572
8505
|
var _useState4 = _sliced_to_array$j(useState(true), 2), shouldShowDefaultOption = _useState4[0], setShouldShowDefaultOption = _useState4[1];
|
|
@@ -8577,13 +8510,13 @@ function Select(props) {
|
|
|
8577
8510
|
var hasSearchInputInList = optionsMode !== "normal" && shouldRenderSearchInputInList;
|
|
8578
8511
|
var isMultiSelect = isMultiSelectValue(props);
|
|
8579
8512
|
var strValue = isMultiSelect ? value === null || value === void 0 ? void 0 : value[0] : value;
|
|
8580
|
-
var shouldShowAllOption = isMultiSelect &&
|
|
8513
|
+
var shouldShowAllOption = isMultiSelect && isStringNotEmpty$1(allOptionsLabel) && searchValue === "";
|
|
8581
8514
|
var filteredOptions = useMemo(function() {
|
|
8582
8515
|
if (optionsMode !== "search") {
|
|
8583
8516
|
return options;
|
|
8584
8517
|
}
|
|
8585
8518
|
var _convertValueToString;
|
|
8586
|
-
var filter = optionsFilter !== null && optionsFilter !== void 0 ? optionsFilter : createFilter(function(option) {
|
|
8519
|
+
var filter = optionsFilter !== null && optionsFilter !== void 0 ? optionsFilter : createFilter$1(function(option) {
|
|
8587
8520
|
return [
|
|
8588
8521
|
(_convertValueToString = convertValueToString(option)) !== null && _convertValueToString !== void 0 ? _convertValueToString : ""
|
|
8589
8522
|
];
|
|
@@ -8605,7 +8538,7 @@ function Select(props) {
|
|
|
8605
8538
|
isOptionDisabled
|
|
8606
8539
|
]);
|
|
8607
8540
|
var areAllOptionsSelected = isMultiSelect && (value === null || value === void 0 ? void 0 : value.length) === availableOptions.length;
|
|
8608
|
-
var shouldShowMultiSelectCounter = isMultiSelect && isNotEmpty(value) && value.length > 1 && !areAllOptionsSelected;
|
|
8541
|
+
var shouldShowMultiSelectCounter = isMultiSelect && isNotEmpty$1(value) && value.length > 1 && !areAllOptionsSelected;
|
|
8609
8542
|
var optionsIndexesForNavigation = useMemo(function() {
|
|
8610
8543
|
var result = [];
|
|
8611
8544
|
if (shouldShowDefaultOption && hasDefaultOption) {
|
|
@@ -8623,8 +8556,8 @@ function Select(props) {
|
|
|
8623
8556
|
}, [
|
|
8624
8557
|
filteredOptions
|
|
8625
8558
|
]);
|
|
8626
|
-
var stringValue = isNotEmpty(strValue) ? convertValueToString(strValue) : void 0;
|
|
8627
|
-
var showedStringValue = areAllOptionsSelected && isNotEmpty(allOptionsLabel) ? allOptionsLabel : stringValue;
|
|
8559
|
+
var stringValue = isNotEmpty$1(strValue) ? convertValueToString(strValue) : void 0;
|
|
8560
|
+
var showedStringValue = areAllOptionsSelected && isNotEmpty$1(allOptionsLabel) ? allOptionsLabel : stringValue;
|
|
8628
8561
|
var convertToId = useCallback(function(v) {
|
|
8629
8562
|
return (convertValueToId !== null && convertValueToId !== void 0 ? convertValueToId : getDefaultConvertToIdFunction(convertValueToString))(v);
|
|
8630
8563
|
}, [
|
|
@@ -8656,7 +8589,7 @@ function Select(props) {
|
|
|
8656
8589
|
handleListClose(event);
|
|
8657
8590
|
return;
|
|
8658
8591
|
}
|
|
8659
|
-
if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current) || !isNotEmpty(inputWrapper.current)) {
|
|
8592
|
+
if (!isNotEmpty$1(event.relatedTarget) || !isNotEmpty$1(list.current) || !isNotEmpty$1(inputWrapper.current)) {
|
|
8660
8593
|
return;
|
|
8661
8594
|
}
|
|
8662
8595
|
var isActionInsideSelect = hasExactParent(event.relatedTarget, list.current) || hasExactParent(event.relatedTarget, inputWrapper.current);
|
|
@@ -8866,7 +8799,7 @@ function Select(props) {
|
|
|
8866
8799
|
useEffect(function() {
|
|
8867
8800
|
var _optionsIndexesForNavigation_find;
|
|
8868
8801
|
setFocusedListCellIndex((_optionsIndexesForNavigation_find = optionsIndexesForNavigation.find(function(index) {
|
|
8869
|
-
return isNotEmpty(strValue) && isNotEmpty(filteredOptions[index]) && convertToId(filteredOptions[index]) === convertToId(strValue);
|
|
8802
|
+
return isNotEmpty$1(strValue) && isNotEmpty$1(filteredOptions[index]) && convertToId(filteredOptions[index]) === convertToId(strValue);
|
|
8870
8803
|
})) !== null && _optionsIndexesForNavigation_find !== void 0 ? _optionsIndexesForNavigation_find : optionsIndexesForNavigation[0]);
|
|
8871
8804
|
}, [
|
|
8872
8805
|
strValue,
|
|
@@ -8905,7 +8838,7 @@ function Select(props) {
|
|
|
8905
8838
|
isLoading: inputProps.isLoading,
|
|
8906
8839
|
loadingLabel,
|
|
8907
8840
|
tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
|
|
8908
|
-
testId: getTestId(testId, "list"),
|
|
8841
|
+
testId: getTestId$1(testId, "list"),
|
|
8909
8842
|
shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll,
|
|
8910
8843
|
isOptionDisabled,
|
|
8911
8844
|
convertValueToString,
|
|
@@ -8915,7 +8848,7 @@ function Select(props) {
|
|
|
8915
8848
|
onToggleCheckbox: isMultiSelect ? handleToggleOptionCheckbox : void 0
|
|
8916
8849
|
})
|
|
8917
8850
|
}));
|
|
8918
|
-
var multiSelectCounterWithIcon = shouldShowMultiSelectCounter || isNotEmpty(iconType) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
8851
|
+
var multiSelectCounterWithIcon = shouldShowMultiSelectCounter || isNotEmpty$1(iconType) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
8919
8852
|
children: [
|
|
8920
8853
|
shouldShowMultiSelectCounter && /* @__PURE__ */ jsxs("div", {
|
|
8921
8854
|
className: classes.counter,
|
|
@@ -8925,7 +8858,7 @@ function Select(props) {
|
|
|
8925
8858
|
")"
|
|
8926
8859
|
]
|
|
8927
8860
|
}),
|
|
8928
|
-
isNotEmpty(iconType) && /* @__PURE__ */ jsx("div", {
|
|
8861
|
+
isNotEmpty$1(iconType) && /* @__PURE__ */ jsx("div", {
|
|
8929
8862
|
className: classes.icon,
|
|
8930
8863
|
children: renderIcon(iconType)
|
|
8931
8864
|
})
|
|
@@ -8960,9 +8893,7 @@ function Select(props) {
|
|
|
8960
8893
|
},
|
|
8961
8894
|
onClick: onArrowClick,
|
|
8962
8895
|
className: clsx(classes.arrow, isOpen && classes.activeArrow),
|
|
8963
|
-
children:
|
|
8964
|
-
type: dropdownIcon
|
|
8965
|
-
})
|
|
8896
|
+
children: renderIcon(dropdownIcon)
|
|
8966
8897
|
})
|
|
8967
8898
|
]
|
|
8968
8899
|
}),
|
|
@@ -9128,17 +9059,17 @@ var DatePickerHeader = function(param) {
|
|
|
9128
9059
|
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
9129
9060
|
var getDateFormatter = function(dateFormat) {
|
|
9130
9061
|
return function(date) {
|
|
9131
|
-
return isNotEmpty(date) ? format$1(date, dateFormat) : "";
|
|
9062
|
+
return isNotEmpty$1(date) ? format$1(date, dateFormat) : "";
|
|
9132
9063
|
};
|
|
9133
9064
|
};
|
|
9134
9065
|
var getDateValueParser = function(dateFormat) {
|
|
9135
9066
|
return function(value) {
|
|
9136
9067
|
var inputValue = value === EMPTY_DATE_INPUT_VALUE ? "" : value;
|
|
9137
|
-
return isStringNotEmpty(inputValue) ? parse(value, dateFormat, new Date()) : null;
|
|
9068
|
+
return isStringNotEmpty$1(inputValue) ? parse(value, dateFormat, new Date()) : null;
|
|
9138
9069
|
};
|
|
9139
9070
|
};
|
|
9140
9071
|
var areDatesEquals = function(date1, date2) {
|
|
9141
|
-
return isEmpty(date1) && isEmpty(date2) || isNotEmpty(date1) && isNotEmpty(date2) && isSameDay(date1, date2);
|
|
9072
|
+
return isEmpty$1(date1) && isEmpty$1(date2) || isNotEmpty$1(date1) && isNotEmpty$1(date2) && isSameDay(date1, date2);
|
|
9142
9073
|
};
|
|
9143
9074
|
function _array_like_to_array$i(arr, len) {
|
|
9144
9075
|
if (len == null || len > arr.length)
|
|
@@ -9234,10 +9165,10 @@ function _object_spread_props$n(target, source) {
|
|
|
9234
9165
|
}
|
|
9235
9166
|
return target;
|
|
9236
9167
|
}
|
|
9237
|
-
function _object_without_properties$
|
|
9168
|
+
function _object_without_properties$5(source, excluded) {
|
|
9238
9169
|
if (source == null)
|
|
9239
9170
|
return {};
|
|
9240
|
-
var target = _object_without_properties_loose$
|
|
9171
|
+
var target = _object_without_properties_loose$5(source, excluded);
|
|
9241
9172
|
var key, i;
|
|
9242
9173
|
if (Object.getOwnPropertySymbols) {
|
|
9243
9174
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -9252,7 +9183,7 @@ function _object_without_properties$4(source, excluded) {
|
|
|
9252
9183
|
}
|
|
9253
9184
|
return target;
|
|
9254
9185
|
}
|
|
9255
|
-
function _object_without_properties_loose$
|
|
9186
|
+
function _object_without_properties_loose$5(source, excluded) {
|
|
9256
9187
|
if (source == null)
|
|
9257
9188
|
return {};
|
|
9258
9189
|
var target = {};
|
|
@@ -9292,7 +9223,7 @@ var PopperContainer = function(param) {
|
|
|
9292
9223
|
});
|
|
9293
9224
|
};
|
|
9294
9225
|
var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
9295
|
-
var data = _param.data, _param_selectedDate = _param.selectedDate, selectedDate = _param_selectedDate === void 0 ? null : _param_selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? null : _param_endDate, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? null : _param_startDate, locale2 = _param.locale, months = _param.months, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, placeholder = _param.placeholder, isRange = _param.isRange, isInline = _param.isInline, isDisabled = _param.isDisabled, isClearable = _param.isClearable, strictParsing = _param.strictParsing, focusSelectedMonth = _param.focusSelectedMonth, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, _param_allowSameDay = _param.allowSameDay, allowSameDay = _param_allowSameDay === void 0 ? false : _param_allowSameDay, shouldCloseOnSelect = _param.shouldCloseOnSelect, showPreviousMonths = _param.showPreviousMonths, preventOpenOnFocus = _param.preventOpenOnFocus, popperModifiers = _param.popperModifiers, popperPlacement = _param.popperPlacement, todayButton = _param.todayButton, calendarContainer = _param.calendarContainer, dayClassName = _param.dayClassName, tmp = _param.customInput, CustomInput = tmp === void 0 ? DateInput : tmp, customInputRef = _param.customInputRef, renderCustomHeader = _param.renderCustomHeader, filterDate = _param.filterDate, onYearChange = _param.onYearChange, onMonthChange = _param.onMonthChange, onCalendarOpen = _param.onCalendarOpen, onCalendarClose = _param.onCalendarClose, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, onBlur = _param.onBlur, onFocus = _param.onFocus, onKeyDown = _param.onKeyDown, tweakStyles = _param.tweakStyles, inputProps = _object_without_properties$
|
|
9226
|
+
var data = _param.data, _param_selectedDate = _param.selectedDate, selectedDate = _param_selectedDate === void 0 ? null : _param_selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? null : _param_endDate, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? null : _param_startDate, locale2 = _param.locale, months = _param.months, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, placeholder = _param.placeholder, isRange = _param.isRange, isInline = _param.isInline, isDisabled = _param.isDisabled, isClearable = _param.isClearable, strictParsing = _param.strictParsing, focusSelectedMonth = _param.focusSelectedMonth, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, _param_allowSameDay = _param.allowSameDay, allowSameDay = _param_allowSameDay === void 0 ? false : _param_allowSameDay, shouldCloseOnSelect = _param.shouldCloseOnSelect, showPreviousMonths = _param.showPreviousMonths, preventOpenOnFocus = _param.preventOpenOnFocus, popperModifiers = _param.popperModifiers, popperPlacement = _param.popperPlacement, todayButton = _param.todayButton, calendarContainer = _param.calendarContainer, dayClassName = _param.dayClassName, tmp = _param.customInput, CustomInput = tmp === void 0 ? DateInput : tmp, customInputRef = _param.customInputRef, renderCustomHeader = _param.renderCustomHeader, filterDate = _param.filterDate, onYearChange = _param.onYearChange, onMonthChange = _param.onMonthChange, onCalendarOpen = _param.onCalendarOpen, onCalendarClose = _param.onCalendarClose, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, onBlur = _param.onBlur, onFocus = _param.onFocus, onKeyDown = _param.onKeyDown, tweakStyles = _param.tweakStyles, inputProps = _object_without_properties$5(_param, [
|
|
9296
9227
|
"data",
|
|
9297
9228
|
"selectedDate",
|
|
9298
9229
|
"minDate",
|
|
@@ -9358,7 +9289,7 @@ var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
9358
9289
|
var _useState3 = _sliced_to_array$i(useState(formatDate(startDate)), 2), startDateValue = _useState3[0], setStartDateValue = _useState3[1];
|
|
9359
9290
|
var _useState4 = _sliced_to_array$i(useState(endDate), 2), end2 = _useState4[0], setEnd = _useState4[1];
|
|
9360
9291
|
var _useState5 = _sliced_to_array$i(useState(formatDate(endDate)), 2), endDateValue = _useState5[0], setEndDateValue = _useState5[1];
|
|
9361
|
-
var hasDateInputValue = isRange ? isStringNotEmpty(startDateValue) || isStringNotEmpty(endDateValue) : isStringNotEmpty(dateValue);
|
|
9292
|
+
var hasDateInputValue = isRange ? isStringNotEmpty$1(startDateValue) || isStringNotEmpty$1(endDateValue) : isStringNotEmpty$1(dateValue);
|
|
9362
9293
|
var dateInputProps = _object_spread$t(_object_spread_props$n(_object_spread$t({}, inputProps), {
|
|
9363
9294
|
isRange,
|
|
9364
9295
|
isDisabled,
|
|
@@ -9376,7 +9307,7 @@ var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
9376
9307
|
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(value, event);
|
|
9377
9308
|
};
|
|
9378
9309
|
var isDateInRange = function(date) {
|
|
9379
|
-
return (isEmpty(minDate) || isAfter(date, minDate)) && (isEmpty(maxDate) || isBefore(date, maxDate));
|
|
9310
|
+
return (isEmpty$1(minDate) || isAfter(date, minDate)) && (isEmpty$1(maxDate) || isBefore(date, maxDate));
|
|
9380
9311
|
};
|
|
9381
9312
|
var handleChangeRange = function(value, event) {
|
|
9382
9313
|
if (allowSameDay || !areDatesEquals(value === null || value === void 0 ? void 0 : value[0], startDate) || !areDatesEquals(value === null || value === void 0 ? void 0 : value[1], endDate)) {
|
|
@@ -9392,13 +9323,13 @@ var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
9392
9323
|
var newStart = parseDateValue(newStartDateValue);
|
|
9393
9324
|
var newEndDateValue = value.slice(13);
|
|
9394
9325
|
var newEnd = parseDateValue(newEndDateValue);
|
|
9395
|
-
if (isNotEmpty(newStart) && !isValid(newStart) || isNotEmpty(newStart) && !isDateInRange(newStart)) {
|
|
9326
|
+
if (isNotEmpty$1(newStart) && !isValid(newStart) || isNotEmpty$1(newStart) && !isDateInRange(newStart)) {
|
|
9396
9327
|
newStart = start2;
|
|
9397
9328
|
}
|
|
9398
|
-
if (isNotEmpty(newEnd) && !isValid(newEnd) || isNotEmpty(newEnd) && !isDateInRange(newEnd)) {
|
|
9329
|
+
if (isNotEmpty$1(newEnd) && !isValid(newEnd) || isNotEmpty$1(newEnd) && !isDateInRange(newEnd)) {
|
|
9399
9330
|
newEnd = end2;
|
|
9400
9331
|
}
|
|
9401
|
-
if (isEmpty(newStart) && isValid(newEnd) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9332
|
+
if (isEmpty$1(newStart) && isValid(newEnd) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9402
9333
|
isValid(newStart) && isValid(newEnd) && isAfter(newStart, newEnd)) {
|
|
9403
9334
|
newStart = newEnd;
|
|
9404
9335
|
newEnd = null;
|
|
@@ -9730,7 +9661,7 @@ var getNewCaretPosition = function(defaultPosition, oldValue, newValue, isDelete
|
|
|
9730
9661
|
};
|
|
9731
9662
|
var formatNumberWithDefault = function(value, defaultValue) {
|
|
9732
9663
|
var val = formatNumber(value);
|
|
9733
|
-
return
|
|
9664
|
+
return isStringNotEmpty$1(val) ? val : formatNumber(defaultValue);
|
|
9734
9665
|
};
|
|
9735
9666
|
var constructRegExp = function(param) {
|
|
9736
9667
|
var canBeFloat = param.canBeFloat, canBeNegative = param.canBeNegative, intPartPrecision = param.intPartPrecision, precision = param.precision;
|
|
@@ -9838,10 +9769,10 @@ function _object_spread$r(target) {
|
|
|
9838
9769
|
}
|
|
9839
9770
|
return target;
|
|
9840
9771
|
}
|
|
9841
|
-
function _object_without_properties$
|
|
9772
|
+
function _object_without_properties$4(source, excluded) {
|
|
9842
9773
|
if (source == null)
|
|
9843
9774
|
return {};
|
|
9844
|
-
var target = _object_without_properties_loose$
|
|
9775
|
+
var target = _object_without_properties_loose$4(source, excluded);
|
|
9845
9776
|
var key, i;
|
|
9846
9777
|
if (Object.getOwnPropertySymbols) {
|
|
9847
9778
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -9856,7 +9787,7 @@ function _object_without_properties$3(source, excluded) {
|
|
|
9856
9787
|
}
|
|
9857
9788
|
return target;
|
|
9858
9789
|
}
|
|
9859
|
-
function _object_without_properties_loose$
|
|
9790
|
+
function _object_without_properties_loose$4(source, excluded) {
|
|
9860
9791
|
if (source == null)
|
|
9861
9792
|
return {};
|
|
9862
9793
|
var target = {};
|
|
@@ -9989,7 +9920,7 @@ var __generator$3 = globalThis && globalThis.__generator || function(thisArg, bo
|
|
|
9989
9920
|
}
|
|
9990
9921
|
};
|
|
9991
9922
|
var NumberInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
9992
|
-
var value = _param.value, _param_canBeFloat = _param.canBeFloat, canBeFloat = _param_canBeFloat === void 0 ? false : _param_canBeFloat, _param_canBeNegative = _param.canBeNegative, canBeNegative = _param_canBeNegative === void 0 ? false : _param_canBeNegative, 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$
|
|
9923
|
+
var value = _param.value, _param_canBeFloat = _param.canBeFloat, canBeFloat = _param_canBeFloat === void 0 ? false : _param_canBeFloat, _param_canBeNegative = _param.canBeNegative, canBeNegative = _param_canBeNegative === void 0 ? false : _param_canBeNegative, 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$4(_param, [
|
|
9993
9924
|
"value",
|
|
9994
9925
|
"canBeFloat",
|
|
9995
9926
|
"canBeNegative",
|
|
@@ -10009,7 +9940,7 @@ var NumberInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10009
9940
|
setIsDeleteForwardAction(event.key === "Delete");
|
|
10010
9941
|
};
|
|
10011
9942
|
var setShowedValueWithDefault = function(v) {
|
|
10012
|
-
setShowedValue(
|
|
9943
|
+
setShowedValue(isStringNotEmpty$1(v) ? v : formatNumber(defaultValue));
|
|
10013
9944
|
};
|
|
10014
9945
|
var handleChange = function() {
|
|
10015
9946
|
var _ref = _async_to_generator$3(function(inputValue, event) {
|
|
@@ -11789,7 +11720,7 @@ function FilterSelect(param) {
|
|
|
11789
11720
|
var _useState4 = _sliced_to_array$e(useState(false), 2), isLoading = _useState4[0], setIsLoading = _useState4[1];
|
|
11790
11721
|
var _useState5 = _sliced_to_array$e(useState(false), 2), isLoadingOptionsOnScroll = _useState5[0], setLoadingOptionsOnScroll = _useState5[1];
|
|
11791
11722
|
var shouldShowPreloader = isLoading || isLoadingOptionsOnScroll;
|
|
11792
|
-
var hasFooter =
|
|
11723
|
+
var hasFooter = isReactNodeNotEmpty(footer);
|
|
11793
11724
|
var handleSearchInputChange = useCallback(function() {
|
|
11794
11725
|
var _ref = _async_to_generator$1(function(inputValue) {
|
|
11795
11726
|
var _inputValue_trim, response;
|
|
@@ -13661,7 +13592,7 @@ var FilterWithDates = function(param) {
|
|
|
13661
13592
|
leftPosition: -20,
|
|
13662
13593
|
topPosition,
|
|
13663
13594
|
border: "bottom",
|
|
13664
|
-
testId: getTestId(testId, "from"),
|
|
13595
|
+
testId: getTestId$1(testId, "from"),
|
|
13665
13596
|
isClearable
|
|
13666
13597
|
}, startPickerProps))
|
|
13667
13598
|
}),
|
|
@@ -13677,7 +13608,7 @@ var FilterWithDates = function(param) {
|
|
|
13677
13608
|
topPosition,
|
|
13678
13609
|
leftPosition: -170,
|
|
13679
13610
|
border: "bottom",
|
|
13680
|
-
testId: getTestId(testId, "to"),
|
|
13611
|
+
testId: getTestId$1(testId, "to"),
|
|
13681
13612
|
isClearable
|
|
13682
13613
|
}, endPickerProps))
|
|
13683
13614
|
})
|
|
@@ -13691,7 +13622,7 @@ var FilterWithDates = function(param) {
|
|
|
13691
13622
|
onClick: handleClear,
|
|
13692
13623
|
size: "s",
|
|
13693
13624
|
view: "text",
|
|
13694
|
-
testId: getTestId(testId, "clear-button"),
|
|
13625
|
+
testId: getTestId$1(testId, "clear-button"),
|
|
13695
13626
|
isFullWidth: true,
|
|
13696
13627
|
tweakStyles: tweakClearButtonStyles,
|
|
13697
13628
|
children: translates.clear
|
|
@@ -21904,10 +21835,10 @@ function _object_spread_props$b(target, source) {
|
|
|
21904
21835
|
}
|
|
21905
21836
|
return target;
|
|
21906
21837
|
}
|
|
21907
|
-
function _object_without_properties$
|
|
21838
|
+
function _object_without_properties$3(source, excluded) {
|
|
21908
21839
|
if (source == null)
|
|
21909
21840
|
return {};
|
|
21910
|
-
var target = _object_without_properties_loose$
|
|
21841
|
+
var target = _object_without_properties_loose$3(source, excluded);
|
|
21911
21842
|
var key, i;
|
|
21912
21843
|
if (Object.getOwnPropertySymbols) {
|
|
21913
21844
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -21922,7 +21853,7 @@ function _object_without_properties$2(source, excluded) {
|
|
|
21922
21853
|
}
|
|
21923
21854
|
return target;
|
|
21924
21855
|
}
|
|
21925
|
-
function _object_without_properties_loose$
|
|
21856
|
+
function _object_without_properties_loose$3(source, excluded) {
|
|
21926
21857
|
if (source == null)
|
|
21927
21858
|
return {};
|
|
21928
21859
|
var target = {};
|
|
@@ -21937,7 +21868,7 @@ function _object_without_properties_loose$2(source, excluded) {
|
|
|
21937
21868
|
return target;
|
|
21938
21869
|
}
|
|
21939
21870
|
var IncrementInput = function(_param) {
|
|
21940
|
-
var value = _param.value, onChange = _param.onChange, min2 = _param.min, max2 = _param.max, _param_step = _param.step, step = _param_step === void 0 ? 1 : _param_step, intPartPrecision = _param.intPartPrecision, data = _param.data, tweakStyles = _param.tweakStyles, props = _object_without_properties$
|
|
21871
|
+
var value = _param.value, onChange = _param.onChange, min2 = _param.min, max2 = _param.max, _param_step = _param.step, step = _param_step === void 0 ? 1 : _param_step, intPartPrecision = _param.intPartPrecision, data = _param.data, tweakStyles = _param.tweakStyles, props = _object_without_properties$3(_param, [
|
|
21941
21872
|
"value",
|
|
21942
21873
|
"onChange",
|
|
21943
21874
|
"min",
|
|
@@ -21947,7 +21878,7 @@ var IncrementInput = function(_param) {
|
|
|
21947
21878
|
"data",
|
|
21948
21879
|
"tweakStyles"
|
|
21949
21880
|
]);
|
|
21950
|
-
if (!
|
|
21881
|
+
if (!isNumberInteger(step)) {
|
|
21951
21882
|
console.error("Параметр step должен быть целым числом");
|
|
21952
21883
|
}
|
|
21953
21884
|
var _useTheme = useTheme("IncrementInput", styles$e, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
@@ -22349,6 +22280,38 @@ function _object_spread_props$a(target, source) {
|
|
|
22349
22280
|
}
|
|
22350
22281
|
return target;
|
|
22351
22282
|
}
|
|
22283
|
+
function _object_without_properties$2(source, excluded) {
|
|
22284
|
+
if (source == null)
|
|
22285
|
+
return {};
|
|
22286
|
+
var target = _object_without_properties_loose$2(source, excluded);
|
|
22287
|
+
var key, i;
|
|
22288
|
+
if (Object.getOwnPropertySymbols) {
|
|
22289
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
22290
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
22291
|
+
key = sourceSymbolKeys[i];
|
|
22292
|
+
if (excluded.indexOf(key) >= 0)
|
|
22293
|
+
continue;
|
|
22294
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
22295
|
+
continue;
|
|
22296
|
+
target[key] = source[key];
|
|
22297
|
+
}
|
|
22298
|
+
}
|
|
22299
|
+
return target;
|
|
22300
|
+
}
|
|
22301
|
+
function _object_without_properties_loose$2(source, excluded) {
|
|
22302
|
+
if (source == null)
|
|
22303
|
+
return {};
|
|
22304
|
+
var target = {};
|
|
22305
|
+
var sourceKeys = Object.keys(source);
|
|
22306
|
+
var key, i;
|
|
22307
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
22308
|
+
key = sourceKeys[i];
|
|
22309
|
+
if (excluded.indexOf(key) >= 0)
|
|
22310
|
+
continue;
|
|
22311
|
+
target[key] = source[key];
|
|
22312
|
+
}
|
|
22313
|
+
return target;
|
|
22314
|
+
}
|
|
22352
22315
|
function _sliced_to_array$7(arr, i) {
|
|
22353
22316
|
return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
|
|
22354
22317
|
}
|
|
@@ -22365,8 +22328,31 @@ function _unsupported_iterable_to_array$7(o, minLen) {
|
|
|
22365
22328
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
22366
22329
|
return _array_like_to_array$7(o, minLen);
|
|
22367
22330
|
}
|
|
22368
|
-
var Modal = function(
|
|
22369
|
-
var data =
|
|
22331
|
+
var Modal = function(_param) {
|
|
22332
|
+
var data = _param.data, tweakStyles = _param.tweakStyles, title = _param.title, _param_size = _param.size, size = _param_size === void 0 ? "l" : _param_size, isFooterSticky = _param.isFooterSticky, buttons = _param.buttons, _param_buttonsAlign = _param.buttonsAlign, buttonsAlign = _param_buttonsAlign === void 0 ? "right" : _param_buttonsAlign, _param_hasCloseButton = _param.hasCloseButton, hasCloseButton = _param_hasCloseButton === void 0 ? true : _param_hasCloseButton, _param_hasOverlay = _param.hasOverlay, hasOverlay = _param_hasOverlay === void 0 ? true : _param_hasOverlay, _param_isOpen = _param.isOpen, isOpen = _param_isOpen === void 0 ? false : _param_isOpen, _param_position = _param.position, position = _param_position === void 0 ? "center" : _param_position, children = _param.children, zIndex = _param.zIndex, testId = _param.testId, _param_shouldCloseOnOverlayClick = _param.shouldCloseOnOverlayClick, shouldCloseOnOverlayClick = _param_shouldCloseOnOverlayClick === void 0 ? true : _param_shouldCloseOnOverlayClick, _param_shouldCloseOnEsc = _param.shouldCloseOnEsc, shouldCloseOnEsc = _param_shouldCloseOnEsc === void 0 ? true : _param_shouldCloseOnEsc, _param_shouldBlockScroll = _param.shouldBlockScroll, shouldBlockScroll = _param_shouldBlockScroll === void 0 ? true : _param_shouldBlockScroll, _param_timeout = _param.timeout, timeout = _param_timeout === void 0 ? 150 : _param_timeout, _param_unmountOnExit = _param.unmountOnExit, unmountOnExit = _param_unmountOnExit === void 0 ? true : _param_unmountOnExit, onClose = _param.onClose, restProps = _object_without_properties$2(_param, [
|
|
22333
|
+
"data",
|
|
22334
|
+
"tweakStyles",
|
|
22335
|
+
"title",
|
|
22336
|
+
"size",
|
|
22337
|
+
"isFooterSticky",
|
|
22338
|
+
"buttons",
|
|
22339
|
+
"buttonsAlign",
|
|
22340
|
+
"hasCloseButton",
|
|
22341
|
+
"hasOverlay",
|
|
22342
|
+
"isOpen",
|
|
22343
|
+
"position",
|
|
22344
|
+
"children",
|
|
22345
|
+
"zIndex",
|
|
22346
|
+
"testId",
|
|
22347
|
+
"shouldCloseOnOverlayClick",
|
|
22348
|
+
"shouldCloseOnEsc",
|
|
22349
|
+
"shouldBlockScroll",
|
|
22350
|
+
"timeout",
|
|
22351
|
+
"unmountOnExit",
|
|
22352
|
+
"onClose"
|
|
22353
|
+
]);
|
|
22354
|
+
var _ref;
|
|
22355
|
+
var isModalOpen = (_ref = isOpen !== null && isOpen !== void 0 ? isOpen : restProps.in) !== null && _ref !== void 0 ? _ref : false;
|
|
22370
22356
|
var _useTheme = useTheme("Modal", styles$d, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
22371
22357
|
var tweakCloseButtonStyles = useTweakStyles(componentStyles, tweakStyles, "tweakCloseButton");
|
|
22372
22358
|
var _useState = _sliced_to_array$7(useState(false), 2), isClickOnOverlay = _useState[0], setIsClickOnOverlay = _useState[1];
|
|
@@ -22394,7 +22380,7 @@ var Modal = function(param) {
|
|
|
22394
22380
|
onClose
|
|
22395
22381
|
]);
|
|
22396
22382
|
useEffect(function() {
|
|
22397
|
-
if (!shouldCloseOnEsc || onClose === void 0 || !
|
|
22383
|
+
if (!shouldCloseOnEsc || onClose === void 0 || !isModalOpen) {
|
|
22398
22384
|
return function() {
|
|
22399
22385
|
return null;
|
|
22400
22386
|
};
|
|
@@ -22406,22 +22392,21 @@ var Modal = function(param) {
|
|
|
22406
22392
|
}, [
|
|
22407
22393
|
shouldCloseOnEsc,
|
|
22408
22394
|
onClose,
|
|
22409
|
-
|
|
22395
|
+
isModalOpen,
|
|
22410
22396
|
handleEscClose
|
|
22411
22397
|
]);
|
|
22412
22398
|
var _obj, _obj1;
|
|
22413
|
-
return /* @__PURE__ */ jsx(CSSTransition, {
|
|
22414
|
-
in:
|
|
22415
|
-
timeout
|
|
22416
|
-
unmountOnExit
|
|
22399
|
+
return /* @__PURE__ */ jsx(CSSTransition, _object_spread_props$a(_object_spread$c({
|
|
22400
|
+
in: isModalOpen,
|
|
22401
|
+
timeout,
|
|
22402
|
+
unmountOnExit,
|
|
22417
22403
|
classNames: {
|
|
22418
22404
|
enter: classes["modal-enter"],
|
|
22419
22405
|
enterActive: classes["modal-enter-active"],
|
|
22420
22406
|
exit: classes["modal-exit"],
|
|
22421
22407
|
exitActive: classes["modal-exit-active"]
|
|
22422
|
-
}
|
|
22423
|
-
|
|
22424
|
-
onExited: onCompletelyHidden,
|
|
22408
|
+
}
|
|
22409
|
+
}, restProps), {
|
|
22425
22410
|
children: /* @__PURE__ */ jsx("div", {
|
|
22426
22411
|
className: classes.modalWrapper,
|
|
22427
22412
|
children: /* @__PURE__ */ jsx(RemoveScroll, {
|
|
@@ -22432,7 +22417,7 @@ var Modal = function(param) {
|
|
|
22432
22417
|
style: {
|
|
22433
22418
|
zIndex
|
|
22434
22419
|
}
|
|
22435
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
22420
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
22436
22421
|
children: /* @__PURE__ */ jsx("div", {
|
|
22437
22422
|
ref: overlay,
|
|
22438
22423
|
className: clsx(classes.innerOverlay, classes["position-".concat(position)]),
|
|
@@ -22444,16 +22429,16 @@ var Modal = function(param) {
|
|
|
22444
22429
|
hasCloseButton && /* @__PURE__ */ jsx("div", {
|
|
22445
22430
|
className: classes.close,
|
|
22446
22431
|
children: /* @__PURE__ */ jsx(CloseButton, {
|
|
22447
|
-
testId: getTestId(testId, "close-button"),
|
|
22432
|
+
testId: getTestId$1(testId, "close-button"),
|
|
22448
22433
|
tweakStyles: tweakCloseButtonStyles,
|
|
22449
22434
|
onClose
|
|
22450
22435
|
})
|
|
22451
22436
|
}),
|
|
22452
|
-
|
|
22437
|
+
isReactNodeNotEmpty(title) && /* @__PURE__ */ jsx("h3", {
|
|
22453
22438
|
className: clsx(classes.title, _define_property$d({}, classes.titleWithCloseButton, hasCloseButton)),
|
|
22454
22439
|
children: title
|
|
22455
22440
|
}),
|
|
22456
|
-
|
|
22441
|
+
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
22457
22442
|
className: classes.content,
|
|
22458
22443
|
children
|
|
22459
22444
|
}),
|
|
@@ -22472,7 +22457,7 @@ var Modal = function(param) {
|
|
|
22472
22457
|
}))
|
|
22473
22458
|
})
|
|
22474
22459
|
})
|
|
22475
|
-
});
|
|
22460
|
+
}));
|
|
22476
22461
|
};
|
|
22477
22462
|
var styles$c = {
|
|
22478
22463
|
root: {
|
|
@@ -22665,9 +22650,9 @@ var MoreMenu = function(param) {
|
|
|
22665
22650
|
children: [
|
|
22666
22651
|
/* @__PURE__ */ jsx("button", _object_spread_props$9(_object_spread$b({
|
|
22667
22652
|
ref: button,
|
|
22668
|
-
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))
|
|
22669
|
-
|
|
22670
|
-
|
|
22653
|
+
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)),
|
|
22654
|
+
onClick: !isButtonDisabled ? toggleMenu : void 0
|
|
22655
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
22671
22656
|
children: /* @__PURE__ */ jsx("div", {
|
|
22672
22657
|
className: classes.icon,
|
|
22673
22658
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
@@ -22680,7 +22665,7 @@ var MoreMenu = function(param) {
|
|
|
22680
22665
|
ref: list,
|
|
22681
22666
|
children: /* @__PURE__ */ jsx(List, {
|
|
22682
22667
|
items,
|
|
22683
|
-
testId: getTestId(testId, "list"),
|
|
22668
|
+
testId: getTestId$1(testId, "list"),
|
|
22684
22669
|
tweakStyles: tweakListStyles,
|
|
22685
22670
|
onClick: handleCloseMenu
|
|
22686
22671
|
})
|
|
@@ -23026,13 +23011,12 @@ var Notification = function(param) {
|
|
|
23026
23011
|
var classes = useTheme("Notification", styles$9, tweakStyles, {
|
|
23027
23012
|
type
|
|
23028
23013
|
}).classes;
|
|
23029
|
-
var hasText =
|
|
23030
|
-
var hasTitle =
|
|
23031
|
-
var hasTestId = isNotEmpty(testId);
|
|
23014
|
+
var hasText = isStringNotEmpty$1(text);
|
|
23015
|
+
var hasTitle = isStringNotEmpty$1(title);
|
|
23032
23016
|
var _obj;
|
|
23033
23017
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$8(_object_spread$a({
|
|
23034
23018
|
className: clsx(classes.root, classes[size], (_obj = {}, _define_property$b(_obj, classes.inline, !isFullWidth), _define_property$b(_obj, classes.withTitle, hasTitle), _define_property$b(_obj, classes.withText, hasText), _obj))
|
|
23035
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
23019
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
23036
23020
|
children: [
|
|
23037
23021
|
/* @__PURE__ */ jsx("div", {
|
|
23038
23022
|
className: classes.icon,
|
|
@@ -23043,17 +23027,17 @@ var Notification = function(param) {
|
|
|
23043
23027
|
/* @__PURE__ */ jsxs("div", {
|
|
23044
23028
|
className: classes.body,
|
|
23045
23029
|
children: [
|
|
23046
|
-
hasTitle && /* @__PURE__ */ jsx("span", {
|
|
23047
|
-
className: classes.title
|
|
23048
|
-
|
|
23030
|
+
hasTitle && /* @__PURE__ */ jsx("span", _object_spread_props$8(_object_spread$a({
|
|
23031
|
+
className: classes.title
|
|
23032
|
+
}, addDataTestId$1(testId, "title")), {
|
|
23049
23033
|
children: title
|
|
23050
|
-
}),
|
|
23051
|
-
hasText && /* @__PURE__ */ jsx("span", {
|
|
23052
|
-
className: classes.text
|
|
23053
|
-
|
|
23034
|
+
})),
|
|
23035
|
+
hasText && /* @__PURE__ */ jsx("span", _object_spread_props$8(_object_spread$a({
|
|
23036
|
+
className: classes.text
|
|
23037
|
+
}, addDataTestId$1(testId, "text")), {
|
|
23054
23038
|
children: text
|
|
23055
|
-
}),
|
|
23056
|
-
|
|
23039
|
+
})),
|
|
23040
|
+
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
23057
23041
|
className: classes.content,
|
|
23058
23042
|
children
|
|
23059
23043
|
})
|
|
@@ -26744,7 +26728,7 @@ function RadioButton(param) {
|
|
|
26744
26728
|
},
|
|
26745
26729
|
className: clsx(classes.input, (_obj = {}, _define_property$6(_obj, classes.isDisabled, isDisabled), _define_property$6(_obj, classes.isInvalid, isInvalid), _obj))
|
|
26746
26730
|
}),
|
|
26747
|
-
|
|
26731
|
+
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("span", {
|
|
26748
26732
|
className: classes.content,
|
|
26749
26733
|
children
|
|
26750
26734
|
})
|
|
@@ -26875,7 +26859,7 @@ var Switch = function(param) {
|
|
|
26875
26859
|
var _obj;
|
|
26876
26860
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$5(_object_spread$5({
|
|
26877
26861
|
className: clsx(classes.root, classes[color], (_obj = {}, _define_property$5(_obj, classes.disabled, isDisabled), _define_property$5(_obj, classes.checked, isChecked), _define_property$5(_obj, classes.invalid, isInvalid), _obj))
|
|
26878
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
26862
|
+
}, addDataTestId$1(testId), addDataAttributes(data)), {
|
|
26879
26863
|
children: [
|
|
26880
26864
|
/* @__PURE__ */ jsx("span", {
|
|
26881
26865
|
className: classes.switch,
|
|
@@ -26886,9 +26870,9 @@ var Switch = function(param) {
|
|
|
26886
26870
|
onChange: isDisabled ? void 0 : handleChange,
|
|
26887
26871
|
checked: isChecked,
|
|
26888
26872
|
disabled: isDisabled
|
|
26889
|
-
}, addDataTestId(testId, "input")))
|
|
26873
|
+
}, addDataTestId$1(testId, "input")))
|
|
26890
26874
|
}),
|
|
26891
|
-
|
|
26875
|
+
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("span", {
|
|
26892
26876
|
className: clsx(classes.label, classes[labelPosition === "left" ? "labelLeft" : "labelRight"]),
|
|
26893
26877
|
children
|
|
26894
26878
|
})
|
|
@@ -27982,21 +27966,21 @@ var Toaster = function(param) {
|
|
|
27982
27966
|
}),
|
|
27983
27967
|
/* @__PURE__ */ jsxs("div", {
|
|
27984
27968
|
children: [
|
|
27985
|
-
|
|
27969
|
+
isStringNotEmpty$1(title) && /* @__PURE__ */ jsx("div", {
|
|
27986
27970
|
className: classes.title,
|
|
27987
27971
|
children: title
|
|
27988
27972
|
}),
|
|
27989
|
-
|
|
27973
|
+
isStringNotEmpty$1(text) && /* @__PURE__ */ jsx("div", {
|
|
27990
27974
|
className: classes.text,
|
|
27991
27975
|
children: text
|
|
27992
27976
|
}),
|
|
27993
|
-
|
|
27977
|
+
isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
27994
27978
|
className: classes.content,
|
|
27995
27979
|
children
|
|
27996
27980
|
})
|
|
27997
27981
|
]
|
|
27998
27982
|
}),
|
|
27999
|
-
hasCloseButton && onClose
|
|
27983
|
+
hasCloseButton && isNotEmpty$1(onClose) && /* @__PURE__ */ jsx("div", {
|
|
28000
27984
|
className: classes.close,
|
|
28001
27985
|
children: /* @__PURE__ */ jsx(CloseButton, {
|
|
28002
27986
|
onClose,
|