@mailstep/design-system 0.5.1-beta.2 → 0.6.0
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 +40 -20
- package/ui/Blocks/CommonGrid/CommonGrid.d.ts +5 -2
- package/ui/Blocks/CommonGrid/CommonGrid.js +12 -22
- package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +66 -0
- package/ui/Blocks/CommonGrid/StandardButtons.d.ts +4 -0
- package/ui/Blocks/CommonGrid/StandardButtons.js +36 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +50 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +18 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +45 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +37 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.d.ts +13 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +32 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +1 -1
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.d.ts +5 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +58 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +20 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/DataRow.js +4 -4
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +113 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.d.ts +1 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +3 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +8 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +43 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/FilterRow.js +2 -3
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +46 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.d.ts +10 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +19 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/HeadCell.js +1 -4
- package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +18 -0
- package/ui/Blocks/CommonGrid/components/IconList/IconList.js +29 -0
- package/ui/Blocks/CommonGrid/components/IconList/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +20 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +47 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.d.ts +3 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +76 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/types.d.ts +17 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -0
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +1 -4
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +26 -0
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/Table.d.ts +0 -6
- package/ui/Blocks/CommonGrid/components/Table.js +0 -5
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +8 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +32 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +89 -0
- package/ui/Blocks/CommonGrid/components/TextRange/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/TextRange/types.d.ts +21 -0
- package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -0
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.d.ts +5 -0
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +22 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/{icons/ArrowSimple.js → gridCells/ButtonInCell.js} +4 -2
- package/ui/Blocks/CommonGrid/components/gridCells/Date.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/Date.js +8 -0
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -0
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +33 -0
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +18 -0
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +23 -0
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.d.ts +1 -0
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.d.ts +5 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +24 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +30 -0
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -0
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +16 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +30 -0
- package/ui/Blocks/CommonGrid/components/gridCells/index.d.ts +14 -0
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -0
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.d.ts +4 -0
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +14 -0
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.d.ts +15 -0
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +70 -0
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.d.ts +3 -0
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +13 -0
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.d.ts +7 -0
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -0
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.d.ts +8 -0
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +25 -0
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +19 -0
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +34 -0
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.d.ts +8 -0
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +15 -0
- package/ui/Blocks/CommonGrid/index.d.ts +7 -71
- package/ui/Blocks/CommonGrid/index.js +7 -15
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +4 -4
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +3 -2
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +3 -2
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +3 -3
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +3 -3
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +2 -2
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +3 -3
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +2 -1
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.d.ts +1 -0
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +8 -0
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +1 -1
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +1 -17
- package/ui/Blocks/CommonGrid/styles.d.ts +14 -0
- package/ui/Blocks/CommonGrid/styles.js +33 -0
- package/ui/Blocks/CommonGrid/translations.d.ts +1 -0
- package/ui/Blocks/CommonGrid/translations.js +6 -0
- package/ui/Blocks/CommonGrid/types.d.ts +29 -15
- package/ui/Blocks/CommonGrid/utils/index.d.ts +4 -1
- package/ui/Blocks/CommonGrid/utils/index.js +19 -0
- package/ui/Blocks/HidePrint/HidePrint.d.ts +6 -0
- package/ui/Blocks/HidePrint/HidePrint.js +13 -0
- package/ui/Blocks/Popover/index.d.ts +12 -0
- package/ui/Blocks/Popover/index.js +21 -0
- package/ui/Elements/DatePicker/DatePicker.d.ts +20 -0
- package/ui/Elements/DatePicker/DatePicker.js +65 -0
- package/ui/Elements/DatePicker/Datetime/DateTime.d.ts +95 -0
- package/ui/Elements/DatePicker/Datetime/DateTime.js +516 -0
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.d.ts +8 -0
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +57 -0
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.d.ts +9 -0
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +16 -0
- package/ui/Elements/DatePicker/Datetime/types.d.ts +61 -0
- package/ui/Elements/DatePicker/Datetime/types.js +7 -0
- package/ui/Elements/DatePicker/Datetime/views/DaysView.d.ts +14 -0
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +145 -0
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.d.ts +10 -0
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +111 -0
- package/ui/Elements/DatePicker/Datetime/views/YearsView.d.ts +15 -0
- package/ui/Elements/DatePicker/Datetime/views/YearsView.js +117 -0
- package/ui/Elements/DatePicker/index.d.ts +2 -0
- package/ui/Elements/DatePicker/index.js +2 -0
- package/ui/Elements/DatePicker/styles.d.ts +2 -0
- package/ui/Elements/DatePicker/styles.js +8 -0
- package/ui/Elements/DropdownMenu/DropdownMenu.d.ts +2 -0
- package/ui/Elements/DropdownMenu/DropdownMenu.js +36 -0
- package/ui/Elements/DropdownMenu/components/DefaultItem.d.ts +3 -0
- package/ui/Elements/DropdownMenu/components/DefaultItem.js +16 -0
- package/ui/Elements/DropdownMenu/components/MenuItem.d.ts +3 -0
- package/ui/Elements/DropdownMenu/components/MenuItem.js +51 -0
- package/ui/Elements/DropdownMenu/components/MenuList.d.ts +3 -0
- package/ui/Elements/DropdownMenu/components/MenuList.js +10 -0
- package/ui/Elements/DropdownMenu/index.d.ts +1 -0
- package/ui/Elements/DropdownMenu/index.js +1 -0
- package/ui/Elements/DropdownMenu/types.d.ts +41 -0
- package/ui/Elements/DropdownMenu/types.js +1 -0
- package/ui/Elements/DropdownSelect/DropdownSelect.d.ts +21 -0
- package/ui/Elements/DropdownSelect/DropdownSelect.js +47 -0
- package/ui/Elements/DropdownSelect/index.d.ts +4 -0
- package/ui/Elements/DropdownSelect/index.js +3 -0
- package/ui/Elements/HighlightBox/HighlightBox.d.ts +50 -0
- package/ui/Elements/HighlightBox/HighlightBox.js +65 -0
- package/ui/Elements/HighlightBox/index.d.ts +2 -0
- package/ui/Elements/HighlightBox/index.js +2 -0
- package/ui/Elements/Icon/icons/Company.d.ts +3 -0
- package/ui/Elements/Icon/icons/Company.js +13 -0
- package/ui/Elements/Icon/icons/Integrations.d.ts +3 -0
- package/ui/Elements/Icon/icons/Integrations.js +13 -0
- package/ui/Elements/Icon/icons/ShoppingBag.d.ts +3 -0
- package/ui/Elements/Icon/icons/ShoppingBag.js +13 -0
- package/ui/Elements/Icon/icons/Truck.d.ts +3 -0
- package/ui/Elements/Icon/icons/Truck.js +13 -0
- package/ui/Elements/Icon/icons/TwoUsers.d.ts +3 -0
- package/ui/Elements/Icon/icons/TwoUsers.js +13 -0
- package/ui/Elements/Icon/icons/index.d.ts +5 -0
- package/ui/Elements/Icon/icons/index.js +5 -0
- package/ui/Elements/MultiSelect/MultiSelect.d.ts +6 -0
- package/ui/Elements/MultiSelect/MultiSelect.js +29 -0
- package/ui/Elements/MultiSelect/index.d.ts +2 -0
- package/ui/Elements/MultiSelect/index.js +2 -0
- package/ui/Elements/Pagination/Pagination.d.ts +4 -3
- package/ui/Elements/Pagination/Pagination.js +11 -3
- package/ui/Elements/Pagination/stories/Pagination.stories.d.ts +1 -1
- package/ui/Elements/Pagination/styled.js +6 -6
- package/ui/Elements/Select/Select.d.ts +3 -0
- package/ui/Elements/Select/Select.js +69 -0
- package/ui/Elements/Select/index.d.ts +2 -0
- package/ui/Elements/Select/index.js +2 -0
- package/ui/Elements/Select/styles.d.ts +5 -0
- package/ui/Elements/Select/styles.js +12 -0
- package/ui/Elements/Select/themes/CustomComponents.d.ts +8 -0
- package/ui/Elements/Select/themes/CustomComponents.js +125 -0
- package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
- package/ui/Elements/Select/themes/baseStyles.js +87 -0
- package/ui/Elements/Select/themes/formStyles.d.ts +24 -0
- package/ui/Elements/Select/themes/formStyles.js +102 -0
- package/ui/Elements/Select/themes/index.d.ts +3 -0
- package/ui/Elements/Select/themes/index.js +43 -0
- package/ui/Elements/Select/types.d.ts +55 -0
- package/ui/Elements/Select/types.js +1 -0
- package/ui/Elements/SingleSelect/SingleSelect.d.ts +20 -0
- package/ui/Elements/SingleSelect/SingleSelect.js +197 -0
- package/ui/Elements/SingleSelect/index.d.ts +2 -0
- package/ui/Elements/SingleSelect/index.js +2 -0
- package/ui/Elements/Toggle/Toggle.d.ts +1 -1
- package/ui/Elements/Toggle/Toggle.js +2 -2
- package/ui/Elements/Toggle/stories/Toggle.stories.d.ts +1 -1
- package/ui/Elements/Toggle/types.d.ts +1 -0
- package/ui/Forms/Input/types.d.ts +2 -2
- package/ui/Forms/TextArea/TextArea.d.ts +20 -0
- package/ui/Forms/TextArea/TextArea.js +34 -0
- package/ui/Forms/TextArea/index.d.ts +2 -0
- package/ui/Forms/TextArea/index.js +2 -0
- package/ui/Forms/TextArea/styles.d.ts +12 -0
- package/ui/Forms/TextArea/styles.js +31 -0
- package/ui/ThemeProvider/ThemeProvider.d.ts +3 -1
- package/ui/ThemeProvider/ThemeProvider.js +4 -2
- package/ui/ThemeProvider/types.d.ts +1 -0
- package/ui/index.d.ts +17 -1
- package/ui/index.es.js +42462 -8524
- package/ui/index.js +17 -1
- package/ui/index.umd.js +1647 -270
- package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +0 -12
- package/ui/Blocks/CommonGrid/CommonGridContext.js +0 -45
- package/ui/Blocks/CommonGrid/components/ActionColumnHead.d.ts +0 -4
- package/ui/Blocks/CommonGrid/components/ActionColumnHead.js +0 -16
- package/ui/Blocks/CommonGrid/components/ButtonStrip.d.ts +0 -7
- package/ui/Blocks/CommonGrid/components/ButtonStrip.js +0 -35
- package/ui/Blocks/CommonGrid/components/ConfigForm.d.ts +0 -9
- package/ui/Blocks/CommonGrid/components/ConfigForm.js +0 -58
- package/ui/Blocks/CommonGrid/components/DefaultPaginator.d.ts +0 -3
- package/ui/Blocks/CommonGrid/components/DefaultPaginator.js +0 -11
- package/ui/Blocks/CommonGrid/components/Dialog.d.ts +0 -11
- package/ui/Blocks/CommonGrid/components/Dialog.js +0 -19
- package/ui/Blocks/CommonGrid/components/DropdownMenu.d.ts +0 -21
- package/ui/Blocks/CommonGrid/components/DropdownMenu.js +0 -59
- package/ui/Blocks/CommonGrid/components/DropdownSelect.d.ts +0 -15
- package/ui/Blocks/CommonGrid/components/DropdownSelect.js +0 -35
- package/ui/Blocks/CommonGrid/components/FloatingButton.d.ts +0 -6
- package/ui/Blocks/CommonGrid/components/FloatingButton.js +0 -13
- package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +0 -2
- package/ui/Blocks/CommonGrid/hooks/useControlButtons.d.ts +0 -10
- package/ui/Blocks/CommonGrid/hooks/useControlButtons.js +0 -64
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +0 -13
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +0 -49
- package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +0 -2
- package/ui/Blocks/CommonGrid/storybook/utils/filters.js +0 -23
- package/ui/Blocks/CommonGrid/utils/public.d.ts +0 -16
- package/ui/Blocks/CommonGrid/utils/public.js +0 -52
|
@@ -1,74 +1,10 @@
|
|
|
1
|
-
import CommonGrid from './
|
|
1
|
+
import CommonGrid from './CommonGridContainer';
|
|
2
2
|
import withReduxActions from './HoC/withReduxActions';
|
|
3
3
|
import reducer, { actionPrefix, createActions, createSelectors, createFullSelector, actionTypes } from './store';
|
|
4
|
+
import useFloatingButton from './hooks/useFloatingButton';
|
|
4
5
|
import * as Types from './types';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
actionPrefix: string;
|
|
11
|
-
actionTypes: {
|
|
12
|
-
init: string;
|
|
13
|
-
clearUxState: string;
|
|
14
|
-
handleUxChange: string;
|
|
15
|
-
openConfigForm: string;
|
|
16
|
-
closeConfigForm: string;
|
|
17
|
-
setColumnConfig: string;
|
|
18
|
-
setPage: string;
|
|
19
|
-
setRowsPerPage: string;
|
|
20
|
-
resetFilters: string;
|
|
21
|
-
addFilter: string;
|
|
22
|
-
addSorting: string;
|
|
23
|
-
clearSettings: string;
|
|
24
|
-
resetGrid: string;
|
|
25
|
-
setColumnWidth: string;
|
|
26
|
-
setColumnsOrder: string;
|
|
27
|
-
};
|
|
28
|
-
createActions: (gridName: string) => {
|
|
29
|
-
init: (initProps: Types.InitProps) => Action;
|
|
30
|
-
clearUxState: () => Action;
|
|
31
|
-
handleUxChange: (uxKey: keyof Types.UxState, uxValue: any) => Action;
|
|
32
|
-
openConfigForm: () => Action;
|
|
33
|
-
closeConfigForm: () => Action;
|
|
34
|
-
setColumnConfig: (columnConfig: Types.ColumnConfig) => Action;
|
|
35
|
-
setPage: (page: number) => Action;
|
|
36
|
-
setColumnWidth: (columnsWidth: {
|
|
37
|
-
[anyKey: string]: number;
|
|
38
|
-
} | null, columnLayout: "normal" | "sticky" | "no-scroll") => Action;
|
|
39
|
-
resetGrid: () => Action;
|
|
40
|
-
setColumnsOrder: (columnsOrder: string[]) => Action;
|
|
41
|
-
setRowsPerPage: (rowsPerPage: number) => Action;
|
|
42
|
-
resetFilters: () => Action;
|
|
43
|
-
addFilter: (column: string, value: any, filterProps: Types.FilterProps) => Action;
|
|
44
|
-
addSorting: (column: string, direction: Types.SortingValueType) => Action;
|
|
45
|
-
clearSettings: () => Action;
|
|
46
|
-
};
|
|
47
|
-
createSelectors: (gridName: string) => {
|
|
48
|
-
getUxState: (state: {}) => Types.UxState;
|
|
49
|
-
isConfigFormOpen: (state: {}) => boolean;
|
|
50
|
-
getColumnConfig: (state: {}) => Types.ColumnConfig;
|
|
51
|
-
getPage: (state: {}) => number;
|
|
52
|
-
getRowsPerPage: (state: {}) => number;
|
|
53
|
-
getFilter: (state: {}) => {
|
|
54
|
-
[column: string]: {
|
|
55
|
-
value: any;
|
|
56
|
-
filterProps: Types.FilterProps;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
getSorting: (state: {}) => {
|
|
60
|
-
column: string;
|
|
61
|
-
direction: Types.SortingValueType;
|
|
62
|
-
}[];
|
|
63
|
-
getColumnsWidth: (state: {}) => {
|
|
64
|
-
[anyKey: string]: number;
|
|
65
|
-
};
|
|
66
|
-
getColumnsWidthVariant: (state: {}) => string | undefined;
|
|
67
|
-
getColumnsOrder: (state: {}) => string[];
|
|
68
|
-
};
|
|
69
|
-
createFullSelector: (gridName: string) => (state: {}) => Types.GridSelectorsType;
|
|
70
|
-
Types: typeof Types;
|
|
71
|
-
utils: typeof utils;
|
|
72
|
-
};
|
|
73
|
-
export default _default;
|
|
74
|
-
export { CommonGrid, withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, utils };
|
|
6
|
+
export * from './StandardButtons';
|
|
7
|
+
export * from './components/gridCells';
|
|
8
|
+
import { useAddFilter } from './hooks/useAddFilter';
|
|
9
|
+
export default CommonGrid;
|
|
10
|
+
export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, useFloatingButton, useAddFilter, };
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import CommonGrid from './
|
|
1
|
+
import CommonGrid from './CommonGridContainer';
|
|
2
2
|
import withReduxActions from './HoC/withReduxActions';
|
|
3
3
|
import reducer, { actionPrefix, createActions, createSelectors, createFullSelector, actionTypes } from './store';
|
|
4
|
+
import useFloatingButton from './hooks/useFloatingButton';
|
|
4
5
|
import * as Types from './types';
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
actionPrefix: actionPrefix,
|
|
11
|
-
actionTypes: actionTypes,
|
|
12
|
-
createActions: createActions,
|
|
13
|
-
createSelectors: createSelectors,
|
|
14
|
-
createFullSelector: createFullSelector,
|
|
15
|
-
Types: Types,
|
|
16
|
-
utils: utils
|
|
17
|
-
};
|
|
18
|
-
export { CommonGrid, withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, utils };
|
|
6
|
+
export * from './StandardButtons';
|
|
7
|
+
export * from './components/gridCells';
|
|
8
|
+
import { useAddFilter } from './hooks/useAddFilter';
|
|
9
|
+
export default CommonGrid;
|
|
10
|
+
export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, useFloatingButton, useAddFilter, };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReduxGrid, createRandomData, enumValues, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { onRowEditClick, onRowReadClick, onRowAction, onBatchAction } from '../utils/actions';
|
|
5
|
-
import {
|
|
6
|
-
import { useAddFilter } from '../../utils/public';
|
|
5
|
+
import { useAddFilter } from '../../hooks/useAddFilter';
|
|
7
6
|
import withReduxActions from '../../HoC/withReduxActions';
|
|
8
7
|
import { columnDefinitions, enumColumn } from '../utils/columnDefinition';
|
|
9
8
|
import withRedux from '../utils/withRedux';
|
|
9
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
10
10
|
var ActionColumnButtons = {
|
|
11
11
|
flexBasis: 160,
|
|
12
12
|
canRowRead: true,
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
title: '@Blocks/CommonGrid',
|
|
26
26
|
decorators: [withRedux],
|
|
27
27
|
};
|
|
28
|
-
export var ComplexWithPaginationAndRedux = function () { return (_jsxs(
|
|
28
|
+
export var ComplexWithPaginationAndRedux = function () { return (_jsxs(LinguiContainer, { children: [_jsx(ConnectedFilterSetter, { gridActions: gridDummyActions }), _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, actionColumnDefinition: ActionColumnButtons, rowsData: createRandomData(10), onRowAction: onRowAction, onRowReadClick: onRowReadClick, onRowEditClick: onRowEditClick, totalRowsCount: 200, onBatchAction: onBatchAction, confirmOnReset: function () { return window.confirm('Are you sure you want to reset grid?'); } })] })); };
|
|
29
29
|
ComplexWithPaginationAndRedux.story = {
|
|
30
30
|
name: 'Complex, with pagination and redux',
|
|
31
31
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import CommonGrid from '../../
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
3
3
|
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
5
|
import withTheme from '../utils/withTheme';
|
|
6
6
|
import withRouter from '../utils/withRouter';
|
|
7
7
|
import withRedux from '../utils/withRedux';
|
|
8
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
8
9
|
export default {
|
|
9
10
|
title: '@Blocks/CommonGrid',
|
|
10
11
|
decorators: [withTheme, withRouter, withRedux],
|
|
11
12
|
};
|
|
12
13
|
export var Default = function () {
|
|
13
|
-
return (_jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridActions: gridDummyActions, gridSelectors: gridSelectors }));
|
|
14
|
+
return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridActions: gridDummyActions, gridSelectors: gridSelectors }) }));
|
|
14
15
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import CommonGrid from '../../
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
3
3
|
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
5
6
|
export default {
|
|
6
7
|
title: '@Blocks/CommonGrid',
|
|
7
8
|
};
|
|
8
|
-
export var LoadingState = function () { return (_jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridSelectors: gridSelectors, gridActions: gridDummyActions, isLoading: true, hideColumnConfig: true })); };
|
|
9
|
+
export var LoadingState = function () { return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridSelectors: gridSelectors, gridActions: gridDummyActions, isLoading: true, hideColumnConfig: true }) })); };
|
|
9
10
|
LoadingState.story = {
|
|
10
11
|
name: 'Loading state',
|
|
11
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import CommonGrid from '../../
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
3
3
|
import { createOversizedRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { oversizedColumnDefinition } from '../utils/columnDefinition';
|
|
5
|
-
import {
|
|
5
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
6
6
|
export default {
|
|
7
7
|
title: '@Blocks/CommonGrid',
|
|
8
8
|
};
|
|
9
|
-
export var ManyColumnsNoScrollLayout = function () { return (_jsx(CommonGrid, { rowsData: createOversizedRandomData(5),
|
|
9
|
+
export var ManyColumnsNoScrollLayout = function () { return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { rowsData: createOversizedRandomData(5), columnsDefinitions: oversizedColumnDefinition, columnLayout: "no-scroll", hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions }) })); };
|
|
10
10
|
ManyColumnsNoScrollLayout.story = {
|
|
11
11
|
name: 'many columns no-scroll layout',
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import CommonGrid from '../../
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
3
3
|
import { createOversizedRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { oversizedColumnDefinition } from '../utils/columnDefinition';
|
|
5
|
-
import {
|
|
5
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
6
6
|
export default {
|
|
7
7
|
title: '@Blocks/CommonGrid',
|
|
8
8
|
};
|
|
9
|
-
export var ManyColumnsNormalLayoutANoControls = function () { return (_jsx(CommonGrid, { rowsData: createOversizedRandomData(5),
|
|
9
|
+
export var ManyColumnsNormalLayoutANoControls = function () { return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { rowsData: createOversizedRandomData(5), columnsDefinitions: oversizedColumnDefinition, hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions }) })); };
|
|
10
10
|
ManyColumnsNormalLayoutANoControls.story = {
|
|
11
11
|
name: 'many columns normal layout a no controls',
|
|
12
12
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ReduxGrid, createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
3
|
-
import { filters } from '../utils/filters';
|
|
4
3
|
import { onRowAction } from '../utils/actions';
|
|
5
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
6
5
|
import withTheme from '../utils/withTheme';
|
|
7
6
|
import withRouter from '../utils/withRouter';
|
|
8
7
|
import withRedux from '../utils/withRedux';
|
|
8
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
9
9
|
export default {
|
|
10
10
|
title: '@Blocks/CommonGrid',
|
|
11
11
|
decorators: [withTheme, withRouter, withRedux],
|
|
12
12
|
};
|
|
13
13
|
export var Styled = function () {
|
|
14
|
-
return (_jsx("div", { className: "styled", children: _jsx(ReduxGrid, {
|
|
14
|
+
return (_jsx(LinguiContainer, { children: _jsx("div", { className: "styled", children: _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridActions: gridDummyActions, gridSelectors: gridSelectors }) }) }));
|
|
15
15
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import CommonGrid from '../../
|
|
2
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
3
3
|
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
5
|
import { onRowAction } from '../utils/actions';
|
|
6
|
-
import {
|
|
6
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
7
7
|
export default {
|
|
8
8
|
title: '@Blocks/CommonGrid',
|
|
9
9
|
};
|
|
10
10
|
export var WithCustomGridActions = function () {
|
|
11
|
-
return (_jsx(
|
|
11
|
+
return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridSelectors: gridSelectors, gridActions: gridDummyActions, hideColumnConfig: true }) }));
|
|
12
12
|
};
|
|
13
13
|
WithCustomGridActions.story = {
|
|
14
14
|
name: 'With custom grid actions',
|
|
@@ -3,6 +3,7 @@ import { ReduxGrid, createRandomData } from '../utils/utils';
|
|
|
3
3
|
import { onRowEditClick, onRowReadClick, onRowAction } from '../utils/actions';
|
|
4
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
5
|
import withRedux from '../utils/withRedux';
|
|
6
|
+
import { LinguiContainer } from '../utils/linguiContainer';
|
|
6
7
|
export var ActionColumnCheckboxes = {
|
|
7
8
|
flexBasis: 160,
|
|
8
9
|
forceCheckboxes: true,
|
|
@@ -18,7 +19,7 @@ export default {
|
|
|
18
19
|
decorators: [withRedux],
|
|
19
20
|
excludeStories: ['ActionColumnCheckboxes'],
|
|
20
21
|
};
|
|
21
|
-
export var WithForcedCheckboxesAndCustomTitle = function () { return (_jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, actionColumnDefinition: ActionColumnCheckboxes, rowsData: createRandomData(10), onRowAction: onRowAction, onRowReadClick: onRowReadClick, onRowEditClick: onRowEditClick, totalRowsCount: 200, components: components })); };
|
|
22
|
+
export var WithForcedCheckboxesAndCustomTitle = function () { return (_jsx(LinguiContainer, { children: _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, actionColumnDefinition: ActionColumnCheckboxes, rowsData: createRandomData(10), onRowAction: onRowAction, onRowReadClick: onRowReadClick, onRowEditClick: onRowEditClick, totalRowsCount: 200, components: components }) })); };
|
|
22
23
|
WithForcedCheckboxesAndCustomTitle.story = {
|
|
23
24
|
name: 'With forced checkboxes and custom title',
|
|
24
25
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LinguiContainer: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { i18n } from '@lingui/core';
|
|
3
|
+
import { I18nProvider } from '@lingui/react';
|
|
4
|
+
export var LinguiContainer = function (_a) {
|
|
5
|
+
var children = _a.children;
|
|
6
|
+
i18n.activate('en');
|
|
7
|
+
return _jsx(I18nProvider, { i18n: i18n, children: children });
|
|
8
|
+
};
|
|
@@ -14,7 +14,7 @@ import React from 'react';
|
|
|
14
14
|
import faker from 'faker';
|
|
15
15
|
import { rowClassSymbol } from '../../types';
|
|
16
16
|
import withReduxActions from '../../HoC/withReduxActions';
|
|
17
|
-
import CommonGrid from '../../
|
|
17
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
18
18
|
export var enumValues = ['option A', 'option B', 'option C'];
|
|
19
19
|
export var oversizedArrayColumns = 25;
|
|
20
20
|
export var gridSelectors = {};
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import Theme from '@designSystem/Theme'
|
|
4
|
-
import Normalize, { NormalizeBaseFonts } from '@designSystem/Normalize'
|
|
5
|
-
|
|
6
|
-
const withProvider = (story: Function): JSX.Element => (
|
|
7
|
-
<Theme>
|
|
8
|
-
<Normalize />
|
|
9
|
-
<NormalizeBaseFonts />
|
|
10
|
-
{story()}
|
|
11
|
-
</Theme>
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
export default withProvider
|
|
15
|
-
*/
|
|
16
|
-
// @TODO do theme
|
|
17
|
-
var withProvider = function (story) { return (story()); };
|
|
1
|
+
var withProvider = function (story) { return story(); };
|
|
18
2
|
export default withProvider;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BottomWrapper: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme> & {
|
|
3
|
+
isFixed?: boolean | undefined;
|
|
4
|
+
}, "color">;
|
|
5
|
+
export declare const ContentContainer: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
|
|
6
|
+
export declare const CommonGridWrap: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
|
|
7
|
+
export declare const StyledButtonStrip: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
|
|
8
|
+
export declare const StyledColumnButton: import("styled-components").StyledComponent<({ isLoading, loadingText, icon, appearance, disabled, sizing, buttonRef, onClick, fullWidth, ...props }: import("../../Elements/Button/types").Props) => JSX.Element, import("@xstyled/system").Theme, {}, never>;
|
|
9
|
+
export declare const CommonGridWithStyles: import("styled-components").StyledComponent<({ filters, gridSelectors, gridActions, isLoading, rowsData, hasColouredRows, columnsDefinitions, actionColumnDefinition, allowRowSelect, allowRowSelectOnAction, onRowAction, onRowEditClick, onRowReadClick, onRowClick, columnLayout, hideColumnConfig, className, gridRef, minColumnWidth, errorMessage, floatingButtonProps, }: import("./types").CommonGridProps & {
|
|
10
|
+
filters?: import("./types").FiltersConfig | undefined;
|
|
11
|
+
}) => JSX.Element, import("@xstyled/system").Theme, {
|
|
12
|
+
onRowClick?: Function | undefined;
|
|
13
|
+
height?: number | undefined;
|
|
14
|
+
}, never>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled, { x } from '@xstyled/styled-components';
|
|
6
|
+
import { th } from '@xstyled/system';
|
|
7
|
+
import { Button } from '../../Elements/Button';
|
|
8
|
+
import CommonGrid from './CommonGrid';
|
|
9
|
+
export var BottomWrapper = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-bottom: 11px;\n padding-top: 10px;\n position: ", ";\n bottom: 0;\n left: 0;\n width: 100%;\n background-color: ", ";\n @media (min-width: 1024px) {\n position: relative;\n padding-bottom: 11px;\n margin-bottom: 0;\n }\n & > * {\n @media (min-width: 1024px) {\n justify-content: flex-end;\n }\n }\n"], ["\n padding-bottom: 11px;\n padding-top: 10px;\n position: ", ";\n bottom: 0;\n left: 0;\n width: 100%;\n background-color: ", ";\n @media (min-width: 1024px) {\n position: relative;\n padding-bottom: 11px;\n margin-bottom: 0;\n }\n & > * {\n @media (min-width: 1024px) {\n justify-content: flex-end;\n }\n }\n"])), function (_a) {
|
|
10
|
+
var isFixed = _a.isFixed;
|
|
11
|
+
return (isFixed ? 'fixed' : 'relative');
|
|
12
|
+
}, function (_a) {
|
|
13
|
+
var isFixed = _a.isFixed, theme = _a.theme;
|
|
14
|
+
return (isFixed ? theme.colors.bgLightGray : 'transparent');
|
|
15
|
+
});
|
|
16
|
+
export var ContentContainer = styled(x.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: white;\n box-shadow: gridShadow;\n border-radius: 8px;\n flex-grow: 1;\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: white;\n box-shadow: gridShadow;\n border-radius: 8px;\n flex-grow: 1;\n"])));
|
|
17
|
+
export var CommonGridWrap = styled(x.div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 1;\n"], ["\n flex-grow: 1;\n"])));
|
|
18
|
+
export var StyledButtonStrip = styled(x.div)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: relative;\n padding: 18px 20px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n flex-wrap: wrap;\n z-index: 2;\n border-bottom: 0.5px solid ", ";\n"], ["\n position: relative;\n padding: 18px 20px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n flex-wrap: wrap;\n z-index: 2;\n border-bottom: 0.5px solid ", ";\n"])), th('colors.lightGray6'));
|
|
19
|
+
export var StyledColumnButton = styled(Button)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: sticky;\n right: 20px;\n > span > svg {\n stroke: ", ";\n width: 18px;\n height: 18px;\n }\n > span > H6 {\n display: none;\n }\n @media (min-width: 1024px) {\n > span > H6 {\n display: flex;\n margin-left: 5px;\n }\n }\n"], ["\n position: sticky;\n right: 20px;\n > span > svg {\n stroke: ", ";\n width: 18px;\n height: 18px;\n }\n > span > H6 {\n display: none;\n }\n @media (min-width: 1024px) {\n > span > H6 {\n display: flex;\n margin-left: 5px;\n }\n }\n"])), th('colors.blue2'));
|
|
20
|
+
export var CommonGridWithStyles = styled(CommonGrid)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n & .cell {\n padding: 0 4px;\n }\n & .dataRow {\n font-size: 12px;\n font-family: ", ";\n color: typoPrimary;\n font-weight: normal;\n border-bottom: 1px solid;\n border-color: lightGray3;\n height: 40px;\n }\n & .gridHead {\n background-color: neutral20;\n padding-bottom: 8px;\n position: sticky;\n top: -1px;\n z-index: 1;\n padding-left: 20px;\n }\n & .headRow {\n font-size: 12px;\n font-family: ", ";\n color: typoPrimary;\n font-weight: bold;\n border-bottom: none; // TODO fix in common-grid\n\n & .cell {\n overflow: hidden;\n position: relative;\n }\n & .sticky {\n background-color: #fafbfc;\n }\n }\n & .filterRow {\n & .cell {\n overflow: visible;\n }\n & .cell > div {\n width: 100%; // TODO fix in common-grid\n }\n & .sticky {\n background-color: #fafbfc;\n }\n border-bottom: none; // TODO fix in common-grid\n }\n & .body {\n margin: 0 1px 1px 1px; // matching margin with .gridHead\n padding-left: 20px;\n flex-grow: 1;\n }\n & .gridWrapper {\n background-color: ", ";\n width: ", ";\n padding-bottom: ", ";\n\n @media (min-width: 1024px) {\n height: ", ";\n width: auto;\n padding-bottom: 0;\n }\n @media print {\n margin: 0;\n width: 100%;\n height: auto;\n overflow-x: hidden;\n }\n }\n\n & .fullWidthGrid > .gridWrapper > div {\n width: 100% !important;\n }\n\n & .paginatorWrapper,\n & .buttonsStrip {\n @media print {\n display: none;\n }\n }\n & .cell {\n padding-left: 2px;\n padding-right: 2px;\n @media print {\n white-space: unset;\n }\n }\n\n .dataRow {\n &.grayedOut {\n background: lightGray1;\n }\n & .sticky {\n background-color: #fff;\n :hover {\n background-color: #fdf4f3;\n }\n }\n .sticky-right {\n border-left: 1px solid #dfe1e6;\n }\n .sticky-left {\n border-right: 1px solid #dfe1e6;\n }\n\n &.selected,\n &.selected > .sticky {\n background-color: #fdf4f3;\n }\n\n :hover {\n background-color: #fdf4f3;\n\n .sticky {\n background-color: #fdf4f3;\n }\n }\n }\n\n @media print {\n .filterRow .sticky {\n display: none;\n }\n\n .headRow .sticky {\n display: none;\n }\n\n .dataRow .sticky {\n display: none;\n }\n }\n\n .resizer {\n z-index: unset;\n }\n\n // hotfix table head\n .cell .sortable {\n display: flex;\n align-items: center;\n padding-right: 2px;\n }\n\n .sticky {\n position: sticky !important;\n max-width: 88px;\n }\n\n .sticky-left {\n left: 0;\n }\n\n .sticky-right {\n right: 0;\n }\n"], ["\n & .cell {\n padding: 0 4px;\n }\n & .dataRow {\n font-size: 12px;\n font-family: ", ";\n color: typoPrimary;\n font-weight: normal;\n border-bottom: 1px solid;\n border-color: lightGray3;\n height: 40px;\n }\n & .gridHead {\n background-color: neutral20;\n padding-bottom: 8px;\n position: sticky;\n top: -1px;\n z-index: 1;\n padding-left: 20px;\n }\n & .headRow {\n font-size: 12px;\n font-family: ", ";\n color: typoPrimary;\n font-weight: bold;\n border-bottom: none; // TODO fix in common-grid\n\n & .cell {\n overflow: hidden;\n position: relative;\n }\n & .sticky {\n background-color: #fafbfc;\n }\n }\n & .filterRow {\n & .cell {\n overflow: visible;\n }\n & .cell > div {\n width: 100%; // TODO fix in common-grid\n }\n & .sticky {\n background-color: #fafbfc;\n }\n border-bottom: none; // TODO fix in common-grid\n }\n & .body {\n margin: 0 1px 1px 1px; // matching margin with .gridHead\n padding-left: 20px;\n flex-grow: 1;\n }\n & .gridWrapper {\n background-color: ", ";\n width: ", ";\n padding-bottom: ", ";\n\n @media (min-width: 1024px) {\n height: ", ";\n width: auto;\n padding-bottom: 0;\n }\n @media print {\n margin: 0;\n width: 100%;\n height: auto;\n overflow-x: hidden;\n }\n }\n\n & .fullWidthGrid > .gridWrapper > div {\n width: 100% !important;\n }\n\n & .paginatorWrapper,\n & .buttonsStrip {\n @media print {\n display: none;\n }\n }\n & .cell {\n padding-left: 2px;\n padding-right: 2px;\n @media print {\n white-space: unset;\n }\n }\n\n .dataRow {\n &.grayedOut {\n background: lightGray1;\n }\n & .sticky {\n background-color: #fff;\n :hover {\n background-color: #fdf4f3;\n }\n }\n .sticky-right {\n border-left: 1px solid #dfe1e6;\n }\n .sticky-left {\n border-right: 1px solid #dfe1e6;\n }\n\n &.selected,\n &.selected > .sticky {\n background-color: #fdf4f3;\n }\n\n :hover {\n background-color: #fdf4f3;\n\n .sticky {\n background-color: #fdf4f3;\n }\n }\n }\n\n @media print {\n .filterRow .sticky {\n display: none;\n }\n\n .headRow .sticky {\n display: none;\n }\n\n .dataRow .sticky {\n display: none;\n }\n }\n\n .resizer {\n z-index: unset;\n }\n\n // hotfix table head\n .cell .sortable {\n display: flex;\n align-items: center;\n padding-right: 2px;\n }\n\n .sticky {\n position: sticky !important;\n max-width: 88px;\n }\n\n .sticky-left {\n left: 0;\n }\n\n .sticky-right {\n right: 0;\n }\n"])), th('fonts.primary'), th('fonts.primary'), function (_a) {
|
|
21
|
+
var theme = _a.theme;
|
|
22
|
+
return theme.colors.white;
|
|
23
|
+
}, function (_a) {
|
|
24
|
+
var height = _a.height;
|
|
25
|
+
return (height ? 'fit-content' : 'auto');
|
|
26
|
+
}, function (_a) {
|
|
27
|
+
var height = _a.height;
|
|
28
|
+
return (height ? '35px' : '0');
|
|
29
|
+
}, function (_a) {
|
|
30
|
+
var height = _a.height;
|
|
31
|
+
return (height ? "".concat(height, "px") : '475px');
|
|
32
|
+
});
|
|
33
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Trans } from '@lingui/react';
|
|
3
|
+
/** catalog for lungui to track commonGrid translations - DO NOT REMOVE */
|
|
4
|
+
var Translations = function () {
|
|
5
|
+
return (_jsxs(_Fragment, { children: [_jsx(Trans, { id: "dataGrid.status.loadingData", message: "... loading data ..." }), _jsx(Trans, { id: "dataGrid.status.noDataFound", message: "No data found." }), _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset filters" }), _jsx(Trans, { id: "dataGrid.buttonClearConfig", message: "Reset config" }), _jsx(Trans, { id: "dataGrid.buttonGridConfig", message: "Configure columns" }), _jsx(Trans, { id: "dataGrid.config.title", message: "Configure columns" }), _jsx(Trans, { id: "dataGrid.config.buttonReset", message: "Reset all" }), _jsx(Trans, { id: "dataGrid.resultsPerPage", message: "Results per page" }), _jsx(Trans, { id: "manageColumn.title", message: "Manage column" }), _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset filters" }), _jsx(Trans, { id: "form.buttonCancel", message: "Cancel" }), _jsx(Trans, { id: "form.buttonConfirm", message: "Confirm" }), ",", _jsx(Trans, { id: "dataGrid.actionOptions.createNew", message: "Create new" }), ",", _jsx(Trans, { id: "form.buttonImport", message: "Import" }), ",", _jsx(Trans, { id: "dataGrid.actionOptions.export", message: "Export" }), ",", _jsx(Trans, { id: "form.buttonConfirm", message: "Confirm" }), ",", _jsx(Trans, { id: "dataGrid.actionOptions.createNew", message: "Create new" }), ",", _jsx(Trans, { id: "dataGrid.checkAll", message: "Check all" }), ",", _jsx(Trans, { id: "datagrid.filterCell.selectAllLabel", message: "select all" }), _jsx(Trans, { id: "datagrid.filterCell.optionsSelectedLabel", message: '{count} options' }), ",", _jsx(Trans, { id: "dataGrid.deleteItem", message: "Delete" }), ",", _jsx(Trans, { id: "dataGrid.columnLot.NA", message: "N/A" }), ",", _jsx(Trans, { id: "dataGrid.buttonActions", message: "Actions" }), ",", _jsx(Trans, { id: "dataGrid.errors.ipValidationError", message: "Value is not valid ip" }), ",", _jsx(Trans, { id: "dataGrid.columnActive.filterOptions.all", message: "All" }), ",", _jsx(Trans, { id: "dataGrid.columnActive.filterOptions.yes", message: "Yes" }), ",", _jsx(Trans, { id: "dataGrid.columnActive.filterOptions.no", message: "No" }), _jsx(Trans, { id: "products.eshopFilterPlaceholder", message: "Select eshop..." }), ",", _jsx(Trans, { id: "dataGrid.checkedRowsCount", message: "Selected {checkedRowsCount} items" }), ",", _jsx(Trans, { id: "dataGrid.filterCell", message: "Type to filter" }), ",", _jsx(Trans, { id: "dataGrid.filterCell.from", message: "From" }), ",", _jsx(Trans, { id: "dataGrid.filterCell.to", message: "To" }), ",", _jsx(Trans, { id: "manageColumn.searchPlaceholder", message: "Find column..." }), ",", _jsx(Trans, { id: "dataGrid.comparator.equals", message: "Equals" }), ",", _jsx(Trans, { id: "dataGrid.comparator.notEquals", message: "Not equal" }), ",", _jsx(Trans, { id: "dataGrid.comparator.lessThan", message: "Less than" }), ",", _jsx(Trans, { id: "dataGrid.comparator.lessThanOrEquals", message: "Less than or equals" }), ",", _jsx(Trans, { id: "dataGrid.comparator.greaterThan", message: "Greater than" }), ",", _jsx(Trans, { id: "dataGrid.comparator.greaterThanOrEquals", message: "Greater than or equal" }), ",", _jsx(Trans, { id: "dataGrid.comparator.contains", message: "Contains" }), ",", _jsx(Trans, { id: "dataGrid.comparator.notContains", message: "Not contains" }), ",", _jsx(Trans, { id: "dataGrid.comparator.startsWith", message: "Starts with'" }), ",", _jsx(Trans, { id: "dataGrid.comparator.endsWith", message: "Ends with" }), ",", _jsx(Trans, { id: "select.noOptions", message: "no options" }), ",", _jsx(Trans, { id: "components.dropdown.loading", message: "Loading..." }), ",", _jsx(Trans, { id: "components.dropdown.placeholder", message: "Select..." }), ",", _jsx(Trans, { id: "components.dropdown.notReact", message: "Select related values first..." }), ",", _jsx(Trans, { id: "components.dropdown.writeMoreChars", message: "Write at least ${asyncLoadMinChars} characters." }), ",", _jsx(Trans, { id: "components.dropdown.noOptions", message: "No options" }), ",", _jsx(Trans, { id: "components.dropdown.newOption", message: "new value" }), ",", _jsx(Trans, { id: "form.general.min2Chars", message: "Minimal length is 2 characters." }), ","] }));
|
|
6
|
+
};
|
|
@@ -4,10 +4,6 @@ type Option = {
|
|
|
4
4
|
value: string | number;
|
|
5
5
|
label: string | number;
|
|
6
6
|
};
|
|
7
|
-
type TranslatorPublicInterfaceProps = {
|
|
8
|
-
id?: string;
|
|
9
|
-
defaults?: string;
|
|
10
|
-
};
|
|
11
7
|
type ButtonPublicInterfaceProps = {
|
|
12
8
|
children?: React.ReactNode;
|
|
13
9
|
type?: 'button' | 'submit' | 'reset';
|
|
@@ -44,8 +40,8 @@ export type FilterComponentProps<VT> = {
|
|
|
44
40
|
};
|
|
45
41
|
} | null) => void;
|
|
46
42
|
value: VT | null;
|
|
47
|
-
OverlayComponent
|
|
48
|
-
}
|
|
43
|
+
OverlayComponent?: React.FunctionComponent;
|
|
44
|
+
} & Record<string, any>;
|
|
49
45
|
export type ColumnTitleComponentType = React.ComponentType<{
|
|
50
46
|
title?: string | JSX.Element;
|
|
51
47
|
isSortable: boolean;
|
|
@@ -53,7 +49,7 @@ export type ColumnTitleComponentType = React.ComponentType<{
|
|
|
53
49
|
sortValue: SortingValueType;
|
|
54
50
|
}>;
|
|
55
51
|
export type ComponentsProps = {
|
|
56
|
-
Translator: React.ComponentType<
|
|
52
|
+
Translator: React.ComponentType<any>;
|
|
57
53
|
Checkbox: React.ComponentType<CheckboxPublicInterfaceProps>;
|
|
58
54
|
Button: React.ComponentType<ButtonPublicInterfaceProps>;
|
|
59
55
|
Switch: React.ComponentType<SwitchPublicInterfaceProps>;
|
|
@@ -131,6 +127,7 @@ export type ColumnDefinition<ColumnName extends string = string> = ColumnBasePro
|
|
|
131
127
|
defaultHidden?: boolean;
|
|
132
128
|
sticky?: boolean;
|
|
133
129
|
stickTo?: StickTo;
|
|
130
|
+
passProps?: any;
|
|
134
131
|
};
|
|
135
132
|
export type StickTo = 'left' | 'right';
|
|
136
133
|
type batchAction = {
|
|
@@ -160,6 +157,7 @@ export type DataCellProps<T> = {
|
|
|
160
157
|
rowData: T;
|
|
161
158
|
onRowAction?: (id: string, field: string, value: any) => void | Promise<any>;
|
|
162
159
|
column: ColumnDefinition;
|
|
160
|
+
children?: React.ReactNode;
|
|
163
161
|
};
|
|
164
162
|
type SingleColumnConfig = {
|
|
165
163
|
isHidden?: boolean;
|
|
@@ -240,8 +238,6 @@ export type AsyncFilters = {
|
|
|
240
238
|
[anyColumn: string]: Option[];
|
|
241
239
|
};
|
|
242
240
|
export type CommonGridProps<TData extends RowProps = RowProps> = {
|
|
243
|
-
components?: ComponentsProps;
|
|
244
|
-
filters?: FiltersConfig;
|
|
245
241
|
gridSelectors: GridSelectorsType;
|
|
246
242
|
gridActions: GridActionsType;
|
|
247
243
|
isLoading?: boolean;
|
|
@@ -260,14 +256,13 @@ export type CommonGridProps<TData extends RowProps = RowProps> = {
|
|
|
260
256
|
columnLayout?: ColumnLayout;
|
|
261
257
|
confirmOnReset?: () => boolean;
|
|
262
258
|
hideColumnConfig?: boolean;
|
|
263
|
-
hideAllControls?: boolean;
|
|
264
259
|
className?: string;
|
|
265
260
|
gridRef?: React.MutableRefObject<HTMLElement>;
|
|
266
261
|
minColumnWidth?: number;
|
|
267
262
|
errorMessage?: string;
|
|
268
263
|
extraControlButtons?: ExtraControlButton[];
|
|
269
264
|
perPageOptions?: number[];
|
|
270
|
-
|
|
265
|
+
floatingButtonProps?: FloatingButtonProps;
|
|
271
266
|
};
|
|
272
267
|
export declare enum ExtraControlButtonPosition {
|
|
273
268
|
TopLeft = "top-left",
|
|
@@ -278,13 +273,12 @@ export declare enum ExtraControlButtonPosition {
|
|
|
278
273
|
export type ExtraControlButton = {
|
|
279
274
|
node?: React.ReactNode;
|
|
280
275
|
onClick?: () => void;
|
|
281
|
-
onSelect?: (value: string
|
|
276
|
+
onSelect?: (value: string) => void;
|
|
282
277
|
label?: string | JSX.Element;
|
|
283
278
|
style?: 'primary' | 'secondary';
|
|
284
279
|
options?: {
|
|
285
|
-
label: string
|
|
286
|
-
value
|
|
287
|
-
onClick?: () => void;
|
|
280
|
+
label: string;
|
|
281
|
+
value: string;
|
|
288
282
|
}[];
|
|
289
283
|
position?: ExtraControlButtonPosition;
|
|
290
284
|
hide?: boolean;
|
|
@@ -296,4 +290,24 @@ export type Group = {
|
|
|
296
290
|
start: boolean;
|
|
297
291
|
end: boolean;
|
|
298
292
|
};
|
|
293
|
+
export type GridProps = Omit<CommonGridProps, 'filters'> & {
|
|
294
|
+
optimizeFilters?: boolean;
|
|
295
|
+
eshopSelect?: CommonGridProps['extraControlButtons'];
|
|
296
|
+
processCheckedValues?: () => void;
|
|
297
|
+
processCheckedValuesTitle?: string;
|
|
298
|
+
hideControlButtons?: boolean;
|
|
299
|
+
queryRowsParam?: number | string;
|
|
300
|
+
customPaginationHandler?: (page: number, rows: number) => void;
|
|
301
|
+
};
|
|
302
|
+
export type PageGridProps = Omit<GridProps, 'rowsData' | 'totalRowsCount' | 'columnsDefinitions' | 'actionColumnDefinition' | 'hideColumnConfig' | 'minColumnWidth' | 'columnLayout'>;
|
|
303
|
+
export type Item = {
|
|
304
|
+
label: string | JSX.Element;
|
|
305
|
+
value: string;
|
|
306
|
+
name: string;
|
|
307
|
+
};
|
|
308
|
+
export type FloatingButtonProps = {
|
|
309
|
+
options?: Item[];
|
|
310
|
+
onSelect?: (value: Item['value']) => void;
|
|
311
|
+
onClick?: () => void;
|
|
312
|
+
};
|
|
299
313
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnDefinition, ActionColumn, ColumnConfig, FilterProps, Group, StickTo } from '../types';
|
|
1
|
+
import { ColumnDefinition, ActionColumn, ColumnConfig, FilterProps, Group, StickTo, FiltersConfig } from '../types';
|
|
2
2
|
export declare const getActionCellSizeProps: (column: ActionColumn) => object;
|
|
3
3
|
export declare const getCellSizeProps: (column: ColumnDefinition, columnWidth: number) => object;
|
|
4
4
|
export declare const getSortName: (column: ColumnDefinition) => string;
|
|
@@ -15,3 +15,6 @@ export declare const createFilterType: (columnDefinition: {
|
|
|
15
15
|
export declare const getGroups: (columns: ColumnDefinition[]) => Group[];
|
|
16
16
|
export declare const getGroupClassNames: (group?: Group) => string;
|
|
17
17
|
export declare const getStickyCollClassNames: (sticky: boolean, stickTo?: StickTo) => string;
|
|
18
|
+
export declare const GRID_MIN_ROWS = 6;
|
|
19
|
+
export declare const rowHeight = 40;
|
|
20
|
+
export declare const getFilters: (optimizeFilters: boolean) => FiltersConfig;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import NumberRange from '../components/NumberRange';
|
|
2
|
+
import TextRange from '../components/TextRange';
|
|
3
|
+
import DatePickerRange from '../components/DatePickerRange';
|
|
4
|
+
import BooleanSelect from '../components/BooleanSelect';
|
|
5
|
+
import GridSelect from '../components/GridSelect';
|
|
1
6
|
var isDefined = function (val) { return typeof val !== 'undefined'; };
|
|
2
7
|
export var getActionCellSizeProps = function (column) {
|
|
3
8
|
return {
|
|
@@ -58,3 +63,17 @@ export var getGroupClassNames = function (group) {
|
|
|
58
63
|
export var getStickyCollClassNames = function (sticky, stickTo) {
|
|
59
64
|
return !sticky ? '' : "".concat(stickTo ? " sticky sticky-".concat(stickTo) : ' sticky sticky-left');
|
|
60
65
|
};
|
|
66
|
+
export var GRID_MIN_ROWS = 6;
|
|
67
|
+
export var rowHeight = 40;
|
|
68
|
+
export var getFilters = function (optimizeFilters) {
|
|
69
|
+
var filters = {
|
|
70
|
+
number: { CellComponent: NumberRange },
|
|
71
|
+
text: { CellComponent: TextRange },
|
|
72
|
+
date: { CellComponent: DatePickerRange },
|
|
73
|
+
flag: { CellComponent: BooleanSelect },
|
|
74
|
+
options: { CellComponent: GridSelect },
|
|
75
|
+
};
|
|
76
|
+
if (optimizeFilters)
|
|
77
|
+
filters.text.defaultExtraProps = { defaultComparator: 'eq' };
|
|
78
|
+
return filters;
|
|
79
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
var HideWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: content;\n @media print {\n display: none;\n }\n"], ["\n display: content;\n @media print {\n display: none;\n }\n"])));
|
|
8
|
+
var HidePrint = function (_a) {
|
|
9
|
+
var children = _a.children;
|
|
10
|
+
return _jsx(HideWrapper, { children: children });
|
|
11
|
+
};
|
|
12
|
+
export default HidePrint;
|
|
13
|
+
var templateObject_1;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { Placement } from '@popperjs/core';
|
|
3
|
+
import { StyledComponent } from 'styled-components';
|
|
4
|
+
type DropdownMenuProps = {
|
|
5
|
+
parentRef: React.MutableRefObject<HTMLDivElement | null | undefined>;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
children: React.ReactChild;
|
|
8
|
+
placement?: Placement;
|
|
9
|
+
wrapper?: StyledComponent<any, any>;
|
|
10
|
+
};
|
|
11
|
+
declare const Popover: FC<DropdownMenuProps>;
|
|
12
|
+
export default Popover;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import styled from '@xstyled/styled-components';
|
|
7
|
+
import { Popper } from 'react-popper';
|
|
8
|
+
import { useClickOutside } from '../Modal/hooks/useClickOutside';
|
|
9
|
+
import Portal from '../../Elements/Portal';
|
|
10
|
+
var PopoverWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: 5;\n"], ["\n z-index: 5;\n"])));
|
|
11
|
+
var Popover = function (_a) {
|
|
12
|
+
var placement = _a.placement, wrapper = _a.wrapper, children = _a.children, onClose = _a.onClose, parentRef = _a.parentRef;
|
|
13
|
+
var popperRef = useClickOutside({ onClose: onClose, parentRef: parentRef });
|
|
14
|
+
var Wrapper = wrapper || PopoverWrapper;
|
|
15
|
+
return (_jsx(Portal, { children: _jsx("div", { ref: popperRef, children: _jsx(Popper, { innerRef: popperRef, referenceElement: parentRef.current, placement: placement, children: function (_a) {
|
|
16
|
+
var ref = _a.ref, style = _a.style;
|
|
17
|
+
return (_jsx(Wrapper, { ref: ref, style: style, children: children }));
|
|
18
|
+
} }) }) }));
|
|
19
|
+
};
|
|
20
|
+
export default Popover;
|
|
21
|
+
var templateObject_1;
|