@mailstep/design-system 0.6.2-beta.3 → 0.6.2-beta.5
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 +19551 -23227
- package/ui/index.js +85 -146
- package/ui/index.umd.js +484 -510
- 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,37 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var sum_1 = __importDefault(require("lodash/sum"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import sum from 'lodash/sum';
|
|
8
3
|
var useColumnSizes = function (displayColumnsDefinitions, storeColumnsWidth, storeColumnsWidthVariant, setColumnWidth, columnLayout, minColumnWidth) {
|
|
9
4
|
/**
|
|
10
5
|
* decorate grid resize with layout and reset grid widths if layout changes
|
|
11
6
|
*/
|
|
12
7
|
if (minColumnWidth === void 0) { minColumnWidth = 50; }
|
|
13
|
-
var handleSetColumnWidth =
|
|
14
|
-
|
|
8
|
+
var handleSetColumnWidth = React.useCallback(function (columnWidth) { return setColumnWidth(columnWidth, columnLayout); }, [columnLayout, setColumnWidth]);
|
|
9
|
+
React.useEffect(function () {
|
|
15
10
|
if (storeColumnsWidthVariant != columnLayout)
|
|
16
11
|
handleSetColumnWidth(null);
|
|
17
12
|
}, [columnLayout, storeColumnsWidthVariant, handleSetColumnWidth]);
|
|
18
13
|
/**
|
|
19
14
|
* base width of each displayed column and of all displayed columns put together
|
|
20
15
|
*/
|
|
21
|
-
var displayColumnsWidth =
|
|
16
|
+
var displayColumnsWidth = React.useMemo(function () {
|
|
22
17
|
var displayColumnsWidth = {};
|
|
23
18
|
displayColumnsDefinitions.forEach(function (column) { return (displayColumnsWidth[column.name] = (storeColumnsWidth === null || storeColumnsWidth === void 0 ? void 0 : storeColumnsWidth[column.name]) || column.flexBasis); });
|
|
24
19
|
return displayColumnsWidth;
|
|
25
20
|
}, [displayColumnsDefinitions, storeColumnsWidth]);
|
|
26
|
-
var totalColumnsWidth =
|
|
27
|
-
return (
|
|
21
|
+
var totalColumnsWidth = React.useMemo(function () {
|
|
22
|
+
return sum(Object.values(displayColumnsWidth));
|
|
28
23
|
}, [displayColumnsWidth]);
|
|
29
24
|
/**
|
|
30
25
|
* handling of remaining space
|
|
31
26
|
*/
|
|
32
27
|
// TODO optimize better
|
|
33
|
-
var gridBoxRef =
|
|
34
|
-
var testAdjustLastColumn =
|
|
28
|
+
var gridBoxRef = React.useRef(null);
|
|
29
|
+
var testAdjustLastColumn = React.useCallback(function () {
|
|
35
30
|
var _a;
|
|
36
31
|
var _b;
|
|
37
32
|
var gridWidth = ((_b = gridBoxRef === null || gridBoxRef === void 0 ? void 0 : gridBoxRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth) || null;
|
|
@@ -43,17 +38,17 @@ var useColumnSizes = function (displayColumnsDefinitions, storeColumnsWidth, sto
|
|
|
43
38
|
}
|
|
44
39
|
}
|
|
45
40
|
}, [columnLayout, displayColumnsDefinitions, displayColumnsWidth, gridBoxRef, handleSetColumnWidth, totalColumnsWidth]);
|
|
46
|
-
|
|
41
|
+
React.useEffect(function () {
|
|
47
42
|
testAdjustLastColumn();
|
|
48
43
|
}, [testAdjustLastColumn]);
|
|
49
|
-
|
|
44
|
+
React.useLayoutEffect(function () {
|
|
50
45
|
window.addEventListener('resize', testAdjustLastColumn);
|
|
51
46
|
return function () { return window.removeEventListener('resize', testAdjustLastColumn); };
|
|
52
47
|
}, [testAdjustLastColumn]);
|
|
53
48
|
/**
|
|
54
49
|
* resizing of columns
|
|
55
50
|
*/
|
|
56
|
-
var handleResizeDrag =
|
|
51
|
+
var handleResizeDrag = React.useCallback(function (columnName, width) {
|
|
57
52
|
var _a, _b;
|
|
58
53
|
var _c;
|
|
59
54
|
var i = displayColumnsDefinitions.findIndex(function (_a) {
|
|
@@ -85,4 +80,4 @@ var useColumnSizes = function (displayColumnsDefinitions, storeColumnsWidth, sto
|
|
|
85
80
|
}, [displayColumnsDefinitions, columnLayout, displayColumnsWidth, totalColumnsWidth, minColumnWidth, handleSetColumnWidth]);
|
|
86
81
|
return { totalColumnsWidth: totalColumnsWidth, gridBoxRef: gridBoxRef, displayColumnsWidth: displayColumnsWidth, handleResizeDrag: handleResizeDrag };
|
|
87
82
|
};
|
|
88
|
-
|
|
83
|
+
export default useColumnSizes;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
2
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
3
|
if (ar || !(i in from)) {
|
|
@@ -8,12 +7,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
8
7
|
}
|
|
9
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
var react_1 = require("react");
|
|
16
|
-
var ReadEditButtonCell_1 = __importDefault(require("../components/ReadEditButtonCell"));
|
|
10
|
+
import { useCallback, useMemo } from 'react';
|
|
11
|
+
import getReadEditButtonCell from '../components/ReadEditButtonCell/index.js';
|
|
17
12
|
/**
|
|
18
13
|
* Because in new design we are displaying lot of the controlls differently, including read and edit buttons in grid,
|
|
19
14
|
* easiest way to make all the definition changes is to just overwrite the here once, instead of modifying every single grid (33 instances atm).
|
|
@@ -21,7 +16,7 @@ var ReadEditButtonCell_1 = __importDefault(require("../components/ReadEditButton
|
|
|
21
16
|
* */
|
|
22
17
|
var useEditReadAsColumn = function (props) {
|
|
23
18
|
var onRowAction = props.onRowAction, actionColumnDefinition = props.actionColumnDefinition, columnsDefinitions = props.columnsDefinitions, onRowEditClick = props.onRowEditClick, onRowReadClick = props.onRowReadClick;
|
|
24
|
-
var modifiedActionColumnDefinition =
|
|
19
|
+
var modifiedActionColumnDefinition = useMemo(function () {
|
|
25
20
|
var _a;
|
|
26
21
|
if ((actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.forceCheckboxes) || ((_a = actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.actionOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
27
22
|
// note: this also removes actions, because we render action trigger outside the grid anyway
|
|
@@ -34,7 +29,7 @@ var useEditReadAsColumn = function (props) {
|
|
|
34
29
|
return undefined;
|
|
35
30
|
}
|
|
36
31
|
}, [actionColumnDefinition]);
|
|
37
|
-
var modifiedOnRowAction =
|
|
32
|
+
var modifiedOnRowAction = useCallback(function (id, field, value) {
|
|
38
33
|
if (field === 'row_edit' || field === 'row_read') {
|
|
39
34
|
if (field === 'row_edit' && onRowEditClick)
|
|
40
35
|
onRowEditClick(id, value);
|
|
@@ -46,8 +41,8 @@ var useEditReadAsColumn = function (props) {
|
|
|
46
41
|
}
|
|
47
42
|
}, [onRowAction, onRowEditClick, onRowReadClick]);
|
|
48
43
|
// TODO Entire logic of row edit / row read need to be completely refactored.
|
|
49
|
-
var CellComponent =
|
|
50
|
-
var modifiedColumnsDefinitions =
|
|
44
|
+
var CellComponent = useMemo(function () { return getReadEditButtonCell(actionColumnDefinition); }, [actionColumnDefinition]);
|
|
45
|
+
var modifiedColumnsDefinitions = useMemo(function () {
|
|
51
46
|
if ((actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.canRowEdit) !== undefined || (actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.canRowRead) !== undefined) {
|
|
52
47
|
return __spreadArray(__spreadArray([], columnsDefinitions, true), [
|
|
53
48
|
{
|
|
@@ -72,4 +67,4 @@ var useEditReadAsColumn = function (props) {
|
|
|
72
67
|
onRowAction: modifiedOnRowAction,
|
|
73
68
|
};
|
|
74
69
|
};
|
|
75
|
-
|
|
70
|
+
export default useEditReadAsColumn;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var react_1 = require("react");
|
|
1
|
+
import { useMemo } from 'react';
|
|
4
2
|
var useFloatingButton = function (hasPermission, onClick, options, onSelect) {
|
|
5
|
-
return
|
|
3
|
+
return useMemo(function () {
|
|
6
4
|
if (!hasPermission)
|
|
7
5
|
return;
|
|
8
6
|
return {
|
|
@@ -12,4 +10,4 @@ var useFloatingButton = function (hasPermission, onClick, options, onSelect) {
|
|
|
12
10
|
};
|
|
13
11
|
}, [hasPermission, onClick, options, onSelect]);
|
|
14
12
|
};
|
|
15
|
-
|
|
13
|
+
export default useFloatingButton;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var react_1 = require("react");
|
|
1
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
2
|
var useGetGridHeight = function () {
|
|
5
|
-
var _a =
|
|
6
|
-
var _b =
|
|
7
|
-
var _c =
|
|
8
|
-
var gridRef =
|
|
9
|
-
var paginationRef =
|
|
10
|
-
|
|
3
|
+
var _a = useState(window.innerHeight), windowHeight = _a[0], setWindowHeight = _a[1];
|
|
4
|
+
var _b = useState(0), topDistance = _b[0], setTopDistance = _b[1];
|
|
5
|
+
var _c = useState(0), bottomDistance = _c[0], setBottomDistance = _c[1];
|
|
6
|
+
var gridRef = useRef(null);
|
|
7
|
+
var paginationRef = useRef(null);
|
|
8
|
+
useEffect(function () {
|
|
11
9
|
var handleResize = function () {
|
|
12
10
|
var _a, _b;
|
|
13
11
|
setTopDistance(((_a = gridRef.current) === null || _a === void 0 ? void 0 : _a.offsetTop) || 0);
|
|
@@ -20,7 +18,7 @@ var useGetGridHeight = function () {
|
|
|
20
18
|
window.removeEventListener('resize', handleResize);
|
|
21
19
|
};
|
|
22
20
|
}, []);
|
|
23
|
-
var gridHeight =
|
|
21
|
+
var gridHeight = useMemo(function () {
|
|
24
22
|
var calculatedHeight = windowHeight - topDistance - bottomDistance;
|
|
25
23
|
if (calculatedHeight !== windowHeight && calculatedHeight > 360) {
|
|
26
24
|
return calculatedHeight - 25;
|
|
@@ -32,4 +30,4 @@ var useGetGridHeight = function () {
|
|
|
32
30
|
}, [bottomDistance, topDistance, windowHeight]);
|
|
33
31
|
return { gridHeight: gridHeight, gridRef: gridRef, paginationRef: paginationRef };
|
|
34
32
|
};
|
|
35
|
-
|
|
33
|
+
export default useGetGridHeight;
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useGridActionTrigger = void 0;
|
|
7
|
-
var react_1 = require("react");
|
|
8
|
-
var find_1 = __importDefault(require("lodash/find"));
|
|
9
|
-
var useGridActionTrigger = function (rowsData, uxState, actionOptions, onBatchAction) {
|
|
1
|
+
import { useMemo, useCallback } from 'react';
|
|
2
|
+
import find from 'lodash/find';
|
|
3
|
+
export var useGridActionTrigger = function (rowsData, uxState, actionOptions, onBatchAction) {
|
|
10
4
|
if (actionOptions === void 0) { actionOptions = []; }
|
|
11
|
-
var actionRows =
|
|
5
|
+
var actionRows = useMemo(function () {
|
|
12
6
|
return (rowsData || []).filter(function (row) { var _a; return (_a = uxState.checkedRows) === null || _a === void 0 ? void 0 : _a[row.id]; });
|
|
13
7
|
}, [uxState, rowsData]);
|
|
14
|
-
var enabledActions =
|
|
8
|
+
var enabledActions = useMemo(function () {
|
|
15
9
|
var actionsOptions = actionOptions || [];
|
|
16
10
|
return actionsOptions.filter(function (action) {
|
|
17
11
|
if (action.isEnabled) {
|
|
18
12
|
return action.isEnabled(actionRows);
|
|
19
13
|
}
|
|
20
14
|
else {
|
|
21
|
-
return uxState.checkedRows && (
|
|
15
|
+
return uxState.checkedRows && find(uxState.checkedRows, Boolean);
|
|
22
16
|
}
|
|
23
17
|
});
|
|
24
18
|
}, [uxState, actionRows, actionOptions]);
|
|
25
|
-
var handleBatchAction =
|
|
19
|
+
var handleBatchAction = useCallback(function (value) {
|
|
26
20
|
var actionsOptions = actionOptions || [];
|
|
27
21
|
var action = actionsOptions.find(function (option) { return option.value == value; });
|
|
28
22
|
action && onBatchAction && onBatchAction(action, actionRows);
|
|
29
23
|
}, [actionOptions, onBatchAction, actionRows]);
|
|
30
24
|
return [enabledActions, handleBatchAction];
|
|
31
25
|
};
|
|
32
|
-
exports.useGridActionTrigger = useGridActionTrigger;
|
|
@@ -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,27 +9,26 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
var react_1 = require("react");
|
|
12
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
15
13
|
var useManageColumn = function (_a) {
|
|
16
14
|
var columns = _a.columns, gridSelectors = _a.gridSelectors, gridActions = _a.gridActions, onClose = _a.onClose;
|
|
17
15
|
var resetGrid = gridActions.resetGrid, setColumnConfig = gridActions.setColumnConfig;
|
|
18
16
|
var columnConfig = gridSelectors.columnConfig;
|
|
19
|
-
var _b =
|
|
20
|
-
var columnsConfigValues =
|
|
17
|
+
var _b = useState(__assign({}, columnConfig)), columnsConfigOptions = _b[0], setColumnsConfigOptions = _b[1];
|
|
18
|
+
var columnsConfigValues = useMemo(function () {
|
|
21
19
|
return columns === null || columns === void 0 ? void 0 : columns.filter(function (column) {
|
|
22
20
|
var _a;
|
|
23
21
|
var isHidden = (_a = columnConfig === null || columnConfig === void 0 ? void 0 : columnConfig[column.name]) === null || _a === void 0 ? void 0 : _a.isHidden;
|
|
24
22
|
return (column === null || column === void 0 ? void 0 : column.alwaysOn) || typeof isHidden === 'boolean' ? !isHidden : !(column === null || column === void 0 ? void 0 : column.defaultHidden);
|
|
25
23
|
}).map(function (column) { return column.name; });
|
|
26
24
|
}, [columnConfig, columns]);
|
|
27
|
-
var onConfirmForm =
|
|
25
|
+
var onConfirmForm = useCallback(function () {
|
|
28
26
|
(setColumnConfig === null || setColumnConfig === void 0 ? void 0 : setColumnConfig(columnsConfigOptions)) && (onClose === null || onClose === void 0 ? void 0 : onClose());
|
|
29
27
|
}, [columnsConfigOptions, onClose, setColumnConfig]);
|
|
30
|
-
var resetColumnConfig =
|
|
28
|
+
var resetColumnConfig = useCallback(function () {
|
|
31
29
|
(resetGrid === null || resetGrid === void 0 ? void 0 : resetGrid()) && (onClose === null || onClose === void 0 ? void 0 : onClose());
|
|
32
30
|
setColumnsConfigOptions(columnConfig || {});
|
|
33
31
|
}, [onClose, resetGrid]);
|
|
34
32
|
return { columnsConfigValues: columnsConfigValues, setColumnsConfigOptions: setColumnsConfigOptions, onConfirmForm: onConfirmForm, resetColumnConfig: resetColumnConfig };
|
|
35
33
|
};
|
|
36
|
-
|
|
34
|
+
export default useManageColumn;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
1
|
+
import React from 'react';
|
|
7
2
|
var useRowsKeyControls = function (rowsData, uxState, onUxChange) {
|
|
8
|
-
return
|
|
3
|
+
return React.useCallback(function (e) {
|
|
9
4
|
var _a, _b;
|
|
10
5
|
var selectedRowId = uxState.selectedRow;
|
|
11
6
|
if (!selectedRowId)
|
|
@@ -23,4 +18,4 @@ var useRowsKeyControls = function (rowsData, uxState, onUxChange) {
|
|
|
23
18
|
onUxChange === null || onUxChange === void 0 ? void 0 : onUxChange('selectedRow', null);
|
|
24
19
|
}, [uxState, rowsData, onUxChange]);
|
|
25
20
|
};
|
|
26
|
-
|
|
21
|
+
export default useRowsKeyControls;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
var useToggleAllCheckbox = function (rowsData, uxState, handleUxChange) {
|
|
6
|
-
var allChecked = (0, react_1.useMemo)(function () { return (rowsData || []).length >= 1 && rowsData.every(function (row) { var _a; return (_a = uxState.checkedRows) === null || _a === void 0 ? void 0 : _a[row.id]; }); }, [rowsData, uxState.checkedRows]);
|
|
7
|
-
var toggleAllHandler = (0, react_1.useCallback)(function () {
|
|
1
|
+
import { useMemo, useCallback } from 'react';
|
|
2
|
+
export var useToggleAllCheckbox = function (rowsData, uxState, handleUxChange) {
|
|
3
|
+
var allChecked = useMemo(function () { return (rowsData || []).length >= 1 && rowsData.every(function (row) { var _a; return (_a = uxState.checkedRows) === null || _a === void 0 ? void 0 : _a[row.id]; }); }, [rowsData, uxState.checkedRows]);
|
|
4
|
+
var toggleAllHandler = useCallback(function () {
|
|
8
5
|
var checkedRows = {};
|
|
9
6
|
// if check all is not check, we check all
|
|
10
7
|
if (!allChecked && rowsData) {
|
|
@@ -16,4 +13,3 @@ var useToggleAllCheckbox = function (rowsData, uxState, handleUxChange) {
|
|
|
16
13
|
}, [handleUxChange, rowsData, allChecked]);
|
|
17
14
|
return [allChecked, toggleAllHandler];
|
|
18
15
|
};
|
|
19
|
-
exports.useToggleAllCheckbox = useToggleAllCheckbox;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
1
|
+
import React from 'react';
|
|
7
2
|
var useUxReset = function (rowsData, uxState, clearUxState) {
|
|
8
|
-
var _a =
|
|
9
|
-
|
|
3
|
+
var _a = React.useState('|'), previous = _a[0], setPrevious = _a[1];
|
|
4
|
+
React.useEffect(function () {
|
|
10
5
|
var ids = (rowsData || []).map(function (row) { return row.id; }).join('|');
|
|
11
6
|
// clear uxState if listed rows change and uxState is not clear already
|
|
12
7
|
if (ids !== previous) {
|
|
@@ -17,4 +12,4 @@ var useUxReset = function (rowsData, uxState, clearUxState) {
|
|
|
17
12
|
setPrevious(ids);
|
|
18
13
|
}, [rowsData]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
19
14
|
};
|
|
20
|
-
|
|
15
|
+
export default useUxReset;
|
|
@@ -1,51 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.useAddFilter = exports.useFloatingButton = exports.Types = exports.createFullSelector = exports.createSelectors = exports.createActions = exports.actionTypes = exports.actionPrefix = exports.reducer = exports.withReduxActions = void 0;
|
|
33
|
-
var CommonGridContainer_1 = __importDefault(require("./CommonGridContainer"));
|
|
34
|
-
var withReduxActions_1 = __importDefault(require("./HoC/withReduxActions"));
|
|
35
|
-
exports.withReduxActions = withReduxActions_1.default;
|
|
36
|
-
var store_1 = __importStar(require("./store"));
|
|
37
|
-
exports.reducer = store_1.default;
|
|
38
|
-
Object.defineProperty(exports, "actionPrefix", { enumerable: true, get: function () { return store_1.actionPrefix; } });
|
|
39
|
-
Object.defineProperty(exports, "createActions", { enumerable: true, get: function () { return store_1.createActions; } });
|
|
40
|
-
Object.defineProperty(exports, "createSelectors", { enumerable: true, get: function () { return store_1.createSelectors; } });
|
|
41
|
-
Object.defineProperty(exports, "createFullSelector", { enumerable: true, get: function () { return store_1.createFullSelector; } });
|
|
42
|
-
Object.defineProperty(exports, "actionTypes", { enumerable: true, get: function () { return store_1.actionTypes; } });
|
|
43
|
-
var useFloatingButton_1 = __importDefault(require("./hooks/useFloatingButton"));
|
|
44
|
-
exports.useFloatingButton = useFloatingButton_1.default;
|
|
45
|
-
var Types = __importStar(require("./types"));
|
|
46
|
-
exports.Types = Types;
|
|
47
|
-
__exportStar(require("./StandardButtons"), exports);
|
|
48
|
-
__exportStar(require("./components/gridCells"), exports);
|
|
49
|
-
var useAddFilter_1 = require("./hooks/useAddFilter");
|
|
50
|
-
Object.defineProperty(exports, "useAddFilter", { enumerable: true, get: function () { return useAddFilter_1.useAddFilter; } });
|
|
51
|
-
exports.default = CommonGridContainer_1.default;
|
|
1
|
+
import CommonGrid from './CommonGridContainer.js';
|
|
2
|
+
import withReduxActions from './HoC/withReduxActions.js';
|
|
3
|
+
import reducer, { actionPrefix, createActions, createSelectors, createFullSelector, actionTypes } from './store/index.js';
|
|
4
|
+
import useFloatingButton from './hooks/useFloatingButton.js';
|
|
5
|
+
import * as Types from './types.js';
|
|
6
|
+
export * from './StandardButtons.js';
|
|
7
|
+
export * from './components/gridCells/index.js';
|
|
8
|
+
import { useAddFilter } from './hooks/useAddFilter.js';
|
|
9
|
+
export default CommonGrid;
|
|
10
|
+
export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, useFloatingButton, useAddFilter, };
|