@gm-pc/keyboard 1.28.0-beta.9 → 1.28.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-pc/keyboard",
3
- "version": "1.28.0-beta.9",
3
+ "version": "1.28.1-beta.0",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-pc#readme",
@@ -27,10 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@gm-common/tool": "^2.10.0",
30
- "@gm-pc/react": "^1.28.0-beta.9",
31
- "@gm-pc/table-x": "^1.28.0-beta.9",
30
+ "@gm-pc/react": "^1.28.1-beta.0",
32
31
  "classnames": "^2.2.5",
33
32
  "lodash": "^4.17.19"
34
33
  },
35
- "gitHead": "7fc1c5f55a36184f94825f800a6759d925bcf1ab"
34
+ "gitHead": "21e6355e34d987a7243fbdb16d3d3c4981a59344"
36
35
  }
@@ -1,8 +1,11 @@
1
1
  import React, { ComponentType, FC, useMemo } from 'react'
2
- import { TableXCellProps, TableXProps } from '@gm-pc/table-x'
2
+ import {
3
+ TableXCellProps,
4
+ TableXProps,
5
+ KeyboardTableXColumn,
6
+ KeyboardTableXProps,
7
+ } from '@gm-pc/table-x'
3
8
  import { devWarnForHook } from '@gm-common/tool'
4
-
5
- import { KeyboardTableXColumn, KeyboardTableXProps } from '../types'
6
9
  import { getColumnKey, CellKeyContext } from '../utils'
7
10
  import Wrap from '../core/wrap'
8
11
  /**
@@ -99,6 +102,7 @@ function keyboardTableXHOC<Props extends TableXProps = TableXProps>(
99
102
  }
100
103
  }
101
104
  })
105
+ console.log(id, { leftFixedWidth, rightFixedWidth })
102
106
 
103
107
  return (
104
108
  <Wrap
package/src/index.ts CHANGED
@@ -14,9 +14,7 @@ export { default as KCTableSelect } from './cell/table_select'
14
14
  export { default as KCDatePicker } from './cell/date_picker'
15
15
  export { default as KCSelect } from './cell/select'
16
16
 
17
- export type {
18
- KeyboardTableXProps,
19
- KeyboardTableXColumn,
20
- KeyboardCustomEvent,
21
- KeyboardDirection,
22
- } from './types'
17
+ // @gm-pc/table-x 重新导出这些类型以保持向后兼容
18
+ export type { KeyboardTableXProps, KeyboardTableXColumn } from '@gm-pc/table-x'
19
+
20
+ export type { KeyboardCustomEvent, KeyboardDirection } from './types'
package/src/types.ts CHANGED
@@ -1,23 +1,4 @@
1
- import { TableXColumn } from '@gm-pc/table-x'
2
-
3
- type KeyboardTableXColumn = {
4
- isKeyboard?: boolean
5
- } & TableXColumn
6
-
7
- interface KeyboardTableXProps {
8
- /* 通过 id 来确定本单元格内通信,避免多表格时混了。请确保 id 唯一 */
9
- id: string
10
- columns: KeyboardTableXColumn[]
11
- /** 按下键是否允许增加一行数据 */
12
- allowAddRowOnDownKey?: boolean
13
- /* 增加一行数据 */
14
- onAddRow(): void
15
- onBeforeDispatch?(options: {
16
- actionName: string
17
- to: { rowKey: number; columnKey: string }
18
- from: { rowKey: number; columnKey: string }
19
- }): boolean
20
- }
1
+ import { KeyboardTableXColumn, KeyboardTableXProps } from '@gm-pc/table-x'
21
2
 
22
3
  type KeyboardDirection = 'left' | 'right' | 'up' | 'down'
23
4
  interface KeyboardCustomEvent {
@@ -1,7 +1,6 @@
1
- import { TableXUtil } from '@gm-pc/table-x'
1
+ import { TABLE_X } from '@gm-pc/table-x'
2
2
 
3
3
  import { KeyboardWrapData } from '../types'
4
- const { TABLE_X } = TableXUtil
5
4
 
6
5
  function scrollIntoViewFixedWidth(
7
6
  dom: HTMLElement,