es-grid-template 1.2.2 → 1.2.3

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.
@@ -2,4 +2,4 @@ import styled from "styled-components";
2
2
  export const GridStyle = styled.div.withConfig({
3
3
  displayName: "GridStyle",
4
4
  componentId: "es-grid-template__sc-sueu2e-0"
5
- })([".ui-rc-table-container{min-height:", ";}.ui-rc-toolbar-bottom{position:relative;padding:.25rem 1rem;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;z-index:-1;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;z-index:-1;}.toolbar-button{border-radius:0;.ant-btn{border-radius:0;}}}.ui-rc-pagination{border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;margin:0;padding:.75rem 1rem;.ui-rc-pagination-total-text{order:2;margin-left:auto;}&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;left:0;z-index:-1;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;visibility:visible;right:0;z-index:-1;}&.pagination-template{position:relative;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;z-index:-1;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;z-index:-1;}}}.react-resizable{position:relative;background-clip:padding-box;}.rc-resizable-handle{position:absolute;right:0px;bottom:0;z-index:1;width:5px;height:100%;cursor:col-resize;&.none{cursor:auto;display:none;}}"], props => props.heightTable ? typeof props.heightTable === 'string' ? props.heightTable : `${props.heightTable}px` : undefined);
5
+ })([".ui-rc-table-container{min-height:", ";}.ui-rc-toolbar-bottom{position:relative;padding:.25rem 1rem;background-color:#ffffff;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;}.toolbar-button{border-radius:0;.ant-btn{border-radius:0;}}}.ui-rc-pagination{border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;margin:0;padding:.75rem 1rem;background-color:#ffffff;.ui-rc-pagination-total-text{order:2;margin-left:auto;}&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;left:0;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;visibility:visible;right:0;}&.pagination-template{position:relative;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;}}}.react-resizable{position:relative;background-clip:padding-box;}.rc-resizable-handle{position:absolute;right:0px;bottom:0;z-index:1;width:5px;height:100%;cursor:col-resize;&.none{cursor:auto;display:none;}}"], props => props.heightTable ? typeof props.heightTable === 'string' ? props.heightTable : `${props.heightTable}px` : undefined);
@@ -129,6 +129,7 @@ const TableGrid = props => {
129
129
  getRowKey,
130
130
  groupColumns,
131
131
  groupToolbar,
132
+ showEmptyText,
132
133
  ...rest
133
134
  } = props;
134
135
  const {
@@ -304,10 +305,10 @@ const TableGrid = props => {
304
305
  }, rest, {
305
306
  locale: {
306
307
  ...locale,
307
- emptyText: /*#__PURE__*/React.createElement(Empty, {
308
+ emptyText: showEmptyText !== false ? /*#__PURE__*/React.createElement(Empty, {
308
309
  image: Empty.PRESENTED_IMAGE_SIMPLE,
309
310
  description: locale?.emptyText
310
- })
311
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null)
311
312
  },
312
313
  loading: {
313
314
  spinning: columns && columns.length === 0 || loading === true,
@@ -59,6 +59,7 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
59
59
  .#{$prefix}-table {
60
60
  line-height: 20px;
61
61
  .#{$prefix}-table-cell {
62
+ min-height: 35px;
62
63
 
63
64
  .#{$prefix}-table-filter-column {
64
65
  .#{$prefix}-dropdown-trigger.#{$prefix}-table-filter-trigger {
@@ -1324,7 +1324,7 @@ const GridEdit = props => {
1324
1324
  onMouseUp: handleMouseUp
1325
1325
  }, /*#__PURE__*/React.createElement("div", {
1326
1326
  className: 'ui-rc_content'
1327
- }, renderContent(column, value, record, rowIndex, format)), getLastSelectCell(selectedCells).row === rowNumber && getLastSelectCell(selectedCells).col === colIndex && !isSelectDragging &&
1327
+ }, renderContent(column, value, record, rowIndex, format)), selectedCells && selectedCells.size > 0 && getLastSelectCell(selectedCells).row === rowNumber && getLastSelectCell(selectedCells).col === colIndex && !isSelectDragging &&
1328
1328
  /*#__PURE__*/
1329
1329
  // showDraggingPoint &&
1330
1330
  React.createElement("div", {
@@ -178,6 +178,7 @@ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, '
178
178
  onDataChange?: (data: RecordType[]) => void;
179
179
  defaultValue?: AnyObject | (() => AnyObject);
180
180
  summary?: boolean | ((data: readonly RecordType[]) => React.ReactNode);
181
+ showEmptyText?: boolean;
181
182
  }
182
183
  export interface TableEditProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
183
184
  columns: ColumnsTable<RecordType>;
@@ -9,4 +9,4 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  const GridStyle = exports.GridStyle = _styledComponents.default.div.withConfig({
10
10
  displayName: "GridStyle",
11
11
  componentId: "es-grid-template__sc-sueu2e-0"
12
- })([".ui-rc-table-container{min-height:", ";}.ui-rc-toolbar-bottom{position:relative;padding:.25rem 1rem;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;z-index:-1;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;z-index:-1;}.toolbar-button{border-radius:0;.ant-btn{border-radius:0;}}}.ui-rc-pagination{border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;margin:0;padding:.75rem 1rem;.ui-rc-pagination-total-text{order:2;margin-left:auto;}&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;left:0;z-index:-1;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;visibility:visible;right:0;z-index:-1;}&.pagination-template{position:relative;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;z-index:-1;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;z-index:-1;}}}.react-resizable{position:relative;background-clip:padding-box;}.rc-resizable-handle{position:absolute;right:0px;bottom:0;z-index:1;width:5px;height:100%;cursor:col-resize;&.none{cursor:auto;display:none;}}"], props => props.heightTable ? typeof props.heightTable === 'string' ? props.heightTable : `${props.heightTable}px` : undefined);
12
+ })([".ui-rc-table-container{min-height:", ";}.ui-rc-toolbar-bottom{position:relative;padding:.25rem 1rem;background-color:#ffffff;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;}.toolbar-button{border-radius:0;.ant-btn{border-radius:0;}}}.ui-rc-pagination{border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;margin:0;padding:.75rem 1rem;background-color:#ffffff;.ui-rc-pagination-total-text{order:2;margin-left:auto;}&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;left:0;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:50px;bottom:0;visibility:visible;right:0;}&.pagination-template{position:relative;&::before{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;left:0;}&::after{content:\"\";position:absolute;border-left:1px solid #e0e0e0;height:100%;bottom:0;visibility:visible;right:0;}}}.react-resizable{position:relative;background-clip:padding-box;}.rc-resizable-handle{position:absolute;right:0px;bottom:0;z-index:1;width:5px;height:100%;cursor:col-resize;&.none{cursor:auto;display:none;}}"], props => props.heightTable ? typeof props.heightTable === 'string' ? props.heightTable : `${props.heightTable}px` : undefined);
@@ -133,6 +133,7 @@ const TableGrid = props => {
133
133
  getRowKey,
134
134
  groupColumns,
135
135
  groupToolbar,
136
+ showEmptyText,
136
137
  ...rest
137
138
  } = props;
138
139
  const {
@@ -308,10 +309,10 @@ const TableGrid = props => {
308
309
  }, rest, {
309
310
  locale: {
310
311
  ...locale,
311
- emptyText: /*#__PURE__*/_react.default.createElement(_rcMasterUi.Empty, {
312
+ emptyText: showEmptyText !== false ? /*#__PURE__*/_react.default.createElement(_rcMasterUi.Empty, {
312
313
  image: _rcMasterUi.Empty.PRESENTED_IMAGE_SIMPLE,
313
314
  description: locale?.emptyText
314
- })
315
+ }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null)
315
316
  },
316
317
  loading: {
317
318
  spinning: columns && columns.length === 0 || loading === true,
@@ -59,6 +59,7 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
59
59
  .#{$prefix}-table {
60
60
  line-height: 20px;
61
61
  .#{$prefix}-table-cell {
62
+ min-height: 35px;
62
63
 
63
64
  .#{$prefix}-table-filter-column {
64
65
  .#{$prefix}-dropdown-trigger.#{$prefix}-table-filter-trigger {
@@ -1331,7 +1331,7 @@ const GridEdit = props => {
1331
1331
  onMouseUp: handleMouseUp
1332
1332
  }, /*#__PURE__*/_react.default.createElement("div", {
1333
1333
  className: 'ui-rc_content'
1334
- }, (0, _columns.renderContent)(column, value, record, rowIndex, format)), (0, _hooks.getLastSelectCell)(selectedCells).row === rowNumber && (0, _hooks.getLastSelectCell)(selectedCells).col === colIndex && !isSelectDragging &&
1334
+ }, (0, _columns.renderContent)(column, value, record, rowIndex, format)), selectedCells && selectedCells.size > 0 && (0, _hooks.getLastSelectCell)(selectedCells).row === rowNumber && (0, _hooks.getLastSelectCell)(selectedCells).col === colIndex && !isSelectDragging &&
1335
1335
  /*#__PURE__*/
1336
1336
  // showDraggingPoint &&
1337
1337
  _react.default.createElement("div", {
@@ -178,6 +178,7 @@ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, '
178
178
  onDataChange?: (data: RecordType[]) => void;
179
179
  defaultValue?: AnyObject | (() => AnyObject);
180
180
  summary?: boolean | ((data: readonly RecordType[]) => React.ReactNode);
181
+ showEmptyText?: boolean;
181
182
  }
182
183
  export interface TableEditProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
183
184
  columns: ColumnsTable<RecordType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",