@fileverse-dev/fortune-react 1.3.2 → 1.3.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,4 +1,4 @@
|
|
|
1
|
-
import { colLocation, colLocationByIndex, selectTitlesMap, selectTitlesRange, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, isAllowEdit, getFlowdata, fixColumnStyleOverflowInFreeze, handleColFreezeHandleMouseDown, getSheetIndex, fixPositionOnFrozenCells, showSelected, api } from "@fileverse-dev/fortune-core";
|
|
1
|
+
import { colLocation, colLocationByIndex, selectTitlesMap, selectTitlesRange, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleColumnHeaderMouseDown, isAllowEdit, getFlowdata, fixColumnStyleOverflowInFreeze, handleColFreezeHandleMouseDown, getSheetIndex, fixPositionOnFrozenCells, showSelected, api } from "@fileverse-dev/fortune-core";
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import React, { useContext, useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
4
4
|
import WorkbookContext from "../../context";
|
|
@@ -126,6 +126,13 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
126
126
|
});
|
|
127
127
|
e.stopPropagation();
|
|
128
128
|
}, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
|
|
129
|
+
var onColSizeHandleDoubleClick = useCallback(function (e) {
|
|
130
|
+
var nativeEvent = e.nativeEvent;
|
|
131
|
+
setContext(function (draftCtx) {
|
|
132
|
+
handleColSizeHandleDoubleClick(draftCtx, refs.globalCache, nativeEvent, containerRef.current);
|
|
133
|
+
});
|
|
134
|
+
e.stopPropagation();
|
|
135
|
+
}, [refs.globalCache, setContext]);
|
|
129
136
|
var onColFreezeHandleMouseDown = useCallback(function (e) {
|
|
130
137
|
var nativeEvent = e.nativeEvent;
|
|
131
138
|
setContext(function (draftCtx) {
|
|
@@ -313,6 +320,7 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
313
320
|
ref: colChangeSizeRef,
|
|
314
321
|
id: "fortune-cols-change-size",
|
|
315
322
|
onMouseDown: onColSizeHandleMouseDown,
|
|
323
|
+
onDoubleClick: onColSizeHandleDoubleClick,
|
|
316
324
|
style: {
|
|
317
325
|
left: hoverLocation.col - 5 + (hoverInFreeze ? context.scrollLeft : 0),
|
|
318
326
|
opacity: context.luckysheet_cols_change_size ? 1 : 0
|
|
@@ -135,6 +135,13 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
135
135
|
});
|
|
136
136
|
e.stopPropagation();
|
|
137
137
|
}, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
|
|
138
|
+
var onColSizeHandleDoubleClick = (0, _react.useCallback)(function (e) {
|
|
139
|
+
var nativeEvent = e.nativeEvent;
|
|
140
|
+
setContext(function (draftCtx) {
|
|
141
|
+
(0, _fortuneCore.handleColSizeHandleDoubleClick)(draftCtx, refs.globalCache, nativeEvent, containerRef.current);
|
|
142
|
+
});
|
|
143
|
+
e.stopPropagation();
|
|
144
|
+
}, [refs.globalCache, setContext]);
|
|
138
145
|
var onColFreezeHandleMouseDown = (0, _react.useCallback)(function (e) {
|
|
139
146
|
var nativeEvent = e.nativeEvent;
|
|
140
147
|
setContext(function (draftCtx) {
|
|
@@ -322,6 +329,7 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
322
329
|
ref: colChangeSizeRef,
|
|
323
330
|
id: "fortune-cols-change-size",
|
|
324
331
|
onMouseDown: onColSizeHandleMouseDown,
|
|
332
|
+
onDoubleClick: onColSizeHandleDoubleClick,
|
|
325
333
|
style: {
|
|
326
334
|
left: hoverLocation.col - 5 + (hoverInFreeze ? context.scrollLeft : 0),
|
|
327
335
|
opacity: context.luckysheet_cols_change_size ? 1 : 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.3.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.3.3",
|
|
20
20
|
"@fileverse/ui": "5.0.0",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|