es-grid-template 1.9.49 → 1.9.51

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 (30) hide show
  1. package/es/ali-table/Grid.js +14 -8
  2. package/es/ali-table/InternalTable.js +29 -0
  3. package/es/ali-table/base-table/styles.d.ts +5 -1
  4. package/es/ali-table/base-table/styles.js +13 -4
  5. package/es/ali-table/base-table/table.js +1 -1
  6. package/es/ali-table/utils/selected.js +0 -1
  7. package/es/group-component/hook/utils.d.ts +3 -3
  8. package/es/table-component/TableContainerEdit.js +12 -5
  9. package/es/table-component/body/EditableCell.d.ts +3 -0
  10. package/es/table-component/body/EditableCell.js +122 -36
  11. package/es/table-component/body/TableBodyCellEdit.js +70 -9
  12. package/es/table-component/hook/useColumns.js +2 -2
  13. package/es/table-component/hook/utils.d.ts +3 -0
  14. package/es/table-component/hook/utils.js +32 -1
  15. package/es/table-component/style.scss +6 -0
  16. package/lib/ali-table/Grid.js +14 -8
  17. package/lib/ali-table/InternalTable.js +29 -0
  18. package/lib/ali-table/base-table/styles.d.ts +5 -1
  19. package/lib/ali-table/base-table/styles.js +13 -4
  20. package/lib/ali-table/base-table/table.js +1 -1
  21. package/lib/ali-table/utils/selected.js +0 -1
  22. package/lib/table-component/TableContainerEdit.js +12 -5
  23. package/lib/table-component/body/EditableCell.d.ts +3 -0
  24. package/lib/table-component/body/EditableCell.js +122 -36
  25. package/lib/table-component/body/TableBodyCellEdit.js +69 -8
  26. package/lib/table-component/hook/useColumns.js +2 -2
  27. package/lib/table-component/hook/utils.d.ts +3 -0
  28. package/lib/table-component/hook/utils.js +37 -4
  29. package/lib/table-component/style.scss +6 -0
  30. package/package.json +1 -1
@@ -15,7 +15,6 @@ import ContextMenu from "../table-component/ContextMenu";
15
15
  import { TableContext } from "./useContext";
16
16
  import { ColumnsChoose } from "./pipeline/features/ColumnsChoose";
17
17
  import { StyleTableContainer } from "./base-table/styles";
18
- // const Grid = (props: GridProps) => {
19
18
  const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
20
19
  const {
21
20
  id,
@@ -56,7 +55,8 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
56
55
  loading,
57
56
  useVirtual,
58
57
  useOuterBorder = true,
59
- showHeader = true
58
+ showHeader = true,
59
+ gridLines
60
60
  } = props;
61
61
  const {
62
62
  cssVariables
@@ -159,7 +159,11 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
159
159
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyleTableContainer, {
160
160
  className: classNames(`${prefix}-grid`, {
161
161
  [tableClassNames]: !!tableClassNames,
162
- [`${prefix}-grid-theme-dark`]: theme?.theme === 'dark'
162
+ [`${prefix}-grid-theme-dark`]: theme?.theme === 'dark',
163
+ [`${prefix}-grid-line-horizontal`]: gridLines === 'Horizontal',
164
+ [`${prefix}-grid-line-vertical`]: gridLines === 'Vertical',
165
+ [`${prefix}-grid-line-none`]: gridLines === 'None',
166
+ [`use-outer-border`]: useOuterBorder
163
167
  }),
164
168
  style: {
165
169
  maxHeight: height ?? 700,
@@ -168,8 +172,8 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
168
172
  flexDirection: 'column',
169
173
  ...artTableWrapperProps.style
170
174
  }
171
- }, (showToolbar !== false || fullScreen !== false || title) && /*#__PURE__*/React.createElement("div", {
172
- className: classNames(`${prefix}-grid-top-toolbar`, {})
175
+ }, (showToolbar !== false || fullScreen !== false || title || topToolbaritems.length > 0) && /*#__PURE__*/React.createElement("div", {
176
+ className: classNames(`${prefix}-grid-top`, {})
173
177
  }, /*#__PURE__*/React.createElement("div", {
174
178
  style: {
175
179
  display: 'flex',
@@ -244,7 +248,7 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
244
248
 
245
249
  // estimatedRowHeight={50}
246
250
  ,
247
- useOuterBorder: useOuterBorder
251
+ useOuterBorder: false
248
252
  // style={{ height: 700, overflow: 'auto' }}
249
253
  ,
250
254
  style: minHeight ? {
@@ -293,7 +297,9 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
293
297
  },
294
298
  theme: theme,
295
299
  footerDataSource: footerDataSource
296
- })), bottom, pagination && !infiniteScroll && /*#__PURE__*/React.createElement(Pagination, _extends({
300
+ })), (bottom || pagination && !infiniteScroll) && /*#__PURE__*/React.createElement("div", {
301
+ className: classNames(`${prefix}-grid-bottom`, {})
302
+ }, bottom, pagination && !infiniteScroll && /*#__PURE__*/React.createElement(Pagination, _extends({
297
303
  pageSizeOptions: pageSizeOptions,
298
304
  rootClassName: 'pagination-template',
299
305
  showSizeChanger: true,
@@ -320,7 +326,7 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
320
326
  }
321
327
  },
322
328
  responsive: true
323
- }))), /*#__PURE__*/React.createElement(Tooltip, {
329
+ })))), /*#__PURE__*/React.createElement(Tooltip, {
324
330
  id: `${id}-tooltip-content`,
325
331
  style: {
326
332
  zIndex: 1999,
@@ -236,6 +236,35 @@ const InternalTable = props => {
236
236
  // colorLink: '#eb4619',
237
237
  },
238
238
  components: {
239
+ // Input: {
240
+ // activeBorderColor: '#1677ff',
241
+ // hoverBorderColor: '#1677ff',
242
+ // },
243
+ // Button: {
244
+ // colorLink: '#eb4619',
245
+ // colorLinkHover: '#eb4619'
246
+ // },
247
+ TableSelect: {
248
+ // activeBorderColor: '#1677ff',
249
+ // hoverBorderColor: '#1677ff',
250
+ zIndexPopup: 1158
251
+ },
252
+ Select: {
253
+ // activeBorderColor: '#1677ff',
254
+ // hoverBorderColor: '#1677ff',
255
+ zIndexPopup: 1158
256
+ // colorPrimary: '#eb4619',
257
+ // colorBgBase: 'red'
258
+ },
259
+ DatePicker: {
260
+ // colorPrimary: '#eb4619',
261
+ // activeBorderColor: '#1677ff',
262
+ // hoverBorderColor: '#1677ff',
263
+ zIndexPopup: 1158
264
+ },
265
+ // Pagination: {
266
+ // fontSize: 12
267
+ // },
239
268
  Dropdown: {
240
269
  zIndexPopup: 1158
241
270
  },
@@ -2,9 +2,13 @@
2
2
  export declare const LOCK_SHADOW_PADDING = 20;
3
3
  export declare const Classes: {
4
4
  /** Outer wrapper div for BaseTable component */
5
- readonly artTableWrapper: "ui-rc-grid-table-wrapper";
5
+ readonly tableWrapper: "ui-rc-grid-table-wrapper";
6
6
  readonly tableThemeDark: "ui-rc-grid-theme-dark";
7
7
  readonly artTable: "ui-rc-grid-table";
8
+ readonly tableTop: "ui-rc-grid-top";
9
+ readonly gridHorizontal: "ui-rc-grid-line-horizontal";
10
+ readonly gridVertical: "ui-rc-grid-line-vertical";
11
+ readonly gridNone: "ui-rc-grid-line-none";
8
12
  readonly tableHeader: "ui-rc-grid-table-header";
9
13
  readonly tableBody: "ui-rc-grid-table-body";
10
14
  readonly tableFooter: "ui-rc-grid-table-footer";
@@ -3,9 +3,18 @@ export const LOCK_SHADOW_PADDING = 20;
3
3
  const prefix = 'ui-rc-grid-';
4
4
  export const Classes = {
5
5
  /** Outer wrapper div for BaseTable component */
6
- artTableWrapper: `${prefix}table-wrapper`,
6
+ tableWrapper: `${prefix}table-wrapper`,
7
7
  tableThemeDark: `${prefix}theme-dark`,
8
8
  artTable: `${prefix}table`,
9
+ tableTop: `${prefix}top`,
10
+ // toolbar_top + title
11
+ gridHorizontal: `${prefix}line-horizontal`,
12
+ // line-horizontal
13
+ gridVertical: `${prefix}line-vertical`,
14
+ // line-vertical
15
+ gridNone: `${prefix}line-none`,
16
+ // line-vertical
17
+
9
18
  tableHeader: `${prefix}table-header`,
10
19
  tableBody: `${prefix}table-body`,
11
20
  tableFooter: `${prefix}table-footer`,
@@ -45,11 +54,11 @@ const Z = {
45
54
  scrollItem: 30,
46
55
  loadingIndicator: 40
47
56
  };
48
- const outerBorderStyleMixin = css(["border-top:var(--cell-border-horizontal);border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);border-left:var(--cell-border-vertical);td.first,th.first{border-left:none;}td.last,th.last{border-right:none;}thead tr.first th,tbody tr.first td{border-top:none;}&.has-footer tfoot tr.last td{}&.has-footer tbody tr.last td{&.lock-left,&.lock-right{border-bottom-width:0;border-top-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 0px 0 0 var(--border-color),-1px 0 0 0 var(--border-color);}}&.has-footer tfoot tr td{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}&:not(.has-footer) tbody tr.last td{border-bottom:none;}"], Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight);
57
+ const outerBorderStyleMixin = css(["border-top:var(--cell-border-horizontal);border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);border-left:var(--cell-border-vertical);.", "{border-left:0;border-right:0;border-top:0;}td.first,th.first{border-left:none;}td.last,th.last{border-right:none;}thead tr.first th,tbody tr.first td{border-top:none;}.has-footer tfoot tr.last td{}.has-footer tbody tr.last td{&.lock-left,&.lock-right{border-bottom-width:0;border-top-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 0px 0 0 var(--border-color),-1px 0 0 0 var(--border-color);}}.has-footer tfoot tr td{background:var(--footer-bgcolor);&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{border-top:var(--cell-border-vertical);}&.", "{&:has(.", ") thead tr.first th{border-top:0;}}"], Classes.tableWrapper, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableTop, Classes.gridNone, Classes.tableTop);
49
58
  export const StyledArtTableWrapper = styled.div.withConfig({
50
59
  displayName: "StyledArtTableWrapper",
51
60
  componentId: "es-grid-template__sc-ipj1ht-0"
52
- })(["--row-height:38px;--color:#333;--bgcolor:white;--hover-bgcolor:var(--hover-bgcolor,#f5f5f5);--hover-color:var(--hover-color,#333);--highlight-bgcolor:#eee;--header-row-height:36px;--header-color:#000000de;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--lock-shadow:rgba(152,152,152,0.5) 0 0 6px 2px;--border-color:#dfe3e8;--cell-border:1px solid var(--border-color);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgColor:#fafafa;box-sizing:border-box;*{box-sizing:border-box;}cursor:default;color:var(--color);font-size:var(--font-size);line-height:var(--line-height);position:relative;overflow-anchor:none;&::-webkit-scrollbar{width:8px;height:8px;}&::-webkit-scrollbar-track{background:var(--bgcolor);}&::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.4);border-radius:8px;}&::-webkit-scrollbar-thumb:hover{background:#555;}&.dark{&::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.3);}&::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.5);}}&.use-outer-border{", ";}.no-scrollbar{scrollbar-width:none;::-webkit-scrollbar{display:none;}}.", "{overflow-x:auto;overflow-y:hidden;background:var(--header-bgcolor);.ui-rc-table-column-title{flex:1;min-width:0;text-align:start;}.", "{font-weight:500;.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}.", "{width:100%;white-space:normal;word-break:break-word;}.", "{text-align:center;}.", "{text-align:right;}}}.", "{.", "{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;.expansion-cell{.expansion-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}.", "{background:var(--footer-bgcolor);}}.", ",.", "{overflow-x:auto;overflow-y:hidden;}&.sticky-header .", "{position:sticky;top:0;z-index:", ";}&.sticky-footer .", "{position:sticky;bottom:0;z-index:", ";}.", "{tr{td{&.lock-left,&.lock-right{border-bottom-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 0px 0 0 var(--border-color),-1px 0 0 0 var(--border-color);}}}}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;display:table;margin:0;padding:0;}tr:not(.no-hover):hover > td{background:var(--hover-bgcolor);color:var(--hover-color);}tr:not(.no-highlight).highlight > td{}th{font-weight:normal;text-align:left;padding:var(--cell-padding);height:var(--header-row-height);color:var(--header-color);background:var(--header-bgcolor);border:none;border-right:var(--header-cell-border-vertical);border-bottom:var(--header-cell-border-horizontal);}tr.first th{border-top:var(--header-cell-border-horizontal);}th.first{border-left:var(--header-cell-border-vertical);}td{padding:var(--cell-padding);background:var(--bgcolor);height:var(--row-height);border:none;border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);}td.first{border-left:var(--cell-border-vertical);}tr.first td{border-top:var(--cell-border-horizontal);}&.has-header tbody tr.first td{border-top:none;}&.has-footer tbody tr.last td{border-bottom:none;}&.has-footer tfoot tr > td{background:var(--footer-bgcolor);color:var(--footer-color);}&.has-footer tfoot tr:not(.no-hover):hover > td{background:var(--footer-bgcolor);}.lock-left,.lock-right{z-index:", ";}.resize-handle{width:6px;height:100%;position:absolute;top:0;right:0;cursor:col-resize;background-color:transparent;border-right:2px solid transparent;}.", "{position:absolute;top:0;bottom:0;z-index:", ";pointer-events:none;overflow:hidden;.", "{height:100%;}.", "{margin-right:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-right:var(--cell-border-vertical);}}.", "{margin-left:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-left:var(--cell-border-vertical);}}}.", "{pointer-events:none;color:#99a3b3;font-size:12px;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);.empty-image{width:50px;height:50px;}.empty-tips{margin-top:16px;line-height:1.5;}}.", "{overflow:auto;position:sticky;bottom:0;z-index:", ";margin-top:-17px;}.ui-rc-grid-loading-wrapper{}.ui-rc-grid-table{}.art-loading-content-wrapper{}.", "{height:1px;visibility:hidden;}.", "{position:relative;.", "{position:absolute;inset:0;pointer-events:none;}.", "{position:sticky;z-index:", ";transform:translateY(-50%);}}"], outerBorderStyleMixin, Classes.tableHeader, Classes.tableHeaderCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Classes.tableBody, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator);
61
+ })(["box-sizing:border-box;*{box-sizing:border-box;}cursor:default;color:var(--color);font-size:var(--font-size);line-height:var(--line-height);position:relative;overflow-anchor:none;&::-webkit-scrollbar{width:8px;height:8px;}&::-webkit-scrollbar-track{background:var(--bgcolor);}&::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.4);border-radius:8px;}&::-webkit-scrollbar-thumb:hover{background:#555;}&.dark{&::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.3);}&::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.5);}}&.", "{border:var(--cell-border-vertical);&.has-footer{.", "{td{}}}}&.use-outer-border{}.no-scrollbar{scrollbar-width:none;::-webkit-scrollbar{display:none;}}.", "{overflow-x:auto;overflow-y:hidden;background:var(--header-bgcolor);.ui-rc-table-column-title{flex:1;min-width:0;text-align:start;}.", "{font-weight:500;.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}.", "{width:100%;white-space:normal;word-break:break-word;}.", "{text-align:center;}.", "{text-align:right;}}}.", "{.", "{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;.expansion-cell{.expansion-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}.", "{background:var(--footer-bgcolor);}}.", ",.", "{overflow-x:auto;overflow-y:hidden;}&.sticky-header .", "{position:sticky;top:0;z-index:", ";}&.sticky-footer .", "{position:sticky;bottom:0;z-index:", ";}.", "{tr{td{&.lock-left,&.lock-right{border-bottom-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 0px 0 0 var(--border-color),-1px 0 0 0 var(--border-color);}}td.first{&.lock-left{border-bottom-width:1px;}}}}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;display:table;margin:0;padding:0;}tr:not(.no-hover):hover > td{background:var(--hover-bgcolor);color:var(--hover-color);}tr:not(.no-highlight).highlight > td{}th{font-weight:normal;text-align:left;padding:var(--cell-padding);height:var(--header-row-height);color:var(--header-color);background:var(--header-bgcolor);border:none;border-right:var(--header-cell-border-vertical);border-bottom:var(--header-cell-border-horizontal);}tr.first th{}th.first{}td{padding:var(--cell-padding);background:var(--bgcolor);height:var(--row-height);border:none;border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);}td.first{}tr.first td{border-top:var(--cell-border-horizontal);}&.has-header tbody tr.first td{border-top:none;}&.has-footer tbody tr.last td{border-bottom:none;}&.has-footer tfoot tr > td{background:var(--footer-bgcolor);color:var(--footer-color);}&.has-footer tfoot tr:not(.no-hover):hover > td{background:var(--footer-bgcolor);}.lock-left,.lock-right{z-index:", ";}.resize-handle{width:6px;height:100%;position:absolute;top:0;right:0;cursor:col-resize;background-color:transparent;border-right:2px solid transparent;}.", "{position:absolute;top:0;bottom:0;z-index:", ";pointer-events:none;overflow:hidden;.", "{height:100%;}.", "{margin-right:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-right:var(--cell-border-vertical);}}.", "{margin-left:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-left:var(--cell-border-vertical);}}}.", "{pointer-events:none;color:#99a3b3;font-size:12px;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);.empty-image{width:50px;height:50px;}.empty-tips{margin-top:16px;line-height:1.5;}}.", "{overflow:auto;position:sticky;bottom:0;z-index:", ";margin-top:-17px;}.ui-rc-grid-loading-wrapper{}.ui-rc-grid-table{}.art-loading-content-wrapper{display:flex;height:100%;}.", "{height:1px;visibility:hidden;}.", "{position:relative;height:100%;.", "{position:absolute;inset:0;pointer-events:none;}.", "{position:sticky;z-index:", ";transform:translateY(-50%);}}"], Classes.tableWrapper, Classes.tableFooter, Classes.tableHeader, Classes.tableHeaderCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Classes.tableBody, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator);
53
62
 
54
63
  // type StyleTableContainerProps = {
55
64
 
@@ -58,4 +67,4 @@ export const StyledArtTableWrapper = styled.div.withConfig({
58
67
  export const StyleTableContainer = styled.div.withConfig({
59
68
  displayName: "StyleTableContainer",
60
69
  componentId: "es-grid-template__sc-ipj1ht-1"
61
- })(["--color:#333;--bgcolor:white;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--border-color:#dfe3e8;--cell-border:1px solid var(--border-color);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgcolor:#fafafa;&.", "{--bgcolor:#343e59;--footer-bgcolor:#2e3342;--header-bgcolor:#343e59;--hover-bgcolor:#232b43;--header-hover-bgcolor:#606164;--highlight-bgcolor:#eff2f5;--header-highlight-bgcolor:#191a1b;--color:#dadde1;--header-color:#dadde1;--lock-shadow:rgb(37 37 37 / 0.5) 0 0 6px 2px;--border-color:#4f5266;background-color:var(--bgcolor);}&.ui-rc-grid .ui-rc-pagination{background-color:var(--bgcolor);color:var(--color);padding:10px;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-inline:1px solid var(--border-color);background-color:var(--bgcolor);.ui-rc-pagination-prev{.anticon.anticon-left{color:var(--color);}}.ui-rc-pagination-disabled{.anticon.anticon-left{color:#7d7a7a;}}.ui-rc-pagination-next{.anticon.anticon-right{color:var(--color);}&.ui-rc-pagination-disabled{.anticon.anticon-right{color:#7d7a7a;}}}}&.", "{&.ui-rc-grid{.ui-rc-toolbar-bottom{background-color:var(--footer-bgcolor);color:#ffffff;}}.ui-rc-grid-top-toolbar{border-color:var(--border-color);color:#ffffff;}.ui-rc-toolbar{.ui-rc-toolbar-selection-item{background-color:var(--footer-bgcolor);color:#ffffff;}}}"], Classes.tableThemeDark, Classes.tableThemeDark);
70
+ })(["--row-height:38px;--color:#333;--bgcolor:white;--body-hover-bgcolor:#f5f5f5;--body-hover-color:#333;--hover-bgcolor:var(--body-hover-bgcolor,#f5f5f5);--hover-color:var(--body-hover-color);--highlight-bgcolor:#eee;--header-row-height:36px;--header-color:#000000de;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--lock-shadow:rgba(152,152,152,0.5) 0 0 6px 2px;--border-color:#dfe3e8;--cell-border:1px solid var(--border-color);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgcolor:#fafafa;&.", "{--bgcolor:#343e59;--footer-bgcolor:#2e3342;--header-bgcolor:#343e59;--hover-bgcolor:#232b43;--header-hover-bgcolor:#606164;--highlight-bgcolor:#eff2f5;--header-highlight-bgcolor:#191a1b;--hover-color:#dadde1;--color:#dadde1;--header-color:#dadde1;--lock-shadow:rgb(37 37 37 / 0.5) 0 0 6px 2px;--border-color:#4f5266;background-color:var(--bgcolor);}&.use-outer-border{", ";}&.", "{.", "{border-left:0;border-right:0;td,th{border-right:0;}td.first,th.first{}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr.last td{}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{}}}&.", "{.", "{border-top:0;td,th{border-bottom:0;}td.lock-left{box-shadow:none;}td.first,th.first{}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr td{border-bottom:0;border-top:0;}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{}}}&.", "{.", "{border:0;td,th{border-right:0;border-bottom:0;}td.lock-left{box-shadow:none;}td.first,th.first{}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr td{border-bottom:0;border-top:0;}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{border-top:0;border:0;}}}.", "{padding:8px;}&.ui-rc-grid .ui-rc-pagination{background-color:var(--bgcolor);color:var(--color);padding:10px;background-color:var(--bgcolor);.ui-rc-pagination-prev{.anticon.anticon-left{color:var(--color);}}.ui-rc-pagination-disabled{.anticon.anticon-left{color:#7d7a7a;}}.ui-rc-pagination-next{.anticon.anticon-right{color:var(--color);}&.ui-rc-pagination-disabled{.anticon.anticon-right{color:#7d7a7a;}}}}&.", "{&.ui-rc-grid{.ui-rc-toolbar-bottom{background-color:var(--footer-bgcolor);color:#ffffff;}}.ui-rc-grid-top-toolbar{border-color:var(--border-color);color:#ffffff;}.ui-rc-toolbar{.ui-rc-toolbar-selection-item{background-color:var(--footer-bgcolor);color:#ffffff;}}}"], Classes.tableThemeDark, outerBorderStyleMixin, Classes.gridHorizontal, Classes.tableWrapper, Classes.tableTop, Classes.gridVertical, Classes.tableWrapper, Classes.tableTop, Classes.gridNone, Classes.tableWrapper, Classes.tableTop, Classes.tableTop, Classes.tableThemeDark);
@@ -350,7 +350,7 @@ export class BaseTable extends React.Component {
350
350
  footerDataSource,
351
351
  components
352
352
  } = this.props;
353
- const artTableWrapperClassName = cx(Classes.artTableWrapper, {
353
+ const artTableWrapperClassName = cx(Classes.tableWrapper, {
354
354
  'use-outer-border': useOuterBorder,
355
355
  empty: dataSource.length === 0,
356
356
  lock: info.hasLockColumn,
@@ -402,7 +402,6 @@ export function isRowChecked(key, selectedKeys, treeIndex, checkedStrategy, isDi
402
402
  // =========================
403
403
  if (checkedStrategy === 'parent') {
404
404
  // node disable => chỉ true nếu explicit chọn
405
- // console.log('isDisabled', isDisabled)
406
405
  if (isDisabled) {
407
406
  const abc = selectedKeys.has(key);
408
407
  return abc;
@@ -194,10 +194,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
194
194
  value: any;
195
195
  rowData: RecordType;
196
196
  }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
197
- onCellStyles?: Omit<CSSProperties, "position" | "display" | "left" | "minWidth" | "right" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "left" | "minWidth" | "right" | "width">);
198
- onCellHeaderStyles?: Omit<CSSProperties, "position" | "display" | "left" | "minWidth" | "right" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "left" | "minWidth" | "right" | "width">);
197
+ onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
198
+ onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
199
199
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
200
- onCellFooterStyles?: Omit<CSSProperties, "position" | "display" | "left" | "minWidth" | "right" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "left" | "minWidth" | "right" | "width">);
200
+ onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
201
201
  getValue?: (row: any, rowIndex: number) => any;
202
202
  getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
203
203
  headerCellProps?: import("./../../grid-component/type").CellProps;
@@ -416,11 +416,14 @@ const TableContainerEdit = props => {
416
416
  }
417
417
  } else if (columnOri.type === 'data' || columnOri.type === 'datatime' || columnOri.editType === 'date' || columnOri.editType === 'datetime') {
418
418
  const isDate = isDateValue(cellValue.trim());
419
- const colFormat = typeof columnOri?.format === 'function' ? columnOri?.format(record) : columnOri?.format;
420
- const cellFormat = getFormat(colFormat, format);
421
- const editType = getEditType(columnOri);
422
- const dateFormat = getDatepickerFormat(editType, cellFormat);
423
- const date = isDate && !isEmpty(cellValue.trim()) ? moment(cellValue.trim(), dateFormat).format("YYYY-MM-DDTHH:mm:ssZ") : null;
419
+
420
+ // const colFormat = typeof columnOri?.format === 'function' ? columnOri?.format(record) : columnOri?.format
421
+ // const cellFormat = getFormat(colFormat, format)
422
+ // const editType = getEditType(columnOri as any)
423
+ // const dateFormat = getDatepickerFormat(editType, cellFormat)
424
+ // const date = isDate && !isEmpty(cellValue.trim()) ? moment(cellValue.trim(), dateFormat, true).format() : null
425
+
426
+ const date = isDate && !isEmpty(cellValue.trim()) ? moment(cellValue.trim()).format() : null;
424
427
  newData[targetRow] = {
425
428
  ...newData[targetRow],
426
429
  [columnKey]: date
@@ -600,6 +603,8 @@ const TableContainerEdit = props => {
600
603
  handlePasted(rowsPasted);
601
604
  }
602
605
  }, [handlePasted, onCellPaste?.maxRowsPaste, startCell]);
606
+
607
+ // Copy
603
608
  React.useEffect(() => {
604
609
  const handleKeyDown = e => {
605
610
  if (e.ctrlKey && e.key === 'c' && startCell && endCell && !editingKey) {
@@ -610,6 +615,8 @@ const TableContainerEdit = props => {
610
615
  document.addEventListener('keydown', handleKeyDown);
611
616
  return () => document.removeEventListener('keydown', handleKeyDown);
612
617
  }, [startCell, endCell, table, copySelectionToClipboard, editingKey]);
618
+
619
+ // Paste
613
620
  React.useEffect(() => {
614
621
  const handlePaste = e => {
615
622
  if (startCell && !editingKey) {
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import type { EditType } from "rc-master-ui";
3
3
  import type { ColumnTable, IFormat } from "../../grid-component/type";
4
+ import type { Column } from "@tanstack/react-table";
4
5
  interface EditableCellProps<DataType> extends React.HTMLAttributes<HTMLElement> {
5
6
  t?: any;
6
7
  dataIndex: string;
@@ -11,6 +12,8 @@ interface EditableCellProps<DataType> extends React.HTMLAttributes<HTMLElement>
11
12
  indexRow: number;
12
13
  indexCol: number;
13
14
  cellEditing?: any;
15
+ visibleColumns?: Column<DataType>[];
16
+ handleNextCell?: () => void;
14
17
  }
15
18
  declare const EditableCell: <T>(props: EditableCellProps<T>) => JSX.Element;
16
19
  export default EditableCell;
@@ -43,7 +43,9 @@ const EditableCell = props => {
43
43
  // children,
44
44
  column,
45
45
  indexRow,
46
- indexCol
46
+ indexCol,
47
+ // visibleColumns,
48
+ handleNextCell
47
49
  // cellEditing,
48
50
  // ...restProps
49
51
  } = props;
@@ -61,8 +63,7 @@ const EditableCell = props => {
61
63
  } = useContext(TableContext);
62
64
  const datePickerRef = React.useRef(null);
63
65
  const dateTimePickerRef = React.useRef(null);
64
- // const timePickerRef = React.useRef(null);
65
-
66
+ const timePickerRef = React.useRef(null);
66
67
  const colFormat = typeof column?.format === 'function' ? column?.format(record) : column?.format;
67
68
  const cellFormat = getFormat(colFormat, format);
68
69
  const inputNode = (value, onChange) => {
@@ -99,7 +100,24 @@ const EditableCell = props => {
99
100
  const options = validateOption ? validateOption(record, column.field) : selectOptions ?? [];
100
101
  const optionsTree = validateOption ? convertArrayWithIndent(validateOption(record, column.field)) : selectOptions ? convertArrayWithIndent(selectOptions) : [];
101
102
 
102
- // const currt = flatColumns2()
103
+ // const focusToken = (token: FormatToken, fmt: string) => {
104
+ // const input: HTMLInputElement | null =
105
+ // timePickerRef.current?.nativeElement?.querySelector('input') ??
106
+ // timePickerRef.current?.input;
107
+
108
+ // if (!input) return;
109
+
110
+ // const start = fmt.indexOf(token);
111
+ // if (start === -1) return;
112
+
113
+ // input.focus();
114
+
115
+ // input.setSelectionRange(start, start + token.length - 1);
116
+
117
+ // requestAnimationFrame(() => {
118
+ // input.setSelectionRange(start, start + token.length);
119
+ // });
120
+ // };
103
121
 
104
122
  switch (editType) {
105
123
  case 'date':
@@ -324,6 +342,7 @@ const EditableCell = props => {
324
342
  const maxTime = maxTimeValue ? dayjs(maxTimeValue, timeFormat) : undefined;
325
343
  const minTime = minTimeValue ? dayjs(minTimeValue, timeFormat) : undefined;
326
344
  return /*#__PURE__*/React.createElement(TimePicker, {
345
+ ref: timePickerRef,
327
346
  format: {
328
347
  format: timeFormat,
329
348
  type: 'mask'
@@ -344,8 +363,79 @@ const EditableCell = props => {
344
363
  "data-tooltip-content": message,
345
364
  "data-tooltip-id": `${id}-tooltip-error`,
346
365
  autoFocus: column.field === startCell?.colId,
347
- defaultOpen: column.field === startCell?.colId,
348
- onChange: (newDate, dateString) => {
366
+ defaultOpen: column.field === startCell?.colId
367
+
368
+ // onChange={(newDate, dateString) => {
369
+
370
+ // if (typeTime === 'time') {
371
+
372
+ // onChange(dateString)
373
+
374
+ // } else {
375
+
376
+ // // const datetime = dayjs(dateString as string, timeFormat, true);
377
+
378
+ // const newVal = newDate ? moment(newDate.toDate()).format() : undefined
379
+
380
+ // // const newVal = datetime.isValid() ? moment(datetime.toDate()).format() : ''
381
+ // onChange(newVal)
382
+
383
+ // }
384
+
385
+ // setTimeout(() => {
386
+ // // @ts-ignore
387
+ // dateTimePickerRef.current?.focus()
388
+ // }, 0)
389
+
390
+ // }}
391
+
392
+ // onBlur={() => {
393
+ // const formState = getValues()
394
+ // const itemState = getValues(dataIndex)
395
+ // // @ts-ignore
396
+ // const prevState = record[dataIndex]
397
+ // const newState = itemState
398
+
399
+ // let newValue = newState
400
+
401
+ // if (typeTime === 'time') {
402
+
403
+ // newValue = newState
404
+
405
+ // } else {
406
+
407
+ // const datetime = dayjs(newState as string, timeFormat, true);
408
+
409
+ // const newVal = datetime.isValid() ? moment(datetime.toDate()).format() : undefined
410
+ // onChange(newVal)
411
+
412
+ // newValue = newVal
413
+
414
+ // }
415
+
416
+ // if (prevState !== newState) {
417
+ // handleCellChange?.({
418
+ // key: key as any,
419
+ // field: column.field ?? column.field as any,
420
+ // record: formState,
421
+ // prevState,
422
+ // newState: newValue,
423
+ // option: newValue,
424
+ // indexCol,
425
+ // indexRow,
426
+ // type: 'blur'
427
+ // })
428
+ // }
429
+ // }}
430
+
431
+ // needConfirm={false}
432
+ ,
433
+
434
+ onCalendarChange: (newDate, dateString) => {
435
+ // const newDateValue = dateString ? moment(convertDayjsToDate(dateString as string, dateFormat)).format() : null
436
+
437
+ // onChange(newDateValue)
438
+
349
439
  if (typeTime === 'time') {
350
440
  onChange(dateString);
351
441
  } else {
@@ -358,38 +448,34 @@ const EditableCell = props => {
358
448
  }
359
449
  setTimeout(() => {
360
450
  // @ts-ignore
361
- dateTimePickerRef.current?.focus();
362
- }, 0);
451
+ timePickerRef.current?.focus();
452
+ });
363
453
  },
364
- onBlur: () => {
365
- console.log('22222222222');
366
- const formState = getValues();
367
- const itemState = getValues(dataIndex);
368
- // @ts-ignore
369
- const prevState = record[dataIndex];
370
- const newState = itemState;
371
- let newValue = newState;
372
- if (typeTime === 'time') {
373
- newValue = newState;
374
- } else {
375
- const datetime = dayjs(newState, timeFormat, true);
376
- const newVal = datetime.isValid() ? moment(datetime.toDate()).format() : undefined;
377
- onChange(newVal);
378
- newValue = newVal;
454
+ onOpenChange: open => {
455
+ if (!open) {
456
+ const formState = getValues();
457
+ const itemState = getValues(dataIndex);
458
+ // @ts-ignore
459
+ const prevState = record[dataIndex];
460
+ const newState = itemState;
461
+ if (prevState !== newState) {
462
+ handleCellChange?.({
463
+ key: key,
464
+ field: column.field ?? column.field,
465
+ record: formState,
466
+ prevState,
467
+ newState,
468
+ option: newState,
469
+ indexCol,
470
+ indexRow,
471
+ type: 'blur'
472
+ });
473
+ }
379
474
  }
380
- console.log('newValue', newValue);
381
- if (prevState !== newState) {
382
- handleCellChange?.({
383
- key: key,
384
- field: column.field ?? column.field,
385
- record: formState,
386
- prevState,
387
- newState: newValue,
388
- option: newValue,
389
- indexCol,
390
- indexRow,
391
- type: 'blur'
392
- });
475
+ },
476
+ onKeyDown: e => {
477
+ if (e?.code === "Tab") {
478
+ handleNextCell?.();
393
479
  }
394
480
  }
395
481
  });
@@ -1,6 +1,6 @@
1
1
  import Space from "rc-master-ui/es/space";
2
2
  import Command from "../components/command/Command";
3
- import { addRowsDown, addRowsDownWithCtrl, addRowsUp, addRowsUpWithCtrl, findFirst, flattenArray, flattenData, getColIdsBetween, getCommonPinningStyles, getEditType, getFormat, getRowIdsBetween, getSelectedCellMatrix, isEditable, isObjEmpty, isObjEqual, newGuid, unFlattenData, updateOrInsert } from "../hook/utils";
3
+ import { addRowsDown, addRowsDownWithCtrl, addRowsUp, addRowsUpWithCtrl, findFirst, flattenArray, flattenData, getColIdsBetween, getCommonPinningStyles, getEditType, getFormat, getNextEditableColumn, getRowIdsBetween, getSelectedCellMatrix, isEditable, isObjEmpty, isObjEqual, newGuid, unFlattenData, updateOrInsert } from "../hook/utils";
4
4
  import Checkbox from "rc-master-ui/es/checkbox/Checkbox";
5
5
  import classNames from "classnames";
6
6
  import React from "react";
@@ -232,6 +232,7 @@ const TableBodyCellEdit = props => {
232
232
  format
233
233
  } = React.useContext(TableContext);
234
234
  const expandIconColumnIndex = expandable?.expandIconColumnIndex;
235
+ const visibleColumns = table.getVisibleLeafColumns();
235
236
  const record = cell.row.original;
236
237
  const columnMeta = cell.column.columnDef.meta ?? {};
237
238
  const [isOpenTooltip, setIsOpenTooltip] = React.useState(false);
@@ -309,7 +310,9 @@ const TableBodyCellEdit = props => {
309
310
  }
310
311
  }, [cell, columnMeta, isOpenTooltip, record, valueCellString]);
311
312
  const triggerDragPaste = (pasteState, ctrlKey) => {
312
- const tmpCols = table.getVisibleLeafColumns();
313
+ const tmpCols = {
314
+ ...visibleColumns
315
+ };
313
316
  const rowPasteIds = getRowIdsBetween(table, startPasteCell?.rowId ?? '', endPasteCell?.rowId ?? '');
314
317
  const colPasteds = getColIdsBetween(table, startPasteCell?.colId ?? '', endPasteCell?.colId ?? '');
315
318
  const rowSelectIds = getRowIdsBetween(table, startCell?.rowId ?? '', endCell?.rowId ?? '');
@@ -383,7 +386,9 @@ const TableBodyCellEdit = props => {
383
386
  setRangePasteState?.(undefined);
384
387
  };
385
388
  const triggerPointPaste = (pasteState, cellStart, cellEnd, ctrlKey) => {
386
- const tmpCols = table.getVisibleLeafColumns();
389
+ const tmpCols = {
390
+ ...visibleColumns
391
+ };
387
392
  const rowPasteIds = getRowIdsBetween(table, cellStart?.rowId ?? '', cellEnd?.rowId ?? '');
388
393
  const colPasteds = getColIdsBetween(table, cellStart?.colId ?? '', cellEnd?.colId ?? '');
389
394
  const rowSelectIds = getRowIdsBetween(table, startCell?.rowId ?? '', endCell?.rowId ?? '');
@@ -584,7 +589,9 @@ const TableBodyCellEdit = props => {
584
589
  function handleKeyDown(e, rowId, colId) {
585
590
  if (e.key === 'Tab') {
586
591
  e.preventDefault();
587
- const allCols = table.getVisibleLeafColumns();
592
+ const allCols = {
593
+ ...visibleColumns
594
+ };
588
595
  const currentColIndex = table.getColumn(colId)?.getIndex() ?? 0;
589
596
  const nextCol = allCols[currentColIndex + 1];
590
597
  if (nextCol) {
@@ -648,7 +655,7 @@ const TableBodyCellEdit = props => {
648
655
  if (e.key === 'ArrowRight') {
649
656
  e.preventDefault();
650
657
  e.stopPropagation();
651
- const allCols = table.getVisibleLeafColumns().filter(it => !nonActionColumn.includes(it.id));
658
+ const allCols = visibleColumns.filter(it => !nonActionColumn.includes(it.id));
652
659
  const currentColIndex = allCols.findIndex(it => it.id === cell.column.id);
653
660
  const nextCol = allCols[currentColIndex + 1];
654
661
  if (nextCol) {
@@ -679,7 +686,7 @@ const TableBodyCellEdit = props => {
679
686
  }
680
687
  if (e.key === 'ArrowLeft') {
681
688
  e.preventDefault();
682
- const allCols = table.getVisibleLeafColumns().filter(it => !nonActionColumn.includes(it.id));
689
+ const allCols = visibleColumns.filter(it => !nonActionColumn.includes(it.id));
683
690
 
684
691
  // const currentColIndex = table.getColumn(colId)?.getIndex() ?? 0;
685
692
  const currentColIndex = allCols.findIndex(it => it.id === cell.column.id);
@@ -827,7 +834,7 @@ const TableBodyCellEdit = props => {
827
834
  }
828
835
  const handleMouseDownIndex = rowId => {
829
836
  setIsSelecting?.(true);
830
- const allColumns = table.getVisibleLeafColumns().filter(it => !nonActionColumn.includes(it.id));
837
+ const allColumns = visibleColumns.filter(it => !nonActionColumn.includes(it.id));
831
838
  const firstCOlSpin = findFirst(allColumns);
832
839
  const startCol = allColumns[0].id;
833
840
  const endCol = allColumns[allColumns.length - 1].id;
@@ -861,7 +868,7 @@ const TableBodyCellEdit = props => {
861
868
  };
862
869
  const handleMouseEnterIndex = rowId => {
863
870
  if (isSelecting) {
864
- const allColumns = table.getVisibleLeafColumns().filter(it => !nonActionColumn.includes(it.id));
871
+ const allColumns = visibleColumns.filter(it => !nonActionColumn.includes(it.id));
865
872
 
866
873
  // const firstCOl = findFirst(allColumns)
867
874
 
@@ -1111,6 +1118,58 @@ const TableBodyCellEdit = props => {
1111
1118
  }, 100);
1112
1119
  }
1113
1120
  };
1121
+ const handleNextCell = () => {
1122
+ const allCols = visibleColumns;
1123
+
1124
+ // const colId = cell.column.id
1125
+ const rowId = cell.row.id;
1126
+
1127
+ // const currentColIndex = table.getColumn(colId)?.getIndex() ?? 0;
1128
+ // const currentColIndex = indexCol;
1129
+
1130
+ const isNextCol = allCols[colIndex + 1];
1131
+ const nextCol = getNextEditableColumn(visibleColumns, colIndex, record);
1132
+ if (isNextCol && nextCol) {
1133
+ setFocusedCell?.({
1134
+ rowId,
1135
+ colId: nextCol.id
1136
+ });
1137
+ setStartCell?.({
1138
+ rowId,
1139
+ colId: nextCol.id
1140
+ });
1141
+ setEndCell?.({
1142
+ rowId,
1143
+ colId: nextCol.id
1144
+ });
1145
+ setRangeState?.(getSelectedCellMatrix(table, {
1146
+ rowId,
1147
+ colId: nextCol.id
1148
+ }, {
1149
+ rowId,
1150
+ colId: nextCol.id
1151
+ }));
1152
+ columnVirtualizer.scrollToIndex(nextCol.getIndex(), {
1153
+ align: 'center'
1154
+ });
1155
+ const nextItem = document.querySelector(`.ui-rc-grid-row .cell-editing[data-row-key="${rowId}"].cell-editing[data-col-key="${nextCol.id}"] input`);
1156
+
1157
+ // const input = document.querySelector(`.ui-rc-table-row .cell-editing[data-row-index="${startSelectedCells.current.row}"].cell-editing[data-col-index="${startSelectedCells.current.col}"] input`) as HTMLInputElement
1158
+ // const textarea = document.querySelector(`.ui-rc-table-row .cell-editing[data-row-index="${rowNumber}"].cell-editing[data-col-index="${startSelectedCells.current.col}"] textarea`) as any
1159
+
1160
+ const textarea = document.querySelector(`.ui-rc-grid-row .cell-editing[data-row-key="${rowId}"].cell-editing[data-col-key="${nextCol.id}"] textarea`);
1161
+ setTimeout(() => {
1162
+ if (textarea) {
1163
+ textarea.focus();
1164
+ textarea.setSelectionRange(textarea.value.length, textarea.value.length);
1165
+ return;
1166
+ }
1167
+ if (nextItem) {
1168
+ nextItem.focus();
1169
+ }
1170
+ });
1171
+ }
1172
+ };
1114
1173
  const cellValue = cell.getValue();
1115
1174
  const rowIndex = cell.row.index;
1116
1175
  const colFormat = typeof columnMeta?.format === 'function' ? columnMeta?.format(record) : columnMeta?.format;
@@ -1246,7 +1305,9 @@ const TableBodyCellEdit = props => {
1246
1305
  editType: getEditType(cell.column.columnDef.meta, record),
1247
1306
  indexCol: cell.column.getIndex(),
1248
1307
  indexRow: cell.row.index,
1249
- record: record
1308
+ record: record,
1309
+ visibleColumns: visibleColumns,
1310
+ handleNextCell: handleNextCell
1250
1311
  // rowKey={rowKey}
1251
1312
  }) : /*#__PURE__*/React.createElement("div", {
1252
1313
  className: classNames('ui-rc_cell-content', {