@true-engineering/true-react-common-ui-kit 1.12.1 → 2.0.1
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/DateInput/DateInput.d.ts +8 -8
- package/dist/components/DateInput/DateInput.styles.d.ts +2 -2
- package/dist/components/DateInput/constants.d.ts +2 -0
- package/dist/components/DateInput/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +16 -24
- package/dist/components/DatePicker/DatePicker.styles.d.ts +12 -24
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +3 -9
- package/dist/components/DatePicker/DatePickerHeader/index.d.ts +1 -0
- package/dist/components/DatePicker/constants.d.ts +1 -0
- package/dist/components/DatePicker/helpers.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts +1 -2
- package/dist/components/DatePicker/types.d.ts +4 -0
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.d.ts +1 -1
- package/dist/components/Flag/augment.d.ts +1 -1
- package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
- package/dist/helpers/utils.d.ts +2 -1
- package/dist/style.css +125 -50
- package/dist/true-react-common-ui-kit.js +397 -427
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +397 -427
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/vite-env.d.ts +1 -1
- package/package.json +3 -3
- 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 +207 -207
- package/src/components/Button/index.ts +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +35 -35
- package/src/components/Checkbox/Checkbox.styles.ts +62 -62
- package/src/components/Checkbox/Checkbox.tsx +106 -106
- 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 +67 -63
- package/src/components/DateInput/DateInput.styles.ts +14 -14
- package/src/components/DateInput/DateInput.tsx +101 -60
- package/src/components/DateInput/constants.ts +2 -0
- package/src/components/DateInput/index.ts +3 -2
- package/src/components/DatePicker/DatePicker.stories.tsx +90 -96
- package/src/components/DatePicker/DatePicker.styles.ts +44 -54
- package/src/components/DatePicker/DatePicker.tsx +354 -358
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.ts +84 -84
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.tsx +80 -94
- package/src/components/DatePicker/DatePickerHeader/index.ts +2 -1
- package/src/components/DatePicker/constants.ts +1 -0
- package/src/components/DatePicker/helpers.ts +24 -0
- package/src/components/DatePicker/index.ts +3 -4
- package/src/components/DatePicker/types.ts +40 -0
- 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 +210 -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 -308
- 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.styles.ts +131 -131
- package/src/components/FlexibleTable/FlexibleTable.tsx +243 -243
- package/src/components/FlexibleTable/TableRow.tsx +171 -171
- package/src/components/FlexibleTable/TableValue.tsx +81 -81
- 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 +307 -307
- package/src/components/Input/Input.tsx +321 -321
- 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 +36 -36
- package/src/components/NumberInput/NumberInput.tsx +154 -154
- package/src/components/NumberInput/helpers.ts +87 -87
- 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/MultiSelect.stories.tsx +263 -263
- package/src/components/Select/Select.stories.tsx +258 -258
- package/src/components/Select/Select.styles.ts +96 -96
- package/src/components/Select/Select.tsx +6 -2
- package/src/components/Select/SelectList/SelectList.styles.ts +72 -72
- package/src/components/Select/SelectList/SelectList.tsx +165 -165
- 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 +73 -73
- package/src/components/Select/constants.ts +2 -2
- package/src/components/Select/helpers.ts +29 -29
- package/src/components/Select/index.ts +4 -4
- package/src/components/Select/types.ts +1 -1
- 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/dateHelpers/date-helpers.ts +9 -9
- package/src/helpers/index.ts +4 -4
- package/src/helpers/phone.ts +106 -106
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/helpers/snippets.tsx +5 -5
- package/src/helpers/utils.ts +261 -250
- 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 +6 -6
- package/src/theme.ts +155 -155
- package/src/types.ts +105 -106
- package/src/vite-env.d.ts +1 -1
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.d.ts +0 -11
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.styles.d.ts +0 -20
- package/dist/components/DatePicker/DatePickerInput/index.d.ts +0 -1
- package/src/components/DatePicker/DatePickerInput/DatePickerInput.styles.ts +0 -25
- package/src/components/DatePicker/DatePickerInput/DatePickerInput.tsx +0 -31
- package/src/components/DatePicker/DatePickerInput/index.ts +0 -1
|
@@ -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("hex-to-rgba"), require("react-jss"), require("react-input-mask"), require("react-datepicker"), require("date-fns"), require("react-overlays"), require("scroll-into-view-if-needed"), require("ts-debounce"), require("country-flag-icons"), require("react-remove-scroll")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-transition-group", "clsx", "hex-to-rgba", "react-jss", "react-input-mask", "react-datepicker", "date-fns", "react-overlays", "scroll-into-view-if-needed", "ts-debounce", "country-flag-icons", "react-remove-scroll"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.TrueReactKitUiKit = {}, global2.React, global2.reactTransitionGroup, global2.clsx, global2.hexToRgba, global2.reactJss, global2.InputMask, global2.
|
|
3
|
-
})(this, function(exports2, React, reactTransitionGroup, clsx, hexToRgba, reactJss, InputMask,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-transition-group"), require("clsx"), require("hex-to-rgba"), require("react-jss"), require("react-input-mask"), require("react-datepicker"), require("date-fns"), require("react-overlays"), require("scroll-into-view-if-needed"), require("ts-debounce"), require("country-flag-icons"), require("react-remove-scroll")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-transition-group", "clsx", "hex-to-rgba", "react-jss", "react-input-mask", "react-datepicker", "date-fns", "react-overlays", "scroll-into-view-if-needed", "ts-debounce", "country-flag-icons", "react-remove-scroll"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.TrueReactKitUiKit = {}, global2.React, global2.reactTransitionGroup, global2.clsx, global2.hexToRgba, global2.reactJss, global2.InputMask, global2.ReactDatePicker, global2.dateFns, global2.reactOverlays, global2.scrollIntoViewIfNeeded, global2.tsDebounce, global2.countryFlagIcons, global2.reactRemoveScroll));
|
|
3
|
+
})(this, function(exports2, React, reactTransitionGroup, clsx, hexToRgba, reactJss, InputMask, ReactDatePicker, dateFns, reactOverlays, scrollIntoViewIfNeeded, tsDebounce, countryFlagIcons, reactRemoveScroll) {
|
|
4
4
|
"use strict";
|
|
5
5
|
var colors = {
|
|
6
6
|
FONT_MAIN: "#222a37",
|
|
@@ -1292,6 +1292,9 @@
|
|
|
1292
1292
|
var isNotEmpty = function(val) {
|
|
1293
1293
|
return typeof val === "string" ? val.trim() !== "" : val !== null && val !== void 0;
|
|
1294
1294
|
};
|
|
1295
|
+
var isEmpty = function(val) {
|
|
1296
|
+
return val === null || val === void 0;
|
|
1297
|
+
};
|
|
1295
1298
|
var isStringNotEmpty = function(value) {
|
|
1296
1299
|
return (value !== null && value !== void 0 ? value : "").trim() !== "";
|
|
1297
1300
|
};
|
|
@@ -1340,17 +1343,19 @@
|
|
|
1340
1343
|
tabIndex: -1
|
|
1341
1344
|
};
|
|
1342
1345
|
};
|
|
1343
|
-
var createFilter = function(getter) {
|
|
1346
|
+
var createFilter = function(getter, compareFn) {
|
|
1344
1347
|
return function(items, query) {
|
|
1345
1348
|
return items.filter(function(item) {
|
|
1346
1349
|
var possibleValues = getter(item).reduce(function(acc, cur) {
|
|
1347
1350
|
return _to_consumable_array$7(acc).concat(_to_consumable_array$7(isStringNotEmpty(cur) ? [
|
|
1348
|
-
cur
|
|
1351
|
+
cur.toLowerCase()
|
|
1349
1352
|
] : []));
|
|
1350
1353
|
}, []);
|
|
1351
1354
|
var queryString = query.toLowerCase().trim();
|
|
1352
1355
|
return possibleValues.some(function(v) {
|
|
1353
|
-
return
|
|
1356
|
+
return (compareFn !== null && compareFn !== void 0 ? compareFn : function() {
|
|
1357
|
+
return v === null || v === void 0 ? void 0 : v.includes(queryString);
|
|
1358
|
+
})(v, queryString);
|
|
1354
1359
|
});
|
|
1355
1360
|
});
|
|
1356
1361
|
};
|
|
@@ -4958,63 +4963,63 @@
|
|
|
4958
4963
|
]
|
|
4959
4964
|
});
|
|
4960
4965
|
};
|
|
4961
|
-
const avatarGreen = ` <svg
|
|
4962
|
-
width="100%"
|
|
4963
|
-
height="100%"
|
|
4964
|
-
viewBox="0 0 32 32"
|
|
4965
|
-
fill="none"
|
|
4966
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4967
|
-
|
|
4968
|
-
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED"
|
|
4969
|
-
<mask
|
|
4970
|
-
id="mask0_0_12744"
|
|
4971
|
-
style="mask-type: 'alpha';"
|
|
4972
|
-
maskUnits="userSpaceOnUse"
|
|
4973
|
-
x="0"
|
|
4974
|
-
y="0"
|
|
4975
|
-
width="32"
|
|
4976
|
-
height="32"
|
|
4977
|
-
|
|
4978
|
-
<circle cx="16" cy="16" r="16" fill="white"
|
|
4979
|
-
</mask
|
|
4980
|
-
<g mask="url(#mask0_0_12744)"
|
|
4981
|
-
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)"
|
|
4982
|
-
<mask
|
|
4983
|
-
id="mask1_0_12744"
|
|
4984
|
-
style="mask-type: 'alpha';"
|
|
4985
|
-
maskUnits="userSpaceOnUse"
|
|
4986
|
-
x="3"
|
|
4987
|
-
y="16"
|
|
4988
|
-
width="26"
|
|
4989
|
-
height="26"
|
|
4990
|
-
|
|
4991
|
-
<circle cx="16" cy="29" r="13" fill="white"
|
|
4992
|
-
</mask
|
|
4993
|
-
<g mask="url(#mask1_0_12744)"
|
|
4994
|
-
<ellipse
|
|
4995
|
-
cx="16"
|
|
4996
|
-
cy="17.5"
|
|
4997
|
-
rx="6"
|
|
4998
|
-
ry="7.5"
|
|
4999
|
-
fill="#505F79"
|
|
5000
|
-
fill-opacity="0.204983"
|
|
5001
|
-
|
|
5002
|
-
</g
|
|
5003
|
-
</g
|
|
5004
|
-
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white"
|
|
5005
|
-
<defs
|
|
5006
|
-
<linearGradient
|
|
5007
|
-
id="paint0_linear_0_12744"
|
|
5008
|
-
x1="13.347"
|
|
5009
|
-
y1="46.279"
|
|
5010
|
-
x2="33.5318"
|
|
5011
|
-
y2="30.8088"
|
|
5012
|
-
gradientUnits="userSpaceOnUse"
|
|
5013
|
-
|
|
5014
|
-
<stop stop-color="#ABD229"
|
|
5015
|
-
<stop offset="1" stop-color="#9CD03F"
|
|
5016
|
-
</linearGradient
|
|
5017
|
-
</defs
|
|
4966
|
+
const avatarGreen = ` <svg
|
|
4967
|
+
width="100%"
|
|
4968
|
+
height="100%"
|
|
4969
|
+
viewBox="0 0 32 32"
|
|
4970
|
+
fill="none"
|
|
4971
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4972
|
+
>
|
|
4973
|
+
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
|
|
4974
|
+
<mask
|
|
4975
|
+
id="mask0_0_12744"
|
|
4976
|
+
style="mask-type: 'alpha';"
|
|
4977
|
+
maskUnits="userSpaceOnUse"
|
|
4978
|
+
x="0"
|
|
4979
|
+
y="0"
|
|
4980
|
+
width="32"
|
|
4981
|
+
height="32"
|
|
4982
|
+
>
|
|
4983
|
+
<circle cx="16" cy="16" r="16" fill="white" />
|
|
4984
|
+
</mask>
|
|
4985
|
+
<g mask="url(#mask0_0_12744)">
|
|
4986
|
+
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
|
|
4987
|
+
<mask
|
|
4988
|
+
id="mask1_0_12744"
|
|
4989
|
+
style="mask-type: 'alpha';"
|
|
4990
|
+
maskUnits="userSpaceOnUse"
|
|
4991
|
+
x="3"
|
|
4992
|
+
y="16"
|
|
4993
|
+
width="26"
|
|
4994
|
+
height="26"
|
|
4995
|
+
>
|
|
4996
|
+
<circle cx="16" cy="29" r="13" fill="white" />
|
|
4997
|
+
</mask>
|
|
4998
|
+
<g mask="url(#mask1_0_12744)">
|
|
4999
|
+
<ellipse
|
|
5000
|
+
cx="16"
|
|
5001
|
+
cy="17.5"
|
|
5002
|
+
rx="6"
|
|
5003
|
+
ry="7.5"
|
|
5004
|
+
fill="#505F79"
|
|
5005
|
+
fill-opacity="0.204983"
|
|
5006
|
+
/>
|
|
5007
|
+
</g>
|
|
5008
|
+
</g>
|
|
5009
|
+
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
|
|
5010
|
+
<defs>
|
|
5011
|
+
<linearGradient
|
|
5012
|
+
id="paint0_linear_0_12744"
|
|
5013
|
+
x1="13.347"
|
|
5014
|
+
y1="46.279"
|
|
5015
|
+
x2="33.5318"
|
|
5016
|
+
y2="30.8088"
|
|
5017
|
+
gradientUnits="userSpaceOnUse"
|
|
5018
|
+
>
|
|
5019
|
+
<stop stop-color="#ABD229" />
|
|
5020
|
+
<stop offset="1" stop-color="#9CD03F" />
|
|
5021
|
+
</linearGradient>
|
|
5022
|
+
</defs>
|
|
5018
5023
|
</svg>`;
|
|
5019
5024
|
var complexIcons = {
|
|
5020
5025
|
avatar: avatarGreen
|
|
@@ -5060,7 +5065,7 @@
|
|
|
5060
5065
|
}
|
|
5061
5066
|
});
|
|
5062
5067
|
};
|
|
5063
|
-
var styles$
|
|
5068
|
+
var styles$J = {
|
|
5064
5069
|
root: {
|
|
5065
5070
|
display: "flex",
|
|
5066
5071
|
alignItems: "center"
|
|
@@ -5123,7 +5128,7 @@
|
|
|
5123
5128
|
};
|
|
5124
5129
|
var Icon = function(param) {
|
|
5125
5130
|
var type = param.type, data = param.data, tweakStyles = param.tweakStyles;
|
|
5126
|
-
var classes = useTheme("Icon", styles$
|
|
5131
|
+
var classes = useTheme("Icon", styles$J, tweakStyles).classes;
|
|
5127
5132
|
return /* @__PURE__ */ jsx("div", _object_spread_props$B(_object_spread$K({
|
|
5128
5133
|
className: classes.root
|
|
5129
5134
|
}, addDataAttributes(data)), {
|
|
@@ -5137,7 +5142,7 @@
|
|
|
5137
5142
|
var ITEM_HORIZONTAL_PADDING = 16;
|
|
5138
5143
|
var ICON_SIZE = 20;
|
|
5139
5144
|
var ICON_GAP = 12;
|
|
5140
|
-
var styles$
|
|
5145
|
+
var styles$I = {
|
|
5141
5146
|
root: {
|
|
5142
5147
|
minWidth: 180,
|
|
5143
5148
|
backgroundColor: colors.CLASSIC_WHITE,
|
|
@@ -5234,7 +5239,7 @@
|
|
|
5234
5239
|
}
|
|
5235
5240
|
var List = function(param) {
|
|
5236
5241
|
var items = param.items, testId = param.testId, data = param.data, tweakStyles = param.tweakStyles, onClick = param.onClick;
|
|
5237
|
-
var classes = useTheme("List", styles$
|
|
5242
|
+
var classes = useTheme("List", styles$I, tweakStyles).classes;
|
|
5238
5243
|
var handleItemClick = function(item) {
|
|
5239
5244
|
item.onClick();
|
|
5240
5245
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
@@ -5331,7 +5336,7 @@
|
|
|
5331
5336
|
}
|
|
5332
5337
|
return target;
|
|
5333
5338
|
}
|
|
5334
|
-
var styles$
|
|
5339
|
+
var styles$H = _object_spread_props$z(_object_spread$I({
|
|
5335
5340
|
root: {
|
|
5336
5341
|
display: "flex"
|
|
5337
5342
|
},
|
|
@@ -5488,7 +5493,7 @@
|
|
|
5488
5493
|
var ANIMATION_TIMEOUT = 150;
|
|
5489
5494
|
var AccountInfo = function(param) {
|
|
5490
5495
|
var data = param.data, avatar = param.avatar, tweakStyles = param.tweakStyles, accountName = param.accountName, options = param.options;
|
|
5491
|
-
var _useTheme = useTheme("AccountInfo", styles$
|
|
5496
|
+
var _useTheme = useTheme("AccountInfo", styles$H, tweakStyles, {
|
|
5492
5497
|
timeout: ANIMATION_TIMEOUT
|
|
5493
5498
|
}), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
5494
5499
|
var nameRef = React.useRef(null);
|
|
@@ -5555,7 +5560,7 @@
|
|
|
5555
5560
|
]
|
|
5556
5561
|
}));
|
|
5557
5562
|
};
|
|
5558
|
-
var styles$
|
|
5563
|
+
var styles$G = {
|
|
5559
5564
|
root: {
|
|
5560
5565
|
display: "flex",
|
|
5561
5566
|
alignItems: "center",
|
|
@@ -5635,7 +5640,7 @@
|
|
|
5635
5640
|
}
|
|
5636
5641
|
var AddButton = function(param) {
|
|
5637
5642
|
var text = param.text, _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, isDisabled = param.isDisabled, onClick = param.onClick, isFullWidth = param.isFullWidth, data = param.data, tweakStyles = param.tweakStyles;
|
|
5638
|
-
var classes = useTheme("AddButton", styles$
|
|
5643
|
+
var classes = useTheme("AddButton", styles$G, tweakStyles).classes;
|
|
5639
5644
|
return /* @__PURE__ */ jsxs("button", _object_spread_props$x(_object_spread$G({
|
|
5640
5645
|
type,
|
|
5641
5646
|
className: clsx(classes.root, isDisabled && classes.disabled, isFullWidth && classes.fullWidth),
|
|
@@ -5655,7 +5660,7 @@
|
|
|
5655
5660
|
]
|
|
5656
5661
|
}));
|
|
5657
5662
|
};
|
|
5658
|
-
var styles$
|
|
5663
|
+
var styles$F = {
|
|
5659
5664
|
root: {
|
|
5660
5665
|
display: "flex",
|
|
5661
5666
|
gap: 4,
|
|
@@ -5700,7 +5705,7 @@
|
|
|
5700
5705
|
};
|
|
5701
5706
|
var DotsPreloader = function(param) {
|
|
5702
5707
|
var tweakStyles = param.tweakStyles;
|
|
5703
|
-
var classes = useTheme("DotsPreloader", styles$
|
|
5708
|
+
var classes = useTheme("DotsPreloader", styles$F, tweakStyles).classes;
|
|
5704
5709
|
return /* @__PURE__ */ jsx("div", {
|
|
5705
5710
|
className: classes.root,
|
|
5706
5711
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -5764,7 +5769,7 @@
|
|
|
5764
5769
|
]
|
|
5765
5770
|
});
|
|
5766
5771
|
};
|
|
5767
|
-
var styles$
|
|
5772
|
+
var styles$E = {
|
|
5768
5773
|
root: {
|
|
5769
5774
|
display: "flex",
|
|
5770
5775
|
width: "100%",
|
|
@@ -5774,7 +5779,7 @@
|
|
|
5774
5779
|
var SvgPreloader = function(param) {
|
|
5775
5780
|
var _param_type = param.type, type = _param_type === void 0 ? "default" : _param_type, tweakStyles = param.tweakStyles;
|
|
5776
5781
|
var _theme_preloaders;
|
|
5777
|
-
var classes = useTheme("SvgPreloader", styles$
|
|
5782
|
+
var classes = useTheme("SvgPreloader", styles$E, tweakStyles).classes;
|
|
5778
5783
|
var theme = React.useContext(ThemeContext).theme;
|
|
5779
5784
|
var _theme_preloaders_type;
|
|
5780
5785
|
var PreloaderIcon = (_theme_preloaders_type = (_theme_preloaders = theme.preloaders) === null || _theme_preloaders === void 0 ? void 0 : _theme_preloaders[type]) !== null && _theme_preloaders_type !== void 0 ? _theme_preloaders_type : DefaultPreloader;
|
|
@@ -5786,7 +5791,7 @@
|
|
|
5786
5791
|
}
|
|
5787
5792
|
}) : /* @__PURE__ */ jsx(PreloaderIcon, {});
|
|
5788
5793
|
};
|
|
5789
|
-
var styles$
|
|
5794
|
+
var styles$D = {
|
|
5790
5795
|
root: {
|
|
5791
5796
|
display: "flex"
|
|
5792
5797
|
},
|
|
@@ -5852,7 +5857,7 @@
|
|
|
5852
5857
|
}
|
|
5853
5858
|
var ThemedPreloader = function(param) {
|
|
5854
5859
|
var _param_type = param.type, type = _param_type === void 0 ? "default" : _param_type, _param_useCurrentColor = param.useCurrentColor, useCurrentColor = _param_useCurrentColor === void 0 ? false : _param_useCurrentColor, data = param.data, tweakStyles = param.tweakStyles;
|
|
5855
|
-
var _useTheme = useTheme("ThemedPreloader", styles$
|
|
5860
|
+
var _useTheme = useTheme("ThemedPreloader", styles$D, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
5856
5861
|
var preloaderComponentStyles = useTweakStyles(componentStyles, tweakStyles, "tweakPreloaderComponent");
|
|
5857
5862
|
return /* @__PURE__ */ jsx("div", _object_spread_props$w(_object_spread$F({
|
|
5858
5863
|
className: clsx(classes.root, classes[type], _define_property$H({}, classes.currentColor, useCurrentColor))
|
|
@@ -5865,7 +5870,7 @@
|
|
|
5865
5870
|
})
|
|
5866
5871
|
}));
|
|
5867
5872
|
};
|
|
5868
|
-
var styles$
|
|
5873
|
+
var styles$C = {
|
|
5869
5874
|
root: {
|
|
5870
5875
|
display: "flex",
|
|
5871
5876
|
justifyContent: "center",
|
|
@@ -6098,7 +6103,7 @@
|
|
|
6098
6103
|
];
|
|
6099
6104
|
var Button = /* @__PURE__ */ React.forwardRef(function(param, ref) {
|
|
6100
6105
|
var _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, children = param.children, _param_size = param.size, size = _param_size === void 0 ? "l" : _param_size, _param_view = param.view, view = _param_view === void 0 ? "primary" : _param_view, _param_isFullWidth = param.isFullWidth, isFullWidth = _param_isFullWidth === void 0 ? false : _param_isFullWidth, _param_isInline = param.isInline, isInline = _param_isInline === void 0 ? false : _param_isInline, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isActive = param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_shouldSkipTabNavigation = param.shouldSkipTabNavigation, shouldSkipTabNavigation = _param_shouldSkipTabNavigation === void 0 ? false : _param_shouldSkipTabNavigation, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, icon = param.icon, _param_iconPosition = param.iconPosition, iconPosition = _param_iconPosition === void 0 ? "left" : _param_iconPosition, _param_preloaderType = param.preloaderType, preloaderType = _param_preloaderType === void 0 ? "dots" : _param_preloaderType, onClick = param.onClick, onMouseDown = param.onMouseDown;
|
|
6101
|
-
var _useTheme = useTheme("Button", styles$
|
|
6106
|
+
var _useTheme = useTheme("Button", styles$C, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
6102
6107
|
var tweakPreloaderStyles = React.useMemo(function() {
|
|
6103
6108
|
return merge$1({}, size === "s" || size === "m" ? dotsPreloaderStyles : void 0, componentStyles.tweakPreloader, tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakPreloader);
|
|
6104
6109
|
}, [
|
|
@@ -6145,7 +6150,7 @@
|
|
|
6145
6150
|
]
|
|
6146
6151
|
}));
|
|
6147
6152
|
});
|
|
6148
|
-
var styles$
|
|
6153
|
+
var styles$B = {
|
|
6149
6154
|
root: {
|
|
6150
6155
|
cursor: "pointer",
|
|
6151
6156
|
display: "flex",
|
|
@@ -6313,7 +6318,7 @@
|
|
|
6313
6318
|
}
|
|
6314
6319
|
function Checkbox(param) {
|
|
6315
6320
|
var children = param.children, isDisabled = param.isDisabled, isReadonly = param.isReadonly, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, value = param.value, _param_size = param.size, size = _param_size === void 0 ? 18 : _param_size, _param_alignItems = param.alignItems, alignItems = _param_alignItems === void 0 ? "center" : _param_alignItems, textMargin = param.textMargin, data = param.data, testId = param.testId, isSemiChecked = param.isSemiChecked, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, tweakStyles = param.tweakStyles, onSelect = param.onSelect;
|
|
6316
|
-
var classes = useTheme("Checkbox", styles$
|
|
6321
|
+
var classes = useTheme("Checkbox", styles$B, tweakStyles, {
|
|
6317
6322
|
size,
|
|
6318
6323
|
alignItems,
|
|
6319
6324
|
textMargin
|
|
@@ -6361,7 +6366,7 @@
|
|
|
6361
6366
|
]
|
|
6362
6367
|
}));
|
|
6363
6368
|
}
|
|
6364
|
-
var styles$
|
|
6369
|
+
var styles$A = {
|
|
6365
6370
|
root: {
|
|
6366
6371
|
width: 40,
|
|
6367
6372
|
height: 40,
|
|
@@ -6440,7 +6445,7 @@
|
|
|
6440
6445
|
}
|
|
6441
6446
|
var CloseButton = function(param) {
|
|
6442
6447
|
var tweakStyles = param.tweakStyles, testId = param.testId, data = param.data, _param_iconType = param.iconType, iconType = _param_iconType === void 0 ? "close" : _param_iconType, onClose = param.onClose;
|
|
6443
|
-
var classes = useTheme("CloseButton", styles$
|
|
6448
|
+
var classes = useTheme("CloseButton", styles$A, tweakStyles).classes;
|
|
6444
6449
|
return /* @__PURE__ */ jsx("button", _object_spread_props$t(_object_spread$C({
|
|
6445
6450
|
type: "button",
|
|
6446
6451
|
className: classes.root,
|
|
@@ -6452,7 +6457,7 @@
|
|
|
6452
6457
|
})
|
|
6453
6458
|
}));
|
|
6454
6459
|
};
|
|
6455
|
-
var styles$
|
|
6460
|
+
var styles$z = {
|
|
6456
6461
|
root: {
|
|
6457
6462
|
display: "flex",
|
|
6458
6463
|
flexWrap: "wrap"
|
|
@@ -6545,7 +6550,7 @@
|
|
|
6545
6550
|
return _array_like_to_array$l(o, minLen);
|
|
6546
6551
|
}
|
|
6547
6552
|
var Colors = function() {
|
|
6548
|
-
var classes = useTheme("Colors", styles$
|
|
6553
|
+
var classes = useTheme("Colors", styles$z).classes;
|
|
6549
6554
|
var theme = React.useContext(ThemeContext).theme;
|
|
6550
6555
|
var _theme_colors = theme.colors, colors2 = _theme_colors === void 0 ? {} : _theme_colors;
|
|
6551
6556
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -6575,7 +6580,7 @@
|
|
|
6575
6580
|
})
|
|
6576
6581
|
});
|
|
6577
6582
|
};
|
|
6578
|
-
var styles$
|
|
6583
|
+
var styles$y = {
|
|
6579
6584
|
"@global html, body": {
|
|
6580
6585
|
fontFamily: "Arial, sans-serif",
|
|
6581
6586
|
color: colors.FONT_MAIN,
|
|
@@ -6614,14 +6619,14 @@
|
|
|
6614
6619
|
}
|
|
6615
6620
|
var CssBaseline = function(param) {
|
|
6616
6621
|
var data = param.data, tweakStyles = param.tweakStyles;
|
|
6617
|
-
var classes = useTheme("CssBaseline", styles$
|
|
6622
|
+
var classes = useTheme("CssBaseline", styles$y, tweakStyles).classes;
|
|
6618
6623
|
return /* @__PURE__ */ jsx("div", _object_spread$B({
|
|
6619
6624
|
className: classes.root
|
|
6620
6625
|
}, addDataAttributes(data)));
|
|
6621
6626
|
};
|
|
6622
6627
|
var PADDING_X$1 = 12;
|
|
6623
6628
|
var AUTOSIZE_MAX_WIDTH = 480;
|
|
6624
|
-
var styles$
|
|
6629
|
+
var styles$x = {
|
|
6625
6630
|
root: {
|
|
6626
6631
|
width: "100%",
|
|
6627
6632
|
boxSizing: "border-box",
|
|
@@ -7144,7 +7149,7 @@
|
|
|
7144
7149
|
var DEFAULT_SIZE = 6;
|
|
7145
7150
|
var Input = /* @__PURE__ */ React.forwardRef(function(param, ref) {
|
|
7146
7151
|
var _param_value = param.value, value = _param_value === void 0 ? "" : _param_value, label = param.label, placeholder = param.placeholder, _param_type = param.type, type = _param_type === void 0 ? "text" : _param_type, isDisabled = param.isDisabled, isReadonly = param.isReadonly, _param_hasFloatingLabel = param.hasFloatingLabel, hasFloatingLabel = _param_hasFloatingLabel === void 0 ? true : _param_hasFloatingLabel, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isActive = param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_isClearable = param.isClearable, isClearable = _param_isClearable === void 0 ? false : _param_isClearable, infoMessage = param.infoMessage, errorMessage = param.errorMessage, _param_errorPosition = param.errorPosition, errorPosition = _param_errorPosition === void 0 ? "bottom" : _param_errorPosition, inlineStyle = param.inlineStyle, border = param.border, isRequired = param.isRequired, isLoading = param.isLoading, isAutoSizeable = param.isAutoSizeable, _param_defaultSize = param.defaultSize, defaultSize = _param_defaultSize === void 0 ? DEFAULT_SIZE : _param_defaultSize, iconType = param.iconType, name = param.name, hasRequiredLabel = param.hasRequiredLabel, data = param.data, tweakStyles = param.tweakStyles, maxLength = param.maxLength, shouldFocusOnMount = param.shouldFocusOnMount, units = param.units, testId = param.testId, tabIndex = param.tabIndex, onChange = param.onChange, onPaste = param.onPaste, onFocus = param.onFocus, onBlur = param.onBlur, onIconClick = param.onIconClick, onKeyDown = param.onKeyDown, mask = param.mask, maskPlaceholder = param.maskPlaceholder, alwaysShowMask = param.alwaysShowMask, beforeMaskedStateChange = param.beforeMaskedStateChange;
|
|
7147
|
-
var _useTheme = useTheme("Input", styles$
|
|
7152
|
+
var _useTheme = useTheme("Input", styles$x, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
7148
7153
|
var _useState = _sliced_to_array$k(React.useState(false), 2), isFocused = _useState[0], setFocused = _useState[1];
|
|
7149
7154
|
var inputRef = React.useRef(null);
|
|
7150
7155
|
var handleChange = function(event) {
|
|
@@ -7285,12 +7290,14 @@
|
|
|
7285
7290
|
]
|
|
7286
7291
|
});
|
|
7287
7292
|
});
|
|
7288
|
-
var
|
|
7293
|
+
var EMPTY_DATE_INPUT_VALUE = "__.__.____";
|
|
7294
|
+
var EMPTY_DATE_RANGE_INPUT_VALUE = "".concat(EMPTY_DATE_INPUT_VALUE, " - ").concat(EMPTY_DATE_INPUT_VALUE);
|
|
7295
|
+
var styles$w = {
|
|
7289
7296
|
root: {
|
|
7290
|
-
cursor: "pointer",
|
|
7291
|
-
position: "relative",
|
|
7292
7297
|
width: "100%",
|
|
7293
|
-
height: "100%"
|
|
7298
|
+
height: "100%",
|
|
7299
|
+
cursor: "pointer",
|
|
7300
|
+
position: "relative"
|
|
7294
7301
|
},
|
|
7295
7302
|
tweakInput: {}
|
|
7296
7303
|
};
|
|
@@ -7378,71 +7385,57 @@
|
|
|
7378
7385
|
}
|
|
7379
7386
|
return target;
|
|
7380
7387
|
}
|
|
7381
|
-
var DateInput = function(_param) {
|
|
7382
|
-
var
|
|
7383
|
-
"isRange",
|
|
7388
|
+
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$8(_param, [
|
|
7384
7390
|
"date",
|
|
7385
7391
|
"startDate",
|
|
7386
7392
|
"endDate",
|
|
7393
|
+
"mask",
|
|
7394
|
+
"className",
|
|
7395
|
+
"placeholder",
|
|
7387
7396
|
"data",
|
|
7388
|
-
"
|
|
7389
|
-
"tweakStyles"
|
|
7397
|
+
"isRange",
|
|
7398
|
+
"tweakStyles",
|
|
7399
|
+
"onClick",
|
|
7400
|
+
"onChange"
|
|
7390
7401
|
]);
|
|
7391
|
-
var _useTheme = useTheme("DateInput", styles$
|
|
7392
|
-
var mainProps = isRange ? {
|
|
7393
|
-
value: "".concat(startDate).concat(endDate),
|
|
7394
|
-
onChange: function(v) {
|
|
7395
|
-
return onChange(v !== "__.__.____ - __.__.____" ? v : "");
|
|
7396
|
-
},
|
|
7397
|
-
mask: "99.99.9999 - 99.99.9999"
|
|
7398
|
-
} : {
|
|
7399
|
-
value: date,
|
|
7400
|
-
onChange: function(v) {
|
|
7401
|
-
return onChange(v !== "__.__.____" ? v : "");
|
|
7402
|
-
},
|
|
7403
|
-
mask: "99.99.9999"
|
|
7404
|
-
};
|
|
7402
|
+
var _useTheme = useTheme("DateInput", styles$w, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
7405
7403
|
var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
|
|
7404
|
+
var beforeMaskedStateChange = function(param) {
|
|
7405
|
+
var nextState = param.nextState;
|
|
7406
|
+
if (nextState.value === EMPTY_DATE_INPUT_VALUE || nextState.value === EMPTY_DATE_RANGE_INPUT_VALUE) {
|
|
7407
|
+
return {
|
|
7408
|
+
value: "",
|
|
7409
|
+
selection: {
|
|
7410
|
+
start: 0,
|
|
7411
|
+
end: 0
|
|
7412
|
+
}
|
|
7413
|
+
};
|
|
7414
|
+
}
|
|
7415
|
+
return nextState;
|
|
7416
|
+
};
|
|
7417
|
+
var handleChange = function(value, event) {
|
|
7418
|
+
if (event.type === "click") {
|
|
7419
|
+
event.target.value = "";
|
|
7420
|
+
}
|
|
7421
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event, value);
|
|
7422
|
+
};
|
|
7406
7423
|
return /* @__PURE__ */ jsx("div", _object_spread_props$r(_object_spread$z({
|
|
7407
|
-
className: classes.root
|
|
7424
|
+
className: clsx(classes.root, className),
|
|
7425
|
+
onClick
|
|
7408
7426
|
}, addDataAttributes(data)), {
|
|
7409
|
-
children: /* @__PURE__ */ jsx(Input, _object_spread_props$r(_object_spread$z({},
|
|
7410
|
-
|
|
7427
|
+
children: /* @__PURE__ */ jsx(Input, _object_spread_props$r(_object_spread$z({}, inputProps), {
|
|
7428
|
+
ref,
|
|
7429
|
+
value: isRange ? "".concat(startDate).concat(endDate) : date,
|
|
7430
|
+
mask: mask !== null && mask !== void 0 ? mask : isRange ? "99.99.9999 - 99.99.9999" : "99.99.9999",
|
|
7431
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : isRange ? EMPTY_DATE_RANGE_INPUT_VALUE : EMPTY_DATE_INPUT_VALUE,
|
|
7432
|
+
tweakStyles: tweakInputStyles,
|
|
7433
|
+
onChange: handleChange,
|
|
7434
|
+
beforeMaskedStateChange
|
|
7411
7435
|
}))
|
|
7412
7436
|
}));
|
|
7413
|
-
};
|
|
7414
|
-
const reactDatepicker = "";
|
|
7415
|
-
var styles$w = {
|
|
7416
|
-
customInput: {
|
|
7417
|
-
width: "100%",
|
|
7418
|
-
height: "100%"
|
|
7419
|
-
},
|
|
7420
|
-
s: {
|
|
7421
|
-
width: 184,
|
|
7422
|
-
height: "100%"
|
|
7423
|
-
},
|
|
7424
|
-
m: {
|
|
7425
|
-
width: 300,
|
|
7426
|
-
height: "100%"
|
|
7427
|
-
},
|
|
7428
|
-
full: {
|
|
7429
|
-
width: "100%",
|
|
7430
|
-
height: "100%"
|
|
7431
|
-
}
|
|
7432
|
-
};
|
|
7433
|
-
var DatePickerInput = /* @__PURE__ */ React.forwardRef(function(param, ref) {
|
|
7434
|
-
var onClick = param.onClick, children = param.children, _param_size = param.size, size = _param_size === void 0 ? "full" : _param_size, className = param.className;
|
|
7435
|
-
var classes = useTheme("DatePickerInput", styles$w).classes;
|
|
7436
|
-
return /* @__PURE__ */ jsx("div", {
|
|
7437
|
-
className: clsx(classes.customInput, className),
|
|
7438
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
7439
|
-
className: classes[size],
|
|
7440
|
-
onClick,
|
|
7441
|
-
ref,
|
|
7442
|
-
children
|
|
7443
|
-
})
|
|
7444
|
-
});
|
|
7445
7437
|
});
|
|
7438
|
+
const reactDatepicker = "";
|
|
7446
7439
|
function _assert_this_initialized(self2) {
|
|
7447
7440
|
if (self2 === void 0) {
|
|
7448
7441
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -8830,11 +8823,17 @@
|
|
|
8830
8823
|
]
|
|
8831
8824
|
});
|
|
8832
8825
|
React.useEffect(function() {
|
|
8833
|
-
var val = isMultiSelect ? value === null || value === void 0 ? void 0 : value[0] : value;
|
|
8834
8826
|
var _optionsIndexesForNavigation_find;
|
|
8835
8827
|
setFocusedListCellIndex((_optionsIndexesForNavigation_find = optionsIndexesForNavigation.find(function(index) {
|
|
8836
|
-
return filteredOptions[index] ===
|
|
8828
|
+
return isNotEmpty(strValue) && isNotEmpty(filteredOptions[index]) && convertToId(filteredOptions[index]) === convertToId(strValue);
|
|
8837
8829
|
})) !== null && _optionsIndexesForNavigation_find !== void 0 ? _optionsIndexesForNavigation_find : optionsIndexesForNavigation[0]);
|
|
8830
|
+
}, [
|
|
8831
|
+
strValue,
|
|
8832
|
+
filteredOptions,
|
|
8833
|
+
optionsIndexesForNavigation,
|
|
8834
|
+
convertToId
|
|
8835
|
+
]);
|
|
8836
|
+
React.useEffect(function() {
|
|
8838
8837
|
if (isOpen) {
|
|
8839
8838
|
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
8840
8839
|
}
|
|
@@ -9007,20 +9006,13 @@
|
|
|
9007
9006
|
}
|
|
9008
9007
|
};
|
|
9009
9008
|
var DatePickerHeader = function(param) {
|
|
9010
|
-
var date = param.date,
|
|
9009
|
+
var date = param.date, _param_months = param.months, months = _param_months === void 0 ? [] : _param_months, prevMonthButtonDisabled = param.prevMonthButtonDisabled, nextMonthButtonDisabled = param.nextMonthButtonDisabled, changeYear = param.changeYear, changeMonth = param.changeMonth, decreaseMonth = param.decreaseMonth, increaseMonth = param.increaseMonth;
|
|
9011
9010
|
var _useTheme = useTheme("DatePickerHeader", styles$s), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
9012
9011
|
var years = React.useMemo(function() {
|
|
9013
9012
|
return Array.from(Array(41)).map(function(_, i) {
|
|
9014
9013
|
return dateFns.getYear(new Date()) - 30 + i;
|
|
9015
9014
|
});
|
|
9016
9015
|
}, []);
|
|
9017
|
-
var getMonthNumber = React.useCallback(function(month) {
|
|
9018
|
-
return months.findIndex(function(m) {
|
|
9019
|
-
return m === month;
|
|
9020
|
-
});
|
|
9021
|
-
}, [
|
|
9022
|
-
months
|
|
9023
|
-
]);
|
|
9024
9016
|
return /* @__PURE__ */ jsxs("div", {
|
|
9025
9017
|
className: classes.header,
|
|
9026
9018
|
children: [
|
|
@@ -9036,11 +9028,11 @@
|
|
|
9036
9028
|
children: /* @__PURE__ */ jsx(Select, {
|
|
9037
9029
|
value: months[dateFns.getMonth(date)],
|
|
9038
9030
|
options: months,
|
|
9039
|
-
|
|
9040
|
-
return changeMonth(getMonthNumber(value));
|
|
9041
|
-
},
|
|
9031
|
+
dropdownIcon: "chevron-down-small",
|
|
9042
9032
|
tweakStyles: componentStyles.tweakSelect,
|
|
9043
|
-
|
|
9033
|
+
onChange: function(value) {
|
|
9034
|
+
return changeMonth(months.indexOf(value));
|
|
9035
|
+
}
|
|
9044
9036
|
})
|
|
9045
9037
|
})
|
|
9046
9038
|
]
|
|
@@ -9057,11 +9049,11 @@
|
|
|
9057
9049
|
children: /* @__PURE__ */ jsx(Select, {
|
|
9058
9050
|
value: dateFns.getYear(date),
|
|
9059
9051
|
options: years,
|
|
9060
|
-
|
|
9061
|
-
changeYear(value);
|
|
9062
|
-
},
|
|
9052
|
+
dropdownIcon: "chevron-down-small",
|
|
9063
9053
|
tweakStyles: componentStyles.tweakSelect,
|
|
9064
|
-
|
|
9054
|
+
onChange: function(value) {
|
|
9055
|
+
return changeYear(value);
|
|
9056
|
+
}
|
|
9065
9057
|
})
|
|
9066
9058
|
})
|
|
9067
9059
|
]
|
|
@@ -9070,19 +9062,19 @@
|
|
|
9070
9062
|
className: classes.buttons,
|
|
9071
9063
|
children: [
|
|
9072
9064
|
/* @__PURE__ */ jsx("button", {
|
|
9073
|
-
onClick: decreaseMonth,
|
|
9074
|
-
disabled: isPrevMonthButtonDisabled,
|
|
9075
|
-
className: classes.btn,
|
|
9076
9065
|
type: "button",
|
|
9066
|
+
className: classes.btn,
|
|
9067
|
+
disabled: prevMonthButtonDisabled,
|
|
9068
|
+
onClick: decreaseMonth,
|
|
9077
9069
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
9078
9070
|
type: "chevron-left"
|
|
9079
9071
|
})
|
|
9080
9072
|
}),
|
|
9081
9073
|
/* @__PURE__ */ jsx("button", {
|
|
9082
|
-
onClick: increaseMonth,
|
|
9083
|
-
disabled: isNextMonthButtonDisabled,
|
|
9084
|
-
className: classes.btn,
|
|
9085
9074
|
type: "button",
|
|
9075
|
+
className: classes.btn,
|
|
9076
|
+
disabled: nextMonthButtonDisabled,
|
|
9077
|
+
onClick: increaseMonth,
|
|
9086
9078
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
9087
9079
|
type: "chevron-right"
|
|
9088
9080
|
})
|
|
@@ -9092,43 +9084,38 @@
|
|
|
9092
9084
|
]
|
|
9093
9085
|
});
|
|
9094
9086
|
};
|
|
9087
|
+
var getDateFormatter = function(dateFormat) {
|
|
9088
|
+
return function(date) {
|
|
9089
|
+
return isNotEmpty(date) ? dateFns.format(date, dateFormat) : "";
|
|
9090
|
+
};
|
|
9091
|
+
};
|
|
9092
|
+
var getDateValueParser = function(dateFormat) {
|
|
9093
|
+
return function(value) {
|
|
9094
|
+
var inputValue = value === EMPTY_DATE_INPUT_VALUE ? "" : value;
|
|
9095
|
+
return isStringNotEmpty(inputValue) ? dateFns.parse(value, dateFormat, new Date()) : null;
|
|
9096
|
+
};
|
|
9097
|
+
};
|
|
9098
|
+
var areDatesEquals = function(date1, date2) {
|
|
9099
|
+
return isEmpty(date1) && isEmpty(date2) || isNotEmpty(date1) && isNotEmpty(date2) && dateFns.isSameDay(date1, date2);
|
|
9100
|
+
};
|
|
9101
|
+
var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
|
|
9095
9102
|
var styles$r = {
|
|
9096
9103
|
root: {
|
|
9097
9104
|
width: "100%",
|
|
9098
9105
|
height: "100%"
|
|
9099
9106
|
},
|
|
9100
|
-
day: {
|
|
9101
|
-
|
|
9102
|
-
height: 36,
|
|
9103
|
-
lineHeight: "normal",
|
|
9104
|
-
boxSizing: "border-box",
|
|
9105
|
-
paddingTop: 10,
|
|
9106
|
-
fontSize: 16
|
|
9107
|
-
},
|
|
9108
|
-
datepicker: {
|
|
9109
|
-
display: "flex",
|
|
9110
|
-
padding: [
|
|
9111
|
-
4,
|
|
9112
|
-
8,
|
|
9113
|
-
20,
|
|
9114
|
-
8
|
|
9115
|
-
],
|
|
9116
|
-
width: 320,
|
|
9117
|
-
boxSizing: "border-box"
|
|
9118
|
-
},
|
|
9119
|
-
btnText: {
|
|
9120
|
-
marginLeft: "auto"
|
|
9121
|
-
},
|
|
9107
|
+
day: {},
|
|
9108
|
+
datepicker: {},
|
|
9122
9109
|
popper: {
|
|
9123
9110
|
zIndex: 10,
|
|
9124
|
-
marginLeft: function(param) {
|
|
9125
|
-
var leftPosition = param.leftPosition;
|
|
9126
|
-
return leftPosition;
|
|
9127
|
-
},
|
|
9128
9111
|
marginTop: function(param) {
|
|
9129
9112
|
var topPosition = param.topPosition;
|
|
9130
9113
|
return topPosition;
|
|
9131
9114
|
},
|
|
9115
|
+
marginLeft: function(param) {
|
|
9116
|
+
var leftPosition = param.leftPosition;
|
|
9117
|
+
return leftPosition;
|
|
9118
|
+
},
|
|
9132
9119
|
'&[data-placement^="bottom"]': {
|
|
9133
9120
|
paddingTop: 6
|
|
9134
9121
|
},
|
|
@@ -9141,7 +9128,8 @@
|
|
|
9141
9128
|
'&[data-placement^="right"]': {
|
|
9142
9129
|
paddingLeft: 6
|
|
9143
9130
|
}
|
|
9144
|
-
}
|
|
9131
|
+
},
|
|
9132
|
+
tweakDateInput: {}
|
|
9145
9133
|
};
|
|
9146
9134
|
function _array_like_to_array$i(arr, len) {
|
|
9147
9135
|
if (len == null || len > arr.length)
|
|
@@ -9285,8 +9273,8 @@
|
|
|
9285
9273
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
9286
9274
|
return _array_like_to_array$i(o, minLen);
|
|
9287
9275
|
}
|
|
9288
|
-
var
|
|
9289
|
-
var
|
|
9276
|
+
var _ReactDatePicker_default;
|
|
9277
|
+
var DatePickerComponent = (_ReactDatePicker_default = ReactDatePicker.default) !== null && _ReactDatePicker_default !== void 0 ? _ReactDatePicker_default : ReactDatePicker;
|
|
9290
9278
|
var PopperContainer = function(param) {
|
|
9291
9279
|
var children = param.children;
|
|
9292
9280
|
return /* @__PURE__ */ jsx(reactOverlays.Portal, {
|
|
@@ -9294,257 +9282,240 @@
|
|
|
9294
9282
|
children
|
|
9295
9283
|
});
|
|
9296
9284
|
};
|
|
9297
|
-
var
|
|
9298
|
-
|
|
9299
|
-
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, [
|
|
9285
|
+
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, 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$4(_param, [
|
|
9300
9287
|
"data",
|
|
9301
|
-
"tweakStyles",
|
|
9302
9288
|
"selectedDate",
|
|
9303
9289
|
"minDate",
|
|
9304
9290
|
"maxDate",
|
|
9305
9291
|
"endDate",
|
|
9306
9292
|
"startDate",
|
|
9307
|
-
"size",
|
|
9308
|
-
"isRange",
|
|
9309
9293
|
"locale",
|
|
9310
9294
|
"months",
|
|
9311
|
-
"calendarStartDay",
|
|
9312
|
-
"leftPosition",
|
|
9313
9295
|
"topPosition",
|
|
9314
|
-
"
|
|
9315
|
-
"
|
|
9296
|
+
"leftPosition",
|
|
9297
|
+
"calendarStartDay",
|
|
9316
9298
|
"dateFormat",
|
|
9317
9299
|
"monthsShown",
|
|
9318
9300
|
"placeholder",
|
|
9319
|
-
"
|
|
9301
|
+
"isRange",
|
|
9302
|
+
"isInline",
|
|
9303
|
+
"isDisabled",
|
|
9304
|
+
"isClearable",
|
|
9305
|
+
"focusSelectedMonth",
|
|
9320
9306
|
"disabledKeyboardNavigation",
|
|
9321
9307
|
"shouldRenderPopperInBody",
|
|
9322
|
-
"
|
|
9308
|
+
"allowSameDay",
|
|
9309
|
+
"shouldCloseOnSelect",
|
|
9323
9310
|
"showPreviousMonths",
|
|
9311
|
+
"preventOpenOnFocus",
|
|
9312
|
+
"popperModifiers",
|
|
9324
9313
|
"popperPlacement",
|
|
9314
|
+
"todayButton",
|
|
9315
|
+
"calendarContainer",
|
|
9316
|
+
"dayClassName",
|
|
9317
|
+
"customInput",
|
|
9318
|
+
"customInputRef",
|
|
9319
|
+
"renderCustomHeader",
|
|
9320
|
+
"filterDate",
|
|
9321
|
+
"onYearChange",
|
|
9322
|
+
"onMonthChange",
|
|
9323
|
+
"onCalendarOpen",
|
|
9324
|
+
"onCalendarClose",
|
|
9325
9325
|
"onChangeDate",
|
|
9326
9326
|
"onChangeRange",
|
|
9327
|
-
"
|
|
9328
|
-
"
|
|
9327
|
+
"onBlur",
|
|
9328
|
+
"onFocus",
|
|
9329
|
+
"onKeyDown",
|
|
9330
|
+
"tweakStyles"
|
|
9329
9331
|
]);
|
|
9330
|
-
var
|
|
9332
|
+
var _useTheme = useTheme("DatePicker", styles$r, tweakStyles, {
|
|
9331
9333
|
leftPosition,
|
|
9332
9334
|
topPosition
|
|
9333
|
-
}).classes;
|
|
9335
|
+
}), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
9336
|
+
var tweakDateInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakDateInput");
|
|
9337
|
+
var _useMemo = React.useMemo(function() {
|
|
9338
|
+
return {
|
|
9339
|
+
formatDate: getDateFormatter(dateFormat),
|
|
9340
|
+
parseDateValue: getDateValueParser(dateFormat)
|
|
9341
|
+
};
|
|
9342
|
+
}, [
|
|
9343
|
+
dateFormat
|
|
9344
|
+
]), formatDate = _useMemo.formatDate, parseDateValue = _useMemo.parseDateValue;
|
|
9334
9345
|
var _useState = _sliced_to_array$i(React.useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
9335
|
-
var _useState1 = _sliced_to_array$i(React.useState(selectedDate), 2),
|
|
9336
|
-
var _useState2 = _sliced_to_array$i(React.useState(
|
|
9337
|
-
var _useState3 = _sliced_to_array$i(React.useState(startDate), 2),
|
|
9346
|
+
var _useState1 = _sliced_to_array$i(React.useState(formatDate(selectedDate)), 2), dateValue = _useState1[0], setDateValue = _useState1[1];
|
|
9347
|
+
var _useState2 = _sliced_to_array$i(React.useState(startDate), 2), start2 = _useState2[0], setStart = _useState2[1];
|
|
9348
|
+
var _useState3 = _sliced_to_array$i(React.useState(formatDate(startDate)), 2), startDateValue = _useState3[0], setStartDateValue = _useState3[1];
|
|
9338
9349
|
var _useState4 = _sliced_to_array$i(React.useState(endDate), 2), end2 = _useState4[0], setEnd = _useState4[1];
|
|
9339
|
-
var _useState5 = _sliced_to_array$i(React.useState(
|
|
9340
|
-
var
|
|
9341
|
-
var
|
|
9342
|
-
|
|
9350
|
+
var _useState5 = _sliced_to_array$i(React.useState(formatDate(endDate)), 2), endDateValue = _useState5[0], setEndDateValue = _useState5[1];
|
|
9351
|
+
var hasDateInputValue = isRange ? isStringNotEmpty(startDateValue) || isStringNotEmpty(endDateValue) : isStringNotEmpty(dateValue);
|
|
9352
|
+
var dateInputProps = _object_spread$t(_object_spread_props$n(_object_spread$t({}, inputProps), {
|
|
9353
|
+
isRange,
|
|
9354
|
+
isDisabled,
|
|
9355
|
+
isClearable,
|
|
9356
|
+
isActive: isOpen,
|
|
9357
|
+
iconType: isClearable && hasDateInputValue ? void 0 : "calendar",
|
|
9358
|
+
tweakStyles: tweakDateInputStyles
|
|
9359
|
+
}), isRange ? {
|
|
9360
|
+
startDate: startDateValue,
|
|
9361
|
+
endDate: endDateValue
|
|
9362
|
+
} : {
|
|
9363
|
+
date: dateValue
|
|
9364
|
+
});
|
|
9365
|
+
var handleChangeDate = function(value, event) {
|
|
9366
|
+
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(value, event);
|
|
9343
9367
|
};
|
|
9344
|
-
var
|
|
9345
|
-
return dateFns.
|
|
9368
|
+
var isDateInRange = function(date) {
|
|
9369
|
+
return (isEmpty(minDate) || dateFns.isAfter(date, minDate)) && (isEmpty(maxDate) || dateFns.isBefore(date, maxDate));
|
|
9346
9370
|
};
|
|
9347
|
-
var
|
|
9348
|
-
if (
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
}
|
|
9371
|
+
var handleChangeRange = function(value, event) {
|
|
9372
|
+
if (allowSameDay || !areDatesEquals(value === null || value === void 0 ? void 0 : value[0], startDate) || !areDatesEquals(value === null || value === void 0 ? void 0 : value[1], endDate)) {
|
|
9373
|
+
var _value_;
|
|
9374
|
+
setStart((_value_ = value === null || value === void 0 ? void 0 : value[0]) !== null && _value_ !== void 0 ? _value_ : null);
|
|
9375
|
+
var _value_1;
|
|
9376
|
+
setEnd((_value_1 = value === null || value === void 0 ? void 0 : value[1]) !== null && _value_1 !== void 0 ? _value_1 : null);
|
|
9377
|
+
onChangeRange === null || onChangeRange === void 0 ? void 0 : onChangeRange(value, event);
|
|
9355
9378
|
}
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
}
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9379
|
+
};
|
|
9380
|
+
var handleChangeDateRangeInput = function(value) {
|
|
9381
|
+
var newStartDateValue = value.slice(0, 10);
|
|
9382
|
+
var newStart = parseDateValue(newStartDateValue);
|
|
9383
|
+
var newEndDateValue = value.slice(13);
|
|
9384
|
+
var newEnd = parseDateValue(newEndDateValue);
|
|
9385
|
+
if (isNotEmpty(newStart) && !dateFns.isValid(newStart) || isNotEmpty(newStart) && !isDateInRange(newStart)) {
|
|
9386
|
+
newStart = start2;
|
|
9387
|
+
}
|
|
9388
|
+
if (isNotEmpty(newEnd) && !dateFns.isValid(newEnd) || isNotEmpty(newEnd) && !isDateInRange(newEnd)) {
|
|
9389
|
+
newEnd = end2;
|
|
9390
|
+
}
|
|
9391
|
+
if (isEmpty(newStart) && dateFns.isValid(newEnd) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9392
|
+
dateFns.isValid(newStart) && dateFns.isValid(newEnd) && dateFns.isAfter(newStart, newEnd)) {
|
|
9393
|
+
newStart = newEnd;
|
|
9394
|
+
newEnd = null;
|
|
9395
|
+
}
|
|
9396
|
+
setStartDateValue(newStartDateValue);
|
|
9397
|
+
setStart(newStart);
|
|
9398
|
+
setEndDateValue(newEndDateValue);
|
|
9399
|
+
setEnd(newEnd);
|
|
9400
|
+
};
|
|
9401
|
+
var handleDateInputBlur = function(event) {
|
|
9402
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
9403
|
+
setDateValue(formatDate(selectedDate));
|
|
9404
|
+
};
|
|
9405
|
+
var setDateRangeValues = function() {
|
|
9406
|
+
var startValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, endValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
9407
|
+
var convertedStartDate = formatDate(startValue);
|
|
9408
|
+
var convertedEndDate = formatDate(endValue);
|
|
9409
|
+
if (convertedStartDate === "" && convertedEndDate !== "") {
|
|
9410
|
+
convertedStartDate = EMPTY_DATE_INPUT_VALUE;
|
|
9411
|
+
}
|
|
9412
|
+
setStart(startValue);
|
|
9413
|
+
setStartDateValue(convertedStartDate);
|
|
9414
|
+
setEnd(endValue);
|
|
9415
|
+
setEndDateValue(convertedEndDate);
|
|
9416
|
+
};
|
|
9417
|
+
var handleDateRangeInputBlur = function(event) {
|
|
9418
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
9419
|
+
handleChangeRange([
|
|
9420
|
+
start2,
|
|
9421
|
+
end2
|
|
9422
|
+
], event);
|
|
9423
|
+
setDateRangeValues(start2, end2);
|
|
9424
|
+
};
|
|
9425
|
+
var handleOpenCalendar = function() {
|
|
9426
|
+
setIsOpen(true);
|
|
9427
|
+
onCalendarOpen === null || onCalendarOpen === void 0 ? void 0 : onCalendarOpen();
|
|
9428
|
+
};
|
|
9429
|
+
var handleCloseCalendar = function() {
|
|
9430
|
+
setIsOpen(false);
|
|
9431
|
+
if (isRange) {
|
|
9432
|
+
handleChangeRange([
|
|
9433
|
+
start2,
|
|
9434
|
+
end2
|
|
9380
9435
|
]);
|
|
9436
|
+
setDateRangeValues(start2, end2);
|
|
9437
|
+
} else {
|
|
9438
|
+
setDateValue(formatDate(selectedDate));
|
|
9381
9439
|
}
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
]);
|
|
9385
|
-
React.useEffect(function() {
|
|
9386
|
-
setDateValue("");
|
|
9387
|
-
}, [
|
|
9388
|
-
isNeedClearSelectedDate
|
|
9389
|
-
]);
|
|
9440
|
+
onCalendarClose === null || onCalendarClose === void 0 ? void 0 : onCalendarClose();
|
|
9441
|
+
};
|
|
9390
9442
|
React.useEffect(function() {
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
setEnd(endDate);
|
|
9394
|
-
setStartDateValue(startDate ? dateFns.format(startDate, dateFormat) : "");
|
|
9395
|
-
setEndDateValue(endDate ? dateFns.format(endDate, dateFormat) : "");
|
|
9396
|
-
setDateValue(selectedDate ? dateFns.format(selectedDate, dateFormat) : "");
|
|
9443
|
+
setDateValue(formatDate(selectedDate));
|
|
9444
|
+
setDateRangeValues(startDate, endDate);
|
|
9397
9445
|
}, [
|
|
9398
9446
|
selectedDate,
|
|
9399
9447
|
startDate,
|
|
9400
9448
|
endDate
|
|
9401
9449
|
]);
|
|
9402
|
-
var onTabConfirm = function(event) {
|
|
9403
|
-
if (event.key === "9") {
|
|
9404
|
-
setIsOpen(false);
|
|
9405
|
-
}
|
|
9406
|
-
};
|
|
9407
|
-
React.useEffect(function() {
|
|
9408
|
-
document.addEventListener("keydown", onTabConfirm);
|
|
9409
|
-
return function() {
|
|
9410
|
-
return document.removeEventListener("keydown", onTabConfirm);
|
|
9411
|
-
};
|
|
9412
|
-
}, []);
|
|
9413
|
-
var handleBlur = function(e) {
|
|
9414
|
-
if (inputProps.onBlur) {
|
|
9415
|
-
inputProps.onBlur(e);
|
|
9416
|
-
}
|
|
9417
|
-
if (shouldGiveValueOnType && onChangeDate && !isDateValid(dateValue)) {
|
|
9418
|
-
onChangeDate(null, dateValue);
|
|
9419
|
-
return;
|
|
9420
|
-
}
|
|
9421
|
-
if (onChangeDate && date) {
|
|
9422
|
-
if (!isDateValid(dateValue)) {
|
|
9423
|
-
onChangeDate(null);
|
|
9424
|
-
setDateValue("");
|
|
9425
|
-
} else if (maxDate && dateFns.isAfter(date, maxDate)) {
|
|
9426
|
-
onChangeDate(maxDate);
|
|
9427
|
-
} else if (minDate && dateFns.isAfter(minDate, date)) {
|
|
9428
|
-
onChangeDate(minDate);
|
|
9429
|
-
}
|
|
9430
|
-
}
|
|
9431
|
-
};
|
|
9432
|
-
var handleRangeBlur = function(e) {
|
|
9433
|
-
if (inputProps.onBlur) {
|
|
9434
|
-
inputProps.onBlur(e);
|
|
9435
|
-
}
|
|
9436
|
-
if (onChangeRange && start2 && end2) {
|
|
9437
|
-
if (!isDateValid(startDateValue) && endDateValue) {
|
|
9438
|
-
setStartDateValue(placeholder);
|
|
9439
|
-
}
|
|
9440
|
-
if (!isDateValid(endDateValue)) {
|
|
9441
|
-
setEndDateValue("");
|
|
9442
|
-
} else if (maxDate && dateFns.isAfter(start2, maxDate)) {
|
|
9443
|
-
onChangeRange([
|
|
9444
|
-
maxDate,
|
|
9445
|
-
end2
|
|
9446
|
-
]);
|
|
9447
|
-
} else if (minDate && dateFns.isAfter(minDate, end2)) {
|
|
9448
|
-
onChangeRange([
|
|
9449
|
-
start2,
|
|
9450
|
-
start2
|
|
9451
|
-
]);
|
|
9452
|
-
}
|
|
9453
|
-
}
|
|
9454
|
-
};
|
|
9455
|
-
var datePickerProps = {
|
|
9456
|
-
dateFormat,
|
|
9457
|
-
calendarStartDay,
|
|
9458
|
-
locale: locale2,
|
|
9459
|
-
popperModifiers,
|
|
9460
|
-
popperPlacement,
|
|
9461
|
-
monthsShown,
|
|
9462
|
-
showPreviousMonths,
|
|
9463
|
-
disabledKeyboardNavigation,
|
|
9464
|
-
inline: isInline,
|
|
9465
|
-
disabled: inputProps.isDisabled,
|
|
9466
|
-
showPopperArrow: false,
|
|
9467
|
-
popperClassName: classes.popper,
|
|
9468
|
-
calendarClassName: classes.datepicker,
|
|
9469
|
-
popperContainer: shouldRenderPopperInBody ? PopperContainer : void 0,
|
|
9470
|
-
selectsRange: isRange,
|
|
9471
|
-
onChange: function() {
|
|
9472
|
-
return null;
|
|
9473
|
-
},
|
|
9474
|
-
dayClassName: function() {
|
|
9475
|
-
return classes.day;
|
|
9476
|
-
},
|
|
9477
|
-
filterDate
|
|
9478
|
-
};
|
|
9479
|
-
var dateInputProps = _object_spread_props$n(_object_spread$t({}, inputProps), {
|
|
9480
|
-
tweakStyles,
|
|
9481
|
-
iconType: inputProps.isClearable && dateValue !== "" ? void 0 : "calendar",
|
|
9482
|
-
isRange,
|
|
9483
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9484
|
-
onChange: function() {
|
|
9485
|
-
}
|
|
9486
|
-
});
|
|
9487
|
-
if (onChangeRange) {
|
|
9488
|
-
datePickerProps = _object_spread_props$n(_object_spread$t({}, datePickerProps), {
|
|
9489
|
-
startDate: start2,
|
|
9490
|
-
endDate: end2,
|
|
9491
|
-
selectsRange: true,
|
|
9492
|
-
selected: startDate,
|
|
9493
|
-
onChange: onChangeRange
|
|
9494
|
-
});
|
|
9495
|
-
dateInputProps = _object_spread_props$n(_object_spread$t({}, dateInputProps), {
|
|
9496
|
-
startDate: startDateValue,
|
|
9497
|
-
endDate: endDateValue,
|
|
9498
|
-
onBlur: handleRangeBlur,
|
|
9499
|
-
onChange: handleRangeChange
|
|
9500
|
-
});
|
|
9501
|
-
}
|
|
9502
|
-
if (onChangeDate) {
|
|
9503
|
-
datePickerProps = _object_spread_props$n(_object_spread$t({}, datePickerProps), {
|
|
9504
|
-
selected: date,
|
|
9505
|
-
onChange: function(newDate) {
|
|
9506
|
-
return onChangeDate(newDate);
|
|
9507
|
-
},
|
|
9508
|
-
onCalendarOpen: function() {
|
|
9509
|
-
return setIsOpen(true);
|
|
9510
|
-
},
|
|
9511
|
-
onCalendarClose: function() {
|
|
9512
|
-
return setIsOpen(false);
|
|
9513
|
-
},
|
|
9514
|
-
minDate,
|
|
9515
|
-
maxDate
|
|
9516
|
-
});
|
|
9517
|
-
dateInputProps = _object_spread_props$n(_object_spread$t({}, dateInputProps), {
|
|
9518
|
-
date: dateValue,
|
|
9519
|
-
isActive: isOpen,
|
|
9520
|
-
onBlur: handleBlur,
|
|
9521
|
-
onChange: handleDateChange
|
|
9522
|
-
});
|
|
9523
|
-
}
|
|
9524
9450
|
return /* @__PURE__ */ jsx("div", _object_spread_props$n(_object_spread$t({
|
|
9525
9451
|
className: classes.root
|
|
9526
9452
|
}, addDataAttributes(data)), {
|
|
9527
|
-
children: /* @__PURE__ */ jsx(
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9453
|
+
children: /* @__PURE__ */ jsx(DatePickerComponent, _object_spread$t({
|
|
9454
|
+
ref,
|
|
9455
|
+
minDate,
|
|
9456
|
+
maxDate,
|
|
9457
|
+
locale: locale2,
|
|
9458
|
+
dateFormat,
|
|
9459
|
+
placeholderText: placeholder,
|
|
9460
|
+
calendarStartDay,
|
|
9461
|
+
inline: isInline,
|
|
9462
|
+
disabled: isDisabled,
|
|
9463
|
+
showPreviousMonths,
|
|
9464
|
+
focusSelectedMonth,
|
|
9465
|
+
monthsShown,
|
|
9466
|
+
allowSameDay,
|
|
9467
|
+
showPopperArrow: false,
|
|
9468
|
+
popperClassName: classes.popper,
|
|
9469
|
+
calendarClassName: classes.datepicker,
|
|
9470
|
+
dayClassName: function(v) {
|
|
9471
|
+
return clsx(classes.day, dayClassName === null || dayClassName === void 0 ? void 0 : dayClassName(v));
|
|
9472
|
+
},
|
|
9473
|
+
disabledKeyboardNavigation,
|
|
9474
|
+
popperContainer: shouldRenderPopperInBody ? PopperContainer : void 0,
|
|
9475
|
+
popperModifiers,
|
|
9476
|
+
popperPlacement,
|
|
9477
|
+
selectsRange: isRange,
|
|
9478
|
+
preventOpenOnFocus,
|
|
9479
|
+
shouldCloseOnSelect,
|
|
9480
|
+
customInputRef,
|
|
9481
|
+
customInput: /* @__PURE__ */ jsx(CustomInput, _object_spread$t({}, dateInputProps)),
|
|
9482
|
+
renderCustomHeader: renderCustomHeader !== null && renderCustomHeader !== void 0 ? renderCustomHeader : function(baseProps) {
|
|
9483
|
+
return /* @__PURE__ */ jsx(DatePickerHeader, _object_spread_props$n(_object_spread$t({}, baseProps), {
|
|
9542
9484
|
months
|
|
9543
|
-
});
|
|
9485
|
+
}));
|
|
9486
|
+
},
|
|
9487
|
+
todayButton,
|
|
9488
|
+
calendarContainer,
|
|
9489
|
+
filterDate,
|
|
9490
|
+
onYearChange,
|
|
9491
|
+
onMonthChange,
|
|
9492
|
+
onFocus,
|
|
9493
|
+
onKeyDown,
|
|
9494
|
+
onCalendarOpen: handleOpenCalendar,
|
|
9495
|
+
onCalendarClose: handleCloseCalendar,
|
|
9496
|
+
onChangeRaw: function(_, value) {
|
|
9497
|
+
if (value === void 0) {
|
|
9498
|
+
return;
|
|
9499
|
+
}
|
|
9500
|
+
if (isRange) {
|
|
9501
|
+
handleChangeDateRangeInput(value);
|
|
9502
|
+
} else {
|
|
9503
|
+
setDateValue(value);
|
|
9504
|
+
}
|
|
9544
9505
|
}
|
|
9506
|
+
}, isRange ? {
|
|
9507
|
+
startDate: start2,
|
|
9508
|
+
endDate: end2,
|
|
9509
|
+
selected: start2,
|
|
9510
|
+
onBlur: handleDateRangeInputBlur,
|
|
9511
|
+
onChange: handleChangeRange
|
|
9512
|
+
} : {
|
|
9513
|
+
selected: selectedDate,
|
|
9514
|
+
onBlur: handleDateInputBlur,
|
|
9515
|
+
onChange: handleChangeDate
|
|
9545
9516
|
}))
|
|
9546
9517
|
}));
|
|
9547
|
-
};
|
|
9518
|
+
});
|
|
9548
9519
|
var styles$q = {
|
|
9549
9520
|
root: {},
|
|
9550
9521
|
button: {
|
|
@@ -13973,26 +13944,24 @@
|
|
|
13973
13944
|
localeKey,
|
|
13974
13945
|
locale2
|
|
13975
13946
|
]);
|
|
13976
|
-
var _useState2 = _sliced_to_array$c(React.useState(false), 2), isNeedClearSelectedDate = _useState2[0], setNeedClearSelectedDate = _useState2[1];
|
|
13977
13947
|
var topPosition = !isClearable && onStartBtnSubmit === void 0 ? 28 : 60;
|
|
13978
13948
|
var handleClear = function() {
|
|
13979
13949
|
onEndBtnSubmit();
|
|
13980
|
-
setNeedClearSelectedDate(!isNeedClearSelectedDate);
|
|
13981
13950
|
};
|
|
13982
13951
|
var ref = React.useRef(null);
|
|
13983
13952
|
var isOpenCalendar = isOpenFrom || isOpenTo;
|
|
13984
13953
|
var handleFromSelected = function(val) {
|
|
13985
|
-
var
|
|
13954
|
+
var _value_to;
|
|
13986
13955
|
onChange({
|
|
13987
13956
|
from: val,
|
|
13988
|
-
to: (
|
|
13957
|
+
to: (_value_to = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to !== void 0 ? _value_to : null
|
|
13989
13958
|
});
|
|
13990
13959
|
setOpenFrom(false);
|
|
13991
13960
|
};
|
|
13992
13961
|
var handleToSelected = function(val) {
|
|
13993
|
-
var
|
|
13962
|
+
var _value_from;
|
|
13994
13963
|
onChange({
|
|
13995
|
-
from: (
|
|
13964
|
+
from: (_value_from = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from !== void 0 ? _value_from : null,
|
|
13996
13965
|
to: val
|
|
13997
13966
|
});
|
|
13998
13967
|
setOpenTo(false);
|
|
@@ -14004,10 +13973,10 @@
|
|
|
14004
13973
|
to: val
|
|
14005
13974
|
});
|
|
14006
13975
|
} else {
|
|
14007
|
-
var
|
|
13976
|
+
var _value_to;
|
|
14008
13977
|
onChange({
|
|
14009
13978
|
from: val,
|
|
14010
|
-
to: (
|
|
13979
|
+
to: (_value_to = value === null || value === void 0 ? void 0 : value.to) !== null && _value_to !== void 0 ? _value_to : null
|
|
14011
13980
|
});
|
|
14012
13981
|
}
|
|
14013
13982
|
};
|
|
@@ -14018,16 +13987,16 @@
|
|
|
14018
13987
|
to: value.from
|
|
14019
13988
|
});
|
|
14020
13989
|
} else {
|
|
14021
|
-
var
|
|
13990
|
+
var _value_from;
|
|
14022
13991
|
onChange({
|
|
14023
|
-
from: (
|
|
13992
|
+
from: (_value_from = value === null || value === void 0 ? void 0 : value.from) !== null && _value_from !== void 0 ? _value_from : null,
|
|
14024
13993
|
to: val
|
|
14025
13994
|
});
|
|
14026
13995
|
}
|
|
14027
13996
|
};
|
|
14028
13997
|
var tweakClearButtonStyles = useTweakStyles(componentStyles, tweakStyles, "tweakClearButton");
|
|
14029
13998
|
var tweakBackButtonStyles = useTweakStyles(componentStyles, tweakStyles, "tweakBackButton");
|
|
14030
|
-
var
|
|
13999
|
+
var _ref;
|
|
14031
14000
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$h(_object_spread$j({
|
|
14032
14001
|
className: classes.root
|
|
14033
14002
|
}, addDataAttributes(data)), {
|
|
@@ -14038,7 +14007,7 @@
|
|
|
14038
14007
|
/* @__PURE__ */ jsx("div", {
|
|
14039
14008
|
className: classes.containerItem,
|
|
14040
14009
|
children: /* @__PURE__ */ jsx(DatePicker, _object_spread$j({
|
|
14041
|
-
selectedDate:
|
|
14010
|
+
selectedDate: value === null || value === void 0 ? void 0 : value.from,
|
|
14042
14011
|
maxDate: value === null || value === void 0 ? void 0 : value.to,
|
|
14043
14012
|
label: translates.from,
|
|
14044
14013
|
months: translates.months,
|
|
@@ -14046,16 +14015,15 @@
|
|
|
14046
14015
|
onChangeDate: handleChangeFrom,
|
|
14047
14016
|
leftPosition: -20,
|
|
14048
14017
|
topPosition,
|
|
14049
|
-
isNeedClearSelectedDate,
|
|
14050
14018
|
border: "bottom",
|
|
14051
|
-
testId:
|
|
14019
|
+
testId: getTestId(testId, "from"),
|
|
14052
14020
|
isClearable
|
|
14053
14021
|
}, startPickerProps))
|
|
14054
14022
|
}),
|
|
14055
14023
|
/* @__PURE__ */ jsx("div", {
|
|
14056
14024
|
className: classes.containerItem,
|
|
14057
14025
|
children: /* @__PURE__ */ jsx(DatePicker, _object_spread$j({
|
|
14058
|
-
selectedDate:
|
|
14026
|
+
selectedDate: value === null || value === void 0 ? void 0 : value.to,
|
|
14059
14027
|
label: translates.to,
|
|
14060
14028
|
months: translates.months,
|
|
14061
14029
|
minDate: value === null || value === void 0 ? void 0 : value.from,
|
|
@@ -14063,9 +14031,8 @@
|
|
|
14063
14031
|
onChangeDate: handleChangeTo,
|
|
14064
14032
|
topPosition,
|
|
14065
14033
|
leftPosition: -170,
|
|
14066
|
-
isNeedClearSelectedDate,
|
|
14067
14034
|
border: "bottom",
|
|
14068
|
-
testId:
|
|
14035
|
+
testId: getTestId(testId, "to"),
|
|
14069
14036
|
isClearable
|
|
14070
14037
|
}, endPickerProps))
|
|
14071
14038
|
})
|
|
@@ -14079,7 +14046,7 @@
|
|
|
14079
14046
|
onClick: handleClear,
|
|
14080
14047
|
size: "s",
|
|
14081
14048
|
view: "text",
|
|
14082
|
-
testId:
|
|
14049
|
+
testId: getTestId(testId, "clear-button"),
|
|
14083
14050
|
isFullWidth: true,
|
|
14084
14051
|
tweakStyles: tweakClearButtonStyles,
|
|
14085
14052
|
children: translates.clear
|
|
@@ -28048,6 +28015,8 @@
|
|
|
28048
28015
|
exports2.DateInput = DateInput;
|
|
28049
28016
|
exports2.DatePicker = DatePicker;
|
|
28050
28017
|
exports2.Description = Description;
|
|
28018
|
+
exports2.EMPTY_DATE_INPUT_VALUE = EMPTY_DATE_INPUT_VALUE;
|
|
28019
|
+
exports2.EMPTY_DATE_RANGE_INPUT_VALUE = EMPTY_DATE_RANGE_INPUT_VALUE;
|
|
28051
28020
|
exports2.FilterInterval = FilterInterval;
|
|
28052
28021
|
exports2.FilterLocales = FilterLocales;
|
|
28053
28022
|
exports2.FilterMultiSelect = FilterMultiSelect;
|
|
@@ -28112,6 +28081,7 @@
|
|
|
28112
28081
|
exports2.hasExactParent = hasExactParent;
|
|
28113
28082
|
exports2.isElementOffScreen = isElementOffScreen;
|
|
28114
28083
|
exports2.isElementOneOfParents = isElementOneOfParents;
|
|
28084
|
+
exports2.isEmpty = isEmpty;
|
|
28115
28085
|
exports2.isInt = isInt;
|
|
28116
28086
|
exports2.isNotEmpty = isNotEmpty;
|
|
28117
28087
|
exports2.isSpaceChar = isSpaceChar;
|