@mailstep/design-system 0.8.27 → 0.8.28
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/package.json +4 -4
- package/ui/Blocks/CommonGrid/CommonGrid.js +104 -152
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +187 -368
- package/ui/Blocks/CommonGrid/HoC/withProps.js +9 -37
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +29 -46
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +105 -196
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +37 -49
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +76 -162
- package/ui/Blocks/CommonGrid/components/ActionHead/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +43 -124
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +50 -112
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +130 -251
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ColumnTitle.js +36 -104
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +156 -252
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ControlButtons/styles.js +40 -53
- package/ui/Blocks/CommonGrid/components/DataCell.js +34 -97
- package/ui/Blocks/CommonGrid/components/DataRow.js +60 -74
- package/ui/Blocks/CommonGrid/components/DropdownButton/DropdownButton.js +67 -154
- package/ui/Blocks/CommonGrid/components/DropdownButton/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +57 -149
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/FilterDropdown.js +30 -48
- package/ui/Blocks/CommonGrid/components/FilterRow.js +28 -36
- package/ui/Blocks/CommonGrid/components/Filters/ActionsFilter/ActionsFilter.js +32 -83
- package/ui/Blocks/CommonGrid/components/Filters/ActionsFilter/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/Filters/BooleanSelect/BooleanSelect.js +34 -90
- package/ui/Blocks/CommonGrid/components/Filters/BooleanSelect/index.js +4 -2
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.js +149 -373
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/getCleanValues.js +7 -12
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/pickerRangeToString.js +13 -25
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/sameDate.js +3 -3
- package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.js +92 -376
- package/ui/Blocks/CommonGrid/components/Filters/GridSelect/guards.js +4 -8
- package/ui/Blocks/CommonGrid/components/Filters/GridSelect/index.js +4 -2
- package/ui/Blocks/CommonGrid/components/Filters/NumberRange/NumberRange.js +142 -293
- package/ui/Blocks/CommonGrid/components/Filters/NumberRange/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/Filters/NumberRange/types.js +1 -0
- package/ui/Blocks/CommonGrid/components/Filters/TextRange/TextRange.js +160 -320
- package/ui/Blocks/CommonGrid/components/Filters/TextRange/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/Filters/TextRange/types.js +1 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +79 -156
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/GridInfo/index.js +30 -41
- package/ui/Blocks/CommonGrid/components/GridModals/index.js +132 -134
- package/ui/Blocks/CommonGrid/components/GridStatus/index.js +23 -25
- package/ui/Blocks/CommonGrid/components/GroupRow.js +26 -87
- package/ui/Blocks/CommonGrid/components/HeadCell.js +33 -89
- package/ui/Blocks/CommonGrid/components/HeadRow.js +69 -192
- package/ui/Blocks/CommonGrid/components/IconList/IconList.js +61 -99
- package/ui/Blocks/CommonGrid/components/IconList/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +52 -114
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ManageColumnRow.js +66 -171
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/styles.js +16 -34
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/utils.js +7 -9
- package/ui/Blocks/CommonGrid/components/MobileFilterModal.js +110 -228
- package/ui/Blocks/CommonGrid/components/MobileOverlayWrapper.js +13 -21
- package/ui/Blocks/CommonGrid/components/MobileSortModal.js +64 -88
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +34 -86
- package/ui/Blocks/CommonGrid/components/PresetsModalBody/components/TagRemove.js +17 -20
- package/ui/Blocks/CommonGrid/components/PresetsModalBody/index.js +88 -201
- package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.js +29 -54
- package/ui/Blocks/CommonGrid/components/QuickFilter/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/Resize.js +46 -53
- package/ui/Blocks/CommonGrid/components/Table.js +40 -94
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +63 -113
- package/ui/Blocks/CommonGrid/components/TablePagination/index.js +3 -1
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +16 -32
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +10 -58
- package/ui/Blocks/CommonGrid/components/gridCells/Date.js +7 -7
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +9 -12
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +27 -100
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +48 -48
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +31 -33
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +28 -50
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -22
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +37 -63
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +75 -113
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -7
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +9 -57
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +30 -82
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -14
- package/ui/Blocks/CommonGrid/components/icons/Edit.js +13 -65
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +13 -65
- package/ui/Blocks/CommonGrid/components/icons/Sorting.js +19 -72
- package/ui/Blocks/CommonGrid/components/utils.js +18 -67
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +14 -14
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +85 -119
- package/ui/Blocks/CommonGrid/hooks/useCreatePreset.js +29 -77
- package/ui/Blocks/CommonGrid/hooks/useDeletePreset.js +21 -32
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +56 -91
- package/ui/Blocks/CommonGrid/hooks/useEvent.js +10 -14
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +14 -15
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +25 -42
- package/ui/Blocks/CommonGrid/hooks/useGridAutoRowsPerPage.js +10 -20
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +97 -220
- package/ui/Blocks/CommonGrid/hooks/usePresetFileHandlers.js +54 -124
- package/ui/Blocks/CommonGrid/hooks/usePresetsState.js +13 -57
- package/ui/Blocks/CommonGrid/hooks/useQuickFilter.js +76 -149
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +19 -23
- package/ui/Blocks/CommonGrid/hooks/useSelectPreset.js +18 -80
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +17 -28
- package/ui/Blocks/CommonGrid/hooks/useUxReset.js +12 -63
- package/ui/Blocks/CommonGrid/index.js +26 -10
- package/ui/Blocks/CommonGrid/store/index.js +286 -430
- package/ui/Blocks/CommonGrid/store/migrateState.js +10 -10
- package/ui/Blocks/CommonGrid/storybook/components/ComplexCell.js +16 -20
- package/ui/Blocks/CommonGrid/storybook/components/EnumCellExample.js +17 -22
- package/ui/Blocks/CommonGrid/storybook/utils/actions.js +9 -15
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +121 -156
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +106 -145
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +11 -14
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +5 -7
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +4 -5
- package/ui/Blocks/CommonGrid/styles.js +252 -97
- package/ui/Blocks/CommonGrid/types.js +22 -14
- package/ui/Blocks/CommonGrid/utils/constants.js +24 -22
- package/ui/Blocks/CommonGrid/utils/getExtendedExtraControlButtons.js +15 -44
- package/ui/Blocks/CommonGrid/utils/getRowsPerPage.js +8 -9
- package/ui/Blocks/CommonGrid/utils/hasSortTerminated.js +8 -9
- package/ui/Blocks/CommonGrid/utils/index.js +69 -107
- package/ui/Blocks/CornerDialog/CornerDialog.js +40 -94
- package/ui/Blocks/CornerDialog/index.js +3 -1
- package/ui/Blocks/CornerDialog/styles.js +56 -83
- package/ui/Blocks/CornerDialog/types.js +1 -0
- package/ui/Blocks/CornerDialog/utils.js +28 -26
- package/ui/Blocks/Header/components/MenuItems/components/MenuItem/index.js +12 -11
- package/ui/Blocks/Header/components/MenuItems/index.js +6 -11
- package/ui/Blocks/Header/components/MenuItems/styles.js +21 -35
- package/ui/Blocks/Header/components/UserMenu/components/UserInfo/index.js +20 -28
- package/ui/Blocks/Header/components/UserMenu/components/UserInfo/styles.js +13 -31
- package/ui/Blocks/Header/components/UserMenu/hooks/index.js +1 -1
- package/ui/Blocks/Header/components/UserMenu/hooks/useLogout.js +8 -9
- package/ui/Blocks/Header/components/UserMenu/index.js +45 -99
- package/ui/Blocks/Header/components/UserMenu/styles.js +24 -44
- package/ui/Blocks/Header/hooks/useChangeLanguage.js +7 -8
- package/ui/Blocks/Header/index.js +41 -57
- package/ui/Blocks/Header/styles.js +33 -54
- package/ui/Blocks/Header/types.js +1 -0
- package/ui/Blocks/Header/utils/constants.js +3 -1
- package/ui/Blocks/Header/utils/languageItems.js +13 -18
- package/ui/Blocks/HidePrint/HidePrint.js +11 -28
- package/ui/Blocks/ImageList/ImageList.js +76 -131
- package/ui/Blocks/ImageList/components/AddPhoto/index.js +33 -182
- package/ui/Blocks/ImageList/components/AddPhoto/styles.js +29 -42
- package/ui/Blocks/ImageList/components/CloseButton/index.js +15 -13
- package/ui/Blocks/ImageList/components/CloseButton/styles.js +17 -25
- package/ui/Blocks/ImageList/components/ImageElement/index.js +26 -27
- package/ui/Blocks/ImageList/components/ImageElement/styles.js +21 -63
- package/ui/Blocks/ImageList/components/ImageTag/index.js +12 -15
- package/ui/Blocks/ImageList/components/ImageTag/styles.js +8 -21
- package/ui/Blocks/ImageList/hooks/useControls.js +12 -66
- package/ui/Blocks/ImageList/hooks/useOnElementClick.js +12 -70
- package/ui/Blocks/ImageList/index.js +3 -1
- package/ui/Blocks/ImageList/styles.js +28 -47
- package/ui/Blocks/ImageList/types.js +1 -0
- package/ui/Blocks/LanguageSwitch/LanguageSwitch.js +50 -136
- package/ui/Blocks/LanguageSwitch/index.js +3 -1
- package/ui/Blocks/LanguageSwitch/styles.js +31 -49
- package/ui/Blocks/LanguageSwitch/types.js +1 -0
- package/ui/Blocks/LightBox/LightBox.js +37 -46
- package/ui/Blocks/LightBox/hooks/useLightBox.js +14 -19
- package/ui/Blocks/LightBox/index.js +4 -2
- package/ui/Blocks/LightBox/styles.js +27 -51
- package/ui/Blocks/LightBox/types.js +1 -0
- package/ui/Blocks/LoginPage/LoginPage.js +60 -77
- package/ui/Blocks/LoginPage/assets/mailship.js +4 -0
- package/ui/Blocks/LoginPage/components/LoginForm.js +165 -220
- package/ui/Blocks/LoginPage/components/SocialLinks.js +78 -98
- package/ui/Blocks/LoginPage/index.js +4 -2
- package/ui/Blocks/LoginPage/styles.js +74 -94
- package/ui/Blocks/LoginPage/types.js +1 -0
- package/ui/Blocks/LoginPage/utils/links.js +9 -7
- package/ui/Blocks/Modal/Modal.js +122 -148
- package/ui/Blocks/Modal/hooks/useClickOutside.js +25 -35
- package/ui/Blocks/Modal/hooks/useModal.js +17 -64
- package/ui/Blocks/Modal/index.js +5 -3
- package/ui/Blocks/Modal/styles.js +181 -255
- package/ui/Blocks/Modal/types.js +1 -0
- package/ui/Blocks/Modal/utils.js +8 -6
- package/ui/Blocks/Popover/index.js +29 -50
- package/ui/Blocks/Scheduler/Scheduler.js +40 -104
- package/ui/Blocks/Scheduler/components/BookedTimeSlots/index.js +35 -123
- package/ui/Blocks/Scheduler/components/BookedTimeSlots/styles.js +34 -53
- package/ui/Blocks/Scheduler/components/CurrentTimeMarker/hooks/useCurrentTime.js +14 -61
- package/ui/Blocks/Scheduler/components/CurrentTimeMarker/index.js +11 -15
- package/ui/Blocks/Scheduler/components/CurrentTimeMarker/styles.js +29 -51
- package/ui/Blocks/Scheduler/components/DateChanger/index.js +46 -50
- package/ui/Blocks/Scheduler/components/DateChanger/styles.js +22 -35
- package/ui/Blocks/Scheduler/components/Groups/index.js +8 -14
- package/ui/Blocks/Scheduler/components/Groups/styles.js +31 -53
- package/ui/Blocks/Scheduler/components/TimeSlots/hooks/useRangeSelection.js +43 -114
- package/ui/Blocks/Scheduler/components/TimeSlots/hooks/useScroll.js +13 -17
- package/ui/Blocks/Scheduler/components/TimeSlots/index.js +45 -53
- package/ui/Blocks/Scheduler/components/TimeSlots/styles.js +51 -75
- package/ui/Blocks/Scheduler/hooks/useChangeDate.js +32 -83
- package/ui/Blocks/Scheduler/index.js +1 -1
- package/ui/Blocks/Scheduler/styles.js +21 -32
- package/ui/Blocks/Scheduler/types.js +1 -0
- package/ui/Blocks/Scheduler/utils/constants.js +8 -6
- package/ui/Blocks/Scheduler/utils/convertDateToTime.js +4 -4
- package/ui/Blocks/Scheduler/utils/convertIndexToISOString.js +9 -7
- package/ui/Blocks/Scheduler/utils/convertMinutesToDuration.js +8 -10
- package/ui/Blocks/Scheduler/utils/formatDate.js +7 -8
- package/ui/Blocks/Scheduler/utils/generateTimeArray.js +17 -15
- package/ui/Blocks/Scheduler/utils/getClosestStep.js +10 -8
- package/ui/Blocks/Scheduler/utils/getMinutesFromString.js +5 -5
- package/ui/Blocks/Scheduler/utils/getMinutesFromTime.js +5 -49
- package/ui/Blocks/Scheduler/utils/isActiveTime.js +9 -8
- package/ui/Blocks/Scheduler/utils/isToday.js +5 -3
- package/ui/Blocks/SideMenu/MenuItem.js +98 -191
- package/ui/Blocks/SideMenu/SideMenu.js +35 -80
- package/ui/Blocks/SideMenu/components/Footer.js +61 -95
- package/ui/Blocks/SideMenu/components/HamburgerMenu.js +49 -68
- package/ui/Blocks/SideMenu/components/SubitemTooltip.js +49 -133
- package/ui/Blocks/SideMenu/context/LeftMenuContext.js +17 -67
- package/ui/Blocks/SideMenu/context/useLeftMenuContext.js +7 -5
- package/ui/Blocks/SideMenu/hooks/useOutsideHover.js +23 -76
- package/ui/Blocks/SideMenu/index.js +5 -3
- package/ui/Blocks/SideMenu/stories/menuItems.js +106 -100
- package/ui/Blocks/SideMenu/styles.js +308 -415
- package/ui/Blocks/SideMenu/types.js +1 -0
- package/ui/Blocks/SideMenu/utils/constants.js +4 -2
- package/ui/Blocks/Stepper/Stepper.js +31 -50
- package/ui/Blocks/Stepper/components/StepCircle/index.js +14 -13
- package/ui/Blocks/Stepper/components/StepCircle/styles.js +22 -47
- package/ui/Blocks/Stepper/components/StepItem/index.js +48 -58
- package/ui/Blocks/Stepper/components/StepItem/styles.js +77 -86
- package/ui/Blocks/Stepper/hooks/useStepper.js +30 -78
- package/ui/Blocks/Stepper/index.js +3 -3
- package/ui/Blocks/Stepper/styles.js +24 -39
- package/ui/Blocks/Stepper/types.js +1 -0
- package/ui/Blocks/Table/Table.js +10 -31
- package/ui/Blocks/Table/index.js +1 -1
- package/ui/Blocks/Table/types.js +1 -0
- package/ui/Blocks/Tabs/TabContent.js +7 -8
- package/ui/Blocks/Tabs/Tabs.js +42 -53
- package/ui/Blocks/Tabs/hooks/useTabs.js +11 -59
- package/ui/Blocks/Tabs/index.js +5 -3
- package/ui/Blocks/Tabs/styles.js +94 -109
- package/ui/Blocks/Tabs/types.js +1 -0
- package/ui/Elements/Alert/Alert.js +71 -95
- package/ui/Elements/Alert/index.js +3 -1
- package/ui/Elements/Alert/styles.js +81 -126
- package/ui/Elements/Alert/types.js +1 -0
- package/ui/Elements/AsyncSelect/AsyncSelect.js +31 -157
- package/ui/Elements/AsyncSelect/index.js +3 -1
- package/ui/Elements/Avatar/Avatar.js +35 -150
- package/ui/Elements/Avatar/index.js +4 -3
- package/ui/Elements/Avatar/types.js +1 -0
- package/ui/Elements/Badge/Badge.js +50 -105
- package/ui/Elements/Badge/index.js +3 -1
- package/ui/Elements/BarChartSymbol/BarChartSymbol.js +19 -22
- package/ui/Elements/BarChartSymbol/index.js +1 -1
- package/ui/Elements/BarChartSymbol/styles.js +8 -32
- package/ui/Elements/BorderedBox/BorderedBox.js +20 -124
- package/ui/Elements/BorderedBox/index.js +3 -1
- package/ui/Elements/BorderedBox/types.js +1 -0
- package/ui/Elements/Button/Button.js +43 -153
- package/ui/Elements/Button/index.js +3 -1
- package/ui/Elements/Button/styles.js +224 -95
- package/ui/Elements/Button/types.js +1 -0
- package/ui/Elements/Card/Card.js +13 -13
- package/ui/Elements/Card/index.js +3 -1
- package/ui/Elements/Card/styles.js +21 -49
- package/ui/Elements/Card/types.js +1 -0
- package/ui/Elements/CheckedCircle/index.js +12 -11
- package/ui/Elements/CheckedCircle/styles.js +14 -29
- package/ui/Elements/DatePicker/DatePicker.js +84 -206
- package/ui/Elements/DatePicker/Datetime/DateTime.js +422 -724
- package/ui/Elements/DatePicker/Datetime/components/DateRepeater.js +62 -126
- package/ui/Elements/DatePicker/Datetime/components/FooterRow.js +10 -24
- package/ui/Elements/DatePicker/Datetime/components/FooterRowLabel.js +14 -20
- package/ui/Elements/DatePicker/Datetime/components/TimeInput.js +15 -21
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +160 -254
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +28 -84
- package/ui/Elements/DatePicker/Datetime/types.js +13 -11
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +134 -334
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +71 -265
- package/ui/Elements/DatePicker/Datetime/views/YearsView.js +81 -276
- package/ui/Elements/DatePicker/index.js +5 -3
- package/ui/Elements/DatePicker/styles.js +233 -35
- package/ui/Elements/DatePicker/utils/constants.js +27 -33
- package/ui/Elements/Dropdown/Dropdown.js +53 -88
- package/ui/Elements/Dropdown/index.js +3 -1
- package/ui/Elements/Dropdown/types.js +1 -0
- package/ui/Elements/DropdownMenu/DropdownMenu.js +32 -134
- package/ui/Elements/DropdownMenu/components/DefaultItem.js +30 -56
- package/ui/Elements/DropdownMenu/components/MenuItem.js +56 -103
- package/ui/Elements/DropdownMenu/components/MenuList.js +13 -14
- package/ui/Elements/DropdownMenu/index.js +1 -1
- package/ui/Elements/DropdownMenu/types.js +1 -0
- package/ui/Elements/DropdownSelect/DropdownSelect.js +126 -205
- package/ui/Elements/DropdownSelect/index.js +3 -2
- package/ui/Elements/ErrorMessage/ErrorMessage.js +62 -56
- package/ui/Elements/ErrorMessage/index.js +3 -1
- package/ui/Elements/ErrorMessage/types.js +1 -0
- package/ui/Elements/HighlightBox/HighlightBox.js +97 -99
- package/ui/Elements/HighlightBox/index.js +3 -1
- package/ui/Elements/Icon/BadgeIcon.js +26 -121
- package/ui/Elements/Icon/Icon.js +182 -255
- package/ui/Elements/Icon/icons/Add.js +31 -91
- package/ui/Elements/Icon/icons/AddPhoto.js +32 -84
- package/ui/Elements/Icon/icons/Admin.js +24 -79
- package/ui/Elements/Icon/icons/ArrowDown.js +16 -68
- package/ui/Elements/Icon/icons/ArrowForward.js +10 -64
- package/ui/Elements/Icon/icons/ArrowUp.js +16 -68
- package/ui/Elements/Icon/icons/ArrowUpRightDownLeft.js +19 -77
- package/ui/Elements/Icon/icons/ArrowsLeftRight.js +10 -64
- package/ui/Elements/Icon/icons/ArrowsUpDown.js +10 -64
- package/ui/Elements/Icon/icons/BarcodeScan.js +11 -65
- package/ui/Elements/Icon/icons/Box.js +15 -67
- package/ui/Elements/Icon/icons/Calendar.js +37 -89
- package/ui/Elements/Icon/icons/Cancel.js +16 -68
- package/ui/Elements/Icon/icons/CheckedBox.js +21 -76
- package/ui/Elements/Icon/icons/CircleHalfStroke.js +10 -64
- package/ui/Elements/Icon/icons/Company.js +80 -137
- package/ui/Elements/Icon/icons/Complaint.js +57 -114
- package/ui/Elements/Icon/icons/Consolidation.js +11 -65
- package/ui/Elements/Icon/icons/Container.js +11 -65
- package/ui/Elements/Icon/icons/Dashboard.js +34 -86
- package/ui/Elements/Icon/icons/Desktop.js +61 -118
- package/ui/Elements/Icon/icons/Dispatch.js +11 -65
- package/ui/Elements/Icon/icons/EmptyRack.js +32 -32
- package/ui/Elements/Icon/icons/Expeditions.js +60 -112
- package/ui/Elements/Icon/icons/Filter.js +15 -67
- package/ui/Elements/Icon/icons/FlagCZ.js +53 -108
- package/ui/Elements/Icon/icons/FlagEL.js +48 -100
- package/ui/Elements/Icon/icons/FlagESP.js +91 -143
- package/ui/Elements/Icon/icons/FlagHU.js +25 -77
- package/ui/Elements/Icon/icons/FlagITA.js +53 -108
- package/ui/Elements/Icon/icons/FlagNL.js +25 -77
- package/ui/Elements/Icon/icons/FlagRUS.js +53 -108
- package/ui/Elements/Icon/icons/FlagSVK.js +90 -145
- package/ui/Elements/Icon/icons/FlagUK.js +18 -73
- package/ui/Elements/Icon/icons/FlagUSA.js +104 -168
- package/ui/Elements/Icon/icons/Foldable.js +32 -84
- package/ui/Elements/Icon/icons/Fragile.js +40 -92
- package/ui/Elements/Icon/icons/Gift.js +39 -91
- package/ui/Elements/Icon/icons/Group.js +15 -67
- package/ui/Elements/Icon/icons/HamburgerMenu.js +39 -91
- package/ui/Elements/Icon/icons/HelpCircle1.js +30 -82
- package/ui/Elements/Icon/icons/HorizontalLines.js +34 -86
- package/ui/Elements/Icon/icons/ImagePlaceholder.js +15 -67
- package/ui/Elements/Icon/icons/Income.js +20 -75
- package/ui/Elements/Icon/icons/Info.js +31 -83
- package/ui/Elements/Icon/icons/Integrations.js +15 -67
- package/ui/Elements/Icon/icons/Inventory.js +43 -100
- package/ui/Elements/Icon/icons/Inventory2.js +64 -121
- package/ui/Elements/Icon/icons/Layout.js +41 -91
- package/ui/Elements/Icon/icons/Link.js +18 -73
- package/ui/Elements/Icon/icons/Liquid.js +20 -75
- package/ui/Elements/Icon/icons/Location.js +11 -65
- package/ui/Elements/Icon/icons/Logout1.js +30 -82
- package/ui/Elements/Icon/icons/MachinePackingForbidden.js +68 -120
- package/ui/Elements/Icon/icons/MakePhoto.js +33 -85
- package/ui/Elements/Icon/icons/MenuItems.js +37 -91
- package/ui/Elements/Icon/icons/Message.js +36 -96
- package/ui/Elements/Icon/icons/MobileCancel.js +20 -75
- package/ui/Elements/Icon/icons/MobilePhone.js +45 -97
- package/ui/Elements/Icon/icons/Moon.js +10 -64
- package/ui/Elements/Icon/icons/Notification2.js +23 -78
- package/ui/Elements/Icon/icons/OpenBox.js +35 -87
- package/ui/Elements/Icon/icons/Pallet.js +34 -93
- package/ui/Elements/Icon/icons/Plus1.js +15 -67
- package/ui/Elements/Icon/icons/Print.js +39 -91
- package/ui/Elements/Icon/icons/Product.js +15 -67
- package/ui/Elements/Icon/icons/Products.js +14 -66
- package/ui/Elements/Icon/icons/Profile.js +23 -78
- package/ui/Elements/Icon/icons/Puzzle1.js +16 -68
- package/ui/Elements/Icon/icons/QRCode.js +17 -69
- package/ui/Elements/Icon/icons/Rack.js +63 -115
- package/ui/Elements/Icon/icons/Reload.js +11 -65
- package/ui/Elements/Icon/icons/Return.js +17 -72
- package/ui/Elements/Icon/icons/Rows.js +37 -89
- package/ui/Elements/Icon/icons/Settings2.js +31 -91
- package/ui/Elements/Icon/icons/ShieldUser.js +7 -61
- package/ui/Elements/Icon/icons/ShoppingBag.js +16 -67
- package/ui/Elements/Icon/icons/Sort.js +21 -76
- package/ui/Elements/Icon/icons/Sun.js +10 -64
- package/ui/Elements/Icon/icons/ThreeDots.js +37 -89
- package/ui/Elements/Icon/icons/ToastError.js +25 -82
- package/ui/Elements/Icon/icons/ToastSuccess.js +25 -82
- package/ui/Elements/Icon/icons/Transfer.js +19 -74
- package/ui/Elements/Icon/icons/TrashBin.js +31 -83
- package/ui/Elements/Icon/icons/Truck.js +71 -127
- package/ui/Elements/Icon/icons/TwoBoxes.js +18 -73
- package/ui/Elements/Icon/icons/TwoCheckedBoxes.js +27 -27
- package/ui/Elements/Icon/icons/TwoUsers.js +40 -91
- package/ui/Elements/Icon/icons/UserCowboy.js +7 -61
- package/ui/Elements/Icon/icons/Valuable.js +32 -83
- package/ui/Elements/Icon/icons/Weight.js +10 -64
- package/ui/Elements/Icon/icons/index.js +188 -92
- package/ui/Elements/Icon/index.js +96 -4
- package/ui/Elements/Icon/types.js +1 -0
- package/ui/Elements/Image/Image.js +13 -154
- package/ui/Elements/Image/index.js +3 -1
- package/ui/Elements/Image/types.js +1 -0
- package/ui/Elements/Label/Label.js +22 -61
- package/ui/Elements/Label/index.js +4 -3
- package/ui/Elements/Line/Line.js +20 -44
- package/ui/Elements/Line/index.js +3 -1
- package/ui/Elements/Line/types.js +1 -0
- package/ui/Elements/Link/Link.js +42 -126
- package/ui/Elements/Link/index.js +3 -1
- package/ui/Elements/Logo/Logo.js +65 -162
- package/ui/Elements/Logo/assets/mailship/logo_black.js +4 -0
- package/ui/Elements/Logo/assets/mailship/logo_m.js +4 -0
- package/ui/Elements/Logo/assets/mailship/logo_white.js +4 -0
- package/ui/Elements/Logo/assets/mailship/mailship-logo.js +4 -0
- package/ui/Elements/Logo/assets/mailstep/mailstep_black.js +4 -0
- package/ui/Elements/Logo/assets/mailstep/mailstep_white.js +4 -0
- package/ui/Elements/Logo/assets/mailstock/mailstock.js +4 -0
- package/ui/Elements/Logo/assets/mailwise/mailwiseLogo.js +4 -0
- package/ui/Elements/Logo/assets/mailwise/mailwiseLogoSmall.js +4 -0
- package/ui/Elements/Logo/assets/mailwrap/mailwrapLogo.js +4 -0
- package/ui/Elements/Logo/assets/mailwrap/mailwrapLogoSmall.js +4 -0
- package/ui/Elements/Logo/assets/warehouse/manager.js +4 -0
- package/ui/Elements/Logo/assets/warehouse/manager2.js +4 -0
- package/ui/Elements/Logo/assets/warehouse/manager3.js +4 -0
- package/ui/Elements/Logo/index.js +3 -1
- package/ui/Elements/Logo/types.js +1 -0
- package/ui/Elements/Pagination/Pagination.js +61 -85
- package/ui/Elements/Pagination/index.js +3 -1
- package/ui/Elements/Pagination/styled.js +62 -89
- package/ui/Elements/Portal/index.js +20 -68
- package/ui/Elements/ProgressBar/ProgressBar.js +15 -19
- package/ui/Elements/ProgressBar/index.js +3 -1
- package/ui/Elements/ProgressBar/styles.js +69 -114
- package/ui/Elements/Select/Select.js +94 -442
- package/ui/Elements/Select/components/ChevronOption.js +29 -87
- package/ui/Elements/Select/components/ConnectedMenu.js +24 -85
- package/ui/Elements/Select/components/CountMultiValue.js +40 -132
- package/ui/Elements/Select/components/CustomInput.js +11 -61
- package/ui/Elements/Select/components/DropdownIndicator.js +28 -94
- package/ui/Elements/Select/components/IconValueContainer.js +27 -139
- package/ui/Elements/Select/components/SelectAll.js +87 -164
- package/ui/Elements/Select/components/SelectedIndicator.js +7 -23
- package/ui/Elements/Select/components/SimplifiedOption.js +15 -23
- package/ui/Elements/Select/index.js +3 -1
- package/ui/Elements/Select/styles.js +16 -44
- package/ui/Elements/Select/themes/index.js +37 -44
- package/ui/Elements/Select/themes/selectStyles.js +194 -302
- package/ui/Elements/Select/types.js +1 -0
- package/ui/Elements/SimpleLink/SimpleLink.js +35 -64
- package/ui/Elements/SimpleLink/index.js +5 -3
- package/ui/Elements/SingleSelect/SingleSelect.js +145 -509
- package/ui/Elements/SingleSelect/index.js +3 -1
- package/ui/Elements/SpaceAround/SpaceAround.js +31 -166
- package/ui/Elements/SpaceAround/index.js +3 -1
- package/ui/Elements/SpaceAround/types.js +1 -0
- package/ui/Elements/Spinner/Spinner.js +35 -36
- package/ui/Elements/Spinner/index.js +3 -1
- package/ui/Elements/Spinner/styles.js +35 -65
- package/ui/Elements/Spinner/types.js +1 -0
- package/ui/Elements/Table/Table.js +44 -77
- package/ui/Elements/Table/index.js +1 -1
- package/ui/Elements/Tag/Tag.js +47 -82
- package/ui/Elements/Tag/index.js +4 -2
- package/ui/Elements/Tag/palettes.js +50 -45
- package/ui/Elements/Tag/stories/components/predefinedTags.js +17 -18
- package/ui/Elements/Tag/types.js +1 -0
- package/ui/Elements/Text/Text.js +9 -75
- package/ui/Elements/Text/index.js +1 -1
- package/ui/Elements/Text/types.js +1 -0
- package/ui/Elements/Toast/Toast.js +33 -55
- package/ui/Elements/Toast/constants.js +17 -15
- package/ui/Elements/Toast/index.js +3 -1
- package/ui/Elements/Toast/styles.js +74 -104
- package/ui/Elements/Toggle/Toggle.js +120 -258
- package/ui/Elements/Toggle/index.js +3 -1
- package/ui/Elements/Toggle/types.js +1 -0
- package/ui/Elements/Tooltip/Tooltip.js +49 -119
- package/ui/Elements/Tooltip/index.js +3 -1
- package/ui/Elements/Typography/Typography.js +73 -158
- package/ui/Elements/Typography/index.js +4 -3
- package/ui/Forms/Checkbox/Checkbox.js +39 -40
- package/ui/Forms/Checkbox/index.js +5 -3
- package/ui/Forms/Checkbox/styles.js +92 -74
- package/ui/Forms/Checkbox/types.js +1 -0
- package/ui/Forms/Input/Input.js +125 -258
- package/ui/Forms/Input/index.js +3 -1
- package/ui/Forms/Input/styles.js +217 -201
- package/ui/Forms/Input/types.js +1 -0
- package/ui/Forms/RadioButton/RadioButton.js +22 -101
- package/ui/Forms/RadioButton/index.js +3 -1
- package/ui/Forms/RadioButton/styles.js +85 -75
- package/ui/Forms/RadioButton/types.js +1 -0
- package/ui/Forms/TextArea/TextArea.js +33 -153
- package/ui/Forms/TextArea/index.js +3 -1
- package/ui/Forms/TextArea/styles.js +75 -99
- package/ui/System/Fonts/index.js +52 -15
- package/ui/ThemeProvider/ThemeProvider.js +15 -18
- package/ui/ThemeProvider/index.js +5 -4
- package/ui/ThemeProvider/themes/default.js +185 -193
- package/ui/ThemeProvider/themes/index.js +10 -9
- package/ui/ThemeProvider/themes/light.js +7 -8
- package/ui/ThemeProvider/themes/mailwise.js +229 -236
- package/ui/ThemeProvider/types.js +1 -0
- package/ui/_virtual/_rolldown/runtime.js +13 -0
- package/ui/hooks/useToggleAndClose.js +15 -62
- package/ui/index.js +179 -94
- package/ui/packages/assets/fonts/Inter-Bold_mailstep.js +4 -0
- package/ui/packages/assets/fonts/Inter-Light_mailstep.js +4 -0
- package/ui/packages/assets/fonts/Inter-Medium_mailstep.js +4 -0
- package/ui/packages/assets/fonts/Inter-Regular_mailstep.js +4 -0
- package/ui/packages/assets/fonts/Inter-SemiBold_mailstep.js +4 -0
- package/ui/utils/CheckDeviceWidth/checkDeviceWidth.js +14 -63
- package/ui/utils/CreateRgba/createRgba.js +11 -16
- package/ui/utils/CreateRgba/types.js +1 -0
- package/ui/utils/KeyPress/KeyPress.js +15 -22
- package/ui/utils/KeyPress/index.js +4 -2
- package/ui/utils/KeyPress/types.js +1 -0
- package/ui/utils/LinguiContainer/index.js +7 -6
- package/ui/utils/index.js +7 -5
- package/ui/utils/translations.js +334 -333
- package/ui/Blocks/CommonGrid/store/store.d.js +0 -0
- package/ui/Blocks/CornerDialog/index.d.js +0 -2
- package/ui/Blocks/ImageList/index.d.js +0 -2
- package/ui/Blocks/LightBox/index.d.js +0 -3
- package/ui/Blocks/Modal/index.d.js +0 -3
- package/ui/Blocks/Tabs/index.d.js +0 -3
- package/ui/Elements/Alert/index.d.js +0 -3
- package/ui/Elements/Avatar/index.d.js +0 -2
- package/ui/Elements/Badge/index.d.js +0 -2
- package/ui/Elements/BorderedBox/index.d.js +0 -3
- package/ui/Elements/Button/Button.d.js +0 -2
- package/ui/Elements/Button/index.d.js +0 -3
- package/ui/Elements/Card/index.d.js +0 -2
- package/ui/Elements/ErrorMessage/index.d.js +0 -3
- package/ui/Elements/Line/index.d.js +0 -3
- package/ui/Elements/Logo/default.d.js +0 -0
- package/ui/Elements/Logo/index.d.js +0 -2
- package/ui/Elements/Pagination/index.d.js +0 -3
- package/ui/Elements/Spinner/index.d.js +0 -2
- package/ui/Elements/Tag/index.d.js +0 -3
- package/ui/Elements/Text/index.d.js +0 -2
- package/ui/Elements/Toast/index.d.js +0 -3
- package/ui/Elements/Toggle/index.d.js +0 -2
- package/ui/Elements/Tooltip/index.d.js +0 -2
- package/ui/Elements/Typography/index.d.js +0 -2
- package/ui/Forms/Checkbox/index.d.js +0 -2
- package/ui/Forms/Input/index.d.js +0 -3
- package/ui/Forms/RadioButton/index.d.js +0 -2
- package/ui/System/Fonts/font.d.js +0 -0
- package/ui/ThemeProvider/ThemeProvider.d.js +0 -2
- package/ui/ThemeProvider/index.d.js +0 -3
- package/ui/utils/index.d.js +0 -3
|
@@ -1,376 +1,152 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
function _define_property(obj, key, value) {
|
|
10
|
-
if (key in obj) {
|
|
11
|
-
Object.defineProperty(obj, key, {
|
|
12
|
-
value: value,
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true
|
|
16
|
-
});
|
|
17
|
-
} else {
|
|
18
|
-
obj[key] = value;
|
|
19
|
-
}
|
|
20
|
-
return obj;
|
|
21
|
-
}
|
|
22
|
-
function _iterable_to_array_limit(arr, i) {
|
|
23
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24
|
-
if (_i == null) return;
|
|
25
|
-
var _arr = [];
|
|
26
|
-
var _n = true;
|
|
27
|
-
var _d = false;
|
|
28
|
-
var _s, _e;
|
|
29
|
-
try {
|
|
30
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
31
|
-
_arr.push(_s.value);
|
|
32
|
-
if (i && _arr.length === i) break;
|
|
33
|
-
}
|
|
34
|
-
} catch (err) {
|
|
35
|
-
_d = true;
|
|
36
|
-
_e = err;
|
|
37
|
-
} finally{
|
|
38
|
-
try {
|
|
39
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
40
|
-
} finally{
|
|
41
|
-
if (_d) throw _e;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return _arr;
|
|
45
|
-
}
|
|
46
|
-
function _non_iterable_rest() {
|
|
47
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48
|
-
}
|
|
49
|
-
function _object_spread(target) {
|
|
50
|
-
for(var i = 1; i < arguments.length; i++){
|
|
51
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
52
|
-
var ownKeys = Object.keys(source);
|
|
53
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
54
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
55
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
ownKeys.forEach(function(key) {
|
|
59
|
-
_define_property(target, key, source[key]);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return target;
|
|
63
|
-
}
|
|
64
|
-
function ownKeys(object, enumerableOnly) {
|
|
65
|
-
var keys = Object.keys(object);
|
|
66
|
-
if (Object.getOwnPropertySymbols) {
|
|
67
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
68
|
-
if (enumerableOnly) {
|
|
69
|
-
symbols = symbols.filter(function(sym) {
|
|
70
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
keys.push.apply(keys, symbols);
|
|
74
|
-
}
|
|
75
|
-
return keys;
|
|
76
|
-
}
|
|
77
|
-
function _object_spread_props(target, source) {
|
|
78
|
-
source = source != null ? source : {};
|
|
79
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
80
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
81
|
-
} else {
|
|
82
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
83
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return target;
|
|
87
|
-
}
|
|
88
|
-
function _object_without_properties(source, excluded) {
|
|
89
|
-
if (source == null) return {};
|
|
90
|
-
var target = {}, sourceKeys, key, i;
|
|
91
|
-
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
92
|
-
sourceKeys = Reflect.ownKeys(Object(source));
|
|
93
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
94
|
-
key = sourceKeys[i];
|
|
95
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
96
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
97
|
-
target[key] = source[key];
|
|
98
|
-
}
|
|
99
|
-
return target;
|
|
100
|
-
}
|
|
101
|
-
target = _object_without_properties_loose(source, excluded);
|
|
102
|
-
if (Object.getOwnPropertySymbols) {
|
|
103
|
-
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
-
key = sourceKeys[i];
|
|
106
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
107
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
108
|
-
target[key] = source[key];
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return target;
|
|
112
|
-
}
|
|
113
|
-
function _object_without_properties_loose(source, excluded) {
|
|
114
|
-
if (source == null) return {};
|
|
115
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
116
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
117
|
-
key = sourceKeys[i];
|
|
118
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
119
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
120
|
-
target[key] = source[key];
|
|
121
|
-
}
|
|
122
|
-
return target;
|
|
123
|
-
}
|
|
124
|
-
function _sliced_to_array(arr, i) {
|
|
125
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
126
|
-
}
|
|
127
|
-
function _tagged_template_literal(strings, raw) {
|
|
128
|
-
if (!raw) {
|
|
129
|
-
raw = strings.slice(0);
|
|
130
|
-
}
|
|
131
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
132
|
-
raw: {
|
|
133
|
-
value: Object.freeze(raw)
|
|
134
|
-
}
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
138
|
-
if (!o) return;
|
|
139
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
140
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
141
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
142
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
143
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
144
|
-
}
|
|
145
|
-
function _templateObject() {
|
|
146
|
-
var data = _tagged_template_literal([
|
|
147
|
-
"\n .rdtPicker {\n min-width: unset;\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 0.5rem;\n }\n .rdtPicker .rdtDays {\n min-width: unset;\n }\n .rdtPicker td {\n padding: 0 0.2rem;\n }\n "
|
|
148
|
-
]);
|
|
149
|
-
_templateObject = function _templateObject() {
|
|
150
|
-
return data;
|
|
151
|
-
};
|
|
152
|
-
return data;
|
|
153
|
-
}
|
|
154
|
-
function _templateObject1() {
|
|
155
|
-
var data = _tagged_template_literal([
|
|
156
|
-
"\n display: ",
|
|
157
|
-
";\n flex-direction: ",
|
|
158
|
-
";\n margin-right: ",
|
|
159
|
-
";\n\n ",
|
|
160
|
-
"\n"
|
|
161
|
-
]);
|
|
162
|
-
_templateObject1 = function _templateObject() {
|
|
163
|
-
return data;
|
|
164
|
-
};
|
|
165
|
-
return data;
|
|
166
|
-
}
|
|
1
|
+
import { useClickOutside } from "../../../../Modal/hooks/useClickOutside.js";
|
|
2
|
+
import Input_default from "../../../../../Forms/Input/index.js";
|
|
3
|
+
import DatePicker_default from "../../../../../Elements/DatePicker/index.js";
|
|
4
|
+
import { getCleanValues } from "./utils/getCleanValues.js";
|
|
5
|
+
import { pickerRangeToString } from "./utils/pickerRangeToString.js";
|
|
6
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
7
|
+
import styled$1, { css } from "@xstyled/styled-components";
|
|
167
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
168
|
-
import React, { useState, useCallback, useMemo } from "react";
|
|
169
|
-
import { DateTime } from "luxon";
|
|
170
|
-
import DatePicker from "../../../../../Elements/DatePicker";
|
|
171
|
-
import Input from "../../../../../Forms/Input";
|
|
172
|
-
import { useClickOutside } from "../../../../Modal/hooks/useClickOutside";
|
|
173
|
-
import { getCleanValues } from "./utils/getCleanValues";
|
|
174
|
-
import { pickerRangeToString } from "./utils/pickerRangeToString";
|
|
175
9
|
import { i18n } from "@lingui/core";
|
|
176
|
-
import
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
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
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
icon: "calendar",
|
|
317
|
-
value: pickerRangeToString(cleanValue, others),
|
|
318
|
-
label: props.label,
|
|
319
|
-
onFocus: openPicker,
|
|
320
|
-
iconOnClick: openPicker,
|
|
321
|
-
onClear: clear,
|
|
322
|
-
error: error,
|
|
323
|
-
readOnly: true
|
|
324
|
-
}),
|
|
325
|
-
/* @__PURE__ */ jsx(OverlayComponent, {
|
|
326
|
-
children: /* @__PURE__ */ jsx(Fragment, {
|
|
327
|
-
children: isOpen && /* @__PURE__ */ jsxs(RangeWrapper, {
|
|
328
|
-
$compact: compact,
|
|
329
|
-
className: "ignore-element-for-closing-hook",
|
|
330
|
-
children: [
|
|
331
|
-
/* @__PURE__ */ jsx(DatePicker, _object_spread_props(_object_spread({}, rest), {
|
|
332
|
-
timeFormat: timeFormat,
|
|
333
|
-
value: (_cleanValue_ = cleanValue[0]) !== null && _cleanValue_ !== void 0 ? _cleanValue_ : "",
|
|
334
|
-
initialViewDate: initialViewDate[0],
|
|
335
|
-
secondValue: endRangeValue,
|
|
336
|
-
onChange: setDateFrom,
|
|
337
|
-
others: others === null || others === void 0 ? void 0 : others[0],
|
|
338
|
-
onChangeOthers: handleOthersChangeFrom,
|
|
339
|
-
icon: false,
|
|
340
|
-
label: isOpen && i18n._({
|
|
341
|
-
id: "dataGrid.filterCell.from",
|
|
342
|
-
message: "From"
|
|
343
|
-
}),
|
|
344
|
-
isValidDate: isValidDateFrom,
|
|
345
|
-
input: false,
|
|
346
|
-
spaceAround: !compact,
|
|
347
|
-
open: true
|
|
348
|
-
})),
|
|
349
|
-
/* @__PURE__ */ jsx(DatePicker, _object_spread_props(_object_spread({}, rest), {
|
|
350
|
-
timeFormat: timeFormat,
|
|
351
|
-
value: secondDatePickerValue,
|
|
352
|
-
initialViewDate: initialViewDate[1],
|
|
353
|
-
secondValue: startRangeValue,
|
|
354
|
-
onChange: setDateTo,
|
|
355
|
-
others: others === null || others === void 0 ? void 0 : others[1],
|
|
356
|
-
onChangeOthers: handleOthersChangeTo,
|
|
357
|
-
icon: false,
|
|
358
|
-
label: isOpen && i18n._({
|
|
359
|
-
id: "dataGrid.filterCell.to",
|
|
360
|
-
message: "To"
|
|
361
|
-
}),
|
|
362
|
-
isValidDate: isValidDateTo,
|
|
363
|
-
input: false,
|
|
364
|
-
spaceAround: !compact,
|
|
365
|
-
open: true,
|
|
366
|
-
isSecondDatePicker: true
|
|
367
|
-
}))
|
|
368
|
-
]
|
|
369
|
-
})
|
|
370
|
-
})
|
|
371
|
-
})
|
|
372
|
-
]
|
|
373
|
-
});
|
|
10
|
+
import { DateTime } from "luxon";
|
|
11
|
+
//#region packages/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.tsx
|
|
12
|
+
const RangeWrapper = styled$1.div`
|
|
13
|
+
display: ${({ $compact }) => $compact ? "flex" : "inline-flex"};
|
|
14
|
+
flex-direction: ${({ $compact }) => $compact ? "column" : "row"};
|
|
15
|
+
margin-right: ${({ $compact }) => $compact ? "0" : "20px"};
|
|
16
|
+
|
|
17
|
+
${({ $compact }) => $compact && css`
|
|
18
|
+
.rdtPicker {
|
|
19
|
+
min-width: unset;
|
|
20
|
+
width: 100%;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
padding: 0.5rem 0.5rem;
|
|
23
|
+
}
|
|
24
|
+
.rdtPicker .rdtDays {
|
|
25
|
+
min-width: unset;
|
|
26
|
+
}
|
|
27
|
+
.rdtPicker td {
|
|
28
|
+
padding: 0 0.2rem;
|
|
29
|
+
}
|
|
30
|
+
`}
|
|
31
|
+
`;
|
|
32
|
+
const OverlayComponentDefault = ({ children }) => /* @__PURE__ */ jsx("div", { children });
|
|
33
|
+
const DatePickerRange = (props) => {
|
|
34
|
+
const { onChange, error, label, value, others, filterTime, initialView, compact, OverlayComponent = OverlayComponentDefault, ...rest } = props;
|
|
35
|
+
const [startRangeValue, setStartRangeValue] = useState(value?.[0] ?? void 0);
|
|
36
|
+
const [endRangeValue, setEndRangeValue] = useState(value?.[1] ?? void 0);
|
|
37
|
+
const timeFormat = filterTime ? "HH:mm" : false;
|
|
38
|
+
const cleanValue = React.useMemo(() => getCleanValues(value), [value]);
|
|
39
|
+
const initialViewDate = useMemo(() => {
|
|
40
|
+
if (cleanValue[0] && cleanValue[1]) return cleanValue;
|
|
41
|
+
const firstDate = /* @__PURE__ */ new Date();
|
|
42
|
+
firstDate.setHours(0, 0, 0, 0);
|
|
43
|
+
const secondDate = /* @__PURE__ */ new Date();
|
|
44
|
+
secondDate.setHours(23, 59, 59, 0);
|
|
45
|
+
if (initialView === "future") secondDate.setMonth(secondDate.getMonth() + 1);
|
|
46
|
+
else firstDate.setMonth(firstDate.getMonth());
|
|
47
|
+
return [cleanValue[0] || firstDate, cleanValue[1] || secondDate];
|
|
48
|
+
}, [cleanValue, initialView]);
|
|
49
|
+
const [isOpen, setOpen] = useState(false);
|
|
50
|
+
const setDateFrom = useCallback((v) => {
|
|
51
|
+
setStartRangeValue(v);
|
|
52
|
+
onChange([v, cleanValue[1]], others);
|
|
53
|
+
}, [
|
|
54
|
+
onChange,
|
|
55
|
+
others,
|
|
56
|
+
cleanValue
|
|
57
|
+
]);
|
|
58
|
+
const setDateTo = useCallback((v) => {
|
|
59
|
+
setEndRangeValue(v);
|
|
60
|
+
onChange([cleanValue[0], v], others);
|
|
61
|
+
}, [
|
|
62
|
+
onChange,
|
|
63
|
+
others,
|
|
64
|
+
cleanValue
|
|
65
|
+
]);
|
|
66
|
+
const handleOthersChangeFrom = useCallback((othersFrom) => {
|
|
67
|
+
onChange(cleanValue, [othersFrom, others?.[1]]);
|
|
68
|
+
}, [
|
|
69
|
+
onChange,
|
|
70
|
+
cleanValue,
|
|
71
|
+
others
|
|
72
|
+
]);
|
|
73
|
+
const handleOthersChangeTo = useCallback((othersTo) => {
|
|
74
|
+
onChange(cleanValue, [others?.[0], othersTo]);
|
|
75
|
+
}, [
|
|
76
|
+
onChange,
|
|
77
|
+
cleanValue,
|
|
78
|
+
others
|
|
79
|
+
]);
|
|
80
|
+
const openPicker = useCallback(() => {
|
|
81
|
+
setOpen(true);
|
|
82
|
+
}, [setOpen]);
|
|
83
|
+
const clear = useCallback(() => {
|
|
84
|
+
onChange([], []);
|
|
85
|
+
setStartRangeValue(void 0);
|
|
86
|
+
setEndRangeValue(void 0);
|
|
87
|
+
}, [onChange]);
|
|
88
|
+
const isValidDateFrom = useCallback((current) => !cleanValue[1] || DateTime.fromJSDate(cleanValue[1]) >= DateTime.fromJSDate(current), [cleanValue]);
|
|
89
|
+
const isValidDateTo = useCallback((current) => !cleanValue[0] || DateTime.fromJSDate(current) >= DateTime.fromJSDate(cleanValue[0]), [cleanValue]);
|
|
90
|
+
const onClose = useCallback(() => {
|
|
91
|
+
setOpen(false);
|
|
92
|
+
}, []);
|
|
93
|
+
const secondDatePickerValue = cleanValue[1] === null ? cleanValue[0] : cleanValue[1];
|
|
94
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
95
|
+
ref: useClickOutside({ onClose }),
|
|
96
|
+
children: [/* @__PURE__ */ jsx(Input_default, {
|
|
97
|
+
name: props.name,
|
|
98
|
+
type: "text",
|
|
99
|
+
icon: "calendar",
|
|
100
|
+
value: pickerRangeToString(cleanValue, others),
|
|
101
|
+
label: props.label,
|
|
102
|
+
onFocus: openPicker,
|
|
103
|
+
iconOnClick: openPicker,
|
|
104
|
+
onClear: clear,
|
|
105
|
+
error,
|
|
106
|
+
readOnly: true
|
|
107
|
+
}), /* @__PURE__ */ jsx(OverlayComponent, { children: /* @__PURE__ */ jsx(Fragment, { children: isOpen && /* @__PURE__ */ jsxs(RangeWrapper, {
|
|
108
|
+
$compact: compact,
|
|
109
|
+
className: "ignore-element-for-closing-hook",
|
|
110
|
+
children: [/* @__PURE__ */ jsx(DatePicker_default, {
|
|
111
|
+
...rest,
|
|
112
|
+
timeFormat,
|
|
113
|
+
value: cleanValue[0] ?? "",
|
|
114
|
+
initialViewDate: initialViewDate[0],
|
|
115
|
+
secondValue: endRangeValue,
|
|
116
|
+
onChange: setDateFrom,
|
|
117
|
+
others: others?.[0],
|
|
118
|
+
onChangeOthers: handleOthersChangeFrom,
|
|
119
|
+
icon: false,
|
|
120
|
+
label: isOpen && i18n._({
|
|
121
|
+
id: "dataGrid.filterCell.from",
|
|
122
|
+
message: "From"
|
|
123
|
+
}),
|
|
124
|
+
isValidDate: isValidDateFrom,
|
|
125
|
+
input: false,
|
|
126
|
+
spaceAround: !compact,
|
|
127
|
+
open: true
|
|
128
|
+
}), /* @__PURE__ */ jsx(DatePicker_default, {
|
|
129
|
+
...rest,
|
|
130
|
+
timeFormat,
|
|
131
|
+
value: secondDatePickerValue,
|
|
132
|
+
initialViewDate: initialViewDate[1],
|
|
133
|
+
secondValue: startRangeValue,
|
|
134
|
+
onChange: setDateTo,
|
|
135
|
+
others: others?.[1],
|
|
136
|
+
onChangeOthers: handleOthersChangeTo,
|
|
137
|
+
icon: false,
|
|
138
|
+
label: isOpen && i18n._({
|
|
139
|
+
id: "dataGrid.filterCell.to",
|
|
140
|
+
message: "To"
|
|
141
|
+
}),
|
|
142
|
+
isValidDate: isValidDateTo,
|
|
143
|
+
input: false,
|
|
144
|
+
spaceAround: !compact,
|
|
145
|
+
open: true,
|
|
146
|
+
isSecondDatePicker: true
|
|
147
|
+
})]
|
|
148
|
+
}) }) })]
|
|
149
|
+
});
|
|
374
150
|
};
|
|
375
|
-
|
|
376
|
-
export {
|
|
151
|
+
//#endregion
|
|
152
|
+
export { DatePickerRange as default };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import DatePickerRange from "./DatePickerRange";
|
|
1
|
+
import DatePickerRange from "./DatePickerRange.js";
|
|
2
|
+
//#region packages/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/index.tsx
|
|
2
3
|
var DatePickerRange_default = DatePickerRange;
|
|
4
|
+
//#endregion
|
|
3
5
|
export { DatePickerRange_default as default };
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return value || void 0;
|
|
1
|
+
//#region packages/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/getCleanValues.ts
|
|
2
|
+
const getCleanValue = (value) => {
|
|
3
|
+
if (typeof value === "string") return new Date(value);
|
|
4
|
+
return value || void 0;
|
|
6
5
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var to = getCleanValue(value === null || value === void 0 ? void 0 : value[1]);
|
|
10
|
-
return [
|
|
11
|
-
from,
|
|
12
|
-
to
|
|
13
|
-
];
|
|
6
|
+
const getCleanValues = (value) => {
|
|
7
|
+
return [getCleanValue(value?.[0]), getCleanValue(value?.[1])];
|
|
14
8
|
};
|
|
9
|
+
//#endregion
|
|
15
10
|
export { getCleanValues };
|
package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/pickerRangeToString.js
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
|
+
import { DatePickerRepeatTrans, TimePickerRepeatTrans } from "../../../../../../Elements/DatePicker/utils/constants.js";
|
|
2
|
+
import { sameDate } from "./sameDate.js";
|
|
1
3
|
import { DateTime } from "luxon";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var repeaterDate = DatePickerRepeatTrans[other === null || other === void 0 ? void 0 : other.dateTypeRepeater];
|
|
13
|
-
var repeaterTime = i === 0 ? TimePickerRepeatTrans.from : TimePickerRepeatTrans.to;
|
|
14
|
-
var time = (other === null || other === void 0 ? void 0 : other.time) ? "".concat(String(other === null || other === void 0 ? void 0 : other.time.h).padStart(2, "0"), ":").concat(String(other === null || other === void 0 ? void 0 : other.time.m).padStart(2, "0")) : "";
|
|
15
|
-
return "".concat(repeaterTime, " ").concat(repeaterDate, " ").concat(time).trim();
|
|
16
|
-
}).filter(Boolean).join(" - ");
|
|
17
|
-
}
|
|
18
|
-
if (!values[0] && !values[1]) {
|
|
19
|
-
return "";
|
|
20
|
-
}
|
|
21
|
-
if (values[0] && !values[1] || sameDate(values[0], values[1])) {
|
|
22
|
-
return DateTime.fromJSDate(values[0]).toFormat("dd.LL.yyyy");
|
|
23
|
-
}
|
|
24
|
-
return values.map(function(v) {
|
|
25
|
-
return v && DateTime.fromJSDate(v).toFormat("dd.LL.yyyy HH:mm");
|
|
26
|
-
}).join(" - ");
|
|
4
|
+
//#region packages/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/pickerRangeToString.ts
|
|
5
|
+
const pickerRangeToString = (values = [], others) => {
|
|
6
|
+
if (others?.[0]?.dateTypeRepeater || others?.[1]?.dateTypeRepeater) return others.map((other, i) => {
|
|
7
|
+
if (!other?.dateTypeRepeater) return values[i] && DateTime.fromJSDate(values[i]).toFormat("dd.LL.yyyy HH:mm");
|
|
8
|
+
const repeaterDate = DatePickerRepeatTrans[other?.dateTypeRepeater];
|
|
9
|
+
return `${i === 0 ? TimePickerRepeatTrans.from : TimePickerRepeatTrans.to} ${repeaterDate} ${other?.time ? `${String(other?.time.h).padStart(2, "0")}:${String(other?.time.m).padStart(2, "0")}` : ""}`.trim();
|
|
10
|
+
}).filter(Boolean).join(" - ");
|
|
11
|
+
if (!values[0] && !values[1]) return "";
|
|
12
|
+
if (values[0] && !values[1] || sameDate(values[0], values[1])) return DateTime.fromJSDate(values[0]).toFormat("dd.LL.yyyy");
|
|
13
|
+
return values.map((v) => v && DateTime.fromJSDate(v).toFormat("dd.LL.yyyy HH:mm")).join(" - ");
|
|
27
14
|
};
|
|
15
|
+
//#endregion
|
|
28
16
|
export { pickerRangeToString };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region packages/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/sameDate.ts
|
|
2
|
+
const sameDate = (date1, date2) => date1 && date1.getTime && date2 && date2.getTime && date1.getTime() === date2.getTime();
|
|
3
|
+
//#endregion
|
|
4
4
|
export { sameDate };
|