@fileverse-dev/fortune-react 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/assets/paint-roller.png +0 -0
- package/es/components/ChangeColor/index.css +76 -0
- package/{dist/packages/react/src → es}/components/ChangeColor/index.d.ts +7 -7
- package/es/components/ChangeColor/index.js +41 -0
- package/{dist/packages/react/src → es}/components/ConditionFormat/ConditionRules.d.ts +6 -6
- package/es/components/ConditionFormat/ConditionRules.js +323 -0
- package/es/components/ConditionFormat/index.css +210 -0
- package/{dist/packages/react/src → es}/components/ConditionFormat/index.d.ts +7 -7
- package/es/components/ConditionFormat/index.js +252 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/Divider.d.ts +3 -3
- package/es/components/ContextMenu/Divider.js +7 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/FilterMenu.d.ts +3 -3
- package/es/components/ContextMenu/FilterMenu.js +612 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/Menu.d.ts +8 -8
- package/es/components/ContextMenu/Menu.js +25 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/SheetTab.d.ts +4 -4
- package/es/components/ContextMenu/SheetTab.js +223 -0
- package/es/components/ContextMenu/index.css +322 -0
- package/{dist/packages/react/src → es}/components/ContextMenu/index.d.ts +5 -5
- package/es/components/ContextMenu/index.js +1054 -0
- package/es/components/CryptoDenominationSelector/index.css +67 -0
- package/es/components/CryptoDenominationSelector/index.d.ts +8 -0
- package/es/components/CryptoDenominationSelector/index.js +271 -0
- package/es/components/CustomSort/index.css +23 -0
- package/{dist/packages/react/src → es}/components/CustomSort/index.d.ts +4 -4
- package/es/components/CustomSort/index.js +113 -0
- package/{dist/packages/react/src → es}/components/DataVerification/DropdownList.d.ts +4 -4
- package/es/components/DataVerification/DropdownList.js +126 -0
- package/{dist/packages/react/src → es}/components/DataVerification/RangeDialog.d.ts +4 -4
- package/es/components/DataVerification/RangeDialog.js +105 -0
- package/{dist/packages/react/src → es}/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -2
- package/es/components/DataVerification/getDisplayedRangeTxt.js +9 -0
- package/es/components/DataVerification/index.css +202 -0
- package/{dist/packages/react/src → es}/components/DataVerification/index.d.ts +4 -4
- package/es/components/DataVerification/index.js +398 -0
- package/es/components/Dialog/index.css +64 -0
- package/{dist/packages/react/src → es}/components/Dialog/index.d.ts +15 -15
- package/es/components/Dialog/index.js +72 -0
- package/{dist/packages/react/src → es}/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +11 -11
- package/es/components/DuneChartsInputModal/DuneChartsInputModal.js +95 -0
- package/es/components/DuneChartsInputModal/duneChartsInputModal.css +98 -0
- package/{dist/packages/react/src → es}/components/DunePreview/DunePreview.d.ts +13 -13
- package/es/components/DunePreview/DunePreview.js +46 -0
- package/es/components/DunePreview/index.css +57 -0
- package/{dist/packages/react/src → es}/components/FilterOption/index.d.ts +5 -5
- package/es/components/FilterOption/index.js +121 -0
- package/es/components/FormatSearch/index.css +19 -0
- package/{dist/packages/react/src → es}/components/FormatSearch/index.d.ts +6 -6
- package/es/components/FormatSearch/index.js +133 -0
- package/es/components/FormulaSearch/index.css +65 -0
- package/{dist/packages/react/src → es}/components/FormulaSearch/index.d.ts +5 -5
- package/es/components/FormulaSearch/index.js +198 -0
- package/{dist/packages/react/src → es}/components/FxEditor/NameBox.d.ts +3 -3
- package/es/components/FxEditor/NameBox.js +29 -0
- package/es/components/FxEditor/index.css +72 -0
- package/{dist/packages/react/src → es}/components/FxEditor/index.d.ts +4 -4
- package/es/components/FxEditor/index.js +167 -0
- package/es/components/IFrameBoxs/iFrameBoxs.css +16 -0
- package/{dist/packages/react/src → es}/components/IFrameBoxs/iFrameBoxs.d.ts +4 -4
- package/es/components/IFrameBoxs/iFrameBoxs.js +142 -0
- package/{dist/packages/react/src → es}/components/ImgBoxs/index.d.ts +3 -3
- package/es/components/ImgBoxs/index.js +219 -0
- package/es/components/LinkEidtCard/index.css +255 -0
- package/{dist/packages/react/src → es}/components/LinkEidtCard/index.d.ts +5 -5
- package/es/components/LinkEidtCard/index.js +238 -0
- package/es/components/LocationCondition/index.css +74 -0
- package/{dist/packages/react/src → es}/components/LocationCondition/index.d.ts +3 -3
- package/es/components/LocationCondition/index.js +195 -0
- package/{dist/packages/react/src → es}/components/MessageBox/index.d.ts +9 -9
- package/es/components/MessageBox/index.js +16 -0
- package/{dist/packages/react/src → es}/components/NotationBoxes/index.d.ts +3 -3
- package/es/components/NotationBoxes/index.js +105 -0
- package/{dist/packages/react/src → es}/components/ResetColumnWidth/index.d.ts +2 -2
- package/es/components/ResetColumnWidth/index.js +130 -0
- package/{dist/packages/react/src → es}/components/SVGDefines.d.ts +5 -5
- package/es/components/SVGDefines.js +1961 -0
- package/{dist/packages/react/src → es}/components/SVGIcon.d.ts +9 -9
- package/es/components/SVGIcon.js +18 -0
- package/es/components/SearchReplace/index.css +191 -0
- package/{dist/packages/react/src → es}/components/SearchReplace/index.d.ts +6 -6
- package/es/components/SearchReplace/index.js +285 -0
- package/es/components/Sheet/index.css +27 -0
- package/{dist/packages/react/src → es}/components/Sheet/index.d.ts +8 -8
- package/es/components/Sheet/index.js +176 -0
- package/{dist/packages/react/src → es}/components/SheetList/SheetHiddenButton.d.ts +8 -8
- package/es/components/SheetList/SheetHiddenButton.js +35 -0
- package/{dist/packages/react/src → es}/components/SheetList/SheetListItem.d.ts +9 -9
- package/es/components/SheetList/SheetListItem.js +72 -0
- package/es/components/SheetList/index.css +48 -0
- package/{dist/packages/react/src → es}/components/SheetList/index.d.ts +4 -4
- package/es/components/SheetList/index.js +30 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/ColumnHeader.d.ts +3 -3
- package/es/components/SheetOverlay/ColumnHeader.js +217 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/ContentEditable.d.ts +11 -11
- package/es/components/SheetOverlay/ContentEditable.js +74 -0
- package/es/components/SheetOverlay/FormulaHint/index.css +180 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/FormulaHint/index.d.ts +4 -4
- package/es/components/SheetOverlay/FormulaHint/index.js +348 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -63
- package/es/components/SheetOverlay/FormulaSearch/constant.js +328 -0
- package/es/components/SheetOverlay/FormulaSearch/index.css +44 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/FormulaSearch/index.d.ts +4 -4
- package/es/components/SheetOverlay/FormulaSearch/index.js +261 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/InputBox.d.ts +3 -3
- package/es/components/SheetOverlay/InputBox.js +395 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/RowHeader.d.ts +3 -3
- package/es/components/SheetOverlay/RowHeader.js +187 -0
- package/es/components/SheetOverlay/ScrollBar/index.css +40 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/ScrollBar/index.d.ts +7 -7
- package/es/components/SheetOverlay/ScrollBar/index.js +47 -0
- package/es/components/SheetOverlay/index.css +952 -0
- package/{dist/packages/react/src → es}/components/SheetOverlay/index.d.ts +4 -4
- package/es/components/SheetOverlay/index.js +580 -0
- package/{dist/packages/react/src → es}/components/SheetTab/SheetItem.d.ts +8 -8
- package/es/components/SheetTab/SheetItem.js +230 -0
- package/es/components/SheetTab/index.css +278 -0
- package/{dist/packages/react/src → es}/components/SheetTab/index.d.ts +4 -4
- package/es/components/SheetTab/index.js +191 -0
- package/es/components/SplitColumn/index.css +121 -0
- package/{dist/packages/react/src → es}/components/SplitColumn/index.d.ts +3 -3
- package/es/components/SplitColumn/index.js +167 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Button.d.ts +12 -12
- package/es/components/Toolbar/Button.js +32 -0
- package/{dist/packages/react/src → es}/components/Toolbar/ColorPicker.d.ts +6 -6
- package/es/components/Toolbar/ColorPicker.js +27 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Combo.d.ts +13 -12
- package/es/components/Toolbar/Combo.js +123 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomBorder.d.ts +7 -7
- package/es/components/Toolbar/CustomBorder.js +211 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomButton.d.ts +11 -11
- package/es/components/Toolbar/CustomButton.js +29 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomColor.d.ts +8 -8
- package/es/components/Toolbar/CustomColor.js +25 -0
- package/{dist/packages/react/src → es}/components/Toolbar/CustomIcon.d.ts +9 -9
- package/es/components/Toolbar/CustomIcon.js +38 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Divider.d.ts +4 -4
- package/es/components/Toolbar/Divider.js +12 -0
- package/{dist/packages/react/src → es}/components/Toolbar/MoreItemsContainer.d.ts +6 -6
- package/es/components/Toolbar/MoreItemsContainer.js +17 -0
- package/{dist/packages/react/src → es}/components/Toolbar/Select.d.ts +14 -14
- package/es/components/Toolbar/Select.js +34 -0
- package/es/components/Toolbar/index.css +411 -0
- package/es/components/Toolbar/index.d.ts +16 -0
- package/es/components/Toolbar/index.js +1722 -0
- package/{dist/packages/react/src → es}/components/Workbook/api.d.ts +1186 -1177
- package/es/components/Workbook/api.js +405 -0
- package/es/components/Workbook/index.css +48 -0
- package/{dist/packages/react/src → es}/components/Workbook/index.d.ts +1194 -1185
- package/es/components/Workbook/index.js +749 -0
- package/es/components/ZoomControl/index.css +54 -0
- package/{dist/packages/react/src → es}/components/ZoomControl/index.d.ts +4 -4
- package/es/components/ZoomControl/index.js +111 -0
- package/es/components/index.d.ts +5 -0
- package/es/components/index.js +3 -0
- package/es/constants.d.ts +27 -0
- package/es/constants.js +45 -0
- package/{dist/packages/react/src → es}/context/index.d.ts +25 -25
- package/es/context/index.js +34 -0
- package/{dist/packages/react/src → es}/context/modal.d.ts +10 -10
- package/es/context/modal.js +43 -0
- package/{dist/packages/react/src → es}/hooks/useAlert.d.ts +4 -4
- package/es/hooks/useAlert.js +28 -0
- package/{dist/packages/react/src → es}/hooks/useDialog.d.ts +5 -5
- package/es/hooks/useDialog.js +28 -0
- package/{dist/packages/react/src → es}/hooks/useOutsideClick.d.ts +2 -2
- package/es/hooks/useOutsideClick.js +15 -0
- package/{dist/packages/react/src → es}/hooks/usePrevious.d.ts +2 -2
- package/es/hooks/usePrevious.js +9 -0
- package/es/index.css +27 -0
- package/{dist/packages/react/src → es}/index.d.ts +1 -1
- package/es/index.js +1 -0
- package/es/utils/convertCellsToCrypto.d.ts +8 -0
- package/es/utils/convertCellsToCrypto.js +307 -0
- package/es/utils/cryptoApi.d.ts +3 -0
- package/es/utils/cryptoApi.js +190 -0
- package/{dist/packages/react/src → es}/utils/datepickerStyles.d.ts +2 -2
- package/es/utils/datepickerStyles.js +8 -0
- package/es/utils/updateCellsDecimalFormat.d.ts +6 -0
- package/es/utils/updateCellsDecimalFormat.js +80 -0
- package/lib/assets/paint-roller.png +0 -0
- package/lib/components/ChangeColor/index.css +76 -0
- package/lib/components/ChangeColor/index.d.ts +7 -0
- package/lib/components/ChangeColor/index.js +50 -0
- package/lib/components/ConditionFormat/ConditionRules.d.ts +6 -0
- package/lib/components/ConditionFormat/ConditionRules.js +332 -0
- package/lib/components/ConditionFormat/index.css +210 -0
- package/lib/components/ConditionFormat/index.d.ts +7 -0
- package/lib/components/ConditionFormat/index.js +261 -0
- package/lib/components/ContextMenu/Divider.d.ts +3 -0
- package/lib/components/ContextMenu/Divider.js +14 -0
- package/lib/components/ContextMenu/FilterMenu.d.ts +3 -0
- package/lib/components/ContextMenu/FilterMenu.js +621 -0
- package/lib/components/ContextMenu/Menu.d.ts +8 -0
- package/lib/components/ContextMenu/Menu.js +33 -0
- package/lib/components/ContextMenu/SheetTab.d.ts +4 -0
- package/lib/components/ContextMenu/SheetTab.js +232 -0
- package/lib/components/ContextMenu/index.css +322 -0
- package/lib/components/ContextMenu/index.d.ts +5 -0
- package/lib/components/ContextMenu/index.js +1063 -0
- package/lib/components/CryptoDenominationSelector/index.css +67 -0
- package/lib/components/CryptoDenominationSelector/index.d.ts +8 -0
- package/lib/components/CryptoDenominationSelector/index.js +280 -0
- package/lib/components/CustomSort/index.css +23 -0
- package/lib/components/CustomSort/index.d.ts +4 -0
- package/lib/components/CustomSort/index.js +122 -0
- package/lib/components/DataVerification/DropdownList.d.ts +4 -0
- package/lib/components/DataVerification/DropdownList.js +135 -0
- package/lib/components/DataVerification/RangeDialog.d.ts +4 -0
- package/lib/components/DataVerification/RangeDialog.js +114 -0
- package/lib/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -0
- package/lib/components/DataVerification/getDisplayedRangeTxt.js +15 -0
- package/lib/components/DataVerification/index.css +202 -0
- package/lib/components/DataVerification/index.d.ts +4 -0
- package/lib/components/DataVerification/index.js +407 -0
- package/lib/components/Dialog/index.css +64 -0
- package/lib/components/Dialog/index.d.ts +15 -0
- package/lib/components/Dialog/index.js +81 -0
- package/lib/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +11 -0
- package/lib/components/DuneChartsInputModal/DuneChartsInputModal.js +104 -0
- package/lib/components/DuneChartsInputModal/duneChartsInputModal.css +98 -0
- package/lib/components/DunePreview/DunePreview.d.ts +13 -0
- package/lib/components/DunePreview/DunePreview.js +53 -0
- package/lib/components/DunePreview/index.css +57 -0
- package/lib/components/FilterOption/index.d.ts +5 -0
- package/lib/components/FilterOption/index.js +130 -0
- package/lib/components/FormatSearch/index.css +19 -0
- package/lib/components/FormatSearch/index.d.ts +6 -0
- package/lib/components/FormatSearch/index.js +142 -0
- package/lib/components/FormulaSearch/index.css +65 -0
- package/lib/components/FormulaSearch/index.d.ts +5 -0
- package/lib/components/FormulaSearch/index.js +207 -0
- package/lib/components/FxEditor/NameBox.d.ts +3 -0
- package/lib/components/FxEditor/NameBox.js +38 -0
- package/lib/components/FxEditor/index.css +72 -0
- package/lib/components/FxEditor/index.d.ts +4 -0
- package/lib/components/FxEditor/index.js +176 -0
- package/lib/components/IFrameBoxs/iFrameBoxs.css +16 -0
- package/lib/components/IFrameBoxs/iFrameBoxs.d.ts +4 -0
- package/lib/components/IFrameBoxs/iFrameBoxs.js +151 -0
- package/lib/components/ImgBoxs/index.d.ts +3 -0
- package/lib/components/ImgBoxs/index.js +228 -0
- package/lib/components/LinkEidtCard/index.css +255 -0
- package/lib/components/LinkEidtCard/index.d.ts +5 -0
- package/lib/components/LinkEidtCard/index.js +247 -0
- package/lib/components/LocationCondition/index.css +74 -0
- package/lib/components/LocationCondition/index.d.ts +3 -0
- package/lib/components/LocationCondition/index.js +204 -0
- package/lib/components/MessageBox/index.d.ts +9 -0
- package/lib/components/MessageBox/index.js +23 -0
- package/lib/components/NotationBoxes/index.d.ts +3 -0
- package/lib/components/NotationBoxes/index.js +114 -0
- package/lib/components/ResetColumnWidth/index.d.ts +2 -0
- package/lib/components/ResetColumnWidth/index.js +138 -0
- package/lib/components/SVGDefines.d.ts +5 -0
- package/lib/components/SVGDefines.js +1968 -0
- package/lib/components/SVGIcon.d.ts +9 -0
- package/lib/components/SVGIcon.js +25 -0
- package/lib/components/SearchReplace/index.css +191 -0
- package/lib/components/SearchReplace/index.d.ts +6 -0
- package/lib/components/SearchReplace/index.js +294 -0
- package/lib/components/Sheet/index.css +27 -0
- package/lib/components/Sheet/index.d.ts +8 -0
- package/lib/components/Sheet/index.js +185 -0
- package/lib/components/SheetList/SheetHiddenButton.d.ts +8 -0
- package/lib/components/SheetList/SheetHiddenButton.js +44 -0
- package/lib/components/SheetList/SheetListItem.d.ts +9 -0
- package/lib/components/SheetList/SheetListItem.js +81 -0
- package/lib/components/SheetList/index.css +48 -0
- package/lib/components/SheetList/index.d.ts +4 -0
- package/lib/components/SheetList/index.js +39 -0
- package/lib/components/SheetOverlay/ColumnHeader.d.ts +3 -0
- package/lib/components/SheetOverlay/ColumnHeader.js +226 -0
- package/lib/components/SheetOverlay/ContentEditable.d.ts +11 -0
- package/lib/components/SheetOverlay/ContentEditable.js +83 -0
- package/lib/components/SheetOverlay/FormulaHint/index.css +180 -0
- package/lib/components/SheetOverlay/FormulaHint/index.d.ts +4 -0
- package/lib/components/SheetOverlay/FormulaHint/index.js +357 -0
- package/lib/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -0
- package/lib/components/SheetOverlay/FormulaSearch/constant.js +334 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.css +44 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.d.ts +4 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.js +270 -0
- package/lib/components/SheetOverlay/InputBox.d.ts +3 -0
- package/lib/components/SheetOverlay/InputBox.js +404 -0
- package/lib/components/SheetOverlay/RowHeader.d.ts +3 -0
- package/lib/components/SheetOverlay/RowHeader.js +196 -0
- package/lib/components/SheetOverlay/ScrollBar/index.css +40 -0
- package/lib/components/SheetOverlay/ScrollBar/index.d.ts +7 -0
- package/lib/components/SheetOverlay/ScrollBar/index.js +56 -0
- package/lib/components/SheetOverlay/index.css +952 -0
- package/lib/components/SheetOverlay/index.d.ts +4 -0
- package/lib/components/SheetOverlay/index.js +589 -0
- package/lib/components/SheetTab/SheetItem.d.ts +8 -0
- package/lib/components/SheetTab/SheetItem.js +239 -0
- package/lib/components/SheetTab/index.css +278 -0
- package/lib/components/SheetTab/index.d.ts +4 -0
- package/lib/components/SheetTab/index.js +200 -0
- package/lib/components/SplitColumn/index.css +121 -0
- package/lib/components/SplitColumn/index.d.ts +3 -0
- package/lib/components/SplitColumn/index.js +176 -0
- package/lib/components/Toolbar/Button.d.ts +12 -0
- package/lib/components/Toolbar/Button.js +39 -0
- package/lib/components/Toolbar/ColorPicker.d.ts +6 -0
- package/lib/components/Toolbar/ColorPicker.js +34 -0
- package/lib/components/Toolbar/Combo.d.ts +13 -0
- package/lib/components/Toolbar/Combo.js +132 -0
- package/lib/components/Toolbar/CustomBorder.d.ts +7 -0
- package/lib/components/Toolbar/CustomBorder.js +220 -0
- package/lib/components/Toolbar/CustomButton.d.ts +11 -0
- package/lib/components/Toolbar/CustomButton.js +36 -0
- package/lib/components/Toolbar/CustomColor.d.ts +8 -0
- package/lib/components/Toolbar/CustomColor.js +32 -0
- package/lib/components/Toolbar/CustomIcon.d.ts +9 -0
- package/lib/components/Toolbar/CustomIcon.js +46 -0
- package/lib/components/Toolbar/Divider.d.ts +4 -0
- package/lib/components/Toolbar/Divider.js +19 -0
- package/lib/components/Toolbar/MoreItemsContainer.d.ts +6 -0
- package/lib/components/Toolbar/MoreItemsContainer.js +25 -0
- package/lib/components/Toolbar/Select.d.ts +14 -0
- package/lib/components/Toolbar/Select.js +40 -0
- package/lib/components/Toolbar/index.css +411 -0
- package/lib/components/Toolbar/index.d.ts +16 -0
- package/lib/components/Toolbar/index.js +1731 -0
- package/lib/components/Workbook/api.d.ts +1186 -0
- package/lib/components/Workbook/api.js +412 -0
- package/lib/components/Workbook/index.css +48 -0
- package/{dist/stories/API.stories.d.ts → lib/components/Workbook/index.d.ts} +1194 -1210
- package/lib/components/Workbook/index.js +758 -0
- package/lib/components/ZoomControl/index.css +54 -0
- package/lib/components/ZoomControl/index.d.ts +4 -0
- package/lib/components/ZoomControl/index.js +120 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +26 -0
- package/lib/constants.d.ts +27 -0
- package/lib/constants.js +52 -0
- package/lib/context/index.d.ts +25 -0
- package/lib/context/index.js +41 -0
- package/lib/context/modal.d.ts +10 -0
- package/lib/context/modal.js +50 -0
- package/lib/hooks/useAlert.d.ts +4 -0
- package/lib/hooks/useAlert.js +37 -0
- package/lib/hooks/useDialog.d.ts +5 -0
- package/lib/hooks/useDialog.js +37 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useOutsideClick.js +21 -0
- package/lib/hooks/usePrevious.d.ts +2 -0
- package/lib/hooks/usePrevious.js +15 -0
- package/lib/index.css +27 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +16 -0
- package/lib/utils/convertCellsToCrypto.d.ts +8 -0
- package/lib/utils/convertCellsToCrypto.js +314 -0
- package/lib/utils/cryptoApi.d.ts +3 -0
- package/lib/utils/cryptoApi.js +198 -0
- package/lib/utils/datepickerStyles.d.ts +2 -0
- package/lib/utils/datepickerStyles.js +14 -0
- package/lib/utils/updateCellsDecimalFormat.d.ts +6 -0
- package/lib/utils/updateCellsDecimalFormat.js +86 -0
- package/package.json +8 -7
- package/dist/index.css +0 -3915
- package/dist/index.esm.css +0 -3915
- package/dist/index.esm.js +0 -12975
- package/dist/index.js +0 -12995
- package/dist/index.umd.css +0 -3915
- package/dist/index.umd.js +0 -122445
- package/dist/index.umd.min.css +0 -1
- package/dist/index.umd.min.js +0 -50
- package/dist/packages/core/src/api/cell.d.ts +0 -10
- package/dist/packages/core/src/api/common.d.ts +0 -66
- package/dist/packages/core/src/api/errors.d.ts +0 -2
- package/dist/packages/core/src/api/index.d.ts +0 -9
- package/dist/packages/core/src/api/merge.d.ts +0 -5
- package/dist/packages/core/src/api/range.d.ts +0 -22
- package/dist/packages/core/src/api/rowcol.d.ts +0 -14
- package/dist/packages/core/src/api/sheet.d.ts +0 -10
- package/dist/packages/core/src/api/workbook.d.ts +0 -15
- package/dist/packages/core/src/canvas.d.ts +0 -46
- package/dist/packages/core/src/context.d.ts +0 -197
- package/dist/packages/core/src/events/copy.d.ts +0 -2
- package/dist/packages/core/src/events/index.d.ts +0 -4
- package/dist/packages/core/src/events/keyboard.d.ts +0 -6
- package/dist/packages/core/src/events/mouse.d.ts +0 -22
- package/dist/packages/core/src/events/paste.d.ts +0 -3
- package/dist/packages/core/src/index.d.ts +0 -10
- package/dist/packages/core/src/locale/en.d.ts +0 -992
- package/dist/packages/core/src/locale/es.d.ts +0 -1134
- package/dist/packages/core/src/locale/hi.d.ts +0 -1030
- package/dist/packages/core/src/locale/index.d.ts +0 -1049
- package/dist/packages/core/src/locale/zh.d.ts +0 -1048
- package/dist/packages/core/src/locale/zh_tw.d.ts +0 -1187
- package/dist/packages/core/src/modules/ConditionFormat.d.ts +0 -17
- package/dist/packages/core/src/modules/border.d.ts +0 -3
- package/dist/packages/core/src/modules/cell.d.ts +0 -32
- package/dist/packages/core/src/modules/clipboard.d.ts +0 -3
- package/dist/packages/core/src/modules/color.d.ts +0 -1
- package/dist/packages/core/src/modules/comment.d.ts +0 -97
- package/dist/packages/core/src/modules/conditionalFormat.d.ts +0 -2
- package/dist/packages/core/src/modules/cursor.d.ts +0 -3
- package/dist/packages/core/src/modules/dataVerification.d.ts +0 -11
- package/dist/packages/core/src/modules/dropCell.d.ts +0 -10
- package/dist/packages/core/src/modules/filter.d.ts +0 -45
- package/dist/packages/core/src/modules/format.d.ts +0 -6
- package/dist/packages/core/src/modules/formula.d.ts +0 -54
- package/dist/packages/core/src/modules/freeze.d.ts +0 -5
- package/dist/packages/core/src/modules/hyperlink.d.ts +0 -21
- package/dist/packages/core/src/modules/iframe.d.ts +0 -12
- package/dist/packages/core/src/modules/image.d.ts +0 -31
- package/dist/packages/core/src/modules/index.d.ts +0 -36
- package/dist/packages/core/src/modules/inline-string.d.ts +0 -36
- package/dist/packages/core/src/modules/location.d.ts +0 -6
- package/dist/packages/core/src/modules/locationCondition.d.ts +0 -21
- package/dist/packages/core/src/modules/merge.d.ts +0 -3
- package/dist/packages/core/src/modules/mobile.d.ts +0 -5
- package/dist/packages/core/src/modules/moveCells.d.ts +0 -5
- package/dist/packages/core/src/modules/protection.d.ts +0 -5
- package/dist/packages/core/src/modules/refresh.d.ts +0 -3
- package/dist/packages/core/src/modules/rowcol.d.ts +0 -19
- package/dist/packages/core/src/modules/screenshot.d.ts +0 -2
- package/dist/packages/core/src/modules/searchReplace.d.ts +0 -36
- package/dist/packages/core/src/modules/selection.d.ts +0 -46
- package/dist/packages/core/src/modules/sheet.d.ts +0 -10
- package/dist/packages/core/src/modules/sort.d.ts +0 -7
- package/dist/packages/core/src/modules/splitColumn.d.ts +0 -5
- package/dist/packages/core/src/modules/text.d.ts +0 -10
- package/dist/packages/core/src/modules/toolbar.d.ts +0 -32
- package/dist/packages/core/src/modules/validation.d.ts +0 -19
- package/dist/packages/core/src/modules/zoom.d.ts +0 -3
- package/dist/packages/core/src/settings.d.ts +0 -100
- package/dist/packages/core/src/types.d.ts +0 -371
- package/dist/packages/core/src/utils/freeze.d.ts +0 -7
- package/dist/packages/core/src/utils/index.d.ts +0 -18
- package/dist/packages/core/src/utils/patch.d.ts +0 -37
- package/dist/packages/react/src/components/Toolbar/index.d.ts +0 -10
- package/dist/packages/react/src/components/index.d.ts +0 -4
- package/dist/packages/react/src/constants.d.ts +0 -1
- package/dist/stories/Collabration.stories.d.ts +0 -2359
- package/dist/stories/Features.stories.d.ts +0 -9430
- package/dist/stories/data/cell.d.ts +0 -983
- package/dist/stories/data/dataVerification.d.ts +0 -131
- package/dist/stories/data/empty.d.ts +0 -10
- package/dist/stories/data/formula.d.ts +0 -362
- package/dist/stories/data/freeze.d.ts +0 -34
- package/dist/stories/data/protected.d.ts +0 -40
- package/dist/stories/utils.d.ts +0 -1
|
@@ -0,0 +1,307 @@
|
|
|
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 { getFlowdata, api } from "@fileverse-dev/fortune-core";
|
|
117
|
+
import { getCachedPrice } from "./cryptoApi";
|
|
118
|
+
export var getFiatSymbol = function getFiatSymbol(code) {
|
|
119
|
+
switch (code) {
|
|
120
|
+
case "USD":
|
|
121
|
+
return "$";
|
|
122
|
+
case "EUR":
|
|
123
|
+
return "€";
|
|
124
|
+
case "GBP":
|
|
125
|
+
return "£";
|
|
126
|
+
case "JPY":
|
|
127
|
+
return "¥";
|
|
128
|
+
case "CNY":
|
|
129
|
+
return "¥";
|
|
130
|
+
case "INR":
|
|
131
|
+
return "₹";
|
|
132
|
+
default:
|
|
133
|
+
return code;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
export var getFiatGeckoId = function getFiatGeckoId(symbol, baseCurrency) {
|
|
137
|
+
switch (symbol) {
|
|
138
|
+
case "$":
|
|
139
|
+
return "usd";
|
|
140
|
+
case "€":
|
|
141
|
+
return "eur";
|
|
142
|
+
case "£":
|
|
143
|
+
return "gbp";
|
|
144
|
+
case "CN¥":
|
|
145
|
+
return "cny";
|
|
146
|
+
case "K$":
|
|
147
|
+
return "hkd";
|
|
148
|
+
case "jp¥":
|
|
149
|
+
return "jpy";
|
|
150
|
+
case "AU$":
|
|
151
|
+
return "aud";
|
|
152
|
+
case "৳":
|
|
153
|
+
return "bdt";
|
|
154
|
+
case "NAR":
|
|
155
|
+
return "bhd";
|
|
156
|
+
case "R$":
|
|
157
|
+
return "brl";
|
|
158
|
+
case "CA$":
|
|
159
|
+
return "cad";
|
|
160
|
+
case "CF":
|
|
161
|
+
return "chf";
|
|
162
|
+
case "CLP$":
|
|
163
|
+
return "clp";
|
|
164
|
+
case "kr":
|
|
165
|
+
return "dkk";
|
|
166
|
+
case "gl":
|
|
167
|
+
return "gel";
|
|
168
|
+
case "ft":
|
|
169
|
+
return "huf";
|
|
170
|
+
case "Rp":
|
|
171
|
+
return "idr";
|
|
172
|
+
case "Rs":
|
|
173
|
+
return "inr";
|
|
174
|
+
case "₩":
|
|
175
|
+
return "krw";
|
|
176
|
+
case "KW":
|
|
177
|
+
return "kwd";
|
|
178
|
+
case "K":
|
|
179
|
+
return "mmk";
|
|
180
|
+
case "PO$":
|
|
181
|
+
return "mxn";
|
|
182
|
+
case "R":
|
|
183
|
+
return "myr";
|
|
184
|
+
case "₦":
|
|
185
|
+
return "ngn";
|
|
186
|
+
case "₦kr":
|
|
187
|
+
return "nok";
|
|
188
|
+
case "₱":
|
|
189
|
+
return "php";
|
|
190
|
+
case "zł":
|
|
191
|
+
return "pln";
|
|
192
|
+
case "RU":
|
|
193
|
+
return "rub";
|
|
194
|
+
case "Rial":
|
|
195
|
+
return "sar";
|
|
196
|
+
case "P$":
|
|
197
|
+
return "sgd";
|
|
198
|
+
case "฿":
|
|
199
|
+
return "thb";
|
|
200
|
+
case "₺":
|
|
201
|
+
return "try";
|
|
202
|
+
case "грн.":
|
|
203
|
+
return "uah";
|
|
204
|
+
case "ZAR":
|
|
205
|
+
return "zar";
|
|
206
|
+
default:
|
|
207
|
+
return baseCurrency || "usd";
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
var COINGECKO_IDS = {
|
|
211
|
+
BTC: "bitcoin",
|
|
212
|
+
ETH: "ethereum",
|
|
213
|
+
SOL: "solana"
|
|
214
|
+
};
|
|
215
|
+
export function convertCellsToCrypto(_a) {
|
|
216
|
+
var context = _a.context,
|
|
217
|
+
setContext = _a.setContext,
|
|
218
|
+
denomination = _a.denomination,
|
|
219
|
+
decimals = _a.decimals;
|
|
220
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
221
|
+
var selections, flowdata, selectedCells, denomStr, coingeckoId, cellUpdates;
|
|
222
|
+
return __generator(this, function (_b) {
|
|
223
|
+
selections = context.luckysheet_select_save;
|
|
224
|
+
flowdata = getFlowdata(context);
|
|
225
|
+
if (!selections || !flowdata) return [2];
|
|
226
|
+
selectedCells = [];
|
|
227
|
+
selections.forEach(function (selection) {
|
|
228
|
+
for (var row = selection.row[0]; row <= selection.row[1]; row += 1) {
|
|
229
|
+
for (var col = selection.column[0]; col <= selection.column[1]; col += 1) {
|
|
230
|
+
selectedCells.push({
|
|
231
|
+
row: row,
|
|
232
|
+
col: col
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
denomStr = typeof denomination === "string" && denomination.trim() !== "" ? denomination : "ETH";
|
|
238
|
+
denomStr = denomStr.toUpperCase();
|
|
239
|
+
coingeckoId = typeof COINGECKO_IDS[denomStr] === "string" ? COINGECKO_IDS[denomStr] : "ethereum";
|
|
240
|
+
cellUpdates = [];
|
|
241
|
+
selectedCells.forEach(function (_a) {
|
|
242
|
+
var _b, _c, _d, _e;
|
|
243
|
+
var row = _a.row,
|
|
244
|
+
col = _a.col;
|
|
245
|
+
var cell = (_b = flowdata[row]) === null || _b === void 0 ? void 0 : _b[col];
|
|
246
|
+
var baseValue = 0;
|
|
247
|
+
if ((cell === null || cell === void 0 ? void 0 : cell.baseValue) !== undefined) {
|
|
248
|
+
baseValue = cell.baseValue;
|
|
249
|
+
} else {
|
|
250
|
+
if (typeof (cell === null || cell === void 0 ? void 0 : cell.v) === "number") {
|
|
251
|
+
baseValue = cell.v;
|
|
252
|
+
} else if (typeof (cell === null || cell === void 0 ? void 0 : cell.v) === "string") {
|
|
253
|
+
baseValue = parseFloat(cell.v);
|
|
254
|
+
}
|
|
255
|
+
if (((_c = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _c === void 0 ? void 0 : _c.fa) && cell.ct.fa.includes('"')) {
|
|
256
|
+
var numericValue = parseFloat(((_d = cell.v) === null || _d === void 0 ? void 0 : _d.toString()) || "0");
|
|
257
|
+
if (!Number.isNaN(numericValue)) {
|
|
258
|
+
baseValue = numericValue;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (!baseValue || Number.isNaN(baseValue)) return;
|
|
263
|
+
var fiatSymbol = (_e = cell === null || cell === void 0 ? void 0 : cell.m) === null || _e === void 0 ? void 0 : _e.split(" ")[0];
|
|
264
|
+
var fiatVsCryptoPrice = getCachedPrice(coingeckoId, getFiatGeckoId(fiatSymbol, cell === null || cell === void 0 ? void 0 : cell.baseCurrency));
|
|
265
|
+
var cryptoValue = baseValue / fiatVsCryptoPrice;
|
|
266
|
+
if (typeof cryptoValue !== "number" || Number.isNaN(cryptoValue)) return;
|
|
267
|
+
cellUpdates.push({
|
|
268
|
+
row: row,
|
|
269
|
+
col: col,
|
|
270
|
+
baseValue: baseValue,
|
|
271
|
+
cryptoValue: cryptoValue,
|
|
272
|
+
baseCurrency: getFiatGeckoId(fiatSymbol) || "usd",
|
|
273
|
+
baseCurrencyPrice: fiatVsCryptoPrice
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
setContext(function (ctx) {
|
|
277
|
+
var d = getFlowdata(ctx);
|
|
278
|
+
if (!d || !Array.isArray(d)) return;
|
|
279
|
+
cellUpdates.forEach(function (_a) {
|
|
280
|
+
var row = _a.row,
|
|
281
|
+
col = _a.col,
|
|
282
|
+
baseValue = _a.baseValue,
|
|
283
|
+
cryptoValue = _a.cryptoValue,
|
|
284
|
+
baseCurrency = _a.baseCurrency,
|
|
285
|
+
baseCurrencyPrice = _a.baseCurrencyPrice;
|
|
286
|
+
if (!d[row]) d[row] = [];
|
|
287
|
+
if (!d[row][col]) d[row][col] = {};
|
|
288
|
+
var cellCp = d[row][col];
|
|
289
|
+
cellCp.v = baseValue.toString();
|
|
290
|
+
cellCp.m = "".concat(cryptoValue.toFixed(decimals), " ").concat(denomStr);
|
|
291
|
+
cellCp.ct = {
|
|
292
|
+
fa: "0.".concat("0".repeat(decimals), " \"").concat(denomStr, "\""),
|
|
293
|
+
t: "n"
|
|
294
|
+
};
|
|
295
|
+
cellCp.baseValue = baseValue;
|
|
296
|
+
cellCp.baseCurrency = baseCurrency.toLowerCase();
|
|
297
|
+
cellCp.baseCurrencyPrice = baseCurrencyPrice;
|
|
298
|
+
d[row][col] = cellCp;
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
setContext(function (ctx) {
|
|
302
|
+
api.calculateSheetFromula(ctx, ctx.currentSheetId);
|
|
303
|
+
});
|
|
304
|
+
return [2];
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
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
|
+
var COINGECKO_API = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana&vs_currencies=usd,aed,ars,aud,bdt,bhd,bmd,brl,cad,chf,clp,cny,czk,dkk,eur,gbp,gel,hkd,huf,idr,ils,inr,jpy,krw,kwd,lkr,mmk,mxn,myr,ngn,nok,nzd,php,pkr,pln,rub,sar,sek,sgd,thb,try,twd,uah,vef,vnd,zar";
|
|
117
|
+
var CACHE_DURATION = 60 * 1000;
|
|
118
|
+
var CRYPTO_LIST = ["bitcoin", "ethereum", "solana"];
|
|
119
|
+
var FIAT_LIST = ["usd", "aed", "ars", "aud", "bdt", "bhd", "bmd", "brl", "cad", "chf", "clp", "cny", "czk", "dkk", "eur", "gbp", "gel", "hkd", "huf", "idr", "ils", "inr", "jpy", "krw", "kwd", "lkr", "mmk", "mxn", "myr", "ngn", "nok", "nzd", "php", "pkr", "pln", "rub", "sar", "sek", "sgd", "thb", "try", "twd", "uah", "vef", "vnd", "zar"];
|
|
120
|
+
var priceCache = {};
|
|
121
|
+
function updatePriceCache(data, timestamp) {
|
|
122
|
+
CRYPTO_LIST.forEach(function (crypto) {
|
|
123
|
+
FIAT_LIST.forEach(function (fiat) {
|
|
124
|
+
var _a;
|
|
125
|
+
var price = (_a = data[crypto]) === null || _a === void 0 ? void 0 : _a[fiat];
|
|
126
|
+
if (typeof price === "number") {
|
|
127
|
+
var key = "".concat(crypto, "-").concat(fiat).toLowerCase();
|
|
128
|
+
priceCache[key] = {
|
|
129
|
+
price: price,
|
|
130
|
+
timestamp: timestamp
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
var fetchCall = function fetchCall(url) {
|
|
137
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
138
|
+
return __generator(this, function (_a) {
|
|
139
|
+
return [2, new Promise(function (resolve, reject) {
|
|
140
|
+
fetch(url).then(function (response) {
|
|
141
|
+
return response.json();
|
|
142
|
+
}).then(function (data) {
|
|
143
|
+
return resolve(data);
|
|
144
|
+
}).catch(function (error) {
|
|
145
|
+
return reject(error);
|
|
146
|
+
});
|
|
147
|
+
})];
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
export function getCryptoPrice(crypto, fiat) {
|
|
152
|
+
var _a;
|
|
153
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
+
var key, now, data, price;
|
|
155
|
+
return __generator(this, function (_b) {
|
|
156
|
+
switch (_b.label) {
|
|
157
|
+
case 0:
|
|
158
|
+
key = "".concat(crypto, "-").concat(fiat).toLowerCase();
|
|
159
|
+
now = Date.now();
|
|
160
|
+
if (priceCache[key] && now - priceCache[key].timestamp < CACHE_DURATION) {
|
|
161
|
+
return [2, priceCache[key].price];
|
|
162
|
+
}
|
|
163
|
+
if (priceCache[key]) {
|
|
164
|
+
fetchCall(COINGECKO_API).then(function (data) {
|
|
165
|
+
updatePriceCache(data, now);
|
|
166
|
+
});
|
|
167
|
+
return [2, priceCache[key].price];
|
|
168
|
+
}
|
|
169
|
+
return [4, fetchCall(COINGECKO_API)];
|
|
170
|
+
case 1:
|
|
171
|
+
data = _b.sent();
|
|
172
|
+
price = (_a = data[crypto]) === null || _a === void 0 ? void 0 : _a[fiat];
|
|
173
|
+
if (typeof price !== "number") throw new Error("Invalid price data");
|
|
174
|
+
updatePriceCache(data, now);
|
|
175
|
+
return [2, price];
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
export var getCachedPrice = function getCachedPrice(crypto, fiat) {
|
|
181
|
+
var _a;
|
|
182
|
+
var key = "".concat(crypto, "-").concat(fiat).toLowerCase();
|
|
183
|
+
getCryptoPrice(crypto, fiat);
|
|
184
|
+
return (_a = priceCache[key]) === null || _a === void 0 ? void 0 : _a.price;
|
|
185
|
+
};
|
|
186
|
+
export function clearCryptoPriceCache() {
|
|
187
|
+
Object.keys(priceCache).forEach(function (key) {
|
|
188
|
+
return delete priceCache[key];
|
|
189
|
+
});
|
|
190
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
|
|
2
|
-
export declare const injectDatepickerStyles: () => void;
|
|
1
|
+
export declare const datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
|
|
2
|
+
export declare const injectDatepickerStyles: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
|
|
2
|
+
export var injectDatepickerStyles = function injectDatepickerStyles() {
|
|
3
|
+
if (typeof document !== "undefined") {
|
|
4
|
+
var styleSheet = document.createElement("style");
|
|
5
|
+
styleSheet.textContent = datepickerStyles;
|
|
6
|
+
document.head.appendChild(styleSheet);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { getFlowdata } from "@fileverse-dev/fortune-core";
|
|
2
|
+
import { FIAT_ICON_MAP } from "../constants";
|
|
3
|
+
function getFiatSymbol(code) {
|
|
4
|
+
switch (code) {
|
|
5
|
+
case "USD":
|
|
6
|
+
return "$";
|
|
7
|
+
case "EUR":
|
|
8
|
+
return "€";
|
|
9
|
+
case "GBP":
|
|
10
|
+
return "£";
|
|
11
|
+
case "JPY":
|
|
12
|
+
return "¥";
|
|
13
|
+
case "CNY":
|
|
14
|
+
return "¥";
|
|
15
|
+
case "INR":
|
|
16
|
+
return "₹";
|
|
17
|
+
default:
|
|
18
|
+
return code;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export function updateCellsDecimalFormat(_a) {
|
|
22
|
+
var context = _a.context,
|
|
23
|
+
setContext = _a.setContext,
|
|
24
|
+
decimals = _a.decimals,
|
|
25
|
+
denomination = _a.denomination;
|
|
26
|
+
var selections = context.luckysheet_select_save;
|
|
27
|
+
var flowdata = getFlowdata(context);
|
|
28
|
+
if (!selections || !flowdata) return;
|
|
29
|
+
var selectedCells = [];
|
|
30
|
+
selections.forEach(function (selection) {
|
|
31
|
+
for (var row = selection.row[0]; row <= selection.row[1]; row += 1) {
|
|
32
|
+
for (var col = selection.column[0]; col <= selection.column[1]; col += 1) {
|
|
33
|
+
selectedCells.push({
|
|
34
|
+
row: row,
|
|
35
|
+
col: col
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
setContext(function (ctx) {
|
|
41
|
+
var d = getFlowdata(ctx);
|
|
42
|
+
if (!d) return;
|
|
43
|
+
selectedCells.forEach(function (_a) {
|
|
44
|
+
var _b;
|
|
45
|
+
var row = _a.row,
|
|
46
|
+
col = _a.col;
|
|
47
|
+
var cell = (_b = d[row]) === null || _b === void 0 ? void 0 : _b[col];
|
|
48
|
+
if (!cell) return;
|
|
49
|
+
var denomStr = "ETH";
|
|
50
|
+
var isCrypto = false;
|
|
51
|
+
if (cell.ct && typeof cell.ct.fa === "string") {
|
|
52
|
+
var _c = cell.ct.fa.match(/"([A-Z]+)"/) || [],
|
|
53
|
+
matchedDenom = _c[1];
|
|
54
|
+
if (matchedDenom) {
|
|
55
|
+
denomStr = matchedDenom;
|
|
56
|
+
isCrypto = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (isCrypto) {
|
|
60
|
+
cell.ct = {
|
|
61
|
+
fa: "0.".concat("0".repeat(decimals), " \"").concat(denomStr, "\""),
|
|
62
|
+
t: "n"
|
|
63
|
+
};
|
|
64
|
+
if (typeof cell.v === "number") {
|
|
65
|
+
cell.m = "".concat(cell.v.toFixed(decimals), " ").concat(denomStr);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
var fiat = denomination || "USD";
|
|
69
|
+
var symbol = fiat in FIAT_ICON_MAP ? getFiatSymbol(fiat) : fiat;
|
|
70
|
+
cell.ct = {
|
|
71
|
+
fa: "".concat(symbol, " #,##0.").concat("0".repeat(decimals)),
|
|
72
|
+
t: "n"
|
|
73
|
+
};
|
|
74
|
+
if (typeof cell.v === "number") {
|
|
75
|
+
cell.m = "".concat(symbol, " ").concat(cell.v.toFixed(decimals));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#fortune-change-color {
|
|
2
|
+
min-width: 164px;
|
|
3
|
+
background: hsl(var(--color-bg-default));
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: -100px;
|
|
6
|
+
left: 232px;
|
|
7
|
+
border-radius: 6px;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
|
|
10
|
+
border: 1px solid hsl(var(--color-border-default));
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#fortune-change-color .color-reset {
|
|
17
|
+
position: relative;
|
|
18
|
+
color: hsl(var(--color-text-default));
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
list-style: none;
|
|
21
|
+
padding: 4px 8px;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
padding-right: 24px;
|
|
25
|
+
user-select: none;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
background: hsl(var(--color-bg-default));
|
|
28
|
+
height: 30px;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 10px;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
line-height: 20px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#fortune-change-color .color-reset:hover {
|
|
38
|
+
background: hsl(var(--color-bg-default-hover));
|
|
39
|
+
transition: all 0.2s ease-in-out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#fortune-change-color .custom-color {
|
|
43
|
+
position: relative;
|
|
44
|
+
margin: auto;
|
|
45
|
+
padding: 10px;
|
|
46
|
+
border-radius: 6px;
|
|
47
|
+
background: white;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
margin: 1px 0px;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: space-around;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button-basic {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
margin-bottom: 0;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
text-align: center;
|
|
60
|
+
vertical-align: middle;
|
|
61
|
+
touch-action: manipulation;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
padding: 4px 8px;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
line-height: 1.42857143;
|
|
67
|
+
border-radius: 2px;
|
|
68
|
+
user-select: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.button-primary {
|
|
72
|
+
background: #0188fb;
|
|
73
|
+
border: 1px solid #0188fb;
|
|
74
|
+
color: #fff;
|
|
75
|
+
margin-right: -4px;
|
|
76
|
+
}
|