es-grid-template 1.7.28 → 1.7.30

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.
Files changed (34) hide show
  1. package/es/grid-component/hooks/useColumns.d.ts +3 -1
  2. package/es/table-component/TableContainer.d.ts +0 -1
  3. package/es/table-component/TableContainer.js +8 -4
  4. package/es/table-component/TableContainerEdit.js +32 -7
  5. package/es/table-component/body/EditableCell.js +11 -11
  6. package/es/table-component/body/TableBodyCell.js +2 -1
  7. package/es/table-component/body/TableBodyCellEdit.js +305 -213
  8. package/es/table-component/footer/TableFooterRow.js +0 -2
  9. package/es/table-component/header/TableHeadCell.js +1 -0
  10. package/es/table-component/hook/utils.js +2 -2
  11. package/es/table-component/index.d.ts +2 -3
  12. package/es/table-component/index.js +3 -0
  13. package/es/table-component/style.scss +31 -20
  14. package/es/table-component/table/Grid.js +6 -3
  15. package/es/table-component/table/TableWrapper.d.ts +1 -0
  16. package/es/table-component/table/TableWrapper.js +10 -1
  17. package/es/table-component/type.d.ts +1 -0
  18. package/lib/table-component/TableContainer.d.ts +0 -1
  19. package/lib/table-component/TableContainer.js +8 -4
  20. package/lib/table-component/TableContainerEdit.js +32 -7
  21. package/lib/table-component/body/EditableCell.js +11 -11
  22. package/lib/table-component/body/TableBodyCell.js +2 -1
  23. package/lib/table-component/body/TableBodyCellEdit.js +304 -213
  24. package/lib/table-component/footer/TableFooterRow.js +0 -2
  25. package/lib/table-component/header/TableHeadCell.js +1 -0
  26. package/lib/table-component/hook/utils.js +2 -2
  27. package/lib/table-component/index.d.ts +2 -3
  28. package/lib/table-component/index.js +1 -0
  29. package/lib/table-component/style.scss +31 -20
  30. package/lib/table-component/table/Grid.js +6 -3
  31. package/lib/table-component/table/TableWrapper.d.ts +1 -0
  32. package/lib/table-component/table/TableWrapper.js +10 -1
  33. package/lib/table-component/type.d.ts +1 -0
  34. package/package.json +1 -1
@@ -89,7 +89,7 @@ const getCommonPinningStyles = column => {
89
89
  // opacity: isPinned ? 0.5 : 1,
90
90
  opacity: 1,
91
91
  position: isPinned ? "sticky" : "relative",
92
- width: column.getSize(),
92
+ // width: column.getSize(),
93
93
  zIndex: isPinned ? 2 : 0
94
94
  // border: '1px solid #e5e7eb',
95
95
  // borderTop: 0,
@@ -370,7 +370,7 @@ function getFixedFields(columns, type) {
370
370
  const result = [];
371
371
  function traverse(cols) {
372
372
  for (const col of cols) {
373
- if ((col.fixed ?? col.fixedType) === type && col.field) {
373
+ if ((col.fixed ?? col.fixedType) === type && col.field && col.visible !== false) {
374
374
  result.push(col.field);
375
375
  }
376
376
  if (col.children && col.children.length > 0) {
@@ -1,5 +1,4 @@
1
1
  import InternalTable from './InternalTable';
2
- import type { ColumnsTable, TableProps, ColumnTable, CommandItem, ContextMenuItem } from './type';
3
- import type { ToolbarItem } from "rc-master-ui/es/toolbar";
4
- export type { ColumnsTable, TableProps, ColumnTable, ToolbarItem, CommandItem, ContextMenuItem };
2
+ import type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem } from './type';
3
+ export type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem };
5
4
  export default InternalTable;
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _InternalTable = _interopRequireDefault(require("./InternalTable"));
9
+ // import type {ToolbarItem} from "rc-master-ui/es/toolbar"
9
10
  var _default = exports.default = _InternalTable.default;
@@ -99,7 +99,7 @@ $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
99
99
 
100
100
  }
101
101
 
102
-
102
+
103
103
 
104
104
  &.#{$prefix}-grid-cell-wrap {
105
105
  white-space: normal;
@@ -124,8 +124,10 @@ $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
124
124
 
125
125
 
126
126
  .#{$prefix}-grid-thead {
127
+ background-color: #ffffff;
127
128
 
128
129
  .#{$prefix}-grid-cell {
130
+ font-weight: 500;
129
131
 
130
132
  background-color: $body-color;
131
133
  // border-inline-end: 1px solid #e0e0e0;
@@ -260,13 +262,20 @@ $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
260
262
 
261
263
  background-color: $body-color;
262
264
 
263
- &.#{$prefix}-grid-cell-ellipsis:not(:has(>.ui-rc_cell-content)) {
264
- overflow: hidden;
265
- white-space: nowrap;
266
- text-overflow: ellipsis;
267
- word-break: keep-all;
265
+ &.#{$prefix}-grid-cell-ellipsis:not(:has(>.ui-rc_cell-content)) {
266
+ overflow: hidden;
267
+ white-space: nowrap;
268
+ text-overflow: ellipsis;
269
+ word-break: keep-all;
268
270
 
269
- }
271
+
272
+
273
+ }
274
+
275
+ &.#{$prefix}-grid-cell-index-selected {
276
+ background-color: $cell-index-selected-bg;
277
+ color: #ffffff;
278
+ }
270
279
 
271
280
 
272
281
 
@@ -519,24 +528,26 @@ $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
519
528
  }
520
529
 
521
530
 
522
- // &.isValid {
523
- // &::after {
524
- // content: "";
525
- // position: absolute;
526
- // top: 0;
527
- // right: 0;
528
- // width: 0;
529
- // height: 0;
530
- // border-top: 0 solid transparent;
531
- // border-right: 8px solid red;
532
- // border-bottom: 8px solid transparent;
533
- // }
534
- // }
531
+ .isValid {
532
+ &::after {
533
+ content: "";
534
+ position: absolute;
535
+ top: 0;
536
+ right: 0;
537
+ width: 0;
538
+ height: 0;
539
+ border-top: 0 solid transparent;
540
+ border-right: 8px solid red;
541
+ border-bottom: 8px solid transparent;
542
+ }
543
+ }
535
544
  }
536
545
 
537
546
  }
538
547
 
539
548
  .#{$prefix}-grid-tfoot {
549
+ background-color: rgb(250, 250, 250);
550
+
540
551
  .#{$prefix}-grid-cell {
541
552
  background-color: $body-color;
542
553
  border-inline-end: 1px solid $tableBorderColor;
@@ -44,7 +44,9 @@ const Grid = props => {
44
44
  onSorter,
45
45
  onFilter,
46
46
  groupColumns,
47
- height = 700,
47
+ // height= 700,
48
+ height,
49
+ minHeight,
48
50
  editAble,
49
51
  triggerChangeColumns,
50
52
  infiniteScroll,
@@ -208,7 +210,7 @@ const Grid = props => {
208
210
  return /*#__PURE__*/_react.default.createElement("div", {
209
211
  className: `${prefix}-grid`,
210
212
  style: {
211
- // height: height ?? undefined
213
+ minHeight: minHeight ?? undefined,
212
214
  maxHeight: height ?? undefined
213
215
  }
214
216
  }, /*#__PURE__*/_react.default.createElement(_core.DndContext, {
@@ -227,7 +229,8 @@ const Grid = props => {
227
229
  setIsSelectionChange: setIsSelectionChange,
228
230
  setSorterChange: setSorterChange,
229
231
  setFilterChange: setFilterChange,
230
- height: height,
232
+ height: minHeight ?? height ?? 700,
233
+ minHeight: minHeight,
231
234
  pagination: pagination,
232
235
  columns: columns,
233
236
  propsColumns: propsColumns,
@@ -8,6 +8,7 @@ type Props<T> = {
8
8
  id: string;
9
9
  tableContainerRef: React.RefObject<HTMLDivElement>;
10
10
  height: number;
11
+ minHeight?: number;
11
12
  table: Table<T>;
12
13
  summary?: boolean;
13
14
  loading?: boolean;
@@ -22,6 +22,7 @@ const TableWrapper = props => {
22
22
  prefix,
23
23
  tableContainerRef,
24
24
  height,
25
+ minHeight,
25
26
  summary,
26
27
  table,
27
28
  loading,
@@ -189,7 +190,9 @@ const TableWrapper = props => {
189
190
  position: 'relative',
190
191
  //needed for sticky header
191
192
  // height: tableHeight ?? '500px' //should be a fixed height
192
- maxHeight: height //should be a fixed height
193
+ maxHeight: height,
194
+ //should be a fixed height
195
+ height: minHeight ? height : undefined //should be a fixed height
193
196
  // minWidth: table.getTotalSize()
194
197
  }
195
198
  // onScroll={infiniteScroll ? handleScroll : undefined}
@@ -238,6 +241,12 @@ const TableWrapper = props => {
238
241
  zIndex: 1999,
239
242
  maxWidth: 450
240
243
  }
244
+ }), /*#__PURE__*/_react.default.createElement(_reactTooltip.Tooltip, {
245
+ id: `${id}-tooltip-error`,
246
+ style: {
247
+ zIndex: 1999,
248
+ maxWidth: 450
249
+ }
241
250
  }), menuVisible && /*#__PURE__*/_react.default.createElement(_ContextMenu.default, {
242
251
  open: menuVisible,
243
252
  pos: position,
@@ -186,6 +186,7 @@ export type TableProps<RecordType = AnyObject> = {
186
186
  dataSource: RecordType[];
187
187
  columns: ColumnsTable<RecordType>;
188
188
  height?: number;
189
+ minHeight?: number;
189
190
  format?: IFormat;
190
191
  t?: any;
191
192
  lang?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.7.28",
3
+ "version": "1.7.30",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",