@leankylin-sheet/formula-parser 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.
Files changed (160) hide show
  1. package/dist/index.esm.js +82 -161
  2. package/dist/index.js +82 -161
  3. package/package.json +1 -1
  4. package/dist/packages/core/src/api/cell.d.ts +0 -10
  5. package/dist/packages/core/src/api/common.d.ts +0 -57
  6. package/dist/packages/core/src/api/errors.d.ts +0 -2
  7. package/dist/packages/core/src/api/index.d.ts +0 -9
  8. package/dist/packages/core/src/api/merge.d.ts +0 -5
  9. package/dist/packages/core/src/api/range.d.ts +0 -22
  10. package/dist/packages/core/src/api/rowcol.d.ts +0 -14
  11. package/dist/packages/core/src/api/sheet.d.ts +0 -10
  12. package/dist/packages/core/src/api/workbook.d.ts +0 -15
  13. package/dist/packages/core/src/canvas.d.ts +0 -56
  14. package/dist/packages/core/src/context.d.ts +0 -193
  15. package/dist/packages/core/src/events/copy.d.ts +0 -2
  16. package/dist/packages/core/src/events/index.d.ts +0 -4
  17. package/dist/packages/core/src/events/keyboard.d.ts +0 -6
  18. package/dist/packages/core/src/events/mouse.d.ts +0 -25
  19. package/dist/packages/core/src/events/paste.d.ts +0 -5
  20. package/dist/packages/core/src/index.d.ts +0 -10
  21. package/dist/packages/core/src/locale/en.d.ts +0 -1028
  22. package/dist/packages/core/src/locale/es.d.ts +0 -1132
  23. package/dist/packages/core/src/locale/index.d.ts +0 -1046
  24. package/dist/packages/core/src/locale/zh.d.ts +0 -1045
  25. package/dist/packages/core/src/locale/zh_tw.d.ts +0 -1185
  26. package/dist/packages/core/src/modules/ConditionFormat.d.ts +0 -17
  27. package/dist/packages/core/src/modules/border.d.ts +0 -3
  28. package/dist/packages/core/src/modules/cell.d.ts +0 -32
  29. package/dist/packages/core/src/modules/clipboard.d.ts +0 -3
  30. package/dist/packages/core/src/modules/color.d.ts +0 -1
  31. package/dist/packages/core/src/modules/comment.d.ts +0 -96
  32. package/dist/packages/core/src/modules/conditionalFormat.d.ts +0 -2
  33. package/dist/packages/core/src/modules/cursor.d.ts +0 -3
  34. package/dist/packages/core/src/modules/dataVerification.d.ts +0 -11
  35. package/dist/packages/core/src/modules/dropCell.d.ts +0 -10
  36. package/dist/packages/core/src/modules/filter.d.ts +0 -45
  37. package/dist/packages/core/src/modules/format.d.ts +0 -6
  38. package/dist/packages/core/src/modules/formula.d.ts +0 -53
  39. package/dist/packages/core/src/modules/freeze.d.ts +0 -5
  40. package/dist/packages/core/src/modules/hyperlink.d.ts +0 -21
  41. package/dist/packages/core/src/modules/image.d.ts +0 -31
  42. package/dist/packages/core/src/modules/index.d.ts +0 -35
  43. package/dist/packages/core/src/modules/inline-string.d.ts +0 -36
  44. package/dist/packages/core/src/modules/location.d.ts +0 -6
  45. package/dist/packages/core/src/modules/locationCondition.d.ts +0 -21
  46. package/dist/packages/core/src/modules/merge.d.ts +0 -3
  47. package/dist/packages/core/src/modules/mobile.d.ts +0 -5
  48. package/dist/packages/core/src/modules/moveCells.d.ts +0 -5
  49. package/dist/packages/core/src/modules/protection.d.ts +0 -5
  50. package/dist/packages/core/src/modules/refresh.d.ts +0 -3
  51. package/dist/packages/core/src/modules/rowcol.d.ts +0 -19
  52. package/dist/packages/core/src/modules/screenshot.d.ts +0 -2
  53. package/dist/packages/core/src/modules/searchReplace.d.ts +0 -36
  54. package/dist/packages/core/src/modules/selection.d.ts +0 -47
  55. package/dist/packages/core/src/modules/sheet.d.ts +0 -10
  56. package/dist/packages/core/src/modules/sort.d.ts +0 -7
  57. package/dist/packages/core/src/modules/splitColumn.d.ts +0 -5
  58. package/dist/packages/core/src/modules/ssf.d.ts +0 -2
  59. package/dist/packages/core/src/modules/text.d.ts +0 -10
  60. package/dist/packages/core/src/modules/toolbar.d.ts +0 -32
  61. package/dist/packages/core/src/modules/validation.d.ts +0 -19
  62. package/dist/packages/core/src/modules/zoom.d.ts +0 -3
  63. package/dist/packages/core/src/settings.d.ts +0 -132
  64. package/dist/packages/core/src/types.d.ts +0 -351
  65. package/dist/packages/core/src/utils/index.d.ts +0 -17
  66. package/dist/packages/core/src/utils/patch.d.ts +0 -37
  67. package/dist/packages/react/src/components/CellOptions/index.d.ts +0 -4
  68. package/dist/packages/react/src/components/ChangeColor/index.d.ts +0 -7
  69. package/dist/packages/react/src/components/ConditionFormat/ConditionRules.d.ts +0 -6
  70. package/dist/packages/react/src/components/ConditionFormat/index.d.ts +0 -7
  71. package/dist/packages/react/src/components/ContextMenu/Divider.d.ts +0 -3
  72. package/dist/packages/react/src/components/ContextMenu/FilterMenu.d.ts +0 -3
  73. package/dist/packages/react/src/components/ContextMenu/Menu.d.ts +0 -8
  74. package/dist/packages/react/src/components/ContextMenu/SheetTab.d.ts +0 -4
  75. package/dist/packages/react/src/components/ContextMenu/index.d.ts +0 -4
  76. package/dist/packages/react/src/components/CustomSort/index.d.ts +0 -4
  77. package/dist/packages/react/src/components/DataVerification/DropdownList.d.ts +0 -4
  78. package/dist/packages/react/src/components/DataVerification/RangeDialog.d.ts +0 -4
  79. package/dist/packages/react/src/components/DataVerification/index.d.ts +0 -4
  80. package/dist/packages/react/src/components/Dialog/index.d.ts +0 -12
  81. package/dist/packages/react/src/components/FilterOption/index.d.ts +0 -5
  82. package/dist/packages/react/src/components/FormatSearch/index.d.ts +0 -6
  83. package/dist/packages/react/src/components/FormulaSearch/index.d.ts +0 -5
  84. package/dist/packages/react/src/components/FxEditor/CalcInfo.d.ts +0 -3
  85. package/dist/packages/react/src/components/FxEditor/NameBox.d.ts +0 -3
  86. package/dist/packages/react/src/components/FxEditor/index.d.ts +0 -4
  87. package/dist/packages/react/src/components/ImgBoxs/index.d.ts +0 -3
  88. package/dist/packages/react/src/components/LinkEidtCard/index.d.ts +0 -5
  89. package/dist/packages/react/src/components/LocationCondition/index.d.ts +0 -3
  90. package/dist/packages/react/src/components/MessageBox/index.d.ts +0 -9
  91. package/dist/packages/react/src/components/NotationBoxes/index.d.ts +0 -3
  92. package/dist/packages/react/src/components/SVGDefines.d.ts +0 -3
  93. package/dist/packages/react/src/components/SVGIcon.d.ts +0 -9
  94. package/dist/packages/react/src/components/SearchReplace/index.d.ts +0 -4
  95. package/dist/packages/react/src/components/Sheet/index.d.ts +0 -8
  96. package/dist/packages/react/src/components/SheetList/SheetHiddenButton.d.ts +0 -8
  97. package/dist/packages/react/src/components/SheetList/SheetListItem.d.ts +0 -9
  98. package/dist/packages/react/src/components/SheetList/index.d.ts +0 -4
  99. package/dist/packages/react/src/components/SheetOverlay/ColumnHeader.d.ts +0 -3
  100. package/dist/packages/react/src/components/SheetOverlay/ContentEditable.d.ts +0 -11
  101. package/dist/packages/react/src/components/SheetOverlay/FormulaHint/index.d.ts +0 -4
  102. package/dist/packages/react/src/components/SheetOverlay/FormulaSearch/index.d.ts +0 -4
  103. package/dist/packages/react/src/components/SheetOverlay/InputBox.d.ts +0 -3
  104. package/dist/packages/react/src/components/SheetOverlay/RowHeader.d.ts +0 -3
  105. package/dist/packages/react/src/components/SheetOverlay/ScrollBar/index.d.ts +0 -7
  106. package/dist/packages/react/src/components/SheetOverlay/index.d.ts +0 -4
  107. package/dist/packages/react/src/components/SheetTab/SheetItem.d.ts +0 -8
  108. package/dist/packages/react/src/components/SheetTab/index.d.ts +0 -4
  109. package/dist/packages/react/src/components/SplitColumn/index.d.ts +0 -3
  110. package/dist/packages/react/src/components/Toolbar/Button.d.ts +0 -11
  111. package/dist/packages/react/src/components/Toolbar/ColorPicker.d.ts +0 -6
  112. package/dist/packages/react/src/components/Toolbar/Combo.d.ts +0 -10
  113. package/dist/packages/react/src/components/Toolbar/CustomBorder.d.ts +0 -7
  114. package/dist/packages/react/src/components/Toolbar/CustomButton.d.ts +0 -11
  115. package/dist/packages/react/src/components/Toolbar/CustomColor.d.ts +0 -8
  116. package/dist/packages/react/src/components/Toolbar/CustomIcon.d.ts +0 -9
  117. package/dist/packages/react/src/components/Toolbar/Divider.d.ts +0 -4
  118. package/dist/packages/react/src/components/Toolbar/MoreItemsContainer.d.ts +0 -6
  119. package/dist/packages/react/src/components/Toolbar/Select.d.ts +0 -14
  120. package/dist/packages/react/src/components/Toolbar/index.d.ts +0 -7
  121. package/dist/packages/react/src/components/Workbook/api.d.ts +0 -121
  122. package/dist/packages/react/src/components/Workbook/index.d.ts +0 -130
  123. package/dist/packages/react/src/components/ZoomControl/index.d.ts +0 -4
  124. package/dist/packages/react/src/components/index.d.ts +0 -3
  125. package/dist/packages/react/src/context/index.d.ts +0 -25
  126. package/dist/packages/react/src/context/modal.d.ts +0 -10
  127. package/dist/packages/react/src/hooks/useAlert.d.ts +0 -4
  128. package/dist/packages/react/src/hooks/useDialog.d.ts +0 -5
  129. package/dist/packages/react/src/hooks/useOutsideClick.d.ts +0 -2
  130. package/dist/packages/react/src/hooks/usePrevious.d.ts +0 -2
  131. package/dist/packages/react/src/index.d.ts +0 -1
  132. package/dist/stories/data/cell.d.ts +0 -1180
  133. package/dist/stories/data/dataVerification.d.ts +0 -131
  134. package/dist/stories/data/empty.d.ts +0 -10
  135. package/dist/stories/data/formula.d.ts +0 -362
  136. package/dist/stories/data/freeze.d.ts +0 -34
  137. package/dist/stories/data/protected.d.ts +0 -40
  138. package/dist/stories/utils.d.ts +0 -1
  139. /package/dist/{packages/formula-parser/src/error.d.ts → error.d.ts} +0 -0
  140. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/evaluate-by-operator.d.ts +0 -0
  141. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/add.d.ts +0 -0
  142. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/ampersand.d.ts +0 -0
  143. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/divide.d.ts +0 -0
  144. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/equal.d.ts +0 -0
  145. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/formula-function.d.ts +0 -0
  146. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/greater-than-or-equal.d.ts +0 -0
  147. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/greater-than.d.ts +0 -0
  148. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/less-than-or-equal.d.ts +0 -0
  149. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/less-than.d.ts +0 -0
  150. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/minus.d.ts +0 -0
  151. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/multiply.d.ts +0 -0
  152. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/not-equal.d.ts +0 -0
  153. /package/dist/{packages/formula-parser/src/evaluate-by-operator → evaluate-by-operator}/operator/power.d.ts +0 -0
  154. /package/dist/{packages/formula-parser/src/grammar-parser → grammar-parser}/grammar-parser.d.ts +0 -0
  155. /package/dist/{packages/formula-parser/src/helper → helper}/cell.d.ts +0 -0
  156. /package/dist/{packages/formula-parser/src/helper → helper}/number.d.ts +0 -0
  157. /package/dist/{packages/formula-parser/src/helper → helper}/string.d.ts +0 -0
  158. /package/dist/{packages/formula-parser/src/index.d.ts → index.d.ts} +0 -0
  159. /package/dist/{packages/formula-parser/src/parser.d.ts → parser.d.ts} +0 -0
  160. /package/dist/{packages/formula-parser/src/supported-formulas.d.ts → supported-formulas.d.ts} +0 -0
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const RangeDialog: React.FC;
4
- export default RangeDialog;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const DataVerification: React.FC;
4
- export default DataVerification;
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- type Props = {
4
- type?: "ok" | "yesno";
5
- onOk?: () => void;
6
- onCancel?: () => void;
7
- containerStyle?: React.CSSProperties;
8
- contentStyle?: React.CSSProperties;
9
- children?: React.ReactNode;
10
- };
11
- declare const Dialog: React.FC<Props>;
12
- export default Dialog;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- declare const FilterOptions: React.FC<{
3
- getContainer: () => HTMLDivElement;
4
- }>;
5
- export default FilterOptions;
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- export declare const FormatSearch: React.FC<{
4
- type: "currency" | "date" | "number";
5
- onCancel: () => void;
6
- }>;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- export declare const FormulaSearch: React.FC<{
4
- onCancel: () => void;
5
- }>;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const CalcInfo: React.FC;
3
- export default CalcInfo;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const LocationBox: React.FC;
3
- export default LocationBox;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const FxEditor: React.FC;
4
- export default FxEditor;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const ImgBoxs: React.FC;
3
- export default ImgBoxs;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import { LinkCardProps } from "@leankylin-sheet/core";
3
- import "./index.css";
4
- export declare const LinkEditCard: React.FC<LinkCardProps>;
5
- export default LinkEditCard;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- export declare const LocationCondition: React.FC<{}>;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- type: "ok" | "yesno";
4
- onOk?: () => void;
5
- onCancel?: () => void;
6
- children?: React.ReactNode;
7
- };
8
- declare const MessageBox: React.FC<Props>;
9
- export default MessageBox;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const NotationBoxes: React.FC;
3
- export default NotationBoxes;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SVGDefines: React.FC;
3
- export default SVGDefines;
@@ -1,9 +0,0 @@
1
- import React, { CSSProperties } from "react";
2
- type Props = {
3
- name: string;
4
- width?: number;
5
- height?: number;
6
- style?: CSSProperties;
7
- };
8
- declare const SVGIcon: React.FC<Props>;
9
- export default SVGIcon;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const SearchReplace: React.FC<{}>;
4
- export default SearchReplace;
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import { Sheet as SheetType } from "@leankylin-sheet/core";
3
- import "./index.css";
4
- type Props = {
5
- sheet: SheetType;
6
- };
7
- declare const Sheet: React.FC<Props>;
8
- export default Sheet;
@@ -1,8 +0,0 @@
1
- import { Sheet } from "@leankylin-sheet/core";
2
- import React, { CSSProperties } from "react";
3
- type Props = {
4
- style?: CSSProperties;
5
- sheet?: Sheet;
6
- };
7
- declare const SheetHiddenButton: React.FC<Props>;
8
- export default SheetHiddenButton;
@@ -1,9 +0,0 @@
1
- import { Sheet } from "@leankylin-sheet/core";
2
- import React from "react";
3
- import "./index.css";
4
- type Props = {
5
- sheet: Sheet;
6
- isDropPlaceholder?: boolean;
7
- };
8
- declare const SheetListItem: React.FC<Props>;
9
- export default SheetListItem;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const SheetList: React.FC;
4
- export default SheetList;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const ColumnHeader: React.FC;
3
- export default ColumnHeader;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- type ContentEditableProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & {
3
- initialContent?: string;
4
- innerRef?: (e: HTMLDivElement | null) => void;
5
- onChange?: (html: string, isBlur?: boolean) => void;
6
- onBlur?: (e: React.FocusEvent<HTMLDivElement, Element>) => void;
7
- autoFocus?: boolean;
8
- allowEdit?: boolean;
9
- };
10
- declare const ContentEditable: React.FC<ContentEditableProps>;
11
- export default ContentEditable;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const FormulaHint: React.FC<React.HTMLAttributes<HTMLDivElement>>;
4
- export default FormulaHint;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const FormulaSearch: React.FC<React.HTMLAttributes<HTMLDivElement>>;
4
- export default FormulaSearch;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const InputBox: React.FC;
3
- export default InputBox;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const RowHeader: React.FC;
3
- export default RowHeader;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- type Props = {
4
- axis: "x" | "y";
5
- };
6
- declare const ScrollBar: React.FC<Props>;
7
- export default ScrollBar;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const SheetOverlay: React.FC;
4
- export default SheetOverlay;
@@ -1,8 +0,0 @@
1
- import { Sheet } from "@leankylin-sheet/core";
2
- import React from "react";
3
- type Props = {
4
- sheet: Sheet;
5
- isDropPlaceholder?: boolean;
6
- };
7
- declare const SheetItem: React.FC<Props>;
8
- export default SheetItem;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const SheetTab: React.FC;
4
- export default SheetTab;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- export declare const SplitColumn: React.FC<{}>;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- tooltip: string;
4
- iconId: string;
5
- onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
6
- disabled?: boolean;
7
- selected?: boolean;
8
- children?: React.ReactNode;
9
- };
10
- declare const Button: React.FC<Props>;
11
- export default Button;
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- onPick: (color: string) => void;
4
- };
5
- declare const ColorPicker: React.FC<Props>;
6
- export default ColorPicker;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- tooltip: string;
4
- iconId?: string;
5
- text?: string;
6
- onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
7
- children: (setOpen: React.Dispatch<React.SetStateAction<boolean>>) => React.ReactNode;
8
- };
9
- declare const Combo: React.FC<Props>;
10
- export default Combo;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- type Props = {
4
- onPick: (changeColor?: string, changeStyle?: string) => void;
5
- };
6
- declare const CustomBorder: React.FC<Props>;
7
- export default CustomBorder;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- tooltip?: string;
4
- onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
5
- selected?: boolean;
6
- children?: React.ReactNode;
7
- iconName?: string;
8
- icon?: React.ReactNode;
9
- };
10
- declare const CustomButton: React.FC<Props>;
11
- export default CustomButton;
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- type Props = {
4
- onCustomPick: (color: string | undefined) => void;
5
- onColorPick: (color: string) => void;
6
- };
7
- export declare const CustomColor: React.FC<Props>;
8
- export {};
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- iconName?: string;
4
- width?: number;
5
- height?: number;
6
- content?: React.ReactNode;
7
- };
8
- declare const CustomIcon: React.FC<Props>;
9
- export default CustomIcon;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- declare const Divider: React.FC;
3
- export declare const MenuDivider: React.FC;
4
- export default Divider;
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- declare const MoreItemsContaier: React.FC<{
3
- onClose?: () => void;
4
- children?: React.ReactNode;
5
- }>;
6
- export default MoreItemsContaier;
@@ -1,14 +0,0 @@
1
- import React, { CSSProperties } from "react";
2
- declare const Select: React.FC<{
3
- children?: React.ReactNode;
4
- style?: CSSProperties;
5
- }>;
6
- type OptionProps = {
7
- onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
8
- iconId?: string;
9
- onMouseLeave?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
10
- onMouseEnter?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
11
- };
12
- declare const Option: React.FC<React.PropsWithChildren<OptionProps>>;
13
- export { Option };
14
- export default Select;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const Toolbar: React.FC<{
4
- setMoreItems: React.Dispatch<React.SetStateAction<React.ReactNode>>;
5
- moreItemsOpen: boolean;
6
- }>;
7
- export default Toolbar;
@@ -1,121 +0,0 @@
1
- import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol } from "@leankylin-sheet/core";
2
- import { RefValues, SetContextOptions } from "../../context";
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
- scrollToHighlightCell: (r: number, c: number, selected: number) => void;
5
- getRefs: () => RefValues;
6
- setCellOptions: (cellOptions: Context["cellOptions"]) => void;
7
- applyOp: (ops: Op[]) => void;
8
- createFilter: () => void;
9
- getCellValue: (row: number, column: number, options?: api.CommonOptions & {
10
- type?: keyof Cell;
11
- }) => any;
12
- setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
13
- type?: keyof Cell;
14
- }) => void;
15
- clearCell: (row: number, column: number, options?: api.CommonOptions) => void;
16
- setCellFormat: (row: number, column: number, attr: keyof Cell, value: any, options?: api.CommonOptions) => void;
17
- autoFillCell: (copyRange: SingleRange, applyRange: SingleRange, direction: "up" | "down" | "left" | "right") => void;
18
- freeze: (type: "row" | "column" | "both", range: {
19
- row: number;
20
- column: number;
21
- }, options?: api.CommonOptions) => void;
22
- insertRowOrColumn: (type: "row" | "column", index: number, count: number, direction?: "lefttop" | "rightbottom", options?: api.CommonOptions) => void;
23
- deleteRowOrColumn: (type: "row" | "column", start: number, end: number, options?: api.CommonOptions) => void;
24
- setRowHeight: (rowInfo: Record<string, number>, options?: api.CommonOptions, custom?: boolean) => void;
25
- setColHidden: (colHidden: Record<string, number>, options?: api.CommonOptions) => void;
26
- setRowHidden: (colHidden: Record<string, number>, options?: api.CommonOptions) => void;
27
- setColumnWidth: (columnInfo: Record<string, number>, options?: api.CommonOptions, custom?: boolean) => void;
28
- getRowHeight: (rows: number[], options?: api.CommonOptions) => Record<number, number>;
29
- getColumnWidth: (columns: number[], options?: api.CommonOptions) => Record<number, number>;
30
- getSelection: () => {
31
- row: number[];
32
- column: number[];
33
- }[] | undefined;
34
- getFlattenRange: (range: Range) => {
35
- r: number;
36
- c: number;
37
- }[];
38
- getCellsByFlattenRange: (range?: {
39
- r: number;
40
- c: number;
41
- }[]) => (Cell | null)[];
42
- getSelectionCoordinates: () => string[];
43
- getCellsByRange: (range: Selection, options?: api.CommonOptions) => (Cell | null)[][];
44
- getHtmlByRange: (range: Range, options?: api.CommonOptions) => string | null;
45
- setSelection: (range: Range, options?: api.CommonOptions) => void;
46
- setCellValuesByRange: (data: any[][], range: SingleRange, options?: api.CommonOptions) => void;
47
- setCellFormatByRange: (attr: keyof Cell, value: any, range: Range | SingleRange, options?: api.CommonOptions) => void;
48
- mergeCells: (ranges: Range, type: string, options?: api.CommonOptions) => void;
49
- cancelMerge: (ranges: Range, options?: api.CommonOptions) => void;
50
- getAllSheets: () => Sheet[];
51
- getSheet: (options?: api.CommonOptions) => {
52
- celldata: CellWithRowAndCol[];
53
- name: string;
54
- config?: import("@leankylin-sheet/core").SheetConfig | undefined;
55
- order?: number | undefined;
56
- color?: string | undefined;
57
- data?: CellMatrix | undefined;
58
- id?: string | undefined;
59
- images?: import("@leankylin-sheet/core").Image[] | undefined;
60
- zoomRatio?: number | undefined;
61
- column?: number | undefined;
62
- row?: number | undefined;
63
- addRows?: number | undefined;
64
- status?: number | undefined;
65
- hide?: number | undefined;
66
- luckysheet_select_save?: Selection[] | undefined;
67
- luckysheet_selection_range?: {
68
- row: number[];
69
- column: number[];
70
- }[] | undefined;
71
- calcChain?: any[] | undefined;
72
- defaultRowHeight?: number | undefined;
73
- defaultColWidth?: number | undefined;
74
- showGridLines?: number | boolean | undefined;
75
- pivotTable?: any;
76
- isPivotTable?: boolean | undefined;
77
- filter?: Record<string, any> | undefined;
78
- filter_select?: {
79
- row: number[];
80
- column: number[];
81
- } | undefined;
82
- luckysheet_conditionformat_save?: any[] | undefined;
83
- luckysheet_alternateformat_save?: any[] | undefined;
84
- dataVerification?: any;
85
- hyperlink?: Record<string, {
86
- linkType: string;
87
- linkAddress: string;
88
- }> | undefined;
89
- dynamicArray_compute?: any;
90
- dynamicArray?: any[] | undefined;
91
- frozen?: {
92
- type: "column" | "row" | "both" | "rangeRow" | "rangeColumn" | "rangeBoth";
93
- range?: {
94
- row_focus: number;
95
- column_focus: number;
96
- } | undefined;
97
- } | undefined;
98
- };
99
- addSheet: () => void;
100
- deleteSheet: (options?: api.CommonOptions) => void;
101
- updateSheet: (data: Sheet[]) => void;
102
- activateSheet: (options?: api.CommonOptions) => void;
103
- setSheetName: (name: string, options?: api.CommonOptions) => void;
104
- setSheetOrder: (orderList: Record<string, number>) => void;
105
- scroll: (options: {
106
- scrollLeft?: number;
107
- scrollTop?: number;
108
- targetRow?: number;
109
- targetColumn?: number;
110
- }) => void;
111
- addPresences: (newPresences: Presence[]) => void;
112
- removePresences: (arr: {
113
- username: string;
114
- userId?: string;
115
- }[]) => void;
116
- handleUndo: () => void;
117
- handleRedo: () => void;
118
- calculateFormula: () => void;
119
- dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
120
- celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
121
- };
@@ -1,130 +0,0 @@
1
- import { Settings, CellWithRowAndCol, Sheet as SheetType, Op, CellMatrix } from "@leankylin-sheet/core";
2
- import React from "react";
3
- import "./index.css";
4
- import { RefValues } from "../../context";
5
- import { generateAPIs } from "./api";
6
- export type WorkbookInstance = ReturnType<typeof generateAPIs>;
7
- type AdditionalProps = {
8
- onChange?: (data: SheetType[]) => void;
9
- onOp?: (op: Op[]) => void;
10
- };
11
- declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
12
- scrollToHighlightCell: (r: number, c: number, selected: number) => void;
13
- getRefs: () => RefValues;
14
- setCellOptions: (cellOptions: import("@leankylin-sheet/core").CellOptions) => void;
15
- applyOp: (ops: Op[]) => void;
16
- createFilter: () => void;
17
- getCellValue: (row: number, column: number, options?: import("../../../../core/src/api").CommonOptions & {
18
- type?: "mc" | "v" | "m" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
19
- }) => any;
20
- setCellValue: (row: number, column: number, value: any, options?: import("../../../../core/src/api").CommonOptions & {
21
- type?: "mc" | "v" | "m" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
22
- }) => void;
23
- clearCell: (row: number, column: number, options?: import("../../../../core/src/api").CommonOptions) => void;
24
- setCellFormat: (row: number, column: number, attr: "mc" | "v" | "m" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle, value: any, options?: import("../../../../core/src/api").CommonOptions) => void;
25
- autoFillCell: (copyRange: import("@leankylin-sheet/core").SingleRange, applyRange: import("@leankylin-sheet/core").SingleRange, direction: "up" | "down" | "left" | "right") => void;
26
- freeze: (type: "column" | "row" | "both", range: {
27
- row: number;
28
- column: number;
29
- }, options?: import("../../../../core/src/api").CommonOptions) => void;
30
- insertRowOrColumn: (type: "column" | "row", index: number, count: number, direction?: "lefttop" | "rightbottom", options?: import("../../../../core/src/api").CommonOptions) => void;
31
- deleteRowOrColumn: (type: "column" | "row", start: number, end: number, options?: import("../../../../core/src/api").CommonOptions) => void;
32
- setRowHeight: (rowInfo: Record<string, number>, options?: import("../../../../core/src/api").CommonOptions, custom?: boolean) => void;
33
- setColHidden: (colHidden: Record<string, number>, options?: import("../../../../core/src/api").CommonOptions) => void;
34
- setRowHidden: (colHidden: Record<string, number>, options?: import("../../../../core/src/api").CommonOptions) => void;
35
- setColumnWidth: (columnInfo: Record<string, number>, options?: import("../../../../core/src/api").CommonOptions, custom?: boolean) => void;
36
- getRowHeight: (rows: number[], options?: import("../../../../core/src/api").CommonOptions) => Record<number, number>;
37
- getColumnWidth: (columns: number[], options?: import("../../../../core/src/api").CommonOptions) => Record<number, number>;
38
- getSelection: () => {
39
- row: number[];
40
- column: number[];
41
- }[] | undefined;
42
- getFlattenRange: (range: import("@leankylin-sheet/core").Range) => {
43
- r: number;
44
- c: number;
45
- }[];
46
- getCellsByFlattenRange: (range?: {
47
- r: number;
48
- c: number;
49
- }[] | undefined) => (import("@leankylin-sheet/core").Cell | null)[];
50
- getSelectionCoordinates: () => string[];
51
- getCellsByRange: (range: import("@leankylin-sheet/core").Selection, options?: import("../../../../core/src/api").CommonOptions) => (import("@leankylin-sheet/core").Cell | null)[][];
52
- getHtmlByRange: (range: import("@leankylin-sheet/core").Range, options?: import("../../../../core/src/api").CommonOptions) => string | null;
53
- setSelection: (range: import("@leankylin-sheet/core").Range, options?: import("../../../../core/src/api").CommonOptions) => void;
54
- setCellValuesByRange: (data: any[][], range: import("@leankylin-sheet/core").SingleRange, options?: import("../../../../core/src/api").CommonOptions) => void;
55
- setCellFormatByRange: (attr: "mc" | "v" | "m" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle, value: any, range: import("@leankylin-sheet/core").SingleRange | import("@leankylin-sheet/core").Range, options?: import("../../../../core/src/api").CommonOptions) => void;
56
- mergeCells: (ranges: import("@leankylin-sheet/core").Range, type: string, options?: import("../../../../core/src/api").CommonOptions) => void;
57
- cancelMerge: (ranges: import("@leankylin-sheet/core").Range, options?: import("../../../../core/src/api").CommonOptions) => void;
58
- getAllSheets: () => SheetType[];
59
- getSheet: (options?: import("../../../../core/src/api").CommonOptions) => {
60
- celldata: CellWithRowAndCol[];
61
- name: string;
62
- config?: import("@leankylin-sheet/core").SheetConfig | undefined;
63
- order?: number | undefined;
64
- color?: string | undefined;
65
- data?: CellMatrix | undefined;
66
- id?: string | undefined;
67
- images?: import("@leankylin-sheet/core").Image[] | undefined;
68
- zoomRatio?: number | undefined;
69
- column?: number | undefined;
70
- row?: number | undefined;
71
- addRows?: number | undefined;
72
- status?: number | undefined;
73
- hide?: number | undefined;
74
- luckysheet_select_save?: import("@leankylin-sheet/core").Selection[] | undefined;
75
- luckysheet_selection_range?: {
76
- row: number[];
77
- column: number[];
78
- }[] | undefined;
79
- calcChain?: any[] | undefined;
80
- defaultRowHeight?: number | undefined;
81
- defaultColWidth?: number | undefined;
82
- showGridLines?: number | boolean | undefined;
83
- pivotTable?: any;
84
- isPivotTable?: boolean | undefined;
85
- filter?: Record<string, any> | undefined;
86
- filter_select?: {
87
- row: number[];
88
- column: number[];
89
- } | undefined;
90
- luckysheet_conditionformat_save?: any[] | undefined;
91
- luckysheet_alternateformat_save?: any[] | undefined;
92
- dataVerification?: any;
93
- hyperlink?: Record<string, {
94
- linkType: string;
95
- linkAddress: string;
96
- }> | undefined;
97
- dynamicArray_compute?: any;
98
- dynamicArray?: any[] | undefined;
99
- frozen?: {
100
- type: "column" | "row" | "both" | "rangeRow" | "rangeColumn" | "rangeBoth";
101
- range?: {
102
- row_focus: number;
103
- column_focus: number;
104
- } | undefined;
105
- } | undefined;
106
- };
107
- addSheet: () => void;
108
- deleteSheet: (options?: import("../../../../core/src/api").CommonOptions) => void;
109
- updateSheet: (data: SheetType[]) => void;
110
- activateSheet: (options?: import("../../../../core/src/api").CommonOptions) => void;
111
- setSheetName: (name: string, options?: import("../../../../core/src/api").CommonOptions) => void;
112
- setSheetOrder: (orderList: Record<string, number>) => void;
113
- scroll: (options: {
114
- scrollLeft?: number | undefined;
115
- scrollTop?: number | undefined;
116
- targetRow?: number | undefined;
117
- targetColumn?: number | undefined;
118
- }) => void;
119
- addPresences: (newPresences: import("@leankylin-sheet/core").Presence[]) => void;
120
- removePresences: (arr: {
121
- username: string;
122
- userId?: string | undefined;
123
- }[]) => void;
124
- handleUndo: () => void;
125
- handleRedo: () => void;
126
- calculateFormula: () => void;
127
- dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
128
- celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
129
- }>>;
130
- export default Workbook;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import "./index.css";
3
- declare const ZoomControl: React.FC;
4
- export default ZoomControl;
@@ -1,3 +0,0 @@
1
- import Workbook from "./Workbook";
2
- export { Workbook };
3
- export type { WorkbookInstance } from "./Workbook";
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { Context, Settings, GlobalCache, PatchOptions } from "@leankylin-sheet/core";
3
- export type RefValues = {
4
- globalCache: GlobalCache;
5
- cellInput: React.MutableRefObject<HTMLDivElement | null>;
6
- fxInput: React.MutableRefObject<HTMLDivElement | null>;
7
- canvas: React.MutableRefObject<HTMLCanvasElement | null>;
8
- scrollbarX: React.MutableRefObject<HTMLDivElement | null>;
9
- scrollbarY: React.MutableRefObject<HTMLDivElement | null>;
10
- cellArea: React.MutableRefObject<HTMLDivElement | null>;
11
- workbookContainer: React.MutableRefObject<HTMLDivElement | null>;
12
- };
13
- export type SetContextOptions = {
14
- noHistory?: boolean;
15
- logPatch?: boolean;
16
- } & PatchOptions;
17
- declare const WorkbookContext: React.Context<{
18
- context: Context;
19
- setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void;
20
- settings: Required<Settings>;
21
- refs: RefValues;
22
- handleUndo: () => void;
23
- handleRedo: () => void;
24
- }>;
25
- export default WorkbookContext;