es-grid-template 1.4.2 → 1.4.4

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.
@@ -182,8 +182,8 @@ const InternalTable = props => {
182
182
  ...rest
183
183
  } = props;
184
184
  const rowKey = _react.default.useMemo(() => {
185
- return propRowKey ?? 'rowId';
186
- }, [propRowKey]);
185
+ return editAble ? 'rowId' : propRowKey ?? 'rowId';
186
+ }, [propRowKey, editAble]);
187
187
  const local = lang && lang === 'en' ? _en_US.default : _vi_VN.default;
188
188
  const buddhistLocale = {
189
189
  ...local,
@@ -344,7 +344,7 @@ const InternalTable = props => {
344
344
  const transformedColumn = {
345
345
  ...column,
346
346
  dataIndex: column.field ?? column.dataIndex,
347
- // key: column.field ?? column.dataIndex ?? column.key,
347
+ key: column.field ?? column.key,
348
348
  // title: () => (<HeaderContent column={{...column} as any} t={t}/>),
349
349
  title: /*#__PURE__*/_react.default.createElement(SortableHeaderCell, {
350
350
  columnKey: column.field
@@ -363,6 +363,12 @@ const InternalTable = props => {
363
363
  if (transformedColumn.field === '#') {
364
364
  return {
365
365
  ...transformedColumn,
366
+ title: () => /*#__PURE__*/_react.default.createElement(_HeaderContent.default, {
367
+ column: {
368
+ ...column
369
+ },
370
+ t: t
371
+ }),
366
372
  onCell: () => ({
367
373
  className: 'cell-number'
368
374
  }),
@@ -377,6 +383,12 @@ const InternalTable = props => {
377
383
  if (transformedColumn.field === 'command') {
378
384
  return {
379
385
  ...transformedColumn,
386
+ title: () => /*#__PURE__*/_react.default.createElement(_HeaderContent.default, {
387
+ column: {
388
+ ...column
389
+ },
390
+ t: t
391
+ }),
380
392
  onCell: () => ({
381
393
  className: 'cell-number',
382
394
  style: {
@@ -38,8 +38,8 @@ const HeaderContent = props => {
38
38
  return columnGroupText ?? headerText;
39
39
  }, [columnGroupText, headerText]);
40
40
  const tooltip = _react.default.useMemo(() => {
41
- return headerTooltip ?? columnGroupText ?? headerText;
42
- }, [columnGroupText, headerText, headerTooltip]);
41
+ return headerTooltip ?? t ? t(columnGroupText ?? headerText) : columnGroupText ?? headerText;
42
+ }, [columnGroupText, headerText, headerTooltip, t]);
43
43
  //
44
44
  //
45
45
  // const [isOpen, setIsOpen] = useState(false)
@@ -76,9 +76,7 @@ const HeaderContent = props => {
76
76
  // style={{flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', wordBreak: 'keep-all'}}
77
77
  // style={{flex: 1}}
78
78
  className: (0, _classnames.default)('', {}),
79
- "data-tooltip-id": "tooltip-header"
80
- // data-tooltip-id="tooltip-cell-content"
81
- ,
79
+ "data-tooltip-id": "tooltip-header",
82
80
  "data-tooltip-content": tooltip,
83
81
  "data-tooltip-offset": 16
84
82
  }, headerTemplate ? (0, _utils.getTemplate)(headerTemplate) : t ? t(text) : text));
@@ -287,8 +287,7 @@ const useColumns = config => {
287
287
  className: (0, _classnames.default)(transformedColumn?.onCell?.(data, index).className ?? '', {
288
288
  'cell-group': groupColumns && data.children,
289
289
  'cell-group-fixed': groupColumns && data.children && col.field === firstNonGroupColumn?.field
290
- }),
291
- 'data-tooltip-id': "tooltip-cell-content"
290
+ })
292
291
  // onMouseEnter: () => {
293
292
  // onMouseHover(data, col as any)
294
293
  // },
@@ -121,12 +121,14 @@ export declare const sortedSetASC: (setValue: any) => Set<unknown>;
121
121
  export declare const sortedSetDSC: (setValue: any) => Set<unknown>;
122
122
  export declare function getBottomRowCells(cellSet: any): any[];
123
123
  export declare function getCellsByPosition(cellSet: any, position?: string): any[];
124
- export declare const addBorderClass: (selectedCells: any, type: string, className: string, id?: string) => void;
124
+ export declare const addBorderClass: (selectedCells: any, type: string, className: string, id?: string, nextCellRight?: boolean) => void;
125
125
  export declare const removeBorderClass: (selectedCells: any, type: string, className: string, id?: string) => void;
126
126
  export declare const removeBorderClass2: (className: string, id?: string) => void;
127
127
  export declare const onAddBgSelectedCell: (selectedCells: any, id?: string, isFocusCellIndex?: boolean) => void;
128
- export declare const onAddBorderSelectedCell: (selectedCells: any, id?: string) => void;
129
128
  export declare const onRemoveBgSelectedCell: (selectedCells: any, id?: string, rowsSelected?: any) => void;
129
+ export declare const onAddBgCellIndex: (selectedCells: any, id?: string, isFocusCellIndex?: boolean) => void;
130
+ export declare const onRemoveBgCellIndex: (selectedCells: any, id?: string, rowsSelected?: any) => void;
131
+ export declare const onAddBorderSelectedCell: (selectedCells: any, id?: string) => void;
130
132
  export declare const onRemoveBorderSelectedCell: (selectedCells: any, id?: string) => void;
131
133
  export declare const addClassBorderPasteCell: (pasteCells: any, type: 'up' | 'down', id?: string) => void;
132
134
  export declare const removeClassBorderPasteCell: (pasteCells: any, type: 'up' | 'down', id?: string) => void;
@@ -134,3 +136,5 @@ export declare const addClassCellIndexSelected: (rowsSelected: any, id?: string)
134
136
  export declare const removeClassCellIndexSelected: (rowsSelected: any, id?: string) => void;
135
137
  export declare const showDraggingPoint: (selectedCells: any, id?: any) => void;
136
138
  export declare const hideDraggingPoint: (selectedCells: any, id?: any) => void;
139
+ export declare const isRangeCell: (selectedCells: any, type: string, rowIndex: number, colIndex: number) => boolean;
140
+ export declare const isSelectedCell: (selectedCells: any, rowIndex: number, colIndex: number) => any;
@@ -26,9 +26,9 @@ exports.isContinuous = exports.isColor = exports.isBottomMostInRegion = void 0;
26
26
  exports.isDateString = isDateString;
27
27
  exports.isEmpty = exports.isEditable = exports.isDisable = void 0;
28
28
  exports.isEqualSet = isEqualSet;
29
- exports.isObjEmpty = exports.isNullOrUndefined = exports.isNameColor = void 0;
29
+ exports.isRangeCell = exports.isObjEmpty = exports.isNullOrUndefined = exports.isNameColor = void 0;
30
30
  exports.isRightMostInRegion = isRightMostInRegion;
31
- exports.updateData = exports.updateColumnsByGroup = exports.updateColumns = exports.updateArrayByKey = exports.transformColumns1 = exports.transformColumns = exports.totalFixedWidth = exports.sumDataByField = exports.sortedSetDSC = exports.sortedSetASC = exports.showDraggingPoint = exports.shouldInclude = exports.removeFieldRecursive = exports.removeColumns = exports.removeClassCellIndexSelected = exports.removeClassBorderPasteCell = exports.removeBorderClass2 = exports.removeBorderClass = exports.parseCells = exports.parseBooleanToValue = exports.onRemoveBorderSelectedCell = exports.onRemoveBgSelectedCell = exports.onAddBorderSelectedCell = exports.onAddBgSelectedCell = exports.newGuid = exports.mergedSets = exports.isTopMostInRegion = void 0;
31
+ exports.updateData = exports.updateColumnsByGroup = exports.updateColumns = exports.updateArrayByKey = exports.transformColumns1 = exports.transformColumns = exports.totalFixedWidth = exports.sumDataByField = exports.sortedSetDSC = exports.sortedSetASC = exports.showDraggingPoint = exports.shouldInclude = exports.removeFieldRecursive = exports.removeColumns = exports.removeClassCellIndexSelected = exports.removeClassBorderPasteCell = exports.removeBorderClass2 = exports.removeBorderClass = exports.parseCells = exports.parseBooleanToValue = exports.onRemoveBorderSelectedCell = exports.onRemoveBgSelectedCell = exports.onRemoveBgCellIndex = exports.onAddBorderSelectedCell = exports.onAddBgSelectedCell = exports.onAddBgCellIndex = exports.newGuid = exports.mergedSets = exports.isTopMostInRegion = exports.isSelectedCell = void 0;
32
32
  var _dayjs = _interopRequireDefault(require("dayjs"));
33
33
  var _moment = _interopRequireDefault(require("moment/moment"));
34
34
  var _uuid = require("uuid");
@@ -511,12 +511,9 @@ exports.getDefaultValue = getDefaultValue;
511
511
  const addRowIdArray = inputArray => {
512
512
  if (inputArray) {
513
513
  return inputArray.map(item => {
514
- if (item.children && item.children.length > 0) {
515
- // item.children = convertArrayWithIndent(item.children)
514
+ if (typeof item.children !== "string" && item.children && item.children.length > 0) {
516
515
  item.children = addRowIdArray(item.children);
517
516
  }
518
-
519
- // return { ...item, rowId: item.rowId ? item.rowId : (item.id ? item.id : newGuid())}
520
517
  return {
521
518
  ...item,
522
519
  rowId: item.rowId ?? item.id ?? newGuid()
@@ -1622,7 +1619,7 @@ function getCellsByPosition(cellSet, position = "bottom") {
1622
1619
  return [];
1623
1620
  }
1624
1621
  }
1625
- const addBorderClass = (selectedCells, type, className, id) => {
1622
+ const addBorderClass = (selectedCells, type, className, id, nextCellRight) => {
1626
1623
  const table = document.querySelector(`#${id}`);
1627
1624
  const typeCells = getCellsByPosition(selectedCells, type);
1628
1625
  const selectorsCells = typeCells.map(pos => {
@@ -1633,7 +1630,24 @@ const addBorderClass = (selectedCells, type, className, id) => {
1633
1630
  if (cellsFilter && cellsFilter.length > 0) {
1634
1631
  cellsFilter.forEach(cell => {
1635
1632
  cell.classList.add(className);
1633
+ if (nextCellRight) {
1634
+ cell.style.zIndex = 1;
1635
+ }
1636
+ });
1637
+ }
1638
+ if (type === 'left') {
1639
+ const selectorsCells2 = typeCells.map(pos => {
1640
+ const [row, col] = pos.split('-');
1641
+ return `[data-row-index="${row}"][data-col-index="${Number(col) + 1}"]`;
1636
1642
  });
1643
+ const fullSelector = selectorsCells2.map(s => `.ui-rc-table-cell-fix-right-first${s}`).join(', ');
1644
+ const cellsFilter2 = typeCells.length > 0 ? table?.querySelectorAll(fullSelector) : null;
1645
+ if (cellsFilter2 && cellsFilter2.length > 0) {
1646
+ cellsFilter2.forEach(cell => {
1647
+ // cell.classList.add('has-before');
1648
+ cell.classList.add('cell-border-left');
1649
+ });
1650
+ }
1637
1651
  }
1638
1652
  };
1639
1653
  exports.addBorderClass = addBorderClass;
@@ -1668,10 +1682,20 @@ const onAddBgSelectedCell = (selectedCells, id, isFocusCellIndex) => {
1668
1682
  return `[data-row-index="${row1}"][data-col-index="${col1}"]`;
1669
1683
  });
1670
1684
  const table = document.querySelector(`#${id}`);
1685
+
1686
+ //// xóa class các ô đã chọn trước đó
1687
+ const cellsSelected = table ? table?.querySelectorAll('.ui-rc-table-cell.selected-bg') : null;
1688
+ if (cellsSelected) {
1689
+ cellsSelected.forEach(cell => {
1690
+ cell.classList.remove('selected-bg');
1691
+ });
1692
+ }
1693
+
1694
+ /// thêm class
1671
1695
  const cells = table && selectors.length > 0 ? table?.querySelectorAll(selectors.join(',')) : null;
1672
1696
  if (cells) {
1673
1697
  cells.forEach(cell => {
1674
- cell.classList.add('selected');
1698
+ cell.classList.add('selected-bg');
1675
1699
  });
1676
1700
  }
1677
1701
  const rowsArray = [...new Set([...selectedCells].map(item => item.split("-")[0]))];
@@ -1704,36 +1728,49 @@ const onAddBgSelectedCell = (selectedCells, id, isFocusCellIndex) => {
1704
1728
  // addBorderClass(selectedCells, 'left', 'cell-border-left', id)
1705
1729
  };
1706
1730
  exports.onAddBgSelectedCell = onAddBgSelectedCell;
1707
- const onAddBorderSelectedCell = (selectedCells, id) => {
1731
+ const onRemoveBgSelectedCell = (selectedCells, id, rowsSelected) => {
1708
1732
  const table = document.querySelector(`#${id}`);
1709
-
1710
- // tăng z-index để hiển thị round point paste
1711
- const row = getLastSelectCell(selectedCells).row;
1712
- const col = getLastSelectCell(selectedCells).col;
1713
- const cell = table?.querySelector(`.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col}"]`);
1714
- if (cell) {
1715
- cell.style.zIndex = 1;
1733
+ const cells = table ? table?.querySelectorAll('.ui-rc-table-cell.selected-bg') : null;
1734
+ if (cells) {
1735
+ cells.forEach(cell => {
1736
+ cell.classList.remove('selected-bg');
1737
+ });
1716
1738
  }
1717
- if (cell && (cell.classList.contains('ui-rc-table-cell-fix-left') || cell.classList.contains('ui-rc-table-cell-fix-right'))) {
1718
- cell.style.zIndex = 3;
1739
+ const cellsIndex = table ? table?.querySelectorAll('.ui-rc-table-cell.focus') : null;
1740
+ if (cellsIndex) {
1741
+ cellsIndex.forEach(cell => {
1742
+ cell.classList.remove('focus');
1743
+ });
1719
1744
  }
1720
1745
 
1721
- // thêm class border selected
1746
+ // xóa class selected ô STT
1722
1747
 
1723
- addBorderClass(selectedCells, 'bottom', 'cell-border-bottom', id);
1724
- addBorderClass(selectedCells, 'right', 'cell-border-right', id);
1725
- addBorderClass(selectedCells, 'top', 'cell-border-top', id);
1726
- addBorderClass(selectedCells, 'left', 'cell-border-left', id);
1748
+ if (rowsSelected && rowsSelected.size > 0) {
1749
+ const rowsSelectedArray = [...new Set([...rowsSelected].map(item => item.split("-")[0]))];
1750
+ const rowsSelectedSelectors = rowsSelectedArray.map(r => `.rc-ui-cell-index[data-row-index="${r}"]`).join(", ");
1751
+ const cellsSelectedIndex = table && rowsSelectedSelectors.length > 0 ? table?.querySelectorAll(rowsSelectedSelectors) : null;
1752
+ if (cellsSelectedIndex) {
1753
+ cellsSelectedIndex.forEach(cell => {
1754
+ cell.classList.remove('selected');
1755
+ });
1756
+ }
1757
+ }
1727
1758
  };
1728
- exports.onAddBorderSelectedCell = onAddBorderSelectedCell;
1729
- const onRemoveBgSelectedCell = (selectedCells, id, rowsSelected) => {
1759
+ exports.onRemoveBgSelectedCell = onRemoveBgSelectedCell;
1760
+ const onAddBgCellIndex = (selectedCells, id, isFocusCellIndex) => {
1730
1761
  const table = document.querySelector(`#${id}`);
1731
- const cells = table ? table?.querySelectorAll('.ui-rc-table-cell.selected') : null;
1732
- if (cells) {
1733
- cells.forEach(cell => {
1734
- cell.classList.remove('selected');
1762
+ const rowsArray = [...new Set([...selectedCells].map(item => item.split("-")[0]))];
1763
+ const rowsSelectors = rowsArray.map(r => `.rc-ui-cell-index[data-row-index="${r}"]`).join(", ");
1764
+ const cellsIndex = table && rowsSelectors.length > 0 ? table?.querySelectorAll(rowsSelectors) : null;
1765
+ if (cellsIndex && isFocusCellIndex !== false) {
1766
+ cellsIndex.forEach(cell => {
1767
+ cell.classList.add('focus');
1735
1768
  });
1736
1769
  }
1770
+ };
1771
+ exports.onAddBgCellIndex = onAddBgCellIndex;
1772
+ const onRemoveBgCellIndex = (selectedCells, id, rowsSelected) => {
1773
+ const table = document.querySelector(`#${id}`);
1737
1774
  const cellsIndex = table ? table?.querySelectorAll('.ui-rc-table-cell.focus') : null;
1738
1775
  if (cellsIndex) {
1739
1776
  cellsIndex.forEach(cell => {
@@ -1754,7 +1791,37 @@ const onRemoveBgSelectedCell = (selectedCells, id, rowsSelected) => {
1754
1791
  }
1755
1792
  }
1756
1793
  };
1757
- exports.onRemoveBgSelectedCell = onRemoveBgSelectedCell;
1794
+ exports.onRemoveBgCellIndex = onRemoveBgCellIndex;
1795
+ const onAddBorderSelectedCell = (selectedCells, id) => {
1796
+ const table = document.querySelector(`#${id}`);
1797
+
1798
+ // tăng z-index để hiển thị round point paste
1799
+ const row = getLastSelectCell(selectedCells).row;
1800
+ const col = getLastSelectCell(selectedCells).col;
1801
+ const cell = table?.querySelector(`.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col}"]`);
1802
+ const nextCellLeft = table?.querySelector(`.ui-rc-table-cell.ui-rc-table-cell-fix-left[data-row-index="${row}"][data-col-index="${col + 1}"]`);
1803
+ // const nextCellRight: any = table?.querySelector(`.ui-rc-table-cell.ui-rc-table-cell-fix-right[data-row-index="${row}"][data-col-index="${col + 1}"]`)
1804
+
1805
+ console.log('nextCell', nextCellLeft);
1806
+ if (cell) {
1807
+ cell.style.zIndex = nextCellLeft ? 3 : 1;
1808
+ }
1809
+ if (cell && (cell.classList.contains('ui-rc-table-cell-fix-left') || cell.classList.contains('ui-rc-table-cell-fix-right'))) {
1810
+ cell.style.zIndex = 3;
1811
+ }
1812
+ removeBorderClass2('cell-border-bottom', id);
1813
+ removeBorderClass2('cell-border-top', id);
1814
+ removeBorderClass2('cell-border-right', id);
1815
+ removeBorderClass2('cell-border-left', id);
1816
+
1817
+ // thêm class border selected
1818
+
1819
+ addBorderClass(selectedCells, 'bottom', 'cell-border-bottom', id);
1820
+ addBorderClass(selectedCells, 'right', 'cell-border-right', id);
1821
+ addBorderClass(selectedCells, 'top', 'cell-border-top', id);
1822
+ addBorderClass(selectedCells, 'left', 'cell-border-left', id);
1823
+ };
1824
+ exports.onAddBorderSelectedCell = onAddBorderSelectedCell;
1758
1825
  const onRemoveBorderSelectedCell = (selectedCells, id) => {
1759
1826
  const table = document.querySelector(`#${id}`);
1760
1827
 
@@ -1762,13 +1829,11 @@ const onRemoveBorderSelectedCell = (selectedCells, id) => {
1762
1829
 
1763
1830
  const row = getLastSelectCell(selectedCells).row;
1764
1831
  const col = getLastSelectCell(selectedCells).col;
1765
-
1766
- // const cell: any = table?.querySelector(`.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col}"]`)
1767
1832
  const cell = table?.querySelector(`.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col}"]`);
1768
1833
  if (cell) {
1769
1834
  cell.style.zIndex = 0;
1770
1835
  }
1771
- if (cell && cell.classList.contains('ui-rc-table-cell-fix-left')) {
1836
+ if (cell && (cell.classList.contains('ui-rc-table-cell-fix-left') || cell.classList.contains('ui-rc-table-cell-fix-right'))) {
1772
1837
  cell.style.zIndex = 2;
1773
1838
  }
1774
1839
 
@@ -1778,10 +1843,6 @@ const onRemoveBorderSelectedCell = (selectedCells, id) => {
1778
1843
  removeBorderClass2('cell-border-top', id);
1779
1844
  removeBorderClass2('cell-border-right', id);
1780
1845
  removeBorderClass2('cell-border-left', id);
1781
-
1782
- // removeBorderClass(selectedCells, 'right', 'cell-border-right', id)
1783
- // removeBorderClass(selectedCells, 'top', 'cell-border-top', id)
1784
- // removeBorderClass(selectedCells, 'left', 'cell-border-left', id)
1785
1846
  };
1786
1847
  exports.onRemoveBorderSelectedCell = onRemoveBorderSelectedCell;
1787
1848
  const addClassBorderPasteCell = (pasteCells, type, id) => {
@@ -1805,6 +1866,8 @@ const removeClassBorderPasteCell = (pasteCells, type, id) => {
1805
1866
  removeBorderClass(pasteCells, 'top', 'cell-paste-border-top', id);
1806
1867
  removeBorderClass(pasteCells, 'left', 'cell-paste-border-left', id);
1807
1868
  };
1869
+
1870
+ ///////////////////////////////
1808
1871
  exports.removeClassBorderPasteCell = removeClassBorderPasteCell;
1809
1872
  const addClassCellIndexSelected = (rowsSelected, id) => {
1810
1873
  // thêm class selected vào ô STT
@@ -1815,7 +1878,7 @@ const addClassCellIndexSelected = (rowsSelected, id) => {
1815
1878
  const cellsSelectedIndex = table && rowsSelectedSelectors.length > 0 ? table?.querySelectorAll(rowsSelectedSelectors) : null;
1816
1879
  if (cellsSelectedIndex) {
1817
1880
  cellsSelectedIndex.forEach(cell => {
1818
- cell.classList.add('selected');
1881
+ cell.classList.add('selected-index');
1819
1882
  });
1820
1883
  }
1821
1884
  }
@@ -1830,7 +1893,7 @@ const removeClassCellIndexSelected = (rowsSelected, id) => {
1830
1893
  const cellsSelectedIndex = table && rowsSelectedSelectors.length > 0 ? table?.querySelectorAll(rowsSelectedSelectors) : null;
1831
1894
  if (cellsSelectedIndex) {
1832
1895
  cellsSelectedIndex.forEach(cell => {
1833
- cell.classList.remove('selected');
1896
+ cell.classList.remove('selected-index');
1834
1897
  });
1835
1898
  }
1836
1899
  }
@@ -1840,7 +1903,19 @@ const showDraggingPoint = (selectedCells, id) => {
1840
1903
  const row = getLastSelectCell(selectedCells).row;
1841
1904
  const col = getLastSelectCell(selectedCells).col;
1842
1905
  const table = document.querySelector(`#${id}`);
1906
+
1907
+ // tăng z-index để hiển thị round point paste
1908
+
1843
1909
  const cell = table?.querySelector(`.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col}"]`);
1910
+
1911
+ // if (cell) {
1912
+ // cell.style.zIndex = 1
1913
+ // }
1914
+ //
1915
+ // if (cell && (cell.classList.contains('ui-rc-table-cell-fix-left') || cell.classList.contains('ui-rc-table-cell-fix-right'))) {
1916
+ // cell.style.zIndex = 3;
1917
+ // }
1918
+
1844
1919
  const point = cell?.querySelector('.dragging-point');
1845
1920
  if (point) {
1846
1921
  point.classList.add('show');
@@ -1851,20 +1926,40 @@ exports.showDraggingPoint = showDraggingPoint;
1851
1926
  const hideDraggingPoint = (selectedCells, id) => {
1852
1927
  const table = document.querySelector(`#${id}`);
1853
1928
 
1854
- // const point = table?.querySelector('.dragging-point.show')
1855
- // const points = document.querySelectorAll('.dragging-point.show')
1856
- const points = table?.querySelectorAll('.dragging-point.show');
1929
+ // xóa z-index về mặc định
1857
1930
 
1858
- // if (point) {
1859
- // point.classList.add('hidden')
1860
- // point.classList.remove('show')
1861
- // }
1931
+ const row = getLastSelectCell(selectedCells).row;
1932
+ const col = getLastSelectCell(selectedCells).col;
1933
+ const cell = table?.querySelector(`.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col}"]`);
1934
+ // const cellRight: any = table?.querySelector(`.ui-rc-table.ui-rc-table-ping-left:not(.ui-rc-table.ui-rc-table-ping-right) .ui-rc-table-tbody .rc-ui-cell-editable.cell-editable.ui-rc-table-cell-fix-right.ui-rc-table-cell[data-row-index="${row}"][data-col-index="${col + 1}"]`)
1862
1935
 
1936
+ if (cell) {
1937
+ cell.style.zIndex = 0;
1938
+ }
1939
+ if (cell && (cell.classList.contains('ui-rc-table-cell-fix-left') || cell.classList.contains('ui-rc-table-cell-fix-right'))) {
1940
+ // cell.style.zIndex = cellRight ? 1 : 2
1941
+ cell.style.zIndex = 2;
1942
+ }
1943
+ const points = table?.querySelectorAll('.dragging-point.show');
1863
1944
  if (points && points.length > 0) {
1864
- points.forEach(cell => {
1865
- cell.classList.add('hidden');
1866
- cell.classList.remove('show');
1945
+ points.forEach(c => {
1946
+ c.classList.add('hidden');
1947
+ c.classList.remove('show');
1867
1948
  });
1868
1949
  }
1869
1950
  };
1870
- exports.hideDraggingPoint = hideDraggingPoint;
1951
+ exports.hideDraggingPoint = hideDraggingPoint;
1952
+ const isRangeCell = (selectedCells, type, rowIndex, colIndex) => {
1953
+ const typeCells = getCellsByPosition(selectedCells, type);
1954
+ const key = `${rowIndex}-${colIndex}`;
1955
+ return typeCells.includes(key);
1956
+ };
1957
+ exports.isRangeCell = isRangeCell;
1958
+ const isSelectedCell = (selectedCells, rowIndex, colIndex) => {
1959
+ if (selectedCells.size === 1) {
1960
+ return false;
1961
+ }
1962
+ const key = `${rowIndex}-${colIndex}`;
1963
+ return selectedCells.has(key);
1964
+ };
1965
+ exports.isSelectedCell = isSelectedCell;
@@ -157,7 +157,11 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
157
157
  background-color: #f0f0f0;
158
158
  }
159
159
 
160
- &.selected {
160
+ //&.selected {
161
+ // //background: red;
162
+ // background-color: $cell-selected-bg !important;
163
+ //}
164
+ &.selected-bg {
161
165
  //background: red;
162
166
  background-color: $cell-selected-bg !important;
163
167
  }
@@ -286,10 +290,24 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
286
290
  }
287
291
  }
288
292
 
289
- .#{$prefix}-table-bordered .#{$prefix}-table-tbody-virtual .#{$prefix}-table-cell.#{$prefix}-table-cell-fix-right-first:before {
290
- border-inline-start: 1px solid $tableBorderColor;
293
+ //.#{$prefix}-table-bordered .#{$prefix}-table-tbody-virtual .#{$prefix}-table-cell.#{$prefix}-table-cell-fix-right-first:before {
294
+ // border-inline-start: 1px solid $tableBorderColor;
295
+ //}
296
+
297
+ .#{$prefix}-table-bordered .#{$prefix}-table-tbody-virtual .#{$prefix}-table-cell.#{$prefix}-table-cell-fix-right-first {
298
+ &::before {
299
+ border-inline-start: 1px solid $tableBorderColor;
300
+ }
301
+ &.has-before::before {
302
+ border-inline-start: 1px solid $border-selected-color;
303
+ }
304
+ &.cell-border-left.selected-bg::before {
305
+ border-inline-start: 1px solid $border-selected-color;
306
+ }
291
307
  }
292
308
 
309
+
310
+
293
311
  .#{$prefix}-table {
294
312
 
295
313
  &.#{$prefix}-table-bordered {
@@ -428,7 +446,7 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
428
446
  background-color: $cell-index-focus-bg;
429
447
  //font-weight: 500;
430
448
  }
431
- &.selected {
449
+ &.selected-index {
432
450
  background-color: $cell-index-selected-bg !important;
433
451
  color: #fff;
434
452
  //font-weight: 500;
@@ -439,6 +457,30 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
439
457
 
440
458
  &.cell-border-top {
441
459
  border-bottom: 1px solid $border-selected-color;
460
+
461
+ //&::after {
462
+ // content: "";
463
+ // position: absolute;
464
+ // top: -1px;
465
+ // left: 0;
466
+ //
467
+ // height: 1px;
468
+ // width: 100%;
469
+ // border-top: 1px solid red;
470
+ // pointer-events: none;
471
+ // z-index: 1;
472
+ //}
473
+ //&.ui-rc-table-cell-fix-left {
474
+ // &::after {
475
+ // left: -100%;
476
+ // }
477
+ //}
478
+ //&.ui-rc-table-cell-fix-right {
479
+ // &::after {
480
+ // left: 100%;
481
+ // }
482
+ //}
483
+
442
484
  }
443
485
 
444
486
  &.cell-border-bottom {
@@ -447,6 +489,17 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
447
489
 
448
490
  &.cell-border-left {
449
491
  border-inline-end: 1px solid $border-selected-color;
492
+ //&::before {
493
+ // content: "";
494
+ // position: absolute;
495
+ // top: 0;
496
+ // left: 0;
497
+ // height: 102%;
498
+ // width: 1px;
499
+ // border-left: 1px solid red;
500
+ // pointer-events: none;
501
+ // z-index: 1;
502
+ //}
450
503
  }
451
504
 
452
505
  &.cell-border-right {
@@ -564,7 +617,11 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
564
617
  // //}
565
618
 
566
619
  &.#{$prefix}-table-cell-fix-right {
567
- z-index: 0;
620
+ z-index: 0 !important;
621
+
622
+ &:has(.dragging-point.show) {
623
+ z-index: 3 !important;
624
+ }
568
625
 
569
626
  &.cell-border-end {
570
627
  z-index: 3;