@leankylin-sheet/react 3.1.30 → 4.0.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.
@@ -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-y: scroll;
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;
@@ -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-y: scroll;
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
@@ -9716,6 +9716,9 @@ var MoreItemsContaier = function MoreItemsContaier(_ref) {
9716
9716
 
9717
9717
  function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, refs) {
9718
9718
  return {
9719
+ setVariable: function setVariable(name, value) {
9720
+ context.formulaCache.parser.setVariable(name, value);
9721
+ },
9719
9722
  scrollToHighlightCell: function scrollToHighlightCell$1(r, c, selected) {
9720
9723
  setContext(function (ctx) {
9721
9724
  scrollToHighlightCell(ctx, r, c);
@@ -11130,7 +11133,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
11130
11133
  if (isFocusRef.current && _.isEmpty(context.luckysheetCellUpdate)) {
11131
11134
  setContextWithProduce(function (draftCtx) {
11132
11135
  try {
11133
- handlePasteByLeanklin(draftCtx, e);
11136
+ handlePasteByLeanklin(draftCtx, e, mergedSettings.copyRich);
11134
11137
  } catch (err) {
11135
11138
  console.error(err);
11136
11139
  }
package/dist/index.js CHANGED
@@ -9726,6 +9726,9 @@ var MoreItemsContaier = function MoreItemsContaier(_ref) {
9726
9726
 
9727
9727
  function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, refs) {
9728
9728
  return {
9729
+ setVariable: function setVariable(name, value) {
9730
+ context.formulaCache.parser.setVariable(name, value);
9731
+ },
9729
9732
  scrollToHighlightCell: function scrollToHighlightCell(r, c, selected) {
9730
9733
  setContext(function (ctx) {
9731
9734
  core.scrollToHighlightCell(ctx, r, c);
@@ -11140,7 +11143,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11140
11143
  if (isFocusRef.current && ___default['default'].isEmpty(context.luckysheetCellUpdate)) {
11141
11144
  setContextWithProduce(function (draftCtx) {
11142
11145
  try {
11143
- core.handlePasteByLeanklin(draftCtx, e);
11146
+ core.handlePasteByLeanklin(draftCtx, e, mergedSettings.copyRich);
11144
11147
  } catch (err) {
11145
11148
  console.error(err);
11146
11149
  }
@@ -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-y: scroll;
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;