hrm_ui_lib 2.0.3 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/styles.css +525 -0
- package/assets/styles/styles.scss +3 -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/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.d.ts +4 -0
- package/components/SVGIcons/IconChevronDoubleLeft.js +8 -0
- package/components/SVGIcons/IconChevronDoubleRight.d.ts +4 -0
- package/components/SVGIcons/IconChevronDoubleRight.js +8 -0
- 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.d.ts +2 -0
- package/components/SVGIcons/index.js +302 -303
- 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.d.ts +8 -0
- package/components/TableV2/AdvancedPagination.js +62 -0
- package/components/TableV2/ColumnHeader.d.ts +9 -0
- package/components/TableV2/ColumnHeader.js +32 -0
- package/components/TableV2/ColumnSettings.d.ts +9 -0
- package/components/TableV2/ColumnSettings.js +33 -0
- package/components/TableV2/IndeterminateCheckbox.d.ts +13 -0
- package/components/TableV2/IndeterminateCheckbox.js +16 -0
- package/components/TableV2/Table.d.ts +3 -0
- package/components/TableV2/Table.js +123 -0
- package/components/TableV2/constants/index.d.ts +6 -0
- package/components/TableV2/constants/index.js +27 -0
- package/components/TableV2/hooks/useTableColumnSettings.d.ts +2 -0
- package/components/TableV2/hooks/useTableColumnSettings.js +17 -0
- package/components/TableV2/hooks/useTableControl.d.ts +11 -0
- package/components/TableV2/hooks/useTableControl.js +182 -0
- package/components/TableV2/index.d.ts +3 -0
- package/components/TableV2/index.js +3 -0
- package/components/TableV2/loadTableSettings.d.ts +2 -0
- package/components/TableV2/loadTableSettings.js +9 -0
- package/components/TableV2/types.d.ts +70 -0
- package/components/TableV2/types.js +1 -0
- 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 +46 -453
- package/package.json +5 -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-V_kH4Snn.js → Alert-sShHxUYN.js} +0 -0
|
@@ -1,253 +1,78 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import '
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
import '../../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
40
|
-
import '../../../../helperComponents/IconDynamicComponent/constants.js';
|
|
41
|
-
import '../../../SVGIcons/IconDelete.js';
|
|
42
|
-
import '../../../Alert/consts.js';
|
|
43
|
-
import '../../../../helperComponents/Loader/Loader.js';
|
|
44
|
-
import 'react-dropzone';
|
|
45
|
-
import '../../../SVGIcons/IconUpload.js';
|
|
46
|
-
import '../../../../helpers/format-date.js';
|
|
47
|
-
import '../../../../helpers/locale.js';
|
|
48
|
-
import '../../../../type/locale.js';
|
|
49
|
-
import '../../../../helpers/storage.js';
|
|
50
|
-
import 'react-toastify';
|
|
51
|
-
import '../../../../hooks/useGetIsMobile.js';
|
|
52
|
-
import '../../../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
53
|
-
import '../../../../hooks/useOnOutsideClick.js';
|
|
54
|
-
import '../../../../hooks/useHideBodyScroll.js';
|
|
55
|
-
import '../../../SVGIcons/IconDismiss.js';
|
|
56
|
-
import '../../../Tooltip/types.js';
|
|
57
|
-
import '../../../Tooltip/Tooltip.js';
|
|
58
|
-
import '../../../../hooks/useGetTooltipStyles.js';
|
|
59
|
-
import '../../../../hooks/useGetElemPositions.js';
|
|
60
|
-
import '../../../../hooks/useGetTooltipPosition.js';
|
|
61
|
-
import '../../../../hooks/useHideOnScroll.js';
|
|
62
|
-
import '../../../Link/Link.js';
|
|
63
|
-
import '../../../Popover/PopoverDesktop.js';
|
|
64
|
-
import '../../../SVGIcons/IconInfo.js';
|
|
65
|
-
import '@babel/runtime/helpers/typeof';
|
|
66
|
-
import '../../../SVGIcons/IconDismissFilled.js';
|
|
67
|
-
import '../../../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
68
|
-
import '../../../Progress/Progress.js';
|
|
69
|
-
import '../../../SVGIcons/IconArrowDownloadFilled.js';
|
|
70
|
-
import '../../../../helpers/download-file.js';
|
|
71
|
-
import '../../../Button/consts.js';
|
|
72
|
-
import '../../../SVGIcons/IconEditFilled.js';
|
|
73
|
-
import '../../../SVGIcons/IconEdit.js';
|
|
74
|
-
import '../../../SVGIcons/IconAttach.js';
|
|
75
|
-
import '../../../SVGIcons/IconCheckmark.js';
|
|
76
|
-
import '../../../Collapse/CollapseItem/CollapseItem.js';
|
|
77
|
-
import '../../../SVGIcons/IconChevronRight.js';
|
|
78
|
-
import '../../../SVGIcons/IconChevronDown.js';
|
|
79
|
-
import '../../SharedComponents/Actions.js';
|
|
80
|
-
import '../../../Menu/Menu.js';
|
|
81
|
-
import '../../../SVGIcons/IconMore.js';
|
|
82
|
-
import '../../../SVGIcons/IconSearchFilled.js';
|
|
83
|
-
import '../../../SVGIcons/IconSelectAllOff.js';
|
|
84
|
-
import '../../../SVGIcons/IconChevronLeft.js';
|
|
85
|
-
import 'react-input-mask';
|
|
86
|
-
import 'react-number-format';
|
|
87
|
-
import '../../../SVGIcons/IconCheckmarkCircleFilled.js';
|
|
88
|
-
|
|
89
|
-
var MultiSelectWithTabs = function MultiSelectWithTabs(props) {
|
|
90
|
-
var options = props.options,
|
|
91
|
-
scrollableContentStyle = props.scrollableContentStyle,
|
|
92
|
-
selectedValues = props.selectedValues,
|
|
93
|
-
onItemSelect = props.onItemSelect,
|
|
94
|
-
onItemDeselect = props.onItemDeselect,
|
|
95
|
-
setSelectedValues = props.setSelectedValues,
|
|
96
|
-
labelLeftIconProps = props.labelLeftIconProps,
|
|
97
|
-
optionRightIconComponent = props.optionRightIconComponent,
|
|
98
|
-
labelRightIconComponent = props.labelRightIconComponent,
|
|
99
|
-
helperText = props.helperText,
|
|
100
|
-
translations = props.translations,
|
|
101
|
-
isSearchAvailable = props.isSearchAvailable,
|
|
102
|
-
maxSelectCount = props.maxSelectCount,
|
|
103
|
-
menuOptions = props.menuOptions,
|
|
104
|
-
dataIdPrefix = props.dataIdPrefix,
|
|
105
|
-
closeDropdown = props.closeDropdown;
|
|
106
|
-
var emptyListMainMessage = translations.emptyListMainMessage,
|
|
107
|
-
emptyListSecondaryMessage = translations.emptyListSecondaryMessage;
|
|
108
|
-
var _useState = useState(null),
|
|
109
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
110
|
-
contentContainerRef = _useState2[0],
|
|
111
|
-
setContentContainerRef = _useState2[1];
|
|
112
|
-
var _useState3 = useState(0),
|
|
113
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
114
|
-
activeTab = _useState4[0],
|
|
115
|
-
setActiveTab = _useState4[1];
|
|
116
|
-
var _useGetElemSizes = useGetElemSizes(contentContainerRef),
|
|
117
|
-
scrollHeight = _useGetElemSizes.scrollHeight;
|
|
118
|
-
var _useState5 = useState(false),
|
|
119
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
120
|
-
isAllSelected = _useState6[0],
|
|
121
|
-
setAllSelected = _useState6[1];
|
|
122
|
-
var _useState7 = useState(''),
|
|
123
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
124
|
-
searchValue = _useState8[0],
|
|
125
|
-
setSearchValue = _useState8[1];
|
|
126
|
-
var currentTabData = options[activeTab].data;
|
|
127
|
-
var filteredData = useMemo(function () {
|
|
128
|
-
if (!searchValue) {
|
|
129
|
-
return currentTabData;
|
|
130
|
-
}
|
|
131
|
-
return currentTabData.filter(function (dataItem) {
|
|
132
|
-
return typeof dataItem.label === 'string' && dataItem.label.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase());
|
|
133
|
-
});
|
|
134
|
-
}, [searchValue, currentTabData]);
|
|
135
|
-
var clearAll = useCallback(function () {
|
|
136
|
-
setAllSelected(false);
|
|
137
|
-
var filteredValues = selectedValues.filter(function (selectedItem) {
|
|
138
|
-
var currentTabValues = currentTabData.map(function (item) {
|
|
139
|
-
return item.value;
|
|
140
|
-
});
|
|
141
|
-
return currentTabValues.indexOf(selectedItem.value) === -1;
|
|
142
|
-
});
|
|
143
|
-
setSelectedValues(filteredValues);
|
|
144
|
-
}, [selectedValues, activeTab, currentTabData]);
|
|
145
|
-
var onDeselect = function onDeselect(item) {
|
|
146
|
-
setAllSelected(false);
|
|
147
|
-
onItemDeselect(item);
|
|
148
|
-
};
|
|
149
|
-
var selectAll = useCallback(function () {
|
|
150
|
-
setAllSelected(true);
|
|
151
|
-
var allValues = filteredData.map(function (item) {
|
|
152
|
-
var value = item.value,
|
|
153
|
-
label = item.label;
|
|
154
|
-
return {
|
|
155
|
-
value: value,
|
|
156
|
-
label: label
|
|
157
|
-
};
|
|
158
|
-
});
|
|
159
|
-
setSelectedValues(selectedValues.concat(allValues));
|
|
160
|
-
}, [activeTab, selectedValues, filteredData]);
|
|
161
|
-
var tabs = useMemo(function () {
|
|
162
|
-
return options.map(function (option, index) {
|
|
163
|
-
return {
|
|
164
|
-
label: option.title,
|
|
165
|
-
value: index
|
|
166
|
-
};
|
|
167
|
-
});
|
|
168
|
-
}, [options]);
|
|
169
|
-
var onTabSelect = function onTabSelect(selected) {
|
|
170
|
-
setActiveTab(selected);
|
|
171
|
-
setSearchValue('');
|
|
172
|
-
};
|
|
173
|
-
var selectedOptions = useMemo(function () {
|
|
174
|
-
return options.reduce(function (acc, option) {
|
|
175
|
-
var data = option.data;
|
|
176
|
-
var selectedItems = data.filter(function (item) {
|
|
177
|
-
return selectedValues.findIndex(function (s) {
|
|
178
|
-
return s.value === item.value;
|
|
179
|
-
}) !== -1;
|
|
180
|
-
});
|
|
181
|
-
return [].concat(_toConsumableArray(acc), _toConsumableArray(selectedItems));
|
|
182
|
-
}, []);
|
|
183
|
-
}, [options, selectedValues]);
|
|
184
|
-
var optionProps = useMemo(function () {
|
|
185
|
-
return {
|
|
186
|
-
isCheckbox: true,
|
|
187
|
-
labelLeftIconProps: labelLeftIconProps,
|
|
188
|
-
optionRightIconComponent: optionRightIconComponent,
|
|
189
|
-
labelRightIconComponent: labelRightIconComponent
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { Divider } from '../../../Divider';
|
|
4
|
+
import { Empty } from '../../../Empty';
|
|
5
|
+
import { Tab } from '../../../Tab';
|
|
6
|
+
import { useGetElemSizes } from '../../../../hooks';
|
|
7
|
+
import { OptionItem } from '../../../../helperComponents';
|
|
8
|
+
import { ContentTop } from '../../SharedComponents';
|
|
9
|
+
import { DROPDOWN_MAX_HEIGHT } from '../../constants';
|
|
10
|
+
export const MultiSelectWithTabs = (props) => {
|
|
11
|
+
const { options, scrollableContentStyle, selectedValues, onItemSelect, onItemDeselect, setSelectedValues, labelLeftIconProps, optionRightIconComponent, labelRightIconComponent, helperText, translations, isSearchAvailable, maxSelectCount, menuOptions, dataIdPrefix, closeDropdown } = props;
|
|
12
|
+
const { emptyListMainMessage, emptyListSecondaryMessage } = translations;
|
|
13
|
+
const [contentContainerRef, setContentContainerRef] = useState(null);
|
|
14
|
+
const [activeTab, setActiveTab] = useState(0);
|
|
15
|
+
const { scrollHeight } = useGetElemSizes(contentContainerRef);
|
|
16
|
+
const [isAllSelected, setAllSelected] = useState(false);
|
|
17
|
+
const [searchValue, setSearchValue] = useState('');
|
|
18
|
+
const currentTabData = options[activeTab].data;
|
|
19
|
+
const filteredData = useMemo(() => {
|
|
20
|
+
if (!searchValue) {
|
|
21
|
+
return currentTabData;
|
|
22
|
+
}
|
|
23
|
+
return currentTabData.filter((dataItem) => {
|
|
24
|
+
return (typeof dataItem.label === 'string' &&
|
|
25
|
+
dataItem.label.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()));
|
|
26
|
+
});
|
|
27
|
+
}, [searchValue, currentTabData]);
|
|
28
|
+
const clearAll = useCallback(() => {
|
|
29
|
+
setAllSelected(false);
|
|
30
|
+
const filteredValues = selectedValues.filter((selectedItem) => {
|
|
31
|
+
const currentTabValues = currentTabData.map((item) => item.value);
|
|
32
|
+
return currentTabValues.indexOf(selectedItem.value) === -1;
|
|
33
|
+
});
|
|
34
|
+
setSelectedValues(filteredValues);
|
|
35
|
+
}, [selectedValues, activeTab, currentTabData]);
|
|
36
|
+
const onDeselect = (item) => {
|
|
37
|
+
setAllSelected(false);
|
|
38
|
+
onItemDeselect(item);
|
|
190
39
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
isSelected: true
|
|
230
|
-
}, optionProps));
|
|
231
|
-
})), /*#__PURE__*/React.createElement(Divider, {
|
|
232
|
-
type: "primary",
|
|
233
|
-
isHorizontal: true
|
|
234
|
-
}), filteredData.map(function (item) {
|
|
235
|
-
var isSelected = selectedValues.findIndex(function (s) {
|
|
236
|
-
return s.value === item.value;
|
|
237
|
-
}) !== -1;
|
|
238
|
-
return /*#__PURE__*/React.createElement(OptionItem, _extends({
|
|
239
|
-
data: item,
|
|
240
|
-
dataId: item.dataId,
|
|
241
|
-
key: item.value,
|
|
242
|
-
onClick: isSelected ? onDeselect : onItemSelect,
|
|
243
|
-
disabled: item.disabled || !isSelected && selectedValues.length === maxSelectCount,
|
|
244
|
-
isSelected: isSelected
|
|
245
|
-
}, optionProps));
|
|
246
|
-
}), filteredData.length === 0 ? /*#__PURE__*/React.createElement(Empty, {
|
|
247
|
-
size: "small",
|
|
248
|
-
mainMessage: emptyListMainMessage,
|
|
249
|
-
paragraphMessage: emptyListSecondaryMessage
|
|
250
|
-
}) : null));
|
|
40
|
+
const selectAll = useCallback(() => {
|
|
41
|
+
setAllSelected(true);
|
|
42
|
+
const allValues = filteredData.map((item) => {
|
|
43
|
+
const { value, label } = item;
|
|
44
|
+
return { value, label };
|
|
45
|
+
});
|
|
46
|
+
setSelectedValues(selectedValues.concat(allValues));
|
|
47
|
+
}, [activeTab, selectedValues, filteredData]);
|
|
48
|
+
const tabs = useMemo(() => {
|
|
49
|
+
return options.map((option, index) => {
|
|
50
|
+
return { label: option.title, value: index };
|
|
51
|
+
});
|
|
52
|
+
}, [options]);
|
|
53
|
+
const onTabSelect = (selected) => {
|
|
54
|
+
setActiveTab(selected);
|
|
55
|
+
setSearchValue('');
|
|
56
|
+
};
|
|
57
|
+
const selectedOptions = useMemo(() => {
|
|
58
|
+
return options.reduce((acc, option) => {
|
|
59
|
+
const { data } = option;
|
|
60
|
+
const selectedItems = data.filter((item) => selectedValues.findIndex((s) => s.value === item.value) !== -1);
|
|
61
|
+
return [...acc, ...selectedItems];
|
|
62
|
+
}, []);
|
|
63
|
+
}, [options, selectedValues]);
|
|
64
|
+
const optionProps = useMemo(() => {
|
|
65
|
+
return {
|
|
66
|
+
isCheckbox: true,
|
|
67
|
+
labelLeftIconProps,
|
|
68
|
+
optionRightIconComponent,
|
|
69
|
+
labelRightIconComponent
|
|
70
|
+
};
|
|
71
|
+
}, [labelLeftIconProps, optionRightIconComponent, labelRightIconComponent]);
|
|
72
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "tab_container", style: { padding: '0 20px', width: '100%' }, children: _jsx(Tab, { selectedValue: activeTab, tabItems: tabs, onSelect: onTabSelect, size: "small" }) }), _jsx(ContentTop, { closeDropdown: closeDropdown, dataIdPrefix: dataIdPrefix, menuOptions: menuOptions, isSearchAvailable: isSearchAvailable, clearAll: clearAll, selectAll: selectAll, helperText: helperText, searchValue: searchValue, translations: translations, setSearchValue: setSearchValue, hasLimitation: !!maxSelectCount, isAnySelected: selectedValues.length === 0, isSelectAllDisabled: isAllSelected || filteredData.length === 0 }), _jsxs("div", { ref: setContentContainerRef, className: `select__options__scroll scrollbar scrollbar--vertical ${scrollHeight > DROPDOWN_MAX_HEIGHT ? 'mr-6' : ''}`, style: scrollableContentStyle, children: [isSearchAvailable && (_jsx("div", { className: "selected_container", children: selectedOptions.map((selectedItem) => {
|
|
73
|
+
return (_jsx(OptionItem, Object.assign({ data: selectedItem, onClick: onDeselect, disabled: selectedItem.disabled, isSelected: true }, optionProps), selectedItem.value));
|
|
74
|
+
}) })), _jsx(Divider, { type: "primary", isHorizontal: true }), filteredData.map((item) => {
|
|
75
|
+
const isSelected = selectedValues.findIndex((s) => s.value === item.value) !== -1;
|
|
76
|
+
return (_jsx(OptionItem, Object.assign({ data: item, dataId: item.dataId, onClick: isSelected ? onDeselect : onItemSelect, disabled: item.disabled || (!isSelected && selectedValues.length === maxSelectCount), isSelected: isSelected }, optionProps), item.value));
|
|
77
|
+
}), filteredData.length === 0 ? (_jsx(Empty, { size: "small", mainMessage: emptyListMainMessage, paragraphMessage: emptyListSecondaryMessage })) : null] })] }));
|
|
251
78
|
};
|
|
252
|
-
|
|
253
|
-
export { MultiSelectWithTabs };
|
|
@@ -1,177 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import 'react
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import '../
|
|
20
|
-
import {
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
import '../../SVGIcons/IconArrowDownloadFilled.js';
|
|
61
|
-
import '../../../helpers/download-file.js';
|
|
62
|
-
import '../../Button/consts.js';
|
|
63
|
-
import '../../Collapse/CollapseItem/CollapseItem.js';
|
|
64
|
-
import '../../SVGIcons/IconChevronRight.js';
|
|
65
|
-
import '../../Divider/Divider.js';
|
|
66
|
-
import '../../SVGIcons/IconChevronDown.js';
|
|
67
|
-
import '../SharedComponents/Actions.js';
|
|
68
|
-
import '../../Menu/Menu.js';
|
|
69
|
-
import '../../../helperComponents/OptionItem/OptionItem.js';
|
|
70
|
-
import '../../Avatar/Avatar.js';
|
|
71
|
-
import '../../FileUpload/FileUpload.js';
|
|
72
|
-
import '../../../helperComponents/Label/Label.js';
|
|
73
|
-
import '../../FileUpload/UploadItems.js';
|
|
74
|
-
import '../../../hooks/useFormProps.js';
|
|
75
|
-
import '../../../context/types.js';
|
|
76
|
-
import '../../../helperComponents/ErrorMessage/ErrorMessage.js';
|
|
77
|
-
import '../../SVGIcons/IconEditFilled.js';
|
|
78
|
-
import '../../SVGIcons/IconEdit.js';
|
|
79
|
-
import '../../SVGIcons/IconAttach.js';
|
|
80
|
-
import '../../SVGIcons/IconCheckmark.js';
|
|
81
|
-
import '../../SVGIcons/IconMore.js';
|
|
82
|
-
import '../../SVGIcons/IconSearchFilled.js';
|
|
83
|
-
import '../../SVGIcons/IconSelectAllOff.js';
|
|
84
|
-
import '../../SVGIcons/IconChevronLeft.js';
|
|
85
|
-
import 'react-input-mask';
|
|
86
|
-
import 'react-number-format';
|
|
87
|
-
import '../../SVGIcons/IconCheckmarkCircleFilled.js';
|
|
88
|
-
import '../../Empty/Empty.js';
|
|
89
|
-
import '../../Image/Image.js';
|
|
90
|
-
import '../../SVGIcons/IconCaretUpFilled.js';
|
|
91
|
-
import '../../SVGIcons/IconCaretDownFilled.js';
|
|
92
|
-
import 'react-window';
|
|
93
|
-
import '../../Tab/Tab.js';
|
|
94
|
-
import '../../Tab/TabItem.js';
|
|
95
|
-
import '../../Badge/Badge.js';
|
|
96
|
-
|
|
97
|
-
var _excluded = ["isLoading", "withTabs", "isGrouped", "isOpen", "containerRef", "options", "selectedValues", "setSelectedValues", "setIsOpen", "dropdownRef", "isMobileFullScreen"];
|
|
98
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
99
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
100
|
-
var OptionsWrapper = function OptionsWrapper(props) {
|
|
101
|
-
var isLoading = props.isLoading,
|
|
102
|
-
withTabs = props.withTabs,
|
|
103
|
-
isGrouped = props.isGrouped,
|
|
104
|
-
isOpen = props.isOpen,
|
|
105
|
-
containerRef = props.containerRef,
|
|
106
|
-
options = props.options,
|
|
107
|
-
selectedValues = props.selectedValues,
|
|
108
|
-
setSelectedValues = props.setSelectedValues,
|
|
109
|
-
setIsOpen = props.setIsOpen,
|
|
110
|
-
dropdownRef = props.dropdownRef,
|
|
111
|
-
isMobileFullScreen = props.isMobileFullScreen,
|
|
112
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
113
|
-
var _useGetElemSizes = useGetElemSizes(containerRef),
|
|
114
|
-
width = _useGetElemSizes.width;
|
|
115
|
-
var inputRef = useRef(null);
|
|
116
|
-
var SelectComp = withTabs ? MultiSelectWithTabs : isGrouped ? MultiSelectGrouped : MultiBase;
|
|
117
|
-
var checkIsValueOverflowed = useCallback(function (value) {
|
|
118
|
-
var elemWidth = getStringWidth(value, 14);
|
|
119
|
-
return elemWidth > width - 80; // padding and width of (+number)
|
|
120
|
-
}, [width]);
|
|
121
|
-
var onItemSelect = function onItemSelect(item) {
|
|
122
|
-
setSelectedValues([].concat(_toConsumableArray(selectedValues), [item]));
|
|
123
|
-
};
|
|
124
|
-
var onItemDeselect = function onItemDeselect(item) {
|
|
125
|
-
setSelectedValues(selectedValues.filter(function (optionValue) {
|
|
126
|
-
return optionValue.value !== item.value;
|
|
127
|
-
}));
|
|
128
|
-
};
|
|
129
|
-
var optionsCount = useMemo(function () {
|
|
130
|
-
if (isGrouped || withTabs) {
|
|
131
|
-
// @ts-ignore
|
|
132
|
-
var typed_options = options;
|
|
133
|
-
return typed_options.reduce(function (acc, option) {
|
|
134
|
-
var data = option.data;
|
|
135
|
-
return acc + data.length;
|
|
136
|
-
}, 0);
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import { useCallback, useMemo, useRef } from 'react';
|
|
14
|
+
import { Loading } from '../SharedComponents';
|
|
15
|
+
import { MultiSelectGrouped } from './MultiSelectGrouped/MultiSelectGrouped';
|
|
16
|
+
import { MultiBase } from './MultiBase/MultiBase';
|
|
17
|
+
import { MultiSelectWithTabs } from './MultiSelectWithTabs/MultiSelectWithTabs';
|
|
18
|
+
import { getStringWidth } from '../../../utils/helpers';
|
|
19
|
+
import { SELECTED_VISIBLE_MIN_COUNT } from '../constants';
|
|
20
|
+
import { useGetElemSizes, useGetHasBottomSpace, useGetHasTopSpace } from '../../../hooks';
|
|
21
|
+
import { useIsMobile } from '../../../hooks/useGetIsMobile';
|
|
22
|
+
export const OptionsWrapper = (props) => {
|
|
23
|
+
const { isLoading, withTabs, isGrouped, isOpen, containerRef, options, selectedValues, setSelectedValues, setIsOpen, dropdownRef, isMobileFullScreen } = props, rest = __rest(props, ["isLoading", "withTabs", "isGrouped", "isOpen", "containerRef", "options", "selectedValues", "setSelectedValues", "setIsOpen", "dropdownRef", "isMobileFullScreen"]);
|
|
24
|
+
const { width } = useGetElemSizes(containerRef);
|
|
25
|
+
const inputRef = useRef(null);
|
|
26
|
+
const SelectComp = withTabs ? MultiSelectWithTabs : isGrouped ? MultiSelectGrouped : MultiBase;
|
|
27
|
+
const checkIsValueOverflowed = useCallback((value) => {
|
|
28
|
+
const elemWidth = getStringWidth(value, 14);
|
|
29
|
+
return elemWidth > width - 80; // padding and width of (+number)
|
|
30
|
+
}, [width]);
|
|
31
|
+
const onItemSelect = (item) => {
|
|
32
|
+
setSelectedValues([...selectedValues, item]);
|
|
33
|
+
};
|
|
34
|
+
const onItemDeselect = (item) => {
|
|
35
|
+
setSelectedValues(selectedValues.filter((optionValue) => optionValue.value !== item.value));
|
|
36
|
+
};
|
|
37
|
+
const optionsCount = useMemo(() => {
|
|
38
|
+
if (isGrouped || withTabs) {
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
const typed_options = options;
|
|
41
|
+
return typed_options.reduce((acc, option) => {
|
|
42
|
+
const { data } = option;
|
|
43
|
+
return acc + data.length;
|
|
44
|
+
}, 0);
|
|
45
|
+
}
|
|
46
|
+
return options.length;
|
|
47
|
+
}, [options]);
|
|
48
|
+
const { hasBottomSpace, bottomSpace } = useGetHasBottomSpace({
|
|
49
|
+
element: dropdownRef,
|
|
50
|
+
input: inputRef.current
|
|
51
|
+
});
|
|
52
|
+
const hasTopSpace = useGetHasTopSpace({
|
|
53
|
+
element: dropdownRef,
|
|
54
|
+
input: inputRef.current
|
|
55
|
+
});
|
|
56
|
+
const _isMobile = useIsMobile();
|
|
57
|
+
const isMobile = _isMobile && isMobileFullScreen;
|
|
58
|
+
if (isLoading) {
|
|
59
|
+
return _jsx(Loading, {});
|
|
137
60
|
}
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}),
|
|
144
|
-
hasBottomSpace = _useGetHasBottomSpace.hasBottomSpace,
|
|
145
|
-
bottomSpace = _useGetHasBottomSpace.bottomSpace;
|
|
146
|
-
var hasTopSpace = useGetHasTopSpace({
|
|
147
|
-
element: dropdownRef,
|
|
148
|
-
input: inputRef.current
|
|
149
|
-
});
|
|
150
|
-
var _isMobile = useIsMobile();
|
|
151
|
-
var isMobile = _isMobile && isMobileFullScreen;
|
|
152
|
-
if (isLoading) {
|
|
153
|
-
return /*#__PURE__*/React.createElement(Loading, null);
|
|
154
|
-
}
|
|
155
|
-
return /*#__PURE__*/React.createElement(SelectComp
|
|
156
|
-
// @ts-ignore
|
|
157
|
-
, _extends({
|
|
158
|
-
options: options,
|
|
159
|
-
isOpen: isOpen,
|
|
160
|
-
isMobile: isMobile,
|
|
161
|
-
hasBottomSpace: hasBottomSpace,
|
|
162
|
-
selectedValues: selectedValues,
|
|
163
|
-
onItemSelect: onItemSelect,
|
|
164
|
-
onItemDeselect: onItemDeselect,
|
|
165
|
-
setSelectedValues: setSelectedValues,
|
|
166
|
-
closeDropdown: function closeDropdown() {
|
|
167
|
-
return setIsOpen(false);
|
|
168
|
-
},
|
|
169
|
-
checkIsValueOverflowed: checkIsValueOverflowed,
|
|
170
|
-
isSearchAvailable: optionsCount > SELECTED_VISIBLE_MIN_COUNT,
|
|
171
|
-
scrollableContentStyle: _objectSpread({}, !hasBottomSpace && !hasTopSpace ? {
|
|
172
|
-
maxHeight: bottomSpace - 65 - 56
|
|
173
|
-
} : {}) // 65 - height of the top content, 56 - height of the footer
|
|
174
|
-
}, rest));
|
|
61
|
+
return (_jsx(SelectComp
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
, Object.assign({
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
options: options, isOpen: isOpen, isMobile: isMobile, hasBottomSpace: hasBottomSpace, selectedValues: selectedValues, onItemSelect: onItemSelect, onItemDeselect: onItemDeselect, setSelectedValues: setSelectedValues, closeDropdown: () => setIsOpen(false), checkIsValueOverflowed: checkIsValueOverflowed, isSearchAvailable: optionsCount > SELECTED_VISIBLE_MIN_COUNT, scrollableContentStyle: Object.assign({}, (!hasBottomSpace && !hasTopSpace ? { maxHeight: bottomSpace - 65 - 56 } : {})) }, rest)));
|
|
175
66
|
};
|
|
176
|
-
|
|
177
|
-
export { OptionsWrapper };
|