@fileverse-dev/fortune-react 1.1.0 → 1.1.1
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/es/assets/paint-roller.png +0 -0
- package/es/components/ChangeColor/index.css +76 -0
- package/{dist/packages/react/src → es}/components/ChangeColor/index.d.ts +7 -7
- package/es/components/ChangeColor/index.js +41 -0
- package/{dist/packages/react/src → es}/components/ConditionFormat/ConditionRules.d.ts +6 -6
- package/es/components/ConditionFormat/ConditionRules.js +323 -0
- package/es/components/ConditionFormat/index.css +210 -0
- package/{dist/packages/react/src → es}/components/ConditionFormat/index.d.ts +7 -7
- package/es/components/ConditionFormat/index.js +252 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/Divider.d.ts +3 -3
- package/es/components/ContextMenu/Divider.js +7 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/FilterMenu.d.ts +3 -3
- package/es/components/ContextMenu/FilterMenu.js +612 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/Menu.d.ts +8 -8
- package/es/components/ContextMenu/Menu.js +25 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/SheetTab.d.ts +4 -4
- package/es/components/ContextMenu/SheetTab.js +223 -0
- package/es/components/ContextMenu/index.css +322 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/index.d.ts +5 -5
- package/es/components/ContextMenu/index.js +1054 -0
- package/es/components/CryptoDenominationSelector/index.css +67 -0
- package/es/components/CryptoDenominationSelector/index.d.ts +8 -0
- package/es/components/CryptoDenominationSelector/index.js +271 -0
- package/es/components/CustomSort/index.css +23 -0
- package/{dist/packages/react/src → es}/components/CustomSort/index.d.ts +4 -4
- package/es/components/CustomSort/index.js +113 -0
- package/{dist/packages/react/src → es}/components/DataVerification/DropdownList.d.ts +4 -4
- package/es/components/DataVerification/DropdownList.js +126 -0
- package/{dist/packages/react/src → es}/components/DataVerification/RangeDialog.d.ts +4 -4
- package/es/components/DataVerification/RangeDialog.js +105 -0
- package/{dist/packages/react/src → es}/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -2
- package/es/components/DataVerification/getDisplayedRangeTxt.js +9 -0
- package/es/components/DataVerification/index.css +202 -0
- package/{dist/packages/react/src → es}/components/DataVerification/index.d.ts +4 -4
- package/es/components/DataVerification/index.js +398 -0
- package/es/components/Dialog/index.css +64 -0
- package/{dist/packages/react/src → es}/components/Dialog/index.d.ts +15 -15
- package/es/components/Dialog/index.js +72 -0
- package/{dist/packages/react/src → es}/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +11 -11
- package/es/components/DuneChartsInputModal/DuneChartsInputModal.js +95 -0
- package/es/components/DuneChartsInputModal/duneChartsInputModal.css +98 -0
- package/{dist/packages/react/src → es}/components/DunePreview/DunePreview.d.ts +13 -13
- package/es/components/DunePreview/DunePreview.js +46 -0
- package/es/components/DunePreview/index.css +57 -0
- package/{dist/packages/react/src → es}/components/FilterOption/index.d.ts +5 -5
- package/es/components/FilterOption/index.js +121 -0
- package/es/components/FormatSearch/index.css +19 -0
- package/{dist/packages/react/src → es}/components/FormatSearch/index.d.ts +6 -6
- package/es/components/FormatSearch/index.js +133 -0
- package/es/components/FormulaSearch/index.css +65 -0
- package/{dist/packages/react/src → es}/components/FormulaSearch/index.d.ts +5 -5
- package/es/components/FormulaSearch/index.js +198 -0
- package/{dist/packages/react/src → es}/components/FxEditor/NameBox.d.ts +3 -3
- package/es/components/FxEditor/NameBox.js +29 -0
- package/es/components/FxEditor/index.css +72 -0
- package/{dist/packages/react/src → es}/components/FxEditor/index.d.ts +4 -4
- package/es/components/FxEditor/index.js +167 -0
- package/es/components/IFrameBoxs/iFrameBoxs.css +16 -0
- package/{dist/packages/react/src → es}/components/IFrameBoxs/iFrameBoxs.d.ts +4 -4
- package/es/components/IFrameBoxs/iFrameBoxs.js +142 -0
- package/{dist/packages/react/src → es}/components/ImgBoxs/index.d.ts +3 -3
- package/es/components/ImgBoxs/index.js +219 -0
- package/es/components/LinkEidtCard/index.css +255 -0
- package/{dist/packages/react/src → es}/components/LinkEidtCard/index.d.ts +5 -5
- package/es/components/LinkEidtCard/index.js +238 -0
- package/es/components/LocationCondition/index.css +74 -0
- package/{dist/packages/react/src → es}/components/LocationCondition/index.d.ts +3 -3
- package/es/components/LocationCondition/index.js +195 -0
- package/{dist/packages/react/src → es}/components/MessageBox/index.d.ts +9 -9
- package/es/components/MessageBox/index.js +16 -0
- package/{dist/packages/react/src → es}/components/NotationBoxes/index.d.ts +3 -3
- package/es/components/NotationBoxes/index.js +105 -0
- package/{dist/packages/react/src → es}/components/ResetColumnWidth/index.d.ts +2 -2
- package/es/components/ResetColumnWidth/index.js +130 -0
- package/{dist/packages/react/src → es}/components/SVGDefines.d.ts +5 -5
- package/es/components/SVGDefines.js +1961 -0
- package/{dist/packages/react/src → es}/components/SVGIcon.d.ts +9 -9
- package/es/components/SVGIcon.js +18 -0
- package/es/components/SearchReplace/index.css +191 -0
- package/{dist/packages/react/src → es}/components/SearchReplace/index.d.ts +6 -6
- package/es/components/SearchReplace/index.js +285 -0
- package/es/components/Sheet/index.css +27 -0
- package/{dist/packages/react/src → es}/components/Sheet/index.d.ts +8 -8
- package/es/components/Sheet/index.js +176 -0
- package/{dist/packages/react/src → es}/components/SheetList/SheetHiddenButton.d.ts +8 -8
- package/es/components/SheetList/SheetHiddenButton.js +35 -0
- package/{dist/packages/react/src → es}/components/SheetList/SheetListItem.d.ts +9 -9
- package/es/components/SheetList/SheetListItem.js +72 -0
- package/es/components/SheetList/index.css +48 -0
- package/{dist/packages/react/src → es}/components/SheetList/index.d.ts +4 -4
- package/es/components/SheetList/index.js +30 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/ColumnHeader.d.ts +3 -3
- package/es/components/SheetOverlay/ColumnHeader.js +217 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/ContentEditable.d.ts +11 -11
- package/es/components/SheetOverlay/ContentEditable.js +74 -0
- package/es/components/SheetOverlay/FormulaHint/index.css +180 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/FormulaHint/index.d.ts +4 -4
- package/es/components/SheetOverlay/FormulaHint/index.js +348 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -63
- package/es/components/SheetOverlay/FormulaSearch/constant.js +328 -0
- package/es/components/SheetOverlay/FormulaSearch/index.css +44 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/FormulaSearch/index.d.ts +4 -4
- package/es/components/SheetOverlay/FormulaSearch/index.js +261 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/InputBox.d.ts +3 -3
- package/es/components/SheetOverlay/InputBox.js +395 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/RowHeader.d.ts +3 -3
- package/es/components/SheetOverlay/RowHeader.js +187 -0
- package/es/components/SheetOverlay/ScrollBar/index.css +40 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/ScrollBar/index.d.ts +7 -7
- package/es/components/SheetOverlay/ScrollBar/index.js +47 -0
- package/es/components/SheetOverlay/index.css +952 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/index.d.ts +4 -4
- package/es/components/SheetOverlay/index.js +580 -0
- package/{dist/packages/react/src → es}/components/SheetTab/SheetItem.d.ts +8 -8
- package/es/components/SheetTab/SheetItem.js +230 -0
- package/es/components/SheetTab/index.css +278 -0
- package/{dist/packages/react/src → es}/components/SheetTab/index.d.ts +4 -4
- package/es/components/SheetTab/index.js +191 -0
- package/es/components/SplitColumn/index.css +121 -0
- package/{dist/packages/react/src → es}/components/SplitColumn/index.d.ts +3 -3
- package/es/components/SplitColumn/index.js +167 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Button.d.ts +12 -12
- package/es/components/Toolbar/Button.js +32 -0
- package/{dist/packages/react/src → es}/components/Toolbar/ColorPicker.d.ts +6 -6
- package/es/components/Toolbar/ColorPicker.js +27 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Combo.d.ts +13 -12
- package/es/components/Toolbar/Combo.js +123 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomBorder.d.ts +7 -7
- package/es/components/Toolbar/CustomBorder.js +211 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomButton.d.ts +11 -11
- package/es/components/Toolbar/CustomButton.js +29 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomColor.d.ts +8 -8
- package/es/components/Toolbar/CustomColor.js +25 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomIcon.d.ts +9 -9
- package/es/components/Toolbar/CustomIcon.js +38 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Divider.d.ts +4 -4
- package/es/components/Toolbar/Divider.js +12 -0
- package/{dist/packages/react/src → es}/components/Toolbar/MoreItemsContainer.d.ts +6 -6
- package/es/components/Toolbar/MoreItemsContainer.js +17 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Select.d.ts +14 -14
- package/es/components/Toolbar/Select.js +34 -0
- package/es/components/Toolbar/index.css +411 -0
- package/es/components/Toolbar/index.d.ts +16 -0
- package/es/components/Toolbar/index.js +1722 -0
- package/{dist/packages/react/src → es}/components/Workbook/api.d.ts +1186 -1177
- package/es/components/Workbook/api.js +405 -0
- package/es/components/Workbook/index.css +48 -0
- package/{dist/packages/react/src → es}/components/Workbook/index.d.ts +1194 -1185
- package/es/components/Workbook/index.js +749 -0
- package/es/components/ZoomControl/index.css +54 -0
- package/{dist/packages/react/src → es}/components/ZoomControl/index.d.ts +4 -4
- package/es/components/ZoomControl/index.js +111 -0
- package/es/components/index.d.ts +5 -0
- package/es/components/index.js +3 -0
- package/es/constants.d.ts +27 -0
- package/es/constants.js +45 -0
- package/{dist/packages/react/src → es}/context/index.d.ts +25 -25
- package/es/context/index.js +34 -0
- package/{dist/packages/react/src → es}/context/modal.d.ts +10 -10
- package/es/context/modal.js +43 -0
- package/{dist/packages/react/src → es}/hooks/useAlert.d.ts +4 -4
- package/es/hooks/useAlert.js +28 -0
- package/{dist/packages/react/src → es}/hooks/useDialog.d.ts +5 -5
- package/es/hooks/useDialog.js +28 -0
- package/{dist/packages/react/src → es}/hooks/useOutsideClick.d.ts +2 -2
- package/es/hooks/useOutsideClick.js +15 -0
- package/{dist/packages/react/src → es}/hooks/usePrevious.d.ts +2 -2
- package/es/hooks/usePrevious.js +9 -0
- package/es/index.css +27 -0
- package/{dist/packages/react/src → es}/index.d.ts +1 -1
- package/es/index.js +1 -0
- package/es/utils/convertCellsToCrypto.d.ts +8 -0
- package/es/utils/convertCellsToCrypto.js +307 -0
- package/es/utils/cryptoApi.d.ts +3 -0
- package/es/utils/cryptoApi.js +190 -0
- package/{dist/packages/react/src → es}/utils/datepickerStyles.d.ts +2 -2
- package/es/utils/datepickerStyles.js +8 -0
- package/es/utils/updateCellsDecimalFormat.d.ts +6 -0
- package/es/utils/updateCellsDecimalFormat.js +80 -0
- package/lib/assets/paint-roller.png +0 -0
- package/lib/components/ChangeColor/index.css +76 -0
- package/lib/components/ChangeColor/index.d.ts +7 -0
- package/lib/components/ChangeColor/index.js +50 -0
- package/lib/components/ConditionFormat/ConditionRules.d.ts +6 -0
- package/lib/components/ConditionFormat/ConditionRules.js +332 -0
- package/lib/components/ConditionFormat/index.css +210 -0
- package/lib/components/ConditionFormat/index.d.ts +7 -0
- package/lib/components/ConditionFormat/index.js +261 -0
- package/lib/components/ContextMenu/Divider.d.ts +3 -0
- package/lib/components/ContextMenu/Divider.js +14 -0
- package/lib/components/ContextMenu/FilterMenu.d.ts +3 -0
- package/lib/components/ContextMenu/FilterMenu.js +621 -0
- package/lib/components/ContextMenu/Menu.d.ts +8 -0
- package/lib/components/ContextMenu/Menu.js +33 -0
- package/lib/components/ContextMenu/SheetTab.d.ts +4 -0
- package/lib/components/ContextMenu/SheetTab.js +232 -0
- package/lib/components/ContextMenu/index.css +322 -0
- package/lib/components/ContextMenu/index.d.ts +5 -0
- package/lib/components/ContextMenu/index.js +1063 -0
- package/lib/components/CryptoDenominationSelector/index.css +67 -0
- package/lib/components/CryptoDenominationSelector/index.d.ts +8 -0
- package/lib/components/CryptoDenominationSelector/index.js +280 -0
- package/lib/components/CustomSort/index.css +23 -0
- package/lib/components/CustomSort/index.d.ts +4 -0
- package/lib/components/CustomSort/index.js +122 -0
- package/lib/components/DataVerification/DropdownList.d.ts +4 -0
- package/lib/components/DataVerification/DropdownList.js +135 -0
- package/lib/components/DataVerification/RangeDialog.d.ts +4 -0
- package/lib/components/DataVerification/RangeDialog.js +114 -0
- package/lib/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -0
- package/lib/components/DataVerification/getDisplayedRangeTxt.js +15 -0
- package/lib/components/DataVerification/index.css +202 -0
- package/lib/components/DataVerification/index.d.ts +4 -0
- package/lib/components/DataVerification/index.js +407 -0
- package/lib/components/Dialog/index.css +64 -0
- package/lib/components/Dialog/index.d.ts +15 -0
- package/lib/components/Dialog/index.js +81 -0
- package/lib/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +11 -0
- package/lib/components/DuneChartsInputModal/DuneChartsInputModal.js +104 -0
- package/lib/components/DuneChartsInputModal/duneChartsInputModal.css +98 -0
- package/lib/components/DunePreview/DunePreview.d.ts +13 -0
- package/lib/components/DunePreview/DunePreview.js +53 -0
- package/lib/components/DunePreview/index.css +57 -0
- package/lib/components/FilterOption/index.d.ts +5 -0
- package/lib/components/FilterOption/index.js +130 -0
- package/lib/components/FormatSearch/index.css +19 -0
- package/lib/components/FormatSearch/index.d.ts +6 -0
- package/lib/components/FormatSearch/index.js +142 -0
- package/lib/components/FormulaSearch/index.css +65 -0
- package/lib/components/FormulaSearch/index.d.ts +5 -0
- package/lib/components/FormulaSearch/index.js +207 -0
- package/lib/components/FxEditor/NameBox.d.ts +3 -0
- package/lib/components/FxEditor/NameBox.js +38 -0
- package/lib/components/FxEditor/index.css +72 -0
- package/lib/components/FxEditor/index.d.ts +4 -0
- package/lib/components/FxEditor/index.js +176 -0
- package/lib/components/IFrameBoxs/iFrameBoxs.css +16 -0
- package/lib/components/IFrameBoxs/iFrameBoxs.d.ts +4 -0
- package/lib/components/IFrameBoxs/iFrameBoxs.js +151 -0
- package/lib/components/ImgBoxs/index.d.ts +3 -0
- package/lib/components/ImgBoxs/index.js +228 -0
- package/lib/components/LinkEidtCard/index.css +255 -0
- package/lib/components/LinkEidtCard/index.d.ts +5 -0
- package/lib/components/LinkEidtCard/index.js +247 -0
- package/lib/components/LocationCondition/index.css +74 -0
- package/lib/components/LocationCondition/index.d.ts +3 -0
- package/lib/components/LocationCondition/index.js +204 -0
- package/lib/components/MessageBox/index.d.ts +9 -0
- package/lib/components/MessageBox/index.js +23 -0
- package/lib/components/NotationBoxes/index.d.ts +3 -0
- package/lib/components/NotationBoxes/index.js +114 -0
- package/lib/components/ResetColumnWidth/index.d.ts +2 -0
- package/lib/components/ResetColumnWidth/index.js +138 -0
- package/lib/components/SVGDefines.d.ts +5 -0
- package/lib/components/SVGDefines.js +1968 -0
- package/lib/components/SVGIcon.d.ts +9 -0
- package/lib/components/SVGIcon.js +25 -0
- package/lib/components/SearchReplace/index.css +191 -0
- package/lib/components/SearchReplace/index.d.ts +6 -0
- package/lib/components/SearchReplace/index.js +294 -0
- package/lib/components/Sheet/index.css +27 -0
- package/lib/components/Sheet/index.d.ts +8 -0
- package/lib/components/Sheet/index.js +185 -0
- package/lib/components/SheetList/SheetHiddenButton.d.ts +8 -0
- package/lib/components/SheetList/SheetHiddenButton.js +44 -0
- package/lib/components/SheetList/SheetListItem.d.ts +9 -0
- package/lib/components/SheetList/SheetListItem.js +81 -0
- package/lib/components/SheetList/index.css +48 -0
- package/lib/components/SheetList/index.d.ts +4 -0
- package/lib/components/SheetList/index.js +39 -0
- package/lib/components/SheetOverlay/ColumnHeader.d.ts +3 -0
- package/lib/components/SheetOverlay/ColumnHeader.js +226 -0
- package/lib/components/SheetOverlay/ContentEditable.d.ts +11 -0
- package/lib/components/SheetOverlay/ContentEditable.js +83 -0
- package/lib/components/SheetOverlay/FormulaHint/index.css +180 -0
- package/lib/components/SheetOverlay/FormulaHint/index.d.ts +4 -0
- package/lib/components/SheetOverlay/FormulaHint/index.js +357 -0
- package/lib/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -0
- package/lib/components/SheetOverlay/FormulaSearch/constant.js +334 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.css +44 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.d.ts +4 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.js +270 -0
- package/lib/components/SheetOverlay/InputBox.d.ts +3 -0
- package/lib/components/SheetOverlay/InputBox.js +404 -0
- package/lib/components/SheetOverlay/RowHeader.d.ts +3 -0
- package/lib/components/SheetOverlay/RowHeader.js +196 -0
- package/lib/components/SheetOverlay/ScrollBar/index.css +40 -0
- package/lib/components/SheetOverlay/ScrollBar/index.d.ts +7 -0
- package/lib/components/SheetOverlay/ScrollBar/index.js +56 -0
- package/lib/components/SheetOverlay/index.css +952 -0
- package/lib/components/SheetOverlay/index.d.ts +4 -0
- package/lib/components/SheetOverlay/index.js +589 -0
- package/lib/components/SheetTab/SheetItem.d.ts +8 -0
- package/lib/components/SheetTab/SheetItem.js +239 -0
- package/lib/components/SheetTab/index.css +278 -0
- package/lib/components/SheetTab/index.d.ts +4 -0
- package/lib/components/SheetTab/index.js +200 -0
- package/lib/components/SplitColumn/index.css +121 -0
- package/lib/components/SplitColumn/index.d.ts +3 -0
- package/lib/components/SplitColumn/index.js +176 -0
- package/lib/components/Toolbar/Button.d.ts +12 -0
- package/lib/components/Toolbar/Button.js +39 -0
- package/lib/components/Toolbar/ColorPicker.d.ts +6 -0
- package/lib/components/Toolbar/ColorPicker.js +34 -0
- package/lib/components/Toolbar/Combo.d.ts +13 -0
- package/lib/components/Toolbar/Combo.js +132 -0
- package/lib/components/Toolbar/CustomBorder.d.ts +7 -0
- package/lib/components/Toolbar/CustomBorder.js +220 -0
- package/lib/components/Toolbar/CustomButton.d.ts +11 -0
- package/lib/components/Toolbar/CustomButton.js +36 -0
- package/lib/components/Toolbar/CustomColor.d.ts +8 -0
- package/lib/components/Toolbar/CustomColor.js +32 -0
- package/lib/components/Toolbar/CustomIcon.d.ts +9 -0
- package/lib/components/Toolbar/CustomIcon.js +46 -0
- package/lib/components/Toolbar/Divider.d.ts +4 -0
- package/lib/components/Toolbar/Divider.js +19 -0
- package/lib/components/Toolbar/MoreItemsContainer.d.ts +6 -0
- package/lib/components/Toolbar/MoreItemsContainer.js +25 -0
- package/lib/components/Toolbar/Select.d.ts +14 -0
- package/lib/components/Toolbar/Select.js +40 -0
- package/lib/components/Toolbar/index.css +411 -0
- package/lib/components/Toolbar/index.d.ts +16 -0
- package/lib/components/Toolbar/index.js +1731 -0
- package/lib/components/Workbook/api.d.ts +1186 -0
- package/lib/components/Workbook/api.js +412 -0
- package/lib/components/Workbook/index.css +48 -0
- package/{dist/stories/API.stories.d.ts → lib/components/Workbook/index.d.ts} +1194 -1210
- package/lib/components/Workbook/index.js +758 -0
- package/lib/components/ZoomControl/index.css +54 -0
- package/lib/components/ZoomControl/index.d.ts +4 -0
- package/lib/components/ZoomControl/index.js +120 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +26 -0
- package/lib/constants.d.ts +27 -0
- package/lib/constants.js +52 -0
- package/lib/context/index.d.ts +25 -0
- package/lib/context/index.js +41 -0
- package/lib/context/modal.d.ts +10 -0
- package/lib/context/modal.js +50 -0
- package/lib/hooks/useAlert.d.ts +4 -0
- package/lib/hooks/useAlert.js +37 -0
- package/lib/hooks/useDialog.d.ts +5 -0
- package/lib/hooks/useDialog.js +37 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useOutsideClick.js +21 -0
- package/lib/hooks/usePrevious.d.ts +2 -0
- package/lib/hooks/usePrevious.js +15 -0
- package/lib/index.css +27 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +16 -0
- package/lib/utils/convertCellsToCrypto.d.ts +8 -0
- package/lib/utils/convertCellsToCrypto.js +314 -0
- package/lib/utils/cryptoApi.d.ts +3 -0
- package/lib/utils/cryptoApi.js +198 -0
- package/lib/utils/datepickerStyles.d.ts +2 -0
- package/lib/utils/datepickerStyles.js +14 -0
- package/lib/utils/updateCellsDecimalFormat.d.ts +6 -0
- package/lib/utils/updateCellsDecimalFormat.js +86 -0
- package/package.json +8 -7
- package/dist/index.css +0 -3915
- package/dist/index.esm.css +0 -3915
- package/dist/index.esm.js +0 -12975
- package/dist/index.js +0 -12995
- package/dist/index.umd.css +0 -3915
- package/dist/index.umd.js +0 -122445
- package/dist/index.umd.min.css +0 -1
- package/dist/index.umd.min.js +0 -50
- package/dist/packages/core/src/api/cell.d.ts +0 -10
- package/dist/packages/core/src/api/common.d.ts +0 -66
- package/dist/packages/core/src/api/errors.d.ts +0 -2
- package/dist/packages/core/src/api/index.d.ts +0 -9
- package/dist/packages/core/src/api/merge.d.ts +0 -5
- package/dist/packages/core/src/api/range.d.ts +0 -22
- package/dist/packages/core/src/api/rowcol.d.ts +0 -14
- package/dist/packages/core/src/api/sheet.d.ts +0 -10
- package/dist/packages/core/src/api/workbook.d.ts +0 -15
- package/dist/packages/core/src/canvas.d.ts +0 -46
- package/dist/packages/core/src/context.d.ts +0 -197
- package/dist/packages/core/src/events/copy.d.ts +0 -2
- package/dist/packages/core/src/events/index.d.ts +0 -4
- package/dist/packages/core/src/events/keyboard.d.ts +0 -6
- package/dist/packages/core/src/events/mouse.d.ts +0 -22
- package/dist/packages/core/src/events/paste.d.ts +0 -3
- package/dist/packages/core/src/index.d.ts +0 -10
- package/dist/packages/core/src/locale/en.d.ts +0 -992
- package/dist/packages/core/src/locale/es.d.ts +0 -1134
- package/dist/packages/core/src/locale/hi.d.ts +0 -1030
- package/dist/packages/core/src/locale/index.d.ts +0 -1049
- package/dist/packages/core/src/locale/zh.d.ts +0 -1048
- package/dist/packages/core/src/locale/zh_tw.d.ts +0 -1187
- package/dist/packages/core/src/modules/ConditionFormat.d.ts +0 -17
- package/dist/packages/core/src/modules/border.d.ts +0 -3
- package/dist/packages/core/src/modules/cell.d.ts +0 -32
- package/dist/packages/core/src/modules/clipboard.d.ts +0 -3
- package/dist/packages/core/src/modules/color.d.ts +0 -1
- package/dist/packages/core/src/modules/comment.d.ts +0 -97
- package/dist/packages/core/src/modules/conditionalFormat.d.ts +0 -2
- package/dist/packages/core/src/modules/cursor.d.ts +0 -3
- package/dist/packages/core/src/modules/dataVerification.d.ts +0 -11
- package/dist/packages/core/src/modules/dropCell.d.ts +0 -10
- package/dist/packages/core/src/modules/filter.d.ts +0 -45
- package/dist/packages/core/src/modules/format.d.ts +0 -6
- package/dist/packages/core/src/modules/formula.d.ts +0 -54
- package/dist/packages/core/src/modules/freeze.d.ts +0 -5
- package/dist/packages/core/src/modules/hyperlink.d.ts +0 -21
- package/dist/packages/core/src/modules/iframe.d.ts +0 -12
- package/dist/packages/core/src/modules/image.d.ts +0 -31
- package/dist/packages/core/src/modules/index.d.ts +0 -36
- package/dist/packages/core/src/modules/inline-string.d.ts +0 -36
- package/dist/packages/core/src/modules/location.d.ts +0 -6
- package/dist/packages/core/src/modules/locationCondition.d.ts +0 -21
- package/dist/packages/core/src/modules/merge.d.ts +0 -3
- package/dist/packages/core/src/modules/mobile.d.ts +0 -5
- package/dist/packages/core/src/modules/moveCells.d.ts +0 -5
- package/dist/packages/core/src/modules/protection.d.ts +0 -5
- package/dist/packages/core/src/modules/refresh.d.ts +0 -3
- package/dist/packages/core/src/modules/rowcol.d.ts +0 -19
- package/dist/packages/core/src/modules/screenshot.d.ts +0 -2
- package/dist/packages/core/src/modules/searchReplace.d.ts +0 -36
- package/dist/packages/core/src/modules/selection.d.ts +0 -46
- package/dist/packages/core/src/modules/sheet.d.ts +0 -10
- package/dist/packages/core/src/modules/sort.d.ts +0 -7
- package/dist/packages/core/src/modules/splitColumn.d.ts +0 -5
- package/dist/packages/core/src/modules/text.d.ts +0 -10
- package/dist/packages/core/src/modules/toolbar.d.ts +0 -32
- package/dist/packages/core/src/modules/validation.d.ts +0 -19
- package/dist/packages/core/src/modules/zoom.d.ts +0 -3
- package/dist/packages/core/src/settings.d.ts +0 -100
- package/dist/packages/core/src/types.d.ts +0 -371
- package/dist/packages/core/src/utils/freeze.d.ts +0 -7
- package/dist/packages/core/src/utils/index.d.ts +0 -18
- package/dist/packages/core/src/utils/patch.d.ts +0 -37
- package/dist/packages/react/src/components/Toolbar/index.d.ts +0 -10
- package/dist/packages/react/src/components/index.d.ts +0 -4
- package/dist/packages/react/src/constants.d.ts +0 -1
- package/dist/stories/Collabration.stories.d.ts +0 -2359
- package/dist/stories/Features.stories.d.ts +0 -9430
- package/dist/stories/data/cell.d.ts +0 -983
- package/dist/stories/data/dataVerification.d.ts +0 -131
- package/dist/stories/data/empty.d.ts +0 -10
- package/dist/stories/data/formula.d.ts +0 -362
- package/dist/stories/data/freeze.d.ts +0 -34
- package/dist/stories/data/protected.d.ts +0 -40
- package/dist/stories/utils.d.ts +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
10
|
+
require("./index.css");
|
|
11
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
12
|
+
var _SheetOverlay = _interopRequireDefault(require("../SheetOverlay"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
+
var Sheet = function Sheet(_a) {
|
|
16
|
+
var _b, _c, _d;
|
|
17
|
+
var sheet = _a.sheet;
|
|
18
|
+
var data = sheet.data;
|
|
19
|
+
var containerRef = (0, _react.useRef)(null);
|
|
20
|
+
var placeholderRef = (0, _react.useRef)(null);
|
|
21
|
+
var _e = (0, _react.useContext)(_context.default),
|
|
22
|
+
context = _e.context,
|
|
23
|
+
setContext = _e.setContext,
|
|
24
|
+
refs = _e.refs,
|
|
25
|
+
settings = _e.settings;
|
|
26
|
+
(0, _react.useEffect)(function () {
|
|
27
|
+
function resize() {
|
|
28
|
+
if (!data) return;
|
|
29
|
+
setContext(function (draftCtx) {
|
|
30
|
+
if (settings.devicePixelRatio === 0) {
|
|
31
|
+
draftCtx.devicePixelRatio = (globalThis || window).devicePixelRatio;
|
|
32
|
+
}
|
|
33
|
+
(0, _fortuneCore.updateContextWithSheetData)(draftCtx, data);
|
|
34
|
+
(0, _fortuneCore.updateContextWithCanvas)(draftCtx, refs.canvas.current, placeholderRef.current);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
window.addEventListener("resize", resize);
|
|
38
|
+
return function () {
|
|
39
|
+
window.removeEventListener("resize", resize);
|
|
40
|
+
};
|
|
41
|
+
}, [data, refs.canvas, setContext, settings.devicePixelRatio]);
|
|
42
|
+
(0, _react.useEffect)(function () {
|
|
43
|
+
if (!data) return;
|
|
44
|
+
setContext(function (draftCtx) {
|
|
45
|
+
return (0, _fortuneCore.updateContextWithSheetData)(draftCtx, data);
|
|
46
|
+
});
|
|
47
|
+
}, [(_b = context.config) === null || _b === void 0 ? void 0 : _b.rowlen, (_c = context.config) === null || _c === void 0 ? void 0 : _c.columnlen, (_d = context.config) === null || _d === void 0 ? void 0 : _d.rowhidden, context.config.colhidden, data, context.zoomRatio, setContext]);
|
|
48
|
+
(0, _react.useEffect)(function () {
|
|
49
|
+
setContext(function (draftCtx) {
|
|
50
|
+
return (0, _fortuneCore.updateContextWithCanvas)(draftCtx, refs.canvas.current, placeholderRef.current);
|
|
51
|
+
});
|
|
52
|
+
}, [refs.canvas, setContext, context.rowHeaderWidth, context.columnHeaderHeight, context.devicePixelRatio]);
|
|
53
|
+
(0, _react.useEffect)(function () {
|
|
54
|
+
(0, _fortuneCore.initFreeze)(context, refs.globalCache, context.currentSheetId);
|
|
55
|
+
}, [refs.globalCache, sheet.frozen, context.currentSheetId, context.visibledatacolumn, context.visibledatarow]);
|
|
56
|
+
(0, _react.useEffect)(function () {
|
|
57
|
+
var _a, _b, _c, _d, _e;
|
|
58
|
+
if (context.groupValuesRefreshData.length > 0) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
var tableCanvas = new _fortuneCore.Canvas(refs.canvas.current, context);
|
|
62
|
+
if (tableCanvas == null) return;
|
|
63
|
+
var freeze = (_a = refs.globalCache.freezen) === null || _a === void 0 ? void 0 : _a[sheet.id];
|
|
64
|
+
if (((_b = freeze === null || freeze === void 0 ? void 0 : freeze.horizontal) === null || _b === void 0 ? void 0 : _b.freezenhorizontaldata) || ((_c = freeze === null || freeze === void 0 ? void 0 : freeze.vertical) === null || _c === void 0 ? void 0 : _c.freezenverticaldata)) {
|
|
65
|
+
var horizontalData = (_d = freeze === null || freeze === void 0 ? void 0 : freeze.horizontal) === null || _d === void 0 ? void 0 : _d.freezenhorizontaldata;
|
|
66
|
+
var verticallData = (_e = freeze === null || freeze === void 0 ? void 0 : freeze.vertical) === null || _e === void 0 ? void 0 : _e.freezenverticaldata;
|
|
67
|
+
if (horizontalData && verticallData) {
|
|
68
|
+
var horizontalPx = horizontalData[0],
|
|
69
|
+
horizontalScrollTop = horizontalData[2];
|
|
70
|
+
var verticalPx = verticallData[0],
|
|
71
|
+
verticalScrollWidth = verticallData[2];
|
|
72
|
+
tableCanvas.drawMain({
|
|
73
|
+
scrollWidth: context.scrollLeft + verticalPx - verticalScrollWidth,
|
|
74
|
+
scrollHeight: context.scrollTop + horizontalPx - horizontalScrollTop,
|
|
75
|
+
offsetLeft: verticalPx - verticalScrollWidth + context.rowHeaderWidth,
|
|
76
|
+
offsetTop: horizontalPx - horizontalScrollTop + context.columnHeaderHeight,
|
|
77
|
+
clear: true
|
|
78
|
+
});
|
|
79
|
+
tableCanvas.drawMain({
|
|
80
|
+
scrollWidth: context.scrollLeft + verticalPx - verticalScrollWidth,
|
|
81
|
+
scrollHeight: horizontalScrollTop,
|
|
82
|
+
drawHeight: horizontalPx,
|
|
83
|
+
offsetLeft: verticalPx - verticalScrollWidth + context.rowHeaderWidth
|
|
84
|
+
});
|
|
85
|
+
tableCanvas.drawMain({
|
|
86
|
+
scrollWidth: verticalScrollWidth,
|
|
87
|
+
scrollHeight: context.scrollTop + horizontalPx - horizontalScrollTop,
|
|
88
|
+
drawWidth: verticalPx,
|
|
89
|
+
offsetTop: horizontalPx - horizontalScrollTop + context.columnHeaderHeight
|
|
90
|
+
});
|
|
91
|
+
tableCanvas.drawMain({
|
|
92
|
+
scrollWidth: verticalScrollWidth,
|
|
93
|
+
scrollHeight: horizontalScrollTop,
|
|
94
|
+
drawWidth: verticalPx,
|
|
95
|
+
drawHeight: horizontalPx
|
|
96
|
+
});
|
|
97
|
+
tableCanvas.drawColumnHeader(context.scrollLeft + verticalPx - verticalScrollWidth, undefined, verticalPx - verticalScrollWidth + context.rowHeaderWidth);
|
|
98
|
+
tableCanvas.drawColumnHeader(verticalScrollWidth, verticalPx);
|
|
99
|
+
tableCanvas.drawRowHeader(context.scrollTop + horizontalPx - horizontalScrollTop, undefined, horizontalPx - horizontalScrollTop + context.columnHeaderHeight);
|
|
100
|
+
tableCanvas.drawRowHeader(horizontalScrollTop, horizontalPx);
|
|
101
|
+
tableCanvas.drawFreezeLine({
|
|
102
|
+
horizontalTop: horizontalPx - horizontalScrollTop + context.columnHeaderHeight - 2,
|
|
103
|
+
verticalLeft: verticalPx - verticalScrollWidth + context.rowHeaderWidth - 2
|
|
104
|
+
});
|
|
105
|
+
} else if (horizontalData) {
|
|
106
|
+
var horizontalPx = horizontalData[0],
|
|
107
|
+
horizontalScrollTop = horizontalData[2];
|
|
108
|
+
tableCanvas.drawMain({
|
|
109
|
+
scrollWidth: context.scrollLeft,
|
|
110
|
+
scrollHeight: context.scrollTop + horizontalPx - horizontalScrollTop,
|
|
111
|
+
offsetTop: horizontalPx - horizontalScrollTop + context.columnHeaderHeight,
|
|
112
|
+
clear: true
|
|
113
|
+
});
|
|
114
|
+
tableCanvas.drawMain({
|
|
115
|
+
scrollWidth: context.scrollLeft,
|
|
116
|
+
scrollHeight: horizontalScrollTop,
|
|
117
|
+
drawHeight: horizontalPx
|
|
118
|
+
});
|
|
119
|
+
tableCanvas.drawColumnHeader(context.scrollLeft);
|
|
120
|
+
tableCanvas.drawRowHeader(context.scrollTop + horizontalPx - horizontalScrollTop, undefined, horizontalPx - horizontalScrollTop + context.columnHeaderHeight);
|
|
121
|
+
tableCanvas.drawRowHeader(horizontalScrollTop, horizontalPx);
|
|
122
|
+
tableCanvas.drawFreezeLine({
|
|
123
|
+
horizontalTop: horizontalPx - horizontalScrollTop + context.columnHeaderHeight - 2
|
|
124
|
+
});
|
|
125
|
+
} else if (verticallData) {
|
|
126
|
+
var verticalPx = verticallData[0],
|
|
127
|
+
verticalScrollWidth = verticallData[2];
|
|
128
|
+
tableCanvas.drawMain({
|
|
129
|
+
scrollWidth: context.scrollLeft + verticalPx - verticalScrollWidth,
|
|
130
|
+
scrollHeight: context.scrollTop,
|
|
131
|
+
offsetLeft: verticalPx - verticalScrollWidth + context.rowHeaderWidth
|
|
132
|
+
});
|
|
133
|
+
tableCanvas.drawMain({
|
|
134
|
+
scrollWidth: verticalScrollWidth,
|
|
135
|
+
scrollHeight: context.scrollTop,
|
|
136
|
+
drawWidth: verticalPx
|
|
137
|
+
});
|
|
138
|
+
tableCanvas.drawRowHeader(context.scrollTop);
|
|
139
|
+
tableCanvas.drawColumnHeader(context.scrollLeft + verticalPx - verticalScrollWidth, undefined, verticalPx - verticalScrollWidth + context.rowHeaderWidth);
|
|
140
|
+
tableCanvas.drawColumnHeader(verticalScrollWidth, verticalPx);
|
|
141
|
+
tableCanvas.drawFreezeLine({
|
|
142
|
+
verticalLeft: verticalPx - verticalScrollWidth + context.rowHeaderWidth - 2
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
tableCanvas.drawMain({
|
|
147
|
+
scrollWidth: context.scrollLeft,
|
|
148
|
+
scrollHeight: context.scrollTop,
|
|
149
|
+
clear: true
|
|
150
|
+
});
|
|
151
|
+
tableCanvas.drawColumnHeader(context.scrollLeft);
|
|
152
|
+
tableCanvas.drawRowHeader(context.scrollTop);
|
|
153
|
+
}
|
|
154
|
+
}, [context, refs.canvas, refs.globalCache.freezen, setContext, sheet.id]);
|
|
155
|
+
var onWheel = (0, _react.useCallback)(function (e) {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
var functionDetailsEl = document.getElementById("function-details");
|
|
158
|
+
var formulaSearchEl = document.getElementById("luckysheet-formula-search-c");
|
|
159
|
+
var isMouseOverFunctionDetails = functionDetailsEl === null || functionDetailsEl === void 0 ? void 0 : functionDetailsEl.matches(":hover");
|
|
160
|
+
var isMouseOverFormulaSearch = formulaSearchEl === null || formulaSearchEl === void 0 ? void 0 : formulaSearchEl.matches(":hover");
|
|
161
|
+
if (functionDetailsEl && isMouseOverFunctionDetails || formulaSearchEl && isMouseOverFormulaSearch || ((_b = (_a = refs === null || refs === void 0 ? void 0 : refs.globalCache) === null || _a === void 0 ? void 0 : _a.searchDialog) === null || _b === void 0 ? void 0 : _b.mouseEnter)) return;
|
|
162
|
+
setContext(function (draftCtx) {
|
|
163
|
+
(0, _fortuneCore.handleGlobalWheel)(draftCtx, e, refs.globalCache, refs.scrollbarX.current, refs.scrollbarY.current);
|
|
164
|
+
});
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
}, [refs.globalCache, refs.scrollbarX, refs.scrollbarY, setContext]);
|
|
167
|
+
(0, _react.useEffect)(function () {
|
|
168
|
+
var container = containerRef.current;
|
|
169
|
+
container === null || container === void 0 ? void 0 : container.addEventListener("wheel", onWheel);
|
|
170
|
+
return function () {
|
|
171
|
+
container === null || container === void 0 ? void 0 : container.removeEventListener("wheel", onWheel);
|
|
172
|
+
};
|
|
173
|
+
}, [onWheel]);
|
|
174
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
ref: containerRef,
|
|
176
|
+
className: "fortune-sheet-container"
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
ref: placeholderRef,
|
|
179
|
+
className: "fortune-sheet-canvas-placeholder"
|
|
180
|
+
}), /*#__PURE__*/_react.default.createElement("canvas", {
|
|
181
|
+
className: "fortune-sheet-canvas",
|
|
182
|
+
ref: refs.canvas
|
|
183
|
+
}), /*#__PURE__*/_react.default.createElement(_SheetOverlay.default, null));
|
|
184
|
+
};
|
|
185
|
+
var _default = exports.default = Sheet;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
11
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
var SheetHiddenButton = function SheetHiddenButton(_a) {
|
|
15
|
+
var style = _a.style,
|
|
16
|
+
sheet = _a.sheet;
|
|
17
|
+
var _b = (0, _react.useContext)(_context.default),
|
|
18
|
+
context = _b.context,
|
|
19
|
+
setContext = _b.setContext;
|
|
20
|
+
var showSheet = (0, _react.useCallback)(function () {
|
|
21
|
+
if (context.allowEdit === false) return;
|
|
22
|
+
if (!sheet) return;
|
|
23
|
+
setContext(function (ctx) {
|
|
24
|
+
_fortuneCore.api.showSheet(ctx, sheet.id);
|
|
25
|
+
});
|
|
26
|
+
}, [context.allowEdit, setContext, sheet]);
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
style: style,
|
|
29
|
+
onClick: function onClick(e) {
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
showSheet();
|
|
32
|
+
},
|
|
33
|
+
tabIndex: 0,
|
|
34
|
+
className: "fortune-sheet-hidden-button"
|
|
35
|
+
}, (sheet === null || sheet === void 0 ? void 0 : sheet.hide) === 1 ? (/*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
36
|
+
name: "hidden",
|
|
37
|
+
width: 16,
|
|
38
|
+
height: 16,
|
|
39
|
+
style: {
|
|
40
|
+
marginTop: "7px"
|
|
41
|
+
}
|
|
42
|
+
})) : "");
|
|
43
|
+
};
|
|
44
|
+
var _default = exports.default = SheetHiddenButton;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
9
|
+
var _ui = require("@fileverse/ui");
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
12
|
+
require("./index.css");
|
|
13
|
+
var _SheetHiddenButton = _interopRequireDefault(require("./SheetHiddenButton"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
+
var SheetListItem = function SheetListItem(_a) {
|
|
17
|
+
var sheet = _a.sheet,
|
|
18
|
+
isDropPlaceholder = _a.isDropPlaceholder;
|
|
19
|
+
var _b = (0, _react.useContext)(_context.default),
|
|
20
|
+
context = _b.context,
|
|
21
|
+
setContext = _b.setContext,
|
|
22
|
+
refs = _b.refs;
|
|
23
|
+
var containerRef = (0, _react.useRef)(null);
|
|
24
|
+
(0, _react.useEffect)(function () {
|
|
25
|
+
setContext(function (draftCtx) {
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
|
+
var r = context.sheetScrollRecord[draftCtx === null || draftCtx === void 0 ? void 0 : draftCtx.currentSheetId];
|
|
28
|
+
if (r) {
|
|
29
|
+
draftCtx.scrollLeft = (_a = r.scrollLeft) !== null && _a !== void 0 ? _a : 0;
|
|
30
|
+
draftCtx.scrollTop = (_b = r.scrollTop) !== null && _b !== void 0 ? _b : 0;
|
|
31
|
+
draftCtx.luckysheet_select_status = (_c = r.luckysheet_select_status) !== null && _c !== void 0 ? _c : false;
|
|
32
|
+
draftCtx.luckysheet_select_save = (_d = r.luckysheet_select_save) !== null && _d !== void 0 ? _d : undefined;
|
|
33
|
+
} else {
|
|
34
|
+
draftCtx.scrollLeft = 0;
|
|
35
|
+
draftCtx.scrollTop = 0;
|
|
36
|
+
draftCtx.luckysheet_select_status = false;
|
|
37
|
+
draftCtx.luckysheet_select_save = undefined;
|
|
38
|
+
}
|
|
39
|
+
draftCtx.luckysheet_selection_range = [];
|
|
40
|
+
});
|
|
41
|
+
}, [context.currentSheetId, context.sheetScrollRecord, setContext]);
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: "fortune-sheet-list-item flex items-center gap-2 px-2",
|
|
44
|
+
key: sheet.id,
|
|
45
|
+
ref: containerRef,
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
if (isDropPlaceholder) return;
|
|
48
|
+
setContext(function (draftCtx) {
|
|
49
|
+
draftCtx.sheetScrollRecord[draftCtx.currentSheetId] = {
|
|
50
|
+
scrollLeft: draftCtx.scrollLeft,
|
|
51
|
+
scrollTop: draftCtx.scrollTop,
|
|
52
|
+
luckysheet_select_status: draftCtx.luckysheet_select_status,
|
|
53
|
+
luckysheet_select_save: draftCtx.luckysheet_select_save,
|
|
54
|
+
luckysheet_selection_range: draftCtx.luckysheet_selection_range
|
|
55
|
+
};
|
|
56
|
+
draftCtx.currentSheetId = sheet.id;
|
|
57
|
+
draftCtx.zoomRatio = sheet.zoomRatio || 1;
|
|
58
|
+
(0, _fortuneCore.cancelActiveImgItem)(draftCtx, refs.globalCache);
|
|
59
|
+
(0, _fortuneCore.cancelNormalSelected)(draftCtx);
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
tabIndex: 0
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
className: "w-4"
|
|
65
|
+
}, sheet.id === context.currentSheetId && (/*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
66
|
+
name: "Check",
|
|
67
|
+
size: "sm",
|
|
68
|
+
className: "color-text-default w-4 h-4"
|
|
69
|
+
}))), /*#__PURE__*/_react.default.createElement("span", {
|
|
70
|
+
className: "luckysheet-sheets-item-name fortune-sheet-list-item-name",
|
|
71
|
+
spellCheck: "false"
|
|
72
|
+
}, !!sheet.color && (/*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
+
className: "luckysheet-sheets-list-item-color",
|
|
74
|
+
style: {
|
|
75
|
+
background: sheet.color
|
|
76
|
+
}
|
|
77
|
+
})), sheet.name), sheet.hide && /*#__PURE__*/_react.default.createElement(_SheetHiddenButton.default, {
|
|
78
|
+
sheet: sheet
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
var _default = exports.default = SheetListItem;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.fortune-sheet-list {
|
|
2
|
+
overflow-y: auto;
|
|
3
|
+
overflow-x: hidden;
|
|
4
|
+
min-width: 120px;
|
|
5
|
+
position: absolute;
|
|
6
|
+
z-index: 10002;
|
|
7
|
+
bottom: 53px;
|
|
8
|
+
margin-left: 72px;
|
|
9
|
+
max-height: 60%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.fortune-sheet-list-item {
|
|
13
|
+
height: 30px;
|
|
14
|
+
line-height: 30px;
|
|
15
|
+
width: 100%;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border-radius: 4px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.fortune-sheet-list-item-name {
|
|
21
|
+
margin-right: 15px;
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fortune-sheet-list-item-name .luckysheet-sheets-list-item-color {
|
|
26
|
+
width: 6%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
position: absolute;
|
|
29
|
+
bottom: 0;
|
|
30
|
+
left: -6px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.fortune-sheet-list :hover {
|
|
34
|
+
background-color: hsl(var(--color-bg-default-hover));
|
|
35
|
+
transition: background-color 0.2s ease-in-out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fortune-sheet-hidden-button {
|
|
39
|
+
margin-right: 15px;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
position: absolute;
|
|
42
|
+
right: 0;
|
|
43
|
+
justify-content: flex-end;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fortune-sheet-hidden-button :hover {
|
|
47
|
+
background-color: #d0d0d0;
|
|
48
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
11
|
+
var _useOutsideClick = require("../../hooks/useOutsideClick");
|
|
12
|
+
require("./index.css");
|
|
13
|
+
var _SheetListItem = _interopRequireDefault(require("./SheetListItem"));
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
var SheetList = function SheetList() {
|
|
17
|
+
var _a = (0, _react.useContext)(_context.default),
|
|
18
|
+
context = _a.context,
|
|
19
|
+
setContext = _a.setContext;
|
|
20
|
+
var containerRef = (0, _react.useRef)(null);
|
|
21
|
+
var close = (0, _react.useCallback)(function () {
|
|
22
|
+
setContext(function (ctx) {
|
|
23
|
+
ctx.showSheetList = false;
|
|
24
|
+
});
|
|
25
|
+
}, [setContext]);
|
|
26
|
+
(0, _useOutsideClick.useOutsideClick)(containerRef, close, [close]);
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: "fortune-context-menu luckysheet-cols-menu fortune-sheet-list",
|
|
29
|
+
ref: containerRef
|
|
30
|
+
}, _lodash.default.sortBy(context.luckysheetfile, function (s) {
|
|
31
|
+
return Number(s.order);
|
|
32
|
+
}).map(function (singleSheet) {
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_SheetListItem.default, {
|
|
34
|
+
sheet: singleSheet,
|
|
35
|
+
key: singleSheet.id
|
|
36
|
+
});
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
var _default = exports.default = SheetList;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
9
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
12
|
+
var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
var ColumnHeader = function ColumnHeader() {
|
|
16
|
+
var _a;
|
|
17
|
+
var _b = (0, _react.useContext)(_context.default),
|
|
18
|
+
context = _b.context,
|
|
19
|
+
setContext = _b.setContext,
|
|
20
|
+
refs = _b.refs;
|
|
21
|
+
var containerRef = (0, _react.useRef)(null);
|
|
22
|
+
var colChangeSizeRef = (0, _react.useRef)(null);
|
|
23
|
+
var _c = (0, _react.useState)({
|
|
24
|
+
col: -1,
|
|
25
|
+
col_pre: -1,
|
|
26
|
+
col_index: -1
|
|
27
|
+
}),
|
|
28
|
+
hoverLocation = _c[0],
|
|
29
|
+
setHoverLocation = _c[1];
|
|
30
|
+
var _d = (0, _react.useState)(false),
|
|
31
|
+
hoverInFreeze = _d[0],
|
|
32
|
+
setHoverInFreeze = _d[1];
|
|
33
|
+
var _e = (0, _react.useState)([]),
|
|
34
|
+
selectedLocation = _e[0],
|
|
35
|
+
setSelectedLocation = _e[1];
|
|
36
|
+
var allowEditRef = (0, _react.useRef)(true);
|
|
37
|
+
var sheetIndex = (0, _fortuneCore.getSheetIndex)(context, context.currentSheetId);
|
|
38
|
+
var sheet = sheetIndex == null ? null : context.luckysheetfile[sheetIndex];
|
|
39
|
+
var freezeHandleLeft = (0, _react.useMemo)(function () {
|
|
40
|
+
var _a, _b, _c, _d, _e, _f;
|
|
41
|
+
if (((_a = sheet === null || sheet === void 0 ? void 0 : sheet.frozen) === null || _a === void 0 ? void 0 : _a.type) === "column" || ((_b = sheet === null || sheet === void 0 ? void 0 : sheet.frozen) === null || _b === void 0 ? void 0 : _b.type) === "rangeColumn" || ((_c = sheet === null || sheet === void 0 ? void 0 : sheet.frozen) === null || _c === void 0 ? void 0 : _c.type) === "rangeBoth" || ((_d = sheet === null || sheet === void 0 ? void 0 : sheet.frozen) === null || _d === void 0 ? void 0 : _d.type) === "both") {
|
|
42
|
+
return (0, _fortuneCore.colLocationByIndex)(((_f = (_e = sheet === null || sheet === void 0 ? void 0 : sheet.frozen) === null || _e === void 0 ? void 0 : _e.range) === null || _f === void 0 ? void 0 : _f.column_focus) || 0, context.visibledatacolumn)[1] - 2 + context.scrollLeft;
|
|
43
|
+
}
|
|
44
|
+
return context.scrollLeft;
|
|
45
|
+
}, [context.visibledatacolumn, sheet === null || sheet === void 0 ? void 0 : sheet.frozen, context.scrollLeft]);
|
|
46
|
+
var onMouseMove = (0, _react.useCallback)(function (e) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (context.luckysheet_cols_change_size) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
var mouseX = e.pageX - containerRef.current.getBoundingClientRect().left - window.scrollX;
|
|
52
|
+
var _x = mouseX + containerRef.current.scrollLeft;
|
|
53
|
+
var freeze = (_a = refs.globalCache.freezen) === null || _a === void 0 ? void 0 : _a[context.currentSheetId];
|
|
54
|
+
var _b = (0, _fortuneCore.fixPositionOnFrozenCells)(freeze, _x, 0, mouseX, 0),
|
|
55
|
+
x = _b.x,
|
|
56
|
+
inVerticalFreeze = _b.inVerticalFreeze;
|
|
57
|
+
var col_location = (0, _fortuneCore.colLocation)(x, context.visibledatacolumn);
|
|
58
|
+
var col_pre = col_location[0],
|
|
59
|
+
col = col_location[1],
|
|
60
|
+
col_index = col_location[2];
|
|
61
|
+
if (col_index !== hoverLocation.col_index) {
|
|
62
|
+
setHoverLocation({
|
|
63
|
+
col_pre: col_pre,
|
|
64
|
+
col: col,
|
|
65
|
+
col_index: col_index
|
|
66
|
+
});
|
|
67
|
+
setHoverInFreeze(inVerticalFreeze);
|
|
68
|
+
}
|
|
69
|
+
var flowdata = (0, _fortuneCore.getFlowdata)(context);
|
|
70
|
+
if (!_lodash.default.isNil(flowdata)) allowEditRef.current = (0, _fortuneCore.isAllowEdit)(context) && (0, _fortuneCore.isAllowEdit)(context, [{
|
|
71
|
+
row: [0, flowdata.length - 1],
|
|
72
|
+
column: col_location
|
|
73
|
+
}]);
|
|
74
|
+
}, [context, hoverLocation.col_index, refs.globalCache.freezen]);
|
|
75
|
+
var onMouseDown = (0, _react.useCallback)(function (e) {
|
|
76
|
+
var nativeEvent = e.nativeEvent;
|
|
77
|
+
setContext(function (draftCtx) {
|
|
78
|
+
(0, _fortuneCore.handleColumnHeaderMouseDown)(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.cellInput.current, refs.fxInput.current);
|
|
79
|
+
});
|
|
80
|
+
}, [refs.globalCache, refs.cellInput, refs.fxInput, setContext]);
|
|
81
|
+
var onMouseLeave = (0, _react.useCallback)(function () {
|
|
82
|
+
if (context.luckysheet_cols_change_size) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
setHoverLocation({
|
|
86
|
+
col: -1,
|
|
87
|
+
col_pre: -1,
|
|
88
|
+
col_index: -1
|
|
89
|
+
});
|
|
90
|
+
}, [context.luckysheet_cols_change_size]);
|
|
91
|
+
var onColSizeHandleMouseDown = (0, _react.useCallback)(function (e) {
|
|
92
|
+
var nativeEvent = e.nativeEvent;
|
|
93
|
+
setContext(function (draftCtx) {
|
|
94
|
+
(0, _fortuneCore.handleColSizeHandleMouseDown)(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
|
|
95
|
+
});
|
|
96
|
+
e.stopPropagation();
|
|
97
|
+
}, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
|
|
98
|
+
var onColFreezeHandleMouseDown = (0, _react.useCallback)(function (e) {
|
|
99
|
+
var nativeEvent = e.nativeEvent;
|
|
100
|
+
setContext(function (draftCtx) {
|
|
101
|
+
(0, _fortuneCore.handleColFreezeHandleMouseDown)(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
|
|
102
|
+
});
|
|
103
|
+
e.stopPropagation();
|
|
104
|
+
}, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
|
|
105
|
+
(0, _react.useEffect)(function () {
|
|
106
|
+
var s = context.luckysheet_select_save;
|
|
107
|
+
if (_lodash.default.isNil(s)) return;
|
|
108
|
+
setSelectedLocation([]);
|
|
109
|
+
if (s[0].row_select) return;
|
|
110
|
+
var columnTitleMap = {};
|
|
111
|
+
for (var i = 0; i < s.length; i += 1) {
|
|
112
|
+
var c1 = s[i].column[0];
|
|
113
|
+
var c2 = s[i].column[1];
|
|
114
|
+
columnTitleMap = (0, _fortuneCore.selectTitlesMap)(columnTitleMap, c1, c2);
|
|
115
|
+
}
|
|
116
|
+
var columnTitleRange = (0, _fortuneCore.selectTitlesRange)(columnTitleMap);
|
|
117
|
+
var selects = [];
|
|
118
|
+
for (var j = 0; j < columnTitleRange.length; j += 1) {
|
|
119
|
+
var c1 = columnTitleRange[j][0];
|
|
120
|
+
var c2 = columnTitleRange[j][columnTitleRange[j].length - 1];
|
|
121
|
+
var col = (0, _fortuneCore.colLocationByIndex)(c2, context.visibledatacolumn)[1];
|
|
122
|
+
var col_pre = (0, _fortuneCore.colLocationByIndex)(c1, context.visibledatacolumn)[0];
|
|
123
|
+
if (_lodash.default.isNumber(col) && _lodash.default.isNumber(col_pre)) {
|
|
124
|
+
selects.push({
|
|
125
|
+
col: col,
|
|
126
|
+
col_pre: col_pre,
|
|
127
|
+
c1: c1,
|
|
128
|
+
c2: c2
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
setSelectedLocation(selects);
|
|
133
|
+
}, [context.luckysheet_select_save, context.visibledatacolumn]);
|
|
134
|
+
(0, _react.useEffect)(function () {
|
|
135
|
+
containerRef.current.scrollLeft = context.scrollLeft;
|
|
136
|
+
}, [context.scrollLeft]);
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
ref: containerRef,
|
|
139
|
+
className: "fortune-col-header",
|
|
140
|
+
style: {
|
|
141
|
+
height: context.columnHeaderHeight - 1.5
|
|
142
|
+
},
|
|
143
|
+
onMouseMove: onMouseMove,
|
|
144
|
+
onMouseDown: onMouseDown,
|
|
145
|
+
onMouseLeave: onMouseLeave,
|
|
146
|
+
onContextMenu: function onContextMenu(e) {
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
setContext(function (ctx) {
|
|
149
|
+
ctx.contextMenu = {
|
|
150
|
+
x: e.pageX,
|
|
151
|
+
y: 90,
|
|
152
|
+
headerMenu: true
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
+
className: "fortune-cols-freeze-handle",
|
|
158
|
+
onMouseDown: onColFreezeHandleMouseDown,
|
|
159
|
+
style: {
|
|
160
|
+
left: freezeHandleLeft
|
|
161
|
+
}
|
|
162
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
163
|
+
className: "fortune-cols-change-size",
|
|
164
|
+
ref: colChangeSizeRef,
|
|
165
|
+
id: "fortune-cols-change-size",
|
|
166
|
+
onMouseDown: onColSizeHandleMouseDown,
|
|
167
|
+
style: {
|
|
168
|
+
left: hoverLocation.col - 5 + (hoverInFreeze ? context.scrollLeft : 0),
|
|
169
|
+
opacity: context.luckysheet_cols_change_size ? 1 : 0
|
|
170
|
+
}
|
|
171
|
+
}), !context.luckysheet_cols_change_size && hoverLocation.col_index >= 0 ? (/*#__PURE__*/_react.default.createElement("div", {
|
|
172
|
+
className: "fortune-col-header-hover",
|
|
173
|
+
style: _lodash.default.assign({
|
|
174
|
+
left: hoverLocation.col_pre,
|
|
175
|
+
width: hoverLocation.col - hoverLocation.col_pre - 1,
|
|
176
|
+
display: "block"
|
|
177
|
+
}, (0, _fortuneCore.fixColumnStyleOverflowInFreeze)(context, hoverLocation.col_index, hoverLocation.col_index, (_a = refs.globalCache.freezen) === null || _a === void 0 ? void 0 : _a[context.currentSheetId]))
|
|
178
|
+
}, allowEditRef.current && (/*#__PURE__*/_react.default.createElement("span", {
|
|
179
|
+
className: "header-arrow",
|
|
180
|
+
onClick: function onClick(e) {
|
|
181
|
+
setContext(function (ctx) {
|
|
182
|
+
ctx.contextMenu = {
|
|
183
|
+
x: e.pageX,
|
|
184
|
+
y: 90,
|
|
185
|
+
headerMenu: true
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
tabIndex: 0
|
|
190
|
+
}, /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
191
|
+
name: "headDownArrow",
|
|
192
|
+
width: 12,
|
|
193
|
+
style: {
|
|
194
|
+
marginBottom: "3px"
|
|
195
|
+
}
|
|
196
|
+
}))))) : null, selectedLocation.map(function (_a, i) {
|
|
197
|
+
var _b;
|
|
198
|
+
var col = _a.col,
|
|
199
|
+
col_pre = _a.col_pre,
|
|
200
|
+
c1 = _a.c1,
|
|
201
|
+
c2 = _a.c2;
|
|
202
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
203
|
+
className: "fortune-col-header-selected",
|
|
204
|
+
key: i,
|
|
205
|
+
style: _lodash.default.assign({
|
|
206
|
+
left: col_pre,
|
|
207
|
+
width: col - col_pre - 1,
|
|
208
|
+
display: "block",
|
|
209
|
+
backgroundColor: "#EFC703",
|
|
210
|
+
mixBlendMode: "multiply"
|
|
211
|
+
}, (0, _fortuneCore.fixColumnStyleOverflowInFreeze)(context, c1, c2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
|
|
212
|
+
});
|
|
213
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
214
|
+
className: "luckysheet-cols-h-cells luckysheetsheetchange",
|
|
215
|
+
id: "luckysheet-cols-h-cells_0",
|
|
216
|
+
style: {
|
|
217
|
+
width: context.ch_width,
|
|
218
|
+
height: 1
|
|
219
|
+
}
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
+
className: "luckysheet-cols-h-cells-c"
|
|
222
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
223
|
+
className: "luckysheet-grdblkpush"
|
|
224
|
+
}))));
|
|
225
|
+
};
|
|
226
|
+
var _default = exports.default = ColumnHeader;
|