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
|
@@ -5,58 +5,96 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
8
10
|
const FormikCheckBox_1 = __importDefault(require("../../elements/formik/FormikCheckBox"));
|
|
9
11
|
const LIST = [
|
|
10
12
|
{
|
|
11
13
|
label: 'Spectra selection panel',
|
|
12
|
-
name: '
|
|
14
|
+
name: 'panels.spectraPanel',
|
|
13
15
|
},
|
|
14
16
|
{
|
|
15
17
|
label: 'Spectra information Panel',
|
|
16
|
-
name: '
|
|
18
|
+
name: 'panels.informationPanel',
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
21
|
label: 'Peaks and peak picking',
|
|
20
|
-
name: '
|
|
22
|
+
name: 'panels.peaksPanel',
|
|
21
23
|
},
|
|
22
24
|
{
|
|
23
25
|
label: 'Integration and integrals',
|
|
24
|
-
name: '
|
|
26
|
+
name: 'panels.integralsPanel',
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
29
|
label: '1D ranges peak picking',
|
|
28
|
-
name: '
|
|
30
|
+
name: 'panels.rangesPanel',
|
|
29
31
|
},
|
|
30
32
|
{
|
|
31
33
|
label: 'Chemical structure panel',
|
|
32
|
-
name: '
|
|
34
|
+
name: 'panels.structuresPanel',
|
|
33
35
|
},
|
|
34
36
|
{
|
|
35
37
|
label: 'Filters Panel',
|
|
36
|
-
name: '
|
|
38
|
+
name: 'panels.filtersPanel',
|
|
37
39
|
},
|
|
38
40
|
{
|
|
39
41
|
label: '2D zones peak picking',
|
|
40
|
-
name: '
|
|
42
|
+
name: 'panels.zonesPanel',
|
|
41
43
|
},
|
|
42
44
|
{
|
|
43
45
|
label: 'Assignment summary Panel',
|
|
44
|
-
name: '
|
|
46
|
+
name: 'panels.summaryPanel',
|
|
45
47
|
},
|
|
46
48
|
{
|
|
47
49
|
label: 'Multiple Spectra Analysis Panel',
|
|
48
|
-
name: '
|
|
50
|
+
name: 'panels.multipleSpectraAnalysisPanel',
|
|
49
51
|
},
|
|
50
52
|
{
|
|
51
53
|
label: 'Database Panel',
|
|
52
|
-
name: '
|
|
54
|
+
name: 'panels.databasePanel',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: 'Prediction Panel',
|
|
58
|
+
name: 'panels.predictionPanel',
|
|
53
59
|
},
|
|
54
60
|
{
|
|
55
61
|
label: 'Experimental Features',
|
|
56
|
-
name: '
|
|
62
|
+
name: 'general.experimentalFeatures',
|
|
63
|
+
hideOpenOption: true,
|
|
57
64
|
},
|
|
58
65
|
];
|
|
66
|
+
function CheckBoxCell(props) {
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { style: {
|
|
68
|
+
container: { display: 'block', margin: '0 auto', width: 'fit-content' },
|
|
69
|
+
}, className: "checkbox-element", name: props.name }, props.name));
|
|
70
|
+
}
|
|
59
71
|
function DisplayTabContent({ preferences }) {
|
|
60
|
-
|
|
72
|
+
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
73
|
+
{
|
|
74
|
+
index: 1,
|
|
75
|
+
Header: '#',
|
|
76
|
+
Cell: ({ row }) => row.index + 1,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
index: 1,
|
|
80
|
+
Header: 'Feature',
|
|
81
|
+
accessor: 'label',
|
|
82
|
+
style: { width: '60%' },
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
index: 2,
|
|
86
|
+
Header: 'Active',
|
|
87
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(CheckBoxCell, { name: `display.${row.original.name}.display` })),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
index: 3,
|
|
91
|
+
Header: 'Open on load',
|
|
92
|
+
Cell: ({ row }) => !row.original.hideOpenOption ? ((0, jsx_runtime_1.jsx)(CheckBoxCell, { name: `display.${row.original.name}.open` })) : ((0, jsx_runtime_1.jsx)("div", {})),
|
|
93
|
+
},
|
|
94
|
+
], []);
|
|
95
|
+
const data = (0, react_1.useMemo)(() => {
|
|
96
|
+
return LIST.filter((item) => (0, get_1.default)(preferences, `${item.name}.hidden`) !== true);
|
|
97
|
+
}, [preferences]);
|
|
98
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { width: '100%', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsx)(ReactTable_1.default, { columns: COLUMNS, data: data }) }));
|
|
61
99
|
}
|
|
62
100
|
exports.default = DisplayTabContent;
|
|
@@ -67,9 +67,9 @@ function FormattingTabContent() {
|
|
|
67
67
|
const newNucleuses = [...nucleuses, newFormat];
|
|
68
68
|
setFieldValue('formatting.nucleus', newNucleuses);
|
|
69
69
|
}, [nucleuses, setFieldValue]);
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { className: "section-header", children: "Formating according to Nucleus" }
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { className: "section-header", children: "Formating according to Nucleus" }), (0, jsx_runtime_1.jsx)("div", { css: styles, children: (0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: "counter-col", children: "#" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-label-col", children: "Nucleus " }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col", children: "\u03B4 (ppm)" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col", children: "Coupling (Hz)" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: nucleuses?.map((nucleus, index) => {
|
|
71
71
|
const num = index + 1;
|
|
72
|
-
return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("td", { className: "counter-col", children: [(0, jsx_runtime_1.jsxs)("span", { children: [num, " - "] }
|
|
73
|
-
}) }
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("td", { className: "counter-col", children: [(0, jsx_runtime_1.jsxs)("span", { children: [num, " - "] }), ' '] }), (0, jsx_runtime_1.jsx)("td", { className: "nucleus-label-col", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `formatting.nucleus.${index}.name`, className: "width-100" }) }), (0, jsx_runtime_1.jsx)("td", { className: "nucleus-format-input-col", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `formatting.nucleus.${index}.ppm`, className: "width-100" }) }), (0, jsx_runtime_1.jsx)("td", { className: "nucleus-format-input-col", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `formatting.nucleus.${index}.hz`, className: "width-100" }) }), (0, jsx_runtime_1.jsxs)("td", { className: "operation-container", children: [(0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: () => deleteHandler(index), popupTitle: `remove ${nucleus.name}`, popupPlacement: "right" }), nucleuses.length === index + 1 && ((0, jsx_runtime_1.jsx)("button", { className: "add", type: "button", onClick: addNewNucleusFormatHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) }))] })] }, `${nucleus.key}`));
|
|
73
|
+
}) })] }) })] }));
|
|
74
74
|
}
|
|
75
75
|
exports.default = FormattingTabContent;
|
|
@@ -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];
|
|
@@ -30,26 +34,15 @@ const PreferencesContext_1 = require("../../context/PreferencesContext");
|
|
|
30
34
|
const CloseButton_1 = __importDefault(require("../../elements/CloseButton"));
|
|
31
35
|
const Tab_1 = __importDefault(require("../../elements/Tab/Tab"));
|
|
32
36
|
const Tabs_1 = __importStar(require("../../elements/Tab/Tabs"));
|
|
37
|
+
const DropDownButton_1 = __importDefault(require("../../elements/dropDownButton/DropDownButton"));
|
|
33
38
|
const FormikForm_1 = __importDefault(require("../../elements/formik/FormikForm"));
|
|
34
|
-
const
|
|
39
|
+
const Alert_1 = require("../../elements/popup/Alert");
|
|
40
|
+
const ModalStyle_1 = require("../ModalStyle");
|
|
35
41
|
const ControllersTabContent_1 = __importDefault(require("./ControllersTabContent"));
|
|
36
42
|
const DisplayTabContent_1 = __importDefault(require("./DisplayTabContent"));
|
|
37
43
|
const FormattingTabContent_1 = __importDefault(require("./FormattingTabContent"));
|
|
44
|
+
const WorkspaceItem_1 = __importDefault(require("./WorkspaceItem"));
|
|
38
45
|
const styles = (0, react_1.css) `
|
|
39
|
-
overflow: auto;
|
|
40
|
-
height: 100%;
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
|
|
44
|
-
.header {
|
|
45
|
-
text-align: center;
|
|
46
|
-
padding: 10px 0 10px 0px;
|
|
47
|
-
margin: 0px;
|
|
48
|
-
color: #005d9e;
|
|
49
|
-
place-items: normal;
|
|
50
|
-
text-transform: none;
|
|
51
|
-
background-color: #fcfcfc;
|
|
52
|
-
}
|
|
53
46
|
.main-content {
|
|
54
47
|
width: 100%;
|
|
55
48
|
flex: 1;
|
|
@@ -61,57 +54,6 @@ const styles = (0, react_1.css) `
|
|
|
61
54
|
width: 100%;
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
.inner-content {
|
|
65
|
-
padding: 15px 30px;
|
|
66
|
-
width: 100%;
|
|
67
|
-
overflow: auto;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
button:focus {
|
|
71
|
-
outline: none;
|
|
72
|
-
}
|
|
73
|
-
button:hover {
|
|
74
|
-
color: #007bff;
|
|
75
|
-
}
|
|
76
|
-
.btn:hover {
|
|
77
|
-
background-color: #ffffff;
|
|
78
|
-
}
|
|
79
|
-
.btn {
|
|
80
|
-
border: none;
|
|
81
|
-
padding: 0 15px;
|
|
82
|
-
background-color: #ffffff5e;
|
|
83
|
-
border-radius: 5px;
|
|
84
|
-
height: 25px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.footer-container {
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: flex-end;
|
|
90
|
-
justify-content: flex-end;
|
|
91
|
-
background: rgb(242, 242, 242);
|
|
92
|
-
background: -moz-linear-gradient(
|
|
93
|
-
0deg,
|
|
94
|
-
rgba(242, 242, 242, 1) 0%,
|
|
95
|
-
rgba(245, 245, 245, 1) 37%,
|
|
96
|
-
rgba(255, 255, 255, 1) 90%
|
|
97
|
-
);
|
|
98
|
-
background: -webkit-linear-gradient(
|
|
99
|
-
0deg,
|
|
100
|
-
rgba(242, 242, 242, 1) 0%,
|
|
101
|
-
rgba(245, 245, 245, 1) 37%,
|
|
102
|
-
rgba(255, 255, 255, 1) 90%
|
|
103
|
-
);
|
|
104
|
-
background: linear-gradient(
|
|
105
|
-
0deg,
|
|
106
|
-
rgba(242, 242, 242, 1) 0%,
|
|
107
|
-
rgba(245, 245, 245, 1) 37%,
|
|
108
|
-
rgba(255, 255, 255, 1) 90%
|
|
109
|
-
);
|
|
110
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#f2f2f2",endColorstr="#ffffff",GradientType=1);
|
|
111
|
-
padding: 6px 15px;
|
|
112
|
-
height: 55px;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
57
|
.section-header {
|
|
116
58
|
font-size: 13px;
|
|
117
59
|
color: #2ca8ff;
|
|
@@ -158,24 +100,79 @@ const styles = (0, react_1.css) `
|
|
|
158
100
|
width: 260px;
|
|
159
101
|
}
|
|
160
102
|
}
|
|
161
|
-
|
|
162
|
-
|
|
103
|
+
|
|
104
|
+
.workspace-container {
|
|
105
|
+
display: flex;
|
|
106
|
+
background-color: #f4f4f4;
|
|
107
|
+
align-items: center;
|
|
108
|
+
cursor: default;
|
|
109
|
+
padding: 0.5em;
|
|
110
|
+
.dropdown {
|
|
111
|
+
padding: 0.4em 1em;
|
|
112
|
+
}
|
|
113
|
+
& .label {
|
|
114
|
+
font-size: 0.8em;
|
|
115
|
+
}
|
|
163
116
|
}
|
|
164
117
|
`;
|
|
165
|
-
function GeneralSettings({ onClose
|
|
118
|
+
function GeneralSettings({ onClose }) {
|
|
166
119
|
const [activeTab, setActiveTab] = (0, react_2.useState)('controllers');
|
|
167
|
-
const preferences = (0, PreferencesContext_1.usePreferences)();
|
|
120
|
+
const { dispatch, ...preferences } = (0, PreferencesContext_1.usePreferences)();
|
|
121
|
+
const alert = (0, Alert_1.useAlert)();
|
|
168
122
|
const refForm = (0, react_2.useRef)();
|
|
123
|
+
const workspaces = (0, PreferencesContext_1.useWorkspacesList)();
|
|
124
|
+
const workspacesList = (0, react_2.useMemo)(() => {
|
|
125
|
+
return workspaces.concat([
|
|
126
|
+
{
|
|
127
|
+
key: 'new',
|
|
128
|
+
label: 'Custom workspace',
|
|
129
|
+
},
|
|
130
|
+
]);
|
|
131
|
+
}, [workspaces]);
|
|
169
132
|
const handleSave = (0, react_2.useCallback)(() => {
|
|
170
133
|
refForm.current.submitForm();
|
|
171
134
|
}, []);
|
|
135
|
+
const handleReset = (0, react_2.useCallback)(() => {
|
|
136
|
+
dispatch({ type: 'RESET_PREFERENCES' });
|
|
137
|
+
alert.success('Settings saved successfully');
|
|
138
|
+
onClose?.();
|
|
139
|
+
}, [alert, dispatch, onClose]);
|
|
172
140
|
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
141
|
+
dispatch({ type: 'SET_PREFERENCES', payload: values });
|
|
142
|
+
alert.success('Settings saved successfully');
|
|
143
|
+
onClose?.();
|
|
144
|
+
}, [alert, dispatch, onClose]);
|
|
176
145
|
const tabChangeHandler = (0, react_2.useCallback)((tab) => {
|
|
177
146
|
setActiveTab(tab.tabid);
|
|
178
147
|
}, []);
|
|
179
|
-
|
|
148
|
+
const addWorkSpaceHandler = (0, react_2.useCallback)((name) => {
|
|
149
|
+
dispatch({
|
|
150
|
+
type: 'ADD_WORKSPACE',
|
|
151
|
+
payload: {
|
|
152
|
+
workspace: name,
|
|
153
|
+
data: refForm.current.values,
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
}, [dispatch]);
|
|
157
|
+
const deleteWorkSpaceHandler = (0, react_2.useCallback)((key) => {
|
|
158
|
+
dispatch({
|
|
159
|
+
type: 'REMOVE_WORKSPACE',
|
|
160
|
+
payload: {
|
|
161
|
+
workspace: key,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}, [dispatch]);
|
|
165
|
+
const ChangeWorkspaceHandler = (0, react_2.useCallback)((option) => {
|
|
166
|
+
dispatch({
|
|
167
|
+
type: 'SET_WORKSPACE',
|
|
168
|
+
payload: {
|
|
169
|
+
workspace: option.key,
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
}, [dispatch]);
|
|
173
|
+
const renderItem = (0, react_2.useCallback)((item) => {
|
|
174
|
+
return ((0, jsx_runtime_1.jsx)(WorkspaceItem_1.default, { item: item, onSave: addWorkSpaceHandler, onDelete: deleteWorkSpaceHandler }));
|
|
175
|
+
}, [addWorkSpaceHandler, deleteWorkSpaceHandler]);
|
|
176
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "General Settings" }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose, className: "close-bt" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "workspace-container", children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "Workspace : " }), (0, jsx_runtime_1.jsx)(DropDownButton_1.default, { data: workspacesList, renderItem: renderItem, selectedKey: preferences?.workspace.current, onSelect: ChangeWorkspaceHandler })] }), (0, jsx_runtime_1.jsx)("div", { className: "main-content", children: (0, jsx_runtime_1.jsx)(FormikForm_1.default, { ref: refForm, initialValues: preferences.current, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(Tabs_1.default, { position: Tabs_1.PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [(0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Controllers", tabid: "controllers", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(ControllersTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Formatting", tabid: "formatting", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(FormattingTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Display", tabid: "display", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(DisplayTabContent_1.default, { preferences: preferences.current.display }) }) })] }) }, JSON.stringify(preferences.current)) }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-container", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", onClick: handleSave, className: "btn", children: "Save" }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: handleReset, className: "btn", children: "Reset" })] })] }));
|
|
180
177
|
}
|
|
181
178
|
exports.default = GeneralSettings;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
7
|
+
/** @jsxImportSource @emotion/react */
|
|
8
|
+
const react_1 = require("@emotion/react");
|
|
9
|
+
const react_2 = require("react");
|
|
10
|
+
const workspaces_1 = __importDefault(require("../../workspaces"));
|
|
11
|
+
const styles = (0, react_1.css) `
|
|
12
|
+
.container {
|
|
13
|
+
display: flex;
|
|
14
|
+
span {
|
|
15
|
+
padding: 5px !important;
|
|
16
|
+
}
|
|
17
|
+
span {
|
|
18
|
+
flex: 1;
|
|
19
|
+
text-align: left !important;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.new-container {
|
|
24
|
+
background-color: #f6f6f6;
|
|
25
|
+
display: flex;
|
|
26
|
+
padding: 0.3em;
|
|
27
|
+
|
|
28
|
+
input {
|
|
29
|
+
padding: 0.5em;
|
|
30
|
+
color: black;
|
|
31
|
+
outline: none;
|
|
32
|
+
background-color: transparent !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.delete-button:hover {
|
|
37
|
+
color: white;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.save-button:hover {
|
|
41
|
+
color: green;
|
|
42
|
+
}
|
|
43
|
+
.delete-button,
|
|
44
|
+
.save-button {
|
|
45
|
+
padding: 5px;
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
const WorkspaceItem = ({ item, onSave, onDelete }) => {
|
|
49
|
+
const [name, setName] = (0, react_2.useState)('');
|
|
50
|
+
const addWorkspaceHandler = (0, react_2.useCallback)((e) => {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
setName('');
|
|
53
|
+
onSave(name);
|
|
54
|
+
}, [name, onSave]);
|
|
55
|
+
const deleteWorkspaceHandler = (0, react_2.useCallback)((e) => {
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
onDelete(item.key);
|
|
58
|
+
}, [item.key, onDelete]);
|
|
59
|
+
const onTextChange = (0, react_2.useCallback)((e) => {
|
|
60
|
+
setName(e.target.value);
|
|
61
|
+
}, []);
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)("div", { css: styles, children: item.key === 'new' ? ((0, jsx_runtime_1.jsxs)("div", { className: "new-container", children: [(0, jsx_runtime_1.jsx)("input", { value: name, placeholder: "Custom workspace", onClick: (e) => e.stopPropagation(), onChange: onTextChange }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "save-button", onClick: addWorkspaceHandler, disabled: !name, children: "save" })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsx)("span", { children: item.label }), !workspaces_1.default[item.key] && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: deleteWorkspaceHandler, children: "Delete" }))] })) }));
|
|
63
|
+
};
|
|
64
|
+
exports.default = WorkspaceItem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
7
|
+
/** @jsxImportSource @emotion/react */
|
|
8
|
+
const cheminfo_font_1 = require("cheminfo-font");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const ButtonToolTip_1 = __importDefault(require("../../elements/ButtonToolTip"));
|
|
11
|
+
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
12
|
+
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
13
|
+
function AutomaticAssignment() {
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
15
|
+
const automaticAssignmentHandler = (0, react_1.useCallback)(() => { }, []);
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: BasicPanelStyle_1.tablePanelStyle, children: [(0, jsx_runtime_1.jsx)(DefaultPanelHeader_1.default, { showSettingButton: false, canDelete: false, children: (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "automatic assignment", onClick: automaticAssignmentHandler, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAssignment2, { style: { fontSize: '18px' } }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "inner-container" })] }));
|
|
17
|
+
}
|
|
18
|
+
exports.default = AutomaticAssignment;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const cheminfo_font_1 = require("cheminfo-font");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
10
|
+
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
11
|
+
function PeaksTable({ data }) {
|
|
12
|
+
const assignHandler = (0, react_1.useCallback)((e, row) => {
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
e.stopPropagation();
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
+
const params = row.original;
|
|
17
|
+
}, []);
|
|
18
|
+
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
19
|
+
{
|
|
20
|
+
index: 1,
|
|
21
|
+
Header: '#',
|
|
22
|
+
Cell: ({ row }) => row.index + 1,
|
|
23
|
+
style: { width: '1%', maxWidth: '40px', minWidth: '40px' },
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
index: 2,
|
|
27
|
+
Header: 'Score',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
index: 3,
|
|
31
|
+
Header: '',
|
|
32
|
+
style: {
|
|
33
|
+
width: '1%',
|
|
34
|
+
maxWidth: '24px',
|
|
35
|
+
minWidth: '24px',
|
|
36
|
+
},
|
|
37
|
+
id: 'assign-button',
|
|
38
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "assign-button", onClick: (e) => assignHandler(e, row), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAssignment, {}) })),
|
|
39
|
+
},
|
|
40
|
+
], [assignHandler]);
|
|
41
|
+
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: COLUMNS })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {}));
|
|
42
|
+
}
|
|
43
|
+
exports.default = (0, react_1.memo)(PeaksTable);
|
|
@@ -59,7 +59,7 @@ function InformationPanelInner({ info, meta }) {
|
|
|
59
59
|
minWidth: 100,
|
|
60
60
|
width: 20,
|
|
61
61
|
maxWidth: 20,
|
|
62
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original }
|
|
62
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original })),
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
Header: 'Value',
|
|
@@ -72,15 +72,15 @@ function InformationPanelInner({ info, meta }) {
|
|
|
72
72
|
fontFamily: 'monospace',
|
|
73
73
|
whiteSpace: 'pre',
|
|
74
74
|
overflow: 'hidden',
|
|
75
|
-
}, children: `${information[row.original]}` }
|
|
75
|
+
}, children: `${information[row.original]}` })),
|
|
76
76
|
},
|
|
77
77
|
], [information]);
|
|
78
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.container, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("input", { type: "text", style: styles.searchInput, placeholder: "Search for parameter...", onChange: handleSearch, ref: searchRef }
|
|
78
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.container, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("input", { type: "text", style: styles.searchInput, placeholder: "Search for parameter...", onChange: handleSearch, ref: searchRef }) }), (0, jsx_runtime_1.jsx)("div", { style: styles.tableContainer, children: (0, jsx_runtime_1.jsx)(ReactTableFlexLayout_1.default, { data: matches, columns: columns }) })] }));
|
|
79
79
|
}
|
|
80
80
|
const MemoizedInformationPanel = (0, react_1.memo)(InformationPanelInner);
|
|
81
81
|
const emptyData = { info: {}, meta: {} };
|
|
82
82
|
function InformationPanel() {
|
|
83
83
|
const { info, meta } = (0, useSpectrum_1.default)(emptyData);
|
|
84
|
-
return (0, jsx_runtime_1.jsx)(MemoizedInformationPanel, { ...{ info, meta } }
|
|
84
|
+
return (0, jsx_runtime_1.jsx)(MemoizedInformationPanel, { ...{ info, meta } });
|
|
85
85
|
}
|
|
86
86
|
exports.default = InformationPanel;
|
|
@@ -64,7 +64,7 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, preferences,
|
|
|
64
64
|
const showChangeIntegralSumModal = (0, react_2.useCallback)(() => {
|
|
65
65
|
modal.show((0, jsx_runtime_1.jsx)(ChangeSumModal_1.default, { onClose: () => modal.close(), onSave: changeIntegralSumHandler, header: currentSum
|
|
66
66
|
? `Set new Integrals Sum (Current: ${Number(currentSum).toFixed(2)})`
|
|
67
|
-
: 'Set new Integrals Sum', sumOptions: integrals?.options }
|
|
67
|
+
: 'Set new Integrals Sum', sumOptions: integrals?.options }));
|
|
68
68
|
}, [changeIntegralSumHandler, currentSum, integrals?.options, modal]);
|
|
69
69
|
const settingsPanelHandler = (0, react_2.useCallback)(() => {
|
|
70
70
|
setFlipStatus(!isFlipped);
|
|
@@ -113,7 +113,7 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, preferences,
|
|
|
113
113
|
? 'Show all integrals'
|
|
114
114
|
: 'Hide integrals out of view', filterIsActive: filterIsActive, counterFiltered: filteredData.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [(0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: currentSum
|
|
115
115
|
? `Change Integrals Sum (${Number(currentSum).toFixed(2)})`
|
|
116
|
-
: 'Change Integrals Sum', popupPlacement: "right", children: (0, jsx_runtime_1.jsx)("button", { className: "sum-button", type: "button", onClick: showChangeIntegralSumModal, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}
|
|
116
|
+
: 'Change Integrals Sum', popupPlacement: "right", children: (0, jsx_runtime_1.jsx)("button", { className: "sum-button", type: "button", onClick: showChangeIntegralSumModal, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}) }) }), (0, jsx_runtime_1.jsx)(ToggleButton_1.default, { className: "fix-integral-toggle-btn", popupTitle: "fix integral values", popupPlacement: "right", onClick: toggleConstantSumHandler, children: (0, jsx_runtime_1.jsx)(im_1.ImLink, {}) })] })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)(IntegralTable_1.default, { data: filteredData, activeTab: activeTab, preferences: preferences })) : ((0, jsx_runtime_1.jsx)(IntegralsPreferences_1.default, { ref: settingRef })) })] }) }));
|
|
117
117
|
}
|
|
118
118
|
const MemoizedIntegralPanel = (0, react_2.memo)(IntegralPanelInner);
|
|
119
119
|
const emptyData = { integrals: {}, info: {} };
|
|
@@ -124,9 +124,9 @@ function IntegralPanel() {
|
|
|
124
124
|
return ((0, jsx_runtime_1.jsx)(MemoizedIntegralPanel, { ...{
|
|
125
125
|
integrals,
|
|
126
126
|
info,
|
|
127
|
-
preferences,
|
|
127
|
+
preferences: preferences.current,
|
|
128
128
|
xDomain,
|
|
129
129
|
activeTab,
|
|
130
|
-
} }
|
|
130
|
+
} }));
|
|
131
131
|
}
|
|
132
132
|
exports.default = IntegralPanel;
|
|
@@ -65,13 +65,13 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
65
65
|
sortType: 'basic',
|
|
66
66
|
resizable: true,
|
|
67
67
|
accessor: (row) => row.kind,
|
|
68
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(Select_1.default, { onChange: (value) => changeIntegralDataHandler(value, row), data: SignalsKinds_1.SignalKinds, style: selectStyle, defaultValue: row.original.kind }
|
|
68
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(Select_1.default, { onChange: (value) => changeIntegralDataHandler(value, row), data: SignalsKinds_1.SignalKinds, style: selectStyle, defaultValue: row.original.kind })),
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
index: 7,
|
|
72
72
|
style: { width: '1%', maxWidth: '24px', minWidth: '24px' },
|
|
73
73
|
id: 'delete-button',
|
|
74
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: (e) => deleteIntegralHandler(e, row), children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}
|
|
74
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: (e) => deleteIntegralHandler(e, row), children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) })),
|
|
75
75
|
},
|
|
76
76
|
], [changeIntegralDataHandler, deleteIntegralHandler]);
|
|
77
77
|
const saveRelativeHandler = (0, react_1.useCallback)((event, row) => {
|
|
@@ -81,7 +81,7 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
81
81
|
payload: { data },
|
|
82
82
|
});
|
|
83
83
|
}, [dispatch]);
|
|
84
|
-
const integralsPreferences = (0, react_1.useMemo)(() => (0, LocalStorage_1.getValue)(preferences, `formatting.panels.integrals.[${activeTab}]`, defaultValues_1.integralDefaultValues), [activeTab, preferences]);
|
|
84
|
+
const integralsPreferences = (0, react_1.useMemo)(() => (0, LocalStorage_1.getValue)(preferences.current, `formatting.panels.integrals.[${activeTab}]`, defaultValues_1.integralDefaultValues), [activeTab, preferences]);
|
|
85
85
|
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
86
86
|
{
|
|
87
87
|
showWhen: 'showAbsolute',
|
|
@@ -95,7 +95,7 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
95
95
|
id: 'relative',
|
|
96
96
|
Header: () => {
|
|
97
97
|
const n = activeTab?.replace(/[0-9]/g, '');
|
|
98
|
-
return (0, jsx_runtime_1.jsx)("span", { children: `Relative ${n}` }
|
|
98
|
+
return (0, jsx_runtime_1.jsx)("span", { children: `Relative ${n}` });
|
|
99
99
|
},
|
|
100
100
|
accessor: (row) => {
|
|
101
101
|
return (0, FormatNumber_1.default)(row.integral, (0, get_1.default)(integralsPreferences, 'relativeFormat', defaultValues_1.integralDefaultValues.relativeFormat));
|
|
@@ -104,7 +104,7 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
104
104
|
const value = (0, FormatNumber_1.default)(row.original.integral, (0, get_1.default)(integralsPreferences, 'relativeFormat', defaultValues_1.integralDefaultValues.relativeFormat));
|
|
105
105
|
const flag = (0, Spectrum1D_1.checkIntegralKind)(row.original);
|
|
106
106
|
const integral = flag ? value : `[ ${value} ]`;
|
|
107
|
-
return ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: integral, onSave: (event) => saveRelativeHandler(event, row.original), type: "number" }
|
|
107
|
+
return ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: integral, onSave: (event) => saveRelativeHandler(event, row.original), type: "number" }));
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
], [activeTab, integralsPreferences, saveRelativeHandler]);
|
|
@@ -118,6 +118,6 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
118
118
|
}
|
|
119
119
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
120
120
|
}, [COLUMNS, initialColumns, integralsPreferences]);
|
|
121
|
-
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: tableColumns }
|
|
121
|
+
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: tableColumns })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {}));
|
|
122
122
|
}
|
|
123
123
|
exports.default = (0, react_1.memo)(IntegralTable);
|
|
@@ -13,7 +13,6 @@ const FormikForm_1 = __importDefault(require("../../elements/formik/FormikForm")
|
|
|
13
13
|
const FormikNumberInput_1 = __importDefault(require("../../elements/formik/FormikNumberInput"));
|
|
14
14
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
15
15
|
const useNucleus_1 = __importDefault(require("../../hooks/useNucleus"));
|
|
16
|
-
const preferencesReducer_1 = require("../../reducer/preferencesReducer");
|
|
17
16
|
const LocalStorage_1 = require("../../utility/LocalStorage");
|
|
18
17
|
const defaultValues_1 = require("../extra/preferences/defaultValues");
|
|
19
18
|
const styles = {
|
|
@@ -70,7 +69,7 @@ function IntegralsPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
70
69
|
const updateValues = (0, react_1.useCallback)(() => {
|
|
71
70
|
if (nucleus) {
|
|
72
71
|
const { color, strokeWidth, ...restProps } = defaultValues_1.integralDefaultValues;
|
|
73
|
-
const integralPreferences = (0, LocalStorage_1.getValue)(preferences, `formatting.panels.integrals`);
|
|
72
|
+
const integralPreferences = (0, LocalStorage_1.getValue)(preferences.current, `formatting.panels.integrals`);
|
|
74
73
|
let defaultValues = nucleus.reduce((acc, nucleusLabel) => {
|
|
75
74
|
acc[nucleusLabel] = restProps;
|
|
76
75
|
return acc;
|
|
@@ -84,7 +83,7 @@ function IntegralsPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
84
83
|
}, [updateValues]);
|
|
85
84
|
const saveHandler = (0, react_1.useCallback)((values) => {
|
|
86
85
|
preferences.dispatch({
|
|
87
|
-
type:
|
|
86
|
+
type: 'SET_PANELS_PREFERENCES',
|
|
88
87
|
payload: { key: 'integrals', value: values },
|
|
89
88
|
});
|
|
90
89
|
alert.success('Integrals preferences saved successfully');
|
|
@@ -94,14 +93,14 @@ function IntegralsPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
94
93
|
formRef.current.submitForm();
|
|
95
94
|
},
|
|
96
95
|
}));
|
|
97
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsxs)(FormikForm_1.default, { onSubmit: saveHandler, ref: formRef, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.groupContainer, children: [(0, jsx_runtime_1.jsx)("p", { style: styles.header, children: "General" }
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsxs)(FormikForm_1.default, { onSubmit: saveHandler, ref: formRef, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.groupContainer, children: [(0, jsx_runtime_1.jsx)("p", { style: styles.header, children: "General" }), (0, jsx_runtime_1.jsx)(FormikColorInput_1.default, { name: "color" }), (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "strokeWidth", label: "stroke width :", style: {
|
|
98
97
|
label: { fontSize: '11px', fontWeight: 'bold', color: '#232323' },
|
|
99
98
|
input: {
|
|
100
99
|
width: '60%',
|
|
101
100
|
textAlign: 'center',
|
|
102
101
|
borderRadius: '5px',
|
|
103
102
|
},
|
|
104
|
-
}, min: 1, max: 9, pattern: "[1-9]+" }
|
|
103
|
+
}, min: 1, max: 9, pattern: "[1-9]+" })] }), nucleus?.map((nucleusLabel) => ((0, jsx_runtime_1.jsxs)("div", { style: styles.groupContainer, children: [(0, jsx_runtime_1.jsx)("p", { style: styles.header, children: (0, jsx_runtime_1.jsx)(react_mf_1.MF, { mf: nucleusLabel }) }), formatFields.map((field) => ((0, jsx_runtime_1.jsx)(FormikColumnFormatField_1.default, { label: field.label, checkControllerName: `${nucleusLabel}.${field.checkController}`, formatControllerName: `${nucleusLabel}.${field.formatController}` }, field.id)))] }, nucleusLabel)))] }) }));
|
|
105
104
|
}
|
|
106
105
|
const MemoizedIntegralsPreferences = (0, react_1.memo)(IntegralsPreferencesInner);
|
|
107
106
|
// TODO: remove this hacky use of ref.
|
|
@@ -111,6 +110,6 @@ function IntegralsPreferences(props, ref) {
|
|
|
111
110
|
return ((0, jsx_runtime_1.jsx)(MemoizedIntegralsPreferences, { innerRef: ref, ...{
|
|
112
111
|
nucleus,
|
|
113
112
|
preferences,
|
|
114
|
-
} }
|
|
113
|
+
} }));
|
|
115
114
|
}
|
|
116
115
|
exports.default = (0, react_1.forwardRef)(IntegralsPreferences);
|