@mailstep/design-system 0.7.47 → 0.7.48-beta.2
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/hooks/useEditReadAsColumn.js +23 -28
- package/ui/Blocks/CommonGrid/utils/index.js +4 -2
- package/ui/ThemeProvider/themes/index.d.ts +1 -0
- package/ui/ThemeProvider/themes/mailwise.d.ts +1 -0
- package/ui/ThemeProvider/themes/mailwise.js +1 -0
- package/ui/index.es.js +6945 -6940
- package/ui/index.umd.js +396 -396
package/package.json
CHANGED
|
@@ -25,44 +25,39 @@ var useEditReadAsColumn = function (props) {
|
|
|
25
25
|
return onRowAction(id, field, value, rowData);
|
|
26
26
|
}
|
|
27
27
|
}, [onRowAction, onRowEditClick, onRowReadClick]);
|
|
28
|
-
var _b = actionColumnDefinition || {}, canRowEdit = _b.canRowEdit, canRowRead = _b.canRowRead, addRowNumbers = _b.addRowNumbers, _c = _b.stickTo, stickTo = _c === void 0 ? 'left' : _c, _d = _b.flexBasis, flexBasis = _d === void 0 ?
|
|
28
|
+
var _b = actionColumnDefinition || {}, canRowEdit = _b.canRowEdit, canRowRead = _b.canRowRead, addRowNumbers = _b.addRowNumbers, _c = _b.stickTo, stickTo = _c === void 0 ? 'left' : _c, _d = _b.flexBasis, flexBasis = _d === void 0 ? 16 : _d;
|
|
29
29
|
var withCheckboxes = !!((_a = actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.actionOptions) === null || _a === void 0 ? void 0 : _a.length) || (actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.forceCheckboxes);
|
|
30
|
+
var hasActions = canRowEdit || canRowRead || withCheckboxes || addRowNumbers;
|
|
30
31
|
var modifiedColumnsDefinitions = useMemo(function () {
|
|
31
32
|
var _a;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return __spreadArray([editReadColumnDefinition], columnsDefinitions, true);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return __spreadArray(__spreadArray([], columnsDefinitions, true), [editReadColumnDefinition], false);
|
|
55
|
-
}
|
|
33
|
+
var editReadColumnDefinition = {
|
|
34
|
+
name: 'actions-cell-cg',
|
|
35
|
+
flexBasis: flexBasis,
|
|
36
|
+
filtering: withCheckboxes || addRowNumbers,
|
|
37
|
+
filteringType: 'actions',
|
|
38
|
+
sorting: false,
|
|
39
|
+
sticky: !!hasActions,
|
|
40
|
+
stickTo: stickTo,
|
|
41
|
+
alwaysOn: true,
|
|
42
|
+
cellComponent: withProps({
|
|
43
|
+
actionColumnDefinition: actionColumnDefinition,
|
|
44
|
+
withCheckboxes: withCheckboxes,
|
|
45
|
+
addRowNumbers: actionColumnDefinition === null || actionColumnDefinition === void 0 ? void 0 : actionColumnDefinition.addRowNumbers,
|
|
46
|
+
checkedRows: (_a = gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.uxState) === null || _a === void 0 ? void 0 : _a.checkedRows,
|
|
47
|
+
onUxChange: gridActions === null || gridActions === void 0 ? void 0 : gridActions.handleUxChange
|
|
48
|
+
})(RowActionsCell)
|
|
49
|
+
};
|
|
50
|
+
if (stickTo === EditReadPosition.Left) {
|
|
51
|
+
return __spreadArray([editReadColumnDefinition], columnsDefinitions, true);
|
|
56
52
|
}
|
|
57
53
|
else {
|
|
58
|
-
return columnsDefinitions;
|
|
54
|
+
return __spreadArray(__spreadArray([], columnsDefinitions, true), [editReadColumnDefinition], false);
|
|
59
55
|
}
|
|
60
56
|
}, [
|
|
61
57
|
addRowNumbers,
|
|
62
58
|
flexBasis,
|
|
63
59
|
stickTo,
|
|
64
|
-
|
|
65
|
-
canRowRead,
|
|
60
|
+
hasActions,
|
|
66
61
|
columnsDefinitions,
|
|
67
62
|
withCheckboxes,
|
|
68
63
|
gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.uxState,
|
|
@@ -80,12 +80,14 @@ export var checksColumnsOrder = function (colsOrder, columnsDefinitions) {
|
|
|
80
80
|
if (stickyLeftColls.length > 1 || stickyRightColls.length > 1) {
|
|
81
81
|
console.error('Grid can have only sticky column on each side.');
|
|
82
82
|
}
|
|
83
|
-
if (stickyLeftColls.length &&
|
|
83
|
+
if (stickyLeftColls.length &&
|
|
84
|
+
colsOrder.indexOf(stickyLeftColls[0].name) !== 0 &&
|
|
85
|
+
stickyLeftColls[0].name !== 'actions-cell-cg') {
|
|
84
86
|
console.error('The left sticky column should be the first one in a row');
|
|
85
87
|
}
|
|
86
88
|
if (stickyRightColls.length &&
|
|
87
89
|
colsOrder.indexOf(stickyRightColls[0].name) !== colsOrder.length - 1 &&
|
|
88
|
-
stickyRightColls[0].name !== 'actions') {
|
|
90
|
+
stickyRightColls[0].name !== 'actions-cell-cg') {
|
|
89
91
|
console.error('The Right sticky column should be the last one in a row');
|
|
90
92
|
}
|
|
91
93
|
};
|
|
@@ -160,6 +160,7 @@ var defaultTheme = {
|
|
|
160
160
|
headerShadow: '1px 2px 3px #00000029',
|
|
161
161
|
headerShadowB: '1px 1px 3px #00000029',
|
|
162
162
|
headerShadowNotifications: '1px 1px 2px #00000029',
|
|
163
|
+
gridShadow: '0px 1px 4px 0px rgba(0, 0, 0, 0.12)',
|
|
163
164
|
cornerDialogShadow: '1px 1px 3px 1px #00000029'
|
|
164
165
|
},
|
|
165
166
|
space: {
|