intelicoreact 1.8.10 → 1.8.12
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/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -0
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +1 -0
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +1 -0
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +1 -0
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +1 -0
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +1 -0
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +1 -0
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +1 -0
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +1 -0
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +1 -1
- package/dist/Atomic/FormElements/RangeList/RangeList.js +1 -0
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -0
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +1 -0
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +1 -0
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -0
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -0
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -0
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +1 -0
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -0
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +1 -0
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.interface.ts +3 -3
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1 -1
- package/dist/Atomic/FormElements/Text/Text.js +1 -0
- package/dist/Atomic/FormElements/Textarea/Textarea.js +1 -0
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +1 -0
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +1 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +1 -0
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +1 -0
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +1 -0
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +1 -0
- package/dist/Atomic/Layout/Header/Header.js +1 -0
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +1 -0
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +1 -0
- package/dist/Atomic/UI/AccordionText/AccordionText.js +1 -0
- package/dist/Atomic/UI/Arrow/Arrow.js +1 -0
- package/dist/Atomic/UI/Box/Box.js +1 -0
- package/dist/Atomic/UI/Chart/Chart.js +1 -0
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -0
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +1 -0
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +1 -0
- package/dist/Atomic/UI/DateTime/DateTime.js +1 -0
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +1 -0
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +1 -0
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +1 -0
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +1 -0
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -0
- package/dist/Atomic/UI/PieChart/PieChart.js +1 -0
- package/dist/Atomic/UI/Table/Partials/TdCell.js +1 -0
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -0
- package/dist/Atomic/UI/Table/Partials/TdRow.js +1 -0
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -0
- package/dist/Atomic/UI/Table/Table.js +1 -0
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +1 -0
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -0
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -0
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -0
- package/dist/Atomic/UI/Tag/Tag.interface.ts +1 -1
- package/dist/Atomic/UI/Tag/Tag.js +1 -1
- package/dist/Atomic/UI/TagList/TagList.js +1 -0
- package/dist/Atomic/UI/WizardStepper/constructor.js +1 -0
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +1 -0
- package/dist/Functions/customEventListener.js +1 -0
- package/dist/Functions/operations.js +1 -0
- package/dist/Functions/useFormTools/functions/RenderFields.js +1 -0
- package/dist/Functions/useFormTools/index.js +1 -0
- package/dist/Functions/usePasswordChecker.js +1 -0
- package/dist/Functions/utils.js +1 -0
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +1 -0
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +1 -0
- package/dist/Molecular/CustomIcons/components/AppStore.js +1 -0
- package/dist/Molecular/CustomIcons/components/Arrow.js +1 -0
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +1 -0
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +1 -0
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +1 -0
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +1 -0
- package/dist/Molecular/CustomIcons/components/Bell.js +1 -0
- package/dist/Molecular/CustomIcons/components/Button.js +1 -0
- package/dist/Molecular/CustomIcons/components/Campaigns.js +1 -0
- package/dist/Molecular/CustomIcons/components/Check.js +1 -0
- package/dist/Molecular/CustomIcons/components/Check2.js +1 -0
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +1 -0
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +1 -0
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +1 -0
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +1 -0
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +1 -0
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +1 -0
- package/dist/Molecular/CustomIcons/components/Close.js +1 -0
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +1 -0
- package/dist/Molecular/CustomIcons/components/Delete.js +1 -0
- package/dist/Molecular/CustomIcons/components/Edit.js +1 -0
- package/dist/Molecular/CustomIcons/components/Email.js +1 -0
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +1 -0
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +1 -0
- package/dist/Molecular/CustomIcons/components/Flows.js +1 -0
- package/dist/Molecular/CustomIcons/components/Gift.js +1 -0
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +1 -0
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +1 -0
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +1 -0
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +1 -0
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +1 -0
- package/dist/Molecular/CustomIcons/components/Home.js +1 -0
- package/dist/Molecular/CustomIcons/components/Home2.js +1 -0
- package/dist/Molecular/CustomIcons/components/Key.js +1 -0
- package/dist/Molecular/CustomIcons/components/Landers.js +1 -0
- package/dist/Molecular/CustomIcons/components/Lock.js +1 -0
- package/dist/Molecular/CustomIcons/components/Mail.js +1 -0
- package/dist/Molecular/CustomIcons/components/Mastercard.js +1 -0
- package/dist/Molecular/CustomIcons/components/Minus.js +1 -0
- package/dist/Molecular/CustomIcons/components/Offers.js +1 -0
- package/dist/Molecular/CustomIcons/components/Pause.js +1 -0
- package/dist/Molecular/CustomIcons/components/PayPal.js +1 -0
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +1 -0
- package/dist/Molecular/CustomIcons/components/Phone.js +1 -0
- package/dist/Molecular/CustomIcons/components/Play.js +1 -0
- package/dist/Molecular/CustomIcons/components/Plus.js +1 -0
- package/dist/Molecular/CustomIcons/components/Profile.js +1 -0
- package/dist/Molecular/CustomIcons/components/QRCode.js +1 -0
- package/dist/Molecular/CustomIcons/components/Rectangle.js +1 -0
- package/dist/Molecular/CustomIcons/components/Revert.js +1 -0
- package/dist/Molecular/CustomIcons/components/Star.js +1 -0
- package/dist/Molecular/CustomIcons/components/Star2.js +1 -0
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +1 -0
- package/dist/Molecular/CustomIcons/components/Trash.js +1 -0
- package/dist/Molecular/CustomIcons/components/TrashRed.js +1 -0
- package/dist/Molecular/CustomIcons/components/Triggers.js +1 -0
- package/dist/Molecular/CustomIcons/components/User.js +1 -0
- package/dist/Molecular/CustomIcons/components/Visa.js +1 -0
- package/dist/Molecular/CustomIcons/components/X.js +1 -0
- package/dist/Molecular/FormElement/FormElement.js +1 -0
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +1 -0
- package/dist/Molecular/InputAddress/InputAddress.js +1 -0
- package/dist/Molecular/InputPassword/InputPassword.js +1 -0
- package/package.json +6 -13
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.jsx +0 -18
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.jsx +0 -121
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.jsx +0 -507
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.jsx +0 -46
- package/dist/Atomic/FormElements/NumericInput/NumericInput.jsx +0 -337
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.jsx +0 -66
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.jsx +0 -78
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.jsx +0 -54
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.jsx +0 -183
- package/dist/Atomic/FormElements/RangeList/RangeList.jsx +0 -181
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.jsx +0 -41
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.jsx +0 -449
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.jsx +0 -865
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.jsx +0 -37
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.jsx +0 -48
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.jsx +0 -62
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.jsx +0 -175
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.jsx +0 -65
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.jsx +0 -118
- package/dist/Atomic/FormElements/Text/Text.jsx +0 -126
- package/dist/Atomic/FormElements/Textarea/Textarea.jsx +0 -61
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.jsx +0 -181
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.jsx +0 -60
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.jsx +0 -83
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.jsx +0 -80
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.jsx +0 -103
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.jsx +0 -115
- package/dist/Atomic/Layout/Header/Header.jsx +0 -86
- package/dist/Atomic/UI/AccordionTable/AccordionTable.jsx +0 -250
- package/dist/Atomic/UI/AccordionText/AccordionText.jsx +0 -68
- package/dist/Atomic/UI/Arrow/Arrow.jsx +0 -134
- package/dist/Atomic/UI/Box/Box.jsx +0 -53
- package/dist/Atomic/UI/Chart/Chart.jsx +0 -178
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.jsx +0 -78
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.jsx +0 -334
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.jsx +0 -111
- package/dist/Atomic/UI/DateTime/DateTime.jsx +0 -57
- package/dist/Atomic/UI/DebugContainer/DebugContainer.jsx +0 -44
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.jsx +0 -15
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.jsx +0 -223
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.jsx +0 -75
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.jsx +0 -86
- package/dist/Atomic/UI/PieChart/PieChart.jsx +0 -41
- package/dist/Atomic/UI/Table/Partials/TdCell.jsx +0 -87
- package/dist/Atomic/UI/Table/Partials/TdHeader.jsx +0 -36
- package/dist/Atomic/UI/Table/Partials/TdRow.jsx +0 -103
- package/dist/Atomic/UI/Table/Partials/TdTitle.jsx +0 -55
- package/dist/Atomic/UI/Table/Table.jsx +0 -63
- package/dist/Atomic/UI/Table/TdTypes/TdActions.jsx +0 -80
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.jsx +0 -26
- package/dist/Atomic/UI/Table/TdTypes/TdRange.jsx +0 -13
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.jsx +0 -56
- package/dist/Atomic/UI/TagList/TagList.jsx +0 -256
- package/dist/Atomic/UI/WizardStepper/constructor.jsx +0 -86
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.jsx +0 -254
- package/dist/Functions/customEventListener.jsx +0 -96
- package/dist/Functions/operations.jsx +0 -138
- package/dist/Functions/useFormTools/functions/RenderFields.jsx +0 -108
- package/dist/Functions/useFormTools/index.jsx +0 -777
- package/dist/Functions/usePasswordChecker.jsx +0 -128
- package/dist/Functions/utils.jsx +0 -492
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.jsx +0 -22
- package/dist/Molecular/CustomIcons/components/AlertCircle.jsx +0 -24
- package/dist/Molecular/CustomIcons/components/AppStore.jsx +0 -30
- package/dist/Molecular/CustomIcons/components/Arrow.jsx +0 -33
- package/dist/Molecular/CustomIcons/components/ArrowDown.jsx +0 -18
- package/dist/Molecular/CustomIcons/components/ArrowLeft.jsx +0 -23
- package/dist/Molecular/CustomIcons/components/ArrowRight.jsx +0 -23
- package/dist/Molecular/CustomIcons/components/ArrowUp.jsx +0 -18
- package/dist/Molecular/CustomIcons/components/Bell.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/Button.jsx +0 -13
- package/dist/Molecular/CustomIcons/components/Campaigns.jsx +0 -17
- package/dist/Molecular/CustomIcons/components/Check.jsx +0 -15
- package/dist/Molecular/CustomIcons/components/Check2.jsx +0 -13
- package/dist/Molecular/CustomIcons/components/ChevronDown.jsx +0 -13
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.jsx +0 -12
- package/dist/Molecular/CustomIcons/components/ChevronLeft.jsx +0 -12
- package/dist/Molecular/CustomIcons/components/ChevronRight.jsx +0 -12
- package/dist/Molecular/CustomIcons/components/ChevronUp.jsx +0 -12
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.jsx +0 -28
- package/dist/Molecular/CustomIcons/components/Close.jsx +0 -15
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.jsx +0 -18
- package/dist/Molecular/CustomIcons/components/Delete.jsx +0 -17
- package/dist/Molecular/CustomIcons/components/Edit.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/Email.jsx +0 -32
- package/dist/Molecular/CustomIcons/components/FinturfLogo.jsx +0 -19
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.jsx +0 -36
- package/dist/Molecular/CustomIcons/components/Flows.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/Gift.jsx +0 -26
- package/dist/Molecular/CustomIcons/components/GoogleAuth.jsx +0 -30
- package/dist/Molecular/CustomIcons/components/GooglePlay.jsx +0 -30
- package/dist/Molecular/CustomIcons/components/HelpCircle.jsx +0 -20
- package/dist/Molecular/CustomIcons/components/HelpCircle2.jsx +0 -21
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.jsx +0 -20
- package/dist/Molecular/CustomIcons/components/Home.jsx +0 -17
- package/dist/Molecular/CustomIcons/components/Home2.jsx +0 -23
- package/dist/Molecular/CustomIcons/components/Key.jsx +0 -24
- package/dist/Molecular/CustomIcons/components/Landers.jsx +0 -21
- package/dist/Molecular/CustomIcons/components/Lock.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/Mail.jsx +0 -27
- package/dist/Molecular/CustomIcons/components/Mastercard.jsx +0 -74
- package/dist/Molecular/CustomIcons/components/Minus.jsx +0 -26
- package/dist/Molecular/CustomIcons/components/Offers.jsx +0 -17
- package/dist/Molecular/CustomIcons/components/Pause.jsx +0 -29
- package/dist/Molecular/CustomIcons/components/PayPal.jsx +0 -42
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.jsx +0 -29
- package/dist/Molecular/CustomIcons/components/Phone.jsx +0 -31
- package/dist/Molecular/CustomIcons/components/Play.jsx +0 -26
- package/dist/Molecular/CustomIcons/components/Plus.jsx +0 -26
- package/dist/Molecular/CustomIcons/components/Profile.jsx +0 -17
- package/dist/Molecular/CustomIcons/components/QRCode.jsx +0 -30
- package/dist/Molecular/CustomIcons/components/Rectangle.jsx +0 -13
- package/dist/Molecular/CustomIcons/components/Revert.jsx +0 -14
- package/dist/Molecular/CustomIcons/components/Star.jsx +0 -15
- package/dist/Molecular/CustomIcons/components/Star2.jsx +0 -17
- package/dist/Molecular/CustomIcons/components/TrafficSources.jsx +0 -15
- package/dist/Molecular/CustomIcons/components/Trash.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/TrashRed.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/Triggers.jsx +0 -16
- package/dist/Molecular/CustomIcons/components/User.jsx +0 -26
- package/dist/Molecular/CustomIcons/components/Visa.jsx +0 -32
- package/dist/Molecular/CustomIcons/components/X.jsx +0 -13
- package/dist/Molecular/FormElement/FormElement.jsx +0 -52
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.jsx +0 -161
- package/dist/Molecular/InputAddress/InputAddress.jsx +0 -641
- package/dist/Molecular/InputPassword/InputPassword.jsx +0 -50
|
@@ -1,507 +0,0 @@
|
|
|
1
|
-
import moment from 'moment';
|
|
2
|
-
|
|
3
|
-
import { useEffect, useRef, useState } from 'react';
|
|
4
|
-
import { ChevronDown, ChevronUp } from 'react-feather';
|
|
5
|
-
|
|
6
|
-
import './MobileCalendar.scss';
|
|
7
|
-
|
|
8
|
-
require('../../../Functions/customEventListener');
|
|
9
|
-
|
|
10
|
-
function MobileCalendar({
|
|
11
|
-
min = moment().subtract('10', 'years'),
|
|
12
|
-
max = moment().add('10', 'years'),
|
|
13
|
-
value = moment(),
|
|
14
|
-
rows = 5,
|
|
15
|
-
label = '',
|
|
16
|
-
timeout = 75,
|
|
17
|
-
isMobile = true,
|
|
18
|
-
showSelectedDate = false,
|
|
19
|
-
listItemHeight = 32,
|
|
20
|
-
|
|
21
|
-
classes = {
|
|
22
|
-
wrapper: '',
|
|
23
|
-
label: '',
|
|
24
|
-
body: '',
|
|
25
|
-
|
|
26
|
-
yearsBlock: '',
|
|
27
|
-
yearsList: '',
|
|
28
|
-
yearsListItem: '',
|
|
29
|
-
|
|
30
|
-
monthsBlock: '',
|
|
31
|
-
monthsList: '',
|
|
32
|
-
monthsListItem: '',
|
|
33
|
-
|
|
34
|
-
daysBlock: '',
|
|
35
|
-
daysList: '',
|
|
36
|
-
daysListItem: '',
|
|
37
|
-
|
|
38
|
-
prevItem: '',
|
|
39
|
-
nextItem: '',
|
|
40
|
-
activeItem: '',
|
|
41
|
-
},
|
|
42
|
-
onChange = () => {},
|
|
43
|
-
onMinDateReached = () => {},
|
|
44
|
-
onMaxDateReached = () => {},
|
|
45
|
-
}) {
|
|
46
|
-
const Body = document.querySelector('body');
|
|
47
|
-
const listItem = document.querySelector(
|
|
48
|
-
'.mobile-calendar_wrapper_body_months-list--item',
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const [date, setDate] = useState(value ? moment(value) : moment());
|
|
52
|
-
const [minDate, setMinDate] = useState(moment(min));
|
|
53
|
-
const [maxDate, setMaxDate] = useState(moment(max));
|
|
54
|
-
|
|
55
|
-
const [isMouseDown, setIsMouseDown] = useState(false);
|
|
56
|
-
const [mouseDownOn, setMouseDownOn] = useState(null);
|
|
57
|
-
const [changeInterval, setChangeInterval] = useState(null);
|
|
58
|
-
|
|
59
|
-
const [touchY, setTouchY] = useState(null);
|
|
60
|
-
const [touchType, setTouchType] = useState(null);
|
|
61
|
-
const [touchTimestamp, setTouchTimestamp] = useState(null);
|
|
62
|
-
|
|
63
|
-
const [scrollDirection, setScrollDirection] = useState(0);
|
|
64
|
-
|
|
65
|
-
const monthsListRef = useRef(null);
|
|
66
|
-
const daysListRef = useRef(null);
|
|
67
|
-
const yearsListRef = useRef(null);
|
|
68
|
-
|
|
69
|
-
const dateRef = useRef(null);
|
|
70
|
-
const intervalRef = useRef(null);
|
|
71
|
-
|
|
72
|
-
// --HANDLERS--//
|
|
73
|
-
const changeItem = (type, value) => {
|
|
74
|
-
setScrollDirection(value);
|
|
75
|
-
setDate((date) => {
|
|
76
|
-
const newDate = moment(date).add(value, type);
|
|
77
|
-
|
|
78
|
-
if (moment(newDate).isBefore(minDate)) return minDate;
|
|
79
|
-
if (moment(newDate).isAfter(maxDate)) return maxDate;
|
|
80
|
-
|
|
81
|
-
return newDate;
|
|
82
|
-
});
|
|
83
|
-
setTimeout(() => {
|
|
84
|
-
setScrollDirection(0);
|
|
85
|
-
}, 50);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const checkAvailability = (type, value) => {
|
|
89
|
-
if (!dateRef?.current) return false;
|
|
90
|
-
|
|
91
|
-
const newDate = moment(dateRef?.current).add(value, type);
|
|
92
|
-
|
|
93
|
-
if (moment(newDate).isBefore(minDate)) return false;
|
|
94
|
-
if (moment(newDate).isAfter(maxDate)) return false;
|
|
95
|
-
|
|
96
|
-
return true;
|
|
97
|
-
};
|
|
98
|
-
const onArrowMouseDown = (type, value) => {
|
|
99
|
-
setIsMouseDown(true);
|
|
100
|
-
setMouseDownOn({ type, value });
|
|
101
|
-
};
|
|
102
|
-
const onArrowMouseUp = () => {
|
|
103
|
-
setIsMouseDown(false);
|
|
104
|
-
setMouseDownOn(null);
|
|
105
|
-
};
|
|
106
|
-
const onWheel = (e, type) => {
|
|
107
|
-
e.preventDefault();
|
|
108
|
-
|
|
109
|
-
const { deltaY } = e;
|
|
110
|
-
const top = window.scrollX;
|
|
111
|
-
const left = window.scrollY;
|
|
112
|
-
|
|
113
|
-
window.scrollTo({ top, left });
|
|
114
|
-
|
|
115
|
-
changeItem(type, deltaY < 0 ? -1 : 1);
|
|
116
|
-
};
|
|
117
|
-
const onTouchStart = (e, type) => {
|
|
118
|
-
e.preventDefault();
|
|
119
|
-
|
|
120
|
-
if (intervalRef?.current) {
|
|
121
|
-
clearInterval(intervalRef?.current);
|
|
122
|
-
intervalRef.current = null;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const { timeStamp, changedTouches } = e;
|
|
126
|
-
const { pageY } = changedTouches[0];
|
|
127
|
-
|
|
128
|
-
setTouchY(pageY);
|
|
129
|
-
setTouchTimestamp(timeStamp);
|
|
130
|
-
setTouchType(type);
|
|
131
|
-
|
|
132
|
-
window.addEventListener(
|
|
133
|
-
'touchend',
|
|
134
|
-
e => onTouchEnd(e, pageY, timeStamp, type),
|
|
135
|
-
{ once: true },
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
const onTouchMove = (e) => {
|
|
139
|
-
if (!touchY || !touchType) return;
|
|
140
|
-
|
|
141
|
-
const { timeStamp, changedTouches } = e;
|
|
142
|
-
const { pageY } = changedTouches[0];
|
|
143
|
-
|
|
144
|
-
const deltaY = touchY - pageY;
|
|
145
|
-
|
|
146
|
-
if (Math.abs(deltaY) < listItemHeight) return;
|
|
147
|
-
|
|
148
|
-
const direction = deltaY < 0 ? -1 : 1;
|
|
149
|
-
|
|
150
|
-
setScrollDirection(direction);
|
|
151
|
-
|
|
152
|
-
changeItem(touchType, direction);
|
|
153
|
-
setTouchY(pageY);
|
|
154
|
-
setTouchTimestamp(timeStamp);
|
|
155
|
-
};
|
|
156
|
-
const onTouchEnd = (e, startY, startTime, touchType) => {
|
|
157
|
-
const { timeStamp, changedTouches } = e;
|
|
158
|
-
const { pageY } = changedTouches[0];
|
|
159
|
-
|
|
160
|
-
const path = Math.abs(startY - pageY); // in px
|
|
161
|
-
const time = timeStamp - startTime; // ms
|
|
162
|
-
const pxPerMs = path / time;
|
|
163
|
-
|
|
164
|
-
if (pxPerMs > 0.65)
|
|
165
|
-
innertionScroll({ startY, pageY, timeStamp, startTime, touchType });
|
|
166
|
-
else setTouchType(null);
|
|
167
|
-
|
|
168
|
-
setTouchY(null);
|
|
169
|
-
};
|
|
170
|
-
const innertionScroll = ({
|
|
171
|
-
startY,
|
|
172
|
-
pageY,
|
|
173
|
-
timeStamp,
|
|
174
|
-
startTime,
|
|
175
|
-
touchType,
|
|
176
|
-
}) => {
|
|
177
|
-
const path = Math.abs(startY - pageY); // in px
|
|
178
|
-
const time = timeStamp - startTime; // ms
|
|
179
|
-
const pxPerMs = Math.ceil(path / time); // speed
|
|
180
|
-
|
|
181
|
-
const S = (pxPerMs / 2) * time;
|
|
182
|
-
const blocks = Math.ceil((S / listItemHeight) * pxPerMs);
|
|
183
|
-
|
|
184
|
-
let i = 1;
|
|
185
|
-
|
|
186
|
-
intervalRef.current = setInterval(() => {
|
|
187
|
-
if (
|
|
188
|
-
checkAvailability(touchType, startY - pageY < 0 ? -1 : 1, date)
|
|
189
|
-
&& i <= blocks
|
|
190
|
-
) {
|
|
191
|
-
changeItem(touchType, startY - pageY < 0 ? -1 : 1);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
setTouchType(null);
|
|
195
|
-
clearInterval(intervalRef?.current);
|
|
196
|
-
intervalRef.current = null;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
++i;
|
|
200
|
-
}, timeout);
|
|
201
|
-
|
|
202
|
-
// for(let i = 1; i <= blocks; ++i){
|
|
203
|
-
// // timeout = i*pxPerMs+Math.pow(i,2)*10;
|
|
204
|
-
// timeout += 80;
|
|
205
|
-
// if(checkAvailability(touchType, startY-pageY < 0 ? -1 : 1, date)){
|
|
206
|
-
// setTimeout(() => {
|
|
207
|
-
// console.log({timeout})
|
|
208
|
-
// changeItem(touchType, startY-pageY < 0 ? -1 : 1);
|
|
209
|
-
// }, timeout)
|
|
210
|
-
// }
|
|
211
|
-
|
|
212
|
-
// }
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
// --FUNCTIONS--//
|
|
216
|
-
const intervalWorker = () => {
|
|
217
|
-
if (!mouseDownOn) return;
|
|
218
|
-
|
|
219
|
-
const { type, value } = mouseDownOn;
|
|
220
|
-
changeItem(type, value);
|
|
221
|
-
};
|
|
222
|
-
const getList = (type, format) => {
|
|
223
|
-
const list = [];
|
|
224
|
-
|
|
225
|
-
const renderRows = rows;
|
|
226
|
-
|
|
227
|
-
for (let i = (renderRows - 1) / 2; i >= ((renderRows - 1) / 2) * -1; --i) {
|
|
228
|
-
list.push(moment(date).subtract(i, type).format(format));
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return list;
|
|
232
|
-
};
|
|
233
|
-
const getMonthList = () => getList('months', 'MMMM');
|
|
234
|
-
const getDaysList = () => getList('days', 'D');
|
|
235
|
-
const getYearsList = () => getList('years', 'YYYY');
|
|
236
|
-
|
|
237
|
-
// --OBSERVERS--//
|
|
238
|
-
useEffect(() => {
|
|
239
|
-
if (moment(date.format('L')).isBefore(minDate.format('L')))
|
|
240
|
-
setDate(minDate);
|
|
241
|
-
if (moment(date.format('L')).isAfter(maxDate.format('L'))) setDate(maxDate);
|
|
242
|
-
}, []);
|
|
243
|
-
|
|
244
|
-
// Events Observer
|
|
245
|
-
useEffect(() => {
|
|
246
|
-
document.addEventListener('mouseup', onArrowMouseUp);
|
|
247
|
-
return () => {
|
|
248
|
-
document.removeEventListener('mouseup', onArrowMouseUp);
|
|
249
|
-
};
|
|
250
|
-
}, []);
|
|
251
|
-
|
|
252
|
-
useEffect(() => {
|
|
253
|
-
onChange(date);
|
|
254
|
-
dateRef.current = date;
|
|
255
|
-
|
|
256
|
-
if (moment(date.format('L')).isSame(minDate.format('L')))
|
|
257
|
-
onMinDateReached(minDate);
|
|
258
|
-
if (moment(date.format('L')).isSame(maxDate.format('L')))
|
|
259
|
-
onMaxDateReached(maxDate);
|
|
260
|
-
}, [date]);
|
|
261
|
-
|
|
262
|
-
// monthList Events
|
|
263
|
-
useEffect(() => {
|
|
264
|
-
if (monthsListRef?.current) {
|
|
265
|
-
monthsListRef?.current?.addEventListener(
|
|
266
|
-
'mousewheel',
|
|
267
|
-
e => onWheel(e, 'months'),
|
|
268
|
-
{ passive: false },
|
|
269
|
-
);
|
|
270
|
-
monthsListRef?.current?.addEventListener(
|
|
271
|
-
'touchstart',
|
|
272
|
-
e => onTouchStart(e, 'months'),
|
|
273
|
-
{ passive: false },
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
return () => {
|
|
278
|
-
monthsListRef?.current?.clearEventListeners('mousewheel');
|
|
279
|
-
monthsListRef?.current?.clearEventListeners('touchstart');
|
|
280
|
-
};
|
|
281
|
-
}, [monthsListRef]);
|
|
282
|
-
|
|
283
|
-
// daysList Events
|
|
284
|
-
useEffect(() => {
|
|
285
|
-
if (daysListRef?.current) {
|
|
286
|
-
daysListRef?.current?.addEventListener(
|
|
287
|
-
'mousewheel',
|
|
288
|
-
e => onWheel(e, 'days'),
|
|
289
|
-
{ passive: false },
|
|
290
|
-
);
|
|
291
|
-
daysListRef?.current?.addEventListener(
|
|
292
|
-
'touchstart',
|
|
293
|
-
e => onTouchStart(e, 'days'),
|
|
294
|
-
{ passive: false },
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
return () => {
|
|
299
|
-
daysListRef?.current?.clearEventListeners('mousewheel');
|
|
300
|
-
daysListRef?.current?.clearEventListeners('touchstart');
|
|
301
|
-
};
|
|
302
|
-
}, [daysListRef]);
|
|
303
|
-
|
|
304
|
-
// yearsList Events
|
|
305
|
-
useEffect(() => {
|
|
306
|
-
if (yearsListRef?.current) {
|
|
307
|
-
yearsListRef?.current?.addEventListener(
|
|
308
|
-
'mousewheel',
|
|
309
|
-
e => onWheel(e, 'years'),
|
|
310
|
-
{ passive: false },
|
|
311
|
-
);
|
|
312
|
-
yearsListRef?.current?.addEventListener(
|
|
313
|
-
'touchstart',
|
|
314
|
-
e => onTouchStart(e, 'years'),
|
|
315
|
-
{ passive: false },
|
|
316
|
-
);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return () => {
|
|
320
|
-
yearsListRef?.current?.clearEventListeners('mousewheel');
|
|
321
|
-
yearsListRef?.current?.clearEventListeners('touchstart');
|
|
322
|
-
};
|
|
323
|
-
}, [yearsListRef]);
|
|
324
|
-
|
|
325
|
-
// --RENDER--//
|
|
326
|
-
const renderMonthsList = () => {
|
|
327
|
-
const half = (rows - 1) / 2;
|
|
328
|
-
return getMonthList().map((month, i) => (
|
|
329
|
-
<div
|
|
330
|
-
className={`mobile-calendar_wrapper_body_months-list--item ${i === half ? 'active' : ''} ${
|
|
331
|
-
i === 0 || i === rows - 1 ? 'transparent' : ''
|
|
332
|
-
} ${classes?.monthsListItem} ${i === half ? classes?.activeItem : ''}`}
|
|
333
|
-
key={`month-${month}`}
|
|
334
|
-
onClick={
|
|
335
|
-
touchY
|
|
336
|
-
? null
|
|
337
|
-
: () => (i - half === 0 ? {} : changeItem('months', i - half))
|
|
338
|
-
}
|
|
339
|
-
attr-scroll-direction={touchType === 'months' ? scrollDirection : 0}
|
|
340
|
-
attr-is-scrolling={touchType === 'months' ? 1 : 0}
|
|
341
|
-
>
|
|
342
|
-
{month}
|
|
343
|
-
</div>
|
|
344
|
-
));
|
|
345
|
-
};
|
|
346
|
-
const renderDaysList = () => {
|
|
347
|
-
const half = (rows - 1) / 2;
|
|
348
|
-
return getDaysList().map((day, i) => (
|
|
349
|
-
<div
|
|
350
|
-
className={`mobile-calendar_wrapper_body_days-list--item ${i === half ? 'active' : ''} ${
|
|
351
|
-
i === 0 || i === rows - 1 ? 'transparent' : ''
|
|
352
|
-
} ${classes?.daysListItem} ${i === half ? classes?.activeItem : ''}`}
|
|
353
|
-
key={`day-${day}`}
|
|
354
|
-
onClick={() => (i - half === 0 ? {} : changeItem('days', i - half))}
|
|
355
|
-
attr-scroll-direction={touchType === 'days' ? scrollDirection : 0}
|
|
356
|
-
attr-is-scrolling={touchType === 'days' ? 1 : 0}
|
|
357
|
-
>
|
|
358
|
-
{day}
|
|
359
|
-
</div>
|
|
360
|
-
));
|
|
361
|
-
};
|
|
362
|
-
const renderYearsList = () => {
|
|
363
|
-
const half = (rows - 1) / 2;
|
|
364
|
-
return getYearsList().map((year, i) => (
|
|
365
|
-
<div
|
|
366
|
-
className={`mobile-calendar_wrapper_body_years-list--item ${i === half ? 'active' : ''} ${
|
|
367
|
-
i === 0 || i === rows - 1 ? 'transparent' : ''
|
|
368
|
-
} ${classes?.yearsListItem} ${i === half ? classes?.activeItem : ''}`}
|
|
369
|
-
key={`year-${year}`}
|
|
370
|
-
onClick={() => (i - half === 0 ? {} : changeItem('years', i - half))}
|
|
371
|
-
attr-scroll-direction={touchType === 'years' ? scrollDirection : 0}
|
|
372
|
-
attr-is-scrolling={touchType === 'years' ? 1 : 0}
|
|
373
|
-
>
|
|
374
|
-
{year}
|
|
375
|
-
</div>
|
|
376
|
-
));
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
const renderMonthsBlock = () => {
|
|
380
|
-
return (
|
|
381
|
-
<div
|
|
382
|
-
className={`mobile-calendar_wrapper_body_months ${classes?.monthsBlock}`}
|
|
383
|
-
>
|
|
384
|
-
<div
|
|
385
|
-
className={`mobile-calendar_wrapper_body_months--prev ${classes?.prevItem}`}
|
|
386
|
-
>
|
|
387
|
-
<ChevronUp
|
|
388
|
-
onClick={() => changeItem('months', -1)}
|
|
389
|
-
onMouseDown={() => onArrowMouseDown('months', -1)}
|
|
390
|
-
onMouseUp={onArrowMouseUp}
|
|
391
|
-
/>
|
|
392
|
-
</div>
|
|
393
|
-
<div
|
|
394
|
-
className={`mobile-calendar_wrapper_body_months-list ${classes?.monthsList}`}
|
|
395
|
-
ref={monthsListRef}
|
|
396
|
-
>
|
|
397
|
-
{renderMonthsList()}
|
|
398
|
-
{isMobile && (
|
|
399
|
-
<div className="mobile-calendar_wrapper_body_months-list_touch-zone"></div>
|
|
400
|
-
)}
|
|
401
|
-
</div>
|
|
402
|
-
<div
|
|
403
|
-
className={`mobile-calendar_wrapper_body_months--next ${classes?.nextItem}`}
|
|
404
|
-
>
|
|
405
|
-
<ChevronDown
|
|
406
|
-
onClick={() => changeItem('months', 1)}
|
|
407
|
-
onMouseDown={() => onArrowMouseDown('months', 1)}
|
|
408
|
-
onMouseUp={onArrowMouseUp}
|
|
409
|
-
/>
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
);
|
|
413
|
-
};
|
|
414
|
-
const renderDaysBlock = () => {
|
|
415
|
-
return (
|
|
416
|
-
<div
|
|
417
|
-
className={`mobile-calendar_wrapper_body_days ${classes?.daysBlock}`}
|
|
418
|
-
>
|
|
419
|
-
<div
|
|
420
|
-
className={`mobile-calendar_wrapper_body_days--prev ${classes?.prevItem}`}
|
|
421
|
-
>
|
|
422
|
-
<ChevronUp
|
|
423
|
-
onClick={() => changeItem('days', -1)}
|
|
424
|
-
onMouseDown={() => onArrowMouseDown('days', -1)}
|
|
425
|
-
onMouseUp={onArrowMouseUp}
|
|
426
|
-
/>
|
|
427
|
-
</div>
|
|
428
|
-
<div
|
|
429
|
-
className={`mobile-calendar_wrapper_body_days-list ${classes?.daysList}`}
|
|
430
|
-
ref={daysListRef}
|
|
431
|
-
>
|
|
432
|
-
{renderDaysList()}
|
|
433
|
-
{isMobile && (
|
|
434
|
-
<div className="mobile-calendar_wrapper_body_days-list_touch-zone"></div>
|
|
435
|
-
)}
|
|
436
|
-
</div>
|
|
437
|
-
<div
|
|
438
|
-
className={`mobile-calendar_wrapper_body_days--next ${classes?.nextItem}`}
|
|
439
|
-
>
|
|
440
|
-
<ChevronDown
|
|
441
|
-
onClick={() => changeItem('days', 1)}
|
|
442
|
-
onMouseDown={() => onArrowMouseDown('days', 1)}
|
|
443
|
-
onMouseUp={onArrowMouseUp}
|
|
444
|
-
/>
|
|
445
|
-
</div>
|
|
446
|
-
</div>
|
|
447
|
-
);
|
|
448
|
-
};
|
|
449
|
-
const renderYearsBlock = () => {
|
|
450
|
-
return (
|
|
451
|
-
<div
|
|
452
|
-
className={`mobile-calendar_wrapper_body_years ${classes?.yearsBlock}`}
|
|
453
|
-
>
|
|
454
|
-
<div
|
|
455
|
-
className={`mobile-calendar_wrapper_body_years--prev ${classes?.prevItem}`}
|
|
456
|
-
>
|
|
457
|
-
<ChevronUp
|
|
458
|
-
onClick={() => changeItem('years', -1)}
|
|
459
|
-
onMouseDown={() => onArrowMouseDown('years', -1)}
|
|
460
|
-
onMouseUp={onArrowMouseUp}
|
|
461
|
-
/>
|
|
462
|
-
</div>
|
|
463
|
-
<div
|
|
464
|
-
className={`mobile-calendar_wrapper_body_years-list ${classes?.yearsList}`}
|
|
465
|
-
ref={yearsListRef}
|
|
466
|
-
>
|
|
467
|
-
{renderYearsList()}
|
|
468
|
-
{isMobile && (
|
|
469
|
-
<div className="mobile-calendar_wrapper_body_years-list_touch-zone"></div>
|
|
470
|
-
)}
|
|
471
|
-
</div>
|
|
472
|
-
<div
|
|
473
|
-
className={`mobile-calendar_wrapper_body_years--next ${classes?.nextItem}`}
|
|
474
|
-
>
|
|
475
|
-
<ChevronDown
|
|
476
|
-
onClick={() => changeItem('years', 1)}
|
|
477
|
-
onMouseDown={() => onArrowMouseDown('years', 1)}
|
|
478
|
-
onMouseUp={onArrowMouseUp}
|
|
479
|
-
/>
|
|
480
|
-
</div>
|
|
481
|
-
</div>
|
|
482
|
-
);
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
return (
|
|
486
|
-
<div
|
|
487
|
-
className={`mobile-calendar_wrapper ${classes?.wrapper}`}
|
|
488
|
-
onTouchMove={onTouchMove}
|
|
489
|
-
>
|
|
490
|
-
<div className={`mobile-calendar_wrapper_label ${classes?.label}`}>
|
|
491
|
-
{label}
|
|
492
|
-
</div>
|
|
493
|
-
{showSelectedDate && (
|
|
494
|
-
<div className={`mobile-calendar_wrapper_label ${classes?.label}`}>
|
|
495
|
-
{moment(date).format('LL')}
|
|
496
|
-
</div>
|
|
497
|
-
)}
|
|
498
|
-
<div className={`mobile-calendar_wrapper_body ${classes?.body}`}>
|
|
499
|
-
{renderMonthsBlock()}
|
|
500
|
-
{renderDaysBlock()}
|
|
501
|
-
{renderYearsBlock()}
|
|
502
|
-
</div>
|
|
503
|
-
</div>
|
|
504
|
-
);
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
export default MobileCalendar;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import CheckboxInput from '../CheckboxInput/CheckboxInput';
|
|
4
|
-
import Input from '../Input/Input';
|
|
5
|
-
|
|
6
|
-
import './MultiSelect.scss';
|
|
7
|
-
|
|
8
|
-
function MultiSelect({ options, chosenOptions, onChange }) {
|
|
9
|
-
const [searchValue, setSearchValue] = useState('');
|
|
10
|
-
|
|
11
|
-
const checkHandler = (state, value) => {
|
|
12
|
-
if (state) {
|
|
13
|
-
onChange([...chosenOptions, value]);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
onChange(chosenOptions.filter(item => item !== value));
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const filteredOptions = options.filter(({ label }) =>
|
|
21
|
-
label.toLowerCase().includes(searchValue.toLowerCase()),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className="multiselect">
|
|
26
|
-
<Input
|
|
27
|
-
value={searchValue}
|
|
28
|
-
onChange={value => setSearchValue(value)}
|
|
29
|
-
placeholder="Search"
|
|
30
|
-
/>
|
|
31
|
-
<div className="multiselect__list">
|
|
32
|
-
{filteredOptions.map(({ label, value, id }) => (
|
|
33
|
-
<CheckboxInput
|
|
34
|
-
key={id}
|
|
35
|
-
value={chosenOptions.includes(value)}
|
|
36
|
-
label={label}
|
|
37
|
-
onChange={state => checkHandler(state, value)}
|
|
38
|
-
className="multiselect__item"
|
|
39
|
-
/>
|
|
40
|
-
))}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default MultiSelect;
|