@leankylin-sheet/react 3.1.31 → 3.1.33
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/components/Workbook/api.d.ts +1 -0
- package/dist/components/Workbook/index.d.ts +1 -0
- package/dist/index.css +6 -2
- package/dist/index.esm.css +6 -2
- package/dist/index.esm.js +16 -1
- package/dist/index.js +16 -1
- package/dist/index.umd.css +6 -2
- package/dist/index.umd.js +434 -10306
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +2 -2
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol } from "@leankylin-sheet/core";
|
|
2
2
|
import { RefValues, SetContextOptions } from "../../context";
|
|
3
3
|
export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, refs: RefValues): {
|
|
4
|
+
setVariable: (name: string, value: string | number) => void;
|
|
4
5
|
scrollToHighlightCell: (r: number, c: number, selected: number) => void;
|
|
5
6
|
getRefs: () => RefValues;
|
|
6
7
|
setCellOptions: (cellOptions: Context["cellOptions"]) => void;
|
|
@@ -9,6 +9,7 @@ type AdditionalProps = {
|
|
|
9
9
|
onOp?: (op: Op[]) => void;
|
|
10
10
|
};
|
|
11
11
|
declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
|
|
12
|
+
setVariable: (name: string, value: string | number) => void;
|
|
12
13
|
scrollToHighlightCell: (r: number, c: number, selected: number) => void;
|
|
13
14
|
getRefs: () => RefValues;
|
|
14
15
|
setCellOptions: (cellOptions: import("@leankylin-sheet/core").CellOptions) => void;
|
package/dist/index.css
CHANGED
|
@@ -1042,6 +1042,9 @@ html::-webkit-scrollbar-button {
|
|
|
1042
1042
|
padding: 5px 10px;
|
|
1043
1043
|
cursor: pointer;
|
|
1044
1044
|
}
|
|
1045
|
+
.luckysheet-formula-search-item:hover {
|
|
1046
|
+
background-color: #f1f1f1 !important;
|
|
1047
|
+
}
|
|
1045
1048
|
|
|
1046
1049
|
.luckysheet-formula-search-c
|
|
1047
1050
|
.luckysheet-formula-search-item
|
|
@@ -2633,7 +2636,7 @@ label {
|
|
|
2633
2636
|
.leankylin-fx-input {
|
|
2634
2637
|
flex: 1;
|
|
2635
2638
|
height: 100%;
|
|
2636
|
-
overflow
|
|
2639
|
+
overflow: hidden;
|
|
2637
2640
|
padding-left: 2px;
|
|
2638
2641
|
font-size: 14px;
|
|
2639
2642
|
line-height: 14px;
|
|
@@ -2648,12 +2651,13 @@ label {
|
|
|
2648
2651
|
background-color: white;
|
|
2649
2652
|
padding-top: 7px;
|
|
2650
2653
|
box-sizing: border-box;
|
|
2651
|
-
color:black;
|
|
2654
|
+
color: black;
|
|
2652
2655
|
text-align: left;
|
|
2653
2656
|
}
|
|
2654
2657
|
.leankylin-fx-input[contenteditable="true"] {
|
|
2655
2658
|
-webkit-user-modify: read-write-plaintext-only;
|
|
2656
2659
|
}
|
|
2660
|
+
|
|
2657
2661
|
.luckysheet-sheet-area {
|
|
2658
2662
|
width: 100%;
|
|
2659
2663
|
box-sizing: border-box;
|
package/dist/index.esm.css
CHANGED
|
@@ -1042,6 +1042,9 @@ html::-webkit-scrollbar-button {
|
|
|
1042
1042
|
padding: 5px 10px;
|
|
1043
1043
|
cursor: pointer;
|
|
1044
1044
|
}
|
|
1045
|
+
.luckysheet-formula-search-item:hover {
|
|
1046
|
+
background-color: #f1f1f1 !important;
|
|
1047
|
+
}
|
|
1045
1048
|
|
|
1046
1049
|
.luckysheet-formula-search-c
|
|
1047
1050
|
.luckysheet-formula-search-item
|
|
@@ -2633,7 +2636,7 @@ label {
|
|
|
2633
2636
|
.leankylin-fx-input {
|
|
2634
2637
|
flex: 1;
|
|
2635
2638
|
height: 100%;
|
|
2636
|
-
overflow
|
|
2639
|
+
overflow: hidden;
|
|
2637
2640
|
padding-left: 2px;
|
|
2638
2641
|
font-size: 14px;
|
|
2639
2642
|
line-height: 14px;
|
|
@@ -2648,12 +2651,13 @@ label {
|
|
|
2648
2651
|
background-color: white;
|
|
2649
2652
|
padding-top: 7px;
|
|
2650
2653
|
box-sizing: border-box;
|
|
2651
|
-
color:black;
|
|
2654
|
+
color: black;
|
|
2652
2655
|
text-align: left;
|
|
2653
2656
|
}
|
|
2654
2657
|
.leankylin-fx-input[contenteditable="true"] {
|
|
2655
2658
|
-webkit-user-modify: read-write-plaintext-only;
|
|
2656
2659
|
}
|
|
2660
|
+
|
|
2657
2661
|
.luckysheet-sheet-area {
|
|
2658
2662
|
width: 100%;
|
|
2659
2663
|
box-sizing: border-box;
|
package/dist/index.esm.js
CHANGED
|
@@ -7564,6 +7564,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
7564
7564
|
onKeyDown: function onKeyDown(e) {
|
|
7565
7565
|
return e.stopPropagation();
|
|
7566
7566
|
},
|
|
7567
|
+
onMouseDown: function onMouseDown(e) {
|
|
7568
|
+
return e.stopPropagation();
|
|
7569
|
+
},
|
|
7567
7570
|
type: "text",
|
|
7568
7571
|
className: "luckysheet-mousedown-cancel",
|
|
7569
7572
|
placeholder: rightclick.number,
|
|
@@ -7617,6 +7620,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
7617
7620
|
onKeyDown: function onKeyDown(e) {
|
|
7618
7621
|
return e.stopPropagation();
|
|
7619
7622
|
},
|
|
7623
|
+
onMouseDown: function onMouseDown(e) {
|
|
7624
|
+
return e.stopPropagation();
|
|
7625
|
+
},
|
|
7620
7626
|
type: "text",
|
|
7621
7627
|
className: "luckysheet-mousedown-cancel",
|
|
7622
7628
|
placeholder: rightclick.number,
|
|
@@ -9716,6 +9722,9 @@ var MoreItemsContaier = function MoreItemsContaier(_ref) {
|
|
|
9716
9722
|
|
|
9717
9723
|
function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, refs) {
|
|
9718
9724
|
return {
|
|
9725
|
+
setVariable: function setVariable(name, value) {
|
|
9726
|
+
context.formulaCache.parser.setVariable(name, value);
|
|
9727
|
+
},
|
|
9719
9728
|
scrollToHighlightCell: function scrollToHighlightCell$1(r, c, selected) {
|
|
9720
9729
|
setContext(function (ctx) {
|
|
9721
9730
|
scrollToHighlightCell(ctx, r, c);
|
|
@@ -10262,6 +10271,9 @@ var FilterMenu = function FilterMenu() {
|
|
|
10262
10271
|
backgroundColor: v.color
|
|
10263
10272
|
}
|
|
10264
10273
|
}), /*#__PURE__*/React.createElement("input", {
|
|
10274
|
+
onMouseDown: function onMouseDown(e) {
|
|
10275
|
+
return e.stopPropagation();
|
|
10276
|
+
},
|
|
10265
10277
|
className: "luckysheet-mousedown-cancel",
|
|
10266
10278
|
type: "checkbox",
|
|
10267
10279
|
checked: v.checked,
|
|
@@ -10559,6 +10571,9 @@ var FilterMenu = function FilterMenu() {
|
|
|
10559
10571
|
onMouseLeave: function onMouseLeave() {
|
|
10560
10572
|
mouseHoverSubMenu.current = false;
|
|
10561
10573
|
setShowSubMenu(false);
|
|
10574
|
+
},
|
|
10575
|
+
onMouseDown: function onMouseDown(e) {
|
|
10576
|
+
return e.stopPropagation();
|
|
10562
10577
|
}
|
|
10563
10578
|
}, filterColors.bgColors.length < 2 && filterColors.fcColors.length < 2 ? ( /*#__PURE__*/React.createElement("div", {
|
|
10564
10579
|
className: "one-color-tip"
|
|
@@ -11130,7 +11145,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11130
11145
|
if (isFocusRef.current && _.isEmpty(context.luckysheetCellUpdate)) {
|
|
11131
11146
|
setContextWithProduce(function (draftCtx) {
|
|
11132
11147
|
try {
|
|
11133
|
-
handlePasteByLeanklin(draftCtx, e);
|
|
11148
|
+
handlePasteByLeanklin(draftCtx, e, mergedSettings.copyRich);
|
|
11134
11149
|
} catch (err) {
|
|
11135
11150
|
console.error(err);
|
|
11136
11151
|
}
|
package/dist/index.js
CHANGED
|
@@ -7574,6 +7574,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
7574
7574
|
onKeyDown: function onKeyDown(e) {
|
|
7575
7575
|
return e.stopPropagation();
|
|
7576
7576
|
},
|
|
7577
|
+
onMouseDown: function onMouseDown(e) {
|
|
7578
|
+
return e.stopPropagation();
|
|
7579
|
+
},
|
|
7577
7580
|
type: "text",
|
|
7578
7581
|
className: "luckysheet-mousedown-cancel",
|
|
7579
7582
|
placeholder: rightclick.number,
|
|
@@ -7627,6 +7630,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
7627
7630
|
onKeyDown: function onKeyDown(e) {
|
|
7628
7631
|
return e.stopPropagation();
|
|
7629
7632
|
},
|
|
7633
|
+
onMouseDown: function onMouseDown(e) {
|
|
7634
|
+
return e.stopPropagation();
|
|
7635
|
+
},
|
|
7630
7636
|
type: "text",
|
|
7631
7637
|
className: "luckysheet-mousedown-cancel",
|
|
7632
7638
|
placeholder: rightclick.number,
|
|
@@ -9726,6 +9732,9 @@ var MoreItemsContaier = function MoreItemsContaier(_ref) {
|
|
|
9726
9732
|
|
|
9727
9733
|
function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, refs) {
|
|
9728
9734
|
return {
|
|
9735
|
+
setVariable: function setVariable(name, value) {
|
|
9736
|
+
context.formulaCache.parser.setVariable(name, value);
|
|
9737
|
+
},
|
|
9729
9738
|
scrollToHighlightCell: function scrollToHighlightCell(r, c, selected) {
|
|
9730
9739
|
setContext(function (ctx) {
|
|
9731
9740
|
core.scrollToHighlightCell(ctx, r, c);
|
|
@@ -10272,6 +10281,9 @@ var FilterMenu = function FilterMenu() {
|
|
|
10272
10281
|
backgroundColor: v.color
|
|
10273
10282
|
}
|
|
10274
10283
|
}), /*#__PURE__*/React__default['default'].createElement("input", {
|
|
10284
|
+
onMouseDown: function onMouseDown(e) {
|
|
10285
|
+
return e.stopPropagation();
|
|
10286
|
+
},
|
|
10275
10287
|
className: "luckysheet-mousedown-cancel",
|
|
10276
10288
|
type: "checkbox",
|
|
10277
10289
|
checked: v.checked,
|
|
@@ -10569,6 +10581,9 @@ var FilterMenu = function FilterMenu() {
|
|
|
10569
10581
|
onMouseLeave: function onMouseLeave() {
|
|
10570
10582
|
mouseHoverSubMenu.current = false;
|
|
10571
10583
|
setShowSubMenu(false);
|
|
10584
|
+
},
|
|
10585
|
+
onMouseDown: function onMouseDown(e) {
|
|
10586
|
+
return e.stopPropagation();
|
|
10572
10587
|
}
|
|
10573
10588
|
}, filterColors.bgColors.length < 2 && filterColors.fcColors.length < 2 ? ( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10574
10589
|
className: "one-color-tip"
|
|
@@ -11140,7 +11155,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
|
|
|
11140
11155
|
if (isFocusRef.current && ___default['default'].isEmpty(context.luckysheetCellUpdate)) {
|
|
11141
11156
|
setContextWithProduce(function (draftCtx) {
|
|
11142
11157
|
try {
|
|
11143
|
-
core.handlePasteByLeanklin(draftCtx, e);
|
|
11158
|
+
core.handlePasteByLeanklin(draftCtx, e, mergedSettings.copyRich);
|
|
11144
11159
|
} catch (err) {
|
|
11145
11160
|
console.error(err);
|
|
11146
11161
|
}
|
package/dist/index.umd.css
CHANGED
|
@@ -1042,6 +1042,9 @@ html::-webkit-scrollbar-button {
|
|
|
1042
1042
|
padding: 5px 10px;
|
|
1043
1043
|
cursor: pointer;
|
|
1044
1044
|
}
|
|
1045
|
+
.luckysheet-formula-search-item:hover {
|
|
1046
|
+
background-color: #f1f1f1 !important;
|
|
1047
|
+
}
|
|
1045
1048
|
|
|
1046
1049
|
.luckysheet-formula-search-c
|
|
1047
1050
|
.luckysheet-formula-search-item
|
|
@@ -2633,7 +2636,7 @@ label {
|
|
|
2633
2636
|
.leankylin-fx-input {
|
|
2634
2637
|
flex: 1;
|
|
2635
2638
|
height: 100%;
|
|
2636
|
-
overflow
|
|
2639
|
+
overflow: hidden;
|
|
2637
2640
|
padding-left: 2px;
|
|
2638
2641
|
font-size: 14px;
|
|
2639
2642
|
line-height: 14px;
|
|
@@ -2648,12 +2651,13 @@ label {
|
|
|
2648
2651
|
background-color: white;
|
|
2649
2652
|
padding-top: 7px;
|
|
2650
2653
|
box-sizing: border-box;
|
|
2651
|
-
color:black;
|
|
2654
|
+
color: black;
|
|
2652
2655
|
text-align: left;
|
|
2653
2656
|
}
|
|
2654
2657
|
.leankylin-fx-input[contenteditable="true"] {
|
|
2655
2658
|
-webkit-user-modify: read-write-plaintext-only;
|
|
2656
2659
|
}
|
|
2660
|
+
|
|
2657
2661
|
.luckysheet-sheet-area {
|
|
2658
2662
|
width: 100%;
|
|
2659
2663
|
box-sizing: border-box;
|