@fileverse-dev/fortune-react 1.0.26 → 1.1.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.
- package/dist/index.css +3915 -0
- package/dist/index.esm.css +3915 -0
- package/dist/index.esm.js +12975 -0
- package/dist/index.js +12995 -0
- package/dist/index.umd.css +3915 -0
- package/dist/index.umd.js +122445 -0
- package/dist/index.umd.min.css +1 -0
- package/dist/index.umd.min.js +50 -0
- package/dist/packages/core/src/api/cell.d.ts +10 -0
- package/dist/packages/core/src/api/common.d.ts +66 -0
- package/dist/packages/core/src/api/errors.d.ts +2 -0
- package/dist/packages/core/src/api/index.d.ts +9 -0
- package/dist/packages/core/src/api/merge.d.ts +5 -0
- package/dist/packages/core/src/api/range.d.ts +22 -0
- package/dist/packages/core/src/api/rowcol.d.ts +14 -0
- package/dist/packages/core/src/api/sheet.d.ts +10 -0
- package/dist/packages/core/src/api/workbook.d.ts +15 -0
- package/dist/packages/core/src/canvas.d.ts +46 -0
- package/dist/packages/core/src/context.d.ts +197 -0
- package/dist/packages/core/src/events/copy.d.ts +2 -0
- package/dist/packages/core/src/events/index.d.ts +4 -0
- package/dist/packages/core/src/events/keyboard.d.ts +6 -0
- package/dist/packages/core/src/events/mouse.d.ts +22 -0
- package/dist/packages/core/src/events/paste.d.ts +3 -0
- package/dist/packages/core/src/index.d.ts +10 -0
- package/dist/packages/core/src/locale/en.d.ts +992 -0
- package/dist/packages/core/src/locale/es.d.ts +1134 -0
- package/dist/packages/core/src/locale/hi.d.ts +1030 -0
- package/dist/packages/core/src/locale/index.d.ts +1049 -0
- package/dist/packages/core/src/locale/zh.d.ts +1048 -0
- package/dist/packages/core/src/locale/zh_tw.d.ts +1187 -0
- package/dist/packages/core/src/modules/ConditionFormat.d.ts +17 -0
- package/dist/packages/core/src/modules/border.d.ts +3 -0
- package/dist/packages/core/src/modules/cell.d.ts +32 -0
- package/dist/packages/core/src/modules/clipboard.d.ts +3 -0
- package/dist/packages/core/src/modules/color.d.ts +1 -0
- package/dist/packages/core/src/modules/comment.d.ts +97 -0
- package/dist/packages/core/src/modules/conditionalFormat.d.ts +2 -0
- package/dist/packages/core/src/modules/cursor.d.ts +3 -0
- package/dist/packages/core/src/modules/dataVerification.d.ts +11 -0
- package/dist/packages/core/src/modules/dropCell.d.ts +10 -0
- package/dist/packages/core/src/modules/filter.d.ts +45 -0
- package/dist/packages/core/src/modules/format.d.ts +6 -0
- package/dist/packages/core/src/modules/formula.d.ts +54 -0
- package/dist/packages/core/src/modules/freeze.d.ts +5 -0
- package/dist/packages/core/src/modules/hyperlink.d.ts +21 -0
- package/dist/packages/core/src/modules/iframe.d.ts +12 -0
- package/dist/packages/core/src/modules/image.d.ts +31 -0
- package/dist/packages/core/src/modules/index.d.ts +36 -0
- package/dist/packages/core/src/modules/inline-string.d.ts +36 -0
- package/dist/packages/core/src/modules/location.d.ts +6 -0
- package/dist/packages/core/src/modules/locationCondition.d.ts +21 -0
- package/dist/packages/core/src/modules/merge.d.ts +3 -0
- package/dist/packages/core/src/modules/mobile.d.ts +5 -0
- package/dist/packages/core/src/modules/moveCells.d.ts +5 -0
- package/dist/packages/core/src/modules/protection.d.ts +5 -0
- package/dist/packages/core/src/modules/refresh.d.ts +3 -0
- package/dist/packages/core/src/modules/rowcol.d.ts +19 -0
- package/dist/packages/core/src/modules/screenshot.d.ts +2 -0
- package/dist/packages/core/src/modules/searchReplace.d.ts +36 -0
- package/dist/packages/core/src/modules/selection.d.ts +46 -0
- package/dist/packages/core/src/modules/sheet.d.ts +10 -0
- package/dist/packages/core/src/modules/sort.d.ts +7 -0
- package/dist/packages/core/src/modules/splitColumn.d.ts +5 -0
- package/dist/packages/core/src/modules/text.d.ts +10 -0
- package/dist/packages/core/src/modules/toolbar.d.ts +32 -0
- package/dist/packages/core/src/modules/validation.d.ts +19 -0
- package/dist/packages/core/src/modules/zoom.d.ts +3 -0
- package/dist/packages/core/src/settings.d.ts +100 -0
- package/dist/packages/core/src/types.d.ts +371 -0
- package/dist/packages/core/src/utils/freeze.d.ts +7 -0
- package/dist/packages/core/src/utils/index.d.ts +18 -0
- package/dist/packages/core/src/utils/patch.d.ts +37 -0
- package/{es → dist/packages/react/src}/components/ChangeColor/index.d.ts +7 -7
- package/{lib → dist/packages/react/src}/components/ConditionFormat/ConditionRules.d.ts +6 -6
- package/{es → dist/packages/react/src}/components/ConditionFormat/index.d.ts +7 -7
- package/{es → dist/packages/react/src}/components/ContextMenu/Divider.d.ts +3 -3
- package/{lib → dist/packages/react/src}/components/ContextMenu/FilterMenu.d.ts +3 -3
- package/{es → dist/packages/react/src}/components/ContextMenu/Menu.d.ts +8 -8
- package/{lib → dist/packages/react/src}/components/ContextMenu/SheetTab.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/ContextMenu/index.d.ts +5 -5
- package/{lib → dist/packages/react/src}/components/CustomSort/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/DataVerification/DropdownList.d.ts +4 -4
- package/{lib → dist/packages/react/src}/components/DataVerification/RangeDialog.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -2
- package/{lib → dist/packages/react/src}/components/DataVerification/index.d.ts +4 -4
- package/{lib → dist/packages/react/src}/components/Dialog/index.d.ts +15 -15
- package/{lib → dist/packages/react/src}/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +11 -11
- package/{lib → dist/packages/react/src}/components/DunePreview/DunePreview.d.ts +13 -13
- package/{es → dist/packages/react/src}/components/FilterOption/index.d.ts +5 -5
- package/{es → dist/packages/react/src}/components/FormatSearch/index.d.ts +6 -6
- package/{lib → dist/packages/react/src}/components/FormulaSearch/index.d.ts +5 -5
- package/{lib → dist/packages/react/src}/components/FxEditor/NameBox.d.ts +3 -3
- package/{es → dist/packages/react/src}/components/FxEditor/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/IFrameBoxs/iFrameBoxs.d.ts +4 -4
- package/{lib → dist/packages/react/src}/components/ImgBoxs/index.d.ts +3 -3
- package/{es → dist/packages/react/src}/components/LinkEidtCard/index.d.ts +5 -5
- package/{lib → dist/packages/react/src}/components/LocationCondition/index.d.ts +3 -3
- package/{lib → dist/packages/react/src}/components/MessageBox/index.d.ts +9 -9
- package/{es → dist/packages/react/src}/components/NotationBoxes/index.d.ts +3 -3
- package/{lib → dist/packages/react/src}/components/ResetColumnWidth/index.d.ts +2 -2
- package/{es → dist/packages/react/src}/components/SVGDefines.d.ts +5 -5
- package/{es → dist/packages/react/src}/components/SVGIcon.d.ts +9 -9
- package/{lib → dist/packages/react/src}/components/SearchReplace/index.d.ts +6 -6
- package/{es → dist/packages/react/src}/components/Sheet/index.d.ts +8 -8
- package/{es → dist/packages/react/src}/components/SheetList/SheetHiddenButton.d.ts +8 -8
- package/{lib → dist/packages/react/src}/components/SheetList/SheetListItem.d.ts +9 -9
- package/{lib → dist/packages/react/src}/components/SheetList/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/SheetOverlay/ColumnHeader.d.ts +3 -3
- package/{es → dist/packages/react/src}/components/SheetOverlay/ContentEditable.d.ts +11 -11
- package/{es → dist/packages/react/src}/components/SheetOverlay/FormulaHint/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -63
- package/{es → dist/packages/react/src}/components/SheetOverlay/FormulaSearch/index.d.ts +4 -4
- package/{lib → dist/packages/react/src}/components/SheetOverlay/InputBox.d.ts +3 -3
- package/{es → dist/packages/react/src}/components/SheetOverlay/RowHeader.d.ts +3 -3
- package/{es → dist/packages/react/src}/components/SheetOverlay/ScrollBar/index.d.ts +7 -7
- package/{es → dist/packages/react/src}/components/SheetOverlay/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/SheetTab/SheetItem.d.ts +8 -8
- package/{lib → dist/packages/react/src}/components/SheetTab/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/SplitColumn/index.d.ts +3 -3
- package/{lib → dist/packages/react/src}/components/Toolbar/Button.d.ts +12 -12
- package/{es → dist/packages/react/src}/components/Toolbar/ColorPicker.d.ts +6 -6
- package/{es → dist/packages/react/src}/components/Toolbar/Combo.d.ts +12 -12
- package/{es → dist/packages/react/src}/components/Toolbar/CustomBorder.d.ts +7 -7
- package/{lib → dist/packages/react/src}/components/Toolbar/CustomButton.d.ts +11 -11
- package/{es → dist/packages/react/src}/components/Toolbar/CustomColor.d.ts +8 -8
- package/{lib → dist/packages/react/src}/components/Toolbar/CustomIcon.d.ts +9 -9
- package/{es → dist/packages/react/src}/components/Toolbar/Divider.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/Toolbar/MoreItemsContainer.d.ts +6 -6
- package/{lib → dist/packages/react/src}/components/Toolbar/Select.d.ts +14 -14
- package/dist/packages/react/src/components/Toolbar/index.d.ts +10 -0
- package/{es → dist/packages/react/src}/components/Workbook/api.d.ts +1177 -1183
- package/{lib → dist/packages/react/src}/components/Workbook/index.d.ts +1185 -1191
- package/{es → dist/packages/react/src}/components/ZoomControl/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/components/index.d.ts +4 -4
- package/{es → dist/packages/react/src}/constants.d.ts +1 -1
- package/{es → dist/packages/react/src}/context/index.d.ts +25 -25
- package/{es → dist/packages/react/src}/context/modal.d.ts +10 -10
- package/{es → dist/packages/react/src}/hooks/useAlert.d.ts +4 -4
- package/{es → dist/packages/react/src}/hooks/useDialog.d.ts +5 -5
- package/{es → dist/packages/react/src}/hooks/useOutsideClick.d.ts +2 -2
- package/{es → dist/packages/react/src}/hooks/usePrevious.d.ts +2 -2
- package/{es → dist/packages/react/src}/index.d.ts +1 -1
- package/{es → dist/packages/react/src}/utils/datepickerStyles.d.ts +2 -2
- package/{es/components/Workbook/index.d.ts → dist/stories/API.stories.d.ts} +1210 -1191
- package/dist/stories/Collabration.stories.d.ts +2359 -0
- package/dist/stories/Features.stories.d.ts +9430 -0
- package/dist/stories/data/cell.d.ts +983 -0
- package/dist/stories/data/dataVerification.d.ts +131 -0
- package/dist/stories/data/empty.d.ts +10 -0
- package/dist/stories/data/formula.d.ts +362 -0
- package/dist/stories/data/freeze.d.ts +34 -0
- package/dist/stories/data/protected.d.ts +40 -0
- package/dist/stories/utils.d.ts +1 -0
- package/package.json +6 -7
- package/es/components/ChangeColor/index.css +0 -76
- package/es/components/ChangeColor/index.js +0 -41
- package/es/components/ConditionFormat/ConditionRules.d.ts +0 -6
- package/es/components/ConditionFormat/ConditionRules.js +0 -323
- package/es/components/ConditionFormat/index.css +0 -210
- package/es/components/ConditionFormat/index.js +0 -252
- package/es/components/ContextMenu/Divider.js +0 -7
- package/es/components/ContextMenu/FilterMenu.d.ts +0 -3
- package/es/components/ContextMenu/FilterMenu.js +0 -612
- package/es/components/ContextMenu/Menu.js +0 -25
- package/es/components/ContextMenu/SheetTab.d.ts +0 -4
- package/es/components/ContextMenu/SheetTab.js +0 -223
- package/es/components/ContextMenu/index.css +0 -322
- package/es/components/ContextMenu/index.js +0 -1054
- package/es/components/CustomSort/index.css +0 -23
- package/es/components/CustomSort/index.d.ts +0 -4
- package/es/components/CustomSort/index.js +0 -113
- package/es/components/DataVerification/DropdownList.js +0 -126
- package/es/components/DataVerification/RangeDialog.d.ts +0 -4
- package/es/components/DataVerification/RangeDialog.js +0 -105
- package/es/components/DataVerification/getDisplayedRangeTxt.js +0 -9
- package/es/components/DataVerification/index.css +0 -202
- package/es/components/DataVerification/index.d.ts +0 -4
- package/es/components/DataVerification/index.js +0 -398
- package/es/components/Dialog/index.css +0 -64
- package/es/components/Dialog/index.d.ts +0 -15
- package/es/components/Dialog/index.js +0 -72
- package/es/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +0 -11
- package/es/components/DuneChartsInputModal/DuneChartsInputModal.js +0 -95
- package/es/components/DuneChartsInputModal/duneChartsInputModal.css +0 -98
- package/es/components/DunePreview/DunePreview.d.ts +0 -13
- package/es/components/DunePreview/DunePreview.js +0 -46
- package/es/components/DunePreview/index.css +0 -57
- package/es/components/FilterOption/index.js +0 -121
- package/es/components/FormatSearch/index.css +0 -19
- package/es/components/FormatSearch/index.js +0 -129
- package/es/components/FormulaSearch/index.css +0 -65
- package/es/components/FormulaSearch/index.d.ts +0 -5
- package/es/components/FormulaSearch/index.js +0 -198
- package/es/components/FxEditor/NameBox.d.ts +0 -3
- package/es/components/FxEditor/NameBox.js +0 -29
- package/es/components/FxEditor/index.css +0 -72
- package/es/components/FxEditor/index.js +0 -167
- package/es/components/IFrameBoxs/iFrameBoxs.css +0 -16
- package/es/components/IFrameBoxs/iFrameBoxs.js +0 -142
- package/es/components/ImgBoxs/index.d.ts +0 -3
- package/es/components/ImgBoxs/index.js +0 -219
- package/es/components/LinkEidtCard/index.css +0 -255
- package/es/components/LinkEidtCard/index.js +0 -238
- package/es/components/LocationCondition/index.css +0 -74
- package/es/components/LocationCondition/index.d.ts +0 -3
- package/es/components/LocationCondition/index.js +0 -195
- package/es/components/MessageBox/index.d.ts +0 -9
- package/es/components/MessageBox/index.js +0 -16
- package/es/components/NotationBoxes/index.js +0 -105
- package/es/components/ResetColumnWidth/index.d.ts +0 -2
- package/es/components/ResetColumnWidth/index.js +0 -130
- package/es/components/SVGDefines.js +0 -1902
- package/es/components/SVGIcon.js +0 -18
- package/es/components/SearchReplace/index.css +0 -191
- package/es/components/SearchReplace/index.d.ts +0 -6
- package/es/components/SearchReplace/index.js +0 -294
- package/es/components/Sheet/index.css +0 -27
- package/es/components/Sheet/index.js +0 -175
- package/es/components/SheetList/SheetHiddenButton.js +0 -35
- package/es/components/SheetList/SheetListItem.d.ts +0 -9
- package/es/components/SheetList/SheetListItem.js +0 -72
- package/es/components/SheetList/index.css +0 -48
- package/es/components/SheetList/index.d.ts +0 -4
- package/es/components/SheetList/index.js +0 -30
- package/es/components/SheetOverlay/ColumnHeader.js +0 -217
- package/es/components/SheetOverlay/ContentEditable.js +0 -74
- package/es/components/SheetOverlay/FormulaHint/index.css +0 -180
- package/es/components/SheetOverlay/FormulaHint/index.js +0 -348
- package/es/components/SheetOverlay/FormulaSearch/constant.js +0 -328
- package/es/components/SheetOverlay/FormulaSearch/index.css +0 -44
- package/es/components/SheetOverlay/FormulaSearch/index.js +0 -261
- package/es/components/SheetOverlay/InputBox.d.ts +0 -3
- package/es/components/SheetOverlay/InputBox.js +0 -394
- package/es/components/SheetOverlay/RowHeader.js +0 -187
- package/es/components/SheetOverlay/ScrollBar/index.css +0 -40
- package/es/components/SheetOverlay/ScrollBar/index.js +0 -47
- package/es/components/SheetOverlay/index.css +0 -954
- package/es/components/SheetOverlay/index.js +0 -578
- package/es/components/SheetTab/SheetItem.js +0 -230
- package/es/components/SheetTab/index.css +0 -280
- package/es/components/SheetTab/index.d.ts +0 -4
- package/es/components/SheetTab/index.js +0 -143
- package/es/components/SplitColumn/index.css +0 -121
- package/es/components/SplitColumn/index.js +0 -167
- package/es/components/Toolbar/Button.d.ts +0 -12
- package/es/components/Toolbar/Button.js +0 -32
- package/es/components/Toolbar/ColorPicker.js +0 -27
- package/es/components/Toolbar/Combo.js +0 -102
- package/es/components/Toolbar/CustomBorder.js +0 -211
- package/es/components/Toolbar/CustomButton.d.ts +0 -11
- package/es/components/Toolbar/CustomButton.js +0 -29
- package/es/components/Toolbar/CustomColor.js +0 -25
- package/es/components/Toolbar/CustomIcon.d.ts +0 -9
- package/es/components/Toolbar/CustomIcon.js +0 -38
- package/es/components/Toolbar/Divider.js +0 -12
- package/es/components/Toolbar/MoreItemsContainer.js +0 -17
- package/es/components/Toolbar/Select.d.ts +0 -14
- package/es/components/Toolbar/Select.js +0 -34
- package/es/components/Toolbar/index.css +0 -405
- package/es/components/Toolbar/index.d.ts +0 -10
- package/es/components/Toolbar/index.js +0 -1338
- package/es/components/Workbook/api.js +0 -398
- package/es/components/Workbook/index.css +0 -44
- package/es/components/Workbook/index.js +0 -588
- package/es/components/ZoomControl/index.css +0 -54
- package/es/components/ZoomControl/index.js +0 -111
- package/es/components/index.js +0 -3
- package/es/constants.js +0 -4
- package/es/context/index.js +0 -34
- package/es/context/modal.js +0 -43
- package/es/hooks/useAlert.js +0 -28
- package/es/hooks/useDialog.js +0 -28
- package/es/hooks/useOutsideClick.js +0 -15
- package/es/hooks/usePrevious.js +0 -9
- package/es/index.css +0 -27
- package/es/index.js +0 -1
- package/es/utils/datepickerStyles.js +0 -8
- package/lib/components/ChangeColor/index.css +0 -76
- package/lib/components/ChangeColor/index.d.ts +0 -7
- package/lib/components/ChangeColor/index.js +0 -50
- package/lib/components/ConditionFormat/ConditionRules.js +0 -332
- package/lib/components/ConditionFormat/index.css +0 -210
- package/lib/components/ConditionFormat/index.d.ts +0 -7
- package/lib/components/ConditionFormat/index.js +0 -261
- package/lib/components/ContextMenu/Divider.d.ts +0 -3
- package/lib/components/ContextMenu/Divider.js +0 -14
- package/lib/components/ContextMenu/FilterMenu.js +0 -621
- package/lib/components/ContextMenu/Menu.d.ts +0 -8
- package/lib/components/ContextMenu/Menu.js +0 -33
- package/lib/components/ContextMenu/SheetTab.js +0 -232
- package/lib/components/ContextMenu/index.css +0 -322
- package/lib/components/ContextMenu/index.d.ts +0 -5
- package/lib/components/ContextMenu/index.js +0 -1063
- package/lib/components/CustomSort/index.css +0 -23
- package/lib/components/CustomSort/index.js +0 -122
- package/lib/components/DataVerification/DropdownList.d.ts +0 -4
- package/lib/components/DataVerification/DropdownList.js +0 -135
- package/lib/components/DataVerification/RangeDialog.js +0 -114
- package/lib/components/DataVerification/getDisplayedRangeTxt.d.ts +0 -2
- package/lib/components/DataVerification/getDisplayedRangeTxt.js +0 -15
- package/lib/components/DataVerification/index.css +0 -202
- package/lib/components/DataVerification/index.js +0 -407
- package/lib/components/Dialog/index.css +0 -64
- package/lib/components/Dialog/index.js +0 -81
- package/lib/components/DuneChartsInputModal/DuneChartsInputModal.js +0 -104
- package/lib/components/DuneChartsInputModal/duneChartsInputModal.css +0 -98
- package/lib/components/DunePreview/DunePreview.js +0 -53
- package/lib/components/DunePreview/index.css +0 -57
- package/lib/components/FilterOption/index.d.ts +0 -5
- package/lib/components/FilterOption/index.js +0 -130
- package/lib/components/FormatSearch/index.css +0 -19
- package/lib/components/FormatSearch/index.d.ts +0 -6
- package/lib/components/FormatSearch/index.js +0 -138
- package/lib/components/FormulaSearch/index.css +0 -65
- package/lib/components/FormulaSearch/index.js +0 -207
- package/lib/components/FxEditor/NameBox.js +0 -38
- package/lib/components/FxEditor/index.css +0 -72
- package/lib/components/FxEditor/index.d.ts +0 -4
- package/lib/components/FxEditor/index.js +0 -176
- package/lib/components/IFrameBoxs/iFrameBoxs.css +0 -16
- package/lib/components/IFrameBoxs/iFrameBoxs.d.ts +0 -4
- package/lib/components/IFrameBoxs/iFrameBoxs.js +0 -151
- package/lib/components/ImgBoxs/index.js +0 -228
- package/lib/components/LinkEidtCard/index.css +0 -255
- package/lib/components/LinkEidtCard/index.d.ts +0 -5
- package/lib/components/LinkEidtCard/index.js +0 -247
- package/lib/components/LocationCondition/index.css +0 -74
- package/lib/components/LocationCondition/index.js +0 -204
- package/lib/components/MessageBox/index.js +0 -23
- package/lib/components/NotationBoxes/index.d.ts +0 -3
- package/lib/components/NotationBoxes/index.js +0 -114
- package/lib/components/ResetColumnWidth/index.js +0 -138
- package/lib/components/SVGDefines.d.ts +0 -5
- package/lib/components/SVGDefines.js +0 -1909
- package/lib/components/SVGIcon.d.ts +0 -9
- package/lib/components/SVGIcon.js +0 -25
- package/lib/components/SearchReplace/index.css +0 -191
- package/lib/components/SearchReplace/index.js +0 -303
- package/lib/components/Sheet/index.css +0 -27
- package/lib/components/Sheet/index.d.ts +0 -8
- package/lib/components/Sheet/index.js +0 -184
- package/lib/components/SheetList/SheetHiddenButton.d.ts +0 -8
- package/lib/components/SheetList/SheetHiddenButton.js +0 -44
- package/lib/components/SheetList/SheetListItem.js +0 -81
- package/lib/components/SheetList/index.css +0 -48
- package/lib/components/SheetList/index.js +0 -39
- package/lib/components/SheetOverlay/ColumnHeader.d.ts +0 -3
- package/lib/components/SheetOverlay/ColumnHeader.js +0 -226
- package/lib/components/SheetOverlay/ContentEditable.d.ts +0 -11
- package/lib/components/SheetOverlay/ContentEditable.js +0 -83
- package/lib/components/SheetOverlay/FormulaHint/index.css +0 -180
- package/lib/components/SheetOverlay/FormulaHint/index.d.ts +0 -4
- package/lib/components/SheetOverlay/FormulaHint/index.js +0 -357
- package/lib/components/SheetOverlay/FormulaSearch/constant.d.ts +0 -63
- package/lib/components/SheetOverlay/FormulaSearch/constant.js +0 -334
- package/lib/components/SheetOverlay/FormulaSearch/index.css +0 -44
- package/lib/components/SheetOverlay/FormulaSearch/index.d.ts +0 -4
- package/lib/components/SheetOverlay/FormulaSearch/index.js +0 -270
- package/lib/components/SheetOverlay/InputBox.js +0 -403
- package/lib/components/SheetOverlay/RowHeader.d.ts +0 -3
- package/lib/components/SheetOverlay/RowHeader.js +0 -196
- package/lib/components/SheetOverlay/ScrollBar/index.css +0 -40
- package/lib/components/SheetOverlay/ScrollBar/index.d.ts +0 -7
- package/lib/components/SheetOverlay/ScrollBar/index.js +0 -56
- package/lib/components/SheetOverlay/index.css +0 -954
- package/lib/components/SheetOverlay/index.d.ts +0 -4
- package/lib/components/SheetOverlay/index.js +0 -587
- package/lib/components/SheetTab/SheetItem.d.ts +0 -8
- package/lib/components/SheetTab/SheetItem.js +0 -239
- package/lib/components/SheetTab/index.css +0 -280
- package/lib/components/SheetTab/index.js +0 -152
- package/lib/components/SplitColumn/index.css +0 -121
- package/lib/components/SplitColumn/index.d.ts +0 -3
- package/lib/components/SplitColumn/index.js +0 -176
- package/lib/components/Toolbar/Button.js +0 -39
- package/lib/components/Toolbar/ColorPicker.d.ts +0 -6
- package/lib/components/Toolbar/ColorPicker.js +0 -34
- package/lib/components/Toolbar/Combo.d.ts +0 -12
- package/lib/components/Toolbar/Combo.js +0 -111
- package/lib/components/Toolbar/CustomBorder.d.ts +0 -7
- package/lib/components/Toolbar/CustomBorder.js +0 -220
- package/lib/components/Toolbar/CustomButton.js +0 -36
- package/lib/components/Toolbar/CustomColor.d.ts +0 -8
- package/lib/components/Toolbar/CustomColor.js +0 -32
- package/lib/components/Toolbar/CustomIcon.js +0 -46
- package/lib/components/Toolbar/Divider.d.ts +0 -4
- package/lib/components/Toolbar/Divider.js +0 -19
- package/lib/components/Toolbar/MoreItemsContainer.d.ts +0 -6
- package/lib/components/Toolbar/MoreItemsContainer.js +0 -25
- package/lib/components/Toolbar/Select.js +0 -40
- package/lib/components/Toolbar/index.css +0 -405
- package/lib/components/Toolbar/index.d.ts +0 -10
- package/lib/components/Toolbar/index.js +0 -1347
- package/lib/components/Workbook/api.d.ts +0 -1183
- package/lib/components/Workbook/api.js +0 -405
- package/lib/components/Workbook/index.css +0 -44
- package/lib/components/Workbook/index.js +0 -597
- package/lib/components/ZoomControl/index.css +0 -54
- package/lib/components/ZoomControl/index.d.ts +0 -4
- package/lib/components/ZoomControl/index.js +0 -120
- package/lib/components/index.d.ts +0 -4
- package/lib/components/index.js +0 -28
- package/lib/constants.d.ts +0 -1
- package/lib/constants.js +0 -10
- package/lib/context/index.d.ts +0 -25
- package/lib/context/index.js +0 -41
- package/lib/context/modal.d.ts +0 -10
- package/lib/context/modal.js +0 -50
- package/lib/hooks/useAlert.d.ts +0 -4
- package/lib/hooks/useAlert.js +0 -37
- package/lib/hooks/useDialog.d.ts +0 -5
- package/lib/hooks/useDialog.js +0 -37
- package/lib/hooks/useOutsideClick.d.ts +0 -2
- package/lib/hooks/useOutsideClick.js +0 -21
- package/lib/hooks/usePrevious.d.ts +0 -2
- package/lib/hooks/usePrevious.js +0 -15
- package/lib/index.css +0 -27
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -16
- package/lib/utils/datepickerStyles.d.ts +0 -2
- package/lib/utils/datepickerStyles.js +0 -14
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Cell, CellMatrix, Context } from "..";
|
|
2
|
+
export declare function orderbydata(isAsc: boolean, index: number, data: (Cell | null)[][]): {
|
|
3
|
+
sortedData: (Cell | null)[][];
|
|
4
|
+
rowOffsets: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare function sortDataRange(ctx: Context, sheetData: CellMatrix, dataRange: CellMatrix, index: number, isAsc: boolean, str: number, edr: number, stc: number, edc: number): void;
|
|
7
|
+
export declare function sortSelection(ctx: Context, isAsc: boolean, colIndex?: number): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
export declare function getNullData(rlen: number, clen: number): string[][];
|
|
3
|
+
export declare function updateMoreCell(r: number, c: number, dataMatrix: string[][], ctx: Context): void;
|
|
4
|
+
export declare function getRegStr(regStr: string, splitSymbols: any): string;
|
|
5
|
+
export declare function getDataArr(regStr: string, ctx: Context): any[][];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Context } from "../context";
|
|
2
|
+
import { Cell } from "../types";
|
|
3
|
+
export declare function hasChinaword(s: string): boolean;
|
|
4
|
+
export declare function clearMeasureTextCache(): void;
|
|
5
|
+
export declare function defaultFont(defaultFontSize: number): string;
|
|
6
|
+
export declare function getFontSet(format: any, defaultFontSize: number, ctx?: Context): string;
|
|
7
|
+
export declare function getMeasureText(value: any, renderCtx: CanvasRenderingContext2D, sheetCtx: Context, fontset?: string): any;
|
|
8
|
+
export declare function isSupportBoundingBox(ctx: CanvasRenderingContext2D): boolean;
|
|
9
|
+
export declare function drawLineInfo(wordGroup: any, cancelLine: string, underLine: string, option: any): void;
|
|
10
|
+
export declare function getCellTextInfo(cell: Cell, renderCtx: CanvasRenderingContext2D, sheetCtx: Context, option: any, ctx?: Context): any;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
import { Cell, CellMatrix, GlobalCache } from "../types";
|
|
3
|
+
type ToolbarItemClickHandler = (ctx: Context, cellInput: HTMLDivElement, cache?: GlobalCache) => void;
|
|
4
|
+
type ToolbarItemSelectedFunc = (cell: Cell | null | undefined) => boolean;
|
|
5
|
+
export declare function updateFormatCell(ctx: Context, d: CellMatrix, attr: keyof Cell, foucsStatus: any, row_st: number, row_ed: number, col_st: number, col_ed: number, canvas?: CanvasRenderingContext2D): void;
|
|
6
|
+
export declare function updateFormat(ctx: Context, $input: HTMLDivElement, d: CellMatrix, attr: keyof Cell, foucsStatus: any, canvas?: CanvasRenderingContext2D): void;
|
|
7
|
+
export declare function autoSelectionFormula(ctx: Context, cellInput: HTMLDivElement, fxInput: HTMLDivElement | null | undefined, formula: string, cache: GlobalCache): void;
|
|
8
|
+
export declare function cancelPaintModel(ctx: Context): void;
|
|
9
|
+
export declare function handleCurrencyFormat(ctx: Context, cellInput: HTMLDivElement): void;
|
|
10
|
+
export declare function handlePercentageFormat(ctx: Context, cellInput: HTMLDivElement): void;
|
|
11
|
+
export declare function handleNumberDecrease(ctx: Context, cellInput: HTMLDivElement): void;
|
|
12
|
+
export declare function handleNumberIncrease(ctx: Context, cellInput: HTMLDivElement): void;
|
|
13
|
+
export declare function handleBold(ctx: Context, cellInput: HTMLDivElement): void;
|
|
14
|
+
export declare function handleItalic(ctx: Context, cellInput: HTMLDivElement): void;
|
|
15
|
+
export declare function handleStrikeThrough(ctx: Context, cellInput: HTMLDivElement): void;
|
|
16
|
+
export declare function handleUnderline(ctx: Context, cellInput: HTMLDivElement): void;
|
|
17
|
+
export declare function handleHorizontalAlign(ctx: Context, cellInput: HTMLDivElement, value: string): void;
|
|
18
|
+
export declare function handleVerticalAlign(ctx: Context, cellInput: HTMLDivElement, value: string): void;
|
|
19
|
+
export declare function handleFormatPainter(ctx: Context): void;
|
|
20
|
+
export declare function handleClearFormat(ctx: Context): void;
|
|
21
|
+
export declare function handleTextColor(ctx: Context, cellInput: HTMLDivElement, color: string): void;
|
|
22
|
+
export declare function handleTextBackground(ctx: Context, cellInput: HTMLDivElement, color: string): void;
|
|
23
|
+
export declare function handleBorder(ctx: Context, type: string, borderColor?: string, borderStyle?: string): void;
|
|
24
|
+
export declare function handleMerge(ctx: Context, type: string): void;
|
|
25
|
+
export declare function handleSort(ctx: Context, isAsc: boolean): void;
|
|
26
|
+
export declare function handleFreeze(ctx: Context, type: string): void;
|
|
27
|
+
export declare function handleTextSize(ctx: Context, cellInput: HTMLDivElement, size: number, canvas?: CanvasRenderingContext2D): void;
|
|
28
|
+
export declare function handleSum(ctx: Context, cellInput: HTMLDivElement, fxInput: HTMLDivElement | null | undefined, cache?: GlobalCache): void;
|
|
29
|
+
export declare function handleLink(ctx: Context): void;
|
|
30
|
+
export declare function toolbarItemClickHandler(name: string): ToolbarItemClickHandler;
|
|
31
|
+
export declare function toolbarItemSelectedFunc(name: string): ToolbarItemSelectedFunc;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
export declare const error: {
|
|
3
|
+
v: string;
|
|
4
|
+
n: string;
|
|
5
|
+
na: string;
|
|
6
|
+
r: string;
|
|
7
|
+
d: string;
|
|
8
|
+
nm: string;
|
|
9
|
+
nl: string;
|
|
10
|
+
sp: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function valueIsError(value: string): boolean;
|
|
13
|
+
export declare function isRealNull(val: any): boolean;
|
|
14
|
+
export declare function isRealNum(val: any): boolean;
|
|
15
|
+
export declare function isdatetime(s: any): boolean;
|
|
16
|
+
export declare function diff(now: any, then: any): number;
|
|
17
|
+
export declare function isdatatypemulti(s: any): any;
|
|
18
|
+
export declare function isdatatype(s: any): string;
|
|
19
|
+
export declare function hasPartMC(ctx: Context, cfg: any, r1: number, r2: number, c1: number, c2: number): boolean;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Sheet, Selection, CellMatrix, Cell } from "./types";
|
|
3
|
+
export type Hooks = {
|
|
4
|
+
beforeUpdateCell?: (r: number, c: number, value: any) => boolean;
|
|
5
|
+
afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any) => void;
|
|
6
|
+
afterSelectionChange?: (sheetId: string, selection: Selection) => void;
|
|
7
|
+
beforeRenderRowHeaderCell?: (rowNumber: string, rowIndex: number, top: number, width: number, height: number, ctx: CanvasRenderingContext2D) => boolean;
|
|
8
|
+
afterRenderRowHeaderCell?: (rowNumber: string, rowIndex: number, top: number, width: number, height: number, ctx: CanvasRenderingContext2D) => void;
|
|
9
|
+
beforeRenderColumnHeaderCell?: (columnChar: string, columnIndex: number, left: number, width: number, height: number, ctx: CanvasRenderingContext2D) => boolean;
|
|
10
|
+
afterRenderColumnHeaderCell?: (columnChar: string, columnIndex: number, left: number, width: number, height: number, ctx: CanvasRenderingContext2D) => void;
|
|
11
|
+
beforeRenderCellArea?: (cells: CellMatrix, ctx: CanvasRenderingContext2D) => boolean;
|
|
12
|
+
beforeRenderCell?: (cell: Cell | null, cellInfo: {
|
|
13
|
+
row: number;
|
|
14
|
+
column: number;
|
|
15
|
+
startX: number;
|
|
16
|
+
startY: number;
|
|
17
|
+
endX: number;
|
|
18
|
+
endY: number;
|
|
19
|
+
}, ctx: CanvasRenderingContext2D) => boolean;
|
|
20
|
+
afterRenderCell?: (cell: Cell | null, cellInfo: {
|
|
21
|
+
row: number;
|
|
22
|
+
column: number;
|
|
23
|
+
startX: number;
|
|
24
|
+
startY: number;
|
|
25
|
+
endX: number;
|
|
26
|
+
endY: number;
|
|
27
|
+
}, ctx: CanvasRenderingContext2D) => void;
|
|
28
|
+
beforeCellMouseDown?: (cell: Cell | null, cellInfo: {
|
|
29
|
+
row: number;
|
|
30
|
+
column: number;
|
|
31
|
+
startRow: number;
|
|
32
|
+
startColumn: number;
|
|
33
|
+
endRow: number;
|
|
34
|
+
endColumn: number;
|
|
35
|
+
}) => boolean;
|
|
36
|
+
afterCellMouseDown?: (cell: Cell | null, cellInfo: {
|
|
37
|
+
row: number;
|
|
38
|
+
column: number;
|
|
39
|
+
startRow: number;
|
|
40
|
+
startColumn: number;
|
|
41
|
+
endRow: number;
|
|
42
|
+
endColumn: number;
|
|
43
|
+
}) => void;
|
|
44
|
+
beforePaste?: (selection: Selection[] | undefined, content: string) => boolean;
|
|
45
|
+
beforeUpdateComment?: (row: number, column: number, value: any) => boolean;
|
|
46
|
+
afterUpdateComment?: (row: number, column: number, oldValue: any, value: any) => void;
|
|
47
|
+
beforeInsertComment?: (row: number, column: number) => boolean;
|
|
48
|
+
afterInsertComment?: (row: number, column: number) => void;
|
|
49
|
+
beforeDeleteComment?: (row: number, column: number) => boolean;
|
|
50
|
+
afterDeleteComment?: (row: number, column: number) => void;
|
|
51
|
+
beforeAddSheet?: (sheet: Sheet) => boolean;
|
|
52
|
+
afterAddSheet?: (sheet: Sheet) => void;
|
|
53
|
+
beforeActivateSheet?: (id: string) => boolean;
|
|
54
|
+
afterActivateSheet?: (id: string) => void;
|
|
55
|
+
beforeDeleteSheet?: (id: string) => boolean;
|
|
56
|
+
afterDeleteSheet?: (id: string) => void;
|
|
57
|
+
beforeUpdateSheetName?: (id: string, oldName: string, newName: string) => boolean;
|
|
58
|
+
afterUpdateSheetName?: (id: string, oldName: string, newName: string) => void;
|
|
59
|
+
};
|
|
60
|
+
export type Settings = {
|
|
61
|
+
column?: number;
|
|
62
|
+
row?: number;
|
|
63
|
+
addRows?: number;
|
|
64
|
+
allowEdit?: boolean;
|
|
65
|
+
showToolbar?: boolean;
|
|
66
|
+
showFormulaBar?: boolean;
|
|
67
|
+
showSheetTabs?: boolean;
|
|
68
|
+
data: Sheet[];
|
|
69
|
+
config?: any;
|
|
70
|
+
devicePixelRatio?: number;
|
|
71
|
+
lang?: string | null;
|
|
72
|
+
forceCalculation?: boolean;
|
|
73
|
+
rowHeaderWidth?: number;
|
|
74
|
+
columnHeaderHeight?: number;
|
|
75
|
+
defaultColWidth?: number;
|
|
76
|
+
defaultRowHeight?: number;
|
|
77
|
+
defaultFontSize?: number;
|
|
78
|
+
toolbarItems?: string[];
|
|
79
|
+
cellContextMenu?: string[];
|
|
80
|
+
headerContextMenu?: string[];
|
|
81
|
+
sheetTabContextMenu?: string[];
|
|
82
|
+
filterContextMenu?: string[];
|
|
83
|
+
getCommentCellUI?: ((row: number, column: number) => React.ReactNode) | null;
|
|
84
|
+
generateSheetId?: () => string;
|
|
85
|
+
hooks?: Hooks;
|
|
86
|
+
customToolbarItems?: {
|
|
87
|
+
key: string;
|
|
88
|
+
tooltip?: string;
|
|
89
|
+
children?: React.ReactNode;
|
|
90
|
+
iconName?: string;
|
|
91
|
+
icon?: React.ReactNode;
|
|
92
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
93
|
+
}[];
|
|
94
|
+
currency?: string;
|
|
95
|
+
onDuneChartEmbed?: () => void;
|
|
96
|
+
onSheetCountChange?: (count: number) => void;
|
|
97
|
+
isAuthorized?: boolean;
|
|
98
|
+
isFlvReadOnly?: boolean;
|
|
99
|
+
};
|
|
100
|
+
export declare const defaultSettings: Required<Settings>;
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { Patch as ImmerPatch } from "immer";
|
|
2
|
+
import { PatchOptions } from "./utils";
|
|
3
|
+
export type Op = {
|
|
4
|
+
op: "replace" | "remove" | "add" | "insertRowCol" | "deleteRowCol" | "addSheet" | "deleteSheet";
|
|
5
|
+
id?: string;
|
|
6
|
+
path: (string | number)[];
|
|
7
|
+
value?: any;
|
|
8
|
+
};
|
|
9
|
+
export type Rect = {
|
|
10
|
+
top: number;
|
|
11
|
+
left: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
export type CellStyle = {
|
|
16
|
+
bl?: number;
|
|
17
|
+
it?: number;
|
|
18
|
+
ff?: number | string;
|
|
19
|
+
fs?: number;
|
|
20
|
+
fc?: string;
|
|
21
|
+
ht?: number;
|
|
22
|
+
vt?: number;
|
|
23
|
+
tb?: string;
|
|
24
|
+
cl?: number;
|
|
25
|
+
un?: number;
|
|
26
|
+
tr?: string;
|
|
27
|
+
};
|
|
28
|
+
export type Cell = {
|
|
29
|
+
v?: string | number | boolean;
|
|
30
|
+
m?: string | number;
|
|
31
|
+
mc?: {
|
|
32
|
+
r: number;
|
|
33
|
+
c: number;
|
|
34
|
+
rs?: number;
|
|
35
|
+
cs?: number;
|
|
36
|
+
};
|
|
37
|
+
f?: string;
|
|
38
|
+
ct?: {
|
|
39
|
+
fa?: string;
|
|
40
|
+
t?: string;
|
|
41
|
+
s?: any;
|
|
42
|
+
};
|
|
43
|
+
qp?: number;
|
|
44
|
+
spl?: any;
|
|
45
|
+
bg?: string;
|
|
46
|
+
lo?: number;
|
|
47
|
+
rt?: number;
|
|
48
|
+
ps?: {
|
|
49
|
+
left: number | null;
|
|
50
|
+
top: number | null;
|
|
51
|
+
width: number | null;
|
|
52
|
+
height: number | null;
|
|
53
|
+
value: string;
|
|
54
|
+
isShow: boolean;
|
|
55
|
+
};
|
|
56
|
+
hl?: {
|
|
57
|
+
r: number;
|
|
58
|
+
c: number;
|
|
59
|
+
id: string;
|
|
60
|
+
};
|
|
61
|
+
} & CellStyle;
|
|
62
|
+
export type CellWithRowAndCol = {
|
|
63
|
+
r: number;
|
|
64
|
+
c: number;
|
|
65
|
+
v: Cell | null;
|
|
66
|
+
};
|
|
67
|
+
export type CellMatrix = (Cell | null)[][];
|
|
68
|
+
export type Selection = {
|
|
69
|
+
left?: number;
|
|
70
|
+
width?: number;
|
|
71
|
+
top?: number;
|
|
72
|
+
height?: number;
|
|
73
|
+
left_move?: number;
|
|
74
|
+
width_move?: number;
|
|
75
|
+
top_move?: number;
|
|
76
|
+
height_move?: number;
|
|
77
|
+
row: number[];
|
|
78
|
+
column: number[];
|
|
79
|
+
row_focus?: number;
|
|
80
|
+
column_focus?: number;
|
|
81
|
+
moveXY?: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
};
|
|
85
|
+
row_select?: boolean;
|
|
86
|
+
column_select?: boolean;
|
|
87
|
+
};
|
|
88
|
+
export type Presence = {
|
|
89
|
+
sheetId: string;
|
|
90
|
+
username: string;
|
|
91
|
+
userId?: string;
|
|
92
|
+
color: string;
|
|
93
|
+
selection: {
|
|
94
|
+
r: number;
|
|
95
|
+
c: number;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export type SheetConfig = {
|
|
99
|
+
merge?: Record<string, {
|
|
100
|
+
r: number;
|
|
101
|
+
c: number;
|
|
102
|
+
rs: number;
|
|
103
|
+
cs: number;
|
|
104
|
+
}>;
|
|
105
|
+
rowlen?: Record<string, number>;
|
|
106
|
+
columnlen?: Record<string, number>;
|
|
107
|
+
rowhidden?: Record<string, number>;
|
|
108
|
+
colhidden?: Record<string, number>;
|
|
109
|
+
customHeight?: Record<string, number>;
|
|
110
|
+
customWidth?: Record<string, number>;
|
|
111
|
+
borderInfo?: any[];
|
|
112
|
+
authority?: any;
|
|
113
|
+
rowReadOnly?: Record<number, number>;
|
|
114
|
+
colReadOnly?: Record<number, number>;
|
|
115
|
+
};
|
|
116
|
+
export type Image = {
|
|
117
|
+
id: string;
|
|
118
|
+
width: number;
|
|
119
|
+
height: number;
|
|
120
|
+
left: number;
|
|
121
|
+
top: number;
|
|
122
|
+
src: string;
|
|
123
|
+
};
|
|
124
|
+
export type ConditionRulesProps = {
|
|
125
|
+
rulesType: string;
|
|
126
|
+
rulesValue: string;
|
|
127
|
+
textColor: {
|
|
128
|
+
check: boolean;
|
|
129
|
+
color: string;
|
|
130
|
+
};
|
|
131
|
+
cellColor: {
|
|
132
|
+
check: boolean;
|
|
133
|
+
color: string;
|
|
134
|
+
};
|
|
135
|
+
betweenValue: {
|
|
136
|
+
value1: string;
|
|
137
|
+
value2: string;
|
|
138
|
+
};
|
|
139
|
+
dateValue: string;
|
|
140
|
+
repeatValue: string;
|
|
141
|
+
projectValue: string;
|
|
142
|
+
};
|
|
143
|
+
export type Sheet = {
|
|
144
|
+
name: string;
|
|
145
|
+
config?: SheetConfig;
|
|
146
|
+
order?: number;
|
|
147
|
+
color?: string;
|
|
148
|
+
data?: CellMatrix;
|
|
149
|
+
celldata?: CellWithRowAndCol[];
|
|
150
|
+
id?: string;
|
|
151
|
+
images?: Image[];
|
|
152
|
+
iframes?: {
|
|
153
|
+
id: string;
|
|
154
|
+
src: string;
|
|
155
|
+
left: number;
|
|
156
|
+
top: number;
|
|
157
|
+
width: number;
|
|
158
|
+
height: number;
|
|
159
|
+
}[];
|
|
160
|
+
zoomRatio?: number;
|
|
161
|
+
column?: number;
|
|
162
|
+
row?: number;
|
|
163
|
+
addRows?: number;
|
|
164
|
+
status?: number;
|
|
165
|
+
hide?: number;
|
|
166
|
+
luckysheet_select_save?: Selection[];
|
|
167
|
+
luckysheet_selection_range?: {
|
|
168
|
+
row: number[];
|
|
169
|
+
column: number[];
|
|
170
|
+
}[];
|
|
171
|
+
calcChain?: any[];
|
|
172
|
+
defaultRowHeight?: number;
|
|
173
|
+
defaultColWidth?: number;
|
|
174
|
+
showGridLines?: boolean | number;
|
|
175
|
+
pivotTable?: any;
|
|
176
|
+
isPivotTable?: boolean;
|
|
177
|
+
filter?: Record<string, any>;
|
|
178
|
+
filter_select?: {
|
|
179
|
+
row: number[];
|
|
180
|
+
column: number[];
|
|
181
|
+
};
|
|
182
|
+
luckysheet_conditionformat_save?: any[];
|
|
183
|
+
luckysheet_alternateformat_save?: any[];
|
|
184
|
+
dataVerification?: any;
|
|
185
|
+
conditionRules?: ConditionRulesProps;
|
|
186
|
+
hyperlink?: Record<string, {
|
|
187
|
+
linkType: string;
|
|
188
|
+
linkAddress: string;
|
|
189
|
+
}>;
|
|
190
|
+
dynamicArray_compute?: any;
|
|
191
|
+
dynamicArray?: any[];
|
|
192
|
+
frozen?: {
|
|
193
|
+
type: "row" | "column" | "both" | "rangeRow" | "rangeColumn" | "rangeBoth";
|
|
194
|
+
range?: {
|
|
195
|
+
row_focus: number;
|
|
196
|
+
column_focus: number;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
export type CommentBox = {
|
|
201
|
+
r: number;
|
|
202
|
+
c: number;
|
|
203
|
+
rc: string;
|
|
204
|
+
autoFocus: boolean;
|
|
205
|
+
value: string;
|
|
206
|
+
size: {
|
|
207
|
+
fromX: number;
|
|
208
|
+
fromY: number;
|
|
209
|
+
toX: number;
|
|
210
|
+
toY: number;
|
|
211
|
+
} & Rect;
|
|
212
|
+
} & Rect;
|
|
213
|
+
export type SearchResult = {
|
|
214
|
+
r: number;
|
|
215
|
+
c: number;
|
|
216
|
+
sheetName: string;
|
|
217
|
+
sheetId: string;
|
|
218
|
+
cellPosition: string;
|
|
219
|
+
value: string;
|
|
220
|
+
};
|
|
221
|
+
export type LinkCardProps = {
|
|
222
|
+
sheetId: string;
|
|
223
|
+
r: number;
|
|
224
|
+
c: number;
|
|
225
|
+
rc: string;
|
|
226
|
+
originText: string;
|
|
227
|
+
originType: string;
|
|
228
|
+
originAddress: string;
|
|
229
|
+
position: {
|
|
230
|
+
cellLeft: number;
|
|
231
|
+
cellBottom: number;
|
|
232
|
+
};
|
|
233
|
+
isEditing: boolean;
|
|
234
|
+
selectingCellRange?: boolean;
|
|
235
|
+
};
|
|
236
|
+
export type RangeDialogProps = {
|
|
237
|
+
show: boolean;
|
|
238
|
+
rangeTxt: string;
|
|
239
|
+
type: string;
|
|
240
|
+
singleSelect: boolean;
|
|
241
|
+
};
|
|
242
|
+
export type DataRegulationProps = {
|
|
243
|
+
type: string;
|
|
244
|
+
type2: string;
|
|
245
|
+
rangeTxt: string;
|
|
246
|
+
value1: string;
|
|
247
|
+
value2: string;
|
|
248
|
+
validity: string;
|
|
249
|
+
remote: boolean;
|
|
250
|
+
prohibitInput: boolean;
|
|
251
|
+
hintShow: boolean;
|
|
252
|
+
hintValue: string;
|
|
253
|
+
};
|
|
254
|
+
export type FilterOptions = {
|
|
255
|
+
startRow: number;
|
|
256
|
+
endRow: number;
|
|
257
|
+
startCol: number;
|
|
258
|
+
endCol: number;
|
|
259
|
+
left: number;
|
|
260
|
+
top: number;
|
|
261
|
+
width: number;
|
|
262
|
+
height: number;
|
|
263
|
+
items: {
|
|
264
|
+
col: number;
|
|
265
|
+
left: number;
|
|
266
|
+
top: number;
|
|
267
|
+
}[];
|
|
268
|
+
};
|
|
269
|
+
export type History = {
|
|
270
|
+
patches: ImmerPatch[];
|
|
271
|
+
inversePatches: ImmerPatch[];
|
|
272
|
+
options?: PatchOptions;
|
|
273
|
+
};
|
|
274
|
+
export type Freezen = {
|
|
275
|
+
horizontal?: {
|
|
276
|
+
freezenhorizontaldata: any[];
|
|
277
|
+
top: number;
|
|
278
|
+
};
|
|
279
|
+
vertical?: {
|
|
280
|
+
freezenverticaldata: any[];
|
|
281
|
+
left: number;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
export type GlobalCache = {
|
|
285
|
+
verticalScrollLock?: boolean;
|
|
286
|
+
horizontalScrollLock?: boolean;
|
|
287
|
+
overwriteCell?: boolean;
|
|
288
|
+
ignoreWriteCell?: boolean;
|
|
289
|
+
doNotFocus?: boolean;
|
|
290
|
+
doNotUpdateCell?: boolean;
|
|
291
|
+
recentTextColor?: string;
|
|
292
|
+
recentBackgroundColor?: string;
|
|
293
|
+
visibleColumnsUnique?: number[];
|
|
294
|
+
visibleRowsUnique?: number[];
|
|
295
|
+
undoList: History[];
|
|
296
|
+
redoList: History[];
|
|
297
|
+
editingCommentBoxEle?: HTMLDivElement;
|
|
298
|
+
freezen?: Record<string, Freezen>;
|
|
299
|
+
image?: {
|
|
300
|
+
imgInitialPosition: Rect | undefined;
|
|
301
|
+
cursorMoveStartPosition: {
|
|
302
|
+
x: number;
|
|
303
|
+
y: number;
|
|
304
|
+
} | undefined;
|
|
305
|
+
resizingSide: string | undefined;
|
|
306
|
+
};
|
|
307
|
+
iframe?: {
|
|
308
|
+
iframeInitialPosition: Rect | undefined;
|
|
309
|
+
cursorMoveStartPosition: {
|
|
310
|
+
x: number;
|
|
311
|
+
y: number;
|
|
312
|
+
} | undefined;
|
|
313
|
+
resizingSide: string | undefined;
|
|
314
|
+
};
|
|
315
|
+
commentBox?: {
|
|
316
|
+
movingId: string | undefined;
|
|
317
|
+
resizingId: string | undefined;
|
|
318
|
+
resizingSide: string | undefined;
|
|
319
|
+
commentRC: {
|
|
320
|
+
r: number;
|
|
321
|
+
c: number;
|
|
322
|
+
rc: string;
|
|
323
|
+
};
|
|
324
|
+
boxInitialPosition: Rect | undefined;
|
|
325
|
+
cursorMoveStartPosition: {
|
|
326
|
+
x: number;
|
|
327
|
+
y: number;
|
|
328
|
+
} | undefined;
|
|
329
|
+
};
|
|
330
|
+
searchDialog?: {
|
|
331
|
+
mouseEnter?: boolean;
|
|
332
|
+
moveProps?: {
|
|
333
|
+
initialPosition: Rect | undefined;
|
|
334
|
+
cursorMoveStartPosition: {
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
} | undefined;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
linkCard?: {
|
|
341
|
+
mouseEnter?: boolean;
|
|
342
|
+
rangeSelectionModal?: {
|
|
343
|
+
initialPosition: Rect | undefined;
|
|
344
|
+
cursorMoveStartPosition: {
|
|
345
|
+
x: number;
|
|
346
|
+
y: number;
|
|
347
|
+
} | undefined;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
dragCellStartPos?: {
|
|
351
|
+
x: number;
|
|
352
|
+
y: number;
|
|
353
|
+
};
|
|
354
|
+
touchMoveStatus?: boolean;
|
|
355
|
+
touchHandleStatus?: boolean;
|
|
356
|
+
touchMoveStartPos?: {
|
|
357
|
+
x: number;
|
|
358
|
+
y: number;
|
|
359
|
+
vy: number;
|
|
360
|
+
moveType: string;
|
|
361
|
+
vy_x?: number;
|
|
362
|
+
vy_y?: number;
|
|
363
|
+
scrollTop?: number;
|
|
364
|
+
scrollLeft?: number;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
export type SingleRange = {
|
|
368
|
+
row: number[];
|
|
369
|
+
column: number[];
|
|
370
|
+
};
|
|
371
|
+
export type Range = SingleRange[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
export declare const getFreezeState: (ctx: Context) => {
|
|
3
|
+
isRowFrozen: boolean;
|
|
4
|
+
isColFrozen: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type FreezeType = "row" | "column" | "both" | "unfreeze-row" | "unfreeze-column" | "unfreeze-all";
|
|
7
|
+
export declare const toggleFreeze: (ctx: Context, type: FreezeType) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
import { Sheet } from "../types";
|
|
3
|
+
export * from "./patch";
|
|
4
|
+
export * from "./freeze";
|
|
5
|
+
export declare function generateRandomSheetName(file: Sheet[], isPivotTable: boolean, ctx: Context): string;
|
|
6
|
+
export declare function rgbToHex(color: string): string;
|
|
7
|
+
export declare function indexToColumnChar(n: number): string;
|
|
8
|
+
export declare function columnCharToIndex(a: string): number;
|
|
9
|
+
export declare function escapeScriptTag(str: string): string;
|
|
10
|
+
export declare function escapeHTMLTag(str: string): string;
|
|
11
|
+
export declare function getSheetIndex(ctx: Context, id: string): number | null;
|
|
12
|
+
export declare function getSheetIdByName(ctx: Context, name: string): string | null | undefined;
|
|
13
|
+
export declare function getSheetByIndex(ctx: Context, id: string): Sheet | null;
|
|
14
|
+
export declare function getNowDateTime(format: number): string;
|
|
15
|
+
export declare function replaceHtml(temp: string, dataarry: any): string;
|
|
16
|
+
export declare function getRegExpStr(str: string): string;
|
|
17
|
+
export declare function chatatABC(n: number): string;
|
|
18
|
+
export declare function isAllowEdit(ctx: Context, range?: Sheet["luckysheet_select_save"]): boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Patch } from "immer";
|
|
2
|
+
import { Context } from "../context";
|
|
3
|
+
import { Op, Sheet } from "../types";
|
|
4
|
+
export type ChangedSheet = {
|
|
5
|
+
index?: number;
|
|
6
|
+
id?: string;
|
|
7
|
+
value?: Sheet;
|
|
8
|
+
order?: number;
|
|
9
|
+
};
|
|
10
|
+
export type PatchOptions = {
|
|
11
|
+
insertRowColOp?: {
|
|
12
|
+
type: "row" | "column";
|
|
13
|
+
index: number;
|
|
14
|
+
count: number;
|
|
15
|
+
direction: "lefttop" | "rightbottom";
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
deleteRowColOp?: {
|
|
19
|
+
type: "row" | "column";
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
24
|
+
restoreDeletedCells?: boolean;
|
|
25
|
+
addSheetOp?: boolean;
|
|
26
|
+
deleteSheetOp?: {
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
addSheet?: ChangedSheet;
|
|
30
|
+
deletedSheet?: ChangedSheet;
|
|
31
|
+
id?: string;
|
|
32
|
+
};
|
|
33
|
+
export declare function filterPatch(patches: Patch[]): Patch[];
|
|
34
|
+
export declare function extractFormulaCellOps(ops: Op[]): Op[];
|
|
35
|
+
export declare function patchToOp(ctx: Context, patches: Patch[], options?: PatchOptions, undo?: boolean): Op[];
|
|
36
|
+
export declare function opToPatch(ctx: Context, ops: Op[]): [Patch[], Op[]];
|
|
37
|
+
export declare function inverseRowColOptions(options?: PatchOptions): PatchOptions | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
type Props = {
|
|
4
|
-
triggerParentUpdate: (state: boolean) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const ChangeColor: React.FC<Props>;
|
|
7
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
type Props = {
|
|
4
|
+
triggerParentUpdate: (state: boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const ChangeColor: React.FC<Props>;
|
|
7
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
declare const ConditionRules: React.FC<{
|
|
4
|
-
type: string;
|
|
5
|
-
}>;
|
|
6
|
-
export default ConditionRules;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
declare const ConditionRules: React.FC<{
|
|
4
|
+
type: string;
|
|
5
|
+
}>;
|
|
6
|
+
export default ConditionRules;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
declare const ConditionalFormat: React.FC<{
|
|
4
|
-
items: string[];
|
|
5
|
-
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
-
}>;
|
|
7
|
-
export default ConditionalFormat;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
declare const ConditionalFormat: React.FC<{
|
|
4
|
+
items: string[];
|
|
5
|
+
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
}>;
|
|
7
|
+
export default ConditionalFormat;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const Divider: React.FC;
|
|
3
|
-
export default Divider;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const Divider: React.FC;
|
|
3
|
+
export default Divider;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const FilterMenu: React.FC;
|
|
3
|
-
export default FilterMenu;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const FilterMenu: React.FC;
|
|
3
|
+
export default FilterMenu;
|