nmrium 0.23.0 → 0.25.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 +2 -2
- package/lib/component/1d/FooterBanner.js +7 -8
- package/lib/component/1d/Integral.js +2 -2
- package/lib/component/1d/IntegralResizable.js +13 -13
- 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/ResurrectedDatabaseRanges.js +1 -1
- package/lib/component/1d/SpectraTracker.js +3 -3
- package/lib/component/1d/Viewer1D.js +5 -5
- 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 +30 -31
- 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 +18 -28
- package/lib/component/1d/ranges/RangeIntegral.js +1 -1
- 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/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 +3 -3
- 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 +34 -33
- package/lib/component/NMRium.js +30 -37
- package/lib/component/assignment/index.js +1 -1
- package/lib/component/context/GlobalContext.d.ts +12 -3
- package/lib/component/context/GlobalContext.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +84 -2
- package/lib/component/context/PreferencesContext.js +30 -5
- package/lib/component/elements/ActionButtons.d.ts +10 -0
- package/lib/component/elements/ActionButtons.js +14 -0
- package/lib/component/elements/Button.d.ts +30 -5
- package/lib/component/elements/Button.js +150 -4
- 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 +7 -7
- package/lib/component/elements/DeleteButton.js +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 +4 -3
- 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/resizer/DivResizer.d.ts +2 -0
- package/lib/component/elements/resizer/DivResizer.js +107 -0
- package/lib/component/elements/resizer/Resizer.d.ts +18 -0
- package/lib/component/elements/resizer/Resizer.js +12 -0
- package/lib/component/elements/resizer/SVGResizer.d.ts +2 -0
- package/lib/component/elements/resizer/SVGResizer.js +71 -0
- package/lib/component/elements/resizer/useDraggable.d.ts +19 -0
- package/lib/component/elements/resizer/useDraggable.js +52 -0
- package/lib/component/elements/toggle/ToggleButton.js +1 -1
- package/lib/component/elements/toggle/ToggleButtonGroup.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +6 -17
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -9
- package/lib/component/header/Header.js +28 -14
- package/lib/component/header/ManualPhaseCorrectionPanel.js +3 -10
- package/lib/component/header/RangesPickingOptionPanel.js +4 -17
- package/lib/component/header/ZeroFillingOptionsPanel.js +2 -9
- package/lib/component/header/Zones2DOptionPanel.js +3 -14
- 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 +26 -22
- package/lib/component/hooks/useTableSortBy.d.ts +2 -1
- package/lib/component/hooks/useTableSortBy.js +27 -16
- package/lib/component/loader/DefaultSpinnerComponent.js +1 -1
- package/lib/component/loader/DropZone.js +3 -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 +2 -1
- package/lib/component/modal/CopyClipboardModal.js +2 -2
- package/lib/component/modal/ExportAsMatrixModal.js +2 -1
- package/lib/component/modal/ImportPublicationStringModal.js +14 -11
- package/lib/component/modal/LoadJCAMPModal.js +7 -6
- package/lib/component/modal/ModalStyle.js +4 -26
- package/lib/component/modal/MoleculeStructureEditorModal.js +2 -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 +5 -4
- package/lib/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib/component/modal/PredictSpectraModal.js +31 -29
- package/lib/component/modal/SaveAsModal.d.ts +1 -1
- package/lib/component/modal/SaveAsModal.js +3 -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/editZone/EditPathLengthFormik.js +3 -3
- package/lib/component/modal/editZone/EditZoneModal.js +17 -15
- package/lib/component/modal/editZone/SignalFormTab.js +1 -1
- package/lib/component/modal/editZone/SignalsForm.js +2 -2
- 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 +49 -15
- package/lib/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib/component/modal/setting/GeneralSettings.js +62 -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.js +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +2 -2
- 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.js +5 -5
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +16 -10
- 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.js +46 -34
- 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 +3 -4
- 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 +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +4 -4
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -4
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +3 -3
- 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 +4 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
- 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 +4 -7
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -2
- 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.js +6 -20
- package/lib/component/panels/predictionPanel/PredictionPanel.js +19 -17
- package/lib/component/reducer/Reducer.d.ts +7 -0
- package/lib/component/reducer/Reducer.js +7 -3
- package/lib/component/reducer/actions/FiltersActions.js +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -2
- package/lib/component/reducer/actions/LoadActions.js +20 -15
- package/lib/component/reducer/actions/MoleculeActions.js +5 -1
- package/lib/component/reducer/preferencesReducer.d.ts +183 -36
- package/lib/component/reducer/preferencesReducer.js +195 -83
- package/lib/component/reducer/types/Types.d.ts +6 -0
- 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/Export.d.ts +3 -3
- package/lib/component/utility/Export.js +10 -9
- package/lib/component/utility/FormatNumber.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +17 -0
- package/lib/component/workspaces/basic.js +29 -34
- 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 -32
- package/lib/data/PredictionManager.d.ts +2 -1
- package/lib/data/PredictionManager.js +20 -13
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +4 -1
- 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 +7 -3
- package/lib-cjs/component/1d/FooterBanner.js +7 -8
- package/lib-cjs/component/1d/Integral.js +2 -2
- package/lib-cjs/component/1d/IntegralResizable.js +12 -12
- 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/ResurrectedDatabaseRanges.js +1 -1
- package/lib-cjs/component/1d/SpectraTracker.js +3 -3
- package/lib-cjs/component/1d/Viewer1D.js +10 -6
- 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 +29 -30
- 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 +18 -28
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +1 -1
- 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/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 +8 -4
- 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 +34 -37
- package/lib-cjs/component/assignment/index.js +1 -1
- package/lib-cjs/component/context/GlobalContext.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +33 -4
- package/lib-cjs/component/elements/ActionButtons.js +20 -0
- package/lib-cjs/component/elements/Button.js +149 -4
- 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 +7 -7
- 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 +4 -3
- 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/resizer/DivResizer.js +113 -0
- package/lib-cjs/component/elements/resizer/Resizer.js +18 -0
- package/lib-cjs/component/elements/resizer/SVGResizer.js +77 -0
- package/lib-cjs/component/elements/resizer/useDraggable.js +55 -0
- 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 +5 -16
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +7 -10
- package/lib-cjs/component/header/Header.js +27 -13
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +8 -11
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +3 -16
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -9
- package/lib-cjs/component/header/Zones2DOptionPanel.js +2 -13
- 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 +26 -22
- package/lib-cjs/component/hooks/useTableSortBy.js +27 -16
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +3 -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 +2 -1
- package/lib-cjs/component/modal/CopyClipboardModal.js +2 -2
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -1
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +19 -12
- package/lib-cjs/component/modal/LoadJCAMPModal.js +7 -6
- package/lib-cjs/component/modal/ModalStyle.js +4 -26
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +5 -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 +10 -5
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib-cjs/component/modal/PredictSpectraModal.js +36 -30
- package/lib-cjs/component/modal/SaveAsModal.js +3 -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 +5 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +3 -3
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +17 -15
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +1 -1
- package/lib-cjs/component/modal/editZone/SignalsForm.js +2 -2
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +5 -1
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +48 -14
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib-cjs/component/modal/setting/GeneralSettings.js +65 -75
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +64 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +2 -2
- 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 +5 -5
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +16 -10
- 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 +46 -34
- 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 +3 -4
- 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 +3 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +4 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +8 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +3 -3
- 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 +4 -4
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
- 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 +4 -7
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -2
- 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 +11 -21
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +19 -17
- package/lib-cjs/component/reducer/IgnoreActions.js +5 -1
- package/lib-cjs/component/reducer/Reducer.js +14 -5
- package/lib-cjs/component/reducer/actions/FiltersActions.js +6 -2
- package/lib-cjs/component/reducer/actions/LoadActions.js +25 -16
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +10 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +5 -1
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -1
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +5 -1
- package/lib-cjs/component/reducer/actions/ToolsActions.js +5 -1
- package/lib-cjs/component/reducer/actions/ZonesActions.js +5 -1
- package/lib-cjs/component/reducer/preferencesReducer.js +194 -81
- 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/Export.js +10 -9
- package/lib-cjs/component/utility/FormatNumber.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +29 -34
- 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 -32
- package/lib-cjs/data/Filters.js +5 -1
- package/lib-cjs/data/FiltersManager.js +5 -1
- package/lib-cjs/data/PredictionManager.js +19 -12
- package/lib-cjs/data/SpectraManager.js +5 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -2
- 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 +26 -27
- package/lib/component/1d/Resizable.d.ts +0 -12
- package/lib/component/1d/Resizable.js +0 -105
- package/lib/component/panels/RangesPanel/useMapRanges.d.ts +0 -6
- package/lib/component/workspaces/exercise1D.d.ts +0 -2
- package/lib/component/workspaces/exercise1D.js +0 -46
- package/lib-cjs/component/1d/Resizable.js +0 -110
- package/lib-cjs/component/workspaces/exercise1D.js +0 -49
|
@@ -10,9 +10,9 @@ const react_2 = require("react");
|
|
|
10
10
|
const ChartContext_1 = require("../context/ChartContext");
|
|
11
11
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
12
12
|
const ScaleContext_1 = require("../context/ScaleContext");
|
|
13
|
+
const Resizer_1 = __importDefault(require("../elements/resizer/Resizer"));
|
|
13
14
|
const index_1 = require("../highlight/index");
|
|
14
15
|
const Types_1 = require("../reducer/types/Types");
|
|
15
|
-
const Resizable_1 = __importDefault(require("./Resizable"));
|
|
16
16
|
const stylesOnHover = (0, react_1.css) `
|
|
17
17
|
pointer-events: bounding-box;
|
|
18
18
|
@-moz-document url-prefix() {
|
|
@@ -41,31 +41,31 @@ function IntegralResizable({ integralData }) {
|
|
|
41
41
|
const { height, margin } = (0, ChartContext_1.useChartData)();
|
|
42
42
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
43
43
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
44
|
-
const
|
|
44
|
+
const { id, from, to, integral } = integralData;
|
|
45
45
|
const highlight = (0, index_1.useHighlight)([id], {
|
|
46
46
|
type: index_1.HighlightedSource.INTEGRAL,
|
|
47
47
|
extra: { id },
|
|
48
48
|
});
|
|
49
|
-
(0, react_2.
|
|
50
|
-
setIntegral(integralData);
|
|
51
|
-
}, [integralData]);
|
|
52
|
-
const handleOnStopResizing = (0, react_2.useCallback)((resized) => {
|
|
49
|
+
const handleOnStopResizing = (0, react_2.useCallback)((position) => {
|
|
53
50
|
dispatch({
|
|
54
51
|
type: Types_1.RESIZE_INTEGRAL,
|
|
55
|
-
payload: {
|
|
52
|
+
payload: {
|
|
53
|
+
data: {
|
|
54
|
+
...integralData,
|
|
55
|
+
from: scaleX().invert(position.x2),
|
|
56
|
+
to: scaleX().invert(position.x1),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
56
59
|
});
|
|
57
|
-
}, [dispatch, integralData]);
|
|
60
|
+
}, [dispatch, integralData, scaleX]);
|
|
58
61
|
const handleOnEnterNotation = (0, react_2.useCallback)(() => {
|
|
59
62
|
highlight.show();
|
|
60
63
|
}, [highlight]);
|
|
61
64
|
const handleOnMouseLeaveNotation = (0, react_2.useCallback)(() => {
|
|
62
65
|
highlight.hide();
|
|
63
66
|
}, [highlight]);
|
|
64
|
-
const dragHandler = (0, react_2.useCallback)((boundary) => {
|
|
65
|
-
setIntegral((integral) => ({ ...integral, ...boundary }));
|
|
66
|
-
}, []);
|
|
67
67
|
const x0 = from ? scaleX()(from) : 0;
|
|
68
68
|
const x1 = to ? scaleX()(to) : 0;
|
|
69
|
-
return ((0, jsx_runtime_1.
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)("g", { css: highlight.isActive ? stylesHighlighted : stylesOnHover, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: (0, jsx_runtime_1.jsx)(Resizer_1.default, { tag: "svg", initialPosition: { x1: x1, x2: x0 }, onEnd: handleOnStopResizing, children: (x1, x2) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: x2 - x1, height: height - margin.bottom, className: "highlight", "data-no-export": "true" }), (0, jsx_runtime_1.jsx)("text", { x: 0, y: height - margin.bottom + 30, fill: "black", style: { fontSize: '12px', fontWeight: 'bold' }, children: integral !== undefined ? integral.toFixed(2) : '' })] })) }) }));
|
|
70
70
|
}
|
|
71
71
|
exports.default = IntegralResizable;
|
|
@@ -22,8 +22,8 @@ function IntegralsSeries() {
|
|
|
22
22
|
data
|
|
23
23
|
.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
24
24
|
.filter(Spectrum1D_1.isSpectrum1D)
|
|
25
|
-
.map((spectrum) => spectrum.integrals.values.map((integral) => ((0, jsx_runtime_1.jsx)(Integral_1.default, { integral: integral, isActive: isActive(spectrum.id) }, integral.id)))) }
|
|
25
|
+
.map((spectrum) => spectrum.integrals.values.map((integral) => ((0, jsx_runtime_1.jsx)(Integral_1.default, { integral: integral, isActive: isActive(spectrum.id) }, integral.id)))) }));
|
|
26
26
|
}, [activeSpectrum, data, xDomains]);
|
|
27
|
-
return (0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Integrals }
|
|
27
|
+
return (0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Integrals });
|
|
28
28
|
}
|
|
29
29
|
exports.default = IntegralsSeries;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -12,6 +12,6 @@ function LinesSeries() {
|
|
|
12
12
|
const _data = tempData ? tempData : data;
|
|
13
13
|
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: _data
|
|
14
14
|
?.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
15
|
-
.map((d, i) => ((0, jsx_runtime_1.jsx)(Line_1.default, { ...d, data: (0, get1DDataXY_1.get1DDataXY)(d), index: i }, d.id))) }
|
|
15
|
+
.map((d, i) => ((0, jsx_runtime_1.jsx)(Line_1.default, { ...d, data: (0, get1DDataXY_1.get1DDataXY)(d), index: i }, d.id))) }));
|
|
16
16
|
}
|
|
17
17
|
exports.default = LinesSeries;
|
|
@@ -105,9 +105,9 @@ value, color, isActive, nucleus, }) {
|
|
|
105
105
|
}, [highlight]);
|
|
106
106
|
const newValue = (0, react_2.useMemo)(() => (isSelected ? value : format(value)), [format, isSelected, value]);
|
|
107
107
|
const oldValue = (0, react_2.useMemo)(() => (isSelected ? _value : format(_value)), [_value, format, isSelected]);
|
|
108
|
-
return ((0, jsx_runtime_1.jsxs)("g", { css: styles, id: id, style: { outline: 'none' }, transform: `translate(${x}, ${y})`, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", x2: "0", y1: sign === -1 ? 10 : 0, y2: sign === -1 ? 28 : -18, stroke: color, strokeWidth: highlight.isActive ? '7px' : '1px' }
|
|
108
|
+
return ((0, jsx_runtime_1.jsxs)("g", { css: styles, id: id, style: { outline: 'none' }, transform: `translate(${x}, ${y})`, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", x2: "0", y1: sign === -1 ? 10 : 0, y2: sign === -1 ? 28 : -18, stroke: color, strokeWidth: highlight.isActive ? '7px' : '1px' }), (0, jsx_runtime_1.jsx)("text", { ref: refText, className: "peaks-text", x: "0", y: sign === -1 ? 28 : -12, dy: "0", dx: "0.35em", fill: "transparent", fontSize: "10px", fontWeight: "100", style: {
|
|
109
109
|
position: 'absolute',
|
|
110
|
-
}, children: newValue }
|
|
110
|
+
}, children: newValue }), (0, jsx_runtime_1.jsx)("foreignObject", { x: "0", y: sign === -1 ? 16 : -22, dy: "0.1em", dx: "0.35em", width: containerSize.width + 20, height: "40px", "data-no-export": "true", children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
111
111
|
width: containerSize.width + 20,
|
|
112
112
|
height: '100%',
|
|
113
113
|
paddingRight: 5,
|
|
@@ -117,6 +117,6 @@ value, color, isActive, nucleus, }) {
|
|
|
117
117
|
opacity: isActive ? 1 : 0.2,
|
|
118
118
|
userSelect: 'none',
|
|
119
119
|
color: color,
|
|
120
|
-
}, value: oldValue, onKeyDown: handleKeyDown, onChange: handleChange, type: "number", disabled: !isActive }
|
|
120
|
+
}, value: oldValue, onKeyDown: handleKeyDown, onChange: handleChange, type: "number", disabled: !isActive }) }) })] }));
|
|
121
121
|
}
|
|
122
122
|
exports.default = PeakAnnotation;
|
|
@@ -43,6 +43,6 @@ function PeakAnnotations() {
|
|
|
43
43
|
: false }, id))) }, d.id)));
|
|
44
44
|
}));
|
|
45
45
|
}, [data, verticalAlign, activeSpectrum, xDomains, scaleX, scaleY]);
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("g", { className: "peaks", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Peaks }
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)("g", { className: "peaks", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Peaks }));
|
|
47
47
|
}
|
|
48
48
|
exports.default = PeakAnnotations;
|
|
@@ -57,6 +57,6 @@ function ResurrectedDatabaseRanges() {
|
|
|
57
57
|
}, []);
|
|
58
58
|
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "resurrected-database-ranges", width: "100%", height: "100%", children: paths.map(({ path, from, to }, index) => (
|
|
59
59
|
// eslint-disable-next-line react/no-array-index-key
|
|
60
|
-
(0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", width: Math.abs(scaleX()(to) - scaleX()(from)), height: "100%", fill: "#ff6f0057" }
|
|
60
|
+
(0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", width: Math.abs(scaleX()(to) - scaleX()(from)), height: "100%", fill: "#ff6f0057" }) }), (0, jsx_runtime_1.jsx)("path", { transform: `translate(0,${fullHeight - blockHight * 2})`, stroke: "black", fill: "none", d: path })] }, `${index}`))) }));
|
|
61
61
|
}
|
|
62
62
|
exports.default = ResurrectedDatabaseRanges;
|
|
@@ -41,7 +41,7 @@ function YTracker({ datum }) {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
const xIndex = (0, ml_spectra_processing_1.xFindClosestIndex)(datum.x, scaleX().invert(position.x));
|
|
44
|
-
return (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: datum.y[xIndex] }
|
|
44
|
+
return (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: datum.y[xIndex] });
|
|
45
45
|
}
|
|
46
46
|
function SpectraTracker() {
|
|
47
47
|
const { data, activeTab, xDomains } = (0, ChartContext_1.useChartData)();
|
|
@@ -62,10 +62,10 @@ function SpectraTracker() {
|
|
|
62
62
|
spectrum.info.nucleus === activeTab && ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'block' }, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
63
63
|
...styles.colorIndicator,
|
|
64
64
|
borderColor: spectrum.display.color,
|
|
65
|
-
} }
|
|
65
|
+
} }), (0, jsx_runtime_1.jsx)(YTracker, { datum: (0, get1DDataXY_1.get1DDataXY)(spectrum) }), (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: spectrum.display.name })] }, spectrum.id)), []));
|
|
66
66
|
}, [activeTab, data, isVisible, xDomains]);
|
|
67
67
|
if (!isVisible)
|
|
68
68
|
return null;
|
|
69
|
-
return (0, jsx_runtime_1.jsx)("div", { style: styles.container, children: trackers }
|
|
69
|
+
return (0, jsx_runtime_1.jsx)("div", { style: styles.container, children: trackers });
|
|
70
70
|
}
|
|
71
71
|
exports.default = SpectraTracker;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -53,7 +57,7 @@ const PeakPointer_1 = __importDefault(require("./tool/PeakPointer"));
|
|
|
53
57
|
const VerticalIndicator_1 = __importDefault(require("./tool/VerticalIndicator"));
|
|
54
58
|
const XLabelPointer_1 = __importDefault(require("./tool/XLabelPointer"));
|
|
55
59
|
function Viewer1D({ emptyText = undefined }) {
|
|
56
|
-
const { display: { general }, } = (0, PreferencesContext_1.usePreferences)();
|
|
60
|
+
const { current: { display: { general }, }, } = (0, PreferencesContext_1.usePreferences)();
|
|
57
61
|
const state = (0, ChartContext_1.useChartData)();
|
|
58
62
|
const { toolOptions: { selectedTool }, isLoading, data, mode, width: widthProp, height: heightProp, margin, activeSpectrum, xDomain, xDomains, yDomain, yDomains, verticalAlign, displayerKey, } = state;
|
|
59
63
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -103,8 +107,8 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
103
107
|
if (brushData.altKey) {
|
|
104
108
|
switch (selectedTool) {
|
|
105
109
|
case ToolTypes_1.options.rangesPicking.id: {
|
|
106
|
-
if (!general
|
|
107
|
-
modal.show((0, jsx_runtime_1.jsx)(MultipletAnalysisModal_1.default, { data: data, activeSpectrum: activeSpectrum, scaleX: scaleState.scaleX, ...brushData }
|
|
110
|
+
if (!general?.disableMultipletAnalysis) {
|
|
111
|
+
modal.show((0, jsx_runtime_1.jsx)(MultipletAnalysisModal_1.default, { data: data, activeSpectrum: activeSpectrum, scaleX: scaleState.scaleX, ...brushData }), {
|
|
108
112
|
onClose: () => {
|
|
109
113
|
modal.close();
|
|
110
114
|
},
|
|
@@ -238,7 +242,7 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
238
242
|
}
|
|
239
243
|
}
|
|
240
244
|
}, [dispatch, scaleState, selectedTool]);
|
|
241
|
-
return ((0, jsx_runtime_1.jsx)(ScaleContext_1.ScaleProvider, { value: scaleState, children: (0, jsx_runtime_1.jsx)(react_d3_utils_1.ResponsiveChart, { children: ({ height, width }) => ((0, jsx_runtime_1.jsx)(Viewer2D_1.ViewerResponsiveWrapper, { height: height, width: width, children: (0, jsx_runtime_1.jsxs)("div", { style: { height: '100%', position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(Spinner_1.default, { isLoading: isLoading, emptyText: emptyText }
|
|
245
|
+
return ((0, jsx_runtime_1.jsx)(ScaleContext_1.ScaleProvider, { value: scaleState, children: (0, jsx_runtime_1.jsx)(react_d3_utils_1.ResponsiveChart, { children: ({ height, width }) => ((0, jsx_runtime_1.jsx)(Viewer2D_1.ViewerResponsiveWrapper, { height: height, width: width, children: (0, jsx_runtime_1.jsxs)("div", { style: { height: '100%', position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(Spinner_1.default, { isLoading: isLoading, emptyText: emptyText }), scaleState.scaleX &&
|
|
242
246
|
scaleState.scaleY &&
|
|
243
247
|
data &&
|
|
244
248
|
data.length > 0 && ((0, jsx_runtime_1.jsx)(BrushTracker_1.BrushTracker, { onBrush: handelBrushEnd, onDoubleClick: handelOnDoubleClick, onClick: mouseClick, onZoom: handleZoom, style: {
|
|
@@ -251,6 +255,6 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
251
255
|
width: '100%',
|
|
252
256
|
height: `100%`,
|
|
253
257
|
position: 'absolute',
|
|
254
|
-
}, children: [(0, jsx_runtime_1.jsx)(SpectraTracker_1.default, {}
|
|
258
|
+
}, children: [(0, jsx_runtime_1.jsx)(SpectraTracker_1.default, {}), (0, jsx_runtime_1.jsx)(CrossLinePointer_1.default, {}), (0, jsx_runtime_1.jsx)(BrushXY_1.default, { brushType: BrushXY_1.BRUSH_TYPE.X }), (0, jsx_runtime_1.jsx)(XLabelPointer_1.default, {}), (0, jsx_runtime_1.jsx)(PeakPointer_1.default, {}), (0, jsx_runtime_1.jsx)(VerticalIndicator_1.default, {}), (0, jsx_runtime_1.jsx)(FooterBanner_1.default, {}), (0, jsx_runtime_1.jsx)(Chart1D_1.default, { width: widthProp, height: heightProp, margin: margin, mode: mode, displayerKey: displayerKey })] }) }))] }) })) }) }));
|
|
255
259
|
}
|
|
256
260
|
exports.default = Viewer1D;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -81,6 +85,6 @@ function XAxis(props) {
|
|
|
81
85
|
if (!width || !height || !scaleX) {
|
|
82
86
|
return null;
|
|
83
87
|
}
|
|
84
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [show && ((0, jsx_runtime_1.jsx)("g", { className: "x", css: axisStyles, transform: `translate(0,${height - margin.bottom})`, ref: refAxis, children: (0, jsx_runtime_1.jsx)("text", { fill: "#000", x: width - 10, y: "30", dy: "0.70em", textAnchor: "end", children: label }
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [show && ((0, jsx_runtime_1.jsx)("g", { className: "x", css: axisStyles, transform: `translate(0,${height - margin.bottom})`, ref: refAxis, children: (0, jsx_runtime_1.jsx)("text", { fill: "#000", x: width - 10, y: "30", dy: "0.70em", textAnchor: "end", children: label }) })), showGrid && ((0, jsx_runtime_1.jsx)("g", { css: gridStyles, className: "grid", ref: refGrid, transform: `translate(0,${height - margin.bottom})` }))] }));
|
|
85
89
|
}
|
|
86
90
|
exports.default = XAxis;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -57,6 +61,6 @@ function YAxis(props) {
|
|
|
57
61
|
if (!width || !height) {
|
|
58
62
|
return null;
|
|
59
63
|
}
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: show && ((0, jsx_runtime_1.jsx)("g", { className: "y", css: axisStyles, transform: `translate(${width - 50})`, ref: refAxis, children: (0, jsx_runtime_1.jsx)("text", { fill: "#000", x: -margin.top, y: -(margin.right - 5), dy: "0.71em", transform: "rotate(-90)", textAnchor: "end", children: label }
|
|
64
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: show && ((0, jsx_runtime_1.jsx)("g", { className: "y", css: axisStyles, transform: `translate(${width - 50})`, ref: refAxis, children: (0, jsx_runtime_1.jsx)("text", { fill: "#000", x: -margin.top, y: -(margin.right - 5), dy: "0.71em", transform: "rotate(-90)", textAnchor: "end", children: label }) })) }));
|
|
61
65
|
}
|
|
62
66
|
exports.default = YAxis;
|
|
@@ -19,7 +19,7 @@ const JsCouplings_1 = __importDefault(require("./JsCouplings"));
|
|
|
19
19
|
const marginTop = 50;
|
|
20
20
|
function InnerJGraph(props) {
|
|
21
21
|
const { signals, links } = props;
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("g", { className: "j-graph", transform: `translate(0,${marginTop})`, children: [(0, jsx_runtime_1.jsx)(JGraphVerticalAxis_1.JGraphVerticalAxis, {}
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("g", { className: "j-graph", transform: `translate(0,${marginTop})`, children: [(0, jsx_runtime_1.jsx)(JGraphVerticalAxis_1.JGraphVerticalAxis, {}), (0, jsx_runtime_1.jsx)(JsCouplingLinks_1.default, { links: links }), (0, jsx_runtime_1.jsx)(JsCouplings_1.default, { signals: signals })] }));
|
|
23
23
|
}
|
|
24
24
|
const emptyData = { ranges: {} };
|
|
25
25
|
const MemoizedJGraph = (0, react_1.memo)(InnerJGraph);
|
|
@@ -29,8 +29,7 @@ function JGraph() {
|
|
|
29
29
|
const graphHeight = height / 4;
|
|
30
30
|
const { ranges } = (0, useSpectrum_1.default)(emptyData);
|
|
31
31
|
const jGraphTolerance = (0, react_1.useMemo)(() => {
|
|
32
|
-
const _preferences = (0, get_1.default)(preferences, `formatting.panels.ranges.[${activeTab}]`) ||
|
|
33
|
-
(0, defaultValues_1.getRangeDefaultValues)(activeTab);
|
|
32
|
+
const _preferences = (0, get_1.default)(preferences.current, `formatting.panels.ranges.[${activeTab}]`) || (0, defaultValues_1.getRangeDefaultValues)(activeTab);
|
|
34
33
|
return _preferences.jGraphTolerance;
|
|
35
34
|
}, [activeTab, preferences]);
|
|
36
35
|
const { signals, jCouplingMax: maxValue, links, } = (0, react_1.useMemo)(() => (0, generateJGraphData_1.default)(ranges.values, jGraphTolerance) || {
|
|
@@ -47,6 +46,6 @@ function JGraph() {
|
|
|
47
46
|
}, [graphHeight, scaleY, maxValue]);
|
|
48
47
|
if (!showJGraph)
|
|
49
48
|
return null;
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)(JGraphContext_1.JGraphContextProvider, { value: JGraphState, children: (0, jsx_runtime_1.jsx)(MemoizedJGraph, { signals: signals, links: links }
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(JGraphContext_1.JGraphContextProvider, { value: JGraphState, children: (0, jsx_runtime_1.jsx)(MemoizedJGraph, { signals: signals, links: links }) }));
|
|
51
50
|
}
|
|
52
51
|
exports.default = JGraph;
|
|
@@ -10,6 +10,6 @@ function JGraphVerticalAxis() {
|
|
|
10
10
|
const { height, scaleY } = (0, JGraphContext_1.useJGraph)();
|
|
11
11
|
if (!scaleY)
|
|
12
12
|
return null;
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("svg", { style: { overflow: 'visible' }, height: height + 20, width: 60, children: (0, jsx_runtime_1.jsx)(LinearVerticalAxis_1.LinearVerticalAxis, { x: 20, y: 0, scale: scaleY, height: height, showGrid: true, width: width - margin.right }
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("svg", { style: { overflow: 'visible' }, height: height + 20, width: 60, children: (0, jsx_runtime_1.jsx)(LinearVerticalAxis_1.LinearVerticalAxis, { x: 20, y: 0, scale: scaleY, height: height, showGrid: true, width: width - margin.right }) }));
|
|
14
14
|
}
|
|
15
15
|
exports.JGraphVerticalAxis = JGraphVerticalAxis;
|
|
@@ -8,6 +8,6 @@ function JsCoupling({ value }) {
|
|
|
8
8
|
const [isOver, setOver] = (0, react_1.useState)(false);
|
|
9
9
|
if (!scaleY)
|
|
10
10
|
return null;
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("g", { className: "coupling", style: { transform: `translate(0px,${scaleY(value)}px)` }, children: [(0, jsx_runtime_1.jsx)("circle", { onMouseEnter: () => setOver(true), onMouseLeave: () => setOver(false), cx: 0, cy: 0, r: 4, fill: `hsl(${(value * 360) / maxValue},100%,${isOver ? 45 : 50}%)`, pointerEvents: "all" }
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("g", { className: "coupling", style: { transform: `translate(0px,${scaleY(value)}px)` }, children: [(0, jsx_runtime_1.jsx)("circle", { onMouseEnter: () => setOver(true), onMouseLeave: () => setOver(false), cx: 0, cy: 0, r: 4, fill: `hsl(${(value * 360) / maxValue},100%,${isOver ? 45 : 50}%)`, pointerEvents: "all" }), isOver && ((0, jsx_runtime_1.jsxs)("g", { style: { transform: `translate(0px,15px)` }, children: [(0, jsx_runtime_1.jsx)("text", { pointerEvents: "none", stroke: "white", strokeWidth: "0.6em", fontSize: "11px", dominantBaseline: "middle", textAnchor: "end", children: `${value.toFixed(1)} Hz` }), (0, jsx_runtime_1.jsx)("text", { pointerEvents: "none", stroke: "black", fontSize: "11px", dominantBaseline: "middle", textAnchor: "end", children: `${value.toFixed(1)} Hz` })] }))] }));
|
|
12
12
|
}
|
|
13
13
|
exports.default = JsCoupling;
|
|
@@ -24,6 +24,6 @@ function JsCouplingLinks(props) {
|
|
|
24
24
|
return ((0, jsx_runtime_1.jsx)("path", { d: generatePath(link), style: {
|
|
25
25
|
stroke: `hsl(${(link.couplings[0].coupling * 360) / maxValue},100%,50%)`,
|
|
26
26
|
}, strokeWidth: "1" }, link.id));
|
|
27
|
-
}) }
|
|
27
|
+
}) }));
|
|
28
28
|
}
|
|
29
29
|
exports.default = JsCouplingLinks;
|
|
@@ -11,9 +11,9 @@ function JsCouplings(props) {
|
|
|
11
11
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
12
12
|
const { height } = (0, JGraphContext_1.useJGraph)();
|
|
13
13
|
return ((0, jsx_runtime_1.jsx)("g", { className: "js-coupling", children: props.signals.map((signal) => {
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(${scaleX()(signal.delta)},0)`, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", y1: height, x2: "0", y2: "0", stroke: "black", strokeWidth: "1" }
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(${scaleX()(signal.delta)},0)`, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", y1: height, x2: "0", y2: "0", stroke: "black", strokeWidth: "1" }), signal.js?.map((j) => {
|
|
15
15
|
return (0, jsx_runtime_1.jsx)(JsCoupling_1.default, { value: j.coupling }, `${j.coupling}`);
|
|
16
16
|
})] }, signal.id));
|
|
17
|
-
}) }
|
|
17
|
+
}) }));
|
|
18
18
|
}
|
|
19
19
|
exports.default = JsCouplings;
|
|
@@ -10,37 +10,33 @@ const react_2 = require("react");
|
|
|
10
10
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
11
11
|
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
12
12
|
const DeleteButton_1 = __importDefault(require("../../elements/DeleteButton"));
|
|
13
|
+
const Resizer_1 = __importDefault(require("../../elements/resizer/Resizer"));
|
|
13
14
|
const highlight_1 = require("../../highlight");
|
|
14
15
|
const Types_1 = require("../../reducer/types/Types");
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@-moz-document url-prefix() {
|
|
19
|
-
pointer-events: fill;
|
|
20
|
-
}
|
|
21
|
-
user-select: 'none';
|
|
22
|
-
-webkit-user-select: none; /* Chrome all / Safari all */
|
|
23
|
-
-moz-user-select: none; /* Firefox all */
|
|
16
|
+
const styles = {
|
|
17
|
+
common: (0, react_1.css) `
|
|
18
|
+
pointer-events: bounding-box;
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
@-moz-document url-prefix() {
|
|
21
|
+
pointer-events: fill;
|
|
22
|
+
}
|
|
23
|
+
`,
|
|
24
|
+
hover: (0, react_1.css) `
|
|
25
|
+
.delete-button {
|
|
26
|
+
visibility: hidden;
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
Highlighted: (0, react_1.css) `
|
|
30
|
+
.range-area {
|
|
31
|
+
height: 100%;
|
|
32
|
+
fill: #ff6f0057;
|
|
33
|
+
}
|
|
34
|
+
.delete-button {
|
|
35
|
+
visibility: visible;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
38
|
+
`,
|
|
39
|
+
};
|
|
44
40
|
function AnalysisRange({ rangeData, columnKey }) {
|
|
45
41
|
const { from, to } = rangeData;
|
|
46
42
|
const highlight = (0, highlight_1.useHighlight)([columnKey]);
|
|
@@ -49,12 +45,15 @@ function AnalysisRange({ rangeData, columnKey }) {
|
|
|
49
45
|
const deleteHandler = (0, react_2.useCallback)(() => {
|
|
50
46
|
dispatch({ type: Types_1.DELETE_ANALYZE_SPECTRA_RANGE, colKey: columnKey });
|
|
51
47
|
}, [columnKey, dispatch]);
|
|
52
|
-
const
|
|
48
|
+
const resizeEndHandler = (0, react_2.useCallback)((resized) => {
|
|
53
49
|
dispatch({
|
|
54
50
|
type: Types_1.RESIZE_ANALYZE_SPECTRA_RANGE,
|
|
55
51
|
payload: { ...rangeData, ...resized, columnKey },
|
|
56
52
|
});
|
|
57
53
|
}, [columnKey, dispatch, rangeData]);
|
|
58
|
-
return ((0, jsx_runtime_1.
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("g", { ...highlight.onHover, css: [
|
|
55
|
+
styles.common,
|
|
56
|
+
highlight.isActive ? styles.Highlighted : styles.hover,
|
|
57
|
+
], children: (0, jsx_runtime_1.jsx)(Resizer_1.default, { tag: "svg", onEnd: resizeEndHandler, initialPosition: { x2: scaleX()(from), x1: scaleX()(to) }, children: (x1, x2) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("g", { transform: `translate(0,25)`, children: [(0, jsx_runtime_1.jsx)("rect", { x: "0", width: x2 - x1, height: "6", className: "range-area", fill: "green" }), (0, jsx_runtime_1.jsx)("text", { textAnchor: "middle", x: (x2 - x1) / 2, y: "-5", fontSize: "12", fill: "red", fontWeight: "bolder", fillOpacity: highlight.isActive ? 1 : 0.6, children: columnKey })] }), (0, jsx_runtime_1.jsx)(DeleteButton_1.default, { x: -20, y: 10, onDelete: deleteHandler })] })) }) }));
|
|
59
58
|
}
|
|
60
59
|
exports.default = AnalysisRange;
|
|
@@ -20,11 +20,11 @@ function MultiAnalysisRangesInner({ activeTab, spectraAnalysis, displayerKey, })
|
|
|
20
20
|
if (!ranges || ranges.length === 0) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: ranges.map((columnKey) => ((0, jsx_runtime_1.jsx)(AnalysisRange_1.default, { columnKey: columnKey, rangeData: columns[columnKey] }, columnKey))) }
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: ranges.map((columnKey) => ((0, jsx_runtime_1.jsx)(AnalysisRange_1.default, { columnKey: columnKey, rangeData: columns[columnKey] }, columnKey))) }));
|
|
24
24
|
}
|
|
25
25
|
const MemoizedMultiAnalysisRanges = (0, react_1.memo)(MultiAnalysisRangesInner);
|
|
26
26
|
function MultiAnalysisRanges() {
|
|
27
27
|
const { activeTab, spectraAnalysis, displayerKey } = (0, ChartContext_1.useChartData)();
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedMultiAnalysisRanges, { ...{ activeTab, spectraAnalysis, displayerKey } }
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedMultiAnalysisRanges, { ...{ activeTab, spectraAnalysis, displayerKey } }));
|
|
29
29
|
}
|
|
30
30
|
exports.default = MultiAnalysisRanges;
|
|
@@ -155,9 +155,9 @@ function MultiplicityTree({ rangeFrom, rangeTo, signal, labelOptions = {
|
|
|
155
155
|
const _rangeFrom = scaleX()(rangeFrom);
|
|
156
156
|
const _rangeTo = scaleX()(rangeTo);
|
|
157
157
|
const pathData = `M ${_rangeFrom} ${_startY + levelHeight} ${_rangeFrom} ${_startY} ${scaleX()(signal.delta)} ${_startY} ${_rangeTo} ${_startY} ${_rangeTo} ${_startY + levelHeight}`;
|
|
158
|
-
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)(StringNode_1.default, { signal: signal, startY: firstLevelStartY, levelHeight: levelHeight, fontSize: labelOptions.fontSize, showLabels: showLabels }
|
|
158
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)(StringNode_1.default, { signal: signal, startY: firstLevelStartY, levelHeight: levelHeight, fontSize: labelOptions.fontSize, showLabels: showLabels }), (0, jsx_runtime_1.jsx)(LevelNode_1.default, { signal: signal, startY: secondLevelStartY, levelHeight: levelHeight }), (0, jsx_runtime_1.jsx)("path", { d: pathData, stroke: "blue", fill: "none" })] }));
|
|
159
159
|
}
|
|
160
|
-
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)(StringNode_1.default, { signal: signal, startY: firstLevelStartY, levelHeight: levelHeight, fontSize: labelOptions.fontSize, showLabels: showLabels }
|
|
160
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)(StringNode_1.default, { signal: signal, startY: firstLevelStartY, levelHeight: levelHeight, fontSize: labelOptions.fontSize, showLabels: showLabels }), (0, jsx_runtime_1.jsx)(LevelNode_1.default, { signal: signal, startY: secondLevelStartY, levelHeight: levelHeight }), (0, jsx_runtime_1.jsx)(TreeNodes_1.default, { nodesData: treeNodesData, signalID: treeNodesData, showLabels: showLabels, startY: startY, labelOptions: labelOptions, levelHeight: levelHeight })] }));
|
|
161
161
|
}, [
|
|
162
162
|
treeProps,
|
|
163
163
|
startY,
|
|
@@ -192,6 +192,6 @@ function MultiplicityTree({ rangeFrom, rangeTo, signal, labelOptions = {
|
|
|
192
192
|
assignment.onClick('x');
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
}, children: multiplicityTree }
|
|
195
|
+
}, children: multiplicityTree }));
|
|
196
196
|
}
|
|
197
197
|
exports.default = MultiplicityTree;
|
|
@@ -15,6 +15,6 @@ function TempMultiplicityTreeInner({ range }) {
|
|
|
15
15
|
const MemoizedTempMultiplicityTree = (0, react_1.memo)(TempMultiplicityTreeInner);
|
|
16
16
|
function TempMultiplicityTree() {
|
|
17
17
|
const { toolOptions: { data: { tempRange }, }, } = (0, ChartContext_1.useChartData)();
|
|
18
|
-
return (0, jsx_runtime_1.jsx)(MemoizedTempMultiplicityTree, { range: tempRange }
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(MemoizedTempMultiplicityTree, { range: tempRange });
|
|
19
19
|
}
|
|
20
20
|
exports.default = TempMultiplicityTree;
|
|
@@ -10,7 +10,7 @@ function TreeNodes({ nodesData, levelHeight, startY, signalID, labelOptions, sho
|
|
|
10
10
|
const edgeLevel = 2 * multiplicityIndex + 2;
|
|
11
11
|
const _startYEdge = startY + edgeLevel * levelHeight;
|
|
12
12
|
const _startYNode = startY + (edgeLevel + 1) * levelHeight;
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("text", { textAnchor: "middle", x: scaleX()(_startX) + labelOptions.distance, y: _startYNode + 2 * (levelHeight / 3), fontSize: labelOptions.fontSize, fill: color, visibility: showLabels ? 'visible' : 'hidden', children: ratio }
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("text", { textAnchor: "middle", x: scaleX()(_startX) + labelOptions.distance, y: _startYNode + 2 * (levelHeight / 3), fontSize: labelOptions.fontSize, fill: color, visibility: showLabels ? 'visible' : 'hidden', children: ratio }), (0, jsx_runtime_1.jsx)("line", { x1: scaleX()(startX), y1: _startYEdge, x2: scaleX()(_startX), y2: _startYNode, stroke: color }), (0, jsx_runtime_1.jsx)("line", { x1: scaleX()(_startX), y1: _startYNode, x2: scaleX()(_startX), y2: _startYNode + levelHeight, stroke: color })] }, `${multiplicityIndex}_${signalID}_${startX}_${_startX}_${ratio}`));
|
|
14
14
|
}, [
|
|
15
15
|
signalID,
|
|
16
16
|
labelOptions.distance,
|
|
@@ -20,6 +20,6 @@ function TreeNodes({ nodesData, levelHeight, startY, signalID, labelOptions, sho
|
|
|
20
20
|
startY,
|
|
21
21
|
levelHeight,
|
|
22
22
|
]);
|
|
23
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nodesData?.map((node) => buildTreeNodeAndEdge(node)) }
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nodesData?.map((node) => buildTreeNodeAndEdge(node)) });
|
|
24
24
|
}
|
|
25
25
|
exports.default = TreeNodes;
|
|
@@ -11,10 +11,10 @@ const RangeUtilities_1 = require("../../../data/utilities/RangeUtilities");
|
|
|
11
11
|
const assignment_1 = require("../../assignment");
|
|
12
12
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
13
13
|
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
14
|
+
const Resizer_1 = __importDefault(require("../../elements/resizer/Resizer"));
|
|
14
15
|
const highlight_1 = require("../../highlight");
|
|
15
16
|
const Types_1 = require("../../reducer/types/Types");
|
|
16
17
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
17
|
-
const Resizable_1 = __importDefault(require("../Resizable"));
|
|
18
18
|
const MultiplicityTree_1 = __importDefault(require("../multiplicityTree/MultiplicityTree"));
|
|
19
19
|
const TempMultiplicityTree_1 = __importDefault(require("../multiplicityTree/TempMultiplicityTree"));
|
|
20
20
|
const stylesOnHover = (0, react_1.css) `
|
|
@@ -46,24 +46,14 @@ const stylesHighlighted = (0, react_1.css) `
|
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
48
|
function Range({ rangeData, showMultiplicityTrees, selectedTool, startEditMode, }) {
|
|
49
|
-
const { id, from
|
|
49
|
+
const { id, from, to, integration, signals } = rangeData;
|
|
50
50
|
const assignmentData = (0, assignment_1.useAssignmentData)();
|
|
51
51
|
const assignmentRange = (0, assignment_1.useAssignment)(id);
|
|
52
52
|
const highlightRange = (0, highlight_1.useHighlight)([assignmentRange.id].concat(assignmentRange.assigned.x || []).concat((0, assignment_1.filterForIDsWithAssignment)(assignmentData, signals.map((_signal) => _signal.id))), { type: highlight_1.HighlightedSource.RANGE, extra: { id } });
|
|
53
|
-
const [rangeBoundary, setRangeBoundary] = (0, react_2.useState)({
|
|
54
|
-
from: rangeFrom,
|
|
55
|
-
to: rangeTo,
|
|
56
|
-
});
|
|
57
53
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
58
54
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
59
55
|
const [reduceOpacity, setReduceOpacity] = (0, react_2.useState)(false);
|
|
60
56
|
const [isBlockedByEditing, setIsBlockedByEditing] = (0, react_2.useState)(false);
|
|
61
|
-
(0, react_2.useEffect)(() => {
|
|
62
|
-
setRangeBoundary({
|
|
63
|
-
from: rangeFrom,
|
|
64
|
-
to: rangeTo,
|
|
65
|
-
});
|
|
66
|
-
}, [rangeFrom, rangeTo]);
|
|
67
57
|
(0, react_2.useEffect)(() => {
|
|
68
58
|
if (selectedTool && selectedTool === ToolTypes_1.options.editRange.id) {
|
|
69
59
|
setIsBlockedByEditing(true);
|
|
@@ -75,12 +65,16 @@ function Range({ rangeData, showMultiplicityTrees, selectedTool, startEditMode,
|
|
|
75
65
|
(0, react_2.useEffect)(() => {
|
|
76
66
|
setReduceOpacity(!(0, RangeUtilities_1.checkRangeKind)(rangeData));
|
|
77
67
|
}, [rangeData]);
|
|
78
|
-
const handleOnStopResizing = (0, react_2.useCallback)((
|
|
68
|
+
const handleOnStopResizing = (0, react_2.useCallback)((position) => {
|
|
79
69
|
dispatch({
|
|
80
70
|
type: Types_1.RESIZE_RANGE,
|
|
81
|
-
data: {
|
|
71
|
+
data: {
|
|
72
|
+
...rangeData,
|
|
73
|
+
from: scaleX().invert(position.x2),
|
|
74
|
+
to: scaleX().invert(position.x1),
|
|
75
|
+
},
|
|
82
76
|
});
|
|
83
|
-
}, [dispatch, rangeData]);
|
|
77
|
+
}, [dispatch, rangeData, scaleX]);
|
|
84
78
|
const mouseEnterHandler = (0, react_2.useCallback)(() => {
|
|
85
79
|
assignmentRange.onMouseEnter('x');
|
|
86
80
|
highlightRange.show();
|
|
@@ -96,23 +90,19 @@ function Range({ rangeData, showMultiplicityTrees, selectedTool, startEditMode,
|
|
|
96
90
|
assignmentRange.onClick('x');
|
|
97
91
|
}
|
|
98
92
|
}, [assignmentRange, isBlockedByEditing, selectedTool]);
|
|
99
|
-
const dragHandler = (0, react_2.useCallback)((boundary) => {
|
|
100
|
-
setRangeBoundary((range) => ({ ...range, ...boundary }));
|
|
101
|
-
}, []);
|
|
102
|
-
const { from, to } = rangeBoundary;
|
|
103
93
|
return ((0, jsx_runtime_1.jsxs)("g", { "data-test-id": "range", style: { outline: 'none' }, css: isBlockedByEditing ||
|
|
104
94
|
highlightRange.isActive ||
|
|
105
95
|
assignmentRange.isActive
|
|
106
96
|
? stylesHighlighted
|
|
107
|
-
: stylesOnHover, onMouseEnter: mouseEnterHandler, onMouseLeave: mouseLeaveHandler, onClick: assignHandler, children: [(0, jsx_runtime_1.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
: stylesOnHover, onMouseEnter: mouseEnterHandler, onMouseLeave: mouseLeaveHandler, onClick: assignHandler, children: [(0, jsx_runtime_1.jsx)(Resizer_1.default, { tag: "svg", initialPosition: { x1: scaleX()(to), x2: scaleX()(from) }, onEnd: handleOnStopResizing, children: (x1, x2) => ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(0,10)`, children: [(0, jsx_runtime_1.jsx)("rect", { "data-no-export": "true", x: "0", width: x2 - x1, height: "6", className: "range-area", fill: "green", fillOpacity: !reduceOpacity ||
|
|
98
|
+
highlightRange.isActive ||
|
|
99
|
+
assignmentRange.isActive
|
|
100
|
+
? 1
|
|
101
|
+
: 0.4 }), (0, jsx_runtime_1.jsx)("text", { textAnchor: "middle", x: (x2 - x1) / 2, y: "20", fontSize: "10", fill: "red", fillOpacity: !reduceOpacity ||
|
|
102
|
+
highlightRange.isActive ||
|
|
103
|
+
assignmentRange.isActive
|
|
104
|
+
? 1
|
|
105
|
+
: 0.6, children: integration !== undefined ? integration.toFixed(2) : '' })] })) }), startEditMode ? ((0, jsx_runtime_1.jsx)(TempMultiplicityTree_1.default, {})) : (showMultiplicityTrees &&
|
|
116
106
|
signals &&
|
|
117
107
|
signals.length > 0 &&
|
|
118
108
|
signals.map((_signal) => ((0, jsx_runtime_1.jsx)(MultiplicityTree_1.default, { rangeFrom: from, rangeTo: to, signal: _signal }, _signal.id))))] }, id));
|
|
@@ -7,6 +7,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const useIntegralPath_1 = __importDefault(require("../../hooks/useIntegralPath"));
|
|
8
8
|
function RangeIntegral({ range }) {
|
|
9
9
|
const path = (0, useIntegralPath_1.default)(range);
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("path", { className: "line", stroke: "black", strokeWidth: "1", fill: "none", d: path }
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("path", { className: "line", stroke: "black", strokeWidth: "1", fill: "none", d: path }));
|
|
11
11
|
}
|
|
12
12
|
exports.default = RangeIntegral;
|
|
@@ -10,7 +10,7 @@ const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
|
10
10
|
const Range_1 = __importDefault(require("./Range"));
|
|
11
11
|
const RangeIntegral_1 = __importDefault(require("./RangeIntegral"));
|
|
12
12
|
function RangesInner({ ranges, displayerKey, selectedTool, editRangeID, showMultiplicityTrees, showRangesIntegrals, }) {
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: ranges?.values?.map((range) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Range_1.default, { rangeData: range, selectedTool: selectedTool, showMultiplicityTrees: showMultiplicityTrees, startEditMode: editRangeID && editRangeID === range.id ? true : false }
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: ranges?.values?.map((range) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Range_1.default, { rangeData: range, selectedTool: selectedTool, showMultiplicityTrees: showMultiplicityTrees, startEditMode: editRangeID && editRangeID === range.id ? true : false }), showRangesIntegrals && (0, jsx_runtime_1.jsx)(RangeIntegral_1.default, { range: range })] }, range.id))) }));
|
|
14
14
|
}
|
|
15
15
|
const MemoizedRanges = (0, react_1.memo)(RangesInner);
|
|
16
16
|
const empyData = { ranges: {} };
|
|
@@ -24,6 +24,6 @@ function Ranges() {
|
|
|
24
24
|
selectedTool,
|
|
25
25
|
displayerKey,
|
|
26
26
|
editRangeID: tempRange?.id || '',
|
|
27
|
-
} }
|
|
27
|
+
} }));
|
|
28
28
|
}
|
|
29
29
|
exports.default = Ranges;
|