hrm_ui_lib 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/styles.css +61 -5
- package/assets/styles/styles.scss +1 -1
- package/components/Alert/Alert.js +11 -52
- package/components/Alert/consts.js +12 -14
- package/components/Alert/index.js +1 -52
- package/components/Alert/types.js +1 -1
- package/components/Avatar/Avatar.js +21 -117
- package/components/Avatar/AvatarGroup.js +18 -117
- package/components/Avatar/index.js +2 -64
- package/components/Avatar/types.js +1 -1
- package/components/Badge/Badge.js +5 -22
- package/components/Badge/index.js +1 -6
- package/components/Badge/types.js +1 -1
- package/components/BadgeV2/BadgeV2.d.ts +3 -0
- package/components/BadgeV2/BadgeV2.js +9 -0
- package/components/BadgeV2/index.d.ts +1 -0
- package/components/BadgeV2/index.js +1 -0
- package/components/BadgeV2/types.d.ts +42 -0
- package/components/BadgeV2/types.js +31 -0
- package/components/Breadcrumb/Breadcrumb.js +6 -23
- package/components/Breadcrumb/index.js +1 -2
- package/components/Breadcrumb/types.js +1 -1
- package/components/Button/Button.js +29 -52
- package/components/Button/consts.js +12 -14
- package/components/Button/index.js +1 -52
- package/components/Button/types.js +1 -1
- package/components/Checkbox/Checkbox.js +45 -52
- package/components/Checkbox/index.js +1 -52
- package/components/Checkbox/types.js +1 -1
- package/components/Chips/Chips.js +23 -65
- package/components/Chips/consts.js +10 -12
- package/components/Chips/index.js +1 -11
- package/components/Chips/types.js +5 -7
- package/components/Collapse/CollapseGroup/CollapseGroup.js +22 -73
- package/components/Collapse/CollapseItem/CollapseItem.js +11 -86
- package/components/Collapse/index.js +2 -16
- package/components/Collapse/types.js +1 -1
- package/components/Container/Container.js +4 -9
- package/components/Container/index.js +1 -2
- package/components/Container/types.js +1 -1
- package/components/Copy/Copy.js +15 -93
- package/components/Copy/index.js +1 -54
- package/components/Copy/types.js +1 -1
- package/components/Counter/Counter.js +54 -134
- package/components/Counter/index.js +1 -61
- package/components/Counter/types.js +1 -1
- package/components/DatePicker/CustomHeader/CustomHeader.js +16 -191
- package/components/DatePicker/CustomHeader/helpers.js +10 -16
- package/components/DatePicker/RangeDatePicker/RangeDatePicker.js +7 -129
- package/components/DatePicker/RangeDatePicker/RangeDatePickerDesktop.js +71 -172
- package/components/DatePicker/RangeDatePicker/RangeDatePickerMobile.js +86 -265
- package/components/DatePicker/RangeDatePicker/index.js +1 -124
- package/components/DatePicker/SimpleDatePicker/SimpleDatePicker.js +8 -128
- package/components/DatePicker/SimpleDatePicker/SimpleDatePickerDesktop.js +45 -202
- package/components/DatePicker/SimpleDatePicker/SimpleDatePickerMobile.js +44 -206
- package/components/DatePicker/SimpleDatePicker/index.js +1 -123
- package/components/DatePicker/TimePicker/MobileModalContent.js +33 -123
- package/components/DatePicker/TimePicker/TimePicker.js +7 -75
- package/components/DatePicker/TimePicker/TimePickerDesktop.js +42 -128
- package/components/DatePicker/TimePicker/TimePickerMobile.js +27 -125
- package/components/DatePicker/TimePicker/consts.js +5 -8
- package/components/DatePicker/TimePicker/helpers.js +9 -19
- package/components/DatePicker/TimePicker/index.js +1 -70
- package/components/DatePicker/hooks.js +33 -2171
- package/components/DatePicker/index.js +3 -134
- package/components/DatePicker/localization.js +43 -6
- package/components/DatePicker/types.js +5 -7
- package/components/Divider/Divider.js +8 -15
- package/components/Divider/index.js +1 -3
- package/components/Divider/types.js +1 -1
- package/components/Empty/Empty.js +9 -83
- package/components/Empty/index.js +1 -54
- package/components/Empty/types.js +1 -1
- package/components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js +67 -52
- package/components/FileUpload/DropzoneFileUpload/ErrorItem.js +21 -52
- package/components/FileUpload/DropzoneFileUpload/FilePreview.js +23 -52
- package/components/FileUpload/DropzoneFileUpload/PreviewItem.js +30 -52
- package/components/FileUpload/DropzoneFileUpload/helpers.js +79 -52
- package/components/FileUpload/DropzoneFileUpload/index.js +1 -52
- package/components/FileUpload/FileUpload.js +69 -192
- package/components/FileUpload/UploadItems.js +22 -101
- package/components/FileUpload/index.js +3 -61
- package/components/FileUpload/types.js +6 -10
- package/components/FormContainer/FormContainer.js +43 -136
- package/components/FormContainer/index.js +1 -55
- package/components/FormContainer/types.js +1 -1
- package/components/FormField/FormField.js +17 -112
- package/components/FormField/index.js +1 -56
- package/components/FormField/types.js +1 -1
- package/components/Heading/Heading.js +5 -27
- package/components/Heading/index.js +1 -5
- package/components/Heading/types.js +1 -1
- package/components/Image/Image.js +12 -32
- package/components/Image/index.js +1 -2
- package/components/Image/types.js +1 -1
- package/components/Input/Input.js +68 -236
- package/components/Input/index.js +1 -58
- package/components/Input/types.js +1 -1
- package/components/Link/Link.js +14 -40
- package/components/Link/index.js +1 -3
- package/components/Link/types.js +1 -1
- package/components/Menu/Menu.js +47 -161
- package/components/Menu/NestedMenu.js +47 -173
- package/components/Menu/index.js +2 -72
- package/components/Menu/types.js +1 -1
- package/components/Modal/Modal.js +70 -52
- package/components/Modal/ModalConfirmation.js +30 -137
- package/components/Modal/ModalContent.js +10 -52
- package/components/Modal/index.js +2 -53
- package/components/Modal/types.js +1 -1
- package/components/More/More.js +19 -85
- package/components/More/index.js +1 -53
- package/components/More/types.js +1 -1
- package/components/Pagination/Pagination.js +15 -56
- package/components/Pagination/consts.js +5 -7
- package/components/Pagination/index.js +1 -10
- package/components/Pagination/types.js +1 -1
- package/components/Popover/Popover.js +41 -52
- package/components/Popover/PopoverDesktop.js +16 -69
- package/components/Popover/PopoverMobile.js +8 -52
- package/components/Popover/index.js +1 -52
- package/components/Popover/types.js +1 -1
- package/components/Progress/Progress.js +21 -56
- package/components/Progress/index.js +1 -2
- package/components/Progress/types.js +1 -1
- package/components/ProgressStep/ProgressStep.js +9 -38
- package/components/ProgressStep/Step.js +51 -98
- package/components/ProgressStep/consts.js +7 -9
- package/components/ProgressStep/index.js +1 -12
- package/components/ProgressStep/types.js +5 -7
- package/components/Radio/Radio.js +19 -56
- package/components/Radio/RadioGroup.js +21 -111
- package/components/Radio/index.js +2 -55
- package/components/Radio/types.js +1 -1
- package/components/SVGIcons/IconAdd.js +7 -28
- package/components/SVGIcons/IconAddCircle.js +7 -31
- package/components/SVGIcons/IconAddCircleFilled.js +7 -31
- package/components/SVGIcons/IconAddFilled.js +7 -28
- package/components/SVGIcons/IconAlert.js +7 -31
- package/components/SVGIcons/IconAlertBadge.js +7 -31
- package/components/SVGIcons/IconAlertBadgeFilled.js +7 -31
- package/components/SVGIcons/IconAlertFilled.js +7 -31
- package/components/SVGIcons/IconAm.js +6 -57
- package/components/SVGIcons/IconAmd.js +7 -28
- package/components/SVGIcons/IconAmdFilled.js +7 -28
- package/components/SVGIcons/IconApple.js +7 -31
- package/components/SVGIcons/IconArrowDown.js +7 -31
- package/components/SVGIcons/IconArrowDownFilled.js +7 -31
- package/components/SVGIcons/IconArrowDownLeft.js +7 -31
- package/components/SVGIcons/IconArrowDownLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowDownload.js +7 -31
- package/components/SVGIcons/IconArrowDownloadFilled.js +7 -31
- package/components/SVGIcons/IconArrowEnter.js +7 -28
- package/components/SVGIcons/IconArrowEnterFilled.js +7 -28
- package/components/SVGIcons/IconArrowExit.js +7 -28
- package/components/SVGIcons/IconArrowExitFilled.js +7 -28
- package/components/SVGIcons/IconArrowExportLeftToRight.js +7 -31
- package/components/SVGIcons/IconArrowExportLeftToRightFilled.js +7 -31
- package/components/SVGIcons/IconArrowExportRightToLeft.js +7 -31
- package/components/SVGIcons/IconArrowExportRightToLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowExportUp.js +7 -31
- package/components/SVGIcons/IconArrowExportUpFilled.js +7 -31
- package/components/SVGIcons/IconArrowImport.js +7 -31
- package/components/SVGIcons/IconArrowImportFilled.js +7 -31
- package/components/SVGIcons/IconArrowLeft.js +7 -31
- package/components/SVGIcons/IconArrowLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowRepeatAll.js +7 -31
- package/components/SVGIcons/IconArrowRepeatAllFilled.js +7 -31
- package/components/SVGIcons/IconArrowReset.js +7 -31
- package/components/SVGIcons/IconArrowResetFilled.js +7 -31
- package/components/SVGIcons/IconArrowRight.js +7 -31
- package/components/SVGIcons/IconArrowRightFilled.js +7 -31
- package/components/SVGIcons/IconArrowSort.js +7 -28
- package/components/SVGIcons/IconArrowSortFilled.js +7 -28
- package/components/SVGIcons/IconArrowSync.js +7 -28
- package/components/SVGIcons/IconArrowSyncFilled.js +7 -28
- package/components/SVGIcons/IconArrowUp.js +7 -31
- package/components/SVGIcons/IconArrowUpFilled.js +7 -31
- package/components/SVGIcons/IconArrowUpLeft.js +7 -31
- package/components/SVGIcons/IconArrowUpLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowUpRight.js +7 -31
- package/components/SVGIcons/IconArrowUpRightFilled.js +7 -31
- package/components/SVGIcons/IconAttach.js +7 -31
- package/components/SVGIcons/IconAttachFilled.js +7 -31
- package/components/SVGIcons/IconBeach.js +7 -28
- package/components/SVGIcons/IconBeachFilled.js +7 -28
- package/components/SVGIcons/IconBook.js +7 -31
- package/components/SVGIcons/IconBookFilled.js +7 -31
- package/components/SVGIcons/IconBookmark.js +7 -31
- package/components/SVGIcons/IconBookmarkFilled.js +7 -31
- package/components/SVGIcons/IconBriefcase.js +7 -31
- package/components/SVGIcons/IconBriefcaseFilled.js +7 -31
- package/components/SVGIcons/IconBuilding.js +7 -54
- package/components/SVGIcons/IconBuildingBank.js +7 -28
- package/components/SVGIcons/IconBuildingBankFilled.js +7 -28
- package/components/SVGIcons/IconBuildingFilled.js +7 -31
- package/components/SVGIcons/IconBulletListAdd.js +7 -31
- package/components/SVGIcons/IconBulletListAddFilled.js +7 -31
- package/components/SVGIcons/IconCalculator.js +7 -31
- package/components/SVGIcons/IconCalculatorFilled.js +7 -31
- package/components/SVGIcons/IconCalendarClock.js +7 -28
- package/components/SVGIcons/IconCalendarClockFilled.js +7 -28
- package/components/SVGIcons/IconCalendarDay.js +7 -31
- package/components/SVGIcons/IconCalendarDayFilled.js +7 -31
- package/components/SVGIcons/IconCalendarEmpty.js +7 -28
- package/components/SVGIcons/IconCalendarLeft.js +7 -28
- package/components/SVGIcons/IconCalendarLeftFilled.js +7 -28
- package/components/SVGIcons/IconCalendarRight.js +7 -28
- package/components/SVGIcons/IconCalendarRightFilled.js +7 -28
- package/components/SVGIcons/IconCall.js +7 -31
- package/components/SVGIcons/IconCallFilled.js +7 -31
- package/components/SVGIcons/IconCard.js +7 -28
- package/components/SVGIcons/IconCardFilled.js +7 -28
- package/components/SVGIcons/IconCaretDown.js +7 -28
- package/components/SVGIcons/IconCaretDownFilled.js +7 -28
- package/components/SVGIcons/IconCaretDownRight.js +7 -28
- package/components/SVGIcons/IconCaretDownRightFilled.js +7 -28
- package/components/SVGIcons/IconCaretLeft.js +7 -28
- package/components/SVGIcons/IconCaretLeftFilled.js +7 -28
- package/components/SVGIcons/IconCaretRight.js +7 -28
- package/components/SVGIcons/IconCaretRightFilled.js +7 -28
- package/components/SVGIcons/IconCaretUp.js +7 -28
- package/components/SVGIcons/IconCaretUpFilled.js +7 -28
- package/components/SVGIcons/IconChat.js +7 -28
- package/components/SVGIcons/IconChatFilled.js +7 -28
- package/components/SVGIcons/IconChatMultiple.js +7 -28
- package/components/SVGIcons/IconChatMultipleFilled.js +7 -28
- package/components/SVGIcons/IconCheckboxArrowRight.js +7 -31
- package/components/SVGIcons/IconCheckboxArrowRightFilled.js +7 -31
- package/components/SVGIcons/IconCheckmark.js +7 -28
- package/components/SVGIcons/IconCheckmarkCircle.js +7 -28
- package/components/SVGIcons/IconCheckmarkCircleFilled.js +7 -28
- package/components/SVGIcons/IconCheckmarkFilled.js +7 -28
- package/components/SVGIcons/IconChevronDoubleLeft.js +7 -28
- package/components/SVGIcons/IconChevronDoubleRight.js +7 -28
- package/components/SVGIcons/IconChevronDown.js +7 -28
- package/components/SVGIcons/IconChevronDownFilled.js +7 -28
- package/components/SVGIcons/IconChevronLeft.js +7 -28
- package/components/SVGIcons/IconChevronLeftFilled.js +7 -28
- package/components/SVGIcons/IconChevronRight.js +7 -28
- package/components/SVGIcons/IconChevronRightFilled.js +7 -28
- package/components/SVGIcons/IconChevronUp.js +7 -28
- package/components/SVGIcons/IconChevronUpDown.js +7 -31
- package/components/SVGIcons/IconChevronUpDownFilled.js +7 -31
- package/components/SVGIcons/IconChevronUpFilled.js +7 -28
- package/components/SVGIcons/IconClipboardDay.js +7 -28
- package/components/SVGIcons/IconClock.js +7 -31
- package/components/SVGIcons/IconClockDismiss.js +7 -28
- package/components/SVGIcons/IconClockDismissFilled.js +7 -28
- package/components/SVGIcons/IconClockFilled.js +7 -31
- package/components/SVGIcons/IconComment.js +7 -31
- package/components/SVGIcons/IconCommentFilled.js +7 -31
- package/components/SVGIcons/IconContractCard.js +7 -28
- package/components/SVGIcons/IconContractCardFilled.js +7 -28
- package/components/SVGIcons/IconCopy.js +7 -28
- package/components/SVGIcons/IconCopyFilled.js +7 -28
- package/components/SVGIcons/IconCubeTree.js +7 -28
- package/components/SVGIcons/IconCubeTreeFilled.js +7 -31
- package/components/SVGIcons/IconDatabase.js +7 -31
- package/components/SVGIcons/IconDatabaseFilled.js +7 -31
- package/components/SVGIcons/IconDelete.js +7 -28
- package/components/SVGIcons/IconDeleteFilled.js +7 -28
- package/components/SVGIcons/IconDeviceMeetingRoom.js +7 -28
- package/components/SVGIcons/IconDeviceMeetingRoomFilled.js +7 -28
- package/components/SVGIcons/IconDismiss.js +7 -28
- package/components/SVGIcons/IconDismissCircle.js +7 -31
- package/components/SVGIcons/IconDismissCircleFilled.js +7 -31
- package/components/SVGIcons/IconDismissFilled.js +7 -28
- package/components/SVGIcons/IconDocument.js +7 -28
- package/components/SVGIcons/IconDocumentBulletList.js +7 -31
- package/components/SVGIcons/IconDocumentBulletListFilled.js +7 -31
- package/components/SVGIcons/IconDocumentEdit.js +7 -28
- package/components/SVGIcons/IconDocumentEditFilled.js +7 -28
- package/components/SVGIcons/IconDocumentFilled.js +7 -28
- package/components/SVGIcons/IconDocumentPerson.js +7 -28
- package/components/SVGIcons/IconEdit.js +7 -28
- package/components/SVGIcons/IconEditFilled.js +7 -28
- package/components/SVGIcons/IconErrorCircle.js +7 -28
- package/components/SVGIcons/IconErrorCircleFilled.js +7 -28
- package/components/SVGIcons/IconEur.js +7 -28
- package/components/SVGIcons/IconEurFilled.js +7 -28
- package/components/SVGIcons/IconExpandUpLeft.js +7 -31
- package/components/SVGIcons/IconExpandUpLeftFilled.js +7 -31
- package/components/SVGIcons/IconExpandUpRight.js +7 -31
- package/components/SVGIcons/IconExpandUpRightFilled.js +7 -31
- package/components/SVGIcons/IconEyeOff.js +7 -31
- package/components/SVGIcons/IconEyeOffFilled.js +7 -31
- package/components/SVGIcons/IconEyeOn.js +7 -31
- package/components/SVGIcons/IconEyeOnFilled.js +7 -31
- package/components/SVGIcons/IconFacebook.js +7 -38
- package/components/SVGIcons/IconFilter.js +7 -28
- package/components/SVGIcons/IconFilterFilled.js +7 -28
- package/components/SVGIcons/IconFlag.js +7 -31
- package/components/SVGIcons/IconFlagFilled.js +7 -31
- package/components/SVGIcons/IconFolderLink.js +7 -28
- package/components/SVGIcons/IconFolderLinkFilled.js +7 -28
- package/components/SVGIcons/IconFood.js +7 -28
- package/components/SVGIcons/IconFoodFilled.js +7 -28
- package/components/SVGIcons/IconGb.js +6 -71
- package/components/SVGIcons/IconGlobe.js +7 -28
- package/components/SVGIcons/IconGlobeFilled.js +7 -28
- package/components/SVGIcons/IconGoogle.js +7 -40
- package/components/SVGIcons/IconHandOpenHeart.js +7 -31
- package/components/SVGIcons/IconHandOpenHeartFilled.js +7 -31
- package/components/SVGIcons/IconHeart.js +7 -31
- package/components/SVGIcons/IconHeartFilled.js +7 -31
- package/components/SVGIcons/IconHistory.js +7 -31
- package/components/SVGIcons/IconHistoryFilled.js +7 -31
- package/components/SVGIcons/IconHome.js +7 -31
- package/components/SVGIcons/IconHomeFilled.js +7 -31
- package/components/SVGIcons/IconImage.js +7 -31
- package/components/SVGIcons/IconImageFilled.js +7 -31
- package/components/SVGIcons/IconInfo.js +7 -28
- package/components/SVGIcons/IconInfoFilled.js +7 -28
- package/components/SVGIcons/IconInstagram.js +7 -39
- package/components/SVGIcons/IconKeyReset.js +7 -31
- package/components/SVGIcons/IconKeyResetFilled.js +7 -31
- package/components/SVGIcons/IconLink.js +7 -31
- package/components/SVGIcons/IconLinkFilled.js +7 -31
- package/components/SVGIcons/IconLinkedin.js +7 -31
- package/components/SVGIcons/IconList.js +7 -28
- package/components/SVGIcons/IconListFilled.js +7 -31
- package/components/SVGIcons/IconLocation.js +7 -31
- package/components/SVGIcons/IconLocationFilled.js +7 -31
- package/components/SVGIcons/IconLockClosed.js +7 -31
- package/components/SVGIcons/IconLockClosedFilled.js +7 -31
- package/components/SVGIcons/IconLockOpen.js +7 -31
- package/components/SVGIcons/IconLockOpenFilled.js +7 -31
- package/components/SVGIcons/IconMail.js +7 -31
- package/components/SVGIcons/IconMailAdd.js +7 -31
- package/components/SVGIcons/IconMailAddFilled.js +7 -31
- package/components/SVGIcons/IconMailArrowForward.js +7 -31
- package/components/SVGIcons/IconMailArrowForwardFilled.js +7 -31
- package/components/SVGIcons/IconMailFilled.js +7 -31
- package/components/SVGIcons/IconMailLink.js +7 -31
- package/components/SVGIcons/IconMailLinkFilled.js +7 -31
- package/components/SVGIcons/IconMedium.js +7 -31
- package/components/SVGIcons/IconMore.js +7 -31
- package/components/SVGIcons/IconMoreFilled.js +7 -31
- package/components/SVGIcons/IconMoreVertical.js +7 -31
- package/components/SVGIcons/IconMoreVerticalFilled.js +7 -31
- package/components/SVGIcons/IconNavigation.js +7 -31
- package/components/SVGIcons/IconNavigationFilled.js +7 -31
- package/components/SVGIcons/IconNotebook.js +7 -31
- package/components/SVGIcons/IconNotebookAdd.js +7 -47
- package/components/SVGIcons/IconNotebookAddFilled.js +7 -44
- package/components/SVGIcons/IconNotebookFilled.js +7 -31
- package/components/SVGIcons/IconOnlyEmployee.js +7 -28
- package/components/SVGIcons/IconOpen.js +7 -31
- package/components/SVGIcons/IconOpenFilled.js +7 -31
- package/components/SVGIcons/IconPatient.js +7 -28
- package/components/SVGIcons/IconPatientFilled.js +7 -28
- package/components/SVGIcons/IconPeople.js +7 -28
- package/components/SVGIcons/IconPeopleAdd.js +7 -31
- package/components/SVGIcons/IconPeopleAddFilled.js +7 -31
- package/components/SVGIcons/IconPeopleFilled.js +7 -31
- package/components/SVGIcons/IconPercent.js +7 -33
- package/components/SVGIcons/IconPerson.js +7 -31
- package/components/SVGIcons/IconPersonAccount.js +7 -28
- package/components/SVGIcons/IconPersonAccountFilled.js +7 -28
- package/components/SVGIcons/IconPersonAdd.js +7 -31
- package/components/SVGIcons/IconPersonAddFilled.js +7 -31
- package/components/SVGIcons/IconPersonArrowLeft.js +7 -28
- package/components/SVGIcons/IconPersonArrowLeftFilled.js +7 -28
- package/components/SVGIcons/IconPersonArrowRight.js +7 -28
- package/components/SVGIcons/IconPersonArrowRightFilled.js +7 -28
- package/components/SVGIcons/IconPersonBoard.js +7 -28
- package/components/SVGIcons/IconPersonFilled.js +7 -31
- package/components/SVGIcons/IconPersonMinus.js +7 -28
- package/components/SVGIcons/IconPersonStar.js +7 -31
- package/components/SVGIcons/IconPersonStarFilled.js +7 -31
- package/components/SVGIcons/IconPersonSubtract.js +7 -31
- package/components/SVGIcons/IconPersonSubtractFilled.js +7 -31
- package/components/SVGIcons/IconPhone.js +7 -31
- package/components/SVGIcons/IconPhoneFilled.js +7 -31
- package/components/SVGIcons/IconPlugConnected.js +7 -28
- package/components/SVGIcons/IconPos.js +7 -33
- package/components/SVGIcons/IconPosFilled.js +7 -33
- package/components/SVGIcons/IconProhibited.js +7 -31
- package/components/SVGIcons/IconProhibitedFilled.js +7 -31
- package/components/SVGIcons/IconProjectProduct.js +7 -28
- package/components/SVGIcons/IconQuestion.js +7 -31
- package/components/SVGIcons/IconQuestionFilled.js +7 -31
- package/components/SVGIcons/IconRedo.js +7 -31
- package/components/SVGIcons/IconRedoFilled.js +7 -31
- package/components/SVGIcons/IconRu.js +6 -60
- package/components/SVGIcons/IconRub.js +7 -28
- package/components/SVGIcons/IconRubFilled.js +7 -28
- package/components/SVGIcons/IconSave.js +7 -31
- package/components/SVGIcons/IconSaveFilled.js +7 -31
- package/components/SVGIcons/IconSavings.js +7 -31
- package/components/SVGIcons/IconSavingsFilled.js +7 -31
- package/components/SVGIcons/IconSearch.js +7 -31
- package/components/SVGIcons/IconSearchFilled.js +7 -31
- package/components/SVGIcons/IconSelectAllOff.js +7 -31
- package/components/SVGIcons/IconSelectAllOffFilled.js +7 -31
- package/components/SVGIcons/IconSelectAllOn.js +7 -31
- package/components/SVGIcons/IconSelectAllOnFilled.js +7 -31
- package/components/SVGIcons/IconSend.js +7 -31
- package/components/SVGIcons/IconSendFilled.js +7 -31
- package/components/SVGIcons/IconSettings.js +7 -28
- package/components/SVGIcons/IconSettingsFilled.js +7 -31
- package/components/SVGIcons/IconShare.js +7 -31
- package/components/SVGIcons/IconShareAndroid.js +7 -31
- package/components/SVGIcons/IconShareAndroidFilled.js +7 -31
- package/components/SVGIcons/IconShareFilled.js +7 -31
- package/components/SVGIcons/IconSignOut.js +7 -31
- package/components/SVGIcons/IconSignOutFilled.js +7 -31
- package/components/SVGIcons/IconSpinner.js +7 -31
- package/components/SVGIcons/IconSpinnerFilled.js +7 -31
- package/components/SVGIcons/IconStatus.js +7 -31
- package/components/SVGIcons/IconStatusFilled.js +7 -31
- package/components/SVGIcons/IconSubtract.js +7 -31
- package/components/SVGIcons/IconSubtractCircle.js +7 -31
- package/components/SVGIcons/IconSubtractCircleFilled.js +7 -31
- package/components/SVGIcons/IconSubtractFilled.js +7 -31
- package/components/SVGIcons/IconTableCellEdit.js +7 -35
- package/components/SVGIcons/IconTableCellEditFilled.js +7 -41
- package/components/SVGIcons/IconTelegram.js +7 -40
- package/components/SVGIcons/IconTimer.js +7 -31
- package/components/SVGIcons/IconTimerFilled.js +7 -31
- package/components/SVGIcons/IconTwitter.js +7 -31
- package/components/SVGIcons/IconUndo.js +7 -31
- package/components/SVGIcons/IconUndoFilled.js +7 -31
- package/components/SVGIcons/IconUnitsEmployee.js +7 -28
- package/components/SVGIcons/IconUpload.js +7 -28
- package/components/SVGIcons/IconUsd.js +7 -28
- package/components/SVGIcons/IconUsdFilled.js +7 -28
- package/components/SVGIcons/IconUserMinus.js +7 -31
- package/components/SVGIcons/IconVideo.js +7 -28
- package/components/SVGIcons/IconVideoFilled.js +7 -28
- package/components/SVGIcons/IconWallet.js +7 -31
- package/components/SVGIcons/IconWalletFilled.js +7 -31
- package/components/SVGIcons/IconWarning.js +7 -28
- package/components/SVGIcons/IconWarningFilled.js +7 -28
- package/components/SVGIcons/IconYoutube.js +7 -31
- package/components/SVGIcons/index.js +302 -305
- package/components/SVGIcons/types.js +1 -1
- package/components/Select/ButtonSelect/ButtonSelect.js +42 -195
- package/components/Select/FilterSelect/FilterDropdown.js +14 -95
- package/components/Select/FilterSelect/FilterGroupDropdown.js +18 -82
- package/components/Select/FilterSelect/FilterSelect.js +69 -199
- package/components/Select/MultiSelect/DesktopWrapper.js +18 -55
- package/components/Select/MultiSelect/MobileWrapper.js +12 -77
- package/components/Select/MultiSelect/MultiBase/MultiBase.js +60 -211
- package/components/Select/MultiSelect/MultiSelect.js +66 -244
- package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +94 -264
- package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +76 -251
- package/components/Select/MultiSelect/OptionsWrapper.js +64 -175
- package/components/Select/NestedSelect/NestedSelect.js +55 -197
- package/components/Select/ProfileDropdown/index.js +12 -82
- package/components/Select/Select/Select.js +85 -254
- package/components/Select/Select/SelectDesktop/index.js +66 -219
- package/components/Select/Select/SelectMobile/MobileTopContent.js +17 -90
- package/components/Select/Select/SelectMobile/index.js +49 -194
- package/components/Select/Select/helpers.js +8 -9
- package/components/Select/SharedComponents/Actions.js +13 -115
- package/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js +8 -43
- package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +27 -130
- package/components/Select/SharedComponents/ContentTop.js +70 -177
- package/components/Select/SharedComponents/Footer.js +10 -97
- package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +49 -161
- package/components/Select/SharedComponents/Loading.js +5 -16
- package/components/Select/SharedComponents/index.js +6 -92
- package/components/Select/constants.js +7 -9
- package/components/Select/index.js +6 -114
- package/components/Select/localization.js +28 -30
- package/components/Select/types.js +1 -1
- package/components/SideSheet/Footer/Footer.js +13 -99
- package/components/SideSheet/SideSheet.js +55 -208
- package/components/SideSheet/index.js +1 -56
- package/components/SideSheet/types.js +1 -1
- package/components/Snackbar/Snackbar.js +29 -123
- package/components/Snackbar/consts.js +11 -13
- package/components/Snackbar/index.js +1 -54
- package/components/Snackbar/types.js +1 -1
- package/components/Status/Status.js +16 -51
- package/components/Status/index.js +1 -8
- package/components/Status/types.js +1 -1
- package/components/Stepper/Stepper.js +28 -44
- package/components/Stepper/index.js +1 -3
- package/components/Stepper/types.js +1 -1
- package/components/Switcher/Switcher.js +17 -114
- package/components/Switcher/index.js +1 -55
- package/components/Switcher/types.js +1 -1
- package/components/Tab/Tab.js +18 -35
- package/components/Tab/TabItem.js +11 -52
- package/components/Tab/index.js +1 -11
- package/components/Tab/types.js +1 -1
- package/components/Table/Header.js +19 -121
- package/components/Table/IndeterminateCheckbox.js +13 -76
- package/components/Table/Row.js +16 -92
- package/components/Table/Table.js +60 -160
- package/components/Table/index.js +1 -61
- package/components/Table/types.js +1 -1
- package/components/Table/utils.js +17 -76
- package/components/TableV2/AdvancedPagination.js +61 -270
- package/components/TableV2/ColumnHeader.js +29 -61
- package/components/TableV2/ColumnSettings.js +31 -162
- package/components/TableV2/IndeterminateCheckbox.js +13 -84
- package/components/TableV2/Table.js +114 -310
- package/components/TableV2/constants/index.js +26 -22
- package/components/TableV2/hooks/useTableColumnSettings.js +16 -19
- package/components/TableV2/hooks/useTableControl.js +176 -297
- package/components/TableV2/index.js +3 -131
- package/components/TableV2/loadTableSettings.js +8 -17
- package/components/TableV2/types.js +1 -1
- package/components/Text/Text.js +5 -34
- package/components/Text/index.js +1 -5
- package/components/Text/types.js +1 -1
- package/components/Textarea/Textarea.js +36 -140
- package/components/Textarea/index.js +1 -56
- package/components/Textarea/types.js +1 -1
- package/components/Tooltip/Tooltip.js +49 -99
- package/components/Tooltip/index.js +1 -18
- package/components/Tooltip/types.js +11 -13
- package/consts/index.js +86 -65
- package/context/FormContextProvider.js +4 -10
- package/context/index.js +2 -5
- package/context/types.js +6 -10
- package/helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js +4 -12
- package/helperComponents/AnimatePresenceWrapper/index.js +1 -3
- package/helperComponents/CodeBlock/CodeBlock.js +4 -178
- package/helperComponents/CodeBlock/index.js +1 -3
- package/helperComponents/ErrorMessage/ErrorMessage.js +7 -26
- package/helperComponents/ErrorMessage/index.js +1 -8
- package/helperComponents/ErrorMessage/types.js +1 -1
- package/helperComponents/GoToWebPage/GoToWebPage.js +5 -66
- package/helperComponents/IconDynamicComponent/IconDynamicComponent.js +11 -25
- package/helperComponents/IconDynamicComponent/constants.js +10 -31
- package/helperComponents/IconDynamicComponent/index.js +1 -3
- package/helperComponents/Label/Label.js +8 -28
- package/helperComponents/Label/index.js +1 -6
- package/helperComponents/Label/types.js +1 -1
- package/helperComponents/Loader/Loader.js +4 -14
- package/helperComponents/Loader/index.js +1 -2
- package/helperComponents/Loader/types.js +1 -1
- package/helperComponents/OptionItem/OptionItem.js +27 -148
- package/helperComponents/OptionItem/index.js +1 -64
- package/helperComponents/OptionItem/types.js +1 -1
- package/helperComponents/index.js +6 -65
- package/helpers/check-authorization.js +57 -111
- package/helpers/download-file.js +7 -9
- package/helpers/format-date.js +14 -42
- package/helpers/get-module-prefix.js +3 -5
- package/helpers/index.js +7 -59
- package/helpers/isDeepEqual.js +11 -17
- package/helpers/locale.js +10 -15
- package/helpers/storage.js +17 -18
- package/hooks/index.js +12 -21
- package/hooks/useChangePositionsOnScroll.js +28 -32
- package/hooks/useDispatchEventOnScroll.js +8 -13
- package/hooks/useFormContext.js +3 -8
- package/hooks/useFormProps.js +3 -8
- package/hooks/useGetElemPositions.js +14 -16
- package/hooks/useGetElemSizes.js +11 -13
- package/hooks/useGetHasBottomSpace.js +13 -24
- package/hooks/useGetIsMobile.js +33 -45
- package/hooks/useGetTooltipPosition.js +66 -82
- package/hooks/useGetTooltipStyles.js +45 -87
- package/hooks/useHideBodyScroll.js +25 -34
- package/hooks/useHideOnScroll.js +19 -24
- package/hooks/useOnOutsideClick.js +33 -46
- package/hooks/useScreenSize.js +24 -34
- package/index.d.ts +1 -0
- package/index.js +47 -468
- package/package.json +1 -1
- package/type/file-upload.js +6 -8
- package/type/index.js +4 -4
- package/type/locale.js +12 -14
- package/type/notification.js +7 -9
- package/type/status-code.js +7 -9
- package/utils/helpers.js +63 -77
- /package/{Alert-BslI0aA0.js → Alert-CNizbUJ6.js} +0 -0
|
@@ -1,210 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
// @ts-nocheck
|
|
4
14
|
import React from 'react';
|
|
5
|
-
import { Input } from '../../Input
|
|
6
|
-
import
|
|
15
|
+
import { Input } from '../../Input';
|
|
16
|
+
import IconCalendarRight from '../../SVGIcons/IconCalendarRight';
|
|
7
17
|
import dayjs from 'dayjs';
|
|
8
|
-
import { useImportFilesDynamically } from '../hooks
|
|
9
|
-
import {
|
|
10
|
-
import '
|
|
11
|
-
import 'framer-motion';
|
|
12
|
-
import '../../../consts/index.js';
|
|
13
|
-
import '../../../hooks/useScreenSize.js';
|
|
14
|
-
import 'react-hook-form';
|
|
15
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
16
|
-
import { Label } from '../../../helperComponents/Label/Label.js';
|
|
17
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
18
|
-
import 'react-syntax-highlighter';
|
|
19
|
-
import { CustomHeader } from '../CustomHeader/CustomHeader.js';
|
|
18
|
+
import { useImportFilesDynamically } from '../hooks';
|
|
19
|
+
import { Modal } from '../../Modal';
|
|
20
|
+
import { CustomHeader } from '../CustomHeader/CustomHeader';
|
|
20
21
|
import DatePicker from 'react-datepicker';
|
|
21
|
-
import '
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
import '../../../hooks/useGetTooltipStyles.js';
|
|
48
|
-
import '../../../hooks/useGetElemSizes.js';
|
|
49
|
-
import '../../../hooks/useGetElemPositions.js';
|
|
50
|
-
import '../../../hooks/useGetTooltipPosition.js';
|
|
51
|
-
import '../../../hooks/useHideOnScroll.js';
|
|
52
|
-
import '../../Link/Link.js';
|
|
53
|
-
import '../../Popover/PopoverDesktop.js';
|
|
54
|
-
import '../../SVGIcons/IconInfo.js';
|
|
55
|
-
import '@babel/runtime/helpers/typeof';
|
|
56
|
-
import '../../SVGIcons/IconDismissFilled.js';
|
|
57
|
-
import '../../SVGIcons/IconDelete.js';
|
|
58
|
-
import '../../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
59
|
-
import '../../Progress/Progress.js';
|
|
60
|
-
import '../../SVGIcons/IconArrowDownloadFilled.js';
|
|
61
|
-
import '../../../helpers/download-file.js';
|
|
62
|
-
import '../../Button/consts.js';
|
|
63
|
-
import '@babel/runtime/helpers/asyncToGenerator';
|
|
64
|
-
import '@babel/runtime/regenerator';
|
|
65
|
-
import '../../Select/Select/Select.js';
|
|
66
|
-
import '../../Select/Select/SelectDesktop/index.js';
|
|
67
|
-
import 'react-window';
|
|
68
|
-
import '../../../helperComponents/OptionItem/OptionItem.js';
|
|
69
|
-
import '../../Avatar/Avatar.js';
|
|
70
|
-
import '../../FileUpload/FileUpload.js';
|
|
71
|
-
import '../../FileUpload/UploadItems.js';
|
|
72
|
-
import '../../../hooks/useFormProps.js';
|
|
73
|
-
import '../../../context/types.js';
|
|
74
|
-
import '../../SVGIcons/IconEditFilled.js';
|
|
75
|
-
import '../../SVGIcons/IconEdit.js';
|
|
76
|
-
import '../../SVGIcons/IconAttach.js';
|
|
77
|
-
import '../../SVGIcons/IconCheckmark.js';
|
|
78
|
-
import '../../../hooks/useGetHasBottomSpace.js';
|
|
79
|
-
import '../../../hooks/useChangePositionsOnScroll.js';
|
|
80
|
-
import '../../Empty/Empty.js';
|
|
81
|
-
import '../../Image/Image.js';
|
|
82
|
-
import 'react-dom';
|
|
83
|
-
import '../../Collapse/CollapseGroup/CollapseGroup.js';
|
|
84
|
-
import '../../Collapse/CollapseItem/CollapseItem.js';
|
|
85
|
-
import '../../SVGIcons/IconChevronRight.js';
|
|
86
|
-
import '../../Divider/Divider.js';
|
|
87
|
-
import '../../SVGIcons/IconChevronDown.js';
|
|
88
|
-
import '../../Select/SharedComponents/ContentTop.js';
|
|
89
|
-
import '../../Select/SharedComponents/Actions.js';
|
|
90
|
-
import '../../Menu/Menu.js';
|
|
91
|
-
import '../../SVGIcons/IconMore.js';
|
|
92
|
-
import '../../SVGIcons/IconSearchFilled.js';
|
|
93
|
-
import '../../SVGIcons/IconSelectAllOff.js';
|
|
94
|
-
import '../../SVGIcons/IconChevronLeft.js';
|
|
95
|
-
import '../../Select/SharedComponents/Loading.js';
|
|
96
|
-
import '../../Select/constants.js';
|
|
97
|
-
import '../../Select/Select/helpers.js';
|
|
98
|
-
import '../../Select/Select/SelectMobile/index.js';
|
|
99
|
-
import '../../Select/Select/SelectMobile/MobileTopContent.js';
|
|
100
|
-
import '../../SVGIcons/IconChevronUp.js';
|
|
101
|
-
import '../../Select/localization.js';
|
|
102
|
-
import '../../Select/MultiSelect/MultiSelect.js';
|
|
103
|
-
import '../../Select/MultiSelect/OptionsWrapper.js';
|
|
104
|
-
import '../../Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js';
|
|
105
|
-
import '../../SVGIcons/IconCaretUpFilled.js';
|
|
106
|
-
import '../../SVGIcons/IconCaretDownFilled.js';
|
|
107
|
-
import '../../Select/MultiSelect/MultiBase/MultiBase.js';
|
|
108
|
-
import '../../Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js';
|
|
109
|
-
import '../../Tab/Tab.js';
|
|
110
|
-
import '../../Tab/TabItem.js';
|
|
111
|
-
import '../../Badge/Badge.js';
|
|
112
|
-
import '../../Select/SharedComponents/Footer.js';
|
|
113
|
-
import '../../Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js';
|
|
114
|
-
import '../../Select/MultiSelect/MobileWrapper.js';
|
|
115
|
-
import '../../Select/MultiSelect/DesktopWrapper.js';
|
|
116
|
-
import '../../Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js';
|
|
117
|
-
import '../../Select/SharedComponents/ButtonSelectWrapper/Button/Button.js';
|
|
118
|
-
import '../../Select/ButtonSelect/ButtonSelect.js';
|
|
119
|
-
import '../CustomHeader/helpers.js';
|
|
120
|
-
import '../localization.js';
|
|
121
|
-
|
|
122
|
-
var _excluded = ["size", "dataId", "helperText", "label", "placeholderText", "format", "value", "currentDate", "minDate", "maxDate", "locale", "dataIdPrefix", "modalOptions", "name", "changeHandler", "setFieldValue", "required", "hasError"];
|
|
123
|
-
var SimpleDatePickerMobile = function SimpleDatePickerMobile(props) {
|
|
124
|
-
var size = props.size,
|
|
125
|
-
dataId = props.dataId,
|
|
126
|
-
helperText = props.helperText,
|
|
127
|
-
label = props.label,
|
|
128
|
-
placeholderText = props.placeholderText,
|
|
129
|
-
_props$format = props.format,
|
|
130
|
-
format = _props$format === void 0 ? 'M/D/YYYY' : _props$format,
|
|
131
|
-
value = props.value,
|
|
132
|
-
currentDate = props.currentDate,
|
|
133
|
-
minDate = props.minDate,
|
|
134
|
-
maxDate = props.maxDate,
|
|
135
|
-
_props$locale = props.locale,
|
|
136
|
-
locale = _props$locale === void 0 ? 'hy' : _props$locale,
|
|
137
|
-
dataIdPrefix = props.dataIdPrefix,
|
|
138
|
-
modalOptions = props.modalOptions,
|
|
139
|
-
name = props.name,
|
|
140
|
-
changeHandler = props.changeHandler,
|
|
141
|
-
setFieldValue = props.setFieldValue,
|
|
142
|
-
required = props.required,
|
|
143
|
-
hasError = props.hasError,
|
|
144
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
145
|
-
var startYear = minDate ? minDate.getFullYear() : 1900;
|
|
146
|
-
var endYear = maxDate ? maxDate.getFullYear() : new Date().getFullYear() + 5;
|
|
147
|
-
var _React$useState = React.useState(false),
|
|
148
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
149
|
-
isCalendarOpen = _React$useState2[0],
|
|
150
|
-
setIsCalendarOpen = _React$useState2[1];
|
|
151
|
-
useImportFilesDynamically(locale);
|
|
152
|
-
var selectedDate = value !== undefined && Object.prototype.toString.call(value) === '[object Date]' ? value : currentDate;
|
|
153
|
-
var openDatepicker = function openDatepicker() {
|
|
154
|
-
setIsCalendarOpen(true);
|
|
155
|
-
};
|
|
156
|
-
var closeDatepicker = function closeDatepicker() {
|
|
157
|
-
setIsCalendarOpen(false);
|
|
158
|
-
};
|
|
159
|
-
var onChange = function onChange(date) {
|
|
160
|
-
if (setFieldValue && name) {
|
|
161
|
-
setFieldValue(name, date);
|
|
162
|
-
}
|
|
163
|
-
if (changeHandler) {
|
|
164
|
-
changeHandler(date);
|
|
165
|
-
}
|
|
166
|
-
closeDatepicker();
|
|
167
|
-
};
|
|
168
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Label, {
|
|
169
|
-
text: label,
|
|
170
|
-
required: required,
|
|
171
|
-
invalid: hasError
|
|
172
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
173
|
-
size: size,
|
|
174
|
-
onClick: openDatepicker,
|
|
175
|
-
dataId: dataId,
|
|
176
|
-
readOnly: true,
|
|
177
|
-
helperText: helperText,
|
|
178
|
-
datePlaceHolderText: label ? '' : placeholderText,
|
|
179
|
-
rightIconProps: {
|
|
180
|
-
Component: IconCalendarRight,
|
|
181
|
-
onClick: openDatepicker
|
|
182
|
-
},
|
|
183
|
-
currentValue: selectedDate ? dayjs(selectedDate.toString()).format(format) : ''
|
|
184
|
-
}), /*#__PURE__*/React.createElement(Modal, {
|
|
185
|
-
isOpen: isCalendarOpen,
|
|
186
|
-
title: modalOptions === null || modalOptions === void 0 ? void 0 : modalOptions.title,
|
|
187
|
-
onClose: closeDatepicker,
|
|
188
|
-
withFooter: false,
|
|
189
|
-
closeIcon: true
|
|
190
|
-
}, /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
191
|
-
minDate: minDate,
|
|
192
|
-
maxDate: maxDate,
|
|
193
|
-
selected: dayjs(selectedDate).isValid() ? selectedDate : null,
|
|
194
|
-
locale: locale,
|
|
195
|
-
inline: true
|
|
196
|
-
}, rest, {
|
|
197
|
-
onChange: onChange,
|
|
198
|
-
renderCustomHeader: function renderCustomHeader(props) {
|
|
199
|
-
return /*#__PURE__*/React.createElement(CustomHeader, _extends({}, props, {
|
|
200
|
-
locale: locale,
|
|
201
|
-
startYear: startYear,
|
|
202
|
-
endYear: endYear,
|
|
203
|
-
dataPrefix: dataIdPrefix,
|
|
204
|
-
isMobile: true
|
|
205
|
-
}));
|
|
206
|
-
}
|
|
207
|
-
}))));
|
|
22
|
+
import { Label } from '../../../helperComponents';
|
|
23
|
+
export const SimpleDatePickerMobile = (props) => {
|
|
24
|
+
const { size, dataId, helperText, label, placeholderText, format = 'M/D/YYYY', value, currentDate, minDate, maxDate, locale = 'hy', dataIdPrefix, modalOptions, name, changeHandler, setFieldValue, required, hasError } = props, rest = __rest(props, ["size", "dataId", "helperText", "label", "placeholderText", "format", "value", "currentDate", "minDate", "maxDate", "locale", "dataIdPrefix", "modalOptions", "name", "changeHandler", "setFieldValue", "required", "hasError"]);
|
|
25
|
+
const startYear = minDate ? minDate.getFullYear() : 1900;
|
|
26
|
+
const endYear = maxDate ? maxDate.getFullYear() : new Date().getFullYear() + 5;
|
|
27
|
+
const [isCalendarOpen, setIsCalendarOpen] = React.useState(false);
|
|
28
|
+
useImportFilesDynamically(locale);
|
|
29
|
+
const selectedDate = value !== undefined && Object.prototype.toString.call(value) === '[object Date]'
|
|
30
|
+
? value
|
|
31
|
+
: currentDate;
|
|
32
|
+
const openDatepicker = () => {
|
|
33
|
+
setIsCalendarOpen(true);
|
|
34
|
+
};
|
|
35
|
+
const closeDatepicker = () => {
|
|
36
|
+
setIsCalendarOpen(false);
|
|
37
|
+
};
|
|
38
|
+
const onChange = (date) => {
|
|
39
|
+
if (setFieldValue && name) {
|
|
40
|
+
setFieldValue(name, date);
|
|
41
|
+
}
|
|
42
|
+
if (changeHandler) {
|
|
43
|
+
changeHandler(date);
|
|
44
|
+
}
|
|
45
|
+
closeDatepicker();
|
|
46
|
+
};
|
|
47
|
+
return (_jsxs(_Fragment, { children: [_jsx(Label, { text: label, required: required, invalid: hasError }), _jsx(Input, { size: size, onClick: openDatepicker, dataId: dataId, readOnly: true, helperText: helperText, datePlaceHolderText: label ? '' : placeholderText, rightIconProps: { Component: IconCalendarRight, onClick: openDatepicker }, currentValue: selectedDate ? dayjs(selectedDate.toString()).format(format) : '' }), _jsx(Modal, { isOpen: isCalendarOpen, title: modalOptions === null || modalOptions === void 0 ? void 0 : modalOptions.title, onClose: closeDatepicker, withFooter: false, closeIcon: true, children: _jsx(DatePicker, Object.assign({ minDate: minDate, maxDate: maxDate, selected: dayjs(selectedDate).isValid() ? selectedDate : null, locale: locale, inline: true }, rest, { onChange: onChange, renderCustomHeader: (props) => (_jsx(CustomHeader, Object.assign({}, props, { locale: locale, startYear: startYear, endYear: endYear, dataPrefix: dataIdPrefix, isMobile: true }))) })) })] }));
|
|
208
48
|
};
|
|
209
|
-
|
|
210
|
-
export { SimpleDatePickerMobile };
|
|
@@ -1,123 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
import 'react';
|
|
3
|
-
import './SimpleDatePickerDesktop.js';
|
|
4
|
-
import '@babel/runtime/helpers/extends';
|
|
5
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
6
|
-
import 'dayjs';
|
|
7
|
-
import 'react-datepicker';
|
|
8
|
-
import '../../Input/Input.js';
|
|
9
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
10
|
-
import 'react-input-mask';
|
|
11
|
-
import 'classnames';
|
|
12
|
-
import 'react-number-format';
|
|
13
|
-
import '../../../helperComponents/Label/Label.js';
|
|
14
|
-
import '../../Text/Text.js';
|
|
15
|
-
import '../../../utils/helpers.js';
|
|
16
|
-
import '../../../helperComponents/ErrorMessage/ErrorMessage.js';
|
|
17
|
-
import '../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
18
|
-
import '../../../helperComponents/IconDynamicComponent/constants.js';
|
|
19
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
20
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
21
|
-
import '../../../consts/index.js';
|
|
22
|
-
import '../../../type/file-upload.js';
|
|
23
|
-
import '../../../hooks/useScreenSize.js';
|
|
24
|
-
import 'react-hook-form';
|
|
25
|
-
import '../../../Alert-BslI0aA0.js';
|
|
26
|
-
import '../../Alert/consts.js';
|
|
27
|
-
import '../../../helperComponents/Loader/Loader.js';
|
|
28
|
-
import 'react-dropzone';
|
|
29
|
-
import '../../SVGIcons/IconUpload.js';
|
|
30
|
-
import '../../FileUpload/types.js';
|
|
31
|
-
import '../../../helpers/format-date.js';
|
|
32
|
-
import '../../../helpers/locale.js';
|
|
33
|
-
import '../../../type/locale.js';
|
|
34
|
-
import '../../../helpers/storage.js';
|
|
35
|
-
import 'react-toastify';
|
|
36
|
-
import '../../../hooks/useGetIsMobile.js';
|
|
37
|
-
import 'framer-motion';
|
|
38
|
-
import '../../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
39
|
-
import '../../../hooks/useOnOutsideClick.js';
|
|
40
|
-
import '../../../hooks/useHideBodyScroll.js';
|
|
41
|
-
import '../../SVGIcons/IconDismiss.js';
|
|
42
|
-
import '../../Tooltip/types.js';
|
|
43
|
-
import '../../Tooltip/Tooltip.js';
|
|
44
|
-
import '../../../hooks/useGetTooltipStyles.js';
|
|
45
|
-
import '../../../hooks/useGetElemSizes.js';
|
|
46
|
-
import '../../../hooks/useGetElemPositions.js';
|
|
47
|
-
import '../../../hooks/useGetTooltipPosition.js';
|
|
48
|
-
import '../../../hooks/useHideOnScroll.js';
|
|
49
|
-
import 'react-syntax-highlighter';
|
|
50
|
-
import '../../Link/Link.js';
|
|
51
|
-
import '../../Popover/PopoverDesktop.js';
|
|
52
|
-
import '../../SVGIcons/IconInfo.js';
|
|
53
|
-
import '@babel/runtime/helpers/typeof';
|
|
54
|
-
import '../../SVGIcons/IconDismissFilled.js';
|
|
55
|
-
import '../../SVGIcons/IconDelete.js';
|
|
56
|
-
import '../../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
57
|
-
import '../../Progress/Progress.js';
|
|
58
|
-
import '../../SVGIcons/IconArrowDownloadFilled.js';
|
|
59
|
-
import '../../../helpers/download-file.js';
|
|
60
|
-
import '../../Button/consts.js';
|
|
61
|
-
import '../../SVGIcons/IconCheckmarkCircleFilled.js';
|
|
62
|
-
import '../CustomHeader/CustomHeader.js';
|
|
63
|
-
import '../../Select/Select/Select.js';
|
|
64
|
-
import '../../Select/Select/SelectDesktop/index.js';
|
|
65
|
-
import 'react-window';
|
|
66
|
-
import '../../../helperComponents/OptionItem/OptionItem.js';
|
|
67
|
-
import '../../Avatar/Avatar.js';
|
|
68
|
-
import '../../FileUpload/FileUpload.js';
|
|
69
|
-
import '../../FileUpload/UploadItems.js';
|
|
70
|
-
import '../../../hooks/useFormProps.js';
|
|
71
|
-
import '../../../context/types.js';
|
|
72
|
-
import '../../SVGIcons/IconEditFilled.js';
|
|
73
|
-
import '../../SVGIcons/IconEdit.js';
|
|
74
|
-
import '../../SVGIcons/IconAttach.js';
|
|
75
|
-
import '../../SVGIcons/IconCheckmark.js';
|
|
76
|
-
import '../../../hooks/useGetHasBottomSpace.js';
|
|
77
|
-
import '../../../hooks/useChangePositionsOnScroll.js';
|
|
78
|
-
import '../../Empty/Empty.js';
|
|
79
|
-
import '../../Image/Image.js';
|
|
80
|
-
import 'react-dom';
|
|
81
|
-
import '../../Collapse/CollapseGroup/CollapseGroup.js';
|
|
82
|
-
import '../../Collapse/CollapseItem/CollapseItem.js';
|
|
83
|
-
import '../../SVGIcons/IconChevronRight.js';
|
|
84
|
-
import '../../Divider/Divider.js';
|
|
85
|
-
import '../../SVGIcons/IconChevronDown.js';
|
|
86
|
-
import '../../Select/SharedComponents/ContentTop.js';
|
|
87
|
-
import '../../Select/SharedComponents/Actions.js';
|
|
88
|
-
import '../../Menu/Menu.js';
|
|
89
|
-
import '../../SVGIcons/IconMore.js';
|
|
90
|
-
import '../../SVGIcons/IconSearchFilled.js';
|
|
91
|
-
import '../../SVGIcons/IconSelectAllOff.js';
|
|
92
|
-
import '../../SVGIcons/IconChevronLeft.js';
|
|
93
|
-
import '../../Select/SharedComponents/Loading.js';
|
|
94
|
-
import '../../Select/constants.js';
|
|
95
|
-
import '../../Select/Select/helpers.js';
|
|
96
|
-
import '../../Select/Select/SelectMobile/index.js';
|
|
97
|
-
import '../../Select/Select/SelectMobile/MobileTopContent.js';
|
|
98
|
-
import '../../SVGIcons/IconChevronUp.js';
|
|
99
|
-
import '../../Select/localization.js';
|
|
100
|
-
import '../../Select/MultiSelect/MultiSelect.js';
|
|
101
|
-
import '../../Select/MultiSelect/OptionsWrapper.js';
|
|
102
|
-
import '../../Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js';
|
|
103
|
-
import '../../SVGIcons/IconCaretUpFilled.js';
|
|
104
|
-
import '../../SVGIcons/IconCaretDownFilled.js';
|
|
105
|
-
import '../../Select/MultiSelect/MultiBase/MultiBase.js';
|
|
106
|
-
import '../../Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js';
|
|
107
|
-
import '../../Tab/Tab.js';
|
|
108
|
-
import '../../Tab/TabItem.js';
|
|
109
|
-
import '../../Badge/Badge.js';
|
|
110
|
-
import '../../Select/SharedComponents/Footer.js';
|
|
111
|
-
import '../../Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js';
|
|
112
|
-
import '../../Select/MultiSelect/MobileWrapper.js';
|
|
113
|
-
import '../../Select/MultiSelect/DesktopWrapper.js';
|
|
114
|
-
import '../../Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js';
|
|
115
|
-
import '../../Select/SharedComponents/ButtonSelectWrapper/Button/Button.js';
|
|
116
|
-
import '../../Select/ButtonSelect/ButtonSelect.js';
|
|
117
|
-
import '../CustomHeader/helpers.js';
|
|
118
|
-
import '../localization.js';
|
|
119
|
-
import '../hooks.js';
|
|
120
|
-
import '@babel/runtime/helpers/asyncToGenerator';
|
|
121
|
-
import '@babel/runtime/regenerator';
|
|
122
|
-
import '../../SVGIcons/IconCalendarRight.js';
|
|
123
|
-
import './SimpleDatePickerMobile.js';
|
|
1
|
+
export * from './SimpleDatePicker';
|
|
@@ -1,124 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import '../../Tooltip/types.js';
|
|
35
|
-
import '../../Tooltip/Tooltip.js';
|
|
36
|
-
import '../../../hooks/useGetTooltipStyles.js';
|
|
37
|
-
import '../../../hooks/useGetElemSizes.js';
|
|
38
|
-
import '../../../hooks/useGetElemPositions.js';
|
|
39
|
-
import '../../../hooks/useGetTooltipPosition.js';
|
|
40
|
-
import '../../../hooks/useHideOnScroll.js';
|
|
41
|
-
import '../../Link/Link.js';
|
|
42
|
-
import '../../Popover/PopoverDesktop.js';
|
|
43
|
-
import '../../SVGIcons/IconInfo.js';
|
|
44
|
-
import '../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
45
|
-
import '../../../helperComponents/IconDynamicComponent/constants.js';
|
|
46
|
-
import '@babel/runtime/helpers/typeof';
|
|
47
|
-
import '../../SVGIcons/IconDismissFilled.js';
|
|
48
|
-
import '../../SVGIcons/IconDelete.js';
|
|
49
|
-
import '../../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
50
|
-
import '../../Progress/Progress.js';
|
|
51
|
-
import '../../SVGIcons/IconArrowDownloadFilled.js';
|
|
52
|
-
import '../../../helpers/download-file.js';
|
|
53
|
-
import '../../Button/consts.js';
|
|
54
|
-
import './helpers.js';
|
|
55
|
-
|
|
56
|
-
function at(l){let g=React.useRef(l);return React.useEffect(()=>{g.current=l;}),React.useMemo(()=>(...b)=>{var h;return (h=g.current)==null?void 0:h.call(g,...b)},[])}function St({defaultProp:l,onChange:g}){let b=React.useState(l),[h]=b,i=React.useRef(h),v=at(g);return React.useEffect(()=>{i.current!==h&&(v(h),i.current=h);},[h,i,v]),b}function ct({prop:l,defaultProp:g,onChange:b=()=>{}}){let[h,i]=St({defaultProp:g,onChange:b}),v=l!==void 0,R=v?l:h,I=at(b),u=React.useCallback(T=>{if(v){let s=typeof T=="function"?T(l):T;s!==l&&I(s);}else i(T);},[v,l,i,I]);return [R,u]}var lt=.3,kt=30,Et=l=>Math.pow(l-1,3)+1,B=(l,g,b)=>Math.max(g,Math.min(l,b)),Ot=({className:l,children:g})=>React.createElement("div",{className:l,"data-rwp-wrapper":true},g),zt=({defaultValue:l,value:g,onValueChange:b,options:h,infinite:i=false,visibleCount:v=20,dragSensitivity:R=3,optionItemHeight:I=30,classNames:u})=>{var nt,rt;let[T=(rt=(nt=h[0])==null?void 0:nt.value)!=null?rt:"",j]=ct({defaultProp:l,prop:g,onChange:b}),s=useMemo(()=>{if(!i)return h;let t=[],n=Math.ceil(v/2);if(h.length===0)return t;for(;t.length<n;)t.push(...h);return t},[v,h,i]),d=I,X=d*.5,M=360/v,L=d/Math.tan(M*Math.PI/180),ut=Math.round(L*2+d*.25),S=v>>2,G=R*10,ht=10,p=useRef(null),W=useRef(null),H=useRef(null),m=useRef(0),Z=useRef(0),D=useRef(false),K=useRef(0),O=useRef({startY:0,yList:[],touchScroll:0,isClick:true}),z=useRef(null),dt=useMemo(()=>{let t=(e,r,o)=>React.createElement("li",{key:r,className:u==null?void 0:u.optionItem,"data-slot":"option-item","data-rwp-option":true,"data-index":r,style:{top:-X,height:d,lineHeight:`${d}px`,transform:`rotateX(${o}deg) translateZ(${L}px)`,visibility:"hidden"}},e.label),n=s.map((e,r)=>t(e,r,-M*r));if(i)for(let e=0;e<S;++e){let r=-e-1,o=e+s.length;n.unshift(t(s[s.length-e-1],r,M*(e+1))),n.push(t(s[e],o,-M*o));}return n},[d,X,i,M,s,S,L,u==null?void 0:u.optionItem]),gt=useMemo(()=>{let t=(e,r)=>React.createElement("li",{key:r,className:u==null?void 0:u.highlightItem,"data-slot":"highlight-item","data-rwp-highlight-item":true,style:{height:d}},e.label),n=s.map((e,r)=>t(e,r));if(i){let e=s[0],r=s[s.length-1];n.unshift(t(r,"infinite-start")),n.push(t(e,"infinite-end"));}return n},[u==null?void 0:u.highlightItem,d,i,s]),ft=useMemo(()=>{let t=0,n=Math.PI/180,e=[];for(let r=S-1;r>=-S+1;--r){let o=r*M,c=d*Math.cos(o*n),a=t;t+=c,e.push([a,t]);}return e},[M,d,S]),P=t=>(t%s.length+s.length)%s.length,C=t=>{let n=i?P(t):t;if(W.current){let e=`translateZ(${-L}px) rotateX(${M*n}deg)`;W.current.style.transform=e,W.current.childNodes.forEach(r=>{let o=r,c=Math.abs(Number(o.dataset.index)-n);o.style.visibility=c>S?"hidden":"visible";});}return H.current&&(H.current.style.transform=`translateY(${-n*d}px)`),n},x=()=>{cancelAnimationFrame(Z.current);},_=(t,n,e,r)=>{if(t===n||e===0){C(t);return}let o=performance.now(),c=n-t,a=f=>{let w=(f-o)/1e3;if(w<e){let $=Et(w/e);m.current=C(t+$*c),Z.current=requestAnimationFrame(a);}else x(),m.current=C(n),r==null||r();};requestAnimationFrame(a);},Y=t=>{let n=P(t)|0,e=i?n:Math.min(Math.max(n,0),s.length-1);if(!i&&e!==t)return;m.current=C(e);let r=s[m.current];j(r.value);},pt=t=>{let n=s.findIndex(e=>e.value===t);if(n===-1){console.error("Invalid value selected:",t);return}x(),Y(n);},J=t=>{let n=m.current,e=n+t;i?e=Math.round(e):e=B(Math.round(e),0,s.length-1);let r=Math.abs(e-n);if(r===0)return;let o=Math.sqrt(r/5);x(),_(n,e,o,()=>{Y(m.current);});},mt=t=>{let n=p.current;if(!n){console.error("Container reference is not set.");return}let{top:e}=n.getBoundingClientRect(),r=t-e,o=ft.findIndex(([a,f])=>r>=a&&r<=f);if(o===-1){console.error("No item found for click position:",r);return}let c=(S-o-1)*-1;J(c);},bt=t=>{var n,e;try{let r=(t instanceof MouseEvent?t.clientY:(e=(n=t.touches)==null?void 0:n[0])==null?void 0:e.clientY)||0,o=O.current;o.isClick&&Math.abs(r-o.startY)>5&&(o.isClick=!1),o.yList.push([r,Date.now()]),o.yList.length>5&&o.yList.shift();let c=(o.startY-r)/d,a=m.current+c;if(i)a=P(a);else {let f=s.length;a<0?a*=lt:a>f&&(a=f+(a-f)*lt);}o.touchScroll=C(a);}catch(r){console.error("Error in updateScrollDuringDrag:",r);}},Q=t=>{!D.current&&!p.current.contains(t.target)&&t.target!==p.current||(t.cancelable&&t.preventDefault(),s.length&&bt(t));},V=t=>{var n,e,r;try{D.current=!0;let o=new AbortController,{signal:c}=o;z.current=o;let a={signal:c,passive:!1};(n=p.current)==null||n.addEventListener("touchmove",Q,a),document.addEventListener("mousemove",Q,a);let f=(t instanceof MouseEvent?t.clientY:(r=(e=t.touches)==null?void 0:e[0])==null?void 0:r.clientY)||0,w=O.current;w.startY=f,w.yList=[[f,Date.now()]],w.touchScroll=m.current,w.isClick=!0,x();}catch(o){console.error("Error in initiateDragGesture:",o);}},F=useCallback(t=>{let n=D.current,e=p.current.contains(t.target)||t.target===p.current;(n||e)&&t.cancelable&&(t.preventDefault(),s.length&&V(t));},[V]),vt=t=>{let n=m.current,e=n,r=t>0?-G:G,o=0;if(i){o=Math.abs(t/r);let c=t*o+.5*r*o*o;e=Math.round(n+c);}else if(n<0||n>s.length-1){let c=B(n,0,s.length-1),a=n-c;r=ht,o=Math.sqrt(Math.abs(a/r)),t=r*o,t=n>0?-t:t,e=c;}else {o=Math.abs(t/r);let c=t*o+.5*r*o*o;e=Math.round(n+c),e=B(e,0,s.length-1);let a=e-n;o=Math.sqrt(Math.abs(a/r));}_(n,e,o,()=>{Y(m.current);}),Y(m.current);},N=()=>{var t,n,e,r;try{(t=z.current)==null||t.abort(),z.current=null;let o=O.current;if(o.isClick){mt(o.startY);return}let c=o.yList,a=0;if(c.length>1){let f=c.length,[w,$]=(n=c[f-2])!=null?n:[0,0],[wt,yt]=(e=c[f-1])!=null?e:[0,0],ot=yt-$;if(ot>0){let st=(w-wt)/d*1e3/ot,Mt=kt,Tt=st>0?1:-1;a=Math.min(Math.abs(st),Mt)*Tt;}}m.current=(r=o.touchScroll)!=null?r:m.current,vt(a);}catch(o){console.error("Error in finalizeDragAndStartInertiaScroll:",o);}finally{D.current=false;}},U=useCallback(t=>{if(!s.length)return;let n=D.current,e=p.current.contains(t.target)||t.target===p.current;(n||e)&&t.cancelable&&(t.preventDefault(),N());},[N]),tt=t=>{t.preventDefault();let n=Date.now();if(n-K.current<100)return;let e=Math.sign(t.deltaY);e&&(K.current=n,J(e));},et=useCallback(t=>{if(!s.length||!p.current)return;let n=D.current,e=p.current.contains(t.target)||t.target===p.current;(n||e)&&t.cancelable&&(t.preventDefault(),tt(t));},[tt]);return useEffect(()=>{let t=p.current;if(!t)return;let n=new AbortController,{signal:e}=n,r={signal:e,passive:false};return t.addEventListener("touchstart",F,r),t.addEventListener("touchend",U,r),t.addEventListener("wheel",et,r),document.addEventListener("mousedown",F,r),document.addEventListener("mouseup",U,r),()=>n.abort()},[U,F,et]),useEffect(()=>{pt(T);},[T,g,s]),React.createElement("div",{ref:p,"data-rwp":true,style:{height:ut}},React.createElement("ul",{ref:W,"data-rwp-options":true},dt),React.createElement("div",{className:u==null?void 0:u.highlightWrapper,"data-rwp-highlight-wrapper":true,"data-slot":"highlight-wrapper",style:{height:d,lineHeight:`${d}px`}},React.createElement("ul",{ref:H,"data-rwp-highlight-list":true,style:{top:i?-d:void 0}},gt)))};
|
|
57
|
-
|
|
58
|
-
var MobileModalContent = function MobileModalContent(_ref) {
|
|
59
|
-
var onApply = _ref.onApply,
|
|
60
|
-
isOpen = _ref.isOpen,
|
|
61
|
-
mobileTitle = _ref.mobileTitle,
|
|
62
|
-
_ref$modalApplyButton = _ref.modalApplyButtonText,
|
|
63
|
-
modalApplyButtonText = _ref$modalApplyButton === void 0 ? 'Apply' : _ref$modalApplyButton,
|
|
64
|
-
closeTimePicker = _ref.closeTimePicker,
|
|
65
|
-
_ref$dateInitialValue = _ref.dateInitialValue,
|
|
66
|
-
dateInitialValue = _ref$dateInitialValue === void 0 ? new Date() : _ref$dateInitialValue;
|
|
67
|
-
var _useState = useState("".concat(dateInitialValue.getHours())),
|
|
68
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
-
selectedHour = _useState2[0],
|
|
70
|
-
setSelectedHour = _useState2[1];
|
|
71
|
-
var _useState3 = useState("".concat(dateInitialValue.getMinutes())),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
selectedMinute = _useState4[0],
|
|
74
|
-
setSelectedMinute = _useState4[1];
|
|
75
|
-
var applyDate = function applyDate() {
|
|
76
|
-
var selectedDate = new Date();
|
|
77
|
-
selectedDate.setHours(+selectedHour, +selectedMinute, 0);
|
|
78
|
-
onApply(selectedDate);
|
|
79
|
-
};
|
|
80
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
81
|
-
isOpen: isOpen,
|
|
82
|
-
title: mobileTitle,
|
|
83
|
-
onClose: closeTimePicker,
|
|
84
|
-
className: "time-picker-mobile",
|
|
85
|
-
buttonProps: {
|
|
86
|
-
confirm: {
|
|
87
|
-
buttonText: modalApplyButtonText,
|
|
88
|
-
onClick: applyDate,
|
|
89
|
-
className: 'time_apply_button'
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
closeIcon: true
|
|
93
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
94
|
-
className: "mobile_time_picker"
|
|
95
|
-
}, /*#__PURE__*/React.createElement(Ot, {
|
|
96
|
-
className: "mobile_time_picker-wheel-picker"
|
|
97
|
-
}, /*#__PURE__*/React.createElement(zt, {
|
|
98
|
-
value: "".concat(selectedHour),
|
|
99
|
-
options: HOUR_OPTIONS,
|
|
100
|
-
infinite: true,
|
|
101
|
-
classNames: {
|
|
102
|
-
optionItem: 'mobile_time_picker-wheel-picker-item mobile_time_picker-wheel-picker-item__hour',
|
|
103
|
-
highlightWrapper: 'mobile_time_picker-wheel-picker-highlight',
|
|
104
|
-
highlightItem: 'mobile_time_picker-wheel-picker-highlight-item__hour'
|
|
105
|
-
},
|
|
106
|
-
onValueChange: function onValueChange(hour) {
|
|
107
|
-
setSelectedHour(hour);
|
|
108
|
-
}
|
|
109
|
-
}), /*#__PURE__*/React.createElement(zt, {
|
|
110
|
-
value: "".concat(selectedMinute),
|
|
111
|
-
options: MINUTE_OPTIONS,
|
|
112
|
-
infinite: true,
|
|
113
|
-
classNames: {
|
|
114
|
-
optionItem: 'mobile_time_picker-wheel-picker-item mobile_time_picker-wheel-picker-item__minute',
|
|
115
|
-
highlightWrapper: 'mobile_time_picker-wheel-picker-highlight',
|
|
116
|
-
highlightItem: 'mobile_time_picker-wheel-picker-highlight-item__minute'
|
|
117
|
-
},
|
|
118
|
-
onValueChange: function onValueChange(minute) {
|
|
119
|
-
setSelectedMinute(minute);
|
|
120
|
-
}
|
|
121
|
-
}))));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Modal } from '../../Modal';
|
|
4
|
+
import { HOUR_OPTIONS, MINUTE_OPTIONS } from './consts';
|
|
5
|
+
import { WheelPicker, WheelPickerWrapper } from '@ncdai/react-wheel-picker';
|
|
6
|
+
import '@ncdai/react-wheel-picker/style.css';
|
|
7
|
+
export const MobileModalContent = ({ onApply, isOpen, mobileTitle, modalApplyButtonText = 'Apply', closeTimePicker, dateInitialValue = new Date() }) => {
|
|
8
|
+
const [selectedHour, setSelectedHour] = useState(`${dateInitialValue.getHours()}`);
|
|
9
|
+
const [selectedMinute, setSelectedMinute] = useState(`${dateInitialValue.getMinutes()}`);
|
|
10
|
+
const applyDate = () => {
|
|
11
|
+
const selectedDate = new Date();
|
|
12
|
+
selectedDate.setHours(+selectedHour, +selectedMinute, 0);
|
|
13
|
+
onApply(selectedDate);
|
|
14
|
+
};
|
|
15
|
+
return (_jsx(Modal, { isOpen: isOpen, title: mobileTitle, onClose: closeTimePicker, className: "time-picker-mobile", buttonProps: {
|
|
16
|
+
confirm: {
|
|
17
|
+
buttonText: modalApplyButtonText,
|
|
18
|
+
onClick: applyDate,
|
|
19
|
+
className: 'time_apply_button'
|
|
20
|
+
}
|
|
21
|
+
}, closeIcon: true, children: _jsx("div", { className: "mobile_time_picker", children: _jsxs(WheelPickerWrapper, { className: "mobile_time_picker-wheel-picker", children: [_jsx(WheelPicker, { value: `${selectedHour}`, options: HOUR_OPTIONS, infinite: true, classNames: {
|
|
22
|
+
optionItem: 'mobile_time_picker-wheel-picker-item mobile_time_picker-wheel-picker-item__hour',
|
|
23
|
+
highlightWrapper: 'mobile_time_picker-wheel-picker-highlight',
|
|
24
|
+
highlightItem: 'mobile_time_picker-wheel-picker-highlight-item__hour'
|
|
25
|
+
}, onValueChange: (hour) => {
|
|
26
|
+
setSelectedHour(hour);
|
|
27
|
+
} }), _jsx(WheelPicker, { value: `${selectedMinute}`, options: MINUTE_OPTIONS, infinite: true, classNames: {
|
|
28
|
+
optionItem: 'mobile_time_picker-wheel-picker-item mobile_time_picker-wheel-picker-item__minute',
|
|
29
|
+
highlightWrapper: 'mobile_time_picker-wheel-picker-highlight',
|
|
30
|
+
highlightItem: 'mobile_time_picker-wheel-picker-highlight-item__minute'
|
|
31
|
+
}, onValueChange: (minute) => {
|
|
32
|
+
setSelectedMinute(minute);
|
|
33
|
+
} })] }) }) }));
|
|
122
34
|
};
|
|
123
|
-
|
|
124
|
-
export { MobileModalContent };
|
|
@@ -1,76 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useIsMobile } from '../../../hooks/useGetIsMobile
|
|
3
|
-
import { TimePickerMobile } from './TimePickerMobile
|
|
4
|
-
import { TimePickerDesktop } from './TimePickerDesktop
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import '../../../type/file-upload.js';
|
|
9
|
-
import '../../../helperComponents/Label/Label.js';
|
|
10
|
-
import '../../Text/Text.js';
|
|
11
|
-
import 'classnames';
|
|
12
|
-
import '../../../utils/helpers.js';
|
|
13
|
-
import 'dayjs';
|
|
14
|
-
import '@babel/runtime/helpers/extends';
|
|
15
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
16
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
17
|
-
import '../../../hooks/useScreenSize.js';
|
|
18
|
-
import 'react-hook-form';
|
|
19
|
-
import '../../../Alert-BslI0aA0.js';
|
|
20
|
-
import '../../Alert/consts.js';
|
|
21
|
-
import '../../../helperComponents/Loader/Loader.js';
|
|
22
|
-
import 'react-dropzone';
|
|
23
|
-
import '../../SVGIcons/IconUpload.js';
|
|
24
|
-
import '../../FileUpload/types.js';
|
|
25
|
-
import '../../../helpers/format-date.js';
|
|
26
|
-
import '../../../helpers/locale.js';
|
|
27
|
-
import '../../../type/locale.js';
|
|
28
|
-
import '../../../helpers/storage.js';
|
|
29
|
-
import 'react-toastify';
|
|
30
|
-
import 'framer-motion';
|
|
31
|
-
import '../../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
32
|
-
import '../../../hooks/useOnOutsideClick.js';
|
|
33
|
-
import '../../../hooks/useHideBodyScroll.js';
|
|
34
|
-
import '../../SVGIcons/IconDismiss.js';
|
|
35
|
-
import '../../Tooltip/types.js';
|
|
36
|
-
import '../../Tooltip/Tooltip.js';
|
|
37
|
-
import '../../../hooks/useGetTooltipStyles.js';
|
|
38
|
-
import '../../../hooks/useGetElemSizes.js';
|
|
39
|
-
import '../../../hooks/useGetElemPositions.js';
|
|
40
|
-
import '../../../hooks/useGetTooltipPosition.js';
|
|
41
|
-
import '../../../hooks/useHideOnScroll.js';
|
|
42
|
-
import 'react-syntax-highlighter';
|
|
43
|
-
import '../../Link/Link.js';
|
|
44
|
-
import '../../Popover/PopoverDesktop.js';
|
|
45
|
-
import '../../SVGIcons/IconInfo.js';
|
|
46
|
-
import '../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
47
|
-
import '../../../helperComponents/IconDynamicComponent/constants.js';
|
|
48
|
-
import '@babel/runtime/helpers/typeof';
|
|
49
|
-
import '../../SVGIcons/IconDismissFilled.js';
|
|
50
|
-
import '../../SVGIcons/IconDelete.js';
|
|
51
|
-
import '../../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
52
|
-
import '../../Progress/Progress.js';
|
|
53
|
-
import '../../SVGIcons/IconArrowDownloadFilled.js';
|
|
54
|
-
import '../../../helpers/download-file.js';
|
|
55
|
-
import '../../Button/consts.js';
|
|
56
|
-
import '../../Input/Input.js';
|
|
57
|
-
import 'react-input-mask';
|
|
58
|
-
import 'react-number-format';
|
|
59
|
-
import '../../../helperComponents/ErrorMessage/ErrorMessage.js';
|
|
60
|
-
import '../../SVGIcons/IconCheckmarkCircleFilled.js';
|
|
61
|
-
import '../../SVGIcons/IconCalendarRight.js';
|
|
62
|
-
import './MobileModalContent.js';
|
|
63
|
-
import './consts.js';
|
|
64
|
-
import './helpers.js';
|
|
65
|
-
import 'react-datepicker';
|
|
66
|
-
import '../hooks.js';
|
|
67
|
-
import '@babel/runtime/helpers/asyncToGenerator';
|
|
68
|
-
import '@babel/runtime/regenerator';
|
|
69
|
-
import '../../SVGIcons/IconClock.js';
|
|
70
|
-
|
|
71
|
-
var TimePicker = function TimePicker(props) {
|
|
72
|
-
var isMobile = useIsMobile();
|
|
73
|
-
return isMobile ? /*#__PURE__*/React.createElement(TimePickerMobile, props) : /*#__PURE__*/React.createElement(TimePickerDesktop, props);
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useIsMobile } from '../../../hooks/useGetIsMobile';
|
|
3
|
+
import { TimePickerMobile } from './TimePickerMobile';
|
|
4
|
+
import { TimePickerDesktop } from './TimePickerDesktop';
|
|
5
|
+
export const TimePicker = (props) => {
|
|
6
|
+
const isMobile = useIsMobile();
|
|
7
|
+
return isMobile ? _jsx(TimePickerMobile, Object.assign({}, props)) : _jsx(TimePickerDesktop, Object.assign({}, props));
|
|
74
8
|
};
|
|
75
|
-
|
|
76
|
-
export { TimePicker };
|