@homebound/beam 2.281.0 → 2.282.0
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/dist/components/Table/TableStyles.d.ts +14 -12
- package/dist/components/Table/TableStyles.js +18 -36
- package/dist/components/Table/components/Row.js +3 -4
- package/dist/components/Table/components/cell.d.ts +0 -2
- package/dist/components/Table/components/cell.js +4 -5
- package/dist/components/Table/types.d.ts +1 -1
- package/dist/components/Table/utils/utils.d.ts +1 -2
- package/dist/components/Table/utils/utils.js +2 -11
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { PresentationContextProps, PresentationFieldProps } from "../PresentationContext";
|
|
3
|
-
import { DiscriminateUnion,
|
|
4
|
-
import { Kinded
|
|
5
|
-
import { Palette, Properties } from "../../Css";
|
|
3
|
+
import { DiscriminateUnion, GridDataRow, GridTableApi, RenderCellFn } from "./index";
|
|
4
|
+
import { Kinded } from "./types";
|
|
5
|
+
import { Palette, Properties, Typography } from "../../Css";
|
|
6
6
|
/** Completely static look & feel, i.e. nothing that is based on row kinds/content. */
|
|
7
7
|
export interface GridStyle {
|
|
8
8
|
/** Applied to the base div element. */
|
|
@@ -34,10 +34,6 @@ export interface GridStyle {
|
|
|
34
34
|
firstCellCss?: Properties;
|
|
35
35
|
/** Applied to the last cell of all rows, i.e. for table-wide padding or right-side borders. */
|
|
36
36
|
lastCellCss?: Properties;
|
|
37
|
-
/** Applied to a cell div when `indent: 1` is used. */
|
|
38
|
-
indentOneCss?: Properties;
|
|
39
|
-
/** Applied to a cell div when `indent: 2` is used. */
|
|
40
|
-
indentTwoCss?: Properties;
|
|
41
37
|
/** Applied if there is a fallback/overflow message showing. */
|
|
42
38
|
firstRowMessageCss?: Properties;
|
|
43
39
|
/** Applied on hover if a row has a rowLink/onClick set. */
|
|
@@ -56,16 +52,24 @@ export interface GridStyle {
|
|
|
56
52
|
activeBgColor?: Palette;
|
|
57
53
|
}
|
|
58
54
|
export interface GridStyleDef {
|
|
55
|
+
/** Changes the height of the rows when `rowHeight: fixed` to provide more space between rows for input fields. */
|
|
59
56
|
inlineEditing?: boolean;
|
|
57
|
+
/** Adds styling for grouped rows */
|
|
60
58
|
grouped?: boolean;
|
|
59
|
+
/** 'fixed' height rows do not allow text to wrap. 'flexible' allows for wrapping. Defaults to `flexible` */
|
|
61
60
|
rowHeight?: "fixed" | "flexible";
|
|
62
61
|
/** Enables cells Highlight and hover */
|
|
63
62
|
cellHighlight?: boolean;
|
|
63
|
+
/** Applies a white background to the whole table, including header and group rows. */
|
|
64
64
|
allWhite?: boolean;
|
|
65
|
+
/** Whether to apply a border around the whole table */
|
|
65
66
|
bordered?: boolean;
|
|
67
|
+
/** Whether to show a hover effect on rows. Defaults to true */
|
|
66
68
|
rowHover?: boolean;
|
|
67
69
|
/** Defines the vertical alignment of the content of the cells for the whole table (not including the 'header' rows). Defaults to `center` */
|
|
68
70
|
vAlign?: "top" | "center" | "bottom";
|
|
71
|
+
/** Defines the Typography for the table body's cells (not the header). This only applies to rows that are not nested/grouped */
|
|
72
|
+
cellTypography?: Typography;
|
|
69
73
|
}
|
|
70
74
|
export declare const getTableStyles: (props?: GridStyleDef) => GridStyle;
|
|
71
75
|
export declare const totalsRowHeight = 40;
|
|
@@ -81,8 +85,6 @@ export interface RowStyle<R extends Kinded> {
|
|
|
81
85
|
cellCss?: Properties | ((row: R) => Properties);
|
|
82
86
|
/** Renders the cell element, i.e. a link to get whole-row links. */
|
|
83
87
|
renderCell?: RenderCellFn<R>;
|
|
84
|
-
/** Whether the row should be indented (via a style applied to the 1st cell). */
|
|
85
|
-
indent?: 1 | 2;
|
|
86
88
|
/** Whether the row should be a link. */
|
|
87
89
|
rowLink?: (row: R) => string;
|
|
88
90
|
/** Fired when the row is clicked, similar to rowLink but for actions that aren't 'go to this link'. */
|
|
@@ -92,8 +94,8 @@ export interface RowStyle<R extends Kinded> {
|
|
|
92
94
|
export declare const defaultStyle: GridStyle;
|
|
93
95
|
/** Tightens up the padding of rows, great for rows that have form elements in them. */
|
|
94
96
|
export declare const condensedStyle: GridStyle;
|
|
95
|
-
/** Renders each row as a card.
|
|
97
|
+
/** Renders each row as a card.
|
|
98
|
+
* TODO: Add `cardStyle` option to `getTableStyles` and remove this.
|
|
99
|
+
* */
|
|
96
100
|
export declare const cardStyle: GridStyle;
|
|
97
|
-
/** GridTable as Table utility to apply <tr> element override styles. */
|
|
98
|
-
export declare function tableRowStyles(as: RenderAs, column?: GridColumn<any>): {};
|
|
99
101
|
export declare function resolveStyles(style: GridStyle | GridStyleDef): GridStyle;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveStyles = exports.
|
|
3
|
+
exports.resolveStyles = exports.cardStyle = exports.condensedStyle = exports.defaultStyle = exports.expandableHeaderRowHeight = exports.totalsRowHeight = exports.getTableStyles = void 0;
|
|
4
4
|
const Css_1 = require("../../Css");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
// Returns a "blessed" style of GridTable
|
|
7
7
|
function memoizedTableStyles() {
|
|
8
8
|
const cache = {};
|
|
9
9
|
return (props = {}) => {
|
|
10
|
-
const { inlineEditing = false, grouped = false, rowHeight = "flexible", cellHighlight = false, allWhite = false, bordered = false, vAlign = "center", } = props;
|
|
10
|
+
const { inlineEditing = false, grouped = false, rowHeight = "flexible", cellHighlight = false, allWhite = false, bordered = false, vAlign = "center", cellTypography = "xs", } = props;
|
|
11
11
|
const key = (0, utils_1.safeKeys)(props)
|
|
12
12
|
.sort()
|
|
13
13
|
.map((k) => `${k}_${props[k]}`)
|
|
@@ -45,7 +45,8 @@ function memoizedTableStyles() {
|
|
|
45
45
|
.py0.boxShadow(`inset 0 -1px 0 ${Css_1.Palette.Gray200}`)
|
|
46
46
|
.addIn("&:not(:last-of-type)", Css_1.Css.boxShadow(`inset -1px -1px 0 ${Css_1.Palette.Gray200}`).$).$,
|
|
47
47
|
cellCss: {
|
|
48
|
-
...Css_1.Css.gray900.
|
|
48
|
+
...Css_1.Css[cellTypography].gray900.bgWhite.ai(alignItems).pxPx(12).boxShadow(`inset 0 -1px 0 ${Css_1.Palette.Gray200}`)
|
|
49
|
+
.$,
|
|
49
50
|
...(rowHeight === "flexible" ? Css_1.Css.pyPx(12).$ : Css_1.Css.nowrap.hPx(inlineEditing ? 48 : 36).$),
|
|
50
51
|
...(cellHighlight ? { "&:hover": Css_1.Css.bgGray100.$ } : {}),
|
|
51
52
|
...(bordered && { "&:first-of-type": Css_1.Css.bl.bGray200.$, "&:last-of-type": Css_1.Css.br.bGray200.$ }),
|
|
@@ -54,9 +55,10 @@ function memoizedTableStyles() {
|
|
|
54
55
|
...Css_1.Css.addIn("& > *:first-of-type", Css_1.Css.borderRadius("8px 0 0 0 ").$).addIn("& > *:last-of-type", Css_1.Css.borderRadius("0 8px 0 0").$).$,
|
|
55
56
|
...(bordered && Css_1.Css.addIn("& > *", Css_1.Css.bt.bGray200.$).$),
|
|
56
57
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
// Only apply border radius styles to the last row when using the `bordered` style table.
|
|
59
|
+
lastRowCss: bordered
|
|
60
|
+
? Css_1.Css.addIn("& > *:first-of-type", Css_1.Css.borderRadius("0 0 0 8px").$).addIn("& > *:last-of-type", Css_1.Css.borderRadius("0 0 8px 0").$).$
|
|
61
|
+
: Css_1.Css.addIn("> *", Css_1.Css.bsh0.$).$,
|
|
60
62
|
presentationSettings: { borderless: true, typeScale: "xs", wrap: rowHeight === "flexible" },
|
|
61
63
|
levels: grouped ? groupedLevels : defaultLevels,
|
|
62
64
|
rowHoverColor: Css_1.Palette.LightBlue100,
|
|
@@ -69,28 +71,18 @@ exports.getTableStyles = memoizedTableStyles();
|
|
|
69
71
|
exports.totalsRowHeight = 40;
|
|
70
72
|
exports.expandableHeaderRowHeight = 40;
|
|
71
73
|
/** Our original table look & feel/style. */
|
|
72
|
-
exports.defaultStyle = {
|
|
73
|
-
rootCss: Css_1.Css.gray700.$,
|
|
74
|
-
totalsCellCss: Css_1.Css.bgWhite.$,
|
|
75
|
-
betweenRowsCss: Css_1.Css.bt.bGray400.$,
|
|
76
|
-
firstNonHeaderRowCss: Css_1.Css.add({ borderTopStyle: "none" }).$,
|
|
77
|
-
cellCss: Css_1.Css.py2.px3.$,
|
|
78
|
-
firstCellCss: Css_1.Css.pl1.$,
|
|
79
|
-
lastCellCss: Css_1.Css.$,
|
|
80
|
-
indentOneCss: Css_1.Css.pl4.$,
|
|
81
|
-
indentTwoCss: Css_1.Css.pl7.$,
|
|
82
|
-
headerCellCss: Css_1.Css.nowrap.py1.bgGray100.aife.$,
|
|
83
|
-
firstRowMessageCss: Css_1.Css.tc.py3.$,
|
|
84
|
-
};
|
|
74
|
+
exports.defaultStyle = (0, exports.getTableStyles)({});
|
|
85
75
|
/** Tightens up the padding of rows, great for rows that have form elements in them. */
|
|
86
76
|
exports.condensedStyle = {
|
|
87
|
-
...exports.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
...(0, exports.getTableStyles)({ rowHeight: "fixed" }),
|
|
78
|
+
firstRowMessageCss: {
|
|
79
|
+
...(0, exports.getTableStyles)({ rowHeight: "fixed" }).firstRowMessageCss,
|
|
80
|
+
...Css_1.Css.xs.gray900.$,
|
|
81
|
+
},
|
|
92
82
|
};
|
|
93
|
-
/** Renders each row as a card.
|
|
83
|
+
/** Renders each row as a card.
|
|
84
|
+
* TODO: Add `cardStyle` option to `getTableStyles` and remove this.
|
|
85
|
+
* */
|
|
94
86
|
exports.cardStyle = {
|
|
95
87
|
...exports.defaultStyle,
|
|
96
88
|
betweenRowsCss: {},
|
|
@@ -107,17 +99,6 @@ exports.cardStyle = {
|
|
|
107
99
|
}).p1.m0.xsMd.gray700.$,
|
|
108
100
|
},
|
|
109
101
|
};
|
|
110
|
-
/** GridTable as Table utility to apply <tr> element override styles. */
|
|
111
|
-
function tableRowStyles(as, column) {
|
|
112
|
-
const thWidth = column === null || column === void 0 ? void 0 : column.w;
|
|
113
|
-
return as === "table"
|
|
114
|
-
? {
|
|
115
|
-
...Css_1.Css.dtc.$,
|
|
116
|
-
...(thWidth ? Css_1.Css.w(thWidth).$ : {}),
|
|
117
|
-
}
|
|
118
|
-
: {};
|
|
119
|
-
}
|
|
120
|
-
exports.tableRowStyles = tableRowStyles;
|
|
121
102
|
function resolveStyles(style) {
|
|
122
103
|
const defKeysRecord = {
|
|
123
104
|
inlineEditing: true,
|
|
@@ -128,6 +109,7 @@ function resolveStyles(style) {
|
|
|
128
109
|
bordered: true,
|
|
129
110
|
rowHover: true,
|
|
130
111
|
vAlign: true,
|
|
112
|
+
cellTypography: true,
|
|
131
113
|
};
|
|
132
114
|
const keys = (0, utils_1.safeKeys)(style);
|
|
133
115
|
const defKeys = (0, utils_1.safeKeys)(defKeysRecord);
|
|
@@ -169,17 +169,16 @@ function RowImpl(props) {
|
|
|
169
169
|
// In practice we've not seen any performance issues with this from our "large but
|
|
170
170
|
// not Google spreadsheets" tables.
|
|
171
171
|
const cellCss = {
|
|
172
|
-
// Adding display flex so we can align content within the cells
|
|
173
|
-
...Css_1.Css.df.$,
|
|
172
|
+
// Adding `display: flex` so we can align content within the cells, unless it is displayed as a `table`, then use `table-cell`.
|
|
173
|
+
...Css_1.Css.df.if(as === "table").dtc.$,
|
|
174
174
|
// Apply sticky column/cell styles
|
|
175
175
|
...maybeStickyColumnStyles,
|
|
176
176
|
// Apply any static/all-cell styling
|
|
177
177
|
...style.cellCss,
|
|
178
178
|
// Then override with first/last cell styling
|
|
179
179
|
...(0, utils_1.getFirstOrLastCellCss)(style, columnIndex, columns),
|
|
180
|
-
// Then override with per-cell/per-row justification
|
|
180
|
+
// Then override with per-cell/per-row justification
|
|
181
181
|
...justificationCss,
|
|
182
|
-
...(0, utils_1.getIndentationCss)(style, rowStyle, columnIndex, maybeContent),
|
|
183
182
|
// Then apply any header-specific override
|
|
184
183
|
...(isHeader && style.headerCellCss),
|
|
185
184
|
// Then apply any totals-specific override
|
|
@@ -15,8 +15,6 @@ export type GridCellContent = {
|
|
|
15
15
|
value?: MaybeFn<number | string | Date | boolean | null | undefined>;
|
|
16
16
|
/** The value to use specifically for sorting (i.e. if `value` is used for filtering); defaults to `value`. */
|
|
17
17
|
sortValue?: MaybeFn<number | string | Date | boolean | null | undefined>;
|
|
18
|
-
/** Whether to indent the cell. */
|
|
19
|
-
indent?: 1 | 2;
|
|
20
18
|
colspan?: number;
|
|
21
19
|
typeScale?: Typography;
|
|
22
20
|
/** Allows the cell to stay in place when the user scrolls horizontally, i.e. frozen columns. */
|
|
@@ -4,12 +4,11 @@ exports.rowClickRenderFn = exports.rowLinkRenderFn = exports.headerRenderFn = ex
|
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const react_router_dom_1 = require("react-router-dom");
|
|
6
6
|
const CssReset_1 = require("../../CssReset");
|
|
7
|
-
const TableStyles_1 = require("../TableStyles");
|
|
8
7
|
const Css_1 = require("../../../Css");
|
|
9
8
|
/** Renders our default cell element, i.e. if no row links and no custom renderCell are used. */
|
|
10
9
|
const defaultRenderFn = (as) => (key, css, content, row, rowStyle, classNames, onClick, tooltip) => {
|
|
11
10
|
const Cell = as === "table" ? "td" : "div";
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(Cell, { css: { ...css, ...
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(Cell, { css: { ...css, ...Css_1.Css.cursor("default").$ }, className: classNames, onClick: onClick, children: content }, key));
|
|
13
12
|
};
|
|
14
13
|
exports.defaultRenderFn = defaultRenderFn;
|
|
15
14
|
/**
|
|
@@ -18,14 +17,14 @@ exports.defaultRenderFn = defaultRenderFn;
|
|
|
18
17
|
* */
|
|
19
18
|
const headerRenderFn = (column, as, colSpan) => (key, css, content, row, rowStyle, classNames, onClick, tooltip) => {
|
|
20
19
|
const Cell = as === "table" ? "th" : "div";
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(Cell, { css: { ...css
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(Cell, { css: { ...css }, className: classNames, ...(as === "table" && { colSpan }), children: content }, key));
|
|
22
21
|
};
|
|
23
22
|
exports.headerRenderFn = headerRenderFn;
|
|
24
23
|
/** Renders a cell element when a row link is in play. */
|
|
25
24
|
const rowLinkRenderFn = (as) => (key, css, content, row, rowStyle, classNames, onClick, tooltip) => {
|
|
26
25
|
const to = rowStyle.rowLink(row);
|
|
27
26
|
if (as === "table") {
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)("td", { css: { ...css
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)("td", { css: { ...css }, className: classNames, children: (0, jsx_runtime_1.jsx)(react_router_dom_1.Link, { to: to, css: Css_1.Css.noUnderline.color("unset").db.$, className: CssReset_1.navLink, children: content }) }, key));
|
|
29
28
|
}
|
|
30
29
|
return ((0, jsx_runtime_1.jsx)(react_router_dom_1.Link, { to: to, css: { ...Css_1.Css.noUnderline.color("unset").$, ...css }, className: `${CssReset_1.navLink} ${classNames}`, children: content }, key));
|
|
31
30
|
};
|
|
@@ -33,7 +32,7 @@ exports.rowLinkRenderFn = rowLinkRenderFn;
|
|
|
33
32
|
/** Renders a cell that will fire the RowStyle.onClick. */
|
|
34
33
|
const rowClickRenderFn = (as, api) => (key, css, content, row, rowStyle, classNames, onClick, tooltip) => {
|
|
35
34
|
const Cell = as === "table" ? "td" : "div";
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(Cell, { ...{ key }, css: { ...css
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(Cell, { ...{ key }, css: { ...css }, className: classNames, onClick: (e) => {
|
|
37
36
|
rowStyle.onClick(row, api);
|
|
38
37
|
onClick && onClick();
|
|
39
38
|
}, children: content }));
|
|
@@ -68,7 +68,7 @@ export type GridColumn<R extends Kinded> = {
|
|
|
68
68
|
sticky?: "left" | "right";
|
|
69
69
|
/** Prevent column from supporting RowStyle.onClick/rowLink in order to avoid nested interactivity. Defaults to true */
|
|
70
70
|
wrapAction?: false;
|
|
71
|
-
/** Used as a signal to defer adding the '
|
|
71
|
+
/** Used as a signal to defer adding the row's level indentation styling */
|
|
72
72
|
isAction?: true;
|
|
73
73
|
/** Column id that will be used to generate an unique identifier for every row cell */
|
|
74
74
|
id?: string;
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { GridCellContent } from "../components/cell";
|
|
3
3
|
import { GridDataRow } from "../components/Row";
|
|
4
4
|
import { GridTableApi } from "../GridTableApi";
|
|
5
|
-
import { GridStyle
|
|
5
|
+
import { GridStyle } from "../TableStyles";
|
|
6
6
|
import { GridCellAlignment, GridColumnWithId, Kinded, RenderAs } from "../types";
|
|
7
7
|
import { Properties } from "../../../Css";
|
|
8
8
|
/** If a column def return just string text for a given row, apply some default styling. */
|
|
@@ -13,7 +13,6 @@ export declare function applyRowFn<R extends Kinded>(column: GridColumnWithId<R>
|
|
|
13
13
|
export declare const ASC: "ASC";
|
|
14
14
|
export declare const DESC: "DESC";
|
|
15
15
|
export declare const emptyCell: GridCellContent;
|
|
16
|
-
export declare function getIndentationCss<R extends Kinded>(style: GridStyle, rowStyle: RowStyle<R> | undefined, columnIndex: number, maybeContent: ReactNode | GridCellContent): Properties;
|
|
17
16
|
export declare function getFirstOrLastCellCss<R extends Kinded>(style: GridStyle, columnIndex: number, columns: GridColumnWithId<R>[]): Properties;
|
|
18
17
|
export declare function getAlignment(column: GridColumnWithId<any>, maybeContent: ReactNode | GridCellContent): GridCellAlignment;
|
|
19
18
|
export declare function getJustification(column: GridColumnWithId<any>, maybeContent: ReactNode | GridCellContent, as: RenderAs, alignment: GridCellAlignment): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zIndices = exports.reservedRowKinds = exports.EXPANDABLE_HEADER = exports.TOTALS = exports.HEADER = exports.matchesFilter = exports.maybeApplyFunction = exports.getJustification = exports.getAlignment = exports.getFirstOrLastCellCss = exports.
|
|
3
|
+
exports.zIndices = exports.reservedRowKinds = exports.EXPANDABLE_HEADER = exports.TOTALS = exports.HEADER = exports.matchesFilter = exports.maybeApplyFunction = exports.getJustification = exports.getAlignment = exports.getFirstOrLastCellCss = exports.emptyCell = exports.DESC = exports.ASC = exports.applyRowFn = exports.isGridCellContent = exports.toContent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const Icon_1 = require("../../Icon");
|
|
6
6
|
const ExpandableHeader_1 = require("../components/ExpandableHeader");
|
|
@@ -52,7 +52,7 @@ function toContent(maybeContent, isHeader, canSortColumn, isClientSideSorting, s
|
|
|
52
52
|
// as our cell element is a flex container, which don't allow for applying truncation styles directly on it.
|
|
53
53
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.truncate.mw0.$, title: content, children: content }), tooltipEl] }));
|
|
54
54
|
}
|
|
55
|
-
else if (style.emptyCell && isContentEmpty(content)) {
|
|
55
|
+
else if (!isHeader && !isExpandableHeader && style.emptyCell && isContentEmpty(content)) {
|
|
56
56
|
// If the content is empty and the user specified an `emptyCell` node, return that.
|
|
57
57
|
return style.emptyCell;
|
|
58
58
|
}
|
|
@@ -83,15 +83,6 @@ exports.applyRowFn = applyRowFn;
|
|
|
83
83
|
exports.ASC = "ASC";
|
|
84
84
|
exports.DESC = "DESC";
|
|
85
85
|
exports.emptyCell = { content: () => (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), value: "" };
|
|
86
|
-
function getIndentationCss(style, rowStyle, columnIndex, maybeContent) {
|
|
87
|
-
// Look for cell-specific indent or row-specific indent (row-specific is only one the first column)
|
|
88
|
-
const indent = (isGridCellContent(maybeContent) && maybeContent.indent) || (columnIndex === 0 && (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.indent));
|
|
89
|
-
if (typeof indent === "number" && style.levels !== undefined) {
|
|
90
|
-
throw new Error("The indent param is deprecated for new beam fixed & flexible styles, use beamNestedFixedStyle or beamNestedFlexibleStyle");
|
|
91
|
-
}
|
|
92
|
-
return indent === 1 ? style.indentOneCss || {} : indent === 2 ? style.indentTwoCss || {} : {};
|
|
93
|
-
}
|
|
94
|
-
exports.getIndentationCss = getIndentationCss;
|
|
95
86
|
function getFirstOrLastCellCss(style, columnIndex, columns) {
|
|
96
87
|
return {
|
|
97
88
|
...(columnIndex === 0 ? style.firstCellCss : {}),
|