pixel-react-excel-sheet 1.0.1 → 1.1.9
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/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -6
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
- package/lib/components/ExcelFile/Types.d.ts +0 -8
- package/lib/components/Icon/Icon.stories.d.ts +1 -0
- package/lib/components/Icon/types.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.esm.js +888 -995
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +888 -995
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/assets/Themes/BaseTheme.scss +1 -0
- package/src/assets/Themes/DarkTheme.scss +1 -0
- package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
- package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +12 -12
- package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
- package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
- package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
- package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
- package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
- package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
- package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.scss +127 -135
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -73
- package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
- package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
- package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
- package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
- package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
- package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
- package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +292 -41
- package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
- package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
- package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
- package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +27 -335
- package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -9
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +0 -11
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +145 -125
- package/src/components/ExcelFile/Types.ts +0 -11
- package/src/components/ExcelFile/index.ts +1 -1
- package/src/components/Icon/Icon.stories.tsx +27 -0
- package/src/components/Icon/Icon.tsx +5 -1
- package/src/components/Icon/Icons.scss +13 -2
- package/src/components/Icon/types.ts +1 -0
- package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -66
package/lib/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/styleguide/colorpalette/colorpalette.stories.tsx","../src/styleguide/colorpalette/colorpalette.tsx","../src/styleguide/colorpalette/colorpalettelist.ts","../src/styleguide/colorpalette/index.ts","../src/styleguide/colorpalette/types.ts","../src/styleguide/typography/typography.stories.tsx","../src/styleguide/typography/typography.tsx","../src/styleguide/typography/typographylist.ts","../src/styleguide/typography/types.ts","../src/assets/utils/functionutils.ts","../src/components/accordion/accordion.stories.tsx","../src/components/accordion/accordion.tsx","../src/components/accordion/index.ts","../src/components/accordion/types.ts","../src/components/addresourcebutton/addbutton.stories.tsx","../src/components/addresourcebutton/addbutton.tsx","../src/components/addresourcebutton/index.ts","../src/components/addresourcebutton/type.ts","../src/components/addresourcebutton/arrowsbutton/arrowsbutton.tsx","../src/components/allprojectsdropdown/allprojectsdropdown.stories.tsx","../src/components/allprojectsdropdown/allprojectsdropdown.tsx","../src/components/allprojectsdropdown/index.ts","../src/components/allprojectsdropdown/types.ts","../src/components/appheader/appheader.stories.tsx","../src/components/appheader/appheader.tsx","../src/components/appheader/index.ts","../src/components/appheader/types.ts","../src/components/attachmentbutton/attachmentbutton.stories.tsx","../src/components/attachmentbutton/attachmentbutton.tsx","../src/components/attachmentbutton/index.ts","../src/components/attachmentbutton/types.ts","../src/components/button/button.stories.tsx","../src/components/button/button.tsx","../src/components/button/index.ts","../src/components/button/types.ts","../src/components/charts/dashboarddonutchart/dashboarddonutchart.stories.tsx","../src/components/charts/dashboarddonutchart/dashboarddonutchart.tsx","../src/components/charts/dashboarddonutchart/index.ts","../src/components/charts/dashboarddonutchart/types.ts","../src/components/charts/donutchart/donutchart.stories.tsx","../src/components/charts/donutchart/donutchart.tsx","../src/components/charts/donutchart/index.ts","../src/components/charts/donutchart/type.ts","../src/components/charts/piechart/piechart.stories.tsx","../src/components/charts/piechart/piechart.tsx","../src/components/charts/piechart/index.ts","../src/components/charts/piechart/types.ts","../src/components/charts/radialchart/radialchart.stories.tsx","../src/components/charts/radialchart/radialchart.tsx","../src/components/charts/radialchart/index.ts","../src/components/charts/radialchart/types.ts","../src/components/checkbox/checkbox.stories.tsx","../src/components/checkbox/checkbox.tsx","../src/components/checkbox/index.ts","../src/components/checkbox/types.ts","../src/components/chip/chip.stories.tsx","../src/components/chip/chip.tsx","../src/components/chip/index.ts","../src/components/chip/types.ts","../src/components/datepicker/datepicker.stories.tsx","../src/components/datepicker/datepicker.tsx","../src/components/datepicker/timepicker.tsx","../src/components/datepicker/index.ts","../src/components/datepicker/types.ts","../src/components/draganddrop/draganddrop.stories.tsx","../src/components/draganddrop/draganddrop.ts","../src/components/draganddrop/draganddroplist.tsx","../src/components/draganddrop/index.ts","../src/components/drawer/drawer.stories.tsx","../src/components/drawer/drawer.tsx","../src/components/drawer/types.ts","../src/components/drawer/index.ts","../src/components/excelfile/changeexcelstyles.tsx","../src/components/excelfile/excelfile.stories.tsx","../src/components/excelfile/types.ts","../src/components/excelfile/index.ts","../src/components/excelfile/colorbarselector/colorbarselector.tsx","../src/components/excelfile/contextmenu/contextmenu.tsx","../src/components/excelfile/excelfile/excelfile.tsx","../src/components/excelfile/excelfile/excel/activecell.tsx","../src/components/excelfile/excelfile/excel/cell.tsx","../src/components/excelfile/excelfile/excel/columnindicator.tsx","../src/components/excelfile/excelfile/excel/copied.tsx","../src/components/excelfile/excelfile/excel/cornerindicator.tsx","../src/components/excelfile/excelfile/excel/dataeditor.tsx","../src/components/excelfile/excelfile/excel/dataviewer.tsx","../src/components/excelfile/excelfile/excel/floatingrect.tsx","../src/components/excelfile/excelfile/excel/headerrow.tsx","../src/components/excelfile/excelfile/excel/row.tsx","../src/components/excelfile/excelfile/excel/rowindicator.tsx","../src/components/excelfile/excelfile/excel/selected.tsx","../src/components/excelfile/excelfile/excel/spreadsheet.tsx","../src/components/excelfile/excelfile/excel/table.tsx","../src/components/excelfile/excelfile/excel/actions.ts","../src/components/excelfile/excelfile/excel/aremodelsequal.ts","../src/components/excelfile/excelfile/excel/context.ts","../src/components/excelfile/excelfile/excel/index.ts","../src/components/excelfile/excelfile/excel/matrix.ts","../src/components/excelfile/excelfile/excel/point-range.ts","../src/components/excelfile/excelfile/excel/point.ts","../src/components/excelfile/excelfile/excel/reducer.ts","../src/components/excelfile/excelfile/excel/selection.ts","../src/components/excelfile/excelfile/excel/types.ts","../src/components/excelfile/excelfile/excel/use-dispatch.ts","../src/components/excelfile/excelfile/excel/use-selector.ts","../src/components/excelfile/excelfile/excel/util.ts","../src/components/excelfile/excelfile/excel/engine/engine.ts","../src/components/excelfile/excelfile/excel/engine/formula.ts","../src/components/excelfile/excelfile/excel/engine/index.ts","../src/components/excelfile/excelfile/excel/engine/point-graph.ts","../src/components/excelfile/excelfile/excel/engine/point-hash.ts","../src/components/excelfile/excelfile/excel/engine/point-set.ts","../src/components/excelfile/excelfile/excel/typings/fast-formula-parser.d.ts","../src/components/excelfile/excelsheetbar/excelsheetbar.tsx","../src/components/excelfile/exceltoolbar/exceltoolbar.tsx","../src/components/expandablemenu/expandablemenu.stories.tsx","../src/components/expandablemenu/expandablemenu.tsx","../src/components/expandablemenu/index.ts","../src/components/expandablemenu/types.ts","../src/components/ff_captcha/recaptcha.tsx","../src/components/ff_captcha/captcha.stories.tsx","../src/components/ff_captcha/index.ts","../src/components/ff_captcha/types.ts","../src/components/filedropzone/dropzone.tsx","../src/components/filedropzone/filedropzone.stories.tsx","../src/components/filedropzone/filedropzone.tsx","../src/components/filedropzone/filepreview.tsx","../src/components/filedropzone/index.ts","../src/components/filedropzone/types.ts","../src/components/form/form.stories.tsx","../src/components/form/form.tsx","../src/components/form/index.ts","../src/components/form/types.ts","../src/components/gridlayout/gridlayout.stories.tsx","../src/components/gridlayout/gridlayout.tsx","../src/components/gridlayout/index.ts","../src/components/gridlayout/types.ts","../src/components/highlighttext/highlighttext.stories.tsx","../src/components/highlighttext/highlighttext.tsx","../src/components/highlighttext/index.ts","../src/components/highlighttext/types.ts","../src/components/icon/icon.stories.tsx","../src/components/icon/icon.tsx","../src/components/icon/iconlist.ts","../src/components/icon/index.ts","../src/components/icon/types.ts","../src/components/iconbutton/iconbutton.stories.tsx","../src/components/iconbutton/iconbutton.tsx","../src/components/iconbutton/index.ts","../src/components/iconbutton/types.ts","../src/components/iconradiogroup/iconradiogroup.stories.tsx","../src/components/iconradiogroup/iconradiogroup.tsx","../src/components/iconradiogroup/index.ts","../src/components/iconradiogroup/type.ts","../src/components/input/input.stories.tsx","../src/components/input/input.tsx","../src/components/input/index.ts","../src/components/input/types.ts","../src/components/inputwithdropdown/inputwithdropdown.stories.tsx","../src/components/inputwithdropdown/inputwithdropdown.tsx","../src/components/inputwithdropdown/index.ts","../src/components/inputwithdropdown/types.ts","../src/components/lazyload/lazyload.stories.tsx","../src/components/lazyload/lazyload.ts","../src/components/lazyload/lazyloading.tsx","../src/components/lazyload/index.ts","../src/components/machineinputfield/machineinputfield.stories.tsx","../src/components/machineinputfield/machineinputfield.tsx","../src/components/machineinputfield/index.ts","../src/components/machineinputfield/types.ts","../src/components/menuoption/menuoption.stories.tsx","../src/components/menuoption/menuoption.tsx","../src/components/menuoption/index.ts","../src/components/menuoption/types.ts","../src/components/minimodal/minimodal.stories.tsx","../src/components/minimodal/minimodal.tsx","../src/components/minimodal/index.ts","../src/components/minimodal/types.ts","../src/components/modal/modal.stories.tsx","../src/components/modal/modal.tsx","../src/components/modal/index.tsx","../src/components/modal/types.ts","../src/components/multiselect/dropdown.tsx","../src/components/multiselect/multiselect.stories.tsx","../src/components/multiselect/multiselect.tsx","../src/components/multiselect/multiselecttypes.ts","../src/components/multiselect/dropdowntypes.ts","../src/components/multiselect/index.ts","../src/components/nlpinput/nlpinput.stories.tsx","../src/components/nlpinput/nlpinput.tsx","../src/components/nlpinput/index.ts","../src/components/nlpinput/type.tsx","../src/components/nlpinput/components/nlpdropdown/nlpdropdowntype.ts","../src/components/nlpinput/components/nlpdropdown/nlpdropdown.tsx","../src/components/paper/paper.stories.tsx","../src/components/paper/paper.tsx","../src/components/paper/index.ts","../src/components/paper/types.ts","../src/components/radiobutton/radiobutton.stories.tsx","../src/components/radiobutton/radiobutton.tsx","../src/components/radiobutton/index.ts","../src/components/radiobutton/radiobuttontypes.tsx","../src/components/radiogroup/radiogroup.stories.tsx","../src/components/radiogroup/radiogroup.tsx","../src/components/radiogroup/index.ts","../src/components/radiogroup/radiogrouptypes.tsx","../src/components/search/search.stories.tsx","../src/components/search/search.tsx","../src/components/search/index.ts","../src/components/search/types.ts","../src/components/select/select.stories.tsx","../src/components/select/select.tsx","../src/components/select/index.ts","../src/components/select/types.ts","../src/components/select/components/dropdown/dropdown.tsx","../src/components/select/components/dropdown/dropdowntypes.ts","../src/components/sequentialconnectingbranch/sequentialconnectingbranch.stories.tsx","../src/components/sequentialconnectingbranch/sequentialconnectingbranch.tsx","../src/components/sequentialconnectingbranch/index.ts","../src/components/sequentialconnectingbranch/types.ts","../src/components/sequentialconnectingbranch/components/addbrowsermodal/addbrowsermodal.tsx","../src/components/sequentialconnectingbranch/components/addbrowsermodal/types.ts","../src/components/sequentialconnectingbranch/components/branches/branches.tsx","../src/components/sequentialconnectingbranch/components/branches/types.ts","../src/components/sequentialconnectingbranch/components/connectingbranches/connectingbranches.tsx","../src/components/sequentialconnectingbranch/components/connectingbranches/types.ts","../src/components/sequentialconnectingbranch/components/datasetlistmodal/datasetlistmodal.tsx","../src/components/sequentialconnectingbranch/components/datasetlistmodal/types.ts","../src/components/statedropdown/statedropdown.stories.tsx","../src/components/statedropdown/statedropdown.tsx","../src/components/statedropdown/statedropdowntypes.tsx","../src/components/statedropdown/index.ts","../src/components/statusbutton/statusbutton.stories.tsx","../src/components/statusbutton/statusbutton.tsx","../src/components/statusbutton/index.ts","../src/components/statusbutton/types.ts","../src/components/table/table.stories.tsx","../src/components/table/table.tsx","../src/components/table/types.ts","../src/components/table/index.ts","../src/components/tabletree/tabletree.stories.tsx","../src/components/tabletree/tabletree.tsx","../src/components/tabletree/data.ts","../src/components/tabletree/index.ts","../src/components/tabs/tabs.stories.tsx","../src/components/tabs/tabs.tsx","../src/components/tabs/index.ts","../src/components/tabs/types.ts","../src/components/textarea/textarea.stories.tsx","../src/components/textarea/textarea.tsx","../src/components/textarea/types.ts","../src/components/textarea/index.tsx","../src/components/themeprovider/themeprovider.tsx","../src/components/themeprovider/index.ts","../src/components/themeprovider/types.ts","../src/components/toast/toast.stories.tsx","../src/components/toast/toast.tsx","../src/components/toast/index.ts","../src/components/toast/types.ts","../src/components/toggle/toggle.stories.tsx","../src/components/toggle/toggle.tsx","../src/components/toggle/index.ts","../src/components/toggle/types.ts","../src/components/tooltip/tooltip.stories.tsx","../src/components/tooltip/tooltip.tsx","../src/components/tooltip/index.ts","../src/components/tooltip/types.ts","../src/components/typography/typography.stories.tsx","../src/components/typography/typography.tsx","../src/components/typography/index.ts","../src/components/typography/types.ts","../src/components/variableinput/variableinput.stories.tsx","../src/components/variableinput/variableinput.tsx","../src/components/variableinput/index.ts","../src/components/variableinput/types.ts","../src/hooks/useclickoutside.tsx","../src/hooks/usefiledropzone.tsx","../src/hooks/useportalposition.tsx","../src/hooks/usetheme.tsx","../src/hooks/keyboardevents/useesckeyevent.tsx","../src/utils/tablecell/tablecell.ts","../src/utils/checkempty/checkempty.stories.tsx","../src/utils/checkempty/checkempty.ts","../src/utils/comparearrays/comparearrays.stories.tsx","../src/utils/comparearrays/comparearrays.ts","../src/utils/compareobjects/compareobjects.stories.tsx","../src/utils/compareobjects/compareobjects.ts","../src/utils/debounce/debounce.stories.tsx","../src/utils/debounce/debounce.ts","../src/utils/ffid/ffid.stories.tsx","../src/utils/ffid/ffid.ts","../src/utils/findandinsert/findandinsert.stories.tsx","../src/utils/findandinsert/findandinsert.ts","../src/utils/getencrypteddata/getencrypteddata.stories.tsx","../src/utils/getencrypteddata/getencrypteddata.ts","../src/utils/getextension/getextension.stories.tsx","../src/utils/getextension/getextension.ts","../src/utils/throttle/throttle.stories.tsx","../src/utils/throttle/throttle.ts","../src/utils/truncatetext/truncatetext.stories.tsx","../src/utils/truncatetext/truncatetext.ts"],"version":"5.6.3"}
|
|
1
|
+
{"root":["../src/index.ts","../src/styleguide/colorpalette/colorpalette.stories.tsx","../src/styleguide/colorpalette/colorpalette.tsx","../src/styleguide/colorpalette/colorpalettelist.ts","../src/styleguide/colorpalette/index.ts","../src/styleguide/colorpalette/types.ts","../src/styleguide/typography/typography.stories.tsx","../src/styleguide/typography/typography.tsx","../src/styleguide/typography/typographylist.ts","../src/styleguide/typography/types.ts","../src/assets/utils/functionutils.ts","../src/components/accordion/accordion.stories.tsx","../src/components/accordion/accordion.tsx","../src/components/accordion/index.ts","../src/components/accordion/types.ts","../src/components/addresourcebutton/addbutton.stories.tsx","../src/components/addresourcebutton/addbutton.tsx","../src/components/addresourcebutton/index.ts","../src/components/addresourcebutton/type.ts","../src/components/addresourcebutton/arrowsbutton/arrowsbutton.tsx","../src/components/allprojectsdropdown/allprojectsdropdown.stories.tsx","../src/components/allprojectsdropdown/allprojectsdropdown.tsx","../src/components/allprojectsdropdown/index.ts","../src/components/allprojectsdropdown/types.ts","../src/components/appheader/appheader.stories.tsx","../src/components/appheader/appheader.tsx","../src/components/appheader/index.ts","../src/components/appheader/types.ts","../src/components/attachmentbutton/attachmentbutton.stories.tsx","../src/components/attachmentbutton/attachmentbutton.tsx","../src/components/attachmentbutton/index.ts","../src/components/attachmentbutton/types.ts","../src/components/button/button.stories.tsx","../src/components/button/button.tsx","../src/components/button/index.ts","../src/components/button/types.ts","../src/components/charts/dashboarddonutchart/dashboarddonutchart.stories.tsx","../src/components/charts/dashboarddonutchart/dashboarddonutchart.tsx","../src/components/charts/dashboarddonutchart/index.ts","../src/components/charts/dashboarddonutchart/types.ts","../src/components/charts/donutchart/donutchart.stories.tsx","../src/components/charts/donutchart/donutchart.tsx","../src/components/charts/donutchart/index.ts","../src/components/charts/donutchart/type.ts","../src/components/charts/piechart/piechart.stories.tsx","../src/components/charts/piechart/piechart.tsx","../src/components/charts/piechart/index.ts","../src/components/charts/piechart/types.ts","../src/components/charts/radialchart/radialchart.stories.tsx","../src/components/charts/radialchart/radialchart.tsx","../src/components/charts/radialchart/index.ts","../src/components/charts/radialchart/types.ts","../src/components/checkbox/checkbox.stories.tsx","../src/components/checkbox/checkbox.tsx","../src/components/checkbox/index.ts","../src/components/checkbox/types.ts","../src/components/chip/chip.stories.tsx","../src/components/chip/chip.tsx","../src/components/chip/index.ts","../src/components/chip/types.ts","../src/components/datepicker/datepicker.stories.tsx","../src/components/datepicker/datepicker.tsx","../src/components/datepicker/timepicker.tsx","../src/components/datepicker/index.ts","../src/components/datepicker/types.ts","../src/components/draganddrop/draganddrop.stories.tsx","../src/components/draganddrop/draganddrop.ts","../src/components/draganddrop/draganddroplist.tsx","../src/components/draganddrop/index.ts","../src/components/drawer/drawer.stories.tsx","../src/components/drawer/drawer.tsx","../src/components/drawer/types.ts","../src/components/drawer/index.ts","../src/components/excelfile/excelfile.stories.tsx","../src/components/excelfile/types.ts","../src/components/excelfile/index.ts","../src/components/excelfile/colorbarselector/colorbarselector.tsx","../src/components/excelfile/contextmenu/contextmenu.tsx","../src/components/excelfile/excelfile/excelfile.tsx","../src/components/excelfile/excelfile/excel/activecell.tsx","../src/components/excelfile/excelfile/excel/cell.tsx","../src/components/excelfile/excelfile/excel/columnindicator.tsx","../src/components/excelfile/excelfile/excel/copied.tsx","../src/components/excelfile/excelfile/excel/cornerindicator.tsx","../src/components/excelfile/excelfile/excel/dataeditor.tsx","../src/components/excelfile/excelfile/excel/dataviewer.tsx","../src/components/excelfile/excelfile/excel/floatingrect.tsx","../src/components/excelfile/excelfile/excel/headerrow.tsx","../src/components/excelfile/excelfile/excel/row.tsx","../src/components/excelfile/excelfile/excel/rowindicator.tsx","../src/components/excelfile/excelfile/excel/selected.tsx","../src/components/excelfile/excelfile/excel/spreadsheet.tsx","../src/components/excelfile/excelfile/excel/table.tsx","../src/components/excelfile/excelfile/excel/actions.ts","../src/components/excelfile/excelfile/excel/aremodelsequal.ts","../src/components/excelfile/excelfile/excel/context.ts","../src/components/excelfile/excelfile/excel/index.ts","../src/components/excelfile/excelfile/excel/matrix.ts","../src/components/excelfile/excelfile/excel/point-range.ts","../src/components/excelfile/excelfile/excel/point.ts","../src/components/excelfile/excelfile/excel/reducer.ts","../src/components/excelfile/excelfile/excel/selection.ts","../src/components/excelfile/excelfile/excel/types.ts","../src/components/excelfile/excelfile/excel/use-dispatch.ts","../src/components/excelfile/excelfile/excel/use-selector.ts","../src/components/excelfile/excelfile/excel/util.ts","../src/components/excelfile/excelfile/excel/engine/engine.ts","../src/components/excelfile/excelfile/excel/engine/formula.ts","../src/components/excelfile/excelfile/excel/engine/index.ts","../src/components/excelfile/excelfile/excel/engine/point-graph.ts","../src/components/excelfile/excelfile/excel/engine/point-hash.ts","../src/components/excelfile/excelfile/excel/engine/point-set.ts","../src/components/excelfile/excelfile/excel/typings/fast-formula-parser.d.ts","../src/components/excelfile/excelsheetbar/excelsheetbar.tsx","../src/components/excelfile/exceltoolbar/exceltoolbar.tsx","../src/components/expandablemenu/expandablemenu.stories.tsx","../src/components/expandablemenu/expandablemenu.tsx","../src/components/expandablemenu/index.ts","../src/components/expandablemenu/types.ts","../src/components/ff_captcha/recaptcha.tsx","../src/components/ff_captcha/captcha.stories.tsx","../src/components/ff_captcha/index.ts","../src/components/ff_captcha/types.ts","../src/components/filedropzone/dropzone.tsx","../src/components/filedropzone/filedropzone.stories.tsx","../src/components/filedropzone/filedropzone.tsx","../src/components/filedropzone/filepreview.tsx","../src/components/filedropzone/index.ts","../src/components/filedropzone/types.ts","../src/components/form/form.stories.tsx","../src/components/form/form.tsx","../src/components/form/index.ts","../src/components/form/types.ts","../src/components/gridlayout/gridlayout.stories.tsx","../src/components/gridlayout/gridlayout.tsx","../src/components/gridlayout/index.ts","../src/components/gridlayout/types.ts","../src/components/highlighttext/highlighttext.stories.tsx","../src/components/highlighttext/highlighttext.tsx","../src/components/highlighttext/index.ts","../src/components/highlighttext/types.ts","../src/components/icon/icon.stories.tsx","../src/components/icon/icon.tsx","../src/components/icon/iconlist.ts","../src/components/icon/index.ts","../src/components/icon/types.ts","../src/components/iconbutton/iconbutton.stories.tsx","../src/components/iconbutton/iconbutton.tsx","../src/components/iconbutton/index.ts","../src/components/iconbutton/types.ts","../src/components/iconradiogroup/iconradiogroup.stories.tsx","../src/components/iconradiogroup/iconradiogroup.tsx","../src/components/iconradiogroup/index.ts","../src/components/iconradiogroup/type.ts","../src/components/input/input.stories.tsx","../src/components/input/input.tsx","../src/components/input/index.ts","../src/components/input/types.ts","../src/components/inputwithdropdown/inputwithdropdown.stories.tsx","../src/components/inputwithdropdown/inputwithdropdown.tsx","../src/components/inputwithdropdown/index.ts","../src/components/inputwithdropdown/types.ts","../src/components/lazyload/lazyload.stories.tsx","../src/components/lazyload/lazyload.ts","../src/components/lazyload/lazyloading.tsx","../src/components/lazyload/index.ts","../src/components/machineinputfield/machineinputfield.stories.tsx","../src/components/machineinputfield/machineinputfield.tsx","../src/components/machineinputfield/index.ts","../src/components/machineinputfield/types.ts","../src/components/menuoption/menuoption.stories.tsx","../src/components/menuoption/menuoption.tsx","../src/components/menuoption/index.ts","../src/components/menuoption/types.ts","../src/components/minimodal/minimodal.stories.tsx","../src/components/minimodal/minimodal.tsx","../src/components/minimodal/index.ts","../src/components/minimodal/types.ts","../src/components/modal/modal.stories.tsx","../src/components/modal/modal.tsx","../src/components/modal/index.tsx","../src/components/modal/types.ts","../src/components/multiselect/dropdown.tsx","../src/components/multiselect/multiselect.stories.tsx","../src/components/multiselect/multiselect.tsx","../src/components/multiselect/multiselecttypes.ts","../src/components/multiselect/dropdowntypes.ts","../src/components/multiselect/index.ts","../src/components/nlpinput/nlpinput.stories.tsx","../src/components/nlpinput/nlpinput.tsx","../src/components/nlpinput/index.ts","../src/components/nlpinput/type.tsx","../src/components/nlpinput/components/nlpdropdown/nlpdropdowntype.ts","../src/components/nlpinput/components/nlpdropdown/nlpdropdown.tsx","../src/components/paper/paper.stories.tsx","../src/components/paper/paper.tsx","../src/components/paper/index.ts","../src/components/paper/types.ts","../src/components/radiobutton/radiobutton.stories.tsx","../src/components/radiobutton/radiobutton.tsx","../src/components/radiobutton/index.ts","../src/components/radiobutton/radiobuttontypes.tsx","../src/components/radiogroup/radiogroup.stories.tsx","../src/components/radiogroup/radiogroup.tsx","../src/components/radiogroup/index.ts","../src/components/radiogroup/radiogrouptypes.tsx","../src/components/search/search.stories.tsx","../src/components/search/search.tsx","../src/components/search/index.ts","../src/components/search/types.ts","../src/components/select/select.stories.tsx","../src/components/select/select.tsx","../src/components/select/index.ts","../src/components/select/types.ts","../src/components/select/components/dropdown/dropdown.tsx","../src/components/select/components/dropdown/dropdowntypes.ts","../src/components/sequentialconnectingbranch/sequentialconnectingbranch.stories.tsx","../src/components/sequentialconnectingbranch/sequentialconnectingbranch.tsx","../src/components/sequentialconnectingbranch/index.ts","../src/components/sequentialconnectingbranch/types.ts","../src/components/sequentialconnectingbranch/components/addbrowsermodal/addbrowsermodal.tsx","../src/components/sequentialconnectingbranch/components/addbrowsermodal/types.ts","../src/components/sequentialconnectingbranch/components/branches/branches.tsx","../src/components/sequentialconnectingbranch/components/branches/types.ts","../src/components/sequentialconnectingbranch/components/connectingbranches/connectingbranches.tsx","../src/components/sequentialconnectingbranch/components/connectingbranches/types.ts","../src/components/sequentialconnectingbranch/components/datasetlistmodal/datasetlistmodal.tsx","../src/components/sequentialconnectingbranch/components/datasetlistmodal/types.ts","../src/components/statedropdown/statedropdown.stories.tsx","../src/components/statedropdown/statedropdown.tsx","../src/components/statedropdown/statedropdowntypes.tsx","../src/components/statedropdown/index.ts","../src/components/statusbutton/statusbutton.stories.tsx","../src/components/statusbutton/statusbutton.tsx","../src/components/statusbutton/index.ts","../src/components/statusbutton/types.ts","../src/components/table/table.stories.tsx","../src/components/table/table.tsx","../src/components/table/types.ts","../src/components/table/index.ts","../src/components/tabletree/tabletree.stories.tsx","../src/components/tabletree/tabletree.tsx","../src/components/tabletree/data.ts","../src/components/tabletree/index.ts","../src/components/tabs/tabs.stories.tsx","../src/components/tabs/tabs.tsx","../src/components/tabs/index.ts","../src/components/tabs/types.ts","../src/components/textarea/textarea.stories.tsx","../src/components/textarea/textarea.tsx","../src/components/textarea/types.ts","../src/components/textarea/index.tsx","../src/components/themeprovider/themeprovider.tsx","../src/components/themeprovider/index.ts","../src/components/themeprovider/types.ts","../src/components/toast/toast.stories.tsx","../src/components/toast/toast.tsx","../src/components/toast/index.ts","../src/components/toast/types.ts","../src/components/toggle/toggle.stories.tsx","../src/components/toggle/toggle.tsx","../src/components/toggle/index.ts","../src/components/toggle/types.ts","../src/components/tooltip/tooltip.stories.tsx","../src/components/tooltip/tooltip.tsx","../src/components/tooltip/index.ts","../src/components/tooltip/types.ts","../src/components/typography/typography.stories.tsx","../src/components/typography/typography.tsx","../src/components/typography/index.ts","../src/components/typography/types.ts","../src/components/variableinput/variableinput.stories.tsx","../src/components/variableinput/variableinput.tsx","../src/components/variableinput/index.ts","../src/components/variableinput/types.ts","../src/hooks/useclickoutside.tsx","../src/hooks/usefiledropzone.tsx","../src/hooks/useportalposition.tsx","../src/hooks/usetheme.tsx","../src/hooks/keyboardevents/useesckeyevent.tsx","../src/utils/tablecell/tablecell.ts","../src/utils/checkempty/checkempty.stories.tsx","../src/utils/checkempty/checkempty.ts","../src/utils/comparearrays/comparearrays.stories.tsx","../src/utils/comparearrays/comparearrays.ts","../src/utils/compareobjects/compareobjects.stories.tsx","../src/utils/compareobjects/compareobjects.ts","../src/utils/debounce/debounce.stories.tsx","../src/utils/debounce/debounce.ts","../src/utils/ffid/ffid.stories.tsx","../src/utils/ffid/ffid.ts","../src/utils/findandinsert/findandinsert.stories.tsx","../src/utils/findandinsert/findandinsert.ts","../src/utils/getencrypteddata/getencrypteddata.stories.tsx","../src/utils/getencrypteddata/getencrypteddata.ts","../src/utils/getextension/getextension.stories.tsx","../src/utils/getextension/getextension.ts","../src/utils/throttle/throttle.stories.tsx","../src/utils/throttle/throttle.ts","../src/utils/truncatetext/truncatetext.stories.tsx","../src/utils/truncatetext/truncatetext.ts"],"version":"5.6.3"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixel-react-excel-sheet",
|
|
3
3
|
"description": "Great for pixel-perfect, design-focused components in React",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.9",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.esm.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"author": {
|
|
9
|
-
"name": "
|
|
9
|
+
"name": "thaneshwaran"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"devDependencies": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import classnames from
|
|
3
|
-
import * as Actions from
|
|
4
|
-
import * as Types from
|
|
5
|
-
import * as Point from
|
|
6
|
-
import useSelector from
|
|
7
|
-
import useDispatch from
|
|
8
|
-
import { getCellDimensions } from
|
|
9
|
-
import * as Matrix from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import * as Actions from './actions';
|
|
4
|
+
import * as Types from './types';
|
|
5
|
+
import * as Point from './point';
|
|
6
|
+
import useSelector from './use-selector';
|
|
7
|
+
import useDispatch from './use-dispatch';
|
|
8
|
+
import { getCellDimensions } from './util';
|
|
9
|
+
import * as Matrix from './matrix';
|
|
10
10
|
|
|
11
11
|
type Props = {
|
|
12
12
|
DataEditor: Types.DataEditorComponent;
|
|
@@ -77,7 +77,7 @@ const ActiveCell: React.FC<Props> = (props) => {
|
|
|
77
77
|
|
|
78
78
|
const coordsChanged =
|
|
79
79
|
active?.row !== prevActive.row || active?.column !== prevActive.column;
|
|
80
|
-
const exitedEditMode = mode !==
|
|
80
|
+
const exitedEditMode = mode !== 'edit';
|
|
81
81
|
|
|
82
82
|
if (coordsChanged || exitedEditMode) {
|
|
83
83
|
const initialCell = initialCellRef.current;
|
|
@@ -107,14 +107,14 @@ const ActiveCell: React.FC<Props> = (props) => {
|
|
|
107
107
|
<div
|
|
108
108
|
ref={rootRef}
|
|
109
109
|
className={classnames(
|
|
110
|
-
|
|
110
|
+
'Spreadsheet__active-cell',
|
|
111
111
|
`Spreadsheet__active-cell--${mode}`
|
|
112
112
|
)}
|
|
113
113
|
style={dimensions}
|
|
114
|
-
onClick={mode ===
|
|
114
|
+
onClick={mode === 'view' && !readOnly ? edit : undefined}
|
|
115
115
|
tabIndex={0}
|
|
116
116
|
>
|
|
117
|
-
{mode ===
|
|
117
|
+
{mode === 'edit' && active && (
|
|
118
118
|
<DataEditor
|
|
119
119
|
row={active.row}
|
|
120
120
|
column={active.column}
|
|
@@ -51,7 +51,7 @@ export const Cell: React.FC<Types.CellComponentProps> = ({
|
|
|
51
51
|
|
|
52
52
|
const handleMouseOver = React.useCallback(
|
|
53
53
|
(event: React.MouseEvent<HTMLTableCellElement>) => {
|
|
54
|
-
if (dragging && first && !isDotDragging) {
|
|
54
|
+
if (dragging && first && !isDotDragging) {
|
|
55
55
|
setCellDimensions(point, getOffsetRect(event.currentTarget));
|
|
56
56
|
select(point);
|
|
57
57
|
}
|
|
@@ -106,7 +106,7 @@ export const Cell: React.FC<Types.CellComponentProps> = ({
|
|
|
106
106
|
className={classnames('Spreadsheet__cell', data?.className, {
|
|
107
107
|
'Spreadsheet__active-cell': active || dragging,
|
|
108
108
|
})}
|
|
109
|
-
onMouseEnter={handleMouseOver}
|
|
109
|
+
onMouseEnter={handleMouseOver}
|
|
110
110
|
onMouseDown={handleMouseDown}
|
|
111
111
|
tabIndex={0}
|
|
112
112
|
>
|
|
@@ -131,15 +131,15 @@ export const enhance = (
|
|
|
131
131
|
): React.FC<
|
|
132
132
|
Omit<
|
|
133
133
|
Types.CellComponentProps,
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
134
|
+
| 'selected'
|
|
135
|
+
| 'active'
|
|
136
|
+
| 'copied'
|
|
137
|
+
| 'dragging'
|
|
138
|
+
| 'mode'
|
|
139
|
+
| 'data'
|
|
140
|
+
| 'select'
|
|
141
|
+
| 'activate'
|
|
142
|
+
| 'setCellDimensions'
|
|
143
143
|
>
|
|
144
144
|
> => {
|
|
145
145
|
return function CellWrapper(props) {
|
|
@@ -170,7 +170,7 @@ export const enhance = (
|
|
|
170
170
|
[dispatch]
|
|
171
171
|
);
|
|
172
172
|
const active = useSelector((state) => isActive(state.active, point));
|
|
173
|
-
const mode = useSelector((state) => (active ? state.mode :
|
|
173
|
+
const mode = useSelector((state) => (active ? state.mode : 'view'));
|
|
174
174
|
const data = useSelector((state) => Matrix.get(point, state.model.data));
|
|
175
175
|
const evaluatedData = useSelector((state) =>
|
|
176
176
|
Matrix.get(point, state.model.evaluatedData)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import classNames from
|
|
3
|
-
import * as Types from
|
|
4
|
-
import * as Point from
|
|
5
|
-
import * as Actions from
|
|
6
|
-
import useDispatch from
|
|
7
|
-
import useSelector from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import * as Types from './types';
|
|
4
|
+
import * as Point from './point';
|
|
5
|
+
import * as Actions from './actions';
|
|
6
|
+
import useDispatch from './use-dispatch';
|
|
7
|
+
import useSelector from './use-selector';
|
|
8
8
|
|
|
9
9
|
const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
10
10
|
column,
|
|
@@ -14,7 +14,7 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const dispatch = useDispatch();
|
|
16
16
|
const [width, setWidth] = React.useState(100);
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
// Function to handle the start of the resize (mouse down)
|
|
19
19
|
const onMouseDown = (e: React.MouseEvent) => {
|
|
20
20
|
const startX = e.clientX;
|
|
@@ -23,26 +23,33 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
23
23
|
const onMouseMove = (moveEvent: MouseEvent) => {
|
|
24
24
|
const newWidth = width + (moveEvent.clientX - startX);
|
|
25
25
|
setWidth(newWidth);
|
|
26
|
-
|
|
27
|
-
// const selectedAllRow = document.querySelector(".Spreadsheet__floating-rect--selected");
|
|
28
|
-
// const selectedSingleRow = document.querySelector(".Spreadsheet__active-cell");
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
const selectedAllRow = document.querySelector(
|
|
28
|
+
'.Spreadsheet__floating-rect--selected'
|
|
29
|
+
);
|
|
30
|
+
const selectedSingleRow = document.querySelector(
|
|
31
|
+
'.Spreadsheet__active-cell'
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// If the element exists, update its height
|
|
35
|
+
if (
|
|
36
|
+
selectedAllRow instanceof HTMLElement &&
|
|
37
|
+
selectedSingleRow instanceof HTMLElement
|
|
38
|
+
) {
|
|
39
|
+
selectedAllRow.style.width = `${newWidth}px`;
|
|
40
|
+
selectedSingleRow.style.width = `${newWidth}px`;
|
|
41
|
+
}
|
|
35
42
|
};
|
|
36
43
|
|
|
37
44
|
// Function to stop the resizing (mouse up)
|
|
38
45
|
const onMouseUp = () => {
|
|
39
|
-
document.removeEventListener(
|
|
40
|
-
document.removeEventListener(
|
|
46
|
+
document.removeEventListener('mousemove', onMouseMove);
|
|
47
|
+
document.removeEventListener('mouseup', onMouseUp);
|
|
41
48
|
};
|
|
42
49
|
|
|
43
50
|
// Add event listeners for mouse move and mouse up
|
|
44
|
-
document.addEventListener(
|
|
45
|
-
document.addEventListener(
|
|
51
|
+
document.addEventListener('mousemove', onMouseMove);
|
|
52
|
+
document.addEventListener('mouseup', onMouseUp);
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
const activate = React.useCallback(
|
|
@@ -58,12 +65,11 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
58
65
|
[onSelect, column]
|
|
59
66
|
);
|
|
60
67
|
|
|
61
|
-
|
|
62
68
|
return (
|
|
63
69
|
<th
|
|
64
|
-
style={{ minWidth: `${width}px`, position:
|
|
65
|
-
className={classNames(
|
|
66
|
-
|
|
70
|
+
style={{ minWidth: `${width}px`, position: 'relative' }} // Use dynamic width
|
|
71
|
+
className={classNames('Spreadsheet__header', {
|
|
72
|
+
'Spreadsheet__header--selected': selected,
|
|
67
73
|
})}
|
|
68
74
|
onClick={handleClick}
|
|
69
75
|
tabIndex={0}
|
|
@@ -71,15 +77,17 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
71
77
|
{label !== undefined ? label : columnIndexToLabel(column)}
|
|
72
78
|
<div
|
|
73
79
|
onMouseDown={onMouseDown}
|
|
74
|
-
onClick={()=>{
|
|
80
|
+
onClick={() => {
|
|
81
|
+
activate;
|
|
82
|
+
}}
|
|
75
83
|
style={{
|
|
76
|
-
zIndex:
|
|
77
|
-
width:
|
|
78
|
-
position:
|
|
84
|
+
zIndex: 'inherit',
|
|
85
|
+
width: '2px',
|
|
86
|
+
position: 'absolute',
|
|
79
87
|
right: 0,
|
|
80
88
|
top: 0,
|
|
81
|
-
height:
|
|
82
|
-
cursor:
|
|
89
|
+
height: '100%',
|
|
90
|
+
cursor: 'ew-resize',
|
|
83
91
|
}}
|
|
84
92
|
/>
|
|
85
93
|
</th>
|
|
@@ -90,7 +98,7 @@ export default ColumnIndicator;
|
|
|
90
98
|
|
|
91
99
|
export const enhance = (
|
|
92
100
|
ColumnIndicatorComponent: Types.ColumnIndicatorComponent
|
|
93
|
-
): React.FC<Omit<Types.ColumnIndicatorProps,
|
|
101
|
+
): React.FC<Omit<Types.ColumnIndicatorProps, 'selected' | 'onSelect'>> => {
|
|
94
102
|
return function ColumnIndicatorWrapper(props) {
|
|
95
103
|
const dispatch = useDispatch();
|
|
96
104
|
const selectEntireColumn = React.useCallback(
|
|
@@ -113,7 +121,7 @@ export const enhance = (
|
|
|
113
121
|
|
|
114
122
|
// Utility function to convert column index to label (e.g., 0 -> A, 1 -> B, etc.)
|
|
115
123
|
function columnIndexToLabel(column: number): string {
|
|
116
|
-
let label =
|
|
124
|
+
let label = '';
|
|
117
125
|
let index = column;
|
|
118
126
|
while (index >= 0) {
|
|
119
127
|
label = String.fromCharCode(65 + (index % 26)) + label;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import FloatingRect from
|
|
3
|
-
import { getRangeDimensions } from
|
|
4
|
-
import useSelector from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import FloatingRect from './FloatingRect';
|
|
3
|
+
import { getRangeDimensions } from './util';
|
|
4
|
+
import useSelector from './use-selector';
|
|
5
5
|
|
|
6
6
|
const Copied: React.FC = () => {
|
|
7
7
|
const range = useSelector((state) => state.copied);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import classNames from
|
|
3
|
-
import * as Actions from
|
|
4
|
-
import { EntireWorksheetSelection } from
|
|
5
|
-
import * as Types from
|
|
6
|
-
import useDispatch from
|
|
7
|
-
import useSelector from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import * as Actions from './actions';
|
|
4
|
+
import { EntireWorksheetSelection } from './selection';
|
|
5
|
+
import * as Types from './types';
|
|
6
|
+
import useDispatch from './use-dispatch';
|
|
7
|
+
import useSelector from './use-selector';
|
|
8
8
|
|
|
9
9
|
const CornerIndicator: Types.CornerIndicatorComponent = ({
|
|
10
10
|
selected,
|
|
@@ -15,8 +15,8 @@ const CornerIndicator: Types.CornerIndicatorComponent = ({
|
|
|
15
15
|
}, [onSelect]);
|
|
16
16
|
return (
|
|
17
17
|
<th
|
|
18
|
-
className={classNames(
|
|
19
|
-
|
|
18
|
+
className={classNames('Spreadsheet__header', {
|
|
19
|
+
'Spreadsheet__header--selected': selected,
|
|
20
20
|
})}
|
|
21
21
|
onClick={handleClick}
|
|
22
22
|
tabIndex={0}
|
|
@@ -28,7 +28,7 @@ export default CornerIndicator;
|
|
|
28
28
|
|
|
29
29
|
export const enhance = (
|
|
30
30
|
CornerIndicatorComponent: Types.CornerIndicatorComponent
|
|
31
|
-
): React.FC<Omit<Types.CornerIndicatorProps,
|
|
31
|
+
): React.FC<Omit<Types.CornerIndicatorProps, 'selected' | 'onSelect'>> => {
|
|
32
32
|
return function CornerIndicatorWrapper(props) {
|
|
33
33
|
const dispatch = useDispatch();
|
|
34
34
|
const selectEntireWorksheet = React.useCallback(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as Types from
|
|
3
|
-
import { moveCursorToEnd } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Types from './types';
|
|
3
|
+
import { moveCursorToEnd } from './util';
|
|
4
4
|
|
|
5
5
|
/** The default Spreadsheet DataEditor component */
|
|
6
6
|
const DataEditor: React.FC<Types.DataEditorProps> = ({ onChange, cell }) => {
|
|
@@ -8,7 +8,7 @@ const DataEditor: React.FC<Types.DataEditorProps> = ({ onChange, cell }) => {
|
|
|
8
8
|
|
|
9
9
|
const handleChange = React.useCallback(
|
|
10
10
|
(event: React.ChangeEvent<HTMLInputElement>) => {
|
|
11
|
-
onChange({ ...cell, value: event.target.value,style:cell?.style});
|
|
11
|
+
onChange({ ...cell, value: event.target.value, style: cell?.style });
|
|
12
12
|
},
|
|
13
13
|
[onChange, cell]
|
|
14
14
|
);
|
|
@@ -19,7 +19,7 @@ const DataEditor: React.FC<Types.DataEditorProps> = ({ onChange, cell }) => {
|
|
|
19
19
|
}
|
|
20
20
|
}, [inputRef]);
|
|
21
21
|
|
|
22
|
-
const value = cell?.value ??
|
|
22
|
+
const value = cell?.value ?? '';
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<div className="Spreadsheet__data-editor">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import classNames from
|
|
3
|
-
import * as Types from
|
|
4
|
-
import { hasLineBreaker } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import * as Types from './types';
|
|
4
|
+
import { hasLineBreaker } from './util';
|
|
5
5
|
|
|
6
|
-
export const TRUE_TEXT =
|
|
7
|
-
export const FALSE_TEXT =
|
|
6
|
+
export const TRUE_TEXT = 'TRUE';
|
|
7
|
+
export const FALSE_TEXT = 'FALSE';
|
|
8
8
|
|
|
9
9
|
/** The default Spreadsheet DataViewer component */
|
|
10
10
|
const DataViewer = <Cell extends Types.CellBase<Value>, Value>({
|
|
@@ -13,14 +13,14 @@ const DataViewer = <Cell extends Types.CellBase<Value>, Value>({
|
|
|
13
13
|
}: Types.DataViewerProps<Cell>): React.ReactElement => {
|
|
14
14
|
const value = getValue(cell, evaluatedCell);
|
|
15
15
|
|
|
16
|
-
return typeof value ===
|
|
16
|
+
return typeof value === 'boolean' ? (
|
|
17
17
|
<span className="Spreadsheet__data-viewer Spreadsheet__data-viewer--boolean">
|
|
18
18
|
{convertBooleanToText(value)}
|
|
19
19
|
</span>
|
|
20
20
|
) : (
|
|
21
21
|
<span
|
|
22
|
-
className={classNames(
|
|
23
|
-
|
|
22
|
+
className={classNames('Spreadsheet__data-viewer', {
|
|
23
|
+
'Spreadsheet__data-viewer--preserve-breaks': hasLineBreaker(value),
|
|
24
24
|
})}
|
|
25
25
|
>
|
|
26
26
|
{value}
|
|
@@ -35,7 +35,7 @@ function getValue(
|
|
|
35
35
|
evaluatedCell: Types.CellBase | undefined
|
|
36
36
|
) {
|
|
37
37
|
const baseValue = evaluatedCell?.value ?? cell?.value;
|
|
38
|
-
if (baseValue && typeof baseValue ===
|
|
38
|
+
if (baseValue && typeof baseValue === 'object') {
|
|
39
39
|
return baseValue.toString();
|
|
40
40
|
}
|
|
41
41
|
return baseValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import classnames from
|
|
3
|
-
import * as Types from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import * as Types from './types';
|
|
4
4
|
|
|
5
5
|
export type Props = {
|
|
6
6
|
variant?: string;
|
|
@@ -18,10 +18,10 @@ const FloatingRect: React.FC<Props> = ({
|
|
|
18
18
|
const { width, height, top, left } = dimensions || {};
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
|
-
className={classnames(
|
|
21
|
+
className={classnames('Spreadsheet__floating-rect', {
|
|
22
22
|
[`Spreadsheet__floating-rect--${variant}`]: variant,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
'Spreadsheet__floating-rect--dragging': dragging,
|
|
24
|
+
'Spreadsheet__floating-rect--hidden': hidden,
|
|
25
25
|
})}
|
|
26
26
|
style={{ width, height, top, left }}
|
|
27
27
|
/>
|