@majoo-ui/react 1.57.16 → 1.57.17
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/components/barChart/BarChart.d.ts +1 -1
- package/components/table/Table.d.ts +11 -2
- package/index.esm.js +23 -3
- package/index.umd.js +27 -3
- package/package.json +1 -1
|
@@ -1088,10 +1088,19 @@ interface FetchDataParams {
|
|
|
1088
1088
|
sortAccessor?: string;
|
|
1089
1089
|
sortDirection?: string;
|
|
1090
1090
|
}
|
|
1091
|
+
interface getCellPropParams {
|
|
1092
|
+
css?: CSS;
|
|
1093
|
+
sticky?: 'left' | 'right';
|
|
1094
|
+
stickyPosition?: number;
|
|
1095
|
+
shadow?: boolean;
|
|
1096
|
+
}
|
|
1097
|
+
interface CellProp {
|
|
1098
|
+
getCellProps?: (object: getCellPropParams) => object;
|
|
1099
|
+
}
|
|
1091
1100
|
export interface RowGroup {
|
|
1092
1101
|
groupKey: string;
|
|
1093
|
-
headerRender?: (row: Row<object
|
|
1094
|
-
footerRender?: (row: Row<object
|
|
1102
|
+
headerRender?: (row: Row<object>, cell: CellProp) => React.ReactNode;
|
|
1103
|
+
footerRender?: (row: Row<object>, cell: CellProp) => React.ReactNode;
|
|
1095
1104
|
showGroupingWhenSorted?: boolean;
|
|
1096
1105
|
}
|
|
1097
1106
|
interface CustomRowsStyle {
|
package/index.esm.js
CHANGED
|
@@ -19386,7 +19386,7 @@ const defaultFetchDataParams = {
|
|
|
19386
19386
|
pageSize: 10
|
|
19387
19387
|
};
|
|
19388
19388
|
const stickyPositionStyling = column => {
|
|
19389
|
-
if (column.stickyPosition) {
|
|
19389
|
+
if (typeof column.stickyPosition === 'number') {
|
|
19390
19390
|
return column.sticky === 'left' ? {
|
|
19391
19391
|
position: 'sticky',
|
|
19392
19392
|
left: `${column.stickyPosition}px !important`
|
|
@@ -19969,7 +19969,17 @@ function Table({
|
|
|
19969
19969
|
}
|
|
19970
19970
|
}
|
|
19971
19971
|
return jsxs(React.Fragment, {
|
|
19972
|
-
children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row
|
|
19972
|
+
children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row, {
|
|
19973
|
+
getCellProps: cellProps => ({
|
|
19974
|
+
css: Object.assign(Object.assign(Object.assign({}, stickyPositionStyling({
|
|
19975
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
19976
|
+
stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
|
|
19977
|
+
})), stickyShadowStyling({
|
|
19978
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
19979
|
+
shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
|
|
19980
|
+
}, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
|
|
19981
|
+
})
|
|
19982
|
+
}) : jsx(Text$1, Object.assign({
|
|
19973
19983
|
variant: "contentButton"
|
|
19974
19984
|
}, {
|
|
19975
19985
|
children: row.cells[0].render('Cell')
|
|
@@ -20051,7 +20061,17 @@ function Table({
|
|
|
20051
20061
|
}), void 0)
|
|
20052
20062
|
}), void 0)]
|
|
20053
20063
|
}, cell.column.id)]
|
|
20054
|
-
}), cell.column.id)) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row
|
|
20064
|
+
}), cell.column.id)) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
|
|
20065
|
+
getCellProps: cellProps => ({
|
|
20066
|
+
css: Object.assign(Object.assign(Object.assign({}, stickyPositionStyling({
|
|
20067
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
20068
|
+
stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
|
|
20069
|
+
})), stickyShadowStyling({
|
|
20070
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
20071
|
+
shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
|
|
20072
|
+
}, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
|
|
20073
|
+
})
|
|
20074
|
+
}))]
|
|
20055
20075
|
}, row.id);
|
|
20056
20076
|
})
|
|
20057
20077
|
}), void 0), (_b = decoration === null || decoration === void 0 ? void 0 : decoration.footerRender) === null || _b === void 0 ? void 0 : _b.call(decoration)]
|
package/index.umd.js
CHANGED
|
@@ -19690,7 +19690,7 @@
|
|
|
19690
19690
|
pageSize: 10
|
|
19691
19691
|
};
|
|
19692
19692
|
var stickyPositionStyling = function stickyPositionStyling(column) {
|
|
19693
|
-
if (column.stickyPosition) {
|
|
19693
|
+
if (typeof column.stickyPosition === 'number') {
|
|
19694
19694
|
return column.sticky === 'left' ? {
|
|
19695
19695
|
position: 'sticky',
|
|
19696
19696
|
left: "".concat(column.stickyPosition, "px !important")
|
|
@@ -20333,7 +20333,19 @@
|
|
|
20333
20333
|
}
|
|
20334
20334
|
}
|
|
20335
20335
|
return jsxRuntime.jsxs(React__namespace.Fragment, {
|
|
20336
|
-
children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row
|
|
20336
|
+
children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row, {
|
|
20337
|
+
getCellProps: function (cellProps) {
|
|
20338
|
+
return {
|
|
20339
|
+
css: __assign(__assign(__assign({}, stickyPositionStyling({
|
|
20340
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
20341
|
+
stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
|
|
20342
|
+
})), stickyShadowStyling({
|
|
20343
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
20344
|
+
shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
|
|
20345
|
+
}, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
|
|
20346
|
+
};
|
|
20347
|
+
}
|
|
20348
|
+
}) : jsxRuntime.jsx(Text$1, __assign({
|
|
20337
20349
|
variant: "contentButton"
|
|
20338
20350
|
}, {
|
|
20339
20351
|
children: row.cells[0].render('Cell')
|
|
@@ -20425,7 +20437,19 @@
|
|
|
20425
20437
|
}), void 0)]
|
|
20426
20438
|
}, cell.column.id)]
|
|
20427
20439
|
}), cell.column.id);
|
|
20428
|
-
}) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row
|
|
20440
|
+
}) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
|
|
20441
|
+
getCellProps: function (cellProps) {
|
|
20442
|
+
return {
|
|
20443
|
+
css: __assign(__assign(__assign({}, stickyPositionStyling({
|
|
20444
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
20445
|
+
stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
|
|
20446
|
+
})), stickyShadowStyling({
|
|
20447
|
+
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
20448
|
+
shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
|
|
20449
|
+
}, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
|
|
20450
|
+
};
|
|
20451
|
+
}
|
|
20452
|
+
}))]
|
|
20429
20453
|
}, row.id);
|
|
20430
20454
|
})
|
|
20431
20455
|
}), void 0), (_c = decoration === null || decoration === void 0 ? void 0 : decoration.footerRender) === null || _c === void 0 ? void 0 : _c.call(decoration)]
|