@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
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
#fortune-split-column {
|
|
2
|
-
/* position: absolute;
|
|
3
|
-
padding: 30px 42px;
|
|
4
|
-
z-index: 1002; */
|
|
5
|
-
/* min-width: 500px; */
|
|
6
|
-
width: 464px;
|
|
7
|
-
|
|
8
|
-
input[type="checkbox"] {
|
|
9
|
-
accent-color: black;
|
|
10
|
-
appearance: none;
|
|
11
|
-
-webkit-appearance: none;
|
|
12
|
-
width: 16px;
|
|
13
|
-
height: 16px;
|
|
14
|
-
border: 1.5px solid black;
|
|
15
|
-
border-radius: 3px;
|
|
16
|
-
position: relative;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
input[type="checkbox"]:checked {
|
|
21
|
-
background-color: black;
|
|
22
|
-
border-color: black;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Smaller tick mark */
|
|
26
|
-
input[type="checkbox"]:checked::before {
|
|
27
|
-
content: '';
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: 2px;
|
|
30
|
-
left: 4px;
|
|
31
|
-
width: 4px; /* Reduced from default */
|
|
32
|
-
height: 7px; /* Reduced from default */
|
|
33
|
-
border: solid white;
|
|
34
|
-
border-width: 0 1px 1px 0;
|
|
35
|
-
transform: rotate(45deg);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
#fortune-split-column label {
|
|
39
|
-
user-select: none;
|
|
40
|
-
}
|
|
41
|
-
#fortune-split-column .title {
|
|
42
|
-
font-size: 16px;
|
|
43
|
-
}
|
|
44
|
-
#fortune-split-column .splitDelimiters {
|
|
45
|
-
margin-top: 20px;
|
|
46
|
-
}
|
|
47
|
-
.splitSymbols {
|
|
48
|
-
width: 464px
|
|
49
|
-
}
|
|
50
|
-
#fortune-split-column .splitSymbols {
|
|
51
|
-
position: relative;
|
|
52
|
-
/* border: 1px solid #dfdfdf; */
|
|
53
|
-
padding: 5px 5px 5px 0;
|
|
54
|
-
margin: 5px 0px;
|
|
55
|
-
}
|
|
56
|
-
#fortune-split-column .splitSymbol {
|
|
57
|
-
font-size: 14px;
|
|
58
|
-
}
|
|
59
|
-
#fortune-split-column .splitSimple {
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 114px;
|
|
62
|
-
left: 0px;
|
|
63
|
-
}
|
|
64
|
-
#fortune-split-column #otherValue {
|
|
65
|
-
margin-left: 5px;
|
|
66
|
-
width: 50px;
|
|
67
|
-
padding: 0 5px;
|
|
68
|
-
}
|
|
69
|
-
#fortune-split-column .splitDataPreview {
|
|
70
|
-
font-size: 14px;
|
|
71
|
-
/* margin-top: 26px; */
|
|
72
|
-
margin-bottom: 12px;
|
|
73
|
-
}
|
|
74
|
-
#fortune-split-column .splitColumnData {
|
|
75
|
-
border: 1px solid #dfdfdf;
|
|
76
|
-
border-radius: 4px;
|
|
77
|
-
background-color: #F8F9FA;
|
|
78
|
-
padding: 5px;
|
|
79
|
-
margin: 5px 0px;
|
|
80
|
-
height: 100px;
|
|
81
|
-
overflow-y: scroll;
|
|
82
|
-
}
|
|
83
|
-
#fortune-split-column .button-basic {
|
|
84
|
-
display: inline-block;
|
|
85
|
-
margin-bottom: 0;
|
|
86
|
-
font-weight: 400;
|
|
87
|
-
text-align: center;
|
|
88
|
-
vertical-align: middle;
|
|
89
|
-
touch-action: manipulation;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
white-space: nowrap;
|
|
92
|
-
padding: 4px 8px;
|
|
93
|
-
font-size: 14px;
|
|
94
|
-
line-height: 1.42857143;
|
|
95
|
-
border-radius: 2px;
|
|
96
|
-
user-select: none;
|
|
97
|
-
}
|
|
98
|
-
#fortune-split-column .button-primary {
|
|
99
|
-
background: #0188fb;
|
|
100
|
-
border: 1px solid #0188fb;
|
|
101
|
-
color: #fff;
|
|
102
|
-
margin-right: 10px;
|
|
103
|
-
}
|
|
104
|
-
#fortune-split-column .button-close {
|
|
105
|
-
color: #333;
|
|
106
|
-
background-color: #fff;
|
|
107
|
-
border: 1px solid #ccc;
|
|
108
|
-
}
|
|
109
|
-
#fortune-split-column table {
|
|
110
|
-
border-collapse: collapse;
|
|
111
|
-
}
|
|
112
|
-
#fortune-split-column tr {
|
|
113
|
-
display: table-row;
|
|
114
|
-
vertical-align: inherit;
|
|
115
|
-
border-color: inherit;
|
|
116
|
-
}
|
|
117
|
-
#fortune-split-column td {
|
|
118
|
-
border: 1px solid #333;
|
|
119
|
-
display: table-cell;
|
|
120
|
-
vertical-align: inherit;
|
|
121
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { getDataArr, getFlowdata, getRegStr, locale, updateMoreCell } from "@fileverse-dev/fortune-core";
|
|
2
|
-
import { Button, TextField } from "@fileverse/ui";
|
|
3
|
-
import _ from "lodash";
|
|
4
|
-
import React, { useContext, useEffect, useState, useCallback, useRef } from "react";
|
|
5
|
-
import WorkbookContext from "../../context";
|
|
6
|
-
import { useDialog } from "../../hooks/useDialog";
|
|
7
|
-
import "./index.css";
|
|
8
|
-
export var SplitColumn = function SplitColumn() {
|
|
9
|
-
var _a = useContext(WorkbookContext),
|
|
10
|
-
context = _a.context,
|
|
11
|
-
setContext = _a.setContext;
|
|
12
|
-
var _b = locale(context),
|
|
13
|
-
splitText = _b.splitText,
|
|
14
|
-
button = _b.button;
|
|
15
|
-
var _c = useState(""),
|
|
16
|
-
splitOperate = _c[0],
|
|
17
|
-
setSplitOperate = _c[1];
|
|
18
|
-
var _d = useState(false),
|
|
19
|
-
otherFlag = _d[0],
|
|
20
|
-
setOtherFlag = _d[1];
|
|
21
|
-
var _e = useState([]),
|
|
22
|
-
tableData = _e[0],
|
|
23
|
-
setTableData = _e[1];
|
|
24
|
-
var splitSymbols = useRef(null);
|
|
25
|
-
var _f = useDialog(),
|
|
26
|
-
showDialog = _f.showDialog,
|
|
27
|
-
hideDialog = _f.hideDialog;
|
|
28
|
-
var certainBtn = useCallback(function () {
|
|
29
|
-
hideDialog();
|
|
30
|
-
var dataArr = getDataArr(splitOperate, context);
|
|
31
|
-
var r = context.luckysheet_select_save[0].row[0];
|
|
32
|
-
var c = context.luckysheet_select_save[0].column[0];
|
|
33
|
-
if (dataArr[0].length === 1) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
var dataCover = false;
|
|
37
|
-
var data = getFlowdata(context);
|
|
38
|
-
for (var i = 0; i < dataArr.length; i += 1) {
|
|
39
|
-
for (var j = 1; j < dataArr[0].length; j += 1) {
|
|
40
|
-
var cell = data[r + i][c + j];
|
|
41
|
-
if (!_.isNull(cell) && !_.isNull(cell.v)) {
|
|
42
|
-
dataCover = true;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (dataCover) {
|
|
48
|
-
showDialog(splitText.splitConfirmToExe, "yesno", undefined, undefined, undefined, function () {
|
|
49
|
-
hideDialog();
|
|
50
|
-
setContext(function (ctx) {
|
|
51
|
-
updateMoreCell(r, c, dataArr, ctx);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
setContext(function (ctx) {
|
|
56
|
-
updateMoreCell(r, c, dataArr, ctx);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}, [context, hideDialog, setContext, showDialog, splitOperate, splitText.splitConfirmToExe]);
|
|
60
|
-
useEffect(function () {
|
|
61
|
-
setTableData(function (table) {
|
|
62
|
-
table = getDataArr(splitOperate, context);
|
|
63
|
-
return table;
|
|
64
|
-
});
|
|
65
|
-
}, [context, splitOperate]);
|
|
66
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
id: "fortune-split-column"
|
|
68
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "splitDataPreview text-heading-xsm"
|
|
70
|
-
}, splitText.splitDataPreview), /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "splitColumnData"
|
|
72
|
-
}, /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, tableData.map(function (o, index) {
|
|
73
|
-
if (o.length >= 1) {
|
|
74
|
-
return /*#__PURE__*/React.createElement("tr", {
|
|
75
|
-
key: index
|
|
76
|
-
}, o.map(function (o1) {
|
|
77
|
-
return /*#__PURE__*/React.createElement("td", {
|
|
78
|
-
key: o + o1
|
|
79
|
-
}, o1);
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
return /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null));
|
|
83
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
84
|
-
className: "splitDelimiters text-heading-xsm !mt-4"
|
|
85
|
-
}, "Separator"), /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: "splitSymbols flex gap-3 flex-wrap",
|
|
87
|
-
ref: splitSymbols
|
|
88
|
-
}, splitText.splitSymbols.map(function (o) {
|
|
89
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
key: o.value,
|
|
91
|
-
className: "splitSymbol flex gap-2 items-center"
|
|
92
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
93
|
-
id: o.value,
|
|
94
|
-
name: o.value,
|
|
95
|
-
type: "checkbox",
|
|
96
|
-
onClick: function onClick() {
|
|
97
|
-
setSplitOperate(function (regStr) {
|
|
98
|
-
var _a;
|
|
99
|
-
return getRegStr(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
tabIndex: 0
|
|
103
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
104
|
-
htmlFor: o.value,
|
|
105
|
-
className: "text-body-sm"
|
|
106
|
-
}, o.name));
|
|
107
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className: "splitSymbol flex gap-2 items-center pb-4 mb-4 border-b"
|
|
109
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
110
|
-
id: "other",
|
|
111
|
-
name: "other",
|
|
112
|
-
type: "checkbox",
|
|
113
|
-
onClick: function onClick() {
|
|
114
|
-
setOtherFlag(!otherFlag);
|
|
115
|
-
setSplitOperate(function (regStr) {
|
|
116
|
-
var _a;
|
|
117
|
-
return getRegStr(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
118
|
-
});
|
|
119
|
-
},
|
|
120
|
-
tabIndex: 0
|
|
121
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
122
|
-
htmlFor: "other"
|
|
123
|
-
}, "Custom"), /*#__PURE__*/React.createElement(TextField, {
|
|
124
|
-
placeholder: "Custom separator",
|
|
125
|
-
id: "otherValue",
|
|
126
|
-
name: "otherValue",
|
|
127
|
-
type: "text",
|
|
128
|
-
onBlur: function onBlur() {
|
|
129
|
-
if (otherFlag) {
|
|
130
|
-
setSplitOperate(function (regStr) {
|
|
131
|
-
var _a;
|
|
132
|
-
return getRegStr(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
137
|
-
className: "splitSymbol flex gap-2 mb-4 items-center"
|
|
138
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
139
|
-
id: "splitsimple",
|
|
140
|
-
name: "splitsimple",
|
|
141
|
-
type: "checkbox",
|
|
142
|
-
onClick: function onClick() {
|
|
143
|
-
setSplitOperate(function (regStr) {
|
|
144
|
-
var _a;
|
|
145
|
-
return getRegStr(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
tabIndex: 0
|
|
149
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
150
|
-
htmlFor: "splitsimple"
|
|
151
|
-
}, splitText.splitContinueSymbol)), /*#__PURE__*/React.createElement("div", {
|
|
152
|
-
className: "flex justify-end gap-2"
|
|
153
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
154
|
-
className: "",
|
|
155
|
-
variant: "secondary",
|
|
156
|
-
onClick: function onClick() {
|
|
157
|
-
hideDialog();
|
|
158
|
-
},
|
|
159
|
-
tabIndex: 0
|
|
160
|
-
}, button.cancel), /*#__PURE__*/React.createElement(Button, {
|
|
161
|
-
className: "",
|
|
162
|
-
onClick: function onClick() {
|
|
163
|
-
certainBtn();
|
|
164
|
-
},
|
|
165
|
-
tabIndex: 0
|
|
166
|
-
}, "Split")));
|
|
167
|
-
};
|
|
@@ -1,12 +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
|
-
style?: React.CSSProperties;
|
|
10
|
-
};
|
|
11
|
-
declare const Button: React.FC<Props>;
|
|
12
|
-
export default Button;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LucideIcon, Tooltip } from "@fileverse/ui";
|
|
3
|
-
import { getLucideIcon } from ".";
|
|
4
|
-
var Button = function Button(_a) {
|
|
5
|
-
var tooltip = _a.tooltip,
|
|
6
|
-
onClick = _a.onClick,
|
|
7
|
-
iconId = _a.iconId,
|
|
8
|
-
disabled = _a.disabled,
|
|
9
|
-
selected = _a.selected,
|
|
10
|
-
children = _a.children,
|
|
11
|
-
style = _a.style;
|
|
12
|
-
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
13
|
-
text: tooltip,
|
|
14
|
-
placement: "bottom"
|
|
15
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
className: "fortune-toolbar-button fortune-toolbar-item",
|
|
17
|
-
onClick: onClick,
|
|
18
|
-
tabIndex: 0,
|
|
19
|
-
role: "button",
|
|
20
|
-
style: selected ? {
|
|
21
|
-
backgroundColor: "#FFDF0A"
|
|
22
|
-
} : style
|
|
23
|
-
}, /*#__PURE__*/React.createElement(LucideIcon, {
|
|
24
|
-
name: getLucideIcon(iconId),
|
|
25
|
-
width: 16,
|
|
26
|
-
height: 16,
|
|
27
|
-
style: disabled ? {
|
|
28
|
-
opacity: 0.3
|
|
29
|
-
} : {}
|
|
30
|
-
}), children));
|
|
31
|
-
};
|
|
32
|
-
export default Button;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
var palette = [["#000000", "#444444", "#666666", "#999999", "#B7B7B7", "#cccccc", "#D9D9D9", "#EFEFEF", "#f3f3f3", "#ffffff"], ["#970007", "#FE0012", "#FE9728", "#FFFD40", "#27FD3C", "#21FFFF", "#4A89E4", "#0027F9", "#9726FA", "#FD23FA"], ["#E6B8B0", "#f4cccc", "#FCE5CF", "#FFF1CF", "#DAEAD4", "#D0E0E3", "#C9DBF7", "#CFE3F2", "#D9D3E8", "#EAD1DC"], ["#DC7D6D", "#E9999A", "#F9CAA0", "#FFE49F", "#B7D6AB", "#A3C4C9", "#A4C3F2", "#A0C6E6", "#B4A8D4", "#D5A7BC"], ["#CB402B", "#DF6668", "#F6B171", "#FFD871", "#95C382", "#77A6AF", "#6DA0E8", "#70AADA", "#8E7EC0", "#C17C9F"], ["#A51A0A", "#CB000C", "#E59043", "#F1C046", "#6CA756", "#46828D", "#3C7BD4", "#3E87C3", "#6651A4", "#A54E78"], ["#841F11", "#980007", "#B35E19", "#BF8F22", "#3A7527", "#15505B", "#0E5AC8", "#0B5592", "#0B5592", "#731C46"], ["#5B0E03", "#660003", "#783E0E", "#7F5F13", "#284E19", "#0D343D", "#1C4785", "#073961", "#1F154B", "#4C112F"]];
|
|
3
|
-
var ColorPicker = function ColorPicker(_a) {
|
|
4
|
-
var onPick = _a.onPick;
|
|
5
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className: "fortune-toolbar-color-picker"
|
|
7
|
-
}, palette.map(function (rows, i) {
|
|
8
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
-
key: i,
|
|
10
|
-
className: "fortune-toolbar-color-picker-row"
|
|
11
|
-
}, rows.map(function (c) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
key: c,
|
|
14
|
-
className: "fortune-toolbar-color-picker-item",
|
|
15
|
-
onClick: function onClick() {
|
|
16
|
-
return onPick(c);
|
|
17
|
-
},
|
|
18
|
-
tabIndex: 0,
|
|
19
|
-
style: {
|
|
20
|
-
backgroundColor: c,
|
|
21
|
-
border: c === "#ffffff" ? "1px solid #E8EBEC" : "none"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}));
|
|
25
|
-
}));
|
|
26
|
-
};
|
|
27
|
-
export default ColorPicker;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import React, { useMemo, useRef, useState } from "react";
|
|
2
|
-
import { IconButton, Tooltip, Popover, PopoverContent, PopoverTrigger, cn, Button } from "@fileverse/ui";
|
|
3
|
-
import SVGIcon from "../SVGIcon";
|
|
4
|
-
import { getLucideIcon } from ".";
|
|
5
|
-
var Combo = function Combo(_a) {
|
|
6
|
-
var tooltip = _a.tooltip,
|
|
7
|
-
_onClick = _a.onClick,
|
|
8
|
-
text = _a.text,
|
|
9
|
-
iconId = _a.iconId,
|
|
10
|
-
_b = _a.showArrow,
|
|
11
|
-
showArrow = _b === void 0 ? true : _b,
|
|
12
|
-
children = _a.children,
|
|
13
|
-
fillColor = _a.fillColor;
|
|
14
|
-
var style = {
|
|
15
|
-
userSelect: "none"
|
|
16
|
-
};
|
|
17
|
-
var _c = useState(false),
|
|
18
|
-
open = _c[0],
|
|
19
|
-
setOpen = _c[1];
|
|
20
|
-
var buttonRef = useRef(null);
|
|
21
|
-
var isLucideIcon = useMemo(function () {
|
|
22
|
-
return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template", "font-color", "background"].includes(iconId);
|
|
23
|
-
}, [iconId]);
|
|
24
|
-
var trigger = !isLucideIcon ? (/*#__PURE__*/React.createElement(Tooltip, {
|
|
25
|
-
text: tooltip,
|
|
26
|
-
placement: "bottom"
|
|
27
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: "fortune-toolbar-combo-button",
|
|
29
|
-
onClick: function onClick(e) {
|
|
30
|
-
if (_onClick) {
|
|
31
|
-
_onClick(e);
|
|
32
|
-
if (!showArrow) setOpen(!open);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
tabIndex: 0,
|
|
36
|
-
role: "button",
|
|
37
|
-
style: style
|
|
38
|
-
}, iconId ? (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
39
|
-
name: iconId,
|
|
40
|
-
width: 16,
|
|
41
|
-
height: 16
|
|
42
|
-
})) : (/*#__PURE__*/React.createElement("span", {
|
|
43
|
-
className: "fortune-toolbar-combo-text"
|
|
44
|
-
}, text !== undefined ? text : ""))))) : (/*#__PURE__*/React.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/React.createElement(Tooltip, {
|
|
45
|
-
text: tooltip,
|
|
46
|
-
placement: "bottom"
|
|
47
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
48
|
-
variant: "ghost",
|
|
49
|
-
onClick: function onClick() {
|
|
50
|
-
return setOpen(!open);
|
|
51
|
-
},
|
|
52
|
-
className: cn("fortune-toolbar-combo-button !min-w-fit !px-0", {}),
|
|
53
|
-
style: {
|
|
54
|
-
width: 30,
|
|
55
|
-
height: 30
|
|
56
|
-
}
|
|
57
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
58
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
-
width: "16",
|
|
60
|
-
height: "16",
|
|
61
|
-
viewBox: "0 0 24 24",
|
|
62
|
-
fill: fillColor
|
|
63
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
64
|
-
fillRule: "evenodd",
|
|
65
|
-
clipRule: "evenodd",
|
|
66
|
-
d: "M11.9997 3C12.3784 3 12.7248 3.21402 12.8942 3.55273L20.8942 19.5527L20.9352 19.6465C21.115 20.1204 20.9101 20.663 20.447 20.8945C19.9839 21.1259 19.4272 20.9642 19.1559 20.5361L19.1052 20.4473L16.8815 16H7.11786L4.89422 20.4473C4.64719 20.9412 4.04636 21.1415 3.55243 20.8945C3.05867 20.6475 2.85831 20.0466 3.10516 19.5527L11.1052 3.55273L11.1764 3.43164C11.3613 3.16376 11.6684 3.0001 11.9997 3ZM8.11786 14H15.8815L11.9997 6.23633L8.11786 14Z",
|
|
67
|
-
fill: fillColor
|
|
68
|
-
}))))) : (/*#__PURE__*/React.createElement(Tooltip, {
|
|
69
|
-
text: tooltip,
|
|
70
|
-
placement: "bottom"
|
|
71
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
72
|
-
icon: getLucideIcon(iconId),
|
|
73
|
-
variant: "ghost",
|
|
74
|
-
onClick: function onClick() {
|
|
75
|
-
return setOpen(!open);
|
|
76
|
-
},
|
|
77
|
-
className: cn("fortune-toolbar-combo-button", {
|
|
78
|
-
"custom-color-button": iconId === "font-color" && fillColor
|
|
79
|
-
}),
|
|
80
|
-
style: {
|
|
81
|
-
color: iconId === "font-color" ? fillColor : undefined
|
|
82
|
-
}
|
|
83
|
-
})))));
|
|
84
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
ref: buttonRef,
|
|
86
|
-
className: "fortune-toolbar-item"
|
|
87
|
-
}, /*#__PURE__*/React.createElement(Popover, {
|
|
88
|
-
open: open,
|
|
89
|
-
onOpenChange: setOpen
|
|
90
|
-
}, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
91
|
-
asChild: true
|
|
92
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className: "flex items-center"
|
|
94
|
-
}, trigger)), /*#__PURE__*/React.createElement(PopoverContent, {
|
|
95
|
-
align: "start",
|
|
96
|
-
side: "bottom",
|
|
97
|
-
sideOffset: 4,
|
|
98
|
-
alignOffset: -16,
|
|
99
|
-
className: "fortune-toolbar-combo-popup border-none"
|
|
100
|
-
}, children === null || children === void 0 ? void 0 : children(setOpen))));
|
|
101
|
-
};
|
|
102
|
-
export default Combo;
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useContext, useRef, useState } from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
import { locale } from "@fileverse-dev/fortune-core";
|
|
4
|
-
import _ from "lodash";
|
|
5
|
-
import WorkbookContext from "../../context";
|
|
6
|
-
import SVGIcon from "../SVGIcon";
|
|
7
|
-
import { CustomColor } from "./CustomColor";
|
|
8
|
-
var size = [{
|
|
9
|
-
Text: "1",
|
|
10
|
-
value: "Thin",
|
|
11
|
-
strokeDasharray: "1,0",
|
|
12
|
-
strokeWidth: "1"
|
|
13
|
-
}, {
|
|
14
|
-
Text: "2",
|
|
15
|
-
value: "Hair",
|
|
16
|
-
strokeDasharray: "1,5",
|
|
17
|
-
strokeWidth: "1"
|
|
18
|
-
}, {
|
|
19
|
-
Text: "3",
|
|
20
|
-
value: "Dotted",
|
|
21
|
-
strokeDasharray: "2,5",
|
|
22
|
-
strokeWidth: "2"
|
|
23
|
-
}, {
|
|
24
|
-
Text: "4",
|
|
25
|
-
value: "Dashed",
|
|
26
|
-
strokeDasharray: "5,5",
|
|
27
|
-
strokeWidth: "2"
|
|
28
|
-
}, {
|
|
29
|
-
Text: "5",
|
|
30
|
-
value: "DashDot",
|
|
31
|
-
strokeDasharray: "20,5,5,10,5,5",
|
|
32
|
-
strokeWidth: "2"
|
|
33
|
-
}, {
|
|
34
|
-
Text: "6",
|
|
35
|
-
value: "DashDotDot",
|
|
36
|
-
strokeDasharray: "20,5,5,5,5,10,5,5,5,5",
|
|
37
|
-
strokeWidth: "2"
|
|
38
|
-
}, {
|
|
39
|
-
Text: "8",
|
|
40
|
-
value: "Medium",
|
|
41
|
-
strokeDasharray: "2,0",
|
|
42
|
-
strokeWidth: "2"
|
|
43
|
-
}, {
|
|
44
|
-
Text: "9",
|
|
45
|
-
value: "MediumDashed",
|
|
46
|
-
strokeDasharray: "3,5",
|
|
47
|
-
strokeWidth: "3"
|
|
48
|
-
}, {
|
|
49
|
-
Text: "10",
|
|
50
|
-
value: "MediumDashDot",
|
|
51
|
-
strokeDasharray: "20,5,5,10,5,5",
|
|
52
|
-
strokeWidth: "3"
|
|
53
|
-
}, {
|
|
54
|
-
Text: "11",
|
|
55
|
-
value: "MediumDashDotDot",
|
|
56
|
-
strokeDasharray: "5,5,5,5,20,5,5,5,5,10",
|
|
57
|
-
strokeWidth: "3"
|
|
58
|
-
}, {
|
|
59
|
-
Text: "13",
|
|
60
|
-
value: "Thick",
|
|
61
|
-
strokeDasharray: "2,0",
|
|
62
|
-
strokeWidth: "3"
|
|
63
|
-
}];
|
|
64
|
-
var CustomBorder = function CustomBorder(_a) {
|
|
65
|
-
var onPick = _a.onPick;
|
|
66
|
-
var _b = useContext(WorkbookContext),
|
|
67
|
-
context = _b.context,
|
|
68
|
-
refs = _b.refs;
|
|
69
|
-
var border = locale(context).border;
|
|
70
|
-
var _c = useState("#000000"),
|
|
71
|
-
changeColor = _c[0],
|
|
72
|
-
setchangeColor = _c[1];
|
|
73
|
-
var _d = useState("1"),
|
|
74
|
-
changeStyle = _d[0],
|
|
75
|
-
setchangeStyle = _d[1];
|
|
76
|
-
var colorRef = useRef(null);
|
|
77
|
-
var styleRef = useRef(null);
|
|
78
|
-
var colorPreviewRef = useRef(null);
|
|
79
|
-
var _e = useState(""),
|
|
80
|
-
previewWith = _e[0],
|
|
81
|
-
setPreviewWith = _e[1];
|
|
82
|
-
var _f = useState(""),
|
|
83
|
-
previewdasharry = _f[0],
|
|
84
|
-
setPreviewdasharray = _f[1];
|
|
85
|
-
var showBorderSubMenu = useCallback(function (e) {
|
|
86
|
-
var target = e.target;
|
|
87
|
-
var menuItemRect = target.getBoundingClientRect();
|
|
88
|
-
var subMenuItem = target.querySelector(".fortune-border-select-menu");
|
|
89
|
-
if (_.isNil(subMenuItem)) return;
|
|
90
|
-
subMenuItem.style.display = "block";
|
|
91
|
-
var workbookContainerRect = refs.workbookContainer.current.getBoundingClientRect();
|
|
92
|
-
if (workbookContainerRect.width - menuItemRect.right > parseFloat(subMenuItem.style.width.replace("px", ""))) {
|
|
93
|
-
subMenuItem.style.left = "".concat(menuItemRect === null || menuItemRect === void 0 ? void 0 : menuItemRect.width, "px");
|
|
94
|
-
} else {
|
|
95
|
-
subMenuItem.style.left = "-".concat(subMenuItem.style.width);
|
|
96
|
-
}
|
|
97
|
-
}, [refs.workbookContainer]);
|
|
98
|
-
var hideBorderSubMenu = useCallback(function () {
|
|
99
|
-
styleRef.current.style.display = "none";
|
|
100
|
-
colorRef.current.style.display = "none";
|
|
101
|
-
}, []);
|
|
102
|
-
var changePreviewStyle = useCallback(function (width, dasharray) {
|
|
103
|
-
setPreviewWith(width);
|
|
104
|
-
setPreviewdasharray(dasharray);
|
|
105
|
-
}, []);
|
|
106
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: "fortune-border-select-option",
|
|
108
|
-
key: "borderColor",
|
|
109
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
110
|
-
showBorderSubMenu(e);
|
|
111
|
-
},
|
|
112
|
-
onMouseLeave: function onMouseLeave() {
|
|
113
|
-
hideBorderSubMenu();
|
|
114
|
-
}
|
|
115
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
116
|
-
className: "fortune-toolbar-menu-line"
|
|
117
|
-
}, border.borderColor, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
118
|
-
name: "rightArrow",
|
|
119
|
-
style: {
|
|
120
|
-
width: "14px"
|
|
121
|
-
}
|
|
122
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
123
|
-
ref: colorPreviewRef,
|
|
124
|
-
className: "fortune-border-color-preview",
|
|
125
|
-
style: {
|
|
126
|
-
backgroundColor: changeColor
|
|
127
|
-
}
|
|
128
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
129
|
-
ref: colorRef,
|
|
130
|
-
className: "fortune-border-select-menu",
|
|
131
|
-
style: {
|
|
132
|
-
display: "none",
|
|
133
|
-
width: "166px"
|
|
134
|
-
}
|
|
135
|
-
}, /*#__PURE__*/React.createElement(CustomColor, {
|
|
136
|
-
onCustomPick: function onCustomPick(color) {
|
|
137
|
-
onPick(color, changeStyle);
|
|
138
|
-
colorPreviewRef.current.style.backgroundColor = changeColor;
|
|
139
|
-
setchangeColor(color);
|
|
140
|
-
},
|
|
141
|
-
onColorPick: function onColorPick(color) {
|
|
142
|
-
onPick(color, changeStyle);
|
|
143
|
-
setchangeColor(color);
|
|
144
|
-
}
|
|
145
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
146
|
-
className: "fortune-border-select-option",
|
|
147
|
-
key: "borderStyle",
|
|
148
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
149
|
-
showBorderSubMenu(e);
|
|
150
|
-
},
|
|
151
|
-
onMouseLeave: function onMouseLeave() {
|
|
152
|
-
hideBorderSubMenu();
|
|
153
|
-
}
|
|
154
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
155
|
-
className: "fortune-toolbar-menu-line"
|
|
156
|
-
}, border.borderStyle, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
157
|
-
name: "rightArrow",
|
|
158
|
-
style: {
|
|
159
|
-
width: "14px"
|
|
160
|
-
}
|
|
161
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
162
|
-
className: "fortune-border-style-preview"
|
|
163
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
164
|
-
width: "90"
|
|
165
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
166
|
-
fill: "none",
|
|
167
|
-
stroke: "black",
|
|
168
|
-
strokeWidth: previewWith
|
|
169
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
170
|
-
strokeDasharray: previewdasharry,
|
|
171
|
-
d: "M0 0 l90 0"
|
|
172
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
173
|
-
ref: styleRef,
|
|
174
|
-
className: "fortune-border-select-menu fortune-toolbar-select",
|
|
175
|
-
style: {
|
|
176
|
-
display: "none",
|
|
177
|
-
width: "110px"
|
|
178
|
-
}
|
|
179
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
180
|
-
className: "fortune-border-style-picker-menu fortune-border-style-reset",
|
|
181
|
-
onClick: function onClick() {
|
|
182
|
-
onPick(changeColor, "1");
|
|
183
|
-
changePreviewStyle("1", "1,0");
|
|
184
|
-
},
|
|
185
|
-
tabIndex: 0
|
|
186
|
-
}, border.borderDefault), /*#__PURE__*/React.createElement("div", {
|
|
187
|
-
className: "fortune-boder-style-picker"
|
|
188
|
-
}, size.map(function (items, i) {
|
|
189
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
190
|
-
key: i,
|
|
191
|
-
className: "fortune-border-style-picker-menu",
|
|
192
|
-
onClick: function onClick() {
|
|
193
|
-
onPick(changeColor, items.Text);
|
|
194
|
-
setchangeStyle(items.Text);
|
|
195
|
-
changePreviewStyle(items.strokeWidth, items.strokeDasharray);
|
|
196
|
-
},
|
|
197
|
-
tabIndex: 0
|
|
198
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
199
|
-
height: "10",
|
|
200
|
-
width: "90"
|
|
201
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
202
|
-
fill: "none",
|
|
203
|
-
stroke: "black",
|
|
204
|
-
strokeWidth: items.strokeWidth
|
|
205
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
206
|
-
strokeDasharray: items.strokeDasharray,
|
|
207
|
-
d: "M0 5 l85 0"
|
|
208
|
-
}))));
|
|
209
|
-
})))));
|
|
210
|
-
};
|
|
211
|
-
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;
|