@mailstep/design-system 0.6.2-beta.8 → 0.6.2-beta.9
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 +5 -4
- package/ui/Blocks/CommonGrid/CommonGrid.js +33 -38
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +28 -33
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +8 -10
- package/ui/Blocks/CommonGrid/StandardButtons.js +11 -20
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +21 -26
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +8 -13
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +20 -48
- package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +10 -15
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +14 -19
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +17 -22
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +22 -50
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/ColumnTitle.js +8 -13
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +9 -38
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/DataCell.js +13 -18
- package/ui/Blocks/CommonGrid/components/DataRow.js +30 -35
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +31 -59
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +1 -5
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +12 -41
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/FilterDropdown.js +8 -13
- package/ui/Blocks/CommonGrid/components/FilterRow.js +15 -20
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +17 -23
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +10 -15
- package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/GroupRow.js +10 -15
- package/ui/Blocks/CommonGrid/components/HeadCell.js +14 -19
- package/ui/Blocks/CommonGrid/components/HeadRow.js +17 -45
- package/ui/Blocks/CommonGrid/components/IconList/IconList.js +12 -18
- package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +12 -14
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +17 -24
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +23 -28
- package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -2
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +11 -39
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +10 -12
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/Resize.js +7 -12
- package/ui/Blocks/CommonGrid/components/Table.js +9 -37
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +12 -40
- package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +30 -36
- package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -7
- package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -2
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +12 -41
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +4 -11
- package/ui/Blocks/CommonGrid/components/gridCells/Date.js +6 -13
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +6 -13
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +9 -16
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +8 -15
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +8 -15
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +9 -16
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +3 -9
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +11 -18
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +13 -20
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +5 -12
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +4 -11
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +10 -40
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -31
- package/ui/Blocks/CommonGrid/components/icons/Edit.js +3 -5
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +3 -5
- package/ui/Blocks/CommonGrid/components/icons/Sorting.js +3 -8
- package/ui/Blocks/CommonGrid/components/utils.js +3 -7
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +6 -10
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +13 -18
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +7 -12
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +3 -5
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +9 -11
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +7 -14
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +6 -8
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +3 -8
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +4 -8
- package/ui/Blocks/CommonGrid/hooks/useUxReset.js +4 -9
- package/ui/Blocks/CommonGrid/index.js +10 -51
- package/ui/Blocks/CommonGrid/store/index.js +77 -86
- package/ui/Blocks/CommonGrid/store/migrateState.js +1 -3
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +17 -24
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +12 -19
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +8 -15
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +8 -15
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +8 -15
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +12 -19
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +10 -17
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +12 -19
- package/ui/Blocks/CommonGrid/storybook/utils/actions.js +4 -11
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +11 -17
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +6 -10
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +26 -35
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +10 -17
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +4 -6
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +1 -3
- package/ui/Blocks/CommonGrid/styles.js +10 -39
- package/ui/Blocks/CommonGrid/translations.js +3 -5
- package/ui/Blocks/CommonGrid/types.js +3 -6
- package/ui/Blocks/CommonGrid/utils/index.js +23 -40
- package/ui/Blocks/CornerDialog/CornerDialog.js +11 -15
- package/ui/Blocks/CornerDialog/index.js +2 -4
- package/ui/Blocks/CornerDialog/stories/CornerDialog.stories.js +7 -10
- package/ui/Blocks/CornerDialog/styles.js +9 -35
- package/ui/Blocks/CornerDialog/types.js +1 -2
- package/ui/Blocks/CornerDialog/utils.js +2 -5
- package/ui/Blocks/HidePrint/HidePrint.js +5 -10
- package/ui/Blocks/ImageList/ImageList.js +15 -42
- package/ui/Blocks/ImageList/components/AddPhoto/index.js +7 -11
- package/ui/Blocks/ImageList/components/AddPhoto/styles.js +3 -29
- package/ui/Blocks/ImageList/components/CloseButton/index.js +5 -9
- package/ui/Blocks/ImageList/components/CloseButton/styles.js +3 -29
- package/ui/Blocks/ImageList/components/ImageElement/index.js +7 -11
- package/ui/Blocks/ImageList/components/ImageElement/styles.js +3 -29
- package/ui/Blocks/ImageList/components/ImageTag/index.js +5 -12
- package/ui/Blocks/ImageList/components/ImageTag/styles.js +2 -8
- package/ui/Blocks/ImageList/index.js +2 -4
- package/ui/Blocks/ImageList/stories/ImageList.stories.js +6 -9
- package/ui/Blocks/ImageList/styles.js +2 -8
- package/ui/Blocks/ImageList/types.js +1 -2
- package/ui/Blocks/LightBox/LightBox.js +8 -15
- package/ui/Blocks/LightBox/hooks/useLightBox.js +5 -9
- package/ui/Blocks/LightBox/index.js +3 -7
- package/ui/Blocks/LightBox/stories/LightBox.stories.js +4 -7
- package/ui/Blocks/LightBox/styles.js +5 -11
- package/ui/Blocks/LightBox/types.js +1 -2
- package/ui/Blocks/Modal/Modal.js +17 -20
- package/ui/Blocks/Modal/hooks/useClickOutside.js +6 -10
- package/ui/Blocks/Modal/hooks/useModal.js +6 -10
- package/ui/Blocks/Modal/index.js +4 -9
- package/ui/Blocks/Modal/stories/Modal.stories.js +42 -48
- package/ui/Blocks/Modal/styles.js +20 -46
- package/ui/Blocks/Modal/types.js +1 -2
- package/ui/Blocks/Modal/utils.js +1 -4
- package/ui/Blocks/Popover/index.js +10 -15
- package/ui/Blocks/Tabs/TabContent.js +1 -5
- package/ui/Blocks/Tabs/Tabs.js +10 -14
- package/ui/Blocks/Tabs/hooks/useTabs.js +4 -8
- package/ui/Blocks/Tabs/index.js +4 -9
- package/ui/Blocks/Tabs/stories/Tabs.stories.js +6 -9
- package/ui/Blocks/Tabs/styles.js +8 -34
- package/ui/Blocks/Tabs/types.js +1 -2
- package/ui/Elements/Alert/Alert.js +10 -12
- package/ui/Elements/Alert/index.js +3 -9
- package/ui/Elements/Alert/stories/Alert.stories.js +11 -14
- package/ui/Elements/Alert/styles.js +14 -20
- package/ui/Elements/Alert/types.js +1 -2
- package/ui/Elements/Avatar/Avatar.js +7 -14
- package/ui/Elements/Avatar/index.js +3 -7
- package/ui/Elements/Avatar/stories/Avatar.stories.js +5 -8
- package/ui/Elements/Avatar/types.js +1 -2
- package/ui/Elements/Badge/Badge.js +13 -38
- package/ui/Elements/Badge/index.js +3 -9
- package/ui/Elements/Badge/stories/Badge.stories.js +5 -11
- package/ui/Elements/BorderedBox/BorderedBox.js +5 -30
- package/ui/Elements/BorderedBox/index.js +3 -9
- package/ui/Elements/BorderedBox/stories/BorderedBox.stories.js +4 -7
- package/ui/Elements/BorderedBox/types.js +1 -2
- package/ui/Elements/Button/Button.js +5 -7
- package/ui/Elements/Button/index.js +3 -9
- package/ui/Elements/Button/stories/Button.stories.js +13 -16
- package/ui/Elements/Button/styles.js +8 -14
- package/ui/Elements/Button/types.js +1 -2
- package/ui/Elements/Card/Card.js +14 -20
- package/ui/Elements/Card/index.js +3 -12
- package/ui/Elements/Card/stories/Card.stories.js +8 -11
- package/ui/Elements/Card/stories/CardComponent.stories.js +6 -12
- package/ui/Elements/Card/styles.js +12 -38
- package/ui/Elements/Card/types.js +1 -2
- package/ui/Elements/DatePicker/DatePicker.js +25 -53
- package/ui/Elements/DatePicker/Datetime/DateTime.js +26 -31
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +20 -47
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +3 -6
- package/ui/Elements/DatePicker/Datetime/types.js +1 -2
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +13 -18
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +9 -14
- package/ui/Elements/DatePicker/Datetime/views/YearsView.js +9 -14
- package/ui/Elements/DatePicker/index.js +2 -7
- package/ui/Elements/DatePicker/styles.js +3 -29
- package/ui/Elements/Dropdown/Dropdown.js +10 -15
- package/ui/Elements/Dropdown/index.js +3 -9
- package/ui/Elements/Dropdown/stories/Dropdown.stories.js +4 -10
- package/ui/Elements/Dropdown/types.js +1 -2
- package/ui/Elements/DropdownMenu/DropdownMenu.js +8 -15
- package/ui/Elements/DropdownMenu/components/DefaultItem.js +7 -32
- package/ui/Elements/DropdownMenu/components/MenuItem.js +10 -15
- package/ui/Elements/DropdownMenu/components/MenuList.js +5 -10
- package/ui/Elements/DropdownMenu/index.js +1 -5
- package/ui/Elements/DropdownMenu/types.js +1 -2
- package/ui/Elements/DropdownSelect/DropdownSelect.js +21 -50
- package/ui/Elements/DropdownSelect/index.js +3 -10
- package/ui/Elements/ErrorMessage/ErrorMessage.js +9 -34
- package/ui/Elements/ErrorMessage/index.js +3 -9
- package/ui/Elements/ErrorMessage/stories/ErrorMessage.stories.js +5 -11
- package/ui/Elements/ErrorMessage/types.js +1 -2
- package/ui/Elements/HighlightBox/HighlightBox.js +12 -38
- package/ui/Elements/HighlightBox/index.js +2 -7
- package/ui/Elements/Icon/BadgeIcon.js +10 -17
- package/ui/Elements/Icon/Icon.js +216 -245
- package/ui/Elements/Icon/icons/AddPhoto.js +2 -6
- package/ui/Elements/Icon/icons/BarcodeScan.js +2 -6
- package/ui/Elements/Icon/icons/Box.js +2 -6
- package/ui/Elements/Icon/icons/Calendar.js +2 -6
- package/ui/Elements/Icon/icons/Cancel.js +2 -6
- package/ui/Elements/Icon/icons/CheckedBox.js +2 -6
- package/ui/Elements/Icon/icons/Company.js +2 -6
- package/ui/Elements/Icon/icons/Complaint.js +2 -6
- package/ui/Elements/Icon/icons/Consolidation.js +2 -6
- package/ui/Elements/Icon/icons/Dispatch.js +2 -6
- package/ui/Elements/Icon/icons/EmptyRack.js +2 -6
- package/ui/Elements/Icon/icons/Expeditions.js +2 -6
- package/ui/Elements/Icon/icons/FlagCZ.js +2 -6
- package/ui/Elements/Icon/icons/FlagEL.js +2 -6
- package/ui/Elements/Icon/icons/FlagESP.js +2 -6
- package/ui/Elements/Icon/icons/FlagITA.js +2 -6
- package/ui/Elements/Icon/icons/FlagRUS.js +2 -6
- package/ui/Elements/Icon/icons/FlagSVK.js +2 -6
- package/ui/Elements/Icon/icons/FlagUSA.js +2 -6
- package/ui/Elements/Icon/icons/Gift.js +2 -6
- package/ui/Elements/Icon/icons/Group.js +2 -6
- package/ui/Elements/Icon/icons/HamburgerMenu.js +2 -6
- package/ui/Elements/Icon/icons/HelpCircle1.js +2 -6
- package/ui/Elements/Icon/icons/ImagePlaceholder.js +2 -6
- package/ui/Elements/Icon/icons/Income.js +2 -6
- package/ui/Elements/Icon/icons/Info.js +2 -6
- package/ui/Elements/Icon/icons/Integrations.js +2 -6
- package/ui/Elements/Icon/icons/Inventory.js +2 -6
- package/ui/Elements/Icon/icons/Inventory2.js +2 -6
- package/ui/Elements/Icon/icons/Link.js +2 -6
- package/ui/Elements/Icon/icons/Location.js +2 -6
- package/ui/Elements/Icon/icons/Logout1.js +2 -6
- package/ui/Elements/Icon/icons/MakePhoto.js +2 -6
- package/ui/Elements/Icon/icons/MenuItems.js +2 -6
- package/ui/Elements/Icon/icons/MobileCancel.js +2 -6
- package/ui/Elements/Icon/icons/Notification2.js +2 -6
- package/ui/Elements/Icon/icons/OpenBox.js +2 -6
- package/ui/Elements/Icon/icons/Plus1.js +2 -6
- package/ui/Elements/Icon/icons/Print.js +2 -6
- package/ui/Elements/Icon/icons/Product.js +2 -6
- package/ui/Elements/Icon/icons/Products.js +2 -6
- package/ui/Elements/Icon/icons/Profile.js +2 -6
- package/ui/Elements/Icon/icons/Puzzle1.js +2 -6
- package/ui/Elements/Icon/icons/QRCode.js +2 -6
- package/ui/Elements/Icon/icons/Rack.js +2 -6
- package/ui/Elements/Icon/icons/Return.js +2 -6
- package/ui/Elements/Icon/icons/Rows.js +2 -6
- package/ui/Elements/Icon/icons/Settings2.js +2 -6
- package/ui/Elements/Icon/icons/ShoppingBag.js +2 -6
- package/ui/Elements/Icon/icons/ThreeDots.js +2 -6
- package/ui/Elements/Icon/icons/Transfer.js +2 -6
- package/ui/Elements/Icon/icons/Truck.js +2 -6
- package/ui/Elements/Icon/icons/TwoBoxes.js +2 -6
- package/ui/Elements/Icon/icons/TwoCheckedBoxes.js +2 -6
- package/ui/Elements/Icon/icons/TwoUsers.js +2 -6
- package/ui/Elements/Icon/icons/index.js +55 -114
- package/ui/Elements/Icon/index.js +5 -26
- package/ui/Elements/Icon/stories/BadgeIcon.stories.js +6 -12
- package/ui/Elements/Icon/stories/Icon.stories.js +9 -12
- package/ui/Elements/Icon/types.js +1 -2
- package/ui/Elements/Image/Image.js +4 -6
- package/ui/Elements/Image/index.js +3 -9
- package/ui/Elements/Image/stories/Image.stories.js +9 -15
- package/ui/Elements/Image/types.js +1 -2
- package/ui/Elements/Label/Label.js +9 -35
- package/ui/Elements/Label/index.js +3 -8
- package/ui/Elements/Label/stories/Label.stories.js +5 -8
- package/ui/Elements/Line/Line.js +5 -10
- package/ui/Elements/Line/index.js +3 -9
- package/ui/Elements/Line/stories/Line.stories.js +10 -16
- package/ui/Elements/Line/types.js +1 -2
- package/ui/Elements/Link/Link.js +14 -39
- package/ui/Elements/Link/index.js +3 -9
- package/ui/Elements/Link/stories/Link.stories.js +10 -13
- package/ui/Elements/Logo/Logo.js +25 -30
- package/ui/Elements/Logo/index.js +3 -9
- package/ui/Elements/Logo/stories/Logo.stories.js +18 -24
- package/ui/Elements/Logo/types.js +1 -2
- package/ui/Elements/MultiSelect/MultiSelect.js +4 -9
- package/ui/Elements/MultiSelect/index.js +2 -7
- package/ui/Elements/Pagination/Pagination.js +7 -9
- package/ui/Elements/Pagination/index.js +3 -9
- package/ui/Elements/Pagination/stories/Pagination.stories.js +5 -8
- package/ui/Elements/Pagination/styled.js +12 -41
- package/ui/Elements/Portal/index.js +7 -14
- package/ui/Elements/ProgressBar/ProgressBar.js +4 -6
- package/ui/Elements/ProgressBar/index.js +3 -9
- package/ui/Elements/ProgressBar/stories/ProgressBar.stories.js +6 -12
- package/ui/Elements/ProgressBar/styles.js +12 -38
- package/ui/Elements/Select/Select.js +20 -25
- package/ui/Elements/Select/index.js +2 -7
- package/ui/Elements/Select/styles.js +7 -13
- package/ui/Elements/Select/themes/CustomComponents.js +37 -72
- package/ui/Elements/Select/themes/baseStyles.js +6 -12
- package/ui/Elements/Select/themes/formStyles.js +23 -27
- package/ui/Elements/Select/themes/index.js +16 -20
- package/ui/Elements/Select/types.js +1 -2
- package/ui/Elements/SimpleLink/SimpleLink.js +6 -31
- package/ui/Elements/SimpleLink/index.js +3 -9
- package/ui/Elements/SingleSelect/SingleSelect.js +27 -32
- package/ui/Elements/SingleSelect/index.js +2 -7
- package/ui/Elements/SpaceAround/SpaceAround.js +11 -36
- package/ui/Elements/SpaceAround/index.js +3 -9
- package/ui/Elements/SpaceAround/stories/SpaceAround.stories.js +5 -8
- package/ui/Elements/SpaceAround/types.js +1 -2
- package/ui/Elements/Spinner/Spinner.js +8 -12
- package/ui/Elements/Spinner/index.js +3 -9
- package/ui/Elements/Spinner/stories/Spinner.stories.js +13 -16
- package/ui/Elements/Spinner/styles.js +7 -33
- package/ui/Elements/Spinner/types.js +1 -2
- package/ui/Elements/Tag/Tag.js +6 -31
- package/ui/Elements/Tag/index.js +3 -10
- package/ui/Elements/Tag/palletes.js +1 -4
- package/ui/Elements/Tag/stories/Tag.stories.js +15 -21
- package/ui/Elements/Tag/stories/components/predefinedTags.js +6 -11
- package/ui/Elements/Tag/types.js +1 -2
- package/ui/Elements/Text/Text.js +4 -6
- package/ui/Elements/Text/index.js +2 -8
- package/ui/Elements/Text/stories/Text.stories.js +9 -15
- package/ui/Elements/Text/types.js +1 -2
- package/ui/Elements/Toast/Toast.js +10 -15
- package/ui/Elements/Toast/index.js +3 -9
- package/ui/Elements/Toggle/Toggle.js +13 -38
- package/ui/Elements/Toggle/index.js +3 -9
- package/ui/Elements/Toggle/stories/Toggle.stories.js +7 -13
- package/ui/Elements/Toggle/types.js +1 -2
- package/ui/Elements/Typography/Typography.js +28 -44
- package/ui/Elements/Typography/index.js +3 -19
- package/ui/Elements/Typography/stories/Typography.stories.js +15 -18
- package/ui/Forms/Checkbox/Checkbox.js +9 -11
- package/ui/Forms/Checkbox/index.js +3 -9
- package/ui/Forms/Checkbox/stories/Checkbox.stories.js +7 -13
- package/ui/Forms/Checkbox/styles.js +6 -32
- package/ui/Forms/Checkbox/types.js +1 -2
- package/ui/Forms/Input/Input.js +16 -20
- package/ui/Forms/Input/index.js +3 -6
- package/ui/Forms/Input/stories/Input.stories.js +11 -14
- package/ui/Forms/Input/styles.js +20 -46
- package/ui/Forms/Input/types.js +1 -2
- package/ui/Forms/RadioButton/RadioButton.js +6 -8
- package/ui/Forms/RadioButton/index.js +3 -9
- package/ui/Forms/RadioButton/stories/RadioButton.stories.js +7 -13
- package/ui/Forms/RadioButton/styles.js +7 -13
- package/ui/Forms/RadioButton/types.js +1 -2
- package/ui/Forms/TextArea/TextArea.js +8 -13
- package/ui/Forms/TextArea/index.js +2 -7
- package/ui/Forms/TextArea/styles.js +13 -39
- package/ui/System/Fonts/index.js +9 -14
- package/ui/ThemeProvider/ThemeProvider.js +7 -13
- package/ui/ThemeProvider/index.js +5 -25
- package/ui/ThemeProvider/themes/default.js +1 -3
- package/ui/ThemeProvider/themes/index.js +7 -12
- package/ui/ThemeProvider/themes/light.js +1 -3
- package/ui/ThemeProvider/themes/mailwise.js +1 -3
- package/ui/ThemeProvider/types.js +1 -2
- package/ui/index.es.js +6718 -6711
- package/ui/index.js +85 -146
- package/ui/index.umd.js +315 -315
- package/ui/utils/CreateRgba/createRgba.js +5 -12
- package/ui/utils/CreateRgba/types.js +1 -2
- package/ui/utils/KeyPress/KeyPress.js +4 -6
- package/ui/utils/KeyPress/KeyPress.stories.js +6 -12
- package/ui/utils/KeyPress/index.js +2 -7
- package/ui/utils/KeyPress/types.js +1 -2
- package/ui/utils/index.js +6 -13
|
@@ -1,73 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
3
|
return cooked;
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
34
|
-
var react_1 = __importStar(require("react"));
|
|
35
|
-
var styled_components_1 = __importDefault(require("@xstyled/styled-components"));
|
|
36
|
-
var system_1 = require("@xstyled/system");
|
|
37
|
-
var react_2 = require("@lingui/react");
|
|
38
|
-
var ActionDropdownMenu_1 = __importDefault(require("./ActionDropdownMenu"));
|
|
39
|
-
var Popover_1 = __importDefault(require("../../../../Popover"));
|
|
40
|
-
var Icon_1 = __importDefault(require("../../../../../Elements/Icon/Icon"));
|
|
41
|
-
var Content = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n padding: 1 2;\n min-width: 9rem;\n height: 28px;\n background-color: ", ";\n color: ", ";\n border: slim;\n border-color: ", ";\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: ", ";\n transition: 0.2s;\n &:not(:disabled):hover {\n color: ", ";\n border-color: ", ";\n }\n p {\n margin: 0;\n margin-right: auto;\n padding-right: 36px;\n }\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n padding: 1 2;\n min-width: 9rem;\n height: 28px;\n background-color: ", ";\n color: ", ";\n border: slim;\n border-color: ", ";\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: ", ";\n transition: 0.2s;\n &:not(:disabled):hover {\n color: ", ";\n border-color: ", ";\n }\n p {\n margin: 0;\n margin-right: auto;\n padding-right: 36px;\n }\n"])), system_1.th.color('white'), function (_a) {
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
import React, { memo, useRef } from 'react';
|
|
7
|
+
import styled from '@xstyled/styled-components';
|
|
8
|
+
import { th } from '@xstyled/system';
|
|
9
|
+
import { Trans } from '@lingui/react';
|
|
10
|
+
import ActionDropdownMenu from './ActionDropdownMenu.js';
|
|
11
|
+
import Popover from '../../../../Popover/index.js';
|
|
12
|
+
import Icon from '../../../../../Elements/Icon/Icon.js';
|
|
13
|
+
var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n padding: 1 2;\n min-width: 9rem;\n height: 28px;\n background-color: ", ";\n color: ", ";\n border: slim;\n border-color: ", ";\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: ", ";\n transition: 0.2s;\n &:not(:disabled):hover {\n color: ", ";\n border-color: ", ";\n }\n p {\n margin: 0;\n margin-right: auto;\n padding-right: 36px;\n }\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n padding: 1 2;\n min-width: 9rem;\n height: 28px;\n background-color: ", ";\n color: ", ";\n border: slim;\n border-color: ", ";\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: ", ";\n transition: 0.2s;\n &:not(:disabled):hover {\n color: ", ";\n border-color: ", ";\n }\n p {\n margin: 0;\n margin-right: auto;\n padding-right: 36px;\n }\n"])), th.color('white'), function (_a) {
|
|
42
14
|
var $isDisabled = _a.$isDisabled;
|
|
43
|
-
return ($isDisabled ?
|
|
15
|
+
return ($isDisabled ? th.color('lightGray7') : th.color('lightGray5'));
|
|
44
16
|
}, function (_a) {
|
|
45
17
|
var $isDisabled = _a.$isDisabled, $isOpened = _a.$isOpened;
|
|
46
|
-
return $isDisabled ?
|
|
18
|
+
return $isDisabled ? th.color('lightGray7') : $isOpened ? th.color('blue2') : th.color('lightGray5');
|
|
47
19
|
}, function (_a) {
|
|
48
20
|
var $isDisabled = _a.$isDisabled;
|
|
49
21
|
return ($isDisabled ? 'not-allowed' : 'pointer');
|
|
50
|
-
},
|
|
51
|
-
var IconWrap =
|
|
22
|
+
}, th.color('gray1'), th.color('gray1'));
|
|
23
|
+
var IconWrap = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n font-size: 0.8rem;\n font-weight: 1000;\n transform: rotate(", ");\n"], ["\n color: ", ";\n font-size: 0.8rem;\n font-weight: 1000;\n transform: rotate(", ");\n"])), function (_a) {
|
|
52
24
|
var $isDisabled = _a.$isDisabled, $isOpened = _a.$isOpened;
|
|
53
|
-
return $isDisabled ?
|
|
25
|
+
return $isDisabled ? th.color('lightGray6') : $isOpened ? th.color('blue2') : th.color('gray1');
|
|
54
26
|
}, function (_a) {
|
|
55
27
|
var $isOpened = _a.$isOpened;
|
|
56
28
|
return ($isOpened ? '180deg' : 0);
|
|
57
29
|
});
|
|
58
30
|
var ActionDropdownSelect = function (_a) {
|
|
59
31
|
var options = _a.options, onSelect = _a.onSelect, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
|
|
60
|
-
var _c =
|
|
61
|
-
var toggleDropdownMenu =
|
|
32
|
+
var _c = React.useState(false), showDropdownMenu = _c[0], setShowDropdownMenu = _c[1];
|
|
33
|
+
var toggleDropdownMenu = React.useCallback(function () {
|
|
62
34
|
setShowDropdownMenu(function (prev) { return !prev; });
|
|
63
35
|
}, []);
|
|
64
|
-
var handleSelectItem =
|
|
36
|
+
var handleSelectItem = React.useCallback(function (item) {
|
|
65
37
|
setShowDropdownMenu(false);
|
|
66
38
|
onSelect(item.value);
|
|
67
39
|
}, [onSelect]);
|
|
68
40
|
var items = options.map(function (item) { return ({ title: item.label, onClick: function () { return handleSelectItem(item); }, link: '#' }); });
|
|
69
|
-
var ref =
|
|
70
|
-
return ((
|
|
41
|
+
var ref = useRef(null);
|
|
42
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Content, { "$isDisabled": disabled, "$isOpened": showDropdownMenu, onClick: toggleDropdownMenu, ref: ref, children: [_jsx("p", { children: _jsx(Trans, { id: "dataGrid.buttonActions", message: "Actions" }) }), _jsx(IconWrap, { "$isDisabled": disabled, "$isOpened": showDropdownMenu, children: _jsx(Icon, { icon: "goDown" }) })] }), showDropdownMenu && !disabled && (items === null || items === void 0 ? void 0 : items.length) > 0 && (_jsx(Popover, { parentRef: ref, onClose: toggleDropdownMenu, placement: "bottom-start", children: _jsx(ActionDropdownMenu, { items: items }) }))] }));
|
|
71
43
|
};
|
|
72
|
-
|
|
44
|
+
export default memo(ActionDropdownSelect);
|
|
73
45
|
var templateObject_1, templateObject_2;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var ActionHead_1 = __importDefault(require("./ActionHead"));
|
|
7
|
-
exports.default = ActionHead_1.default;
|
|
1
|
+
import ActionHead from './ActionHead.js';
|
|
2
|
+
export default ActionHead;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -21,22 +20,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
20
|
}
|
|
22
21
|
return t;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
-
var react_1 = require("react");
|
|
30
|
-
var GridSelect_1 = __importDefault(require("../GridSelect"));
|
|
31
|
-
var core_1 = require("@lingui/core");
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { useMemo } from 'react';
|
|
25
|
+
import GridSelect from '../GridSelect/index.js';
|
|
26
|
+
import { i18n } from '@lingui/core';
|
|
32
27
|
var getFlagOptions = function () { return [
|
|
33
|
-
{ value: '', label:
|
|
34
|
-
{ value: '1', label:
|
|
35
|
-
{ value: '0', label:
|
|
28
|
+
{ value: '', label: i18n._({ id: 'dataGrid.columnActive.filterOptions.all', message: 'All' }) },
|
|
29
|
+
{ value: '1', label: i18n._({ id: 'dataGrid.columnActive.filterOptions.yes', message: 'Yes' }) },
|
|
30
|
+
{ value: '0', label: i18n._({ id: 'dataGrid.columnActive.filterOptions.no', message: 'No' }) },
|
|
36
31
|
]; };
|
|
37
32
|
var SelectFilter = function (_a) {
|
|
38
33
|
var restProps = __rest(_a, []);
|
|
39
|
-
var options =
|
|
40
|
-
return (
|
|
34
|
+
var options = useMemo(function () { return getFlagOptions(); }, []);
|
|
35
|
+
return _jsx(GridSelect, __assign({ options: options }, restProps));
|
|
41
36
|
};
|
|
42
|
-
|
|
37
|
+
export default SelectFilter;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var BooleanSelect_1 = __importDefault(require("./BooleanSelect"));
|
|
7
|
-
exports.default = BooleanSelect_1.default;
|
|
1
|
+
import BooleanSelect from './BooleanSelect.js';
|
|
2
|
+
export default BooleanSelect;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
3
|
return cooked;
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var Button_1 = __importDefault(require("../../../../Elements/Button/Button"));
|
|
15
|
-
var DropdownMenu_1 = __importDefault(require("../../../../Elements/DropdownMenu"));
|
|
16
|
-
var ButtonWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: fit-content;\n"], ["\n position: relative;\n width: fit-content;\n"])));
|
|
17
|
-
var StyledDropdownMenu = (0, styled_components_1.default)(DropdownMenu_1.default)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n right: 0;\n width: max-content;\n z-index: 2;\n"], ["\n position: absolute;\n top: ", ";\n bottom: ", ";\n right: 0;\n width: max-content;\n z-index: 2;\n"])), function (_a) {
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useCallback, useState } from 'react';
|
|
7
|
+
import styled from '@xstyled/styled-components';
|
|
8
|
+
import { useClickOutside } from '../../../Modal/hooks/useClickOutside.js';
|
|
9
|
+
import Button from '../../../../Elements/Button/Button.js';
|
|
10
|
+
import DropdownMenu from '../../../../Elements/DropdownMenu/index.js';
|
|
11
|
+
var ButtonWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: fit-content;\n"], ["\n position: relative;\n width: fit-content;\n"])));
|
|
12
|
+
var StyledDropdownMenu = styled(DropdownMenu)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n right: 0;\n width: max-content;\n z-index: 2;\n"], ["\n position: absolute;\n top: ", ";\n bottom: ", ";\n right: 0;\n width: max-content;\n z-index: 2;\n"])), function (_a) {
|
|
18
13
|
var dropdownPosition = _a.dropdownPosition;
|
|
19
14
|
return (!dropdownPosition || dropdownPosition === 'bottom' ? 'calc(100% + 8px)' : 'auto');
|
|
20
15
|
}, function (_a) {
|
|
@@ -23,15 +18,15 @@ var StyledDropdownMenu = (0, styled_components_1.default)(DropdownMenu_1.default
|
|
|
23
18
|
});
|
|
24
19
|
var ButtonMore = function (_a) {
|
|
25
20
|
var items = _a.items, disabled = _a.disabled, dropdownPosition = _a.dropdownPosition;
|
|
26
|
-
var _b =
|
|
27
|
-
var onClose =
|
|
21
|
+
var _b = useState(false), actionsVisible = _b[0], setActionsVisible = _b[1];
|
|
22
|
+
var onClose = useCallback(function () {
|
|
28
23
|
setActionsVisible(false);
|
|
29
24
|
}, []);
|
|
30
|
-
var ref =
|
|
31
|
-
var handleClick =
|
|
25
|
+
var ref = useClickOutside({ onClose: onClose });
|
|
26
|
+
var handleClick = useCallback(function () {
|
|
32
27
|
setActionsVisible(!actionsVisible);
|
|
33
28
|
}, [actionsVisible]);
|
|
34
|
-
return ((
|
|
29
|
+
return (_jsxs(ButtonWrapper, { ref: ref, children: [_jsx(Button, { onClick: handleClick, icon: "ellipsisVertical", appearance: "secondaryLg", type: "button", sizing: "iconLg", "data-cy": "gridActionBtn", disabled: disabled }), _jsx(StyledDropdownMenu, { showMenu: actionsVisible, items: items, dropdownPosition: dropdownPosition })] }));
|
|
35
30
|
};
|
|
36
|
-
|
|
31
|
+
export default ButtonMore;
|
|
37
32
|
var templateObject_1, templateObject_2;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var ButtonMore_1 = __importDefault(require("./ButtonMore"));
|
|
7
|
-
exports.default = ButtonMore_1.default;
|
|
1
|
+
import ButtonMore from './ButtonMore.js';
|
|
2
|
+
export default ButtonMore;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,37 +9,33 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var useAddFilter_1 = require("../hooks/useAddFilter");
|
|
22
|
-
var utils_1 = require("../utils");
|
|
23
|
-
var utils_2 = require("../utils");
|
|
24
|
-
var FilterDropdown_1 = __importDefault(require("./FilterDropdown"));
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { x } from '@xstyled/styled-components';
|
|
15
|
+
import { Cell } from './Table.js';
|
|
16
|
+
import { useAddFilter } from '../hooks/useAddFilter.js';
|
|
17
|
+
import { createFilterType, getStickyCollClassNames } from '../utils/index.js';
|
|
18
|
+
import { getCellSizeProps, getGroupClassNames } from '../utils/index.js';
|
|
19
|
+
import OverlayComponent from './FilterDropdown.js';
|
|
25
20
|
var ColumnFilterCell = function (_a) {
|
|
26
21
|
var onChange = _a.onChange, value = _a.value, displayColumnWidth = _a.displayColumnWidth, filters = _a.filters, columnDefinition = _a.column, group = _a.group;
|
|
27
|
-
var cellSizeProps =
|
|
28
|
-
var handleAddFilter =
|
|
29
|
-
var handleChange =
|
|
22
|
+
var cellSizeProps = getCellSizeProps(columnDefinition, displayColumnWidth);
|
|
23
|
+
var handleAddFilter = useAddFilter(onChange);
|
|
24
|
+
var handleChange = React.useCallback(function (event) {
|
|
30
25
|
handleAddFilter((event === null || event === void 0 ? void 0 : event.target) ? event.target.value : event, columnDefinition);
|
|
31
26
|
}, [handleAddFilter, columnDefinition]);
|
|
32
|
-
var cellClassName = "cell".concat(
|
|
27
|
+
var cellClassName = "cell".concat(getStickyCollClassNames(!!columnDefinition.sticky, columnDefinition.stickTo), " ").concat(getGroupClassNames(group));
|
|
33
28
|
if (!columnDefinition.filtering) {
|
|
34
|
-
return (
|
|
29
|
+
return _jsx(Cell, __assign({ className: cellClassName }, cellSizeProps));
|
|
35
30
|
}
|
|
36
|
-
var filterType =
|
|
31
|
+
var filterType = createFilterType(columnDefinition);
|
|
37
32
|
var filterConfig = filters === null || filters === void 0 ? void 0 : filters[filterType];
|
|
38
33
|
var RenderComponent = filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.CellComponent;
|
|
39
34
|
if (!RenderComponent) {
|
|
40
35
|
console.error("ERROR, using unknown filter type ".concat(filterType));
|
|
41
|
-
return ((
|
|
36
|
+
return (_jsx(x.div, { children: _jsx("span", { children: "".concat(filterType, " filter") }) }));
|
|
42
37
|
}
|
|
43
38
|
var passProps = __assign(__assign(__assign({}, filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.defaultExtraProps), columnDefinition.filterExtraProps), (filterType == 'options' && { options: columnDefinition.filterOptions }));
|
|
44
|
-
return ((
|
|
39
|
+
return (_jsx(Cell, __assign({ className: cellClassName }, cellSizeProps, { children: _jsx(x.div, { className: "test", children: _jsx(RenderComponent, __assign({ "data-test": columnDefinition.name, name: columnDefinition.name, onChange: handleChange, value: value, OverlayComponent: OverlayComponent }, passProps)) }) })));
|
|
45
40
|
};
|
|
46
|
-
|
|
41
|
+
export default ColumnFilterCell;
|
|
@@ -1,69 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
3
|
return cooked;
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
34
|
-
var react_1 = require("react");
|
|
35
|
-
var styled_components_1 = __importStar(require("@xstyled/styled-components"));
|
|
36
|
-
var Icon_1 = __importDefault(require("../../../../Elements/Icon/Icon"));
|
|
5
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useState, useCallback, useRef, useEffect } from 'react';
|
|
7
|
+
import styled, { x, css } from '@xstyled/styled-components';
|
|
8
|
+
import Icon from '../../../../Elements/Icon/Icon.js';
|
|
37
9
|
// ArrowWrap and WarningWrap need to have the same size to solve resizing issues
|
|
38
10
|
var WRAPPER_WIDTH = 35;
|
|
39
|
-
var Wrap =
|
|
40
|
-
var Title =
|
|
41
|
-
var arrowStyles =
|
|
42
|
-
var InlineArrowWrap =
|
|
11
|
+
var Wrap = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n font-size: 0.8rem;\n"], ["\n width: 100%;\n font-size: 0.8rem;\n"])));
|
|
12
|
+
var Title = styled.h4(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: unset;\n align-self: center;\n flex-shrink: 1;\n"], ["\n margin: unset;\n align-self: center;\n flex-shrink: 1;\n"])));
|
|
13
|
+
var arrowStyles = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n & > * {\n cursor: pointer;\n }\n"], ["\n flex-direction: row;\n & > * {\n cursor: pointer;\n }\n"])));
|
|
14
|
+
var InlineArrowWrap = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: ", ";\n position: static;\n font-size: 1rem;\n ", "\n margin-left: 6px;\n"], ["\n display: ", ";\n position: static;\n font-size: 1rem;\n ", "\n margin-left: 6px;\n"])), function (_a) {
|
|
43
15
|
var $isPopup = _a.$isPopup;
|
|
44
16
|
return ($isPopup ? 'none' : 'flex');
|
|
45
17
|
}, arrowStyles);
|
|
46
|
-
var PopupArrowWrap =
|
|
47
|
-
var OverflowWrap =
|
|
48
|
-
var WarningWrap =
|
|
18
|
+
var PopupArrowWrap = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n position: absolute;\n top: 0;\n left: -24px;\n background-color: lightGray2;\n font-size: 0.8rem;\n border-radius: 0.4rem;\n padding: 0 4px;\n ", "\n width: ", "px;\n box-shadow: tooltipShadow;\n z-index: 1;\n"], ["\n display: flex;\n position: absolute;\n top: 0;\n left: -24px;\n background-color: lightGray2;\n font-size: 0.8rem;\n border-radius: 0.4rem;\n padding: 0 4px;\n ", "\n width: ", "px;\n box-shadow: tooltipShadow;\n z-index: 1;\n"])), arrowStyles, WRAPPER_WIDTH);
|
|
19
|
+
var OverflowWrap = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: none;\n position: relative;\n overflow: visible;\n &:hover {\n display: block;\n }\n"], ["\n display: none;\n position: relative;\n overflow: visible;\n &:hover {\n display: block;\n }\n"])));
|
|
20
|
+
var WarningWrap = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: relative;\n display: ", ";\n font-size: 0.7rem;\n margin-right: 6px;\n align-self: center;\n &:hover + ", " {\n display: flex;\n }\n"], ["\n position: relative;\n display: ", ";\n font-size: 0.7rem;\n margin-right: 6px;\n align-self: center;\n &:hover + ", " {\n display: flex;\n }\n"])), function (_a) {
|
|
49
21
|
var $isPopup = _a.$isPopup;
|
|
50
22
|
return ($isPopup ? 'block' : 'none');
|
|
51
23
|
}, OverflowWrap);
|
|
52
|
-
var Content =
|
|
24
|
+
var Content = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n justify-content: ", ";\n display: flex;\n"], ["\n justify-content: ", ";\n display: flex;\n"])), function (_a) {
|
|
53
25
|
var $isPopup = _a.$isPopup;
|
|
54
26
|
return ($isPopup ? 'space-between' : 'unset');
|
|
55
27
|
});
|
|
56
28
|
var ColumnTitle = function (_a) {
|
|
57
29
|
var title = _a.title, isSortable = _a.isSortable, onSetSort = _a.onSetSort, sortValue = _a.sortValue;
|
|
58
|
-
var _b =
|
|
59
|
-
var onSetAsc =
|
|
60
|
-
var onSetDesc =
|
|
61
|
-
var onSetNull =
|
|
30
|
+
var _b = useState(false), isOverflowing = _b[0], setIsOverflowing = _b[1];
|
|
31
|
+
var onSetAsc = useCallback(function () { return onSetSort === null || onSetSort === void 0 ? void 0 : onSetSort('asc'); }, [onSetSort]);
|
|
32
|
+
var onSetDesc = useCallback(function () { return onSetSort === null || onSetSort === void 0 ? void 0 : onSetSort('desc'); }, [onSetSort]);
|
|
33
|
+
var onSetNull = useCallback(function () { return onSetSort === null || onSetSort === void 0 ? void 0 : onSetSort(null); }, [onSetSort]);
|
|
62
34
|
var isAsc = sortValue == 'asc';
|
|
63
35
|
var isDesc = sortValue == 'desc';
|
|
64
|
-
var wrapRef =
|
|
65
|
-
var contentRef =
|
|
66
|
-
|
|
36
|
+
var wrapRef = useRef(null);
|
|
37
|
+
var contentRef = useRef(null);
|
|
38
|
+
useEffect(function () {
|
|
67
39
|
var wrapRefCopy = wrapRef.current;
|
|
68
40
|
var contentRefCopy = contentRef.current;
|
|
69
41
|
if (!wrapRefCopy || !contentRefCopy)
|
|
@@ -79,8 +51,8 @@ var ColumnTitle = function (_a) {
|
|
|
79
51
|
};
|
|
80
52
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
53
|
}, [wrapRef === null || wrapRef === void 0 ? void 0 : wrapRef.current]);
|
|
82
|
-
var Arrows = ((
|
|
83
|
-
return ((
|
|
54
|
+
var Arrows = (_jsxs(_Fragment, { children: [_jsx(x.div, { onClick: isAsc ? onSetNull : onSetAsc, children: _jsx(Icon, { icon: "chevronUp", fill: isAsc ? 'blue2' : 'lightGray3' }) }), _jsx(x.div, { onClick: isDesc ? onSetNull : onSetDesc, children: _jsx(Icon, { icon: "chevronDown", fill: isDesc ? 'blue2' : 'lightGray3' }) })] }));
|
|
55
|
+
return (_jsx(Wrap, { ref: wrapRef, children: _jsxs(Content, { "$isPopup": isOverflowing, children: [_jsx("div", { children: _jsx(Title, { ref: contentRef, children: title }) }), isSortable && (_jsxs(_Fragment, { children: [_jsx(WarningWrap, { "$isPopup": isOverflowing, children: _jsx(Icon, { icon: "warningDual", fill: "black", secondaryColor: "yellow2" }) }), _jsx(OverflowWrap, { "$isPopup": isOverflowing, children: _jsx(PopupArrowWrap, { "$isPopup": isOverflowing, children: Arrows }) }), _jsx(InlineArrowWrap, { "$isPopup": isOverflowing, children: Arrows })] }))] }) }));
|
|
84
56
|
};
|
|
85
|
-
|
|
57
|
+
export default ColumnTitle;
|
|
86
58
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var ColumnTitle_1 = __importDefault(require("./ColumnTitle"));
|
|
7
|
-
exports.default = ColumnTitle_1.default;
|
|
1
|
+
import ColumnTitle from './ColumnTitle.js';
|
|
2
|
+
export default ColumnTitle;
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
3
|
return cooked;
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var react_1 = __importDefault(require("react"));
|
|
12
|
-
var styled_components_1 = __importDefault(require("@xstyled/styled-components"));
|
|
13
|
-
var Sorting_1 = require("./icons/Sorting");
|
|
14
|
-
var Title = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n & + * {\n margin-left: 1em;\n }\n"], ["\n & + * {\n margin-left: 1em;\n }\n"])));
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import styled from '@xstyled/styled-components';
|
|
8
|
+
import { SortingUp, SortingDown } from './icons/Sorting.js';
|
|
9
|
+
var Title = styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n & + * {\n margin-left: 1em;\n }\n"], ["\n & + * {\n margin-left: 1em;\n }\n"])));
|
|
15
10
|
var ColumnTitle = function (_a) {
|
|
16
11
|
var title = _a.title, isSortable = _a.isSortable, onSetSort = _a.onSetSort, sortValue = _a.sortValue;
|
|
17
|
-
var handleClick =
|
|
12
|
+
var handleClick = React.useCallback(function () {
|
|
18
13
|
var newValue = sortValue ? (sortValue == 'asc' ? 'desc' : null) : 'asc';
|
|
19
14
|
if (onSetSort)
|
|
20
15
|
onSetSort(newValue);
|
|
21
16
|
}, [sortValue, onSetSort]);
|
|
22
|
-
return ((
|
|
17
|
+
return (_jsxs("div", { onClick: isSortable ? handleClick : undefined, className: isSortable ? 'sortable' : '', children: [_jsx(Title, { children: title }), isSortable && sortValue === 'asc' && _jsx(SortingUp, { width: "16" }), isSortable && sortValue === 'desc' && _jsx(SortingDown, { width: "16" })] }));
|
|
23
18
|
};
|
|
24
|
-
|
|
19
|
+
export default React.memo(ColumnTitle);
|
|
25
20
|
var templateObject_1;
|
|
@@ -1,49 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
3
|
return cooked;
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.Row = void 0;
|
|
34
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
35
|
-
var styled_components_1 = __importStar(require("@xstyled/styled-components"));
|
|
36
|
-
var react_1 = require("@lingui/react");
|
|
37
|
-
var ExtraControlButtons_1 = __importDefault(require("../ExtraControlButtons"));
|
|
38
|
-
var types_1 = require("../../types");
|
|
39
|
-
var Button_1 = __importDefault(require("../../../../Elements/Button/Button"));
|
|
40
|
-
exports.Row = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n position: sticky;\n left: 20px;\n"], ["\n display: flex;\n position: sticky;\n left: 20px;\n"])));
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import styled, { x } from '@xstyled/styled-components';
|
|
7
|
+
import { Trans } from '@lingui/react';
|
|
8
|
+
import ExtraControlButtons from '../ExtraControlButtons/index.js';
|
|
9
|
+
import { ExtraControlButtonPosition } from '../../types.js';
|
|
10
|
+
import Button from '../../../../Elements/Button/Button.js';
|
|
11
|
+
export var Row = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n position: sticky;\n left: 20px;\n"], ["\n display: flex;\n position: sticky;\n left: 20px;\n"])));
|
|
41
12
|
var ControlButtons = function (_a) {
|
|
42
13
|
var extraControlButtons = _a.extraControlButtons, eshopSelect = _a.eshopSelect, gridActions = _a.gridActions, gridSelectors = _a.gridSelectors;
|
|
43
14
|
var resetFilters = gridActions.resetFilters;
|
|
44
15
|
var filter = gridSelectors.filter;
|
|
45
16
|
var filtersOn = !!filter && Object.values(filter).some(function (item) { var _a; return ((_a = item.value) === null || _a === void 0 ? void 0 : _a.value) !== '' && item.value !== ''; });
|
|
46
|
-
return ((
|
|
17
|
+
return (_jsxs(Row, { children: [eshopSelect && (_jsx(x.div, { children: _jsx(ExtraControlButtons, { extraControlButtons: eshopSelect, targetPosition: ExtraControlButtonPosition.TopRight }) })), _jsx(ExtraControlButtons, { extraControlButtons: extraControlButtons, targetPosition: ExtraControlButtonPosition.TopLeft }), _jsx(x.div, { children: filtersOn && (_jsx(Button, { type: "button", onClick: resetFilters, appearance: "secondaryLg", "data-cy": "resetFiltersBtn", children: _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset filters" }) })) })] }));
|
|
47
18
|
};
|
|
48
|
-
|
|
19
|
+
export default ControlButtons;
|
|
49
20
|
var templateObject_1;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var ControlButtons_1 = __importDefault(require("./ControlButtons"));
|
|
7
|
-
exports.default = ControlButtons_1.default;
|
|
1
|
+
import ControlButtons from './ControlButtons.js';
|
|
2
|
+
export default ControlButtons;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,30 +9,26 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var get_1 = __importDefault(require("lodash/fp/get"));
|
|
20
|
-
var Table_1 = require("./Table");
|
|
21
|
-
var utils_1 = require("../utils");
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import get from 'lodash/fp/get';
|
|
15
|
+
import { TextCell } from './Table.js';
|
|
16
|
+
import { getCellSizeProps, getGroupClassNames, getStickyCollClassNames } from '../utils/index.js';
|
|
22
17
|
var DataCell = function (_a) {
|
|
23
18
|
var column = _a.column, group = _a.group, rowData = _a.rowData, onRowAction = _a.onRowAction, displayColumnWidth = _a.displayColumnWidth;
|
|
24
|
-
var Wrapper = column.fixedSize ? 'div' :
|
|
19
|
+
var Wrapper = column.fixedSize ? 'div' : TextCell;
|
|
25
20
|
var wrapperBaseProps = column.fixedSize
|
|
26
|
-
? { style: __assign(__assign({},
|
|
27
|
-
:
|
|
28
|
-
var cellClassName = "cell".concat(
|
|
21
|
+
? { style: __assign(__assign({}, getCellSizeProps(column, displayColumnWidth)), { alignSelf: 'center' }) }
|
|
22
|
+
: getCellSizeProps(column, displayColumnWidth);
|
|
23
|
+
var cellClassName = "cell".concat(getStickyCollClassNames(!!column.sticky, column.stickTo), " ").concat(getGroupClassNames(group));
|
|
29
24
|
if (column.cellComponent) {
|
|
30
|
-
return ((
|
|
25
|
+
return (_jsx(Wrapper, __assign({ className: cellClassName }, wrapperBaseProps, { children: _jsx(column.cellComponent, { rowData: rowData, onRowAction: onRowAction, column: column }) })));
|
|
31
26
|
}
|
|
32
27
|
else {
|
|
33
|
-
return ((
|
|
28
|
+
return (_jsx(Wrapper, __assign({ className: cellClassName }, wrapperBaseProps, { children: column.formatRowValue ? column.formatRowValue(rowData) : get(column.name, rowData) })));
|
|
34
29
|
}
|
|
35
30
|
};
|
|
36
|
-
var MemoDataCell =
|
|
31
|
+
var MemoDataCell = React.memo(DataCell, function (prevProps, newProps) {
|
|
37
32
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
38
33
|
if (prevProps.rowData !== newProps.rowData ||
|
|
39
34
|
prevProps.displayColumnWidth !== newProps.displayColumnWidth ||
|
|
@@ -54,4 +49,4 @@ var MemoDataCell = react_1.default.memo(DataCell, function (prevProps, newProps)
|
|
|
54
49
|
}
|
|
55
50
|
return true;
|
|
56
51
|
});
|
|
57
|
-
|
|
52
|
+
export default MemoDataCell;
|