@stenajs-webui/grid 15.3.0 → 15.4.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/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v15.4.0 (Mon Apr 04 2022)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Added property hideBorderTop to TableRow [#441](https://github.com/StenaIT/stenajs-webui/pull/441) ([@esepato](https://github.com/esepato))
6
+
7
+ #### Authors: 1
8
+
9
+ - Markus Patoka ([@esepato](https://github.com/esepato))
10
+
11
+ ---
12
+
13
+ # v15.3.2 (Thu Mar 31 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Wrong number of tds in summary row in StandardTable [#440](https://github.com/StenaIT/stenajs-webui/pull/440) ([@mattias800](https://github.com/mattias800))
18
+
19
+ #### Authors: 1
20
+
21
+ - Mattias Andersson ([@mattias800](https://github.com/mattias800))
22
+
23
+ ---
24
+
1
25
  # v15.1.0 (Fri Feb 25 2022)
2
26
 
3
27
  #### 🚀 Enhancement
@@ -3,6 +3,7 @@ export declare const tableBorderColorExpanded = "var(--lhds-color-blue-500)";
3
3
  export declare const tableBackgroundColorExpanded = "var(--lhds-color-blue-50)";
4
4
  export declare const tableBackgroundHoverColorExpanded = "var(--lhds-color-blue-100)";
5
5
  export declare const tableBorder: string;
6
+ export declare const tableBorderHidden = "1px solid transparent";
6
7
  export declare const tableBorderLeft = "var(--swui-expand-highlight-border-width) solid transparent";
7
8
  export declare const tableBorderLeftExpanded: string;
8
9
  export declare const defaultTableRowHeight = "40px";
@@ -1,6 +1,7 @@
1
1
  import { BoxProps } from "@stenajs-webui/core";
2
2
  import * as React from "react";
3
3
  interface Props extends BoxProps {
4
+ hideBorderTop?: boolean;
4
5
  }
5
6
  export declare const TableRow: React.FC<Props>;
6
7
  export {};
@@ -4,3 +4,4 @@ declare const _default: {
4
4
  };
5
5
  export default _default;
6
6
  export declare const Overview: () => JSX.Element;
7
+ export declare const WithBorderTopHidden: () => JSX.Element;
package/dist/index.es.js CHANGED
@@ -131,6 +131,7 @@ var tableBorderColorExpanded = "var(--lhds-color-blue-500)";
131
131
  var tableBackgroundColorExpanded = "var(--lhds-color-blue-50)";
132
132
  var tableBackgroundHoverColorExpanded = "var(--lhds-color-blue-100)";
133
133
  var tableBorder = "1px solid " + tableBorderColor;
134
+ var tableBorderHidden = "1px solid transparent";
134
135
  var tableBorderLeft = "var(--swui-expand-highlight-border-width) solid transparent";
135
136
  var tableBorderLeftExpanded = "var(--swui-expand-highlight-border-width) solid " + tableBorderColorExpanded;
136
137
  var defaultTableRowHeight = "40px";
@@ -247,8 +248,8 @@ var styles$4 = {"tableRow":"TableRow-module_tableRow__hS0Sh"};
247
248
  styleInject(css_248z$4);
248
249
 
249
250
  var TableRow = function (_a) {
250
- var _b = _a.height, height = _b === void 0 ? defaultTableHeadRowHeight : _b, className = _a.className, boxProps = __rest(_a, ["height", "className"]);
251
- return (React.createElement(Row, __assign({ borderTop: tableBorder, height: height, className: cx(styles$4.tableRow, className) }, boxProps)));
251
+ var hideBorderTop = _a.hideBorderTop, _b = _a.height, height = _b === void 0 ? defaultTableHeadRowHeight : _b, className = _a.className, boxProps = __rest(_a, ["hideBorderTop", "height", "className"]);
252
+ return (React.createElement(Row, __assign({ borderTop: hideBorderTop ? tableBorderHidden : tableBorder, height: height, className: cx(styles$4.tableRow, className) }, boxProps)));
252
253
  };
253
254
 
254
255
  var useRevertableValue = function (initialValue) {
@@ -1772,7 +1773,7 @@ var columnHasSummaryCell = function (columnConfig) {
1772
1773
  return Boolean(columnConfig.renderSummaryCell || columnConfig.summaryText);
1773
1774
  };
1774
1775
 
1775
- var css_248z = ".StandardTableSummaryRow-module_summaryRow__1qAAJ td {\n border-top: 1px solid var(--lhds-color-ui-500);\n border-bottom: 1px solid var(--lhds-color-ui-500);\n }\n";
1776
+ var css_248z = ".StandardTableSummaryRow-module_summaryRow__1qAAJ td {\n border-top: 1px solid var(--lhds-color-ui-400);\n }\n";
1776
1777
  var styles = {"summaryRow":"StandardTableSummaryRow-module_summaryRow__1qAAJ"};
1777
1778
  styleInject(css_248z);
1778
1779
 
@@ -1830,8 +1831,10 @@ var getColumnsLimitedWithColSpan = function (columnOrder, columns) {
1830
1831
  var StandardTableSummaryRow = React.memo(function StandardTableSummaryRow(_a) {
1831
1832
  var items = _a.items;
1832
1833
  var groupConfigsAndIds = useGroupConfigsAndIdsForRows();
1833
- var _b = useStandardTableConfig(), showRowCheckbox = _b.showRowCheckbox, enableExpandCollapse = _b.enableExpandCollapse, columns = _b.columns;
1834
+ var _b = useStandardTableConfig(), showRowCheckbox = _b.showRowCheckbox, enableExpandCollapse = _b.enableExpandCollapse, columns = _b.columns, rowIndent = _b.rowIndent;
1834
1835
  return (React.createElement("tr", { className: styles.summaryRow },
1836
+ rowIndent && (React.createElement("td", null,
1837
+ React.createElement(Indent, { num: rowIndent }))),
1835
1838
  enableExpandCollapse && React.createElement("td", null),
1836
1839
  showRowCheckbox && React.createElement("td", null),
1837
1840
  groupConfigsAndIds.map(function (_a, groupIndex) {
@@ -1840,7 +1843,10 @@ var StandardTableSummaryRow = React.memo(function StandardTableSummaryRow(_a) {
1840
1843
  var columnId = _a.columnId, colSpan = _a.colSpan;
1841
1844
  return (React.createElement(SummaryCell, { key: columnId, colSpan: colSpan, columnId: columnId, items: items, borderFromGroup: getCellBorderFromGroup(groupIndex, index, groupConfig.borderLeft), disableBorderLeft: groupIndex === 0 && index === 0 }));
1842
1845
  })));
1843
- })));
1846
+ }),
1847
+ rowIndent && (React.createElement("td", null,
1848
+ React.createElement(Indent, { num: rowIndent }))),
1849
+ React.createElement("td", null)));
1844
1850
  });
1845
1851
 
1846
1852
  var SummaryRowSwitcher = function SummaryRowSwitcher(_a) {
@@ -2258,5 +2264,5 @@ var createEditableTextCellWithStatus = function (warningOnEmpty, crudStatusProvi
2258
2264
  React.createElement(ModifiedField, { value: label, modifiedField: modifiedField, crudStatus: crudStatus, isEditable: isEditable, warningOnEmpty: warnOnEmpty })));
2259
2265
  }; };
2260
2266
 
2261
- export { CrudStatusIndicator, EditableTextCellWithCrudAndModified, GridHooksContext, GridHooksTable, ModifiedField, SmallTableCell, SmallTableHead, StandardTable, StandardTableActionsContext, StandardTableCell, StandardTableCellUi, StandardTableConfigContext, StandardTableContent, StandardTableHeadRow, StandardTableRow, StandardTableRowCheckbox, StandardTableRowList, StandardTableStateContext, StandardTableTableIdContext, TableCell, TableColumnGroupHead, TableHeadItem, TableHeadRow, TableRow, TextCell, createColumnConfig, createEditableTextCellWithStatus, createGroupConfigAndIdsForRows, createInternalStandardTableActions, createStandardEditableTextCell, createStandardTableActions, createStandardTableInitialState, createStandardTableReducer, defaultTableHeadRowHeight, defaultTableRowHeight, focusOnCell, formatColumnIdToHeaderCellLabel, formatValueLabel, hasIndicatorContent, multitypeComparator, smallTableRowWidth, tableBackgroundColorExpanded, tableBackgroundHoverColorExpanded, tableBorder, tableBorderColor, tableBorderColorExpanded, tableBorderLeft, tableBorderLeftExpanded, useCellBackgroundByColumnConfig, useCellBackgroundByColumnId, useColumnConfigById, useColumnValueResolver, useEditableCell, useFirstColumnConfig, useGridCell, useGridNavigation, useGridNavigationOptionsFromContext, useLastColumnConfig, useLocalStateTableContext, useRevertableValue, useRowCheckbox, useStandardTableActions, useStandardTableConfig, useStandardTableId, useStandardTableState, useTableHeadCheckbox, useTableSortHeader };
2267
+ export { CrudStatusIndicator, EditableTextCellWithCrudAndModified, GridHooksContext, GridHooksTable, ModifiedField, SmallTableCell, SmallTableHead, StandardTable, StandardTableActionsContext, StandardTableCell, StandardTableCellUi, StandardTableConfigContext, StandardTableContent, StandardTableHeadRow, StandardTableRow, StandardTableRowCheckbox, StandardTableRowList, StandardTableStateContext, StandardTableTableIdContext, TableCell, TableColumnGroupHead, TableHeadItem, TableHeadRow, TableRow, TextCell, createColumnConfig, createEditableTextCellWithStatus, createGroupConfigAndIdsForRows, createInternalStandardTableActions, createStandardEditableTextCell, createStandardTableActions, createStandardTableInitialState, createStandardTableReducer, defaultTableHeadRowHeight, defaultTableRowHeight, focusOnCell, formatColumnIdToHeaderCellLabel, formatValueLabel, hasIndicatorContent, multitypeComparator, smallTableRowWidth, tableBackgroundColorExpanded, tableBackgroundHoverColorExpanded, tableBorder, tableBorderColor, tableBorderColorExpanded, tableBorderHidden, tableBorderLeft, tableBorderLeftExpanded, useCellBackgroundByColumnConfig, useCellBackgroundByColumnId, useColumnConfigById, useColumnValueResolver, useEditableCell, useFirstColumnConfig, useGridCell, useGridNavigation, useGridNavigationOptionsFromContext, useLastColumnConfig, useLocalStateTableContext, useRevertableValue, useRowCheckbox, useStandardTableActions, useStandardTableConfig, useStandardTableId, useStandardTableState, useTableHeadCheckbox, useTableSortHeader };
2262
2268
  //# sourceMappingURL=index.es.js.map