@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,67 @@
|
|
|
1
|
+
.crypto-denomination-selector {
|
|
2
|
+
min-width: 240px;
|
|
3
|
+
font-family: inherit;
|
|
4
|
+
color: hsl(var(--color-text-default));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cds-row {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
line-height: 20px;
|
|
13
|
+
}
|
|
14
|
+
.cds-row input[type="number"] {
|
|
15
|
+
width: 40px;
|
|
16
|
+
height: 28px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
border: 1px solid hsl(var(--color-border-default));
|
|
19
|
+
border-radius: 6px;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
padding: 0 4px;
|
|
22
|
+
margin: 0 4px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Chrome, Safari, Edge, Opera */
|
|
26
|
+
.cds-row input::-webkit-outer-spin-button,
|
|
27
|
+
.cds-row input::-webkit-inner-spin-button {
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Firefox */
|
|
33
|
+
.cds-row input[type=number] {
|
|
34
|
+
-moz-appearance: textfield;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cds-list {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 2px;
|
|
41
|
+
margin-top: 8px;
|
|
42
|
+
}
|
|
43
|
+
.cds-option {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: 10px;
|
|
47
|
+
padding: 8px 12px;
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
line-height: 20px;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
transition: background 0.13s;
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
.cds-option.selected {
|
|
56
|
+
background: hsl(var(--color-bg-default-selected));
|
|
57
|
+
}
|
|
58
|
+
.cds-option:hover {
|
|
59
|
+
background: hsl(var(--color-bg-default-hover));
|
|
60
|
+
}
|
|
61
|
+
.cds-icon {
|
|
62
|
+
width: 16px;
|
|
63
|
+
height: 16px;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
background-size: contain;
|
|
66
|
+
background-repeat: no-repeat;
|
|
67
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
interface CryptoDenominationSelectorProps {
|
|
4
|
+
initialDecimals?: number;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const CryptoDenominationSelector: React.FC<CryptoDenominationSelectorProps>;
|
|
8
|
+
export default CryptoDenominationSelector;
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) {
|
|
3
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4
|
+
resolve(value);
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) {
|
|
9
|
+
try {
|
|
10
|
+
step(generator.next(value));
|
|
11
|
+
} catch (e) {
|
|
12
|
+
reject(e);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function rejected(value) {
|
|
16
|
+
try {
|
|
17
|
+
step(generator["throw"](value));
|
|
18
|
+
} catch (e) {
|
|
19
|
+
reject(e);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function step(result) {
|
|
23
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24
|
+
}
|
|
25
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var __generator = this && this.__generator || function (thisArg, body) {
|
|
29
|
+
var _ = {
|
|
30
|
+
label: 0,
|
|
31
|
+
sent: function sent() {
|
|
32
|
+
if (t[0] & 1) throw t[1];
|
|
33
|
+
return t[1];
|
|
34
|
+
},
|
|
35
|
+
trys: [],
|
|
36
|
+
ops: []
|
|
37
|
+
},
|
|
38
|
+
f,
|
|
39
|
+
y,
|
|
40
|
+
t,
|
|
41
|
+
g;
|
|
42
|
+
return g = {
|
|
43
|
+
next: verb(0),
|
|
44
|
+
"throw": verb(1),
|
|
45
|
+
"return": verb(2)
|
|
46
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
47
|
+
return this;
|
|
48
|
+
}), g;
|
|
49
|
+
function verb(n) {
|
|
50
|
+
return function (v) {
|
|
51
|
+
return step([n, v]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0:
|
|
61
|
+
case 1:
|
|
62
|
+
t = op;
|
|
63
|
+
break;
|
|
64
|
+
case 4:
|
|
65
|
+
_.label++;
|
|
66
|
+
return {
|
|
67
|
+
value: op[1],
|
|
68
|
+
done: false
|
|
69
|
+
};
|
|
70
|
+
case 5:
|
|
71
|
+
_.label++;
|
|
72
|
+
y = op[1];
|
|
73
|
+
op = [0];
|
|
74
|
+
continue;
|
|
75
|
+
case 7:
|
|
76
|
+
op = _.ops.pop();
|
|
77
|
+
_.trys.pop();
|
|
78
|
+
continue;
|
|
79
|
+
default:
|
|
80
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
81
|
+
_ = 0;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
85
|
+
_.label = op[1];
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
89
|
+
_.label = t[1];
|
|
90
|
+
t = op;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
if (t && _.label < t[2]) {
|
|
94
|
+
_.label = t[2];
|
|
95
|
+
_.ops.push(op);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
if (t[2]) _.ops.pop();
|
|
99
|
+
_.trys.pop();
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
op = body.call(thisArg, _);
|
|
103
|
+
} catch (e) {
|
|
104
|
+
op = [6, e];
|
|
105
|
+
y = 0;
|
|
106
|
+
} finally {
|
|
107
|
+
f = t = 0;
|
|
108
|
+
}
|
|
109
|
+
if (op[0] & 5) throw op[1];
|
|
110
|
+
return {
|
|
111
|
+
value: op[0] ? op[1] : void 0,
|
|
112
|
+
done: true
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
import React, { useState, useContext, useCallback, useMemo } from "react";
|
|
117
|
+
import { getFlowdata, normalizedCellAttr } from "@fileverse-dev/fortune-core";
|
|
118
|
+
import { IconButton, LucideIcon, Popover, PopoverContent, PopoverTrigger } from "@fileverse/ui";
|
|
119
|
+
import "./index.css";
|
|
120
|
+
import SVGIcon from "../SVGIcon";
|
|
121
|
+
import WorkbookContext from "../../context";
|
|
122
|
+
import { convertCellsToCrypto } from "../../utils/convertCellsToCrypto";
|
|
123
|
+
import { updateCellsDecimalFormat } from "../../utils/updateCellsDecimalFormat";
|
|
124
|
+
var CRYPTO_OPTIONS = [{
|
|
125
|
+
label: "Bitcoin (BTC)",
|
|
126
|
+
value: "BTC",
|
|
127
|
+
icon: "Btc"
|
|
128
|
+
}, {
|
|
129
|
+
label: "Ethereum (ETH)",
|
|
130
|
+
value: "ETH",
|
|
131
|
+
icon: "Ethereum"
|
|
132
|
+
}, {
|
|
133
|
+
label: "Solana (SOL)",
|
|
134
|
+
value: "SOL",
|
|
135
|
+
icon: "Solana"
|
|
136
|
+
}];
|
|
137
|
+
var CryptoDenominationSelector = function CryptoDenominationSelector(_a) {
|
|
138
|
+
var _b = _a.initialDecimals,
|
|
139
|
+
initialDecimals = _b === void 0 ? 6 : _b,
|
|
140
|
+
children = _a.children;
|
|
141
|
+
var _c = useContext(WorkbookContext),
|
|
142
|
+
setContext = _c.setContext,
|
|
143
|
+
context = _c.context;
|
|
144
|
+
var activeCryptoCurrency = useMemo(function () {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
var firstSelection = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0];
|
|
147
|
+
var flowdata = getFlowdata(context);
|
|
148
|
+
if (!firstSelection || !flowdata) return null;
|
|
149
|
+
var row = firstSelection.row_focus;
|
|
150
|
+
var col = firstSelection.column_focus;
|
|
151
|
+
if (row == null || col == null) return null;
|
|
152
|
+
var cell = (_b = flowdata[row]) === null || _b === void 0 ? void 0 : _b[col];
|
|
153
|
+
if (!cell) return null;
|
|
154
|
+
var curr = normalizedCellAttr(cell, "ct");
|
|
155
|
+
if (!(curr === null || curr === void 0 ? void 0 : curr.fa)) return null;
|
|
156
|
+
var found = CRYPTO_OPTIONS.find(function (option) {
|
|
157
|
+
return curr.fa.includes(option.value);
|
|
158
|
+
});
|
|
159
|
+
return found ? found.value : null;
|
|
160
|
+
}, [context]);
|
|
161
|
+
var _d = useState(initialDecimals),
|
|
162
|
+
decimals = _d[0],
|
|
163
|
+
setDecimals = _d[1];
|
|
164
|
+
var _e = useState(false),
|
|
165
|
+
open = _e[0],
|
|
166
|
+
setOpen = _e[1];
|
|
167
|
+
var handleDenominationChange = useCallback(function (newDenomination) {
|
|
168
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
169
|
+
return __generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0:
|
|
172
|
+
return [4, convertCellsToCrypto({
|
|
173
|
+
context: context,
|
|
174
|
+
setContext: setContext,
|
|
175
|
+
denomination: newDenomination,
|
|
176
|
+
decimals: decimals
|
|
177
|
+
})];
|
|
178
|
+
case 1:
|
|
179
|
+
_a.sent();
|
|
180
|
+
return [2];
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}, [context, setContext, decimals]);
|
|
185
|
+
var handleDecimalsChange = useCallback(function (newDecimals) {
|
|
186
|
+
setDecimals(newDecimals);
|
|
187
|
+
updateCellsDecimalFormat({
|
|
188
|
+
context: context,
|
|
189
|
+
setContext: setContext,
|
|
190
|
+
decimals: newDecimals
|
|
191
|
+
});
|
|
192
|
+
}, [context, setContext]);
|
|
193
|
+
var handleTriggerClick = useCallback(function (e) {
|
|
194
|
+
e.preventDefault();
|
|
195
|
+
e.stopPropagation();
|
|
196
|
+
if (context.allowEdit === false) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
setOpen(!open);
|
|
200
|
+
}, [open, context.allowEdit]);
|
|
201
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
202
|
+
open: open,
|
|
203
|
+
onOpenChange: setOpen
|
|
204
|
+
}, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
205
|
+
asChild: true
|
|
206
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
207
|
+
onClick: handleTriggerClick
|
|
208
|
+
}, children)), /*#__PURE__*/React.createElement(PopoverContent, {
|
|
209
|
+
align: "end",
|
|
210
|
+
side: "bottom",
|
|
211
|
+
sideOffset: 4,
|
|
212
|
+
className: "p-2"
|
|
213
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
214
|
+
className: "crypto-denomination-selector"
|
|
215
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
className: "cds-row px-2"
|
|
217
|
+
}, /*#__PURE__*/React.createElement("span", null, "Decimal places:"), /*#__PURE__*/React.createElement("span", {
|
|
218
|
+
className: "flex items-center"
|
|
219
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
220
|
+
icon: "Minus",
|
|
221
|
+
variant: "ghost",
|
|
222
|
+
size: "sm",
|
|
223
|
+
className: "!bg-transparent",
|
|
224
|
+
disabled: decimals === 1,
|
|
225
|
+
onClick: function onClick() {
|
|
226
|
+
return handleDecimalsChange(Math.max(1, decimals - 1));
|
|
227
|
+
}
|
|
228
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
229
|
+
type: "number",
|
|
230
|
+
min: 1,
|
|
231
|
+
max: 18,
|
|
232
|
+
value: decimals,
|
|
233
|
+
onChange: function onChange(e) {
|
|
234
|
+
return handleDecimalsChange(Math.max(1, Math.min(18, Number(e.target.value))));
|
|
235
|
+
}
|
|
236
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
237
|
+
icon: "Plus",
|
|
238
|
+
variant: "ghost",
|
|
239
|
+
size: "sm",
|
|
240
|
+
className: "!bg-transparent",
|
|
241
|
+
disabled: decimals === 18,
|
|
242
|
+
onClick: function onClick() {
|
|
243
|
+
return handleDecimalsChange(Math.min(18, decimals + 1));
|
|
244
|
+
}
|
|
245
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
246
|
+
className: "cds-list"
|
|
247
|
+
}, CRYPTO_OPTIONS.map(function (opt) {
|
|
248
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
249
|
+
key: opt.value,
|
|
250
|
+
className: "flex items-center justify-between cds-option".concat(activeCryptoCurrency === opt.value ? " selected" : ""),
|
|
251
|
+
onClick: function onClick() {
|
|
252
|
+
return handleDenominationChange(opt.value);
|
|
253
|
+
}
|
|
254
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
255
|
+
className: "flex items-center gap-2"
|
|
256
|
+
}, activeCryptoCurrency === opt.value ? (/*#__PURE__*/React.createElement(LucideIcon, {
|
|
257
|
+
name: "Check",
|
|
258
|
+
className: "w-4 h-4"
|
|
259
|
+
})) : (/*#__PURE__*/React.createElement("div", {
|
|
260
|
+
className: "w-4 h-4"
|
|
261
|
+
})), opt.label), /*#__PURE__*/React.createElement(LucideIcon, {
|
|
262
|
+
name: opt.icon,
|
|
263
|
+
className: "cds-icon"
|
|
264
|
+
}), opt.value === "SOL" && (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
265
|
+
name: "solana",
|
|
266
|
+
width: 16,
|
|
267
|
+
height: 16
|
|
268
|
+
})));
|
|
269
|
+
})))));
|
|
270
|
+
};
|
|
271
|
+
export default CryptoDenominationSelector;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.fortune-sort-title {
|
|
2
|
+
background-color: #fff;
|
|
3
|
+
color: #000;
|
|
4
|
+
cursor: default;
|
|
5
|
+
font-size: 16px;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
line-height: 24px;
|
|
8
|
+
margin: 0 0 16px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fortune-sort-modal > div {
|
|
12
|
+
margin-bottom: 10px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.fortune-sort-tablec td {
|
|
16
|
+
padding: 5px;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.fortune-sort-button {
|
|
21
|
+
margin-top: 10px;
|
|
22
|
+
margin-bottom: 25px;
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
declare const CustomSort: React.FC<{}>;
|
|
4
|
-
export default CustomSort;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
declare const CustomSort: React.FC<{}>;
|
|
4
|
+
export default CustomSort;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { getSheetIndex, indexToColumnChar, locale, sortSelection } from "@fileverse-dev/fortune-core";
|
|
2
|
+
import React, { useCallback, useContext, useEffect, useState } from "react";
|
|
3
|
+
import WorkbookContext from "../../context";
|
|
4
|
+
import "./index.css";
|
|
5
|
+
import { useDialog } from "../../hooks/useDialog";
|
|
6
|
+
var CustomSort = function CustomSort() {
|
|
7
|
+
var _a = useState([]),
|
|
8
|
+
rangeColChar = _a[0],
|
|
9
|
+
setRangeColChar = _a[1];
|
|
10
|
+
var _b = useState(true),
|
|
11
|
+
ascOrDesc = _b[0],
|
|
12
|
+
setAscOrDesc = _b[1];
|
|
13
|
+
var _c = useContext(WorkbookContext),
|
|
14
|
+
context = _c.context,
|
|
15
|
+
setContext = _c.setContext;
|
|
16
|
+
var _d = useState("0"),
|
|
17
|
+
selectedValue = _d[0],
|
|
18
|
+
setSelectedValue = _d[1];
|
|
19
|
+
var _e = useState(false),
|
|
20
|
+
isTitleChange = _e[0],
|
|
21
|
+
setIstitleChange = _e[1];
|
|
22
|
+
var sort = locale(context).sort;
|
|
23
|
+
var hideDialog = useDialog().hideDialog;
|
|
24
|
+
var col_start = context.luckysheet_select_save[0].column[0];
|
|
25
|
+
var col_end = context.luckysheet_select_save[0].column[1];
|
|
26
|
+
var row_start = context.luckysheet_select_save[0].row[0];
|
|
27
|
+
var row_end = context.luckysheet_select_save[0].row[1];
|
|
28
|
+
var sheetIndex = getSheetIndex(context, context.currentSheetId);
|
|
29
|
+
var handleSelectChange = function handleSelectChange(event) {
|
|
30
|
+
setSelectedValue(event.target.value);
|
|
31
|
+
};
|
|
32
|
+
var handleRadioChange = useCallback(function (e) {
|
|
33
|
+
var sortValue = e.target.value;
|
|
34
|
+
setAscOrDesc(sortValue === "asc");
|
|
35
|
+
}, []);
|
|
36
|
+
var handleTitleChange = useCallback(function (e) {
|
|
37
|
+
var value = e.target.checked;
|
|
38
|
+
setIstitleChange(value);
|
|
39
|
+
}, []);
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
var list = [];
|
|
43
|
+
if (isTitleChange) {
|
|
44
|
+
for (var i = col_start; i <= col_end; i += 1) {
|
|
45
|
+
var cell = (_b = (_a = context.luckysheetfile[sheetIndex].data) === null || _a === void 0 ? void 0 : _a[row_start]) === null || _b === void 0 ? void 0 : _b[i];
|
|
46
|
+
var colHeaderValue = (cell === null || cell === void 0 ? void 0 : cell.m) || (cell === null || cell === void 0 ? void 0 : cell.v);
|
|
47
|
+
if (colHeaderValue) {
|
|
48
|
+
list.push(colHeaderValue);
|
|
49
|
+
} else {
|
|
50
|
+
var ColumnChar = indexToColumnChar(i);
|
|
51
|
+
list.push("".concat(sort.columnOperation, " ").concat(ColumnChar));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
for (var i = col_start; i <= col_end; i += 1) {
|
|
56
|
+
var ColumnChar = indexToColumnChar(i);
|
|
57
|
+
list.push(ColumnChar);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
setRangeColChar(list);
|
|
61
|
+
}, [col_end, col_start, context.luckysheetfile, isTitleChange, row_start, sheetIndex, sort.columnOperation]);
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: "fortune-sort"
|
|
64
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: "fortune-sort-title"
|
|
66
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", null, sort.sortRangeTitle), indexToColumnChar(col_start), row_start + 1, /*#__PURE__*/React.createElement("span", null, sort.sortRangeTitleTo), indexToColumnChar(col_end), row_end + 1)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: "fortune-sort-modal"
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
69
|
+
type: "checkbox",
|
|
70
|
+
id: "fortune-sort-haveheader",
|
|
71
|
+
onChange: handleTitleChange
|
|
72
|
+
}), /*#__PURE__*/React.createElement("span", null, sort.hasTitle)), /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "fortune-sort-tablec"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
75
|
+
cellSpacing: "0"
|
|
76
|
+
}, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
77
|
+
style: {
|
|
78
|
+
width: "190px"
|
|
79
|
+
}
|
|
80
|
+
}, sort.sortBy, /*#__PURE__*/React.createElement("select", {
|
|
81
|
+
name: "sort_0",
|
|
82
|
+
onChange: handleSelectChange
|
|
83
|
+
}, rangeColChar.map(function (col, index) {
|
|
84
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
85
|
+
value: index,
|
|
86
|
+
key: index
|
|
87
|
+
}, col);
|
|
88
|
+
}))), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
89
|
+
type: "radio",
|
|
90
|
+
value: "asc",
|
|
91
|
+
defaultChecked: true,
|
|
92
|
+
name: "sort_0",
|
|
93
|
+
onChange: handleRadioChange
|
|
94
|
+
}), /*#__PURE__*/React.createElement("span", null, sort.asc)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
95
|
+
type: "radio",
|
|
96
|
+
value: "desc",
|
|
97
|
+
name: "sort_0",
|
|
98
|
+
onChange: handleRadioChange
|
|
99
|
+
}), /*#__PURE__*/React.createElement("span", null, sort.desc))))))))), /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: "fortune-sort-button"
|
|
101
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
className: "button-basic button-primary",
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
setContext(function (draftCtx) {
|
|
105
|
+
sortSelection(draftCtx, ascOrDesc, parseInt(selectedValue, 10));
|
|
106
|
+
draftCtx.contextMenu = {};
|
|
107
|
+
});
|
|
108
|
+
hideDialog();
|
|
109
|
+
},
|
|
110
|
+
tabIndex: 0
|
|
111
|
+
}, sort.confirm)));
|
|
112
|
+
};
|
|
113
|
+
export default CustomSort;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
declare const DropDownList: React.FC;
|
|
4
|
-
export default DropDownList;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
declare const DropDownList: React.FC;
|
|
4
|
+
export default DropDownList;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { getCellValue, getDropdownList, getFlowdata, getSheetIndex, mergeBorder, setDropdownValue } from "@fileverse-dev/fortune-core";
|
|
2
|
+
import React, { useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
|
+
import WorkbookContext from "../../context";
|
|
4
|
+
import { useOutsideClick } from "../../hooks/useOutsideClick";
|
|
5
|
+
import SVGIcon from "../SVGIcon";
|
|
6
|
+
import "./index.css";
|
|
7
|
+
var DropDownList = function DropDownList() {
|
|
8
|
+
var _a = useContext(WorkbookContext),
|
|
9
|
+
context = _a.context,
|
|
10
|
+
setContext = _a.setContext;
|
|
11
|
+
var containerRef = useRef(null);
|
|
12
|
+
var _b = useState([]),
|
|
13
|
+
list = _b[0],
|
|
14
|
+
setList = _b[1];
|
|
15
|
+
var _c = useState(false),
|
|
16
|
+
isMul = _c[0],
|
|
17
|
+
setIsMul = _c[1];
|
|
18
|
+
var _d = useState(),
|
|
19
|
+
position = _d[0],
|
|
20
|
+
setPosition = _d[1];
|
|
21
|
+
var _e = useState([]),
|
|
22
|
+
selected = _e[0],
|
|
23
|
+
setSelected = _e[1];
|
|
24
|
+
var close = useCallback(function () {
|
|
25
|
+
setContext(function (ctx) {
|
|
26
|
+
ctx.dataVerificationDropDownList = false;
|
|
27
|
+
});
|
|
28
|
+
}, [setContext]);
|
|
29
|
+
useOutsideClick(containerRef, close, [close]);
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
if (!context.luckysheet_select_save) return;
|
|
33
|
+
var last = context.luckysheet_select_save[context.luckysheet_select_save.length - 1];
|
|
34
|
+
var rowIndex = last.row_focus;
|
|
35
|
+
var colIndex = last.column_focus;
|
|
36
|
+
if (rowIndex == null || colIndex == null) return;
|
|
37
|
+
var row = context.visibledatarow[rowIndex];
|
|
38
|
+
var col_pre = colIndex === 0 ? 0 : context.visibledatacolumn[colIndex - 1];
|
|
39
|
+
var d = getFlowdata(context);
|
|
40
|
+
if (!d) return;
|
|
41
|
+
var margeSet = mergeBorder(context, d, rowIndex, colIndex);
|
|
42
|
+
if (margeSet) {
|
|
43
|
+
_a = margeSet.row, row = _a[1];
|
|
44
|
+
_b = margeSet.column, col_pre = _b[0];
|
|
45
|
+
}
|
|
46
|
+
var index = getSheetIndex(context, context.currentSheetId);
|
|
47
|
+
var dataVerification = context.luckysheetfile[index].dataVerification;
|
|
48
|
+
var item = dataVerification["".concat(rowIndex, "_").concat(colIndex)];
|
|
49
|
+
var dropdownList = getDropdownList(context, item.value1);
|
|
50
|
+
var cellValue = getCellValue(rowIndex, colIndex, d);
|
|
51
|
+
if (cellValue) {
|
|
52
|
+
setSelected(cellValue.toString().split(","));
|
|
53
|
+
}
|
|
54
|
+
setList(dropdownList);
|
|
55
|
+
setPosition({
|
|
56
|
+
left: col_pre,
|
|
57
|
+
top: row
|
|
58
|
+
});
|
|
59
|
+
setIsMul(item.type2 === "true");
|
|
60
|
+
}, []);
|
|
61
|
+
useEffect(function () {
|
|
62
|
+
if (!context.luckysheet_select_save) return;
|
|
63
|
+
var last = context.luckysheet_select_save[context.luckysheet_select_save.length - 1];
|
|
64
|
+
var rowIndex = last.row_focus;
|
|
65
|
+
var colIndex = last.column_focus;
|
|
66
|
+
if (rowIndex == null || colIndex == null) return;
|
|
67
|
+
var index = getSheetIndex(context, context.currentSheetId);
|
|
68
|
+
var dataVerification = context.luckysheetfile[index].dataVerification;
|
|
69
|
+
var item = dataVerification["".concat(rowIndex, "_").concat(colIndex)];
|
|
70
|
+
if (item.type2 !== "true") return;
|
|
71
|
+
var d = getFlowdata(context);
|
|
72
|
+
if (!d) return;
|
|
73
|
+
var cellValue = getCellValue(rowIndex, colIndex, d);
|
|
74
|
+
if (cellValue) {
|
|
75
|
+
setSelected(cellValue.toString().split(","));
|
|
76
|
+
}
|
|
77
|
+
}, [context.luckysheetfile]);
|
|
78
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
id: "luckysheet-dataVerification-dropdown-List",
|
|
80
|
+
style: position,
|
|
81
|
+
ref: containerRef,
|
|
82
|
+
onClick: function onClick(e) {
|
|
83
|
+
return e.stopPropagation();
|
|
84
|
+
},
|
|
85
|
+
onChange: function onChange(e) {
|
|
86
|
+
return e.stopPropagation();
|
|
87
|
+
},
|
|
88
|
+
onKeyDown: function onKeyDown(e) {
|
|
89
|
+
return e.stopPropagation();
|
|
90
|
+
},
|
|
91
|
+
onMouseDown: function onMouseDown(e) {
|
|
92
|
+
return e.stopPropagation();
|
|
93
|
+
},
|
|
94
|
+
onMouseUp: function onMouseUp(e) {
|
|
95
|
+
return e.stopPropagation();
|
|
96
|
+
},
|
|
97
|
+
tabIndex: 0
|
|
98
|
+
}, list.map(function (v, i) {
|
|
99
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: "dropdown-List-item",
|
|
101
|
+
key: i,
|
|
102
|
+
onClick: function onClick() {
|
|
103
|
+
setContext(function (ctx) {
|
|
104
|
+
var arr = selected;
|
|
105
|
+
var index = arr.indexOf(v);
|
|
106
|
+
if (index < 0) {
|
|
107
|
+
arr.push(v);
|
|
108
|
+
} else {
|
|
109
|
+
arr.splice(index, 1);
|
|
110
|
+
}
|
|
111
|
+
setSelected(arr);
|
|
112
|
+
setDropdownValue(ctx, v, arr);
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
tabIndex: 0
|
|
116
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
117
|
+
name: "check",
|
|
118
|
+
width: 12,
|
|
119
|
+
style: {
|
|
120
|
+
verticalAlign: "middle",
|
|
121
|
+
display: isMul && selected.indexOf(v) >= 0 ? "inline" : "none"
|
|
122
|
+
}
|
|
123
|
+
}), v);
|
|
124
|
+
}));
|
|
125
|
+
};
|
|
126
|
+
export default DropDownList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.css";
|
|
3
|
-
declare const RangeDialog: React.FC;
|
|
4
|
-
export default RangeDialog;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
declare const RangeDialog: React.FC;
|
|
4
|
+
export default RangeDialog;
|