@zhenliang/sheet 0.1.7-3.beta.1 → 0.1.7-3.beta.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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type { EventEmitter } from 'events';
3
- import { CSSProperties } from 'react';
3
+ import { CSSProperties, ReactNode } from 'react';
4
4
  import { SheetTableType, SheetType } from '.';
5
5
  export declare enum CellAlign {
6
6
  left = "left",
@@ -92,6 +92,7 @@ export type MenuRenderProps = {
92
92
  };
93
93
  cell?: CellPosition;
94
94
  onContextMenu?: (event: any) => void;
95
+ children?: ReactNode | ReactNode[];
95
96
  };
96
97
  export type SheetInstance = {
97
98
  zoomTo: (row?: number) => void;
@@ -118,7 +119,9 @@ export type SheetProps = {
118
119
  backEditStyle?: Partial<CSSProperties>;
119
120
  searchStyle?: Partial<CSSProperties>;
120
121
  sticky?: boolean;
122
+ freeze?: boolean;
121
123
  groupConfig?: RowGroupConfig;
124
+ remarkElement?: ReactNode;
122
125
  onCellsChanged?: CellChangeHandler;
123
126
  menuRenderer?: React.FC<MenuRenderProps>;
124
127
  onContextMenu?: (event: any) => void;
@@ -132,6 +135,7 @@ export type SheetProps = {
132
135
  boldScroll?: boolean;
133
136
  hideColBar?: boolean;
134
137
  showQuickLocationBtn?: boolean;
138
+ showRemark?: boolean;
135
139
  ControlContainer?: React.FC;
136
140
  };
137
141
  export type WidthConfigContext = {
@@ -146,6 +150,7 @@ export type GroupConfigContext = {
146
150
  };
147
151
  export type SheetShell = Pick<SheetTableType.TableProps, 'columns'> & {
148
152
  className?: string;
153
+ dragable?: boolean;
149
154
  showGroup?: boolean;
150
155
  showSelect?: boolean;
151
156
  controlWidth?: number;
@@ -210,6 +215,7 @@ export type UpdateStateType = {
210
215
  data: Cell[][];
211
216
  mouseDown: boolean;
212
217
  isIndex: boolean;
218
+ freeze: boolean;
213
219
  lastSelected?: {
214
220
  start?: CellPosition;
215
221
  end?: CellPosition;
@@ -80,7 +80,19 @@ export type TableProps = {
80
80
  sticky?: boolean;
81
81
  draggable?: boolean;
82
82
  freePaste?: boolean;
83
+ freeze?: boolean;
83
84
  showBackEdit?: boolean;
85
+ showRemark?: boolean;
86
+ remarkRender?: (props: {
87
+ cell: SheetType.CellPosition;
88
+ columnKey: string;
89
+ id?: string | number;
90
+ }) => ReactNode;
91
+ handleAddRemark?: (value: {
92
+ cell: SheetType.CellPosition;
93
+ columnKey: string;
94
+ id?: string | number;
95
+ }) => void;
84
96
  backEditStyle?: Partial<CSSProperties>;
85
97
  searchStyle?: Partial<CSSProperties>;
86
98
  rowSelection?: TableRowSelection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.73.beta.1",
3
+ "version": "0.1.73.beta.3",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",