@mailstep/design-system 0.6.2-beta.2 → 0.6.2-beta.3
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 +1 -1
- package/ui/Blocks/CommonGrid/CommonGrid.js +38 -33
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +33 -28
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +10 -8
- package/ui/Blocks/CommonGrid/StandardButtons.js +20 -11
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +26 -21
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +13 -8
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +48 -20
- package/ui/Blocks/CommonGrid/components/ActionHead/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +15 -10
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +19 -14
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +22 -17
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +50 -22
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ColumnTitle.js +13 -8
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +38 -9
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/DataCell.js +18 -13
- package/ui/Blocks/CommonGrid/components/DataRow.js +35 -30
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +59 -31
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +5 -1
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +41 -12
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/FilterDropdown.js +13 -8
- package/ui/Blocks/CommonGrid/components/FilterRow.js +20 -15
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +23 -17
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +15 -10
- package/ui/Blocks/CommonGrid/components/GridSelect/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/GroupRow.js +15 -10
- package/ui/Blocks/CommonGrid/components/HeadCell.js +19 -14
- package/ui/Blocks/CommonGrid/components/HeadRow.js +45 -17
- package/ui/Blocks/CommonGrid/components/IconList/IconList.js +18 -12
- package/ui/Blocks/CommonGrid/components/IconList/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +14 -12
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +24 -17
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +28 -23
- package/ui/Blocks/CommonGrid/components/NumberRange/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/NumberRange/types.js +2 -1
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +39 -11
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +12 -10
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/Resize.js +12 -7
- package/ui/Blocks/CommonGrid/components/Table.js +37 -9
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +40 -12
- package/ui/Blocks/CommonGrid/components/TablePagination/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +36 -30
- package/ui/Blocks/CommonGrid/components/TextRange/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/TextRange/types.js +2 -1
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +41 -12
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +11 -4
- package/ui/Blocks/CommonGrid/components/gridCells/Date.js +13 -6
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -6
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +16 -9
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +15 -8
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -8
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +16 -9
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +9 -3
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +18 -11
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +20 -13
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +12 -5
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +11 -4
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +40 -10
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +31 -14
- package/ui/Blocks/CommonGrid/components/icons/Edit.js +5 -3
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +5 -3
- package/ui/Blocks/CommonGrid/components/icons/Sorting.js +8 -3
- package/ui/Blocks/CommonGrid/components/utils.js +7 -3
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +10 -6
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +18 -13
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +12 -7
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +5 -3
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +11 -9
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +14 -7
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +8 -6
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +8 -3
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +8 -4
- package/ui/Blocks/CommonGrid/hooks/useUxReset.js +9 -4
- package/ui/Blocks/CommonGrid/index.js +51 -10
- package/ui/Blocks/CommonGrid/store/index.js +86 -77
- package/ui/Blocks/CommonGrid/store/migrateState.js +3 -1
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +24 -17
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +19 -12
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +15 -8
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +15 -8
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +15 -8
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +19 -12
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +17 -10
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +19 -12
- package/ui/Blocks/CommonGrid/storybook/utils/actions.js +11 -4
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +17 -11
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +10 -6
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +35 -26
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +17 -10
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +6 -4
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +3 -1
- package/ui/Blocks/CommonGrid/styles.js +39 -10
- package/ui/Blocks/CommonGrid/translations.js +5 -3
- package/ui/Blocks/CommonGrid/types.js +6 -3
- package/ui/Blocks/CommonGrid/utils/index.js +40 -23
- package/ui/Blocks/CornerDialog/CornerDialog.js +15 -11
- package/ui/Blocks/CornerDialog/index.js +4 -2
- package/ui/Blocks/CornerDialog/stories/CornerDialog.stories.js +10 -7
- package/ui/Blocks/CornerDialog/styles.js +35 -9
- package/ui/Blocks/CornerDialog/types.js +2 -1
- package/ui/Blocks/CornerDialog/utils.js +5 -2
- package/ui/Blocks/HidePrint/HidePrint.js +10 -5
- package/ui/Blocks/ImageList/ImageList.js +42 -15
- package/ui/Blocks/ImageList/components/AddPhoto/index.js +11 -7
- package/ui/Blocks/ImageList/components/AddPhoto/styles.js +29 -3
- package/ui/Blocks/ImageList/components/CloseButton/index.js +9 -5
- package/ui/Blocks/ImageList/components/CloseButton/styles.js +29 -3
- package/ui/Blocks/ImageList/components/ImageElement/index.js +11 -7
- package/ui/Blocks/ImageList/components/ImageElement/styles.js +29 -3
- package/ui/Blocks/ImageList/components/ImageTag/index.js +12 -5
- package/ui/Blocks/ImageList/components/ImageTag/styles.js +8 -2
- package/ui/Blocks/ImageList/index.js +4 -2
- package/ui/Blocks/ImageList/stories/ImageList.stories.js +9 -6
- package/ui/Blocks/ImageList/styles.js +8 -2
- package/ui/Blocks/ImageList/types.js +2 -1
- package/ui/Blocks/LightBox/LightBox.js +15 -8
- package/ui/Blocks/LightBox/hooks/useLightBox.js +9 -5
- package/ui/Blocks/LightBox/index.js +7 -3
- package/ui/Blocks/LightBox/stories/LightBox.stories.js +7 -4
- package/ui/Blocks/LightBox/styles.js +11 -5
- package/ui/Blocks/LightBox/types.js +2 -1
- package/ui/Blocks/Modal/Modal.js +20 -17
- package/ui/Blocks/Modal/hooks/useClickOutside.js +10 -6
- package/ui/Blocks/Modal/hooks/useModal.js +10 -6
- package/ui/Blocks/Modal/index.js +9 -4
- package/ui/Blocks/Modal/stories/Modal.stories.js +48 -42
- package/ui/Blocks/Modal/styles.js +46 -20
- package/ui/Blocks/Modal/types.js +2 -1
- package/ui/Blocks/Modal/utils.js +4 -1
- package/ui/Blocks/Popover/index.js +15 -10
- package/ui/Blocks/Tabs/TabContent.js +5 -1
- package/ui/Blocks/Tabs/Tabs.js +14 -10
- package/ui/Blocks/Tabs/hooks/useTabs.js +8 -4
- package/ui/Blocks/Tabs/index.js +9 -4
- package/ui/Blocks/Tabs/stories/Tabs.stories.js +9 -6
- package/ui/Blocks/Tabs/styles.js +34 -8
- package/ui/Blocks/Tabs/types.js +2 -1
- package/ui/Elements/Alert/Alert.js +12 -10
- package/ui/Elements/Alert/index.js +9 -3
- package/ui/Elements/Alert/stories/Alert.stories.js +14 -11
- package/ui/Elements/Alert/styles.js +20 -14
- package/ui/Elements/Alert/types.js +2 -1
- package/ui/Elements/Avatar/Avatar.js +14 -7
- package/ui/Elements/Avatar/index.js +7 -3
- package/ui/Elements/Avatar/stories/Avatar.stories.js +8 -5
- package/ui/Elements/Avatar/types.js +2 -1
- package/ui/Elements/Badge/Badge.js +38 -13
- package/ui/Elements/Badge/index.js +9 -3
- package/ui/Elements/Badge/stories/Badge.stories.js +11 -5
- package/ui/Elements/BorderedBox/BorderedBox.js +30 -5
- package/ui/Elements/BorderedBox/index.js +9 -3
- package/ui/Elements/BorderedBox/stories/BorderedBox.stories.js +7 -4
- package/ui/Elements/BorderedBox/types.js +2 -1
- package/ui/Elements/Button/Button.js +7 -5
- package/ui/Elements/Button/index.js +9 -3
- package/ui/Elements/Button/stories/Button.stories.js +16 -13
- package/ui/Elements/Button/styles.js +14 -8
- package/ui/Elements/Button/types.js +2 -1
- package/ui/Elements/Card/Card.js +20 -14
- package/ui/Elements/Card/index.js +12 -3
- package/ui/Elements/Card/stories/Card.stories.js +11 -8
- package/ui/Elements/Card/stories/CardComponent.stories.js +12 -6
- package/ui/Elements/Card/styles.js +38 -12
- package/ui/Elements/Card/types.js +2 -1
- package/ui/Elements/DatePicker/DatePicker.js +53 -25
- package/ui/Elements/DatePicker/Datetime/DateTime.js +31 -26
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +47 -20
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +6 -3
- package/ui/Elements/DatePicker/Datetime/types.js +2 -1
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +18 -13
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +14 -9
- package/ui/Elements/DatePicker/Datetime/views/YearsView.js +14 -9
- package/ui/Elements/DatePicker/index.js +7 -2
- package/ui/Elements/DatePicker/styles.js +29 -3
- package/ui/Elements/Dropdown/Dropdown.js +15 -10
- package/ui/Elements/Dropdown/index.js +9 -3
- package/ui/Elements/Dropdown/stories/Dropdown.stories.js +10 -4
- package/ui/Elements/Dropdown/types.js +2 -1
- package/ui/Elements/DropdownMenu/DropdownMenu.js +15 -8
- package/ui/Elements/DropdownMenu/components/DefaultItem.js +32 -7
- package/ui/Elements/DropdownMenu/components/MenuItem.js +15 -10
- package/ui/Elements/DropdownMenu/components/MenuList.js +10 -5
- package/ui/Elements/DropdownMenu/index.js +5 -1
- package/ui/Elements/DropdownMenu/types.js +2 -1
- package/ui/Elements/DropdownSelect/DropdownSelect.js +50 -21
- package/ui/Elements/DropdownSelect/index.js +10 -3
- package/ui/Elements/ErrorMessage/ErrorMessage.js +34 -9
- package/ui/Elements/ErrorMessage/index.js +9 -3
- package/ui/Elements/ErrorMessage/stories/ErrorMessage.stories.js +11 -5
- package/ui/Elements/ErrorMessage/types.js +2 -1
- package/ui/Elements/HighlightBox/HighlightBox.js +38 -12
- package/ui/Elements/HighlightBox/index.js +7 -2
- package/ui/Elements/Icon/BadgeIcon.js +17 -10
- package/ui/Elements/Icon/Icon.js +245 -216
- package/ui/Elements/Icon/icons/AddPhoto.js +6 -2
- package/ui/Elements/Icon/icons/BarcodeScan.js +6 -2
- package/ui/Elements/Icon/icons/Box.js +6 -2
- package/ui/Elements/Icon/icons/Calendar.js +6 -2
- package/ui/Elements/Icon/icons/Cancel.js +6 -2
- package/ui/Elements/Icon/icons/CheckedBox.js +6 -2
- package/ui/Elements/Icon/icons/Company.js +6 -2
- package/ui/Elements/Icon/icons/Complaint.js +6 -2
- package/ui/Elements/Icon/icons/Consolidation.js +6 -2
- package/ui/Elements/Icon/icons/Dispatch.js +6 -2
- package/ui/Elements/Icon/icons/EmptyRack.js +6 -2
- package/ui/Elements/Icon/icons/Expeditions.js +6 -2
- package/ui/Elements/Icon/icons/FlagCZ.js +6 -2
- package/ui/Elements/Icon/icons/FlagEL.js +6 -2
- package/ui/Elements/Icon/icons/FlagESP.js +6 -2
- package/ui/Elements/Icon/icons/FlagITA.js +6 -2
- package/ui/Elements/Icon/icons/FlagRUS.js +6 -2
- package/ui/Elements/Icon/icons/FlagSVK.js +6 -2
- package/ui/Elements/Icon/icons/FlagUSA.js +6 -2
- package/ui/Elements/Icon/icons/Gift.js +6 -2
- package/ui/Elements/Icon/icons/Group.js +6 -2
- package/ui/Elements/Icon/icons/HamburgerMenu.js +6 -2
- package/ui/Elements/Icon/icons/HelpCircle1.js +6 -2
- package/ui/Elements/Icon/icons/ImagePlaceholder.js +6 -2
- package/ui/Elements/Icon/icons/Income.js +6 -2
- package/ui/Elements/Icon/icons/Info.js +6 -2
- package/ui/Elements/Icon/icons/Integrations.js +6 -2
- package/ui/Elements/Icon/icons/Inventory.js +6 -2
- package/ui/Elements/Icon/icons/Inventory2.js +6 -2
- package/ui/Elements/Icon/icons/Link.js +6 -2
- package/ui/Elements/Icon/icons/Location.js +6 -2
- package/ui/Elements/Icon/icons/Logout1.js +6 -2
- package/ui/Elements/Icon/icons/MakePhoto.js +6 -2
- package/ui/Elements/Icon/icons/MenuItems.js +6 -2
- package/ui/Elements/Icon/icons/MobileCancel.js +6 -2
- package/ui/Elements/Icon/icons/Notification2.js +6 -2
- package/ui/Elements/Icon/icons/OpenBox.js +6 -2
- package/ui/Elements/Icon/icons/Plus1.js +6 -2
- package/ui/Elements/Icon/icons/Print.js +6 -2
- package/ui/Elements/Icon/icons/Product.js +6 -2
- package/ui/Elements/Icon/icons/Products.js +6 -2
- package/ui/Elements/Icon/icons/Profile.js +6 -2
- package/ui/Elements/Icon/icons/Puzzle1.js +6 -2
- package/ui/Elements/Icon/icons/QRCode.js +6 -2
- package/ui/Elements/Icon/icons/Rack.js +6 -2
- package/ui/Elements/Icon/icons/Return.js +6 -2
- package/ui/Elements/Icon/icons/Rows.js +6 -2
- package/ui/Elements/Icon/icons/Settings2.js +6 -2
- package/ui/Elements/Icon/icons/ShoppingBag.js +6 -2
- package/ui/Elements/Icon/icons/ThreeDots.js +6 -2
- package/ui/Elements/Icon/icons/Transfer.js +6 -2
- package/ui/Elements/Icon/icons/Truck.js +6 -2
- package/ui/Elements/Icon/icons/TwoBoxes.js +6 -2
- package/ui/Elements/Icon/icons/TwoCheckedBoxes.js +6 -2
- package/ui/Elements/Icon/icons/TwoUsers.js +6 -2
- package/ui/Elements/Icon/icons/index.js +114 -55
- package/ui/Elements/Icon/index.js +26 -5
- package/ui/Elements/Icon/stories/BadgeIcon.stories.js +12 -6
- package/ui/Elements/Icon/stories/Icon.stories.js +12 -9
- package/ui/Elements/Icon/types.js +2 -1
- package/ui/Elements/Image/Image.js +6 -4
- package/ui/Elements/Image/index.js +9 -3
- package/ui/Elements/Image/stories/Image.stories.js +15 -9
- package/ui/Elements/Image/types.js +2 -1
- package/ui/Elements/Label/Label.js +35 -9
- package/ui/Elements/Label/index.js +8 -3
- package/ui/Elements/Label/stories/Label.stories.js +8 -5
- package/ui/Elements/Line/Line.js +10 -5
- package/ui/Elements/Line/index.js +9 -3
- package/ui/Elements/Line/stories/Line.stories.js +16 -10
- package/ui/Elements/Line/types.js +2 -1
- package/ui/Elements/Link/Link.js +39 -14
- package/ui/Elements/Link/index.js +9 -3
- package/ui/Elements/Link/stories/Link.stories.js +13 -10
- package/ui/Elements/Logo/Logo.js +30 -25
- package/ui/Elements/Logo/index.js +9 -3
- package/ui/Elements/Logo/stories/Logo.stories.js +24 -18
- package/ui/Elements/Logo/types.js +2 -1
- package/ui/Elements/MultiSelect/MultiSelect.js +9 -4
- package/ui/Elements/MultiSelect/index.js +7 -2
- package/ui/Elements/Pagination/Pagination.js +9 -7
- package/ui/Elements/Pagination/index.js +9 -3
- package/ui/Elements/Pagination/stories/Pagination.stories.js +8 -5
- package/ui/Elements/Pagination/styled.js +41 -12
- package/ui/Elements/Portal/index.js +14 -7
- package/ui/Elements/ProgressBar/ProgressBar.js +6 -4
- package/ui/Elements/ProgressBar/index.js +9 -3
- package/ui/Elements/ProgressBar/stories/ProgressBar.stories.js +12 -6
- package/ui/Elements/ProgressBar/styles.js +38 -12
- package/ui/Elements/Select/Select.js +25 -20
- package/ui/Elements/Select/index.js +7 -2
- package/ui/Elements/Select/styles.js +13 -7
- package/ui/Elements/Select/themes/CustomComponents.js +72 -37
- package/ui/Elements/Select/themes/baseStyles.js +12 -6
- package/ui/Elements/Select/themes/formStyles.js +27 -23
- package/ui/Elements/Select/themes/index.js +20 -16
- package/ui/Elements/Select/types.js +2 -1
- package/ui/Elements/SimpleLink/SimpleLink.js +31 -6
- package/ui/Elements/SimpleLink/index.js +9 -3
- package/ui/Elements/SingleSelect/SingleSelect.js +32 -27
- package/ui/Elements/SingleSelect/index.js +7 -2
- package/ui/Elements/SpaceAround/SpaceAround.js +36 -11
- package/ui/Elements/SpaceAround/index.js +9 -3
- package/ui/Elements/SpaceAround/stories/SpaceAround.stories.js +8 -5
- package/ui/Elements/SpaceAround/types.js +2 -1
- package/ui/Elements/Spinner/Spinner.js +12 -8
- package/ui/Elements/Spinner/index.js +9 -3
- package/ui/Elements/Spinner/stories/Spinner.stories.js +16 -13
- package/ui/Elements/Spinner/styles.js +33 -7
- package/ui/Elements/Spinner/types.js +2 -1
- package/ui/Elements/Tag/Tag.js +31 -6
- package/ui/Elements/Tag/index.js +10 -3
- package/ui/Elements/Tag/palletes.js +4 -1
- package/ui/Elements/Tag/stories/Tag.stories.js +21 -15
- package/ui/Elements/Tag/stories/components/predefinedTags.js +11 -6
- package/ui/Elements/Tag/types.js +2 -1
- package/ui/Elements/Text/Text.js +6 -4
- package/ui/Elements/Text/index.js +8 -2
- package/ui/Elements/Text/stories/Text.stories.js +15 -9
- package/ui/Elements/Text/types.js +2 -1
- package/ui/Elements/Toast/Toast.js +15 -10
- package/ui/Elements/Toast/index.js +9 -3
- package/ui/Elements/Toggle/Toggle.js +38 -13
- package/ui/Elements/Toggle/index.js +9 -3
- package/ui/Elements/Toggle/stories/Toggle.stories.js +13 -7
- package/ui/Elements/Toggle/types.js +2 -1
- package/ui/Elements/Typography/Typography.js +44 -28
- package/ui/Elements/Typography/index.js +19 -3
- package/ui/Elements/Typography/stories/Typography.stories.js +18 -15
- package/ui/Forms/Checkbox/Checkbox.js +11 -9
- package/ui/Forms/Checkbox/index.js +9 -3
- package/ui/Forms/Checkbox/stories/Checkbox.stories.js +13 -7
- package/ui/Forms/Checkbox/styles.js +32 -6
- package/ui/Forms/Checkbox/types.js +2 -1
- package/ui/Forms/Input/Input.js +20 -16
- package/ui/Forms/Input/index.js +6 -3
- package/ui/Forms/Input/stories/Input.stories.js +14 -11
- package/ui/Forms/Input/styles.js +46 -20
- package/ui/Forms/Input/types.js +2 -1
- package/ui/Forms/RadioButton/RadioButton.js +8 -6
- package/ui/Forms/RadioButton/index.js +9 -3
- package/ui/Forms/RadioButton/stories/RadioButton.stories.js +13 -7
- package/ui/Forms/RadioButton/styles.js +13 -7
- package/ui/Forms/RadioButton/types.js +2 -1
- package/ui/Forms/TextArea/TextArea.js +13 -8
- package/ui/Forms/TextArea/index.js +7 -2
- package/ui/Forms/TextArea/styles.js +39 -13
- package/ui/System/Fonts/index.js +14 -9
- package/ui/ThemeProvider/ThemeProvider.js +13 -7
- package/ui/ThemeProvider/index.js +25 -5
- package/ui/ThemeProvider/themes/default.js +3 -1
- package/ui/ThemeProvider/themes/index.js +12 -7
- package/ui/ThemeProvider/themes/light.js +3 -1
- package/ui/ThemeProvider/themes/mailwise.js +3 -1
- package/ui/ThemeProvider/types.js +2 -1
- package/ui/index.js +146 -85
- package/ui/index.umd.js +3878 -0
- package/ui/utils/CreateRgba/createRgba.js +12 -5
- package/ui/utils/CreateRgba/types.js +2 -1
- package/ui/utils/KeyPress/KeyPress.js +6 -4
- package/ui/utils/KeyPress/KeyPress.stories.js +12 -6
- package/ui/utils/KeyPress/index.js +7 -2
- package/ui/utils/KeyPress/types.js +2 -1
- package/ui/utils/index.js +13 -6
- package/ui/index.cjs.js +0 -3878
|
@@ -1,24 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
4
|
return cooked;
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.RemoveCell = exports.Wrap = void 0;
|
|
11
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
+
var react_1 = __importDefault(require("react"));
|
|
13
|
+
var styled_components_1 = __importDefault(require("@xstyled/styled-components"));
|
|
14
|
+
var react_2 = require("@lingui/react");
|
|
15
|
+
var Icon_1 = __importDefault(require("../../../../Elements/Icon/Icon"));
|
|
16
|
+
exports.Wrap = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
17
|
+
var Trigger = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n cursor: pointer;\n color: gray;\n font-weight: bold;\n font-size: 10px;\n & .faIcon {\n margin-right: 4px;\n }\n"], ["\n display: flex;\n justify-content: center;\n cursor: pointer;\n color: gray;\n font-weight: bold;\n font-size: 10px;\n & .faIcon {\n margin-right: 4px;\n }\n"])));
|
|
18
|
+
var RemoveCell = function (_a) {
|
|
13
19
|
var _b;
|
|
14
20
|
var rowData = _a.rowData, onRowAction = _a.onRowAction;
|
|
15
|
-
var onRemoveClick =
|
|
21
|
+
var onRemoveClick = react_1.default.useCallback(function () {
|
|
16
22
|
if (onRowAction)
|
|
17
23
|
onRowAction(rowData.id, 'remove', rowData);
|
|
18
24
|
}, [rowData, onRowAction]);
|
|
19
25
|
if (((_b = rowData === null || rowData === void 0 ? void 0 : rowData.product) === null || _b === void 0 ? void 0 : _b.type) === 'virtual') {
|
|
20
|
-
return
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(react_2.Trans, { id: "dataGrid.columnLot.NA", message: "N/A" });
|
|
21
27
|
}
|
|
22
|
-
return (
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(exports.Wrap, { children: (0, jsx_runtime_1.jsxs)(Trigger, { onClick: onRemoveClick, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { icon: "deleteX", size: "12px" }), (0, jsx_runtime_1.jsx)(react_2.Trans, { id: "dataGrid.deleteItem", message: "Delete" })] }) }));
|
|
23
29
|
};
|
|
30
|
+
exports.RemoveCell = RemoveCell;
|
|
24
31
|
var templateObject_1, templateObject_2;
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
4
|
return cooked;
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.RowActionsCell = void 0;
|
|
11
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
+
var react_1 = require("react");
|
|
13
|
+
var styled_components_1 = __importDefault(require("@xstyled/styled-components"));
|
|
14
|
+
var fp_1 = require("lodash/fp");
|
|
15
|
+
var IconButtonInCell_1 = require("./IconButtonInCell");
|
|
16
|
+
var Center = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n cursor: pointer;\n width: 100%;\n\n svg {\n color: blue2;\n }\n"], ["\n display: flex;\n justify-content: center;\n cursor: pointer;\n width: 100%;\n\n svg {\n color: blue2;\n }\n"])));
|
|
17
|
+
var RowActionsCell = function (_a) {
|
|
12
18
|
var canEdit = _a.canEdit, onClick = _a.onClick, linkTo = _a.linkTo;
|
|
13
|
-
var handleOnClick = useCallback(function () {
|
|
14
|
-
if (isFunction(onClick)) {
|
|
19
|
+
var handleOnClick = (0, react_1.useCallback)(function () {
|
|
20
|
+
if ((0, fp_1.isFunction)(onClick)) {
|
|
15
21
|
onClick();
|
|
16
22
|
}
|
|
17
23
|
}, [onClick]);
|
|
18
|
-
var actions = useMemo(function () {
|
|
24
|
+
var actions = (0, react_1.useMemo)(function () {
|
|
19
25
|
var actionOptions = [];
|
|
20
26
|
if (canEdit) {
|
|
21
|
-
actionOptions.push(
|
|
27
|
+
actionOptions.push((0, jsx_runtime_1.jsx)(IconButtonInCell_1.IconButtonInCell, { icon: "pen", onClick: handleOnClick, linkTo: linkTo }, "edit"));
|
|
22
28
|
}
|
|
23
29
|
else {
|
|
24
|
-
actionOptions.push(
|
|
30
|
+
actionOptions.push((0, jsx_runtime_1.jsx)(IconButtonInCell_1.IconButtonInCell, { icon: "chevronRight", onClick: handleOnClick, linkTo: linkTo }, "read"));
|
|
25
31
|
}
|
|
26
32
|
return actionOptions;
|
|
27
33
|
}, [canEdit, handleOnClick, linkTo]);
|
|
28
|
-
return
|
|
34
|
+
return (0, jsx_runtime_1.jsx)(Center, { onClick: handleOnClick, children: actions });
|
|
29
35
|
};
|
|
36
|
+
exports.RowActionsCell = RowActionsCell;
|
|
30
37
|
var templateObject_1;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
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
|
+
exports.StringJoinCell = void 0;
|
|
7
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
var get_1 = __importDefault(require("lodash/fp/get"));
|
|
9
|
+
var StringJoinCell = function (_a) {
|
|
4
10
|
var rowData = _a.rowData, column = _a.column;
|
|
5
|
-
var values =
|
|
6
|
-
return values && values.length ?
|
|
11
|
+
var values = (0, get_1.default)(column.name, rowData);
|
|
12
|
+
return values && values.length ? (0, jsx_runtime_1.jsx)("span", { className: "cell", children: values.join(', ') }) : null;
|
|
7
13
|
};
|
|
14
|
+
exports.StringJoinCell = StringJoinCell;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,8 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export var SwitchInCell = function (props) {
|
|
15
|
-
return _jsx(Toggle, __assign({}, props, { variant: "grid" }));
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
15
|
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SwitchInCell = void 0;
|
|
18
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
var Toggle_1 = __importDefault(require("../../../../Elements/Toggle/Toggle"));
|
|
20
|
+
var SwitchInCell = function (props) {
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(Toggle_1.default, __assign({}, props, { variant: "grid" }));
|
|
22
|
+
};
|
|
23
|
+
exports.SwitchInCell = SwitchInCell;
|
|
@@ -1,19 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ToggleCell = void 0;
|
|
30
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
+
var react_1 = __importStar(require("react"));
|
|
32
|
+
var SwitchInCell_1 = require("./SwitchInCell");
|
|
33
|
+
var get_1 = __importDefault(require("lodash/fp/get"));
|
|
34
|
+
var ToggleCell = function (_a) {
|
|
6
35
|
var _b;
|
|
7
36
|
var rowData = _a.rowData, column = _a.column, onRowAction = _a.onRowAction;
|
|
8
37
|
var inverse = !!((_b = column === null || column === void 0 ? void 0 : column.passProps) === null || _b === void 0 ? void 0 : _b.inverse);
|
|
9
|
-
var rawValue =
|
|
38
|
+
var rawValue = (0, get_1.default)(column.name, rowData);
|
|
10
39
|
var value = inverse ? !rawValue : !!rawValue;
|
|
11
40
|
var actionName = "toggle_".concat(column.name);
|
|
12
|
-
var _c =
|
|
13
|
-
|
|
41
|
+
var _c = react_1.default.useState(value), isChecked = _c[0], setIsChecked = _c[1];
|
|
42
|
+
react_1.default.useEffect(function () {
|
|
14
43
|
setIsChecked(value);
|
|
15
44
|
}, [rowData.id]);
|
|
16
|
-
var onSwitchChange = useCallback(function () {
|
|
45
|
+
var onSwitchChange = (0, react_1.useCallback)(function () {
|
|
17
46
|
if (!onRowAction)
|
|
18
47
|
return;
|
|
19
48
|
var ret = onRowAction(rowData.id, actionName, !isChecked);
|
|
@@ -26,5 +55,6 @@ export var ToggleCell = function (_a) {
|
|
|
26
55
|
setIsChecked(!isChecked);
|
|
27
56
|
}
|
|
28
57
|
}, [onRowAction, rowData.id, actionName, isChecked]);
|
|
29
|
-
return
|
|
58
|
+
return (0, jsx_runtime_1.jsx)(SwitchInCell_1.SwitchInCell, { checked: isChecked, onChange: onSwitchChange });
|
|
30
59
|
};
|
|
60
|
+
exports.ToggleCell = ToggleCell;
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToggleCell = exports.RowActionsCell = exports.HoverBubble = exports.EnumInCell = exports.ImageCell = exports.SwitchInCell = exports.IconButtonInCell = exports.ButtonInCell = exports.LinkInCell = exports.RemoveCell = exports.BoolIconCell = exports.StringJoinCell = exports.DateTimeCell = exports.DateCell = void 0;
|
|
4
|
+
var Date_1 = require("./Date");
|
|
5
|
+
Object.defineProperty(exports, "DateCell", { enumerable: true, get: function () { return Date_1.DateCell; } });
|
|
6
|
+
var DateTime_1 = require("./DateTime");
|
|
7
|
+
Object.defineProperty(exports, "DateTimeCell", { enumerable: true, get: function () { return DateTime_1.DateTimeCell; } });
|
|
8
|
+
var StringJoin_1 = require("./StringJoin");
|
|
9
|
+
Object.defineProperty(exports, "StringJoinCell", { enumerable: true, get: function () { return StringJoin_1.StringJoinCell; } });
|
|
10
|
+
var BoolIcon_1 = require("./BoolIcon");
|
|
11
|
+
Object.defineProperty(exports, "BoolIconCell", { enumerable: true, get: function () { return BoolIcon_1.BoolIconCell; } });
|
|
12
|
+
var RemoveItem_1 = require("./RemoveItem");
|
|
13
|
+
Object.defineProperty(exports, "RemoveCell", { enumerable: true, get: function () { return RemoveItem_1.RemoveCell; } });
|
|
14
|
+
var LinkInCell_1 = require("./LinkInCell");
|
|
15
|
+
Object.defineProperty(exports, "LinkInCell", { enumerable: true, get: function () { return LinkInCell_1.LinkInCell; } });
|
|
16
|
+
var ButtonInCell_1 = require("./ButtonInCell");
|
|
17
|
+
Object.defineProperty(exports, "ButtonInCell", { enumerable: true, get: function () { return ButtonInCell_1.ButtonInCell; } });
|
|
18
|
+
var IconButtonInCell_1 = require("./IconButtonInCell");
|
|
19
|
+
Object.defineProperty(exports, "IconButtonInCell", { enumerable: true, get: function () { return IconButtonInCell_1.IconButtonInCell; } });
|
|
20
|
+
var SwitchInCell_1 = require("./SwitchInCell");
|
|
21
|
+
Object.defineProperty(exports, "SwitchInCell", { enumerable: true, get: function () { return SwitchInCell_1.SwitchInCell; } });
|
|
22
|
+
var ImageCell_1 = require("./ImageCell");
|
|
23
|
+
Object.defineProperty(exports, "ImageCell", { enumerable: true, get: function () { return ImageCell_1.ImageCell; } });
|
|
24
|
+
var EnumInCell_1 = require("./EnumInCell");
|
|
25
|
+
Object.defineProperty(exports, "EnumInCell", { enumerable: true, get: function () { return EnumInCell_1.EnumInCell; } });
|
|
26
|
+
var HoverBubble_1 = require("./HoverBubble");
|
|
27
|
+
Object.defineProperty(exports, "HoverBubble", { enumerable: true, get: function () { return HoverBubble_1.HoverBubble; } });
|
|
28
|
+
var RowActionsCell_1 = require("./RowActionsCell");
|
|
29
|
+
Object.defineProperty(exports, "RowActionsCell", { enumerable: true, get: function () { return RowActionsCell_1.RowActionsCell; } });
|
|
30
|
+
var ToggleCell_1 = require("./ToggleCell");
|
|
31
|
+
Object.defineProperty(exports, "ToggleCell", { enumerable: true, get: function () { return ToggleCell_1.ToggleCell; } });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
var Edit = function (props) { return ((0, jsx_runtime_1.jsx)("svg", __assign({ "data-icon": "edit", viewBox: "0 0 16 16" }, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M3.25 10.26l2.47 2.47 6.69-6.69-2.46-2.48-6.7 6.7zM.99 14.99l3.86-1.39-2.46-2.44-1.4 3.83zm12.25-14c-.48 0-.92.2-1.24.51l-1.44 1.44 2.47 2.47 1.44-1.44c.32-.32.51-.75.51-1.24.01-.95-.77-1.74-1.74-1.74z", fillRule: "evenodd" }) }))); };
|
|
16
|
+
exports.default = Edit;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
var EyeOpen = function (props) { return ((0, jsx_runtime_1.jsx)("svg", __assign({ "data-icon": "eye-open", viewBox: "0 0 16 16" }, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M8.002 7.003a1.003 1.003 0 000 2.005 1.003 1.003 0 000-2.005zm7.988.972v-.02-.01-.02-.02a.675.675 0 00-.17-.36c-.509-.673-1.118-1.264-1.737-1.806-1.328-1.173-2.846-2.155-4.523-2.546a6.702 6.702 0 00-2.925-.06c-.889.18-1.738.541-2.546.992C2.84 4.837 1.692 5.81.694 6.902c-.18.211-.36.411-.53.632a.742.742 0 000 .932c.51.672 1.119 1.264 1.738 1.805 1.328 1.173 2.846 2.156 4.523 2.547.968.23 1.947.24 2.925.04.889-.18 1.738-.542 2.546-.993 1.248-.712 2.397-1.684 3.395-2.777.18-.2.37-.411.54-.632.09-.1.149-.23.169-.36v-.02-.02-.01-.02-.03c0-.01-.01-.01-.01-.02zm-7.988 3.038a2.998 2.998 0 01-2.995-3.008 2.998 2.998 0 012.995-3.008 2.998 2.998 0 012.996 3.008 2.998 2.998 0 01-2.996 3.008z", fillRule: "evenodd" }) }))); };
|
|
16
|
+
exports.default = EyeOpen;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,6 +10,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.SortingDown = exports.SortingUp = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var SortingUp = function (props) { return ((0, jsx_runtime_1.jsx)("svg", __assign({ viewBox: "0 0 16 16" }, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M12.71 9.29l-4-4C8.53 5.11 8.28 5 8 5s-.53.11-.71.29l-4 4a1.003 1.003 0 001.42 1.42L8 7.41l3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71z", fillRule: "evenodd" }) }))); };
|
|
17
|
+
exports.SortingUp = SortingUp;
|
|
18
|
+
var SortingDown = function (props) { return ((0, jsx_runtime_1.jsx)("svg", __assign({ viewBox: "0 0 16 16" }, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M12 5c-.28 0-.53.11-.71.29L8 8.59l-3.29-3.3a1.003 1.003 0 00-1.42 1.42l4 4c.18.18.43.29.71.29s.53-.11.71-.29l4-4A1.003 1.003 0 0012 5z", fillRule: "evenodd" }) }))); };
|
|
19
|
+
exports.SortingDown = SortingDown;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTimeMeasurement = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var useTimeMeasurement = function (_a) {
|
|
3
6
|
var handleRowClick = _a.handleRowClick;
|
|
4
|
-
var _b = useState(0), startTime = _b[0], setStartTime = _b[1];
|
|
7
|
+
var _b = (0, react_1.useState)(0), startTime = _b[0], setStartTime = _b[1];
|
|
5
8
|
var handleMouseDown = function () {
|
|
6
9
|
// Set the start time when mouse is pressed
|
|
7
10
|
var start = Date.now();
|
|
@@ -20,3 +23,4 @@ export var useTimeMeasurement = function (_a) {
|
|
|
20
23
|
};
|
|
21
24
|
return { handleMouseDown: handleMouseDown, handleMouseUp: handleMouseUp };
|
|
22
25
|
};
|
|
26
|
+
exports.useTimeMeasurement = useTimeMeasurement;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAddFilter = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var utils_1 = require("../utils");
|
|
6
|
+
var useAddFilter = function (onChange) {
|
|
7
|
+
return (0, react_1.useCallback)(function (value, column) {
|
|
5
8
|
if (onChange) {
|
|
6
9
|
var filterProps = {
|
|
7
|
-
type: createFilterType(column),
|
|
10
|
+
type: (0, utils_1.createFilterType)(column),
|
|
8
11
|
filterExtraProps: column.filterExtraProps || {},
|
|
9
12
|
computedValue: column.getFilterCriteria ? column.getFilterCriteria(value) : null,
|
|
10
13
|
};
|
|
11
|
-
onChange(getFilterName(column), value, filterProps);
|
|
14
|
+
onChange((0, utils_1.getFilterName)(column), value, filterProps);
|
|
12
15
|
}
|
|
13
16
|
}, [onChange]);
|
|
14
17
|
};
|
|
18
|
+
exports.useAddFilter = useAddFilter;
|
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
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"));
|
|
7
|
+
var sum_1 = __importDefault(require("lodash/sum"));
|
|
3
8
|
var useColumnSizes = function (displayColumnsDefinitions, storeColumnsWidth, storeColumnsWidthVariant, setColumnWidth, columnLayout, minColumnWidth) {
|
|
4
9
|
/**
|
|
5
10
|
* decorate grid resize with layout and reset grid widths if layout changes
|
|
6
11
|
*/
|
|
7
12
|
if (minColumnWidth === void 0) { minColumnWidth = 50; }
|
|
8
|
-
var handleSetColumnWidth =
|
|
9
|
-
|
|
13
|
+
var handleSetColumnWidth = react_1.default.useCallback(function (columnWidth) { return setColumnWidth(columnWidth, columnLayout); }, [columnLayout, setColumnWidth]);
|
|
14
|
+
react_1.default.useEffect(function () {
|
|
10
15
|
if (storeColumnsWidthVariant != columnLayout)
|
|
11
16
|
handleSetColumnWidth(null);
|
|
12
17
|
}, [columnLayout, storeColumnsWidthVariant, handleSetColumnWidth]);
|
|
13
18
|
/**
|
|
14
19
|
* base width of each displayed column and of all displayed columns put together
|
|
15
20
|
*/
|
|
16
|
-
var displayColumnsWidth =
|
|
21
|
+
var displayColumnsWidth = react_1.default.useMemo(function () {
|
|
17
22
|
var displayColumnsWidth = {};
|
|
18
23
|
displayColumnsDefinitions.forEach(function (column) { return (displayColumnsWidth[column.name] = (storeColumnsWidth === null || storeColumnsWidth === void 0 ? void 0 : storeColumnsWidth[column.name]) || column.flexBasis); });
|
|
19
24
|
return displayColumnsWidth;
|
|
20
25
|
}, [displayColumnsDefinitions, storeColumnsWidth]);
|
|
21
|
-
var totalColumnsWidth =
|
|
22
|
-
return
|
|
26
|
+
var totalColumnsWidth = react_1.default.useMemo(function () {
|
|
27
|
+
return (0, sum_1.default)(Object.values(displayColumnsWidth));
|
|
23
28
|
}, [displayColumnsWidth]);
|
|
24
29
|
/**
|
|
25
30
|
* handling of remaining space
|
|
26
31
|
*/
|
|
27
32
|
// TODO optimize better
|
|
28
|
-
var gridBoxRef =
|
|
29
|
-
var testAdjustLastColumn =
|
|
33
|
+
var gridBoxRef = react_1.default.useRef(null);
|
|
34
|
+
var testAdjustLastColumn = react_1.default.useCallback(function () {
|
|
30
35
|
var _a;
|
|
31
36
|
var _b;
|
|
32
37
|
var gridWidth = ((_b = gridBoxRef === null || gridBoxRef === void 0 ? void 0 : gridBoxRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth) || null;
|
|
@@ -38,17 +43,17 @@ var useColumnSizes = function (displayColumnsDefinitions, storeColumnsWidth, sto
|
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
}, [columnLayout, displayColumnsDefinitions, displayColumnsWidth, gridBoxRef, handleSetColumnWidth, totalColumnsWidth]);
|
|
41
|
-
|
|
46
|
+
react_1.default.useEffect(function () {
|
|
42
47
|
testAdjustLastColumn();
|
|
43
48
|
}, [testAdjustLastColumn]);
|
|
44
|
-
|
|
49
|
+
react_1.default.useLayoutEffect(function () {
|
|
45
50
|
window.addEventListener('resize', testAdjustLastColumn);
|
|
46
51
|
return function () { return window.removeEventListener('resize', testAdjustLastColumn); };
|
|
47
52
|
}, [testAdjustLastColumn]);
|
|
48
53
|
/**
|
|
49
54
|
* resizing of columns
|
|
50
55
|
*/
|
|
51
|
-
var handleResizeDrag =
|
|
56
|
+
var handleResizeDrag = react_1.default.useCallback(function (columnName, width) {
|
|
52
57
|
var _a, _b;
|
|
53
58
|
var _c;
|
|
54
59
|
var i = displayColumnsDefinitions.findIndex(function (_a) {
|
|
@@ -80,4 +85,4 @@ var useColumnSizes = function (displayColumnsDefinitions, storeColumnsWidth, sto
|
|
|
80
85
|
}, [displayColumnsDefinitions, columnLayout, displayColumnsWidth, totalColumnsWidth, minColumnWidth, handleSetColumnWidth]);
|
|
81
86
|
return { totalColumnsWidth: totalColumnsWidth, gridBoxRef: gridBoxRef, displayColumnsWidth: displayColumnsWidth, handleResizeDrag: handleResizeDrag };
|
|
82
87
|
};
|
|
83
|
-
|
|
88
|
+
exports.default = useColumnSizes;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
3
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
4
|
if (ar || !(i in from)) {
|
|
@@ -7,8 +8,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
8
|
}
|
|
8
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
var react_1 = require("react");
|
|
16
|
+
var ReadEditButtonCell_1 = __importDefault(require("../components/ReadEditButtonCell"));
|
|
12
17
|
/**
|
|
13
18
|
* Because in new design we are displaying lot of the controlls differently, including read and edit buttons in grid,
|
|
14
19
|
* easiest way to make all the definition changes is to just overwrite the here once, instead of modifying every single grid (33 instances atm).
|
|
@@ -16,7 +21,7 @@ import getReadEditButtonCell from '../components/ReadEditButtonCell';
|
|
|
16
21
|
* */
|
|
17
22
|
var useEditReadAsColumn = function (props) {
|
|
18
23
|
var onRowAction = props.onRowAction, actionColumnDefinition = props.actionColumnDefinition, columnsDefinitions = props.columnsDefinitions, onRowEditClick = props.onRowEditClick, onRowReadClick = props.onRowReadClick;
|
|
19
|
-
var modifiedActionColumnDefinition = useMemo(function () {
|
|
24
|
+
var modifiedActionColumnDefinition = (0, react_1.useMemo)(function () {
|
|
20
25
|
var _a;
|
|
21
26
|
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)) {
|
|
22
27
|
// note: this also removes actions, because we render action trigger outside the grid anyway
|
|
@@ -29,7 +34,7 @@ var useEditReadAsColumn = function (props) {
|
|
|
29
34
|
return undefined;
|
|
30
35
|
}
|
|
31
36
|
}, [actionColumnDefinition]);
|
|
32
|
-
var modifiedOnRowAction = useCallback(function (id, field, value) {
|
|
37
|
+
var modifiedOnRowAction = (0, react_1.useCallback)(function (id, field, value) {
|
|
33
38
|
if (field === 'row_edit' || field === 'row_read') {
|
|
34
39
|
if (field === 'row_edit' && onRowEditClick)
|
|
35
40
|
onRowEditClick(id, value);
|
|
@@ -41,8 +46,8 @@ var useEditReadAsColumn = function (props) {
|
|
|
41
46
|
}
|
|
42
47
|
}, [onRowAction, onRowEditClick, onRowReadClick]);
|
|
43
48
|
// TODO Entire logic of row edit / row read need to be completely refactored.
|
|
44
|
-
var CellComponent = useMemo(function () { return
|
|
45
|
-
var modifiedColumnsDefinitions = useMemo(function () {
|
|
49
|
+
var CellComponent = (0, react_1.useMemo)(function () { return (0, ReadEditButtonCell_1.default)(actionColumnDefinition); }, [actionColumnDefinition]);
|
|
50
|
+
var modifiedColumnsDefinitions = (0, react_1.useMemo)(function () {
|
|
46
51
|
if ((actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.canRowEdit) !== undefined || (actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.canRowRead) !== undefined) {
|
|
47
52
|
return __spreadArray(__spreadArray([], columnsDefinitions, true), [
|
|
48
53
|
{
|
|
@@ -67,4 +72,4 @@ var useEditReadAsColumn = function (props) {
|
|
|
67
72
|
onRowAction: modifiedOnRowAction,
|
|
68
73
|
};
|
|
69
74
|
};
|
|
70
|
-
|
|
75
|
+
exports.default = useEditReadAsColumn;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
2
4
|
var useFloatingButton = function (hasPermission, onClick, options, onSelect) {
|
|
3
|
-
return useMemo(function () {
|
|
5
|
+
return (0, react_1.useMemo)(function () {
|
|
4
6
|
if (!hasPermission)
|
|
5
7
|
return;
|
|
6
8
|
return {
|
|
@@ -10,4 +12,4 @@ var useFloatingButton = function (hasPermission, onClick, options, onSelect) {
|
|
|
10
12
|
};
|
|
11
13
|
}, [hasPermission, onClick, options, onSelect]);
|
|
12
14
|
};
|
|
13
|
-
|
|
15
|
+
exports.default = useFloatingButton;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
2
4
|
var useGetGridHeight = function () {
|
|
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 () {
|
|
5
|
+
var _a = (0, react_1.useState)(window.innerHeight), windowHeight = _a[0], setWindowHeight = _a[1];
|
|
6
|
+
var _b = (0, react_1.useState)(0), topDistance = _b[0], setTopDistance = _b[1];
|
|
7
|
+
var _c = (0, react_1.useState)(0), bottomDistance = _c[0], setBottomDistance = _c[1];
|
|
8
|
+
var gridRef = (0, react_1.useRef)(null);
|
|
9
|
+
var paginationRef = (0, react_1.useRef)(null);
|
|
10
|
+
(0, react_1.useEffect)(function () {
|
|
9
11
|
var handleResize = function () {
|
|
10
12
|
var _a, _b;
|
|
11
13
|
setTopDistance(((_a = gridRef.current) === null || _a === void 0 ? void 0 : _a.offsetTop) || 0);
|
|
@@ -18,7 +20,7 @@ var useGetGridHeight = function () {
|
|
|
18
20
|
window.removeEventListener('resize', handleResize);
|
|
19
21
|
};
|
|
20
22
|
}, []);
|
|
21
|
-
var gridHeight = useMemo(function () {
|
|
23
|
+
var gridHeight = (0, react_1.useMemo)(function () {
|
|
22
24
|
var calculatedHeight = windowHeight - topDistance - bottomDistance;
|
|
23
25
|
if (calculatedHeight !== windowHeight && calculatedHeight > 360) {
|
|
24
26
|
return calculatedHeight - 25;
|
|
@@ -30,4 +32,4 @@ var useGetGridHeight = function () {
|
|
|
30
32
|
}, [bottomDistance, topDistance, windowHeight]);
|
|
31
33
|
return { gridHeight: gridHeight, gridRef: gridRef, paginationRef: paginationRef };
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
exports.default = useGetGridHeight;
|
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
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
|
+
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) {
|
|
4
10
|
if (actionOptions === void 0) { actionOptions = []; }
|
|
5
|
-
var actionRows = useMemo(function () {
|
|
11
|
+
var actionRows = (0, react_1.useMemo)(function () {
|
|
6
12
|
return (rowsData || []).filter(function (row) { var _a; return (_a = uxState.checkedRows) === null || _a === void 0 ? void 0 : _a[row.id]; });
|
|
7
13
|
}, [uxState, rowsData]);
|
|
8
|
-
var enabledActions = useMemo(function () {
|
|
14
|
+
var enabledActions = (0, react_1.useMemo)(function () {
|
|
9
15
|
var actionsOptions = actionOptions || [];
|
|
10
16
|
return actionsOptions.filter(function (action) {
|
|
11
17
|
if (action.isEnabled) {
|
|
12
18
|
return action.isEnabled(actionRows);
|
|
13
19
|
}
|
|
14
20
|
else {
|
|
15
|
-
return uxState.checkedRows &&
|
|
21
|
+
return uxState.checkedRows && (0, find_1.default)(uxState.checkedRows, Boolean);
|
|
16
22
|
}
|
|
17
23
|
});
|
|
18
24
|
}, [uxState, actionRows, actionOptions]);
|
|
19
|
-
var handleBatchAction = useCallback(function (value) {
|
|
25
|
+
var handleBatchAction = (0, react_1.useCallback)(function (value) {
|
|
20
26
|
var actionsOptions = actionOptions || [];
|
|
21
27
|
var action = actionsOptions.find(function (option) { return option.value == value; });
|
|
22
28
|
action && onBatchAction && onBatchAction(action, actionRows);
|
|
23
29
|
}, [actionOptions, onBatchAction, actionRows]);
|
|
24
30
|
return [enabledActions, handleBatchAction];
|
|
25
31
|
};
|
|
32
|
+
exports.useGridActionTrigger = useGridActionTrigger;
|