@mailstep/design-system 0.8.16-beta.2 → 0.8.16-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -6
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +3 -9
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +0 -1
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.d.ts +0 -3
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +8 -16
- package/ui/Blocks/CommonGrid/components/ControlButtons/styles.d.ts +1 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +1 -2
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +10 -30
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.d.ts +0 -1
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.js +5 -17
- package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.js +2 -2
- package/ui/Blocks/CommonGrid/components/GridInfo/index.js +1 -3
- package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +1 -1
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/styles.d.ts +2 -2
- package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.d.ts +1 -1
- package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.js +2 -2
- package/ui/Blocks/CommonGrid/components/Table.d.ts +28 -28
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useEvent.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.d.ts +1 -1
- package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +1 -1
- package/ui/Blocks/CommonGrid/store/index.d.ts +19 -17
- package/ui/Blocks/CommonGrid/store/index.js +2 -9
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +0 -30
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +9 -59
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.d.ts +0 -2
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +9 -19
- package/ui/Blocks/CommonGrid/styles.d.ts +6 -6
- package/ui/Blocks/CommonGrid/styles.js +3 -6
- package/ui/Blocks/CommonGrid/types.d.ts +0 -1
- package/ui/Blocks/CommonGrid/utils/index.d.ts +1 -3
- package/ui/Blocks/CommonGrid/utils/index.js +0 -10
- package/ui/Blocks/Header/components/MenuItems/styles.d.ts +1 -1
- package/ui/Blocks/Header/stories/Header.stories.d.ts +16 -16
- package/ui/Blocks/ImageList/components/AddPhoto/index.js +2 -2
- package/ui/Blocks/ImageList/components/AddPhoto/styles.d.ts +2 -2
- package/ui/Blocks/ImageList/components/CloseButton/styles.d.ts +1 -1
- package/ui/Blocks/ImageList/components/ImageElement/styles.d.ts +1 -1
- package/ui/Blocks/ImageList/styles.d.ts +2 -2
- package/ui/Blocks/LanguageSwitch/styles.d.ts +3 -3
- package/ui/Blocks/LoginPage/stories/LoginPage.stories.js +2 -2
- package/ui/Blocks/LoginPage/styles.d.ts +2 -3
- package/ui/Blocks/Modal/styles.d.ts +7 -7
- package/ui/Blocks/Scheduler/components/Groups/styles.d.ts +1 -1
- package/ui/Blocks/Scheduler/components/TimeSlots/styles.d.ts +1 -1
- package/ui/Blocks/SideMenu/components/Footer.d.ts +1 -1
- package/ui/Blocks/SideMenu/stories/SideMenu.stories.d.ts +1 -0
- package/ui/Blocks/SideMenu/styles.d.ts +15 -15
- package/ui/Blocks/Stepper/components/StepCircle/styles.d.ts +2 -2
- package/ui/Blocks/Stepper/components/StepItem/styles.d.ts +3 -3
- package/ui/Blocks/Table/stories/Table.stories.d.ts +3 -2
- package/ui/Blocks/Tabs/styles.d.ts +6 -5
- package/ui/Elements/Alert/styles.d.ts +18 -17
- package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.d.ts +2 -1
- package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.js +2 -2
- package/ui/Elements/BarChartSymbol/styles.d.ts +2 -2
- package/ui/Elements/BorderedBox/types.d.ts +1 -0
- package/ui/Elements/Button/styles.d.ts +6 -5
- package/ui/Elements/Card/styles.d.ts +2 -2
- package/ui/Elements/Card/types.d.ts +1 -0
- package/ui/Elements/CheckedCircle/storries/CheckedCircle.stories.d.ts +2 -2
- package/ui/Elements/DatePicker/Datetime/components/FooterRow.d.ts +1 -1
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +1 -1
- package/ui/Elements/DatePicker/styles.d.ts +2 -1
- package/ui/Elements/DropdownMenu/components/MenuItem.js +1 -1
- package/ui/Elements/Icon/Icon.js +6 -6
- package/ui/Elements/Icon/icons/index.d.ts +0 -2
- package/ui/Elements/Icon/icons/index.js +0 -2
- package/ui/Elements/Icon/stories/BadgeIcon.stories.d.ts +1 -1
- package/ui/Elements/Label/Label.d.ts +1 -1
- package/ui/Elements/Label/stories/Label.stories.d.ts +1 -1
- package/ui/Elements/Link/stories/Link.stories.d.ts +12 -12
- package/ui/Elements/Logo/Logo.js +2 -2
- package/ui/Elements/Pagination/styled.d.ts +2 -1
- package/ui/Elements/ProgressBar/stories/ProgressBar.stories.d.ts +5 -5
- package/ui/Elements/ProgressBar/styles.d.ts +1 -1
- package/ui/Elements/Select/Select.js +2 -2
- package/ui/Elements/Select/components/SimplifiedOption.d.ts +1 -0
- package/ui/Elements/Select/themes/index.d.ts +1 -1
- package/ui/Elements/Select/themes/selectStyles.d.ts +1 -1
- package/ui/Elements/SingleSelect/SingleSelect.js +2 -2
- package/ui/Elements/SpaceAround/types.d.ts +1 -0
- package/ui/Elements/Spinner/styles.d.ts +1 -1
- package/ui/Elements/Tag/types.d.ts +1 -0
- package/ui/Elements/Toast/styles.d.ts +1 -1
- package/ui/Forms/Checkbox/styles.d.ts +2 -1
- package/ui/Forms/Input/styles.d.ts +3 -3
- package/ui/Forms/TextArea/styles.d.ts +5 -5
- package/ui/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/ui/ThemeProvider/ThemeProvider.js +1 -1
- package/ui/ThemeProvider/themes/dark.d.ts +152 -0
- package/ui/ThemeProvider/themes/dark.js +14 -0
- package/ui/ThemeProvider/themes/default.js +1 -1
- package/ui/ThemeProvider/themes/index.d.ts +151 -1
- package/ui/ThemeProvider/themes/index.js +3 -3
- package/ui/ThemeProvider/themes/mailwise.js +1 -1
- package/ui/ThemeProvider/types.d.ts +13 -33
- package/ui/index.es.js +16214 -16934
- package/ui/index.umd.js +460 -498
- package/ui/utils/index.js +1 -1
- package/ui/utils/translations.d.ts +4 -1
- package/ui/utils/translations.js +2 -2
- package/ui/Blocks/CommonGrid/components/MobileFilterModal.d.ts +0 -20
- package/ui/Blocks/CommonGrid/components/MobileFilterModal.js +0 -69
- package/ui/Blocks/CommonGrid/components/MobileOverlayWrapper.d.ts +0 -1
- package/ui/Blocks/CommonGrid/components/MobileOverlayWrapper.js +0 -7
- package/ui/Blocks/CommonGrid/components/MobileSortModal.d.ts +0 -13
- package/ui/Blocks/CommonGrid/components/MobileSortModal.js +0 -34
- package/ui/Elements/Icon/icons/Filter.d.ts +0 -4
- package/ui/Elements/Icon/icons/Filter.js +0 -13
- package/ui/Elements/Icon/icons/Sort.d.ts +0 -4
- package/ui/Elements/Icon/icons/Sort.js +0 -13
- package/ui/ThemeProvider/themes/light.d.ts +0 -4
- package/ui/ThemeProvider/themes/light.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailstep/design-system",
|
|
3
|
-
"version": "0.8.16-beta.
|
|
3
|
+
"version": "0.8.16-beta.3",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./ui/index.js",
|
|
@@ -19,7 +19,11 @@
|
|
|
19
19
|
"deploy:win": "npm run build:win && npm publish ./build",
|
|
20
20
|
"dev": "yarn storybook",
|
|
21
21
|
"test": "echo \"The tests are still waiting to be written, but it seems like they're really good at procrastinating!\"",
|
|
22
|
-
"lint": "eslint
|
|
22
|
+
"lint": "eslint ./packages/ui/**/*.{ts,tsx}",
|
|
23
|
+
"prepare": "husky install"
|
|
24
|
+
},
|
|
25
|
+
"lint-staged": {
|
|
26
|
+
"*.{js,ts,tsx}": "yarn eslint --fix"
|
|
23
27
|
},
|
|
24
28
|
"devDependencies": {
|
|
25
29
|
"@babel/core": "^7.20.12",
|
|
@@ -40,6 +44,7 @@
|
|
|
40
44
|
"@lingui/react": "3.17.2",
|
|
41
45
|
"@popperjs/core": "^2.11.8",
|
|
42
46
|
"@storybook/addon-designs": "^11.1.2",
|
|
47
|
+
"@storybook/addon-docs": "10.2.8",
|
|
43
48
|
"@storybook/addon-links": "10.2.8",
|
|
44
49
|
"@storybook/react-webpack5": "10.2.8",
|
|
45
50
|
"@svgr/rollup": "^8.0.1",
|
|
@@ -74,7 +79,9 @@
|
|
|
74
79
|
"eslint-plugin-react-perf": "^3.3.2",
|
|
75
80
|
"eslint-plugin-storybook": "10.2.8",
|
|
76
81
|
"faker": "^5.1.0",
|
|
82
|
+
"husky": "^9.1.7",
|
|
77
83
|
"immer": "9.0.7",
|
|
84
|
+
"lint-staged": "^16.4.0",
|
|
78
85
|
"lodash": "^4.17.21",
|
|
79
86
|
"luxon": "^3.4.4",
|
|
80
87
|
"moment": "^2.30.1",
|
|
@@ -98,12 +105,11 @@
|
|
|
98
105
|
"styled-components": "^5.3.10",
|
|
99
106
|
"swiper": "^11.0.3",
|
|
100
107
|
"tslib": "^2.6.2",
|
|
101
|
-
"typescript": "
|
|
108
|
+
"typescript": "5.1.3",
|
|
102
109
|
"vite": "^5.0.10",
|
|
103
110
|
"vite-plugin-dts": "^3.6.4",
|
|
104
111
|
"vite-plugin-static-copy": "^1.0.0",
|
|
105
|
-
"webpack": "^5.82.1"
|
|
106
|
-
"@storybook/addon-docs": "10.2.8"
|
|
112
|
+
"webpack": "^5.82.1"
|
|
107
113
|
},
|
|
108
114
|
"peerDependencies": {
|
|
109
115
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -141,7 +147,7 @@
|
|
|
141
147
|
"styled-components": "^5.3.10",
|
|
142
148
|
"swiper": "^11.0.3",
|
|
143
149
|
"tslib": "^2.6.2",
|
|
144
|
-
"typescript": "
|
|
150
|
+
"typescript": "5.1.3"
|
|
145
151
|
},
|
|
146
152
|
"resolutions": {
|
|
147
153
|
"jackspeak": "2.1.1"
|
|
@@ -23,15 +23,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
24
|
import { useRef, useMemo, useState } from 'react';
|
|
25
25
|
import { Pagination } from '../../Elements/Pagination';
|
|
26
|
-
import { useCheckDeviceWidth } from '../../utils/CheckDeviceWidth/checkDeviceWidth';
|
|
27
26
|
import HidePrint from '../HidePrint/HidePrint';
|
|
28
27
|
import { useModal } from '../Modal/hooks/useModal';
|
|
29
28
|
import ActionHead from './components/ActionHead';
|
|
30
29
|
import ControlButtons from './components/ControlButtons';
|
|
31
30
|
import { GridInfo } from './components/GridInfo';
|
|
32
31
|
import { GridModals } from './components/GridModals';
|
|
33
|
-
import MobileFilterModal from './components/MobileFilterModal';
|
|
34
|
-
import MobileSortModal from './components/MobileSortModal';
|
|
35
32
|
import TablePagination from './components/TablePagination';
|
|
36
33
|
import useEditReadAsColumn from './hooks/useEditReadAsColumn';
|
|
37
34
|
import { useGridAutoRowsPerPage } from './hooks/useGridAutoRowsPerPage';
|
|
@@ -55,7 +52,6 @@ var CommonGridContainer = function (props) {
|
|
|
55
52
|
var hasFilters = !!props.columnsDefinitions.find(function (col) { return col.filtering; });
|
|
56
53
|
var hasGroupsOrFilters = hasGroups || hasFilters;
|
|
57
54
|
var autoRowsPerPage = getRowsPerPage(gridRef, withPagination, withButtonStrip, hasGroupsOrFilters);
|
|
58
|
-
var isMobile = useCheckDeviceWidth().isMobile;
|
|
59
55
|
useGridAutoRowsPerPage({
|
|
60
56
|
autoHeight: autoHeight,
|
|
61
57
|
gridActions: gridActions,
|
|
@@ -74,12 +70,10 @@ var CommonGridContainer = function (props) {
|
|
|
74
70
|
onClose: onClose
|
|
75
71
|
}), columnsConfigValues = _j.columnsConfigValues, setColumnsConfigOptions = _j.setColumnsConfigOptions, onConfirmForm = _j.onConfirmForm, resetColumnConfig = _j.resetColumnConfig, handleDragEnd = _j.handleDragEnd, onCloseForm = _j.onCloseForm, displayColumnsDefinitions = _j.displayColumnsDefinitions, manageColumnsFormDefinitions = _j.manageColumnsFormDefinitions;
|
|
76
72
|
var _k = usePresetState(), isPresetsModalOpen = _k.isPresetsModalOpen, onClosePresetsModal = _k.onClosePresetsModal, onOpenPresetsModal = _k.onOpenPresetsModal, setSelectedPresetName = _k.setSelectedPresetName, selectedPresetName = _k.selectedPresetName;
|
|
77
|
-
var _l =
|
|
78
|
-
var _m = useModal(), isMobileSortOpen = _m.isOpen, onOpenMobileSort = _m.onOpen, closeMobileSort = _m.onClose;
|
|
79
|
-
var _o = hasSortTerminated({
|
|
73
|
+
var _l = hasSortTerminated({
|
|
80
74
|
allowSortingOnlyUnderTotalRows: allowSortingOnlyUnderTotalRows,
|
|
81
75
|
totalRowsCount: passDownProps === null || passDownProps === void 0 ? void 0 : passDownProps.totalRowsCount
|
|
82
|
-
}), isSortTerminatedAppeal =
|
|
83
|
-
return (_jsxs(_Fragment, { children: [_jsxs(ContentContainer, { ref: gridRef, children: [_jsxs(CommonGridWrap, { withPagination: withPagination, children: [withButtonStrip && (_jsx(HidePrint, { children: _jsx(StyledButtonStrip, { className: "buttonsStrip", children: _jsx(ControlButtons, { hideControlButtons: hideControlButtons, extraControlButtons: extendedExtraControlButtons, gridActions: gridActions, gridSelectors: gridSelectors, quickFilter: quickFilter, columns: columns, filters: filters, setDisplayManageColumnButton: setDisplayManageColumnButton, displayManageColumnButton: displayManageColumnButton, openManageColumnForm: openManageColumnForm, onOpenPresetsModal: onOpenPresetsModal, selectedPresetName: selectedPresetName, withPresets: withPresets, gridName: gridName, withManageColumnButton: withManageColumnButton
|
|
76
|
+
}), isSortTerminatedAppeal = _l.isSortTerminatedAppeal, isSortTerminated = _l.isSortTerminated;
|
|
77
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ContentContainer, { ref: gridRef, children: [_jsxs(CommonGridWrap, { withPagination: withPagination, children: [withButtonStrip && (_jsx(HidePrint, { children: _jsx(StyledButtonStrip, { className: "buttonsStrip", children: _jsx(ControlButtons, { hideControlButtons: hideControlButtons, extraControlButtons: extendedExtraControlButtons, gridActions: gridActions, gridSelectors: gridSelectors, quickFilter: quickFilter, columns: columns, filters: filters, setDisplayManageColumnButton: setDisplayManageColumnButton, displayManageColumnButton: displayManageColumnButton, openManageColumnForm: openManageColumnForm, onOpenPresetsModal: onOpenPresetsModal, selectedPresetName: selectedPresetName, withPresets: withPresets, gridName: gridName, withManageColumnButton: withManageColumnButton }) }) })), _jsx(CommonGridWithStyles, __assign({}, passDownProps, modifiedPassDownProps, { withButtonStrip: withButtonStrip, hasGroupsOrFilters: hasGroupsOrFilters, filters: filters, floatingButtonProps: floatingButtonProps, handleDragEnd: handleDragEnd(false), displayColumnsDefinitions: displayColumnsDefinitions, hasFilters: hasFilters, hasGroups: hasGroups, isSortTerminated: isSortTerminated, hasColouredRows: true }))] }), _jsxs(BottomWrapper, { withPagination: withPagination, children: [(processCheckedValues || !!((_a = actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.actionOptions) === null || _a === void 0 ? void 0 : _a.length)) && (_jsx(ActionHead, { rowsData: rowsData, onBatchAction: onBatchAction, gridActions: gridActions, gridSelectors: gridSelectors, actionOptions: actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.actionOptions, processCheckedValues: processCheckedValues, processCheckedValuesTitle: processCheckedValuesTitle })), _jsxs(x.div, { display: "flex", justifyContent: "space-between", alignItems: "center", w: "100%", children: [_jsx(GridInfo, { isSortTerminatedAppeal: isSortTerminatedAppeal, isSortTerminated: isSortTerminated }), withPagination && (_jsxs(x.div, { display: "flex", alignItems: "center", className: "paginatorWrapper", children: [_jsx(Pagination, { page: gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.page, itemCount: passDownProps === null || passDownProps === void 0 ? void 0 : passDownProps.totalRowsCount, itemPerPage: (gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.rowsPerPage) || 10, onPageChange: gridActions === null || gridActions === void 0 ? void 0 : gridActions.setPage, customPaginationHandler: customPaginationHandler, radius: window.innerWidth < 768 ? 3 : 5, rate: window.innerWidth < 768 ? 1 : 4 }), _jsx(TablePagination, { gridActions: gridActions, gridSelectors: gridSelectors, customPaginationHandler: customPaginationHandler, autoRowsPerPage: autoRowsPerPage })] }))] })] })] }), _jsx(GridModals, { manageColumnFormVisible: manageColumnFormVisible, onCloseForm: onCloseForm, resetColumnConfig: resetColumnConfig, onConfirmForm: onConfirmForm, manageColumnsFormDefinitions: manageColumnsFormDefinitions, columnsConfigValues: columnsConfigValues, setColumnsConfigOptions: setColumnsConfigOptions, handleDragEnd: handleDragEnd(true), gridName: gridName, gridActions: gridActions, gridSelectors: gridSelectors, onClosePresetsModal: onClosePresetsModal, isPresetsModalOpen: isPresetsModalOpen, selectedPresetName: selectedPresetName, setSelectedPresetName: setSelectedPresetName })] }));
|
|
84
78
|
};
|
|
85
79
|
export default CommonGridContainer;
|
|
@@ -29,7 +29,6 @@ var withReduxActions = function (gridName, prefix) {
|
|
|
29
29
|
setFilters: actions.setFilters,
|
|
30
30
|
resetFilters: actions.resetFilters,
|
|
31
31
|
addSorting: actions.addSorting,
|
|
32
|
-
resetSorting: actions.resetSorting,
|
|
33
32
|
clearSettings: actions.clearSettings,
|
|
34
33
|
setColumnWidth: actions.setColumnWidth,
|
|
35
34
|
resetGrid: actions.resetGrid,
|
|
@@ -17,9 +17,6 @@ type Props = {
|
|
|
17
17
|
selectedPresetName: string;
|
|
18
18
|
withPresets?: boolean;
|
|
19
19
|
withManageColumnButton?: boolean;
|
|
20
|
-
onOpenMobileFilters?: () => void;
|
|
21
|
-
onOpenMobileSorting?: () => void;
|
|
22
|
-
isSortTerminated: boolean;
|
|
23
20
|
};
|
|
24
21
|
declare const ControlButtons: FC<Props>;
|
|
25
22
|
export default ControlButtons;
|
|
@@ -10,45 +10,37 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
14
|
import Button from '../../../../Elements/Button/Button';
|
|
15
|
-
import { Filter } from '../../../../Elements/Icon/icons/Filter';
|
|
16
15
|
import { Settings2 } from '../../../../Elements/Icon/icons/Settings2';
|
|
17
|
-
import { Sort } from '../../../../Elements/Icon/icons/Sort';
|
|
18
16
|
import Tag from '../../../../Elements/Tag/Tag';
|
|
19
17
|
import { palettes } from '../../../../Elements/Tag/palettes';
|
|
20
18
|
import { H6 } from '../../../../Elements/Typography';
|
|
21
19
|
import useQuickFilter from '../../hooks/useQuickFilter';
|
|
22
20
|
import { ExtraControlButtonPosition } from '../../types';
|
|
23
|
-
import { isFilterActive } from '../../utils';
|
|
24
21
|
import ExtraControlButtons from '../ExtraControlButtons';
|
|
25
22
|
import QuickFilter from '../QuickFilter';
|
|
26
23
|
import { i18n } from '@lingui/core';
|
|
27
24
|
import { Trans } from '@lingui/react';
|
|
28
|
-
import {
|
|
25
|
+
import { x } from '@xstyled/styled-components';
|
|
29
26
|
import { ControlButtonsContainer, Left, Right, StyledColumnButton } from './styles';
|
|
30
27
|
var ControlButtons = function (_a) {
|
|
31
|
-
var _b,
|
|
32
|
-
var
|
|
33
|
-
var _e = useQuickFilter({
|
|
28
|
+
var extraControlButtons = _a.extraControlButtons, gridActions = _a.gridActions, gridSelectors = _a.gridSelectors, _b = _a.quickFilter, quickFilter = _b === void 0 ? '' : _b, columns = _a.columns, filters = _a.filters, hideControlButtons = _a.hideControlButtons, displayManageColumnButton = _a.displayManageColumnButton, openManageColumnForm = _a.openManageColumnForm, setDisplayManageColumnButton = _a.setDisplayManageColumnButton, onOpenPresetsModal = _a.onOpenPresetsModal, gridName = _a.gridName, selectedPresetName = _a.selectedPresetName, withPresets = _a.withPresets, withManageColumnButton = _a.withManageColumnButton;
|
|
29
|
+
var _c = useQuickFilter({
|
|
34
30
|
gridActions: gridActions,
|
|
35
31
|
gridSelectors: gridSelectors,
|
|
36
32
|
quickFilter: quickFilter,
|
|
37
33
|
columns: columns,
|
|
38
34
|
filters: filters
|
|
39
|
-
}), searchedValue =
|
|
35
|
+
}), searchedValue = _c.searchedValue, translatedValue = _c.translatedValue, onChangeInputValue = _c.onChangeInputValue, onClear = _c.onClear, onClearSettings = _c.onClearSettings, onDisplayInput = _c.onDisplayInput, displayInput = _c.displayInput, isMobileInputView = _c.isMobileInputView, isMobile = _c.isMobile, filter = _c.filter;
|
|
40
36
|
useEffect(function () {
|
|
41
37
|
setDisplayManageColumnButton(!isMobileInputView && !!withManageColumnButton);
|
|
42
38
|
}, [isMobileInputView, withManageColumnButton, setDisplayManageColumnButton]);
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
var hasFilterableColumns = !!(columns === null || columns === void 0 ? void 0 : columns.some(function (col) { return col.filtering; }));
|
|
46
|
-
var hasSortableColumns = !!(columns === null || columns === void 0 ? void 0 : columns.some(function (col) { return col.sorting; }));
|
|
47
|
-
var sortCount = (_c = (_b = gridSelectors.sorting) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
|
|
48
|
-
return (_jsxs(ControlButtonsContainer, { children: [_jsxs(Left, { children: [!hideControlButtons && (_jsxs(_Fragment, { children: [quickFilter && !isMobile && (_jsx(QuickFilter, { searchedValue: searchedValue, placeholderText: i18n._({
|
|
39
|
+
var filtersOn = !!filter && Object.values(filter).some(function (item) { var _a; return ((_a = item.value) === null || _a === void 0 ? void 0 : _a.value) !== '' && item.value !== ''; });
|
|
40
|
+
return (_jsxs(ControlButtonsContainer, { children: [_jsxs(Left, { children: [!hideControlButtons && (_jsxs(_Fragment, { children: [quickFilter && (_jsx(QuickFilter, { searchedValue: searchedValue, placeholderText: i18n._({
|
|
49
41
|
id: 'controlButtons.searchPlaceholder',
|
|
50
42
|
message: "Search ".concat(translatedValue, " ..."),
|
|
51
43
|
values: { translatedValue: translatedValue }
|
|
52
|
-
}), onChange: onChangeInputValue, onClear: onClear, onClick: onDisplayInput, displayInput: displayInput, isMobileInputView: isMobileInputView })), _jsx(ExtraControlButtons, { extraControlButtons: extraControlButtons, targetPosition: ExtraControlButtonPosition.TopLeft }), _jsx(x.div, { children:
|
|
44
|
+
}), onChange: onChangeInputValue, onClear: onClear, onClick: onDisplayInput, displayInput: displayInput, isMobileInputView: isMobileInputView, alwaysShowClear: isMobile })), _jsx(ExtraControlButtons, { extraControlButtons: extraControlButtons, targetPosition: ExtraControlButtonPosition.TopLeft }), _jsx(x.div, { children: filtersOn && (_jsx(Button, { type: "button", onClick: onClearSettings, variant: "default", appearance: "secondary", "data-cy": "resetFiltersBtn", children: _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset" }) })) })] })), withPresets && gridName && (_jsxs(_Fragment, { children: [_jsx(x.div, { mx: "12px", children: _jsx(Button, { onClick: onOpenPresetsModal, type: "button", variant: "default", appearance: "tertiary", children: _jsx(Trans, { id: "dataGrid.presets.title", message: "Presets" }) }) }), selectedPresetName && (_jsx(Tag, __assign({ size: "medium" }, palettes.redWhite, { children: _jsx(H6, { mt: 0, mb: 0, variant: "semiBold", children: selectedPresetName }) })))] }))] }), _jsxs(Right, { children: [_jsx(ExtraControlButtons, { extraControlButtons: extraControlButtons, targetPosition: ExtraControlButtonPosition.TopRight }), displayManageColumnButton && (_jsx(StyledColumnButton, { type: "button", variant: "ghost", appearance: "primary", iconLeft: _jsx(Settings2, {}), onClick: openManageColumnForm, children: _jsx(H6, { variant: "semiBold", mt: 0, mb: 0, children: _jsx(Trans, { id: "manageColumn.title", message: "Manage column" }) }) }))] })] }));
|
|
53
45
|
};
|
|
54
46
|
export default ControlButtons;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const ControlButtonsContainer: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
|
|
2
3
|
export declare const Left: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
|
|
3
4
|
export declare const Right: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
|
|
@@ -4,8 +4,7 @@ import { CommonGridProps, ExtraControlButton } from '../../types';
|
|
|
4
4
|
export declare const Row: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
|
|
5
5
|
type Props = {
|
|
6
6
|
extraControlButtons: CommonGridProps['extraControlButtons'];
|
|
7
|
-
targetPosition
|
|
8
|
-
isMobile?: boolean;
|
|
7
|
+
targetPosition: ExtraControlButton['position'];
|
|
9
8
|
};
|
|
10
9
|
declare const ExtraControlButtons: FC<Props>;
|
|
11
10
|
export default ExtraControlButtons;
|
|
@@ -16,10 +16,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import Button from '../../../../Elements/Button/Button';
|
|
18
18
|
import DropdownSelect from '../../../../Elements/DropdownSelect';
|
|
19
|
-
import { ExtraControlButtonPosition } from '../../types';
|
|
20
|
-
import ButtonMore from '../ButtonMore/ButtonMore';
|
|
21
19
|
import styled, { x } from '@xstyled/styled-components';
|
|
22
20
|
export var Row = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n & > * {\n margin-right: 12px;\n }\n z-index: 2;\n"], ["\n display: flex;\n & > * {\n margin-right: 12px;\n }\n z-index: 2;\n"])));
|
|
21
|
+
var StyledButton = styled(Button)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: none;\n\n @media (min-width: 1024px) {\n display: block;\n }\n"], ["\n display: none;\n\n @media (min-width: 1024px) {\n display: block;\n }\n"])));
|
|
23
22
|
var ControlButton = function (_a) {
|
|
24
23
|
var hide = _a.hide, node = _a.node, label = _a.label, appearance = _a.appearance, variant = _a.variant, disabled = _a.disabled, onClick = _a.onClick, onSelect = _a.onSelect, options = _a.options, hideChevron = _a.hideChevron, iconLeft = _a.iconLeft, buttonProps = _a.buttonProps;
|
|
25
24
|
if (hide) {
|
|
@@ -31,36 +30,17 @@ var ControlButton = function (_a) {
|
|
|
31
30
|
return (_jsx(DropdownSelect, { label: label || '', appearance: appearance || 'secondary', variant: variant || 'default', options: options, showChevron: !hideChevron, onSelect: onSelect, disabled: disabled }));
|
|
32
31
|
}
|
|
33
32
|
else {
|
|
34
|
-
return (_jsx(
|
|
33
|
+
return (_jsx(StyledButton, __assign({ type: "button", onClick: onClick, disabled: disabled, variant: variant || 'default', appearance: appearance || 'primary', iconLeft: iconLeft }, buttonProps, { children: label })));
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
36
|
var ExtraControlButtons = function (_a) {
|
|
38
|
-
var extraControlButtons = _a.extraControlButtons,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var onSelect = _a.onSelect, onClick = _a.onClick, options = _a.options, label = _a.label;
|
|
46
|
-
if (options && onSelect) {
|
|
47
|
-
return options.map(function (option) { return ({
|
|
48
|
-
title: typeof label === 'string' && !option.label.startsWith(String(label)) ? "".concat(label, ": ").concat(option.label) : option.label,
|
|
49
|
-
onClick: function () {
|
|
50
|
-
onSelect(option.value);
|
|
51
|
-
}
|
|
52
|
-
}); });
|
|
53
|
-
}
|
|
54
|
-
if (label && onClick) {
|
|
55
|
-
return [{ title: label, onClick: onClick }];
|
|
56
|
-
}
|
|
57
|
-
return [];
|
|
58
|
-
});
|
|
59
|
-
if (items.length === 0)
|
|
60
|
-
return null;
|
|
61
|
-
return _jsx(ButtonMore, { items: items });
|
|
62
|
-
}
|
|
63
|
-
return (_jsx(Row, { children: buttons.map(function (button, idx) { return (_jsx(x.div, { children: _jsx(ControlButton, __assign({}, button)) }, idx)); }) }));
|
|
37
|
+
var extraControlButtons = _a.extraControlButtons, targetPosition = _a.targetPosition;
|
|
38
|
+
return (_jsx(Row, { children: (extraControlButtons || [])
|
|
39
|
+
.filter(function (_a) {
|
|
40
|
+
var position = _a.position;
|
|
41
|
+
return position == targetPosition;
|
|
42
|
+
})
|
|
43
|
+
.map(function (button, idx) { return (_jsx(x.div, { children: _jsx(ControlButton, __assign({}, button)) }, idx)); }) }));
|
|
64
44
|
};
|
|
65
45
|
export default ExtraControlButtons;
|
|
66
|
-
var templateObject_1;
|
|
46
|
+
var templateObject_1, templateObject_2;
|
|
@@ -11,7 +11,6 @@ type DatePickerRangeProps = FilterComponentProps<Date[]> & {
|
|
|
11
11
|
type DateRangeProps = DatePickerRangeProps & {
|
|
12
12
|
error?: string;
|
|
13
13
|
label?: string;
|
|
14
|
-
compact?: boolean;
|
|
15
14
|
};
|
|
16
15
|
declare const DatePickerRange: FC<DateRangeProps>;
|
|
17
16
|
export default DatePickerRange;
|
|
@@ -33,27 +33,15 @@ import { useClickOutside } from '../../../../Modal/hooks/useClickOutside';
|
|
|
33
33
|
import { getCleanValues } from './utils/getCleanValues';
|
|
34
34
|
import { pickerRangeToString } from './utils/pickerRangeToString';
|
|
35
35
|
import { i18n } from '@lingui/core';
|
|
36
|
-
import styled
|
|
37
|
-
var RangeWrapper = styled.div(
|
|
38
|
-
var $compact = _a.$compact;
|
|
39
|
-
return ($compact ? 'flex' : 'inline-flex');
|
|
40
|
-
}, function (_a) {
|
|
41
|
-
var $compact = _a.$compact;
|
|
42
|
-
return ($compact ? 'column' : 'row');
|
|
43
|
-
}, function (_a) {
|
|
44
|
-
var $compact = _a.$compact;
|
|
45
|
-
return ($compact ? '0' : '20px');
|
|
46
|
-
}, function (_a) {
|
|
47
|
-
var $compact = _a.$compact;
|
|
48
|
-
return $compact && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .rdtPicker {\n min-width: unset;\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 0.5rem;\n }\n .rdtPicker .rdtDays {\n min-width: unset;\n }\n .rdtPicker td {\n padding: 0 0.2rem;\n }\n "], ["\n .rdtPicker {\n min-width: unset;\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 0.5rem;\n }\n .rdtPicker .rdtDays {\n min-width: unset;\n }\n .rdtPicker td {\n padding: 0 0.2rem;\n }\n "])));
|
|
49
|
-
});
|
|
36
|
+
import styled from '@xstyled/styled-components';
|
|
37
|
+
var RangeWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n margin-right: 20px;\n"], ["\n display: inline-flex;\n margin-right: 20px;\n"])));
|
|
50
38
|
var OverlayComponentDefault = function (_a) {
|
|
51
39
|
var children = _a.children;
|
|
52
40
|
return _jsx("div", { children: children });
|
|
53
41
|
};
|
|
54
42
|
var DatePickerRange = function (props) {
|
|
55
43
|
var _a, _b, _c;
|
|
56
|
-
var onChange = props.onChange, error = props.error, label = props.label, value = props.value, others = props.others, filterTime = props.filterTime, initialView = props.initialView,
|
|
44
|
+
var onChange = props.onChange, error = props.error, label = props.label, value = props.value, others = props.others, filterTime = props.filterTime, initialView = props.initialView, _d = props.OverlayComponent, OverlayComponent = _d === void 0 ? OverlayComponentDefault : _d, rest = __rest(props, ["onChange", "error", "label", "value", "others", "filterTime", "initialView", "OverlayComponent"]);
|
|
57
45
|
var _e = useState((_a = value === null || value === void 0 ? void 0 : value[0]) !== null && _a !== void 0 ? _a : undefined), startRangeValue = _e[0], setStartRangeValue = _e[1];
|
|
58
46
|
var _f = useState((_b = value === null || value === void 0 ? void 0 : value[1]) !== null && _b !== void 0 ? _b : undefined), endRangeValue = _f[0], setEndRangeValue = _f[1];
|
|
59
47
|
var timeFormat = filterTime ? 'HH:mm' : false;
|
|
@@ -106,7 +94,7 @@ var DatePickerRange = function (props) {
|
|
|
106
94
|
// Check if the second value is not selected and the first value is the same as the initial value
|
|
107
95
|
var secondDatePickerValue = cleanValue[1] === null ? cleanValue[0] : cleanValue[1];
|
|
108
96
|
var ref = useClickOutside({ onClose: onClose });
|
|
109
|
-
return (_jsxs("div", { ref: ref, children: [_jsx(Input, { name: props.name, placeholder: placeholder, type: "text", icon: "calendar", value: pickerRangeToString(cleanValue, others), label: props.label, onFocus: openPicker, iconOnClick: openPicker, onClear: clear, error: error, readOnly: true }), _jsx(OverlayComponent, { children: _jsx(_Fragment, { children: isOpen && (_jsxs(RangeWrapper, {
|
|
97
|
+
return (_jsxs("div", { ref: ref, children: [_jsx(Input, { name: props.name, placeholder: placeholder, type: "text", icon: "calendar", value: pickerRangeToString(cleanValue, others), label: props.label, onFocus: openPicker, iconOnClick: openPicker, onClear: clear, error: error, readOnly: true }), _jsx(OverlayComponent, { children: _jsx(_Fragment, { children: isOpen && (_jsxs(RangeWrapper, { className: "ignore-element-for-closing-hook", children: [_jsx(DatePicker, __assign({}, rest, { timeFormat: timeFormat, value: (_c = cleanValue[0]) !== null && _c !== void 0 ? _c : '', initialViewDate: initialViewDate[0], secondValue: endRangeValue, onChange: setDateFrom, others: others === null || others === void 0 ? void 0 : others[0], onChangeOthers: handleOthersChangeFrom, icon: false, label: isOpen && i18n._({ id: 'dataGrid.filterCell.from', message: 'From' }), isValidDate: isValidDateFrom, input: false, spaceAround: true, open: true })), _jsx(DatePicker, __assign({}, rest, { timeFormat: timeFormat, value: secondDatePickerValue, initialViewDate: initialViewDate[1], secondValue: startRangeValue, onChange: setDateTo, others: others === null || others === void 0 ? void 0 : others[1], onChangeOthers: handleOthersChangeTo, icon: false, label: isOpen && i18n._({ id: 'dataGrid.filterCell.to', message: 'To' }), isValidDate: isValidDateTo, input: false, spaceAround: true, open: true, isSecondDatePicker: true }))] })) }) })] }));
|
|
110
98
|
};
|
|
111
99
|
export default DatePickerRange;
|
|
112
|
-
var templateObject_1
|
|
100
|
+
var templateObject_1;
|
|
@@ -19,8 +19,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
23
|
-
return g
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -4,7 +4,5 @@ import { Trans } from '@lingui/react';
|
|
|
4
4
|
import { x } from '@xstyled/styled-components';
|
|
5
5
|
export var GridInfo = function (_a) {
|
|
6
6
|
var isSortTerminatedAppeal = _a.isSortTerminatedAppeal, isSortTerminated = _a.isSortTerminated;
|
|
7
|
-
|
|
8
|
-
return null;
|
|
9
|
-
return (_jsxs(x.span, { w: "100%", ml: "8px", fontSize: "12px", display: "flex", gap: "8px", alignItems: "center", children: [isSortTerminatedAppeal && !isSortTerminated && (_jsxs(_Fragment, { children: [_jsx(Icon, { icon: "circleTriangle", size: "20px", fill: "yellow70" }), _jsx(Trans, { id: "dataGrid.sortingTerminatedAppeal", message: "Too many results, please set a filter" })] })), isSortTerminated && (_jsxs(_Fragment, { children: [_jsx(Icon, { icon: "circleTriangle", size: "20px", fill: "dangerColor" }), _jsx(Trans, { id: "dataGrid.sortingTerminated", message: "Too many results, sorting cannot be used" })] }))] }));
|
|
7
|
+
return (_jsxs(x.span, { ml: "8px", fontSize: "12px", display: "flex", gap: "8px", alignItems: "center", children: [isSortTerminatedAppeal && !isSortTerminated && (_jsxs(_Fragment, { children: [_jsx(Icon, { icon: "circleTriangle", size: "20px", fill: "yellow70" }), _jsx(Trans, { id: "dataGrid.sortingTerminatedAppeal", message: "Too many results, please set a filter" })] })), isSortTerminated && (_jsxs(_Fragment, { children: [_jsx(Icon, { icon: "circleTriangle", size: "20px", fill: "dangerColor" }), _jsx(Trans, { id: "dataGrid.sortingTerminated", message: "Too many results, sorting cannot be used" })] }))] }));
|
|
10
8
|
};
|
|
@@ -3,7 +3,7 @@ import { FC } from 'react';
|
|
|
3
3
|
export declare const List: import('styled-components').StyledComponent<"ul", import('@xstyled/system').Theme, {}, never>;
|
|
4
4
|
export declare const ListItem: import('styled-components').StyledComponent<"li", import('@xstyled/system').Theme, {}, never>;
|
|
5
5
|
export declare const ListItemContent: import('styled-components').StyledComponent<"span", import('@xstyled/system').Theme, {
|
|
6
|
-
selected?: boolean;
|
|
6
|
+
selected?: boolean | undefined;
|
|
7
7
|
}, never>;
|
|
8
8
|
export declare const ListItemIcon: import('styled-components').StyledComponent<"span", import('@xstyled/system').Theme, {}, never>;
|
|
9
9
|
type Item = {
|
|
@@ -10,5 +10,5 @@ type QuickFilterProps = {
|
|
|
10
10
|
isMobileInputView?: boolean;
|
|
11
11
|
alwaysShowClear?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare const QuickFilter: ({ searchedValue, placeholderText, onChange, onClick, displayInput, onClear, isMobileInputView, alwaysShowClear }: QuickFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const QuickFilter: ({ searchedValue, placeholderText, onChange, onClick, displayInput, onClear, isMobileInputView, alwaysShowClear, }: QuickFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default QuickFilter;
|
|
@@ -3,9 +3,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import Button from '../../../../Elements/Button';
|
|
7
6
|
import Input from '../../../../Forms/Input';
|
|
8
7
|
import styled, { x } from '@xstyled/styled-components';
|
|
8
|
+
import Button from '../../../../Elements/Button';
|
|
9
9
|
var StyledInput = styled(Input)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: ", ";\n z-index: ", ";\n width: ", ";\n"], ["\n position: ", ";\n z-index: ", ";\n width: ", ";\n"])), function (_a) {
|
|
10
10
|
var isMobileInputView = _a.isMobileInputView;
|
|
11
11
|
return (isMobileInputView ? 'absolute' : 'relative');
|
|
@@ -14,7 +14,7 @@ var StyledInput = styled(Input)(templateObject_1 || (templateObject_1 = __makeTe
|
|
|
14
14
|
return (isMobileInputView ? '3' : '1');
|
|
15
15
|
}, function (_a) {
|
|
16
16
|
var isMobileInputView = _a.isMobileInputView;
|
|
17
|
-
return (isMobileInputView ? '
|
|
17
|
+
return (isMobileInputView ? '90vw' : 'auto');
|
|
18
18
|
});
|
|
19
19
|
var QuickFilter = function (_a) {
|
|
20
20
|
var searchedValue = _a.searchedValue, placeholderText = _a.placeholderText, onChange = _a.onChange, onClick = _a.onClick, displayInput = _a.displayInput, onClear = _a.onClear, isMobileInputView = _a.isMobileInputView, alwaysShowClear = _a.alwaysShowClear;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
export declare const Row: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
|
|
2
|
-
hasRowClick?: boolean;
|
|
3
|
-
align?: string;
|
|
2
|
+
hasRowClick?: boolean | undefined;
|
|
3
|
+
align?: string | undefined;
|
|
4
4
|
}, never>;
|
|
5
5
|
export declare const Cell: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
|
|
6
|
-
align?: string;
|
|
7
|
-
flexBasis?: number;
|
|
8
|
-
flexGrow?: number;
|
|
9
|
-
flexShrink?: number;
|
|
10
|
-
transition?: string;
|
|
11
|
-
transform?: string;
|
|
6
|
+
align?: string | undefined;
|
|
7
|
+
flexBasis?: number | undefined;
|
|
8
|
+
flexGrow?: number | undefined;
|
|
9
|
+
flexShrink?: number | undefined;
|
|
10
|
+
transition?: string | undefined;
|
|
11
|
+
transform?: string | undefined;
|
|
12
12
|
}, never>;
|
|
13
13
|
export declare const StyledDataRow: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
|
|
14
|
-
hasRowClick?: boolean;
|
|
15
|
-
align?: string;
|
|
14
|
+
hasRowClick?: boolean | undefined;
|
|
15
|
+
align?: string | undefined;
|
|
16
16
|
} & {
|
|
17
17
|
isEven: boolean;
|
|
18
18
|
}, never>;
|
|
19
19
|
export declare const TextCell: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
|
|
20
|
-
align?: string;
|
|
21
|
-
flexBasis?: number;
|
|
22
|
-
flexGrow?: number;
|
|
23
|
-
flexShrink?: number;
|
|
24
|
-
transition?: string;
|
|
25
|
-
transform?: string;
|
|
20
|
+
align?: string | undefined;
|
|
21
|
+
flexBasis?: number | undefined;
|
|
22
|
+
flexGrow?: number | undefined;
|
|
23
|
+
flexShrink?: number | undefined;
|
|
24
|
+
transition?: string | undefined;
|
|
25
|
+
transform?: string | undefined;
|
|
26
26
|
}, never>;
|
|
27
27
|
export declare const MessageCell: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
|
|
28
|
-
align?: string;
|
|
29
|
-
flexBasis?: number;
|
|
30
|
-
flexGrow?: number;
|
|
31
|
-
flexShrink?: number;
|
|
32
|
-
transition?: string;
|
|
33
|
-
transform?: string;
|
|
28
|
+
align?: string | undefined;
|
|
29
|
+
flexBasis?: number | undefined;
|
|
30
|
+
flexGrow?: number | undefined;
|
|
31
|
+
flexShrink?: number | undefined;
|
|
32
|
+
transition?: string | undefined;
|
|
33
|
+
transform?: string | undefined;
|
|
34
34
|
}, never>;
|
|
35
35
|
declare const variantColors: {
|
|
36
36
|
error: (props: import('@xstyled/util').Props<import('@xstyled/system').Theme>) => import('@xstyled/system').CSSScalar;
|
|
37
37
|
info: (props: import('@xstyled/util').Props<import('@xstyled/system').Theme>) => import('@xstyled/system').CSSScalar;
|
|
38
38
|
};
|
|
39
39
|
export declare const MessageCellBody: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
|
|
40
|
-
align?: string;
|
|
41
|
-
flexBasis?: number;
|
|
42
|
-
flexGrow?: number;
|
|
43
|
-
flexShrink?: number;
|
|
44
|
-
transition?: string;
|
|
45
|
-
transform?: string;
|
|
40
|
+
align?: string | undefined;
|
|
41
|
+
flexBasis?: number | undefined;
|
|
42
|
+
flexGrow?: number | undefined;
|
|
43
|
+
flexShrink?: number | undefined;
|
|
44
|
+
transition?: string | undefined;
|
|
45
|
+
transform?: string | undefined;
|
|
46
46
|
} & {
|
|
47
47
|
variant: keyof typeof variantColors;
|
|
48
48
|
}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridActionsType, ColumnDefinition } from '../types';
|
|
2
2
|
|
|
3
3
|
type AddFilterRet = (value: any, column: ColumnDefinition, others?: any) => void;
|
|
4
|
-
export declare const useAddFilter: (onChange: Required<GridActionsType>[
|
|
4
|
+
export declare const useAddFilter: (onChange: Required<GridActionsType>['addFilter']) => AddFilterRet;
|
|
5
5
|
export {};
|
|
@@ -9,5 +9,5 @@ type ReturnProps = {
|
|
|
9
9
|
gridBoxRef: React.MutableRefObject<HTMLElement>;
|
|
10
10
|
handleResizeDrag: (column: string, width: number) => void;
|
|
11
11
|
};
|
|
12
|
-
declare const useColumnSizes: (displayColumnsDefinitions: CommonGridProps[
|
|
12
|
+
declare const useColumnSizes: (displayColumnsDefinitions: CommonGridProps['columnsDefinitions'], storeColumnsWidth: Required<GridSelectorsType>['columnsWidth'], storeColumnsWidthVariant: GridSelectorsType['columnsWidthVariant'], setColumnWidth: Required<GridActionsType>['setColumnWidth'], columnLayout: Required<CommonGridProps>['columnLayout'], minColumnWidth?: number) => ReturnProps;
|
|
13
13
|
export default useColumnSizes;
|
|
@@ -5,5 +5,5 @@ import { RowProps, UxState, ActionColumn, OnBatchActionFn } from '../types';
|
|
|
5
5
|
* returns [subset of actions that are enabled, onSelect(value) - param1: selected action value]
|
|
6
6
|
*/
|
|
7
7
|
type GridActionTriggerRet = [Required<ActionColumn>['actionOptions'], (value: any) => void];
|
|
8
|
-
export declare const useGridActionTrigger: (rowsData: RowProps[], uxState: UxState, actionOptions?: ActionColumn[
|
|
8
|
+
export declare const useGridActionTrigger: (rowsData: RowProps[], uxState: UxState, actionOptions?: ActionColumn['actionOptions'], onBatchAction?: OnBatchActionFn) => GridActionTriggerRet;
|
|
9
9
|
export {};
|
|
@@ -11,7 +11,7 @@ declare const useManageColumn: ({ columns, gridSelectors, gridActions, onClose }
|
|
|
11
11
|
columnsConfigValues: string[];
|
|
12
12
|
setColumnsConfigOptions: import('react').Dispatch<import('react').SetStateAction<{
|
|
13
13
|
[x: string]: {
|
|
14
|
-
isHidden?: boolean;
|
|
14
|
+
isHidden?: boolean | undefined;
|
|
15
15
|
};
|
|
16
16
|
}>>;
|
|
17
17
|
onConfirmForm: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { RowProps, UxState } from '../types';
|
|
3
3
|
|
|
4
|
-
declare const useRowsKeyControls: (rowsData: RowProps[], uxState: UxState, onUxChange?: (uxKey: keyof UxState, uxValue: any) => void) => (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
4
|
+
declare const useRowsKeyControls: (rowsData: RowProps[], uxState: UxState, onUxChange?: ((uxKey: keyof UxState, uxValue: any) => void) | undefined) => (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
5
5
|
export default useRowsKeyControls;
|
|
@@ -5,5 +5,5 @@ import { RowProps, GridActionsType, UxState } from '../types';
|
|
|
5
5
|
* returns [checked state, toggleAllHandler()] for checkbox
|
|
6
6
|
*/
|
|
7
7
|
type ToggleAllCheckboxRet = [boolean, () => void];
|
|
8
|
-
export declare const useToggleAllCheckbox: (rowsData?: RowProps[], uxState?: UxState, handleUxChange?: GridActionsType[
|
|
8
|
+
export declare const useToggleAllCheckbox: (rowsData?: RowProps[], uxState?: UxState, handleUxChange?: GridActionsType['handleUxChange']) => ToggleAllCheckboxRet;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RowProps, GridActionsType, UxState } from '../types';
|
|
2
2
|
|
|
3
|
-
declare const useUxReset: (rowsData: RowProps[], uxState: UxState, clearUxState: GridActionsType[
|
|
3
|
+
declare const useUxReset: (rowsData: RowProps[], uxState: UxState, clearUxState: GridActionsType['clearUxState']) => any;
|
|
4
4
|
export default useUxReset;
|