@mailstep/design-system 0.6.2-beta.3 → 0.6.2-beta.4
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.js +85 -146
- 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,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,16 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var immer_1 = __importDefault(require("immer"));
|
|
19
|
-
var getOr_1 = __importDefault(require("lodash/fp/getOr"));
|
|
20
|
-
var migrateState_1 = __importDefault(require("./migrateState"));
|
|
21
|
-
var reselect_1 = require("reselect");
|
|
22
|
-
exports.initialState = {
|
|
12
|
+
import produce from 'immer';
|
|
13
|
+
import getOr from 'lodash/fp/getOr';
|
|
14
|
+
import migrateState from './migrateState.js';
|
|
15
|
+
import { createSelector } from 'reselect';
|
|
16
|
+
export var initialState = {
|
|
23
17
|
page: 1,
|
|
24
18
|
rowsPerPage: 10,
|
|
25
19
|
sorting: [],
|
|
@@ -34,33 +28,33 @@ exports.initialState = {
|
|
|
34
28
|
columnsOrder: [],
|
|
35
29
|
defaultSorting: [],
|
|
36
30
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
init: "".concat(
|
|
40
|
-
clearUxState: "".concat(
|
|
41
|
-
handleUxChange: "".concat(
|
|
42
|
-
openConfigForm: "".concat(
|
|
43
|
-
closeConfigForm: "".concat(
|
|
44
|
-
setColumnConfig: "".concat(
|
|
45
|
-
setPage: "".concat(
|
|
46
|
-
setRowsPerPage: "".concat(
|
|
47
|
-
resetFilters: "".concat(
|
|
48
|
-
addFilter: "".concat(
|
|
49
|
-
addSorting: "".concat(
|
|
50
|
-
clearSettings: "".concat(
|
|
51
|
-
resetGrid: "".concat(
|
|
52
|
-
setColumnWidth: "".concat(
|
|
53
|
-
setColumnsOrder: "".concat(
|
|
31
|
+
export var actionPrefix = '@store/CommonGrid';
|
|
32
|
+
export var actionTypes = {
|
|
33
|
+
init: "".concat(actionPrefix, "/init"),
|
|
34
|
+
clearUxState: "".concat(actionPrefix, "/clearUxState"),
|
|
35
|
+
handleUxChange: "".concat(actionPrefix, "/handleUxChange"),
|
|
36
|
+
openConfigForm: "".concat(actionPrefix, "/openConfigForm"),
|
|
37
|
+
closeConfigForm: "".concat(actionPrefix, "/closeConfigForm"),
|
|
38
|
+
setColumnConfig: "".concat(actionPrefix, "/setColumnConfig"),
|
|
39
|
+
setPage: "".concat(actionPrefix, "/setPage"),
|
|
40
|
+
setRowsPerPage: "".concat(actionPrefix, "/setRowsPerPage"),
|
|
41
|
+
resetFilters: "".concat(actionPrefix, "/resetFilters"),
|
|
42
|
+
addFilter: "".concat(actionPrefix, "/addFilter"),
|
|
43
|
+
addSorting: "".concat(actionPrefix, "/addSorting"),
|
|
44
|
+
clearSettings: "".concat(actionPrefix, "/clearSettings"),
|
|
45
|
+
resetGrid: "".concat(actionPrefix, "/resetGrid"),
|
|
46
|
+
setColumnWidth: "".concat(actionPrefix, "/setColumnWidth"),
|
|
47
|
+
setColumnsOrder: "".concat(actionPrefix, "/setColumnsOrder"),
|
|
54
48
|
};
|
|
55
49
|
var migrationChecked = false;
|
|
56
|
-
|
|
50
|
+
export default (function (state, action) {
|
|
57
51
|
if (state === void 0) { state = {}; }
|
|
58
|
-
return (
|
|
52
|
+
return produce(state, function (draft) {
|
|
59
53
|
var _a, _b;
|
|
60
54
|
var _c, _d, _e, _f, _g;
|
|
61
55
|
// version migrations
|
|
62
56
|
if (!migrationChecked && state && Object.keys(state).length > 0) {
|
|
63
|
-
draft = (
|
|
57
|
+
draft = migrateState(draft);
|
|
64
58
|
migrationChecked = true;
|
|
65
59
|
}
|
|
66
60
|
var gridName = action.gridName;
|
|
@@ -68,9 +62,9 @@ exports.default = (function (state, action) {
|
|
|
68
62
|
return draft; // action does not contains gridName, skip immediatelly
|
|
69
63
|
if (!draft[gridName]) {
|
|
70
64
|
// if this grid is not yet in store, initialize
|
|
71
|
-
draft[gridName] = __assign({},
|
|
65
|
+
draft[gridName] = __assign({}, initialState);
|
|
72
66
|
}
|
|
73
|
-
if (action.type ===
|
|
67
|
+
if (action.type === actionTypes.init) {
|
|
74
68
|
var defaultSorting = action.initProps.defaultSorting;
|
|
75
69
|
draft[gridName].page = 1;
|
|
76
70
|
if (defaultSorting) {
|
|
@@ -78,34 +72,34 @@ exports.default = (function (state, action) {
|
|
|
78
72
|
draft[gridName].sorting = ((_c = draft[gridName].sorting) === null || _c === void 0 ? void 0 : _c.length) ? draft[gridName].sorting : defaultSorting;
|
|
79
73
|
}
|
|
80
74
|
}
|
|
81
|
-
else if (action.type ===
|
|
82
|
-
draft[gridName].uxState =
|
|
75
|
+
else if (action.type === actionTypes.clearUxState) {
|
|
76
|
+
draft[gridName].uxState = initialState.uxState;
|
|
83
77
|
}
|
|
84
|
-
else if (action.type ===
|
|
78
|
+
else if (action.type === actionTypes.handleUxChange) {
|
|
85
79
|
// for a specific row id (action.id) append uxState from action
|
|
86
80
|
draft[gridName].uxState = __assign(__assign({}, draft[gridName].uxState), (_a = {}, _a[action.uxKey] = action.uxValue, _a));
|
|
87
81
|
}
|
|
88
|
-
else if (action.type ===
|
|
82
|
+
else if (action.type === actionTypes.openConfigForm) {
|
|
89
83
|
draft[gridName].isConfigFormOpen = true;
|
|
90
84
|
}
|
|
91
|
-
else if (action.type ===
|
|
85
|
+
else if (action.type === actionTypes.closeConfigForm) {
|
|
92
86
|
draft[gridName].isConfigFormOpen = false;
|
|
93
87
|
}
|
|
94
|
-
else if (action.type ===
|
|
88
|
+
else if (action.type === actionTypes.setColumnConfig) {
|
|
95
89
|
draft[gridName].columnConfig = action.columnConfig;
|
|
96
90
|
draft[gridName].isConfigFormOpen = false;
|
|
97
91
|
}
|
|
98
|
-
else if (action.type ===
|
|
92
|
+
else if (action.type === actionTypes.resetFilters) {
|
|
99
93
|
draft[gridName].filter = {};
|
|
100
94
|
}
|
|
101
|
-
else if (action.type ===
|
|
95
|
+
else if (action.type === actionTypes.addFilter) {
|
|
102
96
|
// append desired filter for specific column to existing filters
|
|
103
97
|
var column = action.column, value = action.value, filterProps = action.filterProps;
|
|
104
98
|
var currentFilterState = (_b = {}, _b[column] = { value: value, filterProps: filterProps }, _b);
|
|
105
99
|
draft[gridName].filter = __assign(__assign({}, draft[gridName].filter), currentFilterState);
|
|
106
100
|
draft[gridName].page = 1;
|
|
107
101
|
}
|
|
108
|
-
else if (action.type ===
|
|
102
|
+
else if (action.type === actionTypes.addSorting) {
|
|
109
103
|
// append desired sorting for specific column to existing sortings
|
|
110
104
|
var direction = action.direction;
|
|
111
105
|
var column = action.column;
|
|
@@ -119,111 +113,109 @@ exports.default = (function (state, action) {
|
|
|
119
113
|
}
|
|
120
114
|
draft[gridName].sorting = sorting;
|
|
121
115
|
}
|
|
122
|
-
else if (action.type ===
|
|
116
|
+
else if (action.type === actionTypes.clearSettings) {
|
|
123
117
|
// clear grid for reuse
|
|
124
|
-
draft[gridName].page =
|
|
125
|
-
draft[gridName].filter =
|
|
126
|
-
draft[gridName].uxState =
|
|
118
|
+
draft[gridName].page = initialState.page;
|
|
119
|
+
draft[gridName].filter = initialState.filter;
|
|
120
|
+
draft[gridName].uxState = initialState.uxState;
|
|
127
121
|
}
|
|
128
|
-
else if (action.type ===
|
|
122
|
+
else if (action.type === actionTypes.setPage) {
|
|
129
123
|
draft[gridName].page = action.page;
|
|
130
124
|
}
|
|
131
|
-
else if (action.type ===
|
|
125
|
+
else if (action.type === actionTypes.setRowsPerPage) {
|
|
132
126
|
draft[gridName].rowsPerPage = action.rowsPerPage;
|
|
133
127
|
}
|
|
134
|
-
else if (action.type ===
|
|
135
|
-
draft[gridName] = __assign(__assign({},
|
|
128
|
+
else if (action.type === actionTypes.resetGrid) {
|
|
129
|
+
draft[gridName] = __assign(__assign({}, initialState), { rowsPerPage: draft[gridName].rowsPerPage });
|
|
136
130
|
}
|
|
137
|
-
else if (action.type ===
|
|
131
|
+
else if (action.type === actionTypes.setColumnWidth) {
|
|
138
132
|
if (action.columnsWidth === null) {
|
|
139
|
-
draft[gridName].columnsWidth =
|
|
133
|
+
draft[gridName].columnsWidth = initialState.columnsWidth;
|
|
140
134
|
}
|
|
141
135
|
else {
|
|
142
136
|
draft[gridName].columnsWidth = __assign(__assign({}, draft[gridName].columnsWidth), action.columnsWidth);
|
|
143
137
|
}
|
|
144
138
|
draft[gridName].columnsWidthVariant = action.columnLayout;
|
|
145
139
|
}
|
|
146
|
-
else if (action.type ===
|
|
140
|
+
else if (action.type === actionTypes.setColumnsOrder) {
|
|
147
141
|
draft[gridName].columnsOrder = action.columnsOrder;
|
|
148
142
|
}
|
|
149
143
|
return draft;
|
|
150
144
|
});
|
|
151
145
|
});
|
|
152
|
-
var createActions = function (gridName) { return ({
|
|
153
|
-
init: function (initProps) { return ({ gridName: gridName, type:
|
|
154
|
-
clearUxState: function () { return ({ gridName: gridName, type:
|
|
146
|
+
export var createActions = function (gridName) { return ({
|
|
147
|
+
init: function (initProps) { return ({ gridName: gridName, type: actionTypes.init, initProps: initProps }); },
|
|
148
|
+
clearUxState: function () { return ({ gridName: gridName, type: actionTypes.clearUxState }); },
|
|
155
149
|
handleUxChange: function (uxKey, uxValue) { return ({
|
|
156
150
|
gridName: gridName,
|
|
157
|
-
type:
|
|
151
|
+
type: actionTypes.handleUxChange,
|
|
158
152
|
uxKey: uxKey,
|
|
159
153
|
uxValue: uxValue,
|
|
160
154
|
}); },
|
|
161
|
-
openConfigForm: function () { return ({ gridName: gridName, type:
|
|
162
|
-
closeConfigForm: function () { return ({ gridName: gridName, type:
|
|
163
|
-
setColumnConfig: function (columnConfig) { return ({ gridName: gridName, type:
|
|
164
|
-
setPage: function (page) { return ({ gridName: gridName, type:
|
|
155
|
+
openConfigForm: function () { return ({ gridName: gridName, type: actionTypes.openConfigForm }); },
|
|
156
|
+
closeConfigForm: function () { return ({ gridName: gridName, type: actionTypes.closeConfigForm }); },
|
|
157
|
+
setColumnConfig: function (columnConfig) { return ({ gridName: gridName, type: actionTypes.setColumnConfig, columnConfig: columnConfig }); },
|
|
158
|
+
setPage: function (page) { return ({ gridName: gridName, type: actionTypes.setPage, page: page }); },
|
|
165
159
|
setColumnWidth: function (columnsWidth, columnLayout) { return ({
|
|
166
160
|
gridName: gridName,
|
|
167
|
-
type:
|
|
161
|
+
type: actionTypes.setColumnWidth,
|
|
168
162
|
columnsWidth: columnsWidth,
|
|
169
163
|
columnLayout: columnLayout,
|
|
170
164
|
}); },
|
|
171
|
-
resetGrid: function () { return ({ gridName: gridName, type:
|
|
165
|
+
resetGrid: function () { return ({ gridName: gridName, type: actionTypes.resetGrid }); },
|
|
172
166
|
setColumnsOrder: function (columnsOrder) { return ({
|
|
173
167
|
gridName: gridName,
|
|
174
|
-
type:
|
|
168
|
+
type: actionTypes.setColumnsOrder,
|
|
175
169
|
columnsOrder: columnsOrder,
|
|
176
170
|
}); },
|
|
177
|
-
setRowsPerPage: function (rowsPerPage) { return ({ gridName: gridName, type:
|
|
178
|
-
resetFilters: function () { return ({ gridName: gridName, type:
|
|
171
|
+
setRowsPerPage: function (rowsPerPage) { return ({ gridName: gridName, type: actionTypes.setRowsPerPage, rowsPerPage: rowsPerPage }); },
|
|
172
|
+
resetFilters: function () { return ({ gridName: gridName, type: actionTypes.resetFilters }); },
|
|
179
173
|
addFilter: function (column, value, filterProps) { return ({
|
|
180
174
|
gridName: gridName,
|
|
181
|
-
type:
|
|
175
|
+
type: actionTypes.addFilter,
|
|
182
176
|
column: column,
|
|
183
177
|
value: value,
|
|
184
178
|
filterProps: filterProps,
|
|
185
179
|
}); },
|
|
186
180
|
addSorting: function (column, direction) { return ({
|
|
187
181
|
gridName: gridName,
|
|
188
|
-
type:
|
|
182
|
+
type: actionTypes.addSorting,
|
|
189
183
|
column: column,
|
|
190
184
|
direction: direction,
|
|
191
185
|
}); },
|
|
192
|
-
clearSettings: function () { return ({ gridName: gridName, type:
|
|
186
|
+
clearSettings: function () { return ({ gridName: gridName, type: actionTypes.clearSettings }); },
|
|
193
187
|
}); };
|
|
194
|
-
|
|
195
|
-
var createSelectors = function (gridName) { return ({
|
|
188
|
+
export var createSelectors = function (gridName) { return ({
|
|
196
189
|
getUxState: function (state) {
|
|
197
|
-
return (
|
|
190
|
+
return getOr(initialState.uxState, "commonGrid.".concat(gridName, ".uxState"), state);
|
|
198
191
|
},
|
|
199
192
|
isConfigFormOpen: function (state) {
|
|
200
|
-
return (
|
|
193
|
+
return getOr(initialState.isConfigFormOpen, "commonGrid.".concat(gridName, ".isConfigFormOpen"), state);
|
|
201
194
|
},
|
|
202
195
|
getColumnConfig: function (state) {
|
|
203
|
-
return (
|
|
196
|
+
return getOr(initialState.columnConfig, "commonGrid.".concat(gridName, ".columnConfig"), state);
|
|
204
197
|
},
|
|
205
|
-
getPage: function (state) { return (
|
|
198
|
+
getPage: function (state) { return getOr(initialState.page, "commonGrid.".concat(gridName, ".page"), state); },
|
|
206
199
|
getRowsPerPage: function (state) {
|
|
207
|
-
return (
|
|
200
|
+
return getOr(initialState.rowsPerPage, "commonGrid.".concat(gridName, ".rowsPerPage"), state);
|
|
208
201
|
},
|
|
209
|
-
getFilter: function (state) { return (
|
|
202
|
+
getFilter: function (state) { return getOr(initialState.filter, "commonGrid.".concat(gridName, ".filter"), state); },
|
|
210
203
|
getSorting: function (state) {
|
|
211
|
-
return (
|
|
204
|
+
return getOr(initialState.sorting, "commonGrid.".concat(gridName, ".sorting"), state);
|
|
212
205
|
},
|
|
213
206
|
getColumnsWidth: function (state) {
|
|
214
|
-
return (
|
|
207
|
+
return getOr(null, "commonGrid.".concat(gridName, ".columnsWidth"), state);
|
|
215
208
|
},
|
|
216
209
|
getColumnsWidthVariant: function (state) {
|
|
217
|
-
return (
|
|
210
|
+
return getOr(undefined, "commonGrid.".concat(gridName, ".columnsWidthVariant"), state);
|
|
218
211
|
},
|
|
219
212
|
getColumnsOrder: function (state) {
|
|
220
|
-
return (
|
|
213
|
+
return getOr([], "commonGrid.".concat(gridName, ".columnsOrder"), state);
|
|
221
214
|
},
|
|
222
215
|
}); };
|
|
223
|
-
|
|
224
|
-
var
|
|
225
|
-
|
|
226
|
-
return (0, reselect_1.createSelector)(function (state) { return selectors.getUxState(state); }, function (state) { return selectors.isConfigFormOpen(state); }, function (state) { return selectors.getColumnConfig(state); }, function (state) { return selectors.getPage(state); }, function (state) { return selectors.getRowsPerPage(state); }, function (state) { return selectors.getFilter(state); }, function (state) { return selectors.getSorting(state); }, function (state) { return selectors.getColumnsWidth(state); }, function (state) { return selectors.getColumnsWidthVariant(state); }, function (state) { return selectors.getColumnsOrder(state); }, function (uxState, isConfigFormOpen, columnConfig, page, rowsPerPage, filter, sorting, columnsWidth, columnsWidthVariant, columnsOrder) { return ({
|
|
216
|
+
export var createFullSelector = function (gridName) {
|
|
217
|
+
var selectors = createSelectors(gridName);
|
|
218
|
+
return createSelector(function (state) { return selectors.getUxState(state); }, function (state) { return selectors.isConfigFormOpen(state); }, function (state) { return selectors.getColumnConfig(state); }, function (state) { return selectors.getPage(state); }, function (state) { return selectors.getRowsPerPage(state); }, function (state) { return selectors.getFilter(state); }, function (state) { return selectors.getSorting(state); }, function (state) { return selectors.getColumnsWidth(state); }, function (state) { return selectors.getColumnsWidthVariant(state); }, function (state) { return selectors.getColumnsOrder(state); }, function (uxState, isConfigFormOpen, columnConfig, page, rowsPerPage, filter, sorting, columnsWidth, columnsWidthVariant, columnsOrder) { return ({
|
|
227
219
|
uxState: uxState,
|
|
228
220
|
isConfigFormOpen: isConfigFormOpen,
|
|
229
221
|
columnConfig: columnConfig,
|
|
@@ -236,4 +228,3 @@ var createFullSelector = function (gridName) {
|
|
|
236
228
|
columnsOrder: columnsOrder,
|
|
237
229
|
}); });
|
|
238
230
|
};
|
|
239
|
-
exports.createFullSelector = createFullSelector;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
// v1 to v2
|
|
4
2
|
var v2 = function (draft) {
|
|
5
3
|
Object.keys(draft).forEach(function (gridName) {
|
|
@@ -10,7 +8,7 @@ var v2 = function (draft) {
|
|
|
10
8
|
return draft;
|
|
11
9
|
};
|
|
12
10
|
// migration management
|
|
13
|
-
|
|
11
|
+
export default (function (draft) {
|
|
14
12
|
draft = v2(draft);
|
|
15
13
|
return draft;
|
|
16
14
|
});
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var actions_1 = require("../utils/actions");
|
|
11
|
-
var useAddFilter_1 = require("../../hooks/useAddFilter");
|
|
12
|
-
var withReduxActions_1 = __importDefault(require("../../HoC/withReduxActions"));
|
|
13
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
14
|
-
var withRedux_1 = __importDefault(require("../utils/withRedux"));
|
|
15
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReduxGrid, createRandomData, enumValues, gridDummyActions } from '../utils/utils.js';
|
|
4
|
+
import { onRowEditClick, onRowReadClick, onRowAction, onBatchAction } from '../utils/actions.js';
|
|
5
|
+
import { useAddFilter } from '../../hooks/useAddFilter.js';
|
|
6
|
+
import withReduxActions from '../../HoC/withReduxActions.js';
|
|
7
|
+
import { columnDefinitions, enumColumn } from '../utils/columnDefinition.js';
|
|
8
|
+
import withRedux from '../utils/withRedux.js';
|
|
9
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
16
10
|
var ActionColumnButtons = {
|
|
17
11
|
flexBasis: 160,
|
|
18
12
|
canRowRead: true,
|
|
@@ -20,19 +14,18 @@ var ActionColumnButtons = {
|
|
|
20
14
|
};
|
|
21
15
|
var FilterSetter = function (_a) {
|
|
22
16
|
var gridActions = _a.gridActions;
|
|
23
|
-
var handleAddFilter =
|
|
24
|
-
|
|
25
|
-
handleAddFilter(
|
|
17
|
+
var handleAddFilter = useAddFilter(gridActions === null || gridActions === void 0 ? void 0 : gridActions.addFilter);
|
|
18
|
+
React.useEffect(function () {
|
|
19
|
+
handleAddFilter(enumValues[1], enumColumn);
|
|
26
20
|
}, []);
|
|
27
21
|
return null;
|
|
28
22
|
};
|
|
29
|
-
var ConnectedFilterSetter = (
|
|
30
|
-
|
|
23
|
+
var ConnectedFilterSetter = withReduxActions('testGrid')(FilterSetter);
|
|
24
|
+
export default {
|
|
31
25
|
title: '@Blocks/CommonGrid',
|
|
32
|
-
decorators: [
|
|
26
|
+
decorators: [withRedux],
|
|
33
27
|
};
|
|
34
|
-
var ComplexWithPaginationAndRedux = function () { return ((
|
|
35
|
-
|
|
36
|
-
exports.ComplexWithPaginationAndRedux.story = {
|
|
28
|
+
export var ComplexWithPaginationAndRedux = function () { return (_jsxs(LinguiContainer, { children: [_jsx(ConnectedFilterSetter, { gridActions: gridDummyActions }), _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, actionColumnDefinition: ActionColumnButtons, rowsData: createRandomData(10), onRowAction: onRowAction, onRowReadClick: onRowReadClick, onRowEditClick: onRowEditClick, totalRowsCount: 200, onBatchAction: onBatchAction, confirmOnReset: function () { return window.confirm('Are you sure you want to reset grid?'); } })] })); };
|
|
29
|
+
ComplexWithPaginationAndRedux.story = {
|
|
37
30
|
name: 'Complex, with pagination and redux',
|
|
38
31
|
};
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var withTheme_1 = __importDefault(require("../utils/withTheme"));
|
|
12
|
-
var withRouter_1 = __importDefault(require("../utils/withRouter"));
|
|
13
|
-
var withRedux_1 = __importDefault(require("../utils/withRedux"));
|
|
14
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
15
|
-
exports.default = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer.js';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils.js';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition.js';
|
|
5
|
+
import withTheme from '../utils/withTheme.js';
|
|
6
|
+
import withRouter from '../utils/withRouter.js';
|
|
7
|
+
import withRedux from '../utils/withRedux.js';
|
|
8
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
9
|
+
export default {
|
|
16
10
|
title: '@Blocks/CommonGrid',
|
|
17
|
-
decorators: [
|
|
11
|
+
decorators: [withTheme, withRouter, withRedux],
|
|
18
12
|
};
|
|
19
|
-
var Default = function () {
|
|
20
|
-
return ((
|
|
13
|
+
export var Default = function () {
|
|
14
|
+
return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridActions: gridDummyActions, gridSelectors: gridSelectors }) }));
|
|
21
15
|
};
|
|
22
|
-
exports.Default = Default;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
var CommonGridContainer_1 = __importDefault(require("../../CommonGridContainer"));
|
|
9
|
-
var utils_1 = require("../utils/utils");
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
12
|
-
exports.default = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer.js';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils.js';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition.js';
|
|
5
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
6
|
+
export default {
|
|
13
7
|
title: '@Blocks/CommonGrid',
|
|
14
8
|
};
|
|
15
|
-
var LoadingState = function () { return ((
|
|
16
|
-
|
|
17
|
-
exports.LoadingState.story = {
|
|
9
|
+
export var LoadingState = function () { return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridSelectors: gridSelectors, gridActions: gridDummyActions, isLoading: true, hideColumnConfig: true }) })); };
|
|
10
|
+
LoadingState.story = {
|
|
18
11
|
name: 'Loading state',
|
|
19
12
|
};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
var CommonGridContainer_1 = __importDefault(require("../../CommonGridContainer"));
|
|
9
|
-
var utils_1 = require("../utils/utils");
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
12
|
-
exports.default = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer.js';
|
|
3
|
+
import { createOversizedRandomData, gridSelectors, gridDummyActions } from '../utils/utils.js';
|
|
4
|
+
import { oversizedColumnDefinition } from '../utils/columnDefinition.js';
|
|
5
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
6
|
+
export default {
|
|
13
7
|
title: '@Blocks/CommonGrid',
|
|
14
8
|
};
|
|
15
|
-
var ManyColumnsNoScrollLayout = function () { return ((
|
|
16
|
-
|
|
17
|
-
exports.ManyColumnsNoScrollLayout.story = {
|
|
9
|
+
export var ManyColumnsNoScrollLayout = function () { return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { rowsData: createOversizedRandomData(5), columnsDefinitions: oversizedColumnDefinition, columnLayout: "no-scroll", hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions }) })); };
|
|
10
|
+
ManyColumnsNoScrollLayout.story = {
|
|
18
11
|
name: 'many columns no-scroll layout',
|
|
19
12
|
};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
var CommonGridContainer_1 = __importDefault(require("../../CommonGridContainer"));
|
|
9
|
-
var utils_1 = require("../utils/utils");
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
12
|
-
exports.default = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer.js';
|
|
3
|
+
import { createOversizedRandomData, gridSelectors, gridDummyActions } from '../utils/utils.js';
|
|
4
|
+
import { oversizedColumnDefinition } from '../utils/columnDefinition.js';
|
|
5
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
6
|
+
export default {
|
|
13
7
|
title: '@Blocks/CommonGrid',
|
|
14
8
|
};
|
|
15
|
-
var ManyColumnsNormalLayoutANoControls = function () { return ((
|
|
16
|
-
|
|
17
|
-
exports.ManyColumnsNormalLayoutANoControls.story = {
|
|
9
|
+
export var ManyColumnsNormalLayoutANoControls = function () { return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { rowsData: createOversizedRandomData(5), columnsDefinitions: oversizedColumnDefinition, hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions }) })); };
|
|
10
|
+
ManyColumnsNormalLayoutANoControls.story = {
|
|
18
11
|
name: 'many columns normal layout a no controls',
|
|
19
12
|
};
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var withTheme_1 = __importDefault(require("../utils/withTheme"));
|
|
12
|
-
var withRouter_1 = __importDefault(require("../utils/withRouter"));
|
|
13
|
-
var withRedux_1 = __importDefault(require("../utils/withRedux"));
|
|
14
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
15
|
-
exports.default = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ReduxGrid, createRandomData, gridSelectors, gridDummyActions } from '../utils/utils.js';
|
|
3
|
+
import { onRowAction } from '../utils/actions.js';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition.js';
|
|
5
|
+
import withTheme from '../utils/withTheme.js';
|
|
6
|
+
import withRouter from '../utils/withRouter.js';
|
|
7
|
+
import withRedux from '../utils/withRedux.js';
|
|
8
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
9
|
+
export default {
|
|
16
10
|
title: '@Blocks/CommonGrid',
|
|
17
|
-
decorators: [
|
|
11
|
+
decorators: [withTheme, withRouter, withRedux],
|
|
18
12
|
};
|
|
19
|
-
var Styled = function () {
|
|
20
|
-
return ((
|
|
13
|
+
export var Styled = function () {
|
|
14
|
+
return (_jsx(LinguiContainer, { children: _jsx("div", { className: "styled", children: _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridActions: gridDummyActions, gridSelectors: gridSelectors }) }) }));
|
|
21
15
|
};
|
|
22
|
-
exports.Styled = Styled;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var CommonGridContainer_1 = __importDefault(require("../../CommonGridContainer"));
|
|
9
|
-
var utils_1 = require("../utils/utils");
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var actions_1 = require("../utils/actions");
|
|
12
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
13
|
-
exports.default = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer.js';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils.js';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition.js';
|
|
5
|
+
import { onRowAction } from '../utils/actions.js';
|
|
6
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
7
|
+
export default {
|
|
14
8
|
title: '@Blocks/CommonGrid',
|
|
15
9
|
};
|
|
16
|
-
var WithCustomGridActions = function () {
|
|
17
|
-
return ((
|
|
10
|
+
export var WithCustomGridActions = function () {
|
|
11
|
+
return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridSelectors: gridSelectors, gridActions: gridDummyActions, hideColumnConfig: true }) }));
|
|
18
12
|
};
|
|
19
|
-
|
|
20
|
-
exports.WithCustomGridActions.story = {
|
|
13
|
+
WithCustomGridActions.story = {
|
|
21
14
|
name: 'With custom grid actions',
|
|
22
15
|
};
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var utils_1 = require("../utils/utils");
|
|
9
|
-
var actions_1 = require("../utils/actions");
|
|
10
|
-
var columnDefinition_1 = require("../utils/columnDefinition");
|
|
11
|
-
var withRedux_1 = __importDefault(require("../utils/withRedux"));
|
|
12
|
-
var linguiContainer_1 = require("../utils/linguiContainer");
|
|
13
|
-
exports.ActionColumnCheckboxes = {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ReduxGrid, createRandomData } from '../utils/utils.js';
|
|
3
|
+
import { onRowEditClick, onRowReadClick, onRowAction } from '../utils/actions.js';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition.js';
|
|
5
|
+
import withRedux from '../utils/withRedux.js';
|
|
6
|
+
import { LinguiContainer } from '../utils/linguiContainer.js';
|
|
7
|
+
export var ActionColumnCheckboxes = {
|
|
14
8
|
flexBasis: 160,
|
|
15
9
|
forceCheckboxes: true,
|
|
16
10
|
};
|
|
17
11
|
var components = {
|
|
18
12
|
ColumnTitle: function (_a) {
|
|
19
13
|
var title = _a.title, isSortable = _a.isSortable;
|
|
20
|
-
return (
|
|
14
|
+
return _jsx("div", { children: "".concat(title, " is ").concat(isSortable ? '' : 'NOT', " sortable") });
|
|
21
15
|
},
|
|
22
16
|
};
|
|
23
|
-
|
|
17
|
+
export default {
|
|
24
18
|
title: '@Blocks/CommonGrid',
|
|
25
|
-
decorators: [
|
|
19
|
+
decorators: [withRedux],
|
|
26
20
|
excludeStories: ['ActionColumnCheckboxes'],
|
|
27
21
|
};
|
|
28
|
-
var WithForcedCheckboxesAndCustomTitle = function () { return ((
|
|
29
|
-
|
|
30
|
-
exports.WithForcedCheckboxesAndCustomTitle.story = {
|
|
22
|
+
export var WithForcedCheckboxesAndCustomTitle = function () { return (_jsx(LinguiContainer, { children: _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, actionColumnDefinition: ActionColumnCheckboxes, rowsData: createRandomData(10), onRowAction: onRowAction, onRowReadClick: onRowReadClick, onRowEditClick: onRowEditClick, totalRowsCount: 200, components: components }) })); };
|
|
23
|
+
WithForcedCheckboxesAndCustomTitle.story = {
|
|
31
24
|
name: 'With forced checkboxes and custom title',
|
|
32
25
|
};
|