@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.
- package/dist/core/reducers/keyboardReducer.js +2 -1
- package/dist/core/reducers/mouseReducer.js +3 -2
- package/dist/core/reducers/sideEffectReducer.js +3 -3
- package/dist/core/sheet/Remark.d.ts +9 -0
- package/dist/core/sheet/Remark.js +29 -0
- package/dist/core/sheet/index.js +45 -8
- package/dist/core/sheet/index.less +13 -0
- package/dist/core/sheet/useContextMenu.js +3 -3
- package/dist/core/sheet/useRemarkContainer.d.ts +14 -0
- package/dist/core/sheet/useRemarkContainer.js +121 -0
- package/dist/core/shell/draggableShell/index.d.ts +1 -1
- package/dist/core/shell/draggableShell/index.js +5 -0
- package/dist/core/shell/tableShell.d.ts +2 -2
- package/dist/core/shell/tableShell.js +11 -155
- package/dist/core/table/addButton.d.ts +0 -1
- package/dist/core/table/addButton.js +0 -1
- package/dist/core/table/index.d.ts +1 -0
- package/dist/core/table/index.js +88 -8
- package/dist/core/table/index.less +19 -0
- package/dist/core/table/remarkEvent.d.ts +5 -0
- package/dist/core/table/remarkEvent.js +13 -0
- package/dist/core/table/useGroupConfig.d.ts +1 -1
- package/dist/core/table/useGroupConfig.js +6 -4
- package/dist/core/table/useRowSelection.d.ts +1 -1
- package/dist/core/table/useRowSelection.js +6 -3
- package/dist/example/valuationAnalyze.js +287 -10
- package/dist/type/sheet.d.ts +7 -1
- package/dist/type/sheetTable.d.ts +12 -0
- package/package.json +1 -1
package/dist/type/sheet.d.ts
CHANGED
|
@@ -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;
|