@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,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-transition-group"), require("clsx"), require("
|
|
3
|
-
})(this, function(exports2, React, reactTransitionGroup, clsx,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-transition-group"), require("clsx"), require("@true-engineering/true-react-platform-helpers"), require("react-jss"), require("react-input-mask"), require("hex-to-rgba"), require("react-datepicker"), require("react-overlays"), require("date-fns"), require("ts-debounce"), require("country-flag-icons"), require("react-remove-scroll"), require("scroll-into-view-if-needed")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-transition-group", "clsx", "@true-engineering/true-react-platform-helpers", "react-jss", "react-input-mask", "hex-to-rgba", "react-datepicker", "react-overlays", "date-fns", "ts-debounce", "country-flag-icons", "react-remove-scroll", "scroll-into-view-if-needed"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.TrueReactKitUiKit = {}, global2.React, global2.reactTransitionGroup, global2.clsx, global2.trueReactPlatformHelpers, global2.reactJss, global2.InputMask, global2.hexToRgba, global2.ReactDatePicker, global2.reactOverlays, global2.dateFns, global2.tsDebounce, global2.countryFlagIcons, global2.reactRemoveScroll, global2.scrollIntoViewIfNeeded));
|
|
3
|
+
})(this, function(exports2, React, reactTransitionGroup, clsx, trueReactPlatformHelpers, reactJss, InputMask, hexToRgba, ReactDatePicker, reactOverlays, dateFns, tsDebounce, countryFlagIcons, reactRemoveScroll, scrollIntoViewIfNeeded) {
|
|
4
4
|
"use strict";
|
|
5
5
|
var colors = {
|
|
6
6
|
FONT_MAIN: "#222a37",
|
|
@@ -1099,7 +1099,22 @@
|
|
|
1099
1099
|
const Fragment = jsxRuntime.exports.Fragment;
|
|
1100
1100
|
const jsx = jsxRuntime.exports.jsx;
|
|
1101
1101
|
const jsxs = jsxRuntime.exports.jsxs;
|
|
1102
|
-
var
|
|
1102
|
+
var minWidthModifier = {
|
|
1103
|
+
name: "minWidth",
|
|
1104
|
+
enabled: true,
|
|
1105
|
+
phase: "beforeWrite",
|
|
1106
|
+
requires: [
|
|
1107
|
+
"computeStyles"
|
|
1108
|
+
],
|
|
1109
|
+
fn: function(param) {
|
|
1110
|
+
var state = param.state;
|
|
1111
|
+
state.styles.popper.minWidth = "".concat(state.rects.reference.width, "px");
|
|
1112
|
+
},
|
|
1113
|
+
effect: function(param) {
|
|
1114
|
+
var state = param.state;
|
|
1115
|
+
state.elements.popper.style.minWidth = "".concat(state.elements.reference.offsetWidth, "px");
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1103
1118
|
function _array_like_to_array$q(arr, len) {
|
|
1104
1119
|
if (len == null || len > arr.length)
|
|
1105
1120
|
len = arr.length;
|
|
@@ -1107,18 +1122,125 @@
|
|
|
1107
1122
|
arr2[i] = arr[i];
|
|
1108
1123
|
return arr2;
|
|
1109
1124
|
}
|
|
1110
|
-
function
|
|
1111
|
-
if (Array.isArray(arr))
|
|
1112
|
-
return arr;
|
|
1113
|
-
}
|
|
1114
|
-
function _array_without_holes$7(arr) {
|
|
1125
|
+
function _array_without_holes$6(arr) {
|
|
1115
1126
|
if (Array.isArray(arr))
|
|
1116
1127
|
return _array_like_to_array$q(arr);
|
|
1117
1128
|
}
|
|
1118
|
-
function _iterable_to_array$
|
|
1129
|
+
function _iterable_to_array$6(iter) {
|
|
1119
1130
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1120
1131
|
return Array.from(iter);
|
|
1121
1132
|
}
|
|
1133
|
+
function _non_iterable_spread$6() {
|
|
1134
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1135
|
+
}
|
|
1136
|
+
function _to_consumable_array$6(arr) {
|
|
1137
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
|
|
1138
|
+
}
|
|
1139
|
+
function _unsupported_iterable_to_array$q(o, minLen) {
|
|
1140
|
+
if (!o)
|
|
1141
|
+
return;
|
|
1142
|
+
if (typeof o === "string")
|
|
1143
|
+
return _array_like_to_array$q(o, minLen);
|
|
1144
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1145
|
+
if (n === "Object" && o.constructor)
|
|
1146
|
+
n = o.constructor.name;
|
|
1147
|
+
if (n === "Map" || n === "Set")
|
|
1148
|
+
return Array.from(n);
|
|
1149
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1150
|
+
return _array_like_to_array$q(o, minLen);
|
|
1151
|
+
}
|
|
1152
|
+
var findCountryByCode = function(countryCode) {
|
|
1153
|
+
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1154
|
+
return trueReactPlatformHelpers.isNotEmpty(countryCode) ? countriesList.find(function(info) {
|
|
1155
|
+
return info.countryCode === countryCode;
|
|
1156
|
+
}) : void 0;
|
|
1157
|
+
};
|
|
1158
|
+
var findCountryIndexByCode = function(countryCode) {
|
|
1159
|
+
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1160
|
+
return trueReactPlatformHelpers.isNotEmpty(countryCode) ? countriesList.findIndex(function(info) {
|
|
1161
|
+
return info.countryCode === countryCode;
|
|
1162
|
+
}) : -1;
|
|
1163
|
+
};
|
|
1164
|
+
var getCountryTextByLocale = function(country, locale2) {
|
|
1165
|
+
return locale2.toLowerCase() === "ru" ? country.countryRu : country.countryEn;
|
|
1166
|
+
};
|
|
1167
|
+
var sortCountriesByLocale = function(countriesList, locale2) {
|
|
1168
|
+
return countriesList.sort(function(countryA, countryB) {
|
|
1169
|
+
return getCountryTextByLocale(countryA, locale2).localeCompare(getCountryTextByLocale(countryB, locale2));
|
|
1170
|
+
});
|
|
1171
|
+
};
|
|
1172
|
+
var checkSearchStringInCountry = function(country, searchString) {
|
|
1173
|
+
var checkValue = searchString.toLowerCase().trim().replace("+", "");
|
|
1174
|
+
var possibleValues = [
|
|
1175
|
+
country.countryRu,
|
|
1176
|
+
country.countryEn
|
|
1177
|
+
].concat(_to_consumable_array$6(country.countryRu.split(" ")), _to_consumable_array$6(country.countryEn.split(" ")), [
|
|
1178
|
+
country.dialCode
|
|
1179
|
+
]).map(function(part) {
|
|
1180
|
+
return part.toLowerCase();
|
|
1181
|
+
});
|
|
1182
|
+
return possibleValues.some(function(v) {
|
|
1183
|
+
return v.startsWith(checkValue);
|
|
1184
|
+
});
|
|
1185
|
+
};
|
|
1186
|
+
var _phone_dialCode, _phone_phoneNumber;
|
|
1187
|
+
var getFullPhone = function(phone) {
|
|
1188
|
+
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 : "");
|
|
1189
|
+
};
|
|
1190
|
+
var getCountryCodeFromPhone = function(phoneWithCode) {
|
|
1191
|
+
var _phoneInfo_find;
|
|
1192
|
+
var countryCode = (_phoneInfo_find = phoneInfo.find(function(info) {
|
|
1193
|
+
return info.fullCodes.some(function(code) {
|
|
1194
|
+
return phoneWithCode.startsWith(code);
|
|
1195
|
+
});
|
|
1196
|
+
})) === null || _phoneInfo_find === void 0 ? void 0 : _phoneInfo_find.countryCode;
|
|
1197
|
+
if (trueReactPlatformHelpers.isEmpty(countryCode) && trueReactPlatformHelpers.isNotEmpty(phoneWithCode)) {
|
|
1198
|
+
var _phoneInfo_filter_sort_;
|
|
1199
|
+
var _infoA_dialCodePriority, _infoB_dialCodePriority;
|
|
1200
|
+
countryCode = (_phoneInfo_filter_sort_ = phoneInfo.filter(function(info) {
|
|
1201
|
+
return phoneWithCode.startsWith(info.dialCode);
|
|
1202
|
+
}).sort(function(infoA, infoB) {
|
|
1203
|
+
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);
|
|
1204
|
+
})[0]) === null || _phoneInfo_filter_sort_ === void 0 ? void 0 : _phoneInfo_filter_sort_.countryCode;
|
|
1205
|
+
}
|
|
1206
|
+
return countryCode;
|
|
1207
|
+
};
|
|
1208
|
+
var getPhoneObjFromString = function(fullPhone, countryCode) {
|
|
1209
|
+
var _findCountryByCode;
|
|
1210
|
+
var newCountryCode = countryCode !== null && countryCode !== void 0 ? countryCode : getCountryCodeFromPhone(fullPhone);
|
|
1211
|
+
var dialCode = (_findCountryByCode = findCountryByCode(newCountryCode)) === null || _findCountryByCode === void 0 ? void 0 : _findCountryByCode.dialCode;
|
|
1212
|
+
var phoneNumber = fullPhone.slice(dialCode === null || dialCode === void 0 ? void 0 : dialCode.length);
|
|
1213
|
+
return {
|
|
1214
|
+
dialCode,
|
|
1215
|
+
phoneNumber,
|
|
1216
|
+
countryCode: newCountryCode
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
var DEFAULT_PHONE_MASK = "+ 9 999 999 999 999 99";
|
|
1220
|
+
var getPhoneMask = function(countryCode) {
|
|
1221
|
+
var mask = DEFAULT_PHONE_MASK;
|
|
1222
|
+
if (trueReactPlatformHelpers.isNotEmpty(countryCode)) {
|
|
1223
|
+
var countrySettings = findCountryByCode(countryCode);
|
|
1224
|
+
if (countrySettings !== void 0) {
|
|
1225
|
+
var dialCodeLength = countrySettings.dialCode.length;
|
|
1226
|
+
var _countrySettings_phoneMask;
|
|
1227
|
+
var areaAndPhoneMask = (_countrySettings_phoneMask = countrySettings.phoneMask) !== null && _countrySettings_phoneMask !== void 0 ? _countrySettings_phoneMask : mask.substring(2, mask.length - dialCodeLength);
|
|
1228
|
+
mask = "+ ".concat("9".repeat(dialCodeLength), " ").concat(areaAndPhoneMask);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
return mask;
|
|
1232
|
+
};
|
|
1233
|
+
function _array_like_to_array$p(arr, len) {
|
|
1234
|
+
if (len == null || len > arr.length)
|
|
1235
|
+
len = arr.length;
|
|
1236
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
1237
|
+
arr2[i] = arr[i];
|
|
1238
|
+
return arr2;
|
|
1239
|
+
}
|
|
1240
|
+
function _array_with_holes$o(arr) {
|
|
1241
|
+
if (Array.isArray(arr))
|
|
1242
|
+
return arr;
|
|
1243
|
+
}
|
|
1122
1244
|
function _iterable_to_array_limit$o(arr, i) {
|
|
1123
1245
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1124
1246
|
if (_i == null)
|
|
@@ -1150,28 +1272,23 @@
|
|
|
1150
1272
|
function _non_iterable_rest$o() {
|
|
1151
1273
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1152
1274
|
}
|
|
1153
|
-
function _non_iterable_spread$7() {
|
|
1154
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1155
|
-
}
|
|
1156
1275
|
function _sliced_to_array$o(arr, i) {
|
|
1157
|
-
return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$
|
|
1158
|
-
}
|
|
1159
|
-
function _to_consumable_array$7(arr) {
|
|
1160
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$7();
|
|
1276
|
+
return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$p(arr, i) || _non_iterable_rest$o();
|
|
1161
1277
|
}
|
|
1162
|
-
function _unsupported_iterable_to_array$
|
|
1278
|
+
function _unsupported_iterable_to_array$p(o, minLen) {
|
|
1163
1279
|
if (!o)
|
|
1164
1280
|
return;
|
|
1165
1281
|
if (typeof o === "string")
|
|
1166
|
-
return _array_like_to_array$
|
|
1282
|
+
return _array_like_to_array$p(o, minLen);
|
|
1167
1283
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1168
1284
|
if (n === "Object" && o.constructor)
|
|
1169
1285
|
n = o.constructor.name;
|
|
1170
1286
|
if (n === "Map" || n === "Set")
|
|
1171
1287
|
return Array.from(n);
|
|
1172
1288
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1173
|
-
return _array_like_to_array$
|
|
1289
|
+
return _array_like_to_array$p(o, minLen);
|
|
1174
1290
|
}
|
|
1291
|
+
var rgba = hexToRgba;
|
|
1175
1292
|
var transformToKebab = function(string) {
|
|
1176
1293
|
var result = "";
|
|
1177
1294
|
string.split("").forEach(function(char) {
|
|
@@ -1283,21 +1400,9 @@
|
|
|
1283
1400
|
var isSpaceChar = function(char) {
|
|
1284
1401
|
return char !== void 0 && char.match(/\s/) !== null;
|
|
1285
1402
|
};
|
|
1286
|
-
var isInt = function(n) {
|
|
1287
|
-
return n % 1 === 0;
|
|
1288
|
-
};
|
|
1289
1403
|
var getNumberLength = function(n) {
|
|
1290
1404
|
return n === void 0 || isNaN(n) ? 0 : n.toString().length;
|
|
1291
1405
|
};
|
|
1292
|
-
var isNotEmpty = function(val) {
|
|
1293
|
-
return typeof val === "string" ? val.trim() !== "" : val !== null && val !== void 0;
|
|
1294
|
-
};
|
|
1295
|
-
var isEmpty = function(val) {
|
|
1296
|
-
return val === null || val === void 0;
|
|
1297
|
-
};
|
|
1298
|
-
var isStringNotEmpty = function(value) {
|
|
1299
|
-
return (value !== null && value !== void 0 ? value : "").trim() !== "";
|
|
1300
|
-
};
|
|
1301
1406
|
var trimStringToMaxLength = function(val, maxLength) {
|
|
1302
1407
|
return val.length > maxLength ? val.slice(0, maxLength) : val;
|
|
1303
1408
|
};
|
|
@@ -1305,191 +1410,22 @@
|
|
|
1305
1410
|
var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1306
1411
|
return Object.fromEntries(Object.entries(data).map(function(param) {
|
|
1307
1412
|
var _param = _sliced_to_array$o(param, 2), key = _param[0], value = _param[1];
|
|
1308
|
-
return isNotEmpty(value) ? [
|
|
1413
|
+
return trueReactPlatformHelpers.isString(value) && trueReactPlatformHelpers.isStringNotEmpty(value) || trueReactPlatformHelpers.isNotEmpty(value) ? [
|
|
1309
1414
|
"data-".concat(transformToKebab(key)),
|
|
1310
1415
|
value
|
|
1311
1416
|
] : [];
|
|
1312
1417
|
}));
|
|
1313
1418
|
};
|
|
1314
|
-
var
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
if (!isNotEmpty(testId)) {
|
|
1325
|
-
return void 0;
|
|
1326
|
-
}
|
|
1327
|
-
return isNotEmpty(postfix) ? "".concat(testId, "-").concat(postfix) : testId;
|
|
1328
|
-
};
|
|
1329
|
-
var getSelectKeyHandler = function(cb) {
|
|
1330
|
-
return function(e) {
|
|
1331
|
-
if (e.code === "Enter" || e.code === "NumpadEnter") {
|
|
1332
|
-
cb(e);
|
|
1333
|
-
}
|
|
1334
|
-
};
|
|
1335
|
-
};
|
|
1336
|
-
var addClickHandler = function(cb) {
|
|
1337
|
-
var hasAction = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
1338
|
-
return hasAction && isNotEmpty(cb) ? {
|
|
1339
|
-
tabIndex: 0,
|
|
1340
|
-
onClick: cb,
|
|
1341
|
-
onKeyDown: getSelectKeyHandler(cb)
|
|
1342
|
-
} : {
|
|
1343
|
-
tabIndex: -1
|
|
1344
|
-
};
|
|
1345
|
-
};
|
|
1346
|
-
var createFilter = function(getter, compareFn) {
|
|
1347
|
-
return function(items, query) {
|
|
1348
|
-
return items.filter(function(item) {
|
|
1349
|
-
var possibleValues = getter(item).reduce(function(acc, cur) {
|
|
1350
|
-
return _to_consumable_array$7(acc).concat(_to_consumable_array$7(isStringNotEmpty(cur) ? [
|
|
1351
|
-
cur.toLowerCase()
|
|
1352
|
-
] : []));
|
|
1353
|
-
}, []);
|
|
1354
|
-
var queryString = query.toLowerCase().trim();
|
|
1355
|
-
return possibleValues.some(function(v) {
|
|
1356
|
-
return (compareFn !== null && compareFn !== void 0 ? compareFn : function() {
|
|
1357
|
-
return v === null || v === void 0 ? void 0 : v.includes(queryString);
|
|
1358
|
-
})(v, queryString);
|
|
1359
|
-
});
|
|
1360
|
-
});
|
|
1361
|
-
};
|
|
1362
|
-
};
|
|
1363
|
-
var minWidthModifier = {
|
|
1364
|
-
name: "minWidth",
|
|
1365
|
-
enabled: true,
|
|
1366
|
-
phase: "beforeWrite",
|
|
1367
|
-
requires: [
|
|
1368
|
-
"computeStyles"
|
|
1369
|
-
],
|
|
1370
|
-
fn: function(param) {
|
|
1371
|
-
var state = param.state;
|
|
1372
|
-
state.styles.popper.minWidth = "".concat(state.rects.reference.width, "px");
|
|
1373
|
-
},
|
|
1374
|
-
effect: function(param) {
|
|
1375
|
-
var state = param.state;
|
|
1376
|
-
state.elements.popper.style.minWidth = "".concat(state.elements.reference.offsetWidth, "px");
|
|
1377
|
-
}
|
|
1378
|
-
};
|
|
1379
|
-
function _array_like_to_array$p(arr, len) {
|
|
1380
|
-
if (len == null || len > arr.length)
|
|
1381
|
-
len = arr.length;
|
|
1382
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
1383
|
-
arr2[i] = arr[i];
|
|
1384
|
-
return arr2;
|
|
1385
|
-
}
|
|
1386
|
-
function _array_without_holes$6(arr) {
|
|
1387
|
-
if (Array.isArray(arr))
|
|
1388
|
-
return _array_like_to_array$p(arr);
|
|
1389
|
-
}
|
|
1390
|
-
function _iterable_to_array$6(iter) {
|
|
1391
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1392
|
-
return Array.from(iter);
|
|
1393
|
-
}
|
|
1394
|
-
function _non_iterable_spread$6() {
|
|
1395
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1396
|
-
}
|
|
1397
|
-
function _to_consumable_array$6(arr) {
|
|
1398
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$p(arr) || _non_iterable_spread$6();
|
|
1399
|
-
}
|
|
1400
|
-
function _unsupported_iterable_to_array$p(o, minLen) {
|
|
1401
|
-
if (!o)
|
|
1402
|
-
return;
|
|
1403
|
-
if (typeof o === "string")
|
|
1404
|
-
return _array_like_to_array$p(o, minLen);
|
|
1405
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1406
|
-
if (n === "Object" && o.constructor)
|
|
1407
|
-
n = o.constructor.name;
|
|
1408
|
-
if (n === "Map" || n === "Set")
|
|
1409
|
-
return Array.from(n);
|
|
1410
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1411
|
-
return _array_like_to_array$p(o, minLen);
|
|
1412
|
-
}
|
|
1413
|
-
var findCountryByCode = function(countryCode) {
|
|
1414
|
-
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1415
|
-
return countryCode !== void 0 ? countriesList.find(function(info) {
|
|
1416
|
-
return info.countryCode === countryCode;
|
|
1417
|
-
}) : void 0;
|
|
1418
|
-
};
|
|
1419
|
-
var findCountryIndexByCode = function(countryCode) {
|
|
1420
|
-
var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
|
|
1421
|
-
return countryCode !== void 0 ? countriesList.findIndex(function(info) {
|
|
1422
|
-
return info.countryCode === countryCode;
|
|
1423
|
-
}) : -1;
|
|
1424
|
-
};
|
|
1425
|
-
var getCountryTextByLocale = function(country, locale2) {
|
|
1426
|
-
return locale2.toLowerCase() === "ru" ? country.countryRu : country.countryEn;
|
|
1427
|
-
};
|
|
1428
|
-
var sortCountriesByLocale = function(countriesList, locale2) {
|
|
1429
|
-
return countriesList.sort(function(countryA, countryB) {
|
|
1430
|
-
return getCountryTextByLocale(countryA, locale2).localeCompare(getCountryTextByLocale(countryB, locale2));
|
|
1431
|
-
});
|
|
1432
|
-
};
|
|
1433
|
-
var checkSearchStringInCountry = function(country, searchString) {
|
|
1434
|
-
var checkValue = searchString.toLowerCase().trim().replace("+", "");
|
|
1435
|
-
var possibleValues = [
|
|
1436
|
-
country.countryRu,
|
|
1437
|
-
country.countryEn
|
|
1438
|
-
].concat(_to_consumable_array$6(country.countryRu.split(" ")), _to_consumable_array$6(country.countryEn.split(" ")), [
|
|
1439
|
-
country.dialCode
|
|
1440
|
-
]).map(function(part) {
|
|
1441
|
-
return part.toLowerCase();
|
|
1442
|
-
});
|
|
1443
|
-
return possibleValues.some(function(v) {
|
|
1444
|
-
return v.startsWith(checkValue);
|
|
1445
|
-
});
|
|
1446
|
-
};
|
|
1447
|
-
var _phone_dialCode, _phone_phoneNumber;
|
|
1448
|
-
var getFullPhone = function(phone) {
|
|
1449
|
-
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 : "");
|
|
1450
|
-
};
|
|
1451
|
-
var getCountryCodeFromPhone = function(phoneWithCode) {
|
|
1452
|
-
var _phoneInfo_find;
|
|
1453
|
-
var countryCode = (_phoneInfo_find = phoneInfo.find(function(info) {
|
|
1454
|
-
return info.fullCodes.some(function(code) {
|
|
1455
|
-
return phoneWithCode.startsWith(code);
|
|
1456
|
-
});
|
|
1457
|
-
})) === null || _phoneInfo_find === void 0 ? void 0 : _phoneInfo_find.countryCode;
|
|
1458
|
-
if (countryCode === void 0 && isNotEmpty(phoneWithCode)) {
|
|
1459
|
-
var _phoneInfo_filter_sort_;
|
|
1460
|
-
var _infoA_dialCodePriority, _infoB_dialCodePriority;
|
|
1461
|
-
countryCode = (_phoneInfo_filter_sort_ = phoneInfo.filter(function(info) {
|
|
1462
|
-
return phoneWithCode.startsWith(info.dialCode);
|
|
1463
|
-
}).sort(function(infoA, infoB) {
|
|
1464
|
-
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);
|
|
1465
|
-
})[0]) === null || _phoneInfo_filter_sort_ === void 0 ? void 0 : _phoneInfo_filter_sort_.countryCode;
|
|
1466
|
-
}
|
|
1467
|
-
return countryCode;
|
|
1468
|
-
};
|
|
1469
|
-
var getPhoneObjFromString = function(fullPhone, countryCode) {
|
|
1470
|
-
var _findCountryByCode;
|
|
1471
|
-
var newCountryCode = countryCode !== null && countryCode !== void 0 ? countryCode : getCountryCodeFromPhone(fullPhone);
|
|
1472
|
-
var dialCode = (_findCountryByCode = findCountryByCode(newCountryCode)) === null || _findCountryByCode === void 0 ? void 0 : _findCountryByCode.dialCode;
|
|
1473
|
-
var phoneNumber = fullPhone.slice(dialCode === null || dialCode === void 0 ? void 0 : dialCode.length);
|
|
1474
|
-
return {
|
|
1475
|
-
dialCode,
|
|
1476
|
-
phoneNumber,
|
|
1477
|
-
countryCode: newCountryCode
|
|
1478
|
-
};
|
|
1479
|
-
};
|
|
1480
|
-
var DEFAULT_PHONE_MASK = "+ 9 999 999 999 999 99";
|
|
1481
|
-
var getPhoneMask = function(countryCode) {
|
|
1482
|
-
var mask = DEFAULT_PHONE_MASK;
|
|
1483
|
-
if (countryCode !== void 0) {
|
|
1484
|
-
var countrySettings = findCountryByCode(countryCode);
|
|
1485
|
-
if (countrySettings !== void 0) {
|
|
1486
|
-
var dialCodeLength = countrySettings.dialCode.length;
|
|
1487
|
-
var _countrySettings_phoneMask;
|
|
1488
|
-
var areaAndPhoneMask = (_countrySettings_phoneMask = countrySettings.phoneMask) !== null && _countrySettings_phoneMask !== void 0 ? _countrySettings_phoneMask : mask.substring(2, mask.length - dialCodeLength);
|
|
1489
|
-
mask = "+ ".concat("9".repeat(dialCodeLength), " ").concat(areaAndPhoneMask);
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
return mask;
|
|
1419
|
+
var isInt = trueReactPlatformHelpers.isNumberInteger;
|
|
1420
|
+
var addClickHandler = trueReactPlatformHelpers.addClickHandler;
|
|
1421
|
+
var addDataTestId = trueReactPlatformHelpers.addDataTestId;
|
|
1422
|
+
var createFilter = trueReactPlatformHelpers.createFilter;
|
|
1423
|
+
var getSelectKeyHandler = trueReactPlatformHelpers.getSelectKeyHandler;
|
|
1424
|
+
var getTestId = trueReactPlatformHelpers.getTestId;
|
|
1425
|
+
var isStringNotEmpty = trueReactPlatformHelpers.isStringNotEmpty;
|
|
1426
|
+
var isEmpty = trueReactPlatformHelpers.isEmpty;
|
|
1427
|
+
var isNotEmpty = function(val) {
|
|
1428
|
+
return trueReactPlatformHelpers.isString(val) && isStringNotEmpty(val) || isNotEmpty(val);
|
|
1493
1429
|
};
|
|
1494
1430
|
var useIsMounted = function() {
|
|
1495
1431
|
var isMounted = React.useRef(false);
|
|
@@ -4048,63 +3984,63 @@
|
|
|
4048
3984
|
};
|
|
4049
3985
|
}, dependencies);
|
|
4050
3986
|
};
|
|
4051
|
-
const avatarGreen = ` <svg
|
|
4052
|
-
width="100%"
|
|
4053
|
-
height="100%"
|
|
4054
|
-
viewBox="0 0 32 32"
|
|
4055
|
-
fill="none"
|
|
4056
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4057
|
-
|
|
4058
|
-
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED"
|
|
4059
|
-
<mask
|
|
4060
|
-
id="mask0_0_12744"
|
|
4061
|
-
style="mask-type: 'alpha';"
|
|
4062
|
-
maskUnits="userSpaceOnUse"
|
|
4063
|
-
x="0"
|
|
4064
|
-
y="0"
|
|
4065
|
-
width="32"
|
|
4066
|
-
height="32"
|
|
4067
|
-
|
|
4068
|
-
<circle cx="16" cy="16" r="16" fill="white"
|
|
4069
|
-
</mask
|
|
4070
|
-
<g mask="url(#mask0_0_12744)"
|
|
4071
|
-
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)"
|
|
4072
|
-
<mask
|
|
4073
|
-
id="mask1_0_12744"
|
|
4074
|
-
style="mask-type: 'alpha';"
|
|
4075
|
-
maskUnits="userSpaceOnUse"
|
|
4076
|
-
x="3"
|
|
4077
|
-
y="16"
|
|
4078
|
-
width="26"
|
|
4079
|
-
height="26"
|
|
4080
|
-
|
|
4081
|
-
<circle cx="16" cy="29" r="13" fill="white"
|
|
4082
|
-
</mask
|
|
4083
|
-
<g mask="url(#mask1_0_12744)"
|
|
4084
|
-
<ellipse
|
|
4085
|
-
cx="16"
|
|
4086
|
-
cy="17.5"
|
|
4087
|
-
rx="6"
|
|
4088
|
-
ry="7.5"
|
|
4089
|
-
fill="#505F79"
|
|
4090
|
-
fill-opacity="0.204983"
|
|
4091
|
-
|
|
4092
|
-
</g
|
|
4093
|
-
</g
|
|
4094
|
-
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white"
|
|
4095
|
-
<defs
|
|
4096
|
-
<linearGradient
|
|
4097
|
-
id="paint0_linear_0_12744"
|
|
4098
|
-
x1="13.347"
|
|
4099
|
-
y1="46.279"
|
|
4100
|
-
x2="33.5318"
|
|
4101
|
-
y2="30.8088"
|
|
4102
|
-
gradientUnits="userSpaceOnUse"
|
|
4103
|
-
|
|
4104
|
-
<stop stop-color="#ABD229"
|
|
4105
|
-
<stop offset="1" stop-color="#9CD03F"
|
|
4106
|
-
</linearGradient
|
|
4107
|
-
</defs
|
|
3987
|
+
const avatarGreen = ` <svg
|
|
3988
|
+
width="100%"
|
|
3989
|
+
height="100%"
|
|
3990
|
+
viewBox="0 0 32 32"
|
|
3991
|
+
fill="none"
|
|
3992
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3993
|
+
>
|
|
3994
|
+
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
|
|
3995
|
+
<mask
|
|
3996
|
+
id="mask0_0_12744"
|
|
3997
|
+
style="mask-type: 'alpha';"
|
|
3998
|
+
maskUnits="userSpaceOnUse"
|
|
3999
|
+
x="0"
|
|
4000
|
+
y="0"
|
|
4001
|
+
width="32"
|
|
4002
|
+
height="32"
|
|
4003
|
+
>
|
|
4004
|
+
<circle cx="16" cy="16" r="16" fill="white" />
|
|
4005
|
+
</mask>
|
|
4006
|
+
<g mask="url(#mask0_0_12744)">
|
|
4007
|
+
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
|
|
4008
|
+
<mask
|
|
4009
|
+
id="mask1_0_12744"
|
|
4010
|
+
style="mask-type: 'alpha';"
|
|
4011
|
+
maskUnits="userSpaceOnUse"
|
|
4012
|
+
x="3"
|
|
4013
|
+
y="16"
|
|
4014
|
+
width="26"
|
|
4015
|
+
height="26"
|
|
4016
|
+
>
|
|
4017
|
+
<circle cx="16" cy="29" r="13" fill="white" />
|
|
4018
|
+
</mask>
|
|
4019
|
+
<g mask="url(#mask1_0_12744)">
|
|
4020
|
+
<ellipse
|
|
4021
|
+
cx="16"
|
|
4022
|
+
cy="17.5"
|
|
4023
|
+
rx="6"
|
|
4024
|
+
ry="7.5"
|
|
4025
|
+
fill="#505F79"
|
|
4026
|
+
fill-opacity="0.204983"
|
|
4027
|
+
/>
|
|
4028
|
+
</g>
|
|
4029
|
+
</g>
|
|
4030
|
+
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
|
|
4031
|
+
<defs>
|
|
4032
|
+
<linearGradient
|
|
4033
|
+
id="paint0_linear_0_12744"
|
|
4034
|
+
x1="13.347"
|
|
4035
|
+
y1="46.279"
|
|
4036
|
+
x2="33.5318"
|
|
4037
|
+
y2="30.8088"
|
|
4038
|
+
gradientUnits="userSpaceOnUse"
|
|
4039
|
+
>
|
|
4040
|
+
<stop stop-color="#ABD229" />
|
|
4041
|
+
<stop offset="1" stop-color="#9CD03F" />
|
|
4042
|
+
</linearGradient>
|
|
4043
|
+
</defs>
|
|
4108
4044
|
</svg>`;
|
|
4109
4045
|
var complexIcons = {
|
|
4110
4046
|
avatar: avatarGreen
|
|
@@ -5139,6 +5075,11 @@
|
|
|
5139
5075
|
})
|
|
5140
5076
|
}));
|
|
5141
5077
|
};
|
|
5078
|
+
var renderIcon = function(icon) {
|
|
5079
|
+
return typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, {
|
|
5080
|
+
type: icon
|
|
5081
|
+
}) : icon;
|
|
5082
|
+
};
|
|
5142
5083
|
var ITEM_HORIZONTAL_PADDING = 16;
|
|
5143
5084
|
var ICON_SIZE = 20;
|
|
5144
5085
|
var ICON_GAP = 12;
|
|
@@ -5247,7 +5188,7 @@
|
|
|
5247
5188
|
var _item_testId;
|
|
5248
5189
|
return /* @__PURE__ */ jsx("div", _object_spread_props$A(_object_spread$J({
|
|
5249
5190
|
className: classes.root
|
|
5250
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
5191
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
5251
5192
|
children: items.map(function(item, idx) {
|
|
5252
5193
|
var _obj;
|
|
5253
5194
|
return /* @__PURE__ */ jsxs(React.Fragment, {
|
|
@@ -5256,19 +5197,17 @@
|
|
|
5256
5197
|
className: classes.spacer
|
|
5257
5198
|
}),
|
|
5258
5199
|
/* @__PURE__ */ jsxs("div", _object_spread_props$A(_object_spread$J({
|
|
5259
|
-
className: clsx(classes.item, (_obj = {}, _define_property$L(_obj, classes.disabledItem, item.disabled), _define_property$L(_obj, classes.withIconGap, item.withIconGap), _obj))
|
|
5260
|
-
}, addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
|
|
5261
|
-
disabled: item.disabled
|
|
5262
|
-
})), {
|
|
5200
|
+
className: clsx(classes.item, (_obj = {}, _define_property$L(_obj, classes.disabledItem, item.disabled), _define_property$L(_obj, classes.withIconGap, item.withIconGap), _obj)),
|
|
5263
5201
|
onClick: item.disabled ? void 0 : function() {
|
|
5264
5202
|
return handleItemClick(item);
|
|
5265
|
-
}
|
|
5203
|
+
}
|
|
5204
|
+
}, trueReactPlatformHelpers.addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : trueReactPlatformHelpers.getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
|
|
5205
|
+
disabled: item.disabled
|
|
5206
|
+
})), {
|
|
5266
5207
|
children: [
|
|
5267
|
-
|
|
5208
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(item.icon) && /* @__PURE__ */ jsx("span", {
|
|
5268
5209
|
className: classes.icon,
|
|
5269
|
-
children:
|
|
5270
|
-
type: item.icon
|
|
5271
|
-
}) : item.icon
|
|
5210
|
+
children: renderIcon(item.icon)
|
|
5272
5211
|
}),
|
|
5273
5212
|
/* @__PURE__ */ jsx("span", {
|
|
5274
5213
|
className: classes.content,
|
|
@@ -6110,8 +6049,8 @@
|
|
|
6110
6049
|
tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader,
|
|
6111
6050
|
size
|
|
6112
6051
|
]);
|
|
6113
|
-
var hasIcon =
|
|
6114
|
-
var hasChildren =
|
|
6052
|
+
var hasIcon = trueReactPlatformHelpers.isReactNodeNotEmpty(icon);
|
|
6053
|
+
var hasChildren = trueReactPlatformHelpers.isReactNodeNotEmpty(children);
|
|
6115
6054
|
var hasNoAction = isDisabled || isLoading;
|
|
6116
6055
|
var _obj, _obj1;
|
|
6117
6056
|
return /* @__PURE__ */ jsxs("button", _object_spread_props$v(_object_spread$E({
|
|
@@ -6122,16 +6061,14 @@
|
|
|
6122
6061
|
disabled: hasNoAction,
|
|
6123
6062
|
onClick: !hasNoAction ? onClick : void 0,
|
|
6124
6063
|
onMouseDown: !hasNoAction ? onMouseDown : void 0
|
|
6125
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
6064
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
6126
6065
|
children: [
|
|
6127
6066
|
/* @__PURE__ */ jsxs("span", {
|
|
6128
6067
|
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)),
|
|
6129
6068
|
children: [
|
|
6130
6069
|
hasIcon && /* @__PURE__ */ jsx("span", {
|
|
6131
6070
|
className: classes.icon,
|
|
6132
|
-
children:
|
|
6133
|
-
type: icon
|
|
6134
|
-
}) : icon
|
|
6071
|
+
children: trueReactPlatformHelpers.isReactNodeNotEmpty(icon) && renderIcon(icon)
|
|
6135
6072
|
}),
|
|
6136
6073
|
hasChildren && /* @__PURE__ */ jsx("span", {
|
|
6137
6074
|
className: clsx(classes.children, hasIcon && classes.withIcon),
|
|
@@ -6341,7 +6278,7 @@
|
|
|
6341
6278
|
var _obj;
|
|
6342
6279
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$u(_object_spread$D({
|
|
6343
6280
|
className: clsx(classes.root, (_obj = {}, _define_property$F(_obj, classes.disabled, isDisabled), _define_property$F(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
|
|
6344
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
6281
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
6345
6282
|
children: [
|
|
6346
6283
|
/* @__PURE__ */ jsx("input", _object_spread$D({
|
|
6347
6284
|
type: "checkbox",
|
|
@@ -6351,7 +6288,7 @@
|
|
|
6351
6288
|
readOnly: isReadonly
|
|
6352
6289
|
}, hasAction && {
|
|
6353
6290
|
onChange: onToggle,
|
|
6354
|
-
onKeyDown: getSelectKeyHandler(onToggle)
|
|
6291
|
+
onKeyDown: trueReactPlatformHelpers.getSelectKeyHandler(onToggle)
|
|
6355
6292
|
})),
|
|
6356
6293
|
/* @__PURE__ */ jsx("div", {
|
|
6357
6294
|
className: clsx(classes.check, isSelected && classes.checked),
|
|
@@ -6359,7 +6296,7 @@
|
|
|
6359
6296
|
type: isSemiChecked ? "minus" : "check"
|
|
6360
6297
|
})
|
|
6361
6298
|
}),
|
|
6362
|
-
|
|
6299
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
6363
6300
|
className: classes.children,
|
|
6364
6301
|
children
|
|
6365
6302
|
})
|
|
@@ -6624,11 +6561,6 @@
|
|
|
6624
6561
|
className: classes.root
|
|
6625
6562
|
}, addDataAttributes(data)));
|
|
6626
6563
|
};
|
|
6627
|
-
var renderIcon = function(icon) {
|
|
6628
|
-
return typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, {
|
|
6629
|
-
type: icon
|
|
6630
|
-
}) : icon;
|
|
6631
|
-
};
|
|
6632
6564
|
var PADDING_X$1 = 12;
|
|
6633
6565
|
var AUTOSIZE_MAX_WIDTH = 480;
|
|
6634
6566
|
var styles$x = {
|
|
@@ -7192,8 +7124,8 @@
|
|
|
7192
7124
|
var hasControls = hasClearIcon || iconType !== void 0 || isLoading;
|
|
7193
7125
|
var hasValue = value !== void 0 && value !== "";
|
|
7194
7126
|
var hasUnits = units !== void 0 && units !== "";
|
|
7195
|
-
var hasLabel =
|
|
7196
|
-
var hasPlaceholder = (!hasLabel || hasFocus && !isReadonly) &&
|
|
7127
|
+
var hasLabel = trueReactPlatformHelpers.isStringNotEmpty(label);
|
|
7128
|
+
var hasPlaceholder = (!hasLabel || hasFocus && !isReadonly) && trueReactPlatformHelpers.isStringNotEmpty(placeholder);
|
|
7197
7129
|
var shouldShowUnits = (hasValue || isFocused && !hasPlaceholder) && hasUnits;
|
|
7198
7130
|
var _obj;
|
|
7199
7131
|
var props = _object_spread$A({
|
|
@@ -7213,7 +7145,7 @@
|
|
|
7213
7145
|
readOnly: isReadonly,
|
|
7214
7146
|
size: isAutoSizeable ? defaultSize : void 0,
|
|
7215
7147
|
tabIndex
|
|
7216
|
-
}, addDataTestId(testId));
|
|
7148
|
+
}, trueReactPlatformHelpers.addDataTestId(testId));
|
|
7217
7149
|
var tweakPreloaderStyles = useTweakStyles(componentStyles, tweakStyles, "tweakPreloader");
|
|
7218
7150
|
var _obj1, _obj2;
|
|
7219
7151
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -7270,7 +7202,7 @@
|
|
|
7270
7202
|
type: "close"
|
|
7271
7203
|
})
|
|
7272
7204
|
}),
|
|
7273
|
-
iconType
|
|
7205
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(iconType) && /* @__PURE__ */ jsx("div", {
|
|
7274
7206
|
className: clsx(classes.inputIcon, _define_property$C({}, classes.activeIcon, !isDisabled && onIconClick !== void 0)),
|
|
7275
7207
|
onClick: !isDisabled ? onIconClick : void 0,
|
|
7276
7208
|
children: renderIcon(iconType)
|
|
@@ -7279,11 +7211,11 @@
|
|
|
7279
7211
|
})
|
|
7280
7212
|
]
|
|
7281
7213
|
})),
|
|
7282
|
-
|
|
7214
|
+
trueReactPlatformHelpers.isStringNotEmpty(infoMessage) && /* @__PURE__ */ jsx("div", {
|
|
7283
7215
|
className: classes.info,
|
|
7284
7216
|
children: infoMessage
|
|
7285
7217
|
}),
|
|
7286
|
-
|
|
7218
|
+
trueReactPlatformHelpers.isStringNotEmpty(errorMessage) && /* @__PURE__ */ jsx("div", {
|
|
7287
7219
|
className: clsx(classes.error, classes["error-".concat(errorPosition)]),
|
|
7288
7220
|
children: errorMessage
|
|
7289
7221
|
})
|
|
@@ -7353,10 +7285,10 @@
|
|
|
7353
7285
|
}
|
|
7354
7286
|
return target;
|
|
7355
7287
|
}
|
|
7356
|
-
function _object_without_properties$
|
|
7288
|
+
function _object_without_properties$9(source, excluded) {
|
|
7357
7289
|
if (source == null)
|
|
7358
7290
|
return {};
|
|
7359
|
-
var target = _object_without_properties_loose$
|
|
7291
|
+
var target = _object_without_properties_loose$9(source, excluded);
|
|
7360
7292
|
var key, i;
|
|
7361
7293
|
if (Object.getOwnPropertySymbols) {
|
|
7362
7294
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7371,7 +7303,7 @@
|
|
|
7371
7303
|
}
|
|
7372
7304
|
return target;
|
|
7373
7305
|
}
|
|
7374
|
-
function _object_without_properties_loose$
|
|
7306
|
+
function _object_without_properties_loose$9(source, excluded) {
|
|
7375
7307
|
if (source == null)
|
|
7376
7308
|
return {};
|
|
7377
7309
|
var target = {};
|
|
@@ -7386,7 +7318,7 @@
|
|
|
7386
7318
|
return target;
|
|
7387
7319
|
}
|
|
7388
7320
|
var DateInput = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
|
|
7389
|
-
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$
|
|
7321
|
+
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, [
|
|
7390
7322
|
"date",
|
|
7391
7323
|
"startDate",
|
|
7392
7324
|
"endDate",
|
|
@@ -7558,10 +7490,10 @@
|
|
|
7558
7490
|
}
|
|
7559
7491
|
return target;
|
|
7560
7492
|
}
|
|
7561
|
-
function _object_without_properties$
|
|
7493
|
+
function _object_without_properties$8(source, excluded) {
|
|
7562
7494
|
if (source == null)
|
|
7563
7495
|
return {};
|
|
7564
|
-
var target = _object_without_properties_loose$
|
|
7496
|
+
var target = _object_without_properties_loose$8(source, excluded);
|
|
7565
7497
|
var key, i;
|
|
7566
7498
|
if (Object.getOwnPropertySymbols) {
|
|
7567
7499
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7576,7 +7508,7 @@
|
|
|
7576
7508
|
}
|
|
7577
7509
|
return target;
|
|
7578
7510
|
}
|
|
7579
|
-
function _object_without_properties_loose$
|
|
7511
|
+
function _object_without_properties_loose$8(source, excluded) {
|
|
7580
7512
|
if (source == null)
|
|
7581
7513
|
return {};
|
|
7582
7514
|
var target = {};
|
|
@@ -7591,7 +7523,7 @@
|
|
|
7591
7523
|
return target;
|
|
7592
7524
|
}
|
|
7593
7525
|
var SearchInput = function(_param) {
|
|
7594
|
-
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$
|
|
7526
|
+
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, [
|
|
7595
7527
|
"isClearable",
|
|
7596
7528
|
"tweakStyles",
|
|
7597
7529
|
"testId",
|
|
@@ -7601,7 +7533,7 @@
|
|
|
7601
7533
|
var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
|
|
7602
7534
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$q(_object_spread$y({
|
|
7603
7535
|
className: classes.root
|
|
7604
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
7536
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
7605
7537
|
children: [
|
|
7606
7538
|
/* @__PURE__ */ jsx("div", {
|
|
7607
7539
|
className: classes.icon,
|
|
@@ -7612,7 +7544,7 @@
|
|
|
7612
7544
|
/* @__PURE__ */ jsx(Input, _object_spread$y({
|
|
7613
7545
|
isClearable,
|
|
7614
7546
|
isActive: props.value !== "" && props.value !== void 0,
|
|
7615
|
-
testId: getTestId(testId, "input"),
|
|
7547
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "input"),
|
|
7616
7548
|
tweakStyles: tweakInputStyles,
|
|
7617
7549
|
hasFloatingLabel: false,
|
|
7618
7550
|
label: props.placeholder
|
|
@@ -7774,10 +7706,10 @@
|
|
|
7774
7706
|
}
|
|
7775
7707
|
return target;
|
|
7776
7708
|
}
|
|
7777
|
-
function _object_without_properties$
|
|
7709
|
+
function _object_without_properties$7(source, excluded) {
|
|
7778
7710
|
if (source == null)
|
|
7779
7711
|
return {};
|
|
7780
|
-
var target = _object_without_properties_loose$
|
|
7712
|
+
var target = _object_without_properties_loose$7(source, excluded);
|
|
7781
7713
|
var key, i;
|
|
7782
7714
|
if (Object.getOwnPropertySymbols) {
|
|
7783
7715
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7792,7 +7724,7 @@
|
|
|
7792
7724
|
}
|
|
7793
7725
|
return target;
|
|
7794
7726
|
}
|
|
7795
|
-
function _object_without_properties_loose$
|
|
7727
|
+
function _object_without_properties_loose$7(source, excluded) {
|
|
7796
7728
|
if (source == null)
|
|
7797
7729
|
return {};
|
|
7798
7730
|
var target = {};
|
|
@@ -7904,7 +7836,7 @@
|
|
|
7904
7836
|
_this_props.active;
|
|
7905
7837
|
var elementType = _this_props.elementType, children = _this_props.children;
|
|
7906
7838
|
_this_props.options;
|
|
7907
|
-
var wrapperProps = _object_without_properties$
|
|
7839
|
+
var wrapperProps = _object_without_properties$7(_this_props, [
|
|
7908
7840
|
"active",
|
|
7909
7841
|
"elementType",
|
|
7910
7842
|
"children",
|
|
@@ -8074,7 +8006,7 @@
|
|
|
8074
8006
|
}
|
|
8075
8007
|
var SelectListItem = function(param) {
|
|
8076
8008
|
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;
|
|
8077
|
-
var isMultiSelect = isNotEmpty(onToggleCheckbox);
|
|
8009
|
+
var isMultiSelect = trueReactPlatformHelpers.isNotEmpty(onToggleCheckbox);
|
|
8078
8010
|
var _obj;
|
|
8079
8011
|
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$p(_object_spread$v({
|
|
8080
8012
|
active: isFocused,
|
|
@@ -8121,7 +8053,7 @@
|
|
|
8121
8053
|
function SelectList(param) {
|
|
8122
8054
|
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;
|
|
8123
8055
|
var classes = useTheme("SelectList", styles$s, tweakStyles).classes;
|
|
8124
|
-
var isMultiSelect = isNotEmpty(onToggleCheckbox);
|
|
8056
|
+
var isMultiSelect = trueReactPlatformHelpers.isNotEmpty(onToggleCheckbox);
|
|
8125
8057
|
var multiSelectValue = activeValue;
|
|
8126
8058
|
var _multiSelectValue_length;
|
|
8127
8059
|
var selectedOptionsCount = (_multiSelectValue_length = multiSelectValue === null || multiSelectValue === void 0 ? void 0 : multiSelectValue.length) !== null && _multiSelectValue_length !== void 0 ? _multiSelectValue_length : 0;
|
|
@@ -8151,13 +8083,13 @@
|
|
|
8151
8083
|
optionsDisableMap
|
|
8152
8084
|
]);
|
|
8153
8085
|
var isActiveOption = function(item) {
|
|
8154
|
-
return isMultiSelect ? activeOptionsIdMap.includes(convertValueToId(item)) : isNotEmpty(activeValue) && convertValueToId(activeValue) === convertValueToId(item);
|
|
8086
|
+
return isMultiSelect ? activeOptionsIdMap.includes(convertValueToId(item)) : trueReactPlatformHelpers.isNotEmpty(activeValue) && convertValueToId(activeValue) === convertValueToId(item);
|
|
8155
8087
|
};
|
|
8156
8088
|
return /* @__PURE__ */ jsxs(ScrollIntoViewIfNeeded, {
|
|
8157
8089
|
active: shouldScrollToList && !isMultiSelect,
|
|
8158
|
-
className: clsx(classes.root, _define_property$w({}, classes.withListHeader,
|
|
8090
|
+
className: clsx(classes.root, _define_property$w({}, classes.withListHeader, trueReactPlatformHelpers.isReactNodeNotEmpty(customListHeader))),
|
|
8159
8091
|
children: [
|
|
8160
|
-
|
|
8092
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(customListHeader) && /* @__PURE__ */ jsx("div", {
|
|
8161
8093
|
className: classes.listHeader,
|
|
8162
8094
|
children: customListHeader
|
|
8163
8095
|
}),
|
|
@@ -8169,7 +8101,7 @@
|
|
|
8169
8101
|
children: loadingLabel
|
|
8170
8102
|
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
8171
8103
|
children: [
|
|
8172
|
-
|
|
8104
|
+
trueReactPlatformHelpers.isStringNotEmpty(defaultOptionLabel) && /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
|
|
8173
8105
|
active: focusedIndex === DEFAULT_OPTION_INDEX,
|
|
8174
8106
|
options: {
|
|
8175
8107
|
block: "nearest"
|
|
@@ -8180,7 +8112,7 @@
|
|
|
8180
8112
|
},
|
|
8181
8113
|
children: defaultOptionLabel
|
|
8182
8114
|
}),
|
|
8183
|
-
|
|
8115
|
+
trueReactPlatformHelpers.isStringNotEmpty(allOptionsLabel) && /* @__PURE__ */ jsx(SelectListItem, {
|
|
8184
8116
|
classes,
|
|
8185
8117
|
index: ALL_OPTION_INDEX,
|
|
8186
8118
|
isSemiChecked: selectedOptionsCount > 0 && !areAllOptionsSelected,
|
|
@@ -8228,7 +8160,7 @@
|
|
|
8228
8160
|
};
|
|
8229
8161
|
var getDefaultConvertToIdFunction = function(convertValueToString) {
|
|
8230
8162
|
return function(value) {
|
|
8231
|
-
return isNotEmpty(value === null || value === void 0 ? void 0 : value.id) ? String(value.id) : convertValueToString(value);
|
|
8163
|
+
return trueReactPlatformHelpers.isNotEmpty(value === null || value === void 0 ? void 0 : value.id) ? String(value.id) : convertValueToString(value);
|
|
8232
8164
|
};
|
|
8233
8165
|
};
|
|
8234
8166
|
var isMultiSelectValue = function(props, _value) {
|
|
@@ -8368,10 +8300,10 @@
|
|
|
8368
8300
|
}
|
|
8369
8301
|
return target;
|
|
8370
8302
|
}
|
|
8371
|
-
function _object_without_properties$
|
|
8303
|
+
function _object_without_properties$6(source, excluded) {
|
|
8372
8304
|
if (source == null)
|
|
8373
8305
|
return {};
|
|
8374
|
-
var target = _object_without_properties_loose$
|
|
8306
|
+
var target = _object_without_properties_loose$6(source, excluded);
|
|
8375
8307
|
var key, i;
|
|
8376
8308
|
if (Object.getOwnPropertySymbols) {
|
|
8377
8309
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -8386,7 +8318,7 @@
|
|
|
8386
8318
|
}
|
|
8387
8319
|
return target;
|
|
8388
8320
|
}
|
|
8389
|
-
function _object_without_properties_loose$
|
|
8321
|
+
function _object_without_properties_loose$6(source, excluded) {
|
|
8390
8322
|
if (source == null)
|
|
8391
8323
|
return {};
|
|
8392
8324
|
var target = {};
|
|
@@ -8522,7 +8454,7 @@
|
|
|
8522
8454
|
}
|
|
8523
8455
|
};
|
|
8524
8456
|
function Select(props) {
|
|
8525
|
-
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$
|
|
8457
|
+
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, [
|
|
8526
8458
|
"options",
|
|
8527
8459
|
"value",
|
|
8528
8460
|
"defaultOptionLabel",
|
|
@@ -8557,7 +8489,7 @@
|
|
|
8557
8489
|
var isMounted = useIsMounted();
|
|
8558
8490
|
var _useState = _sliced_to_array$j(React.useState(false), 2), isListOpen = _useState[0], setIsListOpen = _useState[1];
|
|
8559
8491
|
var _useState1 = _sliced_to_array$j(React.useState(false), 2), areOptionsLoading = _useState1[0], setAreOptionsLoading = _useState1[1];
|
|
8560
|
-
var hasDefaultOption = isStringNotEmpty(defaultOptionLabel);
|
|
8492
|
+
var hasDefaultOption = trueReactPlatformHelpers.isStringNotEmpty(defaultOptionLabel);
|
|
8561
8493
|
var _useState2 = _sliced_to_array$j(React.useState(DEFAULT_OPTION_INDEX), 2), focusedListCellIndex = _useState2[0], setFocusedListCellIndex = _useState2[1];
|
|
8562
8494
|
var _useState3 = _sliced_to_array$j(React.useState(""), 2), searchValue = _useState3[0], setSearchValue = _useState3[1];
|
|
8563
8495
|
var _useState4 = _sliced_to_array$j(React.useState(true), 2), shouldShowDefaultOption = _useState4[0], setShouldShowDefaultOption = _useState4[1];
|
|
@@ -8568,13 +8500,13 @@
|
|
|
8568
8500
|
var hasSearchInputInList = optionsMode !== "normal" && shouldRenderSearchInputInList;
|
|
8569
8501
|
var isMultiSelect = isMultiSelectValue(props);
|
|
8570
8502
|
var strValue = isMultiSelect ? value === null || value === void 0 ? void 0 : value[0] : value;
|
|
8571
|
-
var shouldShowAllOption = isMultiSelect &&
|
|
8503
|
+
var shouldShowAllOption = isMultiSelect && trueReactPlatformHelpers.isStringNotEmpty(allOptionsLabel) && searchValue === "";
|
|
8572
8504
|
var filteredOptions = React.useMemo(function() {
|
|
8573
8505
|
if (optionsMode !== "search") {
|
|
8574
8506
|
return options;
|
|
8575
8507
|
}
|
|
8576
8508
|
var _convertValueToString;
|
|
8577
|
-
var filter = optionsFilter !== null && optionsFilter !== void 0 ? optionsFilter : createFilter(function(option) {
|
|
8509
|
+
var filter = optionsFilter !== null && optionsFilter !== void 0 ? optionsFilter : trueReactPlatformHelpers.createFilter(function(option) {
|
|
8578
8510
|
return [
|
|
8579
8511
|
(_convertValueToString = convertValueToString(option)) !== null && _convertValueToString !== void 0 ? _convertValueToString : ""
|
|
8580
8512
|
];
|
|
@@ -8596,7 +8528,7 @@
|
|
|
8596
8528
|
isOptionDisabled
|
|
8597
8529
|
]);
|
|
8598
8530
|
var areAllOptionsSelected = isMultiSelect && (value === null || value === void 0 ? void 0 : value.length) === availableOptions.length;
|
|
8599
|
-
var shouldShowMultiSelectCounter = isMultiSelect && isNotEmpty(value) && value.length > 1 && !areAllOptionsSelected;
|
|
8531
|
+
var shouldShowMultiSelectCounter = isMultiSelect && trueReactPlatformHelpers.isNotEmpty(value) && value.length > 1 && !areAllOptionsSelected;
|
|
8600
8532
|
var optionsIndexesForNavigation = React.useMemo(function() {
|
|
8601
8533
|
var result = [];
|
|
8602
8534
|
if (shouldShowDefaultOption && hasDefaultOption) {
|
|
@@ -8614,8 +8546,8 @@
|
|
|
8614
8546
|
}, [
|
|
8615
8547
|
filteredOptions
|
|
8616
8548
|
]);
|
|
8617
|
-
var stringValue = isNotEmpty(strValue) ? convertValueToString(strValue) : void 0;
|
|
8618
|
-
var showedStringValue = areAllOptionsSelected && isNotEmpty(allOptionsLabel) ? allOptionsLabel : stringValue;
|
|
8549
|
+
var stringValue = trueReactPlatformHelpers.isNotEmpty(strValue) ? convertValueToString(strValue) : void 0;
|
|
8550
|
+
var showedStringValue = areAllOptionsSelected && trueReactPlatformHelpers.isNotEmpty(allOptionsLabel) ? allOptionsLabel : stringValue;
|
|
8619
8551
|
var convertToId = React.useCallback(function(v) {
|
|
8620
8552
|
return (convertValueToId !== null && convertValueToId !== void 0 ? convertValueToId : getDefaultConvertToIdFunction(convertValueToString))(v);
|
|
8621
8553
|
}, [
|
|
@@ -8647,7 +8579,7 @@
|
|
|
8647
8579
|
handleListClose(event);
|
|
8648
8580
|
return;
|
|
8649
8581
|
}
|
|
8650
|
-
if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current) || !isNotEmpty(inputWrapper.current)) {
|
|
8582
|
+
if (!trueReactPlatformHelpers.isNotEmpty(event.relatedTarget) || !trueReactPlatformHelpers.isNotEmpty(list.current) || !trueReactPlatformHelpers.isNotEmpty(inputWrapper.current)) {
|
|
8651
8583
|
return;
|
|
8652
8584
|
}
|
|
8653
8585
|
var isActionInsideSelect = hasExactParent(event.relatedTarget, list.current) || hasExactParent(event.relatedTarget, inputWrapper.current);
|
|
@@ -8857,7 +8789,7 @@
|
|
|
8857
8789
|
React.useEffect(function() {
|
|
8858
8790
|
var _optionsIndexesForNavigation_find;
|
|
8859
8791
|
setFocusedListCellIndex((_optionsIndexesForNavigation_find = optionsIndexesForNavigation.find(function(index) {
|
|
8860
|
-
return isNotEmpty(strValue) && isNotEmpty(filteredOptions[index]) && convertToId(filteredOptions[index]) === convertToId(strValue);
|
|
8792
|
+
return trueReactPlatformHelpers.isNotEmpty(strValue) && trueReactPlatformHelpers.isNotEmpty(filteredOptions[index]) && convertToId(filteredOptions[index]) === convertToId(strValue);
|
|
8861
8793
|
})) !== null && _optionsIndexesForNavigation_find !== void 0 ? _optionsIndexesForNavigation_find : optionsIndexesForNavigation[0]);
|
|
8862
8794
|
}, [
|
|
8863
8795
|
strValue,
|
|
@@ -8896,7 +8828,7 @@
|
|
|
8896
8828
|
isLoading: inputProps.isLoading,
|
|
8897
8829
|
loadingLabel,
|
|
8898
8830
|
tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
|
|
8899
|
-
testId: getTestId(testId, "list"),
|
|
8831
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "list"),
|
|
8900
8832
|
shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll,
|
|
8901
8833
|
isOptionDisabled,
|
|
8902
8834
|
convertValueToString,
|
|
@@ -8906,7 +8838,7 @@
|
|
|
8906
8838
|
onToggleCheckbox: isMultiSelect ? handleToggleOptionCheckbox : void 0
|
|
8907
8839
|
})
|
|
8908
8840
|
}));
|
|
8909
|
-
var multiSelectCounterWithIcon = shouldShowMultiSelectCounter || isNotEmpty(iconType) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
8841
|
+
var multiSelectCounterWithIcon = shouldShowMultiSelectCounter || trueReactPlatformHelpers.isNotEmpty(iconType) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
8910
8842
|
children: [
|
|
8911
8843
|
shouldShowMultiSelectCounter && /* @__PURE__ */ jsxs("div", {
|
|
8912
8844
|
className: classes.counter,
|
|
@@ -8916,7 +8848,7 @@
|
|
|
8916
8848
|
")"
|
|
8917
8849
|
]
|
|
8918
8850
|
}),
|
|
8919
|
-
isNotEmpty(iconType) && /* @__PURE__ */ jsx("div", {
|
|
8851
|
+
trueReactPlatformHelpers.isNotEmpty(iconType) && /* @__PURE__ */ jsx("div", {
|
|
8920
8852
|
className: classes.icon,
|
|
8921
8853
|
children: renderIcon(iconType)
|
|
8922
8854
|
})
|
|
@@ -8951,9 +8883,7 @@
|
|
|
8951
8883
|
},
|
|
8952
8884
|
onClick: onArrowClick,
|
|
8953
8885
|
className: clsx(classes.arrow, isOpen && classes.activeArrow),
|
|
8954
|
-
children:
|
|
8955
|
-
type: dropdownIcon
|
|
8956
|
-
})
|
|
8886
|
+
children: renderIcon(dropdownIcon)
|
|
8957
8887
|
})
|
|
8958
8888
|
]
|
|
8959
8889
|
}),
|
|
@@ -9119,17 +9049,17 @@
|
|
|
9119
9049
|
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
9120
9050
|
var getDateFormatter = function(dateFormat) {
|
|
9121
9051
|
return function(date) {
|
|
9122
|
-
return isNotEmpty(date) ? dateFns.format(date, dateFormat) : "";
|
|
9052
|
+
return trueReactPlatformHelpers.isNotEmpty(date) ? dateFns.format(date, dateFormat) : "";
|
|
9123
9053
|
};
|
|
9124
9054
|
};
|
|
9125
9055
|
var getDateValueParser = function(dateFormat) {
|
|
9126
9056
|
return function(value) {
|
|
9127
9057
|
var inputValue = value === EMPTY_DATE_INPUT_VALUE ? "" : value;
|
|
9128
|
-
return isStringNotEmpty(inputValue) ? dateFns.parse(value, dateFormat, new Date()) : null;
|
|
9058
|
+
return trueReactPlatformHelpers.isStringNotEmpty(inputValue) ? dateFns.parse(value, dateFormat, new Date()) : null;
|
|
9129
9059
|
};
|
|
9130
9060
|
};
|
|
9131
9061
|
var areDatesEquals = function(date1, date2) {
|
|
9132
|
-
return isEmpty(date1) && isEmpty(date2) || isNotEmpty(date1) && isNotEmpty(date2) && dateFns.isSameDay(date1, date2);
|
|
9062
|
+
return trueReactPlatformHelpers.isEmpty(date1) && trueReactPlatformHelpers.isEmpty(date2) || trueReactPlatformHelpers.isNotEmpty(date1) && trueReactPlatformHelpers.isNotEmpty(date2) && dateFns.isSameDay(date1, date2);
|
|
9133
9063
|
};
|
|
9134
9064
|
function _array_like_to_array$i(arr, len) {
|
|
9135
9065
|
if (len == null || len > arr.length)
|
|
@@ -9225,10 +9155,10 @@
|
|
|
9225
9155
|
}
|
|
9226
9156
|
return target;
|
|
9227
9157
|
}
|
|
9228
|
-
function _object_without_properties$
|
|
9158
|
+
function _object_without_properties$5(source, excluded) {
|
|
9229
9159
|
if (source == null)
|
|
9230
9160
|
return {};
|
|
9231
|
-
var target = _object_without_properties_loose$
|
|
9161
|
+
var target = _object_without_properties_loose$5(source, excluded);
|
|
9232
9162
|
var key, i;
|
|
9233
9163
|
if (Object.getOwnPropertySymbols) {
|
|
9234
9164
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -9243,7 +9173,7 @@
|
|
|
9243
9173
|
}
|
|
9244
9174
|
return target;
|
|
9245
9175
|
}
|
|
9246
|
-
function _object_without_properties_loose$
|
|
9176
|
+
function _object_without_properties_loose$5(source, excluded) {
|
|
9247
9177
|
if (source == null)
|
|
9248
9178
|
return {};
|
|
9249
9179
|
var target = {};
|
|
@@ -9283,7 +9213,7 @@
|
|
|
9283
9213
|
});
|
|
9284
9214
|
};
|
|
9285
9215
|
var DatePicker = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
|
|
9286
|
-
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$
|
|
9216
|
+
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, [
|
|
9287
9217
|
"data",
|
|
9288
9218
|
"selectedDate",
|
|
9289
9219
|
"minDate",
|
|
@@ -9349,7 +9279,7 @@
|
|
|
9349
9279
|
var _useState3 = _sliced_to_array$i(React.useState(formatDate(startDate)), 2), startDateValue = _useState3[0], setStartDateValue = _useState3[1];
|
|
9350
9280
|
var _useState4 = _sliced_to_array$i(React.useState(endDate), 2), end2 = _useState4[0], setEnd = _useState4[1];
|
|
9351
9281
|
var _useState5 = _sliced_to_array$i(React.useState(formatDate(endDate)), 2), endDateValue = _useState5[0], setEndDateValue = _useState5[1];
|
|
9352
|
-
var hasDateInputValue = isRange ? isStringNotEmpty(startDateValue) || isStringNotEmpty(endDateValue) : isStringNotEmpty(dateValue);
|
|
9282
|
+
var hasDateInputValue = isRange ? trueReactPlatformHelpers.isStringNotEmpty(startDateValue) || trueReactPlatformHelpers.isStringNotEmpty(endDateValue) : trueReactPlatformHelpers.isStringNotEmpty(dateValue);
|
|
9353
9283
|
var dateInputProps = _object_spread$t(_object_spread_props$n(_object_spread$t({}, inputProps), {
|
|
9354
9284
|
isRange,
|
|
9355
9285
|
isDisabled,
|
|
@@ -9367,7 +9297,7 @@
|
|
|
9367
9297
|
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(value, event);
|
|
9368
9298
|
};
|
|
9369
9299
|
var isDateInRange = function(date) {
|
|
9370
|
-
return (isEmpty(minDate) || dateFns.isAfter(date, minDate)) && (isEmpty(maxDate) || dateFns.isBefore(date, maxDate));
|
|
9300
|
+
return (trueReactPlatformHelpers.isEmpty(minDate) || dateFns.isAfter(date, minDate)) && (trueReactPlatformHelpers.isEmpty(maxDate) || dateFns.isBefore(date, maxDate));
|
|
9371
9301
|
};
|
|
9372
9302
|
var handleChangeRange = function(value, event) {
|
|
9373
9303
|
if (allowSameDay || !areDatesEquals(value === null || value === void 0 ? void 0 : value[0], startDate) || !areDatesEquals(value === null || value === void 0 ? void 0 : value[1], endDate)) {
|
|
@@ -9383,13 +9313,13 @@
|
|
|
9383
9313
|
var newStart = parseDateValue(newStartDateValue);
|
|
9384
9314
|
var newEndDateValue = value.slice(13);
|
|
9385
9315
|
var newEnd = parseDateValue(newEndDateValue);
|
|
9386
|
-
if (isNotEmpty(newStart) && !dateFns.isValid(newStart) || isNotEmpty(newStart) && !isDateInRange(newStart)) {
|
|
9316
|
+
if (trueReactPlatformHelpers.isNotEmpty(newStart) && !dateFns.isValid(newStart) || trueReactPlatformHelpers.isNotEmpty(newStart) && !isDateInRange(newStart)) {
|
|
9387
9317
|
newStart = start2;
|
|
9388
9318
|
}
|
|
9389
|
-
if (isNotEmpty(newEnd) && !dateFns.isValid(newEnd) || isNotEmpty(newEnd) && !isDateInRange(newEnd)) {
|
|
9319
|
+
if (trueReactPlatformHelpers.isNotEmpty(newEnd) && !dateFns.isValid(newEnd) || trueReactPlatformHelpers.isNotEmpty(newEnd) && !isDateInRange(newEnd)) {
|
|
9390
9320
|
newEnd = end2;
|
|
9391
9321
|
}
|
|
9392
|
-
if (isEmpty(newStart) && dateFns.isValid(newEnd) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9322
|
+
if (trueReactPlatformHelpers.isEmpty(newStart) && dateFns.isValid(newEnd) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9393
9323
|
dateFns.isValid(newStart) && dateFns.isValid(newEnd) && dateFns.isAfter(newStart, newEnd)) {
|
|
9394
9324
|
newStart = newEnd;
|
|
9395
9325
|
newEnd = null;
|
|
@@ -9721,7 +9651,7 @@
|
|
|
9721
9651
|
};
|
|
9722
9652
|
var formatNumberWithDefault = function(value, defaultValue) {
|
|
9723
9653
|
var val = formatNumber(value);
|
|
9724
|
-
return
|
|
9654
|
+
return trueReactPlatformHelpers.isStringNotEmpty(val) ? val : formatNumber(defaultValue);
|
|
9725
9655
|
};
|
|
9726
9656
|
var constructRegExp = function(param) {
|
|
9727
9657
|
var canBeFloat = param.canBeFloat, canBeNegative = param.canBeNegative, intPartPrecision = param.intPartPrecision, precision = param.precision;
|
|
@@ -9829,10 +9759,10 @@
|
|
|
9829
9759
|
}
|
|
9830
9760
|
return target;
|
|
9831
9761
|
}
|
|
9832
|
-
function _object_without_properties$
|
|
9762
|
+
function _object_without_properties$4(source, excluded) {
|
|
9833
9763
|
if (source == null)
|
|
9834
9764
|
return {};
|
|
9835
|
-
var target = _object_without_properties_loose$
|
|
9765
|
+
var target = _object_without_properties_loose$4(source, excluded);
|
|
9836
9766
|
var key, i;
|
|
9837
9767
|
if (Object.getOwnPropertySymbols) {
|
|
9838
9768
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -9847,7 +9777,7 @@
|
|
|
9847
9777
|
}
|
|
9848
9778
|
return target;
|
|
9849
9779
|
}
|
|
9850
|
-
function _object_without_properties_loose$
|
|
9780
|
+
function _object_without_properties_loose$4(source, excluded) {
|
|
9851
9781
|
if (source == null)
|
|
9852
9782
|
return {};
|
|
9853
9783
|
var target = {};
|
|
@@ -9980,7 +9910,7 @@
|
|
|
9980
9910
|
}
|
|
9981
9911
|
};
|
|
9982
9912
|
var NumberInput = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
|
|
9983
|
-
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$
|
|
9913
|
+
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, [
|
|
9984
9914
|
"value",
|
|
9985
9915
|
"canBeFloat",
|
|
9986
9916
|
"canBeNegative",
|
|
@@ -10000,7 +9930,7 @@
|
|
|
10000
9930
|
setIsDeleteForwardAction(event.key === "Delete");
|
|
10001
9931
|
};
|
|
10002
9932
|
var setShowedValueWithDefault = function(v) {
|
|
10003
|
-
setShowedValue(
|
|
9933
|
+
setShowedValue(trueReactPlatformHelpers.isStringNotEmpty(v) ? v : formatNumber(defaultValue));
|
|
10004
9934
|
};
|
|
10005
9935
|
var handleChange = function() {
|
|
10006
9936
|
var _ref = _async_to_generator$3(function(inputValue, event) {
|
|
@@ -11780,7 +11710,7 @@
|
|
|
11780
11710
|
var _useState4 = _sliced_to_array$e(React.useState(false), 2), isLoading = _useState4[0], setIsLoading = _useState4[1];
|
|
11781
11711
|
var _useState5 = _sliced_to_array$e(React.useState(false), 2), isLoadingOptionsOnScroll = _useState5[0], setLoadingOptionsOnScroll = _useState5[1];
|
|
11782
11712
|
var shouldShowPreloader = isLoading || isLoadingOptionsOnScroll;
|
|
11783
|
-
var hasFooter =
|
|
11713
|
+
var hasFooter = trueReactPlatformHelpers.isReactNodeNotEmpty(footer);
|
|
11784
11714
|
var handleSearchInputChange = React.useCallback(function() {
|
|
11785
11715
|
var _ref = _async_to_generator$1(function(inputValue) {
|
|
11786
11716
|
var _inputValue_trim, response;
|
|
@@ -13652,7 +13582,7 @@
|
|
|
13652
13582
|
leftPosition: -20,
|
|
13653
13583
|
topPosition,
|
|
13654
13584
|
border: "bottom",
|
|
13655
|
-
testId: getTestId(testId, "from"),
|
|
13585
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "from"),
|
|
13656
13586
|
isClearable
|
|
13657
13587
|
}, startPickerProps))
|
|
13658
13588
|
}),
|
|
@@ -13668,7 +13598,7 @@
|
|
|
13668
13598
|
topPosition,
|
|
13669
13599
|
leftPosition: -170,
|
|
13670
13600
|
border: "bottom",
|
|
13671
|
-
testId: getTestId(testId, "to"),
|
|
13601
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "to"),
|
|
13672
13602
|
isClearable
|
|
13673
13603
|
}, endPickerProps))
|
|
13674
13604
|
})
|
|
@@ -13682,7 +13612,7 @@
|
|
|
13682
13612
|
onClick: handleClear,
|
|
13683
13613
|
size: "s",
|
|
13684
13614
|
view: "text",
|
|
13685
|
-
testId: getTestId(testId, "clear-button"),
|
|
13615
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "clear-button"),
|
|
13686
13616
|
isFullWidth: true,
|
|
13687
13617
|
tweakStyles: tweakClearButtonStyles,
|
|
13688
13618
|
children: translates.clear
|
|
@@ -21895,10 +21825,10 @@
|
|
|
21895
21825
|
}
|
|
21896
21826
|
return target;
|
|
21897
21827
|
}
|
|
21898
|
-
function _object_without_properties$
|
|
21828
|
+
function _object_without_properties$3(source, excluded) {
|
|
21899
21829
|
if (source == null)
|
|
21900
21830
|
return {};
|
|
21901
|
-
var target = _object_without_properties_loose$
|
|
21831
|
+
var target = _object_without_properties_loose$3(source, excluded);
|
|
21902
21832
|
var key, i;
|
|
21903
21833
|
if (Object.getOwnPropertySymbols) {
|
|
21904
21834
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -21913,7 +21843,7 @@
|
|
|
21913
21843
|
}
|
|
21914
21844
|
return target;
|
|
21915
21845
|
}
|
|
21916
|
-
function _object_without_properties_loose$
|
|
21846
|
+
function _object_without_properties_loose$3(source, excluded) {
|
|
21917
21847
|
if (source == null)
|
|
21918
21848
|
return {};
|
|
21919
21849
|
var target = {};
|
|
@@ -21928,7 +21858,7 @@
|
|
|
21928
21858
|
return target;
|
|
21929
21859
|
}
|
|
21930
21860
|
var IncrementInput = function(_param) {
|
|
21931
|
-
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$
|
|
21861
|
+
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, [
|
|
21932
21862
|
"value",
|
|
21933
21863
|
"onChange",
|
|
21934
21864
|
"min",
|
|
@@ -21938,7 +21868,7 @@
|
|
|
21938
21868
|
"data",
|
|
21939
21869
|
"tweakStyles"
|
|
21940
21870
|
]);
|
|
21941
|
-
if (!
|
|
21871
|
+
if (!trueReactPlatformHelpers.isNumberInteger(step)) {
|
|
21942
21872
|
console.error("Параметр step должен быть целым числом");
|
|
21943
21873
|
}
|
|
21944
21874
|
var _useTheme = useTheme("IncrementInput", styles$e, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
@@ -22340,6 +22270,38 @@
|
|
|
22340
22270
|
}
|
|
22341
22271
|
return target;
|
|
22342
22272
|
}
|
|
22273
|
+
function _object_without_properties$2(source, excluded) {
|
|
22274
|
+
if (source == null)
|
|
22275
|
+
return {};
|
|
22276
|
+
var target = _object_without_properties_loose$2(source, excluded);
|
|
22277
|
+
var key, i;
|
|
22278
|
+
if (Object.getOwnPropertySymbols) {
|
|
22279
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
22280
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
22281
|
+
key = sourceSymbolKeys[i];
|
|
22282
|
+
if (excluded.indexOf(key) >= 0)
|
|
22283
|
+
continue;
|
|
22284
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
22285
|
+
continue;
|
|
22286
|
+
target[key] = source[key];
|
|
22287
|
+
}
|
|
22288
|
+
}
|
|
22289
|
+
return target;
|
|
22290
|
+
}
|
|
22291
|
+
function _object_without_properties_loose$2(source, excluded) {
|
|
22292
|
+
if (source == null)
|
|
22293
|
+
return {};
|
|
22294
|
+
var target = {};
|
|
22295
|
+
var sourceKeys = Object.keys(source);
|
|
22296
|
+
var key, i;
|
|
22297
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
22298
|
+
key = sourceKeys[i];
|
|
22299
|
+
if (excluded.indexOf(key) >= 0)
|
|
22300
|
+
continue;
|
|
22301
|
+
target[key] = source[key];
|
|
22302
|
+
}
|
|
22303
|
+
return target;
|
|
22304
|
+
}
|
|
22343
22305
|
function _sliced_to_array$7(arr, i) {
|
|
22344
22306
|
return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
|
|
22345
22307
|
}
|
|
@@ -22356,8 +22318,31 @@
|
|
|
22356
22318
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
22357
22319
|
return _array_like_to_array$7(o, minLen);
|
|
22358
22320
|
}
|
|
22359
|
-
var Modal = function(
|
|
22360
|
-
var data =
|
|
22321
|
+
var Modal = function(_param) {
|
|
22322
|
+
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, [
|
|
22323
|
+
"data",
|
|
22324
|
+
"tweakStyles",
|
|
22325
|
+
"title",
|
|
22326
|
+
"size",
|
|
22327
|
+
"isFooterSticky",
|
|
22328
|
+
"buttons",
|
|
22329
|
+
"buttonsAlign",
|
|
22330
|
+
"hasCloseButton",
|
|
22331
|
+
"hasOverlay",
|
|
22332
|
+
"isOpen",
|
|
22333
|
+
"position",
|
|
22334
|
+
"children",
|
|
22335
|
+
"zIndex",
|
|
22336
|
+
"testId",
|
|
22337
|
+
"shouldCloseOnOverlayClick",
|
|
22338
|
+
"shouldCloseOnEsc",
|
|
22339
|
+
"shouldBlockScroll",
|
|
22340
|
+
"timeout",
|
|
22341
|
+
"unmountOnExit",
|
|
22342
|
+
"onClose"
|
|
22343
|
+
]);
|
|
22344
|
+
var _ref;
|
|
22345
|
+
var isModalOpen = (_ref = isOpen !== null && isOpen !== void 0 ? isOpen : restProps.in) !== null && _ref !== void 0 ? _ref : false;
|
|
22361
22346
|
var _useTheme = useTheme("Modal", styles$d, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
22362
22347
|
var tweakCloseButtonStyles = useTweakStyles(componentStyles, tweakStyles, "tweakCloseButton");
|
|
22363
22348
|
var _useState = _sliced_to_array$7(React.useState(false), 2), isClickOnOverlay = _useState[0], setIsClickOnOverlay = _useState[1];
|
|
@@ -22385,7 +22370,7 @@
|
|
|
22385
22370
|
onClose
|
|
22386
22371
|
]);
|
|
22387
22372
|
React.useEffect(function() {
|
|
22388
|
-
if (!shouldCloseOnEsc || onClose === void 0 || !
|
|
22373
|
+
if (!shouldCloseOnEsc || onClose === void 0 || !isModalOpen) {
|
|
22389
22374
|
return function() {
|
|
22390
22375
|
return null;
|
|
22391
22376
|
};
|
|
@@ -22397,22 +22382,21 @@
|
|
|
22397
22382
|
}, [
|
|
22398
22383
|
shouldCloseOnEsc,
|
|
22399
22384
|
onClose,
|
|
22400
|
-
|
|
22385
|
+
isModalOpen,
|
|
22401
22386
|
handleEscClose
|
|
22402
22387
|
]);
|
|
22403
22388
|
var _obj, _obj1;
|
|
22404
|
-
return /* @__PURE__ */ jsx(reactTransitionGroup.CSSTransition, {
|
|
22405
|
-
in:
|
|
22406
|
-
timeout
|
|
22407
|
-
unmountOnExit
|
|
22389
|
+
return /* @__PURE__ */ jsx(reactTransitionGroup.CSSTransition, _object_spread_props$a(_object_spread$c({
|
|
22390
|
+
in: isModalOpen,
|
|
22391
|
+
timeout,
|
|
22392
|
+
unmountOnExit,
|
|
22408
22393
|
classNames: {
|
|
22409
22394
|
enter: classes["modal-enter"],
|
|
22410
22395
|
enterActive: classes["modal-enter-active"],
|
|
22411
22396
|
exit: classes["modal-exit"],
|
|
22412
22397
|
exitActive: classes["modal-exit-active"]
|
|
22413
|
-
}
|
|
22414
|
-
|
|
22415
|
-
onExited: onCompletelyHidden,
|
|
22398
|
+
}
|
|
22399
|
+
}, restProps), {
|
|
22416
22400
|
children: /* @__PURE__ */ jsx("div", {
|
|
22417
22401
|
className: classes.modalWrapper,
|
|
22418
22402
|
children: /* @__PURE__ */ jsx(reactRemoveScroll.RemoveScroll, {
|
|
@@ -22423,7 +22407,7 @@
|
|
|
22423
22407
|
style: {
|
|
22424
22408
|
zIndex
|
|
22425
22409
|
}
|
|
22426
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
22410
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
22427
22411
|
children: /* @__PURE__ */ jsx("div", {
|
|
22428
22412
|
ref: overlay,
|
|
22429
22413
|
className: clsx(classes.innerOverlay, classes["position-".concat(position)]),
|
|
@@ -22435,16 +22419,16 @@
|
|
|
22435
22419
|
hasCloseButton && /* @__PURE__ */ jsx("div", {
|
|
22436
22420
|
className: classes.close,
|
|
22437
22421
|
children: /* @__PURE__ */ jsx(CloseButton, {
|
|
22438
|
-
testId: getTestId(testId, "close-button"),
|
|
22422
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "close-button"),
|
|
22439
22423
|
tweakStyles: tweakCloseButtonStyles,
|
|
22440
22424
|
onClose
|
|
22441
22425
|
})
|
|
22442
22426
|
}),
|
|
22443
|
-
|
|
22427
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(title) && /* @__PURE__ */ jsx("h3", {
|
|
22444
22428
|
className: clsx(classes.title, _define_property$d({}, classes.titleWithCloseButton, hasCloseButton)),
|
|
22445
22429
|
children: title
|
|
22446
22430
|
}),
|
|
22447
|
-
|
|
22431
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
22448
22432
|
className: classes.content,
|
|
22449
22433
|
children
|
|
22450
22434
|
}),
|
|
@@ -22463,7 +22447,7 @@
|
|
|
22463
22447
|
}))
|
|
22464
22448
|
})
|
|
22465
22449
|
})
|
|
22466
|
-
});
|
|
22450
|
+
}));
|
|
22467
22451
|
};
|
|
22468
22452
|
var styles$c = {
|
|
22469
22453
|
root: {
|
|
@@ -22656,9 +22640,9 @@
|
|
|
22656
22640
|
children: [
|
|
22657
22641
|
/* @__PURE__ */ jsx("button", _object_spread_props$9(_object_spread$b({
|
|
22658
22642
|
ref: button,
|
|
22659
|
-
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))
|
|
22660
|
-
|
|
22661
|
-
|
|
22643
|
+
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)),
|
|
22644
|
+
onClick: !isButtonDisabled ? toggleMenu : void 0
|
|
22645
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
22662
22646
|
children: /* @__PURE__ */ jsx("div", {
|
|
22663
22647
|
className: classes.icon,
|
|
22664
22648
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
@@ -22671,7 +22655,7 @@
|
|
|
22671
22655
|
ref: list,
|
|
22672
22656
|
children: /* @__PURE__ */ jsx(List, {
|
|
22673
22657
|
items,
|
|
22674
|
-
testId: getTestId(testId, "list"),
|
|
22658
|
+
testId: trueReactPlatformHelpers.getTestId(testId, "list"),
|
|
22675
22659
|
tweakStyles: tweakListStyles,
|
|
22676
22660
|
onClick: handleCloseMenu
|
|
22677
22661
|
})
|
|
@@ -23017,13 +23001,12 @@
|
|
|
23017
23001
|
var classes = useTheme("Notification", styles$9, tweakStyles, {
|
|
23018
23002
|
type
|
|
23019
23003
|
}).classes;
|
|
23020
|
-
var hasText =
|
|
23021
|
-
var hasTitle =
|
|
23022
|
-
var hasTestId = isNotEmpty(testId);
|
|
23004
|
+
var hasText = trueReactPlatformHelpers.isStringNotEmpty(text);
|
|
23005
|
+
var hasTitle = trueReactPlatformHelpers.isStringNotEmpty(title);
|
|
23023
23006
|
var _obj;
|
|
23024
23007
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$8(_object_spread$a({
|
|
23025
23008
|
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))
|
|
23026
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
23009
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
23027
23010
|
children: [
|
|
23028
23011
|
/* @__PURE__ */ jsx("div", {
|
|
23029
23012
|
className: classes.icon,
|
|
@@ -23034,17 +23017,17 @@
|
|
|
23034
23017
|
/* @__PURE__ */ jsxs("div", {
|
|
23035
23018
|
className: classes.body,
|
|
23036
23019
|
children: [
|
|
23037
|
-
hasTitle && /* @__PURE__ */ jsx("span", {
|
|
23038
|
-
className: classes.title
|
|
23039
|
-
|
|
23020
|
+
hasTitle && /* @__PURE__ */ jsx("span", _object_spread_props$8(_object_spread$a({
|
|
23021
|
+
className: classes.title
|
|
23022
|
+
}, trueReactPlatformHelpers.addDataTestId(testId, "title")), {
|
|
23040
23023
|
children: title
|
|
23041
|
-
}),
|
|
23042
|
-
hasText && /* @__PURE__ */ jsx("span", {
|
|
23043
|
-
className: classes.text
|
|
23044
|
-
|
|
23024
|
+
})),
|
|
23025
|
+
hasText && /* @__PURE__ */ jsx("span", _object_spread_props$8(_object_spread$a({
|
|
23026
|
+
className: classes.text
|
|
23027
|
+
}, trueReactPlatformHelpers.addDataTestId(testId, "text")), {
|
|
23045
23028
|
children: text
|
|
23046
|
-
}),
|
|
23047
|
-
|
|
23029
|
+
})),
|
|
23030
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
23048
23031
|
className: classes.content,
|
|
23049
23032
|
children
|
|
23050
23033
|
})
|
|
@@ -26735,7 +26718,7 @@
|
|
|
26735
26718
|
},
|
|
26736
26719
|
className: clsx(classes.input, (_obj = {}, _define_property$6(_obj, classes.isDisabled, isDisabled), _define_property$6(_obj, classes.isInvalid, isInvalid), _obj))
|
|
26737
26720
|
}),
|
|
26738
|
-
|
|
26721
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("span", {
|
|
26739
26722
|
className: classes.content,
|
|
26740
26723
|
children
|
|
26741
26724
|
})
|
|
@@ -26866,7 +26849,7 @@
|
|
|
26866
26849
|
var _obj;
|
|
26867
26850
|
return /* @__PURE__ */ jsxs("label", _object_spread_props$5(_object_spread$5({
|
|
26868
26851
|
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))
|
|
26869
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
26852
|
+
}, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
|
|
26870
26853
|
children: [
|
|
26871
26854
|
/* @__PURE__ */ jsx("span", {
|
|
26872
26855
|
className: classes.switch,
|
|
@@ -26877,9 +26860,9 @@
|
|
|
26877
26860
|
onChange: isDisabled ? void 0 : handleChange,
|
|
26878
26861
|
checked: isChecked,
|
|
26879
26862
|
disabled: isDisabled
|
|
26880
|
-
}, addDataTestId(testId, "input")))
|
|
26863
|
+
}, trueReactPlatformHelpers.addDataTestId(testId, "input")))
|
|
26881
26864
|
}),
|
|
26882
|
-
|
|
26865
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("span", {
|
|
26883
26866
|
className: clsx(classes.label, classes[labelPosition === "left" ? "labelLeft" : "labelRight"]),
|
|
26884
26867
|
children
|
|
26885
26868
|
})
|
|
@@ -27973,21 +27956,21 @@
|
|
|
27973
27956
|
}),
|
|
27974
27957
|
/* @__PURE__ */ jsxs("div", {
|
|
27975
27958
|
children: [
|
|
27976
|
-
|
|
27959
|
+
trueReactPlatformHelpers.isStringNotEmpty(title) && /* @__PURE__ */ jsx("div", {
|
|
27977
27960
|
className: classes.title,
|
|
27978
27961
|
children: title
|
|
27979
27962
|
}),
|
|
27980
|
-
|
|
27963
|
+
trueReactPlatformHelpers.isStringNotEmpty(text) && /* @__PURE__ */ jsx("div", {
|
|
27981
27964
|
className: classes.text,
|
|
27982
27965
|
children: text
|
|
27983
27966
|
}),
|
|
27984
|
-
|
|
27967
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(children) && /* @__PURE__ */ jsx("div", {
|
|
27985
27968
|
className: classes.content,
|
|
27986
27969
|
children
|
|
27987
27970
|
})
|
|
27988
27971
|
]
|
|
27989
27972
|
}),
|
|
27990
|
-
hasCloseButton && onClose
|
|
27973
|
+
hasCloseButton && trueReactPlatformHelpers.isNotEmpty(onClose) && /* @__PURE__ */ jsx("div", {
|
|
27991
27974
|
className: classes.close,
|
|
27992
27975
|
children: /* @__PURE__ */ jsx(CloseButton, {
|
|
27993
27976
|
onClose,
|