@fileverse-dev/fortune-react 1.1.0 → 1.1.2
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,200 @@
|
|
|
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 _usehooksTs = require("usehooks-ts");
|
|
11
|
+
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
12
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
13
|
+
var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
14
|
+
require("./index.css");
|
|
15
|
+
var _SheetItem = _interopRequireDefault(require("./SheetItem"));
|
|
16
|
+
var _ZoomControl = _interopRequireDefault(require("../ZoomControl"));
|
|
17
|
+
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); }
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
var SheetTab = function SheetTab() {
|
|
20
|
+
var isMobile = (0, _usehooksTs.useMediaQuery)("(max-width: 780px)", {
|
|
21
|
+
defaultValue: true
|
|
22
|
+
});
|
|
23
|
+
var _a = (0, _react.useContext)(_context.default),
|
|
24
|
+
context = _a.context,
|
|
25
|
+
setContext = _a.setContext,
|
|
26
|
+
settings = _a.settings,
|
|
27
|
+
refs = _a.refs;
|
|
28
|
+
var tabContainerRef = (0, _react.useRef)(null);
|
|
29
|
+
var leftScrollRef = (0, _react.useRef)(null);
|
|
30
|
+
var rightScrollRef = (0, _react.useRef)(null);
|
|
31
|
+
var _b = (0, _react.useState)(false),
|
|
32
|
+
isShowScrollBtn = _b[0],
|
|
33
|
+
setIsShowScrollBtn = _b[1];
|
|
34
|
+
var _c = (0, _react.useState)(true),
|
|
35
|
+
isShowBoundary = _c[0],
|
|
36
|
+
setIsShowBoundary = _c[1];
|
|
37
|
+
var scrollDelta = 150;
|
|
38
|
+
var scrollBy = (0, _react.useCallback)(function (amount) {
|
|
39
|
+
var _a;
|
|
40
|
+
if (tabContainerRef.current == null || tabContainerRef.current.scrollLeft == null) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
var scrollLeft = tabContainerRef.current.scrollLeft;
|
|
44
|
+
if (scrollLeft + amount <= 0) setIsShowBoundary(true);else if (scrollLeft > 0) setIsShowBoundary(false);
|
|
45
|
+
(_a = tabContainerRef.current) === null || _a === void 0 ? void 0 : _a.scrollBy({
|
|
46
|
+
left: amount,
|
|
47
|
+
behavior: "smooth"
|
|
48
|
+
});
|
|
49
|
+
}, []);
|
|
50
|
+
(0, _react.useEffect)(function () {
|
|
51
|
+
var tabCurrent = tabContainerRef.current;
|
|
52
|
+
if (!tabCurrent) return;
|
|
53
|
+
setIsShowScrollBtn(tabCurrent.scrollWidth - 2 > tabCurrent.clientWidth);
|
|
54
|
+
}, [context.luckysheetfile]);
|
|
55
|
+
var onAddSheetClick = (0, _react.useCallback)(function () {
|
|
56
|
+
return setTimeout(function () {
|
|
57
|
+
setContext(function (draftCtx) {
|
|
58
|
+
if (draftCtx.luckysheetCellUpdate.length > 0) {
|
|
59
|
+
(0, _fortuneCore.updateCell)(draftCtx, draftCtx.luckysheetCellUpdate[0], draftCtx.luckysheetCellUpdate[1], refs.cellInput.current);
|
|
60
|
+
}
|
|
61
|
+
(0, _fortuneCore.addSheet)(draftCtx, settings);
|
|
62
|
+
}, {
|
|
63
|
+
addSheetOp: true
|
|
64
|
+
});
|
|
65
|
+
var tabCurrent = tabContainerRef.current;
|
|
66
|
+
setIsShowScrollBtn(tabCurrent.scrollWidth > tabCurrent.clientWidth);
|
|
67
|
+
});
|
|
68
|
+
}, [refs.cellInput, setContext, settings]);
|
|
69
|
+
var _d = (0, _react.useState)(true),
|
|
70
|
+
showDisclaimer = _d[0],
|
|
71
|
+
setShowDisclaimer = _d[1];
|
|
72
|
+
var handleCloseDisclaimer = function handleCloseDisclaimer() {
|
|
73
|
+
setShowDisclaimer(false);
|
|
74
|
+
var cornerPlus = document.getElementById("corner-plus");
|
|
75
|
+
if (cornerPlus) {
|
|
76
|
+
cornerPlus.style.display = "block";
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
(0, _react.useEffect)(function () {
|
|
80
|
+
var cornerPlus = document.getElementById("corner-plus");
|
|
81
|
+
if (cornerPlus) {
|
|
82
|
+
cornerPlus.style.display = "none";
|
|
83
|
+
}
|
|
84
|
+
}, [isMobile]);
|
|
85
|
+
(0, _react.useEffect)(function () {
|
|
86
|
+
var _a;
|
|
87
|
+
(_a = settings.onSheetCountChange) === null || _a === void 0 ? void 0 : _a.call(settings, context.luckysheetfile.length);
|
|
88
|
+
}, [context.luckysheetfile.length]);
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement("div", null, showDisclaimer && (/*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
className: "w-full",
|
|
91
|
+
id: "denomination-warning",
|
|
92
|
+
style: {
|
|
93
|
+
zIndex: 1003,
|
|
94
|
+
position: "absolute",
|
|
95
|
+
display: "none",
|
|
96
|
+
bottom: "31px",
|
|
97
|
+
backgroundColor: "#F8F9FA",
|
|
98
|
+
borderBottom: "1px solid #E8EBEC",
|
|
99
|
+
color: "#77818A",
|
|
100
|
+
fontFamily: "Helvetica Neue",
|
|
101
|
+
fontSize: "var(--font-size-2xsm, 12px)",
|
|
102
|
+
fontStyle: "normal",
|
|
103
|
+
fontWeight: "400"
|
|
104
|
+
}
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: "max-w-7xl mx-auto px-4 py-1 ".concat(isMobile && "w-full flex justify-between")
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
108
|
+
className: "".concat(isMobile ? "text-left" : "text-center", " text-xsm")
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
110
|
+
className: "font-medium"
|
|
111
|
+
}, "Disclaimer:"), " Prices are not updated in real time and may differ slightly. Updates may be delayed by up to 20 minutes."), isMobile && (/*#__PURE__*/_react.default.createElement("p", {
|
|
112
|
+
className: "ml-4 content-center cursor-pointer",
|
|
113
|
+
style: {
|
|
114
|
+
alignContent: "center"
|
|
115
|
+
},
|
|
116
|
+
onClick: handleCloseDisclaimer
|
|
117
|
+
}, "Close"))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: "luckysheet-sheet-area luckysheet-noselected-text",
|
|
119
|
+
onContextMenu: function onContextMenu(e) {
|
|
120
|
+
return e.preventDefault();
|
|
121
|
+
},
|
|
122
|
+
id: "luckysheet-sheet-area"
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
id: "luckysheet-sheet-content"
|
|
125
|
+
}, context.allowEdit && (/*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
className: "fortune-sheettab-button",
|
|
127
|
+
onClick: onAddSheetClick
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
129
|
+
name: "plus",
|
|
130
|
+
width: 16,
|
|
131
|
+
height: 16
|
|
132
|
+
}))), context.allowEdit && (/*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
+
className: "sheet-list-container"
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
id: "all-sheets",
|
|
136
|
+
className: "fortune-sheettab-button",
|
|
137
|
+
ref: tabContainerRef,
|
|
138
|
+
onMouseDown: function onMouseDown(e) {
|
|
139
|
+
e.stopPropagation();
|
|
140
|
+
setContext(function (ctx) {
|
|
141
|
+
ctx.showSheetList = _lodash.default.isUndefined(ctx.showSheetList) ? true : !ctx.showSheetList;
|
|
142
|
+
ctx.sheetTabContextMenu = {};
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
146
|
+
name: "all-sheets",
|
|
147
|
+
width: 16,
|
|
148
|
+
height: 16
|
|
149
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
id: "luckysheet-sheets-m",
|
|
151
|
+
className: "luckysheet-sheets-m lucky-button-custom"
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
153
|
+
className: "iconfont luckysheet-iconfont-caidan2"
|
|
154
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
155
|
+
className: "fortune-sheettab-container",
|
|
156
|
+
id: "fortune-sheettab-container"
|
|
157
|
+
}, !isShowBoundary && /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
+
className: "boundary boundary-left"
|
|
159
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
+
className: "fortune-sheettab-container-c",
|
|
161
|
+
id: "fortune-sheettab-container-c",
|
|
162
|
+
ref: tabContainerRef
|
|
163
|
+
}, _lodash.default.sortBy(context.luckysheetfile, function (s) {
|
|
164
|
+
return Number(s.order);
|
|
165
|
+
}).map(function (sheet) {
|
|
166
|
+
return /*#__PURE__*/_react.default.createElement(_SheetItem.default, {
|
|
167
|
+
key: sheet.id,
|
|
168
|
+
sheet: sheet
|
|
169
|
+
});
|
|
170
|
+
})), isShowBoundary && isShowScrollBtn && (/*#__PURE__*/_react.default.createElement("div", {
|
|
171
|
+
className: "boundary boundary-right"
|
|
172
|
+
}))), isShowScrollBtn && (/*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
+
id: "fortune-sheettab-leftscroll",
|
|
174
|
+
className: "fortune-sheettab-scroll",
|
|
175
|
+
ref: leftScrollRef,
|
|
176
|
+
onClick: function onClick() {
|
|
177
|
+
scrollBy(-scrollDelta);
|
|
178
|
+
},
|
|
179
|
+
tabIndex: 0
|
|
180
|
+
}, /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
181
|
+
name: "arrow-doubleleft",
|
|
182
|
+
width: 12,
|
|
183
|
+
height: 12
|
|
184
|
+
}))), isShowScrollBtn && (/*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
id: "fortune-sheettab-rightscroll",
|
|
186
|
+
className: "fortune-sheettab-scroll",
|
|
187
|
+
ref: rightScrollRef,
|
|
188
|
+
onClick: function onClick() {
|
|
189
|
+
scrollBy(scrollDelta);
|
|
190
|
+
},
|
|
191
|
+
tabIndex: 0
|
|
192
|
+
}, /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
193
|
+
name: "arrow-doubleright",
|
|
194
|
+
width: 12,
|
|
195
|
+
height: 12
|
|
196
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
197
|
+
className: "fortune-sheet-area-right"
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement(_ZoomControl.default, null))));
|
|
199
|
+
};
|
|
200
|
+
var _default = exports.default = SheetTab;
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
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.SplitColumn = void 0;
|
|
8
|
+
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
9
|
+
var _ui = require("@fileverse/ui");
|
|
10
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _context = _interopRequireDefault(require("../../context"));
|
|
13
|
+
var _useDialog = require("../../hooks/useDialog");
|
|
14
|
+
require("./index.css");
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
var SplitColumn = exports.SplitColumn = function SplitColumn() {
|
|
18
|
+
var _a = (0, _react.useContext)(_context.default),
|
|
19
|
+
context = _a.context,
|
|
20
|
+
setContext = _a.setContext;
|
|
21
|
+
var _b = (0, _fortuneCore.locale)(context),
|
|
22
|
+
splitText = _b.splitText,
|
|
23
|
+
button = _b.button;
|
|
24
|
+
var _c = (0, _react.useState)(""),
|
|
25
|
+
splitOperate = _c[0],
|
|
26
|
+
setSplitOperate = _c[1];
|
|
27
|
+
var _d = (0, _react.useState)(false),
|
|
28
|
+
otherFlag = _d[0],
|
|
29
|
+
setOtherFlag = _d[1];
|
|
30
|
+
var _e = (0, _react.useState)([]),
|
|
31
|
+
tableData = _e[0],
|
|
32
|
+
setTableData = _e[1];
|
|
33
|
+
var splitSymbols = (0, _react.useRef)(null);
|
|
34
|
+
var _f = (0, _useDialog.useDialog)(),
|
|
35
|
+
showDialog = _f.showDialog,
|
|
36
|
+
hideDialog = _f.hideDialog;
|
|
37
|
+
var certainBtn = (0, _react.useCallback)(function () {
|
|
38
|
+
hideDialog();
|
|
39
|
+
var dataArr = (0, _fortuneCore.getDataArr)(splitOperate, context);
|
|
40
|
+
var r = context.luckysheet_select_save[0].row[0];
|
|
41
|
+
var c = context.luckysheet_select_save[0].column[0];
|
|
42
|
+
if (dataArr[0].length === 1) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
var dataCover = false;
|
|
46
|
+
var data = (0, _fortuneCore.getFlowdata)(context);
|
|
47
|
+
for (var i = 0; i < dataArr.length; i += 1) {
|
|
48
|
+
for (var j = 1; j < dataArr[0].length; j += 1) {
|
|
49
|
+
var cell = data[r + i][c + j];
|
|
50
|
+
if (!_lodash.default.isNull(cell) && !_lodash.default.isNull(cell.v)) {
|
|
51
|
+
dataCover = true;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (dataCover) {
|
|
57
|
+
showDialog(splitText.splitConfirmToExe, "yesno", undefined, undefined, undefined, function () {
|
|
58
|
+
hideDialog();
|
|
59
|
+
setContext(function (ctx) {
|
|
60
|
+
(0, _fortuneCore.updateMoreCell)(r, c, dataArr, ctx);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
} else {
|
|
64
|
+
setContext(function (ctx) {
|
|
65
|
+
(0, _fortuneCore.updateMoreCell)(r, c, dataArr, ctx);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, [context, hideDialog, setContext, showDialog, splitOperate, splitText.splitConfirmToExe]);
|
|
69
|
+
(0, _react.useEffect)(function () {
|
|
70
|
+
setTableData(function (table) {
|
|
71
|
+
table = (0, _fortuneCore.getDataArr)(splitOperate, context);
|
|
72
|
+
return table;
|
|
73
|
+
});
|
|
74
|
+
}, [context, splitOperate]);
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
id: "fortune-split-column"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
+
className: "splitDataPreview text-heading-xsm"
|
|
79
|
+
}, splitText.splitDataPreview), /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
+
className: "splitColumnData"
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tbody", null, tableData.map(function (o, index) {
|
|
82
|
+
if (o.length >= 1) {
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement("tr", {
|
|
84
|
+
key: index
|
|
85
|
+
}, o.map(function (o1) {
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
87
|
+
key: o + o1
|
|
88
|
+
}, o1);
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null));
|
|
92
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
+
className: "splitDelimiters text-heading-xsm !mt-4"
|
|
94
|
+
}, "Separator"), /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: "splitSymbols flex gap-3 flex-wrap",
|
|
96
|
+
ref: splitSymbols
|
|
97
|
+
}, splitText.splitSymbols.map(function (o) {
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
key: o.value,
|
|
100
|
+
className: "splitSymbol flex gap-2 items-center"
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
102
|
+
id: o.value,
|
|
103
|
+
name: o.value,
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
onClick: function onClick() {
|
|
106
|
+
setSplitOperate(function (regStr) {
|
|
107
|
+
var _a;
|
|
108
|
+
return (0, _fortuneCore.getRegStr)(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
tabIndex: 0
|
|
112
|
+
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
113
|
+
htmlFor: o.value,
|
|
114
|
+
className: "text-body-sm"
|
|
115
|
+
}, o.name));
|
|
116
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
117
|
+
className: "splitSymbol flex gap-2 items-center pb-4 mb-4 border-b"
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
119
|
+
id: "other",
|
|
120
|
+
name: "other",
|
|
121
|
+
type: "checkbox",
|
|
122
|
+
onClick: function onClick() {
|
|
123
|
+
setOtherFlag(!otherFlag);
|
|
124
|
+
setSplitOperate(function (regStr) {
|
|
125
|
+
var _a;
|
|
126
|
+
return (0, _fortuneCore.getRegStr)(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
tabIndex: 0
|
|
130
|
+
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
131
|
+
htmlFor: "other"
|
|
132
|
+
}, "Custom"), /*#__PURE__*/_react.default.createElement(_ui.TextField, {
|
|
133
|
+
placeholder: "Custom separator",
|
|
134
|
+
id: "otherValue",
|
|
135
|
+
name: "otherValue",
|
|
136
|
+
type: "text",
|
|
137
|
+
onBlur: function onBlur() {
|
|
138
|
+
if (otherFlag) {
|
|
139
|
+
setSplitOperate(function (regStr) {
|
|
140
|
+
var _a;
|
|
141
|
+
return (0, _fortuneCore.getRegStr)(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
146
|
+
className: "splitSymbol flex gap-2 mb-4 items-center"
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
148
|
+
id: "splitsimple",
|
|
149
|
+
name: "splitsimple",
|
|
150
|
+
type: "checkbox",
|
|
151
|
+
onClick: function onClick() {
|
|
152
|
+
setSplitOperate(function (regStr) {
|
|
153
|
+
var _a;
|
|
154
|
+
return (0, _fortuneCore.getRegStr)(regStr, (_a = splitSymbols.current) === null || _a === void 0 ? void 0 : _a.childNodes);
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
tabIndex: 0
|
|
158
|
+
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
159
|
+
htmlFor: "splitsimple"
|
|
160
|
+
}, splitText.splitContinueSymbol)), /*#__PURE__*/_react.default.createElement("div", {
|
|
161
|
+
className: "flex justify-end gap-2"
|
|
162
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
163
|
+
className: "",
|
|
164
|
+
variant: "secondary",
|
|
165
|
+
onClick: function onClick() {
|
|
166
|
+
hideDialog();
|
|
167
|
+
},
|
|
168
|
+
tabIndex: 0
|
|
169
|
+
}, button.cancel), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
170
|
+
className: "",
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
certainBtn();
|
|
173
|
+
},
|
|
174
|
+
tabIndex: 0
|
|
175
|
+
}, "Split")));
|
|
176
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _ui = require("@fileverse/ui");
|
|
9
|
+
var _ = require(".");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
var Button = function Button(_a) {
|
|
12
|
+
var tooltip = _a.tooltip,
|
|
13
|
+
onClick = _a.onClick,
|
|
14
|
+
iconId = _a.iconId,
|
|
15
|
+
disabled = _a.disabled,
|
|
16
|
+
selected = _a.selected,
|
|
17
|
+
children = _a.children,
|
|
18
|
+
style = _a.style;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
20
|
+
text: tooltip,
|
|
21
|
+
placement: "bottom"
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
className: "fortune-toolbar-button fortune-toolbar-item",
|
|
24
|
+
onClick: onClick,
|
|
25
|
+
tabIndex: 0,
|
|
26
|
+
role: "button",
|
|
27
|
+
style: selected ? {
|
|
28
|
+
backgroundColor: "#FFDF0A"
|
|
29
|
+
} : style
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
31
|
+
name: (0, _.getLucideIcon)(iconId),
|
|
32
|
+
width: 16,
|
|
33
|
+
height: 16,
|
|
34
|
+
style: disabled ? {
|
|
35
|
+
opacity: 0.3
|
|
36
|
+
} : {}
|
|
37
|
+
}), children));
|
|
38
|
+
};
|
|
39
|
+
var _default = exports.default = Button;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
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"]];
|
|
10
|
+
var ColorPicker = function ColorPicker(_a) {
|
|
11
|
+
var onPick = _a.onPick;
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
13
|
+
className: "fortune-toolbar-color-picker"
|
|
14
|
+
}, palette.map(function (rows, i) {
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
16
|
+
key: i,
|
|
17
|
+
className: "fortune-toolbar-color-picker-row"
|
|
18
|
+
}, rows.map(function (c) {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
+
key: c,
|
|
21
|
+
className: "fortune-toolbar-color-picker-item",
|
|
22
|
+
onClick: function onClick() {
|
|
23
|
+
return onPick(c);
|
|
24
|
+
},
|
|
25
|
+
tabIndex: 0,
|
|
26
|
+
style: {
|
|
27
|
+
backgroundColor: c,
|
|
28
|
+
border: c === "#ffffff" ? "1px solid #E8EBEC" : "none"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}));
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = ColorPicker;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
tooltip: string;
|
|
4
|
+
iconId?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
showArrow?: boolean;
|
|
7
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
8
|
+
children: (setOpen: React.Dispatch<React.SetStateAction<boolean>>) => React.ReactNode;
|
|
9
|
+
fillColor?: string;
|
|
10
|
+
triggerRef?: React.RefObject<HTMLButtonElement | null>;
|
|
11
|
+
};
|
|
12
|
+
declare const Combo: React.FC<Props>;
|
|
13
|
+
export default Combo;
|