@true-engineering/true-react-common-ui-kit 1.3.0 → 1.4.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/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 -3
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +8 -3
- package/dist/components/Select/Select.styles.d.ts +10 -0
- package/dist/components/Select/SelectList/SelectList.d.ts +4 -3
- package/dist/components/Select/SelectList/SelectList.styles.d.ts +9 -0
- package/dist/helpers/snippets.d.ts +3 -0
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/hooks/use-dropdown.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +400 -349
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +400 -349
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/vite-env.d.ts +1 -1
- package/package.json +91 -91
- package/src/components/AccountInfo/AccountInfo.stories.tsx +35 -35
- package/src/components/AccountInfo/AccountInfo.styles.ts +55 -55
- package/src/components/AccountInfo/AccountInfo.tsx +106 -106
- 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 +49 -49
- package/src/components/AddButton/index.ts +2 -2
- package/src/components/Button/Button.stories.tsx +61 -61
- package/src/components/Button/Button.styles.ts +196 -196
- package/src/components/Button/Button.tsx +195 -195
- package/src/components/Button/index.ts +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +35 -35
- package/src/components/Checkbox/Checkbox.styles.ts +59 -59
- package/src/components/Checkbox/Checkbox.tsx +93 -93
- package/src/components/Checkbox/index.ts +2 -2
- package/src/components/CloseButton/CloseButton.styles.ts +34 -34
- package/src/components/CloseButton/CloseButton.tsx +37 -37
- 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 +34 -34
- package/src/components/Colors/index.ts +2 -2
- package/src/components/CssBaseline/CssBaseline.styles.ts +15 -15
- package/src/components/CssBaseline/CssBaseline.tsx +17 -17
- package/src/components/CssBaseline/index.ts +2 -2
- package/src/components/DateInput/DateInput.stories.tsx +63 -63
- package/src/components/DateInput/DateInput.styles.ts +14 -14
- package/src/components/DateInput/DateInput.tsx +60 -60
- package/src/components/DateInput/index.ts +2 -2
- package/src/components/DatePicker/DatePicker.stories.tsx +96 -96
- package/src/components/DatePicker/DatePicker.styles.ts +54 -54
- package/src/components/DatePicker/DatePicker.tsx +358 -358
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.ts +84 -84
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.tsx +94 -94
- package/src/components/DatePicker/DatePickerHeader/index.ts +1 -1
- package/src/components/DatePicker/DatePickerInput/DatePickerInput.styles.ts +25 -25
- package/src/components/DatePicker/DatePickerInput/DatePickerInput.tsx +31 -31
- package/src/components/DatePicker/DatePickerInput/index.ts +1 -1
- package/src/components/DatePicker/index.ts +4 -4
- package/src/components/Description/Description.stories.tsx +29 -29
- package/src/components/Description/Description.styles.ts +31 -31
- package/src/components/Description/Description.tsx +69 -69
- 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 +162 -162
- package/src/components/FiltersPane/FilterInterval/index.ts +1 -1
- package/src/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.tsx +14 -14
- package/src/components/FiltersPane/FilterMultiSelect/index.ts +1 -1
- package/src/components/FiltersPane/FilterSelect/FilterSelect.styles.ts +144 -144
- package/src/components/FiltersPane/FilterSelect/FilterSelect.tsx +397 -397
- 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 +186 -186
- 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 +222 -222
- 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 +231 -231
- 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 +360 -360
- package/src/components/FiltersPane/FilterWrapper/index.ts +1 -1
- package/src/components/FiltersPane/FiltersPane.stories.tsx +308 -307
- package/src/components/FiltersPane/FiltersPane.styles.ts +71 -71
- package/src/components/FiltersPane/FiltersPane.tsx +193 -193
- package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.ts +109 -109
- package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.tsx +175 -175
- 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 +126 -126
- package/src/components/Flag/Flag.stories.tsx +29 -29
- package/src/components/Flag/Flag.styles.ts +18 -18
- package/src/components/Flag/Flag.tsx +28 -28
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/Flag/index.ts +2 -2
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +80 -80
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +131 -131
- package/src/components/FlexibleTable/FlexibleTable.tsx +243 -243
- package/src/components/FlexibleTable/TableRow.tsx +171 -166
- package/src/components/FlexibleTable/TableValue.tsx +83 -83
- package/src/components/FlexibleTable/fixture-test.ts +254 -254
- package/src/components/FlexibleTable/index.ts +3 -3
- package/src/components/FlexibleTable/types.ts +58 -58
- package/src/components/Icon/ComplexIconBoilerplate.tsx +17 -17
- package/src/components/Icon/Icon.stories.tsx +88 -88
- package/src/components/Icon/Icon.styles.ts +10 -10
- package/src/components/Icon/Icon.tsx +34 -34
- 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 +34 -34
- package/src/components/IncrementInput/IncrementInput.stories.tsx +34 -34
- package/src/components/IncrementInput/IncrementInput.styles.ts +77 -77
- package/src/components/IncrementInput/IncrementInput.tsx +95 -95
- package/src/components/IncrementInput/index.ts +2 -2
- package/src/components/Input/Input.stories.tsx +92 -92
- package/src/components/Input/Input.styles.ts +305 -305
- package/src/components/Input/Input.tsx +310 -308
- 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 +82 -82
- package/src/components/List/index.ts +2 -2
- package/src/components/Modal/Modal.stories.tsx +113 -113
- package/src/components/Modal/Modal.styles.ts +308 -308
- package/src/components/Modal/Modal.tsx +210 -210
- 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 +102 -102
- 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 +98 -98
- package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.ts +73 -73
- package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.tsx +62 -62
- package/src/components/MultiSelect/MultiSelectInput/index.ts +1 -1
- package/src/components/MultiSelect/index.ts +3 -3
- package/src/components/MultiSelectList/MultiSelectList.styles.ts +125 -125
- package/src/components/MultiSelectList/MultiSelectList.tsx +519 -519
- package/src/components/MultiSelectList/index.ts +2 -2
- package/src/components/MultiSelectList/locales.ts +37 -37
- package/src/components/Notification/Notification.stories.tsx +51 -51
- package/src/components/Notification/Notification.styles.ts +50 -50
- package/src/components/Notification/Notification.tsx +84 -84
- package/src/components/Notification/index.ts +2 -2
- package/src/components/NumberInput/NumberInput.stories.tsx +35 -35
- package/src/components/NumberInput/NumberInput.tsx +142 -142
- package/src/components/NumberInput/helpers.ts +68 -68
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/PhoneInput.stories.tsx +71 -71
- package/src/components/PhoneInput/PhoneInput.styles.ts +84 -84
- package/src/components/PhoneInput/PhoneInput.tsx +223 -223
- 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 +171 -171
- package/src/components/PhoneInput/PhoneInputCountryList/index.ts +2 -2
- package/src/components/PhoneInput/index.ts +6 -6
- package/src/components/PhoneInput/phone-info.ts +2167 -2167
- 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 +56 -56
- package/src/components/RadioButton/index.ts +2 -2
- package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +66 -66
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/SearchInput/SearchInput.stories.tsx +24 -24
- package/src/components/SearchInput/SearchInput.styles.ts +50 -50
- package/src/components/SearchInput/SearchInput.tsx +63 -63
- package/src/components/SearchInput/index.ts +2 -2
- package/src/components/Select/Select.stories.tsx +258 -242
- package/src/components/Select/Select.styles.ts +85 -74
- package/src/components/Select/Select.tsx +501 -452
- package/src/components/Select/SelectList/SelectList.styles.ts +68 -57
- package/src/components/Select/SelectList/SelectList.tsx +139 -130
- package/src/components/Select/SelectList/index.ts +1 -1
- package/src/components/Select/helpers.ts +21 -21
- package/src/components/Select/index.ts +3 -3
- package/src/components/SmartInput/SmartInput.stories.tsx +63 -63
- package/src/components/SmartInput/SmartInput.tsx +180 -180
- 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 +89 -89
- 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 +178 -178
- 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 +67 -67
- 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 +163 -163
- 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 +56 -56
- package/src/components/ThemedPreloader/components/DefaultPreloader/DefaultPreloader.tsx +34 -34
- 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 +32 -32
- 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 +34 -34
- package/src/components/Toaster/Toaster.styles.ts +59 -59
- package/src/components/Toaster/Toaster.tsx +113 -113
- package/src/components/Toaster/index.ts +2 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +21 -21
- package/src/components/Tooltip/Tooltip.styles.ts +45 -45
- package/src/components/Tooltip/Tooltip.tsx +40 -40
- 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/colors.ts +2 -2
- package/src/helpers/data-attributes.ts +18 -18
- package/src/helpers/dateHelpers/date-helpers.ts +9 -9
- package/src/helpers/index.ts +5 -5
- package/src/helpers/phone.ts +106 -106
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/helpers/snippets.tsx +5 -0
- package/src/helpers/utils.ts +178 -164
- package/src/hooks/index.ts +6 -6
- package/src/hooks/use-did-mount-effect.ts +21 -21
- package/src/hooks/use-dropdown.ts +85 -85
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/hooks/use-on-click-outside.ts +92 -92
- package/src/hooks/use-theme.ts +36 -36
- package/src/hooks/use-tweak-styles.ts +14 -14
- package/src/index.ts +5 -5
- package/src/theme.ts +155 -155
- package/src/types.ts +106 -106
- package/src/vite-env.d.ts +1 -1
|
@@ -1120,6 +1120,16 @@ var transformToKebab = function(string) {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
return result;
|
|
1122
1122
|
};
|
|
1123
|
+
var hasExactParent = function(element, parent) {
|
|
1124
|
+
if (element === parent) {
|
|
1125
|
+
return true;
|
|
1126
|
+
}
|
|
1127
|
+
var parentNode = getParentNode$1(element);
|
|
1128
|
+
if (parentNode === element) {
|
|
1129
|
+
return false;
|
|
1130
|
+
}
|
|
1131
|
+
return hasExactParent(parentNode, parent);
|
|
1132
|
+
};
|
|
1123
1133
|
var _element_parentNode;
|
|
1124
1134
|
var getParentNode$1 = function(element) {
|
|
1125
1135
|
return element.nodeName === "HTML" ? element : (_element_parentNode = element.parentNode) !== null && _element_parentNode !== void 0 ? _element_parentNode : element.host;
|
|
@@ -4183,63 +4193,63 @@ var IconBoilerplate = function(param) {
|
|
|
4183
4193
|
]
|
|
4184
4194
|
});
|
|
4185
4195
|
};
|
|
4186
|
-
const avatarGreen = ` <svg
|
|
4187
|
-
width="100%"
|
|
4188
|
-
height="100%"
|
|
4189
|
-
viewBox="0 0 32 32"
|
|
4190
|
-
fill="none"
|
|
4191
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4192
|
-
|
|
4193
|
-
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED"
|
|
4194
|
-
<mask
|
|
4195
|
-
id="mask0_0_12744"
|
|
4196
|
-
style="mask-type: 'alpha';"
|
|
4197
|
-
maskUnits="userSpaceOnUse"
|
|
4198
|
-
x="0"
|
|
4199
|
-
y="0"
|
|
4200
|
-
width="32"
|
|
4201
|
-
height="32"
|
|
4202
|
-
|
|
4203
|
-
<circle cx="16" cy="16" r="16" fill="white"
|
|
4204
|
-
</mask
|
|
4205
|
-
<g mask="url(#mask0_0_12744)"
|
|
4206
|
-
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)"
|
|
4207
|
-
<mask
|
|
4208
|
-
id="mask1_0_12744"
|
|
4209
|
-
style="mask-type: 'alpha';"
|
|
4210
|
-
maskUnits="userSpaceOnUse"
|
|
4211
|
-
x="3"
|
|
4212
|
-
y="16"
|
|
4213
|
-
width="26"
|
|
4214
|
-
height="26"
|
|
4215
|
-
|
|
4216
|
-
<circle cx="16" cy="29" r="13" fill="white"
|
|
4217
|
-
</mask
|
|
4218
|
-
<g mask="url(#mask1_0_12744)"
|
|
4219
|
-
<ellipse
|
|
4220
|
-
cx="16"
|
|
4221
|
-
cy="17.5"
|
|
4222
|
-
rx="6"
|
|
4223
|
-
ry="7.5"
|
|
4224
|
-
fill="#505F79"
|
|
4225
|
-
fill-opacity="0.204983"
|
|
4226
|
-
|
|
4227
|
-
</g
|
|
4228
|
-
</g
|
|
4229
|
-
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white"
|
|
4230
|
-
<defs
|
|
4231
|
-
<linearGradient
|
|
4232
|
-
id="paint0_linear_0_12744"
|
|
4233
|
-
x1="13.347"
|
|
4234
|
-
y1="46.279"
|
|
4235
|
-
x2="33.5318"
|
|
4236
|
-
y2="30.8088"
|
|
4237
|
-
gradientUnits="userSpaceOnUse"
|
|
4238
|
-
|
|
4239
|
-
<stop stop-color="#ABD229"
|
|
4240
|
-
<stop offset="1" stop-color="#9CD03F"
|
|
4241
|
-
</linearGradient
|
|
4242
|
-
</defs
|
|
4196
|
+
const avatarGreen = ` <svg\r
|
|
4197
|
+
width="100%"\r
|
|
4198
|
+
height="100%"\r
|
|
4199
|
+
viewBox="0 0 32 32"\r
|
|
4200
|
+
fill="none"\r
|
|
4201
|
+
xmlns="http://www.w3.org/2000/svg"\r
|
|
4202
|
+
>\r
|
|
4203
|
+
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
|
|
4204
|
+
<mask\r
|
|
4205
|
+
id="mask0_0_12744"\r
|
|
4206
|
+
style="mask-type: 'alpha';"\r
|
|
4207
|
+
maskUnits="userSpaceOnUse"\r
|
|
4208
|
+
x="0"\r
|
|
4209
|
+
y="0"\r
|
|
4210
|
+
width="32"\r
|
|
4211
|
+
height="32"\r
|
|
4212
|
+
>\r
|
|
4213
|
+
<circle cx="16" cy="16" r="16" fill="white" />\r
|
|
4214
|
+
</mask>\r
|
|
4215
|
+
<g mask="url(#mask0_0_12744)">\r
|
|
4216
|
+
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
|
|
4217
|
+
<mask\r
|
|
4218
|
+
id="mask1_0_12744"\r
|
|
4219
|
+
style="mask-type: 'alpha';"\r
|
|
4220
|
+
maskUnits="userSpaceOnUse"\r
|
|
4221
|
+
x="3"\r
|
|
4222
|
+
y="16"\r
|
|
4223
|
+
width="26"\r
|
|
4224
|
+
height="26"\r
|
|
4225
|
+
>\r
|
|
4226
|
+
<circle cx="16" cy="29" r="13" fill="white" />\r
|
|
4227
|
+
</mask>\r
|
|
4228
|
+
<g mask="url(#mask1_0_12744)">\r
|
|
4229
|
+
<ellipse\r
|
|
4230
|
+
cx="16"\r
|
|
4231
|
+
cy="17.5"\r
|
|
4232
|
+
rx="6"\r
|
|
4233
|
+
ry="7.5"\r
|
|
4234
|
+
fill="#505F79"\r
|
|
4235
|
+
fill-opacity="0.204983"\r
|
|
4236
|
+
/>\r
|
|
4237
|
+
</g>\r
|
|
4238
|
+
</g>\r
|
|
4239
|
+
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
|
|
4240
|
+
<defs>\r
|
|
4241
|
+
<linearGradient\r
|
|
4242
|
+
id="paint0_linear_0_12744"\r
|
|
4243
|
+
x1="13.347"\r
|
|
4244
|
+
y1="46.279"\r
|
|
4245
|
+
x2="33.5318"\r
|
|
4246
|
+
y2="30.8088"\r
|
|
4247
|
+
gradientUnits="userSpaceOnUse"\r
|
|
4248
|
+
>\r
|
|
4249
|
+
<stop stop-color="#ABD229" />\r
|
|
4250
|
+
<stop offset="1" stop-color="#9CD03F" />\r
|
|
4251
|
+
</linearGradient>\r
|
|
4252
|
+
</defs>\r
|
|
4243
4253
|
</svg>`;
|
|
4244
4254
|
var complexIcons = {
|
|
4245
4255
|
avatar: avatarGreen
|
|
@@ -6112,6 +6122,11 @@ var styles$y = {
|
|
|
6112
6122
|
loading: {},
|
|
6113
6123
|
tweakPreloader: {}
|
|
6114
6124
|
};
|
|
6125
|
+
var renderIcon = function(icon) {
|
|
6126
|
+
return typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, {
|
|
6127
|
+
type: icon
|
|
6128
|
+
}) : icon;
|
|
6129
|
+
};
|
|
6115
6130
|
function _array_like_to_array$k(arr, len) {
|
|
6116
6131
|
if (len == null || len > arr.length)
|
|
6117
6132
|
len = arr.length;
|
|
@@ -6477,9 +6492,7 @@ var Input = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
6477
6492
|
iconType !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
6478
6493
|
className: clsx(classes.inputIcon, _define_property$B({}, classes.activeIcon, !isDisabled && onIconClick !== void 0)),
|
|
6479
6494
|
onClick: !isDisabled ? onIconClick : void 0,
|
|
6480
|
-
children:
|
|
6481
|
-
type: iconType
|
|
6482
|
-
})
|
|
6495
|
+
children: renderIcon(iconType)
|
|
6483
6496
|
})
|
|
6484
6497
|
]
|
|
6485
6498
|
})
|
|
@@ -6918,7 +6931,20 @@ var styles$v = {
|
|
|
6918
6931
|
CONTAINER_PADDING,
|
|
6919
6932
|
0
|
|
6920
6933
|
],
|
|
6921
|
-
fontSize: 16
|
|
6934
|
+
fontSize: 16,
|
|
6935
|
+
overflow: "hidden"
|
|
6936
|
+
},
|
|
6937
|
+
withListHeader: {
|
|
6938
|
+
paddingTop: 0
|
|
6939
|
+
},
|
|
6940
|
+
listHeader: {
|
|
6941
|
+
"& + $list": {
|
|
6942
|
+
borderTop: [
|
|
6943
|
+
1,
|
|
6944
|
+
"solid",
|
|
6945
|
+
colors.BORDER_LIGHT
|
|
6946
|
+
]
|
|
6947
|
+
}
|
|
6922
6948
|
},
|
|
6923
6949
|
list: _object_spread$x({
|
|
6924
6950
|
height: "100%",
|
|
@@ -7004,7 +7030,7 @@ function _object_spread_props$q(target, source) {
|
|
|
7004
7030
|
}
|
|
7005
7031
|
var DEFAULT_OPTION_INDEX = -1;
|
|
7006
7032
|
function SelectList(param) {
|
|
7007
|
-
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, isOptionDisabled = param.isOptionDisabled, onOptionClick = param.onOptionClick, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId;
|
|
7033
|
+
var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, customListHeader = param.customListHeader, isOptionDisabled = param.isOptionDisabled, onOptionClick = param.onOptionClick, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId;
|
|
7008
7034
|
var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
|
|
7009
7035
|
var activeValueId = isNotEmpty(activeValue) ? convertValueToId(activeValue) : void 0;
|
|
7010
7036
|
var isActiveOption = function(item) {
|
|
@@ -7028,58 +7054,64 @@ function SelectList(param) {
|
|
|
7028
7054
|
convertFunction,
|
|
7029
7055
|
optionsDisableMap
|
|
7030
7056
|
]);
|
|
7031
|
-
return /* @__PURE__ */
|
|
7057
|
+
return /* @__PURE__ */ jsxs(ScrollIntoViewIfNeeded, {
|
|
7032
7058
|
active: shouldScrollToList,
|
|
7033
|
-
className: classes.root,
|
|
7034
|
-
children:
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
return onOptionClick(DEFAULT_OPTION_INDEX);
|
|
7050
|
-
},
|
|
7051
|
-
children: defaultOptionLabel
|
|
7052
|
-
}),
|
|
7053
|
-
listOptions.map(function(opt, i) {
|
|
7054
|
-
var optionValue = options[i];
|
|
7055
|
-
var isFocused = i === focusedIndex;
|
|
7056
|
-
var isActive = isActiveOption(optionValue);
|
|
7057
|
-
var isDisabled = optionsDisableMap[i];
|
|
7058
|
-
var _obj;
|
|
7059
|
-
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$q(_object_spread$w({
|
|
7060
|
-
active: isFocused,
|
|
7059
|
+
className: clsx(classes.root, _define_property$x({}, classes.withListHeader, isNotEmpty(customListHeader))),
|
|
7060
|
+
children: [
|
|
7061
|
+
isNotEmpty(customListHeader) && /* @__PURE__ */ jsx("div", {
|
|
7062
|
+
className: classes.listHeader,
|
|
7063
|
+
children: customListHeader
|
|
7064
|
+
}),
|
|
7065
|
+
/* @__PURE__ */ jsx("div", {
|
|
7066
|
+
className: classes.list,
|
|
7067
|
+
"data-testid": testId,
|
|
7068
|
+
children: isLoading ? /* @__PURE__ */ jsx("div", {
|
|
7069
|
+
className: clsx(classes.cell, classes.loading),
|
|
7070
|
+
children: loadingLabel
|
|
7071
|
+
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
7072
|
+
children: [
|
|
7073
|
+
defaultOptionLabel !== void 0 && /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
|
|
7074
|
+
active: focusedIndex === DEFAULT_OPTION_INDEX,
|
|
7061
7075
|
options: {
|
|
7062
7076
|
block: "nearest"
|
|
7063
7077
|
},
|
|
7064
|
-
className: clsx(classes.cell,
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
})
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7078
|
+
className: clsx(classes.cell, classes.defaultCell, focusedIndex === DEFAULT_OPTION_INDEX && classes.focused),
|
|
7079
|
+
onClick: function(event) {
|
|
7080
|
+
return onOptionClick(DEFAULT_OPTION_INDEX, event);
|
|
7081
|
+
},
|
|
7082
|
+
children: defaultOptionLabel
|
|
7083
|
+
}),
|
|
7084
|
+
listOptions.map(function(opt, i) {
|
|
7085
|
+
var optionValue = options[i];
|
|
7086
|
+
var isFocused = i === focusedIndex;
|
|
7087
|
+
var isActive = isActiveOption(optionValue);
|
|
7088
|
+
var isDisabled = optionsDisableMap[i];
|
|
7089
|
+
var _obj;
|
|
7090
|
+
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$q(_object_spread$w({
|
|
7091
|
+
active: isFocused,
|
|
7092
|
+
options: {
|
|
7093
|
+
block: "nearest"
|
|
7094
|
+
},
|
|
7095
|
+
className: clsx(classes.cell, (_obj = {}, _define_property$x(_obj, classes.focused, isFocused), _define_property$x(_obj, classes.active, isActive), _define_property$x(_obj, classes.disabled, isDisabled), _obj))
|
|
7096
|
+
}, addDataAttributes({
|
|
7097
|
+
disabled: isDisabled,
|
|
7098
|
+
active: isActive,
|
|
7099
|
+
focused: isFocused
|
|
7100
|
+
})), {
|
|
7101
|
+
onClick: !isDisabled ? function(event) {
|
|
7102
|
+
return onOptionClick(i, event);
|
|
7103
|
+
} : void 0,
|
|
7104
|
+
children: opt
|
|
7105
|
+
}), i);
|
|
7106
|
+
}),
|
|
7107
|
+
listOptions.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
7108
|
+
className: clsx(classes.cell, classes.noMatchesLabel),
|
|
7109
|
+
children: noMatchesLabel
|
|
7110
|
+
})
|
|
7111
|
+
]
|
|
7112
|
+
})
|
|
7081
7113
|
})
|
|
7082
|
-
|
|
7114
|
+
]
|
|
7083
7115
|
});
|
|
7084
7116
|
}
|
|
7085
7117
|
var _option_isDisabled;
|
|
@@ -7154,7 +7186,169 @@ var styles$u = {
|
|
|
7154
7186
|
paddingRight: 32
|
|
7155
7187
|
}
|
|
7156
7188
|
},
|
|
7157
|
-
tweakSelectList: {}
|
|
7189
|
+
tweakSelectList: {},
|
|
7190
|
+
tweakSearchInput: {
|
|
7191
|
+
tweakInput: {
|
|
7192
|
+
inputWrapper: {
|
|
7193
|
+
height: 48,
|
|
7194
|
+
borderRadius: 0,
|
|
7195
|
+
border: "none",
|
|
7196
|
+
backgroundColor: "transparent"
|
|
7197
|
+
}
|
|
7198
|
+
}
|
|
7199
|
+
}
|
|
7200
|
+
};
|
|
7201
|
+
var LEFT_PADDING = 44;
|
|
7202
|
+
var styles$t = {
|
|
7203
|
+
root: {
|
|
7204
|
+
position: "relative"
|
|
7205
|
+
},
|
|
7206
|
+
icon: {
|
|
7207
|
+
display: "flex",
|
|
7208
|
+
alignItems: "center",
|
|
7209
|
+
position: "absolute",
|
|
7210
|
+
left: 12,
|
|
7211
|
+
height: "100%",
|
|
7212
|
+
width: 20,
|
|
7213
|
+
zIndex: 2,
|
|
7214
|
+
color: colors.GREY_ACTIVE
|
|
7215
|
+
},
|
|
7216
|
+
tweakInput: {
|
|
7217
|
+
inputWrapper: {
|
|
7218
|
+
height: 35,
|
|
7219
|
+
borderColor: "transparent",
|
|
7220
|
+
backgroundColor: rgba(colors.BORDER_MAIN, 0.3),
|
|
7221
|
+
borderRadius: 18,
|
|
7222
|
+
paddingLeft: LEFT_PADDING,
|
|
7223
|
+
transitionProperty: "background-color, border-color"
|
|
7224
|
+
},
|
|
7225
|
+
focused: {
|
|
7226
|
+
backgroundColor: colors.CLASSIC_WHITE,
|
|
7227
|
+
borderColor: colors.BORDER_MAIN
|
|
7228
|
+
},
|
|
7229
|
+
input: {
|
|
7230
|
+
fontSize: 14,
|
|
7231
|
+
paddingLeft: 0
|
|
7232
|
+
},
|
|
7233
|
+
label: {
|
|
7234
|
+
left: LEFT_PADDING,
|
|
7235
|
+
fontSize: 14
|
|
7236
|
+
}
|
|
7237
|
+
}
|
|
7238
|
+
};
|
|
7239
|
+
function _define_property$w(obj, key, value) {
|
|
7240
|
+
if (key in obj) {
|
|
7241
|
+
Object.defineProperty(obj, key, {
|
|
7242
|
+
value,
|
|
7243
|
+
enumerable: true,
|
|
7244
|
+
configurable: true,
|
|
7245
|
+
writable: true
|
|
7246
|
+
});
|
|
7247
|
+
} else {
|
|
7248
|
+
obj[key] = value;
|
|
7249
|
+
}
|
|
7250
|
+
return obj;
|
|
7251
|
+
}
|
|
7252
|
+
function _object_spread$v(target) {
|
|
7253
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7254
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
7255
|
+
var ownKeys2 = Object.keys(source);
|
|
7256
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
7257
|
+
ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
7258
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
7259
|
+
}));
|
|
7260
|
+
}
|
|
7261
|
+
ownKeys2.forEach(function(key) {
|
|
7262
|
+
_define_property$w(target, key, source[key]);
|
|
7263
|
+
});
|
|
7264
|
+
}
|
|
7265
|
+
return target;
|
|
7266
|
+
}
|
|
7267
|
+
function ownKeys$p(object, enumerableOnly) {
|
|
7268
|
+
var keys = Object.keys(object);
|
|
7269
|
+
if (Object.getOwnPropertySymbols) {
|
|
7270
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
7271
|
+
if (enumerableOnly) {
|
|
7272
|
+
symbols = symbols.filter(function(sym) {
|
|
7273
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
7274
|
+
});
|
|
7275
|
+
}
|
|
7276
|
+
keys.push.apply(keys, symbols);
|
|
7277
|
+
}
|
|
7278
|
+
return keys;
|
|
7279
|
+
}
|
|
7280
|
+
function _object_spread_props$p(target, source) {
|
|
7281
|
+
source = source != null ? source : {};
|
|
7282
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
7283
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
7284
|
+
} else {
|
|
7285
|
+
ownKeys$p(Object(source)).forEach(function(key) {
|
|
7286
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
7287
|
+
});
|
|
7288
|
+
}
|
|
7289
|
+
return target;
|
|
7290
|
+
}
|
|
7291
|
+
function _object_without_properties$6(source, excluded) {
|
|
7292
|
+
if (source == null)
|
|
7293
|
+
return {};
|
|
7294
|
+
var target = _object_without_properties_loose$6(source, excluded);
|
|
7295
|
+
var key, i;
|
|
7296
|
+
if (Object.getOwnPropertySymbols) {
|
|
7297
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
7298
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
7299
|
+
key = sourceSymbolKeys[i];
|
|
7300
|
+
if (excluded.indexOf(key) >= 0)
|
|
7301
|
+
continue;
|
|
7302
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
7303
|
+
continue;
|
|
7304
|
+
target[key] = source[key];
|
|
7305
|
+
}
|
|
7306
|
+
}
|
|
7307
|
+
return target;
|
|
7308
|
+
}
|
|
7309
|
+
function _object_without_properties_loose$6(source, excluded) {
|
|
7310
|
+
if (source == null)
|
|
7311
|
+
return {};
|
|
7312
|
+
var target = {};
|
|
7313
|
+
var sourceKeys = Object.keys(source);
|
|
7314
|
+
var key, i;
|
|
7315
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
7316
|
+
key = sourceKeys[i];
|
|
7317
|
+
if (excluded.indexOf(key) >= 0)
|
|
7318
|
+
continue;
|
|
7319
|
+
target[key] = source[key];
|
|
7320
|
+
}
|
|
7321
|
+
return target;
|
|
7322
|
+
}
|
|
7323
|
+
var SearchInput = function(_param) {
|
|
7324
|
+
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$6(_param, [
|
|
7325
|
+
"isClearable",
|
|
7326
|
+
"tweakStyles",
|
|
7327
|
+
"testId",
|
|
7328
|
+
"data"
|
|
7329
|
+
]);
|
|
7330
|
+
var _useTheme = useTheme("SearchInput", styles$t, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
7331
|
+
var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
|
|
7332
|
+
return /* @__PURE__ */ jsxs("div", _object_spread_props$p(_object_spread$v({
|
|
7333
|
+
className: classes.root
|
|
7334
|
+
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
7335
|
+
children: [
|
|
7336
|
+
/* @__PURE__ */ jsx("div", {
|
|
7337
|
+
className: classes.icon,
|
|
7338
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
7339
|
+
type: "search"
|
|
7340
|
+
})
|
|
7341
|
+
}),
|
|
7342
|
+
/* @__PURE__ */ jsx(Input, _object_spread$v({
|
|
7343
|
+
isClearable,
|
|
7344
|
+
isActive: props.value !== "" && props.value !== void 0,
|
|
7345
|
+
testId: getTestId(testId, "input"),
|
|
7346
|
+
tweakStyles: tweakInputStyles,
|
|
7347
|
+
hasFloatingLabel: false,
|
|
7348
|
+
label: props.placeholder
|
|
7349
|
+
}, props))
|
|
7350
|
+
]
|
|
7351
|
+
}));
|
|
7158
7352
|
};
|
|
7159
7353
|
function _array_like_to_array$j(arr, len) {
|
|
7160
7354
|
if (len == null || len > arr.length)
|
|
@@ -7196,7 +7390,7 @@ function _async_to_generator$4(fn3) {
|
|
|
7196
7390
|
});
|
|
7197
7391
|
};
|
|
7198
7392
|
}
|
|
7199
|
-
function _define_property$
|
|
7393
|
+
function _define_property$v(obj, key, value) {
|
|
7200
7394
|
if (key in obj) {
|
|
7201
7395
|
Object.defineProperty(obj, key, {
|
|
7202
7396
|
value,
|
|
@@ -7240,7 +7434,7 @@ function _iterable_to_array_limit$j(arr, i) {
|
|
|
7240
7434
|
function _non_iterable_rest$j() {
|
|
7241
7435
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7242
7436
|
}
|
|
7243
|
-
function _object_spread$
|
|
7437
|
+
function _object_spread$u(target) {
|
|
7244
7438
|
for (var i = 1; i < arguments.length; i++) {
|
|
7245
7439
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
7246
7440
|
var ownKeys2 = Object.keys(source);
|
|
@@ -7250,12 +7444,12 @@ function _object_spread$v(target) {
|
|
|
7250
7444
|
}));
|
|
7251
7445
|
}
|
|
7252
7446
|
ownKeys2.forEach(function(key) {
|
|
7253
|
-
_define_property$
|
|
7447
|
+
_define_property$v(target, key, source[key]);
|
|
7254
7448
|
});
|
|
7255
7449
|
}
|
|
7256
7450
|
return target;
|
|
7257
7451
|
}
|
|
7258
|
-
function ownKeys$
|
|
7452
|
+
function ownKeys$o(object, enumerableOnly) {
|
|
7259
7453
|
var keys = Object.keys(object);
|
|
7260
7454
|
if (Object.getOwnPropertySymbols) {
|
|
7261
7455
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -7268,21 +7462,21 @@ function ownKeys$p(object, enumerableOnly) {
|
|
|
7268
7462
|
}
|
|
7269
7463
|
return keys;
|
|
7270
7464
|
}
|
|
7271
|
-
function _object_spread_props$
|
|
7465
|
+
function _object_spread_props$o(target, source) {
|
|
7272
7466
|
source = source != null ? source : {};
|
|
7273
7467
|
if (Object.getOwnPropertyDescriptors) {
|
|
7274
7468
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
7275
7469
|
} else {
|
|
7276
|
-
ownKeys$
|
|
7470
|
+
ownKeys$o(Object(source)).forEach(function(key) {
|
|
7277
7471
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
7278
7472
|
});
|
|
7279
7473
|
}
|
|
7280
7474
|
return target;
|
|
7281
7475
|
}
|
|
7282
|
-
function _object_without_properties$
|
|
7476
|
+
function _object_without_properties$5(source, excluded) {
|
|
7283
7477
|
if (source == null)
|
|
7284
7478
|
return {};
|
|
7285
|
-
var target = _object_without_properties_loose$
|
|
7479
|
+
var target = _object_without_properties_loose$5(source, excluded);
|
|
7286
7480
|
var key, i;
|
|
7287
7481
|
if (Object.getOwnPropertySymbols) {
|
|
7288
7482
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7297,7 +7491,7 @@ function _object_without_properties$6(source, excluded) {
|
|
|
7297
7491
|
}
|
|
7298
7492
|
return target;
|
|
7299
7493
|
}
|
|
7300
|
-
function _object_without_properties_loose$
|
|
7494
|
+
function _object_without_properties_loose$5(source, excluded) {
|
|
7301
7495
|
if (source == null)
|
|
7302
7496
|
return {};
|
|
7303
7497
|
var target = {};
|
|
@@ -7430,7 +7624,7 @@ var __generator$4 = globalThis && globalThis.__generator || function(thisArg, bo
|
|
|
7430
7624
|
}
|
|
7431
7625
|
};
|
|
7432
7626
|
function Select(_param) {
|
|
7433
|
-
var options = _param.options, value = _param.value, defaultOptionLabel = _param.defaultOptionLabel, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, onChange = _param.onChange, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_isOptionDisabled = _param.isOptionDisabled, isOptionDisabled = _param_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _param_isOptionDisabled, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, optionsFilter = _param.optionsFilter, inputProps = _object_without_properties$
|
|
7627
|
+
var options = _param.options, value = _param.value, defaultOptionLabel = _param.defaultOptionLabel, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, searchInput = _param.searchInput, onChange = _param.onChange, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_isOptionDisabled = _param.isOptionDisabled, isOptionDisabled = _param_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _param_isOptionDisabled, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, optionsFilter = _param.optionsFilter, inputProps = _object_without_properties$5(_param, [
|
|
7434
7628
|
"options",
|
|
7435
7629
|
"value",
|
|
7436
7630
|
"defaultOptionLabel",
|
|
@@ -7445,6 +7639,7 @@ function Select(_param) {
|
|
|
7445
7639
|
"minSymbolsCountToOpenList",
|
|
7446
7640
|
"dropdownIcon",
|
|
7447
7641
|
"shouldScrollToList",
|
|
7642
|
+
"searchInput",
|
|
7448
7643
|
"onChange",
|
|
7449
7644
|
"onFocus",
|
|
7450
7645
|
"onBlur",
|
|
@@ -7468,6 +7663,8 @@ function Select(_param) {
|
|
|
7468
7663
|
var inputWrapper = useRef(null);
|
|
7469
7664
|
var list = useRef(null);
|
|
7470
7665
|
var input = useRef(null);
|
|
7666
|
+
var shouldRenderSearchInputInList = (searchInput === null || searchInput === void 0 ? void 0 : searchInput.shouldRenderInList) === true;
|
|
7667
|
+
var hasSearchInputInList = optionsMode !== "normal" && shouldRenderSearchInputInList;
|
|
7471
7668
|
var stringValue = isNotEmpty(value) ? convertValueToString(value) : void 0;
|
|
7472
7669
|
var filteredOptions = useMemo(function() {
|
|
7473
7670
|
if (optionsMode !== "search") {
|
|
@@ -7495,43 +7692,32 @@ function Select(_param) {
|
|
|
7495
7692
|
value,
|
|
7496
7693
|
convertValueToString
|
|
7497
7694
|
]);
|
|
7498
|
-
var handleListClose = function() {
|
|
7695
|
+
var handleListClose = function(event) {
|
|
7499
7696
|
setIsListOpen(false);
|
|
7500
7697
|
setSearchValue("");
|
|
7501
7698
|
setShouldShowDefaultOption(true);
|
|
7699
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
7502
7700
|
};
|
|
7503
7701
|
var handleListOpen = function() {
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
if (isListOpen) {
|
|
7507
|
-
return [
|
|
7508
|
-
2
|
|
7509
|
-
];
|
|
7510
|
-
}
|
|
7511
|
-
setIsListOpen(true);
|
|
7512
|
-
return [
|
|
7513
|
-
2
|
|
7514
|
-
];
|
|
7515
|
-
});
|
|
7516
|
-
});
|
|
7517
|
-
return function handleListOpen2() {
|
|
7518
|
-
return _ref2.apply(this, arguments);
|
|
7519
|
-
};
|
|
7520
|
-
}();
|
|
7521
|
-
var handleFocus = function(event) {
|
|
7522
|
-
if (onFocus !== void 0) {
|
|
7523
|
-
onFocus(event);
|
|
7702
|
+
if (!isListOpen) {
|
|
7703
|
+
setIsListOpen(true);
|
|
7524
7704
|
}
|
|
7705
|
+
};
|
|
7706
|
+
var handleFocus = function(event) {
|
|
7707
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
|
|
7525
7708
|
handleListOpen();
|
|
7526
7709
|
};
|
|
7527
7710
|
var handleOnClick = function() {
|
|
7528
7711
|
handleListOpen();
|
|
7529
7712
|
};
|
|
7530
7713
|
var handleBlur = function(event) {
|
|
7531
|
-
if (
|
|
7532
|
-
|
|
7714
|
+
if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current)) {
|
|
7715
|
+
return;
|
|
7716
|
+
}
|
|
7717
|
+
var isActionInsideList = hasExactParent(event.relatedTarget, list.current);
|
|
7718
|
+
if (!isActionInsideList) {
|
|
7719
|
+
handleListClose(event);
|
|
7533
7720
|
}
|
|
7534
|
-
handleListClose();
|
|
7535
7721
|
};
|
|
7536
7722
|
var handleOnChange = useCallback(function(newValue) {
|
|
7537
7723
|
var areValuesEqual = compareValuesOnChange(value, newValue);
|
|
@@ -7543,10 +7729,10 @@ function Select(_param) {
|
|
|
7543
7729
|
value,
|
|
7544
7730
|
onChange
|
|
7545
7731
|
]);
|
|
7546
|
-
var
|
|
7732
|
+
var handleOptionSelect = useCallback(function(index, event) {
|
|
7547
7733
|
var _input_current;
|
|
7548
7734
|
handleOnChange(index === -1 ? void 0 : filteredOptions[index]);
|
|
7549
|
-
handleListClose();
|
|
7735
|
+
handleListClose(event);
|
|
7550
7736
|
(_input_current = input.current) === null || _input_current === void 0 ? void 0 : _input_current.blur();
|
|
7551
7737
|
}, [
|
|
7552
7738
|
handleOnChange,
|
|
@@ -7601,7 +7787,7 @@ function Select(_param) {
|
|
|
7601
7787
|
if (optionsMode !== "dynamic") {
|
|
7602
7788
|
setShouldShowDefaultOption(v === "");
|
|
7603
7789
|
}
|
|
7604
|
-
if (v === "") {
|
|
7790
|
+
if (v === "" && !hasSearchInputInList) {
|
|
7605
7791
|
handleOnChange(void 0);
|
|
7606
7792
|
}
|
|
7607
7793
|
setSearchValue(v);
|
|
@@ -7618,7 +7804,7 @@ function Select(_param) {
|
|
|
7618
7804
|
if (indexToClick === -1 && filteredOptions.length === 1) {
|
|
7619
7805
|
indexToClick = 0;
|
|
7620
7806
|
}
|
|
7621
|
-
|
|
7807
|
+
handleOptionSelect(indexToClick, event);
|
|
7622
7808
|
break;
|
|
7623
7809
|
}
|
|
7624
7810
|
case "ArrowDown": {
|
|
@@ -7665,14 +7851,23 @@ function Select(_param) {
|
|
|
7665
7851
|
(_input_current1 = input.current) === null || _input_current1 === void 0 ? void 0 : _input_current1.focus();
|
|
7666
7852
|
}
|
|
7667
7853
|
};
|
|
7668
|
-
useOnClickOutsideWithRef(list,
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7854
|
+
useOnClickOutsideWithRef(list, handleListClose, inputWrapper);
|
|
7855
|
+
var hasEnoughSymbolsToSearch = searchValue.trim().length >= minSymbolsCountToOpenList;
|
|
7856
|
+
var isOpen = (
|
|
7857
|
+
// Пользователь пытается открыть лист
|
|
7858
|
+
isListOpen && // Нам есть что показать:
|
|
7859
|
+
// Есть опции
|
|
7860
|
+
(filteredOptions.length > 0 || // Дефолтная опция
|
|
7861
|
+
defaultOptionLabel !== void 0 && !hasEnoughSymbolsToSearch || // Текст "Загрузка..."
|
|
7862
|
+
inputProps.isLoading || // Текст "Совпадений не найдено"
|
|
7863
|
+
noMatchesLabel !== void 0 || // У нас есть инпут с поиском внутри листа
|
|
7864
|
+
hasSearchInputInList) && // Последняя проверка на случай, если мы че то ищем в опциях
|
|
7865
|
+
(optionsMode === "normal" || hasEnoughSymbolsToSearch)
|
|
7866
|
+
);
|
|
7672
7867
|
var _inputProps_isReadonly = inputProps.isReadonly, isReadonly = _inputProps_isReadonly === void 0 ? true : _inputProps_isReadonly;
|
|
7673
|
-
var shouldUsePointerCursor = optionsMode === "normal" && isReadonly;
|
|
7868
|
+
var shouldUsePointerCursor = (optionsMode === "normal" || shouldRenderSearchInputInList) && isReadonly;
|
|
7674
7869
|
var tweakInputStyles = useMemo(function() {
|
|
7675
|
-
return merge({}, componentStyles.tweakInput, _object_spread$
|
|
7870
|
+
return merge({}, componentStyles.tweakInput, _object_spread$u({}, shouldUsePointerCursor ? {
|
|
7676
7871
|
input: {
|
|
7677
7872
|
cursor: "pointer"
|
|
7678
7873
|
}
|
|
@@ -7681,6 +7876,7 @@ function Select(_param) {
|
|
|
7681
7876
|
tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakInput,
|
|
7682
7877
|
shouldUsePointerCursor
|
|
7683
7878
|
]);
|
|
7879
|
+
var tweakSearchInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakSearchInput");
|
|
7684
7880
|
var _ref = dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : {}, _ref_shouldUsePopper = _ref.shouldUsePopper, shouldUsePopper = _ref_shouldUsePopper === void 0 ? false : _ref_shouldUsePopper, _ref_shouldRenderInBody = _ref.shouldRenderInBody, shouldRenderInBody = _ref_shouldRenderInBody === void 0 ? false : _ref_shouldRenderInBody, _ref_shouldHideOnScroll = _ref.shouldHideOnScroll, shouldHideOnScroll = _ref_shouldHideOnScroll === void 0 ? false : _ref_shouldHideOnScroll;
|
|
7685
7881
|
var popperData = useDropdown({
|
|
7686
7882
|
isOpen,
|
|
@@ -7702,30 +7898,34 @@ function Select(_param) {
|
|
|
7702
7898
|
onOpen
|
|
7703
7899
|
]);
|
|
7704
7900
|
var _obj;
|
|
7705
|
-
var listEl = /* @__PURE__ */ jsx("div", _object_spread_props$
|
|
7706
|
-
className: clsx(classes.listWrapper, (_obj = {}, _define_property$
|
|
7901
|
+
var listEl = /* @__PURE__ */ jsx("div", _object_spread_props$o(_object_spread$u({
|
|
7902
|
+
className: clsx(classes.listWrapper, (_obj = {}, _define_property$v(_obj, classes.withoutPopper, !shouldUsePopper), _define_property$v(_obj, classes.listWrapperInBody, shouldRenderInBody), _obj)),
|
|
7707
7903
|
ref: list,
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
},
|
|
7711
|
-
style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper
|
|
7904
|
+
style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper,
|
|
7905
|
+
onBlur: handleBlur
|
|
7712
7906
|
}, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
|
|
7713
7907
|
children: isOpen && /* @__PURE__ */ jsx(SelectList, {
|
|
7714
7908
|
options: filteredOptions,
|
|
7715
7909
|
defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption ? defaultOptionLabel : void 0,
|
|
7910
|
+
customListHeader: hasSearchInputInList ? /* @__PURE__ */ jsx(SearchInput, _object_spread$u({
|
|
7911
|
+
value: searchValue,
|
|
7912
|
+
onChange: handleInputChange,
|
|
7913
|
+
tweakStyles: tweakSearchInputStyles,
|
|
7914
|
+
placeholder: "Поиск"
|
|
7915
|
+
}, searchInput)) : void 0,
|
|
7716
7916
|
noMatchesLabel,
|
|
7717
7917
|
focusedIndex: focusedListCellIndex,
|
|
7718
7918
|
activeValue: value,
|
|
7719
7919
|
isLoading: inputProps.isLoading,
|
|
7720
7920
|
loadingLabel,
|
|
7721
7921
|
tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
|
|
7722
|
-
testId:
|
|
7922
|
+
testId: getTestId(testId, "list"),
|
|
7723
7923
|
shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll,
|
|
7724
7924
|
isOptionDisabled,
|
|
7725
7925
|
convertValueToString,
|
|
7726
7926
|
convertValueToReactNode,
|
|
7727
7927
|
convertValueToId,
|
|
7728
|
-
onOptionClick:
|
|
7928
|
+
onOptionClick: handleOptionSelect
|
|
7729
7929
|
})
|
|
7730
7930
|
}));
|
|
7731
7931
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -7737,11 +7937,11 @@ function Select(_param) {
|
|
|
7737
7937
|
onClick: isDisabled ? void 0 : handleOnClick,
|
|
7738
7938
|
ref: inputWrapper,
|
|
7739
7939
|
children: [
|
|
7740
|
-
/* @__PURE__ */ jsx(Input, _object_spread$
|
|
7741
|
-
value: searchValue !== "" ? searchValue : stringValue,
|
|
7940
|
+
/* @__PURE__ */ jsx(Input, _object_spread$u({
|
|
7941
|
+
value: searchValue !== "" && !shouldRenderSearchInputInList ? searchValue : stringValue,
|
|
7742
7942
|
onChange: handleInputChange,
|
|
7743
7943
|
isActive: isListOpen,
|
|
7744
|
-
isReadonly: optionsMode === "normal",
|
|
7944
|
+
isReadonly: optionsMode === "normal" || shouldRenderSearchInputInList,
|
|
7745
7945
|
onFocus: handleFocus,
|
|
7746
7946
|
onBlur: handleBlur,
|
|
7747
7947
|
isDisabled,
|
|
@@ -7775,7 +7975,7 @@ function Select(_param) {
|
|
|
7775
7975
|
}
|
|
7776
7976
|
var SELECT_PADDING_LEFT = 12;
|
|
7777
7977
|
var SELECT_PADDING_RIGHT = 24;
|
|
7778
|
-
var styles$
|
|
7978
|
+
var styles$s = {
|
|
7779
7979
|
btn: {
|
|
7780
7980
|
width: 36,
|
|
7781
7981
|
height: 36,
|
|
@@ -7844,7 +8044,7 @@ var styles$t = {
|
|
|
7844
8044
|
};
|
|
7845
8045
|
var DatePickerHeader = function(param) {
|
|
7846
8046
|
var date = param.date, changeYear = param.changeYear, changeMonth = param.changeMonth, decreaseMonth = param.decreaseMonth, increaseMonth = param.increaseMonth, isPrevMonthButtonDisabled = param.isPrevMonthButtonDisabled, isNextMonthButtonDisabled = param.isNextMonthButtonDisabled, months = param.months;
|
|
7847
|
-
var _useTheme = useTheme("DatePickerHeader", styles$
|
|
8047
|
+
var _useTheme = useTheme("DatePickerHeader", styles$s), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
7848
8048
|
var years = useMemo(function() {
|
|
7849
8049
|
return Array.from(Array(41)).map(function(_, i) {
|
|
7850
8050
|
return getYear(new Date()) - 30 + i;
|
|
@@ -7928,7 +8128,7 @@ var DatePickerHeader = function(param) {
|
|
|
7928
8128
|
]
|
|
7929
8129
|
});
|
|
7930
8130
|
};
|
|
7931
|
-
var styles$
|
|
8131
|
+
var styles$r = {
|
|
7932
8132
|
root: {
|
|
7933
8133
|
width: "100%",
|
|
7934
8134
|
height: "100%"
|
|
@@ -7990,7 +8190,7 @@ function _array_with_holes$i(arr) {
|
|
|
7990
8190
|
if (Array.isArray(arr))
|
|
7991
8191
|
return arr;
|
|
7992
8192
|
}
|
|
7993
|
-
function _define_property$
|
|
8193
|
+
function _define_property$u(obj, key, value) {
|
|
7994
8194
|
if (key in obj) {
|
|
7995
8195
|
Object.defineProperty(obj, key, {
|
|
7996
8196
|
value,
|
|
@@ -8034,7 +8234,7 @@ function _iterable_to_array_limit$i(arr, i) {
|
|
|
8034
8234
|
function _non_iterable_rest$i() {
|
|
8035
8235
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8036
8236
|
}
|
|
8037
|
-
function _object_spread$
|
|
8237
|
+
function _object_spread$t(target) {
|
|
8038
8238
|
for (var i = 1; i < arguments.length; i++) {
|
|
8039
8239
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8040
8240
|
var ownKeys2 = Object.keys(source);
|
|
@@ -8044,12 +8244,12 @@ function _object_spread$u(target) {
|
|
|
8044
8244
|
}));
|
|
8045
8245
|
}
|
|
8046
8246
|
ownKeys2.forEach(function(key) {
|
|
8047
|
-
_define_property$
|
|
8247
|
+
_define_property$u(target, key, source[key]);
|
|
8048
8248
|
});
|
|
8049
8249
|
}
|
|
8050
8250
|
return target;
|
|
8051
8251
|
}
|
|
8052
|
-
function ownKeys$
|
|
8252
|
+
function ownKeys$n(object, enumerableOnly) {
|
|
8053
8253
|
var keys = Object.keys(object);
|
|
8054
8254
|
if (Object.getOwnPropertySymbols) {
|
|
8055
8255
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8062,21 +8262,21 @@ function ownKeys$o(object, enumerableOnly) {
|
|
|
8062
8262
|
}
|
|
8063
8263
|
return keys;
|
|
8064
8264
|
}
|
|
8065
|
-
function _object_spread_props$
|
|
8265
|
+
function _object_spread_props$n(target, source) {
|
|
8066
8266
|
source = source != null ? source : {};
|
|
8067
8267
|
if (Object.getOwnPropertyDescriptors) {
|
|
8068
8268
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8069
8269
|
} else {
|
|
8070
|
-
ownKeys$
|
|
8270
|
+
ownKeys$n(Object(source)).forEach(function(key) {
|
|
8071
8271
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8072
8272
|
});
|
|
8073
8273
|
}
|
|
8074
8274
|
return target;
|
|
8075
8275
|
}
|
|
8076
|
-
function _object_without_properties$
|
|
8276
|
+
function _object_without_properties$4(source, excluded) {
|
|
8077
8277
|
if (source == null)
|
|
8078
8278
|
return {};
|
|
8079
|
-
var target = _object_without_properties_loose$
|
|
8279
|
+
var target = _object_without_properties_loose$4(source, excluded);
|
|
8080
8280
|
var key, i;
|
|
8081
8281
|
if (Object.getOwnPropertySymbols) {
|
|
8082
8282
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -8091,7 +8291,7 @@ function _object_without_properties$5(source, excluded) {
|
|
|
8091
8291
|
}
|
|
8092
8292
|
return target;
|
|
8093
8293
|
}
|
|
8094
|
-
function _object_without_properties_loose$
|
|
8294
|
+
function _object_without_properties_loose$4(source, excluded) {
|
|
8095
8295
|
if (source == null)
|
|
8096
8296
|
return {};
|
|
8097
8297
|
var target = {};
|
|
@@ -8132,7 +8332,7 @@ var PopperContainer = function(param) {
|
|
|
8132
8332
|
};
|
|
8133
8333
|
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
8134
8334
|
var DatePicker = function(_param) {
|
|
8135
|
-
var data = _param.data, tweakStyles = _param.tweakStyles, selectedDate = _param.selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, endDate = _param.endDate, startDate = _param.startDate, size = _param.size, isRange = _param.isRange, locale2 = _param.locale, months = _param.months, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, isInline = _param.isInline, isNeedClearSelectedDate = _param.isNeedClearSelectedDate, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, _param_placeholder = _param.placeholder, placeholder = _param_placeholder === void 0 ? "__.__.____" : _param_placeholder, shouldGiveValueOnType = _param.shouldGiveValueOnType, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, popperModifiers = _param.popperModifiers, showPreviousMonths = _param.showPreviousMonths, popperPlacement = _param.popperPlacement, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, customHeader = _param.customHeader, filterDate = _param.filterDate, inputProps = _object_without_properties$
|
|
8335
|
+
var data = _param.data, tweakStyles = _param.tweakStyles, selectedDate = _param.selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, endDate = _param.endDate, startDate = _param.startDate, size = _param.size, isRange = _param.isRange, locale2 = _param.locale, months = _param.months, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, isInline = _param.isInline, isNeedClearSelectedDate = _param.isNeedClearSelectedDate, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, _param_placeholder = _param.placeholder, placeholder = _param_placeholder === void 0 ? "__.__.____" : _param_placeholder, shouldGiveValueOnType = _param.shouldGiveValueOnType, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, popperModifiers = _param.popperModifiers, showPreviousMonths = _param.showPreviousMonths, popperPlacement = _param.popperPlacement, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, customHeader = _param.customHeader, filterDate = _param.filterDate, inputProps = _object_without_properties$4(_param, [
|
|
8136
8336
|
"data",
|
|
8137
8337
|
"tweakStyles",
|
|
8138
8338
|
"selectedDate",
|
|
@@ -8163,7 +8363,7 @@ var DatePicker = function(_param) {
|
|
|
8163
8363
|
"customHeader",
|
|
8164
8364
|
"filterDate"
|
|
8165
8365
|
]);
|
|
8166
|
-
var classes = useTheme("DatePicker", styles$
|
|
8366
|
+
var classes = useTheme("DatePicker", styles$r, tweakStyles, {
|
|
8167
8367
|
leftPosition,
|
|
8168
8368
|
topPosition
|
|
8169
8369
|
}).classes;
|
|
@@ -8312,7 +8512,7 @@ var DatePicker = function(_param) {
|
|
|
8312
8512
|
},
|
|
8313
8513
|
filterDate
|
|
8314
8514
|
};
|
|
8315
|
-
var dateInputProps = _object_spread_props$
|
|
8515
|
+
var dateInputProps = _object_spread_props$n(_object_spread$t({}, inputProps), {
|
|
8316
8516
|
tweakStyles,
|
|
8317
8517
|
iconType: inputProps.isClearable && dateValue !== "" ? void 0 : "calendar",
|
|
8318
8518
|
isRange,
|
|
@@ -8321,14 +8521,14 @@ var DatePicker = function(_param) {
|
|
|
8321
8521
|
}
|
|
8322
8522
|
});
|
|
8323
8523
|
if (onChangeRange) {
|
|
8324
|
-
datePickerProps = _object_spread_props$
|
|
8524
|
+
datePickerProps = _object_spread_props$n(_object_spread$t({}, datePickerProps), {
|
|
8325
8525
|
startDate: start2,
|
|
8326
8526
|
endDate: end2,
|
|
8327
8527
|
selectsRange: true,
|
|
8328
8528
|
selected: startDate,
|
|
8329
8529
|
onChange: onChangeRange
|
|
8330
8530
|
});
|
|
8331
|
-
dateInputProps = _object_spread_props$
|
|
8531
|
+
dateInputProps = _object_spread_props$n(_object_spread$t({}, dateInputProps), {
|
|
8332
8532
|
startDate: startDateValue,
|
|
8333
8533
|
endDate: endDateValue,
|
|
8334
8534
|
onBlur: handleRangeBlur,
|
|
@@ -8336,7 +8536,7 @@ var DatePicker = function(_param) {
|
|
|
8336
8536
|
});
|
|
8337
8537
|
}
|
|
8338
8538
|
if (onChangeDate) {
|
|
8339
|
-
datePickerProps = _object_spread_props$
|
|
8539
|
+
datePickerProps = _object_spread_props$n(_object_spread$t({}, datePickerProps), {
|
|
8340
8540
|
selected: date,
|
|
8341
8541
|
onChange: function(newDate) {
|
|
8342
8542
|
return onChangeDate(newDate);
|
|
@@ -8350,20 +8550,20 @@ var DatePicker = function(_param) {
|
|
|
8350
8550
|
minDate,
|
|
8351
8551
|
maxDate
|
|
8352
8552
|
});
|
|
8353
|
-
dateInputProps = _object_spread_props$
|
|
8553
|
+
dateInputProps = _object_spread_props$n(_object_spread$t({}, dateInputProps), {
|
|
8354
8554
|
date: dateValue,
|
|
8355
8555
|
isActive: isOpen,
|
|
8356
8556
|
onBlur: handleBlur,
|
|
8357
8557
|
onChange: handleDateChange
|
|
8358
8558
|
});
|
|
8359
8559
|
}
|
|
8360
|
-
return /* @__PURE__ */ jsx("div", _object_spread_props$
|
|
8560
|
+
return /* @__PURE__ */ jsx("div", _object_spread_props$n(_object_spread$t({
|
|
8361
8561
|
className: classes.root
|
|
8362
8562
|
}, addDataAttributes(data)), {
|
|
8363
|
-
children: /* @__PURE__ */ jsx(Datepicker, _object_spread_props$
|
|
8563
|
+
children: /* @__PURE__ */ jsx(Datepicker, _object_spread_props$n(_object_spread$t({}, datePickerProps), {
|
|
8364
8564
|
customInput: /* @__PURE__ */ jsx(DatePickerInput, {
|
|
8365
8565
|
size,
|
|
8366
|
-
children: /* @__PURE__ */ jsx(DateInput, _object_spread$
|
|
8566
|
+
children: /* @__PURE__ */ jsx(DateInput, _object_spread$t({}, dateInputProps))
|
|
8367
8567
|
}),
|
|
8368
8568
|
renderCustomHeader: customHeader !== void 0 ? customHeader : function(param) {
|
|
8369
8569
|
var renderDate = param.date, changeYear = param.changeYear, changeMonth = param.changeMonth, decreaseMonth = param.decreaseMonth, increaseMonth = param.increaseMonth, prevMonthButtonDisabled = param.prevMonthButtonDisabled, nextMonthButtonDisabled = param.nextMonthButtonDisabled;
|
|
@@ -8381,7 +8581,7 @@ var DatePicker = function(_param) {
|
|
|
8381
8581
|
}))
|
|
8382
8582
|
}));
|
|
8383
8583
|
};
|
|
8384
|
-
var styles$
|
|
8584
|
+
var styles$q = {
|
|
8385
8585
|
root: {},
|
|
8386
8586
|
button: {
|
|
8387
8587
|
cursor: "pointer",
|
|
@@ -8422,7 +8622,7 @@ function _array_with_holes$h(arr) {
|
|
|
8422
8622
|
if (Array.isArray(arr))
|
|
8423
8623
|
return arr;
|
|
8424
8624
|
}
|
|
8425
|
-
function _define_property$
|
|
8625
|
+
function _define_property$t(obj, key, value) {
|
|
8426
8626
|
if (key in obj) {
|
|
8427
8627
|
Object.defineProperty(obj, key, {
|
|
8428
8628
|
value,
|
|
@@ -8466,7 +8666,7 @@ function _iterable_to_array_limit$h(arr, i) {
|
|
|
8466
8666
|
function _non_iterable_rest$h() {
|
|
8467
8667
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8468
8668
|
}
|
|
8469
|
-
function _object_spread$
|
|
8669
|
+
function _object_spread$s(target) {
|
|
8470
8670
|
for (var i = 1; i < arguments.length; i++) {
|
|
8471
8671
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8472
8672
|
var ownKeys2 = Object.keys(source);
|
|
@@ -8476,12 +8676,12 @@ function _object_spread$t(target) {
|
|
|
8476
8676
|
}));
|
|
8477
8677
|
}
|
|
8478
8678
|
ownKeys2.forEach(function(key) {
|
|
8479
|
-
_define_property$
|
|
8679
|
+
_define_property$t(target, key, source[key]);
|
|
8480
8680
|
});
|
|
8481
8681
|
}
|
|
8482
8682
|
return target;
|
|
8483
8683
|
}
|
|
8484
|
-
function ownKeys$
|
|
8684
|
+
function ownKeys$m(object, enumerableOnly) {
|
|
8485
8685
|
var keys = Object.keys(object);
|
|
8486
8686
|
if (Object.getOwnPropertySymbols) {
|
|
8487
8687
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8494,12 +8694,12 @@ function ownKeys$n(object, enumerableOnly) {
|
|
|
8494
8694
|
}
|
|
8495
8695
|
return keys;
|
|
8496
8696
|
}
|
|
8497
|
-
function _object_spread_props$
|
|
8697
|
+
function _object_spread_props$m(target, source) {
|
|
8498
8698
|
source = source != null ? source : {};
|
|
8499
8699
|
if (Object.getOwnPropertyDescriptors) {
|
|
8500
8700
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8501
8701
|
} else {
|
|
8502
|
-
ownKeys$
|
|
8702
|
+
ownKeys$m(Object(source)).forEach(function(key) {
|
|
8503
8703
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8504
8704
|
});
|
|
8505
8705
|
}
|
|
@@ -8524,14 +8724,14 @@ function _unsupported_iterable_to_array$h(o, minLen) {
|
|
|
8524
8724
|
var LINK_REGEXP = /(http(s?):\/\/(.*))(\s?)/;
|
|
8525
8725
|
var Description = function(param) {
|
|
8526
8726
|
var text = param.text, moreTitle = param.moreTitle, lessTitle = param.lessTitle, _param_truncateIndex = param.truncateIndex, truncateIndex = _param_truncateIndex === void 0 ? 150 : _param_truncateIndex, _param_isAlwaysOpen = param.isAlwaysOpen, isAlwaysOpen = _param_isAlwaysOpen === void 0 ? true : _param_isAlwaysOpen, data = param.data, tweakStyles = param.tweakStyles;
|
|
8527
|
-
var classes = useTheme("Description", styles$
|
|
8727
|
+
var classes = useTheme("Description", styles$q, tweakStyles).classes;
|
|
8528
8728
|
var isTooShort = text.length < truncateIndex;
|
|
8529
8729
|
var _useState = _sliced_to_array$h(useState(isAlwaysOpen), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
8530
8730
|
var link = text.match(LINK_REGEXP);
|
|
8531
8731
|
var linkText = link && link[0];
|
|
8532
8732
|
var textWithNoLink = text.replace(LINK_REGEXP, "");
|
|
8533
8733
|
var shortText = text.slice(0, text.slice(0, truncateIndex).lastIndexOf(" "));
|
|
8534
|
-
return /* @__PURE__ */ jsxs("div", _object_spread_props$
|
|
8734
|
+
return /* @__PURE__ */ jsxs("div", _object_spread_props$m(_object_spread$s({
|
|
8535
8735
|
className: classes.root
|
|
8536
8736
|
}, addDataAttributes(data)), {
|
|
8537
8737
|
children: [
|
|
@@ -8566,158 +8766,6 @@ var Description = function(param) {
|
|
|
8566
8766
|
]
|
|
8567
8767
|
}));
|
|
8568
8768
|
};
|
|
8569
|
-
var LEFT_PADDING = 44;
|
|
8570
|
-
var styles$q = {
|
|
8571
|
-
root: {
|
|
8572
|
-
position: "relative"
|
|
8573
|
-
},
|
|
8574
|
-
icon: {
|
|
8575
|
-
display: "flex",
|
|
8576
|
-
alignItems: "center",
|
|
8577
|
-
position: "absolute",
|
|
8578
|
-
left: 12,
|
|
8579
|
-
height: "100%",
|
|
8580
|
-
width: 20,
|
|
8581
|
-
zIndex: 2,
|
|
8582
|
-
color: colors.GREY_ACTIVE
|
|
8583
|
-
},
|
|
8584
|
-
tweakInput: {
|
|
8585
|
-
inputWrapper: {
|
|
8586
|
-
height: 35,
|
|
8587
|
-
borderColor: "transparent",
|
|
8588
|
-
backgroundColor: rgba(colors.BORDER_MAIN, 0.3),
|
|
8589
|
-
borderRadius: 18,
|
|
8590
|
-
paddingLeft: LEFT_PADDING,
|
|
8591
|
-
transitionProperty: "background-color, border-color"
|
|
8592
|
-
},
|
|
8593
|
-
focused: {
|
|
8594
|
-
backgroundColor: colors.CLASSIC_WHITE,
|
|
8595
|
-
borderColor: colors.BORDER_MAIN
|
|
8596
|
-
},
|
|
8597
|
-
input: {
|
|
8598
|
-
fontSize: 14,
|
|
8599
|
-
paddingLeft: 0
|
|
8600
|
-
},
|
|
8601
|
-
label: {
|
|
8602
|
-
left: LEFT_PADDING,
|
|
8603
|
-
fontSize: 14
|
|
8604
|
-
}
|
|
8605
|
-
}
|
|
8606
|
-
};
|
|
8607
|
-
function _define_property$t(obj, key, value) {
|
|
8608
|
-
if (key in obj) {
|
|
8609
|
-
Object.defineProperty(obj, key, {
|
|
8610
|
-
value,
|
|
8611
|
-
enumerable: true,
|
|
8612
|
-
configurable: true,
|
|
8613
|
-
writable: true
|
|
8614
|
-
});
|
|
8615
|
-
} else {
|
|
8616
|
-
obj[key] = value;
|
|
8617
|
-
}
|
|
8618
|
-
return obj;
|
|
8619
|
-
}
|
|
8620
|
-
function _object_spread$s(target) {
|
|
8621
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
8622
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
8623
|
-
var ownKeys2 = Object.keys(source);
|
|
8624
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
8625
|
-
ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
8626
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
8627
|
-
}));
|
|
8628
|
-
}
|
|
8629
|
-
ownKeys2.forEach(function(key) {
|
|
8630
|
-
_define_property$t(target, key, source[key]);
|
|
8631
|
-
});
|
|
8632
|
-
}
|
|
8633
|
-
return target;
|
|
8634
|
-
}
|
|
8635
|
-
function ownKeys$m(object, enumerableOnly) {
|
|
8636
|
-
var keys = Object.keys(object);
|
|
8637
|
-
if (Object.getOwnPropertySymbols) {
|
|
8638
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
8639
|
-
if (enumerableOnly) {
|
|
8640
|
-
symbols = symbols.filter(function(sym) {
|
|
8641
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
8642
|
-
});
|
|
8643
|
-
}
|
|
8644
|
-
keys.push.apply(keys, symbols);
|
|
8645
|
-
}
|
|
8646
|
-
return keys;
|
|
8647
|
-
}
|
|
8648
|
-
function _object_spread_props$m(target, source) {
|
|
8649
|
-
source = source != null ? source : {};
|
|
8650
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
8651
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8652
|
-
} else {
|
|
8653
|
-
ownKeys$m(Object(source)).forEach(function(key) {
|
|
8654
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8655
|
-
});
|
|
8656
|
-
}
|
|
8657
|
-
return target;
|
|
8658
|
-
}
|
|
8659
|
-
function _object_without_properties$4(source, excluded) {
|
|
8660
|
-
if (source == null)
|
|
8661
|
-
return {};
|
|
8662
|
-
var target = _object_without_properties_loose$4(source, excluded);
|
|
8663
|
-
var key, i;
|
|
8664
|
-
if (Object.getOwnPropertySymbols) {
|
|
8665
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
8666
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
8667
|
-
key = sourceSymbolKeys[i];
|
|
8668
|
-
if (excluded.indexOf(key) >= 0)
|
|
8669
|
-
continue;
|
|
8670
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
8671
|
-
continue;
|
|
8672
|
-
target[key] = source[key];
|
|
8673
|
-
}
|
|
8674
|
-
}
|
|
8675
|
-
return target;
|
|
8676
|
-
}
|
|
8677
|
-
function _object_without_properties_loose$4(source, excluded) {
|
|
8678
|
-
if (source == null)
|
|
8679
|
-
return {};
|
|
8680
|
-
var target = {};
|
|
8681
|
-
var sourceKeys = Object.keys(source);
|
|
8682
|
-
var key, i;
|
|
8683
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
8684
|
-
key = sourceKeys[i];
|
|
8685
|
-
if (excluded.indexOf(key) >= 0)
|
|
8686
|
-
continue;
|
|
8687
|
-
target[key] = source[key];
|
|
8688
|
-
}
|
|
8689
|
-
return target;
|
|
8690
|
-
}
|
|
8691
|
-
var SearchInput = function(_param) {
|
|
8692
|
-
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$4(_param, [
|
|
8693
|
-
"isClearable",
|
|
8694
|
-
"tweakStyles",
|
|
8695
|
-
"testId",
|
|
8696
|
-
"data"
|
|
8697
|
-
]);
|
|
8698
|
-
var _useTheme = useTheme("SearchInput", styles$q, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
8699
|
-
var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
|
|
8700
|
-
return /* @__PURE__ */ jsxs("div", _object_spread_props$m(_object_spread$s({
|
|
8701
|
-
className: classes.root
|
|
8702
|
-
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
8703
|
-
children: [
|
|
8704
|
-
/* @__PURE__ */ jsx("div", {
|
|
8705
|
-
className: classes.icon,
|
|
8706
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
8707
|
-
type: "search"
|
|
8708
|
-
})
|
|
8709
|
-
}),
|
|
8710
|
-
/* @__PURE__ */ jsx(Input, _object_spread$s({
|
|
8711
|
-
isClearable,
|
|
8712
|
-
isActive: props.value !== "" && props.value !== void 0,
|
|
8713
|
-
testId: getTestId(testId, "input"),
|
|
8714
|
-
tweakStyles: tweakInputStyles,
|
|
8715
|
-
hasFloatingLabel: false,
|
|
8716
|
-
label: props.placeholder
|
|
8717
|
-
}, props))
|
|
8718
|
-
]
|
|
8719
|
-
}));
|
|
8720
|
-
};
|
|
8721
8769
|
var SelectLocales = {
|
|
8722
8770
|
ru: {
|
|
8723
8771
|
clear: "Очистить",
|
|
@@ -20374,7 +20422,9 @@ function TableRow(param) {
|
|
|
20374
20422
|
},
|
|
20375
20423
|
onMouseLeave: handleMouseLeave,
|
|
20376
20424
|
onClick: handleRowClick
|
|
20377
|
-
}, addDataAttributes(rowData)
|
|
20425
|
+
}, addDataAttributes(_object_spread_props$d(_object_spread$f({}, rowData), {
|
|
20426
|
+
isExpandableComponentActive: nestedComponent.isOpen ? true : void 0
|
|
20427
|
+
}))), {
|
|
20378
20428
|
children: items.map(function(key, idx) {
|
|
20379
20429
|
return /* @__PURE__ */ jsx(TableValue, {
|
|
20380
20430
|
columnName: key,
|
|
@@ -27082,6 +27132,7 @@ export {
|
|
|
27082
27132
|
getScrollParent$1 as getScrollParent,
|
|
27083
27133
|
getStyleComputedProperty,
|
|
27084
27134
|
getTestId,
|
|
27135
|
+
hasExactParent,
|
|
27085
27136
|
isElementOffScreen,
|
|
27086
27137
|
isElementOneOfParents,
|
|
27087
27138
|
isInt,
|