nmrium 0.21.0 → 0.24.0
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/README.md +4 -0
- package/lib/component/1d/Chart1D.js +1 -1
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +3 -4
- package/lib/component/1d/FooterBanner.js +7 -8
- package/lib/component/1d/Integral.js +3 -8
- package/lib/component/1d/IntegralResizable.js +1 -1
- package/lib/component/1d/IntegralsSeries.js +2 -2
- package/lib/component/1d/LinesSeries.js +1 -1
- package/lib/component/1d/PeakAnnotation.js +3 -3
- package/lib/component/1d/PeakAnnotations.js +1 -1
- package/lib/component/1d/Resizable.js +2 -2
- package/lib/component/1d/ResurrectedDatabaseRanges.js +1 -1
- package/lib/component/1d/SpectraTracker.js +3 -3
- package/lib/component/1d/Viewer1D.js +9 -9
- package/lib/component/1d/XAxis.js +1 -1
- package/lib/component/1d/YAxis.js +1 -1
- package/lib/component/1d/jCouplingGraph/JGraph.js +3 -4
- package/lib/component/1d/jCouplingGraph/JGraphVerticalAxis.js +1 -1
- package/lib/component/1d/jCouplingGraph/JsCoupling.js +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.js +2 -2
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +3 -3
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +1 -1
- package/lib/component/1d/multiplicityTree/TreeNodes.js +2 -2
- package/lib/component/1d/ranges/Range.js +2 -2
- package/lib/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/tool/BaseLineZones.js +1 -1
- package/lib/component/1d/tool/PeakPointer.js +1 -1
- package/lib/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib/component/1d/tool/XLabelPointer.js +1 -1
- package/lib/component/1d/utilities/scale.d.ts +1 -1
- package/lib/component/1d/utilities/scale.js +7 -6
- package/lib/component/2d/Chart2D.js +2 -2
- package/lib/component/2d/Contours.js +6 -6
- package/lib/component/2d/FooterBanner.js +3 -3
- package/lib/component/2d/Left1DChart.js +1 -1
- package/lib/component/2d/SignalDeltaLine.js +1 -1
- package/lib/component/2d/Top1DChart.js +1 -1
- package/lib/component/2d/Viewer2D.js +8 -8
- package/lib/component/2d/XAxis.js +1 -1
- package/lib/component/2d/YAxis.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib/component/2d/tools/slicing/HorizontalSliceChart.js +1 -1
- package/lib/component/2d/tools/slicing/SlicingView.js +1 -1
- package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib/component/2d/zones/IndicationLines.js +1 -1
- package/lib/component/2d/zones/Signal.js +2 -2
- package/lib/component/2d/zones/SignalCrosshair.js +1 -1
- package/lib/component/2d/zones/Zone.js +1 -1
- package/lib/component/2d/zones/Zones.js +2 -2
- package/lib/component/ErrorOverlay.js +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +1 -1
- package/lib/component/EventsTrackers/MouseTracker.js +1 -1
- package/lib/component/NMRium.d.ts +36 -36
- package/lib/component/NMRium.js +10 -16
- package/lib/component/assignment/index.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +84 -2
- package/lib/component/context/PreferencesContext.js +30 -5
- package/lib/component/elements/Button.js +1 -1
- package/lib/component/elements/ButtonToolTip.js +1 -1
- package/lib/component/elements/CheckBox.js +1 -1
- package/lib/component/elements/CloseButton.js +1 -1
- package/lib/component/elements/ColorInput.js +1 -1
- package/lib/component/elements/ContextMenu.js +1 -1
- package/lib/component/elements/DeleteButton.js +1 -1
- package/lib/component/elements/EditableColumn.d.ts +1 -1
- package/lib/component/elements/EditableColumn.js +1 -1
- package/lib/component/elements/Input.js +1 -1
- package/lib/component/elements/InputRange.js +1 -1
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/Label.js +1 -1
- package/lib/component/elements/Logo.js +1 -1
- package/lib/component/elements/MenuButton.js +3 -3
- package/lib/component/elements/MolecularFormulaInput.js +1 -1
- package/lib/component/elements/MoleculeSelection.js +1 -1
- package/lib/component/elements/NextPrev.js +2 -2
- package/lib/component/elements/NumberInput.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +3 -3
- package/lib/component/elements/ReactTable/ReactTableExpandable.js +3 -3
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib/component/elements/SaveButton.js +1 -1
- package/lib/component/elements/Select.js +1 -1
- package/lib/component/elements/Tab/DeleteButton.js +1 -1
- package/lib/component/elements/Tab/Tab.js +3 -3
- package/lib/component/elements/Tab/Tabs.js +2 -2
- package/lib/component/elements/Table/Table.js +1 -1
- package/lib/component/elements/Table/TableBody.js +1 -1
- package/lib/component/elements/Table/TableCell.js +1 -1
- package/lib/component/elements/Table/TableHead.js +1 -1
- package/lib/component/elements/Table/TableRow.js +1 -1
- package/lib/component/elements/ToggleButton.js +1 -1
- package/lib/component/elements/ToolTip/ToolTip.js +2 -2
- package/lib/component/elements/ToolbarMenu.js +3 -3
- package/lib/component/elements/accordion/Accordion.js +1 -1
- package/lib/component/elements/accordion/AccordionItem.js +2 -2
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts +20 -1
- package/lib/component/elements/dropDownButton/DropDownButton.js +32 -34
- package/lib/component/elements/dropDownButton/DropDownList.d.ts +2 -9
- package/lib/component/elements/dropDownButton/DropDownList.js +39 -25
- package/lib/component/elements/formik/ErrorMessage.js +2 -2
- package/lib/component/elements/formik/FormikCheckBox.d.ts +1 -0
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib/component/elements/formik/FormikForm.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikNumberInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +1 -1
- package/lib/component/elements/formik/Input.js +1 -1
- package/lib/component/elements/formik/SelectBox.js +1 -1
- package/lib/component/elements/linearAxis/LinearVerticalAxis.js +3 -3
- package/lib/component/elements/popup/Alert/ProgressIndicator.js +1 -1
- package/lib/component/elements/popup/Alert/Provider.js +3 -3
- package/lib/component/elements/popup/Modal/ConfirmDialog.js +1 -1
- package/lib/component/elements/popup/Modal/Modal.js +1 -1
- package/lib/component/elements/popup/Modal/ModalContent.js +1 -1
- package/lib/component/elements/popup/Modal/Provider.js +3 -3
- package/lib/component/elements/popup/Transition.js +1 -1
- package/lib/component/elements/popup/Wrapper.js +1 -1
- package/lib/component/elements/toggle/ToggleButton.js +1 -1
- package/lib/component/elements/toggle/ToggleButtonGroup.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +3 -3
- package/lib/component/header/BaseLineCorrectionPanel.js +1 -1
- package/lib/component/header/Header.js +30 -20
- package/lib/component/header/ManualPhaseCorrectionPanel.js +2 -2
- package/lib/component/header/RangesPickingOptionPanel.js +2 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/header/Zones2DOptionPanel.js +1 -1
- package/lib/component/highlight/index.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib/component/hooks/useCheckExperimentalFeature.js +5 -4
- package/lib/component/hooks/useCheckToolsVisibility.js +1 -1
- package/lib/component/hooks/useExport.js +15 -13
- package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
- package/lib/component/hooks/useIntegralPath.js +53 -0
- package/lib/component/hooks/useTableSortBy.d.ts +2 -1
- package/lib/component/hooks/useTableSortBy.js +27 -16
- package/lib/component/hooks/useToolsFunctions.js +4 -5
- package/lib/component/hooks/useXScale.d.ts +2 -0
- package/lib/component/hooks/useXScale.js +7 -0
- package/lib/component/loader/DefaultSpinnerComponent.js +1 -1
- package/lib/component/loader/DropZone.js +2 -2
- package/lib/component/loader/NoData.js +1 -3
- package/lib/component/loader/Spinner.js +1 -1
- package/lib/component/loader/SpinnerContext.js +1 -1
- package/lib/component/modal/AboutUsModal.js +4 -4
- package/lib/component/modal/AlignSpectraModal.js +1 -1
- package/lib/component/modal/CopyClipboardModal.js +2 -2
- package/lib/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +13 -11
- package/lib/component/modal/LoadJCAMPModal.js +1 -1
- package/lib/component/modal/ModalStyle.js +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +1 -1
- package/lib/component/modal/MultipleSpectraFiltersModal/EquallySpacedFilter.js +1 -1
- package/lib/component/modal/MultipleSpectraFiltersModal/FromToFilter.js +1 -1
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +4 -4
- package/lib/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib/component/modal/PredictSpectraModal.d.ts +0 -28
- package/lib/component/modal/PredictSpectraModal.js +31 -54
- package/lib/component/modal/SaveAsModal.js +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.js +8 -7
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.d.ts +2 -1
- package/lib/component/modal/editRange/EditRangeModal.js +13 -9
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +33 -40
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +5 -5
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +3 -3
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +5 -5
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
- package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
- package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
- package/lib/component/modal/editZone/EditZoneModal.js +98 -0
- package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
- package/lib/component/modal/editZone/SignalFormTab.js +6 -0
- package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
- package/lib/component/modal/editZone/SignalsForm.js +62 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
- package/lib/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib/component/modal/setting/DisplayTabContent.d.ts +2 -2
- package/lib/component/modal/setting/DisplayTabContent.js +52 -14
- package/lib/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
- package/lib/component/modal/setting/GeneralSettings.js +69 -76
- package/lib/component/modal/setting/WorkspaceItem.d.ts +6 -0
- package/lib/component/modal/setting/WorkspaceItem.js +59 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
- package/lib/component/panels/InformationPanel.js +4 -4
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +4 -4
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +5 -6
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +3 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +10 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +28 -18
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +9 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +16 -14
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +3 -3
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +5 -5
- package/lib/component/panels/Panels.d.ts +1 -1
- package/lib/component/panels/Panels.js +60 -45
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -4
- package/lib/component/panels/RangesPanel/RangesHeader.js +16 -14
- package/lib/component/panels/RangesPanel/RangesPanel.js +5 -6
- package/lib/component/panels/RangesPanel/RangesPreferences.js +4 -5
- package/lib/component/panels/RangesPanel/RangesTable.js +3 -3
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -6
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +6 -66
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +7 -0
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +74 -0
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +7 -0
- package/lib/component/panels/RangesPanel/{useMapRanges.js → hooks/useMapRanges.js} +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +12 -10
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +4 -4
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +13 -11
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +10 -5
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +11 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +5 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +23 -27
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +2 -2
- package/lib/component/panels/SummaryPanel/Overview.js +2 -2
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +42 -45
- package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
- package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
- package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +3 -3
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +13 -8
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +7 -4
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +3 -3
- package/lib/component/panels/databasePanel/DatabasePreferences.js +3 -4
- package/lib/component/panels/databasePanel/DatabaseTable.js +4 -4
- package/lib/component/panels/extra/placeholder/NoTableData.js +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.js +2 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +19 -15
- package/lib/component/panels/header/DefaultPanelHeader.js +2 -2
- package/lib/component/panels/header/PreferencesHeader.js +1 -1
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +6 -0
- package/lib/component/panels/predictionPanel/PredictionOptions.js +90 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.js +35 -0
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/Reducer.d.ts +16 -23
- package/lib/component/reducer/Reducer.js +14 -11
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
- package/lib/component/reducer/actions/DomainActions.js +20 -1
- package/lib/component/reducer/actions/FiltersActions.js +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -2
- package/lib/component/reducer/actions/LoadActions.js +42 -9
- package/lib/component/reducer/actions/MoleculeActions.js +5 -1
- package/lib/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib/component/reducer/actions/RangesActions.js +3 -1
- package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +31 -27
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
- package/lib/component/reducer/actions/ZonesActions.js +33 -2
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
- package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
- package/lib/component/reducer/preferencesReducer.d.ts +182 -42
- package/lib/component/reducer/preferencesReducer.js +198 -80
- package/lib/component/reducer/types/Types.d.ts +9 -1
- package/lib/component/reducer/types/Types.js +3 -1
- package/lib/component/tool/BrushX.js +1 -1
- package/lib/component/tool/BrushXY.js +1 -1
- package/lib/component/tool/CrossLinePointer.js +1 -1
- package/lib/component/toolbar/BasicToolBar.js +23 -27
- package/lib/component/toolbar/FunctionToolBar.js +17 -18
- package/lib/component/toolbar/HistoryToolBar.js +1 -1
- package/lib/component/toolbar/ToolBar.js +2 -2
- package/lib/component/utility/FormatNumber.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +17 -0
- package/lib/component/workspaces/basic.js +29 -33
- package/lib/component/workspaces/exercise.d.ts +2 -0
- package/lib/component/workspaces/exercise.js +49 -0
- package/lib/component/workspaces/index.d.ts +3 -2
- package/lib/component/workspaces/index.js +3 -2
- package/lib/component/workspaces/prediction.d.ts +2 -0
- package/lib/component/workspaces/prediction.js +26 -0
- package/lib/component/workspaces/process1D.js +21 -31
- package/lib/data/PredictionManager.d.ts +36 -3
- package/lib/data/PredictionManager.js +62 -17
- package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
- package/lib/data/constants/DefaultPathLengths.js +8 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +11 -20
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +2 -3
- package/lib/data/utilities/getAtom.js +1 -1
- package/lib/data/utilities/getColor.d.ts +1 -0
- package/lib/data/utilities/getColor.js +1 -1
- package/lib/types/PanelPreferencesType.d.ts +10 -0
- package/lib/types/PanelPreferencesType.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +1 -1
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +8 -5
- package/lib-cjs/component/1d/FooterBanner.js +7 -8
- package/lib-cjs/component/1d/Integral.js +3 -8
- package/lib-cjs/component/1d/IntegralResizable.js +1 -1
- package/lib-cjs/component/1d/IntegralsSeries.js +2 -2
- package/lib-cjs/component/1d/Line.js +5 -1
- package/lib-cjs/component/1d/LinesSeries.js +1 -1
- package/lib-cjs/component/1d/PeakAnnotation.js +3 -3
- package/lib-cjs/component/1d/PeakAnnotations.js +1 -1
- package/lib-cjs/component/1d/Resizable.js +2 -2
- package/lib-cjs/component/1d/ResurrectedDatabaseRanges.js +1 -1
- package/lib-cjs/component/1d/SpectraTracker.js +3 -3
- package/lib-cjs/component/1d/Viewer1D.js +14 -10
- package/lib-cjs/component/1d/XAxis.js +6 -2
- package/lib-cjs/component/1d/YAxis.js +6 -2
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +3 -4
- package/lib-cjs/component/1d/jCouplingGraph/JGraphVerticalAxis.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCoupling.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplings.js +2 -2
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +1 -1
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +3 -3
- package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/TreeNodes.js +2 -2
- package/lib-cjs/component/1d/ranges/Range.js +2 -2
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib-cjs/component/1d/ranges/Ranges.js +2 -2
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -1
- package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
- package/lib-cjs/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib-cjs/component/1d/tool/XLabelPointer.js +1 -1
- package/lib-cjs/component/1d/utilities/scale.js +7 -6
- package/lib-cjs/component/2d/Chart2D.js +2 -2
- package/lib-cjs/component/2d/Contours.js +6 -6
- package/lib-cjs/component/2d/FooterBanner.js +3 -3
- package/lib-cjs/component/2d/Left1DChart.js +6 -2
- package/lib-cjs/component/2d/SignalDeltaLine.js +1 -1
- package/lib-cjs/component/2d/Top1DChart.js +6 -2
- package/lib-cjs/component/2d/Viewer2D.js +12 -8
- package/lib-cjs/component/2d/XAxis.js +6 -2
- package/lib-cjs/component/2d/YAxis.js +6 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib-cjs/component/2d/tools/slicing/HorizontalSliceChart.js +6 -2
- package/lib-cjs/component/2d/tools/slicing/SlicingView.js +1 -1
- package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +6 -2
- package/lib-cjs/component/2d/zones/IndicationLines.js +1 -1
- package/lib-cjs/component/2d/zones/Signal.js +2 -2
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +1 -1
- package/lib-cjs/component/2d/zones/Zone.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +2 -2
- package/lib-cjs/component/ErrorOverlay.js +1 -1
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +1 -1
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +1 -1
- package/lib-cjs/component/NMRium.js +14 -17
- package/lib-cjs/component/assignment/index.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +33 -4
- package/lib-cjs/component/elements/Button.js +1 -1
- package/lib-cjs/component/elements/ButtonToolTip.js +1 -1
- package/lib-cjs/component/elements/CheckBox.js +1 -1
- package/lib-cjs/component/elements/CloseButton.js +1 -1
- package/lib-cjs/component/elements/ColorInput.js +1 -1
- package/lib-cjs/component/elements/ContextMenu.js +1 -1
- package/lib-cjs/component/elements/DeleteButton.js +1 -1
- package/lib-cjs/component/elements/EditableColumn.js +1 -1
- package/lib-cjs/component/elements/Input.js +1 -1
- package/lib-cjs/component/elements/InputRange.js +1 -1
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/Label.js +1 -1
- package/lib-cjs/component/elements/Logo.js +1 -1
- package/lib-cjs/component/elements/MenuButton.js +3 -3
- package/lib-cjs/component/elements/MolecularFormulaInput.js +1 -1
- package/lib-cjs/component/elements/MoleculeSelection.js +1 -1
- package/lib-cjs/component/elements/NextPrev.js +2 -2
- package/lib-cjs/component/elements/NumberInput.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableHeader.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +8 -4
- package/lib-cjs/component/elements/ReactTable/ReactTableExpandable.js +3 -3
- package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib-cjs/component/elements/SaveButton.js +1 -1
- package/lib-cjs/component/elements/Select.js +1 -1
- package/lib-cjs/component/elements/Tab/DeleteButton.js +1 -1
- package/lib-cjs/component/elements/Tab/Tab.js +3 -3
- package/lib-cjs/component/elements/Tab/Tabs.js +2 -2
- package/lib-cjs/component/elements/Table/Table.js +1 -1
- package/lib-cjs/component/elements/Table/TableBody.js +1 -1
- package/lib-cjs/component/elements/Table/TableCell.js +1 -1
- package/lib-cjs/component/elements/Table/TableHead.js +1 -1
- package/lib-cjs/component/elements/Table/TableRow.js +1 -1
- package/lib-cjs/component/elements/ToggleButton.js +1 -1
- package/lib-cjs/component/elements/ToolTip/ToolTip.js +2 -2
- package/lib-cjs/component/elements/ToolbarMenu.js +3 -3
- package/lib-cjs/component/elements/accordion/Accordion.js +1 -1
- package/lib-cjs/component/elements/accordion/AccordionItem.js +2 -2
- package/lib-cjs/component/elements/dropDownButton/DropDownButton.js +32 -34
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +39 -25
- package/lib-cjs/component/elements/formik/ErrorMessage.js +2 -2
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib-cjs/component/elements/formik/FormikForm.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
- package/lib-cjs/component/elements/formik/Input.js +1 -1
- package/lib-cjs/component/elements/formik/SelectBox.js +1 -1
- package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +3 -3
- package/lib-cjs/component/elements/popup/Alert/ProgressIndicator.js +1 -1
- package/lib-cjs/component/elements/popup/Alert/Provider.js +3 -3
- package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/Modal.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/Provider.js +3 -3
- package/lib-cjs/component/elements/popup/Transition.js +1 -1
- package/lib-cjs/component/elements/popup/Wrapper.js +1 -1
- package/lib-cjs/component/elements/toggle/ToggleButton.js +1 -1
- package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +1 -1
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +3 -3
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -2
- package/lib-cjs/component/header/Header.js +29 -19
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +7 -3
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +2 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib-cjs/component/header/Zones2DOptionPanel.js +1 -1
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -4
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +15 -13
- package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +27 -16
- package/lib-cjs/component/hooks/useToolsFunctions.js +4 -5
- package/lib-cjs/component/hooks/useXScale.js +11 -0
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +2 -2
- package/lib-cjs/component/loader/NoData.js +1 -3
- package/lib-cjs/component/loader/Spinner.js +1 -1
- package/lib-cjs/component/loader/SpinnerContext.js +1 -1
- package/lib-cjs/component/modal/AboutUsModal.js +4 -4
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
- package/lib-cjs/component/modal/CopyClipboardModal.js +2 -2
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +18 -12
- package/lib-cjs/component/modal/LoadJCAMPModal.js +1 -1
- package/lib-cjs/component/modal/ModalStyle.js +1 -1
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +1 -1
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/EquallySpacedFilter.js +1 -1
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/FromToFilter.js +1 -1
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +9 -5
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib-cjs/component/modal/PredictSpectraModal.js +36 -55
- package/lib-cjs/component/modal/SaveAsModal.js +2 -2
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +13 -8
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +13 -9
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +38 -41
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +5 -5
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +3 -3
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +1 -1
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +5 -5
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +6 -2
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +103 -0
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
- package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +42 -0
- package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +51 -13
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib-cjs/component/modal/setting/GeneralSettings.js +72 -75
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +64 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
- package/lib-cjs/component/panels/InformationPanel.js +4 -4
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +4 -4
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +5 -6
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +3 -3
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +28 -18
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +16 -14
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +8 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +5 -5
- package/lib-cjs/component/panels/Panels.js +61 -46
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +2 -2
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +9 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +16 -14
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +5 -6
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +5 -65
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +80 -0
- package/lib-cjs/component/panels/RangesPanel/{useMapRanges.js → hooks/useMapRanges.js} +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +12 -10
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +4 -4
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +13 -11
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +5 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +5 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +10 -5
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +11 -6
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +5 -6
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +23 -27
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +47 -30
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/Overview.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/SetMolecularFormulaModal.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +41 -44
- package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
- package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +3 -3
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +13 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +7 -4
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +3 -3
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -4
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +4 -4
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +1 -1
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +2 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +19 -15
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +2 -2
- package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +118 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +41 -0
- package/lib-cjs/component/reducer/IgnoreActions.js +7 -2
- package/lib-cjs/component/reducer/Reducer.js +21 -13
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
- package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
- package/lib-cjs/component/reducer/actions/FiltersActions.js +6 -2
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib-cjs/component/reducer/actions/LoadActions.js +47 -10
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +10 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -1
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -1
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +7 -3
- package/lib-cjs/component/reducer/actions/ToolsActions.js +43 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +40 -3
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
- package/lib-cjs/component/reducer/preferencesReducer.js +197 -78
- package/lib-cjs/component/reducer/types/Types.js +6 -4
- package/lib-cjs/component/tool/BrushX.js +1 -1
- package/lib-cjs/component/tool/BrushXY.js +1 -1
- package/lib-cjs/component/tool/CrossLinePointer.js +1 -1
- package/lib-cjs/component/toolbar/BasicToolBar.js +23 -27
- package/lib-cjs/component/toolbar/FunctionToolBar.js +22 -19
- package/lib-cjs/component/toolbar/HistoryToolBar.js +1 -1
- package/lib-cjs/component/toolbar/ToolBar.js +2 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +5 -1
- package/lib-cjs/component/utility/FormatNumber.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +29 -33
- package/lib-cjs/component/workspaces/exercise.js +52 -0
- package/lib-cjs/component/workspaces/index.js +3 -2
- package/lib-cjs/component/workspaces/prediction.js +29 -0
- package/lib-cjs/component/workspaces/process1D.js +21 -31
- package/lib-cjs/data/Filters.js +5 -1
- package/lib-cjs/data/FiltersManager.js +5 -1
- package/lib-cjs/data/PredictionManager.js +62 -17
- package/lib-cjs/data/SpectraManager.js +5 -1
- package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +16 -21
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib-cjs/data/data1d/Spectrum1D/shift/getShiftX.js +5 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +7 -4
- package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +5 -1
- package/lib-cjs/data/utilities/getAtom.js +1 -1
- package/lib-cjs/data/utilities/getColor.js +2 -1
- package/lib-cjs/types/PanelPreferencesType.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +21 -21
- package/lib/component/1d/utilities/useIntegralPath.js +0 -63
- package/lib/component/panels/RangesPanel/useMapRanges.d.ts +0 -6
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
- package/lib/component/reducer/actions/Zoom.d.ts +0 -16
- package/lib/component/reducer/actions/Zoom.js +0 -92
- package/lib/component/workspaces/exercise1D.d.ts +0 -2
- package/lib/component/workspaces/exercise1D.js +0 -45
- package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
- package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
- package/lib-cjs/component/workspaces/exercise1D.js +0 -48
|
@@ -1,7 +1,32 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
import { preferencesInitialState, } from '../reducer/preferencesReducer';
|
|
3
|
-
|
|
4
|
-
export const
|
|
1
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
2
|
+
import { preferencesInitialState, WORKSPACES, } from '../reducer/preferencesReducer';
|
|
3
|
+
import Workspaces from '../workspaces';
|
|
4
|
+
export const PreferencesContext = createContext(preferencesInitialState);
|
|
5
|
+
export const PreferencesProvider = PreferencesContext.Provider;
|
|
5
6
|
export function usePreferences() {
|
|
6
|
-
|
|
7
|
+
const context = useContext(PreferencesContext);
|
|
8
|
+
if (!context) {
|
|
9
|
+
throw new Error('Preferences context was not found');
|
|
10
|
+
}
|
|
11
|
+
const { workspace, workspaces, dispatch } = context;
|
|
12
|
+
return useMemo(() => {
|
|
13
|
+
return {
|
|
14
|
+
current: workspaces[workspace.current] || {},
|
|
15
|
+
workspace,
|
|
16
|
+
workspaces,
|
|
17
|
+
dispatch,
|
|
18
|
+
};
|
|
19
|
+
}, [dispatch, workspace, workspaces]);
|
|
20
|
+
}
|
|
21
|
+
export function useWorkspacesList() {
|
|
22
|
+
const { workspaces } = usePreferences();
|
|
23
|
+
return useMemo(() => {
|
|
24
|
+
const currentWorkspaces = Object.keys(workspaces).reduce((acc, key) => {
|
|
25
|
+
if (!Workspaces[key]) {
|
|
26
|
+
acc.push({ key, label: workspaces[key].label });
|
|
27
|
+
}
|
|
28
|
+
return acc;
|
|
29
|
+
}, []);
|
|
30
|
+
return [...WORKSPACES, ...currentWorkspaces];
|
|
31
|
+
}, [workspaces]);
|
|
7
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
export default function Button({ onClick, ...props }) {
|
|
4
|
-
return (_jsx(Fragment, { children: _jsx("button", { type: "button", onClick: onClick, ...props }
|
|
4
|
+
return (_jsx(Fragment, { children: _jsx("button", { type: "button", onClick: onClick, ...props }) }));
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ToolTip from './ToolTip/ToolTip';
|
|
3
3
|
function ButtonToolTip({ children, style = {}, onClick = () => null, popupTitle = '', popupPlacement = 'right', ...props }) {
|
|
4
|
-
return (_jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { style: style, type: "button", onClick: onClick, ...props, children: children }
|
|
4
|
+
return (_jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { style: style, type: "button", onClick: onClick, ...props, children: children }) }));
|
|
5
5
|
}
|
|
6
6
|
export default ButtonToolTip;
|
|
@@ -7,6 +7,6 @@ const CheckBox = forwardRef((props, ref) => {
|
|
|
7
7
|
setCheck(!checked);
|
|
8
8
|
onChange(e);
|
|
9
9
|
}, [checked, onChange]);
|
|
10
|
-
return (_jsx("input", { ref: ref, type: "checkbox", name: name, id: name, onChange: handleCheck, defaultChecked: checkProps, disabled: disabled, style: style }
|
|
10
|
+
return (_jsx("input", { ref: ref, type: "checkbox", name: name, id: name, onChange: handleCheck, defaultChecked: checkProps, disabled: disabled, style: style }));
|
|
11
11
|
});
|
|
12
12
|
export default CheckBox;
|
|
@@ -18,6 +18,6 @@ const styles = {
|
|
|
18
18
|
};
|
|
19
19
|
function CloseButton(props) {
|
|
20
20
|
const { onClick = () => null, popupTitle = 'Close', popupPlacement = 'left', className = '', } = props;
|
|
21
|
-
return (_jsx("div", { className: className, children: _jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { style: styles.button, type: "button", onClick: onClick, children: _jsx(FaTimes, { style: styles.svg }
|
|
21
|
+
return (_jsx("div", { className: className, children: _jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { style: styles.button, type: "button", onClick: onClick, children: _jsx(FaTimes, { style: styles.svg }) }) }) }));
|
|
22
22
|
}
|
|
23
23
|
export default memo(CloseButton);
|
|
@@ -83,6 +83,6 @@ function ColorInput(props) {
|
|
|
83
83
|
setColor(hex);
|
|
84
84
|
onColorChange({ ...colorEvent, hex, name });
|
|
85
85
|
}, [name, onColorChange]);
|
|
86
|
-
return (_jsxs("div", { css: style, children: [_jsx("span", { className: "inputLabel", children: label }
|
|
86
|
+
return (_jsxs("div", { css: style, children: [_jsx("span", { className: "inputLabel", children: label }), _jsxs("div", { style: { flex: 4 }, children: [_jsxs("div", { className: "swatch", onClick: handleClick, children: [_jsx("div", { className: "color", style: { backgroundColor: selectedColor } }), _jsx("input", { type: "hidden", value: selectedColor, name: name })] }), displayColorPicker ? (_jsxs("div", { className: "color-popover", children: [_jsx("div", { className: "cover", onClick: handleClose }), _jsx(ChromePicker, { color: { hex: selectedColor }, onChangeComplete: handleOnColorChanged })] })) : null] })] }));
|
|
87
87
|
}
|
|
88
88
|
export default memo(ColorInput);
|
|
@@ -123,6 +123,6 @@ function ContextMenu({ context }, ref) {
|
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
125
125
|
return (root.current &&
|
|
126
|
-
createPortal(context && (_jsx("div", { ref: ref, css: [styles, position], children: context.map((c, index) => (_jsx("button", { type: "button", onClick: (e) => clickHandler(e, c.onClick), children: c.label }, index))) }
|
|
126
|
+
createPortal(context && (_jsx("div", { ref: ref, css: [styles, position], children: context.map((c, index) => (_jsx("button", { type: "button", onClick: (e) => clickHandler(e, c.onClick), children: c.label }, index))) })), root.current));
|
|
127
127
|
}
|
|
128
128
|
export default forwardRef(ContextMenu);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
function DeleteButton(props) {
|
|
3
3
|
const { x = 'initial', y = 'initial', onDelete = () => null, fill = '#c81121', } = props;
|
|
4
|
-
return (_jsxs("svg", { className: "delete-button", x: x, y: y, onClick: onDelete, "data-no-export": "true", children: [_jsx("rect", { rx: "5", width: "16", height: "16", fill: fill }
|
|
4
|
+
return (_jsxs("svg", { className: "delete-button", x: x, y: y, onClick: onDelete, "data-no-export": "true", children: [_jsx("rect", { rx: "5", width: "16", height: "16", fill: fill }), _jsx("line", { x1: "5", x2: "10", y1: "8", y2: "8", stroke: "white", strokeWidth: "2" })] }));
|
|
5
5
|
}
|
|
6
6
|
export default DeleteButton;
|
|
@@ -4,7 +4,7 @@ interface EditableColumnProps {
|
|
|
4
4
|
onEditStart?: (element: any) => void;
|
|
5
5
|
type?: 'number' | 'text';
|
|
6
6
|
editStatus?: boolean;
|
|
7
|
-
value: string;
|
|
7
|
+
value: string | number;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
}
|
|
10
10
|
declare const _default: import("react").ForwardRefExoticComponent<EditableColumnProps & import("react").RefAttributes<unknown>>;
|
|
@@ -41,6 +41,6 @@ function EditableColumn(props, ref) {
|
|
|
41
41
|
enableEdit(flag);
|
|
42
42
|
}
|
|
43
43
|
}, [mouseClickCallback, onEditStart, onSave]);
|
|
44
|
-
return (_jsxs("div", { style: { display: 'table', width: '100%', height: '100%', ...style }, onDoubleClick: (event) => editModeHandler(true, event), children: [!enabled && (_jsx("span", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: value }
|
|
44
|
+
return (_jsxs("div", { style: { display: 'table', width: '100%', height: '100%', ...style }, onDoubleClick: (event) => editModeHandler(true, event), children: [!enabled && (_jsx("span", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: value })), enabled && (_jsx("div", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: _jsx(Input, { enableAutoSelect: true, className: "editable-column", value: value, type: type, onKeyDown: (e) => editModeHandler(false, e) }) }))] }));
|
|
45
45
|
}
|
|
46
46
|
export default forwardRef(EditableColumn);
|
|
@@ -120,6 +120,6 @@ const Input = forwardRef(({ value = '', name, style = {
|
|
|
120
120
|
}, className: `input ${className || ''}`, children: [renderIcon?.(), _jsx("input", { ...props, ref: combinedRef, name: name, style: {
|
|
121
121
|
...styles.input,
|
|
122
122
|
...(style?.input ? style.input : {}),
|
|
123
|
-
}, "data-test-id": name ? `input-${name}` : '', type: "text", value: val, onChange: onChangeHandler, onKeyDown: handleKeyDown, onKeyPress: preventPropagate, onDoubleClick: (e) => e.stopPropagation(), onFocus: onFocus, onBlur: onBlur }
|
|
123
|
+
}, "data-test-id": name ? `input-${name}` : '', type: "text", value: val, onChange: onChangeHandler, onKeyDown: handleKeyDown, onKeyPress: preventPropagate, onDoubleClick: (e) => e.stopPropagation(), onFocus: onFocus, onBlur: onBlur }), canClear && val && (_jsx("button", { type: "button", style: styles.clearButton, onClick: clearHandler, children: _jsx("span", { style: { display: 'block', margin: '0 auto' }, children: "\u2715" }) }))] }));
|
|
124
124
|
});
|
|
125
125
|
export default Input;
|
|
@@ -55,6 +55,6 @@ function InputRange(props, ref) {
|
|
|
55
55
|
window.addEventListener('mousemove', mouseMoveCallback);
|
|
56
56
|
window.addEventListener('mouseup', mouseUpCallback);
|
|
57
57
|
}, [name, onChange]);
|
|
58
|
-
return (_jsx("div", { style: { ...styles.container, ...style }, className: className, onMouseDown: mouseDownCallback, children: _jsx("span", { style: styles.label, children: label }
|
|
58
|
+
return (_jsx("div", { style: { ...styles.container, ...style }, className: className, onMouseDown: mouseDownCallback, children: _jsx("span", { style: styles.label, children: label }) }));
|
|
59
59
|
}
|
|
60
60
|
export default forwardRef(InputRange);
|
|
@@ -8,5 +8,5 @@ export default function Label(props) {
|
|
|
8
8
|
paddingRight: '10px',
|
|
9
9
|
width: 'max-content',
|
|
10
10
|
...style?.label,
|
|
11
|
-
}, children: title }
|
|
11
|
+
}, children: title }), _jsx("div", { style: style?.wrapper, children: children })] }));
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export default function Logo({ width = 100, height = 100 }) {
|
|
3
|
-
return (_jsxs("svg", { style: { width: width, height: height }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 752.34 221.73", children: [_jsx("path", { fill: "#ea580c", fillRule: "evenodd", d: "M.64,31.7A31.67,31.67,0,0,1,54.72,9.29l0,0A31.66,31.66,0,0,1,64,31.7V190a13.39,13.39,0,0,0,26.77,0V54a31.7,31.7,0,0,1,31.7-31.7V40.58A13.38,13.38,0,0,0,109.13,54V190a31.71,31.71,0,0,1-63.41,0V31.7a13.29,13.29,0,0,0-3.88-9.46l0,0A13.41,13.41,0,0,0,19,31.7V164.82H.64Z" }
|
|
3
|
+
return (_jsxs("svg", { style: { width: width, height: height }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 752.34 221.73", children: [_jsx("path", { fill: "#ea580c", fillRule: "evenodd", d: "M.64,31.7A31.67,31.67,0,0,1,54.72,9.29l0,0A31.66,31.66,0,0,1,64,31.7V190a13.39,13.39,0,0,0,26.77,0V54a31.7,31.7,0,0,1,31.7-31.7V40.58A13.38,13.38,0,0,0,109.13,54V190a31.71,31.71,0,0,1-63.41,0V31.7a13.29,13.29,0,0,0-3.88-9.46l0,0A13.41,13.41,0,0,0,19,31.7V164.82H.64Z" }), _jsx("path", { fill: "#2b143e", fillRule: "evenodd", d: "M154.21,54v68.17a13.34,13.34,0,0,0,3.89,9.47h0A13.39,13.39,0,0,0,181,122.14V99.32h-.06a31.63,31.63,0,0,1,9.29-22.38l0,0a31.65,31.65,0,0,1,44.8,0l0,0a31.58,31.58,0,0,1,9.3,22.39V118H226V99.32a13.3,13.3,0,0,0-3.89-9.46h0a13.44,13.44,0,0,0-18.93,0l0,0a13.3,13.3,0,0,0-3.83,8.19v24.09a31.7,31.7,0,0,1-54.11,22.42v0a31.66,31.66,0,0,1-9.3-22.4V54Z" }), _jsx("path", { fill: "#2b143e", fillRule: "evenodd", d: "M729.19,96.34c-8.65,0-14.26,3.17-17.67,8-3.41-5.12-8.78-8-16-8-8.16,0-13.52,3.17-16.32,7.31v-5.6H661V159h18.28V124.62c0-7.19,3.41-11.46,9.5-11.46,5.85,0,8.78,3.9,8.78,10V159h18.27V124.62c0-7.19,3.42-11.46,9.51-11.46,5.85,0,8.77,3.9,8.77,10V159h18.28V121.57C752.34,106.33,743.2,96.34,729.19,96.34Z" }), _jsx("path", { fill: "#2b143e", fillRule: "evenodd", d: "M629.26,98.05v33.26c0,8.66-4.63,12.56-11.33,12.56-5.85,0-10.6-3.54-10.6-11.09V98.05H589.05v37.41c0,16.45,10.48,25.22,22.79,25.22,8,0,14.13-2.92,17.42-7.43V159h18.28V98.05Z" }), _jsx("rect", { fill: "#2b143e", x: "558.22", y: "98.05", width: "18.28", height: "60.93" }), _jsx("path", { fill: "#2b143e", fillRule: "evenodd", d: "M567.36,92.68a11,11,0,1,0-11-11A11.08,11.08,0,0,0,567.36,92.68Z" }), _jsx("path", { fill: "#ea580c", fillRule: "evenodd", d: "M478.77,159H498V116.57L525.66,159H549.2l-22.3-34.75c5.45-2.13,8.12-4.14,11.48-8.86a31.07,31.07,0,0,0,6.07-18.26V94.62c0-10.61-3.45-15.93-9.28-21.78S520.75,63.09,510,63.09H478.71l.06,95.89Zm33.1-50.27h-6.46v-.06H498V82.19h10.87c4.67,0,9.44,1.38,11.94,3.81a12.84,12.84,0,0,1,3.81,9.2C524.58,102.52,518.92,108.71,511.87,108.71Z" }), _jsx("polygon", { fill: "#ea580c", fillRule: "evenodd", points: "372.91 60.8 372.91 158.98 392.16 158.98 392.16 119.23 419.91 157.41 447.61 119.23 447.61 158.98 466.87 158.98 466.87 60.8 419.91 125.22 372.91 60.8" }), _jsx("polygon", { fill: "#ea580c", fillRule: "evenodd", points: "283.89 61.04 283.89 159.1 303.14 159.1 303.14 105.85 361.01 160.93 361.01 62.83 341.67 62.83 341.67 116.08 283.89 61.04" })] }));
|
|
4
4
|
}
|
|
@@ -55,14 +55,14 @@ const menuStyles = css `
|
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
57
|
function MenuItem({ icon, label, onClick }) {
|
|
58
|
-
return (_jsxs("button", { type: "button", className: "menu-item", onClick: onClick, children: [icon, _jsx("span", { children: label }
|
|
58
|
+
return (_jsxs("button", { type: "button", className: "menu-item", onClick: onClick, children: [icon, _jsx("span", { children: label })] }));
|
|
59
59
|
}
|
|
60
60
|
function MenuList({ items, boxBounding, onClick }) {
|
|
61
61
|
return (_jsx("div", { className: "menu", style: {
|
|
62
62
|
transform: `translate(${boxBounding.width}px, -${boxBounding.height}px) `,
|
|
63
63
|
}, children: items?.map((item) => {
|
|
64
64
|
return (_jsx(MenuItem, { ...item, onClick: () => onClick(item) }, item.id));
|
|
65
|
-
}) }
|
|
65
|
+
}) }));
|
|
66
66
|
}
|
|
67
67
|
export default function MenuButton({ style, component, toolTip = '', className, items = [], onClick = () => null, }) {
|
|
68
68
|
const menuButtonRef = useRef(null);
|
|
@@ -77,5 +77,5 @@ export default function MenuButton({ style, component, toolTip = '', className,
|
|
|
77
77
|
showMenu(false);
|
|
78
78
|
onClick(e);
|
|
79
79
|
}, [onClick]);
|
|
80
|
-
return (_jsxs("div", { style: { height: 'auto' }, css: menuStyles, children: [_jsx("button", { ref: menuButtonRef, type: "button", css: style, onClick: handleClick, className: className, style: { boxSizing: 'border-box' }, children: _jsx(ToolTip, { title: toolTip, popupPlacement: "right", children: component }
|
|
80
|
+
return (_jsxs("div", { style: { height: 'auto' }, css: menuStyles, children: [_jsx("button", { ref: menuButtonRef, type: "button", css: style, onClick: handleClick, className: className, style: { boxSizing: 'border-box' }, children: _jsx(ToolTip, { title: toolTip, popupPlacement: "right", children: component }) }), isShown && (_jsx(MenuList, { items: items, boxBounding: menuButtonRef.current?.getBoundingClientRect(), onClick: clickHandler })), isShown && _jsx("div", { className: "menu-cover", onClick: closeMenuButton })] }));
|
|
81
81
|
}
|
|
@@ -60,6 +60,6 @@ function MolecularFormulaInput({ onSave = () => null, previousMF, }) {
|
|
|
60
60
|
const onSaveHandler = useCallback(() => {
|
|
61
61
|
onSave(hasChanged ? mf.trim() : previousMF);
|
|
62
62
|
}, [hasChanged, mf, onSave, previousMF]);
|
|
63
|
-
return (_jsxs("div", { css: inputStyle, children: [_jsx("input", { type: "text", onChange: onChangeHandler, defaultValue: previousMF }
|
|
63
|
+
return (_jsxs("div", { css: inputStyle, children: [_jsx("input", { type: "text", onChange: onChangeHandler, defaultValue: previousMF }), _jsx("button", { type: "button", onClick: onSaveHandler, disabled: !isValidMF, children: isValidMF ? 'Set' : 'Invalid' })] }));
|
|
64
64
|
}
|
|
65
65
|
export default MolecularFormulaInput;
|
|
@@ -73,5 +73,5 @@ export default function MoleculeSelection(props) {
|
|
|
73
73
|
}, [onChange]);
|
|
74
74
|
return (_jsxs("div", { children: [_jsx("div", { css: toolbarStyle, children: _jsxs("p", { children: [molecules &&
|
|
75
75
|
molecules.length > 0 &&
|
|
76
|
-
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] }
|
|
76
|
+
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] }) }), _jsx("div", { css: moleculeContainerStyle, children: _jsx(NextPrev, { defaultIndex: currentIndex, onChange: onChangeHandler, children: molecules?.map((mol, index) => (_jsxs("div", { className: "slider", children: [_jsx("div", { children: mol.molfile && (_jsx(MolfileSvgRenderer, { id: `molSVG${index}`, width: 120, molfile: mol.molfile })) }), _jsxs("p", { children: [_jsx(MF, { mf: mol.mf }), " - ", mol.mw?.toFixed(2)] })] }, mol.key))) }) })] }));
|
|
77
77
|
}
|
|
@@ -32,7 +32,7 @@ function Arrow({ direction, onClick }) {
|
|
|
32
32
|
outline: 0;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
`, children: _jsx(FaAngleLeft, { style: { transform: `scaleX(${direction === 'right' ? '-1' : '1'})` } }
|
|
35
|
+
`, children: _jsx(FaAngleLeft, { style: { transform: `scaleX(${direction === 'right' ? '-1' : '1'})` } }) }));
|
|
36
36
|
}
|
|
37
37
|
const transition = 0.45;
|
|
38
38
|
function NextPrev({ children, loop = false, defaultIndex = 0, onChange = () => null, }) {
|
|
@@ -94,6 +94,6 @@ function NextPrev({ children, loop = false, defaultIndex = 0, onChange = () => n
|
|
|
94
94
|
height: 100%;
|
|
95
95
|
width: ${width * (Sliders ? Sliders.length : 1)}px;
|
|
96
96
|
display: flex;
|
|
97
|
-
`, children: Sliders }
|
|
97
|
+
`, children: Sliders }), activeIndex !== 0 && _jsx(Arrow, { direction: "left", onClick: prevHandler }), Sliders && activeIndex !== Sliders.length - 1 && (_jsx(Arrow, { direction: "right", onClick: nextHandler }))] }));
|
|
98
98
|
}
|
|
99
99
|
export default memo(NextPrev);
|
|
@@ -38,6 +38,6 @@ const NumberInput = forwardRef(({ label, name, defaultValue = 0, style = { label
|
|
|
38
38
|
_ref.current.value = Number(defaultValue);
|
|
39
39
|
}
|
|
40
40
|
}, [defaultValue, onChange, ref]);
|
|
41
|
-
return (_jsxs("div", { style: { ...styles.container, ...style.container }, children: [_jsx("span", { style: { ...styles.label, ...style.label }, children: label }
|
|
41
|
+
return (_jsxs("div", { style: { ...styles.container, ...style.container }, children: [_jsx("span", { style: { ...styles.label, ...style.label }, children: label }), _jsx("div", { style: { ...styles.inputContainer, ...style.inputContainer }, children: _jsx("input", { ref: ref ? ref : localRef, name: name, style: { ...styles.input, ...style.input }, type: "number", pattern: pattern, defaultValue: defaultValue, step: step, onChange: changeHander, onInput: onInput, min: min, max: max }, defaultValue) })] }));
|
|
42
42
|
});
|
|
43
43
|
export default NumberInput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
function ReactTableHeader({ headerGroups }) {
|
|
4
|
-
return (_jsx("thead", { children: headerGroups.map((headerGroup) => (_jsx("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => (_jsxs("th", { ...column.getHeaderProps(column.getSortByToggleProps()), style: column.style, children: [column.render('Header'), _jsx("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' }
|
|
4
|
+
return (_jsx("thead", { children: headerGroups.map((headerGroup) => (_jsx("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => (_jsxs("th", { ...column.getHeaderProps(column.getSortByToggleProps()), style: column.style, children: [column.render('Header'), _jsx("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' })] }, column.getHeaderProps().key))) }, headerGroup.getHeaderGroupProps().key))) }));
|
|
5
5
|
}
|
|
6
6
|
export default memo(ReactTableHeader);
|
|
@@ -44,11 +44,11 @@ const ReactTableInner = forwardRef(function ReactTableInner(props, ref) {
|
|
|
44
44
|
position: 'absolute',
|
|
45
45
|
width: '100%',
|
|
46
46
|
pointerEvents: 'none',
|
|
47
|
-
} }
|
|
47
|
+
} })), _jsxs("table", { ...getTableProps(), css: ReactTableStyle, style: styles.table(enableVirtualScroll), children: [_jsx(ReactTableHeader, { headerGroups: headerGroups }), _jsx("tbody", { ...getTableBodyProps(), children: rowsData.map((row, index) => {
|
|
48
48
|
prepareRow(row);
|
|
49
49
|
prepareRowSpan(rows, enableVirtualScroll ? index + indexBoundary.start : index, rowSpanHeaders, groupKey);
|
|
50
50
|
return (_jsx(ReactTableRow, { row: row, ...row.getRowProps(), onContextMenu: (e) => contextMenuHandler(e, row), highlightedSource: highlightedSource }, row.key));
|
|
51
|
-
}) }
|
|
51
|
+
}) })] }), _jsx(ContextMenu, { ref: contextRef, context: context })] }));
|
|
52
52
|
});
|
|
53
53
|
function ReactTable(props) {
|
|
54
54
|
const { data, approxItemHeight = 40, groupKey } = props;
|
|
@@ -133,6 +133,6 @@ function ReactTable(props) {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}, [approxItemHeight, findEndIndex, findStartIndex, tableVirtualConfig]);
|
|
136
|
-
return (_jsx(ReactTableProvider, { value: tableVirtualConfig, children: _jsx(ReactTableInner, { onScroll: scrollHandler, ref: combineRef, ...{ ...props } }
|
|
136
|
+
return (_jsx(ReactTableProvider, { value: tableVirtualConfig, children: _jsx(ReactTableInner, { onScroll: scrollHandler, ref: combineRef, ...{ ...props } }) }));
|
|
137
137
|
}
|
|
138
138
|
export default memo(ReactTable);
|
|
@@ -19,9 +19,9 @@ function ReactTableExpandable({ columns, data, renderRowSubComponent = () => nul
|
|
|
19
19
|
contextRef.current.handleContextMenu(e, row.original);
|
|
20
20
|
}
|
|
21
21
|
}, [contextRef]);
|
|
22
|
-
return (_jsxs("table", { ...getTableProps(), css: ReactTableStyle, children: [_jsx(ReactTableHeader, { headerGroups: headerGroups }
|
|
22
|
+
return (_jsxs("table", { ...getTableProps(), css: ReactTableStyle, children: [_jsx(ReactTableHeader, { headerGroups: headerGroups }), _jsx("tbody", { ...getTableBodyProps(), children: rows.map((row) => {
|
|
23
23
|
prepareRow(row);
|
|
24
|
-
return (_jsxs(Fragment, { children: [_jsx(ReactTableRow, { row: row, ...row.getRowProps(), onContextMenu: (e) => contextMenuHandler(e, row) }, row.key), row.isExpanded ? (_jsx("tr", { children: _jsx("td", { colSpan: flatColumns.length, children: row?.original?.id && renderRowSubComponent({ row }) }
|
|
25
|
-
}) }, getTableBodyProps().key)] }
|
|
24
|
+
return (_jsxs(Fragment, { children: [_jsx(ReactTableRow, { row: row, ...row.getRowProps(), onContextMenu: (e) => contextMenuHandler(e, row) }, row.key), row.isExpanded ? (_jsx("tr", { children: _jsx("td", { colSpan: flatColumns.length, children: row?.original?.id && renderRowSubComponent({ row }) }) })) : null, _jsx(ContextMenu, { ref: contextRef, context: context })] }, row.index));
|
|
25
|
+
}) }, getTableBodyProps().key)] }));
|
|
26
26
|
}
|
|
27
27
|
export default ReactTableExpandable;
|
|
@@ -8,11 +8,11 @@ function ReactTableFlexLayout({ data, columns, onMouseDown = () => null, }) {
|
|
|
8
8
|
columns,
|
|
9
9
|
data,
|
|
10
10
|
}, useSortBy, useFlexLayout);
|
|
11
|
-
return (_jsxs("table", { ...getTableProps(), css: ReactTableStyle, style: { height: '100%' }, children: [_jsx("thead", { children: headerGroups.map((headerGroup) => (_jsx("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => (_jsxs("th", { ...column.getHeaderProps(column.getSortByToggleProps()), children: [column.render('Header'), _jsx("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' }
|
|
11
|
+
return (_jsxs("table", { ...getTableProps(), css: ReactTableStyle, style: { height: '100%' }, children: [_jsx("thead", { children: headerGroups.map((headerGroup) => (_jsx("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => (_jsxs("th", { ...column.getHeaderProps(column.getSortByToggleProps()), children: [column.render('Header'), _jsx("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' })] }, column.getHeaderProps().key))) }, headerGroup.getHeaderGroupProps().key))) }), _jsx("tbody", { ...getTableBodyProps(), style: { display: 'block', height: '100%', overflowY: 'auto' }, children: rows.map((row) => {
|
|
12
12
|
prepareRow(row);
|
|
13
13
|
return (_jsx("tr", { ...row.getRowProps(), onMouseDown: onMouseDown, children: row.cells.map((cell) => {
|
|
14
14
|
return (_jsx("td", { ...cell.getCellProps(), style: { ...cell.getCellProps().style, padding: '0px' }, children: cell.render('Cell') }, cell.getCellProps().key));
|
|
15
15
|
}) }, row.getRowProps().key));
|
|
16
|
-
}) }
|
|
16
|
+
}) })] }));
|
|
17
17
|
}
|
|
18
18
|
export default memo(ReactTableFlexLayout);
|
|
@@ -15,6 +15,6 @@ const styles = css `
|
|
|
15
15
|
`;
|
|
16
16
|
function SaveButton(props) {
|
|
17
17
|
const { className = '', disabled = false, popupPlacement = 'left', popupTitle = 'Save', onClick, } = props;
|
|
18
|
-
return (_jsx("div", { className: className, children: _jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { css: styles, type: "button", onClick: onClick, disabled: disabled, className: className, children: _jsx(FaCheck, {}
|
|
18
|
+
return (_jsx("div", { className: className, children: _jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { css: styles, type: "button", onClick: onClick, disabled: disabled, className: className, children: _jsx(FaCheck, {}) }) }) }));
|
|
19
19
|
}
|
|
20
20
|
export default memo(SaveButton);
|
|
@@ -31,6 +31,6 @@ const Select = forwardRef(function Select(props, ref) {
|
|
|
31
31
|
outline: none;
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
|
-
return (_jsx("select", { ref: ref, css: styles, name: name, onChange: handleOnChanged, defaultValue: defaultValue, className: className, style: style, children: data.map((d) => (_jsx("option", { value: d.value, children: d.label }, `${d.key}`))) }
|
|
34
|
+
return (_jsx("select", { ref: ref, css: styles, name: name, onChange: handleOnChanged, defaultValue: defaultValue, className: className, style: style, children: data.map((d) => (_jsx("option", { value: d.value, children: d.label }, `${d.key}`))) }));
|
|
35
35
|
});
|
|
36
36
|
export default Select;
|
|
@@ -28,6 +28,6 @@ const styles = css `
|
|
|
28
28
|
}
|
|
29
29
|
`;
|
|
30
30
|
function DeleteButton({ onDelete, className = 'delete' }) {
|
|
31
|
-
return (_jsx("button", { css: styles, className: className, type: "button", onClick: onDelete, children: _jsx(FaTimes, { className: "icon" }
|
|
31
|
+
return (_jsx("button", { css: styles, className: className, type: "button", onClick: onDelete, children: _jsx(FaTimes, { className: "icon" }) }));
|
|
32
32
|
}
|
|
33
33
|
export default DeleteButton;
|
|
@@ -30,10 +30,10 @@ export function InternalTab({ tabid, tablabel, isActive, onClick = () => null, c
|
|
|
30
30
|
e.stopPropagation();
|
|
31
31
|
onDelete({ ...e, tablabel, tabid });
|
|
32
32
|
}, [onDelete, tablabel, tabid]);
|
|
33
|
-
return (_jsxs("li", { className: className, onClick: clickHandler, css: styles(tabstyles), "data-test-id": `tab-${tabid}`, children: [canDelete && _jsx(DeleteButton, { onDelete: deleteHandler }
|
|
33
|
+
return (_jsxs("li", { className: className, onClick: clickHandler, css: styles(tabstyles), "data-test-id": `tab-${tabid}`, children: [canDelete && _jsx(DeleteButton, { onDelete: deleteHandler }), render
|
|
34
34
|
? render({ isActive, title: tablabel || '', id: tabid })
|
|
35
|
-
: tablabel] }
|
|
35
|
+
: tablabel] }));
|
|
36
36
|
}
|
|
37
37
|
export default function Tab(props) {
|
|
38
|
-
return _jsx(_Fragment, { children: props.children }
|
|
38
|
+
return _jsx(_Fragment, { children: props.children });
|
|
39
39
|
}
|
|
@@ -94,7 +94,7 @@ function Tabs({ children, onClick, position, onDelete = () => null, activeTab, }
|
|
|
94
94
|
if (tabid === activeTab) {
|
|
95
95
|
contentChild = child.props.children;
|
|
96
96
|
}
|
|
97
|
-
return (_jsx(InternalTab, { ...child.props, isActive: tabid === activeTab, onClick: onClickTabHandler, onDelete: onDelete }
|
|
97
|
+
return (_jsx(InternalTab, { ...child.props, isActive: tabid === activeTab, onClick: onClickTabHandler, onDelete: onDelete }));
|
|
98
98
|
});
|
|
99
99
|
const styles = useMemo(() => {
|
|
100
100
|
switch (position) {
|
|
@@ -106,6 +106,6 @@ function Tabs({ children, onClick, position, onDelete = () => null, activeTab, }
|
|
|
106
106
|
return topStyles;
|
|
107
107
|
}
|
|
108
108
|
}, [position]);
|
|
109
|
-
return (_jsxs("div", { className: "tabs", css: styles, children: [_jsx("ol", { className: "tab-list", children: tabs }
|
|
109
|
+
return (_jsxs("div", { className: "tabs", css: styles, children: [_jsx("ol", { className: "tab-list", children: tabs }), _jsx("div", { className: "tab-content", children: contentChild })] }));
|
|
110
110
|
}
|
|
111
111
|
export default memo(Tabs);
|
|
@@ -8,6 +8,6 @@ const styles = {
|
|
|
8
8
|
flexDirection: 'column',
|
|
9
9
|
};
|
|
10
10
|
function Table({ children, className, style, testID }) {
|
|
11
|
-
return (_jsx("div", { className: className, style: { ...styles, ...style }, "data-test-id": testID, children: children }
|
|
11
|
+
return (_jsx("div", { className: className, style: { ...styles, ...style }, "data-test-id": testID, children: children }));
|
|
12
12
|
}
|
|
13
13
|
export default memo(Table);
|
|
@@ -14,6 +14,6 @@ function TableBody({ children, className, style }) {
|
|
|
14
14
|
style: { borderBottom: '0.55px solid #d8d8d8', ...child.props.style },
|
|
15
15
|
}));
|
|
16
16
|
}, [children]);
|
|
17
|
-
return (_jsx("div", { className: className, style: { ...styles, ...style }, children: mappedChildren }
|
|
17
|
+
return (_jsx("div", { className: className, style: { ...styles, ...style }, children: mappedChildren }));
|
|
18
18
|
}
|
|
19
19
|
export default memo(TableBody);
|
|
@@ -21,6 +21,6 @@ function TableHeader({ children, className, style, align = 'center', vAlign = 'c
|
|
|
21
21
|
textAlign: align,
|
|
22
22
|
flex: size,
|
|
23
23
|
...style,
|
|
24
|
-
}, onClick: onClick, children: children }
|
|
24
|
+
}, onClick: onClick, children: children }));
|
|
25
25
|
}
|
|
26
26
|
export default memo(TableHeader);
|
|
@@ -11,6 +11,6 @@ const styles = {
|
|
|
11
11
|
fontWeight: 'bold',
|
|
12
12
|
};
|
|
13
13
|
function TableHead({ children, className, style }) {
|
|
14
|
-
return (_jsx("div", { className: className, style: { ...styles, ...style }, children: children }
|
|
14
|
+
return (_jsx("div", { className: className, style: { ...styles, ...style }, children: children }));
|
|
15
15
|
}
|
|
16
16
|
export default memo(TableHead);
|
|
@@ -6,6 +6,6 @@ const styles = {
|
|
|
6
6
|
padding: '5px 0px',
|
|
7
7
|
};
|
|
8
8
|
function TableHeader({ children, className, style, onClick = () => null, }) {
|
|
9
|
-
return (_jsx("div", { className: className, style: { ...styles, ...style }, onClick: onClick, children: children }
|
|
9
|
+
return (_jsx("div", { className: className, style: { ...styles, ...style }, onClick: onClick, children: children }));
|
|
10
10
|
}
|
|
11
11
|
export default memo(TableHeader);
|
|
@@ -24,6 +24,6 @@ function ToggleButton({ children, style = {}, onClick = () => null, popupTitle =
|
|
|
24
24
|
onClick(!flag);
|
|
25
25
|
Toggle(!flag);
|
|
26
26
|
}, [onClick, flag]);
|
|
27
|
-
return (_jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { disabled: disabled, css: styles, style: style, className: (flag ? 'toggle toggle-active ' : 'toggle ') + className, type: "button", onClick: toggleHandler, children: children }
|
|
27
|
+
return (_jsx(ToolTip, { title: popupTitle, popupPlacement: popupPlacement, children: _jsx("button", { disabled: disabled, css: styles, style: style, className: (flag ? 'toggle toggle-active ' : 'toggle ') + className, type: "button", onClick: toggleHandler, children: children }) }));
|
|
28
28
|
}
|
|
29
29
|
export default memo(ToggleButton);
|
|
@@ -89,12 +89,12 @@ function ToolTip({ style = { popup: {}, mainContainer: {} }, className = '', pop
|
|
|
89
89
|
justifyContent: 'center',
|
|
90
90
|
alignItems: 'center',
|
|
91
91
|
...style.mainContainer,
|
|
92
|
-
}, ref: refChild, onMouseOver: mouseOverHandler, onMouseOut: mouseLeaveHandler, children: children }
|
|
92
|
+
}, ref: refChild, onMouseOver: mouseOverHandler, onMouseOut: mouseLeaveHandler, children: children }), show &&
|
|
93
93
|
createPortal(_jsx("div", { ref: refContent, style: {
|
|
94
94
|
...styles.popup,
|
|
95
95
|
transform: `translate(${placement.x + offset.x}px,${placement.y + offset.y}px)`,
|
|
96
96
|
zIndex: 999999999,
|
|
97
97
|
...style.popup,
|
|
98
|
-
}, className: className, children: _jsx("span", { style: { pointerEvents: 'none' }, children: title }
|
|
98
|
+
}, className: className, children: _jsx("span", { style: { pointerEvents: 'none' }, children: title }) }), elementsWraperRef)] }));
|
|
99
99
|
}
|
|
100
100
|
export default memo(ToolTip);
|
|
@@ -55,7 +55,7 @@ const menuStyles = css `
|
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
57
|
function MenuItem({ icon, label, onClick }) {
|
|
58
|
-
return (_jsxs("button", { type: "button", className: "menu-item", onClick: onClick, children: [icon, _jsx("span", { children: label }
|
|
58
|
+
return (_jsxs("button", { type: "button", className: "menu-item", onClick: onClick, children: [icon, _jsx("span", { children: label })] }));
|
|
59
59
|
}
|
|
60
60
|
function MenuList({ items, boxBounding, onClick }) {
|
|
61
61
|
const listRef = useRef();
|
|
@@ -80,7 +80,7 @@ function MenuList({ items, boxBounding, onClick }) {
|
|
|
80
80
|
transform: `translate(${translate.x}px, -${translate.y}px) `,
|
|
81
81
|
}, children: items?.map((item) => {
|
|
82
82
|
return (_jsx(MenuItem, { ...item, onClick: () => onClick(item) }, item.id));
|
|
83
|
-
}) }
|
|
83
|
+
}) }));
|
|
84
84
|
}
|
|
85
85
|
export default function ToolbarMenu({ component, toolTip = '', items = [], onClick = () => null, }) {
|
|
86
86
|
const menuButtonRef = useRef(null);
|
|
@@ -98,5 +98,5 @@ export default function ToolbarMenu({ component, toolTip = '', items = [], onCli
|
|
|
98
98
|
const boxBounding = useCallback(() => {
|
|
99
99
|
return menuButtonRef.current?.getBoundingClientRect();
|
|
100
100
|
}, []);
|
|
101
|
-
return (_jsxs("div", { style: { height: 'auto' }, css: menuStyles, children: [_jsx("div", { ref: menuButtonRef, children: _jsx(Toolbar.Item, { id: `menu-${toolTip}`, title: toolTip, active: isShown, onClick: handleClick, children: component }
|
|
101
|
+
return (_jsxs("div", { style: { height: 'auto' }, css: menuStyles, children: [_jsx("div", { ref: menuButtonRef, children: _jsx(Toolbar.Item, { id: `menu-${toolTip}`, title: toolTip, active: isShown, onClick: handleClick, children: component }) }), isShown && (_jsx(MenuList, { items: items, boxBounding: boxBounding(), onClick: clickHandler })), isShown && _jsx("div", { className: "menu-cover", onClick: closeMenuButton })] }));
|
|
102
102
|
}
|
|
@@ -65,6 +65,6 @@ function Accordion({ children, defaultOpenIndex = 0 }) {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
}, [children.length, defaultOpenIndex]);
|
|
68
|
-
return (_jsx("div", { ref: refContainer, style: styles.container, children: mappedChildren }
|
|
68
|
+
return (_jsx("div", { ref: refContainer, style: styles.container, children: mappedChildren }));
|
|
69
69
|
}
|
|
70
70
|
export default Accordion;
|
|
@@ -70,10 +70,10 @@ function AccordionItem({ title, children, index, isOpen, onOpen = () => null, st
|
|
|
70
70
|
...styles.container,
|
|
71
71
|
flex: active == null ? 0 : '1 1 1px',
|
|
72
72
|
transition: isOpen ? 'flex 0.2s ease' : '',
|
|
73
|
-
}, className: "custom-accordion", children: [_jsx("button", { type: "button", style: styles.button, onClick: toggleAccordion, onDoubleClick: dbClickHandler, "data-test-id": `panel-title-${title}`, children: _jsx("p", { style: styles.buttonTitle, children: title }
|
|
73
|
+
}, className: "custom-accordion", children: [_jsx("button", { type: "button", style: styles.button, onClick: toggleAccordion, onDoubleClick: dbClickHandler, "data-test-id": `panel-title-${title}`, children: _jsx("p", { style: styles.buttonTitle, children: title }) }), _jsx("div", { ref: refContent, style: {
|
|
74
74
|
...styles.content,
|
|
75
75
|
maxHeight: active == null ? 0 : '100%',
|
|
76
76
|
...style,
|
|
77
|
-
}, "data-test-id": `panel-content-${title}`, children: children }
|
|
77
|
+
}, "data-test-id": `panel-content-${title}`, children: children })] }));
|
|
78
78
|
}
|
|
79
79
|
export default AccordionItem;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import { CSSObject } from '@emotion/react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
export interface DropDownListItem {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
index?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface DropDownListProps {
|
|
10
|
+
data: Array<DropDownListItem>;
|
|
11
|
+
onSelect: (index: number) => void;
|
|
12
|
+
renderItem?: ((item: DropDownListItem) => ReactNode) | null;
|
|
13
|
+
}
|
|
14
|
+
interface DropDownButtonProps extends Omit<DropDownListProps, 'onSelect'> {
|
|
15
|
+
selectedKey?: string;
|
|
16
|
+
onSelect?: (item: DropDownListItem) => void;
|
|
17
|
+
formatSelectedValue?: (Item: DropDownListItem) => string;
|
|
18
|
+
style?: CSSObject;
|
|
19
|
+
}
|
|
20
|
+
declare function DropDownButton(props: DropDownButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
21
|
export default DropDownButton;
|