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
|
@@ -1,11 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePreferences = exports.PreferencesProvider = exports.
|
|
6
|
+
exports.useWorkspacesList = exports.usePreferences = exports.PreferencesProvider = exports.PreferencesContext = void 0;
|
|
4
7
|
const react_1 = require("react");
|
|
5
8
|
const preferencesReducer_1 = require("../reducer/preferencesReducer");
|
|
6
|
-
|
|
7
|
-
exports.
|
|
9
|
+
const workspaces_1 = __importDefault(require("../workspaces"));
|
|
10
|
+
exports.PreferencesContext = (0, react_1.createContext)(preferencesReducer_1.preferencesInitialState);
|
|
11
|
+
exports.PreferencesProvider = exports.PreferencesContext.Provider;
|
|
8
12
|
function usePreferences() {
|
|
9
|
-
|
|
13
|
+
const context = (0, react_1.useContext)(exports.PreferencesContext);
|
|
14
|
+
if (!context) {
|
|
15
|
+
throw new Error('Preferences context was not found');
|
|
16
|
+
}
|
|
17
|
+
const { workspace, workspaces, dispatch } = context;
|
|
18
|
+
return (0, react_1.useMemo)(() => {
|
|
19
|
+
return {
|
|
20
|
+
current: workspaces[workspace.current] || {},
|
|
21
|
+
workspace,
|
|
22
|
+
workspaces,
|
|
23
|
+
dispatch,
|
|
24
|
+
};
|
|
25
|
+
}, [dispatch, workspace, workspaces]);
|
|
10
26
|
}
|
|
11
27
|
exports.usePreferences = usePreferences;
|
|
28
|
+
function useWorkspacesList() {
|
|
29
|
+
const { workspaces } = usePreferences();
|
|
30
|
+
return (0, react_1.useMemo)(() => {
|
|
31
|
+
const currentWorkspaces = Object.keys(workspaces).reduce((acc, key) => {
|
|
32
|
+
if (!workspaces_1.default[key]) {
|
|
33
|
+
acc.push({ key, label: workspaces[key].label });
|
|
34
|
+
}
|
|
35
|
+
return acc;
|
|
36
|
+
}, []);
|
|
37
|
+
return [...preferencesReducer_1.WORKSPACES, ...currentWorkspaces];
|
|
38
|
+
}, [workspaces]);
|
|
39
|
+
}
|
|
40
|
+
exports.useWorkspacesList = useWorkspacesList;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 Button_1 = __importDefault(require("./Button"));
|
|
8
|
+
function ActionButtons(props) {
|
|
9
|
+
const { onDone, onCancel, doneLabel = 'Apply', cancelLabel = 'Cancel', style = {}, } = props;
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { margin: '0 10px', display: 'flex', ...style }, children: [(0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: onDone, style: style?.flexDirection === 'row-reverse'
|
|
11
|
+
? {
|
|
12
|
+
marginLeft: '10px',
|
|
13
|
+
}
|
|
14
|
+
: {}, children: doneLabel }), (0, jsx_runtime_1.jsx)(Button_1.default.Danger, { fill: "outline", onClick: onCancel, style: !style.flexDirection || style.flexDirection === 'row'
|
|
15
|
+
? {
|
|
16
|
+
marginLeft: '10px',
|
|
17
|
+
}
|
|
18
|
+
: {}, children: cancelLabel })] }));
|
|
19
|
+
}
|
|
20
|
+
exports.default = ActionButtons;
|
|
@@ -1,8 +1,153 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
4
|
+
/** @jsxImportSource @emotion/react */
|
|
5
|
+
const react_1 = require("@emotion/react");
|
|
6
|
+
const colorPalettes = {
|
|
7
|
+
success: {
|
|
8
|
+
base: '#2dd36f',
|
|
9
|
+
shade: '#28ba62',
|
|
10
|
+
tint: '#42d77d',
|
|
11
|
+
},
|
|
12
|
+
danger: {
|
|
13
|
+
base: '#eb445a',
|
|
14
|
+
shade: '#cf3c4f',
|
|
15
|
+
tint: '#ed576b',
|
|
16
|
+
},
|
|
17
|
+
warning: {
|
|
18
|
+
base: '#ffc409',
|
|
19
|
+
shade: '#e0ac08',
|
|
20
|
+
tint: '#ffca22',
|
|
21
|
+
},
|
|
22
|
+
medium: {
|
|
23
|
+
base: '#92949c',
|
|
24
|
+
shade: '#808289',
|
|
25
|
+
tint: '#9d9fa6',
|
|
26
|
+
},
|
|
27
|
+
light: {
|
|
28
|
+
base: '#f4f5f8',
|
|
29
|
+
shade: '#d7d8da',
|
|
30
|
+
tint: '#f5f6f9',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
const sizeConfig = {
|
|
34
|
+
xSmall: {
|
|
35
|
+
fontSize: '0.75rem',
|
|
36
|
+
padding: '0.15rem 0.3rem',
|
|
37
|
+
borderRadius: '0.15rem',
|
|
38
|
+
},
|
|
39
|
+
small: {
|
|
40
|
+
fontSize: '0.8rem',
|
|
41
|
+
padding: '0.25rem 0.5rem',
|
|
42
|
+
borderRadius: '0.2rem',
|
|
43
|
+
},
|
|
44
|
+
medium: {
|
|
45
|
+
fontSize: '1rem',
|
|
46
|
+
padding: '0.375rem 0.75rem',
|
|
47
|
+
borderRadius: '0.25rem',
|
|
48
|
+
},
|
|
49
|
+
large: {
|
|
50
|
+
fontSize: '1.25rem',
|
|
51
|
+
padding: '0.5rem 1rem',
|
|
52
|
+
borderRadius: '0.3rem',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
function getFillStyle(props) {
|
|
56
|
+
const { borderColor, fill, backgroundColor, color } = props;
|
|
57
|
+
switch (fill) {
|
|
58
|
+
case 'solid': {
|
|
59
|
+
return (0, react_1.css) `
|
|
60
|
+
border-color: transparent;
|
|
61
|
+
background-color: ${backgroundColor.base};
|
|
62
|
+
color: ${color.hover};
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
case 'outline': {
|
|
66
|
+
return (0, react_1.css) `
|
|
67
|
+
border-style: solid;
|
|
68
|
+
border-color: ${backgroundColor.base};
|
|
69
|
+
background-color: transparent;
|
|
70
|
+
color: ${color.base};
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
case 'clear': {
|
|
74
|
+
return (0, react_1.css) `
|
|
75
|
+
border-color: transparent;
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
color: ${color.base};
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
default:
|
|
81
|
+
return (0, react_1.css) `
|
|
82
|
+
background-color: ${backgroundColor.base};
|
|
83
|
+
color: ${color.base};
|
|
84
|
+
border-color: ${borderColor};
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
7
87
|
}
|
|
88
|
+
const styles = {
|
|
89
|
+
button: (props) => {
|
|
90
|
+
const { size, backgroundColor, color, borderRadius } = props;
|
|
91
|
+
const basic = (0, react_1.css) `
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: row;
|
|
94
|
+
border-width: 1px;
|
|
95
|
+
align-items: center;
|
|
96
|
+
`;
|
|
97
|
+
const fillStyle = getFillStyle(props);
|
|
98
|
+
const colorStyle = (0, react_1.css) `
|
|
99
|
+
&:not([disabled]):hover {
|
|
100
|
+
background-color: ${backgroundColor.hover};
|
|
101
|
+
color: ${color.hover};
|
|
102
|
+
}
|
|
103
|
+
&:not([disabled]):active {
|
|
104
|
+
background-color: ${backgroundColor?.active || backgroundColor.hover};
|
|
105
|
+
color: ${color?.active || color.hover};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:disabled {
|
|
109
|
+
opacity: 0.25;
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
return (0, react_1.css)([
|
|
113
|
+
basic,
|
|
114
|
+
sizeConfig[size],
|
|
115
|
+
fillStyle,
|
|
116
|
+
colorStyle,
|
|
117
|
+
{ borderRadius },
|
|
118
|
+
]);
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
const Button = (props) => {
|
|
122
|
+
const { onClick, size = 'small', color = { base: 'black', hover: 'white' }, backgroundColor = { base: 'white', hover: 'black', active: 'black' }, borderColor = 'transparent', fill, borderRadius, style = {}, ...restProps } = props;
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onClick, css: [
|
|
124
|
+
styles.button({
|
|
125
|
+
size,
|
|
126
|
+
backgroundColor,
|
|
127
|
+
color,
|
|
128
|
+
borderColor,
|
|
129
|
+
fill,
|
|
130
|
+
borderRadius,
|
|
131
|
+
}),
|
|
132
|
+
style,
|
|
133
|
+
], ...restProps, children: (0, jsx_runtime_1.jsxs)("span", { style: { flex: 1 }, children: [" ", props.children] }) }));
|
|
134
|
+
};
|
|
135
|
+
function ThemeButton(props) {
|
|
136
|
+
const { base, shade, tint } = colorPalettes[props.colorTheme];
|
|
137
|
+
const { color = { base: shade, hover: 'white' }, backgroundColor = {
|
|
138
|
+
base: base,
|
|
139
|
+
hover: shade,
|
|
140
|
+
active: tint,
|
|
141
|
+
}, fill = 'solid', ...restProps } = props;
|
|
142
|
+
return (0, jsx_runtime_1.jsx)(Button, { ...{ fill, ...restProps, backgroundColor, color } });
|
|
143
|
+
}
|
|
144
|
+
Button.Done = (props) => {
|
|
145
|
+
return (0, jsx_runtime_1.jsx)(ThemeButton, { ...props, colorTheme: "success" });
|
|
146
|
+
};
|
|
147
|
+
Button.Danger = (props) => {
|
|
148
|
+
return (0, jsx_runtime_1.jsx)(ThemeButton, { ...props, colorTheme: "danger" });
|
|
149
|
+
};
|
|
150
|
+
Button.Action = (props) => {
|
|
151
|
+
return (0, jsx_runtime_1.jsx)(ThemeButton, { ...props, colorTheme: "medium" });
|
|
152
|
+
};
|
|
8
153
|
exports.default = Button;
|
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const ToolTip_1 = __importDefault(require("./ToolTip/ToolTip"));
|
|
8
8
|
function ButtonToolTip({ children, style = {}, onClick = () => null, popupTitle = '', popupPlacement = 'right', ...props }) {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: popupTitle, popupPlacement: popupPlacement, children: (0, jsx_runtime_1.jsx)("button", { style: style, type: "button", onClick: onClick, ...props, children: children }
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: popupTitle, popupPlacement: popupPlacement, children: (0, jsx_runtime_1.jsx)("button", { style: style, type: "button", onClick: onClick, ...props, children: children }) }));
|
|
10
10
|
}
|
|
11
11
|
exports.default = ButtonToolTip;
|
|
@@ -9,6 +9,6 @@ const CheckBox = (0, react_1.forwardRef)((props, ref) => {
|
|
|
9
9
|
setCheck(!checked);
|
|
10
10
|
onChange(e);
|
|
11
11
|
}, [checked, onChange]);
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)("input", { ref: ref, type: "checkbox", name: name, id: name, onChange: handleCheck, defaultChecked: checkProps, disabled: disabled, style: style }
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("input", { ref: ref, type: "checkbox", name: name, id: name, onChange: handleCheck, defaultChecked: checkProps, disabled: disabled, style: style }));
|
|
13
13
|
});
|
|
14
14
|
exports.default = CheckBox;
|
|
@@ -23,6 +23,6 @@ const styles = {
|
|
|
23
23
|
};
|
|
24
24
|
function CloseButton(props) {
|
|
25
25
|
const { onClick = () => null, popupTitle = 'Close', popupPlacement = 'left', className = '', } = props;
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: popupTitle, popupPlacement: popupPlacement, children: (0, jsx_runtime_1.jsx)("button", { style: styles.button, type: "button", onClick: onClick, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, { style: styles.svg }
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: popupTitle, popupPlacement: popupPlacement, children: (0, jsx_runtime_1.jsx)("button", { style: styles.button, type: "button", onClick: onClick, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, { style: styles.svg }) }) }) }));
|
|
27
27
|
}
|
|
28
28
|
exports.default = (0, react_1.memo)(CloseButton);
|
|
@@ -85,6 +85,6 @@ function ColorInput(props) {
|
|
|
85
85
|
setColor(hex);
|
|
86
86
|
onColorChange({ ...colorEvent, hex, name });
|
|
87
87
|
}, [name, onColorChange]);
|
|
88
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: style, children: [(0, jsx_runtime_1.jsx)("span", { className: "inputLabel", children: label }
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: style, children: [(0, jsx_runtime_1.jsx)("span", { className: "inputLabel", children: label }), (0, jsx_runtime_1.jsxs)("div", { style: { flex: 4 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "swatch", onClick: handleClick, children: [(0, jsx_runtime_1.jsx)("div", { className: "color", style: { backgroundColor: selectedColor } }), (0, jsx_runtime_1.jsx)("input", { type: "hidden", value: selectedColor, name: name })] }), displayColorPicker ? ((0, jsx_runtime_1.jsxs)("div", { className: "color-popover", children: [(0, jsx_runtime_1.jsx)("div", { className: "cover", onClick: handleClose }), (0, jsx_runtime_1.jsx)(react_color_1.ChromePicker, { color: { hex: selectedColor }, onChangeComplete: handleOnColorChanged })] })) : null] })] }));
|
|
89
89
|
}
|
|
90
90
|
exports.default = (0, react_2.memo)(ColorInput);
|
|
@@ -49,22 +49,22 @@ function ContextMenu({ context }, ref) {
|
|
|
49
49
|
left: 0,
|
|
50
50
|
top: 0,
|
|
51
51
|
});
|
|
52
|
-
const { rootRef,
|
|
52
|
+
const { rootRef, elementsWrapperRef } = (0, GlobalContext_1.useGlobal)();
|
|
53
53
|
const [data, setData] = (0, react_2.useState)();
|
|
54
54
|
const [isVisible, show] = (0, react_2.useState)();
|
|
55
55
|
const [sourceElement, setSourceElement] = (0, react_2.useState)(null);
|
|
56
56
|
const root = (0, react_2.useRef)();
|
|
57
57
|
(0, react_2.useEffect)(() => {
|
|
58
58
|
root.current = document.createElement('div');
|
|
59
|
-
if (
|
|
60
|
-
|
|
59
|
+
if (elementsWrapperRef) {
|
|
60
|
+
elementsWrapperRef.appendChild(root.current);
|
|
61
61
|
}
|
|
62
62
|
return () => {
|
|
63
|
-
if (root.current &&
|
|
64
|
-
|
|
63
|
+
if (root.current && elementsWrapperRef) {
|
|
64
|
+
elementsWrapperRef.removeChild(root.current);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
}, [
|
|
67
|
+
}, [elementsWrapperRef]);
|
|
68
68
|
const contextMenuHandler = (event) => {
|
|
69
69
|
event.preventDefault();
|
|
70
70
|
setSourceElement(event.target.parentElement);
|
|
@@ -125,6 +125,6 @@ function ContextMenu({ context }, ref) {
|
|
|
125
125
|
return null;
|
|
126
126
|
}
|
|
127
127
|
return (root.current &&
|
|
128
|
-
(0, react_dom_1.createPortal)(context && ((0, jsx_runtime_1.jsx)("div", { ref: ref, css: [styles, position], children: context.map((c, index) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: (e) => clickHandler(e, c.onClick), children: c.label }, index))) }
|
|
128
|
+
(0, react_dom_1.createPortal)(context && ((0, jsx_runtime_1.jsx)("div", { ref: ref, css: [styles, position], children: context.map((c, index) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: (e) => clickHandler(e, c.onClick), children: c.label }, index))) })), root.current));
|
|
129
129
|
}
|
|
130
130
|
exports.default = (0, react_2.forwardRef)(ContextMenu);
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
function DeleteButton(props) {
|
|
5
5
|
const { x = 'initial', y = 'initial', onDelete = () => null, fill = '#c81121', } = props;
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { className: "delete-button", x: x, y: y, onClick: onDelete, "data-no-export": "true", children: [(0, jsx_runtime_1.jsx)("rect", { rx: "5", width: "16", height: "16", fill: fill }
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { className: "delete-button", x: x, y: y, onClick: onDelete, "data-no-export": "true", children: [(0, jsx_runtime_1.jsx)("rect", { rx: "5", width: "16", height: "16", fill: fill }), (0, jsx_runtime_1.jsx)("line", { x1: "5", x2: "10", y1: "8", y2: "8", stroke: "white", strokeWidth: "2" })] }));
|
|
7
7
|
}
|
|
8
8
|
exports.default = DeleteButton;
|
|
@@ -46,6 +46,6 @@ function EditableColumn(props, ref) {
|
|
|
46
46
|
enableEdit(flag);
|
|
47
47
|
}
|
|
48
48
|
}, [mouseClickCallback, onEditStart, onSave]);
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'table', width: '100%', height: '100%', ...style }, onDoubleClick: (event) => editModeHandler(true, event), children: [!enabled && ((0, jsx_runtime_1.jsx)("span", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: value }
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'table', width: '100%', height: '100%', ...style }, onDoubleClick: (event) => editModeHandler(true, event), children: [!enabled && ((0, jsx_runtime_1.jsx)("span", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: value })), enabled && ((0, jsx_runtime_1.jsx)("div", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: (0, jsx_runtime_1.jsx)(Input_1.default, { enableAutoSelect: true, className: "editable-column", value: value, type: type, onKeyDown: (e) => editModeHandler(false, e) }) }))] }));
|
|
50
50
|
}
|
|
51
51
|
exports.default = (0, react_1.forwardRef)(EditableColumn);
|
|
@@ -125,6 +125,6 @@ const Input = (0, react_1.forwardRef)(({ value = '', name, style = {
|
|
|
125
125
|
}, className: `input ${className || ''}`, children: [renderIcon?.(), (0, jsx_runtime_1.jsx)("input", { ...props, ref: combinedRef, name: name, style: {
|
|
126
126
|
...styles.input,
|
|
127
127
|
...(style?.input ? style.input : {}),
|
|
128
|
-
}, "data-test-id": name ? `input-${name}` : '', type: "text", value: val, onChange: onChangeHandler, onKeyDown: handleKeyDown, onKeyPress: preventPropagate, onDoubleClick: (e) => e.stopPropagation(), onFocus: onFocus, onBlur: onBlur }
|
|
128
|
+
}, "data-test-id": name ? `input-${name}` : '', type: "text", value: val, onChange: onChangeHandler, onKeyDown: handleKeyDown, onKeyPress: preventPropagate, onDoubleClick: (e) => e.stopPropagation(), onFocus: onFocus, onBlur: onBlur }), canClear && val && ((0, jsx_runtime_1.jsx)("button", { type: "button", style: styles.clearButton, onClick: clearHandler, children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'block', margin: '0 auto' }, children: "\u2715" }) }))] }));
|
|
129
129
|
});
|
|
130
130
|
exports.default = Input;
|
|
@@ -57,6 +57,6 @@ function InputRange(props, ref) {
|
|
|
57
57
|
window.addEventListener('mousemove', mouseMoveCallback);
|
|
58
58
|
window.addEventListener('mouseup', mouseUpCallback);
|
|
59
59
|
}, [name, onChange]);
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: { ...styles.container, ...style }, className: className, onMouseDown: mouseDownCallback, children: (0, jsx_runtime_1.jsx)("span", { style: styles.label, children: label }
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { ...styles.container, ...style }, className: className, onMouseDown: mouseDownCallback, children: (0, jsx_runtime_1.jsx)("span", { style: styles.label, children: label }) }));
|
|
61
61
|
}
|
|
62
62
|
exports.default = (0, react_1.forwardRef)(InputRange);
|
|
@@ -6,6 +6,6 @@ function IsotopesViewer({ value = '', ...othersProps }) {
|
|
|
6
6
|
// eslint-disable-next-line react/no-danger
|
|
7
7
|
dangerouslySetInnerHTML: {
|
|
8
8
|
__html: value.replace(/(?<isotope>[0-9]+)/g, '<sup>$<isotope></sup>'),
|
|
9
|
-
} }
|
|
9
|
+
} }));
|
|
10
10
|
}
|
|
11
11
|
exports.default = IsotopesViewer;
|
|
@@ -10,6 +10,6 @@ function Label(props) {
|
|
|
10
10
|
paddingRight: '10px',
|
|
11
11
|
width: 'max-content',
|
|
12
12
|
...style?.label,
|
|
13
|
-
}, children: title }
|
|
13
|
+
}, children: title }), (0, jsx_runtime_1.jsx)("div", { style: style?.wrapper, children: children })] }));
|
|
14
14
|
}
|
|
15
15
|
exports.default = Label;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
function Logo({ width = 100, height = 100 }) {
|
|
5
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { style: { width: width, height: height }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 752.34 221.73", children: [(0, jsx_runtime_1.jsx)("path", { fill: "#ea580c", fillRule: "evenodd", d: "M.64,31.7A31.67,31.67,0,0,1,54.72,9.29l0,0A31.66,31.66,0,0,1,64,31.7V190a13.39,13.39,0,0,0,26.77,0V54a31.7,31.7,0,0,1,31.7-31.7V40.58A13.38,13.38,0,0,0,109.13,54V190a31.71,31.71,0,0,1-63.41,0V31.7a13.29,13.29,0,0,0-3.88-9.46l0,0A13.41,13.41,0,0,0,19,31.7V164.82H.64Z" }
|
|
5
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { style: { width: width, height: height }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 752.34 221.73", children: [(0, jsx_runtime_1.jsx)("path", { fill: "#ea580c", fillRule: "evenodd", d: "M.64,31.7A31.67,31.67,0,0,1,54.72,9.29l0,0A31.66,31.66,0,0,1,64,31.7V190a13.39,13.39,0,0,0,26.77,0V54a31.7,31.7,0,0,1,31.7-31.7V40.58A13.38,13.38,0,0,0,109.13,54V190a31.71,31.71,0,0,1-63.41,0V31.7a13.29,13.29,0,0,0-3.88-9.46l0,0A13.41,13.41,0,0,0,19,31.7V164.82H.64Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#2b143e", fillRule: "evenodd", d: "M154.21,54v68.17a13.34,13.34,0,0,0,3.89,9.47h0A13.39,13.39,0,0,0,181,122.14V99.32h-.06a31.63,31.63,0,0,1,9.29-22.38l0,0a31.65,31.65,0,0,1,44.8,0l0,0a31.58,31.58,0,0,1,9.3,22.39V118H226V99.32a13.3,13.3,0,0,0-3.89-9.46h0a13.44,13.44,0,0,0-18.93,0l0,0a13.3,13.3,0,0,0-3.83,8.19v24.09a31.7,31.7,0,0,1-54.11,22.42v0a31.66,31.66,0,0,1-9.3-22.4V54Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#2b143e", fillRule: "evenodd", d: "M729.19,96.34c-8.65,0-14.26,3.17-17.67,8-3.41-5.12-8.78-8-16-8-8.16,0-13.52,3.17-16.32,7.31v-5.6H661V159h18.28V124.62c0-7.19,3.41-11.46,9.5-11.46,5.85,0,8.78,3.9,8.78,10V159h18.27V124.62c0-7.19,3.42-11.46,9.51-11.46,5.85,0,8.77,3.9,8.77,10V159h18.28V121.57C752.34,106.33,743.2,96.34,729.19,96.34Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#2b143e", fillRule: "evenodd", d: "M629.26,98.05v33.26c0,8.66-4.63,12.56-11.33,12.56-5.85,0-10.6-3.54-10.6-11.09V98.05H589.05v37.41c0,16.45,10.48,25.22,22.79,25.22,8,0,14.13-2.92,17.42-7.43V159h18.28V98.05Z" }), (0, jsx_runtime_1.jsx)("rect", { fill: "#2b143e", x: "558.22", y: "98.05", width: "18.28", height: "60.93" }), (0, jsx_runtime_1.jsx)("path", { fill: "#2b143e", fillRule: "evenodd", d: "M567.36,92.68a11,11,0,1,0-11-11A11.08,11.08,0,0,0,567.36,92.68Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#ea580c", fillRule: "evenodd", d: "M478.77,159H498V116.57L525.66,159H549.2l-22.3-34.75c5.45-2.13,8.12-4.14,11.48-8.86a31.07,31.07,0,0,0,6.07-18.26V94.62c0-10.61-3.45-15.93-9.28-21.78S520.75,63.09,510,63.09H478.71l.06,95.89Zm33.1-50.27h-6.46v-.06H498V82.19h10.87c4.67,0,9.44,1.38,11.94,3.81a12.84,12.84,0,0,1,3.81,9.2C524.58,102.52,518.92,108.71,511.87,108.71Z" }), (0, jsx_runtime_1.jsx)("polygon", { fill: "#ea580c", fillRule: "evenodd", points: "372.91 60.8 372.91 158.98 392.16 158.98 392.16 119.23 419.91 157.41 447.61 119.23 447.61 158.98 466.87 158.98 466.87 60.8 419.91 125.22 372.91 60.8" }), (0, jsx_runtime_1.jsx)("polygon", { fill: "#ea580c", fillRule: "evenodd", points: "283.89 61.04 283.89 159.1 303.14 159.1 303.14 105.85 361.01 160.93 361.01 62.83 341.67 62.83 341.67 116.08 283.89 61.04" })] }));
|
|
6
6
|
}
|
|
7
7
|
exports.default = Logo;
|
|
@@ -60,14 +60,14 @@ const menuStyles = (0, react_1.css) `
|
|
|
60
60
|
}
|
|
61
61
|
`;
|
|
62
62
|
function MenuItem({ icon, label, onClick }) {
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "menu-item", onClick: onClick, children: [icon, (0, jsx_runtime_1.jsx)("span", { children: label }
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "menu-item", onClick: onClick, children: [icon, (0, jsx_runtime_1.jsx)("span", { children: label })] }));
|
|
64
64
|
}
|
|
65
65
|
function MenuList({ items, boxBounding, onClick }) {
|
|
66
66
|
return ((0, jsx_runtime_1.jsx)("div", { className: "menu", style: {
|
|
67
67
|
transform: `translate(${boxBounding.width}px, -${boxBounding.height}px) `,
|
|
68
68
|
}, children: items?.map((item) => {
|
|
69
69
|
return ((0, jsx_runtime_1.jsx)(MenuItem, { ...item, onClick: () => onClick(item) }, item.id));
|
|
70
|
-
}) }
|
|
70
|
+
}) }));
|
|
71
71
|
}
|
|
72
72
|
function MenuButton({ style, component, toolTip = '', className, items = [], onClick = () => null, }) {
|
|
73
73
|
const menuButtonRef = (0, react_2.useRef)(null);
|
|
@@ -82,6 +82,6 @@ function MenuButton({ style, component, toolTip = '', className, items = [], onC
|
|
|
82
82
|
showMenu(false);
|
|
83
83
|
onClick(e);
|
|
84
84
|
}, [onClick]);
|
|
85
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { height: 'auto' }, css: menuStyles, children: [(0, jsx_runtime_1.jsx)("button", { ref: menuButtonRef, type: "button", css: style, onClick: handleClick, className: className, style: { boxSizing: 'border-box' }, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: toolTip, popupPlacement: "right", children: component }
|
|
85
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { height: 'auto' }, css: menuStyles, children: [(0, jsx_runtime_1.jsx)("button", { ref: menuButtonRef, type: "button", css: style, onClick: handleClick, className: className, style: { boxSizing: 'border-box' }, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: toolTip, popupPlacement: "right", children: component }) }), isShown && ((0, jsx_runtime_1.jsx)(MenuList, { items: items, boxBounding: menuButtonRef.current?.getBoundingClientRect(), onClick: clickHandler })), isShown && (0, jsx_runtime_1.jsx)("div", { className: "menu-cover", onClick: closeMenuButton })] }));
|
|
86
86
|
}
|
|
87
87
|
exports.default = MenuButton;
|
|
@@ -65,6 +65,6 @@ function MolecularFormulaInput({ onSave = () => null, previousMF, }) {
|
|
|
65
65
|
const onSaveHandler = (0, react_2.useCallback)(() => {
|
|
66
66
|
onSave(hasChanged ? mf.trim() : previousMF);
|
|
67
67
|
}, [hasChanged, mf, onSave, previousMF]);
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: inputStyle, children: [(0, jsx_runtime_1.jsx)("input", { type: "text", onChange: onChangeHandler, defaultValue: previousMF }
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: inputStyle, children: [(0, jsx_runtime_1.jsx)("input", { type: "text", onChange: onChangeHandler, defaultValue: previousMF }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onSaveHandler, disabled: !isValidMF, children: isValidMF ? 'Set' : 'Invalid' })] }));
|
|
69
69
|
}
|
|
70
70
|
exports.default = MolecularFormulaInput;
|
|
@@ -78,6 +78,6 @@ function MoleculeSelection(props) {
|
|
|
78
78
|
}, [onChange]);
|
|
79
79
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { css: toolbarStyle, children: (0, jsx_runtime_1.jsxs)("p", { children: [molecules &&
|
|
80
80
|
molecules.length > 0 &&
|
|
81
|
-
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] }
|
|
81
|
+
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] }) }), (0, jsx_runtime_1.jsx)("div", { css: moleculeContainerStyle, children: (0, jsx_runtime_1.jsx)(NextPrev_1.default, { defaultIndex: currentIndex, onChange: onChangeHandler, children: molecules?.map((mol, index) => ((0, jsx_runtime_1.jsxs)("div", { className: "slider", children: [(0, jsx_runtime_1.jsx)("div", { children: mol.molfile && ((0, jsx_runtime_1.jsx)(full_1.MolfileSvgRenderer, { id: `molSVG${index}`, width: 120, molfile: mol.molfile })) }), (0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsx)(MF_1.default, { mf: mol.mf }), " - ", mol.mw?.toFixed(2)] })] }, mol.key))) }) })] }));
|
|
82
82
|
}
|
|
83
83
|
exports.default = MoleculeSelection;
|
|
@@ -34,7 +34,7 @@ function Arrow({ direction, onClick }) {
|
|
|
34
34
|
outline: 0;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`, children: (0, jsx_runtime_1.jsx)(fa_1.FaAngleLeft, { style: { transform: `scaleX(${direction === 'right' ? '-1' : '1'})` } }
|
|
37
|
+
`, children: (0, jsx_runtime_1.jsx)(fa_1.FaAngleLeft, { style: { transform: `scaleX(${direction === 'right' ? '-1' : '1'})` } }) }));
|
|
38
38
|
}
|
|
39
39
|
const transition = 0.45;
|
|
40
40
|
function NextPrev({ children, loop = false, defaultIndex = 0, onChange = () => null, }) {
|
|
@@ -96,6 +96,6 @@ function NextPrev({ children, loop = false, defaultIndex = 0, onChange = () => n
|
|
|
96
96
|
height: 100%;
|
|
97
97
|
width: ${width * (Sliders ? Sliders.length : 1)}px;
|
|
98
98
|
display: flex;
|
|
99
|
-
`, children: Sliders }
|
|
99
|
+
`, children: Sliders }), activeIndex !== 0 && (0, jsx_runtime_1.jsx)(Arrow, { direction: "left", onClick: prevHandler }), Sliders && activeIndex !== Sliders.length - 1 && ((0, jsx_runtime_1.jsx)(Arrow, { direction: "right", onClick: nextHandler }))] }));
|
|
100
100
|
}
|
|
101
101
|
exports.default = (0, react_2.memo)(NextPrev);
|
|
@@ -40,6 +40,6 @@ const NumberInput = (0, react_1.forwardRef)(({ label, name, defaultValue = 0, st
|
|
|
40
40
|
_ref.current.value = Number(defaultValue);
|
|
41
41
|
}
|
|
42
42
|
}, [defaultValue, onChange, ref]);
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { ...styles.container, ...style.container }, children: [(0, jsx_runtime_1.jsx)("span", { style: { ...styles.label, ...style.label }, children: label }
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { ...styles.container, ...style.container }, children: [(0, jsx_runtime_1.jsx)("span", { style: { ...styles.label, ...style.label }, children: label }), (0, jsx_runtime_1.jsx)("div", { style: { ...styles.inputContainer, ...style.inputContainer }, children: (0, jsx_runtime_1.jsx)("input", { ref: ref ? ref : localRef, name: name, style: { ...styles.input, ...style.input }, type: "number", pattern: pattern, defaultValue: defaultValue, step: step, onChange: changeHander, onInput: onInput, min: min, max: max }, defaultValue) })] }));
|
|
44
44
|
});
|
|
45
45
|
exports.default = NumberInput;
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function ReactTableHeader({ headerGroups }) {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("thead", { children: headerGroups.map((headerGroup) => ((0, jsx_runtime_1.jsx)("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => ((0, jsx_runtime_1.jsxs)("th", { ...column.getHeaderProps(column.getSortByToggleProps()), style: column.style, children: [column.render('Header'), (0, jsx_runtime_1.jsx)("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' }
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("thead", { children: headerGroups.map((headerGroup) => ((0, jsx_runtime_1.jsx)("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => ((0, jsx_runtime_1.jsxs)("th", { ...column.getHeaderProps(column.getSortByToggleProps()), style: column.style, children: [column.render('Header'), (0, jsx_runtime_1.jsx)("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' })] }, column.getHeaderProps().key))) }, headerGroup.getHeaderGroupProps().key))) }));
|
|
7
7
|
}
|
|
8
8
|
exports.default = (0, react_1.memo)(ReactTableHeader);
|
|
@@ -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];
|
|
@@ -68,11 +72,11 @@ const ReactTableInner = (0, react_1.forwardRef)(function ReactTableInner(props,
|
|
|
68
72
|
position: 'absolute',
|
|
69
73
|
width: '100%',
|
|
70
74
|
pointerEvents: 'none',
|
|
71
|
-
} }
|
|
75
|
+
} })), (0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, style: styles.table(enableVirtualScroll), children: [(0, jsx_runtime_1.jsx)(ReactTableHeader_1.default, { headerGroups: headerGroups }), (0, jsx_runtime_1.jsx)("tbody", { ...getTableBodyProps(), children: rowsData.map((row, index) => {
|
|
72
76
|
prepareRow(row);
|
|
73
77
|
(0, useRowSpan_1.prepareRowSpan)(rows, enableVirtualScroll ? index + indexBoundary.start : index, rowSpanHeaders, groupKey);
|
|
74
78
|
return ((0, jsx_runtime_1.jsx)(ReactTableRow_1.default, { row: row, ...row.getRowProps(), onContextMenu: (e) => contextMenuHandler(e, row), highlightedSource: highlightedSource }, row.key));
|
|
75
|
-
}) }
|
|
79
|
+
}) })] }), (0, jsx_runtime_1.jsx)(ContextMenu_1.default, { ref: contextRef, context: context })] }));
|
|
76
80
|
});
|
|
77
81
|
function ReactTable(props) {
|
|
78
82
|
const { data, approxItemHeight = 40, groupKey } = props;
|
|
@@ -157,6 +161,6 @@ function ReactTable(props) {
|
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
}, [approxItemHeight, findEndIndex, findStartIndex, tableVirtualConfig]);
|
|
160
|
-
return ((0, jsx_runtime_1.jsx)(ReactTableContext_1.ReactTableProvider, { value: tableVirtualConfig, children: (0, jsx_runtime_1.jsx)(ReactTableInner, { onScroll: scrollHandler, ref: combineRef, ...{ ...props } }
|
|
164
|
+
return ((0, jsx_runtime_1.jsx)(ReactTableContext_1.ReactTableProvider, { value: tableVirtualConfig, children: (0, jsx_runtime_1.jsx)(ReactTableInner, { onScroll: scrollHandler, ref: combineRef, ...{ ...props } }) }));
|
|
161
165
|
}
|
|
162
166
|
exports.default = (0, react_1.memo)(ReactTable);
|
|
@@ -24,9 +24,9 @@ function ReactTableExpandable({ columns, data, renderRowSubComponent = () => nul
|
|
|
24
24
|
contextRef.current.handleContextMenu(e, row.original);
|
|
25
25
|
}
|
|
26
26
|
}, [contextRef]);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, children: [(0, jsx_runtime_1.jsx)(ReactTableHeader_1.default, { headerGroups: headerGroups }
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, children: [(0, jsx_runtime_1.jsx)(ReactTableHeader_1.default, { headerGroups: headerGroups }), (0, jsx_runtime_1.jsx)("tbody", { ...getTableBodyProps(), children: rows.map((row) => {
|
|
28
28
|
prepareRow(row);
|
|
29
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ReactTableRow_1.default, { row: row, ...row.getRowProps(), onContextMenu: (e) => contextMenuHandler(e, row) }, row.key), row.isExpanded ? ((0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)("td", { colSpan: flatColumns.length, children: row?.original?.id && renderRowSubComponent({ row }) }
|
|
30
|
-
}) }, getTableBodyProps().key)] }
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ReactTableRow_1.default, { row: row, ...row.getRowProps(), onContextMenu: (e) => contextMenuHandler(e, row) }, row.key), row.isExpanded ? ((0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)("td", { colSpan: flatColumns.length, children: row?.original?.id && renderRowSubComponent({ row }) }) })) : null, (0, jsx_runtime_1.jsx)(ContextMenu_1.default, { ref: contextRef, context: context })] }, row.index));
|
|
30
|
+
}) }, getTableBodyProps().key)] }));
|
|
31
31
|
}
|
|
32
32
|
exports.default = ReactTableExpandable;
|
|
@@ -10,11 +10,11 @@ function ReactTableFlexLayout({ data, columns, onMouseDown = () => null, }) {
|
|
|
10
10
|
columns,
|
|
11
11
|
data,
|
|
12
12
|
}, react_table_1.useSortBy, react_table_1.useFlexLayout);
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, style: { height: '100%' }, children: [(0, jsx_runtime_1.jsx)("thead", { children: headerGroups.map((headerGroup) => ((0, jsx_runtime_1.jsx)("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => ((0, jsx_runtime_1.jsxs)("th", { ...column.getHeaderProps(column.getSortByToggleProps()), children: [column.render('Header'), (0, jsx_runtime_1.jsx)("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' }
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, style: { height: '100%' }, children: [(0, jsx_runtime_1.jsx)("thead", { children: headerGroups.map((headerGroup) => ((0, jsx_runtime_1.jsx)("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => ((0, jsx_runtime_1.jsxs)("th", { ...column.getHeaderProps(column.getSortByToggleProps()), children: [column.render('Header'), (0, jsx_runtime_1.jsx)("span", { children: column.isSorted ? (column.isSortedDesc ? ' ▼' : ' ▲') : '' })] }, column.getHeaderProps().key))) }, headerGroup.getHeaderGroupProps().key))) }), (0, jsx_runtime_1.jsx)("tbody", { ...getTableBodyProps(), style: { display: 'block', height: '100%', overflowY: 'auto' }, children: rows.map((row) => {
|
|
14
14
|
prepareRow(row);
|
|
15
15
|
return ((0, jsx_runtime_1.jsx)("tr", { ...row.getRowProps(), onMouseDown: onMouseDown, children: row.cells.map((cell) => {
|
|
16
16
|
return ((0, jsx_runtime_1.jsx)("td", { ...cell.getCellProps(), style: { ...cell.getCellProps().style, padding: '0px' }, children: cell.render('Cell') }, cell.getCellProps().key));
|
|
17
17
|
}) }, row.getRowProps().key));
|
|
18
|
-
}) }
|
|
18
|
+
}) })] }));
|
|
19
19
|
}
|
|
20
20
|
exports.default = (0, react_1.memo)(ReactTableFlexLayout);
|
|
@@ -20,6 +20,6 @@ const styles = (0, react_1.css) `
|
|
|
20
20
|
`;
|
|
21
21
|
function SaveButton(props) {
|
|
22
22
|
const { className = '', disabled = false, popupPlacement = 'left', popupTitle = 'Save', onClick, } = props;
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: popupTitle, popupPlacement: popupPlacement, children: (0, jsx_runtime_1.jsx)("button", { css: styles, type: "button", onClick: onClick, disabled: disabled, className: className, children: (0, jsx_runtime_1.jsx)(fa_1.FaCheck, {}
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: popupTitle, popupPlacement: popupPlacement, children: (0, jsx_runtime_1.jsx)("button", { css: styles, type: "button", onClick: onClick, disabled: disabled, className: className, children: (0, jsx_runtime_1.jsx)(fa_1.FaCheck, {}) }) }) }));
|
|
24
24
|
}
|
|
25
25
|
exports.default = (0, react_2.memo)(SaveButton);
|
|
@@ -33,6 +33,6 @@ const Select = (0, react_2.forwardRef)(function Select(props, ref) {
|
|
|
33
33
|
outline: none;
|
|
34
34
|
}
|
|
35
35
|
`;
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)("select", { ref: ref, css: styles, name: name, onChange: handleOnChanged, defaultValue: defaultValue, className: className, style: style, children: data.map((d) => ((0, jsx_runtime_1.jsx)("option", { value: d.value, children: d.label }, `${d.key}`))) }
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)("select", { ref: ref, css: styles, name: name, onChange: handleOnChanged, defaultValue: defaultValue, className: className, style: style, children: data.map((d) => ((0, jsx_runtime_1.jsx)("option", { value: d.value, children: d.label }, `${d.key}`))) }));
|
|
37
37
|
});
|
|
38
38
|
exports.default = Select;
|
|
@@ -30,6 +30,6 @@ const styles = (0, react_1.css) `
|
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
32
|
function DeleteButton({ onDelete, className = 'delete' }) {
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)("button", { css: styles, className: className, type: "button", onClick: onDelete, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, { className: "icon" }
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)("button", { css: styles, className: className, type: "button", onClick: onDelete, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, { className: "icon" }) }));
|
|
34
34
|
}
|
|
35
35
|
exports.default = DeleteButton;
|
|
@@ -36,12 +36,12 @@ function InternalTab({ tabid, tablabel, isActive, onClick = () => null, canDelet
|
|
|
36
36
|
e.stopPropagation();
|
|
37
37
|
onDelete({ ...e, tablabel, tabid });
|
|
38
38
|
}, [onDelete, tablabel, tabid]);
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)("li", { className: className, onClick: clickHandler, css: styles(tabstyles), "data-test-id": `tab-${tabid}`, children: [canDelete && (0, jsx_runtime_1.jsx)(DeleteButton_1.default, { onDelete: deleteHandler }
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("li", { className: className, onClick: clickHandler, css: styles(tabstyles), "data-test-id": `tab-${tabid}`, children: [canDelete && (0, jsx_runtime_1.jsx)(DeleteButton_1.default, { onDelete: deleteHandler }), render
|
|
40
40
|
? render({ isActive, title: tablabel || '', id: tabid })
|
|
41
|
-
: tablabel] }
|
|
41
|
+
: tablabel] }));
|
|
42
42
|
}
|
|
43
43
|
exports.InternalTab = InternalTab;
|
|
44
44
|
function Tab(props) {
|
|
45
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.children }
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.children });
|
|
46
46
|
}
|
|
47
47
|
exports.default = Tab;
|
|
@@ -97,7 +97,7 @@ function Tabs({ children, onClick, position, onDelete = () => null, activeTab, }
|
|
|
97
97
|
if (tabid === activeTab) {
|
|
98
98
|
contentChild = child.props.children;
|
|
99
99
|
}
|
|
100
|
-
return ((0, jsx_runtime_1.jsx)(Tab_1.InternalTab, { ...child.props, isActive: tabid === activeTab, onClick: onClickTabHandler, onDelete: onDelete }
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)(Tab_1.InternalTab, { ...child.props, isActive: tabid === activeTab, onClick: onClickTabHandler, onDelete: onDelete }));
|
|
101
101
|
});
|
|
102
102
|
const styles = (0, react_2.useMemo)(() => {
|
|
103
103
|
switch (position) {
|
|
@@ -109,6 +109,6 @@ function Tabs({ children, onClick, position, onDelete = () => null, activeTab, }
|
|
|
109
109
|
return topStyles;
|
|
110
110
|
}
|
|
111
111
|
}, [position]);
|
|
112
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "tabs", css: styles, children: [(0, jsx_runtime_1.jsx)("ol", { className: "tab-list", children: tabs }
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "tabs", css: styles, children: [(0, jsx_runtime_1.jsx)("ol", { className: "tab-list", children: tabs }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content", children: contentChild })] }));
|
|
113
113
|
}
|
|
114
114
|
exports.default = (0, react_2.memo)(Tabs);
|