@mailstep/design-system 0.4.21 → 0.5.0-beta.10
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 +33 -2
- package/ui/Blocks/CommonGrid/CommonGrid.d.ts +3 -0
- package/ui/Blocks/CommonGrid/CommonGrid.js +106 -0
- package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +67 -0
- package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +9 -0
- package/ui/Blocks/CommonGrid/CommonGridContext.js +32 -0
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.d.ts +2 -0
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +36 -0
- package/ui/Blocks/CommonGrid/StandardButtons.d.ts +6 -0
- package/ui/Blocks/CommonGrid/StandardButtons.js +50 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +53 -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 +35 -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.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +41 -0
- 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/ColumnTitle.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle.js +20 -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/DataCell.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/DataCell.js +52 -0
- package/ui/Blocks/CommonGrid/components/DataRow.d.ts +21 -0
- package/ui/Blocks/CommonGrid/components/DataRow.js +110 -0
- 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/DropdownSelect/DropdownSelect.d.ts +21 -0
- package/ui/Blocks/CommonGrid/components/DropdownSelect/DropdownSelect.js +47 -0
- package/ui/Blocks/CommonGrid/components/DropdownSelect/index.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/DropdownSelect/index.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/FilterDropdown.d.ts +3 -0
- package/ui/Blocks/CommonGrid/components/FilterDropdown.js +36 -0
- package/ui/Blocks/CommonGrid/components/FilterRow.d.ts +15 -0
- package/ui/Blocks/CommonGrid/components/FilterRow.js +34 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +45 -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/GroupRow.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/GroupRow.js +27 -0
- package/ui/Blocks/CommonGrid/components/HeadCell.d.ts +27 -0
- package/ui/Blocks/CommonGrid/components/HeadCell.js +40 -0
- package/ui/Blocks/CommonGrid/components/HeadRow.d.ts +15 -0
- package/ui/Blocks/CommonGrid/components/HeadRow.js +69 -0
- package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.js +13 -0
- 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.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +21 -0
- 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/Resize.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/Resize.js +33 -0
- package/ui/Blocks/CommonGrid/components/Table.d.ts +10 -0
- package/ui/Blocks/CommonGrid/components/Table.js +25 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +31 -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/gridCells/ButtonInCell.js +16 -0
- 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 +5 -0
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +19 -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/index.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +12 -0
- package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.js +14 -0
- package/ui/Blocks/CommonGrid/components/icons/Edit.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/Edit.js +14 -0
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +14 -0
- package/ui/Blocks/CommonGrid/components/icons/Sorting.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/Sorting.js +14 -0
- package/ui/Blocks/CommonGrid/components/utils.d.ts +8 -0
- package/ui/Blocks/CommonGrid/components/utils.js +22 -0
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +12 -0
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +83 -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/useGetGridHeight.d.ts +7 -0
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -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/useRowsKeyControls.d.ts +4 -0
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +21 -0
- package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +3 -0
- package/ui/Blocks/CommonGrid/hooks/useUxReset.js +15 -0
- package/ui/Blocks/CommonGrid/index.d.ts +7 -0
- package/ui/Blocks/CommonGrid/index.js +7 -0
- package/ui/Blocks/CommonGrid/store/index.d.ts +58 -0
- package/ui/Blocks/CommonGrid/store/index.js +230 -0
- package/ui/Blocks/CommonGrid/store/migrateState.d.ts +3 -0
- package/ui/Blocks/CommonGrid/store/migrateState.js +14 -0
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +11 -0
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +31 -0
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +13 -0
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +49 -0
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.d.ts +6 -0
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +14 -0
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +11 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +12 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +12 -0
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.d.ts +6 -0
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +15 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +15 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.d.ts +14 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +24 -0
- package/ui/Blocks/CommonGrid/storybook/utils/actions.d.ts +4 -0
- package/ui/Blocks/CommonGrid/storybook/utils/actions.js +6 -0
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +97 -0
- package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/filters.js +23 -0
- package/ui/Blocks/CommonGrid/storybook/utils/utils.d.ts +17 -0
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +66 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +12 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +4 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +18 -0
- package/ui/Blocks/CommonGrid/styles.d.ts +12 -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 +313 -0
- package/ui/Blocks/CommonGrid/types.js +8 -0
- package/ui/Blocks/CommonGrid/utils/index.d.ts +19 -0
- package/ui/Blocks/CommonGrid/utils/index.js +78 -0
- package/ui/Blocks/CommonGrid/utils/public.d.ts +16 -0
- package/ui/Blocks/CommonGrid/utils/public.js +52 -0
- package/ui/Blocks/Popover/index.d.ts +10 -0
- package/ui/Blocks/Popover/index.js +19 -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/DatePicker/utils/getLanguage.d.ts +1 -0
- package/ui/Elements/DatePicker/utils/getLanguage.js +10 -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/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/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 +1 -1
- package/ui/Elements/Pagination/Pagination.js +6 -2
- 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 +9 -0
- package/ui/Elements/Select/themes/CustomComponents.js +131 -0
- package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
- package/ui/Elements/Select/themes/baseStyles.js +70 -0
- package/ui/Elements/Select/themes/formStyles.d.ts +23 -0
- package/ui/Elements/Select/themes/formStyles.js +104 -0
- package/ui/Elements/Select/themes/headingStyles.d.ts +17 -0
- package/ui/Elements/Select/themes/headingStyles.js +99 -0
- package/ui/Elements/Select/themes/index.d.ts +3 -0
- package/ui/Elements/Select/themes/index.js +61 -0
- package/ui/Elements/Select/themes/leftMenuStyles.d.ts +18 -0
- package/ui/Elements/Select/themes/leftMenuStyles.js +57 -0
- package/ui/Elements/Select/types.d.ts +54 -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/Forms/Input/types.d.ts +2 -2
- package/ui/index.es.js +868 -1104
- package/ui/index.umd.js +8 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// v1 to v2
|
|
2
|
+
var v2 = function (draft) {
|
|
3
|
+
Object.keys(draft).forEach(function (gridName) {
|
|
4
|
+
if (draft[gridName].columnConfig && Array.isArray(draft[gridName].columnConfig)) {
|
|
5
|
+
draft[gridName].columnConfig = {};
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
return draft;
|
|
9
|
+
};
|
|
10
|
+
// migration management
|
|
11
|
+
export default (function (draft) {
|
|
12
|
+
draft = v2(draft);
|
|
13
|
+
return draft;
|
|
14
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
decorators: ((story: Function) => JSX.Element)[];
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const ComplexWithPaginationAndRedux: {
|
|
7
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
story: {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReduxGrid, createRandomData, enumValues, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { onRowEditClick, onRowReadClick, onRowAction, onBatchAction } from '../utils/actions';
|
|
5
|
+
import { filters } from '../utils/filters';
|
|
6
|
+
import { useAddFilter } from '../../utils/public';
|
|
7
|
+
import withReduxActions from '../../HoC/withReduxActions';
|
|
8
|
+
import { columnDefinitions, enumColumn } from '../utils/columnDefinition';
|
|
9
|
+
import withRedux from '../utils/withRedux';
|
|
10
|
+
var ActionColumnButtons = {
|
|
11
|
+
flexBasis: 160,
|
|
12
|
+
canRowRead: true,
|
|
13
|
+
canRowEdit: function (row) { return row.enumColumn !== 'option C'; },
|
|
14
|
+
};
|
|
15
|
+
var FilterSetter = function (_a) {
|
|
16
|
+
var gridActions = _a.gridActions;
|
|
17
|
+
var handleAddFilter = useAddFilter(gridActions === null || gridActions === void 0 ? void 0 : gridActions.addFilter);
|
|
18
|
+
React.useEffect(function () {
|
|
19
|
+
handleAddFilter(enumValues[1], enumColumn);
|
|
20
|
+
}, []);
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
|
+
var ConnectedFilterSetter = withReduxActions('testGrid')(FilterSetter);
|
|
24
|
+
export default {
|
|
25
|
+
title: '@Blocks/CommonGrid',
|
|
26
|
+
decorators: [withRedux],
|
|
27
|
+
};
|
|
28
|
+
export var ComplexWithPaginationAndRedux = function () { return (_jsxs(_Fragment, { children: [_jsx(ConnectedFilterSetter, { gridActions: gridDummyActions }), _jsx(ReduxGrid, { filters: filters, columnsDefinitions: columnDefinitions, actionColumnDefinition: ActionColumnButtons, rowsData: createRandomData(10), onRowAction: onRowAction, onRowReadClick: onRowReadClick, onRowEditClick: onRowEditClick, totalRowsCount: 200, onBatchAction: onBatchAction, confirmOnReset: function () { return window.confirm('Are you sure you want to reset grid?'); } })] })); };
|
|
29
|
+
ComplexWithPaginationAndRedux.story = {
|
|
30
|
+
name: 'Complex, with pagination and redux',
|
|
31
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExtraControlButton } from '../../types';
|
|
2
|
+
export declare const extraControlButtons: ExtraControlButton[];
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
excludeStories: string[];
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const CustomControllButtons: {
|
|
9
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
story: {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGrid';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { oversizedColumnDefinition } from '../utils/columnDefinition';
|
|
5
|
+
import { ExtraControlButtonPosition } from '../../types';
|
|
6
|
+
export var extraControlButtons = [
|
|
7
|
+
{
|
|
8
|
+
label: _jsx(_Fragment, { children: "default left" }),
|
|
9
|
+
onClick: function () { return alert('test ok'); },
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: _jsx(_Fragment, { children: "right button" }),
|
|
13
|
+
onClick: function () { return alert('test ok'); },
|
|
14
|
+
position: ExtraControlButtonPosition.TopRight,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: _jsx(_Fragment, { children: "bottom left button" }),
|
|
18
|
+
onClick: function () { return alert('test ok'); },
|
|
19
|
+
position: ExtraControlButtonPosition.BottomLeft,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: _jsx(_Fragment, { children: "right options" }),
|
|
23
|
+
onClick: function () { return alert('test ok'); },
|
|
24
|
+
onSelect: function (value) { return alert(value); },
|
|
25
|
+
position: ExtraControlButtonPosition.TopRight,
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
label: 'Label A',
|
|
29
|
+
value: 'A',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: 'Label B',
|
|
33
|
+
value: 'B',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
node: (_jsxs("span", { style: { marginLeft: '15px' }, children: [_jsx("span", { children: "custom node with btn - " }), _jsx("button", { onClick: function () { return alert('test ok'); }, children: "btn" })] })),
|
|
39
|
+
position: ExtraControlButtonPosition.TopRight,
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
export default {
|
|
43
|
+
title: '@Blocks/CommonGrid',
|
|
44
|
+
excludeStories: ['extraControlButtons'],
|
|
45
|
+
};
|
|
46
|
+
export var CustomControllButtons = function () { return (_jsx(CommonGrid, { rowsData: createRandomData(10), columnsDefinitions: oversizedColumnDefinition, extraControlButtons: extraControlButtons, hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions })); };
|
|
47
|
+
CustomControllButtons.story = {
|
|
48
|
+
name: 'custom controll buttons',
|
|
49
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGrid';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
import withTheme from '../utils/withTheme';
|
|
6
|
+
import withRouter from '../utils/withRouter';
|
|
7
|
+
import withRedux from '../utils/withRedux';
|
|
8
|
+
export default {
|
|
9
|
+
title: '@Blocks/CommonGrid',
|
|
10
|
+
decorators: [withTheme, withRouter, withRedux],
|
|
11
|
+
};
|
|
12
|
+
export var Default = function () {
|
|
13
|
+
return (_jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridActions: gridDummyActions, gridSelectors: gridSelectors }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGrid';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
export default {
|
|
6
|
+
title: '@Blocks/CommonGrid',
|
|
7
|
+
};
|
|
8
|
+
export var LoadingState = function () { return (_jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridSelectors: gridSelectors, gridActions: gridDummyActions, isLoading: true, hideColumnConfig: true })); };
|
|
9
|
+
LoadingState.story = {
|
|
10
|
+
name: 'Loading state',
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGrid';
|
|
3
|
+
import { createOversizedRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { oversizedColumnDefinition } from '../utils/columnDefinition';
|
|
5
|
+
import { filters } from '../utils/filters';
|
|
6
|
+
export default {
|
|
7
|
+
title: '@Blocks/CommonGrid',
|
|
8
|
+
};
|
|
9
|
+
export var ManyColumnsNoScrollLayout = function () { return (_jsx(CommonGrid, { rowsData: createOversizedRandomData(5), filters: filters, columnsDefinitions: oversizedColumnDefinition, columnLayout: "no-scroll", hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions })); };
|
|
10
|
+
ManyColumnsNoScrollLayout.story = {
|
|
11
|
+
name: 'many columns no-scroll layout',
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGrid';
|
|
3
|
+
import { createOversizedRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { oversizedColumnDefinition } from '../utils/columnDefinition';
|
|
5
|
+
import { filters } from '../utils/filters';
|
|
6
|
+
export default {
|
|
7
|
+
title: '@Blocks/CommonGrid',
|
|
8
|
+
};
|
|
9
|
+
export var ManyColumnsNormalLayoutANoControls = function () { return (_jsx(CommonGrid, { rowsData: createOversizedRandomData(5), filters: filters, columnsDefinitions: oversizedColumnDefinition, hideColumnConfig: true, gridSelectors: gridSelectors, gridActions: gridDummyActions, hideAllControls: true })); };
|
|
10
|
+
ManyColumnsNormalLayoutANoControls.story = {
|
|
11
|
+
name: 'many columns normal layout a no controls',
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ReduxGrid, createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
3
|
+
import { filters } from '../utils/filters';
|
|
4
|
+
import { onRowAction } from '../utils/actions';
|
|
5
|
+
import { columnDefinitions } from '../utils/columnDefinition';
|
|
6
|
+
import withTheme from '../utils/withTheme';
|
|
7
|
+
import withRouter from '../utils/withRouter';
|
|
8
|
+
import withRedux from '../utils/withRedux';
|
|
9
|
+
export default {
|
|
10
|
+
title: '@Blocks/CommonGrid',
|
|
11
|
+
decorators: [withTheme, withRouter, withRedux],
|
|
12
|
+
};
|
|
13
|
+
export var Styled = function () {
|
|
14
|
+
return (_jsx("div", { className: "styled", children: _jsx(ReduxGrid, { filters: filters, columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridActions: gridDummyActions, gridSelectors: gridSelectors }) }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommonGrid from '../../CommonGrid';
|
|
3
|
+
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
import { onRowAction } from '../utils/actions';
|
|
6
|
+
import { filters } from '../utils/filters';
|
|
7
|
+
export default {
|
|
8
|
+
title: '@Blocks/CommonGrid',
|
|
9
|
+
};
|
|
10
|
+
export var WithCustomGridActions = function () {
|
|
11
|
+
return (_jsx(CommonGrid, { filters: filters, columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridSelectors: gridSelectors, gridActions: gridDummyActions, hideColumnConfig: true }));
|
|
12
|
+
};
|
|
13
|
+
WithCustomGridActions.story = {
|
|
14
|
+
name: 'With custom grid actions',
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActionColumn } from '../../types';
|
|
2
|
+
export declare const ActionColumnCheckboxes: ActionColumn;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
decorators: ((story: Function) => JSX.Element)[];
|
|
6
|
+
excludeStories: string[];
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const WithForcedCheckboxesAndCustomTitle: {
|
|
10
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
story: {
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ReduxGrid, createRandomData } from '../utils/utils';
|
|
3
|
+
import { onRowEditClick, onRowReadClick, onRowAction } from '../utils/actions';
|
|
4
|
+
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
import withRedux from '../utils/withRedux';
|
|
6
|
+
export var ActionColumnCheckboxes = {
|
|
7
|
+
flexBasis: 160,
|
|
8
|
+
forceCheckboxes: true,
|
|
9
|
+
};
|
|
10
|
+
var components = {
|
|
11
|
+
ColumnTitle: function (_a) {
|
|
12
|
+
var title = _a.title, isSortable = _a.isSortable;
|
|
13
|
+
return _jsx("div", { children: "".concat(title, " is ").concat(isSortable ? '' : 'NOT', " sortable") });
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default {
|
|
17
|
+
title: '@Blocks/CommonGrid',
|
|
18
|
+
decorators: [withRedux],
|
|
19
|
+
excludeStories: ['ActionColumnCheckboxes'],
|
|
20
|
+
};
|
|
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
|
+
WithForcedCheckboxesAndCustomTitle.story = {
|
|
23
|
+
name: 'With forced checkboxes and custom title',
|
|
24
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const onRowEditClick: (id: string, props: object) => void;
|
|
2
|
+
export declare const onRowReadClick: (id: string, props: object) => void;
|
|
3
|
+
export declare const onRowAction: (id: string, field: string, value: string | boolean) => void;
|
|
4
|
+
export declare const onBatchAction: (action: string, affectedRows: object[]) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var onRowEditClick = function (id, props) { return console.log('onRowEditClick', id, props); };
|
|
2
|
+
export var onRowReadClick = function (id, props) { return console.log('onRowReadClick', id, props); };
|
|
3
|
+
export var onRowAction = function (id, field, value) { return console.log('onRowAction', id, field, value); };
|
|
4
|
+
export var onBatchAction = function (action, affectedRows) {
|
|
5
|
+
console.log('onBatchAction called', action, affectedRows);
|
|
6
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColumnDefinition } from '../../types';
|
|
2
|
+
export declare const oversizedArrayColumns = 25;
|
|
3
|
+
export declare const enumValues: string[];
|
|
4
|
+
export declare const oversizedColumnDefinition: {
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
flexBasis: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const enumColumn: ColumnDefinition;
|
|
10
|
+
export declare const columnDefinitions: ColumnDefinition[];
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import React from 'react';
|
|
12
|
+
export var oversizedArrayColumns = 25;
|
|
13
|
+
export var enumValues = ['option A', 'option B', 'option C'];
|
|
14
|
+
var ComplexCell = function (props) {
|
|
15
|
+
var handleActionClick = React.useCallback(function () {
|
|
16
|
+
if (props.onRowAction)
|
|
17
|
+
props.onRowAction(props.rowData.id, 'get_invoice', null);
|
|
18
|
+
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
+
}, [props.rowData, props.onRowAction]);
|
|
20
|
+
return _jsxs("button", { onClick: handleActionClick, children: [" download ", props.rowData.id, " "] });
|
|
21
|
+
};
|
|
22
|
+
export var oversizedColumnDefinition = new Array(oversizedArrayColumns).fill(null).map(function (unused, index) { return ({
|
|
23
|
+
name: "column_".concat(index),
|
|
24
|
+
title: "column_".concat(index),
|
|
25
|
+
flexBasis: 120,
|
|
26
|
+
}); });
|
|
27
|
+
export var enumColumn = {
|
|
28
|
+
name: 'enumColumn',
|
|
29
|
+
title: 'Enum Column',
|
|
30
|
+
flexBasis: 160,
|
|
31
|
+
filterOptions: __spreadArray([{ value: '', label: 'all' }], enumValues.map(function (v) { return ({ value: v, label: v }); }), true),
|
|
32
|
+
filtering: true,
|
|
33
|
+
sorting: false,
|
|
34
|
+
};
|
|
35
|
+
export var columnDefinitions = [
|
|
36
|
+
{
|
|
37
|
+
name: 'textColumn',
|
|
38
|
+
title: 'Text column',
|
|
39
|
+
flexBasis: 160,
|
|
40
|
+
filtering: true,
|
|
41
|
+
sorting: true,
|
|
42
|
+
},
|
|
43
|
+
enumColumn,
|
|
44
|
+
{
|
|
45
|
+
name: 'numberColumn',
|
|
46
|
+
title: 'Number Column',
|
|
47
|
+
flexBasis: 160,
|
|
48
|
+
filtering: true,
|
|
49
|
+
filteringType: 'number',
|
|
50
|
+
sorting: true,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'dateColumn',
|
|
54
|
+
group: 'group1',
|
|
55
|
+
title: 'Date Column',
|
|
56
|
+
flexBasis: 160,
|
|
57
|
+
filtering: true,
|
|
58
|
+
filteringType: 'date',
|
|
59
|
+
sorting: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'boolColumn',
|
|
63
|
+
group: 'group1',
|
|
64
|
+
title: 'Bool Column',
|
|
65
|
+
flexBasis: 160,
|
|
66
|
+
filtering: true,
|
|
67
|
+
filteringType: 'flag',
|
|
68
|
+
sorting: true,
|
|
69
|
+
formatRowValue: function (row) {
|
|
70
|
+
return row.boolColumn ? 'Yes' : 'No';
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'advancedColumn',
|
|
75
|
+
group: 'group2',
|
|
76
|
+
title: 'Advanced Column',
|
|
77
|
+
flexBasis: 160,
|
|
78
|
+
formatRowValue: function (row) {
|
|
79
|
+
return "".concat((row.numberColumn / 4) * row.textColumn.length);
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'complexColumn',
|
|
84
|
+
group: 'group2',
|
|
85
|
+
title: 'Complex Column',
|
|
86
|
+
flexBasis: 350,
|
|
87
|
+
cellComponent: ComplexCell,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'stickyColumn',
|
|
91
|
+
title: 'Sticky Column',
|
|
92
|
+
flexBasis: 160,
|
|
93
|
+
alwaysOn: true,
|
|
94
|
+
sticky: true,
|
|
95
|
+
stickTo: 'right',
|
|
96
|
+
},
|
|
97
|
+
];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
var DefaultSelect = function (props) { return (_jsx("select", __assign({ multiple: props.isMulti }, props, { children: (props.options || []).map(function (_a) {
|
|
14
|
+
var value = _a.value, label = _a.label;
|
|
15
|
+
return (_jsx("option", { value: value, children: label }, value));
|
|
16
|
+
}) }))); };
|
|
17
|
+
export var filters = {
|
|
18
|
+
options: { CellComponent: DefaultSelect },
|
|
19
|
+
number: { CellComponent: function () { return _jsx("input", { type: "number" }); } },
|
|
20
|
+
text: { CellComponent: function () { return _jsx("input", { type: "text" }); } },
|
|
21
|
+
date: { CellComponent: function () { return _jsx("input", { type: "date" }); } },
|
|
22
|
+
flag: { CellComponent: function () { return _jsx("input", { type: "text" }); } },
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GridActionsType, rowClassSymbol } from '../../types';
|
|
2
|
+
export declare const enumValues: string[];
|
|
3
|
+
export declare const oversizedArrayColumns = 25;
|
|
4
|
+
export declare const gridSelectors: {};
|
|
5
|
+
export declare const createRandomData: (count: number) => {
|
|
6
|
+
id: string;
|
|
7
|
+
stickyColumn: string;
|
|
8
|
+
textColumn: string;
|
|
9
|
+
enumColumn: string;
|
|
10
|
+
numberColumn: number;
|
|
11
|
+
dateColumn: string;
|
|
12
|
+
boolColumn: boolean;
|
|
13
|
+
[rowClassSymbol]: string | undefined;
|
|
14
|
+
}[];
|
|
15
|
+
export declare const gridDummyActions: Required<GridActionsType>;
|
|
16
|
+
export declare const createOversizedRandomData: (count: number) => any[];
|
|
17
|
+
export declare const ReduxGrid: (props: any) => JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import faker from 'faker';
|
|
15
|
+
import { rowClassSymbol } from '../../types';
|
|
16
|
+
import withReduxActions from '../../HoC/withReduxActions';
|
|
17
|
+
import CommonGrid from '../../CommonGridContainer';
|
|
18
|
+
export var enumValues = ['option A', 'option B', 'option C'];
|
|
19
|
+
export var oversizedArrayColumns = 25;
|
|
20
|
+
export var gridSelectors = {};
|
|
21
|
+
/**
|
|
22
|
+
* randomly returns given data or undefined. used to simulate optional pros on object data types
|
|
23
|
+
*/
|
|
24
|
+
function makeOptional(fakerData, chance) {
|
|
25
|
+
chance = chance || 0.5;
|
|
26
|
+
return Math.random() < chance ? fakerData : undefined;
|
|
27
|
+
}
|
|
28
|
+
export var createRandomData = function (count) {
|
|
29
|
+
return new Array(count).fill(null).map(function () {
|
|
30
|
+
var _a;
|
|
31
|
+
return (_a = {
|
|
32
|
+
id: faker.random.uuid(),
|
|
33
|
+
stickyColumn: faker.random.word(),
|
|
34
|
+
textColumn: faker.random.word(),
|
|
35
|
+
enumColumn: enumValues[faker.random.number({ min: 0, max: 2 })],
|
|
36
|
+
numberColumn: faker.random.number(),
|
|
37
|
+
dateColumn: faker.date.recent().toISOString(),
|
|
38
|
+
boolColumn: faker.random.boolean()
|
|
39
|
+
},
|
|
40
|
+
_a[rowClassSymbol] = makeOptional('foo'),
|
|
41
|
+
_a);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export var gridDummyActions = {
|
|
45
|
+
// @see types for full list of actions
|
|
46
|
+
setPage: function (number) { return console.log('setPage', number); },
|
|
47
|
+
setRowsPerPage: function (number) { return console.log('setRowsPerPage', number); },
|
|
48
|
+
addFilter: function (column, value, filterProps) {
|
|
49
|
+
return console.log('setRowsPerPage', column, value, filterProps);
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export var createOversizedRandomData = function (count) {
|
|
53
|
+
return new Array(count).fill(null).map(function () {
|
|
54
|
+
var newData = {
|
|
55
|
+
id: "".concat(faker.random.uuid()),
|
|
56
|
+
};
|
|
57
|
+
for (var index = 0; index < oversizedArrayColumns; index++) {
|
|
58
|
+
newData["column_".concat(index)] = faker.name.lastName();
|
|
59
|
+
}
|
|
60
|
+
return newData;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export var ReduxGrid = function (props) {
|
|
64
|
+
var WithActions = React.useMemo(function () { return withReduxActions('storybookGrid')(CommonGrid); }, []);
|
|
65
|
+
return _jsx(WithActions, __assign({}, props));
|
|
66
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Provider } from 'react-redux';
|
|
3
|
+
import { combineReducers, createStore } from 'redux';
|
|
4
|
+
import commonGridReducer from '../../store';
|
|
5
|
+
export var withProvider = function (story) {
|
|
6
|
+
var reducers = combineReducers({
|
|
7
|
+
commonGrid: commonGridReducer,
|
|
8
|
+
});
|
|
9
|
+
var store = createStore(reducers);
|
|
10
|
+
return _jsx(Provider, { store: store, children: story() });
|
|
11
|
+
};
|
|
12
|
+
export default withProvider;
|
|
@@ -0,0 +1,18 @@
|
|
|
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()); };
|
|
18
|
+
export default withProvider;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
isAbsolute?: 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) => JSX.Element, import("@xstyled/system").Theme, {
|
|
10
|
+
onRowClick?: Function | undefined;
|
|
11
|
+
height?: number | undefined;
|
|
12
|
+
}, never>;
|