@mailstep/design-system 0.7.47-beta.11 → 0.7.47-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/Blocks/CommonGrid/components/Filters/ActionsFilter/ActionsFilter.js +2 -2
- package/ui/Blocks/CommonGrid/components/HeadRow.js +3 -3
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +1 -1
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +5 -5
- package/ui/index.es.js +3431 -3434
- package/ui/index.umd.js +219 -219
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Checkbox from '../../../../../Forms/Checkbox';
|
|
3
3
|
import { useToggleAllCheckbox } from '../../../hooks/useToggleAllCheckbox';
|
|
4
4
|
import { x } from '@xstyled/styled-components';
|
|
@@ -9,6 +9,6 @@ var ActionFilter = function (_a) {
|
|
|
9
9
|
var displayRowNumberLabel = actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.addRowNumbers;
|
|
10
10
|
var rowsNumberLabel = (_b = actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.addRowNumbersLabel) !== null && _b !== void 0 ? _b : '#';
|
|
11
11
|
var displayCheckbox = ((_c = actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.actionOptions) === null || _c === void 0 ? void 0 : _c.length) || (actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.forceCheckboxes);
|
|
12
|
-
return (_jsxs(
|
|
12
|
+
return (_jsxs(x.div, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "16px", children: [displayCheckbox && (_jsx(x.div, { pl: "8px", children: _jsx(Checkbox, { checked: allChecked, onChange: toggleCheckbox, label: "" }, "check-all") })), displayRowNumberLabel && _jsx(x.div, { pr: "8px", children: rowsNumberLabel })] }));
|
|
13
13
|
};
|
|
14
14
|
export default ActionFilter;
|
|
@@ -9,10 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx,
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import React, { useEffect, useState } from 'react';
|
|
14
14
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
15
|
-
import {
|
|
15
|
+
import { getCellSizeProps, getGroupClassNames, getSortName, getStickyCollClassNames } from '../utils';
|
|
16
16
|
import ColumnTitle from './ColumnTitle';
|
|
17
17
|
import Resize from './Resize';
|
|
18
18
|
import { Row, Cell } from './Table';
|
|
@@ -42,7 +42,7 @@ var HeadRow = function (_a) {
|
|
|
42
42
|
var onSetSort = React.useCallback(function (name, systemName) { return function (value) {
|
|
43
43
|
onAddSort && onAddSort(systemName || name, value);
|
|
44
44
|
}; }, [onAddSort]);
|
|
45
|
-
return (_jsx(_Fragment, { children: showUIElements && (_jsx(DragDropContext, { onDragEnd: handleDragEnd, children: _jsx(Droppable, { droppableId: "droppable", direction: "horizontal", isDropDisabled: isDragDisabled, isCombineEnabled: false, ignoreContainerClipping: false, children: function (droppableProvided) { return (_jsxs(Row, __assign({ className: "headRow", accountForScrollbar: false, ref: droppableProvided.innerRef }, droppableProvided.droppableProps, { children: [
|
|
45
|
+
return (_jsx(_Fragment, { children: showUIElements && (_jsx(DragDropContext, { onDragEnd: handleDragEnd, children: _jsx(Droppable, { droppableId: "droppable", direction: "horizontal", isDropDisabled: isDragDisabled, isCombineEnabled: false, ignoreContainerClipping: false, children: function (droppableProvided) { return (_jsxs(Row, __assign({ className: "headRow", accountForScrollbar: false, ref: droppableProvided.innerRef }, droppableProvided.droppableProps, { children: [getStickyComponent(columns, 'left', displayColumnsWidth), columns
|
|
46
46
|
.filter(function (item) { return !item.sticky; })
|
|
47
47
|
.map(function (column, index) { return (_jsx(Draggable, { draggableId: column.name, index: index, isDragDisabled: isDragDisabled || column.sticky, children: function (_a) {
|
|
48
48
|
var _b;
|
|
@@ -53,5 +53,5 @@ export var RowActionsCell = function (_a) {
|
|
|
53
53
|
onClick();
|
|
54
54
|
}
|
|
55
55
|
}, [onClick]);
|
|
56
|
-
return (_jsxs(x.div, { w: "100%", display: "flex", gap: "16px", pl: "8px", pr: "8px", children: [withCheckboxes && (_jsx(x.div, { w: "100%", children: _jsx(Checkbox, { checked: isChecked, onChange: onCheckboxChange, label: "" }) })), addRowNumbers && _jsx(x.div, { children: rowIndex }), canEdit && _jsx(IconButtonInCell, { icon: "pen", onClick: handleOnClick, linkTo: linkTo }, "edit"), !canEdit && canRead && _jsx(IconButtonInCell, { icon: "chevronRight", onClick: handleOnClick, linkTo: linkTo }, "read")] }));
|
|
56
|
+
return (_jsxs(x.div, { w: "100%", display: "flex", gap: "16px", pl: "8px", pr: "8px", children: [withCheckboxes && (_jsx(x.div, { w: "100%", children: _jsx(Checkbox, { checked: isChecked, onChange: onCheckboxChange, label: "" }) })), addRowNumbers && (_jsx(x.div, { display: "flex", alignItems: "center", pr: "8px", children: rowIndex })), canEdit && _jsx(IconButtonInCell, { icon: "pen", onClick: handleOnClick, linkTo: linkTo }, "edit"), !canEdit && canRead && _jsx(IconButtonInCell, { icon: "chevronRight", onClick: handleOnClick, linkTo: linkTo }, "read")] }));
|
|
57
57
|
};
|
|
@@ -9,11 +9,11 @@ import { columnDefinitions, enumColumn } from '../utils/columnDefinition';
|
|
|
9
9
|
import { ReduxGrid, createRandomData, enumValues, gridDummyActions } from '../utils/utils';
|
|
10
10
|
import withRedux from '../utils/withRedux';
|
|
11
11
|
var ActionColumnButtons = {
|
|
12
|
-
flexBasis:
|
|
13
|
-
forceCheckboxes:
|
|
14
|
-
addRowNumbers:
|
|
15
|
-
canRowEdit:
|
|
16
|
-
canRowRead:
|
|
12
|
+
flexBasis: 80,
|
|
13
|
+
forceCheckboxes: true,
|
|
14
|
+
addRowNumbers: true,
|
|
15
|
+
canRowEdit: false,
|
|
16
|
+
canRowRead: false
|
|
17
17
|
};
|
|
18
18
|
var FilterSetter = function (_a) {
|
|
19
19
|
var gridActions = _a.gridActions;
|